content
stringlengths
1
15.9M
\section{Introduction } This paper provides a design-based framework for variance (bound) estimation in experimental analysis. Results are applicable to virtually any combination of experimental design, linear estimator (e.g., difference-in-means, OLS, WLS) and variance bound, allowing for unified treatment and a basis for systematic study and compairison of designs using matrix spectral analysis. A proposed variance estimator reproduces Eicker-Huber-White (aka. ``robust", ``heteroskedastic consistent", ``sandwich", ``White", ``Huber-White", ``HC", etc.) standard errors and ``cluster-robust" standard errors as special cases. While past work has shown algebraic equivalences between design-based and the so-called ``robust" standard errors under some designs, this paper motivates them for a wide array of design-estimator-bound triplets. In so doing, it provides a clearer and more general motivation for ``robust" variance estimators. \subsection{The Neyman Causal Model} Consider a randomized experiment with $k$ treatment arms. The Neyman causal model (NCM) assumes that the units in the experimental study represent a finite population of size $n$. For a given outcome measure, call it $y$, each unit, $i$, responds with one of $k$ possible values in $\{y_{1i}, y_{2i}, ..., y_{ki} \}$, depending on their treatment assignment. The possible responses are referred to as the \textit{potential outcomes}. In the NCM these values are considered (nonrandom) constants, which stands in contrast to other, more common, formulations where potential outcomes are assumed to be sampled from some (possibly nonparametric) distribution. The only random element in the NCM is the treatment assignment indicators $\{R_{1i}, R_{2i},...,R_{ki} \}$, and they determine which potential outcome will be observed by the researcher. Since a unit can only be assigned to one arm of the experiment, only one of the indicators will realize a value of one, and the rest will be zero, such that $R_{1i}+R_{2i}+...+R_{ki}=1$ for all $i$. A standard representation of the \textit{observed} outcome for the $i^{th}$ unit under the NCM would be, \begin{align*} Y_i^{obs}= y_{1i}R_{1i}+y_{2i}R_{2i}+...+y_{ki}R_{ki}, \end{align*} which is itself random, due to the assignment indicators. For each unit, the observed data can then be represented as $\{Y^{obs}_i, R_{1i}, R_{2i},..., R_{ki}, x_i\}_{\forall i}$, where $x_i$ is an additional vector of $l$ covariates. Like the potential outcomes, $x_i$ is nonrandom, but unlike the potential outcomes the same value is observed irrespective of the assignment. Ideally, we would like to know, for a given individual, $i$, the difference between responses under various arms, called a \textit{treatment effect}. It is clear from the definition of $Y_i^{obs}$, however, that individual treatment effects are not observable since only one of the potential outcomes can be observed for an individual, a problem known as \textit{fundamental problem of causal inference} \citep{holland}. As a result, researchers often try to estimate \textit{averages} of across the units in study. \exampleType{Treatment/Control Experiment} In an experiment with a control group (arm 0) and a treatment group (arm 1) the individual-level treatment effect, $y_{1i}-y_{0i}$, but this is not identified, so a researcher might try to estimate the average treatment effect $n^{-1} \sum_i \left(y_{1i}-y_{0i}\right)$.{ \hfill $\triangle$} \exampleType{$2 \times 2$ Factorial Experiment} Consider a 2$\times$2 factorial design with treatments A and B. Units in arm 1 are controls (no treatments), units in arm 2 are given treatment A only, units in arm 3 are given B only, and units in arm 4 are given both A and B. Similar to the treatment/control example, one could contrast the mean of an arm with a single treatment against the control mean, e.g., the average effect of A compared to no treatments, $n^{-1} \sum_i \left(y_{2i}-y_{1i}\right)$. Another quantity of interest might be an \textit{average marginal causal effect }(AMCE), e.g., the effect of A marginalizing over the levels of B, $n^{-1} \sum_i \frac{1}{2} \left(y_{2i}-y_{1i}+y_{4i}-y_{3i}\right)$. Another example might be an omnibus test based on the contrast $n^{-1} \sum_i \left(y_{2i}/3+y_{3i}/3+y_{4i}/3-y_{1i}\right)$.{ \hfill $\triangle$} \vspace{2mm} Target quantities such as \textit{local average treatment effects} or \textit{conditional average treatment effects} might also be considered in this framework, but the primary focus of this paper is \textit{variance} estimation for linear estimators for virtually any design. Suffice to say that developing variance estimators before considering point estimation is appealing, if somewhat counter-intuitive, for two reasons. On the one hand, asymptotic analysis for point estimators can be made easier by having first established general variance expressions (for all linear estimators and virtually any design). On the other hand, a general framework for variance (bound) estimation can be developed even while a particular estimation target has yet to be defined, and even if an ``estimator" does not estimate anything of interest, it's variance can still be studied. \subsection{Notation} To simplify notation, let $y_1$, $y_2$,...,$y_k$ represent length $n$ vectors of potential outcomes associated with each of the arms, with the $i^{th}$ element of each corresponding to the $i^{th}$ unit. Next, stack these vectors to create \begin{align*} y := \left(y_1' \hspace{2mm} y_2' \hspace{2mm} \hdots \hspace{2mm} y_k' \right)', \end{align*} which is a column vector and has length $kn$ containing all $k$ potential outcomes for all $n$ units. Next, if we let $1_{\scriptscriptstyle n}$ be a $n$-length vector of ones, then a $kn \times k$ \textit{intercept matrix} can be defined as, \begin{align*} \mathds{1} := & \left[ \begin{matrix} 1_{\scriptscriptstyle n} & & & \\ & 1_{\scriptscriptstyle n} & & \\ & & \ddots \\ & & & 1_{\scriptscriptstyle n} \end{matrix} \right], \end{align*} which, for example, allows us to express a \textit{k}-length vector of the means of each arm as $\frac{1}{n} \mathds{1}' y$, or, equivalently, $\left(\mathds{1}' \mathds{1}\right)^{-1} \mathds{1}' y$. Next, define $c$ as the \textit{contrast vector}, of length $k$, such that $c'\left(\mathds{1}' \mathds{1}\right)^{-1} \mathds{1}' y$ gives contrasts between potential outcome means for the various arms. \exampleType{Treatment/Control Experiment, continued} With two arms, control (arm 1) and treatment (arm 2), define $c=\left(-1 \hspace{2mm} 1\right)'$. Then the \textit{average treatment effect} is simply $c' \left(\mathds{1}' \mathds{1}\right)^{-1} \mathds{1}' y= n^{-1} \sum_i \left(y_{2i}-y_{1i}\right)$.{ \hfill $\triangle$} \exampleType{$2 \times 2$ Factorial Experiment, continued} In a four-arm experiment, if $c=(-1\hspace{2mm} 1 \hspace{2mm} 0 \hspace{2mm} 0)'$ then $ c' \left(\mathds{1}' \mathds{1}\right)^{-1} \mathds{1}' y= n^{-1} \sum_i \left(y_{2i}-y_{1i}\right) $ is the avearge difference between the first two arms. Alternatively, if the researcher chooses $c=(-\frac{1}{2}\hspace{2mm} \frac{1}{2} \hspace{2mm} -\frac{1}{2} \hspace{2mm} \frac{1}{2} )'$ then $c' \left(\mathds{1}' \mathds{1}\right)^{-1} \mathds{1}' y = n^{-1} \sum_i \frac{1}{2} \left(y_{2i}-y_{1i} + y_{4i}-y_{3i} \right)$. { \hfill $\triangle$} \vspace{2mm} Next define an $n \times n$ diagonal matrix that has all $n$ assignment indicators for treatment arm 1 on the diagonal, \begin{align*} \mathbf{R}_1 :=& \left[ \begin{matrix} R_{11} \\ & R_{12} \\ & & \ddots \\& & & R_{1i} \\ & & & & \ddots& \\ & & & & & R_{1n} \end{matrix}\right], \hspace{2mm} \end{align*} and define $\mathbf{R}_2$, $\mathbf{R}_3$, $\hdots$, $\mathbf{R}_k$ analogously. Arrange these matrices to create the diagonal $kn \times kn$ matrix \begin{align*} \mathbf{R} :=& \left[ \begin{matrix} \mathbf{R}_{1} \\ & \mathbf{R}_{2} \\ & & \ddots \\& & & \mathbf{R}_{k} \end{matrix}\right] \hspace{2mm} \end{align*} and note the a $kn\times kn$ diagonal matrix of assignment probabilities can be written as $\boldsymbol{\pi}:=\text{\textnormal{E}}[\mathbf{R}]$, with the first $n$ diagonal elements representing probabilities of assignment to arm 1, then the next $n$ diagonal elements are probabilities of assignment to arm 2 and so on. In this alternative notation the researcher can be said to observe the assignment, $\mathbf{R}$, the observed vector of outcomes, $\mathbf{R} y$, and also a matrix of $l$ pre-treatment covariates, $\mathbf{x}$, which has size $n \times l$. In a randomized experiment $\boldsymbol{\pi}$ is also observed (known) in many cases. When intractable analytically, however, it might be estimated to arbitrary precision by repeating the original randomization until a target level of precision is achieved. For covariate adjusted estimators, it is convenient to define the $kn \times (k+l) $ matrix, \begin{align*} \mathbb{x} := & \left[ \begin{matrix} 1_{\scriptscriptstyle n} & & & & \mathbf{x} \\ & 1_{\scriptscriptstyle n} & & & \mathbf{x} \\ & & \ddots & & \vdots \\ & & & 1_{\scriptscriptstyle n} & \mathbf{x} \end{matrix} \right] \end{align*} which augments the intercept vector, $\mathds{1}$, with covariates. \begin{remark} For some cases, such adjusting for covariates separately by arm, it might be useful to define $\mathbb{x}$ with $\mathbf{x}$ matrices arranged along a block-diagonal. In that case, it is useful to stipulate that $\mathbf{x}$ have columns that sum to zero to avoid problems of coefficient interpretation \citep[cf.][]{lin, middleton18}. This will be discussed further in paper 3 of 4. \end{remark} \section{Linear estimators}\label{section.estimators} This paper focuses on the variance, bounding and variance bound estimation of the class of estimators that are linear in the observed outcome, $y$. This class includes everything from the difference-of-means, to the Horvitz-Thomposon estimator, to regression. Note, however, that beyond presenting a general approach to variance bound estimation for the class of linear estimators, point estimation itself will be the focus of the third and fourth papers in the series. Questions such as consistency will be and causal identification will be considered then. For now, suffice it to be said that an estimator need not be consistent for any quantity of interest at all (causal or otherwise) in order to derive variance expressions for it. \subsection{Definition} \begin{definition}[Linear Estimators]\label{linear.est} Linear estimators are defined as having the form, \begin{align} \widehat{\delta}_c := & c' \mathbf{W} \mathbf{R} y, \end{align} where $\mathbf{W}$ a matrix with $kn$ columns and $k$ rows if it is an unadjusted estimator and $k+l$ rows if it is a covariate adjusted estimator. The length of the contrast vector, $c$, is equal to the number of rows in $\mathbf{W}$. The first $k$ entries of $c$ are the contrast values, followed by $l$ zeros in the case of covariate adjusted estimators. \end{definition} Also, for convenience, define $\mathbf{w}$ to be $\mathbf{W}$ evaluated at $\mathbf{R}=\boldsymbol{\pi}$, i.e., \begin{align} \mathbf{w}:=\{ \left. \mathbf{W}\right|_{\mathbf{R}=\boldsymbol{\pi}}\}. \end{align} \begin{definition}[Horvitz-Thompson estimator] The Horvitz-Thompson estimator written as in Definition \ref{linear.est} with, \begin{align*} \mathbf{W} &= \mathbf{W}^{\scriptscriptstyle{\textnormal{HT}}} :=\left(\mathds{1}'\mathds{1}\right)^{-1} \mathds{1}'\bpi^{-1} , \end{align*} noting that $\mathbf{W}^{\scriptscriptstyle{\textnormal{HT}}}=\mathbf{w}^{{\scriptscriptstyle{\textnormal{HT}}}}$ since $\mathbf{W}^{\scriptscriptstyle{\textnormal{HT}}}$ is nonrandom. \end{definition} \begin{definition}[Contrast-of-means] Contrast-of-means (e.g., difference-of-means) can be written as in Definition 2.1 with, \begin{align*} \mathbf{W} &= \mathbf{W}^{\scriptscriptstyle{\textnormal{CM}}} := \left(\mathds{1}' \mathbf{R} \mathds{1} \right)^{-1}\mathds{1}' . \end{align*} \end{definition} \begin{definition}[Hajek estimator] The Hajek estimator can be written as Definition (\ref{linear.est}) with, \begin{align*} \mathbf{W} &= \mathbf{W}^{\scriptscriptstyle{\textnormal{HJ}}} := \left(\mathds{1}' \bpi^{-1} \mathbf{R} \mathds{1} \right)^{-1}\mathds{1}' \bpi^{-1} . \end{align*} \end{definition} \begin{definition}[OLS estimator] The OLS estimator can be written as Definition (\ref{linear.est}) with, \begin{align*} \mathbf{W} &= \mathbf{W}^{\scriptscriptstyle{\textnormal{OLS}}} := \left(\mathbb{x}' \mathbf{R} \mathbb{x} \right)^{-1}\mathbb{x} ' . \end{align*} \end{definition} \begin{definition}[WLS estimators] WLS estimators can be written as in Definition 2.1 with, \begin{align*} \mathbf{W} &= \mathbf{W}^{\scriptscriptstyle{\textnormal{WLS}}} := \left(\mathbb{x}' \mathbf{m} \mathbf{R} \mathbb{x} \right)^{-1}\mathbb{x}' \mathbf{m} . \end{align*} \end{definition} \begin{remark} WLS is a class that includes OLS, Hajek and contrast-of-means (e.g., difference-of-means) as special cases. It is equivalent to OLS when $\mathbf{m}=\mathbf{i}_{kn}$ ($\mathbf{i}_{kn}$ is the identity matrix). If $\mathbf{m}=\mathbf{i}_{kn}$ and, in addition, $\mathbb{x}=\mathds{1}$, WLS is OLS without covariates, which is equivalent to the contrast-of-means (e.g., in the two-arm case, we call this the difference-of-means), underscoring Theorem 1 in \cite{freedman08a}. If $\mathbf{m}=\bpi^{-1}$ and $\mathbb{x}=\mathds{1}$, then it is the Hajek estimator. The covariate adjusted WLS with $\mathbf{m}=\bpi^{-1}$ will be discussed further in paper 3 of 4, because it is algebraically equivalent to the generalized regression estimator introduced there. \end{remark} \subsection{First-order Taylor approximation} In this section, a general approach to obtaining asymptotically valid variance expressions for linear estimators is given using a first-order approximation of a Tyalor series. The method is often used when an exact, closed-form variance expression is not tractable, as may be the case with any number of linear estimators. Examination of the $W$ vectors defined above shows that, with the exception of Horvitz-Thompson, the estimators all had random denominators (i.e., inverted random matrices), making closed form variance expressions difficult. The original estimator and its Taylor approximation are asymptotically equivalent (cite Pashley). As such, the original estimator ``borrows" the closed-form variance expression given for the Taylor approximation, again justified given the asymptotic equivalence. \begin{lemma}[First-order Taylor approximation for linear estimators] First, assume a linear estimator as defined in Definition 2.1. Then, let $\Big \{ \left. . \hspace{1mm} \right| _{\mathbf{R} = \boldsymbol{\pi}} \Big \}$ represent a function that evaluates the argument to the left of the vertical line at ${\mathbf{R} = \boldsymbol{\pi}}$. Similarly, let $\Big \{ \left. . \hspace{1mm} \right| _{\mathbf{R} = \boldsymbol{\pi}} \left(\mathbf{R}-\boldsymbol{\pi}\right)\Big \}$ evaluate its argument at ${\mathbf{R} = \boldsymbol{\pi}}$ and then multiply by $\left(\mathbf{R}-\boldsymbol{\pi}\right)$. Then from Taylor's theorem and the product rule, we have the first-order Taylor approximation, $\widehat{\delta} \approx \widehat{\delta}^{\scriptscriptstyle{\textnormal{T}}}$, with \begin{align}\label{TaylorLinearization} \widehat{\delta}^{\scriptscriptstyle{\textnormal{T}}}_c := & \Big\{ \left. c' \mathbf{W} \mathbf{R} y \hspace{1mm} \right|_{\vspace{10mm }\scriptstyle \mathbf{R} =\boldsymbol{\pi}}\Big \} +\Big\{ \left. c' \mathbf{W} \right|_{\scriptstyle \mathbf{R} =\boldsymbol{\pi}} \Big \}\bigg \{ \left. \frac{\text{d}}{\text{d} \mathbf{R}} \mathbf{R} \right|_{\scriptstyle \mathbf{R} =\boldsymbol{\pi}} \left(\mathbf{R}-\boldsymbol{\pi}\right) \bigg \} y \nonumber \\ &\hspace{17mm}+ \bigg \{ \left. \frac{\text{d}}{\text{d} \mathbf{R}} c' \mathbf{W} \right|_{\vspace{10mm }\scriptstyle \mathbf{R} =\boldsymbol{\pi}} \left(\mathbf{R}-\boldsymbol{\pi}\right) \bigg\} \Big\{ \left. \mathbf{R} \right|_{\scriptstyle \mathbf{R} = \boldsymbol{\pi} } \Big \}y \nonumber \\ =& \hspace{2mm} a_c + c' \mathbf{w} \mathbf{R} y + \bigg \{ \left. \frac{\text{d}}{\text{d} \mathbf{R}} c' \mathbf{W} \right|_{\vspace{10mm }\scriptstyle \mathbf{R} =\boldsymbol{\pi}} \mathbf{R} \bigg\} \boldsymbol{\pi} y \end{align} where \begin{align*} a_c =& - \bigg \{ \left. \frac{\text{d}}{\text{d} \mathbf{R}} c' \mathbf{W} \right|_{\vspace{10mm }\scriptstyle \mathbf{R} =\boldsymbol{\pi}} \boldsymbol{\pi} \bigg\} \boldsymbol{\pi} y \end{align*} is a constant. \end{lemma} \begin{remark} An expression for $a_c$ is given but it is not important for the purposes of variance approximations because the term is a constant. Recall that the purpose of deriving a first-order Taylor approximation, $\widehat{\delta}^{\scriptscriptstyle{\textnormal{T}}}_c$, is to identify a closed-form variance expression that might then be ``borrowed" by the original linear estimator given in Definition \ref{linear.est}. \end{remark} \begin{theorem}\label{theorem.Taylor.is.HT} For a constant, $a_c$, and vector of constants, $z_c$, first-order Taylor approximations for linear estimators may be written as, \begin{align*} \widehat{\delta}^{\scriptscriptstyle{\textnormal{T}}}_c = & \hspace{1mm} a_c + n \ones{k}' \mathbf{w}^{{\scriptscriptstyle{\textnormal{HT}}}} \mathbf{R} z_c, \end{align*} where $z_c$ has the form $z_c = \boldsymbol{\pi} \diag{ \mathbf{l} y} \mathbf{t}' c$ and where $(k \times kn)$ matrix $\mathbf{t}$ and $(kn \times kn)$ matrix $\mathbf{l}$ depend on the estimator. Hence, a first-order approximation of a Tyalor series using Taylor's theorem variance approximations will be expressed as the variance of a Horvitz-Thompson estimator of the ATE of $z_c$ with contrast vector $n\ones{k}$. \end{theorem} \begin{proof} With Equation (\ref{TaylorLinearization}), it is easy to see that the Taylor linearized approximation has the form \begin{align*} \widehat{\delta}^{\scriptscriptstyle{\textnormal{T}}}_c= & a_c +c' \mathbf{t} \mathbf{R} \mathbf{l} y \end{align*} where matrices $\mathbf{t}$ and $\mathbf{l}$ are $(k \times kn)$ and $(kn \times kn)$, respectively, and will depend on the estimator. Noting that $c' \mathbf{t}$ is a $(1 \times kn)$ vector, write \begin{align*} \widehat{\delta}^{\scriptscriptstyle{\textnormal{T}}}_c = & a_c +\ones{kn}' \diag{ c' \mathbf{t} } \mathbf{R} \mathbf{l} y \\ = & a_c +\ones{kn}' \mathbf{R} \diag{ c' \mathbf{t} } \mathbf{l} y \\ = & a_c +\ones{kn}' \bpi^{-1} \mathbf{R} \boldsymbol{\pi} \diag{ c' \mathbf{t} } \mathbf{l} y \\ = & a_c + n \ones{k}' (\mathds{1}' \mathds{1})^{-1} \mathds{1}' \bpi^{-1} \mathbf{R} \boldsymbol{\pi} \diag{ c' \mathbf{t} } \mathbf{l} y \\ = & a_c + n \ones{k}' \mathbf{w}^{\scriptscriptstyle{\textnormal{HT}}} \mathbf{R} z_c \end{align*} where $z_c := \boldsymbol{\pi} \diag{ \mathbf{l} y} \mathbf{t}' c$. \end{proof} \begin{remark} The result shows that first order Taylor approximations are Horvitz-Thompson estimators. This highlights the importance of studying Horvitz-Thompson variance in order to develop asymptotic variance expressions for linear estimators in general. \end{remark} \begin{remark} The constant vector $z_c$ is not directly observed. The next section will show that the plug-in principle provides a basis for asymptotically valid variance expressions. \end{remark} \setlength{\extrarowheight}{12pt} \begin{table}[H] \begin{center} \caption{Examples of linear estimators. $\mathbf{W}$ is as defined in Definition 2.1, $z_c$ is as defined in Theorem \ref{theorem.Taylor.is.HT}.} \begin{tabular}{l | c | c }\label{table.examples.linear.ests} Estimator & $\mathbf{W}$ & $z_c$ \\ \hline Horvitz-Thompson & $ \left(\mathds{1}' \mathds{1}\right)^{-1} \mathds{1}' \bpi^{-1}$ & $ \diagSmallBracket{y} \mathds{1} \left(\mathds{1}' \mathds{1}\right)^{-1} \hspace{-1mm} c$ \\ \makecell[l]{Contrast-of-means} & $ \left(\mathds{1}' \mathbf{R} \mathds{1}\right)^{-1} \mathds{1}' $ & $ \boldsymbol{\pi} \diagSmallBracket{y - \mathds{1}\left( \mathds{1}' \boldsymbol{\pi} \mathds{1}\right)^{-1} \mathds{1}' \boldsymbol{\pi} y} \mathds{1} \left( \mathds{1}' \boldsymbol{\pi} \mathds{1}\right)^{-1} \hspace{-1mm} c $ \\ Hajek & $ \left(\mathds{1}' \bpi^{-1} \mathbf{R} \mathds{1}\right)^{-1}\mathds{1}' \bpi^{-1} $ & $ \diagSmallBracket{y - \mathds{1}\left( \mathds{1}' \mathds{1}\right)^{-1} \mathds{1}'y} \mathds{1} \left(\mathds{1}' \mathds{1}\right)^{-1}\hspace{-1mm} c $ \\ OLS & $\left(\mathbb{x}' \mathbf{R} \mathbb{x} \right)^{-1}\mathbb{x}'$ & $ \boldsymbol{\pi} \diag{y- \mathbb{x} b^{{\scriptscriptstyle{\textnormal{OLS}}}}} \mathbb{x} \left( \mathbb{x}' \boldsymbol{\pi} \mathbb{x}\right)^{-1} \hspace{-1mm} c $ \\ WLS & $ \left(\mathbb{x}' \mathbf{m} \mathbf{R} \mathbb{x} \right)^{-1} \mathbb{x}' \mathbf{m} $ & $ \boldsymbol{\pi} \diag{y- \mathbb{x} b^{{\scriptscriptstyle{\textnormal{WLS}}}}} \mathbf{m} \mathbb{x} \left( \mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x}\right)^{-1} \hspace{-1mm} c $ \\ \makecell[l]{Generalized reg. \\ \hspace{1mm} ($b=b^{{\scriptscriptstyle{\textnormal{WLS}}}}$)} & $\mathbf{w}^{\scriptscriptstyle{\textnormal{HT}}} \left(\mathbf{i}_{kn}- \left( \mathbf{R} -\boldsymbol{\pi} \right)\mathbb{x} \mathbf{W}^{\scriptscriptstyle{\textnormal{WLS}}}\right) $ & $\diag{y- \mathbb{x} b^{{\scriptscriptstyle{\textnormal{WLS}}}} } \mathds{1} \left(\mathds{1}' \mathds{1}\right)^{-1} \hspace{-1mm} c$ \\ \makecell[l]{ IV } & \makecell{$ \big (\widehat{\tilde{\mathbb{x}}}' \mathbf{R} \widehat{\tilde{\mathbb{x}}} \big )^{-1} \widehat{\tilde{\mathbb{x}}}' $ \hspace{2mm}with: \\ $\widehat{\tilde{\mathbb{x}}}:= \mathbb{z} \left( \mathbb{z}' \mathbf{R} \mathbb{z}\right)^{-1} \mathbb{z}' \mathbf{R} \mathbb{x} $ } & \makecell{$ \boldsymbol{\pi} \diag{y- \mathbb{x} b^{{\scriptscriptstyle{\textnormal{IV}}}}} \tilde{\mathbb{x}} \left( \tilde{\mathbb{x}}' \boldsymbol{\pi} \tilde{\mathbb{x}}\right)^{-1} \hspace{-1mm} c $ \hspace{2mm}with: \\ $\tilde{\mathbb{x}}:= \mathbb{z} \left( \mathbb{z}' \boldsymbol{\pi} \mathbb{z}\right)^{-1} \mathbb{z}' \boldsymbol{\pi} \mathbb{x}$, $b^{{\scriptscriptstyle{\textnormal{IV}}}}:= \left( \tilde{\mathbb{x}}' \boldsymbol{\pi} \tilde{\mathbb{x}}\right)^{-1} \tilde{\mathbb{x}}' \boldsymbol{\pi} y$ } \end{tabular} \end{center} \end{table} \setlength{\extrarowheight}{0pt} \exampleType{Weighted least squares} Weighted least squares is a class that includes OLS ($\mathbf{m}=\mathbf{i}_{kn}$), contrast-of-means (e.g., difference of means, with $\mathbf{m}=\mathbf{i}_{kn}$ and $\mathbb{x}=\mathds{1}$) and the Hajek estimator ($\mathbf{m}=\bpi^{-1}$ and $\mathbb{x}=\mathds{1}$). To derive its Taylor approximation, first let $\mathbf{w}^{\scriptscriptstyle{\textnormal{WLS}}}= {\left. {\mathbf{W}^{{\scriptscriptstyle{\textnormal{WLS}}}}} \right| }_{\mathbf{R}=\boldsymbol{\pi}}= \left( \mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x}\right)^{-1} \mathbb{x}' \mathbf{m} $, and note that by the rules of matrix differentiation the third term in Equation (\ref{TaylorLinearization}) is \begin{align*} \bigg \{ \left. \frac{\text{d}}{\text{d} \mathbf{R}} c' \left( \mathbb{x}' \mathbf{m} \mathbf{R} \mathbb{x} \right)^{-1}\mathbb{x}' \mathbf{m} \right|_{\vspace{10mm } \scriptstyle \mathbf{R} =\boldsymbol{\pi}} \mathbf{R} \bigg\} & \boldsymbol{\pi} y \\ = -c' & \left( \mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1} \bigg \{ \left. \frac{\text{d}}{\text{d} \mathbf{R}} \left(\mathbb{x}' \mathbf{m} \mathbf{R} \mathbb{x} \right) \right|_{\vspace{10mm }\scriptstyle \mathbf{R} =\boldsymbol{\pi}} \mathbf{R} \bigg\} \left( \mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1}\mathbb{x}' \mathbf{m} \boldsymbol{\pi} y \\ = -c' & \left( \mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1} \mathbb{x}' \mathbf{m} \bigg \{ \left. \frac{\text{d}}{\text{d} \mathbf{R}} \mathbf{R} \right|_{\vspace{10mm }\scriptstyle \mathbf{R} =\boldsymbol{\pi}} \mathbf{R} \bigg\} \mathbb{x} b^{\scriptscriptstyle{\textnormal{WLS}}} \\ = -c' & \mathbf{w}^{\scriptscriptstyle{\textnormal{WLS}}} \mathbf{R} \mathbb{x} b^{\scriptscriptstyle{\textnormal{WLS}}}. \end{align*} Therefore, Equation (\ref{TaylorLinearization}) made specific to WLS is \begin{align*} \widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}} ({\scriptscriptstyle{\textnormal{WLS}}})}= & a_c^{\scriptscriptstyle{\textnormal{WLS}}} + c' \mathbf{w}^{{\scriptscriptstyle{\textnormal{WLS}}}}\mathbf{R} y -\mathbf{w}^{\scriptscriptstyle{\textnormal{WLS}}} \mathbf{R} \mathbb{x} b^{\scriptscriptstyle{\textnormal{WLS}}} \\ = & a_c^{\scriptscriptstyle{\textnormal{WLS}}} + c' \mathbf{w}^{{\scriptscriptstyle{\textnormal{WLS}}}}\mathbf{R} \left( y-\mathbb{x} b^{\scriptscriptstyle{\textnormal{WLS}}}\right) \\ = & a_c^{\scriptscriptstyle{\textnormal{WLS}}} + \ones{kn}' \diag{c' \mathbf{w}^{{\scriptscriptstyle{\textnormal{WLS}}}}} \mathbf{R} \diag{y-\mathbb{x} b^{\scriptscriptstyle{\textnormal{WLS}}}} \ones{kn} \\ = & a_c^{\scriptscriptstyle{\textnormal{WLS}}} + \ones{kn}' \mathbf{R} \diag{y-\mathbb{x} b^{\scriptscriptstyle{\textnormal{WLS}}}} {\mathbf{w}^{{\scriptscriptstyle{\textnormal{WLS}}}}}' c \\ = & a_c^{\scriptscriptstyle{\textnormal{WLS}}} + n\ones{k}' \mathbf{w}^{\scriptscriptstyle{\textnormal{HT}}} \mathbf{R} z_c^{\scriptscriptstyle{\textnormal{WLS}}} \end{align*} where $z_c^{{\scriptscriptstyle{\textnormal{WLS}}}} = \boldsymbol{\pi} \diag{y- \mathbb{x} b^{{\scriptscriptstyle{\textnormal{WLS}}}}} {\mathbf{w}^{\scriptscriptstyle{\textnormal{WLS}}}}' c $ is recognizable in the form given in Theorem \ref{theorem.Taylor.is.HT} with $\textbf{t}^{\scriptscriptstyle{\textnormal{WLS}}}=\mathbf{w}^{{\scriptscriptstyle{\textnormal{WLS}}}}$ and $\textbf{l}^{{\scriptscriptstyle{\textnormal{WLS}}}} = \mathbf{i}_{kn} -\mathbb{x} \left( \mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1} \mathbb{x}' \mathbf{m} \boldsymbol{\pi} $ is a ``residual maker" matrix. { \hfill $\triangle$} \begin{comment} \begin{table}[H] \begin{center} \caption{Examples of linear estimators. $W$ is as defined in Definition 2.1, $z$ is as defined in Theorem \ref{theorem.Taylor.is.HT}.} \begin{tabular}{l | c | c | c }\label{table.examples.linear.ests} & abbr. & $W$ & $z'$ \\ \hline \vspace{1mm} Horvitz-Thompson & ${\scriptscriptstyle{\textnormal{HT}}}$ & $n^{-1}\ones{kn}' \bpi^{-1} $ & $y'$ \\ Difference-of-means & ${\scriptscriptstyle{\textnormal{CM}}}$ & $\big\{ \left(\mathds{1}' \mathbf{R} \mathds{1}\right)^{-1}\mathds{1}' \big\}_{\scriptscriptstyle (2,.)}$ & $ n \big\{ \mathbf{w}^{\scriptscriptstyle{\textnormal{CM}}} \big\}_{\scriptscriptstyle (2,.)} \diagSmallBracket{y - \mathds{1} \mathbf{w}^{\scriptscriptstyle{\textnormal{CM}}} \boldsymbol{\pi} y} \boldsymbol{\pi} $ \\ Hajek & ${\scriptscriptstyle{\textnormal{HJ}}}$ & $\big\{\left(\mathds{1}' \bpi^{-1} \mathbf{R} \mathds{1}\right)^{-1}\mathds{1}' \bpi^{-1} \big\}_{\scriptscriptstyle (2,.)}$ & $y - \mathds{1}\left( \mathds{1}' \mathds{1}\right)^{-1} \mathds{1}'y$ \\ OLS & ${\scriptscriptstyle{\textnormal{OLS}}}$ & $\big\{ \left(\mathbb{x}' \mathbf{R} \mathbb{x} \right)^{-1}\mathbb{x}' \big\}_{\scriptscriptstyle (2,.)}$ & $\diag{y- \mathbb{x} b^{{\scriptscriptstyle{\textnormal{OLS}}}}} \big\{ n \left( \mathbb{x}' \boldsymbol{\pi} \mathbb{x}\right)^{-1} \mathbb{x}' \boldsymbol{\pi} \big\}_{\scriptscriptstyle (2,.)}'$ \\ WLS ($\mathbf{m}=\bpi^{-1}$) & ${\scriptscriptstyle{\textnormal{WLS}}}$ & $\big\{\left(\mathbb{x}' \bpi^{-1} \mathbf{R} \mathbb{x} \right)^{-1}\mathbb{x}' \bpi^{-1} \big\}_{\scriptscriptstyle (2,.)}$ & $\diag{y- \mathbb{x} b^{{\scriptscriptstyle{\textnormal{WLS}}}}} \big\{ n \left( \mathbb{x}' \mathbb{x}\right)^{-1} \mathbb{x}' \big\}_{\scriptscriptstyle (2,.)}'$ \end{tabular} \end{center} \end{table} \end{comment} \section{Variance}\label{section.var} Now that the importance of Horvitz-Thompson estimators for asymptotic variance expressions for the entire class of linear estimators (which includes, for example, OLS, WLS, Hajek, and difference-of-means) has been established, this section will give the variance of HT estimators and first-order approximates of linear estimators. Throughout, we will make use of the $kn \times kn$ ``first order design matrix", which will allow for easy comparison of designs using spectral analysis. \begin{definition} The ``first-order design matrix" is a variance-covariance matrix of inverse-probability weighted treatment assignments, written, \begin{align}\label{dmat} \mathbf{d}:=&\text{\textnormal{V}} \left(\ones{kn}'\bpi^{-1} \mathbf{R} \right) \\ = & \left(\text{\textnormal{E}}\left[\mathbf{R} \ones{kn} \ones{kn}' \mathbf{R} \right] - \boldsymbol{\pi} \ones{kn} \ones{kn}' \boldsymbol{\pi} \right) / \left( \boldsymbol{\pi} \ones{kn} \ones{kn}' \boldsymbol{\pi} \right), \nonumber \end{align} where ``/" represents elementwise division. \end{definition} \begin{theorem}[Horvitz-Thompson Variance]\label{theorem.HTvar} An exact expression for the variance of Horvitz-Thompson estimators is given by \begin{align*} \text{\textnormal{V}}\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{HT}}}}_c \right) = { z^{{\scriptscriptstyle{\textnormal{HT}}}}_c}'\mathbf{d} { z^{{\scriptscriptstyle{\textnormal{HT}}}}_c}, \end{align*} where ${z_c^{{\scriptscriptstyle{\textnormal{HT}}}}}' = c' \left(\mathds{1}' \mathds{1} \right)^{-1} \mathds{1}' \diag{y}$. \end{theorem} \begin{proof} Using the identity $y=\diag{y} \ones{kn}$, the Horvitz-Thompson estimator can be written \begin{align*} \widehat{\delta}^{{\scriptscriptstyle{\textnormal{HT}}}} = & c' \left(\mathds{1}' \mathds{1} \right)^{-1} \mathds{1}' \bpi^{-1} \mathbf{R} \diag{y} \ones{kn} \\ = & c' \left(\mathds{1}' \mathds{1} \right)^{-1} \mathds{1}'\diag{y} \bpi^{-1} \mathbf{R} \ones{kn}. \\ = & { z^{{\scriptscriptstyle{\textnormal{HT}}}}_c}' \bpi^{-1} \mathbf{R} \ones{kn}. \end{align*} where ${z_c^{{\scriptscriptstyle{\textnormal{HT}}}}}' = c' \left(\mathds{1}' \mathds{1} \right)^{-1} \mathds{1}' \diag{y}$. So the variance can be written, \begin{align*} \text{\textnormal{V}}\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}}_c \right) & = { z^{{\scriptscriptstyle{\textnormal{HT}}}}_c}'\text{\textnormal{V}} \left(\ones{kn}'\bpi^{-1} \mathbf{R} \right) { z^{{\scriptscriptstyle{\textnormal{HT}}}}_c} \\ & = { z^{{\scriptscriptstyle{\textnormal{HT}}}}_c}'\mathbf{d} { z^{{\scriptscriptstyle{\textnormal{HT}}}}_c} \end{align*} \end{proof} \begin{theorem}[Variance of first-order Taylor approximations] The variance of first-order Taylor approximations of linear estimators can be written as, \begin{align} \label{var.general} \text{\textnormal{V}}\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}}_c \right) = {z_c^{\scriptscriptstyle{\textnormal{T}}}}' \mathbf{d} z_c^{\scriptscriptstyle{\textnormal{T}}}, \end{align} with examples of $z^{\scriptscriptstyle{\textnormal{T}}}_c$ given in Table \ref{table.examples.linear.ests}. \end{theorem} \begin{proof} By Theorem \ref{theorem.Taylor.is.HT}, linear approximations are Horvitz-Thompson estimators of a vector $z_c$ and contrast vector $n\ones{k}$. Now, $ n \ones{k}' \left( \mathds{1}' \mathds{1} \right)^{-1} \mathds{1}' \diag{z^{\scriptscriptstyle{\textnormal{T}}}_c}= \ones{kn}' \diag{z^{\scriptscriptstyle{\textnormal{T}}}_c} ={z^{\scriptscriptstyle{\textnormal{T}}}_c} $. Therefore, using Theorem \ref{theorem.HTvar}, \begin{align*} \text{\textnormal{V}}\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}}_c \right) & = n \ones{k}' \left(\mathds{1}' \mathds{1} \right)^{-1} \mathds{1}' \diag{z^{\scriptscriptstyle{\textnormal{T}}}_c} \mathbf{d} \diag{z^{\scriptscriptstyle{\textnormal{T}}}_c} \mathds{1} \left(\mathds{1}' \mathds{1} \right)^{-1} \ones{k} n \\ & = {z^{\scriptscriptstyle{\textnormal{T}}}_c}' \mathbf{d} {z^{\scriptscriptstyle{\textnormal{T}}}_c} \end{align*} \end{proof} \begin{remark} Equation (\ref{var.general}) is an \textit{exact} variance expression, however, they are not identified. The next subsection introduces the necessary concept of variance bounding. \end{remark} \begin{remark} The design matrix, $\mathbf{d}$, will provide useful device in the study the best designs for outcomes with different characteristics as the next example will show. \end{remark} \exampleType{Comparing complete randomization and paired randomization} Consider a treatment/control (two-arm) experiment that is pair-randomized. A pair-randomized design is a special case of a block-randomized (i.e., stratified) design where blocks have size 2. In each pair/block, one unit is assigned to treatment and the other in control with equal (.5) probability. Across blocks, assignments are independent. When $n=4$ (and assuming w.l.o.g. that the data are sorted by pair), the design matrix is \begin{align*} \mathbf{d}^{pr} = \left[\begin{smallmatrix} \hspace{2.2mm}1 & -1 & & & -1 & \hspace{2.2mm}1 & \\ -1 & \hspace{2.2mm}1 & & & \hspace{2.2mm}1 & -1 \\ & & \hspace{2.2mm}1 & -1 & & & -1 & \hspace{2.2mm}1 \\ & & -1 & \hspace{2.2mm}1 & & & \hspace{2.2mm}1 & -1 \\ -1 & \hspace{2.2mm}1 & & & \hspace{2.2mm}1 & -1 \\ \hspace{2.2mm}1 & -1 & & & -1 & \hspace{2.2mm}1 & \\ & & -1 & \hspace{2.2mm}1 & & & \hspace{2.2mm}1 & -1 \\ & & \hspace{2.2mm}1 & -1 & & & -1 & \hspace{2.2mm}1 & \end{smallmatrix}\right], \end{align*} and note that empty cells are 0. The design matrix for complete randomization (where 2 of 4 are randomly assigned to treatment) is \begin{align*} \mathbf{d}^{cr} = \left[\begin{smallmatrix} \hspace{1mm}1 & \nicefrac{\text{-}1}{3} & \nicefrac{\text{-}1}{3} & \nicefrac{\text{-}1}{3} & \text{-}{1} & \hspace{1mm}\nicefrac{1}{3} & \hspace{1mm}\nicefrac{1}{3}& \hspace{1mm}\nicefrac{1}{3} \\ \nicefrac{\text{-}1}{3} & \hspace{1mm}1 & \nicefrac{\text{-}1}{3} & \nicefrac{\text{-}1}{3} & \hspace{1mm}\nicefrac{1}{3} & \text{-}1 & \hspace{1mm}\nicefrac{1}{3} & \hspace{1mm}\nicefrac{1}{3} \\ \nicefrac{\text{-}1}{3} & \nicefrac{\text{-}1}{3} & \hspace{1mm}1 & \nicefrac{\text{-}1}{3} & \hspace{1mm}\nicefrac{1}{3}& \hspace{1mm}\nicefrac{1}{3}& \text{-}1 & \hspace{1mm}\nicefrac{1}{3} \\ \nicefrac{\text{-}1}{3} & \nicefrac{\text{-}1}{3} & \nicefrac{\text{-}1}{3} & \hspace{1mm}1 &\hspace{1mm}\nicefrac{1}{3} & \hspace{1mm}\nicefrac{1}{3}& \hspace{1mm}\nicefrac{1}{3} & \text{-}1 \\ \text{-}1 & \hspace{1mm}\nicefrac{1}{3} & \hspace{1mm}\nicefrac{1}{3} & \hspace{1mm}\nicefrac{1}{3} & \hspace{1mm}1 & \nicefrac{\text{-}1}{3} & \nicefrac{\text{-}1}{3} & \nicefrac{\text{-}1}{3} \\ \hspace{1mm}\nicefrac{1}{3} & \text{-}1 & \hspace{1mm}\nicefrac{1}{3} & \hspace{1mm}\nicefrac{1}{3} & \nicefrac{\text{-}1}{3} & \hspace{1mm}1 & \nicefrac{\text{-}1}{3} & \nicefrac{\text{-}1}{3} & \\ \hspace{1mm}\nicefrac{1}{3} & \hspace{1mm}\nicefrac{1}{3} & \text{-}1 & \hspace{1mm}\nicefrac{1}{3} & \nicefrac{\text{-}1}{3} & \nicefrac{\text{-}1}{3} & \hspace{1mm}1 & \nicefrac{\text{-}1}{3} & \\ \hspace{1mm}\nicefrac{1}{3} & \hspace{1mm}\nicefrac{1}{3} & \hspace{1mm}\nicefrac{1}{3} & \text{-}1 & \nicefrac{\text{-}1}{3} & \nicefrac{\text{-}1}{3} & \nicefrac{\text{-}1}{3} & \hspace{1mm}1 \end{smallmatrix}\right]. \end{align*} Eigendecomposition of $\mathbf{d}^{cr}-\mathbf{d}^{pr}$ gives eigenvalues $2.67, 0, 0, 0, 0, 0, -1.33,$ and $-1.33$ corresponding eigenvectors in Table \ref{table.eigvecs}. The eigenvectors associated with nonzero eigenvalues provide insight into the subspace in $ {\mathds {R}}^{\scriptscriptstyle 2n}$ where one design may be preferable to another, for example, when the estimator is difference-in-means (which is equivalent to both Horvitz-Thopson and Hajek for these designs). \begin{table}[ht] \begin{center}\caption{Eigenvectors of $\mathbf{d}^{cr}-\mathbf{d}^{pr}$} \begin{tabular}{rrrrrrrr}\label{table.eigvecs} e1 \hspace{1mm} & e2 \hspace{1mm} & e3 \hspace{3mm}& e4\hspace{2mm} & e5\hspace{2mm} & e6\hspace{2mm} & e7\hspace{2mm} & e8\hspace{2mm} \\ \hline -0.354 & 0.791 & 0.000 & 0.000 & 0.000 & 0.000 & 0.500 & 0.000 \\ -0.354 & 0.158 & -0.573 & -0.178 & -0.250 & -0.421 & -0.500 & 0.000 \\ 0.354 & 0.158 & -0.180 & -0.450 & 0.585 & -0.149 & 0.000 & 0.500 \\ 0.354 & 0.158 & 0.319 & -0.600 & -0.260 & -0.264 & 0.000 & -0.500 \\ 0.354 & 0.474 & 0.282 & 0.524 & 0.100 & -0.190 & -0.500 & 0.000 \\ 0.354 & -0.158 & -0.291 & 0.346 & -0.150 & -0.611 & 0.500 & 0.000 \\ -0.354 & -0.158 & 0.102 & 0.073 & 0.685 & -0.339 & -0.000 & -0.500 \\ -0.354 & -0.158 & 0.602 & -0.077 & -0.161 & -0.454 & -0.000 & 0.500 \\ \hline \end{tabular} \end{center} \end{table} In this example, assuming the contrast matrix is $c=\left(-1,1\right)'$, and examining the first eigenvector with eigenvalue 2.67, one can conclude that if the outcomes for the four units given in Table \ref{table.bestcase.cr}, then the difference-of-means would be much less precise under the completely randomized design. So, the eigenvector in a sense represents a ``best-case" (normed) potential outcome vector for paired randomization. Inspection of the outcomes themselves confirms the intuition that pair randomization is better than complete randomization when units are homogenous within pairs. \begin{table}[H] \begin{center}\caption{Pair randomization better than complete randomization} \begin{tabular}{c | c | c c}\label{table.bestcase.cr} unit id & pair id & $y_0$ & $y_1$ \\ \hline 1 & 1 &\hspace{1mm}.3536 & \hspace{1mm}.3536 \\ 2 & 1 &\hspace{1mm}.3536 & \hspace{1mm}.3536 \\ 3 & 2 &-.3536 & -.3536 \\ 4 & 2 & -.3536 & -.3536 \end{tabular} \end{center} \end{table} Next, considering the two eigenvectors associated with the eigenvalue -1.33, we see the implied potential outcomes in Table \ref{table.bestcase.pr} give potential outcomes for which complete randomization is preferable. Note that either of the two sets is a ``worst-case" scenario for paired randomization, as is any set of potential outcomes that can be generated by linear combinations of the two eigenvectors. Inspection of these outcomes is consistent with the observation that complete randomization can be better than paired randomization when paired units are maximally heterogeneous. \begin{table}[H] \begin{center}\caption{Complete randomization better than pair randomization} \begin{tabular}{c | c | c c | c c}\label{table.bestcase.pr} unit id & pair id & $y_0$ & $y_1$ & $y_0$ & $y_1$ \\ \hline 1 & 1 & -.5 & -.5 &\hspace{2mm}0 & \hspace{2mm}0 \\ 2 & 1 &\hspace{1mm}.5 & \hspace{1mm}.5 &\hspace{2mm}0 & \hspace{2mm}0 \\ 3 & 2 &\hspace{2mm}0 & \hspace{2mm}0 & -.5 & -.5 \\ 4 & 2 & \hspace{2mm}0 & \hspace{2mm}0 &\hspace{1mm}.5 & \hspace{1mm}.5 \end{tabular} \end{center} \end{table} { \hfill $\triangle$} \begin{remark} The example illustrates a relatively effortless method of identifying key insights about arbitrary designs through spectral analyses of first-order design matrices. In the example, the observation that pair randomization can hurt precision when units are not homogeneous within pairs is not new. However, this approach to comparing designs is perfectly general and can be applied to virtually any designs. \end{remark} \section{Variance bounds}\label{section.var.bounds} In spite of an exact expression for first-order Taylor approximations in Equation (\ref{var_lin_est}), the quantity is never identified because not all terms in the quadratic can be observed. Even if the elements of $\mathbf{R} z_c$ were observed directly (which is the case for $\mathbf{R} z_c^{\scriptscriptstyle{\textnormal{HT}}}$ but none of the other examples in Table 1), some pairs of potential outcomes can never be jointly observed. For example, for a given unit, only one of two (or more) potential outcomes can be observed, a problem is referred to as the ``fundamental problem of causal inference" \citep{holland}. Other design features, such as clustering or pair randomization, can also render various combinations of potential outcomes unobservable. Starting with Neyman (1923) one proposed solution to unidentified variance has been to estimate a {\it variance bound}, i.e., a quantity that is provably greater than the variance, but which is identified. It should be understood that while the term \textit{variance estimation} is often used as a shorthand in the literature, it is not, in general, an accurate phrase. \textit{Variance bound estimation} is a more precise so it will be used here \begin{definition}[Variance bound matrix]\label{def.varbound} Let $\tilde{\mathbf{d}}$ be an arbitrary $kn \times kn$ matrix and let be $z$ an arbitrary vector with length $kn$. Then $\tilde{ \mathbf{d} }$ is a \textnormal{variance bound matrix} (or \textnormal{bounding matrix}) for $\mathbf{d}$ if, for all $z\in\mathds{R}^{kn}$, $z'\mathbf{d} z \leq z'\tilde{\mathbf{d}}z$. \end{definition} \begin{lemma}\label{psd} $\tilde{ \mathbf{d} }$ is a bounding matrix $\mathbf{d} $ if and only if matrix $\tilde{ \mathbf{d} }-\mathbf{d}$ is positive semi-definite. \end{lemma} \begin{proof} By the definition of a bound, $ z'\tilde{\mathbf{d}}z - z'\mathbf{d} z \geq 0$ for all $z\in \mathds{R}^{kn}$. This implies that $z'(\tilde{\mathbf{d}}-\mathbf{d} ) z \geq 0$, i.e., that $ \tilde{\mathbf{d}}-\mathbf{d} $ is positive semi-definite. \end{proof} \begin{definition}[Identified variance bound]\label{def.identified.bound} Let $\tilde{\mathbf{d}}$ be bounding matrix for $\mathbf{d}$. It gives an \textnormal{identified variance bound} if \begin{align*} \text{\textnormal{I}} (\mathbf{d}=-1) \circ \text{\textnormal{I}}(\tilde{\mathbf{d}}= 0)=\text{\textnormal{I}} (\mathbf{d}=-1) \end{align*} where $\circ$ is element-wise multiplication, $\text{\textnormal{I}}\left(\mathbf{d}=-1\right)$ is an indicator function returning an $kn \times kn$ matrix of ones and zeros indicating whether each element of $\mathbf{d}$ is equal to $-1$ (an indication that the associated term in the variance quadratic is impossible to observe), and $\text{\textnormal{I}} (\tilde{ \mathbf{d} } =0 )$ is, similarly, an indicator function returning an $kn \times kn$ matrix of ones and zeros indicating the location of zeros in $\tilde{ \mathbf{d} }$. \end{definition} \subsection{Generalizing Neyman's variance bound}\label{section.GNbound} This section proposes a generalization of Neyman's (1923) variance bound. Let matrix $\mathbf{d}$ be partitioned into $k^2$ partitions of size $n \times n$. Then for $r,s \in \{1, 2, ..., k\}$, let the $\mathbf{d}_{rs}$ be the $(r,s)^{th}$ partition, having dimension $n \times n$. Also, let $c_r$ be the $r^{th}$ element of the length-$k$ contrast vector, $c$. Then the following bounding method produces an identified bound for experiments when partitions $\textnormal{I}(\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}}_{rr}==-1)=0_{\scriptscriptstyle n\times n}$, i.e., there are no $-1$ values in the diagonal blocks, and $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}}_{rs}=\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}}_{tu}$ for $r\neq s, t\neq u \in {1,2,...,k}$ and $\sum_i c_i = 0$. Designs that meet this condition include complete randomization, cluster-randomization and block-randomization. \begin{definition}[Generalized Neyman variance bound] The ``Generalized Neyman bound" is the is the bound corresponding to the block-diagonal bounding matrix, $\tilde{\mathbf{d}}^{{\scriptscriptstyle{\textnormal{N}}}}$, with block $(r,r)$ given by, \begin{align*} \tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}}_{rr} :=& \sum_{s=1}^{k} \frac{c_r}{c_s}\mathbf{d}_{rs} \end{align*} where $c_r$ and $c_s$ are, respectively, elements $r$ and $s$ from from the contrast vector, $c$. \end{definition}\label{definition.neyman.bound} \begin{theorem} The generalized Neyman bound, with $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}}$ given in Definition \ref{definition.neyman.bound} is an identified variance bound when partitions $\textnormal{I}(\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}}_{rr}==-1)=0_{\scriptscriptstyle n\times n}$, i.e., there are no $-1$ values in the diagonal blocks, $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}}_{rs}=\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}}_{tu}$ for $r\neq s, t\neq u \in {1,2,...,k}$, and $\sum_i c_i = 0$. \end{theorem} \begin{proof} First, with $z_c^{\scriptscriptstyle{\textnormal{HT}}} =\diagSmallBracket{y} \mathds{1} (\mathds{1}' \mathds{1}){}^{-1}$ and letting $y_r$ be the length-$n$ vector of potential outcomes for the $r^{th}$ treatment arm and $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}}_{rs}$ be the $r,s$ partition of $\mathbf{d}$, we have \begin{align*} n^2 {z^{{\scriptscriptstyle{\textnormal{HT}}}}}' \mathbf{d} z^{\scriptscriptstyle{\textnormal{HT}}} = & y' \diagSmallBracket{c'\mathds{1}} \mathbf{d} \diagSmallBracket{c'\mathds{1}} y \\ = & \sum_{r=1}^k c_r^2 y_r' \mathbf{d}_{rr} y_r +\sum_{r=1}^{k-1} \sum_{s=1}^{k} c_r c_s \left(y_r' \mathbf{d}_{rs} y_s+y_s' \mathbf{d}_{sr} y_r\right) \end{align*} Next, define the $r,s$ treatment effect as $\tau_{rs}:=y_r-y_s$ and note that $\mathbf{d}_{12}=\mathbf{d}_{rs}$ for $r\neq s$. Then, by the definition of $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}}$, \begin{align*} n^2 {z^{{\scriptscriptstyle{\textnormal{HT}}}}}' \tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}} z^{\scriptscriptstyle{\textnormal{HT}}} = & y' \diagSmallBracket{c'\mathds{1}} \tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}} \diagSmallBracket{c'\mathds{1}} y \\ = & \sum_{r=1}^k c_r^2 y_r' \mathbf{d}_{rr} y_r +\sum_{r=1}^{k-1} \sum_{s=r+1}^{k} c_r c_s \left(y_r' \mathbf{d}_{rs} y_r+y_s' \mathbf{d}_{sr} y_s\right) \\ = & \sum_{r=1}^k c_r^2 y_r' \mathbf{d}_{rr} y_r +\sum_{r=1}^{k-1} \sum_{s=r+1}^{k} c_r c_s \left(y_r' \mathbf{d}_{12} y_r+y_s' \mathbf{d}_{12} y_s\right) \\ = & \sum_{r=1}^k c_r^2 y_r' \mathbf{d}_{rr} y_r +\sum_{r=1}^{k-1} \sum_{s=r+1}^{k} c_r c_s \left(y_r' \mathbf{d}_{12} (y_s+\tau_{rs})+y_s' \mathbf{d}_{12} (y_r-\tau_{rs}) \right) \\ = & n^2 {z^{{\scriptscriptstyle{\textnormal{HT}}}}}' \mathbf{d} z^{\scriptscriptstyle{\textnormal{HT}}} + \sum_{r=1}^{k-1} \sum_{s=r+1}^{k} c_r c_s \left(y_r' \mathbf{d}_{12}\tau_{rs}- y_s'\mathbf{d}_{12} \tau_{rs} \right) \\ = & n^2 {z^{{\scriptscriptstyle{\textnormal{HT}}}}}' \mathbf{d} z^{\scriptscriptstyle{\textnormal{HT}}} + \sum_{r=1}^{k-1} \sum_{s=r+1}^{k} c_r c_s \left(y_r' \mathbf{d}_{12}\tau_{rs}- (y_r-\tau_{rs})'\mathbf{d}_{12} \tau_{rs} \right) \\ = & n^2 {z^{{\scriptscriptstyle{\textnormal{HT}}}}}' \mathbf{d} z^{\scriptscriptstyle{\textnormal{HT}}} + \sum_{r=1}^{k-1} \sum_{s=r+1}^{k} c_r c_s \tau_{rs}'\mathbf{d}_{12} \tau_{rs}. \end{align*} Next, to show that the second term is non-negative, note that $\tau_{rs} =\tau_{rk}-\tau_{sk}$, and write \begin{align*} \sum_{r=1}^{k-1} \sum_{s=r+1}^{k} c_r c_s \tau_{rs}'\mathbf{d}_{12} \tau_{rs} = & \frac{1}{2}\sum_{r=1}^{k} \sum_{s=1}^{k} c_r c_s \tau_{rs}'\mathbf{d}_{12} \tau_{rs} \\ = & \frac{1}{2}\sum_{r=1}^{k} \sum_{s=1}^{k} c_r c_s \left(\tau_{rk}-\tau_{sk}\right)'\mathbf{d}_{12} \left(\tau_{rk}-\tau_{sk}\right) \\ = & \frac{1}{2}\sum_{r=1}^{k} \sum_{s=1}^{k} c_r c_s \left(\tau_{rk}'\mathbf{d}_{12} \tau_{rk}+\tau_{sk}'\mathbf{d}_{12} \tau_{sk} - 2 \tau_{sk}'\mathbf{d}_{12} \tau_{rk}\right) \\ = & \sum_{r=1}^{k} \sum_{s=1}^{k} c_r c_s \tau_{rk}'\mathbf{d}_{12} \tau_{rk} -\sum_{r=1}^{k} \sum_{s=1}^{k} c_r c_s \tau_{sk}'\mathbf{d}_{12} \tau_{rk} \\ = & \sum_{r=1}^{k} c_r \tau_{rk}'\mathbf{d}_{12} \tau_{rk} \left(\sum_{s=1}^{k} c_s\right) - \left(\sum_{s=1}^{k} c_s \tau_{sk}\right)'\mathbf{d}_{12} \left(\sum_{r=1}^{k}c_r \tau_{rk} \right) \\ =& 0 - {\tau^*} '\mathbf{d}_{12} \tau^* \\ \geq& 0 \end{align*} where the second to last line uses $\sum_{s=1}^{k} c_s=0$ and the definition ${\tau^*}:=\sum_{s=1}^{k} c_s \tau_{sk}$. The last line follows because $\mathbf{d}_{12}$ is negative semidefinite. \end{proof} \subsection{A novel proof of the Aronow-Samii bound}\label{section.ASbound} Consider an identified bound proposed by \cite{aronowsamii17} that has the a unusual virtue of being perfectly general, i.e., applicable to arbitrary (identified) designs. \begin{definition}[Aronow-Samii variance bound] The ``Aronow-Samii variance bound" is the bound corresponding to the bounding matrix, \begin{align*} \tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{AS}}}:=\mathbf{d} +\text{\textnormal{I}}\left(\mathbf{d}=-1\right)+ \diagSmallBracket{ \text{\textnormal{I}}\left(\mathbf{d}=-1\right) \ones{kn} } \end{align*} where the indicator function, $\textnormal{I}(\mathbf{d}=-1)$, returns a matrix of with ones indicating the location of -1 entries in $\mathbf{d}$ and zeros elsewhere, and $\diagSmallBracket{.}$ creates a diagonal matrix from a vector. \end{definition} \begin{theorem} The Aronow-Samii variance bound, $ n^{-2} y' \tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{AS}}} y$, is an identified bound for $ n^{-2} y' {\mathbf{d}} y$. \end{theorem} \begin{proof} By definition of $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{AS}}}$, \begin{align*} \tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{AS}}}-\mathbf{d}= \text{\textnormal{I}}\left(\mathbf{d}=-1\right)+\text{\scriptsize diag}\left(\text{\textnormal{I}}\left(\mathbf{d}=-1\right) 1_{\scriptscriptstyle kn}\right). \end{align*} Note that by construction ($\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{AS}}}-\mathbf{d}$) has diagonal elements set equal to the sum of the off-diagonal elements in its row (which by construction are either 0 or 1). The Gershgorin circle theorem implies that a real matrix is positive semi-definite if, for all $i$, the $i^{th}$ diagonal element is greater or equal to the sum of the absolute values of the other elements in the $i^{th}$ row. So, by the Gershgorin circle theorem $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{AS}}}-\mathbf{d}$ is positive semidefinite. Therefore, by Lemma (\ref{psd}), $n^{-2} y'\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{AS}}} y$ is a variance bound. Moreover, as long as the design is an identified design (i.e., $0<\pi_{1i}<1$ for all $i$), it is an identified bound because $\text{\textnormal{I}}\left(\mathbf{d}=-1\right)$ ensures that the elements of $\mathbf{d}$ equal to $-1$ correspond to 0's in $\tilde{\mathbf{d}}^{{\scriptscriptstyle{\textnormal{AS}}}}$. \end{proof} \begin{remark} Aronow and Samii (2017) derive their bound using Young's inequality. The above-theorem and proof using the Gershgorin circle theorem tie their insight to the current framework. \end{remark} \subsection{Proposed algorithm for variance bounds for any design}\label{section.Mbound} The following is an algorithm which that can obtain an identified variance bound. Like the AS bound it has the virtue of being applicable to virtually any design. The algorithm is a proof of concept, demonstrating the utility of the notation scheme which allows for the application of matrix theory for the creation of alternative bounds. The subject of comparing bounds will be considered further in Section \ref{section.comparing.bounds}. \begin{algorithm}\label{algorithm} \end{algorithm} \begin{enumerate} \item Initialize $kn \times kn$ matrix $\mathbf{t}$. Examples could be $\text{\textnormal{I}}(\mathbf{d}=-1)$ or, if the conditions for the Neyman bound not be applicable, start with $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}}-\mathbf{d}$ which may approximate a bound \item Obtain the eigen decomposition of matrix $\mathbf{t}$. If all eigenvalues are non-negative (within tolerance), goto Step 6, otherwise continue \item Update $\mathbf{t}=\mathbf{v} (\mathbf{e} \circ \text{\textnormal{I}}(\mathbf{e}>0)) \mathbf{v}'$ where $\mathbf{v}$ is the matrix of eigenvectors and $\mathbf{e}$ is a diagonal matrix of eigenvalues \item Update $\mathbf{t}=\text{\textnormal{I}}(\mathbf{d}=-1)+\text{\textnormal{I}}(\mathbf{d}\neq -1) \circ \mathbf{t}$ \item Return to Step 2 \item Set $\tilde{ \mathbf{d} }^{\scriptscriptstyle{\textnormal{M}}} =\mathbf{d}+\mathbf{t}$ \end{enumerate} As above, $\circ$ is elementwise multiplication and, for example, $\text{\textnormal{I}}(\mathbf{e}>0)$ is an indicator function returning a matrix of ones and zeros indicating which elements of $\mathbf{e}$ are greater than zero. Conceptually, the goal of the algorithm is to create a matrix $\mathbf{t}$ that can be added to $\mathbf{d}$ yielding a $\tilde{ \mathbf{d} }$ matrix that corresponds to an identified variance bound. By Lemma \ref{psd} and Definition \ref{def.identified.bound}, there are two requirements for $\mathbf{t}$. First it must be positive semi-definite, and, second, elements corresponding to $-1$'s in the matrix $\mathbf{d}$ must equal one. In step 1, $\mathbf{t}$ meets the second criterion, but not the first. In step 3, the algorithm creates an approximation to the initial $\mathbf{t}$ matrix by way of the eigen decomposition that ensures positive semi-definiteness, thus meeting the first criterion. However, due to the approximation, $\mathbf{t}$ no longer meets the second criterion. Therefore, in step 4 the algorithm forces $\mathbf{t}$ to have 1's wherever $\mathbf{d}$ has $-1$'s in order to again meet the second criteria. But doing so means that $\mathbf{t}$ will no longer meet the first criteria. So, the algorithm iterates through steps 2-4 until convergence is achieved (i.e., until all eigenvalues are non-negative in step 2) at which point $\mathbf{t}$ meets both criteria and, thus, $\tilde{ \mathbf{d} }^{\scriptscriptstyle{\textnormal{M}}}$ corresponds to an identified bound. \subsection{Comparing bounds}\label{section.comparing.bounds} \begin{definition}[Tighter bound] Let $\tilde{\mathbf{d}}^a$ and $\tilde{\mathbf{d}}^b$ correspond to two identified bounds. Matrix $\tilde{\mathbf{d}}^a$ is corresponds to a \textit{tighter bound} than $\tilde{\mathbf{d}}^b$ if $\tilde{ \mathbf{d} }^b - \tilde{ \mathbf{d} }^a$ is positive semidefinite. \end{definition} \begin{definition}[Invariant bounding matrix]\label{def.invariant.bound} A matrix $\tilde{\mathbf{d}}$ is an \textit{invariant bounding matrix} if it is an bounding matrix and if all $n \times n$ partitions, $\tilde{\mathbf{d}}_{ij} \ones{kn} = 0_{\scriptscriptstyle kn}$, i.e., all rows of the partition (or, equivalently, all columns) sum to zero. \end{definition} \exampleType{Paired randomization} Consider a pair-randomized design, whereby units are ``blocked" (i.e., stratified) into groups of two, and then, in each block, one of the two units is randomly assigned to treatment while the other is assigned to control. Assignments across blocks are independent. When $n=4$ (and assuming w.l.o.g. that the data are sorted by pair), the matrix $\mathbf{d}$ is \begin{align*} \mathbf{d} = \left[\begin{smallmatrix} \hspace{2.2mm}1 & -1 & & & -1 & \hspace{2.2mm}1 & \\ -1 & \hspace{2.2mm}1 & & & \hspace{2.2mm}1 & -1 \\ & & \hspace{2.2mm}1 & -1 & & & -1 & \hspace{2.2mm}1 \\ & & -1 & \hspace{2.2mm}1 & & & \hspace{2.2mm}1 & -1 \\ -1 & \hspace{2.2mm}1 & & & \hspace{2.2mm}1 & -1 \\ \hspace{2.2mm}1 & -1 & & & -1 & \hspace{2.2mm}1 & \\ & & -1 & \hspace{2.2mm}1 & & & \hspace{2.2mm}1 & -1 \\ & & \hspace{2.2mm}1 & -1 & & & -1 & \hspace{2.2mm}1 & \end{smallmatrix}\right], \end{align*} noting that empty cells represent 0. For the pair-randomized design, the Neyman bound cannot be applied because $\mathbf{d}_{00}$ and $\mathbf{d}_{11}$ have negative entries. The Aronow-Samii bound and Algorithm \ref{algorithm} have bounding matrices \begin{center} $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{AS}}} = \left[\begin{smallmatrix} \hspace{2.2mm}3 & & & & & \hspace{2.2mm}1 & \\ & \hspace{2.2mm}3 & & & \hspace{2.2mm}1 & \\ & & \hspace{2.2mm}3 & & & & & \hspace{2.2mm}1 \\ & & & \hspace{2.2mm}3 & & & \hspace{2.2mm}1 & \\ & \hspace{2.2mm}1 & & & \hspace{2.2mm}3 & \\ \hspace{2.2mm}1 & & & & & \hspace{2.2mm}3 & \\ & & & \hspace{2.2mm}1 & & & \hspace{2.2mm}3 & \\ & & \hspace{2.2mm}1 & & & & & \hspace{2.2mm}3 & \end{smallmatrix}\right]$, \hspace{2mm} and \hspace{2mm} $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{M}}} = {\left[\begin{smallmatrix} \hspace{2.2mm}2 & & & & & \hspace{2.2mm}2 & \\ & \hspace{2.2mm}2 & & & \hspace{2.2mm}2 & \\ & & \hspace{2.2mm}2 & & & & & \hspace{2.2mm}2 \\ & & & \hspace{2.2mm}2 & & & \hspace{2.2mm}2 & \\ & \hspace{2.2mm}2 & & & \hspace{2.2mm}2 & \\ \hspace{2.2mm}2 & & & & & \hspace{2.2mm}2 & \\ & & & \hspace{2.2mm}2 & & & \hspace{2.2mm}2 & \\ & & \hspace{2.2mm}2 & & & & & \hspace{2.2mm}2 & \end{smallmatrix}\right]}$, \end{center} \noindent respectively. By the Gershgorian circle theorem the difference, \begin{align*} \tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{AS}}} - \tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{M}}}= \left[\begin{smallmatrix} \hspace{2.2mm}1 & & & & & -1 & \\ & \hspace{2.2mm}1 & & & -1 & \\ & & \hspace{2.2mm}1 & & & & & -1 \\ & & & \hspace{2.2mm}1 & & & -1 & \\ & -1 & & & \hspace{2.2mm}1 & \\ -1 & & & & & \hspace{2.2mm}1 & \\ & & & -1 & & & \hspace{2.2mm}1 & \\ & & -1 & & & & & \hspace{2.2mm}1 & \end{smallmatrix}\right], \end{align*} is positive semi-definite, proving that $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{M}}}$ corresponds to a tighter variance bound. Confirmation also comes from eigendecomposition of the difference, $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{AS}}} - \tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{M}}}$, which yields all non-negative eigenvalues: 2, 2, 2, 2, 0, 0, 0, and 0. One might alternatively choose the invariant bounding matrix, \begin{align*} \tilde{\mathbf{d}}^{{\scriptscriptstyle{\textnormal{INVAR}}}} = {\left[\begin{smallmatrix} \hspace{1mm}2 & & -1 &-1 & & \hspace{1mm}2 &-1 & -1 \\ & \hspace{1mm}2 & -1&-1 & \hspace{1mm}2 & &-1 & -1 \\ -1 & -1 & \hspace{1mm}2 & & -1 & -1 & & \hspace{1mm}2 \\ -1 & -1 & & \hspace{1mm}2 & -1& -1& \hspace{1mm}2 & \\ & \hspace{1mm}2 &-1 & -1 & \hspace{1mm}2 & &-1 & -1 \\ \hspace{1mm}2 & & -1 & -1 & & \hspace{1mm} 2 &-1 & -1 \\ -1 & -1 & & \hspace{1mm}2 & -1 & -1 & \hspace{1.2mm}2 & \\ -1 & -1 & \hspace{1.2mm}2 & & -1 & -1 & & \hspace{1.2mm}2 & \end{smallmatrix}\right]}. \end{align*} The bound can be verified because the eigenvalues of $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{INVAR}}}-\mathbf{d}$ are 8, 0, 0, 0, 0, 0, 0, and 0. However, eigendecomposition of $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{INVAR}}}-\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{M}}}$ gives eigenvalues 4, 0, 0, 0, 0, 0, 0, and -4, indicating that the better bound may depend on outcome vector, $y$, and perhaps the estimator as well. { \hfill $\triangle$} \section{Variance bound estimation}\label{section.EstimatingBound} With an identified variance bounds defined and several methods of obtaining matrices, $\tilde{\mathbf{d}}$, this section turns to the subject of variance bound \textit{estimation}. First define the $kn \times kn$ matrix of probabilities and joint probabilities of assignment, \begin{align {\mathbf{p}} := \text{\textnormal{E}} \left[\mathbf{R} 1_{\scriptscriptstyle kn} 1'_{\scriptscriptstyle kn} \mathbf{R} \right] \nonumber. \end{align} Next define an inverse probability weighted version of bounding matrix, $\tilde{ \mathbf{d} }$, as \begin{align} \tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}} := \tilde{ \mathbf{d} } / \mathbf{p} \end{align} with $/$ denoting element-wise division defined such that division by zero equals zero. Then an unbiased estimator of a variance bound for the Horvitz-Thompson estimator can be written, \begin{align}\label{var_ht_est} \widehat{\tilde{\text{\textnormal{V}}}}\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{HT}}}} \right) := {z_c^{\scriptscriptstyle{\textnormal{HT}}}}' \mathbf{R} \tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}} \mathbf{R} z_c^{\scriptscriptstyle{\textnormal{HT}}}, \end{align} with $z_c^{\scriptscriptstyle{\textnormal{HT}}} := \diagSmallBracket{y}\mathds{1} \left(\mathds{1}' \mathds{1} \right)^{-1} c$. It is unbiased for the variance bound ${z_c^{\scriptscriptstyle{\textnormal{HT}}}}' \tilde{\mathbf{d}} z_c^{\scriptscriptstyle{\textnormal{HT}}}$ because $\text{\textnormal{E}} \left[\mathbf{R} \tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}} \mathbf{R} \right]=\tilde{ \mathbf{d} }$ by construction. Being inverse-probability weighted, the variance bound estimator in (\ref{var_ht_est}) is, itself, a Horvitz-Thompson estimator. For other linear estimators, examples of which are given in Table \ref{table.examples.linear.ests}, the bound $z_c' \tilde{ \mathbf{d} }z_c$ cannot be estimated unbiasedly because the definition of $z_c$ will often include quantities that, themselves, must be estimated. However, an appeal to the plug-in principle suggests the use of \begin{align}\label{var_lin_est} \widehat{\tilde{\text{\textnormal{V}}}}\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}} }_c \right) := \widehat{z}_c' \mathbf{R} \tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}} \mathbf{R} \widehat{z}_c \end{align} with $\widehat{z}_c$ having the same form as $z_c$ but with sample analogues replacing some components. \exampleType{The special case of Eicker-Huber-White (a.k.a. ``heteroskedastic consistent", ``sandwich", and ``robust") standard errors} For the OLS estimator, $z^{\scriptscriptstyle{\textnormal{OLS}}}_c$ is defined in Table (\ref{table.examples.linear.ests}). The plug-in principle motivates the use of \begin{align*} \mathbf{R} \widehat{z}^{\scriptscriptstyle{\textnormal{OLS}}}_c = \boldsymbol{\pi} \diag{\mathbf{R} \widehat{u}} \mathbb{x} \left( \mathbb{x}' \mathbf{R} \mathbb{x}\right)^{-1} c, \end{align*} where $\mathbf{R} \widehat{u}:=\mathbf{R} (y-\mathbb{x} \widehat{b}^{{\scriptscriptstyle{\textnormal{OLS}}}} )$ and $\widehat{b}^{{\scriptscriptstyle{\textnormal{OLS}}}}:=\left( \mathbb{x}' \mathbf{R} \mathbb{x}\right)^{-1} \mathbb{x}' \mathbf{R} y$ is the OLS coefficient. Then from equation (\ref{var_lin_est}) we have, \begin{align*} \widehat{\tilde{\text{\textnormal{V}}}}\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{OLS}}}) }_c \right) = & c' \left(\mathbb{x}' \mathbf{R} \mathbb{x} \right)^{-1} \mathbb{x}' \diag{\mathbf{R} \widehat{u}} \boldsymbol{\pi} \tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}} \boldsymbol{\pi} \diag{\mathbf{R} \widehat{u}} \mathbb{x} \left(\mathbb{x}' \mathbf{R} \mathbb{x} \right)^{-1}\hspace{-1mm}c. \end{align*} This is a the variance bound estimator in (\ref{var_lin_est}) made specific to OLS. So far it is applicable to virtually any design and any variance bound. Next, specify a Bernoulli design, in which units are assigned independently to treatment. (Probabilities of assignment may be equal across units, but they need not be in this example.) In this design, the diagonal elements of $\mathbf{d}$ are equal to the diagonal of $\boldsymbol{\pi}^{-1} -\mathbf{i}_{\scriptscriptstyle kn}$, where $\mathbf{i}_{\scriptscriptstyle kn}$ is an identity matrix. Further, any of the above bounding methods yields $\tilde{\mathbf{d}}=\boldsymbol{\pi}^{-1} -\mathbf{i} + \mathbf{i}=\boldsymbol{\pi}^{-1}$. Thus $\tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}}=\boldsymbol{\pi}^{-2}$ so that $\boldsymbol{\pi} \tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}} \boldsymbol{\pi}=\mathbf{i}_{\scriptscriptstyle kn}$ is the identity matrix. So the OLS variance bound estimator for Bernoulli designs simplifies to, \begin{align*} \widehat{\tilde{\text{\textnormal{V}}}}{}^{{\scriptscriptstyle{\textnormal{B}}}}\left(\widehat{\delta}_c^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{OLS}}}) } \right) = & c' \left(\mathbb{x}' \mathbf{R} \mathbb{x} \right)^{-1}\mathbb{x}' \diag{\mathbf{R} \widehat{u}^2} \mathbb{x} \left(\mathbb{x}' \mathbf{R} \mathbb{x} \right)^{-1} c. \end{align*} This is White's (1980) canonical ``sandwich" variance estimator, sometimes referred to as HC0. { \hfill $\triangle$} \begin{remark} The example shows that Eicker-Huber-White standard errors are a special case of (\ref{var_lin_est}) for OLS in a Bernoulli design. Note, however, that (\ref{var_lin_est}) is much more general. It applies to any linear estimator, virtually any design and any (identified) variance bound. \end{remark} \begin{remark} Adjustments for degrees of freedom (e.g., HC1) or leverage (e.g., HC2, HC3, etc.) can be applied as well. \end{remark} \exampleType{The special case of ``cluster robust" standard errors} Also consider this variance bound estimator for OLS in designs in which clusters are assigned independently to treatment. Then, if we choose the Neyman bound $\tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}}^{\scriptscriptstyle{\textnormal{N}}}$ (or $\tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}}^{\scriptscriptstyle{\textnormal{M}}}$, which is equivalent in the case of for Bernoulli assignment of clusters), and assuming w.l.o.g. that units are sorted by cluster, then $\boldsymbol{\pi} \tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}}^{{\scriptscriptstyle{\textnormal{N}}}} \boldsymbol{\pi} $ resolves to a block diagonal matrix of 1's with the blocks corresponding to clusters. Hence, (\ref{var_lin_est}) also reproduces the ``cluster-robust" standard errors sometimes referred to as CR0 as a special case.{ \hfill $\triangle$} \section{Asymptotics} \subsection{Conditions for Convergence of Horvitz-Thompson Estimators} First establishing the unbiasedness of Horvitz-Thompson estimators will allow for straightforward proofs of consistency. \begin{lemma}\label{lemma.HT.unbiased} The Horvitz-Thompson estimator for an outcome vector, $y$, and given contrast, $c$, is unbiased for $\delta_c$. \end{lemma} \begin{proof} \begin{align*} \text{\textnormal{E}} \left[ c' \left(\mathds{1}' \mathds{1} \right)^{-1} \mathds{1}' \bpi^{-1} \mathbf{R} y \right]= & c' \left(\mathds{1}' \mathds{1} \right)^{-1} \mathds{1}' \bpi^{-1} \text{\textnormal{E}} \left[ \mathbf{R} \right]y \\ = & c' \left(\mathds{1}' \mathds{1} \right)^{-1} \mathds{1}' \bpi^{-1} \boldsymbol{\pi} y \\ = &c' \left(\mathds{1}' \mathds{1} \right)^{-1} \mathds{1}'y \\ = & \delta_c, \end{align*} \end{proof} \begin{condition}[Bounded contrast]\label{condition.bound.c} The chosen contrast vector is finite, i.e., there exists a finite value $u_c$ such that $\textnormal{max}(|c|)< u_c$. \end{condition} \begin{condition}[Bounded outcomes]\label{condition.bound.y} There exists a finite value, $u_y$, such that $\textnormal{max}(|y|)<u_y$ for all $n$. \end{condition} \begin{condition}[Design constraint for consistent Horvitz-Thompson estimators]\label{condition.bound.dmat} There exists a finite value, $u_\mathbf{d}$, such that $n^{-1} ||\mathbf{d}||_{{1,1}} < u_\mathbf{d}$ for all $n$, where $||.||_{1,1}$ is the matrix norm that sums the absolute values of the matrix entries. \end{condition} \begin{theorem}[Root-n consistency of HT estimators]\label{theorem.HT.consistency} By Lemma \ref{lemma.HT.unbiased} and Conditions \ref{condition.bound.c}-\ref{condition.bound.dmat} the Horvitz-Thompson estimator is root-n consistent. \end{theorem} \begin{proof} Given Lemma \ref{lemma.HT.unbiased}, it is sufficient to show that the variance converges at the parametric rate, i.e., that $n \text{\textnormal{V}}(\delta_c^{\scriptscriptstyle{\textnormal{HT}}})$ is bounded, in order to prove consistency. By Holder's Inequality, \begin{align*} n \text{\textnormal{V}}(\delta_c^{\scriptscriptstyle{\textnormal{HT}}}) & \leq n \hspace{1mm}\textnormal{max}(|c'\left(\mathds{1}' \mathds{1} \right)^{-1}\mathds{1}'y|)^2 ||\mathbf{d}||_{{1,1}} \\ & \leq \textnormal{max}(|c|)^2 \textnormal{max}(|y|)^2 n^{-1} ||\mathbf{d}||_{{1,1}} \\ & \leq u_c^2 u_y^2 u_\mathbf{d} , \end{align*} with the last line using Conditions \ref{condition.bound.c}-\ref{condition.bound.dmat}. \end{proof} \exampleType{Checking consistency of HT estimators for completely randomized experiments} Consider a completely randomized experiment with $n$ units where a fixed number of units, $n_c$, are randomly assigned to control, and the remainder, $n_t= n - n_c$, are assigned to treatment. Assume an asymptotic sequence of designs is such that there exists a constant value, $\pi$, such that $\frac{n_t}{n} \rightarrow \pi$ as $n \rightarrow \infty$ with $0<\pi_t<1$. Partition $\mathbf{d}$ into four $(n \times n)$ matrices and let $\mathbf{d}_{ab}$ represent the $a,b \in \{1,2\}$ partition. Each partition has elements which take on two possible values, one on the diagonal and another on the off-diagonal. Because $\mathbf{d}_{12}=\mathbf{d}_{21}$, entries of matrix $\mathbf{d}$ take on one of six possible values. In Table \ref{table.d.completerand}, analysis of the these six values and their corresponding frequencies shows that a completely randomized design yields $\frac{1}{n}||\mathbf{d}||_{{1,1}}=2\left(\frac{n_t}{n_c}+\frac{n_c}{n_t}+2\right)=O(1)$. Thus, Condition \ref{condition.bound.dmat} is satisfied. Therefore, by Theorem \ref{theorem.HT.consistency}, Horvitz-Thompson estimators are consistent for completely randomized experiments for bounded contrast, $c$, and outcome vector, $y$. { \hfill $\triangle$} \begin{table} \centering \begin{tabular}{|c|c|c|c|c|}\hline partition & $ij$ pattern & count & $\scriptstyle \{\mathbf{d}_{ab}\}_{ij}$ & count$\scriptstyle \times \frac{1}{n} \{\mathbf{d}_{ab}\}_{ij} $ \\ \hline $\mathbf{d}_{11}$ & $\scriptstyle i=j$ & $\scriptstyle n$ & $\scriptstyle \frac{n_t}{n_c}$ & $\scriptstyle \frac{n_t}{n_c}= O(1)$ \\ & $\scriptstyle i \neq j$ & $\scriptstyle n(n-1)$ & $\scriptstyle -\frac{n_t}{n_c(n-1)}$ & $\scriptstyle -\frac{n_t}{n_c}= O(1)$ \\ \hline $\mathbf{d}_{12}$ or $\mathbf{d}_{21}$ & $\scriptstyle i=j$ & $\scriptstyle 2n$ & $\scriptstyle -1$ & $\scriptstyle -2=O(1)$ \\ & $\scriptstyle i \neq j$ & $\scriptstyle 2n(n-1)$ & $\scriptstyle \frac{1}{(n-1)}$ & $\scriptstyle 2=O(1)$ \\ \hline $\mathbf{d}_{22}$ & $\scriptstyle i=j$ & $\scriptstyle n$ & $\scriptstyle \frac{n_c}{n_t}$ & $\scriptstyle \frac{n_c}{n_t}=\scriptstyle O(1)$ \\ & $\scriptstyle i \neq j$ & $\scriptstyle n(n-1)$ & $\scriptstyle -\frac{n_c}{n_t(n-1)}$ & $\scriptstyle -\frac{n_c}{n_t}= O(1)$ \\ \hline \end{tabular} \caption{Analysis of Condition \ref{condition.bound.dmat} for Complete Randomization} \label{table.d.completerand} \end{table} \subsection{Conditions for Convergence of WLS estimator class} \begin{condition}[Bounded covariates]\label{condition.bound.x} There exists a finite value $u_\mathbf{x}$ that bounds the covariate values, i.e., $\textnormal{max}(|\mathbf{x} |)<u_\mathbf{x} $, for all $n$. \end{condition} \begin{condition}[Bounded $\boldsymbol{\pi} \mathbf{m}$]\label{condition.bound.m} There exists a finite value $u_{\boldsymbol{\pi}\mathbf{m}}$ that bounds $\boldsymbol{\pi}$ times the WLS ``weighting" matrix $\mathbf{m}$, i.e., $\textnormal{max}(| \boldsymbol{\pi} \mathbf{m} |)<u_{\boldsymbol{\pi}\mathbf{m}} $, for all $n$. \end{condition} \begin{lemma}[Root-n consistency of WLS]\label{lemma.WLS.consistency} By conditions \ref{condition.bound.y}-\ref{condition.bound.m} and Theorem \ref{theorem.HT.consistency}, the WLS ``numerator'' vector, $\frac{1}{n} \mathbb{x}' \mathbf{m} \mathbf{R} y$, is root-n consistent for $\frac{1}{n} \mathbb{x}' \mathbf{m} \boldsymbol{\pi} y$. Likewise, by conditions \ref{condition.bound.dmat}-\ref{condition.bound.m} and Theorem \ref{theorem.HT.consistency}, the WLS ``denominator'' matrix, $\frac{1}{n} \mathbb{x}' \mathbf{m} \mathbf{R} \mathbb{x}$, is root-n consistent for $\frac{1}{n} \mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x}$. Further, by the continuous mapping theorem $\widehat{b}^{{\scriptscriptstyle{\textnormal{WLS}}}} \rightarrow b^{\scriptscriptstyle{\textnormal{WLS}}}$. \end{lemma} \begin{proof} Let $\mathbb{x}_i$ be the column vector created from the $i^{th}$ column of $\mathbb{x}$. Then the $i^{the}$ element of $\frac{1}{n} \mathbb{x} \mathbf{m} \mathbf{R} y $ can be written, \begin{align*} \{ \frac{1}{n} \mathbb{x} \mathbf{m} \mathbf{R} y \}_{i } =& \frac{1}{n} \mathbb{x}_i' \mathbf{m} \mathbf{R} y \\ = & \frac{1}{n} \ones{kn}' \diag{\mathbb{x}_i} \mathbf{m} \mathbf{R} y \\ = & \frac{1}{n} \ones{kn}' \mathbf{R} \mathbf{m} \diag{\mathbb{x}_i} y \\ = & \ones{k}' \mathbf{w}^{{\scriptscriptstyle{\textnormal{HT}}}} \mathbf{R} \boldsymbol{\pi} \mathbf{m} \diag{\mathbb{x}_i} y \\ = & \ones{k}' \mathbf{w}^{{\scriptscriptstyle{\textnormal{HT}}}} \mathbf{R} q \end{align*} with $q=\boldsymbol{\pi} \mathbf{m} \diag{\mathbb{x}_i} y $, showing that the elements of the denominator matrix are Horvitz-Thompson estimators with outcome vector $q$ and contrast vector $\ones{k}$. Now by Theorem \ref{lemma.HT.unbiased}, this is consistent because $q$ is bounded, i.e., $\textnormal{max}(|q|) \leq u_{\boldsymbol{\pi} \mathbf{m}} u_\mathbf{x} u_y $. Similarly, the $i,j$ element of the WLS ``denominator'' matrix, can be written \begin{align*} \{ \frac{1}{n} \mathbb{x} \mathbf{m} \mathbf{R} \mathbb{x} \}_{ij} = & \ones{k}' \mathbf{w}^{{\scriptscriptstyle{\textnormal{HT}}}} \mathbf{R} r \end{align*} with $r=\boldsymbol{\pi} \mathbf{m} \diag{\mathbb{x}_i} \mathbb{x}_j $, showing that the elements of the denominator matrix are Horvitz-Thompson estimators with outcome vector $r$ and contrast vector $\ones{k}$. Now by Theorem \ref{lemma.HT.unbiased}, this is consistent because $r$ is bounded, i.e., $\textnormal{max}(|r|) \leq u_{\boldsymbol{\pi} \mathbf{m}} u_\mathbf{x}^2 $. \end{proof} \begin{condition}[Stability of WLS ``denominator" estimand]\label{condition.denom.stable} The denominator of the ``true" WLS coefficient, $\frac{1}{n} \mathbb{x}' \mathbf{m} \pi \mathbb{x}$, is invertable for all $n$ and converges in probability to a matrix, $\mathbf{v}$, with finite entries. \end{condition} \begin{theorem}[Consistency of the Taylor approximation] By Conditions \ref{condition.bound.y}-\ref{condition.denom.stable}, the Taylor approximate coefficient, $ \widehat{b}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}})}:= b^{{\scriptscriptstyle{\textnormal{WLS}}}} + \left(\mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1}\mathbb{x}' \mathbf{m} \mathbf{R} (y-\mathbb{x} b^{{\scriptscriptstyle{\textnormal{WLS}}}})$ is root-n consistent for ${b}^{{\scriptscriptstyle{\textnormal{WLS}}}}:= \left(\mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1}\mathbb{x}' \mathbf{m} \boldsymbol{\pi} y$, i.e., $ \widehat{b}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}})}- b^{{\scriptscriptstyle{\textnormal{WLS}}}} = O_p(1/\sqrt{n})$. \end{theorem} \begin{proof} We have \begin{align*} \widehat{b}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}})}- b^{{\scriptscriptstyle{\textnormal{WLS}}}}:= &\left(\mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1}\mathbb{x}' \mathbf{m} \mathbf{R} (y-\mathbb{x} b^{{\scriptscriptstyle{\textnormal{WLS}}}}) \\ =& \left(\mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1} \left( \left(\mathbb{x}' \mathbf{m}\mathbf{R} y-\mathbb{x}' \mathbf{m} \boldsymbol{\pi} y\right) -\left( \mathbb{x}' \mathbf{m} \mathbf{R} \mathbb{x} -\mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right) b^{{\scriptscriptstyle{\textnormal{WLS}}}} \right) \\ =& \left(\frac{1}{n} \mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1} \left( \left(\frac{1}{n} \mathbb{x}' \mathbf{m}\mathbf{R} y-\frac{1}{n}\mathbb{x}' \mathbf{m} \boldsymbol{\pi} y\right) - \left( \frac{1}{n}\mathbb{x}' \mathbf{m} \mathbf{R} \mathbb{x} - \frac{1}{n} \mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right) b^{{\scriptscriptstyle{\textnormal{WLS}}}} \right) \\ =& O_p(1) \left( O_p(1/ \sqrt{n})+O_p(1/ \sqrt{n}) \right), \\=& O_p(1/ \sqrt{n}) \end{align*} where the second to last line uses Lemma \ref{lemma.WLS.consistency} and Condition \ref{condition.denom.stable}. \end{proof} \begin{theorem}[Asymptotic Equivalence of WLS and its Taylor Approximation] By Lemma \ref{lemma.WLS.consistency} and Condition \ref{condition.denom.stable}, WLS is asymptotically equivalent to the Taylor linear approximation for WLS. \end{theorem} \begin{proof} Let the ``true" WLS coefficient be $b^{\scriptscriptstyle{\textnormal{WLS}}} = \left(\mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1}\mathbb{x}' \mathbf{m} \boldsymbol{\pi} y$, then write the WLS estimator as, \begin{align*} c' \mathbf{W}^{\scriptscriptstyle{\textnormal{WLS}}} \mathbf{R} y = & c' \left( \mathbb{x}' \mathbf{m} \mathbf{R} \mathbb{x} \right)^{-1} \mathbb{x}' \mathbf{m} \mathbf{R} y \\ = & c' b^{{\scriptscriptstyle{\textnormal{WLS}}}} + c' \left( \mathbb{x}' \mathbf{m} \mathbf{R} \mathbb{x} \right)^{-1} \mathbb{x}' \mathbf{m} \mathbf{R} \left( y - \mathbb{x} b^{{\scriptscriptstyle{\textnormal{WLS}}}}\right) \\ = & c' b^{{\scriptscriptstyle{\textnormal{WLS}}}} + c' \left( \mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1} \mathbb{x}' \mathbf{m} \mathbf{R} \left( y - \mathbb{x} b^{{\scriptscriptstyle{\textnormal{WLS}}}}\right) \\ & \hspace{9mm}+ c' \left( \left( \mathbb{x}' \mathbf{m} \mathbf{R} \mathbb{x} \right)^{-1} -\left( \mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1} \right)\mathbb{x}' \mathbf{m} \mathbf{R} \left( y - \mathbb{x} b^{{\scriptscriptstyle{\textnormal{WLS}}}}\right) \\ = & c' b^{{\scriptscriptstyle{\textnormal{WLS}}}} + c' \left( \mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1} \mathbb{x}' \mathbf{m} \mathbf{R} \left( y - \mathbb{x} b^{{\scriptscriptstyle{\textnormal{WLS}}}}\right) \\ & \hspace{9mm}+ c' \left( \left( \mathbb{x}' \mathbf{m} \mathbf{R} \mathbb{x} \right)^{-1} -\left( \mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1} \right)\mathbb{x}' \mathbf{m} \mathbf{R} \left( \mathbb{x} \widehat{b}^{{\scriptscriptstyle{\textnormal{WLS}}}} - \mathbb{x} b^{{\scriptscriptstyle{\textnormal{WLS}}}}\right) \\ & \hspace{9mm}+ c' \left( \left( \mathbb{x}' \mathbf{m} \mathbf{R} \mathbb{x} \right)^{-1} -\left( \mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1} \right)\mathbb{x}' \mathbf{m} \mathbf{R} \left( y- \mathbb{x} \widehat{b}^{{\scriptscriptstyle{\textnormal{WLS}}}} \right) \\ = & \widehat{\delta}_c^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}})} + c' \left( \left( \frac{1}{n}\mathbb{x}' \mathbf{m} \mathbf{R} \mathbb{x} \right)^{-1} -\left( \frac{1}{n} \mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1} \right)\left(\frac{1}{n}\mathbb{x}' \mathbf{m} \mathbf{R} \mathbb{x} \right) \left( \widehat{b}^{{\scriptscriptstyle{\textnormal{WLS}}}} - b^{{\scriptscriptstyle{\textnormal{WLS}}}}\right) \\ = & \widehat{\delta}_c^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}})} + O_p(1/\sqrt{n})O_p(1)O_p(1/\sqrt{n}) \\ = & \widehat{\delta}_c^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}})} + O_p(1/n) \end{align*} \end{proof} \subsection{Conditions for consistent variance estimation} \begin{definition}[Second-order design matrix] The ``second-order design matrix" is a forth order tensor $(kn \times kn \times kn \times kn)$ of variances and covariances of inverse-probability weighted pairwise-joint inclusion indicators, written, \begin{align*} \dubd :=\Big( \text{\textnormal{E}}\left[\left(\mathbf{R} 1_{\scriptscriptstyle n}1_{\scriptscriptstyle kn}'\mathbf{R}\right) \otimes \left( \mathbf{R} 1_{\scriptscriptstyle kn}1_{\scriptscriptstyle kn}'\mathbf{R}\right) \right] -\mathbf{p} \otimes \mathbf{p} \Big) / \left( \mathbf{p} \otimes \mathbf{p} \right), \end{align*} where $\mathbf{p}:=\text{\textnormal{E}}\left[\mathbf{R} 1_{\scriptscriptstyle n}1_{\scriptscriptstyle kn}'\mathbf{R}\right]$ is a matrix of with inclusion probabilities on the diagonal and pair-wise joint inclusion probabilities off the diagonal, ``$\otimes$" is the tensor outer product and ``/" is elementwise division with division by zero resolving to zero. \end{definition} \begin{condition}[Second order design constraint for consistent variance estimation]\label{condition.bound.dd} There exists a finite constant $u_{\dubd}$ such that $\frac{1}{n} \left|\left|\left(\tilde{\mathbf{d}} \otimes \tilde{\mathbf{d}} \right) \circ \dubd \right|\right|_{1,1,1,1} < u_{\dubd}$ for all $n$, where ``$\otimes$" is tensor outer product, ``$\circ$" is elementwise multiplication, $\left|\left|. \right|\right|_{1,1,1,1}$ gives the sum of the absolute values of the tensor entries. \end{condition} \begin{theorem}[Consistency of the Horvitz-Thompson variance estimator] By Conditions \ref{condition.bound.c}-\ref{condition.bound.dmat} and \ref{condition.bound.dd} the variance estimator for the Horvitz-Thompson point estimator is consistent. \end{theorem} \begin{proof} The variance of $n$ times the Horvitz-Thompson variance estimator (times $n$) is, \begin{align*} n \text{\textnormal{V}} \bigg ( n \widehat{\tilde{\text{\textnormal{V}}}}\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{HT}}}} \right) \bigg ) = & n\text{\textnormal{E}} \left[ \left(n {z^{\scriptscriptstyle{\textnormal{HT}}}}' \mathbf{R} \tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}} \mathbf{R} z^{\scriptscriptstyle{\textnormal{HT}}} - n {z^{\scriptscriptstyle{\textnormal{HT}}}}' \tilde{\mathbf{d}} z^{\scriptscriptstyle{\textnormal{HT}}} \right)^2\right] \\ \leq & \max\left(\left|c\right|\right)^4 \max\left(\left|y\right|\right)^4 \frac{1}{n} \left| \left|\left(\tilde{\mathbf{d}} \otimes \tilde{\mathbf{d}} \right) \circ \dubd \right|\right|_{1,1,1,1} \\ \leq & u_c^4 u_y^4 u_{\dubd}, \end{align*} where the second line uses Holder's inequality and the last line uses Conditions \ref{condition.bound.c}, \ref{condition.bound.y} and \ref{condition.bound.dd}. \end{proof} \exampleType{Checking consistency of HT variance (bound) estimator for completely randomized experiments} Again consider a completely randomized experiment with $n$ units where a fixed number of units, $n_c$, are randomly assigned to control, and the remainder, $n_t= n - n_c$, are assigned to treatment. Assume an asymptotic sequence of designs is such that there exists a constant value, $\pi$, such that $\frac{n_t}{n} \rightarrow \pi$ as $n \rightarrow \infty$ with $0<\pi<1$. Let the variance bound be the Neyman bound, i.e., $\tilde{\mathbf{d}} =\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}}$ from Definition \ref{definition.neyman.bound}. Table \ref{table.analysis.dd.condition} enumerates the unique values that appear in $\frac{1}{n} \left|\left|\left(\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}} \otimes \tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}} \right) \circ \dubd \right|\right|_{1,1,1,1}$ along with their relative frequencies and shows that Condition \ref{condition.bound.dd} is satisfied for completely randomized experiments. Hence, the Horvitz-Thompson variance (bound) estimator given in Equation \ref{var_ht_est} is consistent for the Neyman bound. { \hfill $\triangle$} \begin{landscape} \centering \begin{table} \centering \begin{tabular}{|c|c|c|c|c|c| c|} \hline \makecell{Treatment (T) \\ or Control (C)} & $ijkl$ pattern & count & $\makecell{ \hspace{-8mm}\{ \scriptstyle \text{\textnormal{E}}\left[\left(\mathbf{R} 1_{\scriptscriptstyle n}1_{\scriptscriptstyle kn}'\mathbf{R}\right) \right. \\ \left. \scriptstyle \otimes \left(\mathbf{R} 1_{\scriptscriptstyle n}1_{\scriptscriptstyle kn}'\mathbf{R}\right)\right] \}_{\scriptscriptstyle ijkl}}$ & $\{ \mathbf{p} \otimes \mathbf{p}\}_{\scriptscriptstyle ijkl}$ & $\{\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}} \otimes \tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}} \}_{\scriptscriptstyle ijkl}$ & count $\times \scriptstyle \frac{1}{n} \big \{ \left(\tilde{\mathbf{d}} \otimes \tilde{\mathbf{d}} \right) \circ \dubd \big \} _{\scriptscriptstyle ijkl} $ \\ \hline $\scriptstyle i,j,k,l \in \textnormal{C}$ & $\scriptstyle i=j=k=l$ & $\scriptstyle n$ & $\frac{n_c}{n}$ & $\frac{n_c^2}{n^2}$ & $\frac{n^2}{n_c^2}$ & $\scriptstyle \frac{n^2 n_t }{n_c^3}=O(1)$ \\ & \makecell{$\scriptstyle i=j=k,l$ or $\scriptstyle i=j=l,k$ \vspace{-1.5mm} \\ or $\scriptstyle i,j=k=l$ or $\scriptstyle i=k=l,j$} & $\scriptstyle 4n(n-1)$ & $\frac{n_c (n_c-1)}{n(n-1)}$ & $\frac{n_c^2(n_c-1)}{n^2(n-1)}$ & $-\frac{n^2}{n_c^2(n-1)}$ & $\scriptstyle -\frac{4n^2 n_t}{n_c^3}=O(1)$ \\ & $\scriptstyle i=j, k=l$ & $\scriptstyle n(n-1)$ & $ \frac{n_c (n_c-1)}{n(n-1)}$ & $\frac{n_c^2 }{n^2 }$ & $\frac{n^2}{n_c^2}$ & $\scriptstyle \frac{n_t n^2}{n_c^3}=O(1)$ \\ & $\scriptstyle i=j,k,l$ or $\scriptstyle i,j,k=l$ & $\scriptstyle 2n(n-1)(n-2)$ & $ \frac{n_c (n_c-1)(n_c-2)}{n(n-1)(n-2)}$ & $\frac{n_c^2(n_c-1) }{n^2(n-1) }$ & $-\frac{n^2}{n_c^2(n-1)}$ & $\scriptstyle \frac{4n_t n^2}{ n_c^3}=O(1)$ \\ & $\scriptstyle i=k,j=l$ or $\scriptstyle i=l, j=k$ & $\scriptstyle 2n(n-1)$ & $ \frac{n_c (n_c-1)}{n(n-1)}$ & $\frac{n_c^2(n_c-1)^2 }{n^2(n-1)^2 }$ & $-\frac{n^2}{n_c^2(n-1)^2}$ & $\scriptstyle -\frac{2 n^2}{n_c^2}=O(1)$ \\ & \makecell{$\scriptstyle i=k, j, l$ or $\scriptstyle i=l,j,k$ \vspace{-1.5mm} \\ or $\scriptstyle i,j=k,l$ or $\scriptstyle i,j=l,k$} & $\scriptstyle 4n (n-1)(n-2)$ & $ \frac{n_c (n_c-1)(n_c-2)}{n(n-1)(n-2)}$ & $\frac{n_c^2(n_c-1)^2 }{n^2(n-1)^2 }$ & $\frac{n^2}{n_c^2(n-1)^2}$ & $\scriptstyle \frac{4 n^2}{n_c^2}\left(\frac{n(n_c-2)}{n_c(n_c-1)}-\frac{(n-2)}{(n-1)} \right)=O(1)$ \\ & $\scriptstyle i,j,k,l$ & $\scriptscriptstyle n(n-1)(n-2)(n-3)$ & $ \scriptstyle \frac{n_c (n_c-1)(n_c-2)(n_c-3)}{n(n-1)(n-2)(n-3)}$ & $\scriptstyle \frac{n_c^2(n_c-1)^2 }{n^2(n-1)^2 }$ & $\scriptstyle \frac{n^2}{n_c^2(n-1)^2}$ & \makecell{$\scriptstyle \hspace{-6mm} \frac{-4 n_t n^3}{n_c^2(n-1)(n_c-1)} -\frac{6n^2}{n_c^2(n-1)} $ \\ \hspace{15mm} $\scriptstyle +\frac{6n^3}{n_c^3(n_c-1)}=O(1) $} \\ \hline $\scriptstyle i,j \in \textnormal{T}$ $\scriptstyle k,l\in \textnormal{C}$ & $\scriptstyle i=j=k=l$ & $\scriptstyle 2n$ & $\scriptstyle 0$ & $\scriptstyle \frac{n_c n_t}{n^2}$ & $\scriptstyle \frac{n^2 }{n_t n_c}$ & $\scriptstyle -\frac{n^2}{n_t n_c}=O(1)$ \\ or $\scriptstyle i,j \in \textnormal{C}$ $\scriptstyle k,l\in \textnormal{T}$ & \makecell{$\scriptstyle i=j=k,l$ or $\scriptstyle i=j=l,k$ \vspace{-1.5mm} \\ or $\scriptstyle i,j=k=l$ or $\scriptstyle i=k=l,j$} & $\scriptstyle 8n(n-1)$ & $\scriptstyle 0$ & $\scriptstyle \frac{n_c n_t (n_t-1)}{n^2(n-1)}$ & $\scriptstyle-\frac{n^2}{n_t n_c(n-1)}$ & $\scriptstyle -\frac{8n^2}{n_t n_c}=O(1)$ \\ & $\scriptstyle i=j,k=l$ & $\scriptstyle 2 n (n-1)$ & $\frac{n_t n_c}{n^2}$ & $\frac{n_c n_t}{n^2}$ & $\frac{n^2 }{n_t n_c}$ & $\scriptstyle 0$ \\ & $\scriptstyle i=j,k,l$ & $\scriptstyle 4 n(n-1)(n-2)$ & $\frac{n_t n_c(n_t-1)}{n^2(n-1)}$ & $\frac{n_c n_t (n_t-1)}{n^2(n-1)}$ & $ \frac{n^2}{n_t n_c(n-1)}$ & $\scriptstyle 0$ \\ & $\scriptstyle i=k,j=l$ or $\scriptstyle i=l,j=k$ & $\scriptstyle 4n(n-1)$ & $\scriptstyle 0$ & $\frac{n_c n_t (n_t-1) (n_c-1)}{n^2(n-1)^2}$ & $\frac{n^2}{n_t n_c(n-1)^2}$ & $\scriptstyle \frac{4 n^2}{n_t n_c(n-1)}=O(1/n)$ \\ & $\scriptstyle i=k=l,j$ or $\scriptstyle i,j=k=l$ & $\scriptstyle 4n(n-1)$ & $\scriptstyle 0$ & $\frac{n_c n_t (n_c-1)}{n^2(n-1)}$ & $-\frac{n^2}{n_t n_c(n-1)}$ & $\scriptstyle -\frac{4 n^2}{n_t n_c}=O(1)$ \\ & \makecell{$\scriptstyle i=k, j, l$ or $\scriptstyle i=l,j,k$ \vspace{-1.5mm} \\ or $\scriptstyle i,j=k,l$ or $\scriptstyle i,j=l,k$} & $\scriptstyle 8n (n-1)(n-2)$ & $\scriptstyle 0$ & $\frac{n_c n_t (n_c-1) (n_t-1)}{n^2(n-1)^2}$ & $\frac{n^2}{n_t n_c(n-1)^2}$ & $\scriptstyle \frac{8 n^2 (n-2)}{n_t n_c (n-1) }=O(1)$ \\ & $\scriptstyle i,j,k,l$ & $\scriptscriptstyle 2 n(n-1)(n-2)(n-3)$ & $\frac{n_t (n_t-1) n_c (n_c-1)}{n(n-1)(n-2)(n-3)}$ & $\frac{n_c n_t (n_c-1)(n_t-1)}{n^2(n-1)^2}$ & $\frac{n^2}{n_t n_c(n-1)^2}$ & $\scriptstyle \frac{4 n^2 (n-3)}{n_t n_c (n-1) }=O(1)$ \\ \hline $\scriptstyle i,j,k,l \in \textnormal{T}$ & $\scriptstyle i=j=k=l$ & $\scriptstyle n$ & $\frac{n_t }{n}$ & $\frac{n_t ^2}{n^2}$ & $\frac{n^2}{n_t ^2}$ & $\scriptstyle \frac{n^2 n_c}{n_t ^3}=O(1)$ \\ & \makecell{$\scriptstyle i=j=k,l$ or $\scriptstyle i=j=l,k$ \vspace{-1.5mm} \\ or $\scriptstyle i,j=k=l$ or $\scriptstyle i=k=l,j$} & $\scriptstyle 4n(n-1)$ & $\frac{n_t (n_t -1)}{n(n-1)}$ & $\frac{n_t ^2(n_t -1)}{n^2(n-1)}$ & $-\frac{n^2}{n_t ^2(n-1)}$ & $\scriptstyle -\frac{4n^2 n_c}{n_t ^3}=O(1)$ \\ & $\scriptstyle i=j, k=l$ & $\scriptstyle n(n-1)$ & $ \frac{n_t (n_t -1)}{n(n-1)}$ & $\frac{n_t ^2 }{n^2 }$ & $\frac{n^2}{n_t ^2}$ & $\scriptstyle \frac{n_c n^2}{n_t ^3}=O(1)$ \\ & $\scriptstyle i=j,k,l$ or $\scriptstyle i,j,k=l$ & $\scriptstyle 2n(n-1)(n-2)$ & $ \frac{n_t (n_t -1)(n_t -2)}{n(n-1)(n-2)}$ & $\frac{n_t ^2(n_t -1) }{n^2(n-1) }$ & $-\frac{n^2}{n_t ^2(n-1)}$ & $\scriptstyle \frac{4n_c n^2}{ n_t ^3}=O(1)$ \\ & $\scriptstyle i=k,j=l$ or $\scriptstyle i=l, j=k$ & $\scriptstyle 2n(n-1)$ & $ \frac{n_t (n_t -1)}{n(n-1)}$ & $\frac{n_t ^2(n_t -1)^2 }{n^2(n-1)^2 }$ & $-\frac{n^2}{n_t ^2(n-1)^2}$ & $\scriptstyle -\frac{2 n^2}{n_t ^2}=O(1)$ \\ & \makecell{$\scriptstyle i=k, j, l$ or $\scriptstyle i=l,j,k$ \vspace{-1.5mm} \\ or $\scriptstyle i,j=k,l$ or $\scriptstyle i,j=l,k$} & $\scriptstyle 4n (n-1)(n-2)$ & $ \frac{n_t (n_t -1)(n_t -2)}{n(n-1)(n-2)}$ & $\frac{n_t ^2(n_t -1)^2 }{n^2(n-1)^2 }$ & $\frac{n^2}{n_t ^2(n-1)^2}$ & $\scriptstyle \frac{4 n^2}{n_t ^2}\left(\frac{n(n_t -2)}{n_t (n_t -1)}-\frac{(n-2)}{(n-1)} \right)=O(1)$ \\ & $\scriptstyle i,j,k,l$ & $\scriptscriptstyle n(n-1)(n-2)(n-3)$ & $ \scriptstyle \frac{n_t (n_t -1)(n_t -2)(n_t -3)}{n(n-1)(n-2)(n-3)}$ & $\scriptstyle \frac{n_t ^2(n_t -1)^2 }{n^2(n-1)^2 }$ & $\scriptstyle \frac{n^2}{n_t ^2(n-1)^2}$ & \makecell{$\scriptstyle \hspace{-6mm} \frac{-4 n_c n^3}{n_t^2(n-1)(n_t-1)} -\frac{6n^2}{n_t^2(n-1)} $ \\ \hspace{15mm} $\scriptstyle +\frac{6n^3}{n_t^3(n_t-1)}=O(1) $} \\ \hline \end{tabular} \caption{Analysis of Condition \ref{condition.bound.dd} for Complete Randomization} \end{table}\label{table.analysis.dd.condition} \end{landscape} \newpage
\section{Introduction} PT-symmetric quantum mechanics (PTQM) \cite{BB} and its broader applications (see \cite{CMB} for recent reviews) have been at the focus of intensive and prolific research activity during the past twenty-five years or so. Generally speaking, the Hilbert space of a PT-symmetric quantum mechanical model is endowed with a non-trivial metric operator, with respect to which the hamiltonian is hermitian. Hamiltonians of PTQM models with proper positive metrics are sometimes referred to as {\it quasi-hermitian} \cite{Dieudonne, stellenbosch}. They are diagonalizable, and their spectrum is essentially real, because they are similar to a conventionally hermitian hamiltonian. In contrast, hamiltonians of PTQM models with {\it indefinite} metrics are referred to as {\it pseudo-hermitian} \cite{Froissart, Mostafazadeh}, and their eigenvalues are either real or come in complex-conjugate pairs. Pseudo-hermitian hamiltonians describe systems with {\em broken} $PT-$symmetry \cite{CMB}. For a mathematically precise summary of the nomenclature of quasi-hermiticity and pseudo-hermiticity see \cite{Fring-Assis}. {\em Quasi-hermitian} (QH) matrices can be thought of as truncated quasi-hermitian linear operators into finite dimensional space. More precisely, we say that the $N\times N$ matrix ${\cal M}{\phi}$ (the ``hamiltonian") is quasi-hermitian with respect to the $N\times N$ hermitian proper (non-negative) metric ${\cal M}{B}$, if ${\cal M}{\phi}$ and its adjoint fulfill the {\em intertwining relation} \begin{equation}\label{intertwining} {\cal M}{\phi}^\dagger {\cal M}{B} = {\cal M}{B}{\cal M}{\phi} \,. \end{equation} The relation \eqref{intertwining} simply means that ${\cal M}{\phi}$ is hermitian in a vector space endowed with a non-trivial metric ${\cal M}{B}$. (For ${\cal M}{B}=\mathbb{1}$ it reduces of course to ordinary hermiticity.) Following \cite{FRDecember, MK, FR-review}, we should make further distinction between QH matrices and {\it strictly}-quasi-hermitian (SQH) matrices. SQH matrices are hermitian with respect to positive definite (and therefore invertible) metrics ${\cal M}{B}$, in contrast to merely QH matrices, whose associated non-negative metrics may be non-invertible. SQH random matrices arise, for example, in studying the spectrum of stable small oscillations of large mechanical systems with large connectivity \cite{FRDecember, MK}. The low-frequency part of the spectrum of such systems was found in \cite{FRDecember, MK} to be universal, with the phonon density of states tending to a non-zero constant at zero frequency. In other words, phonons in such systems have universal spectral dimension $d_s = 1$. An interesting SQH random matrix model was introduced in \cite{JK}. These authors fixed a metric ${\cal M}{B}$, and took the hamiltonian ${\cal M}{\phi}$ as random, with the aim of studying numerically the dependence of the average density of eigenvalues and level spacing statistics on the metric. Yet another interesting example of an SQH random matrix model, akin to the Dicke model of superradiance, was provided by \cite{DGK}, in which a numerical study of the level spacing distribution was carried out. The difference of the two sides of \eqref{intertwining} is an anti-hermitian matrix. Thus, given a generic {\em invertible} hermitian metric ${\cal M}{B}$, \eqref{intertwining} amounts to a system of $N^2$ independent real equations for the $2N^2$ real parameters of ${\cal M}{\phi}$, resulting in $N^2$ linearly independent solutions. Indeed, as was pointed out in \cite{carlson} (and in the physics literature in \cite{JK}), the general solution of \eqref{intertwining} for ${\cal M}{\phi}$ is \begin{equation} \label{eq:A} {\cal M}{\phi}={\cal M}{A}{\cal M}{B}, \end{equation} where ${\cal M}{A}={\cal M}{A}^\dagger$ is a hermitian matrix. Therefore, given ${\cal M}{B}$, there are $N^2$ linearly independent matrices which are SQH with respect to ${\cal M}{B}$. An important corollary of \eqref{eq:A} is that for a positive definite metric, ${\cal M}{\phi}$ is similar to a hermitian matrix, with the similarity matrix being essentially the (invertible) square root of ${\cal M}{B}$. (The latter is well defined and hermitian, because ${\cal M}{B}$ is positive definite.) Consequently, SQH matrices are diagonalizable and have purely real eigenvalue spectrum. This can be seen easily when we write \begin{equation} {\cal M}{\phi}=\sqrt{{\cal M}{B}}^{\ -1}\underbrace{\sqrt{{\cal M}{B}}{\cal M}{A}\sqrt{{\cal M}{B}}}_{\text{hermitian}} \sqrt{{\cal M}{B}}. \end{equation} Upon truncation to finite vector spaces, pseudo-hermitian operators beget {\em pseudo-hermitian} (PH) matrices. Such matrices are still defined by the intertwining relation \eqref{intertwining}, but now the metric ${\cal M}{B}$ has indefinite signature. The dimensionality of the space of solutions of \eqref{intertwining} for ${\cal M}{\phi}$ is clearly independent of the signature of the metric ${\cal M}{B}$, as long as it is invertible. Thus, since the number of independent solutions of the form \eqref{eq:A} saturates this dimensionality, it is the general solution of \eqref{intertwining} {\em regardless} of the signature of ${\cal M}{B}$. Consequently, any matrix ${\cal M}{\phi}$ which is PH with respect to an indefinite invertible metric ${\cal M}{B}$ can be written in the form \eqref{eq:A}, with ${\cal M}{A}$ being a hermitian matrix. A PH matrix, in contrast to an SQH matrix, need not\footnote{A PH matrix ${\cal M}{\phi}$ may still have purely real eigenvalues. For example, ${\cal M}{\phi}=1\!\!1$ is PH with respect to a metric ${\cal M}{B}$ of any signature. A real diagonal ${\cal M}{\phi}$ and a diagonal ${\cal M}{B}$ of any signature is yet another example.} be similar to a hermitian matrix. In this case, since according to \eqref{intertwining} ${\cal M}{\phi}$ is similar to its hermitian adjoint, it follows that the characteristic polynomial of ${\cal M}{\phi}$ has real coefficients: $\left(\det (z-{\cal M}{\phi})\right)^* = \det (z^*-{\cal M}{\phi}).$ Thus, the eigenvalues of ${\cal M}{\phi}$ are either real, or come in complex-conjugate pairs. See \cite{KA} for a recent discussion of (real asymmetric) PH random matrices. For the sake of completeness, let us briefly discuss the case of a singular metric ${\cal M}{B}$. Thus, assume ${\rm rank}({\cal M}{B}) = p<N$. Then, by transforming to a basis in which ${\cal M}{B}$ is diagonal, it is easy to see that \eqref{intertwining} amounts to a system of $N^2-(N-p)^2$ independent real equations for the $2N^2$ real parameters of ${\cal M}{\phi}$, resulting in $N^2 + (N-p)^2$ linearly independent solutions. In contrast, it is easy to check that solutions of the form \eqref{eq:A} comprise in this case only a subspace of real dimension $N^2-(N-p)^2$. The complementary subspace of solutions, which cannot be expressed in the form \eqref{eq:A}, has therefore real dimension $2(N-p)^2$, namely, the dimension of an $(N-p)\times (N-p)$ complex matrix. This means that not all complex eigenvalues of ${\cal M}{\phi}$ in this case would come in complex conjugate pairs. We shall not pursue here the study of such matrices any further, since in this paper we focus exclusively on invertible metrics ${\cal M}{B}$. We should also mention in passing that some special PH matrices may be non-diagonalizable, as the reader can easily check by working out all the matrices which are PH with respect to the metric ${\cal M}{B} = \sigma_3 = {\rm diag}(1,-1)$. In this case, matrices with degenerate eigenvalues and whose diagonal elements are not equal, admit only a Jordan form and are not diagonalizable. Such non-diagonalizable matrices clearly form a set of zero measure in the space of all PH matrices with respect to a given indefinite metric, and need not concern us in our statistical analysis of the random matrix models we study in this paper. In this paper we introduce and study a family of pseudo-hermitian random matrix models, which depend parametrically on a fixed (deterministic), invertible, indefinite metric ${\cal M}{B}$. The hermitian matrix ${\cal M}{A} = {\cal M}{\phi}{\cal M}{B}^{-1}$ in \eqref{eq:A} is uniquely determined, and is the source of randomness. Thus, the probability ensemble of the PH matrices ${\cal M}{\phi}$ is induced from that of the hermitian matrices ${\cal M}{A}$. We are free to choose the latter at will, and a natural choice is to draw ${\cal M}{A}$ from the Gaussian Unitary Ensemble (GUE) \begin{equation}\label{eq:GUE} P({\cal M}{A})=\frac{1}{Z_N} \mathrm{e}^{-\frac{N m^2}{2} \tr {\cal M}{A}^2}, \end{equation} where $m>0$ is a parameter and $Z_N$ is the normalization constant. Thus, \eqref{eq:GUE} induces a PDF on the $2N^2$ real parameters of ${\cal M}{\phi}$, \begin{equation}\label{ensemble} P({\cal M}{\phi})=\frac{1}{\tilde{Z}_N} \mathrm{e}^{-\frac{N m^2}{2} \tr ({\cal M}{B}^{-2} {\cal M}{\phi}^\dagger {\cal M}{\phi}) }\delta\left({\cal M}{\phi}^\dagger{\cal M}{B} - {\cal M}{B}{\cal M}{\phi}\right), \end{equation} where $\tilde{Z}_N$ is another normalization constant. Therefore, an $N\times N$ complex matrix ${\cal M}{\phi}$ is drawn with the Gaussian weight in \eqref{ensemble}, and then the remaining factor $\delta\left({\cal M}{\phi}^\dagger{\cal M}{B} - {\cal M}{B}{\cal M}{\phi}\right)$, which is supported over the $N^2$ independent real and imaginary parts of the anti-hermitian matrix ${\cal M}{\phi}^\dagger{\cal M}{B} - {\cal M}{B}{\cal M}{\phi}$, filters in those matrices which are PH with respect to the metric ${\cal M}{B}$. This is the matrix model we focus on, and our main goal in this paper is to determine explicitly the ensemble-averaged density of the eigenvalues of ${\cal M}{\phi}$ on the real axis and in the complex eigenvalues in the limit $N\rightarrow\infty$. We have also studied numerically the spectral statistics of ${\cal M}{\phi}$ for ensembles of ${\cal M}{A}$ other than \eqref{eq:GUE}. Our results \cite{FRuniversality} indicate that many attributes of the spectral statistics of ${\cal M}{\phi}$ are universal, and depend, perhaps not surprisingly, only on the variance of fluctuations of ${\cal M}{A}$. We have recently introduced and previewed the model \eqref{ensemble} in \cite{FR-review}, and the purpose of the present paper is to provide detailed exposition of our analysis. We derive explicit equations for determining the averaged resolvent and density of eigenvalues as explicit functions of the metric, in the limit of large matrix size $N$, by means of the diagrammatic method. As a concrete example, we set the metric to be diagonal with entries $+1$ or $-1$, and compute the resulting resolvent and density of eigenvalues in closed form. The spectrum in this case consists of a finite fraction of complex eigenvalues, which occupy uniformly two two-dimensional blobs of known shape, symmetric with respect to the real axis, as well as the complimentary fraction of real eigenvalues, condensed in a finite segment, with a known non-uniform density. The numbers of complex and real eigenvalues depend on the signature of the metric, that is, the numbers of its positive and negative eigenvalues, both of which are assumed to be finite fractions of $N$. The average spectrum thus obtained for a particular such metric, is essentially the spectrum of a randomly chosen generator of the non-compact unitary group with the same signature. Rotating this spectrum by ninety degrees in the complex plane gives us the spectrum of a randomly chosen generator of the corresponding non-compact orthogonal group. We have also carried thorough numerical analysis of the model for these particular metrics. Our numerical results converge rapidly towards the asymptotic analytical large-$N$ expressions. The rest of the paper is organized as follows: In Section \ref{sec:methods} we apply the method of hermitization and the diagrammatic method to deriving the self-consistent gap equations in the large-$N$, planar limit. We then analyze the gap equations in Section \ref{gap-dos} and determine from them the phase structure of our model in the complex plane, which consists of the so-called non-holomorphic phase in a two-dimensional region ${\mathcal D}\subset\mathbb{C}$ in which the eigenvalues of our PH matrix ${\cal M}{\phi}$ condense in the large-$N$ limit, and a holomorphic phase, in the complementary domain of the complex plane. In particular, we derive explicit expressions for the Green's function of ${\cal M}{\phi}$ in the holomorphic phase (see Eqs. \eqref{Ghol} and \eqref{Ghol1}), and in the non-holomorphic phase (see Eq. \eqref{Green-nh-final}). The discontinuity of this function in the holomorphic phase across the real axis determines the density of real eigenvalues of ${\cal M}{\phi}$, while the density of complex eigenvalues of ${\cal M}{\phi}$ can be determined from that Green's function in the non-holomorphic phase by applying Gauss' law, as explained in \eqref{rhoC}. Section \ref{gap-dos} is very detailed and contains many analytical results and interrelations between various quantities for generic metrics ${\cal M}{B}$. (See, e.g., \eqref{invariant} and \eqref{invariant-nh}.) Finally, in Section \ref{sec:model B} we apply our general formalism to the concrete case of the metric ${\cal M}{B}=\mathrm{diag}(1,\ldots,1,-1,\ldots,-1)$ as described above, and provide explicit analytical and numerical results for the density of eigenvalues on the real axis and in the complex plane (see Eqs.~\eqref{eq:rhoreal} and \eqref{eq:rpm}, \eqref{eq:rhoC} respectively). We then discuss the relevance of these results to the non-compact Lie algebras $su(k,N-k)$ and $so(k,N-k)$. Many technical and mathematical detailed are relegated to the four appendices at the end of this paper. \section{Hermitization and Large-$N$ Analysis}\label{sec:methods} In practice, it is more convenient to work with the representation ${\cal M}{\phi}={\cal M}{A}{\cal M}{B}$ of the pseudo-hermitian matrix in \eqref{eq:A}, rather than with the singular PDF \eqref{ensemble}. The averaged density of eigenvalues of ${\cal M}{\phi}$ in the complex-$w$ plane can be calculated from the Green's function (resolvent) \begin{equation}\label{eq:Green} G(w)=\left\langle \frac{1}{N} \tr {1\over w -{\cal M}{A}{\cal M}{B}} \right\rangle \end{equation} as we explain in Section \ref{gap-dos}. Here, and from here on, angular brackets denote averaging of ${\cal M}{A}$ over the GUE ensemble \eqref{eq:GUE}. Averaging over ${\cal M}{A}$ becomes simpler if one can avoid the product of matrices ${\cal M}{A}{\cal M}{B}$ by the method introduced in \cite{BJN}, following which we introduce the $2N \times 2N$ block matrix \begin{equation}\label{H2N} {\cal M}{H}=\left(\begin{array}{cc} 0&{\cal M}{A}\\{\cal M}{B}&0 \end{array}\right), \end{equation} which puts ${\cal M}{A}$ and ${\cal M}{B}$ in two different blocks. The resolvent of \eqref{H2N} is readily computed as \begin{equation}\label{resolvent} \frac{1}{z-{\cal M}{H}}=\left(\begin{array}{cc} \frac{z}{z^2-{\cal M}{A}{\cal M}{B}}& {\cal M}{A}\frac{1}{z^2-{\cal M}{B}{\cal M}{A}}\\ {\cal M}{B}\frac{1}{z^2-{\cal M}{A}{\cal M}{B}}& \frac{z}{z^2-{\cal M}{B}{\cal M}{A}} \end{array}\right), \end{equation} in which the upper and lower diagonal blocks are essentially the resolvents of ${\cal M}{\phi} = {\cal M}{AB}$ and ${\cal M}{\phi}^\dagger = {\cal M}{BA}$, evaluated at $w=z^2$. Thus, we arrive at the Green's function \begin{equation}\label{eq:Gtilde} \widetilde{G}(z)= \left\langle \frac{1}{2N} \tr \frac{1}{z-{\cal M}{H}} \right\rangle = z G(z^2)\,, \end{equation} where in the last step we have used equality of the traces of the two diagonal blocks of \eqref{resolvent} due to isospectrality of ${\cal M}{\phi} = {\cal M}{AB}$ and ${\cal M}{\phi}^\dagger = {\cal M}{BA}$. Therefore, we can deduce the desired Green's function \eqref{eq:Green} from \eqref{eq:Gtilde}, which is more amenable to diagrammatic expansion, in a straightforward manner. Since ${\cal M}{H}$ is typically non-hermitian, it might have complex eigenvalues. In Appendix \ref{symmetries} we discuss the symmetries the spectrum of ${\cal M}{H}$ in the complex plane. In the large-$N$ limit, these eigenvalues can be dense in a two-dimensional domain $\widetilde{\cal D}\subset\mathbb{C}$, rendering $\widetilde{G}$ not an analytic function\footnote{More precisely, this is true only if ${\cal M}{B}$ has indefinite signature. In contrast, for positive-definite ${\cal M}{B}$, ${\cal M}{\phi} = {\cal M}{AB}$ is SQH and therefore similar to a hermitian matrix, rendering $\widetilde{G}(z)$ possibly non-analytic only on the real axis in the complex $w=z^2$ plane.} of $z$, depending both on $z$ and $z^*$. As such, $\widetilde{G}$, or for that matter, any of the averaged blocks of \eqref{resolvent}, cannot be determined everywhere in the complex plane $\mathbb{C}$ from the moments of ${\cal M}{H}$, which amounts to expanding them in inverse powers of $z$. The latter so-called perturbative Born series would converge only in the analyticity domains of \eqref{eq:Gtilde}, which excludes $\widetilde{\cal D}$. This is in contrast with resolvents of hermitian random matrices, which are always analytic functions of $z$ everywhere off the real axis, where they can be determined, in principle, from their perturbative Born series. As is well known, this difficulty in computing perturbatively averaged resolvents of non-hermitian matrices by resumming their Born series, is overcome by employing the \emph{Method of Hermitization} \cite{FZ,JNGZ,CW,E97}. According to this method we can reduce the difficult problem of averaging \eqref{resolvent} over the random matrix ${\cal M}{A}$ to the more familiar problem of averaging the resolvent $\hat{\mathcal{G}}$ of the $4N\times 4N$ \emph{hermitian} matrix \begin{equation}\label{eq:herm} \hat{\mathcal{H}} = \left(\begin{array}{cc} 0&z-{\cal M}{H}\\z^*-{\cal M}{H}^\dagger&0 \end{array}\right)\,, \end{equation} namely\footnote{The block structure of \eqref{eq:G1} is isomorphic, of course, to that of \eqref{resolvent}, with $-(z-{\cal M}{H})$ and $-(z-{\cal M}{H})^\dagger$, respectively, playing the roles of ${\cal M}{A}$ and ${\cal M}{B}$.}, \begin{equation}\label{eq:G1} \hat{\mathcal{G}}(\eta; z, z^*)= {1\over \eta - \hat{\mathcal{H}}} = \left(\begin{array}{cc} {\eta \over \eta^2 - (z-{\cal M}{H})(z-{\cal M}{H})^\dagger} & -(z-{\cal M}{H}) {1\over \eta^2 - (z-{\cal M}{H})^\dagger (z-{\cal M}{H}) }\\ -(z - {\cal M}{H})^\dagger {1\over \eta^2 - (z-{\cal M}{H})(z-{\cal M}{H})^\dagger} & {\eta \over \eta^2 - (z-{\cal M}{H})^\dagger (z-{\cal M}{H})}\end{array}\right). \end{equation} Therefore, off the real axis in the complex $\eta$-plane, the averaged resolvent $\langle\hat{\mathcal{G}}\rangle$ is an analytic function of the spectral parameter $\eta$. This will allow us to compute $\langle\hat{\mathcal{G}}\rangle$ by expanding it diagrammatically in powers $1/\eta$, and then resum the series. This series would then converge to $\langle\hat{\mathcal{G}}\rangle$ everywhere off the real axis in the complex-$\eta$ plane. After resumming the series, we could let $\eta\rightarrow 0$. The lower left block of \eqref{eq:G1} would then clearly converge to the desired average $\langle{1\over z-{\cal M}{H}}\rangle$ of \eqref{resolvent}, while the upper right block of \eqref{eq:G1} would converge to its adjoint. In contrast, the diagonal blocks would suffer a jump discontinuity in the limit, depending on whether one approaches the real $\eta$ axis from above or from below. More specifically, if we set $\eta = is, s\in\mathbb{R}$, then as $s\rightarrow 0$, \begin{eqnarray}\label{etas} \lim_{s\to 0\pm} \langle\hat{\mathcal{G}}(is; z, z^*)\rangle =\nonumber\\{}\nonumber\\ &&\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\left(\begin{array}{cc} \mp i\pi \left\langle\delta\left(\sqrt{(z-{\cal M}{H})(z-{\cal M}{H})^\dagger}\right)\right\rangle & \left\langle{1 \over z^*-{\cal M}{H}^\dagger}\right\rangle \\ {} & {} \\ \left\langle{1\over z-{\cal M}{H} }\right\rangle & \mp i\pi\left\langle\delta\left(\sqrt{(z-{\cal M}{H})^\dagger (z-{\cal M}{H})}\right)\right\rangle \end{array}\right). \end{eqnarray} Thus, the diagonal blocks of \eqref{etas} converge in the limit to two isospectral anti-hermitian matrices, while the limiting off-diagonal blocks are hermitian conjugate of each other. More detailed analysis of these diagonal blocks (before averaging over ${\cal M}{A}$) is given in Appendix \ref{sec:diagonals}. In our subsequent analysis we will have to refer to the individual $N\times N$ blocks of \begin{equation}\label{eq:G} \hat{\mathcal{G}}(\eta; z, z^*)=\left[\left(\begin{array}{cc} \eta&z\\z^*&\eta \end{array}\right)-\left(\begin{array}{cc} 0&{\cal M}{H}\\{\cal M}{H}^\dagger&0 \end{array}\right)\right]^{-1}=\left(\begin{array}{cccc} \eta&0&z&-{\cal M}{A}\\ 0&\eta&-{\cal M}{B}&z\\ z^*&-{\cal M}{B}&\eta&0\\ -{\cal M}{A}&z^*&0&\eta \end{array}\right)^{-1}. \end{equation} Let us therefore denote these blocks as \begin{equation}\label{blocks} \hat{\mathcal{G}}_{\alpha\beta}\,,\quad \alpha, \beta :=1,2,3,4 \end{equation} Matrix elements within a given block will be indexed by Latin indices as \begin{equation}\label{Latin} \left(\hat{\mathcal{G}}_{\alpha\beta}\right)_{ij},\quad i,j :=1,\ldots , N \end{equation} Following 't Hooft, we will use Feynman diagrams with double-lined matrix (`gluon') propagators \cite{thooft} in the large-$N$ planar limit \cite{QFTNut}. To this end we expand the resolvent $\langle\hat{\mathcal{G}}(\eta;z,z^*)\rangle$ in powers of the bare `quark' propagator \begin{equation}\label{bareprop} \hat{\mathcal{G}}_0=\hat{\mathcal{G}}_{|_{A=0}}= \left(\begin{array}{cccc} \eta&0&z& 0\\ 0&\eta&-{\cal M}{B}&z\\ z^*&-{\cal M}{B}&\eta&0\\ 0&z^*&0&\eta \end{array}\right)^{-1}= \begin{tikzpicture}[scale=0.3,line width=0.4pt,baseline=-3pt] \path (0,0) circle [radius=1cm]; \draw (-2,0) -- (2,0); \path[tips, -{Latex[scale length=1.5,scale width=1.125]}] (-2,0) -- (0,0); \end{tikzpicture} \end{equation} and rearrange the perturbative expansion in terms of the self-energy (the sum over one-quark-irreducible graphs) \begin{equation}\label{sigma} \hat{\Sigma}\quad=\quad\begin{tikzpicture}[scale=0.2,line width=0.4pt,baseline=0.25cm] \path (0,0) circle [radius=1cm] node[above={0.15cm}] {$\hat{\Sigma}$}; \draw (-5,0) arc [start angle=180, end angle=0, radius=5cm] -- cycle; \end{tikzpicture}\quad, \end{equation} in the following way: \begin{align*} \begin{tikzpicture}[scale=0.45,line width=0.4pt,baseline=-3pt] \draw (0,0) circle [radius=1cm]; \draw (-2,0) -- (-1,0) (1,0) -- (2,0); \path (0,0) node {$\langle\hat{\mathcal{G}}\rangle$}; \path[tips, -{Latex[scale length=1.5,scale width=1.125]}] (-2,0) -- (-1.25,0); \path[tips, -{Latex[scale length=1.5,scale width=1.125,reversed]}] (2,0) -- (1.25,0); \end{tikzpicture} \quad\!&=\!\quad \begin{tikzpicture}[scale=0.25,line width=0.4pt,baseline=-3pt] \path (0,0) circle [radius=1cm]; \draw (-2,0) -- (2,0); \path[tips, -{Latex[scale length=1.5,scale width=1.125]}] (-2,0) -- (0,0); \end{tikzpicture} \quad\!+\!\quad \begin{tikzpicture}[scale=0.45,line width=0.4pt,baseline=0.15cm] \draw (-1.5,0) arc [start angle=180, end angle=0, radius=1.5cm] -- cycle; \draw (-2.5,0) -- (-1.5,0) (1.5,0) -- (2.5,0); \path[tips, -{Latex[scale length=1.5,scale width=1.125]}] (-2.5,0) -- (-1.75,0); \path[tips, -{Latex[scale length=1.5,scale width=1.125,reversed]}] (2.5,0) -- (1.75,0); \path (0,0) node[above={-0.05cm}] {$\hat{\Sigma}$}; \path (0,0) circle [radius=1cm]; \end{tikzpicture}&\!\!\!\!+\!\!\quad \begin{tikzpicture}[scale=0.45,line width=0.4pt,baseline=0.15cm] \draw (-1.5,0) arc [start angle=180, end angle=0, radius=1.5cm] -- cycle; \draw (3,0) arc [start angle=180, end angle=0, radius=1.5cm] -- cycle; \draw (-2.5,0) -- (-1.5,0) (1.5,0) -- (4,0) (6,0) -- (7,0) ; \path[tips, -{Latex[scale length=1.5,scale width=1.125]}] (-2.5,0) -- (-1.75,0); \path[tips, -{Latex[scale length=1.5,scale width=1.125]}] (1.5,0) -- (2.75,0); \path[tips, -{Latex[scale length=1.5,scale width=1.125,reversed]}] (7,0) -- (6.25,0); \path (0,0) node[above={-0.05cm}] {$\hat{\Sigma}$}; \path (4.5,0) node[above={-0.05cm}] {$\hat{\Sigma}$}; \path (0,0) circle [radius=1cm]; \end{tikzpicture} \quad\!\!\!\!+\!\!\quad\ldots \end{align*} This rearrangement of the perturbation series (valid to all orders in the large-$N$ expansion) is the diagrammatic representation of the relation \begin{equation}\label{propagator} \langle \hat{\mathcal{G}}\rangle=\frac{1}{\hat{\mathcal{G}}_0^{-1}-\hat{\Sigma}} \end{equation} between $\langle \hat{\mathcal{G}}\rangle$ and $\hat{\Sigma}$, which is equivalent to the definition of $\hat{\Sigma}$ as the sum over one-quark-irreducible graphs. As was explained above, this rearrangement is allowed because $\langle\hat{\mathcal{G}}\rangle$ is an analytic function of $\eta$, and therefore the corresponding Born series is convergent. This would not have been possible before the procedure of Hermitization. We can express \cite{FZ, FZ1,JF} $\hat{\Sigma}$ in terms of the connected cumulants of the distribution of ${\cal M}{A}$ and the full propagator $\langle\hat{\mathcal{G}}\rangle$. Since ${\cal M}{A}$ is drawn from the GUE ensemble \eqref{eq:GUE}, there is only one connected cumulant, namely, the quadratic one \begin{equation}\label{cumulant} \langle A_{ij}A_{kl}\rangle_c = {1\over Nm^2}\delta_{il}\delta_{jk}\,. \end{equation} In the the limit $N\rightarrow\infty$ only planar diagrams survive, and we thus arrive at \begin{equation}\label{SE} \begin{tikzpicture}[scale=0.3,line width=0.4pt,baseline=0.75cm] \path (0,0) circle [radius=1cm] node[above={0.4cm}] {$\hat{\Sigma}$}; \draw (-5,0) arc [start angle=180, end angle=0, radius=5cm] -- cycle; \end{tikzpicture} \quad\!=\!\quad \centering\begin{tikzpicture}[scale=0.35,line width=0.4pt,baseline=0.75cm] \draw (0,0) circle [radius=1.2cm]; \draw (5.5,0) arc [start angle=0, end angle=180, radius=5.5cm]; \draw (-1,0) -- (-5,0) arc [start angle=180, end angle=0, radius=5cm] -- ((1,0); \filldraw[fill=white] (0,5.2) circle [radius=1.2cm]; \path (0,0) node {$\langle\hat{\mathcal{G}}\rangle$}; \path (0,5.2) node { $\left\langle \! \mathcal{A}^2 \! \right\rangle_{\!\mathrm{c}}$}; \path[tips, -{Latex[scale length=2,scale width=1.5]}] (-5,0) -- (-2.8,0); \path[tips, -{Latex[scale length=2,scale width=1.5,reversed]}] (5,0) -- (2.8,0); \path[tips, -{Latex[scale length=2,scale width=1.5]}](-5.5,0) arc [start angle=180, end angle=135, radius=5.5cm]; \path[tips, -{Latex[scale length=2,scale width=1.5,reversed]}](-5,0) arc [start angle=180, end angle=135, radius=5cm]; \path[tips, -{Latex[scale length=2,scale width=1.5,reversed]}](5.5,0) arc [start angle=0, end angle=45, radius=5.5cm]; \path[tips, -{Latex[scale length=2,scale width=1.5]}](5,0) arc [start angle=0, end angle=45, radius=5cm]; \end{tikzpicture} \quad\!=\!\quad {\cal M}{1}_N\otimes {1\over m^2}\left(\begin{array}{cccc} \overline{44}&0&0&\overline{41}\\ 0&0&0&0\\ 0&0&0&0\\ \overline{14}&0&0&\overline{11} \end{array}\right). \end{equation} Here \begin{equation}\label{blocktrace} \overline{\alpha \beta} = \frac{1}{N} \langle \tr \hat{\mathcal{G}}_{\alpha\beta}\rangle\,,\quad \alpha, \beta :=1,2,3,4 \end{equation} are averaged traces over the $N\times N$ blocks $\langle\hat{\mathcal{G}}_{\alpha\beta}\rangle$ introduced in \eqref{blocks}. The diagrams in \eqref{SE} depict Eqs.~\eqref{fluctA} and \eqref{SE-def} in Appendix \ref{SE-details}, where one can find a detailed derivation of \eqref{SE} and other subsequent results. The block traces \eqref{blocktrace} are scalars, leading to the $4\times 4$ matrix factor on the right-hand side of Eq.~\eqref{SE}. Each block of $\hat\Sigma$ is proportional to the $N$-dimensional unit matrix ${\cal M}{1}_N$ after averaging over the unitary-invariant ensemble \eqref{eq:A}. The zero-rich block texture of $\hat\Sigma$ is very helpful practically, and it arises due to the decoupling of the random blocks from the deterministic blocks, which was the motivation for introducing \eqref{H2N} in the first place. Thus, $\hat\Sigma$ is determined exclusively by the four block traces $\overline{44}$, $\overline{41}$, $\overline{14}$ and $\overline{11}$. Substitution of \eqref{SE} back in \eqref{propagator} leads to to the so-called gap equation \begin{equation}\label{gap} \left\langle\left(\begin{array}{cccc} \hat{\mathcal{G}}_{11}&\hat{\mathcal{G}}_{12}&\hat{\mathcal{G}}_{13}&\hat{\mathcal{G}}_{14}\\ \hat{\mathcal{G}}_{21}&\hat{\mathcal{G}}_{22}&\hat{\mathcal{G}}_{23}&\hat{\mathcal{G}}_{24}\\ \hat{\mathcal{G}}_{31}&\hat{\mathcal{G}}_{32}&\hat{\mathcal{G}}_{33}&\hat{\mathcal{G}}_{34}\\ \hat{\mathcal{G}}_{41}&\hat{\mathcal{G}}_{42}&\hat{\mathcal{G}}_{43}&\hat{\mathcal{G}}_{44}\\ \end{array}\right)\right\rangle = \left(\begin{array}{cccc} \eta-{\overline{44}\over m^2}&0&z&-{\overline{41}\over m^2}\\ 0&\eta&-{\cal M}{B}&z\\ z^*&-{\cal M}{B}&\eta&0\\ -{\overline{14}\over m^2}&z^*&0&\eta-{\overline{11}\over m^2} \end{array}\right)^{-1}, \end{equation} which determines all the blocks $\langle\hat{\mathcal{G}}_{\alpha\beta}(\eta;z,z^*)\rangle$ explicitly. (Note that in the matrix to be inverted on the right hand side of \eqref{gap}, we have suppressed explicit factors of the unit matrix ${\cal M}{1}_N$ in the appropriate blocks.) This substitution of \eqref{SE} back in \eqref{propagator} amounts to resummation of the perturbation series. Thus, at this stage of solving the gap equation, we can safely set $\eta=is\rightarrow 0$ everywhere. Detailed subsequent calculations of the gap equation \eqref{gap} at $\eta=0$ is given in Appendix \ref{gap-details}. As we can see from \eqref{etas}, in the limit $s\rightarrow 0$, \begin{eqnarray}\label{limitsOD} \left\langle\left(\begin{array}{cc} \hat{\mathcal{G}}_{31} & \hat{\mathcal{G}}_{32} \\ \hat{\mathcal{G}}_{41} & \hat{\mathcal{G}}_{42}\end{array}\right)\right\rangle_{|_{s=0}} &=& \left\langle\left(\begin{array}{cc} \frac{z}{z^2-{\cal M}{A}{\cal M}{B}}& {\cal M}{A}\frac{1}{z^2-{\cal M}{B}{\cal M}{A}}\\ {\cal M}{B}\frac{1}{z^2-{\cal M}{A}{\cal M}{B}}& \frac{z}{z^2-{\cal M}{B}{\cal M}{A}} \end{array}\right)\right\rangle = \left\langle{1\over z-{\cal M}{H}}\right\rangle\nonumber\\{}\nonumber\\ \left\langle\left(\begin{array}{cc} \hat{\mathcal{G}}_{13} & \hat{\mathcal{G}}_{14} \\ \hat{\mathcal{G}}_{23} & \hat{\mathcal{G}}_{24}\end{array}\right)\right\rangle_{|_{s=0}} &=& \left\langle\left(\begin{array}{cc} \hat{\mathcal{G}}_{31} & \hat{\mathcal{G}}_{32} \\ \hat{\mathcal{G}}_{41} & \hat{\mathcal{G}}_{42}\end{array}\right)\right\rangle^\dagger_{|_{s=0}} \end{eqnarray} and\footnote{The adjoint of the average is the average of the adjoint, because the probability distribution \eqref{eq:GUE} is real, of course.} \begin{eqnarray}\label{limitsD} \left\langle\left(\begin{array}{cc} \hat{\mathcal{G}}_{11} & \hat{\mathcal{G}}_{12} \\ \hat{\mathcal{G}}_{21} & \hat{\mathcal{G}}_{22}\end{array}\right)\right\rangle^\dagger_{|_{s=0}} &=& - \left\langle\left(\begin{array}{cc} \hat{\mathcal{G}}_{11} & \hat{\mathcal{G}}_{12} \\ \hat{\mathcal{G}}_{21} & \hat{\mathcal{G}}_{22}\end{array}\right)\right\rangle_{|_{s=0}} \nonumber\\{}\nonumber\\ \left\langle\left(\begin{array}{cc} \hat{\mathcal{G}}_{33} & \hat{\mathcal{G}}_{34} \\ \hat{\mathcal{G}}_{43} & \hat{\mathcal{G}}_{44}\end{array}\right)\right\rangle^\dagger_{|_{s=0}} &=& - \left\langle\left(\begin{array}{cc} \hat{\mathcal{G}}_{33} & \hat{\mathcal{G}}_{34} \\ \hat{\mathcal{G}}_{43} & \hat{\mathcal{G}}_{44}\end{array}\right)\right\rangle_{|_{s=0}}\,. \end{eqnarray} In particular, we see from \eqref{limitsOD} and \eqref{limitsD} that $$\langle\hat{\mathcal{G}}_{11}(s=0)\rangle^\dagger =-\langle\hat{\mathcal{G}}_{11}(s=0)\rangle\,,\quad \langle\hat{\mathcal{G}}_{44}(s=0)\rangle^\dagger=-\langle\hat{\mathcal{G}}_{44}(s=0)\rangle $$ and \begin{equation}\label{1144hat} \langle\hat{\mathcal{G}}_{14}(s=0)\rangle = \langle\hat{\mathcal{G}}_{41}(s=0)\rangle^\dagger\,. \end{equation} Thus, the corresponding block traces, evaluated at $s=0$, must further satisfy \begin{equation}\label{1144} \overline{14} = \overline{41}^*\,,\quad \Re \,\overline{11} = \Re\, \overline{44} = 0\,. \end{equation} For convenience, let us introduce the notations \begin{equation}\label{abc} a(z,z^*) = -{1\over m^2} \overline{44},\,\, b(z,z^*) = -{1\over m^2} \overline{41}\quad{\rm and}\quad c(z,z^*) = -{1\over m^2} \overline{11} \end{equation} where all quantities are evaluated at $s=0$. Thus, $a$ and $c$ are pure imaginary and $\overline{14} = -m^2 b^*$. Moreover, as was mentioned following \eqref{equal-sums} in Appendix \ref{sec:diagonals}, the imaginary quantities $a$ and $c$ have the same sign, and thus \begin{equation}\label{ac} ac\leq 0. \end{equation} As can be seen from \eqref{14gap} in Appendix \ref{gap-details}, which we copy here \begin{equation}\label{14gap-main} \left\langle\left(\begin{array}{cc} \hat{\mathcal{G}}_{11}&\hat{\mathcal{G}}_{14}\\ \hat{\mathcal{G}}_{41}&\hat{\mathcal{G}}_{44}\\\end{array}\right)\right\rangle = {1\over ac - |b+z^2 {\cal M}{B}^{-1}|^2} \left(\begin{array}{cc} c& - (b+z^2 {\cal M}{B}^{-1})\\ -(b^*+z^{*2} {\cal M}{B}^{-1})&a\end{array}\right), \end{equation} a subset of the gap equations determines the four block traces $\overline{11}$, $\overline{14}$, $\overline{41}$ and $\overline{44}$ self-consistently, which in turn determine all the remaining blocks of $\langle \hat{\mathcal{G}}\rangle$. Here and in what follows, in order to avoid cluttering of our equations, we have defined (with some minimal abuse of matricial notations) \begin{equation}\label{abbreviation} |b+z^2 {\cal M}{B}^{-1}|^2=(b+z^2 {\cal M}{B}^{-1})(b^*+z^{*2} {\cal M}{B}^{-1}). \end{equation} As was discussed in Appendix \ref{gap-details}, by equating block traces on both sides of \eqref{14gap-main} and with the definition \eqref{abc} in mind, we obtain the set of self-consistent equations for $\overline{11}$, $\overline{14}$, $\overline{41}$ and $\overline{44}$, or equivalently, the quantities $a, b$ and $c$, as \begin{eqnarray}\label{abc-selfconsistent-main} a &=& -{a\over Nm^2} \tr {1\over ac - |b+z^2 {\cal M}{B}^{-1}|^2} \nonumber\\{}\nonumber\\ c &=& -{c\over Nm^2} \tr {1\over ac - |b+z^2 {\cal M}{B}^{-1}|^2} \nonumber\\{}\nonumber\\ b &=& {1\over Nm^2} \tr {b^* + z^{*2}{\cal M}{B}^{-1}\over ac - |b+z^2 {\cal M}{B}^{-1}|^2}. \end{eqnarray} Equating block traces associated with $\langle\hat{\mathcal{G}}_{14}\rangle$ just produces the complex conjugate of the last equation in \eqref{abc-selfconsistent-main}, as it should. As further consistency check, one can easily verify that with purely imaginary $a$ and $c$ substituted in \eqref{XYWZ}, the averaged blocks $\langle\hat{\mathcal G}_{\alpha\beta}\rangle$ obtained by equating \eqref{prop1} and \eqref{prop2} fulfill all the hermitian conjugation consistency conditions in \eqref{limitsOD} and \eqref{limitsD}. The first two equations in \eqref{abc-selfconsistent-main} suggest that $a(z,z^*)$ and $c(z,z^*)$ be equal, a proposition we could not prove for the corresponding diagonal block traces $11(is; z,z^*)$ and $44(is;z,z^*)$ in Appendix \ref{sec:diagonals}, before taking averages. Let us now prove that \begin{equation}\label{AOC} a(z,z^*) = c(z,z^*)\,, \end{equation} which completes the set of self-consistency equations. To this end, we first compute all four averaged diagonal traces from the expressions for $\langle\hat{\mathcal G}_{\alpha\alpha}\rangle$ given in \eqref{14gap-main} and \eqref{12gap} and obtain \begin{eqnarray}\label{diagonal-block-traces} \overline{11}(i0 ;z,z^*) &=& -{c\over N} \tr {1\over -ac + |b+z^2 {\cal M}{B}^{-1}|^2} \nonumber\\ \overline{22}(i0 ;z,z^*) &=& - {c\over N} \tr {|z|^2 {\cal M}{B}^{-2} \over -ac + |b+z^2 {\cal M}{B}^{-1}|^2} \nonumber\\ \overline{33}(i0 ;z,z^*) &=& - {a\over N} \tr {|z|^2 {\cal M}{B}^{-2} \over -ac + |b+z^2 {\cal M}{B}^{-1}|^2} \nonumber\\ \overline{44}(i0 ;z,z^*) &=& -{a\over N} \tr {1\over -ac + |b+z^2 {\cal M}{B}^{-1}|^2} \end{eqnarray} An important observation is that the two distinct matrices under the trace in these expressions are positive definite, due to \eqref{ac}. Thus, each of the traces appearing in \eqref{diagonal-block-traces} is positive. Compute now the two sums of traces appearing in \eqref{equal-sums} \begin{eqnarray}\label{diagonal sums} \overline{11}(i0 ;z,z^*) + \overline{22}(i0 ;z,z^*) &=& -{c\over N} \tr {\mathcal P} \nonumber\\ \overline{33}(i0 ;z,z^*) + \overline{44}(i0 ;z,z^*) &=& -{a\over N} \tr {\mathcal P} \end{eqnarray} where\begin{equation}\label{P} \mathcal{P} = {1 +|z|^2{\cal M}{B}^{-2}\over -ac + |b+z^2 {\cal M}{B}^{-1}|^2} \end{equation} is a positive matrix, rendering $\tr {\mathcal P} >0$. According to \eqref{equal-sums}, the two sums on the LHS of both equations in \eqref{diagonal sums} are equal, thus proving \eqref{AOC}. Combining \eqref{AOC} and \eqref{trace-interrelation1}, which implies that $a(z,z^*) = c(z^*,z)$, we conclude also that \begin{equation}\label{Asym} a(z,z^*) = a(z^*,z). \end{equation} As was mentioned following \eqref{equal-sums} and \eqref{SVDos1} in Appendix \ref{sec:diagonals}, the sums of diagonal block traces on the LHS of \eqref{diagonal sums} serve as order parameters indicating the location of the {\em two-dimensional} support $\widetilde{\mathcal D}\subset\mathbb{C}$ of the density of eigenvalues of ${\cal M}{H}$ in the large-$N$ limit\cite{FZ}. After averaging over ${\cal M}{A}$, this role is clearly played by $a(z,z^*) = c(z,z^*)$, which vanish only outside the domain of eigenvalues $\widetilde{\mathcal D}$. Finally, after solving the self-consistent equations for $a=c$ and $b$ explicitly, we can then substitute them into the block (cf \eqref{31-final-appendix}) \begin{equation}\label{31-final-main} \langle\hat{\mathcal{G}}_{31}\rangle = \left\langle\frac{z}{z^2-{\cal M}{A}{\cal M}{B}}\right\rangle=- {z{\cal M}{B}^{-1}(b^*+z^{*2} {\cal M}{B}^{-1})\over a^2 - |b+z^2 {\cal M}{B}^{-1}|^2}, \end{equation} and read off from it the resolvent of ${\cal M}{\phi} = {\cal M}{A}{\cal M}{B}$. Thus, we obtain the desired Green's function \eqref{eq:Green} as \begin{equation}\label{Green1} G(w,w^*)= -{1\over N}\tr {{\cal M}{B}^{-1}(b^*+w^* {\cal M}{B}^{-1})\over a^2 - |b+w {\cal M}{B}^{-1}|^2},\quad w=z^2. \end{equation} \section{Solution of the Gap Equations and the Density of Eigenvalues in the Complex Plane and on the Real Axis}\label{gap-dos} Before delving into the technical details of computing the density of eigenvalues of the PH matrix ${\cal M}{\phi}$ from \eqref{Green1}, let us get oriented by recalling the useful analogy between the formulation of two-dimensional electrostatics in the complex plane and the problem of determining the density of eigenvalues of non-hermitian random matrices in the complex plane \cite{electrostatics}. \subsection{The Two-Dimensional Electrostatic Analog of Spectra of Pseudo-Hermitian Matrices}\label{PH-Electrostatics} Consider an $N\times N$ non-hermitian matrix ${\cal M}{X}$ with eigenvalues $\lambda_1,\ldots, \lambda_N$, taken from some probability ensemble. In the large-$N$ limit, these eigenvalues typically become dense on average\footnote{This may hold true even before averaging, due to the phenomenon of self-averaging, whereby the eigenvalues of a single realization of a large random matrix follow the large-$N$ averaged distribution of the ensemble to very high precision.} in a two-dimensional domain ${\mathcal D}$ in the complex plane, with continuous two-dimensional eigenvalue distribution \begin{equation}\label{rho2} \rho^{(2)}(x,y) = \left\langle {1\over N} \sum_{i=1}^N\delta (x-\Re \lambda_i)\delta(y-\Im \lambda_i)\right\rangle. \end{equation} Thus, $\rho^{(2)}(x,y)$ is supported in the two-dimensional domain ${\mathcal D}$ in the complex plane\footnote{For the moment, we consider here generic non-hermitian matrices, but in the specific context of our discussion of the spectral support $\widetilde{\mathcal D}$ of the matrix ${\cal M}{H}$ in the previous section, one should think of ${\mathcal D}$ as the image of $\widetilde{\mathcal D}$ under the mapping $w=z^2$.} of $w=x+iy$, and the associated Green's function (analogous to \eqref{eq:Green}) is \begin{equation}\label{GX} G_2(w,w^*)=\left\langle \frac{1}{N} \tr {1\over w -{\cal M}{X}} \right\rangle = \int\limits_{\mathcal D} \dd x'\dd y' {\rho^{(2)}(x',y')\over w-(x'+iy')}, \end{equation} which one readily recognizes as the planar electric field generated by the charge density $\rho^{(2)}(x,y)$. By applying Gauss' law to the electric field \eqref{GX} we thus recover the charge density, namely, the eigenvalue density \begin{equation}\label{rhoC} \rho^{(2)}(x,y)=\frac{1}{\pi}\frac{\partial}{\partial w^*}G_2(w,w^*), \end{equation} indicating that $G_2(w,w^*)$ is not a holomorphic function of $w$ in the spectral domain ${\mathcal D}$. Its domain of analyticity in $w$ is rather the complementary domain ${\mathcal D}^c = \mathbb{C}/{\mathcal D}$ of the complex plane, which does not contain any eigenvalues. It also follows from \eqref{rhoC} that if $\rho^{(2)}(x,y)$ is bounded throughout the spectral domain ${\mathcal D}$, then $G_2(w,w^*)$ is continuous everywhere. In contrast, the eigenvalues of hermitian matrices ${\cal M}{X} = {\cal M}{X}^\dagger$, with real eigenvalues $\lambda_i$, would typically condense along a one-dimensional segment (or several segments) $\sigma$ of the real axis $\mathbb{R}$, giving rise to a continuous one-dimensional density \begin{equation}\label{rho1} \rho^{(1)}(x) = \left\langle {1\over N} \sum_{i=1}^N\delta (x-\lambda_i)\right\rangle \end{equation} supported along $\sigma$, with Green's function \begin{equation}\label{GXherm} G_1(w)=\left\langle \frac{1}{N} \tr {1\over w -{\cal M}{X}} \right\rangle = \int\limits_{\sigma} \dd x' {\rho^{(1)}(x')\over w-x'}, \end{equation} namely, the planar electric field generated by a charged one-dimensional wire $\sigma$ placed along the real axis. $G_1(w)$ is manifestly a holomorphic function of $w$ everywhere off the real axis, and it suffers a discontinuous jump across the real axis. The singular one-dimensional charge density $\rho^{(1)}(x)$ which causes this jump, can be recovered from this discontinuity by means\footnote{$\rho^{(1)}(x)$ can be also obtained, of course, by applying Gauss' law as in \eqref{rhoC}, because $\frac{1}{\pi}\frac{\partial}{\partial w^*}{1\over w-x'} = \delta(x-x')\delta(y)$.} of the well-known relation \begin{equation}\label{discontinuity} \lim_{\epsilon \to 0^+} \left(G_1(x-i\epsilon) - G_1(x+i\epsilon)\right) = 2\pi i \rho^{(1)} (x). \end{equation} In contrast, as was mentioned above, $G_2(w,w^*)$ is continuous everywhere, and in particular, across the real axis. Here we come to the crux of our preliminary discussion: PH matrices are sort of a hybridization of hermitian and non-hermitian matrices, in the sense that their eigenvalues are either real, or come in complex-conjugate pairs. A large $N\times N$ PH matrix ${\cal M}{\phi}$ would typically have macroscopic amounts, that is, finite fractions of $N$, of both real and pairs of complex conjugate eigenvalues. In the large-$N$ limit, the complex pairs of eigenvalues would condense in a two-dimensional domain ${\mathcal D}$, which is {\emph symmetric} with respect to the real axis $\mathbb{R}$, giving rise to a continuous two-dimensional distribution $\rho^{(2)}(x,y)$, while the real eigenvalues would condense along a segment $\sigma$ of the real axis, giving rise to a continuous one-dimensional distribution $\rho^{(1)}(x)$. These eigenvalue densities are normalized to the corresponding fractions of $N$ of eigenvalues they account for, that is, \begin{equation}\label{fractions} \int\limits_{\mathcal D} \dd x\dd y \rho^{(2)}(x,y) = \nu,\quad \int\limits_{\sigma} \dd x \rho^{(1)}(x) = 1-\nu \end{equation} with $0\leq\nu\leq1$. The combination of these two-dimensional and one-dimensional distributions then gives rise to the Green's function \eqref{eq:Green} of our PH matrix ${\cal M}{\phi}$, namely, \begin{equation}\label{GPH} G_\text{PH}(w,w^*)=\left\langle \frac{1}{N} \tr {1\over w -{\cal M}{\phi}} \right\rangle = \int\limits_{\mathcal D} \dd x'\dd y' {\rho^{(2)}(x',y')\over w-(x'+iy')} + \int\limits_{\sigma} \dd x' {\rho^{(1)}(x')\over w-x'}\,. \end{equation} Due to the reflection symmetry of the domain ${\mathcal D}$ with respect to the real axis, originating from isospectrality of ${\cal M}{\phi}$ and ${\cal M}{\phi}^\dagger$, we can see that \begin{equation}\label{conjugation} G_\text{PH}^*(w,w^*) = G_\text{PH}(w^*,w). \end{equation} Moreover, it follows from \eqref{GPH} that $G_\text{PH}(w,w^*)$ is continuous everywhere, except in an infinitesimal sliver along the real axis, across which it jumps discontinuously as in \eqref{discontinuity}, from which, in combination with \eqref{conjugation}, we can determine the one-dimensional density component of \eqref{GPH} according to\footnote{The two dimensional integral in \eqref{GPH} does not contribute to the RHS of \eqref{1drho}, because in the limit taken, its integrand is a product of $\rho^{(2)}(x',y')$, which is even in $y'$, and the imaginary part of the kernel, which is odd in $y'$.} \begin{equation}\label{1drho} \rho^{(1)}(x) = {1\over \pi }\lim_{\epsilon\to 0^+}\Im G_\text{PH}(x-i\epsilon, x+i\epsilon). \end{equation} $G_\text{PH}(w,w^*)$ is an analytic function of $w$ in the complementary domain ${\mathcal D}^c$ (and off the real axis), and evidently, has asymptotic behavior \begin{equation}\label{asymptotic} G_\text{PH}(w,w^*) \sim {\nu + (1-\nu)\over w} = {1\over w} \end{equation} as $w\to\infty$. (This asymptotic regime obviously always belongs in ${\mathcal D}^c$ if the spectral domain ${\mathcal D}\cup\sigma$ of ${\cal M}{\phi}$ is compact.) Finally, by applying Gauss' law to \eqref{GPH}, we obtain the density of eigenvalues as \begin{equation}\label{total-density} \frac{1}{\pi}\frac{\partial}{\partial w^*}G_\text{PH}(w,w^*) = \rho^{(2)}(x,y) + \rho^{(1)}(x)\delta(y), \end{equation} with $\rho^{(2)}(x,y)$ supported throughout ${\mathcal D}$ and $\rho^{(1)}(x)$ supported along $\sigma$. Thus, $\rho^{(2)}(x,y)$ can be extracted from \eqref{total-density} simply by subtracting the singular piece proportional to $\delta (y)$. In the simpler case where ${\mathcal D}\cap \sigma = \emptyset$, we can avoid this subtraction by restricting $w$ to ${\mathcal D}$, and determine $\rho^{(1)}(x)$ directly from \eqref{1drho}. We shall discuss such a case as an example in Section \ref{sec:model B}. \subsection{Solution of the Gap Equations and Phase Structure}\label{phase structure} Let us now substitute $a=c$ from \eqref{AOC} and $w=z^2$ in \eqref{abc-selfconsistent-main}. Thus, we are instructed to solve the self-consistent gap equations \begin{eqnarray}\label{ab} a &=& -{a\over Nm^2} \tr {1\over a^2 - |b+w {\cal M}{B}^{-1}|^2} \nonumber\\{}\nonumber\\ b &=& {1\over Nm^2} \tr {b^* + w^*{\cal M}{B}^{-1}\over a^2 - |b+w {\cal M}{B}^{-1}|^2} \end{eqnarray} (supplemented by the complex conjugated last equation) for the purely imaginary quantity $a(w,w^*)$, that is, \begin{equation}\label{a2} a^2(w,w^*)\leq 0, \end{equation} and complex $b(w,w^*)$. In this section we shall analyze these equations assuming a generic invertible metric ${\cal M}{B}$. As a concrete example, in Section \ref{sec:model B} we shall outline the explicit full solution of these equations for a particular metric. These equations are algebraic polynomial equations for the unknown functions, and therefore have multiple roots, which typically become degenerate at branch point singularities in the complex-$w$ plane\footnote{The complex coordinate $w$ is the only variable parameter in \eqref{ab}, because the metric ${\cal M}{B}$ is held fixed in a given model.}. These roots should be then sewn together into unique single-valued continuous solutions for $a$ and $b$, defined globally throughout the properly cut complex $w$-plane. Note that $a$ and $b$ may certainly depend on both $w$ and $w^*$, and are therefore not globally holomorphic functions. At a given point $w$ (away from any branch point) and in some small neighborhood around it, the ``physical" solution of \eqref{ab} should be clearly unique and continuous. From the first equation in \eqref{ab} we see that at a given point $w$, the solution for $a(w,w^*)$ is either $a(w,w^*)=0$ or $a(w,w^*)\neq 0$. On the basis of continuity, whichever of these two possibilities that holds at $w$, should also be valid in a neighborhood of that point. In fact, following the discussion below \eqref{Asym} in the previous section, $a(w,w^*)\neq 0$ throughout the {\em two-dimensional} spectral domain ${\mathcal D}$ of our averaged PH matrix ${\cal M}{\phi} = {\cal M}{A}{\cal M}{B}$, and vanishes in the complementary domain\footnote{Except possibly for a benign removable discontinuity along $\sigma$, as discussed following \eqref{SVDos1} in Appendix \ref{sec:diagonals}, which has no practical effect on our solution.}$\,{\mathcal D}^c = \mathbb{C}/{\mathcal D}$. Thus, $a(w,w^*)$ serves as a local order parameter indicating whether $w\in {\mathcal D}$ or not. For reasons that should become clear below, we shall refer to the solution with $a(w,w^*)\neq0$ throughout ${\mathcal D}$ as the {\em non-holomorphic} phase, and to the complementary solution with $a(w,w^*)=0$ throughout ${\mathcal D}^c$ as the {\em holomorphic} phase. We have established the role of $a(w,w^*)$ as the order parameter telling apart the two phases. The other function $b(w,w^*)$ also has a physical interpretation, as sort of generalized self-energy. We argue as follows: Let us recall the resolvent \begin{equation}\label{PH-resolvent} \frac{1}{z}\langle\hat{\mathcal{G}}_{31}\rangle = \langle\hat G\rangle = \left\langle\frac{1}{w-{\cal M}{A}{\cal M}{B}}\right\rangle=- {{\cal M}{B}^{-1}(b^*+w^* {\cal M}{B}^{-1})\over a^2 - |b+w {\cal M}{B}^{-1}|^2} \end{equation} of ${\cal M}{\phi}$ from \eqref{31-final-main}. Thus, we can rewrite the second equation in \eqref{ab} as \begin{equation}\label{bSE} -b = {1\over N m^2} \tr \left\langle{\cal M}{B}\hat G\right\rangle. \end{equation} In the simplest case ${\cal M}{B} = {\cal M}{1}_N$ (discussed in Section \ref{SQH} below), this equation reads \begin{equation}\label{bGUE} -b(w) = {1\over m^2} G(w), \end{equation} which we readily recognize from the diagrammatic equation \eqref{SE}, considered for the plain hermitian GUE matrices ${\cal M}{A}$ of \eqref{eq:GUE}, as the relation \begin{equation}\label{SigmaGUE} \Sigma_\text{GUE}(w) = {1\over m^2} G_\text{GUE}(w) \end{equation} between the self-energy and the Green's function. Eq. \eqref{bSE} merely generalizes this relation to PH matrices, with arbitrary metric ${\cal M}{B}$. \subsubsection{The Holomorphic Phase, $a=0$}\label{hp} Outside the spectral domain ${\mathcal D}$, $a(w,w^*)=0$ identically. Thus, the second equation in \eqref{ab} simplifies into \begin{equation}\label{bh} b(w) = -{1\over Nm^2} \tr {1\over b(w)+ w{\cal M}{B}^{-1}},\quad w\in {\mathcal D}^c. \end{equation} Therefore, $b(w)$ is manifestly a holomorphic function of $w$ in ${\mathcal D}^c$, as is $a(w)\equiv 0$. Alluding to the comments made below \eqref{a2}, Eq. \eqref{bh} is an algebraic polynomial equation for $b$, of degree $d+1$, where $d$ is the number of {\em distinct} eigenvalues of ${\cal M}{B}$. A subset of these roots, subjected to appropriate boundary conditions, such as continuity and asymptotic behavior as $w\rightarrow\infty$, should then be sewn together as branches of a single-valued holomorphic function $b(w)$ defined throughout the complementary domain ${\mathcal D}^c$. This multibranched structure of $b(w)$ indicates that the complementary domain ${\mathcal D}^c$ need not necessarily be a simply connected, or even a connected set. However, if the spectral domain ${\mathcal D}$ of ${\cal M}{\phi}$ is compact, ${\mathcal D}^c$ should clearly have a connected subset ${\mathcal D}^c_\infty $ which contains $w\rightarrow\infty$. Thus, by considering \eqref{bh} in the domain ${\mathcal D}^c_\infty $, we can read off the asymptotic behavior of $b(w)$, \begin{equation}\label{bhasympt} \lim_{w\to\infty} b(w) \sim -{1\over m^2}{\left({1\over N}\tr{\cal M}{B}\right)\over w}, \end{equation} assuming $\tr {\cal M}{B}\neq 0$. This asymptotic behavior is consistent, of course with \eqref{limitsOD} and the definition \eqref{abc}, which imply that \begin{equation}\label{bdef} b = -{1\over Nm^2} \tr \left\langle {\cal M}{B} {1\over w-{\cal M}{\phi}}\right\rangle. \end{equation} If, however, $\tr {\cal M}{B}=0$, we have to expand the RHS of \eqref{bh} to the next order in $b/w$, and obtain $$b(w)\sim \left({1\over Nm^2}\tr{\cal M}{B}^2\right) {b(w)\over w^2}, $$ which leads to a contradiction, unless $b(w)$ vanishes identically in a neighborhood of $w\rightarrow\infty$, and therefore must vanish identically throughout ${\mathcal D}^c_\infty $: \begin{equation}\label{zerobh} b(w) =0\quad \forall w\in {\mathcal D}^c_\infty\quad {\rm if} ~ \tr{\cal M}{B} = 0. \end{equation} Enforcing this result on the expansion of \eqref{bdef} in inverse powers of $w\in{\mathcal D}^c_\infty$, we come to the non-trivial conclusion, that if $\tr{\cal M}{B}=0$, then all moments (and in particular, all even moments) \begin{equation}\label{vanishing-moments} \langle \tr ({\cal M}{B}{\cal M}{\phi}^n)\rangle = \langle \tr ({\cal M}{B}({\cal M}{A}{\cal M}{B})^n)\rangle = 0,\quad n\geq 0. \end{equation} Having solved for $b(w)$, we then substitute it (together with $a(w) = 0$) in \eqref{31-final-main}, to obtain the resolvent \begin{equation}\label{reolvent-holomorphic} \left\langle\frac{1}{w-{\cal M}{\phi}}\right\rangle= {1\over b(w){\cal M}{B}+w}, \end{equation} and thus, from \eqref{Green1}, the desired Green's function in the holomorphic phase \begin{equation}\label{Ghol} G(w) = {1\over N}\tr \left\langle\frac{1}{w-{\cal M}{\phi}}\right\rangle= {1\over N}\tr {1\over b(w){\cal M}{B}+w} \end{equation} throughout ${\mathcal D}^c$. Comparing this equation with the equation defining the self-energy $\Sigma_\text{herm}(w)$ for ensembles of hermitian matrices, \begin{equation}\label{SEhermitian} G_\text{herm}(w) = {1\over w-\Sigma_\text{herm}(w)}, \end{equation} the interpretation \eqref{bSE} of $-b$ as self-energy for PH matrices ${\cal M}{\phi}$, alluded to in \eqref{bSE}, becomes manifest in the holomorphic phase: \begin{equation}\label{self-energy} G(w) = {1\over N}\tr {1\over w - {\cal M}{\Sigma}_{\cal M}{\phi}},\quad {\cal M}{\Sigma}_{\cal M}{\phi}=-b(w){\cal M}{B}. \end{equation} By multiplying the numerator and denominator under the trace in \eqref{Ghol} by ${\cal M}{B}^{-1}$ and then using \eqref{bh}, we can rewrite \eqref{Ghol} more compactly as \begin{equation}\label{Ghol1} G(w) = {m^2 b^2(w)+ 1\over w}. \end{equation} The asymptotic behavior \eqref{bhasympt} of $b(w)$ implies that \begin{equation}\label{Gholasympt} \lim_{w\to\infty} G(w) \sim {1\over w}, \end{equation} in accordance with the definition of the resolvent of ${\cal M}{\phi}$ and the assumed compactness of ${\mathcal D}$, and of course, with \eqref{asymptotic}. In the special case \eqref{zerobh} we have \begin{equation}\label{zerobh-Ghol} G(w) = {1\over w} \end{equation} identically throughout ${\mathcal D}^c_\infty$. Finally, the presence of a one-dimensional density component of real eigenvalues $\rho^{(1)}(x)$ in \eqref{GPH} means that $G(w)$ should have a cut along $\sigma\subset\mathbb{R}$, with $\rho^{(1)}(x)$ given by the discontinuity across the cut as \begin{equation}\label{discontinuity1} \lim_{\epsilon \to 0^+} \left(G(x-i\epsilon) - G(x+i\epsilon)\right) = 2\pi i \rho^{(1)} (x), \end{equation} in accordance with \eqref{discontinuity}. \subsubsection{The Non-Holomorphic Phase, $a\neq0$}\label{nhp} Throughout the spectral domain ${\mathcal D}$ the order parameter $a(w,w^*)\neq 0$ and is pure imaginary, and we can rewrite \eqref{ab} throughout this domain as \begin{eqnarray}\label{ab-nh} 1 &=& {1\over Nm^2} \tr {1\over |b+w {\cal M}{B}^{-1}|^2 + \alpha^2} \nonumber\\{}\nonumber\\ b &=&- {1\over Nm^2} \tr {b^* + w^*{\cal M}{B}^{-1}\over |b+w {\cal M}{B}^{-1}|^2 + \alpha^2} \end{eqnarray} where \begin{equation}\label{alpha} \alpha(w,w^*) = \Im a(w,w^*). \end{equation} By using the first equation in \eqref{ab-nh} in the second one, we can rewrite the latter as \begin{equation*} b = -b^* + {w^*\over Nm^2} \tr {{\cal M}{B}^{-1}\over |b+w {\cal M}{B}^{-1}|^2 + \alpha^2}, \end{equation*} that is, \begin{equation*} 2\Re b = {w^*\over Nm^2} \tr {{\cal M}{B}^{-1}\over |b+w {\cal M}{B}^{-1}|^2 + \alpha^2}, \end{equation*} which leads to a contradiction, unless \begin{eqnarray}\label{b-nh} \hspace{-5cm}&&\Re b(w,w^*) \equiv 0,\quad \quad {\rm and}\nonumber\\{}\nonumber\\ &&\tr {{\cal M}{B}^{-1}\over |b+w {\cal M}{B}^{-1}|^2 + \alpha^2} =0. \end{eqnarray} Thus, $b(w,w^*)$ is pure imaginary throughout ${\mathcal D}$, like $a(w,w^*)$. These two functions are therefore manifestly not holomorphic functions of $w$ in ${\mathcal D}$. One can easily verify that the two real equations \eqref{b-nh}, together with the first equation in \eqref{ab-nh}, are completely equivalent to the original coupled equations \eqref{ab-nh}.Therefore, we can simplify \eqref{ab-nh} further, and rewrite them as two real equations for two unknown real functions as \begin{eqnarray}\label{ab-nh-real} {1\over Nm^2} \tr {1\over |i\beta+w {\cal M}{B}^{-1}|^2 + \alpha^2} &=& 1 \nonumber\\{}\nonumber\\ \tr {{\cal M}{B}^{-1}\over |i\beta +w {\cal M}{B}^{-1}|^2 + \alpha^2} &=& 0, \end{eqnarray} where \begin{equation}\label{beta} \beta(w,w^*) = \Im b(w,w^*). \end{equation} Having solved for $a(w,w^*) = i\alpha(w,w^*)$ and $b(w,w^*) = i\beta(w,w^*)$, we then substitute them in \eqref{31-final-main}, to obtain the desired Green's function \eqref{eq:Green} in the non-holomorphic phase as \begin{equation}\label{Green-nh} G(w,w^*) = {1\over N}\tr \left\langle\frac{1}{w-{\cal M}{\phi}}\right\rangle= {1\over N}\tr {{\cal M}{B}^{-1}(-i\beta+w^* {\cal M}{B}^{-1})\over |i\beta+w {\cal M}{B}^{-1}|^2+\alpha^2}. \end{equation} We can simplify this expression further into \begin{equation}\label{Green-nh-final} G(w,w^*)= w^*\left[{1\over N}\tr { {\cal M}{B}^{-2}\over |i\beta+w {\cal M}{B}^{-1}|^2+\alpha^2}\right], \end{equation} where we have used the second equation in \eqref{ab-nh-real}. Finally, we can compute the two-dimensional component $\rho^{(2)}(x,y)$ of the density of complex eigenvalues in the domain ${\mathcal D}$ by applying Gauss' law to \eqref{Green-nh-final} as in \eqref{total-density}. \subsubsection{The Phase Boundary Line}\label{sec:boundary} By definition, for probability ensembles with finite moments of the matrix elements of ${\cal M}{A}$, such as our Gaussian probability ensemble \eqref{eq:GUE}, the various averaged blocks $\langle\hat{\mathcal{G}}_{\alpha\beta}\rangle$ and their traces \eqref{blocktrace} should be continuous functions of $w$ and $w^*$. As we cross the phase boundary from the non-holomorphic phase into the holomorphic phase, $a(w,w^*)$ changes from being a non-zero pure imaginary function $i\alpha(w,w^*)$ into an identically vanishing function. This should happen continuously at the boundary line between the two phases, and therefore the phase boundary line $\Gamma$ should be the solution of the equation \begin{equation}\label{boundary} \alpha(w,w^*) = 0. \end{equation} That is, the phase boundary line $\Gamma$ is the line of zeros of $\alpha(w,w^*)$. Due to the structure of the gap equations \eqref{ab}, as we cross $\Gamma$ from the non-holomorphic phase into the holomorphic phase, $b$ would then change continuously from being a non-analytic pure imaginary function $i\beta(w,w^*)$ into a holomorphic function $b(w)$. Let's assume for example that $\beta(w,w^*)$ is known explicitly in some subset of ${\mathcal D}$, which borders a subset ${\mathcal D}^c_1$ of the holomorphic domain ${\mathcal D}^c$ along an arc $\gamma\subset\Gamma$. In order to decide which branch of the solution of \eqref{bh} we should assign to ${\mathcal D}^c_1$ we then use the fact that $b$ must be continuous across the phase boundary. Thus, our knowledge of $b(w,w^*) = i\beta(w,w^*)$ along the boundary arc $\gamma$ should fix the appropriate holomorphic branch of $b$ in a unique way. If it so happens that ${\mathcal D}^c_1$ forms a holomorphic island inside the non-holomorphic domain, so that $\gamma$ is actually a closed curve, then we can compute the holomorphic $b(w)$ inside ${\mathcal D}^c_1$ by invoking Cauchy's theorem as \begin{equation}\label{bhboundary} b(w) = {1\over 2\pi i}\oint\limits_{\gamma} {i\beta(w',w^{'*})\over w-w'} \dd w'. \end{equation} \subsection{Positive Definite Metric ${\cal M}{B}$ : SQH Matrices}\label{SQH} For positive definite metric ${\cal M}{B}$, our matrix ${\cal M}{\phi}$ is SQH with purely real eigenvalues. It is easy to see that in this case, the gap equations admit only a holomorphic solution, resulting in purely real spectrum. Indeed, upon substituting a positive definite metric ${\cal M}{B}$ in the second equation in \eqref{ab-nh-real}, the matrix on the LHS of that equation becomes positive definite, with positive trace \begin{equation}\label{ineq} \tr {{\cal M}{B}^{-1}\over |i\beta +w {\cal M}{B}^{-1}|^2+ \alpha^2} >0. \end{equation} Thus, the non-holomorphic gap equation cannot be satisfied anywhere in the complex $w$-plane, and there can be no two-dimensional spectral domain accounting for complex eigenvalues. Only the holomorphic phase of Section \ref{hp} exists, with $a(w)\equiv 0$, $b(w)$ the appropriate solution of \eqref{bh}, and the holomorphic Green's function given by \eqref{Ghol}. The latter should have a cut along the support $\sigma$ of the condensed purely real eigenvalues of ${\cal M}{\phi}$, and we should be able to recover their density from \eqref{discontinuity1}. As a very simple check, let us verify that for ${\cal M}{B}={\cal M}{1}_N$ our formalism reproduces Wigner's semicircle. From the interpretation of $-b$ as self-energy, in particular, from Equations \eqref{bSE} and \eqref{self-energy}, we know that \begin{equation}\label{bG} -b(w) = {1\over m^2} G(w), \end{equation} which is consistent, of course, with the definition \eqref{bdef} of $b$ in the case ${\cal M}{B} = {\cal M}{1}_N$ (and ${\cal M}{\phi} = {\cal M}{A}$), namely \begin{equation}\label{bdef1} b = -{1\over Nm^2} \tr \left\langle {1\over w-{\cal M}{A}}\right\rangle. \end{equation} Let us derive this relation explicitly from the holomorphic gap equation \eqref{bh}, which in the present case simplifies into the quadratic equation \begin{equation}\label{bh-GUE} b(w) = -{1\over m^2} {1\over b(w)+ w}, \end{equation} from which it is also clear that we should pick the root which behaves asymptotically like \begin{equation}\label{bhasympt-GUE} \lim_{w\to\infty} b(w) \sim -{1\over m^2} {1\over w} \end{equation} in accordance with \eqref{bhasympt}. By comparing \eqref{bhasympt-GUE} with \eqref{Gholasympt} we conclude \eqref{bG}, as required, because $b(w)$ is analytic in $w$ throughout the complex plane, save for a cut along the real axis. Thus, $-b(w) = \Sigma_\text{GUE}(w)$, which means that \eqref{Ghol} is simply the statement that \begin{equation}\label{Ghol:GUE} G(w) = {1\over w + b(w)} = {1\over w-\Sigma_\text{GUE}(w)}, \end{equation} that is, \begin{equation}\label{GGUE} G(w) = {m^2\over 2}\left(w - \sqrt{w^2- {4\over m^2}}\right) \end{equation} is indeed the Green's function of the GUE ensemble, which leads to the semicircular eigenvalue density \begin{equation}\label{semicircle} \rho^{(1)}(x) = {m^2\over 2\pi} \sqrt{{4\over m^2} - x^2} \end{equation} supported in the segment $|x|\leq {2\over m}$, as required. \subsection{The Continuum Limit of the Density of Eigenvalues of the Metric ${\cal M}{B}$}\label{continuum} As can be seen from Eqs. \eqref{bh} and \eqref{Ghol} in the holomorphic phase, and from Eqs. \eqref{ab-nh-real} and \eqref{Green-nh-final} in the non-holomorphic phase, all relevant quantities in these equations are {\em symmetric} functions of the eigenvalues $\mu_1, \mu_2,\ldots,\mu_N$ of the metric ${\cal M}{B}$. Thus, they must be all functionals of the density of eigenvalues \begin{equation}\label{Bdos} \rho_B(\mu) = \frac{1}{N}\sum_{k=1}^N \delta (\mu-\mu_k) \end{equation} of ${\cal M}{B}$, which generates all symmetric functions of these eigenvalues. This can be seen clearly by rewriting Eqs. \eqref{bh}, \eqref{Ghol}, \eqref{ab-nh-real} and \eqref{Green-nh-final} explicitly in terms of \eqref{Bdos}, or more precisely, in terms of its Cauchy transform, the Green's function \begin{equation}\label{GreenB} G_B(w) = \frac{1}{N} \tr {1\over w-B} = \int\limits_{-\infty}^{\infty} {\rho_B(\mu)\dd\mu\over w-\mu} \end{equation} of the metric. The main motivation for rewriting Eqs. \eqref{bh}, \eqref{Ghol}, \eqref{ab-nh-real} and \eqref{Green-nh-final} explicitly in terms of $G_B(w)$ is that in this form these equations are amenable to taking the continuum limit for $\rho_B(\mu)$. That is, the limit in which the $N\rightarrow\infty$ eigenvalues of ${\cal M}{B}$ condense in a finite segment (or segments) on the real axis, rendering $\rho_B(\mu)$ a continuous function in this domain\footnote{Let us assume a certain well-behaved continuous density function $\rho_B(\mu)$ as the continuum limit for the metric. Our working assumption is that as $N\rightarrow\infty$, the spectrum of the $N\times N$ hermitian matrix ${\cal M}{B}$ converges weakly to this given density $\rho_B(\mu)$.}. Yet another advantage of such reformulation of the gap equations is that it leads to general results and also to simplification of known results such as \eqref{invariant} and \eqref{G-nh-prefinal} below, which would be difficult to derive otherwise. By definition \eqref{Bdos} is normalized according to \begin{equation}\label{Bdos-normalization} \int\limits_{-\infty}^\infty \rho_B(\mu)\dd\mu = 1, \end{equation} resulting in the asymptotic behavior \begin{equation}\label{GreenB-asympt} G_B(w) = {1\over w} + {\langle\mu\rangle\over w^2}+{\langle\mu^2\rangle\over w^3}+\ldots \end{equation} as $w\rightarrow\infty$, where $$\langle\mu^k\rangle = \int\limits_{-\infty}^\infty \mu^k\rho_B(\mu) \dd\mu = \frac{1}{N}\tr B^k$$ are the moments of $\rho_B(\mu)$. Note also the obvious reflection property \begin{equation}\label{GreenB-ref} G_B(w^*) = G_B^*(w), \end{equation} which will be useful for us below. \subsubsection{The Holomorphic Phase}\label{hol-sym} In the holomorphic phase, we can clearly rewrite \eqref{bh} for determining $b(w)$ as \begin{eqnarray}\label{pre-bh-sym} b(w) &=& -{1\over m^2} \int\limits_{-\infty}^\infty {\mu\rho_B(\mu)\over \mu b(w) + w}\dd\mu = -{1\over m^2 b(w)}\left[\int\limits_{-\infty}^\infty \left(1 - {w\over w+ \mu b(w)}\right)\rho_B(\mu)\dd\mu\right]\nonumber\\ &=&-{1\over m^2b(w)}\left[1 + {w\over b(w)}\int\limits_{-\infty}^\infty{\rho_B(\mu)\dd\mu\over -\frac{w}{b(w)} - \mu}\right], \end{eqnarray} where in the last step we have used \eqref{Bdos-normalization}. The integral in the last equation in \eqref{pre-bh-sym} can be expressed in terms of \eqref{GreenB}, and therefore can finally rewrite \eqref{bh} in terms of $G_B(w)$ as \begin{equation}\label{bh-sym} b(w) = -{1\over m^2 b(w)} \left[1 + {w\over b(w)} G_B\left(-\frac{w}{b(w)}\right)\right]. \end{equation} It can be easily checked, based on \eqref{GreenB-asympt}, that \eqref{bh-sym} is consistent with the asymptotic condition \eqref{bhasympt}. To summarize, given the metric ${\cal M}{B}$, its Green's function $G_B(w)$ is known in principle, and therefore \eqref{bh-sym} constitutes a functional equation for determining $b(w)$. Similarly, the Green's function $G(w)$ \eqref{Ghol} of ${\cal M}{\phi}$ in the holomorphic phase can be written as \begin{equation}\label{Ghol-sym} G(w) = -\frac{1}{b(w)}G_B\left(-\frac{w}{b(w)}\right), \end{equation} which means that the combination \begin{equation}\label{invariant} wG(w) = -\frac{w}{b(w)}G_B\left(-\frac{w}{b(w)}\right) \end{equation} is invariant under the conformal mapping $w\mapsto -w/b(w)$. By substituting \eqref{invariant} in \eqref{bh-sym} we obtain $m^2 b^2(w) + 1 = wG(w)$, which is nothing but \eqref{Ghol1}. \subsubsection{The Non-Holomorphic Phase}\label{sec:nh-sym} After multiplying the numerator and denominator of the coupled non-holomorphic gap equations \eqref{ab-nh-real} by ${\cal M}{B}^2$, we can rewrite them as \begin{eqnarray}\label{pre-nh-sym} \int\limits_{-\infty}^\infty {\mu^2\rho_B(\mu) \dd\mu\over |i\beta\mu +w|^2 + \mu^2\alpha^2} &=& \int\limits_{-\infty}^\infty {\mu^2\rho_B(\mu) \dd\mu\over x^2 + (y + \beta\mu)^2 + \mu^2\alpha^2} = m^2\nonumber\\ \int\limits_{-\infty}^\infty {\mu\rho_B(\mu) \dd\mu\over |i\beta\mu +w|^2 + \mu^2\alpha^2} &=& \int\limits_{-\infty}^\infty {\mu\rho_B(\mu) \dd\mu\over x^2 + (y + \beta\mu)^2 + \mu^2\alpha^2} = 0, \end{eqnarray} where $w=x+iy$, and with $\alpha(w,w^*)$ and $\beta(w,w^*)$ defined, respectively, in \eqref{alpha} and \eqref{beta}. Let us now multiply the first equation in \eqref{pre-nh-sym} on both sides by $\alpha^2 + \beta^2$. Then by adding and subtracting appropriate terms in its numerator, and after using the second equation in \eqref{pre-nh-sym} once, we can recast it into the form \begin{eqnarray}\label{pre-nh-sym1} m^2(\alpha^2 + \beta^2) &=& \int\limits_{-\infty}^\infty\left[1-{x^2 + y^2\over \alpha^2 + \beta^2}{1\over \left(\mu + {\beta y \over \alpha^2 + \beta^2}\right)^2 + \xi^2}\right]\rho_B(\mu)\dd\mu\nonumber\\ & =& 1 - {x^2 + y^2\over \alpha^2 + \beta^2} \int\limits_{-\infty}^\infty{\rho_B(\mu)\dd\mu\over \left(\mu + {\beta y \over \alpha^2 + \beta^2}\right)^2 + \xi^2}, \end{eqnarray} where we have used \eqref{Bdos-normalization}, and where the real quantity $\xi$ is defined as \begin{equation}\label{xi} \xi^2 = {\alpha^2(x^2 + y^2) + \beta^2 x^2\over (\alpha^2 + \beta^2)^2}. \end{equation} Similarly, the second equation in \eqref{pre-nh-sym} is equivalent to \begin{equation}\label{pre-nh-sym2} \int\limits_{-\infty}^\infty{2\mu\rho_B(\mu)\dd\mu\over \left(\mu + {\beta y \over \alpha^2 + \beta^2}\right)^2 + \xi^2} = 0, \end{equation} which, like \eqref{ineq}, demonstrates that a solution to the non-holomorphic gap equations exists only if ${\cal M}{B}$ is not positive definite, that is, for such solutions to exist, $\rho_B(\mu)$ must be supported along both positive and negative segments. Let us now define the complex quantity \begin{equation}\label{zeta} \zeta = i\xi - {\beta y\over \alpha^2 + \beta^2}, \end{equation} in terms of which we can rewrite the denominator in \eqref{pre-nh-sym1} as \begin{eqnarray}\label{den1} \hspace{-0.5cm}{1\over (\mu +{\beta y\over \alpha^2 + \beta^2})^2 + \xi^2} &=& {1\over (\zeta - \mu)(\zeta^*-\mu)}\nonumber\\ &=& -\left({1\over \zeta-\mu} - {1\over \zeta^* - \mu} \right){1\over \zeta-\zeta^*} = {i\over 2\xi}\left({1\over \zeta -\mu} - {1\over \zeta^* - \mu} \right), \end{eqnarray} and the factor multiplying $\rho_B(\mu)$ in \eqref{pre-nh-sym2} as \begin{equation}\label{den2} {2\mu\over (\mu +{\beta y\over \alpha^2 + \beta^2})^2 + \xi^2} = -\left({1\over \zeta-\mu} + {1\over \zeta^* - \mu} \right) + {\zeta + \zeta^*\over (\zeta - \mu)(\zeta^*-\mu)}. \end{equation} Thus, by plugging \eqref{den1} in \eqref{pre-nh-sym1} and \eqref{den2} in \eqref{pre-nh-sym2}, and then using \eqref{pre-nh-sym1} to calculate the integral over the last term in \eqref{den2}, we can rewrite the coupled non-holomorphic gap equations in terms of $G_B(w)$ as \begin{eqnarray}\label{nh-sym} {i\over 2\xi}\left(G_B(\zeta) - G_B(\zeta^*)\right) &=& {\alpha^2 + \beta^2\over x^2 + y^2}[1-m^2(\alpha^2 + \beta^2)]\nonumber\\ G_B(\zeta) + G_B(\zeta^*) &=& - {2\beta y \over x^2 + y^2}[1-m^2(\alpha^2 + \beta^2)]. \end{eqnarray} By recalling \eqref{GreenB-ref} we can simplify these two coupled real equations further into \begin{eqnarray}\label{nh-sym-final} \Im G_B(\zeta) &=&- {\sqrt{\alpha^2 (x^2+y^2) + \beta^2 x^2}\over x^2 + y^2}[1-m^2(\alpha^2 + \beta^2)]\nonumber\\ \Re G_B(\zeta) &=& - {\beta y \over x^2 + y^2}[1-m^2(\alpha^2 + \beta^2)], \end{eqnarray} where we used the definition \eqref{xi} in the first equation. Alternatively, from \eqref{nh-sym}, we can represent these two real equations as a single complex gap equation \begin{equation}\label{nh-complex} G_B(\zeta) = {\alpha^2 + \beta^2\over x^2 + y^2}\zeta^* [1-m^2(\alpha^2 + \beta^2)] \end{equation} or equivalently, \begin{equation}\label{nh-complex-final} \zeta G_B(\zeta) = 1-m^2(\alpha^2 + \beta^2), \end{equation} where we used \eqref{xi} and \eqref{zeta}. Note that the RHS of this equation is purely real. Thus, to summarize, given the metric ${\cal M}{B}$, $G_B(w)$ is known in principle. The latter is evaluated at $\zeta$, which is a function of the non-holomorphic unknowns $\alpha$ and $\beta$. Therefore, the two coupled real gap equations \eqref{nh-sym-final}, or equivalently, the single complex gap equation \eqref{nh-complex-final}, determine $\alpha$ and $\beta$. Once the non-holomorphic gap equations are solved for $\alpha$ and $\beta$, we could then use them to determine the resolvent $G(w,w^*)$ of ${\cal M}{\phi}$ in the non-holomorphic phase. The latter is given by \eqref{Green-nh-final} as a trace over a function of the metric ${\cal M}{B}$. We can rewrite $G(w,w^*)$ in terms of $G_B(\zeta)$ by carrying algebraic manipulations similar to those carried above and obtain \begin{equation}\label{G-nh-1} wG(w,w^*) = -{x^2+y^2\over \alpha^2 + \beta^2}{1\over\xi} \Im G_B(\zeta), \end{equation} which by the first equation in \eqref{nh-sym} we can massage further into the remarkably simple form \begin{equation}\label{G-nh-prefinal} wG(w,w^*) = 1-m^2(\alpha^2 + \beta^2). \end{equation} By comparing the latter equation with \eqref{nh-complex-final} we thus conclude the relation \begin{equation}\label{invariant-nh} wG(w,w^*) = \zeta G_B(\zeta) = 1-m^2(\alpha^2 + \beta^2), \end{equation} which is the non-holomorphic counterpart of the holomorphic relations \eqref{invariant} and \eqref{Ghol1}. \subsubsection{The Unified Form of the Gap Equation} We can rewrite the holomorphic gap equation \eqref{bh-sym} as \begin{equation}\label{bh-sym-alt} - {w\over b(w)} G_B\left(-\frac{w}{b(w)}\right) = 1 + m^2 b^2(w). \end{equation} Comparison of \eqref{bh-sym-alt} and its non-holomorphic counterpart \eqref{nh-complex-final} suggests that we extend $\zeta$, defined in the non-holomorphic phase by \eqref{zeta} and \eqref{xi}, into the entire complex $w$-plane in a natural way as \begin{equation}\label{globalzeta} \tilde\zeta = \left\{\begin{array}{cc} i\xi - {\beta y\over \alpha^2 + \beta^2}, ~~w\in {\mathcal D}\\{}\\- {w\over b(w)}, ~~w\in {\mathcal D}^c\end{array}\right. \end{equation} that is, by setting $\alpha\mapsto 0$ and $\beta\mapsto -ib(w)$ in \eqref{xi} and \eqref{zeta}, so that $\zeta\mapsto -w/b(w)$ for $w\in{\mathcal D}^c$, rendering $\tilde\zeta$ continuous at the phase boundary. Then, the holomorphic gap equation \eqref{bh-sym-alt} (supplemented by $a\equiv 0$) and its non-holomorphic counterpart \eqref{nh-complex-final} could be unified into the single gap equation \begin{equation}\label{unified-gap} \tilde\zeta G_B(\tilde\zeta) = 1 + m^2(a^2 + b^2), \end{equation} where it is understood that $a=0$ and $b(w)$ are holomorphic functions in the holomorphic regime $w\in {\mathcal D}^c$, and $a=i\alpha(w,w^*), b=i\beta(w,w^*)$ in the non-holomorphic regime $w\in {\mathcal D}$. In this way, once the gap equations are solved for the appropriate quantities $a$ and $b$, the two expressions \eqref{invariant} and \eqref{invariant-nh} for the Green's function of the PH matrix ${\cal M}{\phi}$ in the holomorphic and non-holomorphic regimes, respectively, are unified into the single form \begin{equation}\label{invariant-global} wG(w,w^*) =\tilde \zeta G_B(\tilde\zeta) = 1+m^2(a^2 + b^2). \end{equation} Thus, the combination $wG(w,w^*) =\tilde \zeta G_B(\tilde\zeta)$ is invariant under the partly holomorphic, partly real-analytic mapping $w\mapsto\tilde\zeta$. \subsubsection{The Phase Boundary Line $\Gamma$, Yet Again} Let us see what our reformulation of the gap equations in terms of $G_B(w)$ entails for the behavior of our solutions at the phase boundary between the holomorphic and non-holomorphic phases discussed in Section \ref{sec:boundary}. Approaching the boundary from within the non-holomorphic phase we know that $\alpha\rightarrow 0$ as well as $b = i\beta$. Substituting these relations in \eqref{G-nh-prefinal} we immediately see that at the boundary \begin{equation}\label{bdry} wG(w,w^*) = 1 + m^2 b^2, \end{equation} which is just \eqref{Ghol1} of the holomorphic phase, evaluated at the boundary. This should be expected, because the various holomorphic quantities should match continuously their non-holomorphic counterparts at the phase boundary. In this sense, \eqref{G-nh-prefinal} is quite natural, as it is a rather simple expression which crosses over continuously between the two phases at the phase boundary. We can derive \eqref{bdry} in yet another (but related) way, which underlines the continuity of $\tilde\zeta$ in \eqref{globalzeta} across the phase boundary line, as follows: At the boundary, \begin{equation}\label{xi-zeta} \xi = \frac{x}{\beta},\quad \zeta = i{x+iy\over \beta} = {iw\over\beta}, \end{equation} as can be seen from \eqref{xi} and \eqref{zeta}. By substituting \eqref{xi-zeta} in \eqref{nh-sym-final}, we can combine these two equations into \begin{equation}\label{bdry1} G_B\left(-\frac{w}{i\beta}\right) = -i\beta {1-m^2\beta^2\over w}, \end{equation} in which both sides are evaluated at some point on the phase boundary line, where also $b = i\beta$. Thus, we can rewrite \eqref{bdry1} as \begin{equation}\label{bdry2} -{w\over b}G_B\left(-\frac{w}{b}\right) = 1+m^2 b^2, \end{equation} which by \eqref{invariant}, evaluated at the phase boundary coming from the holomorphic phase, reproduces \eqref{bdry}. \subsubsection{Some Checks and the Continuum Limit} In the latter part of Section \ref{SQH} we have verified that our formalism reproduced the GUE results for ${\cal M}{B} = 1 \!\! 1_N$. For this metric, of course, $G_B(w) = \frac{1}{w-1}$, and one can easily verify that substituting this expression in \eqref{bh-sym} results in our previously derived quadratic equation \eqref{bh-GUE} for $b(w)$ in the GUE. Similarly, substituting this $G_B(w)$ in \eqref{invariant} reproduces the Green's function \eqref{Ghol:GUE} of GUE. A non-trivial check is offered by applying our results in this section to the metric \eqref{eq:metricB} studied in the next section, for which we readily write \begin{equation}\label{GBB} G_B(w) = {k/N\over w-1} + {1-(k/N)\over w+1}. \end{equation} We have verified that indeed, our results \eqref{bh-sym} and \eqref{invariant} in the holomorphic phase, and \eqref{nh-sym-final} and \eqref{G-nh-prefinal} in the non-holomorphic phase, reproduce all the analytic results reported in Section \ref{sec:model B}. As was mentioned in the Introduction, in this paper we focus on invertible metrics ${\cal M}{B}$. That is, we only discuss in this paper such densities $\rho_B(\mu)$ which {\em vanish} in some neighborhood containing $\mu=0$. As a non-trivial example of such a {\em continuous} density, which is a simple generalization of \eqref{eq:metricB}, consider a metric whose positive and negative eigenvalues follow flat distributions along the positive and negative axis, namely, \begin{equation}\label{flat} \rho_B(\mu) = \left\{ \begin{array}{c} {1\over L_+ + L_-} \quad -\mu_1 < \mu <-\mu_1 + L_-\\ \hspace{-0.3cm}{1\over L_+ + L_-} \quad\quad \mu_2-L_+ <\mu<\mu_2 \end{array}\right. \end{equation} for some $\mu_1>L_- >0$ and $\mu_2>L_+>0$. For this $\rho_B(\mu)$ we obtain \begin{eqnarray}\label{Gflat} G_B(w) &=& {1\over L_+ + L_-}\left(\int\limits_{-\mu_1}^{-\mu_1+L_-} {\dd\mu\over w-\mu} + \int\limits_{\mu_2-L_+}^{\mu_2} {\dd\mu\over w-\mu}\right)\nonumber\\ &=& {1\over L_+ + L_-}\log\left({w+\mu_1\over w+\mu_1-L_-}\cdot{w-\mu_2 + L_+\over w -\mu_2}\right), \end{eqnarray} where the logarithms are defined in the cut plane, with a cut emanating from each branch point and running along the real axis in the negative direction. With this assignment of the cuts, the imaginary part of \eqref{Gflat} will have the correct discontinuity as in \eqref{discontinuity} along the support of \eqref{flat}. Substituting \eqref{Gflat} in \eqref{bh-sym},\eqref{invariant},\eqref{nh-sym-final} and \eqref{G-nh-prefinal} will clearly produce transcendental equations for the relevant quantities, which are not solvable analytically. We shall not pursue this problem any further in this paper. \section{Example: The Density of Eigenvalues for\\ ${\cal M}{B}=\mathrm{diag}(1,\ldots,1,-1,\ldots,-1)$}\label{sec:model B} In this Section we shall demonstrate the general formalism presented in the previous sections by means of a simple (but not too simple) example, corresponding to the indefinite diagonal metric \begin{equation}\label{eq:metricB} {\cal M}{B}=\mathrm{diag}(\underbrace{1,\ldots,1}_{k},\underbrace{-1,\ldots,-1}_{N-k}), \end{equation} with $1<k<N$. Our discussion in this section of the metric \eqref{eq:metricB} will be somewhat telegraphic, avoiding detailed derivation of some of the analytical results and presenting only a limited set of numerical results. We shall dedicate a subsequent paper \cite{FRuniversality} to providing the full details of the relevant analytical derivations, support them by results of ample numerical computations, including numerical demonstration of the statistical universality of this model, which is sensitive in the large-$N$ limit essentially only to the second cumulant \eqref{cumulant} of the random matrix ${\cal M}{A}$. With the limit $N\rightarrow \infty$ in mind, let us define the fraction of the +1's on the diagonal of ${\cal M}{B}$ as \begin{equation}\label{eq:lambda} \lambda=\frac{k}{N}. \end{equation} From the general solution \eqref{eq:A} of the intertwining relation \eqref{intertwining}, and from the evenness symmetry of \eqref{eq:GUE}, we can see that the model has the obvious symmetry \begin{equation}\label{eq:symB} \lambda \mapsto 1-\lambda. \end{equation} \subsection{The Holomorphic Phase, $a = 0$}\label{Bhol} For the particular choice of metric ${\cal M}{B}$ given in \eqref{eq:metricB}, the holomorphic gap equation \eqref{bh} reduces to the cubic equation \begin{equation}\label{eq:cubic} m^2 b + \frac{\lambda}{b+w}+\frac{1-\lambda}{b-w}=0, \end{equation} where according to \eqref{bhasympt}, we must pick that root of \eqref{eq:cubic} which behaves asymptotically as \begin{equation} b(w)\sim \frac{1-2\lambda}{m^2 w},\qquad (w\rightarrow \infty). \end{equation} We can rewrite \eqref{eq:cubic} as \begin{equation} m^2b^3+(1-m^2w^2)b+w(1-2\lambda)=0. \label{eq:cubic2} \end{equation} Let us evaluate this cubic equation for $w=x+i0+$ with $x\in\mathbb{R}$, i.e.~when $w$ approaches the real axis from above. Then for fixed $x$, the coefficients of the cubic equation \eqref{eq:cubic2} are real and its three possible solutions for $b$ are either all real or one of them is real and the other two come as a complex conjugated pair, depending on the sign of the discriminant $-\Delta/(27m^4),$ where \begin{align} \Delta&=\Delta(x)=\xi^2+4\cdot 27 m^6(1-m^2 x^2)^3,\nonumber\\ \xi&=\xi(x)=-27 m^4 (1-2\lambda)x.\label{eq:Deltaxi} \end{align} We see from \eqref{eq:Deltaxi} that there are three real roots when $|x|$ is large. Furthermore, $\Delta(x)$ changes its sign at $x=\pm x_0,$ where \begin{equation} x_0= \Bigg( \tfrac{3|1-2\lambda|^{2/3}\,\big[\,\big(1-2\sqrt{\lambda(1- \lambda)} \big)^{1/3}+\big(1+2\sqrt{\lambda(1- \lambda)} \big)^{1/3}\,\big]+2}{2m^2}\Bigg)^{\!{}_{1/2}}. \label{eq:endpoints}\\ \end{equation} We thus conclude that along the real axis \eqref{eq:cubic2} has one real and a pair of complex conjugate solutions for $b(x+i0+)$ when $x\in [-x_0,x_0],$ and three real solutions otherwise. For the particular metric \eqref{eq:metricB}, the general expression \eqref{Ghol} for the Green's function in the holomorphic phase yields \begin{equation}\label{GholB} G(w) = {\lambda\over b+w} - {1-\lambda\over b-w}. \end{equation} By substituting the appropriate root of \eqref{eq:cubic} in \eqref{GholB}, we can obtain the average density $\rho^{(1)}(x)$ of real eigenvalues of ${\cal M}{\phi}$ from the discontinuity of this function across its cut along the real axis according to \eqref{discontinuity1} in the large $N$ limit. After a tedious but straightforward calculation, we find that $\rho^{(1)}(x)$ is supported along the interval $[-x_0,x_0]$ where it is given by \begin{align}\label{eq:rhoreal} \rho^{(1)}(x)&=\frac{1}{2\pi} \lim_{\epsilon\rightarrow 0+} \IM \Big[G(x- \mathrm i \epsilon)-G(x + \mathrm i \epsilon)\Big]\nonumber\\ &=\sign(1-2\lambda) \, \frac{\left|\xi-\sqrt{\Delta} \right|^{2/3} - \left|\xi+\sqrt{\Delta} \right|^{2/3}}{\sqrt{3} \cdot 2^{2/3}\cdot 6\pi m^2 x}, \qquad |x|<x_0, \end{align} where $\Delta$ and $\xi$ have been defined in \eqref{eq:Deltaxi} and $x_0$ in \eqref{eq:endpoints}. \begin{figure} \begin{center} \includegraphics[width=\textwidth]{plot_real_hist_new.pdf} \end{center} \caption{Normalized histograms of real eigenvalues obtained from numerical simulation of 2000 samples of size $N=1024$. Different colors represent different values of $\lambda$: $1/1024, 1/8, 1/4, 3/8, 7/16, 63/128$ (in order of decreasing density). The solid black lines show the corresponding large-$N$ theoretical predictions for $\rho^{(1)}(x)$ given by \eqref{eq:rhoreal}.}\label{fig:rhoreal} \end{figure} In particular, at the center of the band of real eigenvalues the density is given by \begin{equation} \lim_{x\rightarrow 0}\rho^{(1)}(x)=\frac{m|1-2\lambda|}{\pi}. \end{equation} In Fig.~\ref{fig:rhoreal} we show normalized histograms obtained from numerically generated samples for various values of $\lambda$. For each value of $\lambda$, we have used 2000 samples of matrix size $N=1024$. The histograms fit well with the solid black lines from the corresponding theoretical limits $N\rightarrow\infty$ given by Eq.~\eqref{eq:rhoreal}. A small deviation due to finite $N$ effect can be seen only in the histogram in magenta showing the result for $\lambda=63/128$, which is close to the degenerate case $\lambda = 1/2$, for which the theoretical density \eqref{eq:rhoreal} predicts that $\rho^{(1)}(x)\equiv 0$. As $\lambda$ decreases from $1/2$, the density of real eigenvalues increases. The blue histogram corresponds to having $\lambda$ close to zero. For $\lambda=0$ we obtain of course Wigner's semi-circular distribution, because then ${\cal M}{\phi}={\cal M}{A}$, which has been drawn from the GUE. According to \eqref{asymptotic}, the fractions of all real and all complex eigenvalues sum up to one. Integrating $\rho^{(1)}(x)$ yields the fraction $1-\nu$ of real eigenvalues as a function of $\lambda$, in accordance with \eqref{fractions}. Carrying out this integral explicitly is a rather difficult task, which we can avoid by the much easier calculation of the complementary fraction of complex eigenvalues in \eqref{eq:fracnonhol} in the next section \ref{Bnh}. Thus, we find that the fraction of real eigenvalues is \begin{equation} \label{eq:vshaped} 1-\nu=\int_{-x_0}^{x_0} \rho^{(1)}(x) \dd x= |1-2\lambda|, \end{equation} \begin{figure} \begin{center} \includegraphics[width=\textwidth]{fraction_real_ev2.pdf} \end{center} \caption{Fraction of real eigenvalues as a function of $\lambda$. Solid black line shows the theoretical large $N$ prediction given by \eqref{eq:vshaped}, while the dots represent numerical simulations with $N=128$ averaged over 500000 samples (red), $N=1024$ using 5000 samples (blue) and $N=8192$ using 10 samples (1000 samples for the inset) (green). Inset: Magnification near $\lambda=1/2$. }\label{fig:vshaped} \end{figure} which is consistent with the symmetry \eqref{eq:symB} of the model. In Fig.~\ref{fig:vshaped} this result has been compared with numerical simulations for matrix sizes $N=128$, $N=1024$ and $N=8192$ averaged over many samples. For $\lambda$ away from $1/2$ the convergence is exponentially fast. Near $1/2$, we can see a small deviation for finite $N$. The theoretical large $N$ prediction, actually is a lower bound for the number of real eigenvalues, even for finite $N$ and for each sample. This follows from a special case of a purely algebraic theorem \cite{carlson}. \subsection{The Non-Holomorphic Phase, $a\neq 0$}\label{Bnh} In this phase $a(w,w^*)=i\alpha(w,w^*)$ and $b(w,w^*) = i\beta(w,w^*)$ are pure imaginary. By substituting the metric ${\cal M}{B}$ given by \eqref{eq:metricB} in the gap equations \eqref{ab-nh}, or equivalently \eqref{ab-nh-real}, we thus obtain \begin{eqnarray}\label{ab-nh-real-B} {1\over m^2} \left[ {\lambda\over \alpha^2 + |i\beta + w|^2} + {1-\lambda\over \alpha^2 + |i\beta - w|^2}\right] &=& 1 \nonumber\\{}\nonumber\\ {\lambda\over \alpha^2 + |i\beta + w|^2} - {1-\lambda\over \alpha^2 + |i\beta - w|^2} &=& 0, \end{eqnarray} or equivalently \begin{eqnarray}\label{ab-nh-real-B1} \alpha^2 + |i\beta + w|^2 &=& {2\lambda\over m^2} \nonumber\\{}\nonumber\\ \alpha^2 + |i\beta - w|^2 &=& {2(1-\lambda)\over m^2}. \end{eqnarray} Subtraction of these two equations yields a linear equation for $\beta$ from which we determine \begin{equation}\label{beta-B} \beta = {2\lambda-1\over 2m^2 y}, \end{equation} where we substituted $w=x+iy$. Finally, feeding \eqref{beta-B} back in \eqref{ab-nh-real-B1} we determine \begin{equation}\label{alpha-B} \alpha^2 = {1\over m^2} - \left[x^2 + y^2 + \left({2\lambda-1\over 2m^2y}\right)^2\right]\geq 0. \end{equation} \begin{figure}[b!] \begin{center} \includegraphics[width=0.495\textwidth]{plot_scatter_GUE_N128k16.pdf}\hfill\includegraphics[width=0.495\textwidth]{plot_scatter_GUE_N128k32.pdf} \includegraphics[width=0.495\textwidth]{plot_scatter_GUE_N128k48.pdf}\hfill\includegraphics[width=0.495\textwidth]{plot_scatter_GUE_N128k64.pdf} \end{center} \caption{Scatter plots showing the spectrum of $\phi$ for various values of $\lambda$, collected from 64 samples of matrix size $N=128$. Complex eigenvalues are marked in blue, real ones in red. Solid black lines follow the theoretical $N\rightarrow\infty$ prediction of the phase boundary line in Eq.~\eqref{eq:rpm}. Here $\lambda=1/8,1/4,3/8,1/2$ (upper left to lower right) }\label{fig:nonholomorphicN128} \end{figure} According to \eqref{boundary}, the boundary line between the holomorphic and non-holomorphic phases is the curve along which \eqref{alpha-B} vanishes, which is conveniently represented in polar coordinates $x=r\cos\theta, y=r\sin\theta$ by \begin{equation}\label{boundary-B} r^4\sin^2\theta - {r^2\sin^2\theta\over m^2} + \left({\sin\theta_0\over 2m^2}\right)^2=0 \end{equation} where $\sin\theta_0 = |2\lambda-1|$. This curve is made of two closed loops, one in the upper half-plane, and its mirror image with respect to the real axis in the lower half-plane. Each loop is made of two arcs (the roots of \eqref{boundary-B}) \begin{equation}\label{eq:rpm} r_\pm(\theta)=\frac{1}{\sqrt{2}m}\left( 1\pm \sqrt{1-\left( \frac{\sin \theta_0}{\sin \theta } \right)^2} \right)^{1/2}\!\!\!\!\!\!\!\!, \end{equation} where $\sin^2\theta\ge \sin^2 \theta_0$. $r_+$ is the part of the boundary farther from the origin, and $r_-$ the closer one. The two arcs are sewn together at $\sin^2\theta = \sin^2\theta_0$ to make the loops. These two loops enclose two two-dimensional blobs which comprise the domain ${\mathcal D}$ of the non-holomorphic phase that contains the condensed pairs of complex conjugate eigenvalues of ${\cal M}{\phi}$ in the large-$N$ limit. The particular metric \eqref{eq:metricB} has the special property that ${\cal M}{B}^2=\mathbb{1}_N$, which upon substitution in \eqref{Green-nh-final} and use of the first gap equation in \eqref{ab-nh-real-B}, leads to the particularly simple non-holomorphic Green's function \begin{equation}\label{G-nhol-B} G(w,w^*) = m^2w^*, \end{equation} valid throughout ${\mathcal D}$. At the phase boundary line \eqref{eq:rpm} the non-holomorphic Green's function \eqref{G-nhol-B} has to cross-over continuously to the holomorphic Green's function \eqref{GholB}. Note in passing that \eqref{G-nhol-B} implies $wG(w,w^*) = m^2w^*w$. By comparing this with \eqref{G-nh-prefinal} we thus conclude that $\alpha^2 + \beta^2 = \frac{1}{m^2} - x^2-y^2$, which is consistent with \eqref{alpha-B}. By applying Gauss' law to \eqref{G-nhol-B}, as in \eqref{total-density}, we see that the density of complex eigenvalues \begin{equation}\label{eq:rhoC} \rho^{(2)}(x,y)=\frac{1}{\pi}\frac{\partial}{\partial w^*}G(w,w^*)=\frac{m^2}{\pi}, \end{equation} is uniform in ${\mathcal D}$, and also independent of $\lambda$. The area of the two blobs of ${\mathcal D}$, enclosed by the two loops \eqref{eq:rpm}, is given by \begin{equation}\label{eq:area} 2 \int_{r_-}^{r_+} \int_{\theta_0-\pi}^{2\pi-\theta_0} r \dd r \dd \theta= \int_{\theta_0-\pi}^{2\pi-\theta_0} \left(r_+^2(\theta)-r_-^2(\theta)\right)\dd \theta=\frac{(1-|1-2\lambda|)\pi}{m^2}. \end{equation} By multiplying this area and the density \eqref{eq:rhoC}, we find that the fraction $\nu$ of complex eigenvalue is given by \begin{equation}\label{eq:fracnonhol} \nu=1-|1-2\lambda| \end{equation} \begin{figure}[b!] \begin{center} \includegraphics[width=0.495\textwidth]{plot_scatter_GUE_N8192k1024.pdf}\hfill\includegraphics[width=0.495\textwidth]{plot_scatter_GUE_N8192k2048.pdf} \includegraphics[width=0.495\textwidth]{plot_scatter_GUE_N8192k3072.pdf}\hfill\includegraphics[width=0.495\textwidth]{plot_scatter_GUE_N8192k4096.pdf} \end{center} \caption{Scatter plots showing the spectrum of ${\cal M}{\phi}$ from one sample. Complex eigenvalues are marked in blue, real ones in red. $N=8192$, $\lambda=1/8,1/4,3/8,1/2$ (upper left to lower right) }\label{fig:nonholomorphic} \end{figure} The scatter plots of complex eigenvalues in Figs.~\ref{fig:nonholomorphicN128} and \ref{fig:nonholomorphic} illustrate numerically the results for various values of $\lambda$. The blue dots correspond to complex eigenvalues of ${\cal M}{\phi}$ and the red dots correspond to real eigenvalues. In Fig.~\ref{fig:nonholomorphicN128} we used 64 samples of matrix size $N=128$. Fig.~\ref{fig:nonholomorphic}, on the other hand, was obtained from a single sample of matrix size $N=8192$. That a single large sample is enough to represent reliably the averaged density is the result of the self-averaging phenomenon, typical of the eigenvalue density of large random matrices. It demonstrates very well how uniformly the eigenvalues are distributed in the domain ${\mathcal D}$. The solid black lines in both figures represent the theoretical boundaries given in Eq.~\eqref{eq:rpm}. Finite-$N$ corrections are pronounced in Fig.~\ref{fig:nonholomorphicN128} as one can clearly see complex eigenvalues outside of the theoretical domain $\mathcal{D}$. In contrast, for $N=8192$ in Fig.~\ref{fig:nonholomorphic}, one can hardly see any outliers. Scatter plots for $N=32786$ can be found in \cite{FR-review}. On the lower right plot in Fig.~\ref{fig:nonholomorphicN128} and \ref{fig:nonholomorphic}, we see the degenerate case $\lambda=1/2$, for which the theoretical large-$N$ prediction \eqref{eq:rhoreal} (see also \eqref{eq:vshaped}) gives null density of real eigenvalues. Finite-$N$ corrections for $\lambda=1/2$ will result in small amounts of real eigenvalues, as is demonstrated very well by the corresponding plates in Figs.~\ref{fig:nonholomorphicN128} and \ref{fig:nonholomorphic}, and in accordance with Fig.~\ref{fig:vshaped}. In all other plots in Figs.~\ref{fig:nonholomorphicN128} and \ref{fig:nonholomorphic} we see pronounced distributions of real eigenvalues, with the red dots appearing to form a continuous line. This is so because they are very dense as there are $|N-2k|=N|1-2\lambda|$ real eigenvalues packed in the finite segment $[-x_0,x_0]$. For fixed $\lambda$, the typical distance between eigenvalues on the real lines is of order $N^{-1}$ while the mean distance between nearest neighbors of complex eigenvalues in the bulk is of order $N^{-1/2}$. For each sample, the eigenvalue distribution is symmetric with respect to the real axis. This is due to the fact that the characteristic polynomial of $\det(z-{\cal M}{\phi})$ has real coefficients and the complex eigenvalues appear in conjugate pairs. It is a manifestation of (broken) PT symmetry. The eigenvalue distribution has an additional reflection symmetry with respect to the imaginary axis, but only after averaging over all samples, because due to \eqref{eq:GUE} (or \eqref{ensemble}), ${\cal M}{\phi}$ and $-{\cal M}{\phi}$ are equi-probable. As was mentioned above (following \eqref{eq:fracnonhol}), at $N=8192$ we can already see in Fig.~\ref{fig:nonholomorphic} that the complex eigenvalues are spread quite uniformly across the blobs, which agrees with our finding in \eqref{eq:rhoC} that the theoretical density there is constant. In Fig.~4 of \cite{FR-review} one can see two dimensional histograms which show that the density is very flat in the bulk. Only at the edges of those histograms one can notice some deviation from the constant density which is a typical finite $N$ size effect, that appears also in the Ginibre ensemble or in normal matrix models \cite{AKM,LR}. From \eqref{eq:rpm} we find that the distance between the complex domain and the real axis (on both sides) is \begin{equation} r_-(\pi/2) = m^{-1} \sin(\theta_0/2). \end{equation} Thus, the two blobs kiss and touch the real axis when $\lambda$ approaches $1/2$. The latter is the degenerate case which we have mentioned above, and in which the complex eigenvalues fill uniformly a disk, like in the (real) Ginibre ensemble. This is of course the case $\tr{\cal M}{B}=0$ alluded to in \eqref{zerobh}, with $b\equiv0$ and $G(w) = 1/w$ throughout the holomorphic region $r>1/m$. \subsection{The Non-Compact Algebras $su(k,N-k)$ and $so(k,N-k)$, and Pseudo- and Anti-Pseudo-Hermiticity} The metric \eqref{eq:metricB} is of special importance, because it appears in the definition of the non-compact Lie groups $U(k,N-k)$ and $O(k,N-k)$. By definition, the group $U(k,N-k)$ preserves the inner product ${\cal M}{u}^\dagger {\cal M}{B} {\cal M}{v}$ of vectors ${\cal M}{u},{\cal M}{v}\in \mathbb{C}^N$, that is, \begin{equation}\label{U} {\cal M}{g}^\dagger {\cal M}{B} {\cal M}{g} = {\cal M}{B},\quad \forall {\cal M}{g}\in U(k,N-k). \end{equation} Upon expressing \begin{equation}\label{UAlgebra} {\cal M}{g} = e^{i{\cal M}{\phi}} \end{equation} in terms of elements ${\cal M}{\phi}$ of the Lie algebra $u(k,N-k)$, we can rewrite \eqref{U} as \begin{equation}\label{U1} e^{-i{\cal M}{\phi}^\dagger} {\cal M}{B} e^{i{\cal M}{\phi}} = {\cal M}{B}, \end{equation} which is equivalent to the intertwining relation \eqref{intertwining} ${\cal M}{\phi}^\dagger{\cal M}{B} = {\cal M}{B}{\cal M}{\phi}$. Thus, the PH random matrix ensemble studied in this section is in effect an ensemble of elements of $u(k,N-k)$ in the large-$N, k$ limit, with fixed finite $\lambda = k/N$. In explicit terms, one can easily check that the matrices ${\cal M}{\phi}$ which solve this intertwining relation are the {\em direct sum} of block-diagonal hermitian matrices and block-off-diagonal anti-hermitian matrices. The hermitian ones have diagonal blocks of dimensions $k\times k$ and $(N-k)\times (N-k)$, which generate compact $U(k)\otimes U(N-k)$ rotations within the two invariant subspaces. Their eigenvalues are purely real, of course. The anti-hermitian matrices have rectangular blocks of dimensions $k\times (N-k)$ and $(N-k)\times k$, with imaginary eigenvalues. They generate non-compact transformations (complexified boosts), which mix the two sub-spaces. In addition, due to their ``chiral" off-diagonal rectangular structure, they also possess at least $|N-2k|$ ``kinematical" zero modes which are typical of rectangular matrices. In ``physical" terms, think of the subspace orthogonal to such a complexified boost, which remains invariant. In other words, the corresponding boost generator annihilates these vectors. The full matrices ${\cal M}{\phi}$, which dominate the ensemble and whose spectra was discussed in Sections \ref{Bhol} and \ref{Bnh}, are the direct sum of the hermitian compact generators and anti-hermitian non-compact generators. Thus, in essence, the formalism presented in this paper solves this non-trivial addition problem of the direct sum of block-diagonal hermitian random matrices and block-off-diagonal antihermitian random matrices. The random variable $t=\frac{1}{N}\tr{\cal M}{\phi} = \frac{1}{N}\tr {\cal M}{AB}$, which is a weighted sum of the Gaussian variables in \eqref{eq:GUE}, follows itself the Gaussian distribution \begin{equation}\label{gaussian-trace} p_N(t) = {Nm\over\sqrt{2\pi u}} e^{-{N^2m^2\over 2u}t^2},\quad u = \frac{1}{N} \tr {\cal M}{B}^2. \end{equation} Therefore (assuming a finite limit for $u$), \begin{equation}\label{large-N} \lim_{N\to\infty} p_N(t) = \delta(t), \end{equation} and $t$ becomes deterministically zero in the large-$N$ limit. Thus, more precisely, in this limit, our PH random matrix model is effectively an ensemble of the traceless part of $u(k,N-k)$, and our results in this section describe the spectral properties of elements of the Lie algebra $su(k,N-k)$ in the large-$N,k$ limit. The cases $k=0$ and $k=N$, that is ${\cal M}{B} = \pm\mathbb{1},$ correspond to ${\cal M}{\phi}$ being a GUE matrix. Indeed, GUE can be thought of as an ensemble of elements of randomly chosen generators of the algebra $su(N)$. In a similar manner, by definition, the group $O(k,N-k)$ preserves the inner product ${\cal M}{u}^T {\cal M}{B} {\cal M}{v}$ of vectors ${\cal M}{u},{\cal M}{v}\in \mathbb{R}^N$, that is, \begin{equation}\label{O} {\cal M}{g}^T {\cal M}{B} {\cal M}{g} = {\cal M}{B},\quad \forall {\cal M}{g}\in O(k,N-k). \end{equation} Let us focus on the subgroup $SO(k,N-k)$ of $O(k,N-k)$. Upon expressing \begin{equation}\label{OAlgebra} {\cal M}{g} = e^{{\cal M}{\phi}} \end{equation} in terms of a real matrix ${\cal M}{\phi}$, an element of the Lie algebra $so(k,N-k)$, we can rewrite \eqref{O} as \begin{equation}\label{U2} e^{{\cal M}{\phi}^T} {\cal M}{B} e^{{\cal M}{\phi}} = {\cal M}{B}, \end{equation} which is equivalent to the intertwining relation \begin{equation}\label{APS} {\cal M}{\phi}^T{\cal M}{B} =- {\cal M}{B}{\cal M}{\phi}, \end{equation} meaning that ${\cal M}{\phi}$ is anti-pseudosymmetric (APS) with respect to ${\cal M}{B}$. Similarly to the $su(k,N-k)$ case discussed above, one can easily check that such APS matrices ${\cal M}{\phi}$ are the direct sum of block-diagonal real antisymmetric matrices and block-off-diagonal real symmetric matrices. The antisymmetric ones have diagonal blocks of dimensions $k\times k$ and $(N-k)\times (N-k)$, which generate compact $SO(k)\otimes SO(N-k)$ rotations within the two invariant subspaces. Their eigenvalues are purely imaginary, of course. The real symmetric matrices have rectangular blocks of dimensions $k\times (N-k)$ and $(N-k)\times k$, with real eigenvalues. They generate non-compact transformations (boosts), which mix the two sub-spaces. In addition, due to their ``chiral" off-diagonal rectangular structure, they also possess at least $|N-2k|$ ``kinematical" zero modes, because boosts do not affect directions perpendicular to them. The full matrices ${\cal M}{\phi}$, which dominate the ensemble, are the direct sum the antisymmetric compact generators and real symmetric non-compact generators. If ${\cal M}{\phi}$ is APS, the pure imaginary matrix $i{\cal M}{\phi}$ is PH and satisfies the intertwining relation \eqref{intertwining}. In \cite{FRuniversality} we shall bring strong numerical evidence in support of universality of our results for the spectral density of the ensemble of PH matrices discussed in this section. In particular, we shall demonstrate that replacing the GUE ensemble \eqref{eq:GUE} with a properly rescaled GOE ensemble, that is, taking the matrices ${\cal M}{A}$ to be random real symmetric matrices, does not affect the large-$N$ results for the eigenvalue density of the real matrices ${\cal M}{\phi}={\cal M}{A}{\cal M}{B}$. In this case, ${\cal M}{\phi}^T{\cal M}{B} = {\cal M}{B}{\cal M}{\phi}$ are pseudo-symmetric with respect to ${\cal M}{B}$. Arguing along the lines of universality of the average spectra of real and complex PH hermitian matrices ${\cal M}{\phi}$ in the large-$N$ limit, we should expect similar universality in the spectra of anti-PH real and complex matrices as well. Any complex anti-PH matrix can be written as $i{\cal M}{\phi}$, with ${\cal M}{\phi}$ a complex PH matrix. Thus the large-$N$ spectrum of complex anti-PH matrices is given by our results for PH matrices, rotated by $90$ degrees in the complex plane. Spectral universality thus tells us that the average spectrum of randomly chosen generators of $so(k,N-k)$ in the large-$N,k$ limit should be just the spectrum obtained in this section, rotated by $90$ degrees in the complex plane. \section{Discussion} In this paper we have introduced a family of pseudo-hermitian random matrices as a new concept in random matrix theory. The conceptual novelty in these models is that PH matrices are hermitian with respect to a given {\em indefinite} metric. Major applications of pseudo-hermiticity include (and is certainly not limited to) the studying $PT$-symmetric quantum mechanical systems in the phase of broken $PT$-symmetry, as well as their classical gain-loss balanced analogs. Thus, in the usual spirit of Random Matrix Theory \cite{Mehta}, randomness of the PH matrices discussed in the present paper can model complicated or chaotic systems, or systems which are disordered to begin with. We shall study such applications of PH random matrix theory in future publications. In this paper we have applied the diagrammatic method to derive the self-consistent gap equations in the planar limit, from which we determined the phase structure of the model in the complex plane. In particular, we have derived analytical expressions for the average Green's function of the model in the holomorphic and non-holomorphic phases as functions of the indefinite metric, which can be used to determine the average density of eigenvalues of such matrices both on the real axis and in the complex plane. As a concrete example, we have applied our formalism to studying a family of PH random matrix models for the generators of the classical non-compact Lie algebra $su(k,N-k)$ in the large-$N,k$ limit, with finite $\lambda = k/N$. We have calculated explicitly their average density of eigenvalues on the real axis and in the complex plane. We have also carried meticulous numerical analysis of these matrices, part of which was presented here. The numerical results agree very well with our analytical predictions. More analytical and numerical details pertaining to this model will be given in a forthcoming paper \cite{FRuniversality}, which will also demonstrate universality of our results for the density of eigenvalues. A preview of the main idea and results of this paper was published in \cite{FR-review}, which also reviewed our results on quasi-hermitian random matrices and their application to the vibrational spectra of mechanical systems with large connectivity \cite{FRDecember, MK}, as well as analytical and numerical results pertaining to yet another PH random matrix model with very rich and interesting phase structure \cite{FR-Tmodel}. The results presented here and in \cite{FRDecember, MK, FR-review} are just the tip of the iceberg. Quasi- and pseudo-hermitian random matrices are clearly a promising new direction in the vast ocean of Random Matrix Theory. \newpage \setcounter{equation}{0} \setcounter{section}{0} \renewcommand{\arabic{section}.\arabic{equation}}{A.\arabic{equation}} \renewcommand{\thesection}{Appendix} \section{Technical and Mathematical Details}\label{appendix} \vskip 5mm \setcounter{section}{0} \renewcommand{\thesection}{A} \subsection{Symmetries of the spectrum of ${\cal M}{H}$ in \eqref{H2N}}\label{symmetries} One can deduce the symmetries of the spectrum of ${\cal M}{H}$ in \eqref{H2N} in the complex plane and its relation to the spectrum of the PH matrix ${\cal M}{\phi}$ by analyzing the eigenproblem \begin{equation}\label{eigen} {\cal M}{H}\psi = z\psi, \end{equation} directly, or alternatively, by studying the properties of the resolvent \eqref{resolvent}. Here we shall opt for the latter. Recall that ${\cal M}{\phi} = {\cal M}{AB}$ and ${\cal M}{\phi}^\dagger = {\cal M}{BA}$ are isospectral by virtue of \eqref{intertwining}, implying equality of the traces of the two diagonal blocks in \eqref{resolvent}, which we repeat here for convenience: \begin{equation}\label{resolvent-appendix} \frac{1}{z-{\cal M}{H}}=\left(\begin{array}{cc} \frac{z}{z^2-{\cal M}{A}{\cal M}{B}}& {\cal M}{A}\frac{1}{z^2-{\cal M}{B}{\cal M}{A}}\\ {\cal M}{B}\frac{1}{z^2-{\cal M}{A}{\cal M}{B}}& \frac{z}{z^2-{\cal M}{B}{\cal M}{A}} \end{array}\right). \end{equation} Thus, \begin{equation}\label{traces} \tr_{(2N)} {1\over z-{\cal M}{H}} = \tr_{(N)} {2z\over z^2-{\cal M}{\phi}} = \sum_{i=1}^N \left({1\over z-\sqrt{w_i}} + {1\over z+\sqrt{w_i}}\right)\,. \end{equation} We see that each eigenvalue $w_i$ of ${\cal M}{\phi}$ leads to a pair of eigenvalues $\pm\sqrt{w_i}$ of ${\cal M}{H}$. Moreover, as was mentioned in the Introduction, isospectrality of ${\cal M}{\phi}$ and ${\cal M}{\phi}^\dagger$ also means that their complex eigenvalues come in complex conjugate pairs. Thus, if $\Im w_i\neq 0$, then $w_i^*$ is also an eigenvalue of ${\cal M}{\phi}$ (distinct from $w_i$), and therefore $\pm\sqrt{w_i^*}$ are eigenvalues of ${\cal M}{H}$ as well. Therefore, while the PH nature of ${\cal M}{\phi}$ renders its spectrum symmetric under reflection with respect to the real axis, the spectrum of ${\cal M}{H}$ has four-fold reflection symmetry, with respect to both the real and imaginary axes. Another way to deduce this symmetry, without resorting directly to the spectral properties of ${\cal M}{\phi}$, is to depart from the chiral block structure of \eqref{H2N} which implies \begin{equation}\label{anticommutaiton} \{{\cal M}{H},{\cal M}{\Gamma\}} = 0\,, \end{equation} where \begin{equation}\label{chiral} {\cal M}{\Gamma} = {\cal M}{1}_N\otimes\sigma_3 = \left(\begin{array}{cc} {\cal M}{1}_N& 0\\ 0& -{\cal M}{1}_N \end{array}\right), \end{equation} is the chirality matrix. Thus, if $\psi$ is a (right) eigenvector of ${\cal M}{H}$ with eigenvalue $z$, then ${\cal M}{\Gamma}\psi$ is also an eigenvector of ${\cal M}{H}$, with eigenvalue $-z$. This accounts for the reflection symmetry $z\leftrightarrow -z$ of the spectrum of ${\cal M}{H}$ through the origin. Moreover, as can be seen from \eqref{resolvent-appendix}, the LHS of \eqref{traces} is invariant under under interchanging ${\cal M}{A}\leftrightarrow{\cal M}{B}$, which from \eqref{H2N} is equivalent to interchanging ${\cal M}{H}\leftrightarrow{\cal M}{H}^\dagger$. Thus, the spectrum of ${\cal M}{H}$ is invariant under complex conjugation as well, and therefore under reflection with respect to the real axis. In the large-$N$ limit, the eigenvalues of ${\cal M}{H}$ typically become dense in a two-dimensional domain $\widetilde{\mathcal D}$ in the complex plane. More precisely, as it turns out, due to the PH nature of ${\cal M}{\phi}$, the spectral domain of ${\cal M}{H}$ also contains a one-dimensional density component of eigenvalues concentrated in finite segments along the real and imaginary axes, the union of which we denote by $\tilde\sigma$. We have shown here that the domain $\widetilde{\mathcal D}\cup \tilde\sigma$ must have four-fold reflection symmetry with respect to both the real and imaginary axes. \subsection{The Diagonal Blocks of the Resolvent \eqref{eq:G1}}\label{sec:diagonals} In this section we will establish a certain functional relation between the diagonal blocks of the resolvent \eqref{eq:G1}, which hold true for every realization of the random matrix ${\cal M}{A}$, that is, before taking averages. To this end we evaluate \eqref{eq:G1} at $\eta = is$, with $s\in\mathbb{R}$, that is, \begin{equation}\label{G1s} \hat{\mathcal{G}}(is; z, z^*)= \left(\begin{array}{cc} {-is \over s^2 + (z-{\cal M}{H})(z-{\cal M}{H})^\dagger} & (z-{\cal M}{H}) {1\over s^2 + (z-{\cal M}{H})^\dagger (z-{\cal M}{H}) }\\ (z - {\cal M}{H})^\dagger {1\over s^2 + (z-{\cal M}{H})(z-{\cal M}{H})^\dagger} & {-is \over s^2 + (z-{\cal M}{H})^\dagger (z-{\cal M}{H})}\end{array}\right). \end{equation} Let us now substitute ${\cal M}{H}$ from \eqref{H2N} in \eqref{G1s} and start by computing the hermitian and positive definite inverse \begin{eqnarray}\label{inverse1} {1\over s^2 + (z-{\cal M}{H})(z-{\cal M}{H})^\dagger} &=& \left(\begin{array}{cc} s^2 + |z|^2 +{\cal M}{A}^2 & -z{\cal M}{B} - z^*{\cal M}{A}\\ -z^*{\cal M}{B}-z{\cal M}{A} & s^2 + |z|^2 +{\cal M}{B}^2\end{array}\right)^{-1}\nonumber\\{}\nonumber\\&\equiv& \left(\begin{array}{cc} P(s;z,z^*) & Q(s;z,z^*)\\ Q^\dagger(s;z,z^*) & R(s;z,z^*)\end{array}\right) \end{eqnarray} and find the corresponding $N\times N$ blocks as \begin{eqnarray}\label{PQR} P(s;z,z^*) &=& P^\dagger(s;z,z^*) = \left[s^2 + |z|^2 + {\cal M}{A}^2 - (z{\cal M}{B} + z^*{\cal M}{A}){1\over s^2 + |z|^2 + {\cal M}{B}^2}(z^*{\cal M}{B}+z{\cal M}{A} )\right]^{-1}\nonumber\\{}\nonumber\\ R(s;z,z^*) &=& R^\dagger(s;z,z^*) = \left[s^2 + |z|^2 + {\cal M}{B}^2 - (z{\cal M}{A} + z^*{\cal M}{B}){1\over s^2 + |z|^2 + {\cal M}{A}^2}(z^*{\cal M}{A}+z{\cal M}{B} )\right]^{-1}\nonumber\\{}\nonumber\\ Q(s;z,z^*) &=& \nonumber\\ && \hspace{-1.5cm}{1\over s^2 + |z|^2 + {\cal M}{A}^2 - (z{\cal M}{B} + z^*{\cal M}{A}){1\over s^2 + |z|^2 + {\cal M}{B}^2}(z^*{\cal M}{B}+z{\cal M}{A} )}(z{\cal M}{B} + z^*{\cal M}{A}){1\over s^2 + |z|^2 + {\cal M}{B}^2}\,. \end{eqnarray} As should be clear from the structure of the second matrix in \eqref{inverse1}, by interchanging ${\cal M}{A}\leftrightarrow{\cal M}{B}$ we have $P(s;z,z^*)\leftrightarrow R(s;z,z^*)$ and $Q(s;z,z^*)\leftrightarrow Q^\dagger(s;z,z^*)$. (To see that interchanging ${\cal M}{A}$ and ${\cal M}{B}$ in the last expression in \eqref{PQR} has the effect of transforming $Q$ to its adjoint requires a little bit of reshuffling of the various matrix factors.) Similarly, we find \begin{eqnarray}\label{inverse2} {1\over s^2 + (z-{\cal M}{H})^\dagger(z-{\cal M}{H})} &=& \left(\begin{array}{cc} s^2 + |z|^2 +{\cal M}{B}^2 & -z{\cal M}{B} - z^*{\cal M}{A}\\ -z^*{\cal M}{B}-z{\cal M}{A} & s^2 + |z|^2 +{\cal M}{A}^2\end{array}\right)^{-1}\nonumber\\{}\nonumber\\&=& \left(\begin{array}{cc} R(s;z^*,z) & Q^\dagger(s;z^*,z)\\ Q(s;z^*,z) & P(s;z^*,z)\end{array}\right)\,, \end{eqnarray} that is, the result \eqref{inverse1} after simultaneously interchanging $z\leftrightarrow z^*$ and ${\cal M}{A}\leftrightarrow{\cal M}{B}$. By collecting our results from equations \eqref{inverse1}-\eqref{inverse2}, substituting them in \eqref{G1s} and using the definition of the $N\times N$ blocks \eqref{blocks}, we thus conclude that \begin{eqnarray}\label{diagonals} \left(\begin{array}{cc} \hat{\mathcal{G}}_{11}(is;z,z^*) & \hat{\mathcal{G}}_{12}(is;z,z^*) \\ \hat{\mathcal{G}}_{21}(is;z,z^*) & \hat{\mathcal{G}}_{22}(is;z,z^*) \end{array}\right) &=& -is \left(\begin{array}{cc} P(s;z,z^*) & Q(s;z,z^*)\\ Q^\dagger(s;z,z^*) & R(s;z,z^*)\end{array}\right) \nonumber\\{}\nonumber\\ \left(\begin{array}{cc} \hat{\mathcal{G}}_{33}(is;z,z^*) & \hat{\mathcal{G}}_{34}(is;z,z^*) \\ \hat{\mathcal{G}}_{43}(is;z,z^*) & \hat{\mathcal{G}}_{44}(is;z,z^*) \end{array}\right)&=& - is \left(\begin{array}{cc} R(s;z^*,z) & Q^\dagger(s;z^*,z)\\ Q(s;z^*,z) & P(s;z^*,z)\end{array}\right)\,. \end{eqnarray} Upon tracing each $N\times N$ block in these equations, we also obtain the corresponding expressions for the unaveraged block traces \begin{equation}\label{blocktrace-unaverage} \alpha\beta (is;z,z^*) = {1\over N}\tr \hat {\cal G}_{\alpha\beta}(is;z,z^*),\quad \alpha,\beta = 1,2,3,4 \end{equation} (whose averaged versions appear in \eqref{blocktrace}) in terms of traces over $P$, $Q$ and $R$. In particular, the diagonal blocks $ \hat{\mathcal{G}}_{11}, \hat{\mathcal{G}}_{22}, \hat{\mathcal{G}}_{33}$ and $ \hat{\mathcal{G}}_{44}$ are all anti-hermitian $N\times N$ matrices, and are related by \begin{equation}\label{interrelation1} \hat{\mathcal{G}}_{44}(is;z,z^*) = \hat{\mathcal{G}}_{11}(is;z^*,z) \end{equation} and \begin{equation}\label{interrelation2} \hat{\mathcal{G}}_{33}(is;z,z^*) = \hat{\mathcal{G}}_{22}(is;z^*,z), \end{equation} and correspondingly \begin{equation}\label{trace-interrelation1} {44}(is;z,z^*) ={11}(is;z^*,z) \end{equation} and \begin{equation}\label{trace-interrelation2} {33}(is;z,z^*) = {22}(is;z^*,z) \end{equation} for their {\em purely imaginary} traces. The two diagonal blocks of \eqref{G1s} are unitarily equivalent\footnote{This can be seen from their singular value decompositions. Equality of the traces of these two blocks can be also established by expanding each of these blocks in inverse powers of $s^2$ and using cyclicity of the trace.} and therefore have equal traces. As can be seen from \eqref{G1s}, in the limit $s\rightarrow 0$ we have \begin{eqnarray}\label{diagonals0} \lim_{s\to 0\pm}\left(\begin{array}{cc} \hat{\mathcal{G}}_{11}(is;z,z^*) & \hat{\mathcal{G}}_{12}(is;z,z^*) \\ \hat{\mathcal{G}}_{21}(is;z,z^*) & \hat{\mathcal{G}}_{22}(is;z,z^*) \end{array}\right) &=& \mp i\pi \delta\left(\sqrt{(z-{\cal M}{H})(z-{\cal M}{H})^\dagger}\right) \nonumber\\{}\nonumber\\ \lim_{s\to 0\pm}\left(\begin{array}{cc} \hat{\mathcal{G}}_{33}(is;z,z^*) & \hat{\mathcal{G}}_{34}(is;z,z^*) \\ \hat{\mathcal{G}}_{43}(is;z,z^*) & \hat{\mathcal{G}}_{44}(is;z,z^*) \end{array}\right)&=& \mp i\pi\delta\left(\sqrt{(z-{\cal M}{H})^\dagger (z-{\cal M}{H})}\right), \end{eqnarray} (the averaged versions of which appear in \eqref{etas}). We thus obtain \begin{eqnarray}\label{trace-deltas} 11(i0\pm;z,z^*) + 22(i0\pm;z,z^*) &=& \mp i{\pi\over N} \tr \delta\left(\sqrt{(z-{\cal M}{H})(z-{\cal M}{H})^\dagger}\right) \nonumber\\{}\nonumber\\ 33(i0\pm;z,z^*) + 44(i0\pm;z,z^*) &=& \mp i{\pi\over N} \tr \delta\left(\sqrt{(z-{\cal M}{H})^\dagger (z-{\cal M}{H})}\right). \end{eqnarray} As was mentioned above, these two traces are equal, so that \begin{equation}\label{equal-sums} 11(i0\pm;z,z^*) + 22(i0\pm;z,z^*) = 33(i0\pm;z,z^*) + 44(i0\pm;z,z^*) \,. \end{equation} Clearly, the sums of diagonal block traces on the LHS of \eqref{trace-deltas} do not vanish if and only if $z$ is an eigenvalue of ${\cal M}{H}$ (and therefore $z^*$ an eigenvalue of ${\cal M}{H}^\dagger$). Thus, they serve as sort of order parameters indicating the location of the support $\widetilde{\mathcal D}\subset\mathbb{C}$ of the density of eigenvalues of ${\cal M}{H}$ in the large-$N$ limit \cite{FZ}. The discussion in (section 3 of) \cite{FZ} focused on non-hermitian matrices ${\cal M}{H}$ with purely two-dimensional spectral domain ${\widetilde{\mathcal D}}$. For example, if ${\cal M}{H}$ is drawn from Ginibre's ensemble \cite{ginibre}, normalized in the large-$N$ limit to have the unit disk as its spectral domain, then \begin{equation}\label{ginibre} \left\langle i{\pi\over N}\tr \delta\left(\sqrt{(z-{\cal M}{H})^\dagger (z-{\cal M}{H})}\right) \right\rangle =\left\{\begin{array}{c} i \sqrt{1-|z|^2},\quad |z|<1\\ 0,\quad\quad\quad\quad\quad |z|>1\end{array}\right., \end{equation} which should hold true to high precision even before averaging over the ensemble, due to the self-averaging property of large random matrices. Going beyond Ginibre's ensemble to general rotationally invariant ensembles of non-hermitian matrices, the Single Ring Theorem \cite{FZ1} asserts that the spectral domain $\widetilde{\mathcal D}$ of ${\cal M}{H}$ is either a disk or an annulus, and for such models as well, one can compute the diagonal trace on the LHS of \eqref{ginibre} (see Section 4 in \cite{FZ1}) and show that it vanishes only outside $\widetilde{\mathcal D}$. Thus, this diagonal trace indeed fulfills its role as order parameter indicating the location of the two-dimensional spectral domain. However, as was mentioned at the end of Section \ref{symmetries}, the spectral domain of ${\cal M}{H}$ in \eqref{H2N} also contains a one-dimensional eigenvalue density component $\tilde\sigma$, located symmetrically along segments of the real and imaginary axes. We now show that this one-dimensional spectral component has a negligible effect on the order parameter, producing a benign removable discontinuity, invisible in the large-$N$ limit. To get oriented, take as a start ${\cal M}{H}$ to be a {\em hermitian} matrix - the opposite extreme of a Ginibre-type matrix - whose eigenvalues $x_1,\ldots , x_N$ condense in the large-$N$ limit in some finite segment $\tilde\sigma$ along the real axis, with density $\rho^{(1)}(x)$ as in \eqref{rho1}. In this case, it is straightforward to show that \begin{eqnarray}\label{hermitian1} && \left\langle i{\pi\over N}\tr \delta\left(\sqrt{(z-{\cal M}{H})^\dagger (z-{\cal M}{H})}\right) \right\rangle\nonumber\\ &&\qquad =i\pi\int\limits_{\tilde\sigma} \rho^{(1)}(x')\delta\left(\sqrt{(x-x')^2+y^2}\right) \dd x'= \left\{\begin{array}{ll} i\pi \rho^{(1)}(x),& y= 0\\ 0,& y\neq 0.\end{array}\right. \end{eqnarray} As a function of $y$, this diagonal trace is null, except a removable discontinuity at $y=0$, and fails to serve as an order parameter indicating the position of $\tilde\sigma$. This conclusion holds true also in the more generic case, when the spectral domain of ${\cal M}{H}$ is a union of both a one-dimensional part $\tilde\sigma$ and a two-dimensional part $\widetilde{\mathcal D}$. In order to proceed, let us carry a singular value decomposition of the matrix $z-{\cal M}{H}$ \begin{equation}\label{SVD} z-{\cal M}{H} = {\cal M}{U}{\cal M}{\Lambda}{\cal M}{V} \end{equation} where ${\cal M}{U}(z)$ and ${\cal M}{V}(z)$ are unitary $2N\times 2N$ matrices and \begin{equation}\label{Lambda} {\cal M}{\Lambda} = {\rm diag}(\Lambda_1(z), \ldots, \Lambda_{2N}(z)) \end{equation} are the corresponding singular values (all positive, by definition). We shall assume a generic matrix ${\cal M}{H}$, with non-degenerate eigenvalue spectrum $z_1, \ldots z_{2N}$. Let's pick some ordering of these eigenvalues. By appropriate choice of the unitary matrices, we can always order the singular values to follow the ordering of the corresponding eigenvalues. Clearly, ${\rm rank}(z-{\cal M}{H}) = {\rm rank}({\cal M}{\Lambda}(z))$, and therefore when the parameter $z$ hits one of these non-degenerate eigenvalues, only the corresponding singular value would vanish \begin{equation}\label{vanishing1} \lim_{z\to z_k} \Lambda_k(z) = 0. \end{equation} In this case, we immediately see that ${\cal M}{V}^\dagger(z_k)\hat {\bf e}_k$ is an eigenvector on the right of ${\cal M}{H}$, belonging to the eigenvalue $z_k$, and ${\cal M}{U}(z_k)\hat {\bf e}_k$ is the corresponding eigenvector on the left (with $\hat {\bf e}_k$ the $k$th Cartesian unit vector). By substituting \eqref{SVD} in \eqref{trace-deltas}, we see that the two equal diagonal traces on the RHS of \eqref{trace-deltas} \begin{equation}\label{SVDos} {1\over N} \tr \delta\left(\sqrt{(z-{\cal M}{H})^\dagger(z-{\cal M}{H})}\right) = {1\over N} \tr \delta\left(\sqrt{(z-{\cal M}{H})(z-{\cal M}{H})^\dagger}\right) = {1\over N} \sum_{k=1}^{2N} \delta \left(\Lambda_k(z)\right) \end{equation} are in fact the density of {\em singular values} of $z-{\cal M}{H}$ evaluated at zero. Thus, our diagonal traces count the density of null singular values of $z-{\cal M}{H}$ given $z$, and in light of \eqref{vanishing1}, contain information about the density of complex eigenvalues at that point in the complex plane. To make progress, we need to determine how $\Lambda_k(z)$ vanishes as $z\to z_k$. This we can infer by looking at \begin{equation}\label{detH} \det(z-{\cal M}{H}) = \prod_{k=1}^{2N}(z-z_k), \end{equation} and therefore \begin{equation}\label{detLambda} \det\left((z-{\cal M}{H})^\dagger (z-{\cal M}{H})\right) = \prod_{k=1}^{2N} \Lambda^2_k(z) = \prod_{k=1}^{2N}|z-z_k|^2. \end{equation} Thus, by tuning $z = z_k + \epsilon$, where $|\epsilon|\ll$ the smallest gap between the eigenvalues of ${\cal M}{H}$, we immediately conclude that \begin{equation}\label{Lambdak} \Lambda_k(z_k + \epsilon) = c_k |z-z_k| (1+{\mathcal O}(\epsilon)) \end{equation} where the positive coefficient is \begin{equation}\label{ck} c_k = \prod_{\substack{l=1\\ l\neq k}}^{2N} {|z_k-z_l| \over \Lambda_l(z_k)}. \end{equation} By substituting this result in \eqref{SVDos}, we thus conclude that \begin{eqnarray}\label{SVDos1} &&\hspace{-2cm}{1\over N}\tr \delta\left(\sqrt{(z-{\cal M}{H})^\dagger(z-{\cal M}{H})}\right) = {1\over N}\sum_{k=1}^{2N} {1\over c_k} \delta (|z-z_k|) = {1\over N}\!\!\!\!\sum_{\substack{\rm complex\\ \rm eigenvalues}} {1\over c_k} \delta (|z-z_k|) + \nonumber\\{}\nonumber\\ &+&\!\!\!\!\!\!\!\!\!\! {1\over N}\!\!\!\!\!\!\sum_{\substack{\rm real\\ \rm eigenvalues}} {1\over c_k} \delta \left(\sqrt{(x-x_k)^2 + y^2}\right) + {1\over N}\sum_{\substack{\rm imaginary\\ \rm eigenvalues}} {1\over c_k} \delta \left(\sqrt{x^2 + (y-y_k)^2}\right) \end{eqnarray} When we set, for example, $y\neq 0$ and go off the real axis, purely real eigenvalues make no contribution to the trace, while for $y=0$, in the large-$N$ limit, they only give rise to a removable discontinuity, because then their contribution converges to a smooth function, as in \eqref{hermitian1}. Obviously, a similar conclusion holds for the purely imaginary component in $\tilde\sigma$. Finally, note that for ${\cal M}{H}$ a normal matrix, and in particular, a hermitian matrix, clearly $\Lambda_k(z) = |z-z_k|$, and therefore $c_k=1 \,\forall k$, which is consistent in the large-$N$ limit with \eqref{hermitian1}. Thus, to summarize the discussion of the few previous paragraphs, the sums of diagonal block traces on the LHS of \eqref{trace-deltas} serve as an order parameters indicating the location of the {\em two-dimensional} support $\widetilde{\mathcal D}\subset\mathbb{C}$ of the density of eigenvalues of ${\cal M}{H}$ in the large-$N$ limit, and are effectively insensitive to the one-dimensional part $\tilde\sigma$ of the spectral domain. A corollary of this assertion is that both these sums {\em must} vanish (modulo the removable discontinuity along $\tilde\sigma$) outside $\widetilde{\mathcal D}$, that is, in the complementary domain $\widetilde{\mathcal D}^c = \mathbb{C}/\widetilde{\mathcal D}$. All the ${\alpha\alpha}(is=0; z,z^*)$'s in \eqref{trace-deltas} are of the same sign (depending on whether $s\rightarrow 0+$ or $0-$). Therefore, vanishing of such a sum implies vanishing of each of its terms separately. We conclude that all four ${\alpha\alpha}(is=0; z,z^*)$ must vanish in $\widetilde{\mathcal D}^c$. The complementary domain $\widetilde{\mathcal D}^c$ obviously shares the same four-fold reflection symmetry with $\widetilde{\mathcal D}$, discussed in the previous Appendix \ref{symmetries}. Therefore, if some $z\in \widetilde{\mathcal D}^c$, then also $z^*\in \widetilde{\mathcal D}^c$, leading to the conclusions that \begin{equation}\label{vanishing} {\alpha\alpha}(is=0; z,z^*) =0 \Leftrightarrow {\alpha\alpha}(is=0; z^*,z) =0\,, \alpha=1,2,3,4 \quad \forall z\in \widetilde{\mathcal D}^c\,, \end{equation} which is consistent with \eqref{trace-interrelation1} and \eqref{trace-interrelation2}. In contrast, at this point, before taking averages, we cannot determine whether each of the four diagonal traces ${\alpha\alpha}(i0;z,z^*)\neq 0$ separately for $z\in \widetilde{\mathcal D}$. All we can say at this point is that the two equal sums in \eqref{equal-sums} do not vanish $\forall z\in \widetilde{\mathcal D}$. (The identities \eqref{trace-interrelation1} and \eqref{trace-interrelation2} we were able to establish, merely interchange $z\leftrightarrow z^*$ in \eqref{equal-sums}.) We will be able to answer this question in the affirmative (see \eqref{AOC} in the main text) only after averaging over ${\cal M}{A}$. \subsection{Derivation of the Self Energy in the Planar Limit}\label{SE-details} Let us start by deriving a useful elementary algebraic identity. To this end we introduce the standard basis vectors in matrix space \begin{equation}\label{basis} (\hat{{\cal M}{e}}_{ij})_{kl} = \delta_{ik}\delta_{jl}, \end{equation} namely, the $N\times N$ matrix whose all entries are null, except the $ij$-th element. Then, it is straightforward to show that (repeated indices are summed over) \begin{equation}\label{matrix} \left(\hat{{\cal M}{e}}_{ij}{\cal M}{M}\hat{{\cal M}{e}}_{ji}\right)_{pq} = \delta_{pq}\,{\rm tr}{\cal M}{M}, \end{equation} for any $N\times N$ matrix ${\cal M}{M}$. In order to proceed, we write the inverse of \eqref{eq:G} as \begin{equation}\label{inverseG} \hat{\mathcal{G}}^{-1} = \hat{\mathcal{G}}_0^{-1} - \hat{\mathcal{A}}\,, \end{equation} where $\hat{\mathcal{G}}_0^{-1}$ was defined in \eqref{bareprop} and where the fluctuating Gaussian part is \begin{equation}\label{fluctA} \hat{\mathcal{A}} = \left(\begin{array}{cccc} 0&0&0& {\cal M}{A}\\ 0&0&0&0\\ 0&0&0&0\\ {\cal M}{A}&0&0&0\end{array}\right) = {\cal M}{A}\otimes (\sigma_+\otimes\sigma_+ + \sigma_-\otimes\sigma_-). \end{equation} In the last equation \begin{equation}\label{sigmapm} \sigma_+ = \left(\begin{array}{cc} 0&1\\ 0&0\\ \end{array}\right)\quad{\rm and}\quad \sigma_- = \left(\begin{array}{cc} 0&0\\ 1&0\\ \end{array}\right) \end{equation} are the usual raising and lowering Pauli matrices. According to Dyson and Schwinger, the self-energy, associated with our Gaussian fluctuating matrix \eqref{fluctA}, can be expressed in the large-$N$ planar limit in terms of the full propagator as \begin{equation}\label{SE-def} \hat\Sigma = \langle \hat{\mathcal{A}} \langle\hat{\mathcal{G}}\rangle\hat{\mathcal{A}} \rangle_c \end{equation} where the subscript $c$ indicates the connected second order cumulant \eqref{cumulant}. Thus, \begin{eqnarray}\label{SE-calc} \hat\Sigma &=&\langle A_{ij}\hat{{\cal M}{e}}_{ij}\otimes (\sigma_+\otimes\sigma_+ + \sigma_-\otimes\sigma_-) \langle\hat{\mathcal{G}}\rangle A_{kl}\hat{{\cal M}{e}}_{kl}\otimes (\sigma_+\otimes\sigma_+ + \sigma_-\otimes\sigma_-)\rangle_c\nonumber\\ &=&\langle A_{ij} A_{kl}\rangle_c \, \hat{{\cal M}{e}}_{ij}\otimes (\sigma_+\otimes\sigma_+ + \sigma_-\otimes\sigma_-) \langle\hat{\mathcal{G}}\rangle \hat{{\cal M}{e}}_{kl}\otimes (\sigma_+\otimes\sigma_+ + \sigma_-\otimes\sigma_-)\nonumber\\ &=&{1\over Nm^2} \delta_{il}\delta_{jk} \, \hat{{\cal M}{e}}_{ij}\otimes (\sigma_+\otimes\sigma_+ + \sigma_-\otimes\sigma_-) \langle\hat{\mathcal{G}}\rangle \hat{{\cal M}{e}}_{kl}\otimes (\sigma_+\otimes\sigma_+ + \sigma_-\otimes\sigma_-)\nonumber\\ &=& {1\over Nm^2} \, \hat{{\cal M}{e}}_{ij}\otimes (\sigma_+\otimes\sigma_+ + \sigma_-\otimes\sigma_-) \langle\hat{\mathcal{G}}\rangle \hat{{\cal M}{e}}_{ji}\otimes (\sigma_+\otimes\sigma_+ + \sigma_-\otimes\sigma_-). \end{eqnarray} Multiplying through, and displaying the blocks \eqref{blocks} of $\langle\hat{\mathcal{G}}\rangle $ on the way, we thus obtain \begin{eqnarray}\label{SE-final} \hat\Sigma &=& {1\over Nm^2} \left(\begin{array}{cccc} \hat{{\cal M}{e}}_{ij}\langle\hat{\mathcal{G}}_{44}\rangle\hat{{\cal M}{e}}_{ji} &0&0&\hat{{\cal M}{e}}_{ij}\langle\hat{\mathcal{G}}_{41}\rangle\hat{{\cal M}{e}}_{ji} \\ 0&0&0&0\\ 0&0&0&0\\ \hat{{\cal M}{e}}_{ij}\langle\hat{\mathcal{G}}_{14}\rangle\hat{{\cal M}{e}}_{ji} &0&0&\hat{{\cal M}{e}}_{ij}\langle\hat{\mathcal{G}}_{11}\rangle\hat{{\cal M}{e}}_{ji} \end{array}\right)\nonumber\\{}\nonumber\\ &=&{1\over m^2} {\cal M}{1}_N\otimes \left(\begin{array}{cccc} \overline{44} &0&0&\overline{41} \\ 0&0&0&0\\ 0&0&0&0\\ \overline{14} &0&0&\overline{11} \end{array}\right)\,, \end{eqnarray} where we have used the definition \eqref{blocktrace}. \subsection{Detailed Derivation of the Gap Equation at $\eta=0$}\label{gap-details} We start from Eqs. \eqref{propagator} and \eqref{SE} and set $\eta=is = 0$. We can then rewrite these equations as \begin{equation}\label{inverseprop} \langle \hat{\mathcal{G}}\rangle_{|_{s=0}}^{-1}=\left(\hat{\mathcal{G}}_0^{-1}-\hat{\Sigma}\right)_{|_{s=0}} = \left(\begin{array}{cccc} -{\overline{44}\over m^2}&0&z&-{\overline{41}\over m^2}\\ 0&0&-{\cal M}{B}&z\\ z^*&-{\cal M}{B}&0&0\\ -{\overline{14}\over m^2}&z^*&0&-{\overline{11}\over m^2} \end{array}\right)_{|_{s=0}} \end{equation} where all quantities are calculated at $\eta=is = 0$ and where we have suppressed explicit indication of the $N\times N$ unit matrix ${\cal M}{1}_N$ in the appropriate blocks. It would be more convenient at this point to rearrange the blocks of the matrix on the right hand side of \eqref{inverseprop} such that all average block traces appear in one diagonal block. To this end we act with the unitary permutation matrix \begin{equation}\label{permutaiton} S = \left(\begin{array}{cccc} 1&0&0&0\\ 0&0&1&0\\ 0&0&0&1\\ 0&1&0&0 \end{array}\right) \end{equation} on the blocks of \eqref{inverseprop} and obtain \begin{eqnarray}\label{inverseprop1} S^{-1}\langle \hat{\mathcal{G}}\rangle_{|_{s=0}}^{-1} S = S^{-1}\left(\hat{\mathcal{G}}_0^{-1}-\hat{\Sigma}\right)_{|_{s=0}} S &=& \left(\begin{array}{cccc} -{\overline{44}\over m^2}&-{\overline{41}\over m^2}&0&z\\ -{\overline{14}\over m^2}&-{\overline{11}\over m^2}&z^*&0\\ 0&z&0&-{\cal M}{B}\\ z^*&0&-{\cal M}{B}&0 \end{array}\right)_{|_{s=0}}\nonumber\\{}\nonumber\\ &=& \left(\begin{array}{cccc} a&b&0&z\\ b^*&c&z^*&0\\ 0&z&0&-{\cal M}{B}\\ z^*&0&-{\cal M}{B}&0 \end{array}\right) \end{eqnarray} where we have used \eqref{1144} and the notations of \eqref{abc}. Let us now invert both sides of \eqref{inverseprop1} and write \begin{equation}\label{prop1} S^{-1}\langle \hat{\mathcal{G}}\rangle_{|_{s=0}} S = \left(\begin{array}{cccc} a&b&0&z\\ b^*&c&z^*&0\\ 0&z&0&-{\cal M}{B}\\ z^*&0&-{\cal M}{B}&0 \end{array}\right)^{-1} \equiv\left(\begin{array}{cc} X&Y\\ W&Z\end{array}\right). \end{equation} After a straightforward but tedious calculation, we find the $2N\times 2N$ blocks on the RHS of \eqref{prop1} as\footnote{Here and in subsequent places, all $N\times N$ blocks commute with each other. Therefore we are free to factor them in and out of the block matrices $X,Y,W$ and $Z$ as if they were scalars.} \begin{eqnarray}\label{XYWZ} X &=& {1\over ac - |b+z^2 {\cal M}{B}^{-1}|^2} \left(\begin{array}{cc} c& - (b+z^2 {\cal M}{B}^{-1})\\ -(b^*+z^{*2} {\cal M}{B}^{-1})&a\end{array}\right)\nonumber\\{}\nonumber\\ Y &=& {{\cal M}{B}^{-1}\over ac - |b+z^2 {\cal M}{B}^{-1}|^2} \left(\begin{array}{cc} cz& -z^* (b+z^2 {\cal M}{B}^{-1})\\ -z(b^*+z^{*2} {\cal M}{B}^{-1})&az^*\end{array}\right)\nonumber\\{}\nonumber\\ W &=& {{\cal M}{B}^{-1}\over ac - |b+z^2 {\cal M}{B}^{-1}|^2} \left(\begin{array}{cc} cz^* & - z^* (b+z^2 {\cal M}{B}^{-1})\\ -z(b^*+z^{*2} {\cal M}{B}^{-1})&az\end{array}\right)\nonumber\\{}\nonumber\\ Z &=& {{\cal M}{B}^{-1}\over ac - |b+z^2 {\cal M}{B}^{-1}|^2}\left(\begin{array}{cc} c|z|^2{\cal M}{B}^{-1}& -ac + b^* (b+z^2 {\cal M}{B}^{-1})\\ -ac +b(b^*+z^{*2} {\cal M}{B}^{-1})&a|z|^2{\cal M}{B}^{-1}\end{array}\right),\nonumber\\ \end{eqnarray} where we have used the abbreviated notation introduced in \eqref{abbreviation}. Note that the product $ac$ is real and negative, being the product of two pure imaginary quantities of equal signs. The permutation matrix $S$ reshuffles the blocks of $ \hat{\mathcal{G}}$ on the left-hand side of \eqref{prop1} into \begin{equation}\label{prop2} S^{-1}\langle \hat{\mathcal{G}}\rangle_{|_{s=0}} S = \left\langle\left(\begin{array}{cccc} \hat{\mathcal{G}}_{11}&\hat{\mathcal{G}}_{14}&\hat{\mathcal{G}}_{12}&\hat{\mathcal{G}}_{13}\\ \hat{\mathcal{G}}_{41}&\hat{\mathcal{G}}_{44}&\hat{\mathcal{G}}_{42}&\hat{\mathcal{G}}_{43}\\ \hat{\mathcal{G}}_{21}&\hat{\mathcal{G}}_{24}&\hat{\mathcal{G}}_{22}&\hat{\mathcal{G}}_{23}\\ \hat{\mathcal{G}}_{31}&\hat{\mathcal{G}}_{34}&\hat{\mathcal{G}}_{32}&\hat{\mathcal{G}}_{33}\\ \end{array}\right)\right\rangle \end{equation} By comparing this equation with the first equation in \eqref{limitsOD}, we see that after reshuffling with $S$, all the four blocks which comprise $\langle{1\over z-{\cal M}{H}}\rangle$ migrate to the lower left corners of the blocks $X, Y, W$ and $Z$. Note also that the four diagonal blocks remain on the main diagonal after this reshuffling. The desired gap equation is obtained by equating \eqref{prop1} and \eqref{prop2}. In particular, by equating the upper $2N\times 2N$ diagonal block of \eqref{prop2} with the corresponding block $X$ of \eqref{prop1}, given explicitly by the first equation in \eqref{XYWZ}, we obtain \begin{equation}\label{14gap} \left\langle\left(\begin{array}{cc} \hat{\mathcal{G}}_{11}&\hat{\mathcal{G}}_{14}\\ \hat{\mathcal{G}}_{41}&\hat{\mathcal{G}}_{44}\\\end{array}\right)\right\rangle = {1\over ac - |b+z^2 {\cal M}{B}^{-1}|^2} \left(\begin{array}{cc} c& - (b+z^2 {\cal M}{B}^{-1})\\ -(b^*+z^{*2} {\cal M}{B}^{-1})&a\end{array}\right). \end{equation} Thus, by equating block traces on both sides of this equation, and with the definition \eqref{abc} in mind, we obtain a set of self-consistent equations for the quantities $a, b$ and $c$: \begin{eqnarray}\label{abc-selfconsistent-appendix} a &=& -{a\over Nm^2} \tr {1\over ac - |b+z^2 {\cal M}{B}^{-1}|^2} \nonumber\\{}\nonumber\\ c &=& -{c\over Nm^2} \tr {1\over ac - |b+z^2 {\cal M}{B}^{-1}|^2} \nonumber\\{}\nonumber\\ b &=& {1\over Nm^2} \tr {b^* + z^{*2}{\cal M}{B}^{-1}\over ac - |b+z^2 {\cal M}{B}^{-1}|^2}. \end{eqnarray} Block tracing the remaining block in \eqref{14gap} just produces the complex conjugated last equation in \eqref{abc-selfconsistent-appendix}, as it should. Two of the diagonal blocks of $\langle\hat{\mathcal {G}}\rangle$ appear in \eqref{14gap}. Let us record here explicitly also the two remaining diagonal blocks \begin{eqnarray}\label{12gap} \langle\hat{\mathcal{G}}_{22}\rangle &=& {c|z|^2 {\cal M}{B}^{-2}\over ac - |b+z^2 {\cal M}{B}^{-1}|^2} \nonumber\\ \langle\hat{\mathcal{G}}_{33}\rangle &=& {a|z|^2 {\cal M}{B}^{-2}\over ac - |b+z^2 {\cal M}{B}^{-1}|^2} \end{eqnarray} which we read off \eqref{prop1}-\eqref{prop2}. After solving for $a, b$ and $c$ from \eqref{abc-selfconsistent-appendix} and feeding these quantities back to \eqref{XYWZ}, we can determine all the $N\times N$ blocks $\langle\hat{\mathcal{G}}_{\alpha\beta}\rangle$ of $\langle\hat{\mathcal{G}}\rangle$. As we can see from \eqref{limitsOD}, of particular interest among all these blocks is \begin{equation}\label{31-appendix} \langle\hat{\mathcal{G}}_{31}\rangle = \left\langle\frac{z}{z^2-{\cal M}{A}{\cal M}{B}}\right\rangle, \end{equation} which is essentially the desired resolvent of ${\cal M}{\phi} = {\cal M}{A}{\cal M}{B}$. Thus, from \eqref{XYWZ} and \eqref{prop2} we obtain \begin{equation}\label{31-final-appendix} \langle\hat{\mathcal{G}}_{31}\rangle = - {z{\cal M}{B}^{-1}(b^*+z^{*2} {\cal M}{B}^{-1})\over ac - |b+z^2 {\cal M}{B}^{-1}|^2}. \end{equation} \vspace{1cm} \section*{Acknowledgements} This research was supported by the Israel Science Foundation (ISF) under grant No. 2040/17. Computations presented in this work were performed on the Hive computer cluster at the University of Haifa, which is partly funded by ISF grant 2155/15. Finally, we thank T.~Can for turning our attention to \cite{carlson}. \vspace{1cm}
\section{\label{sec:intro}Introduction} Second generation, ground-based gravitational wave detectors, specifically the Advanced Laser Interferometer Gravitational wave Observatory (Advanced LIGO) \cite{aligo2015} and Advanced Virgo \cite{avirgo2014}, have detected more than 50 compact binary coalescence events in recent years \cite{gwtc1, gwtc2, gwtc2.1}. Continuous gravitational waves from rapidly-rotating neutron stars are also potential sources, e.g.~a non-axisymmetry due to mountains on the surface, or stellar oscillation modes in the interior \cite{Glampedakis2018, Sieniawska2019, Haskell2021}. There are no reported detections of continuous gravitational waves to date, despite a number of searches in Advanced LIGO and Advanced Virgo data \cite{cw170817, o2narrow, o2vitsco, Middleton2020, Papa2020, Piccinni2020, Steltner2021, Zhang2021, Beniwal2021, Jones2021, o3aknown, Dergachev2021a, Rajbhandari2021, o3abinaryallsky, Wette2021, o30537_2f, o30537_rmodes, o3aAllSkyIso, o3aSNR, Ashok2021}. Low-mass X-ray binaries (LMXBs) are a high-priority target for continuous gravitational wave searches. LMXBs are composed of a compact object, such as a neutron star\footnote{LMXBs in which the compact object is a stellar-mass black hole are not expected to function as continuous gravitational wave sources and are not discussed in this paper.}, which accretes matter from a stellar-mass ($\lesssim 1 M_\odot$) companion \cite{Patruno2021}. The accretion exerts a torque that may spin up the compact object. Electromagnetic (EM) observations show that even the pulsar with the highest known frequency, PSR J1748$-$2446ad at 716\,Hz \cite{Hessels2006}, rotates well below the centrifugal break-up frequency, estimated at $\sim1400\,$Hz \cite{Cook1994}. Gravitational wave emission may provide the balancing torque in binary systems such as these, stopping the neutron star from spinning up to the break-up frequency \cite{Bildsten1998, Andersson1999a}. If so, there should thus be a correlation between accretion rate (which is inferred via X-ray flux) and the strength of the continuous gravitational wave emission \cite{Papaloizou1978, Wagoner1984, Bildsten1998, Andersson1999a}. The LMXB Scorpius X-1\ is the brightest extra-Solar X-ray source in the sky, making it a prime target for searches for continuous gravitational waves \cite{o1vitsco, o1crosscorSco, o2vitsco, Zhang2021}. Some LMXBs have EM observations of pulsations during ``outburst'' events lasting days to months, which allow for measurement of their rotational frequency, $f_\star$, to an accuracy of $\sim10^{-8}\,$Hz, and measurement of their binary ephemerides \cite{DiSalvo2020, Patruno2021}. LMXBs that are observed to go into outburst and have measurable pulsations with millisecond periods are sometimes called accreting millisecond X-ray pulsars (AMXPs). If the rotational frequency is known, computationally cheap narrowband searches are possible. Six AMXPs were previously searched for continuous gravitational waves, one in Science Run 6 (S6) using the TwoSpect algorithm \cite{twoSpectInit,s6twoSpectScoXTE}, and five in Observing Run 2 (O2) using the same Hidden Markov Model (HMM) algorithm we use in this work \cite{Suvorova2017,Middleton2020}. No significant candidates were found in either search. Searches for continuous gravitational waves from LMXBs are difficult as the rotation frequency may wander stochastically on timescales of $\lesssim 1\,$yr \cite{Mukherjee2018}, limiting the duration of coherent integration. A HMM tracks a wandering signal, and is the search algorithm we use here, following Refs.~\cite{Suvorova2016,Suvorova2017,o2vitsco,Middleton2020}. Advanced LIGO and Advanced Virgo began the third Observing Run (O3) on April 1 2019, 15:00 UTC. There was a month-long commissioning break between October 1 2019, 15:00 UTC, and November 1 2019, 15:00 UTC, after which observations resumed until March 27, 2020, 17:00 UTC. This month-long break divides O3 into two segments: O3a and O3b. In this work we search the full O3 data set for continuous gravitational wave signals from AMXPs with known rotational frequencies. The search is a more sensitive version of an analogous search in O2 data \cite{Middleton2020}, with an expanded target list. We briefly review the algorithm and O2 search in Sec.~\ref{sec:alg}. In Secs.~\ref{sec:targets} and \ref{sec:params} we describe the targets and the parameter space respectively. We discuss the data used in Sec.~\ref{sec:o3data}. In Sec.~\ref{sec:vetoes} we describe the vetoes applied to discriminate between terrestrial and astrophysical candidates. In Sec.~\ref{sec:o3results} we present the results of the search. In Sec.~\ref{sec:shortsax} we describe an additional target-of-opportunity search performed for one of the targets that was in outburst during O3a. We provide upper limits for the detectable wave-strain, and astrophysical implications thereof, in Sec.~\ref{sec:ul}. We conclude in Sec.~\ref{sec:concl}. \section{Search algorithm \label{sec:alg}} The search in this paper follows the same prescription as the O2 searches for Scorpius X-1\ \cite{o2vitsco} and LMXBs with known rotational frequency \cite{Middleton2020}. It is composed of two parts: a HMM which uses the Viterbi algorithm to efficiently track the most likely spin history, and the $\mathcal{J}$-statistic, which calculates the likelihood a gravitational wave is present given the detector data, and the orbital parameters of both the Earth and the LMXB. The HMM formalism is identical to that used in Refs.~\cite{Suvorova2016, o1vitsco, Suvorova2017, o2vitsco, Middleton2020}, and the $\mathcal{J}$-statistic was first introduced in Ref.~\cite{Suvorova2017}. Below, we provide a brief review of both the HMM and the $\mathcal{J}$-statistic. \subsection{HMM\label{sec:hmm}} In a Markov process, the probability of finding the system in the current state depends only on the previous state. In a hidden Markov process the states are not directly observable and must be inferred from noisy data. In this paper, the hidden state of interest is the gravitational wave frequency $f(t)$. Although the rotation frequency $f_\star(t)$ of every target in this search is measured accurately from EM pulsations, we allow $f(t) \neq f_\star(t)$ in general for three reasons: \begin{enumerate*}[label=\roman*)] \item different emission mechanisms emit at different multiples of $f_\star$ \cite{Riles2013a}; \item a small, fluctuating drift may arise between $f(t)$ and $f_\star(t)$, if the star's core (where the gravitational-wave-emitting mass or current quadrupole may reside) decouples partially from the crust (to which EM pulsations are locked) \cite{Suvorova2016, s5crab}; and, \item the rotational frequency of the crust may also drift stochastically due to a fluctuating accretion torque \cite{Mukherjee2018, Patruno2021}. \end{enumerate*} The gravitational-wave frequency is therefore hidden even though the EM measurement of $f_\star$ helps restrict the searched frequency space, as described in Sec.~\ref{sec:params}. Following the notation of Refs.~\cite{o2vitsco, Middleton2020} we label the hidden state variable as $q(t)$. In our model, it transitions between a discrete set of allowed values $\{q_1,...,q_{N_Q}\}$ at discrete times $\{t_0,...,t_{N_T}\}$. The probability of the state transitioning from $q_i$ at time $t_n$ to $q_j$ at time $t_{n+1}$ is determined by the transition matrix $A_{q_j q_i}$. In this search, as in previous searches of LMXBs \cite{o1vitsco, o2vitsco, Middleton2020}, the transition matrix is \begin{equation} \label{eq:transmat} {A_{q_j q_i} = \frac{1}{3}\left(\delta_{q_j q_{i+1}} + \delta_{q_j q_i} + \delta_{q_j q_{i-1}}\right)}\ , \end{equation} where $\delta_{ij}$ is the Kronecker delta. Eq.~\eqref{eq:transmat} corresponds to allowing $f(t)$ to move 0, or $\pm1$ frequency bins, with equal probability, at each discrete transition. It implicitly defines the signal model for $f(t)$ to be a piece-wise constant function, with jumps in frequency allowed at the discrete times $\{t_0, ... , t_{N_T}\}$. This is a well-tested approximation for an unbiased random walk \cite{Suvorova2016, Suvorova2017}. The total duration of the search is $T_\textrm{obs}$, which we split into $N_T$ coherent equal chunks of length $T_{\textrm{drift}}$, where $N_T = \lfloor T_\textrm{obs} / T_{\textrm{drift}} \rfloor$, and $\lfloor ... \rfloor$ indicates rounding down to the nearest integer. We justify our choice of $T_{\textrm{drift}}$ in Sec.~\ref{sec:params}. In essence, it needs to be short enough to ensure that $f_\star(t)$ does not wander by more than one frequency bin during each time segment, but ideally no shorter in order to maximize the signal-to-noise ratio in each segment. For each time segment the likelihood that the observation $o_j$ is related to the hidden state $q_i$ is given by the emission matrix $L_{o_j q_i}$. We calculate $L_{o_j q_i}$ from the data via a frequency domain estimator, e.g.~the $\mathcal{J}$-statistic, as discussed in Sec.~\ref{sec:jstat}. The probability that the hidden path is $Q = \{q(t_0), ..., q(t_{N_T})\}$ given a set of observations $O = \{o(t_0), ..., o(t_{N_T})\}$ is \begin{align} \label{eq:probq_o} P(Q\,|\,O) =&~ \Pi_{q(t_0)}\, A_{q(t_1) q(t_0)} L_{o(t_1) q(t_1)}\ ... \nonumber\\ &~\times A_{q(t_{N_T}) q(t_{N_T - 1})} L_{o(t_{N_T}) q(t_{N_T})}\ , \end{align} where $\Pi_{q(t_0)}$ is the prior probability of starting in the state $q(t_0)$, and is taken to be uniform within a certain range guided by EM measurements of $f_\star$. The Viterbi algorithm is a computationally efficient way to find the path $Q^{*}$ that maximizes Eq.~\eqref{eq:probq_o} \cite{Viterbi1967}. The detection statistic we use in this work is $\mathcal{L} = \ln P(Q^{*}\,|\,O)$, i.e.~the log-likelihood of the most likely path given the data. The search outputs one $P(Q^{*}|O)$ value per frequency bin, corresponding to the optimal path $Q^{*}$ terminating in that frequency bin. \subsection{$\mathcal{J}$-statistic\label{sec:jstat}} Any long-lived gravitational wave signal from an LMXB observed by the detectors is Doppler modulated by the orbital motion of the detectors around the Solar System barycenter, and by the orbital motion of the compact object in its binary. The $\mathcal{F}$-statistic is a frequency domain estimator originally designed for isolated neutron stars, and accounts for the Earth's annual orbital motion (as well as the amplitude modulation caused by the Earth's diurnal rotation) \cite{Jaranowski1998}. The $\mathcal{J}$-statistic accounts for the binary modulation via a Jacobi-Anger expansion of the orbit \cite{Suvorova2017}. It ingests the $\mathcal{F}$-statistic as an input, assumes the binary is in a circular orbit\footnote{This assumption is justified as none of the targets described in Sec.~\ref{sec:targets} have measurable eccentricity with sufficient precision \cite{DiSalvo2020, Patruno2021}.}, and requires three binary orbital parameters: the period $P$, the projected semi-major axis $a_0$, and the time of passage of the ascending node $T_{\textrm{asc}}$. We use the $\mathcal{J}$-statistic as the frequency domain estimator $L_{o_j q_i}$ in this paper, as in Refs.~\cite{o2vitsco, Middleton2020}. \section{\label{sec:targets}Targets} The AMXPs chosen as targets for this search, along with their positions, orbital elements, and pulsation frequencies are listed in Table \ref{tab:info}. These 20 targets constitute all known AMXPs with observed coherent pulsations and precisely measured orbital elements as of April 2021\footnote{We do not include the AMXP Aquila X-1 \cite{Casella2008, MataSanchez2017} in our target list as there is a large uncertainty on all three binary orbital elements, compared to the other 20 AMXPs. One would need to search $>10^{10}$ binary orbital templates, an order of magnitude more than the rest of the targets combined. The number of binary orbital templates is calculated as a function of the uncertainty in orbital elements in Sec.~\ref{sec:numtemps}.}. For details on the relevant EM observations, principally in the X-ray band, see Refs.~\cite{Watts2008, Marino2019, DiSalvo2020, Patruno2021}. Most AMXPs are transient, with ``active'' (outburst) and ``quiescent'' phases. Pulsations, and therefore $f_\star$, are only observed during the active phase. Active phases are typically associated with accretion onto the neutron star, however accretion can also happen during quiescence \cite{Melatos2016}. The frequency derivatives, $\dot{f}_\star$, in the active phase and in the quiescent phase are set by the accretion torque and magnetic dipole braking respectively \cite{Ghosh1977, Melatos2016}. The value of $\dot{f}_\star$ has implications for the continuous gravitational wave signal strength (see Sec.~\ref{sec:ul_comp}), as well as the choice of $T_{\textrm{drift}}$ (see Sec.~\ref{sec:tdr}). One target, SAX J1808.4$-$3658, went into outburst during O3a \cite{Bult2019, Bult2020}. It may be the case that continuous gravitational waves are only emitted when an AMXP is in outburst \cite{Haskell2017a}. If so, we increase our signal-to-noise ratio by searching only data from the times that it was in outburst, compared to searching the entirety of O3 data. To investigate this possibility, we perform in Sec.~\ref{sec:shortsax} an additional target-of-opportunity search for continuous gravitational waves from SAX J1808.4$-$3658\ while it is in outburst. \begin{turnpage} \begin{table*} \begin{threeparttable} \caption{Target list: position (RA and Dec), orbital period ($P$), projected semi-major axis in light-seconds ($a_0$), time of passage through the ascending node as measured near the time of the most recent outburst ($T_{\textrm{asc}}$), the time of passage through the ascending node as propagated to the start of O3 ($T_\textrm{asc,\,O3}$), as described in Sec.~\ref{sec:numtemps}, and frequency of observed pulsations ($f_\star$). Numbers in parentheses indicate reported 1$\sigma$ errors (68\% confidence level), unless otherwise noted. All objects have positional uncertainty $\leq1$s in RA and $\leq0.5''$ in Dec.} \label{tab:info} {\renewcommand{\arraystretch}{1.3 \begin{ruledtabular} \begin{tabular}{l l l l l l l l l} Target & RA & Dec & P$/$s & $a_0/$lt-s & $T_{\textrm{asc}}/$GPS time & $T_{\textrm{asc,\,O3}}/$GPS time & $f_\star / $Hz & Refs.~\\ \midrule IGR J00291$+$5934 & 00h29m03.05s & $+59\degr34'18.93''$ & 8844.07673(9) & 0.064993(2) & 1122149932.93(5) & 1238157687(1) & 598.89213099(6) & \cite{Torres2008,Patruno0029} \\ MAXI J0911$-$655 & 09h12m02.46s & $-64\degr52'06.37''$ & 2659.93312(47)& 0.017595(9) & 1145507148.0(9) & 1238165918(16) & 339.9750123(3) & \cite{Homan2016, Sanna0911} \\ XTE J0929$-$314 & 09h29m20.19s & $-31\degr23'03.2''$ & 2614.746(3) & 0.006290(9) & 705152406.1(9) & 1238165763(612) & 185.105254297(9) & \cite{Galloway2002, Giles2005} \\ IGR J16597$-$3704 & 16h59m32.902s & $-37\degr07'14.3''$ & 2758.2(3) & 0.00480(3) & 1193053416(9) & 1238163777(4907) & 105.1758271(3) & \cite{Tetarenko2018, Sanna16597} \\ IGR J17062$-$6143 & 17h06m16.29s & $-61\degr42'40.6''$ & 2278.21124(2) & 0.003963(6) & 1239389342(4) & 1238165942(4) & 163.656110049(9) & \cite{Bult2021} \\ IGR J17379$-$3747 & 17h37m58.836s & $-37\degr46'18.35''$ & 6765.8388(17) & 0.076979(14) & 1206573046.6(3) & 1238162748(8) & 468.083266605(7) & \cite{Sanna17379, Bult17379} \\ SAX J1748.9$-$2021 & 17h48m52.161s & $-20\degr21'32.406''$ & 31555.300(3) & 0.38757(2) & 1109500772.5(8) & 1238151731(12) & 442.3610957(2) & \cite{Sanna1748, DiSalvo2020} \\ NGC 6440 X$-$2 & 17h48m52.76s & $-20\degr21'24.0''$ & 3457.8929(7) & 0.00614(1) & 956797704(2) & 1238166449(57) & 205.89221(2) & \cite{Heinke2010a, Bult2015} \\ IGR J17494$-$3030 & 17h49m23.62s & $-30\degr29'58.999''$ & 4496.67(3) & 0.015186(12) & 1287797911(1) & 1238163668(331) & 376.05017022(4) & \cite{Ng2021} \\ Swift J1749.4$-$2807 & 17h49m31.728s & $-28\degr08'05.064''$ & 31740.8417(27)& 1.899568(11) & 1298634645.85(12) & 1238136602(5) & 517.92001385(6) & \cite{Jonker2013, Bult2021a, Sanna1749} \\ IGR J17498$-$2921 & 17h49m56.02s & $-29\degr19'20.7''$ & 13835.619(1)\tnote{b} & 0.365165(5)\tnote{b} & 997147537.43(7)\tnote{b} & 1238164020(6) & 400.99018734(9)\tnote{b} & \cite{Papitto17498, Falanga2012} \\ IGR J17511$-$3057 & 17h51m08.66s & $-30\degr57'41.0''$ & 12487.5121(4) & 0.2751952(18) & 936924316.03(3) & 1238160570(10) & 244.83395145(9) & \cite{Paizis2012, Riggio17511} \\ XTE J1751$-$305 & 17h51m13.49s & $-30\degr37'23.4''$ & 2545.3414(38)\tnote{a} & 0.010125(5)\tnote{a} & 701914663.57(3)\tnote{a} & 1238164644(487) & 435.31799357(3)\tnote{a} & \cite{Markwardt1751, Papitto1751} \\ Swift J1756.9$-$2508 & 17h56m57.43s & $-25\degr06'27.4''$ & 3282.40(4) & 0.00596(2) & 1207196675(9) & 1238166119(378) & 182.06580377(11) & \cite{Sanna1756} \\ IGR J17591$-$2342 & 17h59m02.86s & $-23\degr43'08.3''$ & 31684.7503(5) & 1.227714(4) & 1218341207.72(8) & 1238144176.7(3) & 527.425700578(9) & \cite{Russell2018, Sanna17591} \\ XTE J1807$-$294 & 18h06m59.8s & $-29\degr24'30''$ & 2404.4163(3) & 0.004830(3) & 732384720.7(3) & 1238165711(63) & 190.62350702(4) & \cite{Markwardt1807, Patruno1807} \\ SAX J1808.4$-$3658 & 18h08m27.647s & $-36\degr58'43.90''$ & 7249.155(3) & 0.062809(7) & 1250296258.5(2) & 1238161173(5) & 400.97521037(1) & \cite{Bult2020} \\ XTE J1814$-$338 & 18h13m39.02s & $-33\degr46'22.3''$ & 15388.7229(2)\tnote{a}\hspace{0.5em} & 0.390633(9)\tnote{a} & 739049147.41(8)\tnote{a} & 1238151597(4) & 314.35610879(1)\tnote{a} & \cite{Krauss2005, Papitto1814} \\ IGR J18245$-$2452 & 18h24m32.51s & $-24\degr52'07.9''$ & 39692.812(7) & 0.76591(1) & 1049865088.37(9) & 1238128096(33) & 254.3330310(1) & \cite{Pallanca2013, Papitto18245} \\ HETE J1900.1$-$2455 & 19h00m08.65s & $-24\degr55'13.7''$ & 4995.2630(5) & 0.01844(2) & 803963262.3(8) & 1238161513(43) & 377.296171971(5) & \cite{Fox2005, Kaaret2006, Patruno1900} \\ \end{tabular} \end{ruledtabular} } \begin{tablenotes} \item[a]{90\% confidence level} \item[b]{3$\sigma$ error} \end{tablenotes} \end{threeparttable} \end{table*} \end{turnpage} \section{Search parameters \label{sec:params}} The $\mathcal{J}$-statistic matched filter requires specification of the source sky position [right ascension (RA) and declination (Dec)], the orbital period $P$, the projected semi-major axis $a_0$, and the orbital phase $\phi_a$ at the start of the search. The orbital phase can be equivalently specified via a time of passage through the ascending node, $T_{\textrm{asc}}$. EM observations constrain all of these parameters, as well as the spin frequency $f_\star$. These measurements, along with their associated uncertainties, are listed in Table \ref{tab:info}. There are several mechanisms that could lead to continuous gravitational wave emission from an AMXP, in its active or quiescent phase. ``Mountains'' on the neutron star surface, be they magnetically or elastically supported, emit at 2$f_\star$ and potentially $f_\star$ \cite{Jones2010}. The dominant continuous gravitational wave emission from $r$-mode oscillations (Rossby waves excited by radiation-reaction instabilities) is predicted to be at $\sim4f_\star / 3$ \cite{Andersson1998, Friedman1998, Yoshida2001, Alford2012}. Thus, we search frequency sub-bands centered on $\{1, 4/3, 2 \}\,f_\star$ for each target. As in Refs.~\cite{o2vitsco, Middleton2020} we choose a sub-band width of $\sim0.61\,$Hz\footnote{Other narrowband searches, such as Refs.~\cite{o1narrow, o2narrow}, search sub-bands whose width, $\sim 10^{-3} f$, scales with frequency. We note that $0.61\,$Hz is comparable to $10^{-3}f$ for the harmonics of $f_\star$ that we search in this paper, but is $2^{20} \Delta f$, where $\Delta f$ is the frequency bin size defined in Sec.~\ref{sec:tdr}. Having the number of frequency bins in the sub-band equal a power of two speeds up the Fourier transform \cite{o2vitsco}.}. Recent work indicates that the continuous gravitational wave signal from $r$-modes could emit at a frequency far from $4f_\star / 3$ due to equation-of-state-dependent relativistic corrections, and so comprehensive searches for $r$-modes may need to cover hundreds of Hz for the targets listed in Table \ref{tab:info} \cite{Idrisy2015, Caride2019}. The exact range of frequencies to search is a non-linear function of $f_\star$, and does not necessarily include $4f_\star /3$ (see equation (17) of Ref.~\cite{Caride2019}). However, these estimates are still uncertain. We deliberately search $\sim0.61\,$Hz sub-bands centered on $4f_\star / 3$, as an exhaustive broadband search lies outside the scope of this paper, which aims to conduct fast, narrowband searches at astrophysically motivated harmonics of $f_\star$ while accommodating frequency wandering within those sub-bands, a challenge in its own right. \subsection{$T_{\textrm{drift}}$ and frequency binning \label{sec:tdr}} Another key parameter for the search algorithm described in Sec.~\ref{sec:alg} is the coherence time $T_{\textrm{drift}}$. As in Refs.~\cite{o2vitsco, Middleton2020} we fix $T_{\textrm{drift}}=10\,$d for each target\footnote{We consider additional $T_{\textrm{drift}}$ durations for the target-of-opportunity search for continuous gravitational waves from SAX J1808.4$-$3658\ during its O3a outburst in Sec.~\ref{sec:shortsax}.}. This choice of $T_{\textrm{drift}}$ is guided by observations of Scorpius X-1\ \cite{Mukherjee2018}. Quantitative studies of how X-ray flux variability in AMXPs impacts searches for continuous gravitational waves are absent from the literature. The choice to use $T_{\textrm{drift}}=10\,$d balances the increased sensitivity achieved via longer coherence times with the knowledge that the gravitational wave frequency may wander stochastically, e.g.~due to fluctuations in the mass accretion rate. The particular value $T_{\textrm{drift}}=10\,$d has been adopted in all previous Viterbi LMXB searches \cite{o1vitsco, o2vitsco, Middleton2020} and is justified approximately with reference to a simple random-walk interpretation of fluctuations in the X-ray flux of Scorpius X-1\ \cite{Sammut2014, Messenger2015a, Mukherjee2018}, but other values are reasonable too. We remind the reader that the choice of $T_{\textrm{drift}}$ implicitly fixes the proposed signal model as one in which the frequency may wander step-wise zero, plus or minus one frequency bin every $T_{\textrm{drift}}=10\,$d. The size of the frequency bins, $\Delta f$, is fixed by the resolution implied by the coherence time, i.e.~$\Delta f = 1 / (2\, T_{\textrm{drift}}) = 5.787037\times10^{-7}\,$Hz, for $T_{\textrm{drift}}=10\,$d. As $\Delta f$ depends on $T_{\textrm{drift}}$, changing the coherence time explicitly changes the signal model, e.g.~if $T_{\textrm{drift}}$ is halved and $T_{\rm obs}$ is kept constant, then both $N_T$ and $\Delta f$ double; thus the signal can move up to a factor of four more in frequency in the same $T_{\rm obs}$. The connection between the coherence time and the signal model does not feature in other semi-coherent search methods, such as all-sky searches or searches based on the $\mathcal{F}$-statistic \cite{o2allsky, Steltner2021}, where the coherence time is chosen to balance search sensitivity with computational cost, but does not explicitly change the signal model. \subsection{Number of orbital templates \label{sec:numtemps}} The orbital elements are known to high precision, with the uncertainty in $P$ satisfying $\sigma_P \lesssim 10^{-3}\,$s, the uncertainty in $a_0$ satisfying $\sigma_{a_0} \lesssim 10^{-4}\,$light-seconds (lt-s), and the uncertainty in $T_{\textrm{asc}}$ satisfying $\sigma_{T_{\textrm{asc}}} \lesssim 1\,$s. However, $T_{\textrm{asc}}$ is measured relative to the target's most recent outburst, which is often years before the start of O3 ($T_{\rm O3,\,start}=1238166483\,$GPS time). We need to propagate it forward in time. This propagation compounds the uncertainty in $T_{\textrm{asc}}$, viz.~ \cite{o1crosscorSco, o2vitsco, Middleton2020} \begin{equation} \sigma_{T_{\rm asc,\,O3}} = \left[\sigma_{T_{\textrm{asc}}}^2 + \left(N_{\rm orb} \sigma_P\right)^2\right]^{1/2}\,, \end{equation} where $N_{\rm orb}$ is the number of orbits between the observed $T_{\textrm{asc}}$ and $T_{\rm asc,\,O3}$. Henceforth $T_{\textrm{asc}}$ and $\sigma_{T_{\textrm{asc}}}$ symbolize their values when propagated to $T_{\rm O3,\,start}$. To conduct the search over the orbital elements for each target and sub-band we construct a rectangular grid in the parameter space defined by $(P \pm 3\sigma_P, a_0 \pm 3\sigma_{a_0}, T_{\textrm{asc}} \pm 3\sigma_{T_{\textrm{asc}}})$. For three targets, XTE J0929$-$314, IGR J16597$-$3704, and IGR J17494$-$3030, the range $(T_{\textrm{asc}} \pm P/2)$ is smaller than $(T_{\textrm{asc}} \pm 3\sigma_{T_{\textrm{asc}}})$ and we use the former. We assume that $P$ and $a_0$ remain within the same bin for the entire search. While some targets have a non-zero measurement of $\dot{P}\, T_{\rm obs}$ ($\dot{a}_0\, T_{\rm obs}$), in all cases it is much smaller than the template spacing in $P$ ($a_0$) \cite{Patruno1808, Patruno0029, Bult2021}. It is unlikely that the true source parameters lie exactly on a grid point in the parameter space. Thus the grid is spaced such that the maximum mismatch, $\mu_{\rm max}$, is never more than an acceptable level. The mismatch is defined as the fractional loss in signal-to-noise ratio between the search executed at the true parameters and at the nearest grid point \cite{Leaci2015}. We calculate the number of grid points required for $P$, $a_0$ and $T_{\textrm{asc}}$ using Eq.~(71) of Ref.~\cite{Leaci2015}, i.e. \begin{align} N_P &= \pi^2\sqrt{6}\, \mu_{\rm max}^{-1/2} f a_0 \frac{\gamma T_{\textrm{drift}}}{P^2} \sigma_P\,,\label{eq:np}\\ N_{a_0} &= 3\pi\sqrt{2}\, \mu_{\rm max}^{-1/2} f \sigma_{a_0} \,,\label{eq:na0}\\ N_{T_{\textrm{asc}}} &= \pi^2\sqrt{2}\, \mu_{\rm max}^{-1/2} f a_0 \frac{1}{P} \sigma_{T_{\textrm{asc}}} \,,\label{eq:ntasc} \end{align} where $\gamma$ is a refinement factor defined in general in Eq.~(67) of Ref.~\cite{Leaci2015}. In the case of O3, the semi-coherent segments are contiguous so we have $\gamma = N_T = 36$. We fix $\mu_{\rm max} = 0.1$. We make the conservative choice of rounding $N_P$, $N_{a_0}$, and $N_{T_{\textrm{asc}}}$ up to the nearest integer, after setting $f$ to the highest frequency in each $0.61\,$Hz sub-band. As in Ref.~\cite{Middleton2020} we find $N_{a_0} = 1$ for each target and sub-band, and so hold $a_0$ constant at its central value while searching over $P$ and $T_{\textrm{asc}}$. Table \ref{tab:ntemps} shows $N_P$, $N_{T_{\textrm{asc}}}$, and $N_{\rm tot} = N_P N_{T_{\textrm{asc}}}$ for each target and sub-band. When Eq.~\eqref{eq:np} or \eqref{eq:ntasc} predicts only two templates for a given sub-band we round up to three, ensuring that the central value of $P$ or $T_{\textrm{asc}}$ from EM observations is included in the template bank. Note that the EM observations are sufficiently precise that $<5\times10^{4}$ templates are required across all targets and sub-bands. This is in contrast to the O2 search for continuous gravitational waves from Scorpius X-1, for which $\sim10^9$ templates were needed, mainly due to the large uncertainty in $a_0$, and the unknown rotation frequency \cite{o2vitsco}. \begin{table*} \caption{Starting frequencies, $f_{\rm s}$, for each $\sim0.61\,$Hz-wide sub-band, number of templates needed to cover the $P$ and $T_{\textrm{asc}}$ domains in that sub-band, $N_P$ and $N_{T_{\textrm{asc}}}$ respectively, and the total number of templates for each sub-band, $N_{\rm tot} = N_P N_{T_{\textrm{asc}}}$. The projected semi-major axis $a_0$ is known precisely enough that we have $N_{a_0}=1$ for each sub-band. \label{tab:ntemps}} \begin{ruledtabular} \begin{tabular}{l d{3} d{1.5} d{1.5} d{1.5} l d{3} d{1.5} d{1.5} d{1.5}} \textrm{Target} & \textrm{$f_{\rm s}$ (Hz)} & \textrm{$N_P$} & \textrm{$N_{T_{\textrm{asc}}}$} & \textrm{$N_{\rm tot}$} & \textrm{Target} & \textrm{$f_{\rm s}$ (Hz)} & \textrm{$N_P$} & \textrm{$N_{T_{\textrm{asc}}}$} & \textrm{$N_{\rm tot}$} \\ \midrule IGR J00291$+$5934 & 598.6 & 1 & 3 & 3 & IGR J17498$-$2921 & 400.7 & 1 & 17 & 17 \\ & 798.5 & 1 & 3 & 3 & & 534.7 & 1 & 22 & 22 \\ & 1197.8 & 1 & 3 & 3 & & 802.0 & 3 & 33 & 99 \\ MAXI J0911$-$655 & 339.7 & 1 & 10 & 10 & IGR J17511$-$3057 & 244.5 & 1 & 14 & 14 \\ & 453.3 & 3 & 14 & 42 & & 326.4 & 1 & 19 & 19 \\ & 679.9 & 3 & 20 & 60 & & 489.7 & 1 & 28 & 28 \\ XTE J0929$-$314 & 184.8 & 3 & 52 & 156 & XTE J1751$-$305 & 435.0 & 4 & 195 & 780 \\ & 246.8 & 3 & 69 & 207 & & 580.4 & 5 & 260 & 1300 \\ & 370.2 & 3 & 104 & 312 & & 870.6 & 8 & 390 & 3120 \\ IGR J16597$-$3704 & 104.9 & 49 & 23 & 1127 & Swift J1756.9$-$2508 & 181.8 & 10 & 34 & 340 \\ & 140.2 & 65 & 31 & 2015 & & 242.8 & 13 & 45 & 585 \\ & 210.4 & 97 & 46 & 4462 & & 364.1 & 20 & 67 & 1340 \\ IGR J17062$-$6143 & 163.4 & 1 & 1 & 1 & IGR J17591$-$2342 & 527.1 & 1 & 3 & 3 \\ & 218.2 & 1 & 1 & 1 & & 703.2 & 3 & 3 & 9 \\ & 327.3 & 1 & 1 & 1 & & 1054.9 & 3 & 4 & 12 \\ IGR J17379$-$3747 & 467.8 & 4 & 12 & 48 & XTE J1807$-$294 & 190.3 & 1 & 7 & 7 \\ & 624.1 & 5 & 15 & 75 & & 254.2 & 1 & 9 & 9 \\ & 936.2 & 7 & 23 & 161 & & 381.2 & 1 & 13 & 13 \\ SAX J1748.9$-$2021 & 442.1 & 3 & 18 & 54 & SAX J1808.4$-$3658 & 400.7 & 4 & 5 & 20 \\ & 589.8 & 3 & 24 & 72 & & 534.6 & 5 & 7 & 35 \\ & 884.7 & 3 & 36 & 108 & & 802.0 & 7 & 10 & 70 \\ NGC 6440 X$-$2 & 205.6 & 1 & 6 & 6 & XTE J1814$-$338 & 314.1 & 1 & 9 & 9 \\ & 274.5 & 1 & 8 & 8 & & 419.1 & 1 & 12 & 12 \\ & 411.8 & 1 & 12 & 12 & & 628.7 & 1 & 17 & 17 \\ IGR J17494$-$3030 & 375.7 & 21 & 112 & 2352 & IGR J18245$-$2452 & 254.0 & 3 & 44 & 132 \\ & 501.4 & 27 & 150 & 4050 & & 339.1 & 3 & 58 & 174 \\ & 752.1 & 41 & 224 & 9184 & & 508.7 & 5 & 87 & 435 \\ Swift J1749.4$-$2807 & 517.6 & 7 & 43 & 301 & HETE J1900.1$-$2455 & 377.0 & 1 & 17 & 17 \\ & 690.6 & 9 & 57 & 513 & & 503.1 & 1 & 22 & 22 \\ & 1035.8 & 13 & 85 & 1105 & & 754.6 & 1 & 33 & 33 \\ \end{tabular} \end{ruledtabular} \end{table*} \subsection{Thresholds \label{sec:thresh}} The output of the search algorithm outlined in Sec.~\ref{sec:alg} is a $\mathcal{L}$ value corresponding to the most likely path through each sub-band for each orbital template $(P, a_0, T_{\textrm{asc}})$. We flag a template for further follow-up if $\mathcal{L}$ exceeds a threshold, $\mathcal{L}_{\rm th}$, given an acceptable probability of false alarm. To determine $\mathcal{L}_{\rm th}$ we need to know how often pure noise yields $\mathcal{L}> \mathcal{L}_{\rm th}$. The distribution of $\mathcal{L}$ in noise-only data is unknown analytically, but depends on $P$, $a_0$, and the frequency, so Monte-Carlo simulations are used to determine $\mathcal{L}_{\rm th}$ in each sub-band for each target. We estimate the distribution of $\mathcal{L}$ in noise via two methods: \begin{enumerate*}[label=\roman*)] \item using realizations of synthetic Gaussian noise generated using the \texttt{lalapps\_Makefakedata\_v5} program in the LIGO Scientific Collaboration Algorithm Library (LALSuite) \cite{LAL2018}, and \item searching O3 data in off-target locations to simulate different realizations of true detector noise.\end{enumerate*} As in Refs.~\cite{o2vitsco, Middleton2020} we generate realizations for each target and sub-band, and apply the search algorithm described in Sec.~\ref{sec:alg} to each realization to recover samples from the noise-only distribution of $\mathcal{L}$. Details on how we use these samples to find $\mathcal{L}_{\rm th}$ for each sub-band are given in Appendix \ref{app:thresh}. Unless otherwise noted, $\mathcal{L}_{\rm th}$ refers to the lower of the two thresholds derived from the methods listed above to minimize false dismissals. To define $\mathcal{L}_{\rm th}$ we must also account for a ``trials factor'' due to the number of templates searched in each sub-band. We assume that in noise-only data the spacing between templates is sufficiently large such that each template returns a statistically independent $\mathcal{L}$. We can therefore relate the false alarm probability for a search of a sub-band with $N_{\rm tot}$ templates, $\alpha_{N_{\rm tot}}$, to the probability of a false alarm for a single template, $\alpha$, viz.~ \begin{equation} \alpha_{N_{\rm tot}} = 1 - (1 - \alpha)^{N_{\rm tot}}\,. \label{eq:alphan} \end{equation} Previous comparable searches have set $\alpha_{N_{\rm tot}}$ between 0.01 and 0.3 \cite{o1crosscorSco, o1vitsco, o2vitsco, Middleton2020}. In this search, we fix $\alpha_{N_{\rm tot}} = 0.3$, i.e.~set the acceptable probability of false alarm at 30\% per sub-band. As we search a total of $20 \times 3 = 60$ sub-bands, we expect $\sim 18$ candidates above $\mathcal{L}_{\rm th}$ due to noise alone (i.e.~false alarms), a reasonable number on which to perform more exhaustive follow-up. Looking ahead to the results in Sec.~\ref{sec:o3results} we recover 4611 candidates above $\mathcal{L}_{\rm th}$. However all but 16 are eliminated by the astrophysical vetoes outlined in Sec.~\ref{sec:vetoes}. \subsection{Computing resources \label{sec:computing}} A mix of central processing unit (CPU) and graphical processing unit (GPU) resources are used. The GPU implementation of the $\mathcal{J}$-statistic is identical to that used in Refs.~\cite{o2vitsco, Middleton2020}. The entire search across all targets and sub-bands takes $\sim30$ CPU-hours and $\sim40$ GPU-hours when using compute nodes equipped with Xeon Gold 6140 CPUs and NVIDIA P100 12GB PCIe GPUs. Producing $\mathcal{L}_{\rm th}$ for each sub-band, as described in Sec.~\ref{sec:thresh}, takes an additional $\sim 5\times10^2$ CPU-hours and $\sim 4\times10^3$ GPU-hours to perform the search on different noise realizations. The additional follow-up in Appendix \ref{app:followup} requires an additional $\sim 10^3$ CPU-hours and $\sim 10^2$ GPU-hours. \section{O3 data \label{sec:o3data}} We use the full dataset from O3, spanning from April 1, 2019, 15:00 UTC to March 27, 2020, 17:00 UTC, from the LIGO Livingston and Hanford observatories. We do not use any data from the Virgo interferometer in this analysis, due to its lower sensitivity compared to the two LIGO observatories in the frequency sub-bands over which we search \cite{o23DetChar}. The data products ingested by the search algorithm described in Sec.~\ref{sec:alg} are short Fourier transforms (SFTs) lasting $1800\,$s. Times when the detectors were offline, poorly calibrated, or were impacted by egregious noise, are excluded from analysis by using ``Category 1'' vetoes \cite{o23DetChar}. The SFTs are generated from the ``C01 calibrated self-gated'' dataset, which is the calibrated strain data with loud transient glitches removed \cite{o3gating}. Transient glitches otherwise impact the noise floor, as described in section 6.1 of Ref.~\cite{o23DetChar}. The median systematic error of the strain magnitude across O3 is $<2\%$ \cite{Sun2020, Sun2021}. The coherence time $T_{\textrm{drift}}=10\,$d splits the data into $N_T=36$ segments. However, due to the month-long commissioning break between O3a and O3b there are two segments without any SFTs. These two segments, starting at October 8, 2019, 15:00 UTC and October 15, 2019, 15:00 UTC, are replaced with a uniform log-likelihood for all frequency bins, which allows the HMM to effectively skip over them while still allowing spin wandering. When generating synthetic data in Secs.~\ref{sec:thresh} and \ref{sec:ul} the same two data segments are also replaced with uniform log-likelihoods to emulate the real search. \section{Vetoes \label{sec:vetoes}} When a candidate is returned with $\mathcal{L} > \mathcal{L}_{\rm th}$ we must decide whether there are reasonable grounds to veto the candidate as non-astrophysical. We use three of the vetoes from Ref.~\cite{Middleton2020}: the known line veto, detailed in Sec.~\ref{sec:line_veto}, the single interferometer veto, detailed in Sec.~\ref{sec:sinfo_veto}, and the off-target veto, detailed in Sec.~\ref{sec:ot_veto}. \subsection{Known line veto \label{sec:line_veto}} As part of the detector characterization process many harmonic features are identified as instrumental ``known lines'' \cite{o12lines, o23DetChar}. However, the exact source of these harmonic features is sometimes unidentified, and their impact cannot always be mitigated through isolating hardware components or post-processing the data \cite{o12lines, o23DetChar}. We use the vetted known lines list in Ref.~\cite{o3lineslist}. Any candidate close to a known line at frequency $f_{\rm line}$ is vetoed. Precisely, if for any time $0 \leq t \leq T_{\rm obs}$ the candidate's frequency path $f(t)$ satisfies \begin{equation} {|f(t) - f_{\rm line}| < 2\pi a_0 f_{\rm line} / P \,,} \end{equation} then the candidate is vetoed\footnote{One might consider an additional Doppler broadening factor of $2\pi a_\oplus/1\,$yr, where $a_\oplus$ is the mean Earth-Sun distance, as stationary lines in the detector frame get Doppler shifted when transforming the data to the frame of reference of the source. We opt not to apply this factor for simplicity in this search, as the exact pattern of Doppler modulation depends strongly on the sky location of the target. Looking ahead to the results in Sec.~\ref{sec:o3results}, we note that none of the 16 surviving candidates is within $2 \pi f a_\oplus/1\,$yr of any known line.}. \subsection{Single interferometer veto \label{sec:sinfo_veto}} An instrumental artefact is unlikely to be coincident in both detectors, so the candidate's $\mathcal{L}$ should be dominated by only one of the detectors if the signal is non-astrophysical. On the other hand, an astrophysical signal may need data from both detectors to be detected, or if it is particularly strong may be seen in both detectors individually. We label the original log-likelihood as $\mathcal{L}_\cup$, and we also calculate the two single interferometer log-likelihoods $\mathcal{L}_a$ and $\mathcal{L}_b$ (where the higher $\mathcal{L}$ is labelled with $b$ for definiteness). There are four possible outcomes for this veto: \begin{enumerate} \item If the $\mathcal{L}$ value in one detector is sub-threshold, while the other is above the two-detector $\mathcal{L}$ value, i.e.~one has $\mathcal{L}_a < \mathcal{L}_{\rm th}\ \textrm{and}\ \mathcal{L}_b > \mathcal{L}_\cup$ and $f_b(t)$, the frequency path associated with $\mathcal{L}_b$, is close to the frequency path of the candidate when using data from both detectors, $f_\cup(t)$, i.e. \begin{equation} |f_\cup(t) - f_b(t)| < 2\pi a_0 f_\cup / P\,, \label{eq:vetoclose} \end{equation} then the candidate is likely to be a noise artefact in detector $b$, and is vetoed. \item If one has $\mathcal{L}_a < \mathcal{L}_{\rm th}\ \textrm{and}\ \mathcal{L}_b > \mathcal{L}_\cup$, but Eq.~\eqref{eq:vetoclose} does not hold then the candidate signal cannot be vetoed, as the single-interferometer searches did not find the same candidate. This could indicate that the candidate is a weak astrophysical signal that needs data from both detectors to be detectable. \item If one has $\mathcal{L}_a > \mathcal{L}_{\rm th}\ \textrm{and}\ \mathcal{L}_b > \mathcal{L}_{\rm th}$, the candidate could represent a strong astrophysical signal that is visible in data from both detectors independently, or it could represent a common noise source. Candidates in this category cannot be vetoed. \item If one has $\mathcal{L}_a < \mathcal{L}_{\rm th}\ \textrm{and}\ \mathcal{L}_b < \mathcal{L}_\cup$, data from both detectors is needed for the candidate to be above threshold, possible indicating a weak astrophysical signal. Candidates in this category cannot be vetoed. \end{enumerate} \subsection{Off-target veto \label{sec:ot_veto}} The third veto we apply to a candidate is to search an off-target sky position with the same orbital template. If the off-target search returns $\mathcal{L} > \mathcal{L}_{\rm th}$ then the candidate is likely instrumental rather than astrophysical. For this veto, off-target corresponds to shifting the target sky position $+40\,$m in RA and $+10^{\circ}$ in Dec. \section{O3 search results \label{sec:o3results}} The results of the search of all 20 targets are summarized in Fig.~\ref{fig:summary}, with $\alpha_{N_{\rm tot}}=0.3$, i.e.~a probability of false alarm per sub-band of 30\%. Each symbol indicates, for all templates with $\mathcal{L} > \mathcal{L}_{\rm th}$, the terminating frequency bin and $p_{\rm noise}$, the probability that a search of that candidate's sub-band in pure noise would return at least one candidate at least as loud as the one seen. Equation \eqref{eq:pn} in Appendix \ref{app:pnoise} defines $p_{\rm noise}$ explicitly. Each candidate is colored according to $\mathcal{L}$. We note that high $\mathcal{L}$ does not always correspond to low $p_{\rm noise}$ due to the differing ``trials factors'' in each sub-band, as accounted for when calculating $\mathcal{L}_{\rm th}$ via Eq.~\eqref{eq:alphan}. A low value of $p_{\rm noise}$ corresponds to a higher probability that the candidate is a true astrophysical signal. Targets not listed in the legend return zero candidates above threshold. We do not display in Fig.~\ref{fig:summary} candidates that are eliminated by any of the vetoes described in Sec.~\ref{sec:vetoes} for clarity. In total, across all targets and sub-bands, there are 4611 candidates with $\mathcal{L} > \mathcal{L}_{\rm th}$, before the vetoes are applied. All but 100 are eliminated by veto A (known line veto). A further 84 candidates are eliminated by veto B (single interferometer veto). None of the remaining candidates are eliminated by veto C (off-target veto), leaving 16 candidates passing all of the vetoes outlined in Sec.~\ref{sec:vetoes}. None of the surviving candidates from the O3 search coincide in their orbital template and terminating frequency bin with the seven above- or sub-threshold candidates from the O2 search (c.f. Table VI of Ref.~\cite{Middleton2020}). If we set $\alpha_{N_{\rm tot}}=0.01$, i.e.~set the probability of false alarm per sub-band to 1\%, the search does not return any candidates with $\mathcal{L}>\mathcal{L}_{\rm th}$ for any target or sub-band, after vetoes are applied. \begin{figure*} \centering \includegraphics[width=0.8\linewidth]{summary_pnoise.pdf} \caption{Summary of search results across all targets and sub-bands with $\mathcal{L} > \mathcal{L}_{\rm th}$. The different symbols correspond to candidates from different targets. The ordinate shows $p_{\rm noise}$ for each candidate, the probability that a search of that candidate's sub-band in pure noise would return at least one candidate at least as loud as the one seen. The color of each candidate indicates $\mathcal{L}$ (see color bar at right). Candidates that are eliminated by the vetoes outlined in Sec.~\ref{sec:vetoes} are not shown for clarity. Details on the search results are in Sec.~\ref{sec:o3results} and Appendix \ref{app:fullresults}.} \label{fig:summary} \end{figure*} In Secs.~\ref{sec:igrh}--\ref{sec:hete} we summarize the search results for each of the 20 targets. To guide the reader, and not clutter the main body of the paper, the full search results for one target, IGR J18245$-$2452, are shown in Fig.~\ref{fig:igrh}, while the full search results for the other 19 targets are shown in Figs.~\ref{fig:igra}--\ref{fig:hete} in Appendix \ref{app:fullresults}. The orbital template, terminating frequency bin, $\mathcal{L}$, and $p_{\rm noise}$ for all 16 candidates with $\mathcal{L} > \mathcal{L}_{\rm th}$ are collated in Table \ref{tab:outliers} in Appendix \ref{app:fullresults}. We present further follow-up of the 16 candidates in Appendix \ref{app:followup}. We find no convincing evidence that any are a true astrophysical signal. \subsection{IGR J18245$-$2452 \label{sec:igrh} } \begin{figure*} \centering \includegraphics[width=0.9\linewidth]{igr18245.pdf} \caption{Search results for IGR J18245$-$2452. Black crosses indicate the terminating frequency and $\mathcal{L}$ for the most likely path through the sub-band for each binary template. The vertical blue dashed (green dot-dashed) lines correspond to the threshold set via Gaussian (off-target) noise realizations, $\mathcal{L}_{\rm th,\,G}$ ($\mathcal{L}_{\rm th,\,OT}$), in each sub-band. Solid red lines in the right panel indicate the peak frequency of known instrumental lines in the Hanford detector; the orange band indicates the width of the line in the detector frame and the yellow band indicates the increased effective width due to Doppler broadening, as described in Sec.~\ref{sec:line_veto}. Multiple overlapping orange bands creates the red bands. The sub-band around $508.8\,$Hz is especially noisy due to test mass suspension violin mode resonances \cite{o23DetChar}. The transparency of crosses in sub-bands with many templates, is adjusted relative to the maximum $\mathcal{L}$ in that sub-band for clarity.} \label{fig:igrh} \end{figure*} The search results for IGR J18245$-$2452\ are presented in Fig.~\ref{fig:igrh}. Each marker in Fig.~\ref{fig:igrh} shows the terminating frequency and associated $\mathcal{L}$ of the most likely path through the sub-band for a given template, i.e.~choice of $P$ and $T_{\textrm{asc}}$. The vertical blue dashed (green dot-dashed) lines correspond to the threshold set via Gaussian (off-target) noise realizations, $\mathcal{L}_{\rm th,\,G}$ ($\mathcal{L}_{\rm th,\,OT}$), in each sub-band, with $\alpha_{N_{\rm tot}} = 0.3$. See Appendix \ref{app:thresh} for details on how we set thresholds in each sub-band. The horizontal red lines indicate known instrumental lines in the detector with bandwidth indicated by the shading. There are zero above-threshold candidates in the $f_\star$ and $4f_\star / 3$ sub-bands. There are 435 above-threshold candidates in the $2f_\star$ sub-band, which are all coincident with known noise lines in both the Livingston and Hanford detectors, and are therefore eliminated by veto A. The sub-band around $508\,$Hz is especially noisy due to violin mode resonances \cite{o23DetChar}. \subsection{IGR J00291$+$5934 \label{sec:igra} } The search results for IGR J00291$+$5934\ are shown in Fig.~\ref{fig:igra}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates in the $4f_\star / 3$ and $2f_\star$ sub-bands. There are three above-threshold candidates in the $f_\star$ sub-band, however all three of these candidates are coincident with known noise lines in the Hanford detector, and are therefore eliminated with veto A. \subsection{MAXI J0911$-$655 \label{sec:maxi} } The search results for MAXI J0911$-$655\ are shown in Fig.~\ref{fig:maxi}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates in the $f_\star$ and $2f_\star$ sub-bands. There is one above-threshold candidate in the $4f_\star / 3$ sub-band which survives all of the vetoes and has $p_{\rm noise}=0.26$. Additional follow-up, presented in Appendix \ref{app:followup}, does not provide any evidence that this candidate is a true astrophysical signal. \subsection{XTE J0929$-$314 \label{sec:xtea} } The search results for XTE J0929$-$314\ are shown in Fig.~\ref{fig:xtea}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates across all three sub-bands. \subsection{IGR J16597$-$3704 \label{sec:igrb} } The search results for IGR J16597$-$3704\ are shown in Fig.~\ref{fig:igrb}, which is laid out identically to Fig.~\ref{fig:igrh}. Each sub-band for this target is contaminated with known noise lines. There are 84 above-threshold candidates in the $4f_\star / 3$ sub-band, however they are all eliminated by veto B. One above-threshold candidate is returned in each of the $f_\star$ and $2f_\star$ sub-bands. Both of these candidates survive all of the vetoes, and have $p_{\rm noise}=0.30$ and $p_{\rm noise}=0.09$ respectively. Further follow-up, including the frequency path and cumulative log-likelihood for the latter candidate, is presented in Appendix \ref{app:followup}. This follow-up does not provide any evidence that either candidate is a true astrophysical signal. \subsection{IGR J17062$-$6143 \label{sec:igrc} } The search results for IGR J17062$-$6143\ are shown in Fig.~\ref{fig:igrc}, which is laid out identically to Fig.~\ref{fig:igrh}. Given the long-term timing presented in Ref.~\cite{Bult2021} there is only one template needed in each of the three sub-bands for this target. The template returns $\mathcal{L} > \mathcal{L}_{\rm th}$ in all three of the $f_\star$, $4f_\star / 3$, and $2f_\star$ sub-bands. All of these candidates survive all of the vetoes, and have $p_{\rm noise}=0.24$, $p_{\rm noise}=0.19$, and $p_{\rm noise}=0.05$ respectively. Further follow-up, including the frequency path and cumulative log-likelihood for the candidate with $p_{\rm noise}=0.05$, is presented in Appendix \ref{app:followup}. This follow-up does not provide any evidence that any of the three candidates are a true astrophysical signal. \subsection{IGR J17379$-$3747 \label{sec:igrd} } The search results for IGR J17379$-$3747\ are shown in Fig.~\ref{fig:igrd}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates in the $f_\star$ and $2f_\star$ sub-bands. There is one above-threshold candidate in the $4f_\star/3$ sub-band which survives all of the vetoes and has $p_{\rm noise}=0.08$. Further follow-up, including the frequency path and cumulative log-likelihood, for this candidate is presented in Appendix \ref{app:followup}. This follow-up does not provide any evidence that the candidate is a true astrophysical signal. \subsection{SAX J1748.9$-$2021 \label{sec:saxb} } The search results for SAX J1748.9$-$2021\ are shown in Fig.~\ref{fig:saxb}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates in the $f_\star$ sub-band. There are two above-threshold candidates in the $4 f_\star / 3$ sub-band which survive all of the vetoes and have $p_{\rm noise}=0.12$ and $p_{\rm noise}=0.27$. There is one above-threshold candidate in the $2 f_\star$ sub-band which survives all of the vetoes and has $p_{\rm noise}=0.22$. Additional follow-up, presented in Appendix \ref{app:followup}, does not provide any evidence that any of the three candidates are a true astrophysical signal. \subsection{NGC 6440 X$-$2 \label{sec:ngc} } The search results for NGC 6440 X$-$2\ are shown in Fig.~\ref{fig:ngc}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates across all three sub-bands. \subsection{IGR J17494$-$3030 \label{sec:igri} } The search results for IGR J17494$-$3030\ are shown in Fig.~\ref{fig:igri}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates in the $f_\star$ and $2f_\star$ sub-bands. All 4050 candidates in the $4f_\star/3$ sub-band are above threshold, however all of them are coincident with a known noise line in the Hanford detector, and are therefore eliminated with veto A. The sub-band around $501.7\,$Hz is especially noisy due to violin mode resonances \cite{o23DetChar}. \subsection{Swift J1749.4$-$2807 \label{sec:swiftb} } The search results for Swift J1749.4$-$2807\ are shown in Fig.~\ref{fig:swiftb}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates in the $f_\star$ and $4f_\star / 3$ sub-bands. There is one above threshold candidate in the $2 f_\star$ sub-band. However it is coincident with a known noise line in the Hanford detector, and is therefore eliminated by veto A. \subsection{IGR J17498$-$2921 \label{sec:igre} } The search results for IGR J17498$-$2921\ are shown in Fig.~\ref{fig:igre}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates in the $f_\star$, and $4f_\star / 3$ sub-bands. There is one above-threshold candidate in the $2f_\star$ sub-band which survives all of the vetoes and has $p_{\rm noise}=0.22$. Additional follow-up, presented in Appendix \ref{app:followup}, does not provide any evidence that this candidate is a true astrophysical signal. \subsection{IGR J17511$-$3057 \label{sec:igrf} } The search results for IGR J17511$-$3057\ are shown in Fig.~\ref{fig:igrf}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates across all three sub-bands. \subsection{XTE J1751$-$305 \label{sec:xteb} } The search results for XTE J1751$-$305\ are shown in Fig.~\ref{fig:xteb}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates across all three sub-bands. \subsection{Swift J1756.9$-$2508 \label{sec:swift} } The search results for Swift J1756.9$-$2508\ are shown in Fig.~\ref{fig:swift}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates across all three sub-bands. \subsection{IGR J17591$-$2342 \label{sec:igrg} } The search results for IGR J17591$-$2342\ are shown in Fig.~\ref{fig:igrg}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates across all three sub-bands. \subsection{XTE J1807$-$294 \label{sec:xtec} } The search results for XTE J1807$-$294\ are shown in Fig.~\ref{fig:xtec}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates in the $f_\star$ and $4f_\star / 3$ sub-bands. There is one above-threshold candidate in the $2f_\star$ sub-band which survives all of the vetoes and has $p_{\rm noise}=0.10$. Further follow-up, including the frequency path and cumulative log-likelihood, for this candidate is presented in Appendix \ref{app:followup}. This follow-up does not provide any evidence that the candidate is a true astrophysical signal. \subsection{SAX J1808.4$-$3658 \label{sec:sax} } The search results for SAX J1808.4$-$3658\ are shown in Fig.~\ref{fig:sax}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates in the $f_\star$ and $2f_\star$ sub-bands. There are two above-threshold candidates in the $4f_\star / 3$ sub-band which survive all of the vetoes and have $p_{\rm noise}=0.16$ and $p_{\rm noise}=0.30$. Additional follow-up, presented in Appendix \ref{app:followup}, does not provide any evidence that either candidate is a true astrophysical signal. SAX J1808.4$-$3658\ was observed in outburst in August 2019, during O3a \cite{Bult2020}. This allows us to perform an additional target-of-opportunity search during only its active phase. If the target only emits continuous gravitational waves during outburst, searching a shorter duration of data increases the probability of detection by increasing the signal-to-noise ratio. The details and results of this target-of-opportunity search are in Sec.~\ref{sec:shortsax}. In summary, after searching with three separate coherence times of $T_{\textrm{drift}} = 1\,$d, $T_{\textrm{drift}}=8\,$d, and $T_{\textrm{drift}}=24\,$d, only one candidate is above threshold and survives all of the vetoes. The candidate is found using $T_{\textrm{drift}}=24\,$d in the $f_\star$ sub-band, and has $p_{\rm noise} = 0.02$. Additional follow-up does not reveal any informative features that would distinguish between an astrophysical signal and noise. It does not coincide with either of the two candidates in the $4f_\star / 3$ sub-band found in the semi-coherent search using the full O3 data set. \subsection{XTE J1814$-$338 \label{sec:xted} } The search results for XTE J1814$-$338\ are shown in Fig.~\ref{fig:xted}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates in the $4f_\star / 3$ and $2f_\star$ sub-bands. There is one above-threshold candidate in the $f_\star$ sub-band which survives all of the vetoes and has $p_{\rm noise}=0.08$. Further follow-up, including the frequency path and cumulative log-likelihood, for this candidate is presented in Appendix \ref{app:followup}. This follow-up does not provide any evidence that the candidate is a true astrophysical signal. \subsection{HETE J1900.1$-$2455 \label{sec:hete} } The search results for HETE J1900.1$-$2455\ are shown in Fig.~\ref{fig:hete}, which is laid out identically to Fig.~\ref{fig:igrh}. There are zero above-threshold candidates in the $f_\star$ sub-band. All 22 templates in the $4f_\star / 3$ sub-band return candidates above $\mathcal{L}_{\rm th}$, however these candidates are all coincident with known noise lines in the Hanford detector, and are summarily eliminated with veto A. The sub-band around $503\,$Hz is especially noisy due to violin mode resonances \cite{o23DetChar}. There is one above-threshold candidate in the $2f_\star$ sub-band which survives all of the vetoes and has $p_{\rm noise}=0.25$. Additional follow-up, presented in Appendix \ref{app:followup}, does not provide any evidence that this candidate is a true astrophysical signal. \section{Target-of-opportunity search: SAX J1808.4$-$3658\ in outburst \label{sec:shortsax}} On August 7 2019 SAX J1808.4$-$3658\ went into outburst \cite{Bult2019}. The Neutron star Interior Composition Explorer (NICER) team undertook a high-cadence monitoring campaign, and performed a timing analysis of the pulsations \cite{Bult2020}. The outburst lasted for roughly 24 days, with enhanced X-ray flux observed between August 7 2019 and August 31 2019 (see Fig.~1 of Ref.~\cite{Bult2020}). Outburst events are attributed to in-falling plasma that is channeled by the magnetosphere onto a localized region on the neutron star surface, creating a hot spot that rotates with the star \cite{Romanova2004}. As the observed X-ray flux is assumed to be linearly proportional to the mass accretion rate, an outburst could result in a larger mountain on the neutron star surface (or excite $r$-modes in the interior), compared to when the AMXP is in quiescence \cite{Haskell2015GW, Haskell2017a}. If continuous gravitational waves are only emitted from SAX J1808.4$-$3658\ when it is in outburst, searching all of the O3 data decreases the signal-to-noise ratio, as compared to only searching data from the outburst. To protect against this possibility, we do an additional search for continuous gravitational waves from SAX J1808.4$-$3658\ using data from both LIGO observatories between 1249171218 GPS time (August 7 2019) and 1251244818 GPS time (August 31 2019), rather than data from the entirety of O3, as in Sec.~\ref{sec:sax}. \subsection{Search parameters} The search algorithm is laid out in Sec.~\ref{sec:alg}. We run the search using three different coherence times, setting $T_{\textrm{drift}} = 1\,$d, $T_{\textrm{drift}} = 8\,$d, and $T_{\textrm{drift}} = 24\,$d. We search three sub-bands centered on $\{1, 4/3, 2\}f_\star$, for each $T_{\textrm{drift}}$. The width of the sub-band depends on $T_{\textrm{drift}}$. It is $\sim 0.76\,$Hz for the searches with $T_{\textrm{drift}}=1\,$d and $8\,$d, and is $\sim 1.01\,$Hz for the search with $T_{\textrm{drift}}=24\,$d. Given the precise timing achieved during the outburst in 2019 \cite{Bult2020}, and the shorter search duration, only one $\{P,\ T_{\textrm{asc}},\ a_0\}$ template is required for each sub-band, according to Eqs.~\eqref{eq:np}--\eqref{eq:ntasc}. Due to the different values of $T_{\textrm{drift}}$, shorter total duration, and different number of templates, we re-calculate $\mathcal{L}_{\rm th}$ for each sub-band and value of $T_{\textrm{drift}}$, using the procedure outlined in Sec.~\ref{sec:thresh} and Appendix \ref{app:thresh}. As in the full O3 search, we set the probability of false alarm in each sub-band at $\alpha_{N_{\rm tot}} = 0.3$. For all candidates that have $\mathcal{L} > \mathcal{L}_{\rm th}$ we apply the three vetoes described in \ref{sec:vetoes}. \subsection{Search results} For $T_{\textrm{drift}} = 1\,$d, the search in the $f_\star$ sub-band returns one candidate above $\mathcal{L}_{\rm th}$. The candidate survives both veto A (known line) and veto B (single interferometer), but fails veto C (off-target). The searches in the $4/3f_\star$ and $2f_\star$ sub-bands do not return any candidates above $\mathcal{L}_{\rm th}$. For $T_{\textrm{drift}} = 8\,$d, there are no candidates above $\mathcal{L}_{\rm th}$ in any of the three sub-bands. For $T_{\textrm{drift}} = 24\,$d, the searches in the $4 f_\star /3$ and $2f_\star$ sub-bands do not return any candidates above $\mathcal{L}_{\rm th}$. The search in the $f_\star$ sub-band does return one candidate above $\mathcal{L}_{\rm th}$. This candidate survives all of the vetoes outlined in Sec.~\ref{sec:vetoes}. We remind the reader that with $\alpha_{N_{\rm tot}} = 0.3$ and nine sub-bands searched (three for each of the three choices of $T_{\textrm{drift}}$), we should expect $\sim 3$ candidates above threshold purely due to noise. The probability that we would see a value of $\mathcal{L}$ at least this large if this sub-band is pure noise, $p_{\rm noise}$, is 0.02. The template and frequency of the candidate are not coincident with any candidate from the full O3 search (see Table \ref{tab:outliers}) or the sub-threshold candidate found in the search of this sub-band in O2 data \cite{Middleton2020}. By setting $T_{\textrm{drift}} = T_{\rm obs} = 24\,$d we perform a fully coherent search across this time period, with a frequency bin size of $\Delta f = 2.4\times10^{-7}\,$Hz. We describe in Appendix \ref{app:shortsax_followup} further follow-up of this candidate. In summary, we find no significant evidence that it is an astrophysical signal rather than a noise fluctuation. \section{Frequentist upper limits \label{sec:ul}} If we assume that the remaining candidates reported in Sec.~\ref{sec:o3results} and Appendix \ref{app:fullresults} are false alarms, we can place an upper limit on the wave strain that is detectable at a confidence level of 95\%, $h_0^{95\%}$, in a sub-band. The value of $h_0^{95\%}$ is a function of our algorithm, the detector configuration during O3, and our assumptions about the signal model. We describe the method used to estimate $h_0^{95\%}$ in Sec.~\ref{sec:ul_method}, present the upper limits in each sub-band in Sec.~\ref{sec:ul_results}, and compare the results to indirect methods that calculate the expected strain in the $2f_\star$ sub-band in Sec.~\ref{sec:ul_comp}. The astrophysical implications are discussed in Sec.~\ref{sec:ul_impl}. \subsection{Upper limit procedure in a sub-band \label{sec:ul_method}} We set empirical frequentist upper limits in each sub-band using a sequence of injections into O3 SFTs. For each sub-band we inject $N_{\rm trials}=100$ simulated binary signals at 12--15 fixed values of $h_0$ using \texttt{lalapps\_Makefakedata\_v5} \cite{LAL2018}. For each of the $N_{\rm trials}$ injections at a fixed $h_0$ we select a constant injection frequency, $f_{\rm inj}$, uniformly from the sub-band. While the injected signal has zero spin-wandering, we still use $T_{\textrm{drift}}=10\,$d in the search algorithm outlined in Sec.~\ref{sec:alg} to mimic the real search. The injected period, $P_{\rm inj}$, and time of ascension, $T_{\rm asc,\,inj}$ are chosen uniformly from the ranges $[P - 3\sigma_P, P + 3\sigma_P]$ and $[T_{\textrm{asc}} - 3\sigma_{T_{\textrm{asc}}}, T_{\textrm{asc}} + 3\sigma_{T_{\textrm{asc}}}]$ respectively. We keep $a_0$ fixed at the precisely known value for each target. The polarization, $\psi$, is chosen uniformly from the range $[0, 2\pi]$. The cosine of the projected inclination angle of the neutron star spin axis with our line of sight, $\cos\iota$, is chosen uniformly from the range $[-1, 1]$\footnote{While the inclination angle of the binary with respect to our line of sight is restricted via EM observations for some of our targets, we opt to marginalize over $\cos\iota$ as the neutron star spin axis may not necessarily align with the orbital axis of the binary. It is possible to scale our results via equation (19) of Ref.~\cite{Messenger2015a}, if one wishes to fix $\cos\iota$.}. We then search for the injected signal with the template in this sub-band's template grid that is nearest to $\{P_{\rm inj}, T_{\rm asc,\,inj}\}$. By recording the fraction of injected signals we recover at each $h_0$ with $\mathcal{L} > \mathcal{L}_{\rm th}$ we estimate the efficiency, $\varepsilon$, as a function of $h_0$. We then perform a logistic regression \cite{Gelman2013} to obtain a sigmoid fit to $\varepsilon(h_0)$, and solve \begin{equation} \varepsilon(h_0^{95\%}) = 0.95\ , \label{eq:effic_95} \end{equation} to find an estimate of $h_0^{95\%}$ in the given sub-band. One might reasonably ask, how precise is this estimate of $h_0^{95\%}$? The main factors impacting the precision are: \begin{enumerate*}[label=(\roman*)] \item the precision of the most likely parameters of the sigmoid, as estimated via logistic regression, when solving Eq.~\eqref{eq:effic_95} for $h_0^{95\%}$, given the $N_{\rm trials}$ injections done at 12--15 values of $h_0$; and \item the assumption that the strain data (and hence the SFTs) are perfectly calibrated. \end{enumerate*} We investigate the impact of (i) by drawing alternative sigmoid fits of $\varepsilon(h_0)$ using the covariance matrix of the parameters returned by the logistic regression. We find that inverting these alternative fits through Eq.~\eqref{eq:effic_95} results in a value of $h_0^{95\%}$ that varies by less than $5\%$ from the value calculated via the most likely parameters (at the 95\% confidence level). The impact of (ii) is trickier to quantify. As described in Refs.~\cite{Sun2020, Sun2021} the median systematic error in the magnitude of the strain is less than $2\%$ in the 20--2000\,Hz frequency band across O3a. The statistical uncertainty around the measurement of calibration bias means that in the worst case the true magnitude of the calibration bias may be as large as $7\%$. However, the calibration bias at a given frequency is not correlated between the detectors (see Figures 16 and 17 in Ref.~\cite{Sun2020}), and so the impact on a continuous gravitational wave search that combines data from both detectors is likely to be less than $7\%$. In light of the above considerations we quote $h_0^{95\%}$ to a precision of two significant figures, but we emphasize that estimating $h_0^{95\%}$ involves many (potentially compounding) uncertainties. Subsequent conclusions about the physical system that are drawn from estimates of $h_0^{95\%}$ cannot be more precise than the estimate of $h_0^{95\%}$ itself. \subsection{Upper limits \label{sec:ul_results}} The estimates of $h_0^{95\%}$ for each target and sub-band are listed in Table \ref{tab:ul}. Dashes correspond to sub-bands that are highly contaminated with noise lines, which preclude the procedure described in Sec.~\ref{sec:ul_method}, as one always finds $\mathcal{L} > \mathcal{L}_{\rm th}$, regardless of $h_0$. The most sensitive sub-bands are for IGR J17062$-$6143 with $h_0^{95\%} = 4.7 \times 10^{-26}$ in both the $4f_\star/3$ and $2f_\star$ sub-bands (centered around 218.2\,Hz and 327.6\,Hz respectively). These sub-bands lie in the most sensitive band of the detector, and the binary elements are known to high precision \cite{Bult2021}, so only one template is needed in each sub-band, corresponding to a relatively lower $\mathcal{L}_{\rm th}$ at fixed probability of false alarm. No estimates of $h_0^{95\%}$ were established in Ref.~\cite{Middleton2020} for the five targets therein. The search of XTE J1751$-$305 in S6 data estimated $h_0^{95\%} \approx 3.3\times10^{-24}$, $4.7\times10^{-24}$, and $7.8\times10^{-24}$ in three sub-bands corresponding to $f_\star$, an $r$-mode frequency, and $2f_\star$ respectively \cite{s6twoSpectScoXTE}. Our estimates of $h_0^{95\%}$ for XTE J1751$-$305 improve these results by two orders of magnitude, because the detector is more sensitive, and $T_{\textrm{drift}}$ is longer. \begin{table}[t] \caption{Upper limits on the detectable gravitational wave strain at a 95\% confidence level, $h_0^{95\%}$, in each of the sub-bands for each target. See Sec.~\ref{sec:ul_method} for details on how they are estimated, and the precision to which they are known. Upper limits are not estimated in sub-bands marked with a ``$-$'' as these sub-bands are highly contaminated with known noise lines. \label{tab:ul}} \begin{ruledtabular} \begin{tabular}{l d{5} d{5} d{5}} & \multicolumn{3}{c}{\textrm{$h_0^{95\%}$ in each sub-band ($\times 10^{-26}$)}} \\ \textrm{Target} & \textrm{$f_{\rm \star}$} & \textrm{$4f_{\rm \star}/3$} & \textrm{$2f_{\rm \star}$} \\ \midrule IGR J00291$+$5934 & - & 7.6 & 11 \\ MAXI J0911$-$655 & 7.7 & 6.4 & 7.3 \\ XTE J0929$-$314 & 5.1 & 5.3 & 6.4 \\ IGR J16597$-$3704 & 7.5 & - & 5.6 \\ IGR J17062$-$6143 & 8.1 & 4.7 & 4.7 \\ IGR J17379$-$3747 & 8.5 & 7.4 & 10 \\ SAX J1748.9$-$2021 & 9.2 & 7.7 & 10 \\ NGC 6440 X$-$2 & 6.2 & 7.2 & 5.8 \\ IGR J17494$-$3030 & 8.3 & - & 9.0 \\ Swift J1749.4$-$2807 & 11 & 17 & 24 \\ IGR J17498$-$2921 & 7.0 & 6.6 & 8.4 \\ IGR J17511$-$3057 & 7.5 & 5.5 & 6.6 \\ XTE J1751$-$305 & 10 & 8.3 & 9.7 \\ Swift J1756.9$-$2508 & 8.1 & 8.8 & 6.3 \\ IGR J17591$-$2342 & 9.5 & 11 & 14 \\ XTE J1807$-$294 & 6.1 & 5.0 & 5.6 \\ SAX J1808.4$-$3658 & 6.4 & 6.9 & 8.8 \\ XTE J1814$-$338 & 9.4 & 6.0 & 6.9 \\ IGR J18245$-$2452 & 9.0 & 6.3 & - \\ HETE J1900.1$-$2455 & 5.6 & - & 8.4 \\ \end{tabular} \end{ruledtabular} \end{table} \subsection{Comparison to expected strain from AMXPs \label{sec:ul_comp}} \begin{table*}[t] \begin{threeparttable} \caption{Maximum expected strain from each target, as inferred from EM observations. The second column contains the best estimate for the distance to the target. Targets with ``-'' listed as the frequency derivative (third column), $\dot{f}_\star$, do not have a measured value during outburst, and also do not have a long-term (quiescent) $\dot{f}_\star$ measured either. The labels (A) and (Q) indicate that $\dot{f}_\star$ is measured in outburst and quiescence respectively. The scaling equations used to estimate the maximum spin-down strain (fourth column), $h_{0,\,\textrm{sd}}$, and the maximum strain assuming torque-balance (sixth column), $h_{0\,\textrm{torque}}$, are Eqs.~\eqref{eq:h0sd} and \eqref{eq:h0t} respectively. The $h_{0,\,\textrm{sd}}$ value is calculated using the central distance and $\dot{f}_\star$ estimates. The $h_{0\,\textrm{torque}}$ value is calculated using the maximum bolometric X-ray flux measured during outburst (fifth column), $F_{X,\,\textrm{max}}$, which is typically measured to a precision of $\sim10\%$. The X-ray flux of each target in quiescence is not shown, as it is only measured for half of the targets, and is usually $\sim1-2$ orders of magnitude lower than $F_{X,\,\textrm{max}}$. The seventh column contains $h_0^{95\%}$ in the $2f_\star$ sub-band (fourth column of Table \ref{tab:ul}) to facilitate comparisons between $h_0^{95\%}$ and $h_{0\,\textrm{torque}}$ or $h_{0,\,\textrm{sd}}$. \label{tab:exp_ul}} \begin{ruledtabular} \begin{tabular}{l r r r r r r l} & \textrm{Distance} & & \textrm{$h_{0,\,\textrm{sd}}$} & \textrm{$F_{X,\,\textrm{max}}$ $(\times 10^{-8}$} & \textrm{$h_{0,\textrm{torque}}$} & \textrm{$h_0^{95\%}$} & \\ Target & \textrm{(kpc)} & \textrm{$\dot{f}_\star$ (Hz\,s$^{-1}$)} & \textrm{$(\times 10^{-26})$} & \textrm{erg\,s$^{-1}\,$cm$^{-2}$)} & \textrm{$(\times 10^{-26})$} & \textrm{$(\times 10^{-26})$} & \textrm{Refs.} \\ \midrule IGR J00291$+$5934 & \textrm{4.2(5)} & $-4.0(1.4)\times 10^{-15}$ (Q) & 0.05 & 0.35 & 0.2 & 11 &\cite{Watts2008, Papitto2011, Sanna2017, DeFalco2017} \\ MAXI J0911$-$655 & \textrm{9.45(15)} & - & - & 0.047 & 0.1 & 7.3 &\cite{Watkins2015, Homan2016, Sanna0911} \\ XTE J0929$-$314 & \textrm{7.4\tnote{a}} & $-9.2(4)\times 10^{-14}$ (A) & 0.2 & 0.1 & 0.2 & 6.4 &\cite{Galloway2002, Watts2008, Marino2017} \\ IGR J16597$-$3704 & \textrm{9.1\tnote{b}} & - & - & 0.065 & 0.2 & 5.6 &\cite{Sanna16597} \\ IGR J17062$-$6143 & \textrm{7.3(5)} & $+3.77(9)\times 10^{-15}$ (A) & 0.04\tnote{g} & 0.006 & 0.05 & 4.7 &\cite{Keek2017, Bult2021} \\ IGR J17379$-$3747 & \textrm{8\tnote{c}} & $-1.2(1.9)\times 10^{-14}$\tnote{e} (A) & 0.05 & 0.04 & 0.08 & 10 &\cite{VanDenEijnden2018a, Negoro2018, Sanna17379, Bult17379} \\ SAX J1748.9$-$2021 & \textrm{8.5\tnote{b}} & - & - & 0.077 & 0.1 & 10 &\cite{Watts2008, Harris2010, Sanna1748, Sharma2020} \\ NGC 6440 X$-$2 & \textrm{8.5\tnote{b}} & - & - & 0.02 & 0.09 & 5.8 &\cite{Harris2010, Bult2015} \\ IGR J17494$-$3030 & \textrm{8\tnote{c}} & $-2.1(7)\times 10^{-14} $ (Q) & 0.07 & 0.0143 & 0.05 & 9.0 &\cite{Ng2021} \\ Swift J1749.4$-$2807 & \textrm{6.7(1.3)} & - & - & 0.0352 & 0.07 & 24 &\cite{Wijnands2009, Bult2021a, Sanna1749} \\ IGR J17498$-$2921 & \textrm{7.6(1.1)} & $-6.3(1.9)\times 10^{-14}\ \tnote{e}\ $ (A) & 0.1 & 0.2 & 0.2 & 8.4 &\cite{Linares2011, Papitto17498, Falanga2012} \\ IGR J17511$-$3057 & \textrm{3.6(5)} & $+4.8(1.4)\times 10^{-14} $ (A) & 0.2\tnote{g} & 0.2 & 0.2 & 6.6 &\cite{Riggio17511} \\ XTE J1751$-$305 & \textrm{6.7\tnote{d}} & $-5.5(1.2)\times 10^{-15}$ (Q) & 0.04 & 0.29 & 0.2 & 9.7 &\cite{Watts2008, Papitto1751, Riggio2011} \\ & & $+3.7(1.0)\times 10^{-13}$ (A) & 0.2\tnote{g} & & & & \\ Swift J1756.9$-$2508 & \textrm{8\tnote{c}} & $-4.8(6)\times 10^{-16}$ (Q) & 0.02 & 0.288 & 0.3 & 6.3 &\cite{Watts2008, Sanna1756} \\ & & $-4.3(2.1)\times 10^{-11}$\ \tnote{e}\ \ (A) & 5 & & & & \\ IGR J17591$-$2342 & \textrm{7.6(7)} & $-7.1(4)\times 10^{-14} $ (A) & 0.1 & 0.0535 & 0.09 & 14 &\cite{Gusinskaia2020, Kuiper2020, Sanna17591} \\ SAX J1808.4$-$3658 & \textrm{3.5(1)} & $-1.01(7)\times 10^{-15}$ (Q) & 0.08\tnote{g} & 0.103 & 0.1 & 5.6 &\cite{Galloway2006, Watts2008, Bult2020} \\ & & $-3.02(13)\times 10^{-13}$\ \tnote{f}\ \ (A) & 0.04 & & & & \\ XTE J1807$-$294 & \textrm{8\tnote{c}} & $+2.7(1.0)\times 10^{-14}$ (A) & 0.6 & 0.2 & 0.3 & 8.8 &\cite{Watts2008, Riggio2008, Patruno1807} \\ XTE J1814$-$338 & \textrm{10.25(1)} & $-6.7(7)\times 10^{-14}$ (A) & 0.1 & 0.069 & 0.1 & 6.9 &\cite{Papitto1814, Watts2008, DAvanzo2009} \\ IGR J18245$-$2452 & \textrm{5.5\tnote{b}} & - & - & 0.0466 & 0.1 & - &\cite{Harris2010, Papitto18245, Campana2018} \\ HETE J1900.1$-$2455 & \textrm{4.5(2)} & $+4.2(1)\times 10^{-13}$ (A) & 0.4\tnote{g} & 0.09 & 0.1 & 8.4 &\cite{Suzuki2007, Galloway2008, Patruno1900, Watts2008} \\ \end{tabular} \end{ruledtabular} \begin{tablenotes} \item[a]{Estimate assumes conservative mass transfer during accretion. An alternative estimate gives less than $4\,$kpc \cite{Marino2017}.} \item[b]{Uncertainty not quoted as target located in a globular cluster.} \item[c]{Unknown, but as the target is in the direction of the galactic centre a fiducial value of 8\,kpc is assumed in the literature.} \item[d]{Lower limit.} \item[e]{Estimate of $\dot{f}_\star$ consistent with zero at a $3\sigma$ level.} \item[f]{During the 2015 outburst $\dot{f} = 1.1(3)\times 10^{-10}$\,Hz\,s$^{-1}$ was measured \cite{Sanna2017a}, corresponding to $h_{0,\,\textrm{sd}}=9\times 10^{-26}$.} \item[g]{Assumes $\dot{f}_\textrm{GW} \approx - \dot{f}_\star$, see text for details.} \end{tablenotes} \end{threeparttable} \end{table*} It is valuable to consider how strong the signal from our targets could be, given EM observations. If we assume that all rotational energy losses, as observed in the frequency derivative $\dot{f}_\star$, are converted into gravitational radiation, the indirect spin-down limit on the maximum strain, $h_{0,\,\textrm{sd}}$, is \cite{Riles2013a} \begin{align} h_{0,\,\textrm{sd}} = &~4.0\times 10^{-28} \left( \frac{8\,{\rm kpc}}{D}\right) \nonumber \\ &\times \left(\frac{600\,{\rm Hz}}{f_{\rm GW}} \right)^{1/2} \left(\frac{-\dot{f}_{\rm GW}}{10^{-14}\,{\rm Hz\,s}^{-1}} \right)^{1/2}\ , \label{eq:h0sd} \end{align} where $D$ is the distance to the target, $f_{\rm GW}$ is the gravitational wave frequency, and $\dot{f}_{\rm GW}$ is its derivative. In Eq.~\eqref{eq:h0sd} we assume $I_{zz} / I_0 \approx 1$, i.e.~the $zz$ component of the moment-of-inertia tensor ($I_{zz}$) is very close to the moment-of-inertia of an undeformed star ($I_0$). We assume $f_{\rm GW} \approx 2 f_\star$ when computing Eq.~\eqref{eq:h0sd} for each of our targets. We list the best estimates for the distance to each target in the second column of Table \ref{tab:exp_ul}. These estimates are typically poorly known, especially if there is no known counterpart observed in wavelengths other than X-ray for the target. We use the central estimate of the distance in Eq.~\eqref{eq:h0sd}. For AMXPs, $\dot{f}_\star$ is estimated by constructing a phase-connected timing solution when the target is in outburst, but estimates for $\dot{f}_\star$ in quiescence are also possible for targets that have gone into outburst multiple times. The $\dot{f}_\star$ observed during outburst can be either positive (corresponding to spin-up) or negative (corresponding to spin-down), while in quiescence $\dot{f}_\star$ is typically (but not always) negative \cite{Ghosh1977, Melatos2016}. The third column of Table \ref{tab:exp_ul} records $\dot{f}_\star$ for each of our targets. When $\dot{f}_\star$ has been measured in multiple outburst events, only the $\dot{f}_\star$ from the most recent outburst is listed. For $\dot{f}_\star < 0$ we assume $\dot{f}_\textrm{GW} \approx 2 \dot{f}_\star$ in Eq.~\eqref{eq:h0sd}. For targets with $\dot{f}_\star < 0$ (in either quiescent or active phases) we find $10^{-28} \lesssim h_{0,\,\textrm{sd}} \lesssim 10^{-27}$ (fourth column of Table \ref{tab:exp_ul}), an order of magnitude lower than the estimated value of $h_0^{95\%}$. As argued in Ref.~\cite{Middleton2020}, for $\dot{f}_\star > 0$ the torque due to gravitational radiation reaction may be masked by the accretion torque, allowing arbitrarily large $\dot{f}_\textrm{GW}$, as long as one has $\dot{f}_\star = \dot{f}_\textrm{acc} + \dot{f}_\textrm{GW}$, where $\dot{f}_\textrm{acc}$ is the spin-up rate due to accretion. A reasonable choice, without excessive fine-tuning, is to set $\dot{f}_\textrm{GW} \approx - \dot{f}_\star$, for an order-of-magnitude estimate in Eq.~\eqref{eq:h0sd}, i.e.~assuming $|\dot{f}_\textrm{acc}| \approx 2 |\dot{f}_\textrm{GW}|$. The resultant values for $h_{0,\,\textrm{sd}}$ for targets with $\dot{f}_\star > 0$ are all well below the estimates of $h_0^{95\%}$ set in Sec.~\ref{sec:ul_results}, and fall in the range $10^{-28} \lesssim h_{0,\,\textrm{sd}} \lesssim 10^{-27}$. Another avenue through which EM observations can constrain $h_0$ is by assuming that the X-ray flux is proportional to the mass accretion rate, and that the torque due to accretion balances the gravitational radiation reaction. The torque-balance limit is \cite{Riles2013a, Zhang2021} \begin{align} h_{0,\,\textrm{torque}} = &~5\times 10 ^{-27}\left(\frac{600\,\textrm{Hz}}{f_\textrm{GW}}\right)^{1/2} \nonumber \\ &\times \left(\frac{F_X}{10^{-8}\,\textrm{erg\,s$^{-1}\,$cm$^{-2}$}}\right)^{1/2}\ , \label{eq:h0t} \end{align} where $F_X$ is the observed bolometric X-ray flux. Eq.~\eqref{eq:h0t} has a few hidden assumptions, namely: \begin{enumerate*}[label=\roman*)] \item that the mass of the neutron star is $1.4M_\odot$, \item that all of the accretion luminosity is radiated as an X-ray flux, and \item that the accretion torque is applied at the radius of the neutron star, which is set to 10\,km. \end{enumerate*} The exact dependence of the torque-balance limit on these assumptions is discussed in Ref.~\cite{Zhang2021}. We take $f_{\rm GW} \approx 2 f_\star$ for each of our targets, as for Eq.~\eqref{eq:h0sd}. We take $F_X = F_{X,\,\textrm{max}}$, the maximum recorded X-ray flux from each target when it was in outburst (fifth column of Table \ref{tab:exp_ul}), providing an upper limit on $h_{0,\,\textrm{torque}}$ (sixth column of Table \ref{tab:exp_ul}). We find $5\times 10^{-28} \lesssim h_{0,\,\textrm{torque}} \lesssim 1\times 10^{-27}$ across all targets. \subsection{Astrophysical implications \label{sec:ul_impl}} \begin{figure*} \centering \includegraphics[width=0.8\linewidth]{kde.pdf} \caption{Kernel density estimate of the PDF of the constraints on ellipticity $\epsilon^{95\%}$ (left panel) and dimensionless $r$-mode amplitude $\alpha^{95\%}$ (right panel) via Eqs.~\eqref{eq:ellip} and \eqref{eq:alpha} respectively. Both PDFs are normalized to a height of one. The black dashes in both panels correspond to the individual estimates of $\epsilon^{95\%}$ or $\alpha^{95\%}$ from each target.} \label{fig:kde} \end{figure*} The estimates of $h_0^{95\%}$ given in Sec.~\ref{sec:ul_results} can be converted into constraints on the physical parameters that govern the mechanism putatively generating continuous gravitational waves in each sub-band. In the $2f_\star$ sub-band the simplest emission mechanism is that of a perpendicular biaxial rotator (using the language from Ref.~\cite{Sun2019}), for which we calculate the upper limit of the ellipticity of the neutron star as \cite{Jaranowski1998} \begin{equation} \epsilon^{95\%} = 2.1 \times 10^{-6} \left(\frac{h_0^{95\%}}{10^{-25}} \right) \left(\frac{D}{8\,\textrm{kpc}} \right) \left(\frac{600\,\textrm{Hz}}{f_{\textrm{GW}}} \right)^2\ , \label{eq:ellip} \end{equation} assuming $I_{zz} = 10^{38}\,$kg\,m$^2$. Using the central estimate for $D$ (second column of Table \ref{tab:exp_ul}), we find the strictest constraint, from all of our targets, $\epsilon^{95\%} = 3.1\times 10^{-7}$ for IGR J00291$+$5934. A kernel density estimate of the probability density function (PDF) of the constraints $\epsilon^{95\%}$, $\hat{p}(\epsilon^{95\%})$, for all our targets, is shown in the left panel of Fig.~\ref{fig:kde}. It is peaked around $\epsilon^{95\%} \sim 10^{-6}$. In the $4f_\star/3$ sub-band the emission mechanism is via $r$-modes, the strength of which is parameterized as \cite{Owen2010} \begin{equation} \alpha^{95\%} = 1.0\times10^{-4} \left(\frac{h_0^{95\%}}{10^{-25}} \right) \left(\frac{D}{8\,\textrm{kpc}} \right) \left(\frac{600\,\textrm{Hz}}{f_{\textrm{GW}}} \right)^3\ . \label{eq:alpha} \end{equation} Eq.~\eqref{eq:alpha} assumes $f_{\textrm{GW}} \approx 4f_\star/3$, which may not be true, as discussed in Sec.~\ref{sec:params} \cite{Idrisy2015, Caride2019}. The strictest constraint, from all of our targets, is $\alpha^{95\%} = 1.8\times 10^{-5}$, again for IGR J00291$+$5934. A kernel density estimate of the PDF of the constraints $\alpha^{95\%}$, $\hat{p}(\alpha^{95\%})$, for all our targets, is shown in the right panel of Fig.~\ref{fig:kde}. It is peaked around $\alpha^{95\%} \sim 10^{-4}$. The kernel density estimates of the PDFs $\hat{p}(\epsilon^{95\%})$ and $\hat{p}(\alpha^{95\%})$ in Fig.~\ref{fig:kde} are not constraints on $\epsilon$ and $\alpha$ respectively, nor are they expressing the uncertainty in each individual estimate of $\epsilon^{95\%}$ or $\alpha^{95\%}$ (which are dominated by the uncertainty in $h_0^{95\%}$, and the distance, see column two of Table~\ref{tab:exp_ul}). They are instead presented to indicate where the constraints on $\epsilon^{95\%}$ and $\alpha^{95\%}$ lie, given the strain upper limits calculated for the targets in this search. The physical mechanism for emission in the $f_\star$ sub-band is less well-defined. A biaxial non-perpendicular rotator emits gravitational radiation at both $f_\star$ and $2f_\star$ \cite{Jaranowski1998, Jones2010, Jones2015}. The emission at $f_\star$ dominates the $2f_\star$ emission for both $\theta \lesssim 20^{\circ}$ and $|\cos\iota| \lesssim 0.8$, where $\theta$ is the wobble angle (see figure 5 of Ref.~\cite{Sun2019} for details). The value of $\theta$ is low for certain models involving pinned superfluid interiors \cite{Jones2010, Melatos2015}. Other possibilities exist, including a triaxial rotator \cite{Zimmermann1980, Broeck2005, Lasky2013}. We recommend future searches to also consider searching the $f_\star$ sub-band, due to the wealth of information that a continuous gravitational wave detection at this frequency would provide regarding neutron star structure. \section{Conclusions} \label{sec:concl} We present the results of a search for continuous gravitational waves from 20 accreting low-mass X-ray binaries in the Advanced LIGO O3 dataset. Five of these targets were searched before in O2 \cite{Middleton2020}, and one was searched in S6 \cite{s6twoSpectScoXTE}. The search pipeline we use allows for spin-wandering and tracks the orbital phase of the binary via a hidden Markov model and the $\mathcal{J}$-statistic respectively. The targets have well-constrained rotational frequencies, $f_\star$, and orbital elements from electromagnetic observations of outburst events, restricting the parameter space. For each target we search three $\sim0.61\,$Hz-wide sub-bands centered on $\{1, 4/3, 2\}f_\star$. We also perform a target-of-opportunity search for emission from SAX J1808.4$-$3658, which went into outburst during O3a. We find no candidates that survive our veto procedure and are above a threshold corresponding to a 1\% false alarm probability per sub-band. We find 16 candidates that survive our astrophysical vetoes when we set the threshold to 30\% false alarm probability per sub-band. As we search a total of 60 sub-bands, this number of surviving candidates is consistent with the expected number of false alarms. These candidates are systematically investigated with further follow-up. In all cases, the follow-up does not provide convincing evidence that any are real astrophysical signals. However, they could not be convincingly ruled out, which is not surprising given their borderline significance. We record the orbital template and frequencies recovered for these candidates, and recommend that they are followed up in future gravitational wave data sets, and with different pipelines. The target-of-opportunity search returns one candidate above threshold that survives our veto procedure. Additional, detailed follow-up of this candidate does not produce convincing evidence that it is a true astrophysical signal rather than a noise fluctuation. Assuming all of the candidates are not astrophysical, we set upper limits on the strain at 95\% confidence in each sub-band. Using these estimates, the strictest constraint on neutron star ellipticity is $\epsilon^{95\%} = 3.1\times 10^{-7}$. The strictest constraint we place on the $r$-mode amplitude is $\alpha^{95\%} = 1.8\times 10^{-5}$. Both of these constraints come from IGR J00291$+$5934. \section*{Acknowledgements} This material is based upon work supported by NSF’s LIGO Laboratory which is a major facility fully funded by the National Science Foundation. The authors also gratefully acknowledge the support of the Science and Technology Facilities Council (STFC) of the United Kingdom, the Max-Planck-Society (MPS), and the State of Niedersachsen/Germany for support of the construction of Advanced LIGO and construction and operation of the GEO600 detector. Additional support for Advanced LIGO was provided by the Australian Research Council. The authors gratefully acknowledge the Italian Istituto Nazionale di Fisica Nucleare (INFN), the French Centre National de la Recherche Scientifique (CNRS) and the Netherlands Organization for Scientific Research, for the construction and operation of the Virgo detector and the creation and support of the EGO consortium. The authors also gratefully acknowledge research support from these agencies as well as by the Council of Scientific and Industrial Research of India, the Department of Science and Technology, India, the Science \& Engineering Research Board (SERB), India, the Ministry of Human Resource Development, India, the Spanish Agencia Estatal de Investigaci\'on, the Vicepresid\`encia i Conselleria d'Innovaci\'o, Recerca i Turisme and the Conselleria d'Educaci\'o i Universitat del Govern de les Illes Balears, the Conselleria d'Innovaci\'o, Universitats, Ci\`encia i Societat Digital de la Generalitat Valenciana and the CERCA Programme Generalitat de Catalunya, Spain, the National Science Centre of Poland and the Foundation for Polish Science (FNP), the Swiss National Science Foundation (SNSF), the Russian Foundation for Basic Research, the Russian Science Foundation, the European Commission, the European Regional Development Funds (ERDF), the Royal Society, the Scottish Funding Council, the Scottish Universities Physics Alliance, the Hungarian Scientific Research Fund (OTKA), the French Lyon Institute of Origins (LIO), the Belgian Fonds de la Recherche Scientifique (FRS-FNRS), Actions de Recherche Concertées (ARC) and Fonds Wetenschappelijk Onderzoek – Vlaanderen (FWO), Belgium, the Paris \^{I}le-de-France Region, the National Research, Development and Innovation Office Hungary (NKFIH), the National Research Foundation of Korea, the Natural Science and Engineering Research Council Canada, Canadian Foundation for Innovation (CFI), the Brazilian Ministry of Science, Technology, and Innovations, the International Center for Theoretical Physics South American Institute for Fundamental Research (ICTP-SAIFR), the Research Grants Council of Hong Kong, the National Natural Science Foundation of China (NSFC), the Leverhulme Trust, the Research Corporation, the Ministry of Science and Technology (MOST), Taiwan, the United States Department of Energy, and the Kavli Foundation. The authors gratefully acknowledge the support of the NSF, STFC, INFN and CNRS for provision of computational resources. This work was supported by MEXT, JSPS Leading-edge Research Infrastructure Program, JSPS Grant-in-Aid for Specially Promoted Research 26000005, JSPS Grant-in-Aid for Scientific Research on Innovative Areas 2905: JP17H06358, JP17H06361 and JP17H06364, JSPS Core-to-Core Program A. Advanced Research Networks, JSPS Grant-in-Aid for Scientific Research (S) 17H06133, the joint research program of the Institute for Cosmic Ray Research, University of Tokyo, National Research Foundation (NRF) and Computing Infrastructure Project of KISTI-GSDC in Korea, Academia Sinica (AS), AS Grid Center (ASGC) and the Ministry of Science and Technology (MoST) in Taiwan under grants including AS-CDA-105-M06, Advanced Technology Center (ATC) of NAOJ, and Mechanical Engineering Center of KEK. This work is supported by NASA through the NICER mission and the Astrophysics Explorers Program and uses data and software provided by the High Energy Astrophysics Science Archive Research Center (HEASARC), which is a service of the Astrophysics Science Division at NASA/GSFC and High Energy Astrophysics Division of the Smithsonian Astrophysical Observatory.
\section{Introduction} \label{sec:introduction} It is widely believed that magnetic fields play a key role in the star-formation process \citep{PlanckXXXV, Hull_Zhang_2019, PattleFissel2019}. During the collapse of a star-forming core, the coupling of the ionized gas to the ambient magnetic fields will dictate the rate of collapse and fragmentation of the material, influencing the formation of protoplanetary disks \citep[e.g.,][]{Wurster_Li_2018}. After a protoplanetary disks has formed, the presence of a magnetic field would readily account for the removal of angular momentum necessary to balance the observed accretion rates \citep[e.g.][]{Gammie_1996}. Turbulent viscosity arising due to the magneto-rotational instability \citep[MRI;][]{Balbus_Hawley_1991} has long been regarded to be the most likely candidate for enabling angular momentum transport; however, recent searches for non-thermal broadening indicative of turbulent motions have failed to detect any significant motions in any disks except that around DM~Tau \citep{Hughes_ea_2011, Guilloteau_ea_2012, Flaherty_ea_2015, Teague_ea_2016, Flaherty_ea_2017, Teague_ea_2018b, Flaherty_ea_2020}. These results also suggest that other hydrodynamical instabilities, such as the vertical shear instability, may also be inactive given the lack of broadening observed \citep{Flock_ea_2017}. Given these results, magnetically driven winds \citep[e.g.,][]{Blandford_Payne_1982, Turner_ea_2014} appear to be a more promising route for removing angular momentum. In order to test how magnetic fields can influence the formation and evolution of protoplanetary disks via the induction of such dynamical processes, observations tracing the magnetic field strength and morphology are required. Typically this is achieved through the observation of polarized emission, either through the linear or circular polarization. Polarized continuum emission from circumstellar disks is now routinely observed with the Atacama Large Millimeter/submillimeter Array \citep[ALMA; although detections have been made with the CARMA interferometer, e.g.,][]{Stephens_ea_2014}; the polarization patterns have a variety of morphologies, including azimuthal \citep{Kataoka2017, Harrison_ea_2019, Vlemmings_ea_2019} or a combination of azimuthal and radial \citep{Kataoka_ea_2016}; aligned with the minor axis of the disk \citep{Hull_ea_2018, Dent_ea_2019, Harrison_ea_2019}; some combination of both \citep{Stephens_ea_2014, Mori2019}; and patterns that change with wavelength, as in the case of HL Tau and DG Tau \citep{Stephens_ea_2017, Bacciotti2018, Harrison_ea_2019}. Currently there are as many mechanisms to produce polarization as there are different emission morphologies. The most well known, and original motivation for studying polarized emission, is the magnetic alignment of grains via radiative alignment torques \citep[RATs;][]{LazarianHoang2007a, Andersson2015}, believed to be the dominant alignment mechanisms in star-forming cores \citep[e.g.,][]{Hull_Zhang_2019} and tentatively in the disk of HD~142527 \citep{Kataoka_ea_2016,Ohashi_ea_2018}. More recently, alignment of grains with respect to the radiation intensity gradient \citep{Tazaki_ea_2017, Yang_ea_2019} and mechanical alignment from the gas flow around the grains \citep{Gold_1952, Kataoka_ea_2019} have been proposed as potential causes for observed polarization patterns in disks. Finally, the inclusion of self-scattering of polarization emission has also been shown to reproduce a large sample of the observed emission morphologies \citep{Kataoka_ea_2015, Pohl_ea_2016, Yang_ea_2016}, and is likely to be the dominant source of continuum polarization at sub-millimeter wavelengths. Given that several of the aforementioned mechanisms are able to produce polarized continuum emission without the need for a magnetic field, recent effort has focused on searching for polarized molecular line emission. \citet{Goldreich_Kylafis_1981, Goldreich_Kylafis_1982} showed that in the presence of a strong radiation field or velocity gradients, the magnetic sub-levels of atoms and molecules can be unevenly populated, giving rise to linear polarization; this is known as the Goldreich-Kylafis effect \citep[e.g.][]{Morris_ea_1985}. Emission from the Goldreich-Kylafis effect has been observed in a variety of sources, typically limited to molecular outflows in young stellar objects, and has been seen to have high polarization fractions, reach up levels of $\sim 10\%$ \citep[e.g.,][]{Girart1999, Beuther_ea_2010, Ching_ea_2016, Vlemmings_ea_2017, Lee_ea_2018}. Recently, \citet{Stephens_ea_2020} conducted a deep search for linear polarization arising from the disks around IM~Lup and HD~142527, finding tentative evidence for low-level polarization of $^{12}$CO (2-1) in both sources, with polarization fractions of $\sim 1\%$. In addition to linear polarization from the Goldreich-Kylafis effect, circular polarization has been used to trace the line-of-sight magnetic field strength via Zeeman-splitting of spectral line emission from molecular clouds \citep{Crutcher_2012}; however, in the case of protoplanetary disks, only two upper limits have been reported, in TW~Hya \citep{Vlemmings_ea_2019} and AS 209 \citep{Harrison_ea_2021}. Given the difficulties of disentangling the multiple possible origins of polarized continuum emission, searching for linearly polarized spectral-line emission appears to be the most robust approach for detecting and characterizing the magnetic field morphology and strength in a protoplanetary disk. We present ALMA polarization observations of $^{12}$CO~(3-2), $^{13}$CO (3-2), and CS (7-6) molecular line emission and 332~GHz continuum emission in the disk around TW~Hya. We describe the observations, calibration and imaging in Section~\ref{sec:observations}. Next we describe an extensive search for polarized molecular line emission in Section~\ref{sec:searching}; in Section~\ref{sec:discussion} we discuss the detection of continuum polarization and the non-detection of molecular-line polarization in the context of previous studies. We offer our conclusions in Section~\ref{sec:summary}. \section{Observations} \label{sec:observations} \begin{deluxetable}{cccc} \tabletypesize{\normalsize} \tablecaption{Observation Log} \label{tab:observations} \tablehead{ \colhead{Date} &\colhead{Int. Time} & \colhead{\# Ant.} & \colhead{Mean PWV} \\ [-8pt] \colhead{} &\colhead{(min)} & \colhead{} & \colhead{(mm)} } \startdata Dec 19, 2018 & 16.68 & 42 & 1.53 \\ Dec 19, 2018 & 29.10 & 43 & 1.42 \\ [5pt] Dec 25, 2018 & 16.17 & 45 & 0.37 \\ Dec 25, 2018 & 23.82 & 45 & 0.47 \\ [5pt] Apr 8, 2019 & 16.17 & 49 & 0.88 \\ Apr 8, 2019 & 11.72 & 47 & 0.96 \\ [5pt] Apr 9, 2018 & 16.17 & 46 & 1.45 \\ [5pt] Apr 10, 2019 & 15.17 & 43 & 1.08 \\ Apr 10, 2019 & 24.32 & 41 & 1.83 \\ \enddata \end{deluxetable} \begin{figure*} \centering \includegraphics[width=\textwidth]{continuum_observations_B7.pdf} \caption{Summary of continuum observations. The Stokes $I$, $Q$, $U$ and polarized intensity $P$ images are shown from left to right, with the synthesized beam shown in the bottom left of each panel with a size of $0\farcs52 \times 0\farcs75$ and a position angle of $93\degr$. $P$ is shown at a significance of $>1\,\sigma_P$, where $\sigma_P = 32~\mu{\rm Jy\,beam^{-1}}$. In the right-most panel, the orange line segments show the polarization orientation. The semi-transparent segments show the polarization morphology in locations where $2\sigma_P < P < 3\sigma_P$, while all opaque bars indicate detections where $P>3\sigma_P$.} \label{fig:continuum_observations} \end{figure*} Observations were taken as part of project 2018.1.00980.S (PI: R. Teague), targeting $^{12}$CO (3--2), $^{13}$CO (3--2) and CS (7--6) in TW~Hya. The correlator was set up to include one continuum window centered at 331.75~GHz covering a bandwidth of 2~GHz, and three spectral windows centered on the three molecular lines with a spectral resolution of 61~kHz ($\approx 53~{\rm m\,s^{-1}}$). The C43-3 configuration was chosen to yield an angular resolution of $0.5\arcsec{}$. In total 9 execution blocks were observed, resulting in a total on-source time of 169.3 minutes. Table~\ref{tab:observations} provides a summary of the executions and the observing conditions. For all executions, the same phase (J1037-2934), flux (J1058+0133), and polarization calibrators (J1256-0547 and J1337-1257) were observed, and baselines spanned 14~m to 500~m. \subsection{Calibration} \label{sec:observations:calibration} The data were first manually calibrated by NRAO/NAASC staff following standard ALMA procedures; for a detailed description of ALMA polarization calibration, see \citet{Nagai2016}.\footnote{Recently it was found that there is an error in the visibility amplitude calibration for sources with strong emission (\url{https://almascience.nao.ac.jp/news/amplitude-calibration-issue-affecting-some-alma-data}); however, there are currently no correction scripts available for polarization data. It is understood that this error should only affect amplitude calibration, and thus introduce an additional noise component to the polarization signal on the order of a few percent of the typical noise. As this work focuses on the extraction of a polarization signal through spectral shifting and stacking, it is unlikely that these amplitude calibration issues will influence the results presented here.} We then self-calibrated the data using CASA v5.6.2 \citep{McMullin_ea_2007}. We used all continuum data, including the line-free channels of the three spectral windows covering the lines. We derived phase and amplitude self-calibration corrections based on the Stokes $I$ component of the continuum on a per-spectral-window basis (we did this, rather than collapsing all data into a single measurement, in order to avoid bandwidth smearing), and then applied these corrections to the entire data set. We performed three rounds of phase self-calibration (with solution times of `inf', 30\,s, and 10\,s) and one round of amplitude self-calibration. This improved the signal-to-noise ratio (SNR) of the Stokes $I$ continuum by a factor of 6.4 and achieved a noise in the Stokes $I$ images that is roughly three times the expected thermal noise. \subsection{Continuum Emission} \label{sec:observations:continuum} We made 332~GHz (900~\micron{}) continuum images with a range of Briggs robust weighting values, spanning uniform (robust = --2, highest resolution and lowest sensitivity) to natural (robust = 2, lowest resolution and highest sensitivity) weighting. We detect linearly polarized Stokes $Q$ and $U$ emission when using a robust value of $\geq$\,0.5, without any significant change in the emission morphology as a function of robust parameter. As such, we adopt natural weighting (robust = 2) for the final image, which has a synthesized beam of $0\farcs75 \times 0\farcs52$ at a position angle of $93\degr$. We produce $I$, $Q$, and $U$ images using the \texttt{tclean} function in CASA, adopting a circular mask that encompasses the full Stokes $I$ emission; this images are shown in Fig.~\ref{fig:continuum_observations}. For Stokes~$I$, the rms noise level measured in an emission-free region around the continuum emission in the non-primary-beam corrected image is $\sigma_{I} = 99~\mu{\rm Jy~beam}^{-1}$. The integrated continuum flux density is 1.38~Jy. For the $Q$ and $U$ components, we find rms noise values of $\sigma_Q = 33~\mu{\rm Jy~beam}^{-1}$ and $\sigma_U = 31~\mu{\rm Jy~beam}^{-1}$. Due to the technical challenges involved with calibrating circular polarization observations with ALMA, we focus here on the linear polarization observations; however, we do discuss the detection of circularly polarized (Stokes $V$) emission, which is most likely instrumental in nature, in Section~\ref{sec:discussion:circular_polarization}. The polarized intensity $P$ and the polarization angle $\chi$ were then calculated as follows: \begin{align} P &= \sqrt{Q^2 + U^2}, \\ \chi &= \frac{1}{2} \, {\rm tan}^{-1}\left(\frac{U}{Q}\right). \label{eq:polarization_angle} \end{align} \noindent As $P$ will always be positive, while both $Q$ and $U$ will be positive and negative, we debias $P$ following the procedure in \citet[but also see \citealt{Vaillancourt_2006, Hull_Plambeck_2015}]{Killeen_ea_1986}. Following this debiasing procedure, described fully in Appendix~\ref{sec:app:debiasing}, we can assume that $\sigma_P \approx \sigma_Q \approx \sigma_U$ when $2 P \, / \, (\sigma_{\rm Q} + \sigma_{\rm U}) \gtrsim 1$. We show a map of $P$, where $P \, / \, \sigma_P > 1$, in the right-hand panel of Fig.~\ref{fig:continuum_observations}. The line segments show the linear polarization orientation $\chi$. Segments are plotted at the Nyquist rate, i.e., every half-beam full-width at half-maximum (FWHM), in locations where $P \, / \, \sigma_P > 3$. The median continuum polarization fraction is 0.20\%, with a peak of 0.74\%. The observed azimuthal morphology of the polarization and the polarization fraction are comparable to 226~GHz continuum observations published in \citet{Vlemmings_ea_2019}, which we discuss in more detail in Section~\ref{sec:discussion:continuum}. \begin{deluxetable*}{rcccccc} \tabletypesize{\small} \tablecaption{Imaging Summary\label{tab:images}} \label{tab:lines} \tablehead{ \colhead{Line} & \colhead{Frequency} & \colhead{Channel Width} & \colhead{Beam (PA)} & \colhead{Integrated Flux Density\tablenotemark{\footnotesize \,a}} & \colhead{$\sigma_{I}$\tablenotemark{\footnotesize \,b}} & \colhead{$\sigma_{QU}$\tablenotemark{\footnotesize \,b,c}} \\ \colhead{} & \colhead{(GHz)} & \colhead{(${\rm m\,s^{-1}}$)} & \colhead{} & \colhead{(${\rm Jy~beam^{-1}~km~s^{-1}}$)} & \colhead{(${\rm mJy~beam^{-1}}$)} & \colhead{(${\rm mJy~beam^{-1}}$)} } \startdata $^{12}$CO (3--2) & 345.7959899 & 30 & $0\farcs60 \times 0\farcs44 \,\, (92\fdg3)$ & $44.91 \pm 0.01$ & 4.4 & 4.4 \\ [5pt] $^{13}$CO (3--2) & 330.5879652 & 30 & $0\farcs66 \times 0\farcs47 \,\, (92\fdg6)$ & $\phn5.94 \pm 0.01$ & 5.0 & 5.0 \\ [5pt] CS (7--6) & 342.8828503 & 30 & $0\farcs60 \times 0\farcs44 \,\, (92\fdg3)$ & $\phn2.40 \pm 0.04$ & 3.4 & 3.4 \enddata \tablenotetext{a}{Integrated out to radii of $4\arcsec{}$ and over $2.84 \pm 2~{\rm km\,s^{-1}}$.} \tablenotetext{b}{Measured in a line free channel.} \tablenotetext{c}{Assuming both Stokes components share the same noise, verified in Section~\ref{sec:searching:CDFs}.} \end{deluxetable*} \subsection{Line Emission} \label{sec:observations:line_emission} \begin{figure*} \centering \includegraphics[width=\textwidth]{12CO_channels.pdf} \caption{Channel maps of the $^{12}$CO (3--2) emission imaged at 100~${\rm m\,s^{-1}}$ intervals. The top row shows the total Stokes $I$ intensity, while the middle rows show the Stokes $Q$ and $U$ components, and the bottom row shows the debiased linear polarized intensity $P$. We only show the channels close to the systemic velocity, $v_{\rm LSR} = 2.84~{\rm km\,s^{-1}}$. We plot the beam size, with properties given in Table~\ref{tab:lines}, in the bottom-left corner of each panel. All images have been corrected for the primary beam.} \label{fig:12CO_channels} \end{figure*} \begin{figure*} \centering \includegraphics[width=\textwidth]{13CO_channels.pdf} \caption{As Fig.~\ref{fig:12CO_channels} but for $^{13}$CO (3--2). } \label{fig:13CO_channels} \end{figure*} \begin{figure*} \centering \includegraphics[width=\textwidth]{CS_channels.pdf} \caption{As Fig.~\ref{fig:12CO_channels} but for CS (7--6).} \label{fig:CS_channels} \end{figure*} Continuum emission was subtracted from the line emission using the CASA task \texttt{uvcontsub} which uses a linear fit to the line-free channels to model the continuum emission. This is expected to have little impact on the molecular emission, except in the inner regions of the disk where the continuum opacities are large and may lead to an underestimation of the peak brightness temperature \citep[see][for a discussion]{Boehler_ea_2017}. We image the lines using a channel width of $30~{\rm m\,s^{-1}}$. This is close enough to Nyquist sampling to minimize artifacts when using the shifting and averaging techniques described below, while preserving any channel-to-channel correlations associated with the spectral response function. As with the continuum, we made images at using range of robust values, spanning uniform weighting to natural weighting. We do not detect any obvious polarization in any maps, thus we adopt a robust value of 0.5 for the final image, resulting in a resolution of $\sim 0.6\arcsec$, as summarized in Table~\ref{tab:lines}. The choice of a lower robust value than for the continuum is because our line-averaging technique benefits from a larger number of independent samples, which are increased with higher angular resolution. As the radial extent of the continuum is $\sim 1\arcsec{}$, adopting a lower robust value would not significantly improve the number of independent measurements in the disk, but would decrease our sensitivity. \begin{figure*} \centering \includegraphics[width=\textwidth]{averaged_spectra.pdf}\vspace{0.5cm} \includegraphics[width=\textwidth]{averaged_spectra_extended.pdf} \caption{\emph{Top:} The disk-averaged spectra after aligning and averaging all components. $^{12}$CO, $^{13}$CO, and CS emission are shown from left to right. The black, orange, and gray lines show the Stokes $I$, $Q$, and $U$ components, respectively. The Stokes $I$ components have been scaled by the factor shown in the legend in order to be plotted on the same $y$-axis. The semi-transparent lines show the aligned and averaged spectra at a channel spacing of $50~{\rm m\,s^{-1}}$, with error bars representing their associated $1\sigma$ uncertainties. The solid orange and gray lines show the average spectrum smoothed with a top-hat function with a $250~{\rm m\,s^{-1}}$ width, in order to bring out any underlying trends in the spectrum. Note that unlike the $^{13}$CO and CS emission, the $^{12}$CO Stokes $I$ component deviates from a Gaussian profile, as the line is highly optically thick. \emph{Bottom:} As the top row, but with extended velocity ranges.} \label{fig:averaged_spectra} \end{figure*} Prior to making the images, for each line we made a dirty image of five consecutive line-free channels, which we used to measure the noise in each of the Stokes components by taking the rms of the non-primary-beam-corrected values. We use this noise level as the threshold for a non-interactive \texttt{tclean} using a Keplerian mask\footnote{The code to make Keplerian masks can be found at \url{https://github.com/richteague/keplerian_mask}.} tailored to the $^{12}$CO emission, which also provides good fits to the $^{13}$CO and CS emission. We set the \texttt{tclean} stopping threshold to twice the noise level measured in the line-free channels. We present a summary of the images in Table~\ref{tab:images}; in Figures~\ref{fig:12CO_channels}, \ref{fig:13CO_channels} and \ref{fig:CS_channels} we show the channel maps (binned down to $100~{\rm m\,s^{-1}}$ channel spacing for presentation purposes) of the Stokes $I$, $Q$, and $U$ components, and of the debiased polarization maps $P$. We calculate integrated flux densities of the Stokes $I$ components using \texttt{GoFish} \citep{GoFish}; see Section~\ref{sec:searching:stacking} for a more thorough description of this method. We adopt the disk properties reported in \citet{Teague_ea_2019a}: inclination angle $i = 5.8\degr$; disk position angle ${\rm PA} = 151.6\degr$, measured to the red-shifted major axis from North; stellar mass $M_{\rm star} = 0.81~M_{\rm sun}$; and distance $d = 60.1$~pc \citep{Bailer-Jones_ea_2018}. We note that there has been a claim of a slight warp in the inner 20~au of the disk \citep{Rosenfeld_ea_2012}; however, given the limited spatial resolution of these data ($\approx$\,30~au), the influence of the warp can be ignored. The recovered $^{12}$CO and CS integrated intensities are within 10\% of previously reported observations \citep{Huang_ea_2018, Teague_ea_2018b}, consistent with the typical flux calibration uncertainty for Band 7 observations with ALMA, as discussed in the ALMA Technical Handbook \citep{ALMATechnicalHandbook}. \section{Searching for Spectral Line Polarization} \label{sec:searching} In contrast to the continuum images, the channel maps of the spectral lines show no clear sign of polarized emission, either in the native $Q$ and $U$ maps or in the debiased polarized intensity $P$ maps. In this section we apply three methods to attempt to place tighter limits on the presence of any polarization signals in the data. \subsection{Azimuthal Averaging by Line Shifting} \label{sec:searching:stacking} In the context of protoplanetary disks, the use of azimuthally averaging line data by correcting for the Doppler shift of the disk rotation is becoming more common. Originally described in \citet{Yen_ea_2016}, and used in several contemporaneous works \citep[e.g.][]{Teague_ea_2016, Matra_ea_2017}, this approach has been used to detect weak spectral-line emission that is not clearly visible in standard interferometric channel maps \citep[e.g.][]{Schwarz_ea_2019}, and has been applied to the searches for spectral-line polarization signals in disks \citep[e.g.,][]{Stephens_ea_2020, Harrison_ea_2021}. This approach assumes that the line-of-sight velocity $v_0$ is the sum of the systemic velocity $v_{\rm LSR}$ and the projected orbital rotation: \begin{equation} v_0 = v_{\phi} \cos(\phi) \sin(i) + v_{\rm LSR}\,\,, \end{equation} \noindent where $v_{\phi}$ is the rotational velocity, $\phi$ is the deprojected polar angle such that $\phi = 0$ corresponds to the red-shifted major axis of the disk, and $i$ is the disk inclination. Assuming that $v_{\phi}$ is dominated by Keplerian rotation, it is possible to calculate the projected velocity component at every pixel in an image, allowing for spectra to be shifted back to a common line center and then averaged, thereby increasing the SNR of the line. In this work we use the Python package \texttt{GoFish}\footnote{\bf \url{https://github.com/richteague/gofish/releases/tag/v1.4.1-1}} \citep{GoFish}, which implements this aligning and averaging for arbitrary disk geometries and source properties. Using this azimuthal averaging approach, we calculate the average spectrum between radii of $0\farcs{}5$ and $4\farcs{}5$ for the $^{12}$CO emission, and between $0\farcs{}5$ and $3\farcs{}5$ for the $^{13}$CO and CS emission. We avoid the inner $0\farcs{}5$ region of the disk as the line averaging method is significantly biased due to the strong spatial correlations on spatial scales comparable to or smaller than the beam FWHM \citep[e.g.,][]{Teague_ea_2018a}. In this calculation the disk is first split into annuli with widths of $0\farcs{}1$, using the same disk properties as those used to measure the integrated flux density in Section~\ref{sec:observations}. The spectra are then aligned by taking into account the projected Keplerian rotation of the disk, and finally are averaged at each radius. An average spectrum is calculated for each of the $I$, $Q$, and $U$ components. To estimate the uncertainty in these spectra, we image four additional cubes of line-free data at $\pm 9$ and $\pm 18~{\rm km~s^{-1}}$ offsets relative to the systemic velocity $v_{\rm LSR} = 2.84~{\rm km~s^{-1}}$. From these line-free cubes we produce averaged spectra from which we measure the rms noise, which we assume to be constant across the spectrum. When measuring the rms noise, we use velocity offset rather than a spatial offset because the point source sensitivity of the observations drops precipitously for off-axis positions due to the response of the primary beam. We show the resulting averaged spectra in Fig.~\ref{fig:averaged_spectra}. In each panel, the Stokes $I$ component, shown in black, has been scaled down by a factor of 500, 100, and 50 for $^{12}$CO, $^{13}$CO, and CS, respectively. Error bars on these components are too small to be seen in the figure. The $Q$ and $U$ components, shown in orange and gray, respectively, are binned to their native spectral resolution of $30~{\rm m\,s^{-1}}$; we plot their associated $1\sigma$ uncertainties. To highlight any trends in the data, we plot a smoothed spectrum (solid line) using a top-hat function with a $250~{\rm m\,s^{-1}}$ width. No signal in either the $Q$ or $U$ components can be seen for either the $^{13}$CO or CS emission. The $^{12}$CO emission shows a tentative feature in both the $Q$ and $U$ components, with a positive peak in $Q$ at $v \approx 2.8~{\rm km~s^{-1}}$ and a negative peak in $U$ at $v\approx 2.9~{\rm km\,s^{-1}}$. However, features of a similar magnitude are seen across the whole velocity range (shown in the bottom row of Fig.~\ref{fig:averaged_spectra}), precluding the confirmation of a true signal. \subsection{Teardrop Plots} \label{sec:searching:teardrop} \begin{figure*} \centering \includegraphics{teardrop_example.pdf} \caption{Example of a ``teardrop'' plot made with \texttt{GoFish} using the CS (7--6) spectra. The left panel, (a), shows the aligned and averaged spectra across the radius of the disk. Each row in this panel represents the average spectrum at that radius. The gray dashed line denotes $3\sigma$, where $\sigma$ is the radially varying noise (radially varying because at larger radii there are more beams to average over, thus reducing the noise). The right panels show cuts at constant $r$ (see the dotted lines in panel (a)). Error bars are not included, as they are small enough that they are not visible. Note that CS emission peaks at $r \approx 1\arcsec{}$, hence the offset peak in panel (a), which would otherwise lie at $r = 0\arcsec$.} \label{fig:teardrop_example} \end{figure*} An extension to the aligning and averaging approach is to use a modified position-velocity diagram (which we call a ``teardrop'' plot), which is a radially resolved counterpart to the disk-averaged spectrum discussed in the previous section. As demonstrated in Fig.~\ref{fig:teardrop_example}, each row in a teardrop plot represents the aligned and averaged spectrum at a certain radius in the disk. As the spectra have all been aligned due to the velocity shift, all line centers align along the systemic velocity of $2.84~{\rm km\,s^{-1}}$. At larger radii, the line becomes weaker, but also narrower due to the reduced thermal broadening from the lower temperature gas. The radially decreasing intensity can be easily seen by taking horizontal cuts at various radii, as shown in the right hand column of Fig.~\ref{fig:teardrop_example}, while the change in the width is most noticeable for disk radii $\lesssim 1\arcsec$. A slightly more complex aspect of this representation of the data is that the rms noise, $\sigma$, estimated using line-free regions, is no longer constant, but rather dependent on the radius. This is because at larger radii, more independent samples are used in the averaging such that $\sigma(r) \propto r^{-0.5}$. Note that this only describes the thermal noise; the radially varying sensitivity due to the primary beam response will result in radially increasing $\sigma$ in the primary-beam corrected images, such that $\sigma$ will drop off at a slightly slow rate than $r^{-0.5}$. \begin{figure*} \centering \includegraphics[width=\textwidth]{QUteadrops_r05.pdf} \caption{Teardrop plots for $^{12}$CO, $^{13}$CO, and CS emission (top to bottom) showing the $Q$, $U$, $Q^{\prime}$, and $U^{\prime}$ components (left to right). Each plot has the same color scaling. The dashed gray line shows the (radially varying) $3\sigma$ contour of the $I$ component to highlight where the spectral-line emission should lie. Polarization signals are seen in the $U^{\prime}$ column for both $^{12}$CO and $^{13}$CO, manifesting as positive and negative signals in the line wings at radii of $r \lesssim 1\arcsec{}$.} \label{fig:QUteadrops} \end{figure*} We first consider a simple azimuthal average, as in Section~\ref{sec:searching:stacking}, with the results shown in the left two columns of Fig.~\ref{fig:QUteadrops}, where the gray dashed outline shows the $3\sigma$ contour of the Stokes I component. No clear signal is seen in either the Stokes $Q$ or $U$ component for any of the three molecules, as expected from the disk-averaged approach described in the previous section. However, for an azimuthally symmetric polarization morphology, the $Q$ and $U$ components have a strong azimuthal dependence. For example, for the case of a radial polarization morphology given by $(Q_{\rm rad},\, U_{\rm rad})$, or a circular polarization morphology given by $(Q_{\rm circ},\, U_{\rm circ})$, we find, \begin{align} (Q_{\rm rad},\, U_{\rm rad}) &\propto (\cos(2\psi),\, \sin(2\psi))\,\,,\\ (Q_{\rm circ},\, U_{\rm circ}) &\propto (\cos(2\psi + \pi),\, \sin(2\psi + \pi))\,\,, \end{align} where $\psi$ is the position angle, measured East of North. As such, an average of any of these components over the interval $(-\pi,\, +\pi)$ will average out to zero. To account for this azimuthal dependence, we define two linear combinations of these components that should allow for a non-zero signal when azimuthally averaged. We define, \begin{align} Q^{\prime} = Q \cos(2\psi) + U \sin(2\psi)\,\,, \label{eq:transformsI}\\ U^{\prime} = U \cos(2\psi) - Q \sin(2\psi)\,\,, \label{eq:transformsII} \end{align} such that for a radial polarization morphology, $(\langle Q^{\prime}\rangle, \langle U^{\prime}\rangle) = (+1,\, 0)$, where $\langle Q^{\prime} \rangle$ denotes the average over the full $2\pi$ azimuth, and for a circular polarization morphology, $(\langle Q^{\prime}\rangle, \langle U^{\prime}\rangle) = (-1,\, 0)$. We discuss in more detail this combination and the expected values given different polarization morphologies in Section~\ref{sec:discussion:lines}. The results for these two combinations are shown in the third and fourth columns of Fig.~\ref{fig:QUteadrops} for each of the three molecules. No clear signal is seen for the $Q^{\prime}$ component, but both the $^{12}$CO and $^{13}$CO emission appear to show a $\langle U^{\prime} \rangle$ signal at the $\sim 3~{\rm mJy~beam^{-1}}$ level in the line wings for $r \lesssim 1\arcsec{}$, corresponding to a polarization fraction of $P_{\rm frac} \sim 5\%$ and $\sim 3\%$ for $^{12}$CO and $^{13}$CO, respectively. Integrating over the blue- and red-shifted wings of the line ($\pm 1.5~{\rm km\,s^{-1}}$ for $^{12}$CO and $\pm 0.5~{\rm km\,s^{-1}}$ for $^{13}$CO), these polarization signals are detected at the $\sim 10\sigma$ and $\sim 5\sigma$ level for each line wing of $^{12}$CO and $^{13}$CO, respectively. The CS emission tentatively shows a similar $U^{\prime}$ morphology, but at a much lower level and would require deeper observations for confirmation. For the CS emission, we find peak $\langle U^{\prime} \rangle$ values of $\sim 2~{\rm mJy~beam^{-1}}$, relating to a $\lesssim 3\sigma$ significance when integrating over $\pm 0.5~{\rm km\,s^{-1}}$. We note that the peak $\langle U^{\prime} \rangle$ values are smaller than the rms noise for a given channel, as detailed in Table~\ref{tab:lines}, and thus the application of this `shift-and-stack' approach is imperative to tease out these signals. As we find $Q^{\prime} = 0$ and $U^{\prime} \neq 0$ for all cases, it is possible to rule out purely circular or purely radial polarization morphologies, such as those predicted for several models of well ordered magnetic fields \citep[e.g.,][]{Lankhaar_Vlemmings_2020, Lankhaar_ea_2021}. The interpretation of this signal is discussed in Section~\ref{sec:discussion:lines}. \subsection{Cumulative Distribution Functions} \label{sec:searching:CDFs} \begin{figure*} \centering \includegraphics[]{CDFs.pdf} \caption{Cumulative distribution functions (CDF) of the Stokes $Q$ and $U$ components for all three molecular lines: $^{12}$CO (top), $^{13}$CO (middle), and CS (bottom). The top window of each panel shows the CDF of the flux density within an aperture centered on TW~Hya within a radius of 3\arcsec{}. The red line shows a $1.8~{\rm km\,s^{-1}}$ window centered on the systemic velocity ($v_{\rm LSR}$) of $2.84~{\rm km\,s^{-1}}$ which covers the spatially resolved Stokes $I$ emission. An additional 20 bands of $1.8~{\rm km\,s^{-1}}$, all line free, are shown in gray (although they cannot be seen behind the red line in the top panels). The bottom window of each panel shows the residual difference between the CDF in red and the average CDF made from all of the line-free regions in gray. The dashed black line shows zero difference.} \label{fig:CDFs} \end{figure*} Without priors on what the emission distribution for $Q$ and $U$ should look like, it is hard to distinguish peaks in the noise from true, low level signals. In this subsection we aim to characterize the properties of the noise in order to better understand whether the features discussed in the previous section are statistically significant. We can compare the cumulative distribution functions (CDF) of the $Q$ and $U$ intensities with those obtained from line-free data. For this we use the four additional image cubes produced at velocity offsets of $\pm9$ and $\pm18~{\rm km\,s^{-1}}$ discussed in Section~\ref{sec:searching:stacking}. These four cubes are used to make a reference noise CDF. To account for the primary beam, we used images that have not been corrected for the primary beam; however, we focus on the inner 3\arcsec{} radius of the image, equivalent to roughly the inner third of the primary beam, which has a FWHM of $\sim 15.5\arcsec$ at the wavelength of our observations. The noise for both $Q$ and $U$ is well described by a Gaussian centered at zero with a standard deviation comparable to the rms values quoted in Table~\ref{tab:images}. We extract the signal over a $1.8~{\rm km\,s^{-1}}$ window centered at the systemic velocity of $2.84~{\rm km\,s^{-1}}$ and that is broad enough to encompass all molecular emission. We take only values within a 3\arcsec{} radius of the phase center, shown in red in Fig.~\ref{fig:CDFs}. To quantify the noise, we calculate additional CDFs using a similar $1.8~{\rm km\,s^{-1}}$ bandwidth from the line-free data to quantify the expected scatter due to smaller number statistics, shown as gray lines in Fig.~\ref{fig:CDFs}. The bottom window of each panel set shows the residual with respect to the average CDF made from all of the line-free regions, for the source in red, and the noise cubes in gray. All components except the $^{12}$CO Stokes $Q$ show deviations that are consistent with random draws from the line-free data (illustrated by the scatter in the gray lines). However, the $^{12}$CO Stokes $Q$ component does show a non-negligible deviation, with a peak residual of $\approx -2.3 \times 10^{-2}$. The deviation in $^{12}$CO Stokes $Q$ appears to be somewhat larger than the scatter found for just the noise values. The negative residual signals a slightly higher mean flux density value, which leads to a larger sample of positive flux densities; this is consistent with the tentative peak found in Section~\ref{sec:searching:stacking}, and suggests the presence of a tentative weak, but positively valued, Stokes~$Q$ signal, consistent with the $\langle U^{\prime} \rangle$ detection described above. The lack of clear signal in these statistical demonstrates the importance of leveraging prior knowledge of the polarization morphology in order to extract the signal from within the noise. \section{Discussion} \label{sec:discussion} \subsection{Dust continuum Polarization} \label{sec:discussion:continuum} \begin{figure} \centering \includegraphics[width=\columnwidth]{continuum_comparison.pdf} \caption{Comparison of 227~GHz continuum linear polarization from \citet{Vlemmings_ea_2019}, (\emph{left}), with the 332~GHz continuum from these observations (\emph{right}). The gray scale is plotted where $P > \sigma_P$, where $\sigma_P = 20$ and $35~\mu{\rm Jy~beam^{-1}}$ for the 227~GHz and 332~GHz data, respectively. The semi-transparent segments show the polarization morphology in locations where $2\sigma_P < P < 3\sigma_P$, while all opaque bars indicate detections where $P>3\sigma_P$. Segments are plotted at the Nyquist rate, i.e., every half-beam FWHM. The beam sizes are shown in the bottom-left corner of each panel.} \label{fig:continuum_comparison} \end{figure} Despite the lack of high significance spectral-line polarization, we robustly detect linear polarization in the continuum image, as shown in Fig.~\ref{fig:continuum_observations}. We compare this polarization morphology with the 227~GHz Band 6 continuum observations presented in \citet{Vlemmings_ea_2019} in Fig.~\ref{fig:continuum_comparison}. We re-imaged these latter data using the self-calibrated data products described in \citet{Vlemmings_ea_2019}, using natural weighting to yield a beam size of $0\farcs68 \times 0\farcs58$ ($93\degr$), comparable to that of our 332~GHz Band 7 continuum. Both polarization morphologies are similar, showing polarization orientations that are approximately azimuthal. The median $P_{\rm frac}$ for the 227~GHz continuum observations is 0.32\%, while the 332~GHz continuum data has a median $P_{\rm frac}$ of 0.19\%. For both frequencies, $P_{\rm frac}$ decreases with radius, reaching peaks of $\sim 0.65\%$; however, this radial gradient in $P_{\rm frac}$ is most likely due to the large intensity gradient of Stokes $I$, which is poorly resolved at this spatial resolution. We note that this lack of spatial resolution is likely the limiting factor in the interpretation of the polarization morphology, particularly as TW~Hya is known to host extensive substructure in its continuum emission \citep{Andrews_ea_2016} which previous modeling efforts have shown can imprint non-trivial substructure in the polarization morphology \citep[e.g.,][]{Kataoka_ea_2015, Pohl_ea_2016}. \begin{figure*} \centering \includegraphics{azimuthal_dependence_combination.pdf} \caption{Demonstrating the azimuthally averaged value of the transformed $Q^{\prime}$ and $U^{\prime}$ components, defined in Equations~\ref{eq:transformsI} and \ref{eq:transformsII}, for a range of azimuthally symmetric polarization morphologies. The four panels on the right represent four possible scenarios, annotated in the left hand panel.} \label{fig:azimuthal_dependence} \end{figure*} The detection of such azimuthal morphologies in a face-on disk unfortunately do not allow us to distinguish easily among the various mechanisms that can produce dust continuum polarization. In the case of magnetically aligned dust grains, the polarization should be perpendicular to the magnetic field lines, na\"{i}vely suggesting a radial magnetic field structure, which is physically unlikely in a protoplanetary disk where magnetic field lines are likely to be toroidally wrapped by Keplerian rotation \citep[e.g.,][]{Flock_ea_2015, Suriano_ea_2018}. However, \citet{Guillet_ea_2020} showed that when dust grains have grown to a size similar to the observation wavelength (i.e., one is no longer in the Rayleigh regime but in the Mie regime), polarization from magnetically aligned dust grains can sometimes be \textit{parallel} to the magnetic field, potentially reconciling this mechanism with the broadly azimuthal morphology observed in TW~Hya. Despite this potential agreement, it is highly unlikely that the grains are magnetically aligned given the overwhelming evidence for alternative polarization mechanisms in other sources. Self-scattering is particularly en vogue for protoplanetary disks, as scattering models are easily able to match observed polarization morphologies \citep[for example, but not limited to,][]{Kataoka_ea_2016, Hull_ea_2018, Dent_ea_2019, Harrison_ea_2019}. For the face-on case of TW~Hya, self-scattering could readily explain the azimuthal morphology, as we are tracing the edge of the continuum with our spatial resolution \citep[see, for example, models featured in][]{Kataoka_ea_2015, Pohl_ea_2016, Dent_ea_2019}. In addition to self-scattering, both alignment of dust grains with respect to the radiation intensity gradient (sometimes called ``radiative alignment''; see \citealt{Tazaki_ea_2017}) and mechanical alignment could be responsible for the observed emission morphology \citep{Yang_ea_2019, Kataoka_ea_2019}. Several works have leveraged the polarization fraction as a probe of the maximum grain size within a disk, assuming that self-scattering is the dominant polarization mechanism. This is a particularly powerful way to infer changes in the grain size distribution across radial features such as gaps or rings \citep[e.g.,][]{Pohl_ea_2016, Dent_ea_2019}. Assuming that self-scattering dominates the polarization pattern observed in TW Hya, and adopting the aforementioned average polarization fractions of 0.35\% and 0.19\% for the Band 6 (1.3~mm) and Band 7 (0.9~mm) observations, we find a maximum grain size of $\gtrsim~350~\micron$ when comparing to Fig.~3 from \citep{Kataoka_ea_2016}. We note that this is an order of magnitude smaller than the maximum grain sizes inferred in \citet{Macias_ea_2021} who used a multi-wavelength analysis to infer the properties of the emitting grains. However, the large uncertainties in the average polarization fractions, the small spectral lever arm between Band 6 and Band 7 observations, and the difference in the angular resolution of the observations between these two methods (a factor of ${\sim}~20$) preclude a more detailed comparison. Future multi-frequency observations and modeling efforts, such as those presented in \citet{Stephens_ea_2017}, may help to better constrain the underlying polarization mechanisms at play. However, given the relatively low spatial resolution of the polarization observations toward TW Hya, we defer such work to the future when higher spatial resolution observations will allow us to characterize in detail the polarization morphology of the dust continuum emission. \subsection{Spectral-Line Polarization} \label{sec:discussion:lines} In Section~\ref{sec:searching}, we showed evidence for low-level linearly polarized emission from both $^{12}$CO and $^{13}$CO in the inner regions ($r \lesssim 1\arcsec{}$) of the disk via a `teardrop' deprojection of the data. This evidence is consistent with the CDF of pixel values found in the Stokes $Q$ cube for $^{12}$CO (see Fig.~\ref{fig:CDFs}), which suggest that there is at least some linearly polarized signal present. \subsubsection{Polarization Fraction} In Section \ref{sec:searching} we place tight limits on the polarization fraction of the $^{12}$CO, $^{13}$CO, and CS emission. Although we detect no polarized emission in the channel maps, we find a low-level signal when combining the $Q$ and $U$ components in a way that accounts for their azimuthal dependence. We find $\langle U^{\prime} \rangle \sim \pm 3~{\rm mJy~beam^{-1}}$ in the line wings of $^{12}$CO at radii $\lesssim 1\arcsec{}$, and tentative signs of a similar polarization signal in $^{13}$CO, also at radii $\lesssim 1\arcsec{}$. Assuming that the polarization is shared equally between the $Q$ and $U$ components, this suggests that the peak $Q$ and $U$ values are $\sim \sqrt{2}\,\langle U^{\prime} \rangle_{\rm max} \sim 4~{\rm mJy~beam^{-1}}$, comparable to the sensitivity of the observations (Table~\ref{tab:lines}), demonstrating the power of the `shift-and-stack' approach in leveraging knowledge of the velocity structure of the disk to tease out weak signals. Given that the polarization is detected in the line wings, this corresponds to a polarization fraction of $\sim 1\%$. No significant polarization is detected for CS emission. \citet{Hull2020b} note that an instrumental effect, known as 'squash', can lead to uncertainties of $\sim 0.5\%$ for both $Q$ and $U$ components, however such systematic effects are unlikely to be the cause of the polarization detected here as they should not have any spectral dependence, unlike the signal detected here. At first glance, the low levels of polarization are surprising given the moderate spectral-line polarization fractions detected in star-forming sources \citep[][]{Beuther_ea_2010, Ching_ea_2016, Lee_ea_2018}; however, the local physical conditions for a dense protoplanetary disk differ substantially from these outflow regions. This fact will impact the level of observed polarization. Recent models of linear molecular-line polarization using the radiative transfer code \texttt{PORTAL} \citep{Lankhaar_Vlemmings_2020, Lankhaar_ea_2021} have shown that the level of polarization due to the Goldreich-Kylafis effect is highly dependent on the local physical conditions of where the polarized emission is emitted. The differential populations of the magnetic sub-levels are dictated by the relative rates of radiative and collisional interactions between molecules, with an enhanced rate of radiative interactions resulting in higher fractional polarization. Thus, in regimes where the rotational $J$-transitions are thermalised, collisional interactions will dominate and any polarization is likely to be suppressed. This can potentially account for the lack of strong polarization observed in TW~Hya, as all three molecular lines are believed to be fully thermalised \citep{Schwarz_ea_2016, Teague_ea_2018b}, unlike in the more tenuous outflow regions where the Goldreich-Kylafis effect has previously been detected. \begin{figure*} \centering \includegraphics[width=\textwidth]{model_polarization.pdf} \caption{A proposed polarization morphology, using a simple 2D model of the line emission, that is consistent with the signal detected in the $\langle Q^{\prime} \rangle$ and $\langle U^{\prime} \rangle$ teardrop plots. To better demonstrate the morphology, we do not scale the lengths of the polarization line segments with the corresponding polarization fraction. The dashed gray lines show the major and minor axes of the disk, dashed and dotted, respectively. The velocity of each channel is shown in the top right of each panel.} \label{fig:model_polarization} \end{figure*} Due to the large densities expected in protoplanetary disks, it is unlikely that there are many, if any, lines which are both sub-thermally excited, such that the magnetic sub-levels are populated, and bright enough that the polarized emission could be detected directly. The best candidate would be HCN (4-3), which has both a high critical density and (faint) satellite hyperfine components which would provide a direct test of the optical depth. Based on previous detections of HCN \citep[e.g.][]{Guzman_ea_2015}, such observations would require integrations on the order of 10~hours in order to detect the predicted polarization fractions in TW~Hya. \subsubsection{Morphology} Using the transformations described by Equations~\ref{eq:transformsI} and \ref{eq:transformsII}, we would expect all signal to be in the $\langle Q^{\prime} \rangle$ component if the polarization morphology were dominated by either a circular polarization morphology, expected for toroidal or radial magnetic fields, or a radial polarization morphology, expected for a poloidal magnetic field \citep[e.g.,][]{Lankhaar_ea_2021}. As we see no clear signal in the $Q^{\prime}$ component, but rather in the $\langle U^{\prime} \rangle$ component, we surmise that the \emph{azimuthally averaged} polarization structure must lie somewhere between the two. Figure~\ref{fig:azimuthal_dependence} shows how the values of $\langle Q^{\prime} \rangle$ and $\langle U^{\prime} \rangle$ vary depending on the underlying azimuthally symmetric polarization morphology. Assuming that $\langle Q^{\prime} \rangle = 0$, then $\langle U^{\prime} \rangle = \pm 1$, resulting in a spiral-like morphology shown in panels B and D in Fig.~\ref{fig:azimuthal_dependence}. Under the assumption that only two polarization morphologies are present, clockwise spirals (i.e., spirals that are wound in a clockwise direction on the plane of the sky, $\langle U^{\prime} \rangle = +1$) and counter-clockwise spirals ($\langle U^{\prime} \rangle = -1$), it is possible to infer the $Q$ and $U$ morphologies consistent with the teardrop plots using Equations~\ref{eq:transformsI} and \ref{eq:transformsII}, and to then calculate $\chi$ using Eqn.~\ref{eq:polarization_angle}. Adopting a simple 2D model of the molecular line emission (i.e., a model in which every location in the disk can be described by a Gaussian emission line with a center that is shifted relative to the systemic velocity by the projected Keplerian rotation at that location), we can reconstruct a polarization morphology that is consistent with the teardrops, as shown in Fig.~\ref{fig:model_polarization}. In this figure, all polarization line segments are plotted with the same length to highlight the polarization morphology rather than any spatial variations in the polarization fraction. A particularly intriguing aspect of the inferred polarization morphology is that $\langle U^{\prime} \rangle$ flips sign about the line center, such that the blue-shifted wing of the emission has a morphology described in panel B, while the red-shifted wing of the emission has the morphology shown in panel D. This results in a subtle difference in the polarization morphology between the North Eastern side of the disk and the South Western side. In the NE half of the disk, polarization orientations appear to align with the maximum gradient of $I$, while in the SW side of the disk, the orientations are perpendicular to the maximum gradient of $I$. Following the spiral morphology described in \citet{Teague_ea_2019a}, we assume that the former side is tilted \emph{away} from the observer, while the latter is tilted \emph{towards} the observer. Such a breaking in symmetry could be explained by the perceived difference in inclination of the disk on either side of the major axis. Given the low inclination of TW~Hya, the elevated emission surface of CO isotopologue emission \citep[$z / r \sim 0.3$, e.g.,][]{Pinte_ea_2018a} will make a considerable difference to the projected inclination of the disk. That is, along the minor axis the projected inclination is $i_{\rm proj} = \tan^{-1}(z / r) \pm i$, where $i_{\rm proj}$ is smaller for the NE side (tilted away from the observer), and larger $i_{\rm proj}$ for the SW side (tilted towards the observer). This difference in projected inclination could be the cause of the flip in polarization morphology, as the polarization morphology of the Goldreich-Kylafis effect is known to be sensitive to the geometrical properties \citep[e.g.,][]{Crutcher_2012}. \citet{Lankhaar_Vlemmings_2020} and \citet{Lankhaar_ea_2021} presented synthetic observations for a toy model of a protoplanetary disk viewed at various inclinations. While the physical and chemical structure is not modeled after TW~Hya, the results provide context for the non-detections we report here. \citeauthor{Lankhaar_Vlemmings_2020} and \citeauthor{Lankhaar_ea_2021} considered three magnetic field morphologies: a toroidal field, a poloidal field, and a radial field and several different viewing geometries. For both the toroidal and radial magnetic field structures, the authors found an azimuthal polarization morphology, with polarization fractions $\sim 1\%$ in the line wings. When viewed face-on, the poloidal magnetic field morphology yielded a radial polarization morphology; however, at higher inclinations this transformed to a more circular morphology. Again, the polarization fractions were found to be $\sim 1\%$ in the line wings. These polarization fractions are consistent with those inferred for TW~Hya, although the data suggest a less ordered polarization morphology than was found for the toy model. Future modeling efforts using a source-specific physical and chemical structure will be instrumental in guiding the analysis of the Stokes $Q$ and $U$ components. In particular, a strong prior on the $Q$ and $U$ morphologies will aid in the use of the shift-and-stack techniques employed here to tease out low-level signals. \subsection{Circular Polarization} \label{sec:discussion:circular_polarization} \begin{figure} \centering \includegraphics[width=\columnwidth]{Stokes_V.pdf} \caption{Comparison of the Stokes~$V$ components detected in the $^{12}$CO, \emph{top}, and the 332~GHz continuum, \emph{bottom}. The $^{12}$CO emission is integrated along the velocity axis, including the Stokes~$V$ emission where the absolute Stokes~$I$ component is greater than twice the background, $\sigma_{\rm I} = 4~{\rm mJy~beam^{-1}}$. In both panels, the three solid contours show signal-to-noise ratios in the Stokes~$I$ (integrated along the velocity axis in the case of the $^{12}$CO emission) component of 10, 100 and 1000. A clear dipole morphology is seen in both panels, highly suggestive that this signal is due to beam squint. The synthesized beam is shown in the bottom left of each panel.} \label{fig:stokes_v} \end{figure} For completeness, we report the detection of Stokes $V$ emission (circular polarization) in both the continuum and $^{12}$CO emission as shown in Fig.~\ref{fig:stokes_v}. Both detections share a similar morphology: a dipole pattern aligned along the minor axis of the disk such that the south-west half of the disk displays negative values, and the north-east side positive. In both cases the polarization fraction is $\sim 0.5\%$. \citet{Houde_ea_2013} demonstrated that resonant scattering can transform linear polarization into circular polarization, providing a potential mechanisms for linear polarization to ``leak'' from the linear states into the circular. However, given the strong correlation in both polarization morphology and fraction between the $^{12}$CO and continuum emission, we attribute this signal to the well known instrumental effect of beam squint \citep[see, e.g.,][]{Hull2020b}. \section{Summary} \label{sec:summary} We present ALMA 332~GHz observations of polarized emission from the disk of TW~Hya, covering the $^{12}$CO (3-2), $^{13}$CO (3-2), and CS (7-6) transitions in addition to a continuum window at 332~GHz. We detect linear polarization in the dust continuum emission, with polarization orientations that are approximately azimuthal. The median polarization fraction $P_{\rm frac}$ is 0.19\% in regions where the SNR of the polarized intensity $P$ is $>3$. We see a tentative increase in $P_{\rm frac}$ as a function of radius; however, we attribute this to the limited spatial resolution of the data. We compare our continuum polarization observations with lower frequency Band 6 observations, which also show an azimuthal morphology and have a similar polarization fraction. There may be a subtle difference between the azimuthal morphologies observed at the two different wavelengths, which could be indicative of changing polarization mechanisms between the two sets of observations; however, higher spatial resolution data are necessary to differentiate robustly the emission morphologies. We do not detect significant linear polarization in the channel maps for any of the three molecular lines. However, by using an aligning and averaging approach used to detect weak line emission, and by adopting a linear combination of the $Q$ and $U$ components to account for potential azimuthal structure in their morphology, we detect linear polarization in the line wings of $^{12}$CO and $^{13}$CO. The polarized emission arises between radii of $0\farcs5$ and $1\arcsec$ and reaches polarization fractions of $\sim 5\%$ and $\sim 3\%$ in $^{12}$CO and $^{13}$CO, respectively. We find these signals are significant at the $\sim 10\sigma$ and $\sim 5\sigma$ level for $^{12}$CO and $^{13}$CO, respectively for each wing. A similar polarization morphology is tentatively detected in the CS emission, albeit at a much less significant level ($\lesssim 3\sigma$). We find that the sign of the polarization signal differs from the blue-shifted wing of the line to the red-shifted wing, suggesting a change in polarization morphology. Adopting a simple 2D analytical model for the disk emission morphology, and assuming two azimuthally symmetric polarization morphologies (one in each line wing), we are able to reconstruct a polarization morphology that was consistent with the detected signals. An asymmetry in the morphology across the major axis of the disk may arise due to the change in the projected inclination of the disk from the flared emission surface traced by $^{12}$CO emission. \acknowledgments The authors thank the anonymous referees for constructive reports. This paper makes use of the following ALMA data: 2018.1.00980.S and 2018.1.00167.S. ALMA is a partnership of ESO (representing its member states), NSF (USA) and NINS (Japan), together with NRC (Canada), NSC and ASIAA (Taiwan), and KASI (Republic of Korea), in cooperation with the Republic of Chile. The Joint ALMA Observatory is operated by ESO, AUI/NRAO and NAOJ. The National Radio Astronomy Observatory is a facility of the National Science Foundation operated under cooperative agreement by Associated Universities, Inc. R.T. acknowledges support from the Smithsonian Institution as a Submillimeter Array (SMA) Fellow. C.L.H.H. acknowledges the support of both the NAOJ Fellowship as well as JSPS KAKENHI grants 18K13586 and 20K14527. T.H. acknowledges support from the European Research Council under the Horizon 2020 Framework Program via the ERC Advanced Grant Origins 83 24 28. DS acknowledges support by the Deutsche Forschungsgemeinschaft through SPP 1833: ``Building a Habitable Earth'' (SE 1962/6-1). RK acknowledges financial support via the Emmy Noether and Heisenberg Research Grants funded by the German Research Foundation (DFG) under grant no. KU 2849/3 and 2849/9. This work was partly supported by the Programme National “Physique et Chimie du Milieu Interstellaire” (PCMI) of CNRS/INSU with INC/INP co-funded by CEA and CNES." \bigskip \smallskip \facilities{ALMA} \software{\texttt{CASA} \citep{McMullin_ea_2007}, \texttt{astropy} \citep{astropy_2013, astropy_2018}, \texttt{GoFish} \citep{GoFish}, \texttt{matplotlib} \citep{Hunter_2007}, \texttt{scipy} \citep{scipy}. } \clearpage
\section{Introduction} Exploring the phase structure of quantum chromodynamics (QCD) at finite temperature, $T$, and real chemical potential, $\mu=(\mu_\mathrm{R},0)$, is an important and interesting subject in elementary, hadron and nuclear physics and astrophysics. There are several expectation of the QCD phase diagram based on lattice QCD simulations and QCD effective model calculations. If we access the lattice QCD data at whole $\mu_\mathrm{R}$ region, we can have exact QCD phase structure. It is, however, impossible at present because of the sign problem appearing at finite $\mu_\mathrm{R}$; see Ref.\,\cite{deForcrand:2010ys}. The sign problem is weakened in the QCD effective models by simplifying the gauge field dynamics because the correlations between the gauge field and $\mu_\mathrm{R}$ relate to the seriousness of the sign problem. However, QCD effective models have several unclearness in the foundation and then quantitative behaviors are not reliable. Therefore, our understanding of the QCD phase diagram is strongly limited at finite $\mu_\mathrm{R}$. Several phases are proposed so far on the QCD phase diagram at finite $\mu_\mathrm{R}$ such as the color superconducting phase, the inhomogeneously chiral symmetry broken phase such as the dual chiral density wave and the real kink crystal, the quarkyonic phase and so on; see Refs.\,\cite{Fukushima:2010bq,Buballa:2014tba} as an example. These phases are deeply related to the $SU(N_\mathrm{c})$ color symmetry, the chiral $SU(N_\mathrm{f})_\mathrm{L} \times SU(N_\mathrm{f})_\mathrm{R}$ symmetry and the $U(1)_\mathrm{V}$ symmetry which relates to the quark number density where $N_\mathrm{c}$ and $N_\mathrm{f}$ are the number of colors and flavors, respectively. In the standard approach, we construct suitable order parameters for the spontaneous symmetry breaking and clarify the phase structure. In Ref.\,\cite{Kashiwa:2021czl}, the authors showed that the fugacity expansion with the canonical partition functions are useful to clarify the properties of the cold QCD matter with sufficiently small $T$; particularly, the quarkyonic phase is expected to be deeply relate to the behavior of the canonical sectors. The quarkyonic phase is well defined in the large $N_\mathrm{c}$ limit, but it is not clear in the finite $N_\mathrm{c}$ system~\cite{McLerran:2007qj}. The quarkyonic phase appearing at low $T$ is described as follows: The thermodynamics is dominated by the quark degree of freedoms under the Fermi surface and then the quark numbers start to have nonzero values ($\sim N_\mathrm{c}^1$) above the critical $\mu_\mathrm{R}$. However, the physical excitation modes above the Fermi surface are baryonic (confined) in the large $N_\mathrm{c}$ limit. The pressure is $\sim N_\mathrm{c}^0$ below the critical $\mu_\mathrm{R}$ because the glueballs are dominant degree of freedoms, but it turns into $\sim N_\mathrm{c}^1$ above the critical $\mu_\mathrm{R}$ because of the quark degree of freedoms under the Fermi surface. In the deconfined phase, gluons become the dominant degree of freedoms and thus the pressure behaves $\sim N_\mathrm{c}^2$. In addition, in the quarkyonic phase, the spatial inhomogeneity is expected to be appeared~\cite{Kojo:2011cn}; there are other types of inhomogeneity at finite density such as the dual chiral density wave~\cite{Nakano:2004cd} and the real kink crystal~\cite{Buballa:2014tba}. These properties are estimated via the large $N_\mathrm{c}$ counting and thus they are not clear in the case of the finite $N_\mathrm{c}$. However, some QCD effective model calculations indicate that the quarkyonic phase still exists in realistic QCD~\cite{McLerran:2008ua,Duarte:2021tsx} and it may directly affect the neutron star properties such as the mass-radius relation~\cite{McLerran:2018hbz}. In addition, the quarkyonic phase may relate to the new confinement-deconfinement picture of QCD such as the soft-surface delocalization~\cite{Fukushima:2020cmk}. In the quarkyonic phase, behavior of the baryonic modes plays a crucial role and thus it may be natural to think that the canonical partition functions have the hint to understand the phase because it has the relation to the multiplicity of baryon numbers. However, this point is not well investigated so far. It is well known that the canonical partition functions can be constructed via the imaginary chemical potential region~\cite{Roberge:1986mm,Hasenfratz:1991ax}; see Refs.\,\cite{Alexandru:2005ix,deForcrand:2006ec,Bornyakov:2017crk,Bornyakov:2016wld,Wakayama:2018wkc} for some progress. In addition, the canonical partition functions relate to the multiplicity distribution which can be picked up from collision experiments; see Refs.\,\cite{STAR:2010mib,Luo:2012kja} as the experimental data and the recent review~\cite{Fukushima:2020yzx}. For example, such fact was employed to connect the lattice QCD data and the experimental data at finite density via the Lee-Yang zero analysis; see Refs.\,\cite{Nakamura:2013ska}. The canonical partition functions can be constructed by using the imaginary chemical potential ($\mu_\mathrm{R}$), Fourier transformation and the fugacity expansion, and thus we can avoid the sign problem. However, the sign problem is translated to the seriousness of the uncontrollability of the numerical accuracy of the Fourier transformation. Even if the canonical method has the problem, the investigation of the QCD phase structure at finite $\mu_\mathrm{R}$ from the viewpoint of the canonical ensemble is interesting. The purpose of this study is that we wish to consider what quantity is suitable to clarify the cold QCD matter at finite $\mu_\mathrm{R}$, particularly the quarkyonic structure, based on the quantity which can be observed in experiments and lattice QCD simulations. Particularly, how we can account for the quarkyonic picture to clarify the QCD phase diagram at finite $\mu_\mathrm{R}$ based on the canonical sectors. Therefore, this study has an impact on our understanding of the cold QCD matter at finite density which will be necessary to understand the neutron star properties. This paper is organized as follows. In Sec.\,\ref{sec:QCD} and \ref{sec:canonical}, we explain the procedure to construct the canonical partition functions. The multiplicity distributions in the canonical and the grand canonical ensembles are explained in Sec.\,\ref{sec:canonical2} and \ref{sec:grand}. Discussions are presented in Sec.\,\ref{sec:discussion}. Section \ref{sec:summary} is devoted to summary. \section{QCD with imaginary chemical potential} \label{sec:QCD} At finite pure imaginary chemical potential, $\mu=(0,\mu_\mathrm{I})$, QCD has several interesting and important properties. We briefly summarize them below; see Ref.\,\cite{Roberge:1986mm,Kashiwa:2019ihm} for details. \begin{description} \item[Roberge-Weiss (RW) periodicity] At finite imaginary $\mu$, several thermodynamic quantities and order parameters in QCD have the special $2\pi/N_\mathrm{c}$ periodicity along the $\theta$-axis where $\theta \equiv \mu_\mathrm{I}/T$. This special periodicity is the so-called the RW periodicity. Some details are shown in Appendix \ref{sec:app1}. \item[RW transition] The origin of the RW periodicity is different at low and high temperatures because of the balance between gluon and quark contributions in the grand canonical partition function. At $\theta=(2k-1)\pi/N_\mathrm{c}$ with $k \in \mathbb{Z}$, several quantities have singularities at high $T$. The $\mu$-odd and -even quantities have first-order and second-order singularities. These singularities characterize the phase transition which is the so-called RW transition. \item[RW endpoint] Several quantities are smoothly oscillating along the $\theta$-axis at low $T$, but does not at high $T$. Because of the difference, there should be the endpoint of the first-order RW transition line. This endpoint is the so-called RW endpoint. \end{description} Since the imaginary $\mu$ can be translated into the temporal boundary condition of quarks, its effects must be vanished when we approach to the $T \to 0$ limit. This means that the oscillating behavior of the grand canonical partition function as a function of $\theta$ can be assumed as \begin{align} {\cal Z}_\mathrm{GC}(T,\theta) &= \sum_{n=0}^\infty a_n \cos (n\theta), \label{eq:dec} \end{align} and the coefficients of higher-order modes must be small, where $a_n$ must be real. It should be noted that ${\cal Z}_\mathrm{GC}(T,\theta)$ is the $\theta$-even function and thus the $\cos$ function only appears. At sufficiently low $T$, the constant mode $a_0$ becomes the dominant contribution, but higher-order oscillating modes will join the game when we increase $T$. It should be noted that such the expansion is valid if there are no singularities along the $\theta$-direction. In other words, such expansion can not work if there are singularities, which is known as the Gibbs phenomenon~\cite{gibbs1898fourier}. Fortunately, we can think that there are no singularities along the $\theta$-axis at sufficiently low $T$ and thus we can employ this expression in this work. Since the expression (\ref{eq:dec}) is the Fourier decomposition, each oscillating mode, $a_n \cos (n \theta)$, is responsible to the corresponding canonical partition function, ${\cal Z}_\mathrm{C}(T,n)$. Therefore, we have \begin{align} {\cal Z}_\mathrm{C}(T,n) &\sim a_n, \end{align} when there are no RW transition in the $\theta$ region. It should be noted that we only have $N_\mathrm{c} N$ contributions because of the RW periodicity where $N \in \mathbb{Z}$ which means the baryon number. In other words, ${\cal Z}_\mathrm{C}(T,n)$ with $\mathrm{mod}(n,3) \neq 0$ becomes zero. Since $a_{N_\mathrm{c}N}$ contribution represents the $N_\mathrm{c}N$ quark mode, the coefficient $a_{N_\mathrm{c}N}$ contains $\exp[-\beta N N_\mathrm{c} M]$ function; this form of the coefficient can be derived from the QCD effective model~\cite{Kashiwa:2021czl}. Therefore, we work with the following expression; \begin{align} {\cal Z}_\mathrm{C}(T,N_\mathrm{c}N) &\sim a_{N_\mathrm{c}N} e^{-\beta N_\mathrm{c}N M}. \end{align} and thus we have \begin{align} {\cal Z}_\mathrm{GC}(T,\mu_\mathrm{R}) & \sim a_0 + \sum_{N=1}^\infty a_{N_\mathrm{c}N} e^{-\beta N_\mathrm{c}N(M-\mu_\mathrm{R})}, \end{align} where we neglect negative $N$ contributions because we only consider sufficiently large and positive $\mu_\mathrm{R}$ here. It should be noted that the coefficient $a_{N_\mathrm{c}N}$ should have some suppression factor depending on $N$ because of the convergence which plays an important role as mentioned later. \section{Canonical partition function} \label{sec:canonical} The canonical partition function with fixed quark number, ${\cal Z}_\mathrm{C}(T,n)$, can be constructed via the Fourier transformation of the grand canonical partition function at finite imaginary $\mu$, ${\cal Z}_\mathrm{GC}(T,\theta)$, by $\theta$ as \begin{align} {\cal Z}_\mathrm{C}(T,n) &= \int \frac{d \theta}{2\pi} e^{i n \theta} {\cal Z}_\mathrm{GC}(T,\theta). \end{align} Then, the grand canonical partition function with real $\mu$ can be obtained with the fugacity, $\xi=\exp( \mu_\mathrm{R}/T)$, expansion as \begin{align} {\cal Z}_\mathrm{GC}(T,\mu_\mathrm{R}) &= \sum_{n=-\infty}^\infty \xi^n {\cal Z}_\mathrm{C} (T,n). \label{eq:canonical0} \end{align} Here we take the thermodynamic limit. In the finite size system, the upper and lower bounds of the summation are restricted. It plays an important role in the Lee-Yang zero analysis; for example, see Refs.\,\cite{Nakamura:2013ska,Nagata:2014fra} as an example. It should be noted that each canonical partition function is independent with $\mu_\mathrm{R}$. In the following, we use the canonical partition functions to clarify the QCD phase structure. Since there is the RW periodicity, the canonical partition functions manifest the following relation; \begin{align} &{\cal Z}_\mathrm{C} (T,n) \nonumber\\ &= \frac{1 + z^n + z^{2n}}{2\pi} \int_{-\pi/3}^{\pi/3} d\theta \, e^{i n \theta} {\cal Z}_\mathrm{GC} (T,\theta) \nonumber\\ &= \begin{dcases} \frac{3}{2\pi} \int_{-\pi/3}^{\pi/3} d\theta \, e^{i n \theta} {\cal Z}_\mathrm{GC} (T,\theta) & (n = 3N)\\ ~0 & (n \neq 3N) \end{dcases} , \label{Eq:canonical} \end{align} for $N_\mathrm{c}=3$ where $z=e^{2\pi i /3}$. Therefore, there are only the baryonic contributions which are not necessary to be truly confined. Another way to construct the canonical sectors are using the restriction of the integral range as \begin{align} {\cal Z}'_\mathrm{C} (T,n) &= \frac{1}{2\pi}\int_{-\pi/3}^{\pi/3} d\theta \, e^{i n \theta} {\cal Z}_\mathrm{GC} (T,\theta), \end{align} where the integral range is limited to one period of $\theta$. In Ref.\,\cite{Kashiwa:2019dqn}, it is shown that this restriction can exactly reproduce the correct results at least with $\mu_\mathrm{R}=0$. In this case, $n \neq 3N$ contributions do not become zero. In this study, we use the former way (\ref{Eq:canonical}). \section{Entropy in canonical ensemble} \label{sec:canonical2} In this study, we concentrates on the following function; \begin{align} d(x) &= - x \ln x, \end{align} where $0 \le x \le 1 $. This function maps $x$ to $\mathbb{R}$ and manifests the Leibniz rule; $d(xy)=d(x)y+xd(y)$ for $0\le y \le 1$. Then, $\sum_N d(p_N)$ becomes the Shannon information entropy when $p_N$ is the probability. By preparing several different probability distributions, we can consider different entropies which are responsible to different faces of the system. The simplest probability distribution in the canonical ensemble is \begin{align} p_N &= \frac{P_N}{ \cal N}, \end{align} with \begin{align} P_{N} &= {\cal Z}_\mathrm{C}(T,N),~~~~ {\cal N} = \sum_N P_N = {\cal Z}_\mathrm{GC}(T,0). \label{eq:p_cano} \end{align} It should be noted that $\sum_N p_N=1$ must be satisfied for any definitions of $p_N$. This is the simplest choice of the probability distribution in the canonical method. Since we now have the probability distribution function, we can calculate the entropy determined as \begin{align} S &= \sum_{N=-\infty}^\infty d(p_N). \label{eq:multi} \end{align} In the present calculation of the entropy, we individually consider all baryon number contributions. In the experiments, if we prepare the distribution function by dividing the particle number histogram to each bin for the observed particles, we can have the probability distribution which has the relation to the above probability distribution (\ref{eq:p_cano}) because the canonical partition functions are directly related to the particle number if we focus on baryons. Then, we can calculate the entropy via the same procedure. This type of entropy is similar to the entropy which is the so-called the {\it multiplicity entropy}~\cite{Ma:1999qp}; for example, some details of several entropies are summarized in Ref.\,\cite{Li:2019uaq}. In contrary, we can prepare another entropy based on the multiplicity distribution by considering the following setting; \begin{align} S_{\mathrm{conf.},N} &= d(p_N) + d(p_\mathrm{other}), \label{eq:conf} \end{align} with \begin{align} p_\mathrm{other} = 1 - p_{N}. \label{eq:setting} \end{align} In this entropy, we only focus on the one particular quark number contribution. We call it {\it configuration entropy}. Originally, the configuration entropy which is proposed in Ref.\,\cite{Li:2019uaq}, inspired by Ref.\,\cite{csernai2017quantitative}, is considered by focusing on one special internal configuration of proton. In this sense, we focus on one special quark number configuration. Unfortunately, the above entropies are independent of $\mu$ because they are only based on the canonical partition function and thus it is difficult to clarify the QCD phase structure at finite $\mu$. Actually, in the experimental data at finite density, the multiplicity distribution must contain the $\mu$ effects. Therefore, we consider the probability distribution explained in the next section. \section{Entropy in grand canonical ensemble} \label{sec:grand} To understand the dense QCD matter, the probability distribution, \begin{align} \tilde{p}_{N} &= \frac{\tilde{P}_N}{{\cal Z}_\mathrm{GC}(T,\mu_\mathrm{R})}, \end{align} is a convenient probability distribution because it has the $\mu$-dependence where \begin{align} \tilde{P}_{N} &= {\cal Z}_\mathrm{C}(T,N)\, \xi^N = P_N \xi^N. \end{align} Actually, this is the multiplicity distribution in the grand canonical ensemble. Therefore, we can rewrote Eqs.\,(\ref{eq:multi}) and (\ref{eq:conf}) by replacing $P_N$ by $\tilde{P}_N$ and then we have $\mu$-dependent entropies. Unfortunately, Eq.\,(\ref{eq:multi}) with $\tilde{P}_N$ automatically contains all quark number contributions and thus it is not useful to clarify particular quark number contribution. As mentioned in the introductory section, each quark number contribution may be important to understand the structure of the cold QCD matter at finite density and thus some other entropies which dissect the canonical sectors are desired. In contrast with the thermodynamic entropy, Eq.\,(\ref{eq:conf}) with $\tilde{P}_n$ are matched with our purpose; we call it the {\it $\mu$-dependent configuration entropy} in this study. Particularly, the entropy based on the $N_\mathrm{c}$ quark contribution, \begin{align} \tilde{S}_\mathrm{conf.,1} &= d(\tilde{p}_1) + d(\tilde{p}_\mathrm{other}). \end{align} can be expected to relate to the quakyonic phase transition which is well defined in the large $N_\mathrm{c}$ limit. It should be noted that we need ${\cal Z}_\mathrm{GC}(T,\mu_\mathrm{R})$ to construct the distribution of $\tilde{p}$, but it is usually difficult. To complete the construction, one way is to introduce the cutoff of $|N|$ or assuming the exponential suppression of the tail of the multiplicity distribution because we may expect the realization of the Gaussian distribution. The former way is naturally implemented in the lattice QCD simulations because the lattice sites are limited as finite. These treatments do not induce the serious problem until $\mu_\mathrm{R}$ approaches to the order of $\Lambda N_\mathrm{c} \Lambda_\mathrm{QCD}$, where $\Lambda_\mathrm{QCD}$ means the energy scale of QCD and $\Lambda \in \mathbb{Z}$ is the cutoff value of $|N|$, because their contributions are strongly suppressed. If $\mu_\mathrm{R}$ goes over the value, inaccurate higher-order modes will affect the entropy. This point is also true for some other entropies discussed in this paper. In addition, the competition between each canonical sector may play a crucial role to clarify the dense QCD matter from the viewpoint of quarkyonic picture, and thus we here consider the following entropy; \begin{align} D_{l} &= \sum_{N=-\infty}^\infty \tilde{q}_N \ln \frac{\tilde{q}_N}{\tilde{p}_N} = -\ln \tilde{p}_l, \label{eq:infor} \end{align} where $\tilde{q}=\{\cdots,\tilde{q}_{-1},\tilde{q}_0,\tilde{q}_1,\cdots\}$ with $\tilde{q}_l=1$ and the others are set to zero to sketch the shape of a particular baryon number ($l$) contribution. This is based on the {\it Kullback-Leibler divergence} which is sometimes called the {\it relative entropy}~\cite{rached2004kullback}; it represents how similar the probabilities ($\tilde{p}$ and $\tilde{q}$) are. It should be noted that $D_l$ corresponds to the pointwise information in the present setting of $\tilde{q}$ which is the important building block of the Shannon information entropy. \section{Discussion} \label{sec:discussion} In this section, we show discussions on the qualitative behavior of entropies and some insights on the nontrivial ground state degeneracy from the viewpoint of the canonical sector, which is expected to have close relation with the confinement and deconfinement states. \subsection{Qualitative behavior of entropies} To estimate the behavior of Eq.\,(\ref{eq:infor}), we start from the expression of ${\cal Z}_\mathrm{GC}(T,\theta)$ at sufficiently low $T$ because we can image the behavior of ${\cal Z}_\mathrm{GC}(T,\theta)$ there, model-independently. At sufficiently low $T$, the oscillation of ${\cal Z}_\mathrm{GC}(T,\theta)$ along the $\theta$-direction is strongly suppressed because $\theta$ corresponds to the phase for the temporal boundary condition of quarks and it cannot affect the system at zero $T$. Therefore, the contributions can be expected as \begin{align} &{\cal Z}_\mathrm{GC}(T,\mu_\mathrm{R}) \nonumber\\ &\sim a_0 + \frac{1}{N_\mathrm{c}!}\tilde{a}_{N_\mathrm{c}} e^{-\beta N_\mathrm{c}(M-\mu_\mathrm{R})} + \frac{1}{(2N_\mathrm{c})!} \tilde{a}_{2N_\mathrm{c}} e^{-2\beta N_\mathrm{c}(M-\mu_\mathrm{R})}, \end{align} where $\tilde{a}_n$ are coefficients where the suppression factor is extracted from $a_n$, and here we already neglect negative baryon number contributions because we are interested in $\mu_\mathrm{R} \sim N_\mathrm{c}M$. It should be noted that more strong suppression can be expected at least at nonzero $T$; for example, see Re~\cite{Nagata:2011yf}. In this study, we assume the $1/n!$ suppression factor, but the stronger suppression factor does not change the following discussion. Therefore, we can assume the probability distribution as \begin{align} \tilde{p}_n = \frac{1}{n!} \frac{ \tilde{a}_n \, e^{- n \beta N_\mathrm{c}(M-\mu_\mathrm{R})} }{\cal N'}, \end{align} where ${\cal N'}=\sum_n \tilde{p}_n$. It should be noted that we assume that $1/n!$ suppression factor appears as the coefficient; this factor is natural to ensure that the grand canonical partition function does not diverge. Another choice is the factor $1/n^s$ where $s$ is an exponent which characterizes the distribution; this form is based on the Zipf’s law~\cite{zipf2016human} which is an empirical law known in mathematical statistics. Moreover, we may assume the Skellam distribution~\cite{jg1946frequency} based on the assumption that the proton and anti-proton follow the independent Poisson distribution. Even in those three different forms, we can expect the additional suppression factor and thus the following discussions are unchanged if we take any of them. For sufficiently small $\mu_\mathrm{R}$, $p_0$ dominates the probability distribution and thus Eq.\,(\ref{eq:infor}) with $l=1$ must be $\sim 0$. In addition, higher-order $\tilde{p}_l$ with $l > 1$ will dominate the probability distribution when $\mu_\mathrm{R}$ departs from $\mu_\mathrm{R} \sim N_\mathrm{c}M$. Therefore, Eq.\,(\ref{eq:infor}) with $l=1$ must have the peak structure at $\mu_\mathrm{R} \sim N_\mathrm{c}M$ at least in the large $N_\mathrm{c}$ limit. For higher-order components ($D_l$ with $l > 1$), the position of the peak is not trivial because we should be careful with the competition between the exponential factor and the suppression factor. In the finite $N_\mathrm{c}$, particularly the sufficiently small $N_\mathrm{c}$, the peak structure even in $D_1$ should be smeared and becomes broad, but it may still have the information of the quarkyonic phase. In addition, the configuration entropy is also expected to have the peak structure because of its functional form; $\tilde{p}_\mathrm{other}$ is almost zero when $p_{N_\mathrm{c}}$ dominates the probability distribution in the large $N_\mathrm{c}$ limit. The appearance of the peak structure at the quarkyonic transition point may be similar to the situation for the nuclear liquid-gas transition discussed in Ref.\,\cite{Ma:1999qp}. \subsection{Roberge-Weiss transition} Finally, we discuss the relation between the present observation based on the canonical sectors and the nontrivial ground state degeneracy via the existence of the RW transition. In Ref.\,\cite{Sato:2007xc}, it is shown that the confined and deconfined states at zero temperature are clarified from the nontrivial ground state degeneracy which has the close relation with the topological order~\cite{Wen:1989iv}; there is the nontrivial ground state degeneracy for the deconfined state but not for the confined state. The discussions are proceeded on the compactified space-time by following three operations, the winding of the quark along the compactified dimension, the exchanging of quarks, and the insertion of the $U(1)$ flux to the hole which induces the Aharonov-Bohm phase; all operations must be done adiabatically. In this study, we consider a sufficiently small $T$, where the Polyakov loop can be set to zero, and thus we may assume that we can approximately use the discussion shown in Ref.\,\cite{Sato:2007xc}. Actually, we can introduce the flux insertion operation to the hole of the imaginary time direction and then the Aharonov-Bohm phase appears as the dimensionless imaginary chemical potential, $\theta:=\mu_\mathrm{I}/T$; for example, see Ref.\,\cite{Kashiwa:2015tna}. At sufficiently low $T$ with $\mu_\mathrm{R}=0$, $\theta=\pi/3,\pi,5\pi/3$ which are changed to each other by the ordinary $\mathbb{Z}_3$ transformation, are belonging to the same state where $\theta$ acts as the trivial Aharonov-Bohm phase because the shift symmetry constructed by the semi-direct product~\cite{Kashiwa:2012xm,Shimizu:2017asf,Nishimura:2019umw} is not broken there; it is not possible if there is the RW transition because the shift symmetry is spontaneously broken. In this sense, if the RW periodicity appears but not the RW transition in the system, the nontrivial ground state degeneracy cannot be expected in the $\theta$-direction. Actually, the RW transition is induced by the quark contributions and thus the existence of the RW transition can be considered as an indicator to detect how strong the quark contributions against the baryonic contributions are; for example, the strong coupling limit of QCD which is always in the confined phase does not have the RW transition~\cite{Roberge:1986mm,Kashiwa:2019ihm}. Therefore, we may clarify the confinement and the deconfinement nature via the existence of the RW transition~ \cite{Kashiwa:2015tna,Kashiwa:2016vrl,Kashiwa:2017yvy}. From the canonical approach, we can easily understand the existence of the Roberge-Weiss periodicity at finite $\mu_\mathrm{R}$ because the canonical partition functions seems to be free from $\mu_\mathrm{R}$ and thus we may simply complexify the fugacity as \begin{align} \xi^N \in \mathbb{R} \to e^{ N (\beta \mu_\mathrm{R} + i \theta)} \in \mathbb{C}, \label{eq:com} \end{align} to complexify the chemical potential in the grand canonical partition function. In the following discussions, we are working with sufficiently low $T$, correctly speaking we are working with the almost $T \to 0$ limit, and thus we can evaluate ${\cal Z}_\mathrm{GC}$ based on the perturbation. Therefore, we may rewrite ${\cal Z}_\mathrm{GC}$ as \begin{align} {\cal Z}_\mathrm{GC}(T,\tilde{\mu}) &\sim {\cal Z}_\mathrm{GC}(T,\mu_\mathrm{R}) + \varepsilon(T,\tilde{\mu}) \nonumber\\ &= \sum_{N=-\infty}^\infty e^{\beta \mu_\mathrm{R}N } {\cal Z}_\mathrm{C}(T,N) + \varepsilon(T,\tilde{\mu}), \label{eq:pert} \end{align} which is valid when $\varepsilon \in \mathbb{C}$ can be treated as the perturbation against $\rho_\mathrm{I}(\theta)$ where $\rho_\mathrm{I}$ is the imaginary part of the quark number density and $\varepsilon$ is the infinitesimal $2\pi/3$ periodic function where $\rho_\mathrm{I}=0$ at $\theta=0$: the first and second terms are the origin of the constant and periodic contributions against $\theta$. In other words, we decompose ${\cal Z}_\mathrm{GC}(T,\tilde{\mu})$ to the constant and periodic parts and then we consider the certain $T$ region where the periodic term becomes sufficiently small. The first term in Eq.\,(\ref{eq:pert}) is dominant term and it does not create the singularities at finite $\theta$ by definition. Therefore, $\varepsilon$ can have the contributions of the quark fugacity and they can induce the RW transition at finite $T$ if the quark fugacity contributes to the system markedly. Here, we can assume that $\varepsilon$ cannot create the singularities when we work in the energy regime where $\varepsilon$ can be treated as the perturbation. Since the evaluation of $\varepsilon$ needs actual model, we show a simple estimation below. If the value $\beta \mu_\mathrm{R} \rho_\mathrm{I}$ approaches to the value $\beta \mu_\mathrm{R} \rho_\mathrm{R}$, where $\rho_\mathrm{R}$ means the real part of the quark number density, our perturbative treatment will be violated; $\beta \mu_\mathrm{R} \rho_\mathrm{R}$ and $\beta \mu_\mathrm{R} \rho_\mathrm{I}$ characterize the energy scale of the system because $\rho_\mathrm{R,I}$ are related with $\mu_\mathrm{R,I}$ via the differential calculus. At moderate $\mu_\mathrm{R} \sim \Lambda_\mathrm{QCD}$, we can assume $\rho_\mathrm{R} \sim k_\mathrm{F}^3 \sim \mu_\mathrm{R}^3 \neq 0$ after appearing the Fermi surface where $k_\mathrm{F}$ means the Fermi momentum. This means that the perturbative treatment is acceptable if $\rho_\mathrm{I} = \alpha \mu_\mathrm{R}^3 \ll \Lambda_\mathrm{QCD}^3$ is manifested based on the order counting where $\alpha \ll 1$ which depends on $T$. Since $\rho_\mathrm{I}$ decreases with decreasing $T$ but $\rho_\mathrm{R}$ dose not, we can find the regime, $\rho_\mathrm{I} \ll \Lambda_\mathrm{QCD}^3$, where the perturbative treatment is applicable by tuning $T$. Because of above reasons, we can expect that the RW transition cannot be appeared along the $\theta$-axis at moderate $\mu_\mathrm{R}$ with sufficiently small $T$. The above reasons can be also understood from the simple effective model estimation; see Appendix~\ref{sec:app3}. Based on the discussions presented above, we can assume that the grand canonical partition function at finite $\mu_\mathrm{R}$ at least near $\mu_\mathrm{R} \sim M \sim M_\mathrm{B}/N_\mathrm{c} \sim \Lambda_\mathrm{QCD}$ must have the RW periodicity but not the RW transition if $T$ is small enough where $M_\mathrm{B}$ is the lowest baryon mass. This fact means that $\theta$ may not be the nontrivial Aharonov-Bohm phase and then the nontrivial ground state degeneracy may be absent at moderate $\mu_\mathrm{R}$ with sufficiently small $T$. At high $T$, quark modes must join the game even if $\mu_\mathrm{R}$ is very small and then the present discussion must be modified. Therefore, at sufficiently small $T$, we can expect that the confined state continues to moderate $\mu_\mathrm{R}$ if we clarify it by using the nontrivial ground state degeneracy via the existence of the RW transition. However, this picture may not be correct because we cannot distinguish the confined $N_\mathrm{c}$-quarks contribution and the deconfined $N_\mathrm{c}$-quarks ($\mathrm{mod}(n,N_\mathrm{c})=0$) contribution: this may be a serious problem at sufficiently small $T$ because other explicit $\mathbb{Z_{N_\mathrm{c}}}$ symmetry breaking contributions are strongly suppressed and then we cannot clarify the confinement-deconfinement nature based on the contribution. Actually, the explicit $\mathbb{Z_{N_\mathrm{c}}}$ symmetry breaking contributions can affect the system and induce the RW transition at high $T$ and then the existence of the RW transition indicates the deconfinement energy scale. This means that the absence of the RW transition at sufficiently small $T$ is not a sufficient condition but a necessary condition for the existence of the nontrivial ground state degeneracy. It should be noted that the quark number density can take the large value unlike the nuclear matter and then the structural change of the canonical sectors can be happened at least in large $N_\mathrm{c}$ limit~\cite{Kashiwa:2021czl}. Therefore, the nontrivial ground state degeneracy based on the existence of the RW transition is not enough to clarify the quarkyonic picture at sufficiently small $T$ and thus we need careful analysis of the structural change of the canonical sectors. Some readers may concern how the color superconducting affects the ground state degeneracy because the diquark condensation breaks the color symmetry spontaneously in the gauge fixed calculation, and it seems to affect the RW periodicity when we make the canonical partition functions. The important point is that $\mu$ and $A_4$ appears as the combination $\mu - iA_4$ in the Nambu-Gor'kov spinor for quarks ($S$) at finite chemical potential, which is widely used to consider the color superconductivity, as \begin{align} \tilde{S}^{-1} &= \begin{pmatrix} \gamma \cdot p - m + \gamma_0\bar{\mu} & \Delta \gamma_5 \tau_2 \lambda_2 \\ -\Delta^* \gamma_5 \tau_2 \lambda_2 & \gamma \cdot p - m - \gamma_0 \bar{\mu} \end{pmatrix} , \end{align} where $\Delta$ is the diquark condensation which can include the explicitly symmetry-breaking external-field, $\bar{\mu} = \mu - i A_4$, $p$ denotes the four-dimensional momentum, $m$ means the bare quark mass matrix, $A_4$ is the temporal component of the gluon field, $\gamma_5$ represents the fifth Dirac $\gamma$ matrix, $\tau$ does the Pauli matrices for the isospin space and $\lambda$ does the Gell-Mann matrices for the color space; for example, see Refs.\,\cite{Roessner:2006xn,Huang:2004ik} for details. The above expression can be obtained from the four-Fermi interaction model with the mean-field of the temporal component of the gluon field which comes from the one-gluon exchange interaction with the local ansatz and the Fierz transformation, but the combination $\mu - iA_4$ is model independent; for example, see Ref.\,\cite{Huang:2004ik}. This combination is the RW periodic combination which can be understood from the extended $\mathbb{Z_{N_\mathrm{c}}}$ symmetry~\cite{Sakai:2008py}. Therefore, we can still have the RW periodicity even if there is the diquark condensation. In addition, some readers are interested in the question that the higher-order diquark corrections for the mean-field approximation can break the RW periodicity or not. It is not so trivial, but this question can be answered as "no" at least in the random phase approximation level as shown in appendix~\ref{sec:app2}. Therefore, the above discussions for the ground state degeneracy are expected to be valid even if we consider the diquark contributions; see Ref.\,\cite{Kashiwa:2021czl} for some details how we can treat the diquark condensation in the canonical method. It should be noted that we can also consider the flux insertion to the spatial holes by compactifying the spatial dimensions; it was considered in the original discussion of the topological order. In this case, above discussions are still manifested if we set a sufficiently large compactified length, $L \to \infty$, because we can prove that the RW periodicity appears along the Aharonov-Bohm phase induced by the flux insertions and there is no spatial RW transition according to the same discussions in the case with the imaginary chemical potential; see Appendix \ref{sec:app1} for the spatial Roberge-Weiss periodicity. From the discussions on the grand state degeneracy, we can understood the importance of the canonical sectors for the understanding of the confinement-deconfinement nature of QCD. \section{Summary} \label{sec:summary} In this study, we have investigated what quantity is suitable to investigate the cold QCD matter at finite density based on the information theoretical viewpoint. We have constructed the probability distribution in the canonical and the grand-canonical ensemble and propose some entropies. From the estimation with the large $N_\mathrm{c}$ limit, we have shown that the configuration entropy and the pointwise information can pick up the structural change of the canonical sectors. We found that the peak structure can be found in the configuration entropy and the pointwise information when we focus on the $N_\mathrm{c}$-quark contribution in the multiplicity distribution. This peak structure may be related to the quarkyonic phase transition in the large $N_\mathrm{c}$ limit and its remnant may be expected to be appeared in the realistic $N_\mathrm{c}$ system. In addition, we have discussed the cold QCD matter from the viewpoint of the nontrivial ground state degeneracy with the canonical method. At least near $\mu_\mathrm{R}\sim M_\mathrm{B}/N_\mathrm{c}$ where $\mu_\mathrm{R}$ is the real chemical potential and $M_\mathrm{B}$ means the lowest baryon mass, the quark number density can become $O(N_\mathrm{c}^1)$ in the large $N_\mathrm{c}$ limit above $\mu_\mathrm{R} \sim M_\mathrm{B}/N_\mathrm{c}$. In this situation, $\mod(n,N_\mathrm{c})$-quark (baryonic) contributions only survive and then the nontrivial ground state degeneracy may not be observed if we clarify it via the existence of the RW transition. It should be noted that the above discussions are valid for the $\mu_\mathrm{R}$-dependence with fixed sufficiently small $T$ because the canonical partition functions are independent with $\mu_\mathrm{R}$, but do not with $T$. Therefore, the $T$-dependence is more difficult than the $\mu_\mathrm{R}$-dependence in the present approach; this point is usually opposite in some other approaches. Actually, the multiplicity can be measured from the collision experiments via event-by-event observations and thus this approach seems to be useful in the future; more strictly speaking, the net-proton multiplicity can be observed, but the net-neutron multiplicity can not. Of course, the collision experiment under the cold condition is quite difficult because the thermal system easily appears in the collision region with increasing collision energy. However, the intermediate $T$ system can be explored in the experiments and thus the present discussion may be applicable if peak structure becomes very broad. The lattice QCD simulation is also difficult to construct the canonical partition function at sufficiently low $T$ at present. However, the canonical partition function at low $T$ is successfully estimated in some QCD effective models~\cite{Wakayama:2020dzz,Wakayama:2019hgz} such as the Polyakov-loop extended Nambu--Jona-Lasinio model~\cite{Fukushima:2003fw}. Therefore, if we can not obtain the canonical partition functions of QCD itself in the near future, we can utilize the proposed entropies in this paper with the QCD effective model, and then we can partially clarify the quarkyonic properties of the cold dense QCD matter. In addition, the partial deconfinement~\cite{Hanada:2019czd,Hanada:2020uvt,Hanada:2018zxn,Watanabe:2020ufk} has been proposed recently. The partial deconfinement is characterized via the spontaneous (partial) gauge symmetry breaking based on the Gross-Witten-Wadia transition~\cite{Gross:1980he,Wadia:2012fr} and also the spontaneous breaking of global symmetries. Its realization with sufficiently low $T$ at finite density will be interesting and important in the future because it can connect the completely confined and completely deconfined phases and then it may have direct relation to the quarkyonic picture. In such the case, we may need the detailed distribution of the gauge field and thus it is not clear how the distribution relates to the canonical partition functions at present. \begin{acknowledgments} This work is supported in part by the Grants-in-Aid for Scientific Research from JSPS (No. 19H01898 and No. 20K03974). \end{acknowledgments}
\section{Introduction} The cosmological constant plus cold dark matter ($\Lambda$CDM) model has explained the evolution of the universe successfully. The scenario where cold dark matter accounts for about a quarter of the total energy density is well consistent with the large-scale structure observations. However, we still know little about the constituent of dark matter. Primordial black holes (PBHs)~\citep{Hawking1971,Carr1974,Carr1975}, which could form in the early universe from different mechanisms, such as the enhanced curvature perturbations during inflation~\citep{Clesse2015,Pi2018,Ashoorioon2019,Fu2019,Cai2019,Motohashi2020}, bubble collisions~\citep{Hawking1982}, cosmic string~\citep{Hawking1989,Hogan1984}, and domain wall~\citep{Caldwell1996}, have been a source of interest for nearly half a century. One reason for this interest is that only the mass of PBHs can range from the magnitude small enough for Hawking radiation to be important to the level of the black hole in the center of a galaxy. In contrast, astrophysical processes can only form black holes heavier than a particular mass (around three solar mass). Moreover, PBHs have also been a source of great astrophysical interest since they are often considered to constitute a part of dark matter. Observational searches for PBHs have been conducted intensively and continuously over several decades. Numerous methods have been proposed to constrain the abundance of PBHs (usually quoted as the fraction of PBHs in dark matter $f_{\rm PBH}=\Omega_{\rm PBH}/\Omega_{\rm DM}$) in various possible mass windows (see \citet{Sasaki2018,Green2020} for a review). These constraints include (in)direct observational effects, such as gravitational lensing~\citep{Niikura2019,Griest2013,Niikura12019a,Tisserand2007,Allsman2001,Zumalacarregui2018,Mediavilla2017}, dynamical effects on ultrafaint dwarf galaxies~\citep{Brandt2016,Koushiappas2017}, nondetections of stochastic gravitational wave (GW)~\citep{Wang2018,Clesse2017,Chen2020,Luca2020, Gert2020}, disruption of white dwarfs~\citep{Graham2015}, null detection of scalar-induced GW~\citep{Chen2019b}, and the effect of accretion via cosmic microwave background observations~\citep{Haimoud2017,Aloni2017,Chen2016,Poulin2017,Bernal2017}. Constraints on the PBHs lighter than $\sim10^{15}$g that have already evaporated by the Hawking radiation can be indirectly derived from certain features in the extragalactic and Galactic $\gamma$-ray backgrounds~\citep{Carr2016,DeRocco2019,Laha2019,Laha2020a,Dasgupta2020}. In addtion to these available probes, some other constraints from the near future observations have been proposed, such as gravitational lensing of GW~\citep{Jung2019,Liao2020a,Diego2020}, gamma-ray bursts~\citep{Ji2018}, and 21 cm signals~\citep{Hektor2018,Clark2018,Halder2020}. The mass range $1-100~M_{\odot}$ is now of special interest in view of the recent detection of GW from binary black hole merger~\citep{Abbott2016}. Detection of GW bursts from merges of compact object binaries is one of the most promising ways to study the mass distribution of PBHs. Meanwhile, the abundance of PBHs in the mass range $1-100~M_{\odot}$ also can be well constrained from gravitational lensing effect of prolific transients with millisecond duration, i.e. fast radio bursts (FRBs). FRBs are brief (few millisecond) but very bright radio wave pulses and almost all of them have been observed at extragalactic distances \citep{Lorimer2007,Thornton2013,Petroff2015,Petroff2016,Cordes2019,Zhang2020}. According to the detection rate and the field of view of radio telescopes, a high event rate of this kind of mysterious phenomenon ($\sim10^3$ to $10^5$ sky$^{-1}$day$^{-1}$) has been inferred \citep{Thornton2013,Champion2016,2021ApJ...909L...8N}. Although the radiation mechanism and progenitors of these mysteries are still intensively debated \footnote{The recent detection of a Galactic FRB in association with a soft gamma-ray repeater suggests that magnetar engines can produce at least some (or probably all) FRBs \citep{Zhang2020,CHIME/FRB2020,Bochenek2020,Lin2020}.}, observed dispersion measure (DM) of them, which is proportional to the number density of free electron along the line of sight of radio emission, have been explored as promising probes for constraining cosmological models \citep{Gao2014,Zhou2014,Walters2018,Zhao2020}, baryon census \citep{Deng2014,Macquart2020,Li2019,Li2020}, and reionization history of universe \citep{Linder2020,Bhattacharya2020,Beniamini2021}. Moreover, due to prominent observational features including short duration and precision localization for both repeating and apparent one-off FRBs~\citep{Chatterjee2017,Prochaska2019b}, gravitational lensed FRBs have been widely proposed for cosmological and astrophysical studies, such as millilensed lensed FRBs for probing compact dark matter \citep{Munoz2016,Wang2018a,Liao2020,Laha2020}, galaxy lensing time delay variations for probing the the motion of the FRB source \citep{Dai2017}, and time delay distances of strongly lensed FRBs for precisely measuring the expansion rate and curvature of the universe \citep{Li2018,Wucknitz2020}. Recently, one of the most exciting things is the publication of the first CHIME FRB catalog~\footnote{https://www.chime-frb.ca/catalog}~\citep{CHIME/FRB2021}, which makes up of a considerable portion of currently available FRBs. In this paper, we propose the method of cross-correlation function to search and identify the candidate of lensed FRB and apply the method proposed by \citet{Munoz2016} to constrain the abundance of PBHs with the latest $593$ FRB observations. In addition to the monochromatic mass distribution used in previous studies~\citep{Munoz2016,Liao2020,Laha2020}, we also investigate the results with the popular log-normal mass distribution, which can be compared with constraints from the latest GW catalog. This paper is organized as follows: we introduce the redshift and duration information of the latest FRBs, review the theory of FRBs lensing, and present the method of identifying lensing signatures in Section 2. In section 3, we apply the method to the latest FRB observations and yield results. In addition, we will compare the results of FRBs with current constraints from GW data; Conclusions and discussions are presented in Section 4. \section{Methods} In this section, we briefly introduce the current status of FRB observations, review the FRB lensing theory, and present the method of searching and identifying lensing signatures. \subsection{Fast Radio Burst Observations} The number of verified FRBs is increasing rapidly at the moment owing to services of several wide-field radio telescopes, such as the Canadian Hydrogen Intensity Mapping Experiments (CHIME), the Australian Square Kilometre Array Pathfinder (ASKAP), and the Deep Synoptic Array (DSA). In particular, the CHIME/FRB Collaboration has recently released a catalog of 535 FRBs detected in less than one year (2018 July 25 to 2019 July 1)~\citep{CHIME/FRB2021}. In this catalog, there are 61 bursts from 18 previously reported repeaters. The first large sample observed in a single survey with uniform selection effects is of great value for facilitating comparative and absolute studies of the FRB population. All these FRBs together with bursts detected by other facilities have been collected and compiled by the Transient Name Sever (TNS)~\footnote{https://www.wis-tns.org}. At this moment, there are about 593 independent events publicly available. For a detected FRB, one of the most important observational features is the DM, which is theoretically defined as the integration of the election number density along the traveled path of the radio pulse and, in observations, obtained by measuring the delayed arrival time of two photons with different frequencies. From observed DMs of the first several bursts which were poorly localized then~\citep{Lorimer2007,Thornton2013}, cosmological origins of this kind of mysterious flashes was inferred. And this inference has been subsequently confirmed by the localization of the first repeater FRB20121102A to a nearby dwarf galaxy~\citep{Tendulkar2017,Chatterjee2017,Marcote17}. Therefore, the distance and the redshift can be roughly derived from the observed DM of a detected FRB which is usually decomposed into: \begin{equation}\label{eq1} {\rm DM}={\rm DM_{MW}}+{\rm DM_{IGM}}+\frac{\rm DM_{\rm host}+DM_{\rm src}}{1+z}, \end{equation} where ${\rm D_{MW}}$ is the contribution from the Milky Way, ${\rm DM_{host}}$ and ${\rm DM_{src}}$ are contributions from FRB host galaxy and source environment, respectively. Here, we conservatively adopt the maximum value of ${\rm DM_{host}}+{\rm DM_{src}}$ to be 200 $\rm pc/cm^{3}$, which corresponds to the minimum inference of redshift for all host galaxies. In addition, the ${\rm DM_{IGM}}-z$ relation is given by~\citet{Deng2014}, approximately ${\rm DM_{IGM}}\sim855z ~\rm pc/cm^3$~\citep{Zhang2018}, with the consideration of He ionization history and the fraction of baryon in intergalactic medium (IGM) $f_{\rm IGM}$ being $0.83$. This relation is statistically favored by the five localized FRBs available at that time~\citep{Li2020}. Inferred redshifts for currently public FRBs from different facilities are shown in Figure~\ref{fig1}. Another important observational feature of FRBs for lensing scales in our following analysis is the short duration. Therefore, we collect the pulse widths of all available FRBs and present them in Figure~\ref{fig2}. \begin{figure}[ht!] \centering \includegraphics[width=0.4\textwidth, height=0.3\textwidth]{z.pdf} \caption{Distribution of inferred redshifts of 593 FRBs, including 492 FRBs from CHIME and 101 FRBs from other facilities.}\label{fig1} \end{figure} \begin{figure}[ht!] \centering \includegraphics[width=0.4\textwidth, height=0.3\textwidth]{zs.pdf} \caption{Two-dimensional distribution of widths and inferred redshifts.}\label{fig2} \end{figure} \subsection{Lensing of Fast Radio Bursts} In~\citet{Munoz2016}, it was first pointed out that lensing effect of FRB can be used to probe PBHs with mass as small as $20~M_{\odot}$. We can take the PBH as a point mass whose Einstein radius is given by: \begin{equation}\label{eq2} \theta_{\rm E}=2\sqrt{\frac{GM_{\rm PBH}}{c^2D}}\approx (3\times10^{-6})^{''}\bigg(\frac{M_{\rm PBH}}{M_{\odot}}\bigg)^{1/2}\bigg(\frac{D}{\rm Gpc}\bigg)^{-1/2}, \end{equation} where $G$ and $c$ denote the gravitational constant and the speed of light, respectively. In addition, $D=D_{\rm L}D_{\rm S}/D_{\rm LS}$ is effective lensing distance, where $D_{\rm S}$, $D_{\rm L}$, and $D_{\rm LS}$ represent the angular diameter distance to the source, to the lens, and between the source and the lens, respectively. Although the spatial resolution in radio observation could reach a high level $\sim(10^{-2})^{''}$, it is still insufficient to distinguish split image for $M_{\rm PBH}<10^8~M_{\odot}$. However, one can directly measure the time delay between lensed signals. The formula of time delay is determined by: \begin{equation}\label{eq3} \begin{split} \Delta t(M_{\rm PBH},z_{\rm L},y)=\frac{4GM_{\rm PBH}}{c^3}\big(1+z_{\rm L}\big)\\ \bigg[\frac{y}{2}\sqrt{y^2+4}+\ln\bigg(\frac{\sqrt{y^2+4}+y}{\sqrt{y^2+4}-y}\bigg)\bigg], \end{split} \end{equation} where the dimensionless impact parameter $y=\beta/\theta_{\rm E}$ stands for the relative source positions, $z_{\rm L}$ is the lens redshift. $\Delta t$ must be larger than the width ($w$) of the observed signal. This requires $y$ larger than a certain value $y_{\rm min}(M_{\rm PBH},z_{\rm L},w)$ according to Equation~\ref{eq3}. The lensing cross section due to a PBH lens is given by: \begin{equation}\label{eq4} \begin{split} \sigma(M_{\rm PBH}, z_{\rm L}, z_{\rm S}, w)=\frac{4\pi GM_{\rm PBH}D_{\rm L}D_{\rm LS}}{c^2D_{\rm S}}\\ [y^2_{\rm max}(R_{\rm f,max})-y^2_{\rm min}(M_{\rm PBH},z_{\rm L},w)]. \end{split} \end{equation} The maximum value of normalized impact parameter can be found by requiring that the two lensed images is greater than some reference value of flux ratio $R_{\rm f}$: \begin{equation}\label{eq5} y_{\rm max}(R_{\rm f,max})=\sqrt{\frac{1+R_{\rm f,max}}{R_{\rm f,max}^{0.5}}-2}. \end{equation} We take $R_{\rm f,max}=5$ for cases when we study lensing of the whole burst. For a given source, the lensing optical depth due to a single PBH is: \begin{equation}\label{eq6} \begin{split} \tau(M_{\rm PBH},f_{\rm PBH},z_{\rm S},w)=\int_0^{z_{\rm S}}d\chi(z_{\rm L})(1+z_{\rm L})^2n_{\rm L}(f_{\rm PBH})\\ \sigma(M_{\rm PBH},z_{\rm L},z_{\rm S}, w)=\frac{3}{2}f_{\rm PBH}\Omega_{\rm DM}\int_0^{z_{\rm S}}dz_{\rm L}\frac{H_0^2}{cH(z_{\rm L})}\frac{D_{\rm L}D_{\rm LS}}{D_{\rm S}}\\ (1+z_{\rm L})^2[y^2_{\rm max}(R_{\rm f,max})-y^2_{\rm min}(M_{\rm PBH},z_{\rm L},w)], \end{split} \end{equation} where $n_{\rm L}$ is the comoving number density of the lens, $H_0$ is the Hubble constant at present universe, $H(z_{\rm L})$ is the Hubble function at $z_{\rm L}$, $f_{\rm PBH}$ represents the fraction of PBHs in dark matter, and $\Omega_{\rm DM}$ is the present density parameter of dark matter. Now, for a given distribution function $N(z_{\rm S})$ of FRBs, we can calculate their integrated lensing optical depth $\bar{\tau}(M_{\rm PBH},f_{\rm PBH},w)$ as: \begin{equation}\label{eq7} \bar{\tau}(M_{\rm PBH},f_{\rm PBH},w)=\int dz_{\rm S}\tau(M_{\rm PBH},f_{\rm PBH},z_{\rm S},w)N(z_{\rm S}). \end{equation} If we observe a larges number of FRBs, $N_{\rm FRB}$, then the number of FRBs that will be lensed is: \begin{equation}\label{eq8} N_{\rm lensed~FRB}=(1-e^{-\bar{\tau}(M_{\rm PBH},f_{\rm PBH},w)})N_{\rm FRB}. \end{equation} If none of the FRBs is found to be lensed, then the fraction of dark matter in the form of PBHs can be estimated in Equation~\ref{eq8}. Now, the newest event number is $593$, which holds a statistical meaning. According to the definition, the expected number of lensed FRBs can be approximated to the sum of the lensing optical depths of all FRBs ($\tau_i\ll1$): \begin{equation}\label{eq9} N_{\rm lensed~FRB}=\sum_{i=1}^{N_{\rm total}}\tau_i(M_{\rm PBH},f_{\rm PBH},z_{S,i},w_i). \end{equation} The above formalism is valid if the mass distribution of the PBHs follows monochromatic mass function. It has been theoretically shown that PBHs can also follow an extended mass distribution function~\citep{Bellomo2018,Carr2017,Laha2020}. We will consider the log-normal mass function of PBHs, and log-normal mass function is parametrized as: \begin{equation}\label{eq10} P(m,\sigma,m_{\rm c})=\frac{1}{\sqrt{2\pi}\sigma m}\exp\bigg(-\frac{\ln^2(m/m_{\rm c})}{2\sigma^2}\bigg), \end{equation} where $m_{\rm c}$ and $\sigma$ give the peak mass of $mP(m)$ and the width of mass spectrum. This mass function is often a good approximation if PBHs result from a smooth symmetric peak in the inflationary power spectrum. Therefore, it can be representative of a large class of extend mass functions. For a log-normal mass distribution, the lensing optical depth can be expressed as: \begin{equation}\label{eq11} \begin{split} \tau(f_{\rm PBH},z_{\rm S}, w, \sigma,m_{\rm c})=\int dm\int_0^{z_{\rm S}}d\chi(z_{\rm L})(1+z_{\rm L})^2n_{\rm L}(f_{\rm PBH})\\ \sigma(m,z_{\rm L},z_{\rm S}, w)P(m,\sigma,m_{\rm c})=\int dm\int^{z_{\rm S}}_0dz_{\rm L}\frac{3}{2}f_{\rm PBH}\Omega_{\rm DM}\frac{H_0^2}{cH(z_{\rm L})}\\ \frac{D_{\rm L}D_{\rm LS}}{D_{\rm S}}(1+z_{\rm L})^2[y^2_{\rm max}(R_{\rm f,max})-y^2_{\rm min}(m,z_{\rm L},w)]\frac{1}{\sqrt{2\pi}\sigma m}\\ \exp\bigg(-\frac{\ln^2(m/m_{\rm c})}{2\sigma^2}\bigg). \end{split} \end{equation} This calculated value of the optical depth can be used to the integrated optical depth in Equation~\ref{eq7}. \subsection{Searching and identifying lensing signatures} An FRB strongly lensed by a lens mass greater than $\sim20~M_{\odot}$ would be separated into two images with observable time delay $\gtrsim$ few milliseconds and the light curve of it will appear as two distinct peaks ($I_1(t)$, $I_{2}(t)$). In this case, the lensing time delay would be comparable with or greater than the duration of the burst and can be read manifestly. To detect this, we define the normalized cross-correlation (NCC) of two peaks~\citep{Bracewell1986,Liyang1993,Liwang1996,Gonzalez2002,Hirose2006}: \begin{equation}\label{eq12} C(\delta t)=\frac{\int dtI_1(t)I_2(t-\delta t)}{\sqrt{\int dt I^2_1(t)}\sqrt{\int dtI^2_2(t-\delta t)}}. \end{equation} In a specific lensing configuration, the light curve of the first peak $I_1(t)$ should be proportional to the second peak $I_2(t)$ with time delay $\Delta t$ and flux ratio $R_{\rm f}$: \begin{equation}\label{eq13} I_1(t)=R_{\rm f}I_2(t-\Delta t). \end{equation} It is obvious that, for a lensed FRB, NCC will exhibit spikes at different frequency bins with $C(\delta t=\Delta t)\backsimeq1$. To test the validity of this method, we first simulate a positive case (i.e. a typical lensed signal) for the above-mentioned NCC analysis. In the simulation, we set the frequency range of $400$-$800~\rm MHz$ with 16384 frequency channels and the time resolution being $0.98~\rm ms$, which are consistent with characteristics of recently released CHIME FRBs. The simulated de-dispersed bursts that follow the Gaussian profile and its background is injected with Gaussian white noise. We generate two lensed bursts that have the same frequency emission band and pulse structure but different arriving time and intensities. In addition, the signal-to-noise ratio ($\rm SNR$) of mocked signals is roughly consistent with the averaged level of the CHIME FRB observations. The frequency-time (``waterfall") plot of the mocked signal is shown in the left panel of Figure~\ref{fig3}. Next, we carry out NCC analysis for the mocked pulses and the result is presented in the right panel. As expected, for a typical lensed FRB signal, the values of NCC peak the same time delay in different frequency bins, which is consistent with the prediction of gravitational lensing theory. Moreover, the lensing time delay of two pulses can be obtained as $\Delta t=10\rm~ms$ with flux ratio $R_{\rm f}=2$ and we can infer the redshifted lens mass $M_z=M_{\rm PBH}(1+z_{\rm L})=725.2~M_{\odot}$ based on equation~\ref{eq3}. Finally, we quote the Pearson correlation coefficient (PCC: $\rho_{12}$)~\citep{Pearson1896,Dunn1974,Rodgers1988} to evaluate the degree of correlation between two peaks (peak1,~peak2). In relation to the range of values of $\rho_{12}$, we can distinguish the following cases: \begin{itemize} \item $\rho_{12}\sim(0.7,~1)$, it testifies a strong positive correlation of the dependent peak1 with the independent peak2. \item $\rho_{12}\sim(0.3,~0.7)$, it testifies a moderate positive correlation of the dependent peak1 with the independent peak2. \item $\rho_{12}\sim(0,~0.3)$, it testifies a weak positive correlation of the dependent peak1 with the independent peak2. \end{itemize} The value of $\rho_{12}$ also could be negative and the magnitude of it testifies corresponding degree of negative correlation. The PCCs for each frequency bin of the mocked signal are plotted in the right panel of Figure \ref{fig3}. Since the PCC value is sensitive to the level of SNR, a mean of PCCs ($\overline{\rho_{12}}$) for frequency bins with SNR larger than a reasonable threshold is derived and also shown in the right panel of Figure \ref{fig3}. For the simulated lensed signal, we obtain $\overline{\rho_{12}}=0.863$ and it testifies a strong positive correlation between these two peaks. That is, lensing signatures could be successfully identified by this algorithm. Furthermore, we simulate a negative case (i.e. a typical unlensed FRB signal) for comparison. In this case, the background is set as the same as the lensed signal. However, the profiles of two pulses are significantly different. The first pulse is mocked as a Gaussian profile but the second one is configured as a complicated hybrid of several Gaussian profiles. Moreover, flux ratios at different frequency bins are also set to vary randomly. The frequency-time (``waterfall") plot of the mocked unlensed signal is shown in the left panel of Figure~\ref{fig4}. Again, we first carry out NCC analysis for the mocked pulses and the result is presented in the right panel. It is found that the time delay maximizing the NCC value is significantly different for different frequency bin. It implies that a specific lensing time delay could not be derived from these two peaks. Then, PCCs for each frequency bin of this mocked signal are computed and plotted in the right panel of Figure \ref{fig4}. We obtain $\overline{\rho_{12}}=0.156$, which testifies a very weak positive correlation between these two peaks. That is, these results show strong evidence of an unlensed signal, which is in excellent agreement with the input of the simulation. Therefore, we conclude that these algorithms are robust for identifying lensing signatures with observable time delay $\gtrsim$ few milliseconds from FRB observations. \begin{figure*} \centering \includegraphics[width=0.3\textwidth, height=0.4\textwidth]{Simulate_FRB_snr_1_len.png} \includegraphics[width=0.4\textwidth, height=0.4\textwidth]{corr-len1.png} \caption{\textbf{Left panel:} the dynamic spectrum of a simulated lensed FRB signal. \textbf{Right panel:} The subfigure in the middle represents the two-dimensional NCC analysis at different frequency bins. The subfigure in the upper left represents the NCC analysis of the light curve of the two peaks in the left panel. The subfigure on the right is the PCC of two pulses in different frequency bins, and $\overline{\rho_{12}}$ represents the average of PCC in the gray shade frequency range. }\label{fig3} \end{figure*} \begin{figure*} \centering \includegraphics[width=0.3\textwidth, height=0.4\textwidth]{Simulate_FRB_snr_1n_len.png} \includegraphics[width=0.4\textwidth, height=0.4\textwidth]{corr-len1n.png} \caption{Same as Figure~\ref{fig3} but for a simulated unlensed FRB signal.}\label{fig4} \end{figure*} \begin{deluxetable*}{ccccc} \tablenum{1} \tablecaption{34 FRBs and evidence of not being lensed.}\label{tab1} \tablewidth{0pt} \tablehead{ \colhead{TNS name} & \colhead{Repeater source name} & \colhead{Frequency drift} & \colhead{Impossible flux ratio} & \colhead{Different structures of peaks} } \startdata FRB20180814B & {} & {} & {} & $\checkmark$\\ FRB20180917A & FRB20180814A & $\checkmark$ & $\checkmark$ & $\checkmark$\\ FRB20181019A & FRB20180916B & $\checkmark$ & {} & {}\\ FRB20181028A & FRB20180814A & $\checkmark$ & {} & {}\\ FRB20181104C & {} & {} & {} & $\checkmark$\\ FRB20181117B & {} & {} & $\checkmark$ & {}\\ FRB20181119D & FRB20121102A & $\checkmark$ & {} & {}\\ FRB20181125A & {} & {} & $\checkmark$ & $\checkmark$\\ FRB20181128A & FRB20181128A & $\checkmark$ & {} & $\checkmark$\\ FRB20181128C & {} & $\checkmark$ & {} & $\checkmark$\\ FRB20181222A & FRB20180916B & $\checkmark$ & {} & $\checkmark$\\ FRB20181223A & FRB20180916B & {} & {} & $\checkmark$\\ FRB20181226A & FRB20180916B & $\checkmark$ & {} & {}\\ FRB20181226B & {} & {} & $\checkmark$ & $\checkmark$\\ FRB20181228D & {} & {} & $\checkmark$ & $\checkmark$\\ FRB20190104A & {} & $\checkmark$ & {} & $\checkmark$\\ FRB20190109A & {} & {} & {} & $\checkmark$\\ FRB20190111A & {} & $\checkmark$ & {} & {}\\ FRB20190122C & {} & $\checkmark$ & {} & $\checkmark$\\ FRB20190124C & {} & {} & {} & $\checkmark$\\ FRB20190208A & FRB20190208A & $\checkmark$ & $\checkmark$ & {}\\ FRB20190213B & FRB20190212A & $\checkmark$ & {} & {}\\ FRB20190301A & FRB20190222A & $\checkmark$ & {} & $\checkmark$\\ FRB20190308C & {} & {} & $\checkmark$ & {}\\ FRB20190422A & {} & $\checkmark$ & $\checkmark$ & $\checkmark$\\ FRB20190423A & {} & $\checkmark$ & {} & {}\\ FRB20190423B & {} & {} & {} & $\checkmark$\\ FRB20190519A & FRB20180916B & $\checkmark$ & {} & $\checkmark$\\ FRB20190519B & FRB20180916B & $\checkmark$ & $\checkmark$ & $\checkmark$\\ FRB20190527A & {} & $\checkmark$ & $\checkmark$ & {}\\ FRB20190604F & FRB20180916B & $\checkmark$ & {} & $\checkmark$\\ FRB20190609A & {} & {} & {} & $\checkmark$\\ FRB20190611A & FRB20180814A & $\checkmark$ & {} & $\checkmark$\\ FRB20190625E & FRB20180814A & $\checkmark$ & $\checkmark$ & {} \enddata \end{deluxetable*} \begin{deluxetable*}{ccccccc} \tablenum{2} \tablecaption{Normalised cross-correlation and Pearson correlation coefficient result of 9 FRBs. ``Strong NCC" means that there is a strong cross-correlation at the same time delay for different frequency bins. $\overline{\rho_{12}}$ represents the average value of PCC in the frequency bins with high $\rm SNR$. }\label{tab2} \tablewidth{0pt} \tablehead{ \colhead{TNS name} & \colhead{Repeater of FRB} & \colhead{Strong NCC} & \colhead{$\overline{\rho_{12}}$}} \startdata FRB20181222E & {} & no & 0.007\\ \hline FRB20181224E & {} & no & 0.056\\ \hline FRB20190131D & {} & no & 0.030\\ \hline FRB20190308B & {} & no & 0.044\\ \hline FRB20190411C & {} & no & 0.210\\ \hline FRB20190421A & FRB20190303A & no & 0.008\\ \hline FRB20190501B & {} & no & -0.065\\ \hline FRB20190601C & {} & no & -0.060\\ \hline FRB20190605B & FRB20180916B & no & 0.102\\ \enddata \end{deluxetable*} \section{Results} In this section, we first present the search result of lensing signatures from the latest FRB observations. Then, we show constraints on the abundance of PBH derived from this search result. \subsection{Search result of lensing signatures} As suggested in~\citet{Munoz2016} and~\citet{Liao2020}, a lensed FRB should appear in dynamic spectrum as two pulses with almost the same profile and only different from each other by flux magnification and time delay. We have carefully checked the dynamic spectra of the latest $593$ independent FRBs. Since we target lensing signatures with observable time delay greater than the duration of the burst, we only focus on FRBs with multiple peaks. In addition to FRBs: FRB20121002A, FRB20121102A (repeating), FRB20170827A, FRB20180814A (repeating), FRB20181112A, and FRB20181123B reported in \citet{Liao2020}, we find other dozens of FRBs with double/multiple-peak structures and list them in Table~\ref{tab1} and Table~\ref{tab2}. For FRBs listed in Table~\ref{tab1}, they have been excluded as lensed candidates because of obvious characteristics which significantly violate predictions of gravitational lensing theories in their dynamic spectra, such as ``frequency drift" phenomenon, impossible flux ratio (i.e. the second pulse is brighter than the first one), and different structures of peaks. For example, the dynamic spectra of FRB20181019A with three peaks clearly show the ``frequency drift" phenomenon as mentioned in~\citet{Liao2020}. FRB20181228D has two peaks, but the first peak has lower flux than the second one, which is against the prediction of lensing theory. FRB20190124C is not lensed since the pulses show significant different structures. Therefore, after carefully checking characteristic features in their dynamic spectra, we find that FRBs with multiple peaks presented in Table \ref{tab1} are not lensed candidates. For FRBs listed in Table~\ref{tab2}, their characteristic features in dynamic spectra are not enough to identify them as lensed or unlensed candidates since pulses in each FRB show similar profile and frequency range. In addition, the second pulse of these bursts is fainter than the first corresponding pulse. This is also consistent with the gravitational lensing prediction. Therefore, we apply the NCC and PCC algorithms to identify whether these sources are lensed or unlensed. For example, the dynamic spectrum, NCC and PCC analysis results of FRB20190411C have been shown in Figure~\ref{fig5}. As suggested in the right panel, there is no strong cross-correlation between two peaks in different frequency bins and the PCC value $\overline{\rho_{12}}=0.210$ also testifies weak correlation between two pulses. In Figure~\ref{fig6}, we also present the dynamic spectrum, NCC and PCC analysis results of another example, FRB20190605B. There is obvious correlation between two pulses in the frequency range of 400-500 MHz. However, the maximum of NCC happens at different time delays for different frequency bins. Moreover, the PCC value $\overline{\rho_{12}}=0.102$ again testifies weak correlation between two pulses of this burst. Therefore, according to the NCC and PCC analysis results shown in Table \ref{tab2}, no strong evidence of lensed candidate has been identified in these FRBs. \begin{figure*} \centering \includegraphics[width=0.3\textwidth, height=0.4\textwidth]{waterfallFRB20190411C_waterfall.h5.png} \includegraphics[width=0.4\textwidth, height=0.4\textwidth]{corrFRB20190411C.png} \caption{Same as Figure~\ref{fig3} but for FRB20190411C from the first CHIME FRB catalog.}\label{fig5} \end{figure*} \begin{figure*} \centering \includegraphics[width=0.3\textwidth, height=0.4\textwidth]{waterfallFRB20190605B_waterfall.h5.png} \includegraphics[width=0.4\textwidth, height=0.4\textwidth]{corrFRB20190605B.png} \caption{Same as Figure~\ref{fig3} but for FRB20190605B from the first CHIME FRB catalog.}\label{fig6} \end{figure*} \begin{figure}[ht!] \centering \includegraphics[width=0.4\textwidth, height=0.3\textwidth]{fpbh-mm.pdf} \caption{Constraints on the projected upper limits of the fraction of PBH in dark matter with a monochromatic mass function, which is based on the null search result of lensed signal in the latest FRB observation. Total, CHIME, and Others represent FRBs of full sample, FRBs from CHIME, and FRBs from other facilities, respectively.}\label{fig7} \end{figure} \begin{figure}[ht!] \centering \includegraphics[width=0.4\textwidth, height=0.3\textwidth]{fpbh-lnmc.pdf} \caption{Same as Figure~\ref{fig7}. Constraints on the projected upper limits of the fraction of PBH in dark matter with a log-normal mass function, which is based on the fact that no lensed signal has been found in all currently available $593$ FRBs.}\label{fig8} \end{figure} \subsection{Constraints on $f_{\rm PBH}$} As shown in Figure~\ref{fig2}, there is the two-dimensional distribution of widths and inferred redshifts. We can find that the inferred redshift of FRBs tend to be concentrated at low redshifts $z<1.5$ in Figure~\ref{fig1}, which will be one of the factors that have an important influence on the results. We follow the standard operating procedure in this paper for constraints on the the abundance of PBHs. For the monochromatic mass function, each $(M_{\rm PBH},f_{\rm PBH})$ corresponds to an expected number of lensed FRB signals according to Equation~\ref{eq6} and Equation~\ref{eq9}. Since no lensed signal has been found in the current data, the curve in the $(M_{\rm PBH},f_{\rm PBH})$ parameter space that predicts at least one detectable lensed signal should be ruled out ($63\%$ confidence level). As shown in Figure~\ref{fig7}, the mass can be tested down to $\sim10~M_{\odot}$ and $f_{\rm PBH}$ is gradually constrained to $8.6\%$ for the mass range $\gtrsim10^2~M_{\odot}$. In Figure~\ref{fig7}, we also show the result of constraints on $f_{\rm PBH}$ from the CHIME FRB observations. It suggests that the first CHIME FRB catalog has greatly improved the constraints on the abundance of PBH. Although current constrains are relative weak, especially for small masses, there will be much better constraints from large number of FRBs data in the near future~\citep{Liao2020, Laha2020, Munoz2016}. Recently, constraints on PBHs in the stellar mass range with the Bayesian inference method and the log-normal distribution from the GWTC-1/GWTC-2 GW catalog have been extensively studied~\citep{Chen2019a,Wu2020,Gert2020,Kaze2020,Luca2020}. Therefore, in order to compare constraints on PBH from FRB observations with those from GW detections in this intriguing mass window, we next derive projected constraints on $f_{\rm PBH}$ from the latest FRB observations assuming that the mass of PBHs follows a log-normal distribution. Results are shown in Figure~\ref{fig8}. we assume the parameter $\sigma=0.2$, $0.6$, and $1.1$ in log-normal mass function. Analogously, each $(m_{\rm c},f_{\rm PBH})$ corresponds to an expected number of lensed FRB signals according to Equation~\ref{eq9} and Equation~\ref{eq11}. Since no lensed signal has been found in the current data, the region above the curve that predicts at least one detectable lensed signal in the $(m_{\rm c},f_{\rm PBH})$ parameter space should be ruled out. We find our results at $m_{\rm c}\leq100~M_{\odot}$ still weaker compared with the results of GW~\citep{Luca2020, Gert2020}. \section{Conclusions and discussions} FRBs are one of the most mysterious phenomena in astrophysics. Although we do not yet understand formation mechanisms of these bursts, some their unique observational features make them as promising probes for astrophysical and cosmological purposes. Meanwhile, the recent detection of GWs from mergers of binary stellar mass black holes has stimulated great interests in PBHs of this mass range. Gravitational lensing effect of transients with millisecond duration and high event rate, e.g. FRBs, has been put forward as one of the cleanest probes for exploring properties of PBHs in the mass range $1-100~M_{\odot}$. In this paper, we first propose to use the normalised cross-correlation and Pearson correlation coefficient algorithms for identifying lensed signatures in FRB observations. Next, we have carefully checked all events with multiple peaks by comparing their observational properties, such as dynamic spectra, morphologies of the pulses, and the flux ratio, with lensing theory predictions. Most of them have been ruled out as lensed FRB candidate. For the rest $\sim10$ FRBs whose waterfalls apparently look like lensed events, we further apply the NCC and PCC algorithms to testify the evidence of them as lensed signals. The tests suggest that there is no strong evidence of correlation between peaks of these FRBs. As a result, we conclude that there is no lensing candidate with time delay greater than duration in currently available FRB observations. On the basis of the null search result, we derive direct constraints on the abundance of PBH from the latest FRB observations and obtain that, for a monochromatic mass distribution, the abundance of PBHs is constrained to $\leq8.6\%$. This constraints has been significantly improved owing to the inclusion of the first CHIME FRB catalog. Moreover, we also investigate constraints by considering a log-normal mass distribution, which is naturally predicted by some popular inflation models, to compare results constrained from FRB observations with those from GW detections. Although this constraint is weaker compared with the results from GW, it will be significantly improved with the rapid increase of the number of FRBs detected by wide-field surveys (like CHIME and DAS-2000) in the near future. As a result, there would be significant overlap between areas constrained from FRB observations and the ones from GW detection in the parameter space of the mass distribution. Then, it would be possible to jointly constrain the abundance and mass distribution of PBHs by combining this two kinds of promising multi-messenger observations. It is foreseen that these joint constraints will of great importance for exploring the nature of PBHs in the stellar mass range, or even their formation mechanisms relating to physics of the early universe. \section{Acknowledgements} The authors thank the Yukawa Institute for Theoretical Physics at Kyoto University, where this work was initiated during the YITP International Molecule-type Workshop ``Fast Radio Bursts: A Mystery Being Solved?". We also would like to thank Ziggy Pleunis for helpful discussions. This work was supported by the National Natural Science Foundation of China under Grants Nos. 11920101003, 11722324, 11603003, 11633001, 11973034 and U1831122, the Strategic Priority Research Program of the Chinese Academy of Sciences, Grant No. XDB23040100, and the Interdiscipline Research Funds of Beijing Normal University.
\section{Introduction} The \emph{nonorientable (smooth) $4$-ball genus} $\gamma_4(K)$ of a knot $K$ in the $3$-sphere $S^3$ is the minimal first Betti number $b_1(F) = \dim H_1(F; \mathbb{Q})$ of any smoothly embedded nonorientable surface $F$ in the $4$-ball $B^4$ with $\partial F = K$. By definition, $\gamma_4(K) \geq 1$ for any knot $K$ in $S^3$, and $\gamma_4(K) = 1$ if and only if $K$ bounds a smooth M{\"o}bius band in $B^4$. Moreover, if $K$ is smoothly slice, i.\,e.~ $K$ bounds a smoothly embedded disk in $B^4$, then $\gamma_4(K)=1$. First introduced by Murakami and Yasuhara \cite{murakami2000four}, $\gamma_4$ has drawn increased attention in recent years. One class of knots that has received considerable attention is the class of torus knots $T_{p,q}$ for relatively prime positive integers $p$ and $q$. For $p\le 3$ (or similarly, $q\le 3$), it is known that $\gamma_4(T_{p,q})=1$: $T_{1,q}$ is the unknot for all $q$; $T_{2,q}$ bounds an obvious band with $q$ half twists (i.\,e.~ a M{\"o}bius band); and a single nonorientable band move turns $T_{3,q}$ into the unknot for each $q$ (see \cite[Section 2.1]{allen2020nonorientable}). In general, however, the values of $\gamma_4$ for torus knots are not known. In \cite{batson2012nonorientable}, Batson constructed a nonorientable surface $F_{p,q}$ in $B^4$ with $\partial F_{p,q} =T_{p,q}$ via \emph{pinch moves} (defined in \Cref{sec:upperBounds}). The minimal first Betti number of $F_{p,q}$ is called the \emph{pinch number} of $T_{p,q}$, which we denote by $\vartheta(T_{p,q})$. Batson conjectured that $\gamma_4(T_{p,q})=\vartheta(T_{p,q})$. This could be seen as the nonorientable analogue of the Milnor conjecture \begin{align}\label{eq:orientablegeneraoftorusknots} g_4\left(T_{p,q}\right) = g\left(T_{p,q}\right) = \frac{(p-1)(q-1)}{2}, \end{align} which was first proven by Kronheimer and Mrowka \cite{kronheimermrowka}. Here $g_4(K)$ denotes the \emph{(orientable) $4$-ball genus} of a knot $K$ in $S^3$ --- the minimal genus of a compact, oriented surface smoothly embedded in $B^4$ bounded by $K$ --- and $g(K)$ denotes the \emph{$3$-genus} of a knot $K$ in $S^3$ --- the minimal genus of a compact, oriented surface smoothly embedded in $S^3$ bounded by $K$.\footnote{In contrast to the orientable setting, where $g_4\left(T_{p,q}\right)= g\left(T_{p,q}\right)$ (see \Cref{eq:orientablegeneraoftorusknots}), it is in general not true that $\gamma_4\left(T_{p,q}\right) = \gamma_3\left(T_{p,q}\right)$ for any relatively prime positive integers $p$ and $q$, where $\gamma_3\left(T_{p,q}\right)$ is the minimal first Betti number of any nonorientable smooth surface $F$ in $S^3$ with $\partial F = K$ (as defined by Clark \cite{clark}). In fact, the difference between $\gamma_3$ and $\gamma_4$ can be arbitrarily large \cite[Theorem 1.1]{jabukavanCott3and4}. By work of Teragaito \cite{teragaito}, it is known that the value of $\gamma_3(T_{p,q})$ is determined by a recursive, arithmetic function of $p$ and $q$.} By showing that $\gamma_4\left(T_{2k,2k-1}\right)= \vartheta\left(T_{2k,2k-1}\right)= k-1$ for all $k \geq 1$, Batson provided an infinite family of torus knots for which his conjecture is true. Further such infinite families of torus knots were found by Jabuka and Van Cott \cite{jabuka2019nonorientable}. However, Batson's conjecture was disproved by Lobb \cite{lobb}, who found that $\gamma_4(T_{4,9})=1$ while $\vartheta(T_{4,9})=2$. Soon after, Longo \cite{longo} generalized this example, showing that $\gamma_4(T_{4n,(2n\pm 1)^2})\leq 2n-1$ while $\vartheta(T_{4n,(2n\pm 1)^2})=2n$ for all $n\ge 2$. Tairi \cite{tairi} provided another infinite family of counterexamples, showing in particular that $\gamma_4 (T_{4,11})=1$ while $\vartheta(T_{4,11})=2$. In this article, we will shed more light on the nonorientable $4$-ball genus of torus knots, in both the smooth and topological categories. In particular, we will: \begin{itemize} \item develop a new lower bound on $\gamma_4$ using involutive unoriented Floer homology (\Cref{mobiusthm} and \Cref{highergenusthm} below, see \Cref{subsec:lowerbound} for details), which --- for so-called $L$-space knots (and consequently, torus knots) --- can be read off from the Alexander polynomial (\Cref{thm:lowerbound} below); \item develop an obstruction to torus knots bounding (locally flat) M{\"o}bius bands using linking forms and number-theoretic arguments (see \Cref{subsec:obstructmobius}); \item and use these new tools along with existing tools to either compute or give narrow bounds on $\gamma_4$ for some infinite families of torus knots. \end{itemize} Throughout, we will always assume that for any torus knot $T_{p,q}$, $p$ and $q$ are positive, relatively prime integers. The main lower bound on $\gamma_4$ that we will use is the following. \begin{thm} Let $K$ be an $L$-space knot. Write the Alexander polynomial $\Delta_K(t)$ of $K$ as a monic, symmetric Laurent polynomial, and suppose that its constant term is $-1$ and that the first nonzero term of positive degree is $t^k$, i.\,e.~ $\Delta_K(t)=\cdots + t^{-k} - 1 + t^k - \cdots$. If $K$ bounds a smoothly embedded M{\" o}bius band in $B^4$, then $k=1$. Furthermore, if $K$ bounds a smoothly embedded nonorientable surface with first Betti number $g$ in $B^4$, then $k\le g+1$. \label{thm:lowerbound} \end{thm} \begin{rem} Notice the difference between the M{\" o}bius band case and the case of higher first Betti number. Interestingly, this difference is substantial and cannot be removed since the bound in the case of higher first Betti number is sometimes sharp; see the proof of \Cref{prop:longoextension} in \Cref{sec:calculations}. \label{rem:difference} \end{rem} \begin{rem} The integer $k$ in \Cref{thm:lowerbound} is called the \emph{stretch} of the given $L$-space knot $K$, which was defined by Borodzik and Hom in \cite{borodzik2019involutive}. It is shown in \cite[Theorem 3.10]{borodzik2019involutive} that the stretch of a torus knot $T_{p,q}$ is given by $\left \lfloor{\frac{a_k-1}{2}}\right \rfloor +1$, where $q>p$ and $$\frac{q}{p}=[a_0,\cdots,a_k]=a_0 +\frac{1}{a_1 +\displaystyle \frac{1}{\displaystyle a_2+\frac{1}{\ddots+\displaystyle\frac{1}{a_k}}}}$$ is a regular continued fraction expansion with $a_k >1$ and $k\ge 2$. \end{rem} A quick overview of the proof of \Cref{thm:lowerbound} is provided in \Cref{subsec:lowerbound}, while the full proof can be found in \Cref{sec:involutive}. It turns out that \Cref{thm:lowerbound} provides a sharper bound than many other existing lower bounds involving knot invariants (see \Cref{sec:background}). In fact, we will use \Cref{thm:lowerbound} to give a partial affirmative answer to a question of Longo \cite[Question 4.3]{longo}, which asks whether his examples $T_{4n,(2n\pm 1)^2}$ satisfy $\gamma_4(T_{4n,(2n\pm1)^2})=2n-1$. \begin{prop} If $n\ge 2$ is even, then $\gamma_4\left(T_{4n,(2n\pm1)^2}\right)=2n-1=\vartheta\left(T_{4n,(2n\pm 1)^2}\right) -1$. \label{prop:longoanswer} \end{prop} In fact, we prove the following more general result. \begin{prop} Let $n\ge2$ be even and $k\ge 0$. Then\label{prop:longoextension} $$\gamma_4\left(T_{4n+2k,(4n+2k)(n\pm1)+1}\right) = 2n+k-1=\vartheta\left(T_{4n+2k,(4n+2k)(n\pm1)+1}\right)-1.$$ \end{prop} Using \Cref{thm:lowerbound} and other existing results (see Section \ref{sec:background}), we can also find narrow bounds on $\gamma_4$ for certain infinite families of torus knots $T_{p,q}$ with fixed $p$. \begin{thm} Fix $p>3$. If $q\equiv p-1, p+1,\text{ or }2p-1\pmod{2p},$ then $ \vartheta(T_{p,q})-1\le\gamma_4(T_{p,q})\le\vartheta(T_{p,q}).$ In particular, we have the following. \begin{enumerate}[(a)] \item\label{item:p-1} Let $p$ be odd. If $q\equiv p-1\pmod{2p},$ then $\gamma_4(T(p,q))\in\left\{\frac{p-3}{2},\frac{p-1}{2}\right\}$. If $q\equiv p+1 \text{ or }2p-1 \pmod{2p}$, then $\gamma_4(T_{p,q})=\frac{p-1}{2}$. \item \label{item:c} Let $p$ be even. If $q>p$ and $q\equiv p-1, p+1\text{ or }2p-1\pmod{2p}$, then $\gamma_4\left(T_{p,q}\right)\in\left\{\frac{p-2}{2},\frac{p}{2}\right\}$. \end{enumerate} \label{thm:evencalculations} \end{thm} \begin{rem} Notice that the torus knots in \Cref{prop:longoextension} belong to \Cref{thm:evencalculations}\ref{item:c}. In particular, \Cref{thm:evencalculations}\ref{item:c} tells us that $\gamma_4(T_{4n+2k,(4n+2k)(n\pm1)+1}) \in\{ 2n+k-1, 2n+k\}$. To prove the first equality in \Cref{prop:longoextension}, we will show that performing $k$ pinch moves on $T_{4n+2k,(4n+2k)(n\pm1)+1}$ yields $T_{4n,(2n\pm1)^2}$ and then apply \Cref{prop:longoanswer}. \label{rem:specialcase} \end{rem} \begin{rem} The lower bound on $\gamma_4$ given in the first part of \Cref{thm:evencalculations}\ref{item:p-1} is obtained using Theorem \ref{thm:lowerbound}. We will see that other existing lower bounds involving knot invariants (see Section \ref{sec:background}) do not suffice to show this. The second statement of \Cref{thm:evencalculations}\ref{item:p-1} follows from existing work (see Corollary \ref{cor:jabukavanCottpinch}). Similarly, the middle case of \Cref{thm:evencalculations}\ref{item:c} is proved using Theorem \ref{thm:lowerbound}, whereas the others follow from existing work (see Corollary \ref{cor:jabukavanCottpinch}). \label{newandexisting}\end{rem} \begin{rem} Consider the family of torus knots in Theorem \ref{thm:evencalculations}\ref{item:c} with $q=p+1$. These are of the form $T_{2n,2n+1}$. In \cite[Proposition 5.7]{feller2020nonorientable} it was shown that these torus knots do not bound a smooth M{\" o}bius band in $B^4$ if $n \equiv 3 \mod 4$, $2n+1$ is square-free, and $n+1$ is not a square. \Cref{thm:evencalculations}\ref{item:c} generalizes this result. \end{rem} \begin{rem} Notice that \Cref{thm:evencalculations} includes the case $q=p-1$ when $p$ is odd, but not when $p$ is even. The latter case was solved by Batson \cite{batson2012nonorientable}; he showed that $\gamma_4\left(T_{p,p-1}\right)=\frac{p-2}{2}=\vartheta(T_{p,p-1})$ for even $p$. \end{rem} We now turn our attention to the family of torus knots $T_{4,q}$ for odd $q > 4$. Notice that \Cref{thm:evencalculations}\ref{item:c} does not give us any useful information about the nonorientable 4-ball genus of this family. However, we are able to get more mileage out of \Cref{thm:lowerbound} than was used in \Cref{thm:evencalculations}\ref{item:c} since we need only obstruct the existence of M{\"o}bius bands (c.f. Remark \ref{rem:difference}). \begin{thm} If $q\equiv 5\text{ or }7\pmod 8$, then $\gamma_4(T_{4,q})=2$. Moreover, $T_{4,q}$ does not bound a M{\" o}bius band for almost all $q\equiv 1\text{ or }3\pmod{8}$. \label{thm:4q} \end{thm} In \Cref{thm:4q}, since $q$ is relatively prime to 4, there are four cases to consider: $q\equiv 1,3,5,7\pmod 8$. The cases $q\equiv 5,7\pmod 8$ are easy to deal with: we first show that $\gamma_4(T_{4,q})\le\vartheta(T_{4,q})=2$; and then we use \Cref{thm:lowerbound} to show that $\gamma_4(T_{4,q})=2$. When $q\equiv 1,3 \pmod 8$, we again have that $\gamma_4(T_{4,q})\le\vartheta(T_{4,q})=2$, but the lower bound on $\gamma_4$ given by \Cref{thm:lowerbound} does not apply. Moreover, other existing lower bounds involving knot invariants (see \Cref{sec:background} and \Cref{subsec:4q}) do not provide any additional information. At this point, one might wonder whether \Cref{thm:4q} can be upgraded to $\gamma_4(T_{4,q})=2$ for all $q\equiv 1,3\pmod 8$, confirming Batson's conjecture for the torus knots $T_{4,q}$. It is known, however, that this is not the case --- as mentioned above, we have $\gamma_4(T_{4,9})=1$ \cite{lobb} and $\gamma_4(T_{4,11})=1$ \cite{tairi}. The issue with applying \Cref{thm:lowerbound} and the other existing lower bounds is that these lower bounds all use knot invariants (e.\,g.~ the Arf invariant, signature, upsilon invariant, etc.) that are periodic modulo $2p$ for $T_{p,q}$. Now since $\gamma_4(T_{p,1})=\gamma_4(T_{p,3})=1$ for any $p$, this periodic behavior implies that all of these lower bounds are at most 1 for all $q\equiv 1\text{ or }3\pmod{2p}$. In particular we cannot use these lower bounds to obstruct $T_{4,q}$ from bounding a M{\"o}bius band for $q\equiv 1\text{ or }3\pmod 8$. Instead, to prove the second statement of Theorem \ref{thm:4q}, we consider the linking form of the double cover of $S^3$ branched over $T_{4,q}$ (and more generally branched over $T_{p,q}$ for $p$ even) and apply \Cref{asymptotic} below. We in fact prove something stronger, namely that these torus knots do not even bound \emph{locally flat} M{\"o}bius bands. This gives us information about the \emph{topological nonorientable $4$-ball genus} $\gamma_4^{top}$ of $T_{4,q}$. It is also worth noting that this obstruction does not work if $p$ and $q$ are both odd; in this case, the double cover of $S^3$ branched over $T_{p,q}$, which is the Brieskorn sphere $\Sigma(2,p,q)$, is an integral homology sphere (as opposed to a rational homology sphere if $p$ or $q$ is even) and thus the linking form obstruction vanishes. \subsection{Obstructing Möbius bands in the topological category}\label{subsec:obstructmobius} For a knot $K$ in $S^3$, let $\gamma_4^{top}(K)$ denote the minimal first Betti number of any locally flat nonorientable surface in $B^4$ bounding $K$; note that $\gamma_4^{top}(K) \leq \gamma_4(K)$ for any knot $K$. Gilmer and Livingston \cite[Theorem D]{gilmerlivingston} showed that there exist knots $K$ with $\gamma_4^{top}(K)=1$, but $\gamma_4(K) > 1$. They found these knots by taking the connected sum of a topologically slice knot with a knot $K$ satisfying $\gamma_4^{top}(K) = \gamma_4(K) =1$. In fact, the nonorientable $4$-ball genus of topologically slice knots can be arbitrarily large \cite{fellerparkray}. In \cite[Theorem 1.3 {feller2020nonorientable}, Feller and Golla showed that $\gamma_4^{top}(T_{2n-1, 2n}) \leq n-2 < n-1= \gamma_4(T_{2n-1, 2n})$ for all $n \geq 5$; the latter equality is due to Batson \cite{batson2012nonorientable}. Moreover, they provided new infinite families of knots not bounding locally flat Möbius bands and were particularly interested in the question of whether there exists a torus knot $T_{p,q}$ with $\gamma_4^{top}(T_{p,q})=1$ and $\gamma_4(T_{p,q}) > 1$. To the best of the authors' knowledge, the question still remains open. In \Cref{sec:asymp}, using a bound of Murakami and Yasuhara \cite[Theorem 2.5]{murakami2000four} we prove that torus knots which bound locally flat M{\" o}bius bands are very rare: when $p$ is even and $\frac{p}{2}$ is not a square, the set of odd integers $q$ satisfying $\gamma_4^{top}(T_{p,q})=1$ has ``zero density''. In particular, we prove the following theorem. \begin{thm} \label{asymptotic} Let $p$ be a positive even integer such that $\frac{p}{2}$ is not a perfect square. Given a positive integer $N$, consider the set $S_{N,p}=\{n\in \mathbb{Z}\,\vert\,1\le n\le N,\,\gcd(p,n)=1\}$. Then \[ \lim_{N\rightarrow\infty} \frac{\sharp\left\{q\in S_{N,p} \,\vert\, T_{p,q}\text{ bounds a locally flat M{\" o}bius band in }B^4\right\}}{\sharp S_{N,p}} = 0. \] \end{thm} \begin{rem} The proof of \Cref{asymptotic} actually shows the following: if $p$ is even and $\frac{p}{2}$ is not a perfect square, then there exists an integer $r$, relatively prime to $p$, such that if $q$ admits a prime factor $s$ with odd exponent in the prime factorization of $q$ and $s \equiv r \pmod{2p}$, then $T_{p,q}$ does not bound a locally flat Möbius band in $B^4$ (see \Cref{torusobstlem}). For example, if $q\equiv 1\text{ or }3\pmod 8$ and $q$ has a prime factor $s\equiv 5\pmod 8$ such that the exponent of $s$ in the prime factorization of $q$ is odd, then $T_{4,q}$ does not bound a locally flat Möbius band (see Example \ref{exmp:4q} for details). Notice that the smallest values of $q$ satisfying this condition are $q=35, 65, 91, 105$. Thus $T_{4,35}$, $T_{4,65}$, $T_{4,91}$, and $T_{4,105}$ do not bound locally flat M{\"o}bius bands; moreover, for any $q\equiv 1\text{ or }3\pmod 8$ with $q<105$ and $q\neq 35,65,91$, it is unknown whether the torus knot $T_{4,q}$ bounds a locally flat M{\"o}bius band.\label{rem:primefactors} \end{rem} \subsection{New lower bound on the smooth nonorientable 4-ball genus}\label{subsec:lowerbound} In the smooth category, our new lower bound (see \Cref{thm:lowerbound}) comes from a construction which amalgamates involutive Heegaard Floer homology \cite{hendricks2017involutive} and unoriented knot Floer homology \cite{fan2019unoriented}. Given a knot $K$ in $S^3$, we construct a module over the ring $\mathbb{F}_{2}[U,Q]/\left(Q^2\right)$, which we call the \emph{involutive unoriented knot Floer homology} $HFKI^{\prime}(K)$. Using the structure of $HFKI^{\prime}(K)$, we can define two concordance invariants $\bar{\upsilon}$ and $\ubar{\upsilon}$, which are the values at $1$ of the \emph{involutive Upsilon invariants} $\bar{\Upsilon}_t$ and $\ubar{\Upsilon}_t$ defined by Hogancamp and Livingston \cite{hogancamp2017involutive}. Although $HFKI^{\prime}$ itself does not seem to satisfy the strong functoriality properties that Heegaard Floer theory and its variants satisfy, we can still show that $\bar{\upsilon}$ and $\ubar{\upsilon}$ behave nicely under nonorientable cobordisms. In particular, we have the following results, which can be seen as analogues of the oriented involutive genus bound given by Juh\'{a}sz and Zemke in \cite{juhasz2020concordance}. \begin{thm} \label{mobiusthm} Let $K$ be a knot in $S^3$ which bounds a smooth M{\" o}bius band in $B^4$. Then $\bar{\upsilon}(K)-\ubar{\upsilon}(K)\le 1$. \end{thm} \begin{thm} \label{highergenusthm} For any knot $K$ in $S^3$, we have \[ \begin{split} \bar{\upsilon}(K) - \upsilon(K) &\le \gamma_4(K)+1,\\ \upsilon(K) - \ubar{\upsilon}(K) &\le \gamma_4(K)+1,\\ \bar{\upsilon}(K) - \ubar{\upsilon}(K) &\le \gamma_4(K)+2. \end{split} \] Here, $\upsilon(K)$ is the upsilon invariant defined in \cite{ozsvath2017unoriented}. \end{thm} In \Cref{sec:involutive}, we will prove \Cref{mobiusthm} and \Cref{highergenusthm} and use them to derive \Cref{thm:lowerbound}. \subsection{Questions} Recall that a torus knot of the form $T_{4,q}$ bounds a M\"{o}bius band when $q=1,3,9,11$. \Cref{thm:4q} eliminates the cases $q \equiv 5,7 \pmod 8$ in the smooth category and tells us that that the set of all $q$ such that $T_{4,q}$ bounds a locally flat M\"{o}bius band has zero density, but there can still be infinitely many $q$ such that $T_{4,q}$ bounds a M\"{o}bius band in either smooth or topological category (see \Cref{rem:primefactors}). Thus the following question naturally arises. \begin{qn} Does there exist an integer $q\not\in\{1,3,9,11\}$ such that $\gamma_4(T_{4,q})=1$? If such an integer $q$ exists, then are there infinitely many such integers $q$?\end{qn} Moreover, all known counterexamples to Batson's conjecture are of the form $T_{p,q}$ where $p$ is even. No example with $p$ and $q$ both odd is currently known. We thus ask the following question. \begin{qn} Do there exist relatively prime odd integers $p$ and $q$ such that $\gamma_4(T_{p,q})<\vartheta(T_{p,q})$?\end{qn} In the topological category, \Cref{asymptotic} tells us that for any even $p$ with $\frac{p}{2}$ not a perfect square, $T_{p,q}$ does not bound a locally flat M\"{o}bius band for almost all $q$. However, this obstruction does not imply that the set of $q$ such that $T_{p,q}$ bounds a locally flat M\"{o}bius band is finite. In addition, the case when $\frac{p}{2}$ is a perfect square remains mysterious. Hence one can ask the following question; note that, when $p$ is odd, $\gamma_4(T_{p,q})=\vartheta(T_{p,q})=1$ whenever $q \equiv \pm 2 \pmod p$ (Proposition 1.6 in \cite{jabuka2019nonorientable}). \begin{qn} Is there an even integer $p\ge 4$ such that $T_{p,q}$ bounds a locally flat M\"{o}bius band in $B^4$ for infinitely many integers $q$?\end{qn} \subsection*{Organization.} This article is organized as follows. In \Cref{sec:background}, we recall some previously known results regarding lower and upper bounds on the nonorientable $4$-ball genus before proving \Cref{prop:longoextension} and Theorems \ref{thm:evencalculations} and \ref{thm:4q} in \Cref{sec:calculations}. In \Cref{sec:involutive}, we develop a theory of involutive unoriented knot Floer homology and prove Theorems \ref{mobiusthm}, \ref{highergenusthm}, and \ref{thm:lowerbound}. Lastly, in \Cref{sec:asymp}, we compute the linking form of $\Sigma(2,p,q)$, which is the branched double cover of $S^3$ along $T_{p,q}$, when $p$ is even, and use it to prove \Cref{asymptotic}. \subsection*{Acknowledgements.} This work is the product of a research group formed under the auspices of the American Institute for Mathematics (AIM) in their virtual research community on 4–dimensional topology. We are grateful to AIM, and especially to the program organizers Miriam Kuzbary, Maggie Miller, Juanita Pinz\'{o}n-Caicedo, and Hannah Schwartz. The authors thank Peter Feller, Marco Golla and Stanislav Jabuka for their useful comments on a draft of this paper. The second author thanks Seungwon Kim for helpful conversations and acknowledges support by the Institute for Basic Science (IBS-R003-D1). The fourth author was supported by the Swiss National Science Foundation Grant 181199. \section{Background on the nonorientable $4$-ball genus}\label{sec:background} In this section, we give an overview of the lower and upper bounds on the nonorientable $4$-ball genus provided in the literature, including a review of pinch moves, the pinch number, and related computations. \subsection{Obstructions for the existence of smooth nonorientable surfaces} Even before the notion of nonorientable $4$-ball genus was born, Viro \cite{viro} proved that the figure eight knot cannot bound a smoothly embedded M{\" o}bius band in $B^4$ using Witt classes of intersection forms of branched covers of $B^4$ branched over nonorientable surfaces. In \cite{Yasuhara}, Yasuhara formulated an obstruction using the classical signature $\sigma(K)$ and the Arf invariant $\arf(K)$ of a knot $K$ which can be stated as follows. \begin{lem}[{\cite[Proposition 5.1]{Yasuhara}}]\label{lem:yasuhara} Let $K$ be a knot in $S^3$ that bounds a smoothly embedded M{\" o}bius band in $B^4$. Then $ \sigma(K) + 4 \arf(K) \equiv 0 \text{ or } \pm 2 \pmod 8. $ \end{lem} \begin{rem}\label{rem:arf} The Arf invariant is a knot invariant that satisfies \cite{levine} \begin{align*} \arf(K) = \begin{cases} 0 &\mbox{if } \Delta_K(-1) \equiv \pm 1 \pmod{8},\\ 1& \mbox{if } \Delta_K(-1) \equiv \pm 3 \pmod{8}. \end{cases} \end{align*} For torus knots $T_{p,q}$ with relatively prime positive integers $p$ and $q$, the Arf invariant is given as follows. Without loss of generality, we assume that $q$ is odd. The determinant of $T_{p,q}$ is then given as \begin{align*} \det \left(T_{p,q}\right)&=\left \vert \Delta_{T_{p,q}}(-1)\right \vert= \begin{cases} 1 &\mbox{if } p\text{ is odd},\\ q &\mbox{if } p \text{ is even}, \end{cases} \qquad \text{so}\\ \arf \left(T_{p,q}\right)&= \begin{cases} 0 &\mbox{if } p \text{ is odd or } q\equiv \pm 1\pmod 8,\\ 1 &\mbox{if } p \text{ is even and } q\equiv \pm 3 \pmod 8. \end{cases} \end{align*} \end{rem} Along the same lines as \Cref{lem:yasuhara}, Gilmer and Livingston showed the following. \begin{lem}[{\cite[Theorem 10]{gilmerlivingston}}] Let $K$ be a knot in $S^3$ that bounds a smoothly embedded punctured Klein bottle $F$ in $B^4$. If $\Sigma_2(F)$, the \emph{double branched cover of $B^4$ branched over $F$}, has a positive definite intersection form, then $ \sigma(K) + 4 \arf(K) \equiv 0, 2 \text{ or } 4 \pmod 8. $ Moreover, if $\Sigma_2(F)$ is negative definite, then $ \sigma(K) + 4 \arf(K) \equiv 0, 4 \text{ or } 6 \pmod 8$. \end{lem} It was an open question until work of Batson \cite{batson2012nonorientable} whether $\gamma_4(K) \leq 3$ for all knots $K$ in $S^3$. Batson found a lower bound on $\gamma_4$ using Heegaard Floer homology and used it to show that $\gamma_4\left(T_{2k,2k-1}\right) = k-1$ for all $k \geq 1$. His lower bound was the following. \begin{lem}[\cite{batson2012nonorientable}]\label{lem:batson} For any knot $K$ in $S^3$, we have $\frac{\sigma(K)}{2}-d(S_{-1}^3(K)) \leq \gamma_4(K)$, where $d(S_{-1}^3(K))$ denotes the correction term by Ozsv\'ath and Szab\'o \cite{ozsvath2003absolutely} of the $(-1)$-surgery of $S^3$ along $K$, equipped with the unique $\text{Spin}^c$ structure. \end{lem} Later, Ozsv\'ath, Stipsicz and Szab\'o defined an additive concordance invariant $\upsilon(K)$ for any knot $K$ in $S^3$ using the Heegaard Floer knot complex \cite{ozsvath2017unoriented} and proved the following bound. \begin{lem}[{\cite[Theorem 1.2]{ozsvath2017unoriented}}]\label{lem:OSSbound} For any knot $K$ in $S^3$, we have $\left \vert \upsilon(K) - \frac{\sigma(K)}{2} \right \vert \leq \gamma_4(K)$. \end{lem} Using this lower bound, they reproved Batson's result that the nonorientable $4$-ball genus of a knot can be arbitrarily large by showing that $\gamma_4(\#_n T_{3,4} ) = n$ for all $n \geq 1$ \cite[Corollary 1.4]{ozsvath2017unoriented}. \\ There are now several lower bounds on $\gamma_4$ that look similar to that given in \Cref{lem:OSSbound}. First, Golla and Marengon \cite{gollamarengon} showed that $\gamma_4(K) \geq \frac{\sigma(K)}{2}-\min_{m \geq 0} \left\{m + 2V_m (\bar{K})\right\}$ for any knot $K$ in $S^3$, where $\bar{K}$ denotes the mirror of $K$ and $\{V_i\}_i$ are the concordance invariants explored in \cite{niwu} (and originally defined in \cite{rasmussen2004lens}). This bound agrees with the bound in \Cref{lem:OSSbound} for alternating knots and $L$-space knots, in particular for torus knots. In addition, Daemi and Scaduto~\cite{daemi2020chern} and Ballinger~\cite{ballinger2020concordance} defined invariants $h_s$ and $t$ in gauge theory and Khovanov homology, respectively, from which similar inequalities can be obtained. Again, for many knots, including alternating knots and torus knots, these bounds are no better than the one from \Cref{lem:OSSbound}. Shortly after, Allen showed the following. \begin{lem}[{\cite[Proposition 6.5]{allen2020nonorientable}}]\label{lem:allen} Let $K$ be a knot in $S^3$ with $\sigma(K) < 2\upsilon(K)$ such that the \emph{double branched cover of $S^3$ along $K$}, denoted by $\Sigma_2(K)$, is an integer homology $3$-sphere and $\delta(K) < 0$, where $\delta(K)$ is a concordance invariant defined by Manolescu and Owens \cite{manolescu2007concordance}. Then $\upsilon(K) - \frac{\sigma(K)}{2} +1 \leq \gamma_4(K)$. \end{lem} It is well-known that the double cover of $S^3$ branched along the torus knot $T_{p,q}$ is the Brieskorn sphere $\Sigma(2,p,q)$, which is a homology sphere if and only if $p$ and $q$ are both odd. Therefore, Allen's lower bound does not apply to the infinite families of torus knots in Theorems \ref{thm:evencalculations} and \ref{thm:4q}. Finally, given a knot $K$, one can obstruct the existence of a M{\"o}bius band bounded by $K$ (or possibly nonorientable surfaces with higher first Betti number) by computing Fr\o yshov's $h-$invariant of $\Sigma(S^3,K)$ and appealing to Theorem 3 in \cite{froyshov} or by using Donaldson's Diagonalization Theorem as in \cite{jabukakelly}. Because the latter method has been used recently to help calculate the nonorientable 4-ball genus of all knots with 8 or 9 crossings in \cite{jabukakelly} and of all knots with 10 crossings in \cite{ghanbarian2020}, we will highlight this strategy. The idea is the following: if $K$ bounds a M{\"o}bius band $M$ and $\Sigma_2(B^4,M)$---the double cover of $B^4$ branched along $M$---is positive (resp. negative) definite, and $\Sigma_2(S^3,K)$---the double cover of $S^3$ branched along $K$---bounds a negative (resp. positive) definite 4-manifold $X$, then the closed 4-manifold $X\cup_{\Sigma(S^3,K)}(-\Sigma_2(B^4,M))$ is negative (resp. positive) definite; by Donaldson's Diagonalization Theorem \cite{donaldson}, there exists a lattice embedding $(H_2(X),Q_X)\to(\mathbb{Z}^{\text{rank}(H_2(X))+1},-I)$. If one can show that there is no such embedding, then it follows that $K$ does not bound a M{\"o}bius band. See \cite{jabukakelly} for details. The downside to this obstruction is that it relies on finding a suitable definite 4-manifold bounded by $\Sigma_2(S^3,K)$. The more complicated the knot in question, the more nontrivial it can be to find such a definite 4-manifold and, indeed, such definite 4-manifolds need not exist. \subsection{Obstructions for the existence of topologically locally flat nonorientable surfaces} Given a knot $K$ in $S^3$, recall that $\gamma_4^{top}(K)$ is the minimal first Betti number of locally flat nonorientable surfaces in $B^4$ bounded by $K$. Murakami and Yasuhara \cite{murakami2000four} proved the following lower bound in this category. \begin{lem}[{\cite[Theorem 2.5]{murakami2000four}}]\label{lem:linkingpairing} Suppose that a knot $K$ in $S^3$ bounds a locally flat null-homologous nonorientable surface of first Betti number $g$ in a compact $4$-manifold $W$ bounding $S^3$ with $H_1(W;\mathbb{Z})=0$. Then the linking form $\lambda$ on $H_1 (\Sigma_2(K);\mathbb{Z})$ splits into a direct sum $(G_1 ,\lambda_1) \oplus (G_2 ,\lambda_2)$, where the following conditions are satisfied: \begin{itemize} \item there exists a square matrix $V$ with integer entries, whose size is $2b_2(W)+g$ and whose determinant is $\pm \vert G_1 \vert$, such that $\lambda_1$ is presented by $-V^{-1}$. \item $\lambda_2$ is metabolic. \end{itemize} \end{lem} Using this lower bound, Gilmer and Livingston \cite{gilmerlivingston} were able to prove that there exist knots with $\gamma_4^{top} \ge 3$. Feller and Golla \cite[Proposition 1.4]{feller2020nonorientable} used it to show that if $p > 0$ with $p \equiv 5 \pmod 8$, then $T_{p,p\pm 1}$ does not bound a locally flat M{\" o}bius band in $B^4$. Moreover, by \cite[Proposition 5.6]{feller2020nonorientable}, for each odd prime $p$ and each choice of sign, there are infinitely many positive integers $k$ such that the knot $T_{2p, 2kp\pm 1}$ does not bound a locally flat M{\" o}bius band in $B^4$. To the best of the authors' knowledge, it is unknown whether $\gamma_4^{top}$ can be arbitrarily large. \subsection{Pinch moves and the pinch number}\label{sec:upperBounds} Consider the torus as a square with opposite edges identified. Then the torus knot $T_{p,q}$ can be represented by the collection of parallel strands in the square with slope $\frac{p}{q}$. A \emph{pinch move} is a nonorientable band move obtained by attaching an untwisted band between two adjacent strands of $T_{p,q}$. The resulting knot still lies in the torus and is thus a torus knot. Note that the resulting torus knot does not depend on the adjacent strands to which we choose to attach the band. A formula for the resulting torus knot was first provided in \cite{batson2012nonorientable} and proved in \cite{jabuka2019nonorientable}. \begin{lem}[\cite{batson2012nonorientable}, Lemma 2.1 in \cite{jabuka2019nonorientable}] Let $p$ and $q$ be relatively prime positive integers and consider a diagram of the torus knot $T_{p,q}$ on the flat torus. After applying a pinch move to $T_{p,q}$, the resulting torus knot (up to orientation) is $T(|p-2t|,|q-2h|)$, where $t$ and $h$ are the integers uniquely determined by the requirements \label{lem:pinch} \begin{align*} &t\equiv -q^{-1}\pmod p \text{ and } t\in\{0,\ldots,p-1\},\\ &h\equiv p^{-1}\pmod q \text{ and } h\in\{0,\ldots,q-1\}. \end{align*} \end{lem} Suppose performing a pinch move on $T_{p,q}$ yields $T_{r,s}$. This pinch move can either be \emph{positive} or \emph{negative}; it is called positive if $rq-sp>0$ and negative if $rq-sp<0$ (c.f. \cite[Lemma 2.4]{jabuka2019nonorientable}). Note that since $T_{p,q}=T_{q,p}$ and $T_{r,s}=T_{s,r}$, performing a pinch move on $T_{q,p}$ yields $T_{s,r}$. Further note that the sign of a pinch move depends on the order of $p$ and $q$; that is, the sign of the pinch move performed on $T_{p,q}$ yielding $T_{r,s}$ is opposite of the sign of the pinch move performed on $T_{q,p}$ yielding $T_{s,r}$. Finally, the \emph{pinch number} of $T_{p,q}$, denoted by $\vartheta(T_{p,q})$ is the minimal number of pinch moves needed to turn $T_{p,q}$ into the unknot (which is equivalent to the first Betti number of the nonorientable surface $F_{p,q}$ constructed by Batson \cite{batson2012nonorientable} discussed in the introduction). Using Lemma \ref{lem:pinch}, we can prove the following result, which we will use later. \begin{lem} Let $p\geq 2 $ and $k\ge 1$. Performing a pinch move on the torus knot $T_{p,kp\pm1}$ yields the torus knot $T_{p-2,k(p-2)\pm1}$. Consequently, \begin{align*} \vartheta(T_{p,kp\pm1})= \begin{cases} \frac{p-1}{2} &\mbox{if } p \mbox{ is odd} \\ \frac{p}{2} &\mbox{if } p \mbox{ is even and } kp\pm1\neq p-1\\ \frac{p-2}{2} &\mbox{if } p \mbox{ is even and } kp\pm1= p-1. \end{cases} \end{align*} Moreover, the pinch move performed on $T_{p,kp+1}$ is negative, and the pinch move performed on $T_{p,kp-1}$ is positive if $p>2$ and negative if $p=2$. \label{lem:pinchmoves} \end{lem} \begin{proof} First let $t=p-1$ and $h=k(p-1)+1$. Then \[ \begin{split} t(kp+1)=kp^2+p-kp-1 &\equiv -1\pmod{p}, \\ hp=p(kp+1)-kp &\equiv 1\pmod{kp+1}. \end{split} \] Now since $|p-2t|=p-2$ and $|kp+1-2h|=k(p-2)+1$, \Cref{lem:pinch} shows that performing a pinch move on $T_{p,kp+1}$ yields $T_{p-2,k(p-2)+1}$. Moreover, this pinch move is clearly negative. Next let $t=1$ and $h=k$. Then \[ \begin{split} t(kp-1) &\equiv -1\pmod{p}, \\ hp=kp &\equiv 1\pmod{kp-1}. \end{split} \] Now since $|p-2t|=p-2$ and $|kp-1-2h|=k(p-2)-1$, \Cref{lem:pinch} shows that performing a pinch move on $T_{p,kp-1}$ yields $T_{p-2,k(p-2)-1}$. Moreover, this pinch move is clearly positive if $p>2$. If $p=2$, then $p-2t=0$ and thus the pinch move is negative. Now, if $p$ is odd, then by performing $\frac{p-1}{2}$ pinch moves to $T_{p,kp\pm1}$, we obtain the torus knot $T_{1,k\pm1}$, which bounds a disk; thus $\vartheta(T_{p,kp\pm1})=\frac{p-1}{2}$. If $p$ is even and $kp\pm1\neq p-1$, then by performing $\frac{p-2}{2}$ pinch moves to $T_{p,kp\pm1}$, we obtain the torus knot $T_{2,2k\pm1}$, which bounds a M{\"o}bius band; thus $\vartheta(T_{p,kp\pm1})=\frac{p}{2}$. If $p$ is even and $kp\pm1= p-1$, then by performing $\frac{p-2}{2}$ pinch moves to $T_{p,p-1}$, we obtain the torus knot $T_{2,1}$, which bounds a disk; thus $\vartheta(T_{p,p-2})=\frac{p-2}{2}$. \end{proof} It was conjectured in \cite{batson2012nonorientable} that $\gamma_4(T_{p,q})=\vartheta(T_{p,q})$. This conjecture is clearly true in some basic cases, as it is not hard to observe that $\gamma_4(T_{2,q})=1=\vartheta(T_{2,q})$ for all odd $q$ and $\gamma_4(T_{3,q})=1=\vartheta(T_{3,q})$ for all $q$ relatively prime to 3. Jabuka and van Cott \cite{jabuka2019nonorientable} studied Batson's conjecture and showed that it is true for several infinite families of torus knots, using pinch moves and the lower bound from \Cref{lem:OSSbound}. Their main result is the following. \begin{thm}[{\cite[Theorem 1.10 and Corollary 1.11]{jabuka2019nonorientable}}] Let $p, q > 1$ be relatively prime integers and suppose that $q$ is odd. Suppose further that there is a sequence of $n \geq 1$ pinch moves $T_{p_i,q_i} \to T_{p_{i-1},q_{i-1}}$ starting at $T_{p,q}=T_{p_n, q_n}$ and ending at the unknot $T_{p_0,1}$ with $p_0 \geq 0$ for integers $p_i, q_i \geq 1$, $i \in \{1, \dots, n\}$. For all $i \in \{1, \dots, n\}$, let $\varepsilon_i \in \{\pm 1\}$ be $+1$ if the pinch move $T_{p_i,q_i} \to T_{p_{i-1},q_{i-1}}$ is positive and $-1$ otherwise. For all $i \in \{1, \dots, n-1\}$, $m_i = \frac{p_{i+1}+\varepsilon_i \varepsilon_{i+1}p_{i-1}}{p_i}$ is an even integer. \begin{enumerate}[(a)] \item Let $p$ be odd and $p > q$. If $q_1 \equiv \varepsilon_1 \pmod{4}$ and $m_i \equiv 2 \pmod 4$ for all $i \in \{1, \dots, n-1\}$, then $\gamma_4\left(T_{p,q}\right) = n.$ \item Let $p$ be even. If $\epsilon_i =1$ for all $i\in \{1, \dots,n\}$, then $\gamma_4\left(T_{p,q}\right) = n.$ \end{enumerate} In both cases, $\gamma_4\left(T_{p,q}\right) = \vartheta\left(T_{p,q}\right) =n$. \label{thm:jabukavanCottpinch} \end{thm} \Cref{thm:jabukavanCottpinch} heavily relies on the lower bound $|\upsilon - \frac{\sigma}{2}|$ on $\gamma_4$ provided by Ozsv\'ath, Stipsicz and Szab\'o (see \Cref{lem:OSSbound}). In fact, Jabuka and Van Cott give formulas for this lower bound for all torus knots $T_{p,q}$ in terms of the integers $p_i, q_i, \varepsilon_i$ and $m_i$ from \Cref{thm:jabukavanCottpinch}; see \cite[Theorems 1.7 and 1.8]{jabuka2019nonorientable}. Using this formula along with Lemma \ref{lem:pinchmoves} and Theorem \ref{thm:jabukavanCottpinch}, one can prove the following. \begin{cor} \hfill \begin{enumerate}[(a)] \item If $p$ is odd and $q\equiv p+1\text{ or }2p-1\pmod{2p}$, then $\gamma_4(T_{p,q})=\frac{p-1}{2}$. \item If $p$ is even and $q\equiv p-1 \text{ or }2p-1\pmod{2p}$, then $\gamma_4(T_{p,q})\in\left\{\frac{p-2}{2},\frac{p}{2}\right\}$. \end{enumerate} \label{cor:jabukavanCottpinch} \end{cor} As mentioned in the introduction, Lobb \cite{lobb} disproved Batson's conjecture by showing that $\gamma_4(T_{4,9})=1$, while $\vartheta(T_{4,9})=2$. This was achieved by finding a nonorientable band move from $T_{4,9}$ to the Stevedore knot, which is slice. Generalizing his approach, an infinite family of counterexamples was given by Longo in \cite{longo}. \begin{thm}[\cite{longo}] For $n\ge2$, we have $\vartheta\left(T_{4n,(2n\pm 1)^2}\right)=2n$, while $\gamma_4\left(T_{4n,(2n\pm 1)^2}\right)\le 2n-1$. \label{thm:longo} \end{thm} In her masters thesis, Tairi \cite{tairi} gave another infinite family of counterexamples to Batson's conjecture. \begin{thm}[\cite{tairi}]\hfill \begin{enumerate}[(a)] \item $\vartheta(T_{4,11})=2$, while $\gamma_4(T_{4,11})=1$. \item Let $n\ge0$ and $m\ge 2$. Then $\vartheta(T_{4n+2m+2,10n+6m+5})=m+1$, while $\gamma_4(T_{4n+2m+2,10n+6m+5})=m$. \end{enumerate}\label{thm:tairi} \end{thm} As in Lobb's proof that $T_{4,9}$ bounds a M{\" o}bius band, Tairi's proof that $T_{4,11}$ bounds a M{\" o}bius band relies on finding a nonorientable band move from $T_{4,11}$ to the Stevedore knot. To show that the torus knot $T_{4n+2m+2,10n+6m+5}$ bounds a nonorientable surface $F$ with $g(F)=m$, Tairi shows that performing $m-1$ pinch moves turns $T_{4n+2m+2,10n+6m+5}$ into $T_{4,11}$, which satisfies $\gamma_4(T_{4,11})=1$. Using this idea, one can start with any torus knot whose nonorientable 4-ball genus is strictly less than its pinch number and create an infinite family of such torus knots by reversing the pinch move operation. For each of Longo's torus knots in \Cref{thm:longo}, we can then produce an infinite family of such torus knots. \begin{prop} For all $n\ge2$ and $k\ge0$, we have\label{prop:families} \begin{align*} \vartheta(T_{4n+2k,(4n+2k)(n\pm1)+1})=2n+k, \qquad \text{while } \gamma_4(T_{4n+2k,(4n+2k)(n\pm1)+1})\le 2n+k-1. \end{align*} \end{prop} \begin{proof} By repeatedly applying Lemma \ref{lem:pinchmoves}, performing $k$ pinch moves on $T_{4n+2k,(4n+2k)(n\pm1)+1}$ yields the torus knot $T_{4n,4n(n\pm1)+1}=T_{4n,(2n\pm1)^2}$. By \Cref{thm:longo}, $\vartheta(T_{4n,(2n\pm1)^2})=2n$ and $\gamma_4(T_{4n,(2n\pm1)^2})\le 2n-1$. Consequently, $\vartheta(T_{4n+2k,(4n+2k)(n\pm1)+1})=2n+k$ and $\gamma_4(T_{4n+2k,(4n+2k)(n\pm1)+1})\le 2n+k-1$. \end{proof} In \Cref{sec:calculations}, we will see that when $n$ is even, $\gamma_4(T_{4n+2k,(4n+2k)(n\pm1)+1})= 2n+k-1$. In particular, for $k=0$, this shows that half of Longo's examples in \Cref{thm:longo} satisfy $\gamma_4(T_{4n+2k,(4n+2k)(n\pm1)+1})=\vartheta(T_{4n+2k,(4n+2k)(n\pm1)+1})-1$. \section{Calculations: Proofs of Proposition \ref{prop:longoextension}, Theorem \ref{thm:4q}, and Theorem \ref{thm:evencalculations}}\label{sec:calculations} In this section, we prove \Cref{thm:4q}, \Cref{prop:longoextension} and \Cref{thm:evencalculations}. In particular, we use Lemma \ref{lem:pinchmoves} to find upper bounds on $\gamma_4$ for these families and use \Cref{thm:lowerbound} to find lower bounds. \subsection{The family $T_{4,q}$}\label{subsec:4q} By Lemma \ref{lem:pinchmoves}, $\vartheta(T_{4,q})=2$ for all $q\ge 5$. Thus we have an obvious upper bound $\gamma_4(T_{4,q})\le2$ for all $q$. Now, from the formula \begin{align*} t^{3n}\Delta_{T_{4,2n+1}}(t) &= \frac{\left(t^{8n+4}-1\right)\left(t-1\right)}{\left(t^4-1\right)\left(t^{2n+1}-1\right)} \\ &= \frac{\left(t^{2n+1}+1\right)\left(t^{4n+2}+1\right)}{\left(t+1\right)\left(t^{2}+1\right)} = \left( \sum_{k=0}^{2n} (-t)^k \right) \left( \sum_{k=0}^{2n} (-t^2)^k \right), \end{align*} we see that \begin{align*} \Delta_{T_{4,2n+1}}(t) &= \sum_{k=0}^{6n}a_k t^{k-3n} \end{align*} where \begin{align*} a_0 &= 1, \qquad a_{6n} = 1, \qquad a_{3n+1} = 0,\\ a_{3n} &= \begin{cases} (-1)^{3n/2} \frac{1+(-1)^{n}}{2} &\mbox{if } n\text{ is even},\\ (-1)^{(3n+1)/2} \frac{1+(-1)^{(n-1)/2}}{2} &\mbox{if } n \text{ is odd}, \end{cases} \qquad \\ a_{3n+2} &= \begin{cases} (-1)^{(3n+2)/2} \frac{1+(-1)^{n}}{2} &\mbox{if } n\text{ is even},\\ (-1)^{(3n+3)/2} \frac{1+(-1)^{(n-1)/2}}{2} &\mbox{if } n \text{ is odd}.\end{cases} \end{align*} Thus \begin{align*} \Delta_{T_{4,2n+1}}(t) &= \begin{cases} t^{-3n}-\cdots - 1 + t^2 + \cdots + t^{3n} &\mbox{if } n \equiv 2 \text{ or } 3 \pmod 4,\\ t^{-3n}-\cdots +1 - t^2 + \cdots + t^{3n} &\mbox{if } n \equiv 0 \text{ or } 1 \pmod 4. \end{cases} \end{align*} Hence, applying \Cref{thm:lowerbound} gives $\gamma_4(T_{4,q})=2$ for all $q\equiv 5,7\pmod8$. On the other hand, Theorem \ref{thm:lowerbound} cannot be applied to $T_{4,q}$ when $q\equiv 1\text{ or }3\pmod 8$. However, the obstruction from the linking form on the first homology of the double cover of $T_{4,q}$ from \Cref{lem:linkingpairing} does obstruct $T_{4,q}$ from bounding a M{\" o}bius band for infinitely many $q\equiv 1\text{ or }3\pmod8$. In fact, \Cref{asymptotic} (proved in \Cref{sec:involutive}) implies that \[ \lim_{n\rightarrow\infty} \frac{\sum_{k=1}^{n} \gamma_4^{top} (T_{4,8k+1})}{n} = \lim_{n\rightarrow\infty} \frac{\sum_{k=1}^{n} \gamma_4^{top} (T_{4,8k+3})}{n} =2. \] This means that Batson's conjecture is also true for torus knots of the form $T_{4,8k+1}$ and $T_{4,8k+3}$ for almost all $k \geq 0$. As mentioned in Remark \ref{rem:primefactors}, we can explicitly find values of $q\equiv1\text{ or }3\pmod8$ such that $T_{4,q}$ does not bound a locally flat M{\"o}bius band. See Example \ref{exmp:4q} for details. It is worth noting here that \Cref{thm:lowerbound} gives a sharper lower bound than the other known lower bounds detailed in Section \ref{sec:background} when $q\equiv 5\text{ or }7\pmod8$. Using the recursive formulas for $\sigma(T_{p,q})$ \cite{gordonlitherlandmurasugi}, $\upsilon(T_{p,q})$ \cite{fellerkrcatovich}, and $d(S^3_{-1}(T_{-p,q}))$ \cite{batson2012nonorientable}, and the formula in Remark \ref{rem:arf}, we see that \begin{align*} \sigma(T_{4,q})&= \begin{cases} -2(q-1) & \text{ if } q\equiv 1\pmod 4,\\ -2q & \text{ if } q\equiv 3\pmod 4, \end{cases}\\ \upsilon(T(4,q))&=-(q-1)\text{ for all odd }q,\\ d(S^3_{-1}(T_{-4,q}))&= \begin{cases} q-1 & \text{ if } q\equiv 1\pmod 8,\\ q-1 & \text{ if } q\equiv 3\pmod 8,\\ q+1 & \text{ if } q\equiv 5\pmod 8,\\ q+1 & \text{ if } q\equiv 7\pmod 8, \end{cases}\\ \arf(T_{4,q})&= \begin{cases} 0 & \text{ if } q\equiv 1,7\pmod 8,\\ 1 & \text{ if } q\equiv 3,5\pmod 8. \end{cases} \end{align*} It follows that \begin{align*} (\sigma+4\arf)(T_{4,q})\pmod 8&= \begin{cases} 0 & \text{ if } q\equiv 1\pmod 8,\\ 2 & \text{ if } q\equiv 3\pmod 8,\\ 4 & \text{ if } q\equiv 5\pmod 8,\\ 6 & \text{ if } q\equiv 7\pmod 8,\\ \end{cases} \\ \left \vert \left(\upsilon - \frac{\sigma}{2}\right)\left(T(4,q)\right)\right \vert &= \begin{cases} 0 &\mbox{if } q\equiv 1\pmod4,\\ 1 &\mbox{if } q\equiv 3\pmod4, \end{cases}\\ \frac{\sigma(T_{-4,q})}{2} - d(S^3_{-1}(T_{-4,q}))&= \begin{cases} 0 & \text{ if } q\equiv 1\pmod 8,\\ 1 & \text{ if } q\equiv 3\pmod 8,\\ -2 & \text{ if } q\equiv 5\pmod 8,\\ -1 & \text{ if } q\equiv 7\pmod 8.\\ \end{cases} \end{align*} We can see that \Cref{lem:yasuhara} only applies when $q\equiv 5\pmod 8$ and the lower bound $|\frac{\sigma}{2}-\upsilon|$ from \Cref{lem:OSSbound} does not give as sharp a lower bound as \Cref{thm:lowerbound} when $q\equiv 5,7\pmod 8$. Consequently, the lower bounds due to Golla and Marengon, Ballinger, and Daemi and Scaduto mentioned in Section \ref{sec:background} are not as sharp either. Notice that Batson's lower bound (from \Cref{lem:batson}) shows that $\frac{\sigma(T_{-p,q})}{2}-d(S^3_{-1}(T_{-p,q}))\le \gamma_4(T_{-p,q})=\gamma_4(T_{p,q})$ (since $T_{-p,q}$ bounds a nonorientable surface of first Betti number $g$ if and only if $T_{p,q}$ bounds a nonorientable surface of first Betti number $g$). Therefore, Batson's lower bound is also not as sharp as \Cref{thm:lowerbound} when $q\equiv 5,7\pmod8$. Meanwhile, Allen's bound from \Cref{lem:allen} does not apply since the double cover of $S^3$ branched over $T_{4,q}$ is not an integral homology sphere. Finally, the obstruction from \Cref{lem:linkingpairing} applies to the cases $q\equiv 5\text{ or }7\pmod8$ in the same way as it applies to the cases $q\equiv 1\text{ or }3\pmod8$; however, it does not obstruct every such torus knot from bounding a M{\"o}bius band (see Example \ref{exmp:4q} for details). We finally mention that the techniques of \cite{jabukakelly} can be used to show that $T_{4,q}$ does not bound a M{\"o}bius band for all $q\equiv 5\text{ or }7\pmod8$, although it requires considerable more work than simply applying Theorem \ref{thm:lowerbound}. To use this obstruction, one must first locate certain definite 4-manifolds bounded by the double branched cover along $T_{4,q}$ and then obstruct the existence of certain lattice embeddings given by Donaldson's Diagonalization Theorem \cite{donaldson}. \subsection{A Detour: Semigroups and the Alexander polynomial} To apply Theorem \ref{thm:lowerbound}, one must compute the Alexander polynomial. Such computations are often tedious, especially when considering infinite families of knots. To help with these calculations we exploit a relationship between the Alexander polynomial of torus knots (or in general, algebraic knots) and certain sub-semigroups of $\mathbb{Z}_{\ge 0}$. Recall that a knot $K$ is an \emph{$L$-space knot} if it admits a positive Dehn surgery which is an $L$-space; see \cite[Definition 1.1]{ozsvath2005knot} for the definition of an $L$-space. It is proven in \cite[Theorem 1.2]{ozsvath2005knot} that when $K$ is an $L$-space knot, the Alexander polynomial of $K$ takes the form \begin{equation} \Delta_K(t)=(-1)^m + \sum_{i=1}^{m} (-1)^{m-i}\left(t^{n_i}+t^{-n_i}\right) \label{eqn:alex} \end{equation} for some sequence of positive integers $0<n_1<\cdots <n_m =g(K)$. The \emph{formal semigroup} of an $L$-space knot $K$, defined in \cite[Section 2.1]{wang2018semigroups} (see also \cite{bodnarceloriagolla}), is the subset $S_K \subset \mathbb{Z}_{\ge 0}$ satisfying the following equation in $\mathbb{Z}[[t,t^{-1}]]$: \begin{equation} t^{\deg \Delta_{K}} \cdot \Delta_{K} (t)= (1-t)\cdot \left(\sum_{i\in S_K} t^i \right). \label{eqn:alexsemigroup} \end{equation} Recall that a knot $K$ is an \emph{algebraic knot} if it arises as a knot associated to a plane curve singularity in $\mathbb{C}^2$. It is known that algebraic knots are $L$-space knots \cite{hedden2009} and that the formal semigroup $S_K$ of an algebraic knot $K$ is an actual semigroup and it agrees with the traditionally defined semigroup for algebraic knots \cite{wall2004singular}. Torus knots are algebraic knots because they are precisely the knots associated to the singularity $z^p -w^q =0$ for $z,w \in \mathbb{C}$. Therefore, each torus knot gives rise to a semigroup. Moreover, it is well-known that the semigroup for $T_{p,q}$ is $S_{T_{p,q}}=p\mathbb{Z}_{\ge0}+q\mathbb{Z}_{\ge0}$ (see, e.g., \cite{borodziklivingston2014}) and that the Alexander polynomial of $T_{p,q}$ is the Laurent polynomial given by $$\displaystyle\Delta_{T_{p,q}}(t)=t^{-\frac{(p-1)(q-1)}{2}}\cdot \frac{(t-1)(t^{pq}-1)}{(t^p -1)(t^q -1)},$$ which has degree $\frac{(p-1)(q-1)}{2}$. \begin{exmp} Consider the torus knot $K=T_{3,5}$. Its Alexander polynomial is given by $$\Delta_K(x) \doteq x^{-4}\cdot\frac{(x-1)(x^{15}-1)}{(x^3-1)(x^5-1)}=x^{-4}-x^{-3}+x^{-1}-1+x-x^3+x^4.$$ On the other hand, the semigroup generated by $3$ and $5$ is given by $$\langle 3,5\rangle = \{ 0,3,5,6 \}\cup \mathbb{Z}_{\ge 8}.$$ This matches the equality given by \Cref{eqn:alexsemigroup}: \[ \begin{split} x^4(x^{-4}-x^{-3}+x^{-1}-1+x-x^3+x^4) &= 1-x+x^3-x^4+x^5-x^7+x^8 \\ &= (1-x)\left(1+x^3+x^5+x^6+\sum_{i=8}^{\infty}x^i\right). \end{split} \] \end{exmp} Since algebraic knots are $L$-space knots, their Alexander polynomials are as in \Cref{eqn:alex}. Coupling this with \Cref{eqn:alexsemigroup}, we have the following lemma, which was also stated (and proven) in a slightly different way in \cite{borodzik2019involutive}. \begin{lem}[{\cite[Proposition 3.8]{borodzik2019involutive}}] \label{semigrouplemma} Let $K$ be an algebraic knot whose Alexander polynomial has leading terms $t^d$ and $t^{-d}$. Then, for any integer $i$, the coefficient of the term $t^i$ of $\Delta_K(t)$ is $1$ if $d+i-1\notin S_K$ and $d+i\in S_K$, $-1$ if $d+i-1\in S_K$ and $d+i\notin S_K$, and $0$ if $d+i-1$ and $d+i$ are either both contained in $S_K$ or both not contained in $S_K$. \end{lem} \subsection{The family $T_{p,(2k+1)p-1}$, where $p$ is odd}\label{subsec:podd} We now prove the first statement of \Cref{thm:evencalculations}\ref{item:p-1} (the second statement of \Cref{thm:evencalculations}\ref{item:p-1} is due to Corollary \ref{cor:jabukavanCottpinch}). Suppose $p$ is odd and let $q\equiv p-1\pmod{2p}$. Set $q=2kp+(p-1)=(2k+1)p-1$. Notice that by Lemma \ref{lem:pinchmoves}, $\vartheta(T_{p,(2k+1)p-1})=\frac{p-1}{2}$ and so $\gamma_4(T_{p,(2k+1)p-1})\le\frac{p-1}{2}$. Consider the semigroup $S_K$ for the torus knot $K=T_{p,(2k+1)p-1}$, which is generated by $p$ and $(2k+1)p-1$. The degree of the Alexander polynomial $\Delta_K$ of $K$ is $d=\frac{(p-1)((2k+1)p-2)}{2}.$ We first claim that $d+i\notin S_K$ for all $0\le i\le \frac{p-3}{2}$. Suppose otherwise. Then there exists nonnegative integers $a$ and $b$ satisfying $$ap+b((2k+1)p-1)=\frac{(p-1)((2k+1)p-2)}{2}+i.$$ \noindent Solving for $a$, we find $$a=\frac{(p-1)(2k+1)p-2p-2b(2k+1)p}{2p}+\frac{1+i+b}{p}.$$ Since $p$ is odd and $a\in\mathbb{Z},$ we necessarily have that $1+i+b=\alpha p$ for some integer $\alpha$. Since $b\ge0$, we have that $b=\alpha p-i-1\ge0$, implying that $\alpha\ge1$. Therefore $$a=\frac{-2\alpha p((2k+1)p-1)+p(2k+1)(p+2i+1)-2p}{2p}\le -\frac{(2k+1)}{2p}<0,$$ \noindent contradicting the assumption that $a\ge0$. Thus $d+i\notin S_K$ for all $0\le i\le \frac{p-3}{2}$. It follows from \Cref{semigrouplemma} that since the constant term of the Alexander polynomial is nonzero and $d\notin S_K$, the constant term of the Alexander polynomial is $-1$. Moreover, since $d+i\notin S_K$ for all $0\le i\le \frac{p-3}{2}$, we can further deduce by \Cref{semigrouplemma} that the first nontrivial term of positive degree in $\Delta_K$ has exponent at least $\frac{p-1}{2}$. Finally, setting $a=0$ and $b=\frac{p-1}{2}$, we have that $ap+b((2k+1)p-1)=\frac{((2k+1)p-1)(p-1)}{2}=d+\frac{p-1}{2}.$ Therefore, $d+\frac{p-1}{2}\in S_K$. By \Cref{semigrouplemma}, the first nontrivial term of positive degree in $\Delta_K$ has exponent $\frac{p-1}{2}.$ By Theorem \ref{thm:lowerbound}, $\gamma_4(T_{p,(2k+1)p-1})\ge\frac{p-3}{2}.$ Thus we have shown $\gamma_4(T_{p,(2k+1)p-1})\in\{\frac{p-3}{2},\frac{p-1}{2}\}$. \subsection{The family $T_{p,(2k+1)p+1}$, where $p$ is even}\label{subsec:peven} Finally, we prove the middle case of \Cref{thm:evencalculations}\ref{item:c}(the other cases of \Cref{thm:evencalculations}\ref{item:c} are due to Corollary \ref{cor:jabukavanCottpinch}). Let $q\equiv p+1\pmod{2p}$. Set $q=2kp+p+1=(2k+1)p+1$. By Lemma \ref{lem:pinchmoves}, $\vartheta(T_{p,(2k+1)p+1})=\frac{p}{2}$ and thus $\gamma_4(T_{p,(2k+1)p+1})\le \frac{p}{2}$. As above, let $S_K$ denote the semigroup for $T_{p,(2k+1)p+1}$, which is generated by $p$ and $(2k+1)p+1$. We claim that $d+i\notin S_K$ for all $0\le i \le \frac{p-2}{2}$, where $d=\frac{(p-1)(2k+1)p}{2}$ is the degree of the Alexander polynomial. Indeed, if there exist nonnegative integers $a$ and $b$ satisfying $$ap+b((2k+1)p+1)=d+i$$ then $$a=\frac{(p-1)(2k+1)}{2}-b(2k+1)+\frac{i-b}{p}.$$ Since $p$ is even and $a\in\mathbb{Z}$, $\frac{i-b}{p/2}$ must be odd. Thus $i-b=\alpha \frac{p}{2},$ where $\alpha$ is an odd integer. Consequently, $0\ge b=i-\alpha \frac{p}{2}\le -\frac{\alpha -1}{2}p-1$ and so $\alpha\le -1$. Thus we have $$a=\frac{(p-1)(2k+1)}{2}-b(2k+1)+\frac{i-b}{p}\le -\frac{(2i+1)(2k+1)}{2}<0,$$ contradicting the assumption that $a\ge 0.$ Moreover, setting $a=\frac{(p-1)(2k+1)+1}{2}$ and $b=0$, we see that $ap+b((2k+1)p+1)=d+\frac{p}{2}\in S_K.$ Now arguing as in \Cref{subsec:podd}, we have that the Alexander polynomial of $K$ has constant term $-1$ and the first nontrivial term of positive degree has exponent $\frac{p}{2}$. Thus by Theorem \ref{thm:lowerbound}, $\gamma_4(T_{p,(2k+1)p-1})\ge \frac{p-2}{2}$. \subsection{The family $T_{4n+2k,(4n+2k)(n\pm1)+1}$} Finally, we finish the proof of \Cref{prop:longoextension}. Notice that since $n$ is even, the torus knots in this family are contained in the torus knots of \Cref{subsec:peven} (c.f \Cref{rem:specialcase}). Thus we have $\gamma_4(T_{4n+2k,(4n+2k)(n\pm1)+1})\in\{2n+k-1,2n+k\}$. Now by \Cref{prop:families}, we have $\gamma_4(T_{4n+2k,(4n+2k)(n\pm1)+1})=2n+k-1$. \begin{rem} By \Cref{lem:pinchmoves}, all of the pinch moves used for the $T_{p,(2k+1)p+1}$ family in \Cref{subsec:peven} are negative; since $p$ is even, Theorem 1.8 in \cite{jabuka2019nonorientable} tells us that the lower bound given by Lemma \ref{lem:OSSbound} is 0. Similarly, by \Cref{lem:pinchmoves}, all of the pinch moves used for the $T_{p,(2k+1)p-1}$ family in \Cref{subsec:podd} are positive. However, since $(2k+1)p-1$ is even, to apply Theorem 1.8 in \cite{jabuka2019nonorientable}, we reverse the role of $p$ and $(2k+1)p-1$ so that all pinch moves are negative. By doing so we find that the lower bound given by Lemma \ref{lem:OSSbound} is 0. Finally, one can see that the lower bound in \Cref{lem:batson} is, in general, not as sharp as \Cref{thm:lowerbound} for these families (e.g. for $T_{8,9}$, the lower bound given by \Cref{lem:batson} is $-4$). Thus Theorem \ref{thm:lowerbound} gives a much sharper lower bound than the existing lower bounds discussed in \Cref{sec:background}. \end{rem} \section{Involutive obstruction and genus bounds from the unoriented link Floer TQFT}\label{sec:involutive} In this section, we will prove Theorems \ref{mobiusthm}, \ref{highergenusthm}, and \ref{thm:lowerbound}. We begin by briefly recalling Fan's disoriented link Floer TQFT, as defined in \cite{fan2019unoriented}. Although Fan's TQFT accounts for unorientable cobordisms between links in $S^3$, there are a number of restrictions of which one should be aware. \begin{defn} A \emph{disoriented link} (in $S^3$) is a quadruple $\mathcal{L}=(L,\mathbf{p},\mathbf{q},\mathbf{l})$ where $L$ is a link in $S^3$, $\mathbf{p}$ and $\mathbf{q}$ are finite subsets of $L$ satisfying $\mathbf{p}\cap \mathbf{q}=\emptyset$, such that points in $\mathbf{p}$ and points in $\mathbf{q}$ appear alternately on each component of $L$, and $L\backslash (\mathbf{p}\cup\mathbf{q})$ consists of $2n$ arcs $\mathbf{l}=\{l_1,\cdots,l_{2n}\}$ for some integer $n$. \end{defn} \begin{rem} For simplicity, we will occasionally use a disoriented link $\mathcal{L}=(L,\mathbf{p},\mathbf{q},\mathbf{l})$ and its underlying link $L$ interchangeable. \end{rem} Given a disoriented link $\mathcal{L}=(L,\mathbf{p},\mathbf{q},\mathbf{l})$, where $\mathbf{p}=\{p_1,\dots,p_n\}$ and $\mathbf{q}=\{q_1,\cdots,q_n\}$, choose any orientation on $L$. Viewing the points $\mathbf{p}$ and $\mathbf{q}$ on $L$ as $z$-basepoints and $w$-basepoints respectively gives the link Floer chain complex $CFL(S^3,\mathcal{L})$ a structure of a curved complex of modules over the ring $\mathbb{F}_2[U_1,\cdots,U_n,V_1,\cdots,V_n]$, as shown in \cite{zemke2019link}. The curvature of this complex is given by the formula \[ \partial_{CFL(S^3,\mathcal{L})}^2 = \sum_{K\in \pi_0(L)} U_{p_{K,1}}V_{q_{K,1}}+V_{q_{K,1}}U_{p_{K,2}}+\cdots+V_{q_{K,t}}U_{p_{K,1}}, \] where the points of $\mathbf{p}$ and $\mathbf{q}$ on a component $K$ are labeled as $p_{K,1},q_{K,1},\cdots,p_{K,t},q_{K,t}$ as one travels along $L$ with the chosen orientation. Consider the truncation of $CFL(S^3,\mathcal{L})$ by identifying all of the variables $U_i$ and $V_i$ with a single formal variable $U$, and denote the resulting complex by $CFL^{\prime}(S^3,\mathcal{L})$. Then the curvature vanishes and thus $CFL^{\prime} (S^3,\mathcal{L})$ is a chain complex over the ring $\mathbb{F}_2[U]$. Note that $CFL(S^3,\mathcal{L})$ is endowed with two gradings $\mathbf{gr}_\mathbf{p}$ and $\mathbf{gr}_\mathbf{q}$. The truncation is not compatible with this bigrading, and we only get a single grading, called the (normalized) $\delta$-grading, which is given by $\delta =\frac{1}{2}(\sigma(L)+gr_\mathbf{p} +gr_\mathbf{q} )$. The resulting $\delta$-graded chain complex $CFL^{\prime} (S^3,\mathcal{L})$ is called the \emph{unoriented link Floer chain complex} of $\mathcal{L}$ and its homology is denoted as the \emph{unoriented link Floer homology}. When $\mathcal{L}$ is a knot, we write $CFK^{\prime}$ instead of $CFL^{\prime}$ and similarly for $CFL$ and $CFK$. \begin{defn} A \emph{disoriented link cobordism} (in $S^3 \times I$) between disoriented links $\mathcal{L}_1 =(L_1,\mathbf{p}_1,\mathbf{q}_1,\mathbf{l}_1)$ and $\mathcal{L}_2 =(L_2,\mathbf{p}_2,\mathbf{q}_2,\mathbf{l}_2)$ is a pair $\mathcal{F}=(F,a)$ where $F$ is a smoothly embedded surface in $S^3 \times I$ such that $\partial F= (L_1 \times \{0\}) \cup (L_2 \times \{1\})$ and $a$ is an oriented $1$-manifold which is properly embedded in $(F,\partial F)$ such that $F\backslash a$ is orientable and $\partial a=\mathbf{q}_1 -\mathbf{p}_1 +\mathbf{p}_2 -\mathbf{q}_2$. \end{defn} The main theorem of \cite{fan2019unoriented} is as follows. Note that, while the theorem is originally stated on the level of homology, one can observe directly from its proof that it actually holds on chain level up to (a possibly non-unique) chain homotopy. \begin{thm}[{\cite[Theorem 1.3.1]{fan2019unoriented}}] \label{fansthm} Let $S$ be a disoriented link cobordism between (disoriented) links $L_1$ and $L_2$. Then there is a $\delta$-grading-preserving $\mathbb{F}_2[U]$-module map \[ F_S \colon CFL^{\prime} (S^3,L_1) \rightarrow CFL^{\prime} (S^3,L_2), \] called the cobordism map induced by $S$, whose chain homotopy class depends only on the isotopy class of $S$. This map is functorial in the following sense: if $S_1$ and $S_2$ are disoriented link cobordisms between $L_1$ and $L_2$ and between $L_2$ and $L_3$, respectively, then we have functoriality up to chain homotopy: \[ F_{S_2 \circ S_1} \sim F_{S_2} \circ F_{S_1}. \] \end{thm} \begin{rem} \label{oriented-equivalent} For oriented link cobordisms, the notion of disoriented cobordism is equivalent to the notion of decorated cobordism in \cite{juhasz2016cobordisms} and \cite{zemke2019link}. It is known \cite[Remark 4.15]{gong2020non} that the cobordism maps from Zemke's oriented link Floer TQFT induce the cobordism maps from Fan's unoriented link Floer TQFT under truncation for such cobordisms. \end{rem} For later use, we will give some trivial examples of disoriented cobordisms for which Fan's cobordism maps can be easily computed. \begin{exmp} \label{unknottedmobius} Consider the unknot $U$, made into a disoriented knot $\mathcal{U}$ by choosing one $\mathbf{p}$ point and one $\mathbf{q}$ point. Performing a nonorientable band move on $U$ with normal Euler number $\pm 1$ gives two nonorientable cobordisms $\mathcal{S}_{\pm}$ from $\mathcal{U}$ to $\mathcal{U}$. From the $\delta$-grading shift formula (see \cite[Proposition 7.2.5]{fan2019unoriented}), we see that the grading shifts of $F_{\mathcal{S}_+}$ and $F_{\mathcal{S}_-}$ are $0$ and $-1$, respectively. Now, from the fact that the cobordism maps $F_{\mathcal{S}_{\pm}}$ induced by $\mathcal{S}_{\pm}$ become quasi-isomorphisms after localizing by $U^{-1}$ (which follows directly from \cite[Proposition 5.4]{gong2020non}), we get \[ F_{\mathcal{S}_+} = \mathbf{id} \text{ and } F_{\mathcal{S}_-} = U\cdot\mathbf{id}. \] \end{exmp} In this section, we will use not only (disoriented) cobordisms in $S^3 \times I$, but also cobordisms in $B^4$. They can be seen as disoriented cobodisms from a nontrivial link to the empty link, or from the empty link to a nontrivial link. To define cobordism maps for such cobordisms, given a disoriented cobordism $(S,a)$ in $B^4$, we choose any $p$ in the interior of $a$ and its sufficiently small neighborhood $N(p)$ in $B^4$, so that $S\cap N(p)$ is a boundary-parallel disk in $B^4$ and $a\cap N(p)$ is a properly embedded arc on $S\cap N(p)$. We then consider $(S\backslash N(p),a\backslash N(p))$, which is now a disoriented cobordism in $S^3\times I$, from some disoriented link $L$ to the unknot. Then the map $F_{(S,a)}$ induced by $(S,a)$ can be naturally defined as the disoriented cobordism map $F_{(S\backslash N(p),a\backslash N(p))}$ induced by the punctured cobordism $(S\backslash N(p),a\backslash N(p))$ by \Cref{fansthm}. We can similarly define the opposite-direction cobordism map $F_{(-S,a)}$. Note that this definition is compatible with the birth/death maps of unknots in Zemke's oriented link Floer TQFT. \begin{prop} For any disoriented cobordism $(S,a)$ in $B^4$, the chain homotopy class of the map $F_{(S,a)}$ depends only the isotopy class of $(S,a)$. The same statement also holds for $(-S,a)$. \end{prop} \begin{proof} Choose any two points $p,q$ in the interior of $a$ and choose sufficiently small neighborhoods $N(p)$ and $N(q)$ of $p$ and $q$, respectively, so that $N(p)\cap N(q)=\emptyset$ and $S\cap N(p)$. We claim that $F_{(S\backslash N(p),a\backslash N(p))}=F_{(S\backslash N(q),a\backslash N(q))}$; the desired result follows directly from this claim. To prove the claim, we first observe that the case when $S$ is orientable is already covered by \Cref{oriented-equivalent}. In the general case when $S$ can be non-orientable, choose any smoothly embedded ball $B\subset B^4$ such that $N(p)\cup N(q)\subset B$, $S\cap B$ is orientable, and $\partial B$ intersects transversely with both $S$ and $a$. Since $(S\backslash B,a\backslash B)$ and $(S\cap (B\backslash N(p)),a\cap (B\backslash N(p)))$ are disoriented cobordisms in $S^3 \times I$, we have \[ F_{(S\backslash N(p),a\backslash N(p))} \simeq F_{(S\backslash B,a\backslash B)} \circ F_{(S\cap (B\backslash N(p)),a\cap (B\backslash N(p))} \simeq F_{(S\backslash B,a\backslash B)} \circ F_{(S\cap B,a\cap B)}. \] Similarly, we also have $F_{(S\backslash N(q),a\backslash N(q))} \simeq F_{(S\cap B,a\cap B)}$. The claim follows. \end{proof} We now introduce involutive knot Floer homology. Given an oriented knot $K$ in $S^3$, we can represent it as a doubly-pointed Heegaard diagram $H=\left(\Sigma,\mathbf{\alpha},\mathbf{\beta},z,w\right)$, and suppose that $K$ lies on the Heegaard surface $\Sigma$. We have a canonical chain skew-isomorphism \[ \eta \colon CFK(H)\rightarrow CFK(\bar{H}), \] where $\bar{H}$ denotes the Heegaard diagram $(-\Sigma,\mathbf{\beta},\mathbf{\alpha},w,z)$. Here, the prefix 'skew' means that we are considering maps which intertwine the actions of $U$ and $V$ on the domain with the actions of $V$ and $U$ on the codomain. We then consider the half-twist map \[ \tau \colon CFK(\bar{H})\rightarrow CFK(\tau(\bar{H})) \] which corresponds to the self-diffeomorphism $(S^3,K,z,w)\rightarrow (S^3,K,w,z)$ induced by turning a neighborhood of $K$ (on $\Sigma$) half times along the orientation of $K$. Here, $\tau(\bar{H})$ denotes the Heegaard diagram $(-\Sigma,\tau(\mathbf{\beta}),\tau(\mathbf{\alpha}),z,w)$, where $\tau(\mathbf{\beta})$ and $\tau(\mathbf{\alpha})$ are the images of $\mathbf{\beta}$ and $\mathbf{\alpha}$ under the given ``half-twist'' self-diffeomorphism. Now, the doubly-pointed Heegaard diagrams $\tau(\bar{H})$ and $H$ encode the same oriented knot, so the naturality of link Floer homology \cite{juhasz2018naturality} tells us that there is a chain homotopy equivalence \[ n \colon CFK(\tau(\bar{H}))\rightarrow CFK(H), \] which is well-defined up to chain homotopy. Composing these three maps gives a homotopy self skew-equivalence \[ \iota_K =n\circ \tau\circ \eta, \] whose chain homotopy class depends only on the oriented isotopy class of $K$. It is known \cite{zemke2019connected} that $\iota_K$ is not an involution in general, but rather an order $4$ map which satisfies \[ \iota_K ^2 \sim 1+\Phi\Psi, \] where $\Phi$ and $\Psi$ are the basepoint actions, which can be easily computed as the formal partial derivatives of the chain differential with respect to the formal variables $U$ and $V$, respectively. Note that, since the truncation from $CFK$ to $CFK^{\prime}$ identifies $U$ and $V$ into a single variable $U$, we see that $\iota_K$ induces a $\delta$-grading-preserving $\mathbb{F}_2[U]$-equivariant chain homotopy self-equivalence \[ \iota_K \colon CFK^{\prime}(S^3,K) \rightarrow CFK^{\prime}(S^3,K), \] whose chain homotopy class depends on the oriented isotopy class of $K$. It is clear that, if we choose the opposite orientation of $K$, the map $\iota_K$ is replaced by its homotopy inverse $\iota_K ^{-1}$. Since $\iota_K$ is now a chain homotopy equivalence rather than a skew-equivalence (which is the case in the oriented setting), we can define new knot invariants as follows. \begin{defn} Given an unoriented knot $K$, choose either orientation on $K$ and define the \emph{involutive unoriented knot Floer chain complex} $CFKI^{\prime}(K)$ as the mapping cone of $1+\iota_K \colon CFK^{\prime}(S^3,K)\rightarrow CFK^{\prime}(S^3,K)$, which is a chain complex of $\mathbb{F}_{2}[U,Q]/(Q^2)$-modules. This complex is endowed with a grading which is uniquely determined from the $\delta$-grading on $CFK^{\prime}(S^3,K)$ by the rule that the grading of $Q$ is $-1$. The homology of $CFKI^{\prime}(K)$, called the \emph{involutive unoriented knot Floer homology}, is denoted $HFKI^{\prime}(K)$. \end{defn} \begin{rem} If we denote the differential on $CFK(S^3,K)$ as $\partial_K$, then the differential $\partial$ on $CFKI^{\prime}(K)$ is given by $\partial(a+Qb) = \partial_K(a)+Q(a+\iota_K(a)+\partial_K(b))$. \end{rem} It is easy to see that the above definition is independent of the choice of orientation on $K$. \begin{lem} \label{mappingcone} Let $C,D$ be chain complexes and $g \colon C\rightarrow D$ be a chain homotopy equivalence. Then for any chain map $f \colon C\rightarrow C$, the mapping cones of $f$ and $g\circ f$ are chain homotopy equivalent. \end{lem} \begin{proof} The differentials on the mapping cones of $f$ and $g\circ f$ are given by $\partial_{M(f)}(a,b)=(\partial a,f(a)+\partial b)$ and $\partial_{M(g\circ f)}(a,b)=(\partial a,g(f(a))+\partial b)$, respectively. Consider the maps $F:M(f)\rightarrow M(g\circ f)$ and $G:M(g\circ f)\rightarrow M(f)$, defined as $F(a,b)=(a,g(b))$ and $G(a,b)=(a,h(b))$, where $h$ is a homotopy inverse of $g$. Then we have \[ (\partial_{M(g\circ f)}F+F\partial_{M(f)})(a,b)=(\partial a,(g\circ f)(a)+\partial g(b))+(\partial a,g(f(a)+\partial b))=0, \] so $F$ is a chain map, and similarly $G$ is also a chain map. Now, if we denote a null-homotopy of $h\circ g - \mathbf{id}$ as $H$, then we have \[ G\circ F-\mathbf{id}=(0,h\circ g-\mathbf{id})=\partial_{M(f)}\circ (0,H) - (0,H)\circ \partial_{M(f)}, \] so $G\circ F \sim \mathbf{id}$ and similarly $F\circ G \sim \mathbf{id}$. Therefore $F$ is a chain homotopy equivalence. \end{proof} \begin{thm} \label{welldef} Given a knot $K$, the chain homotopy equivalence class of $CFKI^{\prime}(K)$ as a chain complex of $\mathbb{F}_2[U,Q]/(Q^2)$-modules depends only on the isotopy class of $K$. \end{thm} \begin{proof} Choose an orientation on $K$, which then defines $\iota_K$ on $CFKI^{\prime}(K)$. We have to prove that the mapping cone of $1+\iota_K$ is chain homotopy equivalent to the mapping cone of $1+\iota_K^{-1}$. But since \[ 1+\iota_K^{-1}=\iota_K^{-1}\circ (1+\iota_K) \] and $\iota_K$ is a chain homotopy self-equivalence of $CFKI^{\prime}(K)$, \Cref{mappingcone} implies that the two mapping cones are indeed chain homotopy equivalent. \end{proof} The following lemma tells us about the structure of $HFKI^{\prime}$. For simplicity, we denote the localization by introducing a formal inverse of $U$ as $U^{-1}$. \begin{lem} \label{structurelem} We have $U^{-1}HFKI^{\prime}(K)\simeq \mathbb{F}_2[U^{\pm 1},Q]/(Q^2)$. \end{lem} \begin{proof} Since $U^{-1}CFK^{\prime}(S^3,K)$ is the truncation of $(U,V)^{-1}CFK(S^3,K)$ by the identification $U=V$ and $(U,V)^{-1}CFK(S^3,K)\simeq (U,V)^{-1}\mathbb{F}_{2}[U,V]$, we know that $U^{-1}CFK^{\prime}(S^3,K)\simeq U^{-1}\mathbb{F}_{2}[U]\simeq \mathbb{F}_{2}[U^{\pm 1}]$. Thus $U^{-1}\iota_K$ is chain homotopic to the identity map. Now the lemma follows from the fact that a localization of a mapping cone is chain homotopy equivalent to the mapping cone of a localized map. \end{proof} The above lemma, combined with \Cref{welldef}, allows us to make the following definition. \begin{defn} Given a knot $K$, we define two knot invariants $\bar{\upsilon}(K)$ and $\ubar{\upsilon}(K)$ as follows: \[ \begin{split} \ubar{\upsilon}(K) &= \max \left\{ r \,\vert\, \exists x\in HFKI^{\prime}(K),\,\mathbf{gr}_{\delta}(x)=r,\,\forall n,\,U^n x\notin \text{Im}(Q) \right\}, \\ \bar{\upsilon}(K) &= \max \left\{ r \,\vert\, \exists x \in HFKI^{\prime}(K),\,\mathbf{gr}_{\delta}(x)=r,\,\forall n,\,U^n x\ne 0;\exists m\ge 0 \text{ s.t. } U^m x\in \text{Im}(Q)\right\} +1, \end{split} \] where $\mathbf{gr}_{\delta}(x)$ denotes the (normalized) $\delta$-grading of a homogeneous element $x$. \end{defn} As mentioned in the introduction, the invariants $\ubar{\upsilon}$ and $\bar{\upsilon}$ coincide with the values at $t=1$ of the involutive Upsilon invariants $\ubar{\Upsilon}_t$ and $\bar{\Upsilon}_t$ defined by Hogancamp and Livingston. It thus follows from \cite[Proposition 11 and Theorem 12]{hogancamp2017involutive} that $\ubar{\upsilon}$ and $\bar{\upsilon}$ are (smooth) concordance invariants and $\bar{\upsilon}(K) \ge \upsilon(K) \ge \ubar{\upsilon}(K)$. \begin{exmp} Consider the figure-eight knot $K=4_1$. Its unoriented knot Floer complex has generators $a,b,c,d,x$, whose gradings are all $0$, and where the differential is given by \[ \partial a = U(b+c), \, \partial b = \partial c = Ud, \, \partial x = \partial d = 0. \] The involution $\iota_K$, which was computed in \cite{hendricks2017involutive}, is given by \[ \iota_K(a) = a+x, \, \iota_K(b) = c, \, \iota_K(c) = b, \, \iota_K(d) = d, \, \iota_K(x) = x+d. \] We will calculate $\bar{\upsilon}(K)$ and $\ubar{\upsilon}(K)$ by explicitly computing the cycles of $CFKI^{\prime}(K)$. Recall that the differential of $CFKI^{\prime}(K)$ is given by $\partial (s+Qt)=\partial s+Q(s+\iota_K(s)+\partial t)$. Hence an element $a+Qb\in CFKI^{\prime}(K)$ is a cycle if and only if $a$ is a cycle in $CFK^{\prime}(S^3,K)$ and $(1+\iota_K)(a)=\partial b$. The space of cycles in $CFK^{\prime}(S^3,K)$ is generated over $\mathbb{F}_{2}[U]$ by $x$, $b+c$, and $d$, whose images under the action of $1+\iota_K$ are given by $d$, $0$, and $0$, respectively. Hence the space of cycles in $CFKI^{\prime}(K)$ is generated over $\mathbb{F}_{2}[U,Q]/(Q^2)$ by the following cycles: \[ Ux+Qd,\,b+c,\,d. \] Since $Ud = \partial (b) + Q(b+c)$, $U^2(b+c)= \partial(Ua)+Q(Ux+Qd)$, and $Ux+Qd$ is a cycle in $CFKI^{\prime}(K)$, we see that the homology classes of $Ud$ and $U^2(b+c)$ are contained in the image of $Q$. On the other hand, if the homology class of $U^n(Ux+Qd)$ is contained in the image of $Q$ for some $n\ge 0$, then we should have \[ U^{n+1}x+QU^n d = \partial s + Q(s+\iota_K(s)+\partial t) + Qz \] for some elements $s,t,z\in CFK^{\prime}(S^3,K)$ with $\partial z=0$, which would imply that $U^{n+1}x$ is a boundary in $CFK^{\prime}(S^3,K)$, a contradiction. Hence the homology class of $U^n(Ux+Qd)$ is not contained in the image of $Q$ for any $n\ge 0$. Now, using the definition of $\bar{\upsilon}$ and $\ubar{\upsilon}$, we have \[ \begin{split} \bar{\upsilon}(K) &= \mathbf{gr}_{\delta}(b+c)+1 = 1 \qquad \text{and} \\ \ubar{\upsilon}(K) &= \mathbf{gr}_{\delta}(Ux+Qd) = -1. \end{split} \] Together with \Cref{mobiusthm}, which will be proven in this section, we recover the fact that the figure-eight knot does not bound a smooth Möbius band in $B^4$, which was proven in the topological category in \cite{viro}. Note that, since the figure-eight knot is rationally slice, we have $\upsilon(K)=\sigma(K)=0$. In general, via a straightforward computation using model complexes as given in \cite[Section 8.3]{hendricks2017involutive}, it is easy to see that the involutive upsilon invariants of a thin knot $K$ (which includes all quasialternating knots) are given by \begin{align*} \bar{\upsilon}(K)=\upsilon(K)=\ubar{\upsilon}(K)=0 &\text{ if } \sigma(K)+4\arf(K) \equiv 0 \mod 8, \\ \bar{\upsilon}(K)=1,\,\upsilon(K)=0,\,\ubar{\upsilon}(K)=-1 &\text{ if } \sigma(K)+4\arf(K) \equiv 4 \mod 8. \end{align*} We thus see that a thin knot $K$ does not bound a smooth M\"{o}bius band in $B^4$ if $\sigma(K)+4\arf(K) \equiv 4 \mod 8$, which is the same as Yasuhara's obstruction from \Cref{lem:yasuhara}. \end{exmp} Now we move on to developing involutive obstructions and bounds on the first Betti number for nonorientable slice-surfaces bounding a given knot. Recall that, given a knot $K$ with two prescribed points $p,q\in K$, the map $\iota_K$ on the unoriented knot Floer complex is defined by composing the canonical conjugation map \[ \eta_K \colon CFK^{\prime}(K,p,q)\rightarrow CFK^{\prime}(K,q,p) \] together with the ``half twist'' map (which depends on an orientation of $K$) \[ \tau_K \colon CFK^{\prime}(K,q,p)\rightarrow CFK^{\prime}(K,p,q). \] Note that the half twist map can be seen as a cobordism map induced by the ``half twist cobordism'', as shown in Figure \ref{fig:halftwistcobordism}. In particular, it is not a skew-isomorphism anymore; it is a genuine isomorphism, as we are now working with $CFK^{\prime}$, where the actions of $U$ and $V$ coincide. \begin{figure}[htbp] \centering \includegraphics[width=0.3\textwidth]{halftwistcobordism.pdf} \caption{The cobordism which induces the half twist map $\tau_K$. Note that the underlying surface is $K\times I$.} \label{fig:halftwistcobordism} \end{figure} For more generality, we extend the definition of canonical conjugation map to disoriented links. Given any disoriented link $\mathcal{L}=(L,\mathbf{p},\mathbf{q},\mathbf{l})$, we also have a canonically defined conjugation map \[ \eta_{\mathcal{L}} \colon CFL^{\prime}(\mathcal{L})\rightarrow CFL^{\prime}(\bar{\mathcal{L}}), \] where $\bar{\mathcal{L}}=(L,\mathbf{q},\mathbf{p},\mathbf{l})$. \begin{lem} \label{conjugationcomm} Let $\mathcal{S}=(S,a)$ be a disoriented cobordism between disoriented links $\mathcal{L}_1$ and $\mathcal{L}_2$. Then we have \[ F_{(S,-a)} \circ \eta_{\mathcal{L}_1} \sim \eta_{\mathcal{L}_2} \circ F_{(S,a)}, \] where $-a$ denotes $a$ endowed with the reverse orientation. \end{lem} \begin{proof} Recall that the cobordism maps in Fan's unoriented link Floer TQFT are computed by decomposing a given cobordism into basic pieces and composing the cobordism maps corresponding to each of these pieces. Among all possible pieces, we only have to consider nonorientable saddle moves, since everything else is already considered in the proof of \cite[Theorem 1.3]{zemke2019connected}. Since cobordism maps for saddle moves are defined as triangle maps on relevant Heegaard triple-diagrams, they obviously (homotopy-)commute with conjugation maps. \end{proof} We now have to check that the half twist map $\tau_K$ also homotopy-commutes with (disoriented) cobordism maps. When the given cobordism is a M{\" o}bius band, then the commutativity is very easy to observe. \begin{lem} \label{Mobiuscomm} Let $\mathcal{S}=(S,a)$ be a disoriented cobordism from a disoriented knot $K=(K,\mathbf{p},\mathbf{q},\mathbf{l})$ to the empty link, where $\mathbf{p}$ and $\mathbf{q}$ both consist of a single point. Suppose that $S$ is a smoothly embedded M{\" o}bius band and $a$ is a simple arc. Then, for any choice of orientation on $K$, we have $F_{(S,-a)} \circ \tau_K \sim F_{(S,a)}$, where $-a$ denotes $a$ endowed with the reverse orientation. Moreover, if $\bar{S}$ denotes the cobordism from the empty link to $K$ given by flipping $S$ upside-down, then we have $\tau_K \circ F_{(\bar{S},a)} \sim F_{(\bar{S},-a)}$. \end{lem} \begin{proof} This follows directly from Figure \ref{fig:mobiuscomm}. \end{proof} \begin{figure}[htbp] \centering \includegraphics[width=0.7\textwidth]{mobiuscomm.pdf} \caption{Left, the cobordism $\mathcal{S}$. Right, the cobordism representing $\tau_K \circ (\bar{S},-a)$. Note that the cobordism on the right is isotopic to the one on the left.} \label{fig:mobiuscomm} \end{figure} With \Cref{Mobiuscomm} at hand, we can now prove \Cref{mobiusthm}. \begin{proof}[Proof of \Cref{mobiusthm}] Let $M$ be a smooth M{\" o}bius band in $B^4$ bounding $K$. Choose a properly embedded simple arc $a\subset M$ such that $M\backslash a$ is a rectangle. Then $(M,a)$ is a disoriented cobordism from $K$ to the empty link and $(-M,a)$ is a disoriented cobordism from the empty link to $K$. By choosing a interior point $p\in a\cap \text{int}(M)$ and its small neighborhood $N(p)\subset B^4$, we can consider two disoriented cobordisms $(M\backslash N(p),a\backslash N(p))$ and $(-M\backslash N(p),a\backslash N(p))$, which are cobordism from $K$ to unknot and unknot to $K$, respectively; note that $F_{(M\backslash N(p),a\backslash N(p))}=F_{(M,a)}$ and $F_{(-M\backslash N(p),a\backslash N(p))}=F_{(-M,a)}$. Then, using \cite[Proposition 5.4]{gong2020non} on the punctured cobordism $(M\backslash N(p),a\backslash N(p))$, we see that there exists an orientable disoriented cobordism $T$ with first Betti number $1$ from $K$ to $K$, shown in Figure \ref{fig:cobordismT}, such that \[ U^c \cdot F_T \circ F_{(-M,a)} \circ F_{(M,a)} \sim U^{b-m+1} \cdot \mathbf{id}, \] where $m,b,c$ are the numbers of local minima, saddles, and local maxima of $M$; note that $b-m-c=1$ since $M$ is a Mobius band. Since the underlying space of $T$ is an orientable cobordism, $F_T$ is homotopic to the $U=V$ truncation of the cobordism map induced by $T$ with some orientation in Zemke's oriented link Floer TQFT. Theorem C of \cite{zemke2019link} implies that $U^{-1}F_T \sim U\cdot \mathbf{id}$, so we see that the localized map $U^{-1}(F_{(-M,a)} \circ F_{(M,a)})$ is a quasi-isomorphism. Since $U^{-1}HFK^{\prime}(S^3,K)\simeq \mathbb{F}_2[U^{\pm 1}]$, we see that $U^{-1}F_{(-M,a)}$ and $U^{-1}F_{(M,a)}$ are both chain homotopic to the identity. Also, since $U^{-1}F_T \sim U\cdot \mathbf{id}$, we know that $F_T$ shifts the $\delta$-grading by $-1$. Hence, if we denote the $\delta$-grading shifts of $F_{(-M,a)}$ and $F_{(M,a)}$ by $\mathbf{gr}_\delta (F_{(-M,a)})$ and $\mathbf{gr}_\delta (F_{(M,a)})$, then we have \[ \mathbf{gr}_\delta (F_{(-M,a)})+\mathbf{gr}_\delta (F_{(M,a)})=-1. \] \begin{figure}[htbp] \centering \includegraphics[width=0.3\textwidth]{cobordismT.pdf} \caption{The orientable cobordism $T$ of first Betti number $1$.} \label{fig:cobordismT} \end{figure} Choose either orientation on $K$. \Cref{conjugationcomm} and \Cref{Mobiuscomm} imply that $F_{(M,a)}$ and $F_{(-M,a)}$ satisfy the following conditions: \[ F_{(M,a)} \circ \iota_K \sim F_{(M,a)}, \,\iota_K\circ F_{(-M,a)}\sim F_{(-M,a)}. \] Hence, by choosing relevant chain homotopies, we get maps between involutive homology: \[ \begin{split} F \colon & HFKI^{\prime}(K)\rightarrow \mathbb{F}_2[U,Q]/(Q^2), \\ G \colon & \mathbb{F}_2[U,Q]/(Q^2) \rightarrow HFKI^{\prime}(K), \end{split} \] where the grading shifts of $F$ and $G$ are given by $\mathbf{gr}_\delta (F_{(M,a)})$ and $\mathbf{gr}_\delta (F_{(-M,a)})$, respectively. Note that $F$ and $G$ become quasi-isomorphisms when localized by $U^{-1}$. Now, from the definition of $\ubar{\upsilon}$, we know that there exists an element $x\in HFKI^{\prime}(K)$ such that the following conditions are satisfied. \begin{itemize} \item The $\delta$-grading of $x$ is $\bar{\upsilon}(K)-1$. \item For any $n\ge 0$, we have $U^n x\ne 0$. \item $U^m x = Qy$ for some $m\ge 0$ and $y\in HFKI^{\prime}(K)$. \end{itemize} Consider the element $F(x)\in \mathbb{F}_2[U,Q]/(Q^2)$. Since the localized map $U^{-1}F$ is chain homotopic to $U$ times the identity map and the homology class of $x$ generates the ($U$-)localized homology, we know that $F(x)\ne 0$. Also, we have $U^i F(x)=QF(y)$, so $F(x)=QU^i$ for some $i\ge 0$. Hence the $\delta$-grading of $F(x)$ is at most $-1$, so we get \[ \bar{\upsilon}(K)\le -\mathbf{gr}_{\delta}(F_{(M,a)}). \] We now consider the element $1\in CFKI^{\prime}(\text{unknot})=\mathbb{F}_2[U,Q]/(Q^2)$. Then $G(1)$ is a cycle in $CFKI^{\prime}(K)$. Suppose that there exists some $m\ge 0$ such that the homology class of $U^m G(1)$ is a multiple of $Q$. Then there exist a cycle $d\in CFK^{\prime}(S^3,K)$ and chains $e,f\in CFK^{\prime}(S^3,K)$ such that $$G(U^m )=U^m G(1)=Qd+\partial (e+Qf)=\partial e+Q(d+e+\iota_K(e)+\partial f).$$ Since $G(U^m )$ is of the form $F_{(-M,a)}(U^m )+Qc$ for some $c\in CFK^{\prime}(S^3,K)$, we must have $F_{(-M,a)}(U^m )=\partial e$, i.\,e.~ the homology class $[F_{(-M,a)}(U^m )]\in HFKI^{\prime}(K)$ vanishes. But this contradicts the fact that $U^{-1}F_{(-M,a)}$ is chain homotopic to identity. Hence we deduce that $U^m G(1)\notin \text{Im}(Q)$ for any $m\ge 0$, which implies that \[ \ubar{\upsilon}(K)\ge \mathbf{gr}_{\delta}(F_{(-M,a)}). \] Therefore we deduce that \[ \bar{\upsilon}(K)-\ubar{\upsilon}(K)\le -(\mathbf{gr}_\delta (F_{(-M,a)})+\mathbf{gr}_\delta (F_{(M,a)}))=1. \] \end{proof} We move on to prove an involutive bound on the nonorientable genus. For this we require the following lemma. \begin{lem}[{\cite[Proposition 6.6.2]{fan2019unoriented}}] Let $S_i =(\Sigma,a_i)$, $i=1,2,3$, be disoriented link cobordisms on the same underlying unoriented surface $\Sigma$. Suppose that $S_1,S_2,S_3$ are related by a \emph{bypass move}, which is defined as in Figure \ref{fig:bypassrelation}. Then we have $F_{S_1}+ F_{S_2}+F_{S_3} \sim 0$. \end{lem} \begin{figure}[htbp] \centering \includegraphics[width=0.7\textwidth]{bypassrelation.pdf} \caption{We say that three disoriented cobordisms are related by a \emph{bypass move} if they differ only inside a disk as drawn. See \cite[Definition 7.1.5]{fan2019unoriented} for more details.} \label{fig:bypassrelation} \end{figure} \begin{lem} \label{closedcomp} Let $S=(S,a)$ be a disoriented link cobordism from a disoriented link $L$ to the empty link. Suppose that $a$ contains a closed component $c$ which is \emph{two-sided}, i.\,e.~ admits an orientable neighborhood in $S$. Then $U\cdot F_S \sim 0$ and $U\cdot F_{\bar{S}}\sim 0$, where $\bar{S}$ is given by flipping $S$ upside-down. \end{lem} \begin{proof} Choose a disk $D$, smoothly embedded in the interior of $B^4$, which intersects $S$ transversely in its interior and satisfies $\partial D=c$. Choose a small neighborhood $N_D$ of $D$. By perturbing $a$, we may assume that $S_1 = (S\backslash N_D,a\backslash N_D)$ and $S_2 = (S\cap N_D,a\cap N_D)$ are disoriented cobordisms and $c\subset N_D$. Note that, since $S=S_2 \circ S_1$, we have $F_S = F_{S_2} \circ F_{S_1}$. Since $c$ is two-sided and the interior of $D$ intersects $S$ in finitely many points, $S\cap N_D$ is orientable. Thus, by Lemma 5.2 of \cite{juhasz2020concordance} and Remark \ref{oriented-equivalent}, we deduce that $U\cdot F_{S_2}\sim 0$. Therefore $U\cdot F_S = (U\cdot F_{S_2})\circ F_{S_1} \sim 0$. The proof for $\bar{S}$ is the same. \end{proof} Now, we can prove that the disoriented cobordism maps induced by surfaces of higher first Betti number homotopy-commute with $\tau_K$ up to multiplication by $U$. \begin{lem} \label{highergenuscomm} Let $\mathcal{S}=(S,a)$ be a disoriented cobordism from a disoriented knot $\mathcal{K}=(K,\mathbf{p},\mathbf{q},\mathbf{l})$ to the empty link, where $\mathbf{p}$ and $\mathbf{q}$ consist of a single point. Suppose that $S$ is a smoothly embedded nonorientable surface and $a$ is a simple arc. Then, for any choice of orientation on $K$, we have $U\cdot (F_{(S,a)} \circ \tau_K) \sim U \cdot F_{(S,-a)}$, where $-a$ denotes $a$ endowed with the reverse orientation. Also, if $\bar{S}$ denotes the cobordism from the empty link to $K$ given by flipping $S$ upside-down, then we have $U\cdot (\tau_K \circ F_{(\bar{S},a)}) \sim U\cdot F_{(\bar{S},-a)}$. \end{lem} \begin{proof} We will only provide a proof for $(S,a)$; the proof for $(\bar{S},a)$ is the same. We first assume that the first Betti number of $S$ is odd. Then we can consider $S$, as an abstract surface with boundary, as a connected sum of a M\"{o}bius band and a closed orientable surface, and $a$ as an arc on $S$ which is shown on the left in \Cref{fig:highergenus}. Choose an orientation on $K$ and denote by $C$ the disoriented cobordism from $\mathcal{K}$ to $(K,\mathbf{q},\mathbf{p},\mathbf{l})$ given by a half-twist along the given orientation on $K$; note that the cobordism map induced by $C$ is $\tau_K$. Then $\mathcal{S} \circ C$ is isotopic to the disoriented cobordism $\mathcal{S}^{\prime}=(S,b)$, where $b$ is the arc shown on the right in \Cref{fig:highergenus}. \begin{figure}[htbp] \centering \includegraphics[width=0.9\textwidth]{highergenusbypass.pdf} \caption{Left, the cobordism $\mathcal{S}$. Right, the cobordism $\mathcal{S}^{\prime}$. The region enclosed by the green dashed curve is $S_o$. The grey circles denote crosscaps, i.\,e.~ M\"{o}bius band attached along its boundary.} \label{fig:highergenus} \end{figure} The oriented arcs $-a$ and $b$ differ in an oriented subsurface $S_o$ of $S$. Denote the first Betti number of $S_o$ by $n$. Then one can consider a sequence of properly embedded (oriented) arcs $-a=a_0,a_1,\cdots,a_n=b$, as drawn in \Cref{fig:arcsinS0}, such that the following conditions are satisfied: \begin{itemize} \item $a_0,\cdots,a_n$ differ only in $S_o$, \item For each $i$, $S_o \backslash a_i$ consists of a surface $A_i$ of first Betti number $i$ and a surface $B_i$ of first Betti number $n-i$, where $A_i$ lies on the right of $a_i$, \item $A_0 \subset A_1 \subset \cdots \subset A_n$. \end{itemize} Note that, since $a_i$ is oriented and divides $S_o$ into two components, we have a well-defined notion of a component lying on the left side and the right side of $a_i$. Since we have \Cref{closedcomp} and a bypass relation for Fan's TQFT, we can directly apply the arguments used in the proof of \cite[Lemma 5.3 and Proposition 5.5]{juhasz2020concordance} to show that $U \cdot F_{(S,a_{i-1})} \sim U \cdot F_{(S,a_{i})}$ for all $i$. Hence we get $U\cdot (F_{\mathcal{S}} \circ \tau_K) \sim U \cdot F_{(S,-a)}$. We now consider the remaining case when the first Betti number of $S$ is even. Then, by \Cref{unknottedmobius}, we see that taking a connected sum of $\mathcal{S}$ with a unknotted $\mathbb{RP}^2$ with normal Euler number 2 gives a disoriented cobordism of odd first Betti number which has the same induced cobordism map as $\mathcal{S}$. This reduces the problem to the case of odd first Betti number, so we get $U\cdot (F_{\mathcal{S}} \circ \tau_K) \sim U \cdot F_{(S,-a)}$, as desired. \end{proof} \begin{figure}[htbp] \centering \includegraphics[width=0.5\textwidth]{arcsinS0.pdf} \caption{The arcs $a_0,a_1,\cdots,a_n$ on the orientable surface $S_o$.} \label{fig:arcsinS0} \end{figure} We are now able to prove \Cref{highergenusthm}. \begin{proof}[Proof of \Cref{highergenusthm}] Let $S$ be a smoothly embedded nonorientable surface of first Betti number $g$ in $B^4$ which bounds $K$. Suppose that $S$ consists of $M$ local maxima, $b$ (possibly nonorientable) saddles, and $m+1$ local minima. Then, by applying \cite[Proposition 5.4]{gong2020non} as in the proof of \Cref{mobiusthm}, there exists an orientable disoriented cobordism $T$ of first Betti number $1$, given as shown in Figure \ref{fig:cobordismT}, and a properly embedded oriented arc $a\subset S$, such that $S\backslash a$ is orientable and \[ U^M \cdot (F_T \circ F_{(-S,a)} \circ F_{(S,a)}) \sim U^{b-m+1} \cdot \mathbf{id}. \] Following the proof of \Cref{mobiusthm} tells us that $U^{-1}F_{(-S,a)}$ and $U^{-1}F_{(S,a)}$ are chain homotopic to the identity map, and if we denote the $\delta$-grading shifts of $F_{(-S,a)}$ and $F_{(S,a)}$ by $\mathbf{gr}_\delta (F_{(-S,a)})$ and $\mathbf{gr}_\delta (F_{(S,a)})$, then we have \[ \mathbf{gr}_\delta (F_{(-S,a)})+\mathbf{gr}_\delta (F_{(S,a)})=M+m-b=g. \] However, since $F_{(S,a)}$ and $F_{(-S,a)}$ may not homotopy-commute with $\iota_K$, they do not induce maps between $HFKI^{\prime}(K)$ and $HFKI^{\prime}(\text{unknot})=\mathbb{F}_2[U,Q]/(Q^2)$. Fortunately, from \Cref{conjugationcomm} and \Cref{highergenuscomm}, we see that \[ \begin{split} U\cdot (\iota_K \circ F_{(S,a)}) &\sim U\cdot F_{(S,a)}, \\ U\cdot (\iota_K \circ F_{(-S,a)}) &\sim U\cdot F_{(-S,a)}, \end{split} \] so $U\cdot F_{(S,a)}$ and $U\cdot F_{(-S,a)}$ induce maps between involutive homology \[ \begin{split} F\colon & HFKI^{\prime}(K)\rightarrow \mathbb{F}_2[U,Q]/(Q^2), \\ G\colon & \mathbb{F}_2[U,Q]/(Q^2) \rightarrow HFKI^{\prime}(K), \end{split} \] where the grading shifts of $F$ and $G$ are denoted by $\mathbf{gr}_\delta (F_{(S,a)})-1$ and $\mathbf{gr}_\delta (F_{(-S,a)})-1$, respectively. Now, following the proof of \Cref{mobiusthm} gives \[ \begin{split} \bar{\upsilon}(K) &\le 1-\mathbf{gr}_{\delta}(F_{(S,a)}), \\ \ubar{\upsilon}(K) &\ge \mathbf{gr}_{\delta}(F_{(-S,a)}) -1. \end{split} \] Furthermore, using the same argument for $\upsilon(K)$ implies \[ \mathbf{gr}_{\delta}(F_{(-S,a)}) \le \upsilon(K) \le -\mathbf{gr}_{\delta}(F_{(S,a)}). \] The theorem then follows directly from the above inequalities. \end{proof} We now focus on the case of $L$-space knots. The knot Floer homology of $L$-space knots is very simple: if $K$ is an $L$-space knot, then $CFK(S^3,K)$ is a staircase complex which is completely determined by the Alexander polynomial of $K$, as shown in \cite[Theorem 1.2]{ozsvath2005knot}. Recall that the Alexander polynomial of $K$ always takes the form \[ \Delta_K(t)=(-1)^m + \sum_{i=1}^{m} (-1)^{m-i}\left(t^{n_i}+t^{-n_i}\right) \] for some sequence of positive integers $0<n_1<\cdots <n_m =g(K)$. The chain complex $CFK(S^3,K)$ is chain homotopy equivalent to a free chain complex generated by elements $x_0,x^{1}_1,x^{2}_1,\cdots,x^{1}_m,x^{2}_m$. Here, $x_0$ lies on the bigrading $(0,0)$ and the bigradings of $x^{1}_{m-i}$ and $x^{1}_{m-i-1}$ differ by $(n_{m-i}-n_{m-i-1}-1,-1)$ if $i$ is even and $(-1,n_{m-i}-n_{m-i-1}-1)$ if $i$ is odd. Moreover, if $x^{1}_s$ lies on the bigrading $(i,j)$, then $x^{2}_s$ lies on the bigrading $(j,i)$. The differential on the staircase complex is given as in \cite[Figure 12]{hendricks2017involutive}. The action of $\iota_K$ on such a staircase complex is very easy to describe: we have $\iota_K(x_0)=x_0$, $\iota_K(x^{1}_s)=x^{2}_s$, and $\iota_K(x^{2}_s)=x^{1}_s$. In particular, we have $\iota_K^2 \sim \mathbf{id}$. See \cite[Section 7]{hendricks2017involutive} for more details. \begin{lem} \label{Lspaceknots} Let $K$ be an $L$-space knot. If the Alexander polynomial of $K$ is of the form $\Delta_K(t)= -1+\sum_{i=1}^{m} (-1)^{m-i}(t^{n_i}+t^{-n_i})$ for some sequence of positive integers $0<n_1<\cdots <n_m$, then \begin{align*} \bar{\upsilon}(K)=\upsilon(K) \ge \ubar{\upsilon}(K)+n_1. \end{align*} \end{lem} \begin{proof} The unoriented knot Floer chain complex of $L$-space knots can be written as a graded root, as described in \cite[Section 7]{gong2020non}. The involution $\iota_K$ then acts on the graded root as a reflection along the central axis, so we can consider $(CFK^{\prime}(S^3,K),\iota_K)$ as a symmetric graded root, which is defined in \cite[Definition 2.11]{dai2019involutive}. See Figure \ref{fig:symmetricgradedroot} for a pictorial description of a symmetric graded root induced by the action of $\iota_K$ on $CFK^{\prime}(S^3,K)$. \begin{figure}[htbp] \centering \includegraphics[width=0.5\textwidth]{symmetricgradedroot.pdf} \caption{Left, the symmetric graded root representing $CFK^{\prime}(S^3 ,T_{6,7})$. Right, the symmetric graded root representing $CFK^{\prime}(S^3,T_{5,6})$. Note that the action of $\iota_K$ is given by reflection along the central axis, given by the gray dashed line.} \label{fig:symmetricgradedroot} \end{figure} It is shown in \cite[Section 6]{dai2019involutive} that $\upsilon(K)$ can be read off from the given symmetric graded root as the grading of the highest leaf, and $\bar{\upsilon}(K)=\upsilon(K)$. Furthermore, $\ubar{\upsilon}(K)$ is the grading of the highest node which is left invariant by the action of $\iota_K$. Since the constant term of the Alexander polynomial of $K$ is $-1$, we have $\partial x_0 = U^{n_1}(x^1_1 + x^2_1)$ in $CFK^{\prime}(K)$, so $\ubar{\upsilon}(K)$ is represented by the cycle $U^{n_1} x^1_1 + Qx_0$ in $CFKI^{\prime}(K)$. Also, since $Qx_1$ is a cycle which satisfies \[ U^{n_1}\cdot Qx_1 = Q\cdot (U^{n_1} x^1_1 + Qx_0), \] we see that $U^{n_1}$ times the homology class of $Qx_1$ is contained in the image of $Q$ and cannot be annihilated by any powers of $U$. Therefore we get \[ \bar{\upsilon}(K)-\ubar{\upsilon}(K) \ge (\mathbf{gr}(Qx_1)+1)-\mathbf{gr}(U^{n_1} x^1_1 + Qx_0) = n_1.\qedhere \] \end{proof} We are finally ready to prove \Cref{thm:lowerbound}. \begin{proof}[Proof of \Cref{thm:lowerbound}] Since torus knots admit lens space surgeries \cite{moser}, and lens spaces are $L$-spaces \cite{ozsvath2005knot}, torus knots are $L$-space knots. The theorem follows directly from \Cref{mobiusthm}, \Cref{highergenusthm}, and \Cref{Lspaceknots}. \end{proof} \section{Asymptotically obstructing locally flat Möbius bands}\label{sec:asymp} In this section we prove \Cref{asymptotic} by studying the linking forms of double branched covers of torus knots. It is well-known that double branched cover over $T_{p,q}$ is the Brieskorn sphere $\Sigma_2(T_{p,q})=\Sigma(2,p,q)$. Some number theory and a result of \cite{Yasuhara} allow us to show that the linking form obstructs certain torus knots $T_{p,q}$---subject to restrictions on $p$ and $q$---from bounding locally flat M\"obius bands. A subsequent argument shows that the restrictions on $p$ and $q$ are appropriately generic. \subsection{The linking form of $\Sigma(2,p,q)$, where $p$ is even and $q$ is odd} We begin by computing the linking forms of the Brieskorn sphere $\Sigma(2,p,q)$, for any even $p$ and odd $q$ such that $\gcd(p,q)=1$. Recall that a linking form of a rational homology 3-sphere $M$ is a $\mathbb{Q}/\mathbb{Z}$-valued bilinear form: \[ H_1 (M;\mathbb{Z}) \times H_1 (M;\mathbb{Z}) \rightarrow \mathbb{Q}/\mathbb{Z}. \] To compute the linking form $\lambda_{\Sigma(2,p,q)}$ on $\Sigma(2,p,q)$, we start with a Goeritz matrix of $T_{p,q}$; recall that, in \cite[Section 3]{gordonlitherland}, it is shown that the linking form of the double cover of $S^3$ branched over a knot $K$ is presented by $-G^{-1} \text{mod } 1$, where $G$ is a Goeritz matrix of $K$. Consider the checkerboard surface $F$ for $T_{p,q}$, where $p$ is even, given in Figure \ref{fig:toruscheckerboard}. Note that $F$ is built from disks (0-handles) and bands (1-handles). Following \cite{gordonlitherland}, the Goeritz matrix $G$ of $T_{p,q}$ given by $F$ is the $\left(\frac{pq-2q+2}{2}\times\frac{pq-2q+2}{2}\right)$-matrix \[ G=\begin{pmatrix} q & -\mathbf{1}^h_q & 0 & 0 & \cdots & 0 & 0\\ -\mathbf{1}^v_q & A & -I_q & 0 & \cdots & 0 & 0\\ 0 & -I_q & A & -I_q & \ddots & 0 & 0\\ 0 & 0 & -I_q & A & \ddots & 0 & 0\\ \vdots & \vdots & \ddots & \ddots & \ddots & \vdots & \vdots \\ 0 & 0 & 0 & 0 & \cdots & A & -I_q \\ 0 & 0 & 0 & 0 & \cdots & -I_q & A \end{pmatrix}, \] where $I_q$ is the $q\times q$ identity matrix, $\mathbf{1}^h_q$ and $\mathbf{1}^v_q$ are the horizontal and vertical vectors of size $q$ whose entries are all $1$, respectively, and $A$ is the $(q\times q)$-matrix \[ A=\begin{pmatrix} 0 & 1 & 0 & \cdots & 0 & 0 & 1 \\ 1 & 0 & 1 & \cdots & 0 & 0 & 0 \\ 0 & 1 & 0 & \cdots & 0 & 0 & 0 \\ \vdots & \vdots & \vdots & \ddots &\vdots & \vdots & \vdots\\ 0 & 0 & 0 & \cdots & 0 & 1 & 0 \\ 0 & 0 & 0 & \cdots & 1 & 0 & 1 \\ 1 & 0 & 0 & \cdots & 0 & 1 & 0 \end{pmatrix}. \] \begin{figure}[htbp] \centering \includegraphics[width=0.7\textwidth]{toruscheckerboard.pdf} \caption{A checkerboard surface $F$ for the torus knot $T_{p,q}$, where $p$ is even.} \label{fig:toruscheckerboard} \end{figure} Topologically, $G$ can be viewed as a matrix for the intersection form of the double cover of $B^4$ branched over $F$, where we consider $F$ as a properly embedded surface by pushing its interior into $B^4$. Denote this 4-manifold by $X$. Then $\partial X =\Sigma(2,p,q)$ and $X$ is simply connected. Instead of computing the full inverse of $G$, we will focus on two entries of $G^{-1}$, namely the $\left(1,\frac{pq-2q+2}{2}\right)$-entry and $\left(\frac{pq-2q+2}{2},\frac{pq-2q+2}{2}\right)$-entry. It will turn out that these two entries are enough to recover the linking form. Note that $\det(G)=\det(T_{p,q})=\vert \Delta_{T_{p,q}}(-1)\vert =q$ if $p$ is even and $q$ is odd. Since all entries of $G$ are integers, we thus see that all entries of $G^{-1}$ are integer multiples of $\frac{1}{q}$. \begin{lem} \label{entry1} The $\left(1,\frac{pq-2q+2}{2}\right)$-entry of $G^{-1}$ is $\frac{1}{q}$. \end{lem} \begin{proof} Consider the horizontal vector \[ v= \left( \frac{p}{2}, \hspace{.2cm} \underbrace{\frac{p}{2}-1, \cdots, \frac{p}{2}-1}_{q}, \hspace{.2cm} \underbrace{\frac{p}{2}-2, \cdots, \frac{p}{2}-2}_{q}, \hspace{.2cm} \cdots\cdots \hspace{.2cm} \underbrace{2, \cdots, 2}_{q}, \hspace{.2cm} \underbrace{1, \cdots, 1}_{q} \right) \] of length $\frac{pq-2q+2}{2}$. We claim that $vG=(q,0,\cdots,0)$. Denote the $k$th entry of $vG$ by $(vG)_k$. When $k=1$, we have \[ (vG)_1 = \frac{p}{2}\cdot q + q\cdot \left(\frac{p}{2}-1\right)\cdot (-1) = q. \] When $2\le k\le q+1$, we have \[ (vG)_k = \frac{p}{2}\cdot (-1) + 2\cdot \left(\frac{p}{2}-1\right)\cdot 1 + \left(\frac{p}{2}-2\right)\cdot (-1)= 0. \] For $k\ge q+2$, it is easy to check that we also have $(vG)_k=0$. Thus $vG=(q,0,\ldots,0)$ and so $v$ is the top row of $qG^{-1}$. Therefore the $\left(1,\frac{pq-2q+2}{2}\right)$-entry of $G^{-1}$ is given by $\frac{1}{q}\cdot 1=\frac{1}{q}$. \end{proof} \begin{lem} \label{entry2} The $\left(\frac{pq-2q+2}{2},\frac{pq-2q+2}{2}\right)$-entry of $G^{-1}$ is of the form $\frac{m}{q}$, where $m$ is an integer satisfying $\frac{mp}{2} \equiv 1$ mod $q$. \end{lem} \begin{proof} Let $v=\left(v_0,v_1^1,\cdots,v_1^q,v_2^1,\cdots,v_2^q,\cdots,v_{\frac{p}{2}-1}^1,\cdots,v_{\frac{p}{2}-1}^q\right)$ be the $i$th row of the matrix $q G^{-1}$. For simplicity, our notation of $v_k^r$ here is chosen to be cyclic on $r$ mod $q$, i.\,e.~ $v_k^{r+q}=v_k^r$. Furthermore, we define $v_0^r=v_0$ for any $r$. We will show that for any fixed $k\in \{1, \dots, \frac{p}{2}-1\}$, the integers $v_k^1,\cdots,v_k^q$ are congruent mod $q$. Since $v$ is the $i$th row of $qG^{-1}$, $vG$ is of the form $qe_{i}$, where $e_i$ is the $i$th standard basis vector. Thus every entry of $vG$ is either $0$ or $q$. Hence the following conditions hold: \begin{itemize} \item For any indices $k$ and $r$ such that $0\le k \le \frac{p}{2}-3$, we have $v_{k+1}^{r}+v_{k+1}^{r+2}\equiv v_{k}^{r+1}+v_{k+2}^{r+1}$ mod $q$. \item For any index $r$, we have $v_{\frac{p}{2}-1}^{r}+v_{\frac{p}{2}-1}^{r+2}\equiv v_{\frac{p}{2}-2}^{r+1}$ mod $q$. \end{itemize} We claim that for any $r$ and $k$ with $0\le k\le \frac{p}{2}-1$, we have \[ v_{k}^{r}+v_{k}^{r+2}+\cdots+v_{k}^{r+p-2k} =v_{k-1}^{r+1}+v_{k-1}^{r+3}+\cdots+v_{k-1}^{r+p-2k-1} \mod q. \] Using the second condition above as the base case, inductively assume that \[ v_{k+1}^{r}+v_{k+1}^{r+2}+\cdots+v_{k+1}^{r+p-2k-2} \equiv v_{k}^{r+1}+v_{k}^{r+3}+\cdots+v_{k}^{r+p-2k-3} \mod q. \] If $\frac{p-2k}{2}$ is even, then by the first condition, the quantity \[ v_{k}^{r}+v_{k}^{r+2}+v_{k}^{r+4}+v_{k}^{r+6}+\cdots+v_{k}^{r+p-2k-2}+v_{k}^{r+p-2k} \] is equivalent modulo $q$ to \[ v_{k-1}^{r+1}+v_{k-1}^{r+5}+\cdots+v_{k-1}^{r+p+2k-7}+v_{k-1}^{r+p+2k-1} + v_{k+1}^{r+1}+v_{k+1}^{r+5}+\cdots+v_{k+1}^{r+p+2k-7}+v_{k+1}^{r+p+2k-1}. \] Applying the inductive hypothesis to the latter half of this expression, we see that this is equivalent modulo $q$ to \[ v_{k-1}^{r+1}+v_{k-1}^{r+5}+\cdots+v_{k-1}^{r+p+2k-7}+v_{k-1}^{r+p+2k-1}+v_k^{r+2}+v_k^{r+4}+\cdots +v_k^{r+p-2k-2}-v_{k+1}^{r+3}-v_{k+1}^{r+7}-\cdots-v_{k+1}^{r+p+2k-7}-v_{k+1}^{r+p+2k-1} \] Finally, applying the first condition to the terms $v_k^{r+2}+v_k^{r+4}+\cdots +v_k^{r+p-2k-2}$, the above expression is equivalent modulo $q$ to \[ v_{k-1}^{r+1}+v_{k-1}^{r+3}+\cdots +v_{k-1}^{r+p-2k-1}, \] as desired. On the other hand, if $\frac{p-2k}{2}$ is odd, then by the first condition, the quantity \[ v_{k}^{r}+v_{k}^{r+2}+v_{k}^{r+4}+v_{k}^{r+6}+\cdots+v_{k}^{r+p-2k-4}+v_{k}^{r+p-2k-4}+v_{k}^{r+p-2k} \] is equivalent modulo $q$ to \[ v_{k-1}^{r+1}+v_{k-1}^{r+5}+\cdots+v_{k-1}^{r+p+2k-7}+v_{k-1}^{r+p+2k-3} + v_{k+1}^{r+1}+v_{k+1}^{r+5}+\cdots+v_{k+1}^{r+p+2k-7}+v_{k+1}^{r+p+2k-3}+v_{k}^{r+p-2k}. \] Applying the inductive hypothesis to the latter half of the portion of the expression preceding $v_{k}^{r+p-2k}$, we see that this is equivalent modulo $q$ to \[ v_{k-1}^{r+1}+v_{k-1}^{r+5}+\cdots+v_{k-1}^{r+p+2k-7}+v_{k-1}^{r+p+2k-3}+v_k^{r+2}+v_k^{r+4}+\cdots +v_k^{r+p-2k}-v_{k+1}^{r+3}-v_{k+1}^{r+7}-\cdots-v_{k+1}^{r+p+2k-3} \] Finally, applying the first condition to the terms $v_k^{r+2}+v_k^{r+4}+\cdots +v_k^{r+p-2k}$, the above expression is equivalent modulo $q$ to \[ v_{k-1}^{r+1}+v_{k-1}^{r+3}+\cdots +v_{k-1}^{r+p-2k-1}, \] as desired. Taking $k=1$ gives: \[ v_{1}^{r}+v_{1}^{r+2}+\cdots+v_{1}^{r+p-2} = v_{0}^{r+1}+v_{0}^{r+3}+\cdots+v_{0}^{r+p-3} = \left(\frac{p}{2}-1\right) v_0\mod q. \] So, for any $r$, we have $v_{1}^{r}-v_{1}^{r+p}=(v_{1}^{r}+v_{1}^{r+2}+\cdots+v_{1}^{r+p-2})-(v_{1}^{r+2}+v_{1}^{r+4}+\cdots+v_{1}^{r+p})=0$ mod $q$, i.\,e.~ $v_{1}^{r}=v_{1}^{r+p}$ mod $q$. But since $q$ is relatively prime to $p$, there exists an integer $\alpha$ such that $\alpha p=1$ mod $q$, so we get $v_{1}^{r}=v_{1}^{r+\alpha p}=v_{1}^{r+1}$ mod $q$ for all $r$. Therefore we deduce that $v_{1}^{1}=\cdots=v_{1}^{q}$ mod $q$. It now follows by the first condition and induction on $k$, that for a fixed $k$, the integers $v_k^1,\ldots,v_k^q$ are congruent modulo $q$. We next claim that for all $k$ and $r$, $v_{k}^{r} \equiv \left(\frac{p}{2}-k\right)v_{\frac{p}{2}-1}^{q}$ mod $q$. We will prove this via induction and appealing to the fact that for all $k$, $v_k^1,\ldots,v_k^q$ are equivalent mod $q$. The claim is clearly true when $k=\frac{p}{2}-1$ and $k=\frac{p}{2}-2$. Assume inductively that the claim is true for all $j\ge k+1$. Then $$v_{k}^{r} \equiv v_{k+1}^{r-1}+v_{k+1}^{r+1}-v_{k+2}^r \equiv 2v_{k+1}^r-v_{k+2}^r\equiv 2\left(\frac{p}{2}-k-1\right)v_{\frac{p}{2}-1}^{q}-\left(\frac{p}{2}-k-2\right)v_{\frac{p}{2}-1}^{q}\equiv\left(\frac{p}{2}-k\right)v_{\frac{p}{2}-1}^{q}\mod q.$$ In particular, when $k=0$, we have that $v_0\equiv \frac{p}{2}v_{\frac{p}{2}-1}^q$ mod $q$. Thus, letting $v$ be the last row of $qG^{-1}$, we have $(qG^{-1})_{\frac{pq-2q+2}{2},1}\equiv\frac{p}{2}\cdot (qG^{-1})_{\frac{pq-2q+2}{2},\frac{pq-2q+2}{2}}$ mod $q$. Since $G^{-1}$ is symmetric, we have that $(qG^{-1})_{1,\frac{pq-2q+2}{2}}\equiv\frac{p}{2}\cdot (qG^{-1})_{\frac{pq-2q+2}{2},\frac{pq-2q+2}{2}}$ mod $q$. By \Cref{entry1}, the $(1,\frac{pq-2q+2}{2})$-entry of $G^{-1}$ is $\frac{1}{q}$. Therefore, $(qG^{-1})_{\frac{pq-2q+2}{2},1}=(qG^{-1})_{1,\frac{pq-2q+2}{2}}=1$ and so $\frac{p}{2}\cdot (qG^{-1})_{\frac{pq-2q+2}{2},\frac{pq-2q+2}{2}}\equiv 1$ mod $q$. Thus we now see that $(qG^{-1})_{\frac{pq-2q+2}{2},\frac{pq-2q+2}{2}}$ is congruent to the modular inverse of $\frac{p}{2}$ mod $q$, as desired. \end{proof} To calculate $\lambda_{\Sigma(2,p,q)}$ explicitly, we need to understand the domain on which the pairing is defined, namely $H_1 (\Sigma_2(T_{p,q});\mathbb{Z})$. It turns out that this group is always cyclic, so that $\lambda_{\Sigma(2,p,q)}$ is determined by a single rational number. \begin{lem} $H_1 (\Sigma_2 (T_{p,q});\mathbb{Z})\cong \mathbb{Z}/q\mathbb{Z}$. \label{lem:H1} \end{lem} \begin{proof} The Alexander module $A_{T_{p,q}}$ of $T_{p,q}$ is given by $\mathbb{Z}[t,t^{-1}]/(\Delta(t))$, where $\Delta(t)$ denotes the Alexander polynomial of $T_{p,q}$; this can be shown easily using Fox calculus. It is known that taking its quotient by the ideal generated by $t+1$ gives the first homology group $H_1$ of $\Sigma_2(T_{p,q})$; see \cite[Chapter 4]{stevens1996homology} for a general formula for $H_1$ of branched cyclic covers over knots. Therefore we get \[ H_1 (\Sigma(T_{p,q});\mathbb{Z})\simeq A_{T_{p,q}} /(t+1) \simeq \mathbb{Z}[t,t^{-1}]/(t+1,\Delta_{T_{p,q}}(t)) \simeq \mathbb{Z}/\Delta_{T_{p,q}}(-1)\mathbb{Z} \simeq \mathbb{Z}/\det(T_{p,q})\mathbb{Z}. \] Since $\det(T_{p,q})=q$, we deduce that $H_1 (\Sigma(T_{p,q});\mathbb{Z})\simeq \mathbb{Z}/q\mathbb{Z}$. \end{proof} Now we are ready to compute $\lambda_{\Sigma(2,p,q)}$. \begin{prop} \label{linkingform} For any relatively prime positive integers $p$ and $q$ with $p$ even, we have $\lambda_{\Sigma(2,p,q)}(x,x) \equiv - \frac{p}{2q}$ mod $1$ for some generator $x$ of $H_1(\Sigma(2,p,q);\mathbb{Z})$. \end{prop} \begin{proof} As above, let $X$ denote the double cover of $B^4$ branched over the surface $F$ after it is pushed into $B^4$. Then $\partial X=\Sigma(2,p,q)$ and $X$ is simply connected. Consequently, we have the following long exact sequence $$0\to H_2(X)\xrightarrow{G} H_2(X,\Sigma(2,p,q))\xrightarrow{f} H_1(\Sigma(2,p,q))\to 0.$$ Given $y\in H_1(\Sigma(2,p,q))$, to compute $\lambda_{\Sigma(2,p,q)}(y,y)$ using $G$, we must first lift $y$ to $H_2(X,\Sigma(2,p,q))$ via the map $f$. Note that we can view $H_1(\Sigma(2,p,q))$ as the cokernel of $G$ and $f$ as the quotient map. Since the $\left(1,\frac{pq-2q+2}{2}\right)$-entry of $G^{-1}$ is $\frac{1}{q}$, the element $(0,\dots,0,1)\in H_2 (X,\Sigma(2,p,q))$ is a lift of $1\in H_1 (\Sigma(2,p,q))\cong \mathbb{Z}/q\mathbb{Z}$. To see this, let $k$ be any integer satisfying $f(0,\dots,0,k)=0$. Then we have $(0,\dots,0,k)^T-Gv=0$ for some vector $v=(v_1,\dots,v_{\frac{pq-2q+2}{2}})^T$, where all $v_i$ are integers. But then $v=G^{-1} (0,\dots,0,k)^T$, so by comparing the first entries of both sides, we get $v_1=\frac{k}{q}$. Since $v_1\in\mathbb{Z}$, $k$ must be a multiple of $q$. Thus we see that $f(0,\dots,0,1)$ generates $H_1(\Sigma(2,p,q))$, as desired. Now, recall that the linking form $\lambda_{\Sigma(2,p,q)}$ is presented by $-G^{-1}$ mod $1$. Thus the value of $-\lambda_{\Sigma(2,p,q)}(1,1)=(0,\dots,0,1)G^{-1}(0,\dots,0,1)^T$ is given by the $\left(\frac{pq-2q+2}{2},\frac{pq-2q+2}{2}\right)$-entry of $G^{-1}$, which by \Cref{entry2} is given by $\frac{m}{q}$ where $m$ is some integer satisfying $\frac{mp}{2} \equiv 1$ mod $q$. So we get $\lambda_{\Sigma(2,p,q)}\left(\frac{p}{2},\frac{p}{2}\right)=-\frac{mp^2}{4q} \equiv -\frac{p}{2q}$ mod $1$. Since $q$ is relatively prime to $p$, $\frac{p}{2}\in H_1(\Sigma(2,p,q))$ is also a generator of $H_1(\Sigma(2,p,q))$. Therefore taking $x=\frac{p}{2}$ proves the lemma. \end{proof} \begin{rem} Feller and Golla proved in \cite{feller2020nonorientable} that the linking form of the Brieskorn sphere $\Sigma(2,2p,2pk\pm 1)$ represents $\mp\frac{p}{2pk+1}$ as a square. This is coherent with our general computation in \Cref{linkingform}. \end{rem} \subsection{Number Theory Interlude} Before we can prove \Cref{asymptotic}, we need some number theoretic results. \begin{lem} \label{numlem} Suppose that $p$ is even and $\frac{p}{2}$ is not a perfect square. There exists an integer $r$, relatively prime to $p$, such that for any prime $s$ satisfying $s\equiv r$ mod $2p$, the integers $\frac{p}{2}$ and $-\frac{p}{2}$ are not quadratic residues mod $s$. \end{lem} To prove this, we need the following lemma. \begin{lem}[{\cite[Lemma 1.14]{cox2011primes}}] \label{lem1} Let $n$ be an integer such that $n\equiv 0,1 \pmod 4$. Then there exists a unique group homomorphism \[ \chi_n \colon (\mathbb{Z}/n\mathbb{Z})^\times \rightarrow \{\pm 1\} \] such that $\left(\frac{n}{s}\right)=\chi_n (s)$ for all odd primes $s$ not dividing $n$. Here, $\left(\frac{n}{s}\right)$ denotes the Legendre symbol. Furthermore, we have \[ \chi_n (-1) = \begin{cases} 1 &\text{ if } n>0,\\ -1 &\text{ if } n<0. \end{cases} \] \end{lem} \begin{proof}[Proof of \Cref{numlem}] Since $\frac{p}{2}$ is not a perfect square, $2p$ is a multiple of $4$ which is not a perfect square. Using \Cref{lem1}, there is a unique nontrivial group homomorphism $\chi_{2p}\colon (\mathbb{Z}/2p\mathbb{Z})^\times \rightarrow \{\pm 1\}$ such that $\left(\frac{2p}{s}\right)=\chi_{2p} (s)$ for all odd primes $s$ not dividing $p$. It is a well-known fact (see, for example, \cite[Theorem 3 of Section 5.2]{ireland1990classical}) that for any non-square integer $n$, there exist infinitely many primes for which $n$ is a quadratic nonresidue; since $2p$ is not a perfect square, we see that $\chi_{2p}$ cannot be a trivial map. Hence the size of $\ker\left(\chi_{2p}\right)$ is exactly half of its domain $(\mathbb{Z}/2p\mathbb{Z})^\times$. We claim that there exists an element $r$ not contained in $\ker\left(\chi_{2p}\right)$ such that $r\equiv1 \pmod 4$. Suppose not. Then for each $s\notin \ker\left(\chi_{2p}\right)$, $s\equiv 3 \pmod 4$. Since half of the elements in $(\mathbb{Z}/2p\mathbb{Z})^\times$ are of the form $4n+3$ and the other half are of the form $4n+1$, we have that $\ker\chi_{2p}=\{s\in(\mathbb{Z}/2p\mathbb{Z})^{\times}\,|\,s\equiv 1\pmod{4}\}$. However, we have $\chi_{2p}(-1)=1$ since $2p>0$, while $-1 \equiv 3 \mod 4$. Hence, we have reached a contradiction and there must exist an element $r\notin\ker(\chi_{2p})$ such that $r\equiv1\pmod4$. Now, for any prime $s$ congruent to $r \mod 2p$, we have $-1=\chi_{2p}(r)=\left( \frac{2p}{s}\right)=\left(\frac{2}{s}\right)^2 \left(\frac{p/2}{s}\right) = \left(\frac{p/2}{s}\right)$. Moreover, since $s\equiv 1\pmod 4$, we have that $\left(\frac{-1}{s}\right)=1$ and, consequently, $\left(\frac{-p/2}{s}\right)=\left(\frac{-1}{s}\right)\left(\frac{p/2}{s}\right)=-1$. Therefore both $\frac{p}{2}$ and $-\frac{p}{2}$ are quadratic nonresidues modulo $s$. \end{proof} \subsection{Proof of \Cref{asymptotic}} Recall the following theorem of Murakami and Yasuhara, which is a direct corollary of their lower bound on $\gamma_4^{top}$ from \Cref{lem:linkingpairing}. \begin{thm}[{\cite[Corollary 2.7]{murakami2000four}}]\label{thm:murakami} If a knot $K$ in $S^3$ bounds a locally flat M{\" o}bius band in $B^4$, then the linking form $\lambda$ on $H_1 (\Sigma_2(K);\mathbb{Z})$ splits into a direct sum $(G_1 ,\lambda_1) \oplus (G_2 ,\lambda_2)$, where $\lambda_1$ is represented by the $(1 \times 1)$-matrix $\left(\pm \frac{1}{\vert G_1 \vert}\right)$ and $\lambda_2$ is metabolic. \end{thm} To state the next lemma, we introduce the following definition. \begin{defn} Let $n$ be a nonzero integer and let $p$ be a prime factor of $n$. Let $r$ be the maximal positive integer such that $p^r$ divides $n$. When $r$ is odd, we say that $p$ is an \emph{odd-power prime factor} of $n$. \end{defn} Now using \Cref{thm:murakami}, we can prove the following lemma. \begin{lem} \label{obstlem} Let $K$ be a knot in $S^3$ satisfying $H_1 (\Sigma_2(K);\mathbb{Z})\cong \mathbb{Z}/n\mathbb{Z}$ for some positive integer $n$. Write the linking form $\lambda$ of $\Sigma_2(K)$ as $\lambda(x,x)=\frac{m}{n}x^2 \mod 1$ for some integer $m$. Suppose that there exists an odd-power prime factor $s$ of $n$ such that $m$ and $-m$ are not quadratic residues mod $s$. Then $K$ does not bound a locally flat M{\" o}bius band in $B^4$. \end{lem} \begin{proof} Suppose that $K$ bounds a M{\" o}bius band. Then we have a splitting $$(H_1 (\Sigma_2(K);\mathbb{Z}),\lambda)=(G_1,\lambda_1)\oplus (G_2,\lambda_2),$$ where $\lambda_1$ is represented by a $(1 \times 1)$-matrix $\left(\pm \frac{1}{\vert G_1 \vert}\right)$ and $\lambda_2$ is metabolic. The order of $G_2$ is a perfect square, so if we write $G_1 =\mathbb{Z}/k\mathbb{Z}$ and $G_2 = \mathbb{Z}/\ell \mathbb{Z}$, then $\ell$ is a perfect square and $s$ divides $k$. Now let $1$ be a generator of $H_1 (\Sigma_2(K);\mathbb{Z})$. Then $G_1$ is generated by $\ell=\ell\cdot 1$. By our assumption on $\lambda_1$, there exists an integer $r$, relatively prime to $k$, such that $\lambda_1 (r\ell,r\ell)=\pm \frac{1}{k}$. But since $\lambda_1 (r\ell,r\ell)=\lambda(r\ell,r\ell)=\frac{m\ell r^2}{k}$ and $\ell$ is a perfect square, either $m$ or $-m$ must be a quadratic residue mod $k$. Since $s$ divides $k$, this implies that either $m$ or $-m$ is a quadratic residue mod $s$, a contradiction. \end{proof} \begin{exmp} Consider the torus knots $T_{4,q}$, where $q$ is odd. By \Cref{linkingform}, the linking form on $\Sigma_2(T_{4,q})$ is given by $\lambda(x,x)=-\frac{2}{q}\mod 1$ for some generator $x$ of $H_1(\Sigma_2(T_{4,q});\mathbb{Z})$. It is well-known that $\pm2$ are both quadratic nonresidues modulo $a$ if and only if $a\equiv 5\pmod 8$. Thus, in this case, the only possible value of $r$ in the statement of Lemma \ref{numlem} is $r=5$. Now by Lemma \ref{obstlem}, if $q$ has a odd-power prime factor $r\equiv 5\pmod 8$, then $T_{4,q}$ does not bound a locally flat M{\"o}bius band. \label{exmp:4q} \end{exmp} More generally, we can prove the following \begin{prop} \label{torusobstlem} Let $p,q>0$ be relatively prime integers, where $p$ is even. Suppose that $\frac{p}{2}$ is not a perfect square. Then there exists an integer $r$, relatively prime to $p$, such that $T_{p,q}$ does not bound a locally flat M{\" o}bius band in $B^4$ whenever $q$ admits an odd-power prime divisor congruent to $r$ mod $2p$. \end{prop} \begin{proof} By \Cref{numlem}, there exists an integer $r$, relatively prime to $p$, such that for any prime $s$ congruent to $r$ mod $2p$, $\frac{p}{2}$ and $-\frac{p}{2}$ are quadratic nonresidues mod $s$. The lemma then follows directly from \Cref{obstlem}. \end{proof} For the proof of \Cref{asymptotic}, we will use the following estimate. \begin{lem} \label{primelem} Let $P$ be a set consisting of primes, such that the infinite sum $\sum\limits_{s\in P} \frac{1}{s}$ diverges to $\infty$. Given a positive integer $N$, denote the set of positive integers $n$ less than $N$ whose odd-exponent prime factors are not contained in $P$ by $S_{P,N}$, and the set of positive integers $n$ less than $N$ which are relatively prime to $p$ as $T_{p,N}$. Then we have \[ \lim_{N\rightarrow\infty} \frac{\vert S_{P,N}\cap T_{p,N}\vert}{\vert T_{p,N} \vert} =0. \] \end{lem} \begin{proof} Without loss of generality, we can assume that $P$ does not contain any prime factors of $p$. Then, by the inclusion-exclusion principle, the given limit can be computed as the infinite product \[ \prod_{s\in P} \left(1-\frac{1}{s}+\frac{1}{s^2}-\frac{1}{s^3}+\cdots\right)=\prod_{s\in P} \frac{s}{s+1}. \] Taking logarithms gives \[ \log\left(\prod_{s\in P} \frac{s}{s+1}\right)=-\sum_{s\in P} (\log(s+1)-\log(s)) \le -\sum\limits_{s\in P} \frac{1}{s}=-\infty. \] Here, we used the fact that $\log(s+1)-\log(s)\ge \frac{1}{s}$ and $\sum\limits_{s\in P}\frac{1}{s}=\infty$. Therefore the limit given in the statement of the lemma converges to zero. \end{proof} Recall the following estimate on the sum of reciprocals of primes in arithmetic progressions, which is a well-known corollary of the prime number theorem. \begin{lem} \label{distlem} For any choice of positive integers $N$, $k$, and $\ell$, such that $\ell$ is relatively prime to $k$, there exists a constant $C_{k,\ell}$ which depends only on $k$ and $\ell$ such that \[ \sum_{\substack{s\le N,\,s\equiv \ell \pmod k,\\ s\text{ is prime}}} \frac{1}{s} = \frac{\log\log N}{\phi(k)} + C_{k,\ell} + O\left(\frac{1}{\log N}\right). \] \end{lem} We are finally ready to prove the desired asymptotics. \begin{proof}[Proof of \Cref{asymptotic}] By \Cref{torusobstlem}, there exists some $r$, relatively prime to $p$, such that $T_{p,q}$ does not bound a locally flat M{\" o}bius band in $B^4$ whenever $q$ admits an odd-power prime divisor congruent to $r$ mod $2p$. Moreover, by \Cref{distlem}, the sum of reciprocals of all primes congruent to $r$ mod $2p$ diverges to $\infty$. The theorem then follows from \Cref{primelem}. \end{proof} \bibliographystyle{amsalpha}
\section{Introduction} The symmetric group $S(\Omega)$ (for the arbitrary infinite set $\Omega$) is a "large" group, which means that it is difficult to study even particular cases. Thus, hardly anything is known about the generating sets of this group. George Bergman studied generating sets in some special cases (see lemmas 1-4 in \cite{1}) and made a few abstract conclusions about this group and its generating sets (see also Theorem 5 in \cite{1}). Manfred Droste studied classes of words and chains of subgroups in $S(\Omega)$ in his papers \cite{6, 7, 8}. Unfortunately, most of these results are too abstract to be applied to particular problems. \par The situation is different for the classification of simplier objects: for example, all normal subgroups $S(\Omega)$ have been classified (see \S 8 in \cite{2}). Also, the majority of results about the "classical" objects of the group theory have been delivered (see \cite{3} and \cite{4}). \par This paper considers the problem of generating certain infinite symmetric groups $S(\Omega)$ for the arbitrary infinite set $\Omega$. It is shown that in an infinite group of bijections some families of subsets, connected with the number of proper eigenspaces and their structure, are generating. We derived a criterion of generating for subsets of this kind, therefore solving a practical problem of generating in $S(\Omega)$ for families of subsets of this structure. \section{Definitions and established facts} In this paper we fix the infinite set $\Omega$, its group of bijection $S(\Omega)$ and its cardinality $|\Omega|$. For obvious reasons, $\Omega$ stands for the set and for its cardinality. Also, $I_n$ denotes a set of elements of order $n$ in $S(\Omega)$. \begin{definition} The subset $ U \subset \Omega$ is identified as {\it f-eigenspace } if $f(x) \in U$ for all $x\in U$. \end{definition} \begin{definition} Let $ M_f$ denote a set of all non-stable elements of $f \in S(\Omega)$. \end{definition} \begin{definition} Let $W_{\alpha, \beta} (\Omega)$ denote a set of all permutations $f \in S(\Omega)$, such that $ M_f$ can be expressed as a disjoint union of at most $\alpha$ $f$-eigenspaces, such that the cardinality of each eigenspace is less than (or equal to) $\beta$. \end{definition} \begin{definition} Let $K_{\alpha, \beta} (\Omega)$ denote a set of all permutations $f \in S(\Omega)$, such that $ M_f$ can be expressed as a disjoint union of $\alpha$ $f$-eigenspaces, such that the cardinality of each eigenspace is less than (or equal to) $\beta$. \end{definition} \begin{definition} Let $R_{\alpha, \beta} (\Omega)$ denote a set of all permutations $f \in S(\Omega)$, such that $ M_f$ can be expressed as a disjoint union of at most $\alpha$ $f$-eigenspaces, such that the cardinality of each eigenspace is equal to $\beta$. \end{definition} \begin{definition} Let $S_{\alpha, \beta} (\Omega)$ denote a set of all permutations $f \in S(\Omega)$, such that $ M_f$ can be expressed as a disjoint union of $\alpha$ $f$-eigenspaces, such that the cardinality of each eigenspace is equal to $\beta$. \end{definition} \begin{theorem}[\cite{1}, Theorem 5] Let $\Omega$ be an infinite set, and consider a chain of subgroups $\{ G_i\}_{i \in I} \leq S(\Omega)$. If $|I| \leq |\Omega|$ and $\bigcup_{i \in I} G_i = S(\Omega)$, then there exists such an index $i$ that $G_j = S(\Omega)$ for any $j\geq i $. \end{theorem} \begin{theorem}[Schreier-Ulam, see \cite{2}] For any normal subgroup $H \leq S(\Omega)$ there exists such a cardinal $\alpha$, such that $H = S_\alpha(\Omega)=\{f\in S(\Omega) \mid |M_f| \leq\alpha \leq \Omega\}$. \end{theorem} \section{Study of $W_{\alpha, \beta} (\Omega)$} The goal of studying minimality for generating sets cannot be reached because of this almost trivial result: \begin{theorem} There is no minimal generating subset for $S(\Omega)$. \end{theorem} \begin{proof} Suppose the contrary: there exists such a set $S$ which is at least countable. Then there exists a countable subset $A=\{a_1, a_2, a_3, \dots\}$, so we can take $S_0= S \setminus A, S_1=S_0\cup \{a_1\}$ and define $S_n := S_{n-1}\cup\{a_n\}$. \par Now we can notice that $\langle S_0\rangle \subseteq \langle S_1\rangle \subseteq \langle S_2\rangle \subseteq\dots\subseteq S(\Omega)$, and any set from this chain is not equal to the group. But $\bigcup\limits_{i=0}^{\infty} S_i=S(\Omega)$, which contradicts the previous Theorem. Hence there is no minimal generating subset for $S(\Omega)$. \end{proof} Nonetheless, one can study almost arbitrary constructions, linked with the orbits of acting $S(\Omega)$ on $\Omega$. Let us describe the "largest" case $W_{\alpha, \beta} (\Omega)$. \begin{theorem} For any cardinals $\alpha, \beta$, if $\alpha \cdot \beta < \Omega$, then $W_{\alpha, \beta} (\Omega)$ is not generating for $S(\Omega)$. \end{theorem} \begin{proof} Fix $\alpha, \beta$ --- arbitrary cardinals, smaller than $\Omega$. Without loss of generality we can assume that $\alpha > \beta$. Fix the permutation $f\in W_{\alpha, \beta}(\Omega)$. $M_f$ could be obtained as a union of less than $\alpha$ $f$-eigenspaces, such that the cardinality of each eigenspace is smaller than $\beta$. Also, the cardinality of $M_f$ is less than $\alpha\cdot\beta=\alpha$, hence $f\in S_{\alpha}(\Omega)$. So $W_{\alpha, \beta}(\Omega)\subseteq S_{\alpha}(\Omega)$, which is not a generating set, because $\alpha<\Omega$. \end{proof} \begin{lemma} $W_{\Omega, \alpha}(\Omega)$ is a subset of $W_{\Omega, \beta}(\Omega)$ for any cardinals $\alpha < \beta < \Omega$. \end{lemma} \begin{proof} Fix $\alpha<\beta$ and $f\in W_{\Omega, \alpha}(\Omega)$. The cardinality of any $f$-eigenspace is not greater than $\alpha$, so it is not greater than $\beta$. Hense $f\in W_{\Omega, \beta}(\Omega)$. \end{proof} \begin{lemma} $W_{\beta, \Omega} (\Omega) \subseteq W_{\alpha, \Omega}(\Omega)$ for any cardinals $\alpha < \beta$. \end{lemma} \begin{proof} Fix $\alpha < \beta$ and $f\in W_{\beta, \Omega}(\Omega)$. Obviously, $M_f=\bigcup\limits_{\leq \beta} V_f$, where $V_f$ are $f$-eigenspaces, such that the cardinality of each eigenspace is not greater than $\Omega$. Since $V = \bigcup\limits_{\leq \beta} V_f$ is an $f$-eigenspace itself, $f\in W_{\alpha, \Omega}(\Omega)$, because $1 \leq \alpha$ and $|V| < \Omega$. \end{proof} \begin{theorem}[Criterion for generating sets for $W_{\alpha,\beta} (\Omega)$] Set $W_{\alpha,\beta} (\Omega)$ is generating for $S(\Omega)$ iff at least one of the cardinals $\alpha, \beta$ is equal to $\Omega$. \end{theorem} \begin{proof} In order to prove the first statement, let $W_{\alpha, \beta}(\Omega)$ generate $S(\Omega)$ and let us assume that $\alpha<\Omega$ and $\beta<\Omega$. So by theorem 4 $|S(\Omega)| = |W_{\alpha, \beta} (\Omega)| < |S(\Omega)|$, which contradicts our assumption.\par On the other hand, let $\alpha=\Omega$ or $\beta=\Omega$. Then, following Lemmas 1 and 2, $I_2 = W_{\Omega, 2} \subseteq W_{\alpha, \beta}$, and, as we show in Theorem 8, $I_2$ is a generating set. So $$S(\Omega) = \langle I_2 \rangle \subseteq \langle W_{\alpha, \beta}(\Omega) \rangle \subseteq S(\Omega),$$ and any of $W_{\alpha,\beta} (\Omega)$ is generating. \end{proof} \section{Study of $S_{\alpha, \beta} (\Omega)$} Let us develop the case of the smallest of such sets, as described in chapter 1. \begin{lemma} $S_{\beta, \Omega} (\Omega) \subseteq S_{\alpha, \Omega}(\Omega)$ for any cardinals $\alpha < \beta$. \end{lemma} \begin{proof} Let $\alpha < \beta$ be cardinals and fix $f\in S_{\beta, \Omega}(\Omega)$. It is easy to see that $M_f=\bigcup\limits_{\beta} V_f$, where $V_f$ are $f$-eigenspaces with the cardinality equal to $\Omega$. Because $\alpha<\beta$, there exists $\gamma < \Omega$, such that $\beta=\alpha+\sum\limits_{\gamma} \alpha$. So $M_f$ could be obtained as $(\bigcup\limits_{\alpha} V_f) \cup (\bigcup\limits_{\sum\limits_{\gamma}\alpha} V_f)$, i. e. as a union of $\alpha$ $f-$eigenspaces, and since $| \bigcup\limits_{\sum\limits_{\gamma}\alpha} V_f | = \sum \limits_{\gamma} \alpha \Omega = \Omega, $ it follows that $f\in S_{\alpha, \Omega}(\Omega)$. \end{proof} \begin{lemma} $S_{\Omega, \alpha}(\Omega)\subseteq S_{\Omega, \beta}(\Omega)$ for any infinite cardinals $\alpha < \beta$. \end{lemma} \begin{proof} Fix $\alpha<\beta$ and $f\in S_{\Omega, \alpha}(\Omega)$. Obviously $M_f=\bigcup\limits_{\Omega} V_f$, where $V_f$ are $f$-eigenspaces, such that the cardinality of each eigenspace is equal to $\alpha$. Observe that $\Omega$ could be obtained as $\alpha \cdot \beta \cdot \Omega$, so $M_f=\bigcup\limits_{\Omega}(\bigcup\limits_{\beta} V_f)$, where the cardinality of any $V_f$ is equal to $\alpha$ and $\bigcup\limits_{\beta} V_f$ is an $f$-eigenspace, whose cardinality is equal to $\beta$. Hence, $f\in S_{\Omega, \beta}(\Omega)$ by definition. \end{proof} \begin{theorem} $\langle I_n \rangle \subseteq \langle S_{\Omega, n}(\Omega) \rangle$ for any $n \geq 2$. \end{theorem} \begin{proof} It is sufficient to prove that any permutation of order $n$ could be obtained as a finite composition of permutations from $S_{\Omega, n}(\Omega)$. \par Fix $n\in\mathbb{N}$ and $f\in I_n$. Consider two cases: when $|M_f|=\Omega$ and when $|M_f|<\Omega$.\par The first case is obvious by definition (because $M_f$ could be obtained as $\Omega$ $f-$eigenspaces, such that the cardinality of each eigenspace is equal to $n$).\par In the second case we can take such $g_1\in S_{\Omega, n}$, that $g_{1_{|_{M_f}}}=f$. Observe that $|M_{g_1}\setminus M_f|=\Omega$, because $|M_f|<\Omega$, so $M_{g_1}\setminus M_f$ could be obtained as a disjoint union of $f$-eigenspaces, such that the cardinality of each eigenspace is equal to $n$. One can construct a function $g_2$, such that $g_{2_{|_{M_{g_1}}\setminus M_f}}=g_1^{-1}$ and $g_{2_{|_{M_f}}}= id_{\Omega}$. It is obvious that $g_2$ also lies in $S_{\Omega, n}(\Omega)$, so the composition of $g_1$ and $g_2$ equals to $f$ and $f\in \langle S_{\Omega, n} (\Omega) \rangle$. \end{proof} \begin{lemma} $S_{\Omega, 2}(\Omega) \subseteq S_{\Omega, \alpha}(\Omega)$ for any infinite cardinal $\alpha$. \end{lemma} \begin{proof} Let $f\in S_{\Omega, 2}(\Omega)$, so $M_f=\bigcup\limits_{\Omega} V_f$, where $V_f$ are $f$-eigenspaces, such that the cardinality of each eigenspace is equal to $2$. $\Omega$ could be obtained as $\Omega \cdot (\alpha \cdot 2)$, because $2< \alpha< \Omega$. Then $M_f=\bigcup\limits_{\Omega}(\bigcup\limits_{\alpha} V_f)$, where the cardinality of any $V_f$ is equal to $2$ and $\bigcup\limits_{\alpha} V_f$ is an $f$-eigenspace, such that the cardinality of each eigenspace is equal to $\alpha$. Hence, $f\in S_{\Omega, \alpha}(\Omega)$. \end{proof} \begin{theorem}[Criterion for generating sets for $S_{\alpha,\beta} (\Omega)$] Set $S_{\alpha,\beta} (\Omega)$ is generating for $S(\Omega)$ iff at least one of the cardinals $\alpha, \beta$ is equal to $\Omega$. \end{theorem} \begin{proof} The first item follows from Theorem 4, because if $a \cdot \beta < \Omega$ then $S_{\alpha, \beta} (\Omega) $ can't be a generating set.\par Following Lemma 5 and Theorem 6, $\langle I_2 \rangle \subseteq \langle S_{\Omega, 2}(\Omega) \rangle \subseteq \langle S_{\Omega, \beta}(\Omega) \rangle$ for any infinite cardinal $\beta$, and, as we show in Theorem 8, $I_2$ is a generating set. Then, for any infinite $\beta$ $S_{\Omega, \beta} (\Omega)$ is a generating set. So, by Lemma 4, $S_{\alpha, \Omega}(\Omega)$ will be generating for any cardinal $\alpha$, because $S_{\Omega, \Omega}(\Omega) \subseteq S_{\alpha, \Omega}(\Omega)$. \par Finally, if $\beta$ is a natural number, by Theorem 6, $\langle I_{\beta} \rangle \subseteq \langle S_{\Omega, \beta}(\Omega) \rangle$ and, as we show in Theorem 8, $I_{\beta}$ is a generating set. \end{proof} \section{The main result} \begin{theorem} $\langle I_n \rangle = S(\Omega)$ for any $n\in\mathbb{N}$. \end{theorem} \begin{proof} It is easy to see that the normal closure of $I_n$ coincides with the subgroup, generated by $I_n$: $$\bar{I}_n = \langle I_n^{S(\Omega)} \rangle = \langle \{gsg^{-1} \mid s \in I_n\} \rangle = \langle I_n \rangle.$$ Assume $\langle I_n \rangle < S(\Omega)$. So, by Schrier-Ulam Theorem, there exists such a cardinal $\alpha <\Omega$, that $\langle I_n\rangle = S_{\alpha}(\Omega)$, but it contradicts the fact that there exists such a permutation $f\in I_n$, that $M_f=\Omega$, which is impossible by definition. \end{proof} \begin{theorem} The following statements hold: \begin{enumerate} \item $W_{\alpha,\beta} (\Omega), R_{\alpha,\beta} (\Omega), K_{\alpha,\beta} (\Omega), S_{\alpha,\beta} (\Omega)$ are not generating sets for any $\alpha\cdot \beta < \Omega$. \item $W_{\alpha,\Omega} (\Omega), R_{\alpha,\Omega} (\Omega), K_{\alpha,\Omega} (\Omega), S_{\alpha,\Omega} (\Omega)$ are generating sets for any $\alpha \leq \Omega$. \item $W_{\Omega,\beta} (\Omega), R_{\Omega,\beta} (\Omega), K_{\Omega,\beta} (\Omega), S_{\Omega,\beta} (\Omega)$ are generating sets for any $\beta \leq \Omega$. \end{enumerate} \end{theorem} \begin{proof} Fix $\alpha, \beta$. Observe that by definition $$S_{\alpha, \beta}(\Omega) \subseteq K_{\alpha, \beta}(\Omega) \subseteq W_{\alpha, \beta}(\Omega) \text{ and } S_{\alpha, \beta}(\Omega) \subseteq R_{\alpha, \beta}(\Omega) \subseteq W_{\alpha, \beta}(\Omega).$$ Then the first case follows from Theorem 4 and the second and the third cases follow from Theorem 7. \end{proof} \section{Partial case of $\Omega = \mathbb{Z}$} The case of a countable set is especially interesting, because here we can deal with permutations which act on $\Omega$ as {\it cycles}. It is, obviously, stronger than our previous definition and this case requires another study. We consider orbits (cycles) $\mathcal{O}_f(x) = \{f^k (x) \mid k \in \mathbb{Z}\}$, so we obtain three such sets: \begin{enumerate} \item A set of all local finite permutations $LF = \{ f \in S(\Omega) \mid \text{for all } x \in \Omega \text{ cycle } \mathcal{O}_f(x) \text{ is finite}\}$. As an example one could take a permutation $..(12)(34)(56)..$ \item A set of all ringed permutations $R = \{f \in S(\Omega) \mid \text{the set of all the orbits for } f \text{ is finite} \}$. As an example one could take a permutation $f(n) = n+1$. \item A set of all wild permutations $W = \{f \in S(\Omega) \mid \text{There exists infinitely many countable cycles } \mathcal{O}_f(x)\}$. In order to take this permutation one could view $\mathbb{Z}$ as an infinite union of a countable set. \end{enumerate} \begin{lemma} $R\subseteq \langle LF \rangle$. \end{lemma} \begin{proof} It suffices to prove that we can obtain an infinite cycle by the composition of local finite functions, so without loss of generality we can assume that $f \in R$ consists of only one infinite cycle, so $$f=(\dots f^{-2}(x_0), f^{-1}(x_0), x_0, f(x_0), f^2(x_0), \dots)$$ Consider two local finite functions $f_1,f_2:\Omega \longrightarrow \Omega$, such that $$f_1(f^n(x_0))=f^{-n-1}(x_0) \text{ and } f_2(f^n(x_0))=f^{-n}(x_0) \text{ for an integer }n,$$ and let us define them as identities on the complement of this cycle. \par In order to prove the statement, we need to show that $f^n(x_0)$ goes to $f^{n+1}(x_0)$ by $f_1f_2$ for all $n \in \mathbb{Z}$. But it is easy to see that $$f_2(f_1(f^n(x_0)))=f_2(f^{-n-1}(x_0))=f^{n+1}(x_0).$$ Hence, $f = f_1f_2 \in \langle LF \rangle$. \end{proof} \begin{lemma} $I_2\subseteq \langle R \rangle$. \end{lemma} \begin{proof} Fix $f\in I_2$ and consider two cases: when $f$ is equal to a union of infinitely many transpositions and when $f$ is equal to a union of finitely many transpositions.\par In the first case $f$ can be represented by: $$f=(x_1^1, x_1^2)(x_2^1, x_2^2)(x_3^1, x_3^2)(x_4^1, x_4^2)\dots$$ We can assume that $f$ does not contain a cycle of order 1: otherwise one can add a set of all the fixed elements of $f$ as a cycle to $g_1$ (this function will be described later), and add an inversed cycle to $g_2$. Let us now define two ringed functions $g_1, g_2$: $$g_1=(\dots x_4^2, x_3^1, x_2^2, x_1^1, x_2^1, x_1^2, x_4^1, x_3^2, \dots),$$ $$g_2=(\dots x_3^2, x_4^2, x_1^2, x_2^2, x_1^1,x_2^1, x_3^1, x_4^1, \dots).$$ One can check that $g_1g_2=f$ by straightforward calculations.\par In order to obtain $f$ in the second case we only need to construct such a function $g_1$ which consists of an infinite number of transpositions, such that the set of orbits of $f$ lies in the set of orbits of $g_1$, and also we need to construct a function $g_2$, such that $M_{g_1}\setminus M_{g_2}=M_f$ and $M_{g_2}\bigcup M_f=M_{g_1}$. Obviously, the composition $g_1g_2$ is equal to $f$, hence $f$ could be obtained as a finite composition of ringed functions. \end{proof} \begin{lemma} $LF\subseteq \langle W\rangle$. \end{lemma} \begin{proof} Fix $f\in LF$, and let $f$ be not finite. We need to prove that $f\in\langle W\rangle$.\par Consider two cases: when $\Omega \setminus M_f$ is finite and when $\Omega \setminus M_f$ is infinite. In the first case $f$ could be obtained as a composition of four wild permutations. In order to prove it, we only need to understand how we could obtain a finite cycle $(x_1, x_2, \dots , x_n)$. Let us take two infinite cycles: the cycle $$(\dots a_{-1}, a_0,, x_1, x_2, \dots, x_n, a_1, a_2, \dots)$$ and the cycle $$(\dots, a_2, a_1, x_n, a_0, a_{-1}, \dots),$$ where $a_i$ are some elements out of the cycle, and it is obvious that the number of such elements is infinite. Let us count the cycles of $f$, whose length is greater than $2$ by integers (we can do it anyway, because all of the orbits are finite, so the number of cycles is infinite, and the number of cycles with a cardinality greater than 2 is also infinite, because $f$ is not finite). One needs to construct functions $g_1, g_2$ by such rule: let us view a set of all elements from even cycles (it is, obviously, an infinite set) as a disjoint infinite union of infinite subsets. For any odd cycle $(x_1, x_2, \dots , x_n)$ we fix only one of these (infinite) sets and take $a_i$-s from this set. Functions $g_1$ and $g_2$ consist of cycles $(\dots a_{-1}, a_0,, x_1, x_2, \dots, x_n, a_1, a_2, \dots)$ and $(\dots, a_2, a_1, x_n, a_0, a_{-1}, \dots)$ accordingly. So we "eliminated" all odd cycles.\\ Then one needs to construct functions $h_1, h_2$, by the same rule: we need to "eliminate" all even cycles, using elements from odd cycles as $a_i$-s. All such functions are wild, because they consist of infinitely many cycles (one cycle for one orbit, and the number of orbits is infinite), and all such cycles are countable by construction. So $h_i \in W$ and $g_i \in W$ and $$f = h_1h_2 g_1 g_2.$$ In the second case one can obtain $f$ by the composition of two wild functions: because $\Omega \setminus M_f$ is infinite, we could take $a_i$-s from this set.\par Finally, in the exceptional case, when $f$ is finite, this algorithm gives us only ringed functions (because there are only finitely many cycles of length greater than 2). But one can easily make wild functions from them: we only need to add infinitely many cycles from the elements of $\Omega \setminus M_f$ to $g_1$ and all the cycles inverse to them to $g_2$. \end{proof} \begin{theorem} Let $\Omega$ be a countable set. Then any of the sets $LF$, $R$ and $W$ is a generating set for $S(\Omega)$. \end{theorem} \begin{proof} As we know from the previous Lemmas, $\langle I_2 \rangle \subseteq \langle R \rangle \subseteq \langle LF \rangle \subseteq \langle W \rangle \subseteq S(\Omega)$, and $\langle I_2 \rangle = S(\Omega)$ by Theorem 8, whence the result follows. \end{proof}
\subsection*{#1 #2} \addcontentsline{toc}{subsection}{#1 #2} \def\@currentlabel{#1}% \label{#3}% } \makeatother \journal{Acta Astronautica} \begin{document} \begin{frontmatter} \title{Autonomous orbit determination for satellite formations using relative sensing: observability analysis and optimization\tnoteref{mytitlenote} \author[mymainaddress]{Pedro Rocha Cachim\corref{mycorrespondingauthor}} \fnref{myfootnote} \ead{<EMAIL>} \author[mymainaddress]{João Gomes\corref{mycorrespondingauthortwo}} \ead{<EMAIL>} \author[mymainaddress]{Rodrigo Ventura\corref{mycorrespondingauthorthird}} \ead{<EMAIL>} \address[mymainaddress]{Institute for Systems and Robotics, Instituto Superior Técnico, Av. Rovisco Pais 1, 1049-001 Lisbon, Portugal} \fntext[myfootnote]{Corresponding author.} \begin{abstract} Orbit determination of spacecraft in orbit has been mostly dependent on either GNSS satellite signals or ground station telemetry. Both methods present their limitations, however: GNSS signals can only be used effectively in earth orbit, and ground-based orbit determination presents an inherent latency that increases with the Earth-spacecraft distance. For spacecraft flying formations, an alternative method of orbit determination, independent of external signals, consists in the observation of the spacecraft's position with respect to the central body through the relative positioning history of the spacecraft within the formation. In this paper, the potential of the relative positioning method is demonstrated in the context of the SunRISE mission, and compared with the mission's previously proposed orbit determination methods. An optimization study is then made to find the optimal placement of a new spacecraft in the formation so as to maximize the positioning accuracy of the system. Finally, the possibility of removing part of the system's relative bearing measurements while maintaing its observability is also studied. The resulting system is found to be observable, but ill-conditioned. \end{abstract} \begin{keyword} Spacecraft formation flying \sep relative positioning \sep trajectory optimization \sep observability study \end{keyword} \end{frontmatter} \section{Introduction} Ever since the launch of the first space exploration mission, much effort has been directed towards the goal of lowering the cost of these missions. One of the concepts developed with this purpose in mind was that of spacecraft formation flying~\cite{fraser2019adaptive}. The fractioning of a single large satellite's payload and operational functions into several smaller elements should not only lead to a reduction in cost, but also to a more reliable mission design, since failure of one spacecraft would not necessarily imply the collapse of the system~\cite{liu2018survey}. Spacecraft FF (Formation Flying) may also allow for otherwise impractical mission concepts with a single spacecraft to become more achievable~\cite{nag2016effect}. This is particularly the case for applications requiring wide and precise baseline separations such as interferometry and gravimetry~\cite{fraser2019adaptive}. The design of spacecraft FF mission's GNC (guidance, navigation and control) systems is particularly challenging. Most navigation solutions employed by FF missions have relied on GNSS receivers. Even the MMS mission, in which the formation reached orbital apogees as far as 25 Earth radii, ultimately used GNSS receivers tuned for receiving low strength GNSS signals in order to perform orbit determination at higher altitudes~\cite{winternitz2016gps}. For deep space missions, the design of orbit determination systems typically relies on ground station telemetry~\cite{montenbruck2002satellite}. However, the inherent latency of ground station signals for such missions does not allow for knowledge of the real-time state. Without the presence of a navigation constellation in orbit of the central body, overcoming this challenge requires the development of autonomous, real-time navigation methods~\cite{dutta2014statistical}. One such method proposed for FF missions is based solely on relative positioning. As demonstrated by Markley, knowledge of the time history of the relative positions of spacecraft in orbit in an inertially aligned frame may allow for the determination of the absolute position of the spacecraft with respect to the central body~\cite{markley1987autonomous}. This method has aroused much interest due to its potential for real-time autonomous navigation, independent of any external telemetry. In his research, Markley concluded that the system would only be unobservable if the two spacecraft have equal altitude time histories, and are neither coplanar nor oriented such that they cross the line of intersection of the two orbital planes simultaneously. Further studies have been done on the observability of this system For example, Psiaki studied the use of this method to autonomously determine the position of the two spacecraft while also estimating gravity model parameters of the celestial body around which the spacecraft orbit~\cite{psiaki2011absolute}. The use of this method has also been proposed as a solution to increase the autonomy of GNSS satellite ephemeris error update from ground infrastructure~\citep{yu2019autonomous}. Within the topic of absolute positioning through relative positioning measurements, the question of which orbital configuration will optimize the accuracy of the system has already been addressed in the literature. Psiaki made observations on how the orbital parameters affect the observability/performance of the system of a two-element system~\cite{psiaki1999autonomous}. Ou also studied the impact of the formation's absolute orbital elements on the observability within a two-element formation \cite{ou2016autonomous}. Subsequent studies by Ou focused on designing an autonomous navigation scheme for Mars exploration with optimized performance indexes based on the observability matrix or in the Fisher Information Theory~\cite{ou2018observability,ou2018absolute}. In \cite{li2019obs}, Li contributes to the development of the link between observability analysis and navigation performance by proposing observability-based modified versions of nonlinear estimators applied to this problem. In order for two spacecraft to directly observe their relative position, range and LOS (Line-Of-Sight) vector measurements need to be combined. Studies have also been done on the observability of a system with either ranging-only \cite{hill2007autonomous} or LOS vector-only \cite{yim2004autonomous}. According to Yim's work \cite{yim2004autonomous}, relative LOS vector measurements with inertial attitude information allow for the system to be fully observable, even without perturbations from the Earth's oblateness effect on its gravity field. The only unobservable scenarios take place when the two spacecraft are in the same orbiting plane with no inclination. Increasing the complexity of the gravity field of the central body or the overall inclination of the formation may improve the system's observability. More recent studies have further analysed the observability of the system under a variable number of spacecraft, orbital configurations and dynamic models~\cite{hu2020autonomous, hu2021distributed}. Hill found that ranging measurements in the two-body problem may at best observe the shape, phase and relative orientation of the orbits of the two spacecraft, but not the absolute orientation with respect to the inertial frame of reference, due to the spherical symmetry of the two-body problem's gravity field model \cite{hill2007autonomous}. When more complex and asymmetrical gravity fields are considered, the problem may become observable~\cite{hill2007autonomous, hill2008autonomous}. This system may also be rendered observable when considering three-body problem dynamics, with one of the spacecraft placed in the Lagrange points 1 or 2. This navigation concept for the Earth-Moon system is known as LiAISON~, and has been discussed as an autonomous navigation solution for vehicles on the far side of the lunar surface~\cite{hill2006linked, wang2019liaison}. Some research has also been done on the potential of ranging-only autonomous navigation for GNSS satellite ephemeris corrections, concluding that, although the inclusion of perturbation dynamic models such as third-body gravity and solar radiation pressure may allow for full observability of the system, its accuracy is very dependent on the perturbation dynamic model error~\cite{li2020observability}. This paper seeks to contribute to the research effort towards the autonomous orbit determination through relative sensing methods. Due to the sparseness of deep-space flying formation concepts where its use would be most beneficial, the near-GEO SunRISE mission concept was chosen as a case study~\citep{alibay2017sun}. The following three topics of discussion were set for this study: \begin{itemize} \item Analysis and comparison of a new relative positioning autonomous navigation method with the previously proposed navigation solutions for the SunRISE concept discussed in \citep{stuart2017formation}; \item Placement of an additional spacecraft in the formation in a configuration that optimizes the autonomous navigation system's performance; \item Study of suppression of system sensors while maintaining full state observability. \end{itemize} The main contribution of this paper consists in the study on the feasibility of the use of the autonomous relative positioning orbit determination method in the context of the SunRISE mission, and its ability to meet the mission's navigation requirements. We consider the addition of a new spacecraft to improve the positioning performance. The optimization of the new spacecraft's orbital configuration provides insight into how it affects the observability of the autonomous relative positioning orbit determination method. Finally, the paper also shows that the system in question may be capable of retaining its observability when deprived of most of its relative bearing measurement systems. In Section \ref{sec:locmet}, the new orbit determination solution for the SunRISE mission is proposed and compared with the solutions previously studied in \citep{stuart2017formation}. The new spacecraft placement optimization study is described in Section \ref{sec:ObsOpt}, followed by the study of the potential elimination of system sensors in Section \ref{sec:systsensred}. The evaluation of the results in a simulation environment is then presented in Section \ref{sec:simres} and the main conclusions are drawn in Section \ref{sec:concl}. \section{Orbit Determination Methods} \label{sec:locmet} The SunRISE mission, around which this study will be focused, is a NASA JPL mission aiming to study Coronal Mass Ejections from the sun, mainly how solar energetic particles are released. To accomplish this goal, the mission was designed as a flying formation with 6 identical 6U CubeSats forming an observatory in a 25-hour, near geostationary orbit. The interspacecraft distances range from $\sim 1-10$ km along an orbit, with passive formation keeping. For the mission's scientific objectives to be met, a maximum of 3 m relative positioning accuracy was defined~\cite{alibay2017sun}. Two solutions were discussed in \cite{stuart2017formation} for the positioning system of the SunRISE mission: a GNSS-based method, and a RF/vision-based method. Although the study concluded that the GNSS solution would be preferable for the mission, it also recognized the potential for improvement of the RF/Vision-based method. We will therefore briefly describe the discarded RF/Vision-based method, and propose an alternative filtering solution \subsection{RF/vision-based method} \label{subsect:rfvis} The RF/vision-based method described in \cite{stuart2017formation} proposes to use UHF crosslinks to obtain pseudorange measurements between the spacecraft in the formation, along with a star tracker to measure the orientation of the spacecraft relative to the stars, as well as the relative direction/bearing of another spacecraft with respect to that same inertial stellar frame of reference. \subsubsection{Crosslink schedule} Because this method considers the constraint that relative measurements can only be obtained beween pairs of satellites, a measurement schedule is necessary to guarantee that every possible spacecraft pair is covered within a measurement cycle. The cycle proposed in \cite{stuart2017formation} is described in Table \ref{tab:meassched1}, in which the spacecraft are numbered from 1 to 6. For each 1-minute measurement slot, observations are made every second. The 9 minute interval between sets accounts for the necessary time for the spacecraft to slew to point their cameras towards the new target and for the radios of the new pair to lock onto each other. \begin{table}[H] \centering \begin{tabular}{|l|c|} \hline \multicolumn{1}{|c|}{\textbf{Time Interval, min}} & \textbf{S/C Pairs} \\ \hline \multicolumn{1}{|c|}{$[t_0+9+50k, t_0+10+50k]$} & \textbf{\begin{tabular}[c]{@{}c@{}}1-2 \ 3-4 \ 5-6\end{tabular}} \\ \hline $[t_0+19+50k, t_0+20+50k]$ & \textbf{\begin{tabular}[c]{@{}c@{}}1-3 \ 2-5 \ 4-6\end{tabular}} \\ \hline $[t_0+29+50k, t_0+30+50k]$ & \textbf{\begin{tabular}[c]{@{}c@{}}1-4 \ 2-6 \ 3-5\end{tabular}} \\ \hline $[t_0+39+50k, t_0+40+50k]$ & \textbf{\begin{tabular}[c]{@{}c@{}}1-5 \ 2-4 \ 3-6\end{tabular}} \\ \hline $[t_0+49+50k, t_0+50+50k]$ & \textbf{\begin{tabular}[c]{@{}c@{}}1-6 \ 2-3 \ 4-5\end{tabular}} \\ \hline \end{tabular} \caption{\centering Measurement schedule, where $t_0$ is the starting epoch and $k \in \mathbb{Z}^+$ \cite{stuart2017formation} \label{tab:meassched1}} \end{table} \subsubsection{Extended Kalman Filter} The navigation algorithm used to evaluate the performance of this method consists of a simple EKF (Extended Kalman Filter). The purpose of the EKF is to provide an estimate of the system state $x \in \mathbb{R}^p$, following a dynamic system $\Dot{x}(t) = f(x(t),t,w)$ with observations $y(t) = h(x(t),t,\nu)$, in which $y \in \mathbb{R}^m$ describes the available observations, $w \in \mathbb{R}^p$ represents process noise to account for the dynamic system's modelling innaccuracies and $\nu \in \mathbb{R}^m$ represents measurement noise. Both process and measurement noise are modeled as centered white noise, with $w \sim \mathbb{N}(0,Q)$ and $\nu \sim \mathbb{N}(0,R)$. \iffalse \begin{algorithm}[htp] \SetAlgoLined \KwResult{$\Hat{x}_{k}^+, k \in \{1,\dots,N\}$} $\Hat{x}_{0}^+=x_0$, $k=1$, $P_{0}^+=P_0$\; \While{While $k \leq N$}{ State \textit{a priori} prediction: $\Hat{x}_{k}^- = f_d(\Hat{x}_{k-1}^+,t_k,0)$\; State propagation matrix: $\Phi_{k|k-1}=\left\dfrac{df_d}{dx}\right|_{\Hat{x}_{k-1}^+}$\; Process noise Jacobian matrix: $G_k=\left\dfrac{df}{dw}\right|_{\Hat{x}_{k-1}^+}$\; Discrete-time process covariance matrix: $Q_d = \int^{t_k}_{t_{k-1}}\Phi_{k|k-1}G_kQG_k^T\Phi_{k|k-1}^Tdt$\; Error covariance matrix \textit{a priori} prediction: $P_k^{-} = \Phi_kP_{k-1}^{+}\Phi_k^T + Q_d$\; Observation matrix: $H_k=\left\dfrac{dh}{dx}\right|_{\Hat{x}_k^-}$\; Kalman Gain: $K_k=P_k^-H_k^T(H_kP_k^-H_k^T + R_k)$\; State \textit{a posteriori} update: $\hat{x}_{k}^{+} = \hat{x}_{k}^{-} + K_{k}(y_{k} - \hat{y}_{k})$\; State covariance matrix \textit{a posteriori} update: $P_{k}^{+} = (I - K_{k}H_{k})P_{k}^{-}$\; $k=k+1$\; } \caption{Extended Kalman Filter} \label{alg:EKF} \end{algorithm} \fi \subsubsection*{Prediction model} In \cite{stuart2017formation}, the assumption is made that no information is available on the spacecraft's initial absolute states in the ECI (Earth Centered Inertial) frame. For that reason, the filter's prediction model follows a PVA (Position-Velocity-Acceleration) model, such that the state vector accounts for the relative position, velocity and acceleration of the spacecraft in the formation. Let us consider $\delta r_{j/1}$ the position vector of spacecraft $j \in [2,...,6]$ with respect to spacecraft $1$ in an inertial frame centered on spacecraft $1$. Its associated velocity vector is $\delta v_{j/1}$, and its acceleration vector is $\delta a_{j/1}$. The state propagation equation in the PVA model is described as \begin{equation} \begin{split} \Dot{x}_j & = A_jx_j + G_j w_j \Leftrightarrow\\ \begin{bmatrix} \Dot{\delta r}_{j/1} \\ \Dot{\delta v}_{j/1} \\ \Dot{\delta a}_{j/1} \end{bmatrix} &= \begin{bmatrix} \mathbf{0} & I & \mathbf{0} \\ \mathbf{0} & \mathbf{0} & I \\ \mathbf{0} & \mathbf{0} & \mathbf{0} \end{bmatrix} \begin{bmatrix} \delta r_{j/1} \\ \delta v_{j/1} \\ \delta a_{j/1} \end{bmatrix} + \begin{bmatrix} \mathbf{0} \\ \mathbf{0} \\ I \end{bmatrix}w_j \end{split}\label{•} \end{equation} where $w_j$ is a centered Gaussian white noise process with covariance $E\{w_j(t)w_j^T(\tau)\} = Q_j\delta(t-\tau) = q_jI\delta(t-\tau)$, and in \cite{stuart2017formation} $q_j$ was set to $(\SI{1e-7}{})^2\SI{}{(\m/\second^3)^2} \quad \forall j \in \{2,\dots,6\}$. The full state vector $x$ for the formation is the concatenation of each relative spacecraft motion state vector $x_j$ for $j \in \{2,\dots,6\}$. The full state dynamic model is therefore \begin{equation} \Dot{x} = Ax + G w, \label{eq:dynmodfull} \end{equation} where $A=\mathrm{diag}(A_2,\dots,A_6)$, $G=\mathrm{diag}(G_2,\dots,G_6)$, $x=\{x_j\}_{j=2}^6$ and $w$ is the concatenation of the white noise processes $w_j$, akin to that of the full state vector. The full process covariance matrix $Q$ is similarly the matricial direct sum of all $Q_j, \ \forall j \in \{2,\dots,6\}$. In discrete-time, due to the linear nature of the model, \textit{a priori} state propagation has a closed form solution given by \begin{equation} \hat{x}_k = \Phi_{k|k-1}\hat{x}_{k-1}, \label{eq:dynmodfulldisc} \end{equation} whereas state covariance matrix propagation follows the equation \begin{equation} P_k = \Phi_{k|k-1}P_{k-1}\Phi_{k|k-1}^T + Q_d, \label{eq:dynmodfulldisc2} \end{equation} with the STM (state transition matrix) from states $x$ at time $t_{k-1}$ to time $t_k$ $\Phi_{k|k-1}$ described as \begin{equation} \Phi_{k|k-1} \equiv \Phi_{k}(t_{k-1}) = e^{A(t_k-t_{k-1})}. \label{eq:stmdiscfilt1} \end{equation} The discretized process noise covariance matrix $Q_d$ is calculated according to \begin{equation} Q_d = \int^{t_k}_{t_{k-1}} \Phi_{k}(\tau)GQG^T\Phi_{k}(\tau)^Td\tau, \label{eq:discqd} \end{equation} which has a closed-form solution~\citep{zarchan2013fundamentals}. \subsubsection*{Observation model} Relative position measurements will be made between any pair of two spacecraft, here indexed by $j$ and $n$. The range and bearing measurements within a pair are functions of the relative position vector in the inertial frame from one spacecraft to the other: \begin{equation} \delta r_{j/n} = [\delta r_{x,j/n} \ \delta r_{y,j/n} \ \delta r_{z,j/n}]^T. \end{equation} % Relative positions between a pair that does not include the chief spacecraft (index $1$) can be described from the relative position vectors that belong to the state vector $x$ as \begin{equation} \delta r_{j/n}(t) = \delta r_{j/1}(t) - \delta r_{n/1}(t), \forall j \neq n \in \{2,...,6\}. \end{equation} Range and bearing (expressed through right ascendancy and declination angles) of spacecraft $j$ from spacecraft $n$ are expressed as \begin{align} \rho_{j/n}(t) &= \@ifstar{\oldnorm}{\oldnorm*}{\delta r_{j/n}(t)} + \nu_{\rho}(t) \\ \psi_{j/n}(t) &= \arctan\left(\frac{\delta r_{y,j/n}(t)}{\delta r_{x,j/n}(t}\right) + \nu_{\psi}(t) \\ \theta_{j/n}(t) &= \arcsin\left(\dfrac{\delta r_{z,j/n}(t)}{\@ifstar{\oldnorm}{\oldnorm*}{\delta r_{j/n}(t)}}\right) + \nu_{\theta}(t) \label{eq:measmodel} \end{align} where $\nu_{\rho}(t)$, $\nu_{\psi}(t)$ and $\nu_{\theta}(t)$ are Gaussian white noise processes with covariances set in \cite{stuart2017formation} as $E\{\nu_{\rho}(t)\nu_{\rho}(\tau)\} = (1/3)^2\delta(t-\tau) \SI{}{\m^2}$ and $E\{\nu_{\psi}(t)\nu_{\psi}(\tau)\} = E\{\nu_{\theta}(t)\nu_{\theta}(\tau)\} = (35)^2\delta(t-\tau) \text{arcsec}^2$. These are incorporated into the diagonal entries of the measurement noise covariance matrix $R$. The \textit{a posteriori} states and respective covariance matrix (denoted $\hat{x}^{+}$ and $P^{+}$ as opposed to the \textit{a priori} $\hat{x}^{-}$ and $P^{-}$) are computed according to \begin{align} K_k &= P_k^{-}H_k^T(H_kP_k^{-}H_k^T + R)^{-1} \\ \hat{x}_k^{+} &= \hat{x}_k^{-} + K_k(y_k - \hat{y}_k) \\ P_k^{+} &= (I - K_kH_k)P_k^{-}, \label{eq:statecovupd} \end{align} in which $H_k = \dfrac{dh}{dx}\biggr|_{\hat{x}_k^{-}}$ is the observation matrix (detailed in \citep{stuart2017formation}) and $y_k$ and $\hat{y}_k$ are the real and estimated observations at time $t_k$. Since the filter is expected to provide state estimates every second, it outputs the \textit{a priori} estimates instead of the \textit{a posteriori} ones for the time steps with no available measurements. \subsection{Proposed solution} \label{subsec:propsol} The previously described solution pertains to a worst-case scenario where no information is available on the formation's initial position in the ECI frame. This is a worst-case scenario assumption, as some information is always expected to be available from launch to the start of mission operations. Assuming that it is, then the absolute state of the chief spacecraft may be incorporated into the state vector, as well as orbital dynamics into the filter's prediction model. The relative position history of the deputy spacecraft should make it possible to correct the chief spacecraft's absolute states and avoid divergence. The propagation of the absolute position is done considering a simple keplerian model: \begin{equation} \begin{cases} \Dot{r}_1 &= v_1 \\ \Dot{v}_1 &= -\mu\dfrac{r_1}{\@ifstar{\oldnorm}{\oldnorm*}{r_1}^3} + \omega_1 \end{cases}.\label{eq:propabs} \end{equation} The relative states of spacecraft $j$ with respect to the chief spacecraft $1$ in a local inertial frame centered on the latter, in turn, are propagated according to the following equations: \begin{equation} \begin{cases} \Dot{\delta r}_{j/1} &= \delta v_{j/1} \\ \Dot{\delta v}_{j/1} &= -\mu_{\oplus}\left(\dfrac{r_1 + \delta r_{j/1}}{\@ifstar{\oldnorm}{\oldnorm*}*{r_1 + \delta r_{j/1}}^3} - \dfrac{r_1}{\@ifstar{\oldnorm}{\oldnorm*}{r_1}^3}\right) + \omega_j \end{cases}.\label{eq:proprel} \end{equation} Unlike the PVA model, this propagation model is nonlinear. In \citep{cachim2020}, these equations were computed numerically using \emph{MATLAB}'s \emph{ODE45} solver. However, since this solver may be too computationally heavy to use onboard a NanoSat mission, and since the time steps are relatively short ($\SI{1}{\second}$), these equations may instead be discretised using Euler's method (as described in \citep{zarchan2013fundamentals}): \begin{equation} \hat{x}_k = \hat{x}_{k-1} + f(\hat{x}_{k-1})(t_k-t_{k-1}), \end{equation} with the STM $\Phi_{k|k-1}$ calculated as \begin{equation} \Phi_{k|k-1} = I + F(t_k-t_{k-1}), \end{equation} with $F = \dfrac{df}{dx}\biggr|_{\hat{x}_{k-1}}$. The STM is then integrated in Eq. \eqref{eq:discqd} to obtain $Q_d$ and used in Eq. \eqref{eq:dynmodfulldisc} to propagate the state covariance matrix forward each time step. The process noise is modelled similarly to the previous filter, with the exception that the values of $q_1$ and the remaining $q_j$ were manually tuned to $(\SI{1e-6}{\km/\s^2})^2$ and $(\SI{1e-9}{\km/\s^2})^2$, respectively, in order to optimize the filter's performance \section{Observability Optimization} \label{sec:ObsOpt} Previous studies concluded that the orbital configuration of the spacecraft has a great impact on the system's observability~\citep{psiaki1999autonomous}. In order to further explore the potential of the proposed method, the orbital configuration for a new spacecraft in the formation that optimizes the system's navigation performance is now investigated. The generic formulation for the optimization problem in question is \begin{align*} \underset{x \in \mathcal{D}}{\text{minimize}} \quad &f(x) \\ \text{subject to} \quad & f_i(x) \leq 0, \ i\in \{1,...,m\} \\ & h_j(x) = 0, \ j\in \{1,...,p\} \end{align*} where $x$ describes the initial orbital configuration of the new spacecraft in Classical Orbital Elements, $\mathcal{D}$ is the domain of $x$, $f(x)$ is the objective function that quantifies the observability/performance of the system, and $f_i(x)$ and $h_j$ are the inequality and equality constraints, respectively. The configurations of the objective function are discussed next in Section \ref{subsec:objfunc}. The optimization variables $x$, their domain $\mathcal{D}$ and respective constraints are discussed in Section \ref{subsec:conssearch}. \subsection{Objective function} \label{subsec:objfunc} Several choices exist regarding the choice of objective function. Two tools were used to construct these objective functions, that serve to evaluate and quantify the observability/performance of an observed dynamic system: \begin{itemize} \item The continuous-time \textit{Observability matrix} $\mathcal{O}$ up to order 3, as described in \ref{app:obsmat}. Within the context of this study, it will be used to study which results would optimize local observability across the trajectory, in the absence of measurement noise; \item The inverse of the SFIM (\textit{Standard Fisher Information Matrix}) serves as a lower bound of the state covariance of a discrete-time linear (or linearized) system \cite{rafieisakhaei2018use}. Because the computation of the SFIM for this problem can be numerically innacurate due to the large disparity in state observability, its square root form is used instead, calculated according to Eq. \eqref{eq:srsfim} (following the approach described in \cite{psiaki1999autonomous}), in which $H_k = \dfrac{dh}{dx}\biggr|_{x_k}$ is the observation matrix at time $t_k$ and $\Phi_{k|0}$ the STM (State Transition Matrix) from the states at time $t_0$ to the states at time $t_k$. \end{itemize} \begin{equation} \mathcal{I}=[(R^{-1/2}H_0\Phi_{0|0})^T \ \dots \ (R^{-1/2}H_k\Phi_{k|0})^T]^T \label{eq:srsfim} \end{equation} Two metrics for each of these matrices were considered for optimization: the smallest singular value and the condition number (ratio of largest to smallest singular value): \begin{itemize} \item Maximizing the smallest singular value (or minimizing its negative value, which will be referred to as \textit{Local Unobservability Index} or LUI), which equates to increasing the observability of the least observable state subspace in the context of the observability matrix, or reducing its estimation error variance in the context of the SR-SFIM; \item Minimizing the condition number (or its negative reciprocal value) should lead to a better conditioned matrix, decreasing the disparity in observability or estimation error between the least and most observable subspaces. \end{itemize} These metrics can be taken from any matrix and used to evaluate how close to singular it is. Because the largest singular value of the observability matrix in question in this scenario is always equal to one, both the CN and LUI optimization of this matrix lead to similar results. For this reason, only one of the observability matrix optimized configurations (the LUI) is discussed here. While the SR-SFIM is calculated considering a set of discrete observations from a given trajectory, the continuous-time observability matrix is associated with a set of states at a given point in time and space. So, in order to evaluate the observability of a trajectory using the observability matrix in question, its corresponding metric was averaged across time steps. \subsubsection*{Relative Positioning System} Two different measurement systems for the new spacecraft were considered in this optimization problem: \begin{itemize} \item The RF/vision-based system described in Section \ref{subsect:rfvis}, with equivalent error model; \item An RF-only system, that uses multiple receivers and TOA (Time-Of-Arrival) differencing to estimate the (AOA) Angle-Of-Arrival of the signal, which can be used with absolute orientation knowledge to estimate relative bearing. \end{itemize} In both systems, measurement noise is modelled with centered white noise. The values for the standard deviation of the RF/Vision-based system have been described in Section \ref{subsect:rfvis}. For the RF-only system, the ranging measurement noise standard deviation is similar, but the relative bearing is more innacurate, with a standard deviation of $1^{\circ}$ for the right ascension and declination angles (based on the precision presented by the FFRF system onboard the PRISMA mission \cite{harr2006rf}). While the PRISMA mission's FFRF system was only operated up to a range of $\SI{30}{\km}$~\cite{harr2006rf}, in this study the assumption is made that the new spacecraft is designed with suitable \textit{Ad-Hoc} RF-transmitting capabilities such that it can perform measurements regardless of the distance between the spacecraft within the Earth's sphere of influence. The RF/vision-based system, in turn, will present a maximum distance constraint to account for the camera's functional range. With these assumptions, the results will allow for a more interesting comparison between two measurement systems that either have greater accuracy or allowed range of motion. Due to the maximum distance constraint imposed on the RF/vision-based system, the orbital period of any spacecraft employing this system must be similar to that of the chief spacecraft, as otherwise the new spacecraft would eventually drift out of range of the formation. Because the objective function only describes the performance of the system for a finite period of time, the relative motion of the spacecraft within the considered time frame needs to be periodical for the performance to be optimized beyond the studied period. For this reason, the orbital period of the new spacecraft with the RF-only system is also kept similar to that of the chief spacecraft. Because the goal of the observability matrix optimization is only to help visualize the impact of the orbital configuration on the system's observality, they do not present an orbital period constraint. For these results, the optimized period corresponds to that of the greater orbital period between the new and chief spacecraft. \subsubsection*{Dynamic system approximations} In order to reduce the computation time of each $f(x)$ evaluation and allow for a more in-depth examination of the search space, some approximations were made regarding the dynamic system. The formation was reduced to a 2 spacecraft system, with one spacecraft being placed at the chief orbit around which the formation was designed and the other being the new spacecraft. Furthermore, the sampling period was changed from the schedule described in Table \ref{tab:meassched1} to a fixed sampling period of $\SI{90}{\second}$, leading to a total of 1000 samples over one orbital period of the chief spacecraft. The trajectory of states and STM are propagated from the initial variables $x$ with the dynamic equations described in Eqs. \eqref{eq:propabs} and \eqref{eq:proprel} using \emph{MATLAB}'s \emph{ode45}~\citep{shampine1997matlab} solver, with relative and absolute tolerances of $1\mathrm{e}{-3}$ and $1\mathrm{e}{-6}$, respectively. The states are then used to obtain the observation matrices $H_k$, state transition matrices $\Phi_{k|0}$ for the computation of the SR-SFIM according to Eq. \eqref{eq:srsfim} and the continuous-time observability matrices (according to Eq. \eqref{eq:obsmatrelstat}). \subsubsection*{Eclipse condition} Within a configuration in which the new spacecraft has a wider search space available, it is possible for the two spacecraft to stand on opposite sides of the Earth, blocking the measurement system's field-of-view. This obstruction is accounted for in the objective function, such that measurements become unavailable during the \enquote{eclipse} period. Whenever the new spacecraft stands in a cylindrical shadow zone behind the planet opposite to the chief spacecraft, the local observability matrix LUI and the negative reciprocal of the CN are set to zero. In the SR-SFIM scenarios, the observation matrices $H_k$ corresponding to the eclipsed time samples are set to zero. To further discourage the presence of occultation periods in these results (to avoid the positioning error drift from propagation-only estimation), the SR-SFIM-related cost functions are multiplied by the ratio of uneclipsed to total observations used in the functions calculation. \subsection{Constraints and Search Domain} \label{subsec:conssearch} The optimization variables, $x$, describes the initial state of the new spacecraft. Classical Orbital Elements are generically used to represent it ($x=\{a_2,e_2,i_2,\Omega_2,\omega_2,\nu_2\}$, where $a$ is the SMA, $e$ is the eccentricity, $i$ the inclination, $\Omega$ the RAAN, $\omega$ the argument of the perigee and $\nu$ the true anomaly). The subscript $2$ refers to the new spacecraft, whereas the subscript $1$ refers to the chief spacecraft. The domain $\mathcal{D}$ of $x$ needs to be constrained, however. The perigee of the orbit must stay above a given threshold to avoid excessive atmospheric drag (defined at $\SI{6678}{\km}$). For the RF-only configurations, since the new spacecraft's orbital period is equal to that of the chief (and, therefore, the semi-major axis $a_2=a_1=a$), these restrictions limit the eccentricity such that $e_2 \in [0,0.85]$. For the observability matrix optimization study, which presents no orbital period constraint, nonlinear constraints are avoided by replacing the elements $a_2$ and $e_2$ with the radius of the orbit at the apsides $r_1,r_2 \in [R_{min}, R_{max}]$. $a_2$ and $e_2$ are then calculated from these elements according to $a_2 = (r_1 + r_2)/2$ and $e_2 = |r_1-r_2|/(r_1+r_2)$. Both $r_1$ and $r_2$ must remain between the lower limit of $\SI{6678}{\km}$ and the upper limit of $\SI{3e5}{\km}$, defined to limit the computation time of the objective function (proportional to the greater orbital period of the two spacecraft). The functional range restriction for the vision-based system, however, requires a nonlinear constraint. Setting this distance as $d_{max}=\SI{480}{\km}$ (based on the PRISMA mission's VBS system with a $\SI{20}{\km}$ margin), it is not easy to apply this restriction on the initial states of the formation. In order to do so, relative motion was modelled by the approximated equations in the LVLH (Local-Vertical Local-Horizontal) frame derived from the Hill-Clohessy-Wiltshire equations. Given that the chief orbit is considered equatorial and circular, and assuming that both spacecraft have the same orbital period ($a_2=a_1=a$), the relative motion of the new spacecraft around the chief spacecraft can be approximately described in a LVLH frame from the keplerian elements as follows \citep{ou2018observability}: \begin{equation} \begin{cases} \delta x_{2/1} \simeq -ae_{2}\cos(\omega_1 + M_1-\omega_{2}) \\ \delta y_{2/1} \simeq a[\omega_2 + M_2 - \omega_1 - M_1 + \Omega_{2}-\Omega_1 \\ + 2e_{2}\sin(\omega_1 + M_1-\omega_{2})] \\ \delta z_{2/1} \simeq ai_{2}\sin(\omega_1 + M_1) \end{cases}\label{eq:relmotionsimp} \end{equation} Based on this simplified model, the following approximated formula for the maximum distance constraint between the spacecraft was designed: \begin{multline} a\bigl[(|\omega_2 + M_2 + \Omega_2 - \omega_1 - M_1 - \Omega_1| + 2e_2)^2\\ + (i_2-i_1)^2\bigr]^{1/2} - d_{max} < 0 \label{eq:visionconstraint} \end{multline} with $M$ the mean anomaly, which can be obtained from the true anomaly $\nu$ and eccentricity $e$. This formulation is built on the generally conservative assumption that the maximum distance is always met with a simultaneous maximum separation in the along-track and cross-track directions ($\delta y_{2/1}$ and $\delta z_{2/1}$ in Eq. \eqref{eq:relmotionsimp}, respectively). \subsection{Optimization Results} For the optimization problems with nonlinear constraints, \emph{MATLAB}'s \emph{fmincon} Interior Point Algorithm with multi-start was used as a global solver \cite{byrd2000trust}. For the remaining ones, \emph{PSwarm} was used \cite{vaz2007pswarm}. Each algorithm is run for a period of $\sim 8$ hours. The reader is referred to \citep{cachim2020} for more information on the configuration of the optimization problems and respective solvers. The optimized results are shown in Table \ref{tab:optobsmatorbs} and analysed next. \begin{table*}[tb] \centering \resizebox{\textwidth}{!}{ \begin{tabular}{lllccccccc} \hhline{==========} \multicolumn{3}{l}{\multirow{2}{*}{\textbf{Objective function}}} & \multicolumn{6}{c}{\textbf{New SC orbit states} $\bm{x_{opt}}$} & \multirow{2}{*}{\textbf{f(x)}} \\ \multicolumn{3}{l}{} & $\bm{a (km)}$ & $\bm{e}$ & $\bm{i (deg)}$ & $\bm{\Omega (deg)}$ & $\bm{\omega (deg)}$ & $\bm{\nu (deg)}$ & \\ \hline \multicolumn{2}{l}{\textbf{Observability Matrix}} & \textbf{LUI} & $6678$ & $0$ & $88.34$ & $129.1$ & $351.5$ & $121.2$ & $-9.905\mathrm{e}{-7}$ \\ \multirow[t]{4}{*}{\textbf{SR-SFIM}} & \multirow[t]{2}{*}{\textbf{RF/Vision}} & \textbf{CN} & $43399$ & $5.203\mathrm{e}{-4}$ & $0.629$ & $195.3$ & $354.9$ & $169.9$ & $-2.578\mathrm{e}{-9}$ \\ & & \textbf{LUI} & $43399$ & $1.714\mathrm{e}{-3}$ & $0.404$ & $208.2$ & $175.4$ & $336.5$ & $-4.276$ \\ & \multirow[t]{2}{*}{ \textbf{RF-only}} & \textbf{CN} & $43399$ & $8.439\mathrm{e}{-1}$ & $89.46$ & $198.2$ & $284.8$ & $190.1$ & $-9.310\mathrm{e}{-12}$ \\ & & \textbf{LUI} & $43399$ & $3.632\mathrm{e}{-1}$ & $18.62$ & $90.79$ & $149.9$ & $119.4$ & $-4.173\mathrm{e}{-2}$ \\ \hhline{==========} \end{tabular} } \caption{\centering Initial COE of the optimized new spacecraft configurations.} \label{tab:optobsmatorbs} \end{table*} \subsubsection{Observability Matrix} The observability-optimized orbital configuration for the new spacecraft is shown in Figure \ref{fig:opt_rf_fixed_obs_cnlui}. The obtained new SC orbit is near polar ($i_{new} \sim 90^{\circ}$), and at the lowest allowed altitude. This result is in accordance with the conclusions drawn in \citep{ou2018observability} on how the observability of this system improves with greater magnitudes of in-track and cross-track distances. \begin{figure}[tb] \centering \includegraphics[width=.9\linewidth]{images/fig2_opt_rf_fixed_obs_cnlui.png} \caption{\centering Observability matrix and RF-Only SR-SFIM optimized configurations. The dots mark the initial S/C states.} \label{fig:opt_rf_fixed_obs_cnlui} \end{figure} In order to provide some reasoning behind the obtained results, we seek to visualize how the difference in orbital radius affects observability. Noting that the observability matrix evaluates observability locally (at a specific point in time rather than a state trajectory), we take the initial states of the chief virtual orbit and consider that at a given point in time the deputy spacecraft’s absolute position vector is aligned with the chief orbit’s absolute position vector. The LUI of the observability matrix is evaluated for different values of the deputy spacecraft’s orbital radius (we consider the deputy’s velocity to be adjusted such that its orbit is always circular and equatorial). Taking 10000 samples ranging from the edge of the Earth’s atmosphere up to the edge of the Earth’s gravitational sphere of influence ($\sim \SI{9.26e+05}{\km}$ \citep{vallado2001fundamentals}), the plot in Figure \ref{fig:LUI_orbrad} was drawn. \begin{figure}[tb] \centering \includegraphics[width=.9\linewidth]{images/fig3_LUI_orbrad.png} \caption{\centering Observability matrix and RF-Only SR-SFIM optimized configurations. The dots mark the initial S/C states.} \label{fig:LUI_orbrad} \end{figure} Based on the observations made in \citep{psiaki1999autonomous} on how the observability of the system is connected to the gravity gradient tensor, the difference in magnitude of gravitational acceleration was added to the plot in Figure \ref{fig:LUI_orbrad} in order to observe whether its curve would be similar to that of the LUI. The vertical dashed line marks the orbital radius of the chief orbit. These results help to understand why the optimized orbit would maximize the observability of the system. In general, these results seem to indicate that large differences in magnitude of gravitational acceleration are the key factor affecting the local observability of the least observable (absolute) states. This hypothesis can be derived from the formula of the critical entries of the observability matrix defined by the difference in gravity gradient tensors $G_1 - G_0$ described in Eqs. \eqref{eq:obsmatrelstat} and \eqref{eq:Gi}. These results support this hypothesis because the optimized auxiliary orbits are those which maximize this difference in magnitude, as evidenced by its plot in Figure \ref{fig:LUI_orbrad}. They also indicate that increasing the maximum orbital radius of the search space of the problem from $\SI{3e+05}{\km}$ to the edge of the Earth gravity sphere of influence would likely not have resulted in a lower cost function value, since Figure \ref{fig:LUI_orbrad} shows the smallest singular value being largest at the lower bound of the orbital radius of the new spacecraft. \subsubsection{SR-SFIM RF/vision system} We now analyse the CN and LUI SR-SFIM optimization results for the RF ranging and vision bearing measurement system for the new spacecraft. The optimized configurations are shown in Figure \ref{fig:optvisorbslvlh} in the LVLH plane, since their proximity to the chief spacecraft makes them indiscernible in the ECI frame. \begin{figure}[tb] \centering \includegraphics[width=.7\linewidth]{images/fig4_opt_vis_lvlh2.png} \caption{\centering Optimized orbits for the RF/vision based system in the LVLH frame centered around the chief orbit.} \label{fig:optvisorbslvlh} \end{figure} Unlike in the case of the observability matrix, noticeable differences can be observed between the optimization of the CN and the LUI of the SR-SFIM. Since the state error covariance of the relative states increases with the distance between the spacecraft, all singular values are affected by the orbital configuration, unlike with the observability matrix. The CN-optimized configuration presents a new relative orbit with wider out-of-plane motion and closer in-plane motion when compared to the LUI-optimized configuration. By performing singular value decomposition of the SR-SFIM matrix of the optimized results, we can use the right singular vectors to know which states the smallest and largest singular values are most associated with (reminding the reader that the SR-SFIM is associated with the states in an inertial cartesian coordinate system as with the EKF, rather than COE). In both configurations, the largest singular value is linked with $\delta v_y$, the Y component of the relative velocity of the new spacecraft with respect to the chief orbit in the ECI frame, while the smallest singular value corresponds most to $r_y$, the Y component of the chief spacecraft’s absolute position vector in the ECI frame. These results coincide with those of the observability matrix in the sense that more accurate information is available on the relative states than the absolute ones. The singular values of the SR-SFIM corresponding to the relative states are expected to decrease with distance due to the fixed angular error of the relative observations. On the other hand, as is shown in Figure \ref{fig:LUI_orbrad}, greater differences in orbital radius will increase the observability of the absolute states. In order to observe how these different factors affect the LUI and CN of the SR-SFIM, we calculate the values of these objective functions for a new spacecraft placed on orbits with varying degrees of inclination and eccentricity. The remaining orbital elements of the new spacecraft are kept similar to those of the chief orbit. The results in Figures \ref{fig:optrforbseffectlui} and \ref{fig:optrforbseffectcn} were produced by sampling the objective function $30\times30$ grid for both the CN and the LUI, and linearly interpolating these samples for a \enquote{smoother} plot. \begin{figure}[tb] \centering \includegraphics[width=.8\linewidth]{images/fig5_vis_ecc_inc_LUI_2.png} \caption{\centering LUI of $\mathcal{I}$ with the RF/vision-based system as a function of inclination and eccentricity.} \label{fig:optrforbseffectlui} \end{figure} \begin{figure}[tb] \centering \includegraphics[width=.8\linewidth]{images/fig6_vis_ecc_inc_CN_2.png} \caption{\centering CN of $\mathcal{I}$ with the RF/vision-based system as a function of inclination and eccentricity.} \label{fig:optrforbseffectcn} \end{figure} Figure \ref{fig:optrforbseffectlui} shows that the absolute value of the LUI generally decreases with the inclination and increases with the eccentricity up until $e \sim \SI{1.5e-03}{}$, where it appears to plateau. Higher eccentricity of the new spacecraft's orbit cause greater differences in orbital radius, which may explain the positive impact of the eccentricity on the LUI. Because the information available on the absolute states comes from the estimation of the relative states, we should expect the accuracy of the information on the absolute states to be linked to that of the relative states. If greater interspacecraft distances lead to more inaccurate relative state estimation, so should absolute state estimation be negatively impacted by greater distances. This may justify why greater degrees of inclination of the new spacecraft's orbit would lower the absolute value of the LUI, and why the latter plateaus at higher eccentricities in Figure \ref{fig:optrforbseffectlui}. Although this contradicts the level of inclination and eccentricity presented by the LUI-optimized orbit, it is important to note that the effect of the remaining orbital parameters is not considered in this plot. Figure \ref{fig:optrforbseffectcn} shows that the CN is lowest at a low eccentricity and high inclination orbit. As previously mentioned, minimizing the CN (or maximizing its absolute value) is equivalent to shortening the difference in accuracy of information available between the least and most observable state subspaces in order to achieve a better conditioned estimation problem. In this context, it is equivalent to maximizing the information available on the least observable absolute position states while minimizing that of the most observable state ($\delta v_y$ in both optimized configurations). It is therefore possible to infer the look of the equivalent plot for the most observable state subspace based on the plots in Figures \ref{fig:optrforbseffectlui} and \ref{fig:optrforbseffectcn}. \subsubsection{SR-SFIM RF-only system} Finally, in this section, we seek to evaluate the optimized orbital configurations for the SR-SFIM RF-only system. The results are shown in Figure \ref{fig:opt_rf_fixed_obs_cnlui}. None of the optimized new orbits present Earth-eclipsed periods. Whereas the CN-optimized configuration is highly eccentric and near-polar, the LUI-optimized orbit presents a comparatively small degree of eccentricity ($e_2 \simeq 0.37$) and inclination ($i_2 \simeq 19^{\circ}$). Once again, we perform singular value decomposition on the optimized SR-SFIMs. The state most associated with the smallest singular value for the LUI-optimized configuration is once again $r_y$, whereas for the CN-optimized one it is $\delta r_x$. The state most linked with the largest singular value, in turn, is $v_y$ for the CN configuration and $\delta v_y$ for the LUI configuration. The fact that the most observable state for the CN-optimized configuration is an absolute state of the chief orbit appears to indicate that, for orbits far enough apart, the accuracy of the information available on the relative states can become worse than the one available on the absolute states. Analogous plots to those of Figures \ref{fig:optrforbseffectlui} and \ref{fig:optrforbseffectcn} are shown in Figures \ref{fig:optrforbseffectluirf} and \ref{fig:optrforbseffectcnrf} in the context of the RF-Only system optimization problems. For low values of eccentricity and inclination ($< 0.1$ and $<14^{\circ}$, respectively) in Figures \ref{fig:optrforbseffectluirf} and \ref{fig:optrforbseffectcnrf}, the plots of both CN and LUI appear to show a similar shape to the plots of their RF/Vision-based system counterparts in Figures \ref{fig:optrforbseffectlui} and \ref{fig:optrforbseffectcn}. It is important to note once again that these plots do not present the obtained optimal values, since the remaining orbital elements of the new spacecraft orbit are set equal to those of the chief orbit and not of the optimized solutions. \begin{figure}[tb] \centering \includegraphics[width=.8\linewidth]{images/fig7_rfonly_ecc_inc_LUI_x10.png} \caption{\centering LUI of $\mathcal{I}$ with the RF-only system as a function of inclination and eccentricity.} \label{fig:optrforbseffectluirf} \end{figure} \begin{figure}[tb] \centering \includegraphics[width=.8\linewidth]{images/fig8_rfonly_ecc_inc_CN_x10.png} \caption{\centering CN of $\mathcal{I}$ with the RF-only system as a function of inclination and eccentricity.} \label{fig:optrforbseffectcnrf} \end{figure} \section{System Sensor Reduction} \label{sec:systsensred} One main disadvantage presented by the RF/Vision-based navigation solution proposed in \citep{stuart2017formation} is the need for constant slewing so that the spacecraft may point their cameras towards each other. Eliminating any redundant relative bearing measurements could help overcome this issue. As mentioned in Section \ref{subsubsec:syssensred}, it has been shown in the literature that, in a 2 spacecraft system with keplerian dynamics performing ranging measurements only, 9 out of 12 states may be observable at best. Due to the spherical symmetry of the gravity field, the absolute orientation elements $\omega$,$\Omega$ and $i$ cannot be observed \cite{hill2007autonomous}. Within the potentially observable subspace are the relative orientation elements $\theta$, $\phi_1$ and $\phi_2$. Of these, $\theta$ is the angle between the orbital planes, $\phi_1$ is the angular distance along the orbit of spacecraft $1$ from the periapsis to one of the two intersections of the orbits, and viceversa for $\phi_2$ with respect to the orbit of the second spacecraft. These parameters are functions of the absolute orientation elements of both spacecraft. Knowing one of the spacecraft's absolute orientation elements, it may be possible to deduce those of the other spacecraft. The hypothesis we therefore seek to validate is whether, in the context of the SunRISE mission, it is sufficient to have only one pair of spacecraft performing relative positioning measurements while the remaining pairs perform ranging-only for the system to remain fully observable. Since the absolute states of the spacecraft performing full relative positioning measurements should be known, those of the spacecraft performing ranging-only with either of these two spacecraft may also become observable. \subsection{Observability Analysis} We wish to validate the observability of the previously described system. In order to do so, we evaluate a simplified system composed of 3 spacecraft, with one chief, and two deputy spacecraft, one of which is the LUI-optimized RF/Vision configuration of the new spacecraft. The states $x$ of the system describe the position and velocity vectors of these spacecraft in the ECI frame. The chief and the deputy spacecraft of the original formation perform ranging-only measurements while the chief and the new spacecraft perform both relative range and bearing measurements simultaneously. These measurements are taken every $\SI{90}{\second}$ over one orbital period of $\SI{25}{\hour}$. The propagation model is similar to the one described in Eqs. \eqref{eq:propabs} and \eqref{eq:proprel}, while the measurement model is described in Eqs. \eqref{eq:measmodel}. We describe this discrete-time observed dynamic system with \begin{equation} \begin{cases} x(t_k) \triangleq x_k = \phi(x_{k-1}) &\approx \Phi_{k|k-1}x_{k-1}\\ y(t_k) \triangleq y_k = h(x_{k}) &\approx H_k x_k \end{cases}.\label{eq:discsys} \end{equation} in which $\Phi_{k|k-1}$ is the STM from states $x_{k-1}$ to states $x_k$ and $H_k$ the observation matrix at time $t_k$. The state propagation and STM are both calculated using \emph{MATLAB}'s \emph{ODE45} solver with relative and absolute tolerances of $\SI{1e-3}{}$ and $\SI{1e-6}{}$, respectively. With these matrices, we construct the discrete-time observability matrix as \begin{equation} \mathcal{O} = \begin{bmatrix} H_0\\ H_1\Phi_{1|0} \\ \vdots\\ H_{k}\Phi_{k|0} \end{bmatrix}. \end{equation} The resulting matrix has full rank 18, albeit with a condition number of $\SI{5.55e9}{}$. This implies that the system, despite observable in theory, presents a large disparity in state subspace observability and is therefore ill-conditioned. Simulations will be used to better evaluate the performance of this type of system. \section{Simulation Results} \label{sec:simres} In this Section, the navigation performance of the spacecraft formation is evaluated in a simulation environment. This analysis aims to meet the following objectives: \begin{enumerate*} \item compare the accuracy of the filtering solutions described in Sections \ref{subsect:rfvis} and \ref{subsec:propsol}; \item evaluate the impact of the different optimized auxiliary spacecraft configurations on the positioning performance of the formation; \item help to validate the feasibility of the sensor-reduced system described in Section \ref{sec:systsensred}; \end{enumerate*} These goals are tackled separately in Sections \ref{subsec:filtcomp}, \ref{subsec:simulres} and \ref{subsec:redsyssimul}, respectively. \subsection{Orbit determination methods} \label{subsec:filtcomp} A Monte Carlo analysis is performed, with $M=40$ trials, in order to compare the performance of the orbit determination methods described in Section \ref{sec:locmet}. The real trajectory simulation approach in \cite{stuart2017formation} consisted of a point-mass gravitational model with a constant acceleration in an arbitrary direction representing non-keplerian perturbations. In this study, since the spacecraft's states in the ECI frame are being estimated and the method's observability is dependent on their orbital configuration, a more complete model was used. The open-source \emph{ODTBX} Toolbox\footnote{\url{http://odtbx.sourceforge.net/} (Last accessed 05/12/2020)} was used to simulate the true trajectories of the spacecraft, with dynamic models considering solar radiation pressure, gravitational pull from the Sun and Moon and asymmetric Earth gravity geopotential model. Each simulation period covers two orbits ($\sim \SI{50}{\hour}$). The true trajectories are propagated from the initial set of states of each spacecraft, which are described in \ref{app:EKF}. In \cite{stuart2017formation}, an error of $\SI{100}{\m}$ and $\SI{1}{\cm/\s}$ in a random direction was given to the initial relative position and velocity vector state estimates $\hat{\delta r}_{j/1}(t_0)$ and $\hat{\delta v}_{j/1}(t_0)$, respectively, while the initial accelerations were assumed to be zero. The corresponding diagonal entries of the initial state covariance matrix are the squared value of that same initial error ($\SI{0.01}{\km^2}$ for position entries and $\SI{1e-10}{(\km/\s)^2}$ for velocity entries), with the exception of the acceleration entries, which are set to $\SI{1e-14}{(\km/\s^2)^2}$. Save for the acceleration entries, these initialization parameters also apply to the simulation of the new filter. The RMS (Root Mean Square) error values of the original and proposed filter are compared in Table \ref{tab:filtres}. The PVA EKF results are replicated in the new simulation environment and compared with those obtained in \cite{stuart2017formation}. The RMS values only account for the period after which the filters have converged ($\sim \SI{200}{\minute}$). The mean relative position error is the average of the RMS position error of the deputy spacecraft with respect to the chief spacecraft, whereas the absolute position error corresponds to the RMS error of the absolute position of the chief spacecraft. \begin{table}[tb] \centering \begin{tabular}{lccc} \hhline{====} \textbf{Filter} & \multicolumn{1}{l}{\textbf{\begin{tabular}[c]{@{}l@{}}Initial abs. \\ pos. err (km)\end{tabular}}} & \textbf{\begin{tabular}[c]{@{}c@{}}Abs. pos.\\ error (km)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Mean rel.\\ pos. error (m)\end{tabular}} \\ \hline \textbf{\begin{tabular}[c]{@{}l@{}}PVA EKF\\ (results in \cite{stuart2017formation})\end{tabular}} & - & - & 3.6 \\ \textbf{\begin{tabular}[c]{@{}l@{}}PVA EKF \\ new simulation\end{tabular}} & - & - & 3.560 \\ \multirow[t]{4}{*}{\textbf{\begin{tabular}[c]{@{}l@{}} \\ Added abs.\\ states EKF\end{tabular}}} & 0.1 & 4.506 & 0.1372 \\ & 10 & 4.589 & 0.1369 \\ & 1000 & 4.721 & 0.1378 \\ & 10000 & 49.222 & 0.4833 \\ \hhline{====} \end{tabular \caption{RF/vision filter RMS error comparison.}\label{tab:filtres} \end{table} \iffalse \begin{table}[tb] \centering \resizebox{.4\textwidth}{!}{ \begin{tabular}{c|c|c|c|} \cline{2-4} \textbf{} & \multicolumn{1}{l|}{\textbf{\begin{tabular}[c]{@{}l@{}}Initial abs. \\ pos. err (km)\end{tabular}}} & \textbf{\begin{tabular}[c]{@{}c@{}}Abs. pos.\\ error (km)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Mean rel.\\ pos. error (m)\end{tabular}} \\ \hline \multicolumn{1}{|c|}{\textbf{\begin{tabular}[c]{@{}c@{}}PVA EKF\\ (results in \cite{stuart2017formation})\end{tabular}}} & - & - & 3.6 \\ \hline \multicolumn{1}{|c|}{\textbf{\begin{tabular}[c]{@{}c@{}}PVA EKF \\ new simulation\end{tabular}}} & - & - & 3.6 \\ \hline \multicolumn{1}{|c|}{\multirow{4}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}Added abs.\\ States EKF\end{tabular}}}} & 0.1 & 1.73 & 0.13 \\ \cline{2-4} \multicolumn{1}{|c|}{} & 10 & 2.06 & 0.13 \\ \cline{2-4} \multicolumn{1}{|c|}{} & 1000 & 2.76 & 0.13 \\ \cline{2-4} \multicolumn{1}{|c|}{} & 10000 & 60.56 & 0.55 \\ \hline \end{tabular}} \caption{RF/vision filter RMS error comparison.}\label{tab:filtres} \end{table} \fi \iffalse \begin{table}[H] \centering \resizebox{.4\textwidth}{!}{ \begin{tabular}{l|l|cc|} \cline{3-4} \multicolumn{2}{l|}{\multirow{1}{*}{}} & \multicolumn{1}{c|}{\textbf{\begin{tabular}[c]{@{}c@{}}Abs. pos.\\ error (km)\end{tabular}}} & \textbf{\begin{tabular}[c]{@{}c@{}}Mean rel. \\ pos. error (m)\end{tabular}} \\ \hline \multicolumn{2}{|l|}{\textbf{\begin{tabular}[c]{@{}l@{}}PVA EKF\\ (results in\cite{stuart2017formation}) \end{tabular}}} & - & 3.6 \\ \cline{1-2} \multicolumn{2}{|l|}{\textbf{\begin{tabular}[c]{@{}l@{}}PVA EKF\\ new simulation\end{tabular}}} & - & 3.6 \\ \cline{1-2} \multicolumn{2}{|l|}{\textbf{\begin{tabular}[c]{@{}l@{}}Added absolute\\ states EKF \end{tabular}}} & 1.82 & 0.13 \\ \hline \end{tabular}} \caption{RF/vision filter RMS error comparison.}\label{tab:filtres} \end{table} \fi Both simulation environments lead to similar results for the PVA EKF. The proposed alteration to the filter improves the relative positioning accuracy by a factor of $\sim 25$. The proposed filter, however, requires an initial estimate of the absolute position, whereas the PVA filter was designed on the assumption that no such information was available. The proposed solution's robustness to poor initial absolute position error knowledge was also tested. Values of $\SI{10}{\km}$, $\SI{1000}{\km}$ and $\SI{10000}{\km}$ were chosen for the initial chief's absolute position error, with an adjusted initial state covariance. The RMS error values for these MC simulations are displayed in Table \ref{tab:filtres}, and the time evolution of the chief's absolute position error from sample runs are shown in Figure \ref{fig:abs_err_noopt_all}. The results demonstrate the method's robustness to poor initial absolute position information. All of the studied scenarios converged within an orbital period with the exception of the scenario with an initial error of $\SI{10000}{\km}$, in which the filter converges slower. \begin{figure}[tb] \centering \includegraphics[width=.8\linewidth]{images/fig1_abs_pos_err.png} \caption{\centering Evolution of the absolute position errors with varying initial chief spacecraft absolute position error.} \label{fig:abs_err_noopt_all} \end{figure} The proposed modifications to the RF/vision-based navigation solution seem to improve the overall performance of the system, not only increasing the relative positioning accuracy, but also by allowing the formation to autonomously determine its absolute position. Still, its absolute positioning accuracy is considerably worse than that of the chosen GNSS-based navigation solution for the mission (by a factor of $\sim 4000$). Also, compared to the results obtained with the same filter using the \emph{ODE45} solver presented in \citep{cachim2020}, the use of Euler's method degrades the absolute positioning accuracy by a factor of $\sim 2-3$, whereas the relative positioning accuracy is only slightly affected. \subsection{Optimized configurations} \label{subsec:simulres} We now seek to evaluate the impact of the optimized auxiliary spacecraft on the positioning performance of the formation in a simulation environment. However, in order to do so, a new measurement schedule including the additional spacecraft needs to be designed. Two sets of results were obtained with different measurement schedules: one in which the same assumptions of the original schedule are made in which no spacecraft can perform measurements with more than one other spacecraft simultaneously, leading to the adapted schedule shown in \ref{tab:meassched2} and denoted as schedule 1; and the other in which the measurements between the new and the chief spacecraft run parallel to the original schedule, leading to the parallel schedule shown in Table \ref{tab:meassched1} and denoted as schedule 2. \begin{table}[htp] \centering \begin{tabular}{|l|c|} \hline \multicolumn{1}{|c|}{\textbf{Time Interval, min}} & \textbf{S/C Pairs} \\ \hline \multicolumn{1}{|c|}{$[t_0+9+70k, t_0+10+70k]$} & \textbf{\begin{tabular}[c]{@{}c@{}}1-2 \ 3-4 \ 5-6\end{tabular}} \\ \hline $[t_0+19+70k, t_0+20+70k]$ & \textbf{\begin{tabular}[c]{@{}c@{}}1-3 \ 2-4 \ 5-7\end{tabular}} \\ \hline $[t_0+29+70k, t_0+30+70k]$ & \textbf{\begin{tabular}[c]{@{}c@{}}1-4 \ 2-7 \ 3-6\end{tabular}} \\ \hline $[t_0+39+70k, t_0+40+70k]$ & \textbf{\begin{tabular}[c]{@{}c@{}}1-5 \ 2-6 \ 3-7\end{tabular}} \\ \hline $[t_0+49+70k, t_0+50+70k]$ & \textbf{\begin{tabular}[c]{@{}c@{}}1-6 \ 2-5 \ 4-7\end{tabular}} \\ \hline $[t_0+59+70k, t_0+60+70k]$ & \textbf{\begin{tabular}[c]{@{}c@{}}1-7 \ 3-5 \ 4-6\end{tabular}} \\ \hline $[t_0+69+70k, t_0+70+70k]$ & \textbf{\begin{tabular}[c]{@{}c@{}}2-3 \ 4-5 \ 6-7\end{tabular}} \\ \hline \end{tabular} \caption{\centering Adapted measurement schedule (schedule 1), where $t_0$ is the starting epoch and $k \in \mathbb{Z}^+$ \label{tab:meassched2}} \end{table} The simulations are once again run with the Monte-Carlo method, with $M=40$ samples, with the initial position state estimates placed $\SI{100}{\m}$ away from the real initial position in a random direction. The simulation period is lowered to one orbital period of the original formation ($\sim 25$ hours), since it is sufficient for the filter to achieve convergence. The diagonal entries of the process noise covariance matrix $Q$ corresponding to the new spacecraft are equal to $q_7 = \alpha_{new}(\SI{1e-9}{\km/\second^{2.5}})^2$, with the values of $\alpha_{new}$ for each configuration defined in Table \ref{tab:ekfpnparam} in \ref{app:EKF}. The remaining aspects of the simulations were kept similar to those of Section \ref{subsec:filtcomp}. Tables \ref{tab:errsched1} and \ref{tab:errsched2} show the RMS error values obtained for each of the optimized configurations with schedules 1 and 2, respectively. The first column describes the absolute positioning error of the chief spacecraft, the second column the mean relative positioning error of the original deputy spacecraft (not counting the optimized auxiliary spacecraft), and finally, the last column describes the relative positioning error of the new spacecraft. The RMS error values obtained for the original formation with no auxiliary spacecraft are also shown. These are evaluated for the first orbit after convergence, as opposed to the $\SI{50}{\hour}$ simulation period of the results shown in Table \ref{tab:filtres}, to ensure the compared results are obtained in similar conditions. \begin{table}[tb] \centering \begin{tabular}{llccc} \hhline{=====} \multicolumn{2}{l}{\textbf{\begin{tabular}[c]{@{}l@{}}New SC\\ configuration\end{tabular}}} & \textbf{\begin{tabular}[c]{@{}c@{}}Abs. pos. \\ error (km)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Mean form. rel.\\ pos. error (m)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}new SC rel. \\ pos. error (m)\end{tabular}} \\ \hline \multicolumn{2}{l}{\textbf{None}} & 4.251 & 0.1383 & - \\ \multirow[t]{2}{*}{\textbf{RF/Vision}} & \textbf{LUI} & 4.321 & 0.1655 & 5.754 \\ & \textbf{CN} & 4.354 & 0.1642 & 4.950 \\ \multirow[t]{2}{*}{\textbf{RF-Only}} & \textbf{LUI} & 4.239 & 0.1665 & 7315 \\ & \textbf{CN} & 10.29 & 0.2116 & 2.996$\mathrm{e}{5}$ \\ \hhline{=====} \end{tabular} \caption{\centering Mean absolute and relative error for the optimized orbital configurations with schedule 1.\label{tab:errsched1}} \end{table} \begin{table}[tb] \centering \begin{tabular}{llccc} \hhline{=====} \multicolumn{2}{l}{\textbf{\begin{tabular}[c]{@{}l@{}}New SC\\ configuration\end{tabular}}} & \textbf{\begin{tabular}[c]{@{}c@{}}Abs. pos. \\ error (km)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Mean form. rel.\\ pos. error (m)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}new SC rel. \\ pos. error (m)\end{tabular}} \\ \hline \multicolumn{2}{l}{\textbf{None}} & 4.251 & 0.1383 & - \\ \multirow[t]{2}{*}{\textbf{RF/Vision}} & \textbf{LUI} & 4.230 & 0.1381 & 5.568 \\ & \textbf{CN} & 4.228 & 0.1378 & 5.094 \\ \multirow[t]{2}{*}{\textbf{RF-Only}} & \textbf{LUI} & 4.068 & 0.1385 & 7478 \\ & \textbf{CN} & 9.900 & 0.1706 & 2.849$\mathrm{e}{5}$ \\ \hhline{=====} \end{tabular} \caption{\centering Mean absolute and relative error for the optimized orbital configurations with schedule 2.\label{tab:errsched2}} \end{table} To help compare the absolute positioning RMS error results, Figures \ref{fig:barplotsched1} and \ref{fig:barplotsched2} display these in bar plot format for schedules 1 and 2, respectively. The Monte-Carlo averaged absolute error values are shown with the respective error bars indicating the smallest and largest error values obtained in the Monte-Carlo runs. \begin{figure}[tb] \centering \includegraphics[width=.5\linewidth]{images/fig9_sched_abs_bar.png} \caption{\centering Monte-Carlo averaged absolute position RMS error results for the configurations with schedule 1, with upper and lower error bounds.} \label{fig:barplotsched1} \end{figure} \begin{figure}[tb] \centering \includegraphics[width=.5\linewidth]{images/fig10_nosched_abs_bar.png} \caption{\centering Monte-Carlo averaged absolute position RMS error results for the configurations with schedule 2, with upper and lower error bounds.} \label{fig:barplotsched2} \end{figure} The results show that the RF/Vision and the LUI-optimized RF-only configurations for the auxiliary spacecraft match the absolute positioning accuracy of the formation, while the CN-optimized RF-only configuration worsens it, regardless of the schedule. While the former three configurations do provide some slightly better performance in absolute positioning with schedule 2, these gains are not substantial when considering the dispersion of the Monte Carlo results. When comparing the results from both schedules, it is possible to note that schedule 2 generally provides better relative positioning accuracy within the original formation. The RF/Vision and the LUI-optimized RF-only configurations all present very close absolute and mean formation relative positioning errors for both schedules. The large errors observed in the RF-only CN-optimized configuration appear to be linked to factors that are unaccounted for in the SR-SFIM-based cost functions, such as inconstant levels of process noise and the validity of the EKF's linearization approach\citep{cachim2020}. % \subsection{Sensor-reduced system} \label{subsec:redsyssimul} To further test the hypothesis described in Section \ref{sec:systsensred}, the sensor-reduced system is also evaluated in a filtering simulation environment with the optimized new spacecraft configurations. With the primary objective being the validation of the sensor-reduced system's error convergence/observability, we first run one simulation with each new spacecraft configuration over a longer duration of 10 orbital periods of the original formation. By removing the relative bearing measurements between the spacecraft in the original formation, but keeping them for the measurements between the chief spacecraft and the new spacecraft with schedule 2, the results in Figures \ref{fig:divergenceabs} and \ref{fig:divergencerel} are produced. To help better gauge whether the filter converges or diverges, the initial absolute position error is increased to $\SI{10}{\km}$ in a random direction. \begin{figure}[tb] \centering \includegraphics[width=.8\linewidth]{images/fig11_divergence_10km.png} \caption{\centering Evolution of the absolute position errors for each optimized configuration of the new SC with the sensor-reduced system.} \label{fig:divergenceabs} \end{figure} \begin{figure}[tb] \centering \includegraphics[width=.8\linewidth]{images/fig12_divergence_10km_rel.png} \caption{\centering Evolution of the mean formation relative position errors for each optimized configuration of the new SC with the sensor-reduced system.} \label{fig:divergencerel} \end{figure} The plots in Figures \ref{fig:divergenceabs} and \ref{fig:divergencerel} show the absolute and mean relative position error for each of the optimized configurations of the new spacecraft compared to the results obtained when no new spacecraft is present, with the original formation performing ranging-only measurements. Since this scenario is known to be unobservable, it provides a point of reference for the expected divergence rate of the ranging-only estimation. Both RF/Vision configurations of the new spacecraft help reduce the positioning error. While the LUI-optimized RF/Vision-based configuration appears to achieve steady state absolute and relative position errors of $\sim \SI{10}{\km}$ and $\sim \SI{1}{\m}$, respectively, the CN-optimized configuration shows some slow divergence within the considered simulation period. Both RF-Only optimized configurations worsen the positioning performance within the considered time-frame, without reaching a clear steady state. In \citep{cachim2020}, the different configuration of the process noise covariance matrix $Q$ for each of the optimized configurations may have led to the divergent behaviour that became visible after 5 orbital periods. These results, however, appear to show that, at least for the LUI-optimized RF/Vision-based configuration of the new spacecraft, the system may have enough observability to achieve convergence. Longer simulation periods would help to validate this conclusion. \section{Conclusions} \label{sec:concl} In this paper, the positioning performance of the relative positioning method for the SunRISE mission described in \citep{stuart2017formation} was compared with a modified version that attempts to estimate the absolute states of the spacecraft. The inclusion of the absolute states of the chief and keplerian dynamics into the navigation solution improved the relative positioning accuracy of the navigation solution from RMS $\SI{3.6}{\m}$ to $\SI{14}{\cm}$. The filter also presents good robustness to poor initial knowledge on the absolute position of the chief spacecraft. The absolute positioning accuracy, however, is considerably worse than that of the GPS-based solution discussed in \citep{stuart2017formation} (by a factor of $\sim 4000$). An optimization study was performed to find the orbital configuration of a new spacecraft that maximizes the near-GEO formation's positioning accuracy. The results derived from the continuous-time observability matrix-based optimization are in line with the observations made in \cite{ou2016autonomous, ou2018observability, psiaki1999autonomous}, showing that greater differences in magnitude of gravity acceleration between spacecraft are the main driver in optimizing local observability, as well as wider cross-track motion. The addition of both the optimized RF/Vision and the RF-only LUI-optimized new spacecraft configurations shows some tendency for marginal improvements to the absolute positioning performance with schedule 2. However, this tendency is not significant when considering the dispersion of the Monte-Carlo results. The choice of objective function for the optimization problem may have presented some limitations, such as: \begin{enumerate*} \item the approximation of the original formation to the chief spacecraft; \item not accounting for the measurement schedule; \item the choice of the SFIM, which more accurately describes the performance of a nonlinear WLS filter than that of the implemented EKF. \end{enumerate*} Finally, the observability and performance of the formation when deprived of part of its relative bearing measurements was analysed. The observability analysis showed that the sensor-reduced system should be observable, albeit ill-conditioned. The simulation results indicated that the system shows an apparent divergence of the EKF for most of the considered optimized configurations, with the exception of the LUI-optimized RF/Vision-based system. Testing whether the performance of this system would improve under a square-root filter better suited for ill-conditioned problems would be worth further investigation. \iffalse it was possible to conclude that \begin{enumerate*} \item the observability study demonstrated that the sensor-reduced system should be observable, albeit ill-conditioned; \item the removal of most of the relative bearing measurements from the system leads to an apparent divergence of the EKF for most of the considered optimized configurations, with the exception of the LUI-optimized RF/Vision-based system. \end{enumerate*} \subsection{Future Work} \label{subsec:concl} The following suggestions are left for a potential continuation of the line of work discussed here: % \begin{enumerate*} \item alternative objective functions should be considered for the new spacecraft configuration optimization problem (such as the PFIM \cite{rafieisakhaei2018use}, which could more accurately reflect the performance of the EKF in question); \item new approaches to reducing the complexity of the computation of the objective function while maintaining the validity of the problem; \item testing whether the sensor-reduced system would show improved performance under a square-root filter better suited for ill-conditioned problems. \end{enumerate*} \fi \section*{Acknowledgements} This work was partially supported by project UIDB/50009/2020 (LARSyS - FCT Plurianual funding 2020-2023), and also by project 24534 - INFANTE (funded by the COMPETE 2020 and Lisboa 2020 programs, under the PORTUGAL 2020 Partnership Agreement, through the European Regional Development Fund). \iffalse \paragraph{Installation} If the document class \emph{elsarticle} is not available on your computer, you can download and install the system package \emph{texlive-publishers} (Linux) or install the \LaTeX\ package \emph{elsarticle} using the package manager of your \TeX\ installation, which is typically \TeX\ Live or Mik\TeX. \paragraph{Usage} Once the package is properly installed, you can use the document class \emph{elsarticle} to create a manuscript. Please make sure that your manuscript follows the guidelines in the Guide for Authors of the relevant journal. It is not necessary to typeset your manuscript in exactly the same way as an article, unless you are submitting to a camera-ready copy (CRC) journal. \paragraph{Functionality} The Elsevier article class is based on the standard article class and supports almost all of the functionality of that class. In addition, it features commands and options to format the \begin{itemize} \item document style \item baselineskip \item front matter \item keywords and MSC codes \item theorems, definitions and proofs \item lables of enumerations \item citation style and labeling. \end{itemize} \section{Front matter} The author names and affiliations could be formatted in two ways: \begin{enumerate}[(1)] \item Group the authors per affiliation. \item Use footnotes to indicate the affiliations. \end{enumerate} See the front matter of this document for examples. You are recommended to conform your choice to the journal you are submitting to. \section{Bibliography styles} There are various bibliography styles available. You can select the style of your choice in the preamble of this document. These styles are Elsevier styles based on standard styles like Harvard and Vancouver. Please use Bib\TeX\ to generate your bibliography and include DOIs whenever available. \fi \bibliographystyle{elsarticle-num}
\section{Introduction} \subsection{Zeros of random holomorphic sections} One particularly important aspect in study of random functions or stochastic processes has been the investigation of their zero sets, see \cite{AT:07} and \cite{AW:09} as well as references therein. In order to obtain stronger implications we will impose some further assumptions here, focusing on the case of geometric generalizations of random polynomials, i.e.\ random holomorphic sections. In order to motivate and introduce our setting, we begin with recalling that for analytic functions $\sum_{n=0}^\infty a_nz^n$ whose coefficients $a_n$ are assumed to be independent random variables, Offord proved in his fundamental article \cite{Off67} the exponential decay of the tail probabilities of an analytic function having an excess or deficiency of zeros in a given region. More recently, Sodin \cite{So00} used Offord’s method to improve Offord's exponential bound on the probability that a random analytic function has no zeros in a disk of radius $r$ (hole probability), by showing that it decays at least at the rate $\mathcal{O}(e^{-Cr^2})$. This result has since been refined and extended in various ways in a series of papers \cite{Kr06,PV05,ST04,Zb07}. A change of paradigm has then been introduced by Shiffman, Zelditch and Zrebiec in the seminal article \cite{SZZ} by generalizing the situation described above to compact K\"ahler manifolds and zeros of holomorphic sections $H^0(X,L^p)$ of powers of a positive line bundle. The principal interest in this setting is the study of the distribution of zeros as $p\to\infty$. In this situation, the power series representation of an analytic function is not canonical anymore, and, as a consequence, one has to replace the arguments based on the power series by more analytic and geometric methods which are appropriate for the study of holomorphic sections. In particular, these include tools such as Bergman kernels and coherent states asymptotics, which are by now deeply rooted in the study of the geometry of K\"ahler manifolds. In this paper, we generalize the results of \cite{SZZ} in two directions: From a geometric point of view, we are now concerned with the case of noncompact (complete) complex manifolds. On the probabilistic side we allow for probability measures which are no longer Gaussian anymore; instead, these probability measures will be assumed to fulfill some rather general conditions which entail a certain universality of the results we obtain. In \cite{BCM20} (see also \cite{BCHM18} for a survey) it was shown that the equidistribution of zeros takes place for a large class of probability measures satisfying a certain moment condition (e.\,g.\ measures with heavy tail probability and small ball probability, or measures with support contained in totally real subsets of the complex probability space). Analogous equidistribution results for non-Gaussian ensembles are proved in \cite{B6,B7,BL15,DS06}. In this paper we consider probability measures satisfying very mild conditions in terms of their densities (see Section \ref{section1.3prob}) . We will primarily focus on the case of a Riemann surface with cusps and prove large deviations estimates for zeros of random holomorphic sections of high powers $L^p$ of a holomorphic line bundle $L$ whose curvature equals the Poincar\'e metric near the cusps. A special case is that of cusp forms of high degree $2p$. For such a bundle $L$, Auvray, Ma and Marinescu \cite{AMM:20} (cf.\ also \cite{AMM:20b}) gave a very precise description of the Bergman kernel near the cusps; in particular, they provide an optimal uniform estimate of the supremum norm of the Bergman kernel, involving the fractional growth order $p^{3/2}$ in the tensor power (the growth order is $p$ in the compact case). Using this estimate we obtain in Theorem \ref{thm:1.3.2} asymptotic bounds for the expectation and the tail probability of the maximum modulus of a random section on an open set. What is more, we also establish extensions to the case of higher dimensional Hermitian manifolds under suitable conditions. We now introduce the setting for our bounds on the excess or deficiency probabilities of zeros. Indeed, for a compact K\"ahler manifold $(X,\omega)$ endowed with a Hermitian holomorphic line bundle $(L,h)$ with positive curvature $\omega=c_1(L,h)$, Shiffman-Zelditch \cite{ShZ99} showed that the normalized currents of integration $\frac1p[\Div(s_p)]$ over zero divisors of a random sequence of sections $s_p\in H^0(X,L^p)$ converge almost surely to $c_1(L,h)$ as $p\to\infty$. This result was generalized to the noncompact setting in \cite{DMS12} and to the setting of singular metrics whose curvature is a K\"ahler current in \cite{BCM20,CM11,DMM}. It holds also in our present setting and implies that the number of zeros (counted with multiplicity) of a random section $s_p$ in an open set $U$ with negligible boundary is asymptotically equal to $p$ times the area of $U$ in the metric given by $c_1(L,h)$. In Theorem \ref{thm:1.2.1} we prove this result in our setting and show that the probability that a section $s_p$ has an excess or deficiency of zeros in $U$ (when centered around its typical value) decreases at rate $\exp(-Cp^2)$, this being consistent with the decay obtained in Sodin \cite{So00} cited above. \subsection{Geometric setting: punctured Riemann surfaces} We will use the notation $\overline{\Sigma}$ to denote a compact Riemann surface and write $D=\{a_{1},\ldots, a_{N}\}\subset \overline{\Sigma}$ for a finite set. The induced punctured Riemann surface will be denoted by $\Sigma=\overline{\Sigma}\backslash D,$ and $\omega_{\Sigma}$ will be a Hermitian form on $\Sigma$. We furthermore let $L$ be a holomorphic line bundle on $\overline{\Sigma}$, and denote by $h$ a singular Hermitian metric on $L$ satisfying the following properties: \begin{enumerate} [label=(\greek*)] \item \label{item:alpha} $h$ is smooth over $\Sigma$, and for all $j \in \{ 1, \ldots, N\}$ there is a trivialization of $L$ in the complex neighborhood $\overline{V}_{j}$ of $a_{j}$ in $\overline{\Sigma}$, with associated coordinate $z_{j}$ such that $|1|^{2}_{h}(z_{j}) = |\log(|z_{j}|^{2})|$. \item \label{item:beta} There exists $\varepsilon_{0}>0$ such that the (smooth) curvature $R^{L}$ of $h$ satisfies $iR^{L} \geq \varepsilon_{0} \omega_{\Sigma}$ over $\Sigma$ and moreover, $iR^L =\omega_{\Sigma}$ on $V_j :=\overline{V}_j\backslash\{a_{j}\}$; in particular, $\omega_{\Sigma} = \omega_{\mathbb{D}^{*}}$ in the local coordinate $z_{j}$ on $V_{j}$ and $(\Sigma,\omega_{\Sigma})$ is complete. \end{enumerate} Here, $\omega_{\mathbb{D}^{*}}$ denotes the Poincar\'{e} metric on the punctured unit disc $\mathbb{D}^{*}$, normalized as \begin{equation} \omega_{\mathbb{D}^{*}}=\frac{idz\wedge d\overline{z}}{|z|^{2}\log^{2}(|z|^{2})}\,\cdot \label{eq:1.1.1} \end{equation} Since $h$ is assumed to be a Hermitian metric, on the local chart $V_{j}$ as in Assumption \ref{item:alpha}, the coordinate $z_{j}$ has norm strictly less than $1$, so that the area (volume) of $V_{j}$ with respect to measure $\omega_{\Sigma}$ is finite. Let $J\in\mathrm{End}(T\Sigma)$ denote the complex structure of $\Sigma$ and write $g^{T\Sigma}=\omega_{\Sigma}(\cdot,J\cdot)$ for the complete Riemannian metric on $\Sigma$, so that the corresponding Riemannian volume element is exactly $\omega_{\Sigma}$. For $x\in\Sigma$ and $v\in T_{x}\Sigma$ we denote by $\Vert v\Vert$ the norm of $v$ with the metric $g^{T\Sigma}_{x}$. For $x,y\in \Sigma$, we write $\mathrm{dist}(x,y)$ for their Riemannian distance. Furthermore, for $x\in\Sigma$ we set \begin{equation} a(x)=iR^{L}_{x}/\omega_{\Sigma,x}\geq\varepsilon_{0}>0. \end{equation} For $p\geq 1$, we denote by $h^{p}:=h^{\otimes p}$ the metric induced by $h$ on $L^{p}|_{\Sigma}$. We write $H^{0}(\Sigma, L^{p})$ for the space of holomorphic sections of $L^{p}$ on $\Sigma$ and $\mathcal{L}^{2}(\Sigma, L^{p})$ for the space of $\mathcal{L}^{2}$-sections of $L^{p}$ on $\Sigma$. Set \begin{equation} H^{0}_{(2)}(\Sigma, L^{p}) =H^{0}(\Sigma, L^{p})\cap\mathcal{L}^{2}(\Sigma, L^{p}) =\Big\{s\in H^{0}(\Sigma, L^{p})\;:\; \|s\|^{2}_{\mathcal{L}^{2}}:=\int_{\Sigma}|s|_{h^{p}}^{2}\, \omega_{\Sigma}<\infty\Big\}, \label{eq:1.1.2} \end{equation} which we tacitly assume to be endowed with the $\mathcal{L}^{2}$-metric. Then the sections in $H^{0}_{(2)}(\Sigma, L^{p})$ extend to holomorphic sections of $L^{p}$ over $\overline{\Sigma}$, i.e. \begin{equation} H^{0}_{(2)}(\Sigma, L^{p})\subset H^{0}(\overline{\Sigma}, L^{p}). \end{equation} Moreover, for $p\geq 2$, elements in $H^{0}_{(2)}(\Sigma, L^{p})$ are exactly the sections in $H^{0}(\overline{\Sigma}, L^{p})$ vanishing on the puncture divisor $D$. In the sequel, we write $c_{1}(L,h)$ for the first Chern form of $(L,h)$, i.e. \begin{equation} c_{1}(L,h)=\frac{i}{2\pi}R^{L}. \label{eq:1.2.2paris} \end{equation} Hence, as a volume form on $\Sigma$ we have $c_{1}(L,h) \geq \frac{\varepsilon_{0}}{2\pi}\omega_{\Sigma}$ due to \ref{item:alpha}. We furthermore set \begin{equation} d_{p}=\dim H^{0}_{(2)}(\Sigma, L^{p})<\infty \end{equation} and denote by $\chi(\Sigma)$ the Euler characteristic number of the punctured Riemann surface $\Sigma.$ Then, as a consequence of the Riemann-Roch Theorem, we infer that \begin{equation} d_{p}=p\deg(L)+\chi(\Sigma), \label{eq:dpL} \end{equation} where $\deg(L)=\int_{\Sigma}c_{1}(L,h)<\infty$. Furthermore, we will denote the Schwartz kernel of the orthogonal projection from $\mathcal{L}^{2}(\Sigma,L^{p})$ onto $H^{0}_{(2)}(\Sigma, L^{p})$, called Bergman kernel, by $B_{p}(x,y)$ for $x, y\in \Sigma$. If $S^{p}_{j}$, $j=1,\ldots, d_{p}$ is an orthonormal basis of $H^{0}_{(2)}(\Sigma, L^{p})$ with respect to the $\mathcal{L}^{2}$ inner product, then \begin{equation} B_{p}(x,y)=\sum_{j=1}^{d_{p}}S^{p}_{j}(x)\otimes S^{p,*}_{j}(y)\in L^{p}_{x}\otimes L^{p,*}_{y}, \quad\text{for $x,y\in \Sigma$,} \end{equation} where the duality is defined by $h^{p}$. In particular, $B_{p}(x,x)$ is a positive function in $x\in\Sigma$. \subsection{Probabilistic setting} \label{section1.3prob} For each $p\in \mathbb{N}$, we will endow $H^{0}_{(2)}(\Sigma, L^{p})$ with a probability measure $\Upsilon_{p}$ and hence obtain a sequence of probability spaces $(H^{0}_{(2)}(\Sigma, L^{p}),\Upsilon_{p})_{p\in\mathbb{N}}$. In order to construct the sequence $\{\Upsilon_{p}\}_{p\in \mathbb{N}}$ we proceed as follows. For each $p\in\mathbb{N}$, we fix an orthonormal basis $O_{p}=\{S^{p}_{j}\}_{j=1}^{d_{p}}$ for $H^{0}_{(2)}(\Sigma, L^{p})$ with respect to the respective $\mathcal{L}^{2}$-inner products. We assume given a family of independent $\mathbb{C}$-valued random variables $\{\eta^{p}_{j}\}_{p\in\mathbb{N},\, 1\leq j\leq d_{p}}$ such that the following are satisfied: \begin{itemize} \item uniformly bounded densities: each $\eta^{p}_{j}$ admits a probability density function (PDF) $f^{p}_{j}$ on $\mathbb{C}$ with respect to the standard Lebesgue measure on $\mathbb{C}\simeq \mathbb{R}^{2}$, and there exists a constant $M_{0}>0$ such that all $p$ and all $1\leq j\leq d_{p}$, \begin{equation} \sup_{z\in \mathbb{C}} f^{p}_{j}(z)\leq M_{0}; \label{eq:5.1.2} \end{equation} \item uniform lower bound for variances: for each $p$, the random variables $\eta^{p}_{j}$, $1\leq j\leq d_{p}$ are centered (i.e., $\mathbb{E}[\eta^{p}_{j}]=0$) and have the same variance $\sigma^{2}_{p}>0$ ($\sigma_{p}>0$). Moreover, there exists $c_{0}>0$ such that for all $p$, \begin{equation} c_{0}\leq \sigma^{2}_{p} < \infty; \label{eq:5.1.1} \end{equation} \item moment bounds: there exists $C_{0}>0$ such that for all $p,\,1\leq j\leq d_{p}$, we have \begin{equation} \mathbb{E}[|\eta^{p}_{j}|^{d_{p}}]\leq C_{0}(d_{p})^{d_{p}}. \label{eq:5.1.3} \end{equation} \end{itemize} \begin{remark}\label{rk1.3.1} All of the above conditions are rather natural in avoiding degeneracies. Indeed, condition \eqref{eq:5.1.2} limits the concentration of $\eta^{p}_{j}$ in small areas of $\mathbb{C},$ and condition \eqref{eq:5.1.3} avoids an overly fast growth of moments. The conditions are relatively mild in that it is easily seen to be verified for a wide range of distributions including e.g.\ sub-Gaussian or exponential distributions. \end{remark} For each $p\in \mathbb N,$ the orthonormal basis $O_{p}$ induces an identification $H^{0}_{(2)}(\Sigma, L^{p})\simeq \mathbb{C}^{d_{p}}$, where the section $s_{p}=\sum_{j=1}^{d_{p}}z_{j}S^{p}_{j}$ maps to the vector $(z_{1},\ldots, z_{d_{p}})\in\mathbb{C}^{d_{p}}$. Denoting by $\mathrm{dVol}_{p}$ the standard Lebesgue measure on $\mathbb{C}^{d_{p}}\simeq \mathbb{R}^{2d_{p}},$ this naturally induces a probability measure $\Upsilon_{p}$ on $H^{0}_{(2)}(\Sigma, L^{p})$ via \begin{equation} \prod_{j=1}^{d_{p}}f^{p}_{j}(z_{j}) \, \mathrm{dVol}_{p}. \label{eq:5.1.4} \end{equation} For later use, we will abbreviate the respective density as \begin{equation} f^{p}(z_{1},\ldots,z_{d_{p}})=\prod_{j=1}^{d_{p}}f^{p}_{j}(z_{j}). \label{eq:5.1.5} \end{equation} Hence, using the above identification, a random section in $(H^{0}_{(2)}(\Sigma, L^{p}),\Upsilon_{p})$ with distribution $\Upsilon_{p}$ can be written as \begin{equation} s_{p}=\sum_{j=1}^{d_{p}}\eta^{p}_{j} S^{p}_{j}. \label{eq:5.1.5bis} \end{equation} In general, $\Upsilon_{p}$ (and $f^{p}$) depends on both the choice of orthonormal basis $O_{p}$ and the sequence $\{\eta^{p}_{j}\}_{j=1}^{d_{p}}$. In the sequel, we fix -- once and for all -- a choice of the above constants $M_{0}$, $c_{0}$, $C_{0}$. Moreover, most of the constants appearing in our computations through this paper will depend on this choice, but we will not make this dependence explicit in our notation. Some examples of families of probability measures satisfying the above assumptions are given in the following. \begin{example}[Gaussian ensembles]\label{eg:1.3.2} As in \cite{SZZ}, a natural choice for $\Upsilon_{p}$ is taking the sequence $\{\eta^{p}_{j}\}_{p\in\mathbb{N},1\leq j\leq d_{p}}$ to be i.i.d.\ centered complex Gaussian random variables with positive variance. Then the conditions \eqref{eq:5.1.2}--\eqref{eq:5.1.3} are clearly satisfied and in this case $\Upsilon_{p}$ is independent of the choice of basis $O_{p}$. \end{example} \begin{example}[Random sections with bounded coefficients]\label{eg:1.3.3} Let $r_{p}$, $p\in\mathbb{N},$ be a sequence of positive numbers uniformly bounded below by $r>0$. Let $U_{p}$ denote a complex random variable which is uniformly distributed on the disk $D(0,r_{p})\subset \mathbb{C}$. For each $p$, we take $\eta^{p}_{j}$, $1\leq j\leq d_{p},$ to be a sequence of i.i.d.\ random variables with the same distribution as $U_{p}$. Then \begin{equation} \mathbb{E}[|U_{p}|^{d_{p}}]=\frac{2}{d_{p}+2}r_{p}^{d_{p}}, \label{eq:5.1.10DLM} \end{equation} and hence in order to satisfy Condition \eqref{eq:5.1.3} we shall choose $r_{p}\leq d_{p}$ for all $p$. \end{example} \subsection{Main results for punctured Riemann surface}\label{subsection1.4main} Inspired by the work \cite{SZZ}, we start with investigating the supremum norm of random holomorphic sections on open sets. For this purpose, for $U$ a non-empty open subset of $\Sigma$ and $s_{p}\in H^{0}_{(2)}(\Sigma, L^{p})$, we set \begin{equation} \mathcal{M}^{U}_{p}(s_{p})=\sup_{x\in U}|s_{p}(x)|_{h^{p}}<+\infty. \label{eq:5.2.1} \end{equation} For sections $s_{p}$ of unit $\mathcal{L}^{2}$-norm an optimal upper bound for $\mathcal{M}^{U}_{p}(s_{p})$ is given by the square root of the supremum of Bergman kernel function $B_{p}(x,x)$ on $U$. Using the results of \cite{AMM:20} mentioned above, one can get an upper bound for $\mathcal{M}^{U}_{p}(s_{p})$ which grows as $p^{1/2}$ if $U$ is relatively compact in $\Sigma$, and as $p^{3/4}$ otherwise. Note that for the case of cusp forms on arithmetic surfaces (see Section \ref{section4}), $\mathcal{M}^{U}_{p}(s_{p})$ has its own interest and such upper bounds are also obtained by other methods; we refer to \cite{FJK2016,Rudnick2005} for more details. Our first main result concerns the expectation and concentration properties for the random variables $\mathcal{M}^{U}_{p}(s_{p})$. \begin{theorem}\label{thm:1.3.2} Let $\Sigma$ and $(L,h)$ be a punctured Riemann surface and a line bundle satisfying conditions ($\alpha$) and ($\beta$) and $\Upsilon_p$ the measures considered in Section \ref{section1.3prob}. Let $U$ be an open subset of $\Sigma$ with $\partial U$ having zero measures in $\Sigma$. Then there exists a constant $C_{U}>0$ such that for all $p\in\mathbb{N}$ we have \begin{equation} \frac{1}{C_{U}}\,p^{-2}\leq \mathbb{E}[\mathcal{M}^{U}_{p}(s_{p})]\leq C_{U}\,p^{9/4} \,. \label{eq:1.4.2paris} \end{equation} For any $\delta>0$, there exists a constant $C_{U,\delta}>0$ such that for any $p\in\mathbb{N}$ we have \begin{equation} \Upsilon_{p}(\{s_{p}\;:\; |\log{\mathcal{M}^{U}_{p}(s_{p})}|\geq \delta p\})\leq e^{-C_{U,\delta}p^{2}}\,. \label{eq:5.2.2} \end{equation} \end{theorem} For a holomorphic line bundle $E\to\Sigma$ and a holomorphic section $s\in H^0(\Sigma,E)$ which is not identically zero we denote by $\Div(s)=\sum_{s(x)=0}m_x\cdot x$ the divisor of zeros of $s$, where the sum runs over the zeros $x\in\Sigma$ of $s$ and $m_x=\ord_x(s)$ is the multiplicity of $s$ at $x$. Note that the zero set of $s$ is closed and discrete, due to the identity theorem for holomorphic functions. If $s\in H^{0}(\Sigma,E),$ we define the measure of zeros of $s$ by \begin{equation} [\Div(s)]=\sum_{x\in\Sigma, s(x)=0}m_x\,\delta_x\,. \end{equation} In view of the higher dimensional case we note that $[\Div(s)]$ can be identified with a $(1,1)$-current on $\Sigma$. If $(\mu_{p})_{p\in\mathbb{N}}$ is a sequence of $(1,1)$-currents (or measures) on $\Sigma$, we say that it converges weakly to a $(1,1)$-current $\mu$ on $\Sigma$, if \begin{equation}\label{eq:1.4.4DLMbis} \lim_{p\rightarrow\infty}(\mu_{p},\varphi) =(\mu,\varphi )\quad\text{for all $\varphi\in \mathcal{C}_{0}^{\infty}(\Sigma)$}\,, \end{equation} where $\mathcal{C}_{0}^{\infty}(\Sigma)$ denotes the space of smooth compactly supported functions on $\Sigma$. Now we go back to our setting where $E=L^{p}, p=1, 2, \cdots$, and $s_{p}\in H^{0}_{(2)}(\Sigma, L^{p})$. If $U\subset \Sigma$ is an open set, we write \begin{equation} \mathcal{N}^{U}_{p}(s_{p})=\int_U[\Div(s_{p})] \end{equation} to denote the number of zeros (with multiplicities) of $s_{p}$ in $U$, and $\mathrm{Area}^{L}(U)$ to denote the area of $U$ defined by the measures $iR^{L}$. As a consequence of Assumption \ref{item:beta} we have that $\mathrm{Area}^{L}(U)$ is finite. Next we will apply the results in Theorem \ref{thm:1.3.2}, using essentially the well-known Poincar\'{e}-Lelong formula (cf.\ \eqref{eq:1.3.10} below), to study the zeros of random holomorphic section $s_{p}$. In particular, we can infer an upper bound for the hole probabilities. Using Borel-Cantelli type arguments we then also obtain the almost sure convergence of zeros of sequences of holomorphic sections. For this purpose let us introduce the product probability space \begin{equation} (\mathcal{H},\Upsilon)=\prod_{p=1}^{\infty} (H^{0}_{(2)}(\Sigma, L^{p}),\Upsilon_{p}). \end{equation} An element in $\mathcal{H}$ is a sequence $(s_{p})_{p\in\mathbb{N}}$, $s_{p}\in H^{0}_{(2)}(\Sigma, L^{p})$. The results we obtain are stated in the following. \begin{theorem}\label{thm:1.2.1} Let $\Sigma$ and $(L,h)$ be a punctured Riemann surface and a line bundle satisfying conditions ($\alpha$) and ($\beta$) and $\Upsilon_p$ the measures considered in Section \ref{section1.3prob}. (a) $\Upsilon$-almost surely, we have the weak convergence of measures \begin{equation}\label{eq:1.4.4DLM} \lim_{p\rightarrow\infty}\frac{1}{p}[\mathrm{Div}(s_{p})] =c_1(L,h)\:\:\text{on $\Sigma$}\,. \end{equation} (b) If $U$ is an open set of $\Sigma$ with $\partial U$ having zero measure in $\Sigma$, then for any $\delta>0$, there exists a constant $C_{\delta,U}>0$ such that for $p\gg 0$ the following holds: \begin{equation}\label{eq:1.4.5DLM} \Upsilon_{p}\Big(\Big\{s_{p}\;:\; \Big|\frac{1}{p}\mathcal{N}^{U}_{p}(s_{p})- \frac{\mathrm{Area}^{L}(U)}{2\pi}\Big| >\delta\Big\}\Big)\leq e^{-C_{\delta,U}p^{2}}. \end{equation} \end{theorem} We will give a quick proof of item (a) by using Theorem \ref{thm:1.3.5}. It follows actually from \cite[Theorem 5.1]{CM11} that the convergence of currents in (a) takes place on $\overline{\Sigma}$. Our emphasis here is on item (b). As a consequence of \eqref{eq:1.4.5DLM}, choosing $\delta=\mathrm{Area}^{L}(U)/2\pi$ we infer the following estimates on the hole probabilities. \begin{corollary}\label{C:1.2.2} If $U$ is a nonempty open set of $\Sigma$ with $\partial U$ having zero measure in $\Sigma$, then there exists a constant $C_{U}>0$ such that for $p\gg 0,$ \begin{equation} \Upsilon_{p}(\{s_{p}\;:\; \mathcal{N}^{U}_{p}(s_{p})=0\}) \leq e^{-C_{U}p^{2}}. \end{equation} \end{corollary} Note that in the above statements, we can take $U$ to be noncompact in $\Sigma$, i.e., an open neighborhood of the punctured points. In particular, for the cusped hyperbolic surfaces investigated in Section \ref{section4}, our results can be used to study the zeros of cusp forms near cusps. Moreover, in the case of Gaussian ensembles, we also have a lower bound estimate for the hole probabilities of matching exponential order for Corollary \ref{C:1.2.2}. \begin{proposition}\label{prop:1.2.3} Suppose that $\{\Upsilon_{p}\}_{p\in\mathbb{N}}$ is defined as in Example \ref{eg:1.3.2} with $\sigma_{p}=1$. If $U$ is a relatively compact open subset of $\Sigma$ such that $\partial U$ has zero measure in $\Sigma$, and if there exists a section $\tau\in H^{0}_{(2)}(\Sigma, L)$ such that it does not vanish in $\overline{U}\subset \Sigma$, then there exists $C'_{U}>0$ such that for $p\gg 0$, \begin{equation} \Upsilon_{p}(\{s_{p}\;:\; \mathcal{N}^{U}_{p}(s_{p})=0\})\geq e^{-C'_{U}p^{2}}. \label{eq:1.2.4} \end{equation} Fix an integer $k_{0}\geq 2$. For each $a_{j}\in D$, there exists $r_{j}\in\; ]0,\frac{1}{2}[$ and $\tau_{j}\in H^{0}_{(2)}(\Sigma, L^{k_{0}})$ such that $\tau_{j}$ has no zeros in $\mathbb{D}^{*}_{2r_{j}}\subset V_{j}$ described in Assumption \ref{item:beta}. For $0<r<r_{j}$, set $\mathbb{D}(r,r_{j})=\{z\in \mathbb{C}\;:\; r< |z|< r_{j}\}\subset\mathbb{D}^{*}_{r_{j}}\subset V_{j}$. Then there exists $c_{j}>0$ such that for $0<r<r_{j}$, we have \begin{equation} \Upsilon_{pk_{0}}\big(\big\{s_{pk_{0}}\;:\; \mathcal{N}^{\mathbb{D}(r,r_{j})}_{pk_{0}}(s_{pk_{0}})=0\big\}\big)\geq e^{- c_{j}|\log{r}|p^{2}}=r^{c_{j}p^{2}},\;\forall\, p\gg 0. \label{eq:1.2.5} \end{equation} \end{proposition} In the next subsection we provide some intermediate results, which are of independent interest and which will play an important role on our way to proving the results given above. \subsection{Intermediate results: an approach to Theorem \ref{thm:1.2.1}}\label{subs1.3} The normalized Bergman kernel is defined as \begin{equation} P_{p}(x,y)=\frac{|B_{p}(x,y)|_{h^{p}_{x}\otimes h_{y}^{p,\ast}}}{\sqrt{B_{p}(x,x)}\sqrt{B_{p}(y,y)}}, \quad x,y\in \Sigma. \label{eq:1.3.1} \end{equation} A near-diagonal estimate on $P_{p}(x,y)$ plays a central role in our computations. In the case of compact K\"{a}hler manifolds, such results were established in \cite[Propositions 2.6 and 2.7]{SZ08} as well as in \cite[Proposition 2.1]{SZZ}. In our setting, we will take advantage of the Bergman kernel expansion for complete, possibly noncompact, Hermitian manifolds obtained by Ma and Marinescu in \cite[Theorems 4.2.1 \& 6.1.1]{MM07}. \begin{theorem}\label{thm:1.3.1} Let $U$ be a relatively compact open subset of $\Sigma$, then we have the following uniform estimate on the normalized Bergman kernel. Fix $k\geq 1$ and $b>\sqrt{16k/\varepsilon_{0}}$. Then: \begin{enumerate} [label=(\alph*)] \item There exists $C>0$ such that for all $p\in\mathbb{N}_{\geq 2}$ and for all $x,y\in U$ with $\mathrm{dist}(x,y) \geq b\sqrt{\frac{\log p}{p}}$ we have $P_{p}(x,y)\leq C p^{-k}$. \item For $p\geq 2$, there exist functions $G_p:\Big\{(x,y)\in U\times U:\mathrm{dist}(x,y) \leq b\sqrt{\frac{\log p}{p}} \Big\}\to\mathbb{R}$ such that $\sup G_p\to 0$ as $p\rightarrow\infty$ such that \begin{equation} P_{p}(x,y)= (1+ G_{p}(x,y))\exp\Big(-\frac{a(x)p}{4}\mathrm{dist}(x,y)^{2} \Big). \label{eq:1.5.2July} \end{equation} \end{enumerate} \end{theorem} Note that under the higher dimensional setting in Subsection \ref{section1.6}, an analog of the above results still holds true (cf.\ Theorem \ref{thm:5.1.1}). These estimates, together with a crucial inequality for the marginal densities of $\Upsilon_{p}$ proved in Proposition \ref{prop:boundmarginal}, are the key ingredients of our proof of \eqref{eq:5.2.2} in Theorem \ref{thm:1.3.2}. As a consequence, we obtain the following proposition. \begin{proposition}\label{prop:1.3.3} Let $U$ be a relatively compact open subset in $\Sigma$ such that $\partial U$ has zero measure in $\Sigma$. For any $\delta>0$, there exists $C_{U,\delta}>0$ such that for all $ p\gg 0$, \begin{equation} \Upsilon_{p}\Big(\Big\{s_{p}\;:\; \int_{U}\big|\log{|s_{p}|_{h^{p}}}\big| \,\omega_{\Sigma}\geq \delta p\Big \} \Big)\leq e^{-C_{U,\delta}p^{2}}. \label{eq:1.3.5} \end{equation} \end{proposition} Note that the estimate \eqref{eq:1.3.5} is a version of \cite[Lemma 1.6]{SZZ}. To prove it, we use here Theorem \ref{thm:1.3.2} (cf.\ Subsection \ref{subs3.3}) instead of \cite[Theorem 3.1]{SZZ}. But since $\omega_{\Sigma}$ is singular near punctures, the estimate \eqref{eq:1.3.5} does not hold if we take $U=\Sigma$. Indeed, as we will see in Subsection \ref{subs3.3}, $\big|\log{|s_{p}|_{h^{p}}}\big|$ is not integrable with respect to $\omega_{\Sigma}$ near the punctures. Using the Poincar\'{e}-Lelong formula, Proposition \ref{prop:1.3.3} leads us to the next result, so that Theorem \ref{thm:1.2.1} will be one of its consequences. \begin{theorem}\label{thm:1.3.5} If $\varphi\in \mathcal{C}^{\infty}(\overline{\Sigma})$ is such that $\varphi$ is locally constant in an open neighborhood of $D$, then for $\delta>0$, there exists $C_{\varphi,\delta}>0$ such that for $p\gg 0$, we have \begin{equation} \Upsilon_{p}\Big( \Big\{s_{p}\;:\; \Big| \Big( \frac{1}{p}[\mathrm{Div}(s_{p})],\varphi \Big) -\int_{\Sigma}\varphi c_{1}(L,h)\Big|>\delta \Big \} \Big)\leq e^{-C_{\varphi,\delta}p^{2}}, \label{eq:3.4.11} \end{equation} where the sum in \eqref{eq:3.4.11} is taking into account the multiplicities of the zeros. \end{theorem} We would like to point out the difference between \eqref{eq:3.4.11} here and the one proved in \cite[Theorem 1.5]{SZZ}. Indeed, for $p\geq 2$, the section $s_{p}$ always vanishes at the punctures as specified by $D$. Denoting by $\mathrm{ord}_{a_{j}}(s_{p})\geq 1$ the vanishing order of $s_{p}$ at $a_{j} \in D$, we infer that \begin{equation} \mathcal{N}^{\overline{V}_{j}}_{p}(s_{p})= \mathcal{N}^{V_{j}}_{p}(s_{p})+\mathrm{ord}_{a_{j}}(s_{p}), \label{eq:1.3.8} \end{equation} where $\overline{V}_{j}$, $V_{j}$ are open sets as in Assumptions \ref{item:alpha} and \ref{item:beta}. In terms of divisors on $\overline{\Sigma}$, we can then rewrite \eqref{eq:1.3.8} as \begin{equation} [\mathrm{Div}_{\overline{\Sigma}}(s_{p})]= [\mathrm{Div}(s_{p})]+\sum_{j}\mathrm{ord}_{a_{j}}(s_{p})\delta_{a_{j}}, \label{eq:1.3.9} \end{equation} where we view $[\mathrm{Div}(s_{p})]$ as a divisor on $\overline{\Sigma}$. Note that $h$ is a singular Hermitian metric of $L$ over $\overline{\Sigma}$, but for any smooth function $\varphi$ on $\overline{\Sigma}$, the Poincar\'{e}-Lelong formula still holds true \cite[Theorem 2.3.3]{MM07}, i.e., \begin{equation} ( [\mathrm{Div}_{\overline{\Sigma}}(s_{p})],\varphi )=\frac{i}{\pi}(\partial\overline{\partial}\log|s_{p}|_{h^{p}},\varphi)+p ( c_{1}(L,h),\varphi ). \label{eq:1.3.10} \end{equation} Comparing \eqref{eq:1.3.9} and \eqref{eq:1.3.10} with the event in \eqref{eq:3.4.11}, we see that in order to obtain Theorem \ref{thm:1.3.5}, it is sufficient to control the vanishing orders $\mathrm{ord}_{a_{j}}(s_{p})$ in a uniform way for $p\gg 0$ and for arbitrary $s_{p},$ except for possibly subsets of small probability. Indeed, we have the following result. \begin{lemma}\label{lm:1.3.6} There exist $p_{0}> 0$, $k_{0}>0$ such that for any $p\geq p_{0}$, the following inequalities hold $\Upsilon_{p}$-almost surely, \begin{equation} \mathrm{ord}_{a_{j}}(s_{p})\leq k_{0}, \;\forall\, a_{j}\in D. \label{eq:1.3.11} \end{equation} \end{lemma} This lemma will be restated as Lemma \ref{lm:3.4.1} in a more concrete way, and its proof relies on the positivity of $L$ on $\overline{\Sigma}$, which is given in Subsection \ref{subs3.4}. \subsection{Higher dimensional Hermitian manifolds}\label{section1.6} In Section \ref{section:higherdim}, we provide extensions of our results (with suitable adaptations) to higher dimensional complex manifolds. Since our method relies on the Bergman kernel expansions, we adopt the geometric settings as in \cite[Chapter 6]{MM07} and \cite{DMS12}. Let $(X,J,\omega)$ be an $m$-dimensional complex Hermitian (not necessarily compact) manifold where $J$ denotes the complex structure and $\omega$ is a positive $(1,1)$ form. To $\omega$ we associate a $J$-invariant Riemannian metric $g^{TX}$ defined by $g^{TX}(u,u)=\omega(u,Jv)$ for all $u,v\in T_xX$ and $x\in X$. We assume that $(X,g^{TX})$ is complete. If $U\subset X$ is open, let $\Omega^{p,q}_{0}(U)$ denote the set of smooth differential forms on $U$ of bi-degree $(p,q)$ which have compact support in $U$. In particular, $\mathcal{C}^{\infty}_{0}(U)=\Omega^{0,0}_{0}(U)$. Let $(L,h)$ be a holomorphic line bundle over $X$. We still denote the Chern curvature form of $L$ by $R^L$, and let $R^{\mathrm{det}}$ be the curvature of the holomorphic connection $\nabla^{\mathrm{det}}$ on $K_X^*=\det(T^{(1,0)}X)$ with the Hermitian metric induced by $g^{TX}$. In addition we assume that there exists $\varepsilon_{1}>0$, $C_{1}>0$ such that \begin{equation}\label{A1} i R^{L}>\varepsilon_{1} \omega,\ \ \ \ \ i R^{\det}>-C_{1} \omega, \ \ \ \ \ \ \ |\partial \omega|_{g^{TX}}<C_{1}. \end{equation} Some remarks: \begin{enumerate} \item If $(X,\omega)$ is K\"ahler then $\partial \omega=0$ and the second condition in (\ref{A1}) is trivially satisfied. Moreover, in this case, $i R^{\det}=\mathrm{Ric}_{\omega}$, where $\mathrm{Ric}_{\omega}$ is the Ricci curvature associated with $g^{TX}$. \item The assumptions in (\ref{A1}) are the necessary conditions to ensure that one can apply the H\"{o}rmander-Andreotti-Vesentini $L^{2}$-estimates for $\overline{\partial}.$ In our context, these conditions imply actually the asymptotics of the Bergman kernel on compact sets of $X$ (cf. \cite[Theorem 6.1.1]{MM07}). \end{enumerate} Let $\mathcal{C}_0^{\infty}(X,L^p)$ denote the space of compactly supported smooth sections on which we define a scalar inner product by \begin{equation}\label{norm} \langle s_1,s_2\rangle:=\int_X\langle s_1(x),s_2(x)\rangle_{h_p} \mathrm{dV}(x) \end{equation} where $h^{p}=(h^{L})^{\otimes p}$ and $\mathrm{dV}=\frac{1}{m!}\omega^m$ is the volume form induced by $\omega$. We also let $\mathcal{L}^{2}(X,L^p)$ be the Hilbert space obtained by completing $\mathcal{C}_0^{\infty}(X,L^p)$ with respect to the norm $\|\cdot\|_p$ induced by (\ref{norm}). Here we consider Hilbert space of holomorphic sections \begin{equation} H_{(2)}^0(X,L^p):= \mathcal{L}^{2}(X,L^p) \cap H^0(X,L^p). \label{eq:6.0.3} \end{equation} In addition, we assume that for $p\in\mathbb{N}$, $d_{p}=\dim_{\mathbb{C}} H_{(2)}^0(X,L^p)$ is finite, and that as $p\rightarrow \infty$, \begin{equation} d_{p}=\mathcal{O}(p^{m}). \label{eq:6.0.4} \end{equation} This hypothesis is satisfied in several geometric situations. The punctured Riemann surface discussed in previous subsections is an example of complex dimension one. We will give other examples in the Section \ref{section:higherdim}. For $s_{p}\in H^{0}_{(2)}(X,L^{p})$ let $Z_{s_{p}}$ denote the zero set of $s_{p}$, i.e., \begin{equation} Z_{s_{p}}=\{x\in X\;:\; s_{p}(x)=0\}. \label{eq:6.1.8} \end{equation} For a nonzero $s_{p}$, $Z_{s_{p}}$ is a complex $(m-1)$-dimensional hypersurface. We define the divisor of $s_p$ by $\Div (s_p)= \sum_V \ord_V (s_p)\cdot V$ where the sum runs over all irreducible analytic hypersurfaces $V$ of $Z_{s_p}$ and $\ord_V (s_p)\in\mathbb{Z}$ is the order of $s_p$ along $V$. For any hypersurface $V$ we denote by $[V]$ the current of integration on $V$ and by $[\Div(s_{p})]=\sum_V \ord_V (s_p)[V]$ the current of integration on $\Div(s_{p})$. This is a $(1,1)$-current. Consider the product probability space \begin{equation} (\mathcal{H},\Upsilon)=\prod_{p=1}^{\infty} (H^{0}_{(2)}(X, L^{p}),\Upsilon_{p}). \end{equation} When $\Upsilon_{p}, p\in\mathbb{N}$, are defined from Gaussian ensembles (Example \ref{eg:1.3.2}), Dinh, Marinescu and Schmidt \cite[Theorem 1.2]{DMS12} showed that the zero-divisors of generic random sequences $(s_{p})_{p}\in \prod^{\infty}_{p=1} H_{(2)}^0(X,L^p)$ are equidistributed with respect to $c_{1}(L,h^{L})$. For proving this result, they actually gave a convergence speed for the divisors as follows. \begin{theorem}[\protect{\cite[Theorem 1.5]{DMS12}}] \label{thm:6.1} If $U$ is a relatively compact open subset of $X$, then there exists a constant $c=c(U)>0$ and a positive integer $p(U)$ with the following property. For any positive number sequence $(\lambda_{p})_{p\in\mathbb{N}}$ with $\lim_{p\rightarrow \infty}\lambda_{p}/\log{p}=\infty$, and for any $p\geq p(U)$ and $\varphi\in \Omega^{m-1,m-1}_{0}(U)$, we have \begin{equation} \Upsilon_{p}\Big(\Big\{s_{p}\;:\; \bigg|\Big(\frac{1}{p}[\mathrm{Div}(s_{p})] -c_{1}(L,h),\varphi\Big)\bigg|>\frac{\lambda_{p}}{p}\Vert \varphi\Vert _{\mathcal{C}^{2}} \Big\}\Big) \leq cp^{2m}e^{-\lambda_{p}/c}, \label{eq:6.0.5} \end{equation} where $\Vert \cdot\Vert _{\mathcal{C}^{2}}$ denote the $\mathcal{C}^{2}$-norm of smooth sections. \end{theorem} Following \cite[Theorem 1.1]{SZZ}, if we want to get the probability bound like $e^{-c'p^{m+1}}$ in \eqref{eq:6.0.5}, we shall take the sequence $\lambda_{p}=p^{m+1}$, thus \eqref{eq:6.0.5} gives \begin{equation} \Upsilon_{p}\Big(\Big\{s_{p}\;:\; \bigg|\Big(\frac{1}{p}[\mathrm{Div}(s_{p})] - c_{1}(L,h),\varphi\Big)\bigg|> p^{m}\Vert \varphi\Vert _{\mathcal{C}^{2}} \Big\}\Big)\leq cp^{2m}e^{-p^{m+1}/c}. \label{eq:6.0.6} \end{equation} This is clearly a weaker version of the estimate as in Theorem \ref{thm:1.2.1}. Now let $\Upsilon_{p}, p\in\mathbb{N}$ be the probability measures on $H^{0}_{(2)}(X,L^{p})$, $p\in\mathbb{N}$ constructed in Subsection \ref{section1.3prob} (not necessarily assumed to be Gaussian). Note that in Condition \eqref{eq:5.1.3}, we have $d_{p}=\mathcal{O}(p^{m})$. For this higher dimensional setting, we will prove the following results. \begin{theorem}\label{thm:1.6.1} Let $U$ be a relatively compact open subset of $X$ with $\partial U$ having zero measures in $X$. Then there exists a constant $C_{U}>0$ such that for any $p\in\mathbb{N}$ \begin{equation} \frac{1}{C_{U}}\,p^{-m-1}\leq \mathbb{E}[\mathcal{M}^{U}_{p}(s_{p})]\leq C_{U}\,p^{2m}. \label{eq:1.6.7paris} \end{equation} For any $\delta>0$, there exists a constant $C_{U,\delta}>0$ such that for any $p\in\mathbb{N}$, \begin{equation} \Upsilon_{p}(\{s_{p}\;:\; |\log{\mathcal{M}^{U}_{p}(s_{p})}|\geq \delta p\})\leq e^{-C_{U,\delta}p^{m+1}}. \label{eq:1.6.8paris} \end{equation} \end{theorem} Then we can get the following improvement of \eqref{eq:6.0.6}. \begin{theorem} \label{thm:6.2} If $U$ is a relatively compact open subset of $X$, then for any $\delta >0$ and $\varphi\in \Omega^{m-1,m-1}_{0}(U)$, there exists a constant $c=c(U,\delta,\varphi)>0$ such that for $p\in\mathbb{N}$, we have \begin{equation} \Upsilon_{p}\left(\left\{s_{p}\;:\; \bigg|\Big(\frac{1}{p}[\mathrm{Div}(s_{p})] - c_{1}(L,h),\varphi\Big)\bigg|>\delta \right\}\right)\leq e^{-c\,p^{m+1}}. \label{eq:6.0.7} \end{equation} Moreover, $\Upsilon$-almost surely we have the weak convergence of $(1,1)$-currents, \begin{equation}\label{eq:1.6.2DLM} \lim_{p\rightarrow\infty}\frac{1}{p}[\mathrm{Div}(s_{p})] =c_1(L,h)\,. \end{equation} \end{theorem} Since $c_{1}(L,h)$ is positive, then $\frac{c_{1}(L,h)^{m}}{m!}$ defines a positive volume element on $X$. If $U\subset X$ is open, set \begin{equation} \mathrm{Vol}^{L}_{2m}(U)=\int_{U} \frac{c_{1}(L,h)^{m}}{m!}. \label{eq:1.6.8DLM} \end{equation} We will see in \eqref{eq:5.1.2DLM} that this volume is always finite. For $s_{p}\in H^{0}_{(2)}(X,L^{p})$, we define the $(2m-2)$-dimensional volume (with respect to $c_{1}(L,h)$) of $Z_{s_{p}}$ in an open subset $U\subset X$ as follows, \begin{equation} \mathrm{Vol}^{L}_{2m-2}(Z_{s_{p}}\cap U)=\int_{Z_{s_{p}}\cap U} \frac{c_{1}(L,h)^{m-1}}{(m-1)!}\,\cdot \label{eq:6.1.9} \end{equation} As a consequence of Theorem \ref{thm:6.2}, we have the following theorem. \begin{theorem} \label{thm:6.3} If $U$ is a relatively compact open subset of $X$ such that $\partial U$ has zero measure in $X$, then for any $\delta >0$, there exists a constant $c_{U,\delta}>0$ such that for $p$ large enough, we have \begin{equation} \Upsilon_{p}\Big(\Big\{s_{p}\;:\; \Big|\frac{1}{p}\mathrm{Vol}^{L}_{2m-2}(Z_{s_{p}}\cap U) - m\mathrm{Vol}^{L}_{2m}(U) \Big|>\delta \Big \}\Big)\leq e^{-c_{U,\delta} p^{m+1}}. \label{eq:6.1.10} \end{equation} If $U$ is a nonempty open (possibly not relatively compact) set of $X$ with $\partial U$ having zero measure in $X$, then there exists a constant $C_{U}>0$ such that \begin{equation} \Upsilon_{p}(\{s_{p}\;:\; Z_{s_{p}}\cap U=\emptyset\}) \leq e^{-C_{U}p^{m+1}},\, \forall\, p\gg 0. \label{eq:1.6.14paris} \end{equation} \end{theorem} Note that when $X$ is compact and $\omega=iR^{L}$, as well as for the special choice of $\Upsilon_{p}, p\in\mathbb{N},$ as a Gaussian ensemble (cf.\ Example \ref{eg:1.3.2}), the results in Theorems \ref{thm:1.6.1}, \ref{thm:6.2} and \ref{thm:6.3} are exactly the main results proved in \cite{SZZ}. \subsection{Organization of the paper} This paper is organized as follows. In Section \ref{section2bergman}, we recall the estimates of the Bergman kernels for the punctured Riemann surface $\Sigma$. In Subsection \ref{section2.3DLM}, we give a proof of Theorem \ref{thm:1.3.1}. In Section \ref{section3DLM}, we give the proofs of other results stated in Subsections \ref{subsection1.4main} \& \ref{subs1.3}. In particular, Subsections \ref{section3.1DLM} -- \ref{section3.3DLM} are devoted to prove Theorem \ref{thm:1.3.2}. In Subsection \ref{subs3.3}, we only sketch a Proof of Proposition \ref{prop:1.3.3}, since most of the arguments follow from \cite[Subsection 4.1]{SZZ}. In Subsection \ref{subs3.4}, we prove at first Lemma \ref{lm:1.3.6}, and then prove Theorem \ref{thm:1.3.5}. In Subsection \ref{subs3.5}, we prove Theorem \ref{thm:1.2.1} using Theorem \ref{thm:1.3.5}. At last, in Subsection \ref{subs3.6}, we prove Proposition \ref{prop:1.2.3}. In Section \ref{section4}, we give a discussion for hyperbolic surfaces with cusps and of high genus, they are important examples of punctured Riemann surfaces where our results apply. Finally, in Subsection \ref{section:higherdim}, we study the higher dimensional complex Hermitian manifolds, and give the proofs of the results stated in Subsection \ref{section1.6}. \bigskip {\bf Acknowledgment:} We gratefully acknowledge support of DFG Priority Program 2265 \lq Random Geometric Systems\rq. The authors thank Dominik Zielinski for useful discussions. \section{Estimates on Bergman kernel}\label{section2bergman} In this section, we recall some results on the Bergman kernel expansions for our punctured Riemann surface $\Sigma$ obtained by Ma-Marinescu \cite[Chapter 6]{MM07} and by Auvray-Ma-Marinescu \cite{AMM:20}. Note that the results in \cite[Chapter 6]{MM07} are applicable to general Hermitian manifolds and line bundles such as the ones in Subsection \ref{section1.6}; we refer to Section \ref{section:higherdim} for a more detailed discussion. In this section, we focus on $\Sigma$. \subsection{On-diagonal estimates} Recall that the positive smooth function $a$ on $\Sigma$ is defined as follows, for $x\in \Sigma$, \begin{equation} a(x)=\frac{iR^{L}_{x}}{\omega_{\Sigma,x}}\geq \varepsilon_{0}. \label{eq:2.1.1DLM} \end{equation} In our setting (with Assumptions \ref{item:alpha} and \ref{item:beta}), due to \cite[Theorem 6.1.1]{MM07} we have the following result. \begin{theorem}\label{thm:2.1.1} For any compact set $K\subset \Sigma$, we have the uniform asymptotic expansion for $x\in K$, \begin{equation} B_{p}(x,x)=\frac{p}{2\pi}a(x)+\mathcal{O}_{K}(1),\;\mathrm{as\;}p\rightarrow +\infty. \label{eq:2.1.1} \end{equation} \end{theorem} In \cite{AMM:20}, an asymptotic expansion of $B_{p}$ near the punctured points is obtained by studying the Bergman kernel expansion for the punctured disk endowed with the Poincar\'{e} metric. Furthermore, they obtained a global optimal upper bound for $B_{p}$. By \cite[Corollary 1.4]{AMM:20}, we have \begin{equation} \sup_{x\in \Sigma}B_{p}(x,x)=\Big(\frac{p}{2\pi}\Big)^{3/2}+\mathcal{O}(p), \;\mathrm{as\;}p\rightarrow +\infty. \label{eq:2.1.3} \end{equation} \begin{remark} The uniform upper-bound of $B_{p}(x,x)$ given in \eqref{eq:2.1.3} plays an important role in the Proof of Theorem \ref{thm:1.3.2}. In the absence of such uniform upper-bound on the noncompact manifold, we should assume $U$ to be relatively compact in Theorem \ref{thm:1.3.2}. As we will see in Subsection \ref{subs3.6}, the upper-bound of $B_{p}(x,x)$ in \eqref{eq:2.1.3} is also necessary in the proof of \eqref{eq:1.2.5}. \end{remark} \subsection{Off- and near-diagonal estimates} For the off- and near-diagonal expansion of $B_{p}$, we still apply \cite[Theorem 6.1.1]{MM07} to our punctured Riemann surface. \begin{proposition}[{\cite[Theorem 6.1.1]{MM07}}]\label{prop:2.2.1} For any $\ell\in \mathbb{N}$ and $\delta>0$, for any compact subset $K\subset \Sigma$, there exists $C_{\ell,\delta,K}>0$ such that for all $p\in\mathbb{N}$ and $x,y\in K$ with $\mathrm{dist}(x,y)\geq \delta$, \begin{equation} |B_{p}(x,y)|\leq C_{l,\delta,K}\, p^{-\ell}. \label{eq:2.2.1paris} \end{equation} Fix any compact subset $K$, and for any $N\in \mathbb{N}$, there exist $\varepsilon>0,$ functions $\mathcal{F}_{r},$ and constants $C,C'>0$ such that for $x_{0}\in K$, $v,v'\in (T_{x_{0}}\Sigma, g^{T\Sigma}_{x_{0}})$, $\Vert v\Vert,\Vert v'\Vert\leq 2\varepsilon$, we have as $p\to\infty$, \begin{equation} \begin{split} &\bigg|\frac{1}{p}B_{p}(\exp_{x_{0}}(v),\exp_{x_{0}}(v'))-\sum_{r=0}^{N}\mathcal{F}_{r}(\sqrt{p}v,\sqrt{p}v')\kappa^{-1/2}(v)\kappa^{-1/2}(v')p^{-r/2}\bigg|\\ &\leq Cp^{-(N+1)/2}(1+\sqrt{p}\Vert v\Vert+\sqrt{p}\Vert v'\Vert)^{2N+6}\exp(-C'\sqrt{p}\Vert v-v'\Vert)+\mathcal{O}(p^{-\infty})\,. \end{split} \label{eq:2.2.2} \end{equation} \end{proposition} The norm in left-hand side of \eqref{eq:2.2.2} is taken at the point $x_{0}$ after trivializing the line bundle $L$ near $x_{0}$ along the radial geodesic path centered at $x_{0}$ with respect to the Chern connection of $(L,h)$. The function $\kappa$, and the functions $\mathcal{F}_{r}$, $r\in\mathbb{N}$, all depending smoothly on $x_{0}$, will be described more explicitly below (cf.\ \eqref{eq:2.2.3July},\;\eqref{eq:2.2.3}). The term $\mathcal{O}(p^{-\infty})$ is used to denote a decay faster than $p^{-\ell}$ for any $\ell\in\mathbb{N}$. As in the above proposition, for $x_{0}\in K$ and $\varepsilon>0$ sufficiently small, we can identify the Euclidean ball $B^{T_{x_{0}}\Sigma}(0,4\varepsilon)\subset (T_{x_{0}}\Sigma, g^{T\Sigma}_{x_{0}})$ with the geodesic ball $B^{\Sigma}(x_{0},4\varepsilon)\subset \Sigma$ via the local geodesic coordinate centered at $x_{0}$. Let $g^{\Sigma_{0}}$ be a metric on $\Sigma_{0}:=T_{x_{0}}\Sigma\simeq \mathbb{R}^2$ which coincides with $g^{T\Sigma}$ on $B^{T_{x_{0}}\Sigma}(0,2\varepsilon)$, and $g^{T\Sigma}_{x_{0}}$ outside $B^{T_{x_{0}}\Sigma}(0,4\varepsilon)$. Let $dv_{\Sigma_{0}}$ be the Riemannian volume form of $(\Sigma_{0}, g^{\Sigma_{0}})$, and let $dv_{T_{x_{0}}\Sigma}$ denote the Riemannian volume form of $(T_{x_{0}}\Sigma, g^{T\Sigma}_{x_{0}})$. The function $\kappa$ is a positive function on $T_{x_{0}}\Sigma$ such that for $v\in T_{x_{0}}\Sigma$, \begin{equation} dv_{\Sigma_{0}}(v)=\kappa(v)dv_{T_{x_{0}}\Sigma}(v). \label{eq:2.2.3July} \end{equation} In particular, $\kappa(0)=1$. Moreover, when $x_{0}$ varies in the compact set $K$, for $v\in T_{x_{0}}\Sigma$ with $\Vert v\Vert\leq 2\varepsilon$, the function $\kappa(v)$ is uniformly bounded. To describe the function $\mathcal{F}_{r}$, we need to explain the complex coordinate near $x_{0}$. Let $\mathbf{f}$ denote a unit vector of $T^{(1,0)}_{x_{0}}\Sigma$, i.e. $g^{T\Sigma}_{x_{0}}(\mathbf{f},\overline{\mathbf{f}})=1$. Set \begin{equation} \mathbf{e}_{1}=\frac{1}{\sqrt{2}}(\mathbf{f}+\overline{\mathbf{f}}),\; \mathbf{e}_{2}=\frac{i}{\sqrt{2}}(\mathbf{f}-\overline{\mathbf{f}}). \label{eq:2.2.3DLM} \end{equation} Then $\{\mathbf{e}_{1},\mathbf{e}_{2}\}$ is an oriented orthonormal basis of the (real) tangent space $(T_{x_{0}}\Sigma, g^{T\Sigma}_{x_{0}})$. If $v=v_{1}\mathbf{e}_{1}+v_{2}\mathbf{e}_{2}\in T_{x_{0}}\Sigma $, $v_{1}, v_{2}\in\mathbb{R}$, then \begin{equation} v=(v_{1}+i v_{2})\frac{1}{\sqrt{2}}\mathbf{f} +(v_{1}-i v_{2})\frac{1}{\sqrt{2}}\overline{\mathbf{f}}, \end{equation} and we associate it with a complex coordinate $z=v_{1}+i v_{2}\in\mathbb{C}$. In this coordinate, we have $\frac{\partial}{\partial z}= \frac{1}{\sqrt{2}}\mathbf{f}$, and $\Vert \frac{\partial}{\partial z}\Vert=|\frac{\partial}{\partial z}|_{g^{T\Sigma}}=\frac{1}{2}$. Note that, for $z\in\mathbb{C}$, $|z|$ still denotes the standard norm of $z$ as complex number. Now, for $v,v'\in T_{x_{0}}\Sigma$, let $z$, $z'$ denote the corresponding complex coordinates. Set \begin{equation} \mathcal{F}_{r}(v,v')=\mathcal{P}(v,v')\mathcal{J}_{r}(v,v'), \label{eq:2.2.3} \end{equation} where \begin{equation} \label{eq:Pdef} \mathcal{P}(v,v')=\frac{a(x_{0})}{2\pi}\exp \Big (-\frac{1}{4}a(x_{0} )(|z|^{2}+|z'|^{2}-2z\overline{z}') \Big), \end{equation} and \begin{align} \label{eq:Jr} \begin{split} \mathcal{J}_{r}(v,v') &\text{ is a polynomial in $v,v'$ of degree at most $ 3r$,} \\ &\text{whose coefficients are smooth in $x_{0}\in \Sigma$.} \end{split} \end{align} In particular, \begin{equation} \label{eq:J0} \mathcal{J}_{0}=1. \end{equation} The following lemma is elementary. \begin{lemma}\label{lm:2.2.2} The norm of $\mathcal{P}$ satisfies \begin{equation} |\mathcal{P}(v,v')|=\frac{a(x_{0})}{2\pi}\exp \Big(-\frac{1}{4}a(x_{0})\Vert v-v'\Vert ^{2} \Big). \label{eq:2.2.5} \end{equation} \end{lemma} \begin{proof} This follows directly from \eqref{eq:Pdef} in combination with the formula \begin{equation} \begin{split} |z-z'|^{2}&=|z|^{2}+|z'|^{2}-2\Re(z\overline{z}')\\ &=|z|^{2}+|z'|^{2}-2z\overline{z}' +2i\Im(z\overline{z}'), \end{split} \label{eq:2.2.6} \end{equation} where $\Re(\cdot)$, $\Im(\cdot)$ denote, respectively, the real and imaginary parts. By definition, we have $|z-z'|=\Vert v-v'\Vert $. \end{proof} \subsection{Proof of Theorem \ref{thm:1.3.1}}\label{section2.3DLM} We divide our proof into two steps as follows. \noindent \textbf{Step 1:} We start with proving the first estimate in the theorem. Note that $U$ is relatively compact in $\Sigma$, so $\overline{U}$ is compact and Proposition \ref{prop:2.2.1} is applicable. Let $\varepsilon>0$ be the sufficiently small quantity stated in the second part of Proposition \ref{prop:2.2.1}. Then by the first part of the same proposition, if $x,y\in U$ is such that $\mathrm{dist}(x,y)\geq \varepsilon$, we have \begin{equation} |B_{p}(x,y)|\leq C_{k+1,\varepsilon,K}\, p^{-k-1}. \label{eq:3.1.1} \end{equation} We fix a large enough $p_{0}\in\mathbb{N}$ such that \begin{equation} b\sqrt{\frac{\log{p_{0}}}{p_{0}}}\leq \frac{\varepsilon}{2}. \label{eq:3.1.2} \end{equation} For $p>p_{0}$, if $x,y\in U$ is such that $b\sqrt{\frac{\log{p}}{p}}\leq\mathrm{dist}(x,y)< \varepsilon$, then we take advantage of the expansion in \eqref{eq:2.2.2} with $N=2k+1$, $x_{0}=x$, $v=0$, $y=\exp_{x}(v')$, and $v'\in T_{x}\Sigma$, in order to obtain \begin{equation} \begin{split} &\bigg|\frac{1}{p}B_{p}(x,y)-\sum_{r=0}^{2k+1}\mathcal{F}_{r}(0,\sqrt{p}v')\kappa^{-1/2}(v')p^{-r/2}\bigg|\\ &\leq Cp^{-k-1}(1+\sqrt{p}\Vert v'\Vert )^{4k+8}\exp(-C'\sqrt{p}\Vert v'\Vert )+\mathcal{O}(p^{-k-1}). \end{split} \label{eq:3.1.3} \end{equation} Now for $k \ge 1$, there exists a constant $C_{k}>0$ such that for any $r>0$, \begin{equation} (1+r)^{4k+8}\exp(-C'r)\leq C_{k}. \end{equation} Note that $\Vert v'\Vert =\mathrm{dist}(x,y)$. By \eqref{eq:2.2.3}, Lemma \ref{lm:2.2.2} and the fact that $\Vert v'\Vert \geq b\sqrt{\frac{\log{p}}{p}}$, we get \begin{equation} |\mathcal{F}_{r}(0,\sqrt{p}v')|\leq C p^{3r/2}\exp \Big (-\frac{\varepsilon_{0}}{4} b^{2}\log{p} \Big ), \end{equation} where the constant $C>0$ does not depend on $x\in U$, and the number $\varepsilon_{0}$ from Assumption \ref{item:beta} can be taken smaller than $1$. Since we take $b > \sqrt{16k/\varepsilon_{0}}$, then for $r=0,\ldots, 2k+1$, we get \begin{equation} |\mathcal{F}_{r}(0,\sqrt{p}v')\kappa^{-1/2}(v')p^{-r/2}|\leq C p^{-(2k-1)}. \label{eq:3.1.6} \end{equation} Finally, combining \eqref{eq:3.1.1}--\eqref{eq:3.1.6}, we get the first estimate as wanted for any $p>1$. \noindent \textbf{Step 2:} We next prove the second part of our theorem. For this purpose, we only need to consider sufficiently large $p$ such that $b\sqrt{\frac{\log{p}}{p}}\leq \frac{\varepsilon}{2}$, where $\varepsilon$ is given in Step 1. In the expansion \eqref{eq:2.2.2}, we take $x_{0}=x, y=\exp_{x}(v'), N=1$, so $\mathrm{dist}(x,y)=\Vert v'\Vert =|z'|\leq b\sqrt{\frac{\log{p}}{p}}$, where $z'\in\mathbb{C}$ is the complex coordinate for $v'$. We infer \begin{equation} \begin{split} B_{p}(x,y)=&\,p\kappa^{-1/2}(v')\frac{a(x)}{2\pi}\exp \Big(-\frac{1}{4}a(x)p\Vert v'\Vert ^{2}\Big )\\ &+p^{1/2}\kappa^{-1/2}(v')\frac{a(x)}{2\pi}\exp \Big (-\frac{1}{4}a(x)p\Vert v'\Vert ^{2} \Big)\mathcal{J}_{1}(0,\sqrt{p}v')+\mathcal{O}(|\log{p}|^{4}). \end{split} \label{eq:3.1.7} \end{equation} Since $\Vert v'\Vert \leq b\sqrt{\frac{\log{p}}{p}}$, using \eqref{eq:Jr} we infer that $|\mathcal{J}_{1}(0,\sqrt{p}v')|\leq C |\log{p}|^{3/2}$. The previous in combination with \eqref{eq:2.1.1} then supplies us with \begin{equation} \begin{split} \frac{\exp(\frac{1}{4}a(x)p\Vert v'\Vert ^{2})B_{p}(x,y)}{\sqrt{B_{p}(x,x)}\sqrt{B_{p}(y,y)}}&=\frac{pa(x)\kappa^{-1/2}(v')}{\sqrt{B_{p}(x,x)}\sqrt{B_{p}(\exp_{x}(v'),\exp_{x}(v'))}}\\ &\quad +\mathcal{O}(p^{-1/2}|\log{p}|^{3/2} + p^{-1}|\log{p}|^{4})\\ &=1+\mathcal{O}(\Vert v'\Vert +p^{-1/2}|\log{p}|^{3/2} + p^{-1}|\log{p}|^{4})\\ &=1+o(1), \text{ as }p\rightarrow +\infty. \end{split} \label{eq:3.1.8bis} \end{equation} Note that in the definition of $P_{p}$ we have the Hermitian norm of $B_{p}(x,y)$. Since in the asymptotic expansion \eqref{eq:3.1.7} we have trivialized the line bundle near $x$ using the Chern connections, we have \begin{equation} |B_{p}(x,y)|_{h^{p}_{x}\otimes h^{p,*}_{y}}=B_{p}(x,y)+\mathcal{O}(\Vert v'\Vert ). \label{eq:3.1.9bis} \end{equation} Combining \eqref{eq:3.1.8bis} and \eqref{eq:3.1.9bis}, we get the estimate \eqref{eq:1.5.2July} by taking the term $G_{p}(x,y)$ to be the $o(1)$-term in the last equation in \eqref{eq:3.1.8bis}. This completes the proof of Theorem \ref{thm:1.3.1}. \section{Proofs of our results for punctured Riemann surfaces}\label{section3DLM} In the sequel, we adopt the following notation and conventions: for positive functions $f, g: \, \mathbb N \to \mathbb{R},$ we write $f(p)\lesssim g(p)$ if there exists a constant $C>0$ (possibly depending on some given data) such that $f(p)\leq C g(p)$ for all (sufficiently large) $p \in \mathbb N.$ Similarly, we write $f(p)\gtrsim g(p)$ if $f(p)\ge c g(p)$ for some constant $c > 0$ and all (sufficiently large) $p \in \mathbb N.$ Moreover, we write $f(p)\simeq g(p)$ if both $f(p)\lesssim g(p)$ and $f(p)\gtrsim g(p)$ hold. Since the computations of this section are also applicable in the higher dimensional case and for a relatively compact open subset $U$ as described in Subsection \ref{section1.6} and Section \ref{section:higherdim}, we will always emphasize the quantity $d_{p}$ appearing in various estimates of this section. We use the punctured surface $\Sigma$ as an important example for the case $d_{p}\simeq p$. Another advantage of $\Sigma$ is that due to the work of \cite{AMM:20} we can study the divisors in the open subset $U\subset \Sigma$ which is not relatively compact. \subsection{Supremum of norm of random holomorphic sections}\label{section3.1DLM} As introduced above, $s_{p}$ will denote a random section with probability measure $\Upsilon_{p}$. Then $\mathcal{M}^{U}_{p}(s_{p})$ is a positive random variable. In this subsection, we study the expectation $\mathbb{E}[\mathcal{M}^{U}_{p}(s_{p})]$ to understand the {\it typical} value of $\mathcal{M}^{U}_{p}(s_{p})$. For a vector $\eta^{p}=(\eta^{p}_{1},\ldots,\eta^{p}_{d_{p}})\in \mathbb{C}^{d_{p}}$, set $\Vert \eta^{p}\Vert ^{2}=\sum_{j=1}^{d_{p}}|\eta^{p}_{j}|^{2}$. For $x\in U$, and for $s_{p}=\sum_{j\in O_{p}} \eta^{p}_{j}S^{p}_{j}$, we have \begin{equation} |s_{p}(x)|_{h^{p}}\leq \Vert \eta^{p}\Vert B_{p}(x,x)^{1/2}. \label{eq:5.2.1k} \end{equation} The bounds in \eqref{eq:5.1.3} also give the bounds for $\sigma_{p}^{2}$, $p\in \mathbb{N}$. \begin{lemma}\label{lm:5.1.2} There exists a constant $K_{0}>0$ such that for $p\in \mathbb{N}$, \begin{equation} \sigma_{p}^{2}\leq K_{0}d_{p}^{2}. \label{eq:5.1.5new} \end{equation} \end{lemma} \begin{proof} Since $\mathbb{E}[\eta^{p}_{j}]=0$, then $\sigma^{2}_{p}=\mathbb{E}[|\eta^{p}_{j}|^{2}]$. Let $p$ be sufficiently large such that $d_{p}>2$. By Jensen's inequality, we get \begin{equation} \mathbb{E}[|\eta^{p}_{j}|^{2}]^{d_{p}/2}\leq \mathbb{E}[|\eta^{p}_{j}|^{d_{p}}]. \label{eq:5.1.6new} \end{equation} Then \eqref{eq:5.1.5new} follows from the assumption \eqref{eq:5.1.3} for $\eta^{p}_{j}$. \end{proof} \begin{lemma} We have the following inequalities of moments of $\Vert \eta^{p}\Vert $ for $p\in\mathbb{N}$ sufficiently large, \begin{equation} \begin{split} & c_{0}d_{p}\leq \mathbb{E}[\Vert \eta^{p}\Vert ^{2}]\leq K_{0} d^{3}_{p},\\ & \mathbb{E}[\Vert \eta^{p}\Vert ^{d_{p}}] \leq C_{0} (d_{p})^{2d_{p}+1}. \end{split} \label{eq:5.2.2k} \end{equation} Therefore, we have the lower bound estimate for all $p\in\mathbb{N}$ sufficiently large \begin{equation} \mathbb{E}[\Vert \eta^{p}\Vert ]\geq C_{0}^{-\frac{1}{d_{p}-2}} (d_{p})^{-\frac{2d_{p}+1}{d_{p}-2}}(c_0 d_{p})^{\frac{d_{p}-1}{d_{p}-2}}\gtrsim (d_{p})^{-1-\frac{4}{d_{p}-2}}. \label{eq:5.2.2bis} \end{equation} \end{lemma} \begin{proof} Note that by the assumption (cf.\ \eqref{eq:5.1.1}) for $\eta^{p}_{j},$ $1 \le j \le d_p,$, we have \begin{equation} \mathbb{E}[\Vert \eta^{p}\Vert ^{2}]=d_{p}\sigma^{2}_{p}. \label{eq:5.2.4bonn} \end{equation} Then the first inequality in \eqref{eq:5.2.2k} follows directly from \eqref{eq:5.1.1} and \eqref{eq:5.1.5new}, we now prove the second one. For $p$ sufficiently large, we have $d_{p}>3$, set \begin{equation} q=\frac{1}{1-\frac{2}{d_{p}}}>1. \label{eq:5.2.3k} \end{equation} Then \begin{equation} q\frac{d_{p}}{2}\leq d_{p}. \label{eq:5.2.4k} \end{equation} By H\"{o}lder's inequality, we have \begin{equation} \Vert \eta^{p}\Vert ^{d_{p}}\leq \Big (\sum_{j\in O_{p}} |\eta^{p}_{j}|^{d_{p}} \Big) (d_{p})^{q\frac{d_{p}}{2}}. \label{eq:5.2.5k} \end{equation} Then the second inequality in \eqref{eq:5.2.2k} follows directly from \eqref{eq:5.1.3}, \eqref{eq:5.2.4k} and \eqref{eq:5.2.5k}. Set $a=\frac{d_{p}-2}{d_{p}-1}$, $p_{1}=1/a=\frac{d_{p}-1}{d_{p}-2}$, $p_{2}=d_{p}-1$, then by H\"{o}lder's inequality for the pair $(p_{1},p_{2})$, we get \begin{equation} \begin{split} \mathbb{E}[\Vert \eta^{p}\Vert ^{2}]&=\mathbb{E}[\Vert \eta^{p}\Vert ^{a}\Vert \eta^{p}\Vert ^{2-a}]\\ &\leq \mathbb{E}[\Vert \eta^{p}\Vert ]^{1/p_{1}}\mathbb{E}[\Vert \eta^{p}\Vert ^{d_{p}}]^{1/p_{2}}. \end{split} \label{eq:5.2.5bis} \end{equation} Using \eqref{eq:5.2.2k}, the inequality \eqref{eq:5.2.2bis} follows. This completes our proof. \end{proof} By \eqref{eq:2.1.3}, there is a constant $p_{0}\in\mathbb{N}$ (independent of open set $U$) such that for all $p>p_{0}$, \begin{equation} \sup_{x\in U} B_{p}(x,x)< \frac{1}{\pi\sqrt{2\pi}}p^{3/2}. \label{eq:5.2.6} \end{equation} Then we have \begin{equation} \mathcal{M}^{U}_{p}(s_{p})\leq \Vert \eta^{p}\Vert p^{3/4}. \label{eq:5.2.7} \end{equation} \begin{proposition}\label{prop:5.2.2} We have the following inequalities, for sufficiently large $p$, \begin{equation} \begin{split} & \mathbb{E}[\mathcal{M}^{U}_{p}(s_{p})]\leq (K_{0})^{1/2} p^{3/4} d^{3/2}_{p}\lesssim p^{9/4},\\ & \mathbb{E}[\mathcal{M}^{U}_{p}(s_{p})^{d_{p}}] \leq C_{0} (d_{p})^{2d_{p}+1} p^{3d_{p}/4}\lesssim (Cp)^{Cd_{p}}, \mathrm{\;for\;some\;constant\;}C>0. \end{split} \label{eq:5.2.9k} \end{equation} Moreover, \begin{equation} \mathbb{E}[\mathcal{M}^{U}_{p}(s_{p})]\gtrsim p^{-2} \label{eq:5.2.10bis} \end{equation} \end{proposition} \begin{proof} The inequalities in \eqref{eq:5.2.9k} follow directly from $d_{p}\simeq p$, \eqref{eq:5.2.2k}, \eqref{eq:5.2.7} and \begin{equation} \mathbb{E}[\Vert \eta^{p}\Vert ]^{2}\leq\mathbb{E}[\Vert \eta^{p}\Vert ^{2}]. \label{eq:5.2.10} \end{equation} Now we prove the lower bound in \eqref{eq:5.2.10bis}. We fix a point $x_{0}\in U$. Then \begin{equation} |s_{p}|_{h^{p}}^{2}(x_{0})=\sum_{j,l\in O_{p}}\eta^{p}_{j}\overline{\eta}^{p}_{l}h^{p}(S^{p}_{j}(x_{0}), S^{p}_{l}(x_{0})), \label{eq:5.2.11s} \end{equation} and using \eqref{eq:5.1.1} we infer that \begin{equation} \mathbb{E}[|s_{p}(x_{0})|_{h^{p}}^{2}]=\sum_{j\in O_{p}}\mathbb{E}[|\eta^{p}_{j}|^{2}]|S^{p}_{j}(x_{0})|^{2}_{h^{p}}=\sigma^{2}_{p}B_{p}(x_{0},x_{0})\geq c_{0} B_{p}(x_{0},x_{0}). \label{eq:5.2.12s} \end{equation} The second inequality of \eqref{eq:5.2.9k} implies \begin{equation} \mathbb{E}[|s_{p}(z_{0})|_{h^{p}}^{d_{p}}] \leq C_{0} (d_{p})^{2d_{p}+1} p^{3d_{p}/4}. \label{eq:5.2.13s} \end{equation} By the H\"{o}lder's inequality as in \eqref{eq:5.2.5bis}, we get \begin{equation} \mathbb{E}[|s_{p}(x_{0})|_{h^{p}}]\geq \big(c_{0}B_{p}(x_{0},x_{0})\big)^{\frac{d_{p}-1}{d_{p}-2}}\Big(\frac{1}{C_{0} (d_{p})^{2d_{p}+1} p^{3d_{p}/4}}\Big)^{\frac{1}{d_{p}-2}}\gtrsim d_{p}^{-\frac{7/4+2/d_{p}}{1-2/d_{p}}}. \label{eq:5.2.14} \end{equation} Since $d_{p}\simeq p$ and $\mathbb{E}[|s_{p}(x_{0})|_{h^{p}}]\leq \mathbb{E}[\mathcal{M}^{U}_{p}(s_{p})]$, we get \eqref{eq:5.2.10bis}. This finishes our proof. \end{proof} \begin{remark}\label{rm:3.1.4paris} Note that the lower bound $p^{-2}$ in $\eqref{eq:5.2.10bis}$ is clearly non-optimal. By \eqref{eq:5.2.14}, we get the following limit, \begin{equation} \liminf_{p\rightarrow \infty}p^{7/4}\mathbb{E}[\mathcal{M}^{U}_{p}(s_{p})] \geq c_{0}a(x_{0})>0, \label{eq:5.2.18} \end{equation} where we always have $a(x_{0})\geq \varepsilon_{0}>0$. Since $x_{0}\in U$ is arbitrarily chosen, then we get \begin{equation} \liminf_{p\rightarrow \infty}p^{7/4}\mathbb{E}[\mathcal{M}^{U}_{p}(s_{p})] \geq c_{0}\sup_{x\in U}a(x). \label{eq:5.2.19} \end{equation} \end{remark} \begin{remark} If we take a relatively compact open subset $U$ in $\Sigma$, then the estimates in Proposition \ref{prop:5.2.2} can be improved as follows, as $p$ sufficiently large, \begin{equation} \begin{split} p^{-3/2-\delta}\lesssim \mathbb{E}[\mathcal{M}^{U}_{p}(s_{p})]\lesssim p^{2}, \end{split} \label{eq:5.2.20} \end{equation} where $\delta>0$ is any sufficiently small number. \end{remark} Applying the Chebyshev inequality to the second inequality in \eqref{eq:5.2.9k}, we get the following result. \begin{corollary}\label{cor:3.1.6} There exists a constant $C>0$, such that for any sequence $\{\lambda_{p}\}_{p\in \mathbb{N}}$ of strictly positive numbers, we have \begin{equation} \begin{split} \Upsilon_{p}(\big\{s_{p}\;:\; \mathcal{M}^{U}_{p}(s_{p})\geq \lambda_{p}\big\})\lesssim e^{-d_{p}\log\lambda_{p}+Cd_{p}\log p}. \end{split} \label{eq:5.2.21} \end{equation} \end{corollary} \subsection{Uniform bound on the marginal density function}\label{section3.2DLM} In this subsection, we prove an important consequence of \eqref{eq:5.1.2}, i.e., an upper bound on the marginal densities of $\Upsilon_{p}$. We now fix a $p\in \mathbb{N}$. Let $V\subset \mathbb{C}^{d_{p}}$ be a $\mathbb{C}$-subspace of dimension $n\leq d_{p}$, and let $V^{\perp}\subset \mathbb{C}^{d_{p}}$ denote its orthogonal subspace with respect to the standard Hermitian metric on $\mathbb{C}^{d_{p}}$. If $v\in \mathbb{C}^{d_{p}}$, let $v=v_{0}+v_{1}$, $v_{0}\in V, v_{1}\in V^{\perp}$ denote the orthogonal decomposition of $v$. Let $\mathrm{dV}_{0}$, $\mathrm{dV}_{1}$ denote the standard Lebesgue volume elements on $V$, $V^{\perp}$ respectively such that \begin{equation} \mathrm{dVol}_{p}(v)=\mathrm{dV}_{0}(v_{0})\mathrm{dV}_{1}(v_{1}). \label{eq:5.1.6} \end{equation} \begin{proposition}\label{prop:boundmarginal} For $v_{0}\in V$, set \begin{equation} g^{p}_{V}(v_{0})=\int_{v_{1}\in V^{\perp}} f^{p}(v_{0}+v_{1}) \, \mathrm{dV}_{1}(v_{1}). \label{eq:5.1.7} \end{equation} Then $g^{p}_{V}$ is a probability density function on $V$ such that \begin{equation} \sup_{v_{0}\in V}g^{p}_{V}(v_{0})\leq M_{0}^{n}\binom{d_{p}}{n}, \label{eq:5.1.8} \end{equation} where $M_{0}$ is the constant in \eqref{eq:5.1.2}, and $\binom{d_{p}}{n}=\frac{d_{p}!}{n!(d_{p}-n)!}\,\cdot$ \end{proposition} \begin{proof} If $n=d_{p}$ or $0$, the proposition trivially holds true. Hence, without loss of generality we can and do assume $n<d_{p}$ from now on for the rest of the proof. Since $p$ is fixed, we simply set $d=d_{p}, k=d-n>0,$ and we let $E_{1},\ldots, E_{k}$ be an orthonormal basis of $V^{\perp}$. Writing $e_{1}, \ldots, e_{d}$ for the standard orthonormal basis of $\mathbb{C}^{d}$, this corresponds exactly to the sections $S^{p}_{j}$ under the identification $H^{0}_{(2)}(\Sigma, L^{p})\simeq \mathbb{C}^{d_{p}}$. Write for $i=1,\ldots,k$, \begin{equation} E_{i}=\sum_{j=1}^{d} a_{i}^{j}e_{j}, \; a_{i}^{j}\in\mathbb{C}. \label{eq:5.1.9} \end{equation} Let $W_{p}$ denote the matrix $(a_{i}^{j})$ of size $k\times d$, and denote by $W_{p}^{*}$ its complex adjoint matrix. The orthonormality of the basis implies \begin{equation} W_{p}W_{p}^{*}=\mathrm{Id}_{k\times k}. \label{eq:5.1.10} \end{equation} Let $I(d,k)$ denote all subsets of $\{1,\ldots,d\}$ of cardinality $k$, then $|I(d,k)|=\binom{d}{n}$. If $S\in I(d,k)$, let $W_{p,S}$ denote the square matrix consisting of the $k$ columns of $W_{p}$ indexed by $S$ (in the order induced by $S$), and let $W_{p}^{*,S}$ denote the square matrix consisting of $k$ rows of $W^{*}_{p}$ indexed by $S$ (in the order induced by $S$). It is clear that $W_{p}^{*,S}$ is exactly the complex adjoint matrix of $W_{p,S}$. Then, due to the Cauchy-Binet formula (i.e., a generalized Pythagorean or Gougu theorem), we have \begin{equation} 1=\det W_{p}W_{p}^{*}=\sum_{S\in I(d,k)}\det W_{p,S}W_{p}^{*,S}. \label{eq:5.1.11} \end{equation} Now observe that $\det W_{p,S}W_{p}^{*,S}\geq 0,$ and hence due to \eqref{eq:5.1.11} there exists $S_{V}\in I(d,k)$ such that \begin{equation} \det W_{p,S_{V}}W_{p}^{*,S_{V}}\geq \frac{1}{|I(d,k)|}\,\cdot \label{eq:5.1.12} \end{equation} In particular, $W_{p,S_{V}}$ is an invertible square matrix. We now prove \eqref{eq:5.1.8}. Let $t=(t_{1},\ldots, t_{k})$ denote the complex coordinates of $V^{\perp}$ with respect to the basis $E_{i}$, $i=1,\ldots,k$. Then we can write \begin{equation} v_{1}=\sum_{i=1}^{k}t_{i}E_{i}\in V^{\perp}, \; \mathrm{dV}_{1}(t)=\prod_{i=1}^{k}\frac{\sqrt{-1}}{2}dt_{i}\wedge d\overline{t}_{i}. \label{eq:5.1.13} \end{equation} Let $s=(s_{j})_{j\in S_{V}}\in \mathbb{C}^{k}$ be another complex coordinate system of $V^{\perp}$ such that $s_{j}=\sum_{i=1}^{k} t_{i}a^{j}_{i}$. Then $W_{p,S_{V}}$ represents exactly the Jacobian matrix for the holomorphic coordinate change from $t$ to $s$, so that the Jacobian determinant for the real coordinate change is given by $\det W_{p,S_{V}}W_{p}^{*,S_{V}}$. Then for any integrable function $F$ on $\mathbb{C}^{k}$, we have \begin{equation} \int_{t\in\mathbb{C}^{k}}F\Big(\sum_{i=1}^{k} t_{i}a^{j}_{i},j\in S_{V}\Big)\, \mathrm{dV}_{1}(t)=\int_{s\in \mathbb{C}^{k}}F(s)\frac{1}{\det W_{p,S_{V}}W_{p}^{*,S_{V}}} \, \mathrm{dV}_{1}(s). \label{eq:5.1.13bis} \end{equation} Writing $v_{0}=(v_{0}^{1},\ldots, v_{0}^{d})\in V\subset \mathbb{C}^{d}$ we infer that \begin{equation} \begin{split} f^{p}(v_{0}+v_{1})&= \prod_{j\notin S_{V}}f^{p}_{j}\Big(v_{0}^{j}+\sum_{i=1}^{k}t_{i}a^{j}_{i}\Big)\cdot \prod_{j\in S_{V}}f^{p}_{j}\Big(v_{0}^{j}+\sum_{i=1}^{k}t_{i}a^{j}_{i}\Big)\\ &\leq M_{0}^{n}\cdot \prod_{j\in S_{V}}f^{p}_{j}\Big(v_{0}^{j}+\sum_{i=1}^{k}t_{i}a^{j}_{i}\Big), \end{split} \label{eq:5.1.14} \end{equation} where the last inequality follows from \eqref{eq:5.1.2}. Now, applying the formula \eqref{eq:5.1.13bis}, we deduce \begin{equation} g^{p}_{V}(v_{0})\leq \frac{M_{0}^{n}}{\det W_{p,S_{V}}W_{p}^{*,S_{V}}} \int_{s\in \mathbb{C}^{k}} \prod_{j\in S_{V}}f^{p}_{j}(v_{0}^{j}+s_{j})\, \mathrm{dV}_{1}(s) =\frac{M_{0}^{n}}{\det W_{p,S_{V}}W_{p}^{*,S_{V}}}\,\cdot \label{eq:5.1.16} \end{equation} Combining \eqref{eq:5.1.12} with \eqref{eq:5.1.16}, we get \eqref{eq:5.1.8}. This completes our proof. \end{proof} \subsection{Proof of Theorem \ref{thm:1.3.2}}\label{section3.3DLM} Note that the inequality \eqref{eq:1.4.2paris} follows from Proposition \ref{prop:5.2.2}. By Remark \ref{rm:3.1.4paris}, the lower bound in \eqref{eq:1.4.2paris} can be improved to $\frac{1}{C_{U}}p^{-7/4-\epsilon}$ for any given $\epsilon>0$. Now we start to prove \eqref{eq:5.2.2}. Note that \begin{equation} \Big\{s_{p}\;:\; \big|\log{\mathcal{M}^{U}_{p}(s_{p})}\big|\geq \delta p\Big\}\subset \Big\{s_{p}\;:\; \mathcal{M}^{U}_{p}(s_{p})\geq e^{\delta p}\Big\}\cup \Big\{s_{p}\;:\; \mathcal{M}^{U}_{p}(s_{p})\leq e^{-\delta p}\Big\}. \end{equation} Upon choosing $\lambda_{p} = e^{\delta p}$ in \eqref{eq:5.2.21} this entails by $d_{p}\sim p$, \begin{equation} \Upsilon_{p}(\{s_{p}\;:\; \mathcal{M}^{U}_{p}(s_{p})\geq e^{ \delta p}\})\leq e^{-C_{U,\delta}p^{2}}, \forall p\gg 0. \label{eq:53.2.2} \end{equation} Now we consider the probability of $\{\mathcal{M}^{U}_{p}(s_{p}) \le \lambda_{p}\}$ for arbitrary sequences $\{\lambda_{p}\}_{p\in \mathbb{N}}$ of positive numbers less than $1$. We claim that there exist constants $C>0,C'>0$ such that for $p\gg 0$, \begin{equation} \Upsilon_{p}(\big\{s_{p}\;:\; \mathcal{M}^{U}_{p}(s_{p})\leq \lambda_{p}\big\})\leq e^{Cd_{p}\log \lambda_{p} +C'd_{p}\log p}. \label{eq:53.2.7} \end{equation} If we take $\lambda_{p}=e^{-\delta p}$ in \eqref{eq:53.2.7}, we get, with a constant $C_{U,\delta}>0$, \begin{equation} \Upsilon_{p}(\{s_{p}\;:\; \mathcal{M}^{U}_{p}(s_{p})\leq e^{- \delta p}\})\leq e^{-C_{U,\delta}p^{2}}, \forall p\gg 0; \label{eq:53.2.7bis} \end{equation} then inequality \eqref{eq:5.2.2} follows. Therefore, in the sequel, we only focus on proving \eqref{eq:53.2.7}, which is clearly a more general statement than that we actually need. For $U'\subset U$ be a smaller open subset which is relatively compact in $\Sigma$. Then we have \begin{equation} \Upsilon_{p}(\{s_{p}\;:\; \mathcal{M}^{U}_{p}(s_{p})\leq \lambda_{p}\})\leq \Upsilon_{p}(\{s_{p}\;:\; \mathcal{M}^{U'}_{p}(s_{p})\leq \lambda_{p}\}). \label{eq:53.2.8} \end{equation} Fix a point $x_{0}\in U'$ and a $2$-cube $[-t,t]^{2}$ in $\mathbb{R}^{2}\simeq T_{x_{0}}\Sigma$. We choose $t>0$ sufficiently small so that $$F_{t}:=\exp_{x_{0}}([-t,t]^{2})\subset U',$$ and that \begin{equation} \frac{1}{2}\Vert v-u\Vert \leq \mathrm{dist}(\exp_{x_{0}}(v),\exp_{x_{0}}(u))\leq 2\Vert v-u\Vert ,\;\text{for all $v,u\in [-t,t]^{2}$}. \label{eq:53.2.10} \end{equation} Instead of proving directly \eqref{eq:53.2.7}, it is enough to prove the following estimate: \begin{equation} \Upsilon_{p}(\{s_{p}\;:\; \mathcal{M}^{F_{t}}_{p}(s_{p})\leq \lambda_{p}\})\leq e^{Cd_{p}\log \lambda_{p} +C'd_{p}\log p},\: \text{for $p\gg 0$}. \label{eq:53.2.11} \end{equation} The uniform estimates in Theorem \ref{thm:1.3.1} hold for the open set $U'$. While our proof of \eqref{eq:53.2.11} is inspired by the arguments in \cite[Subsection 3.2]{SZZ}, some new computational techniques such as Proposition \ref{prop:boundmarginal} are needed since we are concerned with non-Gaussian ensembles of random variables. For each $p>0$, we consider the lattice points \begin{equation} \Gamma_{p}:= \Big \{(v_{1},v_{2})\in \mathbb{Z}^{2}\;:\; |v_{j}|\leq \frac{t\sqrt{p}}{d} \Big \}. \label{eq:53.2.13} \end{equation} and for $v\in\Gamma_{p}$ we define lattice points on the surface by \begin{equation} x^{p}_{v}=\exp_{x_{0}}\left(\frac{d}{\sqrt{p}}v\right)\in F_{t}, \label{eq:53.2.12} \end{equation} The number of lattice points is given by \begin{equation} n_p:=\sharp\Gamma_{p}= \Big(2\Big[\frac{t\sqrt{p}}{d}\Big]+ 1 \Big)^{2}=\frac{4t^{2}}{d^{2}}p+\mathcal{O}(\sqrt{p})\simeq d_{p}. \label{eq:53.2.14} \end{equation} For $v\in\Gamma_{p}$ we fix some $\lambda_{v}\in L_{x^{p}_{v}}$ with $|\lambda_{v}|_{h}=1$ and set \begin{equation} \xi_{v}=\frac{\langle \lambda_{v}^{\otimes p}, s_{p}(x^{p}_{v})\rangle_{h^{p}}}{B_{p}(x^{p}_{v},x^{p}_{v})^{1/2}}\,\cdot \label{eq:53.2.15} \end{equation} Then $\xi_{v}$ is a complex valued random variable. By Theorem \ref{thm:2.1.1}, for $x^{p}_{v}\in F_{t}$, we have the following uniform estimate for $p\geq 1$ and $v\in\Gamma_{p}$, \begin{equation} B_{p}(x^{p}_{v}, x^{p}_{v})= p \frac{a(x^{p}_{v})}{2\pi}+\mathcal{O}(1), \label{eq:53.2.15bis} \end{equation} Then \eqref{eq:53.2.11} follows from the claim below \begin{equation} \Upsilon_{p}(\{\max_{v}|\xi_{v}|\leq \lambda_{p}\})\leq e^{Cd_{p}\log \lambda_{p} +C'd_{p}\log p},\, \forall\, p\gg 0. \label{eq:53.2.16} \end{equation} Note that $s_{p}=\sum_{j}\eta^{p}_{j}S^{p}_{j}$, so we have \begin{equation} \xi_{v}=\sum_{j}\eta^{p}_{j}\frac{\langle \lambda_{v}^{\otimes p}, S^{p}_{j}(x^{p}_{v})\rangle_{h^{p}}}{B_{p}(x^{p}_{v}, x^{p}_{v})^{1/2}}\,\cdot \label{eq:53.2.17} \end{equation} Recall that $\eta^{p}_{j}$, $j=1,\cdots,d_{p}$ are independently distributed random variables with expectation $\E[\eta^{p}_j]=0$ and uniformly bounded variance $\sigma_{p}^{2}$ as in \eqref{eq:5.1.1}, \eqref{eq:5.1.5new}. Then \begin{equation} c_{0}\leq\mathbb{E}[|\xi_{v}|^{2}]=\sigma_{p}^{2}\leq K_{0} d_{p}^{2}. \label{eq:53.2.18} \end{equation} Let $\Delta_{uv}:=\mathbb{E}[\xi_{u}\overline{\xi}_{v}]$ denote the covariance of $\xi_{u}$ and $\xi_{v}$, for $u,v\in\Gamma_{p}$, and let $\Delta=(\Delta_{uv})_{u,v\in\Gamma_{p}}$ denote the covariance matrix. Then by \eqref{eq:1.3.1}, \eqref{eq:53.2.17}, \begin{equation} \big|\mathbb{E}[\xi_{u}\overline{\xi}_{v}]\big| =\sigma^{2}_{p}P_{p}(x^{p}_{u},x^{p}_{v}). \label{eq:53.2.19} \end{equation} For $b=\sqrt{32/\varepsilon_{0}+1}$ we get by Theorem \ref{thm:1.3.1} that for $p\gg 0$, \begin{equation} \big|\Delta_{uv}\big|\leq\begin{cases} 2\sigma_{p}^{2}\exp(-\frac{a(x^{p}_{u})p}{4} \mathrm{dist}(x^{p}_{u},x^{p}_{v})^{2}) & \text{if } \mathrm{dist}(x^{p}_{u},x^{p}_{v}) \leq b\sqrt{\frac{\log p}{p}}, \\ \sigma_{p}^{2} \mathcal{O}(p^{-2}) & \text{if } \mathrm{dist}(x^{p}_{u},x^{p}_{v}) \geq b\sqrt{\frac{\log p}{p}}, \end{cases} \label{eq:53.2.21} \end{equation} where the constant defining $\mathcal{O}(\cdot)$ is independent of $p$. Fix $u\in \Gamma_{p}$, then by \eqref{eq:53.2.14} and the second estimate in \eqref{eq:53.2.21}, we have \begin{equation} \frac{1}{\sigma^{2}_{p}}\sum_{v\in\Gamma_{p},v\neq u}\big|\Delta_{uv}\big|\leq \sum_{\mathrm{near}}+\mathcal{O}(p^{-1}), \label{eq:53.2.22} \end{equation} where \begin{equation} \sum_{\mathrm{near}}=\sum\Big\{\frac{1}{\sigma^{2}_{p}}\big|\Delta_{uv}\big|\;:\; 0<\mathrm{dist}(x^{p}_{u},x^{p}_{v})\leq b\sqrt{\tfrac{\log p}{p}}\Big\}. \label{eq:53.2.23} \end{equation} Noting that \begin{equation} a(x^{p}_{u})\mathrm{dist}(x^{p}_{u},x^{p}_{v})^{2}> \varepsilon_{0}\frac{d^{2}}{4p}\Vert u-v\Vert ^{2}, \label{eq:53.2.24} \end{equation} the first estimate in \eqref{eq:53.2.21} supplies us with \begin{equation} \begin{split} \sum_{\mathrm{near}}&\leq 2\sum_{v\neq u} e^{-\frac{\varepsilon_{0}d^{2}}{16}\Vert u-v\Vert ^{2}} \leq 2\sum_{v\in\mathbb{Z}^{2},v\neq 0}e^{-\frac{\varepsilon_{0}d^{2}}{16}\Vert v\Vert ^{2}}\\ &\leq b'\int_{x\in\mathbb{R}^{2},\Vert x\Vert \geq 2/3} e^{-\frac{\varepsilon_{0}d^{2}}{64}\Vert x\Vert ^{2}} \, {\rm d}x \leq b'' e^{-\frac{\varepsilon_{0}d^{2}}{144}}\leq \frac{1}{3}, \end{split} \label{eq:53.2.25} \end{equation} where the constants $b'$, $b''>0$ are independent of $p\gg 0$, and $d>0$ is chosen large enough so as to guarantee the last inequality. We denote the $\ell^{\infty}$-norm of $\eta \in \mathbb{C}^{n}$ by $\Vert\eta\Vert_\infty=\max_{v}|\eta_{v}|$. Furthermore, we write $I_n$ for the $n\times n$ identity matrix, as well as $\Delta=\sigma^{2}_{p}I_n+A$, where $A$ has zero diagonal entries. By \eqref{eq:53.2.22} and \eqref{eq:53.2.25}, for $p\gg 0$, \begin{equation} \Vert A\eta\Vert_\infty\leq \frac{\sigma^{2}_{p}}{2}\Vert\eta\Vert_\infty, \; \eta\in\mathbb{C}^{n}. \label{eq:53.2.26} \end{equation} Then \begin{equation} \Vert\Delta\eta\Vert_\infty\geq \Vert\sigma^{2}_{p}\eta\Vert_\infty - \Vert A\eta\Vert_\infty\geq \frac{\sigma^{2}_{p}}{2}\Vert\eta\Vert_\infty\geq \frac{c_{0}}{2}\Vert\eta\Vert_\infty. \label{eq:53.2.27} \end{equation} As a Hermitian square matrix, $\Delta$ is invertible and the eigenvalues of $\Delta^{-1}$ are bounded above by $2/\sigma^{2}_{p}$. Now set \begin{equation} \zeta=(\zeta_{v}):=\Delta^{-1/2}\xi \in \mathbb{C}^{n}, \label{eq:53.2.28} \end{equation} so that the coordinates $\zeta_{v}$ are random variables which are centered with finite variance, but generally they are not independently distributed. Moreover, we have \begin{equation} \label{eq:5covVanish} \E[\zeta_u \overline{\zeta}_v] = \delta_{uv}, \quad \forall\, u,v \in \Gamma_p. \end{equation} Next, note that each $\zeta_v$ is a linear combination of the $(\eta^{p}_j),$ i.e., \begin{equation} \zeta_v = \sum_j \eta^{p}_j \beta_j(v), \label{eq:5.3.26} \end{equation} where $\beta_j(v) \in \mathbb{C}$ are constants. To apply directly Proposition \ref{prop:boundmarginal}, we normalize the random variables $\eta^{p}_{j},j=1,\cdots, d_{p}$ as follows, \begin{equation} \tilde{\eta}^{p}_{j}=\frac{1}{\sigma_{p}}\eta^{p}_{j}. \label{eq:5.3.27} \end{equation} Then the PDF of $\tilde{\eta}^{p}_{j}$ on $\mathbb{C}$, with respect to the Lebesgue measure, is given by \begin{equation} \tilde{f}^{p}_{j}(z)=f^{p}_{j}(\sigma_{p}z)\sigma_{p}^{2}. \label{eq:5.3.28} \end{equation} By \eqref{eq:5.1.2} and \eqref{eq:5.1.1}, we have that for all $p$, $j\in\{1,\cdots,d_{p}\}$, \begin{equation} \sup_{z\in\mathbb{C}}|\tilde{f}^{p}_{j}(z)|\leq M_{0}\sigma_{p}^{2}<\infty. \label{eq:5.3.29} \end{equation} As in \eqref{eq:5.1.5}, we denote by $\tilde{f}^{p}$ the joint probability density function of the random vector $(\tilde{\eta}^{p}_{j})_{j=1}^{d_{p}}\in \mathbb{C}^{d_{p}}$. For $v\in \Gamma_{p}$, set \begin{equation} E_{v}=(\sigma_{p}\overline{\beta}_{1}(v), \ldots,\sigma_{p}\overline{\beta}_{d_{p}}(v))\in \mathbb{C}^{d_{p}}. \label{eq:5.3.30} \end{equation} By \eqref{eq:5covVanish}, $\{E_{v}\}_{v\in\Gamma_{p}}$ forms an orthonormal set in $\mathbb{C}^{d_{p}}$, let $V_{p}\subset \mathbb{C}^{d_{p}}$ denote the $\mathbb{C}$-subspace spanned by $\{E_{v}\}_{v\in\Gamma_{p}}$. Then \begin{equation} n=\dim_{\mathbb{C}}V_{p}\leq d_{p}. \label{eq:5.3.31} \end{equation} Let $K_{p}$ denote the $d_{p}\times n$-matrix whose columns are just the column vectors $E_{v}$, $v\in\Gamma_{p}$. Then \begin{equation} K_{p}^{*}K_{p}=I_n. \label{eq:5.3.32} \end{equation} Set $Q_{p}=K_{p}K_{p}^{*}$, then $Q_{p}$ is exactly the square matrix defining the orthogonal projection from $\mathbb{C}^{d_{p}}$ onto $V_{p}$ in $\mathbb{C}^{d_{p}}$. Let $V_{p}^{\perp}=\mathrm{Im}(1-Q_{p})$ be the orthogonal complement of $V_{p}$. We also identify the vector $(\zeta_{v})_{v\in\Gamma_{p}}\in \mathbb{C}^{n}$ with $\sum_{v\in\Gamma_{p}} \zeta_{v}E_{v}\in V_{p}$. Considering $\zeta=(\zeta_{v})_{v\in \Gamma_{p}}$ and $\tilde{\eta}^{p}=(\tilde{\eta}^{p}_{j})_{j\in O_{p}}$ as column vectors, then \eqref{eq:5.3.26} is equivalent to the relation \begin{equation} Q_{p}\tilde{\eta}^{p}=K_{p}\zeta. \label{eq:5.3.33} \end{equation} As in \eqref{eq:5.1.7}, for $\zeta\in \mathbb{C}^{n}$, define \begin{equation} g^{p}_{V_{p}}(\zeta)=\int_{\eta\in V_{p}^{\perp}}\tilde{f}^{p}(K_{p}\zeta+\eta)\,\mathrm{dV}_{1}(\eta). \label{eq:5.3.34} \end{equation} Then $g^{p}_{V_{p}}$ is exactly the probability density function on $\mathbb{C}^{n}$ (with respect to the standard Lebesgue measure) for the random vector $(\zeta_{v})_{v\in\Gamma_{p}}$ defined in \eqref{eq:53.2.28}. By Proposition \ref{prop:boundmarginal} and \eqref{eq:5.3.29}, we get \begin{equation} \sup_{\zeta\in \mathbb{C}^{n}}g^{p}_{V_{p}}(\zeta)\leq (M_{0}\sigma_{p}^{2})^{n}\binom{d_{p}}{n}, \label{eq:5.3.35} \end{equation} By \eqref{eq:53.2.28}, for $p\gg 0$, \begin{equation} \max_{v}|\zeta_{v}|\leq \sqrt{\frac{2n}{\sigma^{2}_{p}}}\max_{v}|\xi_{v}|. \label{eq:53.2.30} \end{equation} As a consequence of the above, for $p\gg 0$, \begin{equation} \begin{split} \Upsilon_{p}\Big(\Big\{\max_{v}|\xi_{v}|\leq \lambda_{p}\Big\}\Big)&\leq \Upsilon_{p}\Big(\Big\{\max_{v}|\zeta_{v}|\leq \sqrt{\frac{2n}{\sigma^{2}_{p}}} \lambda_{p}\Big\}\Big)\\ &\le \int_{(\zeta_{v})\in\mathbb{C}^{n}, |\zeta_{v}|\leq \sqrt{\frac{2n}{\sigma^{2}_{p}}}\lambda_{p}} (M_{0}\sigma_{p}^{2})^{n}\binom{d_{p}}{n}\mathrm{dVol}(\zeta)\\ &=(2\pi M_{0}n)^{n} \lambda^{2n}_{p}\binom{d_{p}}{n}. \end{split} \label{eq:3.3.37DLM} \end{equation} Note that in the above computations, $n\simeq d_{p}$, using $\binom{d_{p}}{n}\leq d_{p}!$, we get the desired inequality \eqref{eq:53.2.16}, thus \eqref{eq:53.2.7} holds. This completes our proof. \begin{remark} By examining the proofs to \eqref{eq:5.2.21} and to \eqref{eq:53.2.7}, Theorem \ref{thm:1.3.2} still holds if Condition \eqref{eq:5.1.2} is replaced by a milder one: there exists $k_{0}\in\mathbb{N}$, $M_{0}>0$ such that for $p\gg 0$, \begin{equation} \sup_{z\in \mathbb{C}}|f^{p}_{j}(z)|\leq M_{0}\, p^{k_{0}}. \label{eq:3.3.39DLM} \end{equation} \end{remark} \subsection{Proof of Proposition \ref{prop:1.3.3}}\label{subs3.3} We start by showing the integrability of the function $|\log|s_{p}|_{h^{p}}|$ for a nonzero $s_{p}\in H^{0}_{(2)}(\Sigma, L^{p})$ and for $p\geq2$ on each $V_{j}$ (as in Assumption \ref{item:alpha}) with respect to $\omega^{\Sigma}$. We just consider an open subset $\mathbb{D}^{*}_{r}\subset V_{j}$ for some $r\in\,]0,1[\,$. Let $1$ denote the canonical holomorphic frame of $L$ over $\mathbb{D}^{*}_{r}$ so that \begin{equation} |1|^{2}_{h}(z)=|\log(|z|^{2})|. \label{eq:3.3.1bis} \end{equation} Then the section $s_{p}$, restricting on $\mathbb{D}^{*}_{r}$, can be written as \begin{equation} s_{p}(z)=z^{k}f(z)1^{\otimes p}(z), \label{eq:3.3.2} \end{equation} where $f(z)$ is holomorphic function on $\overline{\mathbb{D}}$ with $f(0)\neq 0$, and $k\geq 1$ is the vanishing order of $s_{p}$ at $a_{j}$. Then for $z\in \mathbb{D}^{*}_{r}$, we have \begin{equation} \log(|s_{p}|^{2}_{h^{p}})=2k\log|z|+\log(|f|^{2})+p\log|\log(|z|^{2})|. \label{eq:3.3.3bis} \end{equation} Note that \begin{equation} \int_{0}^{r}\log{t}\frac{2tdt}{t^{2}\log^{2}{t}}=\infty. \label{eq:3.3.4bis} \end{equation} Comparing \eqref{eq:1.1.1}, the $\log|z|$-term in \eqref{eq:3.3.3bis} with \eqref{eq:3.3.4bis}, we get that $\log(|s_{p}|^{2}_{h^{p}})$ is not integrable with respect to the volume form $\omega_{\mathbb{D}^{*}}$ on $\mathbb{D}^{*}_{r}$. As stated in Proposition \ref{prop:1.3.3}, we only consider a relatively compact open subset $U$. Using instead Theorem \ref{thm:1.3.2}, the Proof of Proposition \ref{prop:1.3.3} follows exactly from the arguments in \cite[Subsection 4.1]{SZZ}. Here, we just summarize this proof briefly. For $t>0$, we introduce the following notation \begin{equation} \log^{+}{t}=\max\{\log{t},0\},\; \log^{-}{t}:=\log^{+}(1/t)=\max\{-\log{t},0\}. \label{eq:3.3.4} \end{equation} Then \begin{equation} |\log{t}|=\log^{+}{t}+\log^{-}{t}. \label{eq:3.3.5} \end{equation} Let $U$ be a relatively compact open subset in $\Sigma$, then for a nonzero $s_{p}$, $\big|\log|s_{p}|_{h^{p}}\big|$ in integrable on $\overline{U}$ with respect to $\omega_{\Sigma}$. We first to show the following claim: \begin{equation} \Upsilon_{p}(\{s_{p}\;:\; \int_{U}\log^{+}{|s_{p}|_{h^{p}}}\,\omega_{\Sigma}\geq \frac{\delta}{2} p\})\leq e^{-C_{U,\delta}p^{2}}. \label{eq:3.3.6} \end{equation} Indeed, we have \begin{equation} \log^{+}{|s_{p}|_{h^{p}}}\leq |\log\mathcal{M}^{U}_{p}(s_{p})|. \label{eq:3.3.7} \end{equation} Then \begin{equation} \begin{split} &\Upsilon_{p}\Big(\Big\{s_{p}\;:\; \int_{U}\log^{+}{|s_{p}|_{h^{p}}}\, \omega_{\Sigma}\geq \frac{\delta}{2} p\Big\}\Big)\\ &\leq \Upsilon_{p}\Big(\Big\{s_{p}\;:\; |\log\mathcal{M}^{U}_{p}(s_{p})|\geq \frac{\delta}{2 \mathrm{Area}(U)} p\Big\}\Big), \end{split} \label{eq:3.3.9} \end{equation} where $\mathrm{Area}(U)$ denotes the area of $U$ with respect to $\omega_{\Sigma}$. Then \eqref{eq:3.3.6} follows exactly from Theorem \ref{thm:1.3.2}. Next step is to prove that \begin{equation} \Upsilon_{p}\Big(\Big\{s_{p}\;:\; \int_{U}\log^{-}{|s_{p}|_{h^{p}}}\,\omega_{\Sigma}\geq \frac{\delta}{2} p\Big\}\Big)\leq e^{-C_{U,\delta}\,p^{2}}, \label{eq:3.3.10} \end{equation} where we use \eqref{eq:3.3.6} and the property of sub-harmonic functions. Suppose that $U$ contains an annulus $B(2,3):=\{z\in\mathbb{C}\;:\;2< |z|<3\}$ (after rescaling on the coordinate), and the line bundle $L$ on $B(1,4)$ (still contained in $U$) has a holomorphic local frame $e_{L}$. Set $\alpha(z)= \log|e_{L}(z)|^{2}_{h}$. For $s_{p}\in H^{0}_{(2)}(\Sigma, L^{p})$, we can write \begin{equation} s_{p}=f_{p}e^{\otimes p}_{L}, \label{eq:3.4.11DLM} \end{equation} where $f_{p}$ is a holomorphic function on $B(1,4)$. Then \begin{equation} \log|s_{p}|_{h^{p}}=\log|f_{p}|+\frac{p}{2}\alpha. \label{eq:3.4.12DLM} \end{equation} In the following estimates, each $K_{\bullet}$ denotes a sufficiently large positive constant. Then by \eqref{eq:3.3.5} and \eqref{eq:3.3.9}, we have \begin{equation} \Upsilon_{p}\Big(\Big\{s_{p}\;:\; \int_{B(2,3)}\log^{+}{|f_{p}|}\,\omega_{\Sigma}\geq K_{1} p \Big\} \Big)\leq e^{-C_{U,K_{1}}\, p^{2}}, \label{eq:3.4.13DLM} \end{equation} Using the Poisson kernel and the sub-mean inequality for $\log(|f_{p}|)$, we improve \eqref{eq:3.4.13DLM} as follows, \begin{equation} \Upsilon_{p}\Big(\Big\{s_{p}\;:\; \int_{B(2,3)}\big|\log{|f_{p}|}\big|\,\omega_{\Sigma}\geq K_{2} p\Big \} \Big)\leq e^{-C_{U,K_{2}}\, p^{2}}, \label{eq:3.4.14DLM} \end{equation} From here, we proceed exactly as in \cite[Subsection 4.1, pp. 1992]{SZZ}. As a consequence, for a $\delta\in\; ]0,\frac{1}{2}]$, we get a finite set of points $\{z_{j}\}_{j=1}^{q}$ in $B(2,3)$ such that for all $s_{p}$ we have \begin{equation} \begin{split} &-\int_{B(2,3)} \log|s_{p}|_{h_{p}}\omega_{\Sigma}\\ &\quad\lesssim -\sum_{j=1}^{q} \mu_{j} \log|s_{p}(z_{j})|_{h^{p}}+K_{3}\delta\int_{B(2,3)} \big|\log{|f_{p}|}\big|\,\omega_{\Sigma}+p\delta K_{3} \sup_{z\in B(2,3)}|d\alpha(z)|_{\omega_{\Sigma}}, \end{split} \end{equation} where the quantities $q$ and $\mu_{j}>0$ only depend on $\delta$, and $\sum_{j=1}^{q}\mu_{j}\simeq 1$. Applying Theorem \ref{thm:1.3.2} to each term $\log|s_{p}(z_{j})|_{h^{p}}$ and taking advantage of \eqref{eq:3.4.13DLM}, we infer that \begin{equation} \Upsilon_{p}\Big(\Big\{s_{p}\;:\; -\int_{B(2,3)}\log{|s_{p}|_{h^{p}}}\,\omega_{\Sigma}\geq K_{4}\delta p\Big\}\Big)\leq e^{-C_{U,\delta}p^{2}},\;\forall\;p\gg 0. \label{eq:3.4.16DLM} \end{equation} Note that $\log^{-}=-\log+\log^{+}$ and that a finite set of annulus $B(2,3)$ covers $U$, we get \eqref{eq:3.3.10} from \eqref{eq:3.3.9} and \eqref{eq:3.4.16DLM}. \begin{remark} Actually, one can see that, by the above sketched proof from \cite[Subsection 4.1]{SZZ}, there is no absolute reason to take the volume form $\omega_{\Sigma}$. If we use instead a smooth volume form $\mathrm{d}\mu$ on $\overline{\Sigma}$, then a probability estimate as in \eqref{eq:1.3.5} also holds even for an open subset $U\subset \Sigma$ which is not relatively compact. \end{remark} \subsection{Proof of Theorem \ref{thm:1.3.5}}\label{subs3.4} As explained in the last part of Subsection \ref{subs1.3}, we need to control the vanishing order of holomorphic sections in $H^{0}_{(2)}(\Sigma, L^{p})$ at the punctures. For $a_{j}\in D$, set \begin{equation} H^{0}(\overline{\Sigma}, L^{p})_{(a_{j},k)}:=\{s\in H^{0}(\overline{\Sigma}, L^{p})\;:\; \mathrm{ord}_{a_{j}}(s)\geq k\}. \label{eq:3.4.1} \end{equation} It is clear that $H^{0}(\overline{\Sigma}, L^{p})_{(a_{j},k)}$ is a vector subspace of $H^{0}(\overline{\Sigma}, L^{p})$. We always view $H^{0}_{(2)}(\Sigma, L^{p})$ as a subspace of $H^{0}(\Sigma, L^{p})$, set \begin{equation} H^{0}_{(2)}(\Sigma, L^{p})_{(a_{j},k)}=H^{0}_{(2)}(\Sigma,L^{p})\cap H^{0}(\overline{\Sigma}, L^{p})_{(a_{j},k)}. \label{eq:3.4.2} \end{equation} \begin{lemma}\label{lm:3.4.1} There exist $p_{0}>0$, $k_{0}>0$ such that for any $a_{j}\in D$, $\forall p\geq p_{0}$, $k\geq k_{0}$, \begin{equation} \dim H^{0}_{(2)}(\Sigma, L^{p})_{(a_{j},k)} \leq d_{p}-1, \label{eq:3.4.3} \end{equation} so that \begin{equation} \Upsilon_{p}(H^{0}_{(2)}(\Sigma, L^{p})_{(a_{j},k)})=0. \label{eq:3.4.4} \end{equation} \end{lemma} \begin{proof} It is clear that \eqref{eq:3.4.4} is a direct consequence of \eqref{eq:3.4.3} since $\Upsilon_{p}$ has an integrable PDF on $H^{0}_{(2)}(\Sigma,L^{p})$ with respect to the Lebesgue measure. We only need to prove \eqref{eq:3.4.3} for a fixed $a_{j}\in D$. Note that $L$ is a positive holomorphic line bundle on $\overline{\Sigma}$ (since its degree is positive), so that for any sufficiently large $p$, there exists a nonzero section $s_{j,p}\in H^{0}(\overline{\Sigma},L^{p})$ such that \begin{equation} s_{j,p}(a_{j})\neq 0. \label{eq:3.4.5} \end{equation} We fix a sufficiently large $p_{0}\in\mathbb{N}$ such that $H^{0}_{(2)}(\Sigma,L^{p_{0}})$ has a nonzero section $f_{p_{0}}$, and that if $p\geq 2p_{0}$, then \begin{equation} S_{p}:=f_{p_{0}}\otimes s_{j,p-p_{0}}\in H^{0}_{(2)}(\Sigma, L^{p}) \label{eq:3.4.6} \end{equation} has vanishing order \begin{equation} \mathrm{ord}_{a_{j}}(S_{p})=\mathrm{ord}_{a_{j}}(f_{p_{0}}). \label{eq:3.4.7} \end{equation} As a consequence, for $k\geq k_{0}:=\mathrm{ord}_{a_{j}}(f_{p_{0}})+1$, \begin{equation} 0\neq S_{p}\notin H^{0}_{(2)}(\Sigma, L^{p})_{(a_{j},k)}, \label{eq:3.4.8} \end{equation} so that \eqref{eq:3.4.3} holds. \end{proof} Fix a $k_{0}$ in Lemma \ref{lm:3.4.1}. For $p\geq p_{0}$, $k\geq k_{0}$, set \begin{equation} A^{p}_{k}=\bigcup_{j} H^{0}_{(2)}(\Sigma, L^{p})_{(a_{j},k)} \subset H^{0}_{(2)}(\Sigma, L^{p}). \label{eq:3.4.9} \end{equation} Then $\Upsilon_{p}(A^{p}_{k})=0$. This way, we get Lemma \ref{lm:1.3.6} as mentioned in Subsection \ref{subs1.3}. Let $\widetilde{U}$ be an open subset of $\overline{\Sigma}$, set $U=\widetilde{U}\backslash D\subset \Sigma$. Then for $s_{p}\in H^{0}_{(2)}(\Sigma, L^{p})\backslash A^{p}_{k_{0}}$, $p\geq p_{0}$, we have \begin{equation} |\mathcal{N}^{U}_{p}(s_{p})-\mathcal{N}^{\widetilde{U}}_{p}(s_{p})|\leq k_{0}N, \label{eq:3.4.10} \end{equation} the difference comes from the zeros of $s_{p}$ at the punctures $a_{j}$, $j=1,\ldots, N$, that might be included in $\widetilde{U}$. \begin{proof}[Proof of Theorem \ref{thm:1.3.5}] We may assume the function $\varphi$ does not vanish identically on $\overline{\Sigma}$. Set $M_{\varphi}=\max_{x\in\overline{\Sigma}}|\varphi(x)|>0$. Let $V_{\varphi}\subset \overline{\Sigma}$ be an open neighborhood of $D$ (with smooth boundary), on which $\varphi$ is locally constant. In particular, $\partial\overline{\partial}\varphi|_{V_{\varphi}}\equiv 0$. Let $p'_{0}>0$ be an integer such that \begin{equation} \frac{k_{0}NM_{\varphi}}{p'_{0}}\leq\frac{\delta}{3}\,\cdot \label{eq:3.4.12bis} \end{equation} The Poincar\'{e}-Lelong formula \cite[Theorem 2.3.3]{MM07} asserts that we have in the sense of measures on $\overline{\Sigma}$, \begin{equation} \frac{\sqrt{-1}}{\pi}\partial\overline{\partial}\log{|s_{p}|_{h^{p}}}=[\mathrm{Div}_{\overline{\Sigma}}(s_{p})]-pc_{1}(L,h). \label{eq:3.4.13} \end{equation} Then \begin{equation} \begin{split} &\left(\frac{1}{p}[\mathrm{Div}(s_{p})],\varphi\right) -\int_{\Sigma}\varphi c_{1}(L,h)\\ &=\left( \frac{1}{p}[\mathrm{Div}_{\overline{\Sigma}}(s_{p})]- c_{1}(L,h),\varphi\right) +\bigg( \frac{1}{p}\big([\mathrm{Div}_{\Sigma}(s_{p})]- [\mathrm{Div}_{\overline{\Sigma}}(s_{p})]\big),\varphi\bigg)\\ &=\frac{\sqrt{-1}}{p\pi}\int_{\Sigma} \log{|s_{p}|_{h^{p}}}\,\partial\overline{\partial}\varphi+ \bigg( \frac{1}{p}\big([\mathrm{Div}_{\Sigma}(s_{p})]- [\mathrm{Div}_{\overline{\Sigma}}(s_{p})]\big),\varphi\bigg). \end{split} \label{eq:3.4.14} \end{equation} By \eqref{eq:3.4.10} - \eqref{eq:3.4.12bis}, if $s_{p}\in H^{0}_{(2)}(\Sigma, L^{p})\backslash A^{p}_{k_{0}}$, then \begin{equation} \bigg|\bigg( \frac{1}{p}\big([\mathrm{Div}(s_{p})]- [\mathrm{Div}_{\overline{\Sigma}}(s_{p})]\big), \varphi\bigg)\bigg|\leq\frac{\delta}{3},\quad \text{for all $p\geq \max\{p_{0},p'_{0}\}$}. \label{eq:3.4.15} \end{equation} Since $\omega_{\Sigma}$ is smooth on $\Sigma\backslash V_{\varphi}$ we can set \begin{equation} S_{\varphi}=\max_{x\in \Sigma\backslash V_{\varphi}}\left|\frac{\sqrt{-1}\partial \overline{\partial}\varphi(x)}{\omega_{\Sigma,x}}\right|. \label{eq:3.4.16} \end{equation} For the general case, we can and we may assume that $S_{\varphi}>0$. Then \begin{equation} \begin{split} \left|\frac{\sqrt{-1}}{p\pi}\int_{\Sigma}\log{|s_{p}|_{h^{p}}}\, \partial\overline{\partial}\varphi\right|\leq \frac{S_{\varphi}}{p\pi}\int_{\Sigma\backslash V_{\varphi}} \big|\log{|s_{p}|_{h^{p}}}\big|\,\omega_{\Sigma}. \end{split} \label{eq:3.4.17} \end{equation} Therefore, we get that for $p\gg 0$ the following holds: \begin{equation} \begin{split} &\Big\{s_{p}\;:\; \Big|(\frac{1}{p}[\mathrm{Div}(s_{p})],\varphi) -\int_{\Sigma}\varphi c_{1}(L,h)\Big|>\delta \Big\}\\ &\; \subset \Big\{s_{p}\;:\; \frac{S_{\varphi}}{p\pi}\int_{\Sigma\backslash V_{\varphi}}\big|\log{|s_{p}|_{h^{p}}}\big|\,\omega_{\Sigma} >\frac{2}{3}\delta \Big\} \cup A^{p}_{k_{0}}. \end{split} \label{eq:3.4.18} \end{equation} Upon recalling that $\Upsilon_{p}(A^{p}_{k_{0}})=0$ and by applying Proposition \ref{prop:1.3.3} to \eqref{eq:3.4.18} we get \eqref{eq:3.4.11}. This completes the Proof of our theorem. \end{proof} \subsection{Proof of Theorem \ref{thm:1.2.1}}\label{subs3.5} (a) In order to prove \eqref{eq:1.4.4DLM} we have to show that for all $\varphi\in \mathcal{C}^{\infty}_{0}(\Sigma)$, we have that $\Upsilon$-a.s., \begin{equation} \label{eq:conv} \lim_{p \to \infty} \Big(\frac{1}{p}[\mathrm{Div}(s_{p})],\varphi\Big) =\int_{\Sigma}\varphi c_{1}(L,h). \end{equation} While this is a folklore consequence of Theorem \ref{thm:1.3.5} in probability theory, we provide the short deduction here for the sake of completeness. Write $Y_{p}=(\frac{1}{p}[\mathrm{Div}(s_{p})],\varphi)$ as well as $Y=\int_{\Sigma}\varphi c_{1}(L,h)$. If there was no $\Upsilon$-a.s.\ convergence, then by dominated convergence for $Z:= \limsup_{p\to\infty} |Y_p-Y|$ there would exist $\delta > 0$ such that $\Upsilon(Z>\delta)>\delta.$ Choosing $N_\delta \in \mathbb N$ such that $\sum_{p \ge N_\delta} \Upsilon(|Y_p-Y| > \delta) < \delta/2$ (which is possible due to Theorem \ref{thm:1.3.5}) leads to a contradiction via $\Upsilon(Z>\delta) \le \sum_{p \ge N_\delta} \Upsilon(|Y_p - Y| > \delta) < \delta/2.$ (b) Note that for the open subset $U\subset \Sigma$, we have \begin{equation} \frac{\mathrm{Area}^{L}(U)}{2\pi}=\int_{U}c_{1}(L,h)<+\infty. \label{eq:3.5.1} \end{equation} Here, we require no relative compactness for $U$. Fix an arbitrary $\delta>0$, we choose $\psi_{1}$, $\psi_{2}\in \mathcal{C}^{\infty}(\overline{\Sigma})$ to be real-valued functions which takes constant values near $a_{j}\in D$ such that \begin{equation} \begin{split} &0\leq \psi_{1}\leq\chi_{U}\leq \psi_{2}\leq 1,\\ &\int_{\Sigma} \psi_{1}c_{1}(L,h)\geq \frac{\mathrm{Area}^{L}(U)}{2\pi}-\delta,\\ &\int_{\Sigma} \psi_{2}c_{1}(L,h)\leq \frac{\mathrm{Area}^{L}(U)}{2\pi}+\delta, \end{split} \label{eq:3.5.2} \end{equation} where $\chi_{U}$ is the characteristic function of $U$ on $\overline{\Sigma}$. We apply Theorem \ref{thm:1.3.5} for $\psi_{1}$, then for $s_{p}$ not in an exceptional set of probability less than $e^{-C_{\psi_{1},\delta}p^{2}}$, we get \begin{equation} \mathcal{N}^{U}_{p}(s_{p})\geq (\mathrm{Div}_{\Sigma}(s_{p}),\psi_{1}) \geq p\int_{\Sigma}\psi_{1}c_{1}(L,h)-p\delta \geq p\,\frac{\mathrm{Area}^{L}(U)}{2\pi}-(p+1)\delta. \label{eq:3.5.3} \end{equation} Similarly, if we proceed with $\psi_{2}$, we get that for $s_{p}$ not in an exceptional set of probability less than $e^{-C_{\psi_{2},\delta}p^{2}}$, \begin{equation} \begin{split} \mathcal{N}^{U}_{p}(s_{p})\leq p\,\frac{\mathrm{Area}^{L}(U)}{2\pi}+(p+1)\delta. \end{split} \label{eq:3.5.4} \end{equation} Part (b) follows by combining \eqref{eq:3.5.3} and \eqref{eq:3.5.4}. \subsection{Proof of Proposition \ref{prop:1.2.3}}\label{subs3.6} Since we are concerned with the Gaussian ensembles, using the fact that $\mathrm{Area}(\Sigma):=\int_{\Sigma}\omega_{\Sigma}<\infty$, the first part of Proposition \ref{prop:1.2.3} follows from the same arguments in \cite[Subsection 4.2.4]{SZZ}. As for \eqref{eq:1.2.5}, we need a refined estimate for the norm of a holomorphic section near the punctures, which is explained as follows. For $k_{0}\geq 2$, the sections in $H^{0}_{(2)}(\Sigma, L^{k_{0}})$ are exactly the ones in $H^{0}(\overline{\Sigma}, L^{k_{0}})$ which vanish at every $a_{j}\in D$. Since the zeros of a nontrivial holomorphic section of $L^{k_{0}}$ are isolated points in $\overline{\Sigma}$, we get the existence of $r_{j}\in \;]0,\frac{1}{2}[$ and $\tau_{j}$ as wanted. We may and we always rescale $\tau_{j}$ by a nonzero constant so that $\sup_{x\in \overline{\Sigma}} |\tau_{j}(x)|_{h^{k_{0}}}=1$. The following lemma is elementary. \begin{lemma}\label{lm:3.6.1} For $r\in \,]0,r_{j}[\,$, set \begin{equation} b(r)=-\log(\inf_{z\in \mathbb{D}(r,r_{j})}|\tau_{j}(z)|_{h^{k_{0}}})>0. \label{eq:3.6.1} \end{equation} Then there exists $C_{j}>0$ such that \begin{equation} b(r)\leq C_{j} |\log{r}|, \;r\in \;]0,r_{j}[\,. \label{eq:3.6.2} \end{equation} \end{lemma} \begin{proof} Locally, we can write for $z\in \mathbb{D}^{*}_{2r_{j}}$, \begin{equation} \tau_{j}(z)= z^{m_{j}}g(z)1^{\otimes k_{0}}(z), \label{eq:3.6.3} \end{equation} where $m_{j}\in\mathbb{N}_{\geq 1}$ is the vanishing order of $\tau_{j}$ at $a_{j}$, and $g$ is a holomorphic function such that $g(0)\neq 0$. Set $v_{j}=\inf_{z\in \overline{\mathbb{D}}_{r_{j}}}|g(z)|>0$, then \begin{equation} 1\geq\inf_{z\in \mathbb{D}(r,r_{j})}|\tau_{j}(z)|_{h^{k_{0}}}\geq r^{m_{j}}v_{j}|\log(r^{2}_{j})|^{k_{0}/2}. \label{eq:3.6.4} \end{equation} Then \eqref{eq:3.6.2} follows easily. \end{proof} \begin{proof}[Proof of \eqref{eq:1.2.5}] Set \begin{equation} E^{pk_{0}}_{1}=\Vert \tau_{j}^{\otimes p}\Vert ^{-1}_{\mathcal{L}^{2}}\tau_{j}^{\otimes p}\in H^{0}_{(2)}(\Sigma, L^{pk_{0}}). \label{eq:3.6.5} \end{equation} Note that \begin{equation} \Vert \tau_{j}^{\otimes p}\Vert _{\mathcal{L}^{2}}\leq \mathrm{Area}(\Sigma)^{1/2}. \label{eq:3.6.6} \end{equation} We then complete $\{E^{pk_{0}}_{1}\}$ to an orthonormal basis $ \{E^{pk_{0}}_{1}$, $E^{pk_{0}}_{2}$, $\ldots$, $E^{pk_{0}}_{d_{pk_{0}}}\}$ of $H^{0}_{(2)}(\Sigma, L^{pk_{0}})$. Since $\Upsilon_{p}$ is defined by i.i.d. standard random complex Gaussian variables, its dependence on the basis $O_{p}$ is eliminated. The random section $s_{pk_{0}}$ is given by \begin{equation} s_{pk_{0}}=\sum_{j}\xi_{j} E^{pk_{0}}_{j}=\xi_{1}E^{pk_{0}}_{1} + s'_{pk_{0}}, \label{eq:3.6.7} \end{equation} where $\xi_{j}$, $j=1,\ldots,d_{pk_{0}}$ are i.i.d. standard random complex Gaussian. Set $\xi'=(\xi_{2},\ldots,\xi_{d_{pk_{0}}})\in \mathbb{C}^{d_{pk_{0}}-1}$. Similar to \eqref{eq:5.2.1k} and \eqref{eq:5.2.7}, we have for $p\gg 0$ and $x\in \Sigma$, \begin{equation} |s'_{pk_{0}}(x)|_{h^{pk_{0}}}\leq C\Vert \xi'\Vert p^{3/4}, \label{eq:3.6.8} \end{equation} where the constant $C>0$ is independent of $p$ and $z$. By Lemma \ref{lm:3.6.1} and \eqref{eq:3.6.5}, for $r\in \;]0,r_{j}[\,$, we have \begin{equation} \inf_{z\in \mathbb{D}(r,r_{j})}|E^{pk_{0}}_{1}(z)|_{h^{pk_{0}}}\geq \frac{e^{-pb(r)}}{\mathrm{Area}(\Sigma)^{1/2}}. \label{eq:3.6.9} \end{equation} Set \begin{equation} t_{p}(r)=\frac{e^{-pb(r)}}{C\mathrm{Area}(\Sigma)^{1/2}p^{3/4}\sqrt{d_{pk_{0}}}}>0. \label{eq:3.6.10} \end{equation} Note that $\Vert \xi'\Vert \leq \sqrt{d_{pk_{0}}} \max_{j\geq 2}|\xi_{j}|$, then for $r\in\,]0,r_{j}[\,$, we have \begin{equation} \Big\{s_{pk_{0}}=\sum_{j}\xi_{j} E^{pk_{0}}_{j}\;:\; |\xi_{1}|>1, |\xi_{j}|<t_{p}(r), j\geq 2\Big\} \subset\Big\{s_{pk_{0}}\;:\; \mathcal{N}^{\mathbb{D}(r,r_{j})}_{pk_{0}}(s_{pk_{0}})=0\Big\}. \label{eq:3.6.11} \end{equation} Therefore, for $r\in \;]0,r_{j}[\,$, we have \begin{equation} \begin{split} \Upsilon_{pk_{0}}\big(\{s_{pk_{0}}\;:\; \mathcal{N}^{\mathbb{D}(r,r_{j})}_{pk_{0}}(s_{pk_{0}})=0\} \big) \geq e^{-1}\Big(\frac{t_{p}(r)^{2}}{2}\Big)^{d_{pk_{0}}-1}. \end{split} \label{eq:3.6.12} \end{equation} By \eqref{eq:3.6.2} there exists $c_{j}>0$ such that for $r\in \;]0,r_{j}[\,$, $p\gg 0$, \begin{equation} e^{-1}\Big(\frac{t_{p}(r)^{2}}{2}\Big)^{d_{pk_{0}}-1}\geq e^{-c_{j}|\log{r}|p^{2}}. \label{eq:3.6.13} \end{equation} This completes our Proof of \eqref{eq:1.2.5}. \end{proof} \section{Cusp forms on hyperbolic surfaces of finite volume}\label{section4} We give an important example where our results apply. Let $\overline\Sigma$ be a compact Riemann surface of genus $g$ and consider a finite set $D=\{a_1,\ldots,a_N\}\subset\overline\Sigma$. We also denote by $D$ the divisor $\sum_{j=1}^Na_j$ and let $\mathscr{O}_{\overline{\Sigma}}(D)$ be the associated line bundle. Let $K_{\overline\Sigma}$ be the canonical line bundle of $\overline\Sigma$. The following conditions are equivalent: \\[3pt]\indent (i) $\Sigma=\overline\Sigma\smallsetminus D$ admits a complete K\"ahler-Einstein metric $\omega_\Sigma$ with $\operatorname{Ric}_{\omega_\Sigma}=-\omega_\Sigma$, \\[2pt]\indent (ii) $2g-2+N>0$, \\[2pt]\indent (iii) the universal cover of $\Sigma$ is the upper-half plane $\mathbb{H}$, \\[2pt]\indent (iv) $L=K_{\overline\Sigma}\otimes \mathscr{O}_{\overline\Sigma}(D)$ is ample. \\[3pt] This follows from the Uniformization Theorem \cite[Chapter IV]{fk} and the fact that the Euler characteristic of $\Sigma$ equals $\chi(\Sigma)=2-2g-N$ and the degree of $L$ is \[\deg L=2g-2+N=-\chi(\Sigma).\] If one of these equivalent conditions is satisfied, the K\"ahler-Einstein metric $\omega_{\Sigma}$ is induced by the Poincar\'e metric on $\mathbb{H}$; $(\Sigma,\omega_{\Sigma})$ and the formal square root of $(L,h)$ satisfy conditions \ref{item:alpha} and \ref{item:beta}, see \cite[Lemma 6.2]{AMM:20}. Theorem \ref{thm:1.2.1}, Corollary \ref{C:1.2.2} and Proposition \ref{prop:1.2.3} hence apply to this context. Let $\Gamma$ be the Fuchsian group associated with the above Riemann surface $\Sigma$, that is, $\Sigma\cong\Gamma\backslash\mathbb{H}$. Then $\Gamma$ is a geometrically finite Fuchsian group of the first kind, without elliptic elements. Conversely, if $\Gamma$ is such a group, then $\Sigma:=\Gamma\backslash\mathbb{H}$ can by compactified by finitely many points $D=\{a_1,\ldots,a_N\}$ into a compact Riemann surface $\overline\Sigma$ such that the equivalent conditions (i)-(iv) above are fulfilled. The space $\mathcal{M}_{2p}^\Gamma$ of $\Gamma$-modular forms of weight $2p$ is by definition the space of holomorphic functions $f\in\mathscr{O}(\mathbb{H})$ satisfying the functional equation \begin{equation}\label{eq:6.24} f(\gamma z)=(cz+d)^{2p}f(z),\quad z\in\mathbb{H},\:\: \gamma=\begin{pmatrix}a&b\\c&d\end{pmatrix}\in\Gamma, \end{equation} and which extend holomorphically to the cusps of $\Gamma$ (fixed points of the parabolic elements). If $f\in\mathscr{O}(\mathbb{H})$ satisfies \eqref{eq:6.24}, then $fdz^{\otimes p}\in H^0(\mathbb{H},K_\mathbb{H}^p)$ descends to a holomorphic section $\Phi(f)$ of $H^0(\Sigma,K^p_\Sigma)\cong H^0(\Sigma,L^p)$. By \cite[Propositions\,3.3,\,3.4(b)]{Mum77}, $\Phi$ induces an isomorphism $\Phi:\mathcal{M}_{2p}^\Gamma \to H^0\big(\overline\Sigma,L^p\big)$. The subspace of $\mathcal{M}_{2p}^\Gamma$ consisting of modular forms vanishing at the cusps is called the space of \emph{cusp forms} (Spitzenformen) of weight $2p$ of $\Gamma$, denoted by $\mathcal{S}_{2p}^\Gamma$. The space of cusps forms is endowed with the Petersson scalar product \[ \langle f,g\rangle:= \int_U f(z)\overline{g(z)}(2y)^{2p}\,dv_{\mathbb{H}}(z), \] where $U$ is a fundamental domain for $\Gamma$ and $dv_{\mathbb{H}}=\frac{1}{2} y^{-2}dx\wedge dy$ is the hyperbolic volume form. Under the above isomorphism, $\mathcal{S}_{2p}^\Gamma$ is identified to the space $H^0\big(\overline\Sigma,L^p\otimes \mathscr{O}_{\overline\Sigma}(D)^{-1}\big)= H^0\big({\overline\Sigma},K_{\overline\Sigma}^p \otimes\mathscr{O}_{\overline\Sigma}(D)^{p-1}\big)$ of holomorphic sections of $L^p$ over $\overline\Sigma$ vanishing on $D$. If we endow $K_\mathbb{H}$ with the Hermitian metric induced by the Poincar\'e metric on $\mathbb{H}$, the scalar product of two elements $udz^{\otimes p}, vdz^{\otimes p}\in K^p_{\mathbb{H},z}$ is $\langle udz^{\otimes p}, vdz^{\otimes p}\rangle =u\overline{v}(2y)^{2p}$. Hence, the Petersson scalar product corresponds to the $\mathcal{L}^{2}$ inner product of pluricanonical forms on $\Sigma$, \[\langle f,g\rangle= \int_{\Sigma} \langle\Phi(f),\Phi(g)\rangle\, \omega_{\Sigma}\,, \quad f,g\in\mathcal{S}_{2p}^\Gamma\,. \] The isomorphism $\Phi$ gives thus an isometry (see also \cite[Section\,6.4]{CM11}) \begin{equation}\label{eq:6.25} \mathcal{S}_{2p}^\Gamma\cong H^0\big(\overline\Sigma,L^p\otimes\mathscr{O}_{\overline\Sigma} (D)^{-1}\big)\cong H^0_{(2)}(\Sigma,K_\Sigma^p)\cong H^0_{(2)}(\Sigma, L^p), \end{equation} where $H^0_{(2)}(\Sigma, L^p)$ is the space of holomorphic sections of $L^p$ that are square-integrable with respect to the volume form $\omega_\Sigma$ and the metric $h^p$ on $L^p$, with $h$ introduced in \cite[Lemma 6.2]{AMM:20}. Moreover, $H^0_{(2)}(\Sigma,K_\Sigma^p)$ is the space of $\mathcal{L}^{2}$-pluricanonical sections with respect to the metric $h^{K^p_\Sigma}$ and the volume form $\omega_\Sigma$, where we denote by $h^{K_\Sigma}$ the Hermitian metric induced by $\omega_\Sigma$ on $K_\Sigma$. We thus identify the space of cusp forms $\mathcal{S}_{2p}^\Gamma$ to a subspace of holomorphic sections of $L^p$ by \eqref{eq:6.25}. \begin{corollary} \label{crl_CrlIntro1} Let $\Gamma\subset\operatorname{PSL}(2,\mathbb{R})$ be a geometrically finite Fuchsian group of the first kind without elliptic elements. Then the assertions of Theorems \ref{thm:1.3.2} \& \ref{thm:1.2.1}, Corollary \ref{C:1.2.2} and Proposition \ref{prop:1.2.3} hold for the zeros of cusp forms $s_p\in\mathcal{S}^\Gamma_{2p}$. \end{corollary} \section{Higher dimensional complex Hermitian manifolds}\label{section:higherdim} In this section, we consider the extension of the above results to the noncompact complete complex Hermitian manifold of higher dimension. Our geometric setting is described in Subsection \ref{section1.6}. At first, we recall the Bergman kernel expansion under this setting. By \cite[Theorems 4.2.1 \& 6.1.1]{MM07}, the Bergman kernel expansions described in Section \ref{section2bergman}, for both on-diagonal and off-diagonal, still hold. More precisely, there exist coefficients $a_{r}\in C^{\infty}(X)$, $r\in\mathbb{N}$ such that the following asymptotic expansion \begin{equation} B_{p}(x,x)=\sum_{r=0}^{\infty} a_{r}(x)p^{m-r} \end{equation} holds for any $\mathcal{C}^{\ell}$-topology on compact sets of $X$. In particular, let $\dot{R}^{L}\in\mathrm{End}(T^{(1,0)}X)$ such that for $u,v\in T_{x}^{(1,0)}X$, \begin{equation} R^{L}(u,v)=g^{TX}(\dot{R}^{L}u,v), \end{equation} then \begin{equation} a_{0}(x)=\det\Big(\frac{\dot{R}^{L}}{2\pi}\Big)>\varepsilon_{1}^{m}. \end{equation} In particular, if $K\subset X$ is compact, then there exists $C_{K}>0$ such that for $p\gg 0$, \begin{equation} \max_{x\in K}B_{p}(x,x)\leq C_{K}\, p^{m}. \label{eq:5.1.4paris} \end{equation} If $X$ is noncompact, then the existence of a complete metric $\omega$ with $iR^{L}> \varepsilon_{1} \omega$ ($\varepsilon_{1} >0$) is equivalent to saying that $iR^{L}$ defines a complete K\"{a}hler metric. Recall that the volume $\mathrm{Vol}^{L}_{2m}(\cdot)$ is defined in \eqref{eq:1.6.8DLM}. As in \cite[Corollary 2.2]{DMS12}, under the Assumption \eqref{eq:6.0.4}, we have \begin{equation} 0< \frac{1}{m!}\int_{X}c_{1}(L,h)^{m}\leq \liminf_{p\rightarrow \infty} p^{-m}d_{p}< \infty. \end{equation} As a consequence, we get \begin{equation} d_{p}\simeq p^{m}\;,\;\;\mathrm{Vol}^{L}_{2m}(X)<\infty. \label{eq:5.1.2DLM} \end{equation} Then for any open subset $U\subset X$, we have $\mathrm{Vol}^{L}_{2m}(U)<\infty$. Furthermore, the off-diagonal and near-diagonal expansions as in Proposition \ref{prop:2.2.1} also hold (with suitable change according to the dimension $m$). For a precise statement on the near-diagonal expansion, we need to introduce the the complex coordinates for the real tangent space $T_{x}X$, $x\in X$. Fix a point $x\in X$. Let $\{\mathbf{f}_{j}\}_{j=1}^{m}$ be an orthonormal basis of $(T_{x}^{1,0}X, g_{x}^{TX}(\cdot,\overline{\cdot}))$ such that \begin{equation} \dot{R}^{L}_{x}\,\mathbf{f}_{j}=\mu_{j}(x)\mathbf{f}_{j}, \end{equation} where $\mu_{j}(x)$, $j=1, \ldots, m$ are the eigenvalues of $\dot{R}^{L}_{x}$. We have \begin{equation} \mu_{j}(x)>\varepsilon_{1},\; a_{0}(x)=\prod_{j=1}^{m}\frac{\mu_{j}(x)}{2\pi}. \end{equation} Set $\mathbf{e}_{2j-1}=\frac{1}{\sqrt{2}}(\mathbf{f}_{j}+\overline{\mathbf{f}}_{j})$, $\mathbf{e}_{2j}=\frac{\sqrt{-1}}{\sqrt{2}}(\mathbf{f}_{j}-\overline{\mathbf{f}}_{j})$, $j=1, \ldots, m$. Then they form an orthonormal basis of the (real) tangent vector space $(T_{x}X, g_{x}^{TX})$. Now we introduce the complex coordinate for $T_{x}X$. If $v=\sum_{j=1}^{2m} v_{j}\mathbf{e}_{j}\in T_{x}X$, we can write \begin{equation} v=\sum_{j=1}^{m}(v_{2j-1}+\sqrt{-1}v_{2j})\frac{1}{\sqrt{2}} \mathbf{f}_{j} + \sum_{j=1}^{m}(v_{2j-1}-\sqrt{-1}v_{2j})\frac{1}{\sqrt{2}} \overline{\mathbf{f}}_{j}. \label{eq:5.1.8paris} \end{equation} Set $z=(z_{1},\ldots,z_{m})$ with $z_{j}=v_{2j-1}+\sqrt{-1}v_{2j}$, $j=1,\ldots, m$. We call $z$ the complex coordinate of $v\in T_{x}X$. Then by \eqref{eq:5.1.8paris}, \begin{equation} \frac{\partial}{\partial z_{j}} = \frac{1}{\sqrt{2}} \mathbf{f}_{j} , \; \frac{\partial}{\partial \overline{z}_{j}} = \frac{1}{\sqrt{2}} \overline{\mathbf{f}}_{j}, \label{eq:5.1.9paris} \end{equation} so that \begin{equation} v=\sum_{j=1}^{m}\Big(z_{j} \frac{\partial}{\partial z_{j}} +\overline{z}_{j} \frac{\partial}{\partial \overline{z}_{j}}\Big). \label{eq:5.1.10paris} \end{equation} Note that $|\frac{\partial}{\partial z_{j}}|^{2}_{g^{TX}}=|\frac{\partial}{\partial \overline{z}_{j}}|^{2}_{g^{TX}}=\frac{1}{2}$. For $v, v'\in T_{x}X$, let $z, z'$ denote the corresponding complex coordinates. Define \begin{equation} \mathcal{P}_{x}(v,v')=\prod_{j=1}^{m} \frac{\mu_{j}(x)}{2\pi} \exp\Big(\!-\frac{1}{4}\sum_{j=1}^{m}\mu_{j}(x)(|z_{j}|^{2} +|z'_{j}|^{2}-2z_{j}\overline{z}_{j})\Big). \label{eq:5.1.11paris} \end{equation} Define a weighted distance function $\Phi^{TX}_{x}(v,v')$ as follows, \begin{equation} \Phi^{TX}_{x}(v,v')^{2}=\sum_{j=1}^{m}\mu_{j}(x)|z_{j}-z'_{j}|^{2}. \end{equation} Then \begin{equation} |\mathcal{P}_{x}(v,v')|=\prod_{j=1}^{m} \frac{\mu_{j}(x)}{2\pi}\exp\Big(\!-\frac{1}{4}\Phi^{TX}_{x}(v,v')^{2}\Big). \end{equation} For sufficiently small $\delta_{0}>0$, we identify the small open ball $B^{X}(x,2\delta_{0})$ in $X$ with the ball $B^{T_{x}X}(0, 2\delta_{0})$ in $T_{x}X$ via the geodesic coordinate. Let $\mathrm{dist}(\cdot,\cdot)$ denote the Riemannian distance of $(X, g^{TX})$. There exists $C_{2}>0$ such that for $v,v'\in B^{T_{x}X}(0, 2\delta_{0})$, we have \begin{equation} C_{2}\mathrm{dist}(\exp_{x}(v),\exp_{x}(v'))\geq \Phi^{TX}_{x}(v,v')\geq \frac{1}{C_{2}}\mathrm{dist}(\exp_{x}(v),\exp_{x}(v')). \label{eq:5.1.15DLM} \end{equation} In particular, \begin{equation} \Phi^{TX}_{x}(0,v)\geq \varepsilon_{1}^{1/2} \mathrm{dist}(x,\exp_{x}(v)). \label{eq:5.1.15paris} \end{equation} Moreover, if we consider a compact subset $K\subset X$, the constants $\delta_{0}$ and $C_{1}$ can be chosen uniformly for all $x\in K$. We trivialize the line bundle $L$ on $B^{T_{x}X}(0, 2\delta_{0})$ using the parallel transport with respect to $\nabla^{L}$ along the curve $[0,1]\ni t\mapsto tv$, $v\in B^{T_{x}X}(0, 2\delta_{0})$. Under this trivialization, for $v,v' \in B^{T_{x}X}(0, 2\delta_{0})$, \begin{equation} B_{p}(\exp_{x}(v),\exp_{x}(v'))\in\mathrm{End}(L_{x})=\mathbb{C}. \end{equation} By \cite[Theorems 4.2.1 \& 6.1.1]{MM07}, for any compact subset $K\subset X$, and for any $N\in \mathbb{N}$, there exists $\delta>0$ and constants $C,C'>0$ such that for $x\in K$, $v,v'\in T_{x}X$, $\Vert v\Vert,\,\Vert v'\Vert \leq 2\delta$, instead of \eqref{eq:2.2.2}, we have \begin{equation} \begin{split} &\bigg|\frac{1}{p^{m}}B_{p}(\exp_{x}(v),\exp_{x}(v'))-\sum_{r=0}^{N}\mathcal{F}_{r}(\sqrt{p}v,\sqrt{p}v')\kappa^{-1/2}(v)\kappa^{-1/2}(v')p^{-r/2}\bigg|\\ &\leq Cp^{-(N+1)/2}(1+\sqrt{p}\Vert v\Vert+\sqrt{p}\Vert v'\Vert)^{2(N+m)+4}\exp(-C'\sqrt{p}\Vert v-v'\Vert)+\mathcal{O}(p^{-\infty}). \end{split} \label{eq:5.2.2paris} \end{equation} The functions $\mathcal{F}_{r}$, $r\in\mathbb{N}$ are given as follows, \begin{equation} \mathcal{F}_{r}(v,v')=\mathcal{P}_{x}(v,v')\mathcal{J}_{r}(v,v'), \label{eq:5.1.19DLM} \end{equation} where $\mathcal{J}_{r}(v,v')$ is a polynomial in $v,v'$ of degree $\leq 3r$, whose coefficients are smooth in $x\in X$. In particular, \begin{equation} \mathcal{J}_{0}=1. \end{equation} The normalized Bergman kernel $P_{p}(x,y)$ for $x,y\in X$ is defined as in \eqref{eq:1.3.1}. Then by exactly the same arguments in Subsection \ref{section2.3DLM}, we get a version of Theorem \ref{thm:1.3.1} for $P_{p}$ as follows. \begin{theorem}\label{thm:5.1.1} Let $U$ be a relatively compact open subset of $X$, then the following uniform estimates on the normalized Bergman kernel hold for $x,y\in U$: fix $k\geq 1$ and $b>\sqrt{16k/\varepsilon_{1}}$, then we have \begin{equation} P_{p}(x,y)=\begin{cases} &(1+o(1))\exp(-\frac{p}{4}\Phi_{x}(0,v')^{2}), \\ &\qquad\qquad\qquad\text{uniformly for } \mathrm{dist}(x,y=\exp_{x}(v'))=\Vert v'\Vert \leq b\sqrt{\frac{\log p}{p}}, \\ &\mathcal{O}(p^{-k}), \qquad\;\; \text{uniformly for } \mathrm{dist}(x,y) \geq b\sqrt{\frac{\log p}{p}}. \end{cases} \label{eq:5.2.4} \end{equation} \end{theorem} Now we start to give the proofs to the theorems in Subsection \ref{section1.6}. Most of the arguments are exactly the same as given in Section \ref{section3DLM}. \begin{proof}[Proof of Theorem \ref{thm:1.6.1}] Since $U$ is relatively compact in $X$, the Bergman kernel $B_{p}(x,x)$, $x\in U$, is uniformly bonded above by $C_{\overline{U}}\,p^{m}$ by \eqref{eq:5.1.4paris}. By \eqref{eq:5.1.2DLM}, $d_{p}\simeq p^{m}$. The proof of \eqref{eq:1.6.7paris} follows exactly by the arguments in the proof of Proposition \ref{prop:5.2.2}. In particular, we have for $p\gg 0$, \begin{equation} \mathbb{E}[|\mathcal{M}^{U}_{p}(s_{p})|^{d_{p}}]\lesssim d_{p}^{2d_{p}+3/2}\leq p^{Cp^{m}}, \label{eq:5.1.20DLM} \end{equation} where the constant $C>0$ is sufficiently large. Now we prove \eqref{eq:1.6.8paris}. At first, by \eqref{eq:5.1.20DLM}, as in Corollary \ref{cor:3.1.6}, there exists a constant $C>0$, such that for any sequence $\{\lambda_{p}\}_{p\in \mathbb{N}}$ of strictly positive numbers, we have \begin{equation} \begin{split} \Upsilon_{p}\Big(\big\{s_{p}\;:\; \mathcal{M}^{U}_{p}(s_{p})\geq \lambda_{p}\big\}\Big)\lesssim e^{-d_{p}\log\lambda_{p}+Cd_{p}\log p}. \end{split} \label{eq:5.1.21DLM} \end{equation} Secondly, we apply the same arguments in Subsection \ref{section3.3DLM} by taking the lattice points $x^{p}_{v}$, $v\in \Gamma_{p}\subset \mathbb{Z}^{m}$, near a fixed point $x_{0}\in U$, where we identify $(T_{x_{0}}X,g^{T_{x_{0}}X})$ with $\mathbb{R}^{m}$. Note that $n:=\sharp \Gamma_{p}\simeq d_{p}$. As in \eqref{eq:53.2.10} \begin{equation} \frac{d^{2}}{4p}\Vert u-v\Vert ^{2}\leq\mathrm{dist}(x^{p}_{u},x^{p}_{v})^{2}\leq \frac{4d^{2}}{p}\Vert u-v\Vert ^{2}. \label{eq:5.1.24DLM} \end{equation} Let $\xi(u,v)\in T_{x^{p}_{u}}X$ be the unique vector (with small norm) such that $\exp_{x^{p}_{u}}(\xi(u,v))=x^{p}_{v}$. By \eqref{eq:5.1.15paris}, \eqref{eq:5.1.24DLM}, \begin{equation} \Phi_{x^{p}_{u}}(0,\xi(u,v))^{2} \geq \frac{\varepsilon_{1}d^{2}}{4p}\Vert u-v\Vert ^{2}. \end{equation} This is an analog of \eqref{eq:53.2.24}. Then using instead Theorem \ref{thm:5.1.1} and proceeding as in \eqref{eq:53.2.17} - \eqref{eq:3.3.37DLM}, we get that, for a sequence $\{\lambda_{p}\}_{p\in \mathbb{N}}$ of positive numbers less than $1$, there exist constants $C>0$, $C'>0$ such that for $\forall\, p\gg 0$, \begin{equation} \Upsilon_{p}\Big(\big\{s_{p}\;:\; \mathcal{M}^{U}_{p}(s_{p})\leq \lambda_{p}\big\}\Big)\leq e^{Cd_{p}\log \lambda_{p} +C'd_{p}\log p}. \label{eq:5.1.25DLM} \end{equation} Taking $\lambda_{p}=e^{\delta p}$ in \eqref{eq:5.1.21DLM} and $\lambda_{p}=e^{-\delta p}$ in \eqref{eq:5.1.25DLM}, we get \eqref{eq:1.6.8paris} upon using $d_{p}\simeq p^{m}$. This completes our proof. \end{proof} \begin{proof}[Proof of Theorem \ref{thm:6.2}] The first part of this theorem is an analog of Theorem \ref{thm:1.3.5}, and its proof will follow the arguments as explained in Subsections \ref{subs3.3} \& \ref{subs3.4}, by using instead Theorem \ref{thm:1.6.1}. Recall that $\mathrm{dV}=\frac{\omega^{m}}{m!}$ is the volume element on $X$. Indeed, the sketched proof in Subsection \ref{subs3.3} (cf.\cite[Subsection 4.1]{SZZ}) also proves that, for the relative compact open subset $U$, and for any $\delta>0$, there exists $C_{U,\delta}>0$ such that \begin{equation} \Upsilon_{p}\left(\Big\{s_{p}\;:\; \int_{U}\big|\log{|s_{p}|_{h^{p}}}\big|\mathrm{dV}\geq \delta p\Big\}\right)\leq e^{-C_{U,\delta}p^{m+1}}, \,\forall\, p\gg 0. \label{eq:5.1.27paris} \end{equation} To get \eqref{eq:6.0.7}, we apply the Poincar\'{e}-Lelong formula for $\varphi\in \Omega^{m-1,m-1}_{0}(U)$, \begin{equation} ([\mathrm{Div}(s_{p})]-pc_{1}(h,L),\varphi)= \frac{i}{\pi}\int_{U}\log|s_{p}|_{h_{p}}\partial\overline{\partial}\varphi. \end{equation} Then \begin{equation} \begin{split} \left|\left(\frac{1}{p}[\mathrm{Div}(s_{p})]-c_{1}(h,L),\varphi\right)\right|& \leq\frac{1}{\pi p}\left|\int_{U}\log|s_{p}|_{h_{p}} \partial\overline{\partial}\varphi\right|\\ &\leq \frac{1}{\pi p}\sup_{x\in X}\left| \frac{\partial\overline{\partial}\varphi(x)}{\mathrm{dV}(x)}\right| \cdot\int_{U}\big|\log{|s_{p}|_{h^{p}}}\big|\,\mathrm{dV}. \end{split} \label{eq:5.1.29paris} \end{equation} Then by \eqref{eq:5.1.27paris}, we get \eqref{eq:6.0.7}. As a consequence of \eqref{eq:6.0.7}, the proof to \eqref{eq:1.6.2DLM} follows exactly from the same arguments as in the part (a) of Subsection \ref{subs3.5}. This completes our proof. \end{proof} \begin{proof}[Proof of Theorem \ref{thm:6.3}] We only need to prove \eqref{eq:6.1.10}, and \eqref{eq:1.6.14paris} is just its direct consequence. Due to results in Theorem \ref{thm:6.2} and that $U$ is relatively compact, the Proof of this theorem is quite routine as in Subsection \ref{subs3.5} (also in \cite[Subsection 4.2.2]{SZZ}). Let $\delta>0$ be arbitrary, and we take $\psi_{1}$, $\psi_{2}\in \mathcal{C}^{\infty}_{0}(X,\mathbb{R}_{\geq 0})$ such that \begin{equation} \begin{split} &0\leq \psi_{1}\leq\chi_{U}\leq \psi_{2}\leq 1,\\ &\int_{X} \psi_{1}\frac{c_{1}(L,h)^{m}}{m!}\geq \mathrm{Vol}^{L}_{2m}(U)-\delta,\\ &\int_{X} \psi_{2}\frac{c_{1}(L,h)^{m}}{m!}\leq \mathrm{Vol}^{L}_{2m}(U)+\delta. \end{split} \label{eq:5.1.30paris} \end{equation} Set $\varphi_{j}=\frac{\psi_{j}}{(m-1)!}c_{1}(L,h)^{m-1}$, $j=1,2$. Then we apply Theorem \ref{thm:6.2} to $\varphi_{j}$ separately, we get exactly \eqref{eq:6.1.10}. Our proof is completed. \end{proof} \begin{remark} Assume that $\{\Upsilon_{p}\}_{p\in\mathbb{N}}$ is defined as in Example \ref{eg:1.3.2} with $\sigma_{p}=1$. Then, similar to Proposition \ref{prop:1.2.3} and the second part of \cite[Theorem 1.4]{SZZ}, we can also give a lower bound ($\simeq e^{-C_{U}\,p^{m+1}}$) for the hole probabilities for a relative compact nonempty open subset $U\subset X$, provided there exists a nowhere vanishing section on $\overline{U}$. \end{remark} We give now exhibit two classes of manifolds for which Theorem \ref{thm:6.2} applies, each of them has its own interests in various fields of complex geometry. \begin{example} Let $M$ is a compact complex manifold of dimension $m$, $\Sigma$ is an analytic subvariety of $M$, $X:=M\setminus\Sigma$. We assume that $X$ admits a complete K\"ahler metric $\omega$ such that $\ric_\omega\leq-\lambda\omega$, for some constant $\lambda>0$. Assume moreover that $\dim\Sigma\leq m-k$, $k\geq2$. Then $H^0_{(2)}(X,K_X^p)\subset H^0(M,K_M^p)$ and $d_p=\dim H^0_{(2)}(X,K_X^p)=\mathcal{O}(p^m)$ as $p\to\infty$. \end{example} \begin{example} Let $D$ be a bounded symmetric domain in $\mathbb{C}^m$ and let $\Gamma$ be a neat arithmetic group acting properly discontinuously on $D$ (see \cite[p.\ 253]{Mum77}). Then $U:=D/\Gamma$ is a smooth quasi-projective variety, called an arithmetic variety. By \cite{AMRT:10}, $U$ admits a smooth toroidal compactification $X$. In particular, $\Sigma:=X\setminus U$ is a divisor with normal crossings. The Bergman metric $\omega^{\mathcal B}_{D}$ on $D$ descends to a complete K\"ahler metric $\omega:=\omega^{\mathcal B}_{U}$ on $U$. Moreover, $\omega$ is K\"ahler-Einstein with $\ric_{\omega}=-\omega$ (since the metric $\omega^{\mathcal B}_{D}$ has this property). We denote by $h^{K_U}$ the Hermitian metric induced by $\omega$ on $K_U$. We wish to study the spaces $H^0_{(2)}(U,K_U^p)$ of $\mathcal{L}^{2}$-pluricanonical sections with respect to the metric $h^{K^p_U}$ and the volume form $\omega^m$. \end{example} \bibliographystyle{plain}
\section{Introduction} \label{sec:intro} Ontologies represent knowledge in a way that is both accessible to humans and is machine interpretable. Reference ontologies provide a shared vocabulary for a community, and are successfully being used in a range of different domains. Examples include the OBO ontologies in the life sciences \cite{smith2007obo}, the Financial Industry Business Ontology for the financial domain \cite{allemang2021}, and the Open Energy Ontology in the energy domain \cite{booshehri2021introducing}. While these ontologies differ in many respects, they share one important feature: they are manually created by experts using a process by which each term is manually added to the ontology including a textual definition, relevant axioms, and ideally some additional documentation. Often, this process involves extensive discussions about individual terms. Hence, developing such ontologies is a time-intensive and expensive process. This leads to a challenge for ontologies that cover a large domain. For example, the ChEBI (Chemical Entities of Biological Interest) ontology \cite{hastings_chebi_2016} is the largest and most widely used ontology for the domain of biologically relevant chemistry in the public domain. It currently (as of June 2021) contains 59,122 fully curated classes, which makes it large in comparison to other reference ontologies. ChEBI is largely manually maintained by a team of expert curators. This is an essential prerequisite for its success, because it enables it to capture the terminology and classification logic shared by chemistry experts. However, the number of chemicals covered by ChEBI is dwarfed by the 110 million chemicals in the PubChem database \cite{wang_pubchem_2009}, which itself is not comprehensive. The manually curated portion of ChEBI only grows at a rate of around 100 entries per month, thus will only ever be able to cover a small fraction of the chemicals that are in its domain. ChEBI tries to navigate this dilemma by extending the manually curated core part of the ontology automatically using the ClassyFire tool \cite{djoumbou_feunang_classyfire_2016}. This approach has tripled ChEBI's coverage to 165,000 classes (as of June 2021). However, there are limitations to this approach. Firstly, ClassyFire uses a different underlying classification approach to ChEBI (e.g. conjugate bases and acids are not distinguished), thus, mapping to ChEBI loses classification precision. More importantly, ClassyFire is rule-based and while the extension of the ontology is automated, the creation and curation of the ClassyFire's rules is not. This limits the scalability of this approach. Somewhat inspired by ChEBI's workflow, we suggest navigating the ontology scaling dilemma by using a new kind of approach to \emph{ontology extension}, which transfers the design decisions of an existing ontology analogously to new classes and relations. Our starting point is an existing, manually curated reference ontology. We suggest the use of machine learning methods to learn some of the criteria that the ontology developers adopted in the development of the ontology, and then use the learned model to extend the ontology to entities that have not been covered by the manual ontology development process yet. We will illustrate this approach in this paper for the chemistry use case by training an artificial neural network (with a Transformer-based architecture) to automate the extension of ChEBI with new classes of chemical entities. The approach has several benefits: since it builds on top of the existing ontology, the extension will preserve the manually created consensus. Moreover, the model is trained solely on the content of the ontology itself and does not rely on any external sources. Finally, as we will see, the chosen architecture allows explanation of the choices of the neural network, and, thus to validate the trained model to some degree by manual inspection. In the next two sections we discuss related work and the overall methodology that we are using to train a model for classifying new classes of chemical entity as subclasses of existing classes in ChEBI. \section{Related Work} In this paper, we present a methodology for ontology extension, which can be considered as a kind of ontology learning. Ontology learning has been an active area of research for more than two decades \cite{assadi:hal-01617868,maedche2001ontology,biemann2005ontology,asim2018,ozaki2020learning} and a number of automated ontology generators have been developed. A recent publication \cite{ozaki2020learning} defined a list of six \textit{desirable goals} for ontology learning methods: they should support expressive languages, require small amount of time and training data, require limited or no human intervention, support unsupervised learning, handle inconsistencies and noise, and their results should be interpretable. Note that in this paper, we use the terms \textit{explainability} and \textit{interpretability} interchangeably. Sometimes explainability is considered to be a stronger form of interpretability \cite{gilpin2018explaining}. The fundamental make-up of the resulting ontologies varies widely -- in part due to different notions of what constitutes an ontology. A survey-based study by Biemann \cite{biemann2005ontology} defines three classes of ontologies: \textit{formal}, \textit{prototype-based} and \textit{terminological} ontologies. Most early and data-driven approaches resulted in prototype-based ontologies, in which concepts are not defined in natural language or by logical formulae, but solely by their members. New concepts are often derived from metric-based aggregations such as hierarchical clustering \cite{karoui2007contextual}. The quality of the resulting classification depends strongly on the chosen representation of individuals and the criteria for similarity, and may not agree with distinctions that are used by domain experts. Advances in natural language processing led to a different class of approaches - the \textit{terminological} ontologies. Here, artificial intelligence is used to analyse corpora of relevant literature in order to extract important terms and their relations. Yet, these approaches reflect rather than resolve the inherent ambiguities and differences in language use that exist within different communities of domain experts or even within single communities. The resolution of these ambiguities is an essential part of the ontology development process that involves extensive in-depth communication with and between domain experts \cite{booshehri2021introducing}. Finally, formal ontologies place a strong emphasis on definitions distinguishing entities, and a rich logical axiomatisation that yields a powerful foundation for reasoning and data integration \cite{xiao2018ontology, dessimoz_primer_2017, fikes2004owl}. While the majority of existing approaches in ontology learning focus on creating new ontologies from scratch, the ones that are dedicated to ontology extension use the ontology as a seed to identify terms that are important for the target domain \cite{liu2005semi, althubaiti2020combining, zhou2016research, barchi2014never, schutz2005relext, petrova2015formalizing}. These are used to guide approaches that are similar to those that are applied to learn ontologies 'from scratch'. Hence, the resulting extensions are not necessarily based on the principles that have been employed to develop the ontology in the first place, and may potentially introduce biases from the literature into the ontology. Some approaches involve several manual steps, in which experts evaluate concepts and related phrases to sort out these potential issues \cite{li2019method}. Involving human experts has the advantage of providing quality control, but is labour-intensive and costly. Our approach differs from the existing work in that it employs machine learning techniques but does not rely on text corpora. Rather, it relies only on the content of the ontology that is being extended, in particular on structured annotations. Our specific application domain is chemical ontology. One characteristic of chemical ontologies is the fact that many classes of chemical entities are annotated with information about their chemical structure. Particularly important for our purposes are annotations in the Simplified Molecular-Input Line-Entry System (SMILES) \cite{weininger1988smiles}, which is used to represent chemical entities as a linear sequence of characters. The SMILES notation is analogous to a language to describe atoms and their bonds within a chemical entity. In our approach, we train a deep learning classifier that is based on the ChemBERTa \cite{chithrananda2020chemberta} architecture. This chemistry-focused Transformer-based architecture has been successfully employed for toxicity prediction. In the context of this work, it has been trained for the first time on the structural annotations of an existing chemical ontology. The learning method biases the classifier towards the ontology's internal structure, yielding a model that is in line with the domain experts' conceptualisation as represented in the existing ontology. The resulting model is then used to integrate previously unseen classes into the ontology. This is a novel approach to the problem of chemical classification, which task has historically been approached in multiple different ways \cite{hastings_structure-based_2012}. Solutions that involve deep-learning methods were successfully employed for many other applications in chemistry \cite{mater2019deep}, such as the prediction of properties of chemicals \cite{goh2017smiles2vec} or reaction behaviour \cite{coley2019graph}. Yet, the automated classification of chemicals using deep learning according to an existing ontology has been largely unexplored. The ClassyFire tool \cite{djoumbou_feunang_classyfire_2016} is at the time of writing the most comprehensive method for structure-based automated chemical ontology extension. However, it uses a rule-based and algorithmic implementation that is cumbersome to maintain and is not able to adapt as the underlying ontology changes. In our previous work \cite{hastings2021learning}, we have evaluated several classifiers for this task, including a long short-term memory (LSTM) model which was the best-performing overall. The results of this effort were satisfactory as a whole, but several specific limitations were identified. In particular, the model failed to provide any prediction for a subset of input molecules, and the system as a whole offered no explainability. The current contribution harnesses a Transformer-based architecture and describes how the attention weights of the resulting model can provide insights into how the model made its decisions. Furthermore, by using transfer learning, a broader applicability of this data- and compute-hungry method becomes computationally more feasible. \section{Methodology} \label{sec:methodology} Our goal is to train a system that automatically extends the ChEBI ontology with new classes of chemical entities (such as molecules) based on the design decisions that are implicitly reflected in the structure of ChEBI. Thus, for our work we take the `upper level' of the ontology, which contains generic distinctions, as given. Moreover, ChEBI is relatively weakly axiomatised, consisting largely of a taxonomy supplemented by existentially restricted relationships. All chemical entities in ChEBI are represented as \textit{classes} and there are no individuals in the ontology. Thus, the ontology extension task consists of adding classes and subsumption relationships. Our focus is the extension of the ChEBI ontology with classes of chemical entities that may be characterised by a SMILES string, i.e., they are associated with a specific chemical structure. Chemical structures can typically only be specified for relatively specific types of chemical entity, thus, although these classes are not necessarily leaf nodes in the ontological hierarchy, they nevertheless tend to be in the `lower' (more specific) part of the hierarchy. The learning task for ontology extension may, thus, be characterised as follows: \textit{ Given a class of chemical entities (characterised by a SMILES string), what are its optimal direct superclasses in ChEBI}? While our goal is -- from an ontological point of view -- to extend the ChEBI ontology with new classes (i.e., adding new subsumptions), from a machine learning perspective we turned this problem into a classification task, for which we prepare an appropriate learning dataset from the ontology. Hierarchical chemical classifications should group chemical compounds in a scientifically valid and meaningful way \cite{hastings_structure-based_2012,bobach2012automated}. Each chemical entity has many structural features which contribute to its potential structure-based classification and structures that determine different classes may occur in a single molecule. Thus, ChEBI contains classes that overlap (i.e. share members). The ChEBI ontology provides two separate classification hierarchies for the chemical entities: one based on their structures and another based on their functions or uses. In the current work, we focus on the structure-based sub-ontology. Entities in the structure-based sub-ontology are often associated with specifications of their molecular structures, particularly -- but not exclusively -- the leaf nodes within the classification hierarchy. In ChEBI, a chemical entity with a defined structure can be the classification parent for another structurally defined entity, since all entities are classes according to the ChEBI ontology, and there can be different levels of specificity even amongst structurally defined classes. To formulate a \textit{supervised} machine learning problem, however, we need to create a distinction between those entities with chemical structures that form the input for learning, and the chemical classes that they belong to that form the learning target. This distinction is created by sampling structurally defined entities only from the ontology leaf nodes. As mentioned above, the SMILES notation is analogous to a language to describe atoms and their bonds within a chemical structure. Intuitively, this leads to a correspondence between the processing of chemical structures in this type of representation, and natural language processing \cite{schwaller2018found}. Therefore, architectures that have been successfully applied to language-based problems can also be employed for this multi-label prediction task. One of these successful architectures is \textit{Bidirectional Encoder Representations from Transformers} (BERT) \cite{devlin2018bert} -- a precursor of the \textit{Robustly optimized BERT}, (RoBERTa) \cite{liu2019roberta} architecture that our approach is based on. The BERT architecture offers a learning paradigm that enables pre-training the model on unlabeled data and then fine-tuning it for the ultimately desired task. Fine-tuning can be done by adding one additional layer to the pre-trained model, without requiring major modifications to the model's architecture. BERT is pre-trained on two unsupervised tasks: Masked Language Modeling (MLM), in which some tokens are randomly removed from the input sequences and the model will train to predict the masked tokens, and Next Sentence Prediction (NSP), a binary classification task that predicts whether or not the second sentence in the input sequence follows the first sentence in the original text. The RoBERTa model is an extension of the BERT model and it offers several improvements with minor changes in the pre-training strategy. The RoBERTa model does not include the NSP part of BERT, and it employs a dynamic masking approach as a replacement of the original masking scheme of BERT. While the original BERT model only applies masking once during data preprocessing, the RoBERTa model dynamically changes the masking pattern on each training sequence in every epoch. As a result, the model gets exposed to different versions of the same input data with masks on various locations. Since chemical structures in ChEBI typically belong to several ontology classes, the problem of automated chemical entity categorization can be viewed as a \textit{multi-label} prediction task. Figure~\ref{Fig:Fentin_hydroxide} shows the \textit{fentin hydroxide} molecule and its parents in the ChEBI ontology: \textit{organotin compound} and \textit{hydroxides}. \begin{figure} \centering \includegraphics[scale=0.47]{Figures/Fentin-hydroxide.pdf} \caption{\textit{Fentin hydroxide} and its hierarchical classes. Blue lines indicate the \textit{sub-class} relationships.} \label{Fig:Fentin_hydroxide} \end{figure} Our approach\footnote{\url{https://github.com/adelmemariani/chebi-roberta}} pre-trains a RoBERTa model on SMILES strings, and then predicts multiple chemical class memberships. The overall architecture is shown in Figure~\ref{fig:ontolearn-arch}. This architecture is similar to the one that was used for molecular property prediction in \citet{chithrananda2020chemberta}. \subsection{Dataset} \label{sec:dataset} To use the existing ontology classification as input to the learning task, the ontology first has to be transformed into an appropriate form. The ontology classification is inherently unbalanced, as different classes have different numbers of members and are partially overlapping. It is therefore necessary to define a \textit{sampling strategy} to select leaf node entities and classes to minimize the impact on the training. In order to be able to compare our results to our earlier findings, we have used the same dataset\footnote{\url{https://doi.org/10.5281/zenodo.4519815}} and sampling strategy as was used in \citet{hastings2021learning}. Using only the hierarchical sub-class relations in the ChEBI ontology, this dataset was created by randomly sampling leaf node molecular entities from higher-level classes that they are subclasses of, using an algorithm that aimed to minimize (as far as possible) class overlap, described in Section 3 of \cite{hastings2021learning}. The resulting dataset contained a total of 500 molecule classes and 31,280 molecules. Despite these balancing measures, it still suffers from certain imbalances. Figure~\ref{Fig:dataset} (left) illustrates the number of times each class has appeared in the training and test datasets. As illustrated, some of the classes appeared more frequently than others. Figure~\ref{Fig:dataset} (right) shows the number of members per number of associated classes. For example, 7,864 members have just one assigned class, whereas three members have 17 classes assigned. To train, validate and test our model, we divided the dataset into three subsets; a training set containing 21,896 molecules, a validation set of 2,815 molecules, and a test set of 6,569 molecules. \begin{figure} \centering \begin{minipage}[b]{0.48\textwidth} \includegraphics[width=\textwidth]{Figures/class_counts.png} \end{minipage} \hfill \begin{minipage}[b]{0.48\textwidth} \includegraphics[width=\textwidth]{Figures/Number_of_instances.png} \end{minipage} \caption{Left: class counts in the dataset. Right: Number of members per number of assigned classes} \label{Fig:dataset} \end{figure} \subsection{Input Encodings} Tokenization is a pre-processing step used to create a vocabulary from textual data. It is applicable at the character, word, or sub-word level. Pre-trained large-scale word embeddings such as Word2Vec \cite{mikolov2013efficient} and GloVe \cite{pennington2014glove} employ word tokenization to generate vector representations for words that can encapsulate their meanings, semantic connections, and the contexts in which they are used. Transformer-based models rely on a subword tokenization algorithm that counts the occurrences of each character pair in the dataset and incrementally adds the most frequently occurring pairs to the vocabulary. In our previous work, \citet{hastings2021learning}, we used two strategies to encode the input sequences for the LSTM model: a character-level tokenization and an atom-wise tokenization, where letter combinations that represent an atom were encoded as a token. In the current work, we use the Byte Pair Encoding (BPE) algorithm as a sub-word tokenization method with a RoBERTa architecture. \begin{table} \tiny \centering \begin{varwidth}[b]{0.4\linewidth} \centering \begin{tabular}{lllll} \toprule \textbf{Parameter} & \textbf{Value}\\ \midrule Number of attention heads & 12 \\ Number of hidden layers & 6 \\ Dropout for attention probabilities & 0.1 \\ Activation function in the encoder & gelu \\ Activation for the classification layer & sigmoid \\ Number of epochs in pre-training & 100\\ Number of epochs in fine-tuning & 30\\ Masked language modeling probability\!\!\!\! & \%15\\ Batch size & 4 \\ Loss function for pre-training & BCELoss \\ Loss function for fine-tuning & BCEWithLogitsLoss \\ Optimizer & Adam with weight decay \\ Number of vocabularies (tokens) & 1395 \\ Number of trainable parameters & 45,577,728 \\ Tokenizer & BPE \\ \bottomrule \end{tabular} \caption{(Hyper-)Parameters of the model} \label{tbl:hp} \end{varwidth} \hfill \begin{minipage}[b]{0.55\linewidth} \centering \includegraphics[scale=0.45]{Figures/Arch_abstract.pdf} \captionof{figure}{Architecture of our ontology extension approach} \label{fig:ontolearn-arch} \end{minipage} \end{table} \subsection{Experiment} To train the model, we used a single GPU. Table \ref{tbl:hp} shows the hyper-parameters for our model. We firstly pre-trained our model based on masked language modelling for 100 epochs \textit{(unsupervised)}. The pre-training step allows the model to discover common patterns in the SMILES strings by attempting to predict the masked tokens using the unmasked tokens. As discussed in Section \ref{sec:methodology}, the pre-trained model provides a proper starting point for training a model on a related desired task. This starting point incorporates the trained weights of the model. Furthermore, we validated the model on a separate dataset after each training epoch. The validation during training has no effect on model's trained weights, nevertheless, it helps in adjusting the model's hyper-parameters. Figure ~\ref{fig:evals} (a) illustrates the loss values for the train and validation sets during the pre-training phase. For the final multi-label classification task, we loaded the pre-trained model and trained it for 30 epochs with the class labels \textit{(supervised)}. Figure~\ref{fig:evals} (b) shows the train and validation loss during the fine-tuning step. Similarly, Fig.~\ref{fig:evals} (c) shows the F1 score for the validation dataset during the fine-tuning. \begin{figure} \centering \begin{minipage}[b]{0.3\textwidth} \centering \includegraphics[width=\textwidth]{Figures/ChEBI-RoBERTa_MLM.png} \\ (a) \end{minipage} \hfill \begin{minipage}[b]{0.3\textwidth} \centering \includegraphics[width=\textwidth]{Figures/ChEBI-RoBERTa_Fine_Tune_Loss.png} \\ (b) \end{minipage} \hfill \begin{minipage}[b]{0.3\textwidth} \centering \includegraphics[width=\textwidth]{Figures/ChEBI-RoBERTa_Fine_Tune_F1.png} \\ (c) \end{minipage} \caption{Train and validation loss: (a): pre-training (masked language modeling). (b): fine-tuning (class prediction). (c): F1 score for the validation dataset, during the fine-tuning step.} \label{fig:evals} \end{figure} \section{Results and Evaluation} \label{sec:eval} For our evaluations during and after training, we used the F1-score as the main measure. The F1 score may be computed in different ways depending on the averaging scheme: (1) \textit{samples}: calculates the F1 score for each molecule in the test dataset and then computes their average. (2) \textit{micro}: collects the total number of true positives, false positives, and false negatives and calculates the overall F1 score. (3) \textit{macro}: calculates the F1 score for each class and then computes their average. (4) \textit{weighted}: this averaging scheme is similar to the macro F1 score, but it calculates a weight for each class based on the number of true members in each class. Table \ref{tbl:scores} and Fig.~\ref{Fig:overal-f1} compare the results of the current model with the previously obtained results for the LSTM model from \cite{hastings2021learning}. We saw an improvement in performance both when we look at the distributions of values for the molecule-wise F1 scores (Figure~\ref{Fig:overal-f1}a) and for the class-wise F1 scores (Figure~\ref{Fig:overal-f1}b). A statistical comparison of the overall F1 score distributions shows that the difference in F1 scores is statistically significant ($p<0.001$, Figure~\ref{Fig:overal-f1}c). The raw output values of our model are the probabilities of a sigmoid function. Therefore, a threshold value must be applied to these probabilities to produce a binary vector, indicating the final classifications. These results are based on the classification threshold value of 0.5. The precision -- in our classification task -- shows the ability of the model to not wrongly assign a label to a molecule, while the recall score reflects the model's capability to discover all labels that were assigned to a molecule. \begin{table} \centering \begin{center} \begin{tabular}{lcccccccc} \toprule & \multicolumn{2}{c}{\textbf{Samples}} & \multicolumn{2}{c}{\textbf{Macro}} & \multicolumn{2}{c}{\textbf{Micro}} & \multicolumn{2}{c}{\textbf{Weighted}} \\ \midrule & \textbf{LSTM} & \textbf{RoBERTa} & \textbf{LSTM} & \textbf{RoBERTa} & \textbf{LSTM} & \textbf{RoBERTa} & \textbf{LSTM} & \textbf{RoBERTa} \\ \midrule \textbf{F1} & 0.66 & 0.76 & 0.71 & 0.77 & 0.74 & 0.80 & 0.73 & 0.79 \\ \midrule \textbf{Recall} & 0.66 & 0.75 & 0.68 & 0.76 & 0.70 & 0.78 & 0.70 & 0.78\\ \midrule \textbf{Precision} & 0.67 & 0.77 & 0.77 & 0.80 & 0.79 & 0.82 & 0.79 & 0.82\\ \midrule \textbf{ROC-AUC} & 0.83 & 0.87 & 0.84 & 0.89 & 0.85 & 0.88 & 0.85 & 0.89 \\ \bottomrule \end{tabular} \caption{The comparison of the scores achieved by two models.} \label{tbl:scores} \scriptsize \end{center} \end{table} \begin{figure} \centering \begin{minipage}[b]{0.3\textwidth} \centering \includegraphics[scale=0.1]{Figures/LSTM_RoBERTa_KDE_Mols_cut.png} \\ (a) \end{minipage} \hfill \begin{minipage}[b]{0.3\textwidth} \centering \includegraphics[scale=0.1]{Figures/LSTM_RoBERTa_Hist_Classes_Bin20.png} \\ (b) \end{minipage} \hfill \begin{minipage}[b]{0.3\textwidth} \centering \includegraphics[scale=0.1]{Figures/BoxPlots.png} \\ (c) \end{minipage} \caption{F1 score on test dataset. (a): Kernel density diagram based on the molecules. (b): Histogram diagram based on the classes. (c): Boxplots for the F1 scores of all 500 classes. A statistical test comparing the two class-wise F1 scores distributions yields a p-value of less than 0.001, indicating the distributions significantly differ.} \label{Fig:overal-f1} \end{figure} Self-attention in Transformer-based models enables the model to explore several locations in the input sequence to produce a better embedding for the tokens. As a result, the embeddings encode different contextual information for the same token in different positions (and different sequences). The architecture of the RoBERTa model contains a stack of Transformers' encoders, each consisting of multiple attention heads. Since the attention heads do not share parameters, each head learns a unique set of attention weights. Intuitively, attention weights determine the importance of each token for the embeddings of the next layers \cite{vig2006bertology}. In this sense, visualizing the attention weights of Transformer-based models helps to interpret the model with respect to the relative importance of different input items for making classifications \cite{vig2019multiscale}. While the benefit of attention visualization may be limited in explaining particular predictions, depending on the task, attention can be quite useful in explaining the model's overall predictions \cite{moradi2019interrogating, pruthi2019learning, serrano2019attention}. In fact, attention heads can reveal a wide variety of model behaviors and some of these heads may be more significant for model interpretation than others \cite{vig2019multiscale}. We examined how attention corresponds to different chemical structural elements, at both the token and molecule level. Figure~\ref{Fig:mols_att} shows the averaged attention weights of all heads in the last encoder of the model. The most attended sub-structures for each molecule are highlighted with green circles in the molecular graphs. It can be observed that often, most attention (darker green) is given to the heaviest atoms, for example \textit{bromine}, \textit{iron} and \textit{sulfur} in Fig.~\ref{Fig:mols_att} (a), (b) and (c) respectively. This corresponds to the broad principles of classification in organic chemistry as captured in ChEBI. The predicted classes in Fig.~\ref{Fig:mols_att} demonstrate that the model learned to assign appropriate labels to the chemical compounds. As illustrated in Fig.~\ref{Fig:mols_att} (d), the model assigned the \textit{barbiturates} class to the corresponding molecule, which class refers to the family of chemicals that contain a six-membered \textit{ring} structure, which was also the structural element given the most attention. Similarly, Fig.~\ref{Fig:mols_att} (e) shows that the model focused most on the \textit{phosphate} substructure when assigning the \textit{phosphatidylinositol} class to the molecule. \begin{figure} \centering \includegraphics[scale=0.52]{Figures/attentions_mol.pdf} \caption{The model predicted class labels for these molecules by attending to influential sub-structures (highlighted in green): (a) organobromine compound (b) iron molecular entity (c) arenesulfonic acid (d) barbiturates (e) phosphatidylinositol} \label{Fig:mols_att} \end{figure} \begin{figure} \centering \includegraphics[scale=0.53]{Figures/Overall_att_percentage_Final.pdf} \caption{Each cell represents the percentage of all attentions (by each head) that was given to the corresponding token. For example, head 5-6 in (b) dedicated 41.6\% of its attention to the Nitrogen atom. } \label{Fig:overal_att} \end{figure} \begin{figure} \centering \includegraphics[width=\textwidth]{Figures/ontExt.png} \caption{The extended ontology. Existing subsumption relations (black) have been enriched with new subclasses, shown with dashed borders. Correct subclass predictions are depicted with cyan, dashed arrows, while red, dotted arrows indicate misclassifications.} \label{Fig:ont_ext} \end{figure} The presented model takes a given class of molecules, represented by a SMILES string, and assigns the corresponding superclasses from the CHEBI ontology. ChEBI already makes use of an automated tool to extend its coverage beyond the manually curated core, namely ClassyFire. The model can be integrated into the ChEBI development process in the same way. The resulting system can then be used to integrate the given class into the ontology and translate the classification results into subsumption relations. Figure \ref{Fig:ont_ext} shows the result of this process. The implemented workflow, depicted in \ref{fig:ontolearn-arch}, is based on a model architecture and accompanying hyperparameters that have previously been used for chemical property prediction \cite{chithrananda2020chemberta}. The resulting model is then trained on the ontology data, which allows for the fully automated extension of the ChEBI ontology. \section{Discussion} \label{sec:discussion} ChEBI uses ClassyFire, a rules-based system, to extend its manually curated reference ontology to chemicals that are not yet covered. This approach has limitations, notably that ClassyFire is structured around a different chemical ontology with only a partial mapping to ChEBI, and ClassyFire's rules are manually maintained. The deep-learning-based approach that we presented can overcome the limitations of rules-based approaches by allowing dynamic creation of classifiers based on a given existing ontology structure. Yet, for optimal applicability, the approach must meet certain quality criteria. Ozaki \cite{ozaki2020learning} defined six goals for ontology extension, which we use to structure our discussion of our results. \noindent \textbf{Handling of inconsistencies and noise} Our model is trained on information that originated solely from the ontology itself. This design decision eliminates external sources of inconsistencies and noise. The comparison of the F1 scores in the table in Fig.~\ref{Fig:overal-f1} shows that this classification outperforms the current state-of-the-art approaches - including the formerly leading LSTM-based model. In particular, for those chemical classes that were the most challenging in the previous approach, the current approach performed almost twice as well, as illustrated in Figure \ref{Fig:overal-f1} (b). It should be noted that there nevertheless remain some chemical classes that perform worse than others. For example, classes that are based on cyclic structures pose challenges, as their information may be scattered around the respective SMILES strings. Alternative input formats and network architectures may be explored in the future to better handle these structures. The model may also benefit from a larger amount of data. The distribution of class memberships depicted in Figure \ref{Fig:dataset} indicates that the dataset features some classes far more often than others. These classes are more prominent, often by virtue of being higher in the ontology subclass hierarchy and, therefore, represent broader classes of chemicals that may share members with other classes. Such an imbalance can skew the training in favour of those classes. Different sampling and regularization techniques may be explored in the future to address this issue. \noindent \textbf{Unsupervised learning} The presented approach is a variant of ontology extension. The ontology is therefore a mandatory input, from which the information that is needed for the ontology extension is extracted. The resulting dataset does include labels for each molecule. Strictly speaking, it is thus a supervised learning approach. However, these labels are extracted fully automatically from the input -- the ontology. Therefore, no additional annotation by experts or other manual data pre-processing is necessary. \noindent \textbf{Human interaction} As the ontology is extended automatically, no interaction is required. \noindent \textbf{Expressivity} The system extends the given ontology using the same ontology language that has been used to build it. ChEBI is developed as an OWL ontology, which comes with expressive OWL-DL semantics. \noindent \textbf{Interpretability} The formerly best classifier was based on an LSTM architecture. This approach outperformed ClassyFire, but this performance came with a disadvantage: The reason for a specific classification was not transparent. This is problematic, because the experts that check the ontology extension need insights into the system's decision processes in order to evaluate the classifications. An explainable approach is therefore crucial. The attention mechanism of the RoBERTa architecture that has been used in the present approach helps to address this issue. Attention weights can be seen as a measure of how much focus is put on an individual token. A homogenous distribution of attention shows that nothing has been focused in particular, whilst high attention on a head shows that a particular token had a high impact. Figure \ref{Fig:overal_att} shows that carbon atoms, which are very common in organic chemistry, trigger a low general focus. At the same time, a high focus is put on oxygen atoms, that often indicate functional groups of high classificatory relevance, such as carboxy groups. Figure \ref{Fig:mols_att} shows which parts of a particular molecule have been focused on during the classification process. This information can be used to explain the decisions made by the model, raise trust in the prediction system, and aid the experts during the ontology extension process. \noindent \textbf{Efficiency} In \cite{ozaki2020learning} `efficiency' is defined as the time it takes to build the ontology. Once the model is fully trained, the classification which leads to the ontology extension only takes a few minutes. As an example, classification of 6,569 chemical entities in our test dataset took around 10 minutes. While extending the ontology itself is fast, the training of the model requires more time. Training is divided in pre-training and fine-tuning. The pre-training with 100 epochs took around 10 hours. This time is only invested once, and thereafter a pre-trained model can be fine-tuned repeatedly for several large sets of molecules and their corresponding classes comparatively quickly. Our final fine-tuning for 30 epochs took around 2 hours. \smallskip This analysis shows that the presented approach achieves the goals of ontology learning stipulated in \cite{ozaki2020learning}. One additional issue that needs to be addressed is \textit{applicability}. At the heart of the presented approach is a neural network that is trained based on the annotations of the ontology. In the same way as any text analysis approach to ontology generation is dependent on the existence of suitable text corpora, our approach requires that the ontology contains enough information to train a model to predict the superclasses of a new class. ChEBI is an ideal use case, because SMILES annotations provide rich, structured information that we could harness for training the model. Another potential application domain for our approach in biology are proteins, which are also classified based on structures, features of which can be annotated in the relevant ontology. Moreover, our approach is not limited to ontologies with structural information represented in annotations. E.g., for ontologies in material science one could consider training the model based on the physical properties (e.g., density, hardness, thermal conductivity), which are typically represented using data properties. In short, our approach to ontology extension is applicable to reference ontologies that associate classes with sufficient information that a neural network may learn the classification criteria that the ontology developers are using. \section{Conclusion and Future Work} We have presented a novel approach to the problem of ontology extension, applied to the chemical domain. Instead of extending the ontology using external resources, we created a model using the ontology's own structured annotations. This Transformer-based model can not only classify previously unseen chemical entities (such as molecules) into the appropriate classes, but also provides information about relevant aspects of its internal structure on which the decision is based. At the same time, it was able to outperform previously existing approaches to ontology-based chemical classification in terms of predictive performance. However, the trained model still struggles with several chemical classes that depend on specific structural features. E.g, classes that exhibit cyclic structures are often found in the lower quantile of classification quality. This behaviour can be traced back to the way molecules are encoded into the SMILES notation. This weakness might be addressed by using architectures that operate directly on the molecular structures, such as Graph Neural Networks \cite{scarselli2008graph}. We have illustrated our approach by applying it to the chemical domain, but as we discussed in Section~\ref{sec:discussion}, the approach is applicable to any ontology that contains classes that are annotated with information that is relevant to their position in the class hierarchy. While our approach supports an automatic extension of an ontology, it can also be used in a semi-automated fashion to help ontology developers in their manual curation of the ontology. Since the model is trained based on the content of a manually curated ontology, improving and extending this ontology will lead to better quality training data and, thus, enable better predictions. Hence, there is a potential for a positive feedback loop between manual development and the AI-based extension. One limitation of our current approach is that it does not use most of the logical axioms of the ontology during the learning process. The logical axioms within the ontology could be used to detect possible inconsistencies between the predicted classes and the ontology's axioms. A logic-based framework could then be employed to detect those results that were most likely mis-classifications. Another strategy to address this gap would be to represent the axioms in the form of Logical Neural Networks \cite{riegel2020logical} in order to detect possible inconsistencies already in the learning process and to penalise them accordingly. Overall, there is still a pressing need for research in the field of (semi-)automatic ontology extension. Here, the growing field of neuro-symbolic integration can serve as the interface between formal ontologies and the power of deep learning. The possibility of incorporating explanations may further the understanding of the inner workings of artificial intelligence systems and, therefore, raise trust in these systems.
\section{Introduction} In March 2020, the worldwide-spreading COVID-19 pandemic has forced a sudden transition in educational systems from onsite to online. For subjects which do not require face-to-face activities such as laboratory sessions, most lecturers may find no significant difficulty in delivering teaching materials online: asynchronously (e.g., in a pre-recorded video) or synchronously (e.g., in a videoconference which allows real-time interactions with students). However, when it comes to the assessment of students' performance, the problem of designing an objective, dishonesty-proof online examination mechanism remains largely unsettled. The difficulty ---perhaps impossibility--- of guaranteeing that online examinations are free from cheating opportunities has raised broad concern \cite{BilenMatros,LeeKimParkHenning,LancasterCotarlan} even before the pandemic \cite{CerimagicHasan,FaskEnglanderWang,Rowe,WatsonSottile,DiedenhofenMusch,Varble,GoldenKohlbeck}. As a survey has revealed, students feel that they are almost four times more likely, and that their classmates are over five times more likely, to commit an academic dishonesty in an online class than in an onsite class \cite[Table 6]{WatsonSottile}. Upon their first-glance of online examination questions, students would complete the examination individually if they feel sufficiently confident to do so, otherwise they would copy these questions and paste them on an online forum of classmates where they look for assistance \cite[page 933]{CerimagicHasan}. The latter could ultimately be in the form of (a photograph of) a classmate's already-completed answer sheet ---which can be uploaded very easily to the forum--- to be plagiarised by, possibly, all students in the forum who are currently working on the same examination. The opportunity for such dishonesties is wide open in every online examination. Meanwhile, the evidence, which usually can only be acquired from the students' submitted answer sheets, albeit often triggering suspicion, is rarely definitive enough for a penalty imposition (unless, for instance, a student accidentally submitted another student's answer sheet instead of his/her own). Many examiners thus have no choice but to omit many alleged cases of dishonesty. Such a situation raises a challenge for examiners: while vaccinations immunising people against COVID-19 have begun to be discovered, ``vaccinations'' immunising students against the temptation of committing academic dishonesties in online examinations have yet to be. If no action is taken, research has shown, there will be widespread cheating \cite[page 199]{BilenMatros}. Possible actions already put forward in the literature include the use of cameras \cite{BilenMatros}, a developed software \cite{DiedenhofenMusch}, miscellaneous technologies \cite{LeeKimParkHenning}, and paraphrasing \cite{GoldenKohlbeck}; modification of the assessment format \cite{NguyenKeusemanHumston}; and various practicalities \cite{Varble}. In the academic year 2020--2021, the three authors were assigned as a team ---the first author being the coordinator--- to online-teach the two calculus modules designed for first-year undergraduate students in the Chemical Engineering Department of the aforenamed university: Calculus 1 in the odd semester and Calculus 2 in the even semester. These modules cover a wide range of topics albeit only to a modest depth (see Figure \ref{fig:syllabi}; of note is the presence of some elementary linear algebra materials at the end of Calculus 2). Each module is assessed by ---apart from several formative assignments--- both a mid-term examination covering all first trimester materials and a final examination covering all second trimester materials. The team, therefore, has organised a total of four examinations in the mentioned academic year. Each examination was online and individual, making present the examiners' challenge described earlier. \begin{figure}[h!]% \centering \textbf{Calculus 1} \cite{VarbergPurcellRigdon}\medskip \begin{tabular}{llp{10cm}} First trimester &: & inequalities and absolute values; functions and their graphs; operations on functions; limits; continuity; differentiability; the derivative.\\[0.1cm] Second trimester &: & applications of the derivative: tangents and normals, kinematics, implicit differentiation and related rates, linear approximations, curve-sketching; transcendental functions; L'H\^{o}pital's theorem. \end{tabular}\bigskip \textbf{Calculus 2} \cite{VarbergPurcellRigdon,AntonRorresKaul}\medskip \begin{tabular}{llp{10cm}} First trimester &: & indefinite integration; definite integration; applications of definite integration: areas, volumes, work and fluid force, masses and centres of mass; bivariate functions: limits, partial derivatives, directional derivatives, second partial derivatives test.\\[0.1cm] Second trimester &: & double integration; applications of double integration: volumes, masses and centres of mass; elementary linear algebra: systems of linear equations, Gaussian elimination, matrices, determinants, eigenvalues and eigenvectors of matrices. \end{tabular} \caption{Syllabi of Calculus 1 and Calculus 2.} \label{fig:syllabi} \end{figure} Our first examination ---the mid-term examination of Calculus 1--- is the closest one to an onsite examination in terms of its design: a set of essay questions were uploaded in the beginning of the two-hour examination period in the form of a PDF document; students were to handwrite their answers on pieces of paper, scan or photograph them, and upload them in the form of a PDF document by the end of the examination period. From the submitted answers, some indications of collaborations were noticeable, albeit, as previously remarked, did not form sufficiently solid evidence for a sanction. Nevertheless, we ---without saying anything to the students--- kept in mind several groups of two to three students who, due to their exceptionally similar answer layouts, were alleged to collaborate. In our second examination ---the final examination of Calculus 1--- we implemented a protocol which prevented the groups allegedly collaborating in the previous exam to collaborate again. We assigned to each student a different integer formed by \textit{three non-zero digits}, which we refer to as the student's \textit{examination code}. Before the examination began, each student was made aware of his/her examination code, but not at all of how this code will be used in the examination. The latter was made to become clear only on the day of the examination, by the instructions for each question read by the students. See Figure \ref{fig:calculus1} and its caption for (an English translation of) the third question on the examination paper, and some explanation. With this protocol, students, given that they were unlikely to expect such an organised randomisation system, were hoped to be more inclined towards completing the examination independently than seeking help from their classmates who ---as they knew--- had different examination codes, thereby hopefully reducing dishonesties. Indeed, less evidence of dishonesties were found in this second examination. \begin{figure}[h!]% \centering \scalebox{0.825}{\begin{tabular}{|c|}\hline \phantom{\tiny a}\\ \begin{minipage}{12.5cm}\small $\boxed{\textbf{QUESTION 3}}$\smallskip \noindent\underline{If the \textbf{third digit} of your examination code is \textbf{1, 2, or 3}, attempt \textbf{TYPE A}.}\\[0.1cm] \noindent\underline{If the \textbf{third digit} of your examination code is \textbf{4, 5, or 6}, attempt \textbf{TYPE B}.}\\[0.1cm] \noindent\underline{If the \textbf{third digit} of your examination code is \textbf{7, 8, or 9}, attempt \textbf{TYPE C}.}\bigskip \noindent\textbf{\underline{TYPE A}} \begin{enumerate} \item[\textbf{(a)}] Using \textbf{logarithmic differentiation}, determine the value of $y'$ for $x=0$ if: \begin{enumerate} \begin{multicols}{2} \item[\textbf{(i)}] $\displaystyle y=\frac{\sqrt{4+5\sin x}}{x^3 + x + 1}$. \item[\textbf{(ii)}] $\displaystyle y = (x+1)^{e^{\sqrt{x+1}+3}}$. \end{multicols} \end{enumerate} \item[\textbf{(b)}] Using \textbf{L'H\^opital's theorem}, determine the value of $$\lim_{x\to-\infty}(2x-3)\arctan\left(-\frac{3}{x}\right).$$ \end{enumerate}\bigskip \noindent\textbf{\underline{TYPE B}} \begin{enumerate} \item[\textbf{(a)}] Using \textbf{logarithmic differentiation}, determine the value of $y'$ for $x=0$ if: \begin{enumerate} \begin{multicols}{2} \item[\textbf{(i)}] $\displaystyle y=\frac{\sqrt{9+2\sin x}}{x^3 + x + 1}$. \item[\textbf{(ii)}] $\displaystyle y = (x+1)^{e^{\sqrt{x+1}-3}}$. \end{multicols} \end{enumerate} \item[\textbf{(b)}] Using \textbf{L'H\^opital's theorem}, determine the value of $$\lim_{x\to-\infty}(3x+1)\arctan\left(-\frac{4}{x}\right).$$ \end{enumerate}\bigskip \noindent\textbf{\underline{TYPE C}} \begin{enumerate} \item[\textbf{(a)}] Using \textbf{logarithmic differentiation}, determine the value of $y'$ for $x=0$ if: \begin{enumerate} \begin{multicols}{2} \item[\textbf{(i)}] $\displaystyle y=\frac{\sqrt{1+3\sin x}}{x^2 + x + 1}$. \item[\textbf{(ii)}] $\displaystyle y = (x+1)^{e^{3-\sqrt{x+1}}}$. \end{multicols} \end{enumerate} \item[\textbf{(b)}] Using \textbf{L'H\^opital's theorem}, determine the value of $$\lim_{x\to-\infty}(4x-1)\arctan\left(\frac{1}{x}\right).$$ \end{enumerate} \end{minipage}\\ \phantom{\tiny a}\\\hline \end{tabular}} \caption{The third question of our final examination of Calculus 1. Notice how we let the third digit of the student's examination code determine which one of the three different types of the question (A, B, or C, differing only on numerical details) should be attempted by the student. The examination itself consisted of three questions; the same protocol was applied to the first and second questions using, respectively, the first and second digits of the examination codes. This protocol was not made known to students before the examination, making preparations for collaborating impossible. The examination codes of all students were first generated randomly in Microsoft Excel using the formula \texttt{=RANDBETWEEN(1;9)*100+RANDBETWEEN(1;9)*10+RANDBETWEEN(1;9)}, and then carefully edited to prevent the groups allegedly collaborating in the previous exam from collaborating again: each member of the same group must be allocated a different type of each question.} \label{fig:calculus1} \end{figure} Our third examination ---the mid-term examination of Calculus 2--- was organised in a way similar to our second examination, albeit with only two ---rather than three--- different types per question. This time we found slightly more evidence of dishonesties, perhaps because of not only the reduction of the number of question types but also the fact that the students were already familiar with the examination mechanism which made it possible for some of them to have devised some collaboration plans. The main purpose of this note is to expose what we did on our fourth examination: the final examination of Calculus 2. For this examination we designed a completely new examination format with the aim of achieving an absolute prevention of plagiarism. The underlying wish was that each student could receive a different type of each question so as not to have a classmate whose answer is plagiarisable, and thus that every question could have as many different types as the number of students. For the reader's information, the number of students actively enrolled in Calculus 2 was 81; they were divided into two parallel classes: class E of size 38 and class F of size 43. In the upcoming section, we describe how we prepared and randomised the questions. Subsequently, we describe how we prepared the question paper, which was in the form of a Microsoft Excel spreadsheet (section \ref{sec:spreadsheet}). We then continue with some discussions on the marking mechanism (section \ref{sec:marking}), the guidelines which must be given to students so that they complete this examination properly and the pre-examination simulation (section \ref{sec:guidelines}), and, to conclude, the strengths and weaknesses of this examination format (section \ref{sec:strengthsandweaknesses}). \section{Questions preparation and randomisation mechanism}\label{sec:questions} The purpose of this examination was to assess the students' understanding on the materials of the second trimester of Calculus 2 (see Figure \ref{fig:syllabi}). Our first radical change from the previous three examinations was that, for this examination, we used, rather than essay questions, 20 short-answer questions: those that demand only final answers.\footnote{In a normal, non-pandemic situation, this may be suboptimal (cf.\ section \ref{sec:strengthsandweaknesses} and \cite{BraswellKupin,Wolf}).} Since we wished that every student could be assigned a different type of each question, our first step was to prepare, rather than a set of 20 questions, a set of 20 \textit{families} of questions, each of which was made to depend on at least one of the following ten randomisation parameters: \begin{itemize} \item $\alpha_1$: the first digit of the student's year of entry, \item $\alpha_2$: the second digit of the student's year of entry, \item $\alpha_3$: the third digit of the student's year of entry, \item $\alpha_4$: the fourth digit of the student's year of entry, \item $\beta_1$: the third-to-last digit of the student's ID number, \item $\beta_2$: the second-to-last digit of the student's ID number, \item $\beta_3$: the last digit of the student's ID number, \item $\gamma_1$: the first digit of the student's examination code, \item $\gamma_2$: the second digit of the student's examination code, \item $\gamma_3$: the third digit of the student's examination code, \end{itemize} and such that its final answer is an \textit{integer} ---not necessarily positive--- which depends on the involved parameters. The students' examination codes were the same as the ones used in the previous examination (the mid-term of Calculus 2). Clearly, the use of each parameter resulted in a different level of randomisation which depends on the number of values assumed by the parameter (Figure \ref{fig:parameter}). Using the $\alpha_i$s, for instance, did not result in a significant randomisation, since the values of $\alpha_1$ and $\alpha_2$ were the same for every student ($2$ and $0$ respectively), and only 11 out of 81 students had $\left(\alpha_3,\alpha_4\right)\neq (2,0)$; these were the students taking the module for the second time due to not passing on their first take. We therefore made use of the $\alpha_i$s less frequently than the $\beta_i$s and the $\gamma_i$s. Whenever we need a parameter which is desired to be non-zero to prevent a question from being degenerate or trivial, we could always choose one of the $\gamma_i$s (or, less preferably, $\alpha_1$). \begin{figure}[h!] \centering \begin{tabular}{|l||c|c|c|c|c|c|c|c|c|c|}\hline Parameter & $\alpha_1$ & $\alpha_2$ & $\alpha_3$ & $\alpha_4$ & $\beta_1$ & $\beta_2$ & $\beta_3$ & $\gamma_1$ & $\gamma_2$ & $\gamma_3$\\\hline Number of assumed values & $1$ & $1$ & $2$ & $4$ & $2$ & $9$ & $10$ & $9$ & $9$ & $9$\\\hline \end{tabular} \caption{The number of different values assumed by each parameter.} \label{fig:parameter} \end{figure} Let us now present some examples: (the English translations of) some of our actual questions, discussed along with various aspects related to their designing process. The following question became Question 4 on the examination paper. \begin{question}{4} Let the density at every point $(x,y)$ on a two-dimensional object in the shape of a right triangle with vertices $(0,0)$, $\left(\gamma_2,0\right)$, and $\left(0,\gamma_3\right)$ be given by $\delta(x,y)=6x+6y$. Determine the mass of the object. \end{question} \begin{answer}{4} $\gamma_2\gamma_3\left(\gamma_2+\gamma_3\right)$. \end{answer} This is a question on the application of double integrals to compute the mass of a planar lamina, which is made to depend on two of the ten mentioned parameters: $\gamma_2$ and $\gamma_3$. The constant $6$ in the formula of $\delta(x,y)$ was used since it is the most efficient choice which achieves the question's admissibility: it is the smallest positive integer $c$ for which the formula $\delta(x,y)=cx+cy$ results in an integer answer for all possible values of $\gamma_2$ and $\gamma_3$. Notice also how we exploited the fact that the $\gamma_i$s are non-zero to guarantee the proper existence of the mentioned triangle. The following is another example, Question 7 of the examination, whose non-triviality relies on the fact that $\alpha_1$ and $\gamma_2$ are both non-zero. \begin{question}{7} Determine the value of $p$ for which the system of linear equations whose augmented matrix is $$\left(\begin{array}{ccc|c} -2\alpha_1 & 4\gamma_2 & 1 & 1\\ \alpha_1 & \gamma_2 & -2 & 2\\ -\alpha_1 & \gamma_2 & p+\gamma_3 & -p \end{array}\right)$$ has no solution. \end{question} \begin{answer}{7} $-\gamma_3+1$. \end{answer} The above two questions depend on at least two parameters. Let us now present a question which depends only on one parameter: $\gamma_2$. Since $\gamma_2\in\{1,\ldots,9\}$, this question has only $9$ different types, meaning that many students will receive it with exactly the same numerical details, creating some opportunities for collaboration. To obtain some idea whether such opportunities were visible enough to ---and exploited by--- the students, in section \ref{sec:strengthsandweaknesses} we gather some data and perform a quick check of whether the number of types a question has correlates with the number of students answering the question correctly. \begin{question}{12} Determine the $(3,3)$-entry of the inverse of the matrix $$A=\left(\begin{array}{ccc} -1&1&-1\\\gamma_2&1&-2\\0&-1&1 \end{array}\right).$$ \end{question} \begin{answer}{12} $-\gamma_2-1$. \end{answer} Instead of demanding the whole matrix $A^{-1}$, in a question whose answer must be an integer, we merely demand the value of a particular entry. Another possibility is to demand, instead, the trace of $A^{-1}$. To guarantee that the answer is an integer, we designed the matrix $A$ to be \textit{unimodular} (see, e.g., \cite[Chapter 2]{Banerjee}); it has determinant $1$ for all choices of $\gamma_2$. We also used unimodular matrices as coefficient matrices of systems of linear equations whose solutions were required to be integral. Designing such families of questions certainly demands carefulness; computer algebra systems such as Maple (see, e.g., \cite{Vivaldi}) provided significant assistance. Fortunately, as most of the students enrolled in this module were first-year undergraduate students in a non-mathematics department, we could, reasonably safely, assume that none of them had the fluency to use such systems during the examination. \section{Spreadsheet preparation}\label{sec:spreadsheet} Once we have the 20 families of questions and their answers, we began preparing the examination paper, which is in the form of a Microsoft Excel spreadsheet. In this section we describe the process in detail. Note that we used Microsoft Excel 2010. \begin{enumerate}\setlength{\itemsep}{10pt} \item \label{step:width} Firstly, after opening a new Microsoft Excel spreadsheet, we shrink and vertically middle-align the cells as demonstrated in Figure \ref{fig:Excel123}. We select all cells (CTRL + A), click the Format menu on the Home tab, click Column Width (top panel), and set the column width to 2.00 and click OK (middle panel). Then, we click the middle align button (bottom panel). \begin{figure}[h!] \centering \fbox{\includegraphics[width=\linewidth]{Excel1.png}}\\[0.1cm] \fbox{\includegraphics[width=\linewidth]{Excel2.png}}\\[0.1cm] \fbox{\includegraphics[width=\linewidth]{Excel3.png}} \caption{Shrinking and vertically middle-aligning the cells.} \label{fig:Excel123} \end{figure} \item We also decide to use the Times New Roman font globally (Figure \ref{fig:Excel4}). \begin{figure}[h!] \centering \fbox{\includegraphics[width=\linewidth]{Excel4.png}} \caption{Selecting the Times New Roman font.} \label{fig:Excel4} \end{figure} \item \label{step:parameters} Next, we create the heading of the examination paper by formatting the worksheet as in Figure \ref{fig:Excel5}. In the figure we see, in particular, that students will store the values of their parameters $\alpha_1$, $\alpha_2$, $\alpha_3$, $\alpha_4$, $\beta_1$, $\beta_2$, $\beta_3$, $\gamma_1$, $\gamma_2$, and $\gamma_3$ in cells \textbf{M16}, \textbf{N16}, \textbf{O16}, \textbf{P16}, \textbf{N18}, \textbf{O18}, \textbf{P18}, \textbf{J20}, \textbf{K20}, and \textbf{L20}, respectively. \begin{figure}[h!] \centering \fbox{\includegraphics[width=\linewidth]{Excel5.png}} \caption{The English translation of the heading of the examination paper.} \label{fig:Excel5} \end{figure} \item We are now ready to begin typing the questions. Let us first explain how we type our first question (Figure \ref{fig:Excel678}). The original, parametered form of this question is as follows. \begin{question}{1} Determine the value of $$\int_0^{\alpha_3}\int_{2y-3}^{\gamma_3}4xy\,dx\,dy.$$ \end{question} \noindent First, we merge the cells \textbf{B23} and \textbf{C23} to become one cell whose format is set to be \textit{text} and which stores the question number, ``\textbf{1.}'' (in bold, for extra emphasis), with left horizontal alignment (top panel). Then we type the question as it is, exploiting the small size of the cells to store the symbols as tidily as possible and merging some nearby cells whenever necessary\footnote{We took all mathematical symbols from the Symbol menu, thereby making no use of the Equation menu, which inserts mathematical symbols in the form of moveable objects.}. The upper bound of the outer integral, $\alpha_1$, must be allocated a single cell: \textbf{N24}, in which we type the formula \texttt{=M16} since the value of $\alpha_1$ will be stored by students in cell \textbf{M16} (middle panel). Similarly, in the merged cells \textbf{O24} and \textbf{P24}, we type the formula \texttt{=L20}, since the value of $\gamma_3$, the upper bound of the inner integral, will be stored by students in \textbf{L20} (bottom panel). Finally, in line 27, we create a box in which students will type in his/her integer answer.\smallskip \begin{figure}[h!] \centering \fbox{\includegraphics[width=0.825\linewidth]{Excel6.png}}\\[0.1cm] \fbox{\includegraphics[width=0.825\linewidth]{Excel7.png}}\\[0.1cm] \fbox{\includegraphics[width=0.825\linewidth]{Excel8.png}} \caption{Typing Question 1.} \label{fig:Excel678} \end{figure} \noindent The next two questions, in their original, parametered form, are: \begin{question}{2} Determine the value of $a$ if $$\int_a^{\beta_2+\gamma_1}\int_1^2 x^{-2}\,dx\,dy=\frac{3}{2}.$$ \end{question} \begin{question}{3} By reversing the order of integration, one obtains $$\int_0^{\gamma_3}\int_{x+1}^{\gamma_3+1} f(x,y)\,dy\,dx=\int_1^a\int_0^{y-1} f(x,y)\,dx\,dy.$$ Determine the value of $a$. \end{question} \noindent Accordingly, when typing Question 2, the formula \texttt{=O18+J20} is stored in cell \textbf{N30} to acquire the value of $\beta_2+\gamma_1$, and when typing Question 3, the formulae \texttt{=L20} and \texttt{=L20+1} are stored in cells \textbf{J36} and in the merged cells \textbf{K36} and \textbf{L36} to acquire the values of $\gamma_3$ and $\gamma_3+1$, respectively (Figure \ref{fig:Excel9}).\smallskip \begin{figure}[h!] \centering \fbox{\includegraphics[width=0.825\linewidth]{Excel9.png}} \caption{The first three questions on the examination paper.} \label{fig:Excel9} \end{figure} \noindent Next, we type all subsequent questions similarly. Notice that, to maintain tidiness, we consistently lengthen the border rule which is drawn between columns \textbf{AF} and \textbf{AG}, i.e., the vertical page-break (cf.\ the document's print preview), and we let no question be split by the horizontal page-breaks (Figure \ref{fig:Excel10}). (See section \ref{sec:guidelines} for a reason for this.) \begin{figure}[h!] \centering \fbox{\includegraphics[width=0.825\linewidth]{Excel10.png}} \caption{Maximising tidiness by letting no question be split by the horizontal page-breaks. Notice the location of Question 5. The page-breaks ---dotted lines--- become visible if we have opened the document's print preview at least once.} \label{fig:Excel10} \end{figure} \item \label{step:markingcell} Once the questions are all typed, we set the width of column \textbf{AG} to be 3.00 (cf.\ step (\ref{step:width})); this column will be used for marking purposes. \item \label{step:copy} The reader who follows the procedure up to this step is now advised to make a copy of the spreadsheet file for the purpose of following the marking preparations in section \ref{sec:marking}. The subsequent steps of the present section are to be implemented on the original file. \item We unshow the gridlines for a clean, actual-examination-paper-like appearance. This is done by unchecking the Gridlines checkbox on the View tab (Figure \ref{fig:Excel11}). \begin{figure}[h!] \centering \fbox{\includegraphics[width=0.825\linewidth]{Excel11.png}} \caption{Unshowing the gridlines.} \label{fig:Excel11} \end{figure} \item Next, we select all cells, click the Format menu on the Home tab, and click Format Cells. When the Format Cells window appears, we check the Hidden checkbox on the Protection tab (Figure \ref{fig:Excel12}). This is done to make all formulae invisible later when the sheet is protected. \begin{figure}[h!] \centering \fbox{\includegraphics[width=0.6\linewidth]{Excel12.png}} \caption{The Protection tab on the Format Cells window.} \label{fig:Excel12} \end{figure} \item Before protecting our sheet, we must unlock all cells which will be filled out by students during the exam: those which will store students' names and ten parameters, and those which will store students' answers. This is done by selecting all these cells, clicking the Format menu on the Home tab, clicking Format Cells, and unchecking the Locked checkbox on the Protection tab on the Format Cells window (Figure \ref{fig:Excel12}). \item \label{step:protect} Finally, we are ready to protect the sheet. This is done simply by clicking the Protect Sheet menu on the Review tab, entering a password for unprotecting the sheet ---decided by and known only to us as examiners--- on the text box on the Protect Sheet window which appears (Figure \ref{fig:Excel13}), clicking the OK button, and repeating this on the Confirm Password window which will subsequently appear. \begin{figure}[h!] \centering \fbox{\includegraphics[width=0.825\linewidth]{Excel13.png}} \caption{Protecting the sheet.} \label{fig:Excel13} \end{figure} \item The examination paper is now ready to use. The reader who follows the procedure up to this final step is invited to inspect that, in this protected condition, cells other than the unlocked ones are all uneditable, and formulae stored in various cells to acquire values related to the randomisation parameters are all invisible. This disables students from seeing how this examination was designed, in particular how the questions were randomised. \end{enumerate} \section{Marking}\label{sec:marking} The substantial part of the marking job lies in the preparation which we now explain. The following reader could implement this preparation on the copy of the examination spreadsheet which we advised to prepare in step (\ref{step:copy}) of the previous section. It is advisable to complete this preparation before the examination day. \begin{enumerate}\setlength{\itemsep}{10pt} \item Let us first discuss the marking preparation for Question 1. The correct answer to Question 1, in its original, parametered form, is the following. \begin{answer}{1} $-2{\alpha_3}^4+{\alpha_3}^2{\gamma_3}^2+8{\alpha_3}^3-9{\alpha_3}^2$ \end{answer} \noindent To mark a student's answer to this question, we have to check whether the number stored by the student in cell \textbf{G27} ---the answer cell of Question 1--- equals to $-2{\alpha_3}^4+{\alpha_3}^2{\gamma_3}^2+8{\alpha_3}^3-9{\alpha_3}^2$, where $\alpha_3$ and $\gamma_3$ are the third digit of the student's year of entry and the third digit of the student's examination code, respectively, stored by the student in cells \textbf{O16} and \textbf{L20}, respectively. To perform this check, we store in cell \textbf{AG27} ---the marking cell of Question 1 (cf.\ step (\ref{step:markingcell}) of the previous section)--- the formula \begin{center} \texttt{=IF(G27=-2*O16$^\wedge$4+O16$^\wedge$2*L20$^\wedge$2+8*O16$^\wedge$3-9*O16$^\wedge$2;1;0)} \end{center} which gives $1$ if the student's answer is correct, and $0$ otherwise (Figure \ref{fig:Excel14}).\smallskip \begin{figure}[h!] \centering \fbox{\includegraphics[width=0.825\linewidth]{Excel14.png}} \caption{Entering the formula for marking Question 1.} \label{fig:Excel14} \end{figure} \noindent Once the formula in cell \textbf{AG27} is entered, the reader could check its correctness by inputting, for instance, $\alpha_3=2$ and $\gamma_3=7$ in cells \textbf{O16} and \textbf{L20}, respectively, after which the double integral to be calculated reads $$\int_0^2\int_{2y-3}^7 4xy\,dx\,dy.$$ Since \begin{align*} \int_0^2\int_{2y-3}^7 4xy\,dx\,dy &= 2\int_0^2 \left[x^2y\right]_{x=2y-3}^{x=7} dy\\ &= 2\int_0^2 \left[49y-(2y-3)^2y\right]dy\\ &= 2\int_0^2 \left(-4y^3 + 12y^2 + 40y\right)dy\\ &= 2\left[-y^4 + 4y^3 + 20y^2\right]_{y=0}^{y=2}\\ &= 2\left[\left(-2^4+4\cdot2^3+20\cdot2^2\right)-\left(-0^4+4\cdot 0^3+20\cdot 0^2\right)\right]\\ &= 2\cdot 96\\ &= 192, \end{align*} in cell \textbf{AG27} there should appear $1$ if the integer $192$ is stored in the answer cell \textbf{G27}, and $0$ otherwise.\smallskip \noindent Next, we treat all subsequent questions similarly. \item Finally, we store in cell \textbf{AG162} ---the one just below the last question's answer cell--- a formula which calculates the student's total mark. Assuming that each of the 20 questions are weighted equally and the total mark is to be an integer between $0$ and $100$ inclusive, the total mark is simply the sum of the numbers stored in all marking cells multiplied by $5$: \begin{center} \texttt{=SUM(AG27:AG161)*5} \end{center} (Figure \ref{fig:Excel15}). \begin{figure}[h!] \centering \fbox{\includegraphics[width=0.825\linewidth]{Excel15.png}} \caption{Calculating a student's total mark.} \label{fig:Excel15} \end{figure} \end{enumerate} The marking preparation is complete. We are now ready to mark a completely filled out examination paper submitted by a student. To do this, we first open and unprotect the submitted file by clicking the Unprotect Sheet menu on the Review tab and entering our password (cf.\ step (\ref{step:protect}) of the previous section). After that, we simply copy the entire column \textbf{AG} of the present file and paste it on column \textbf{AG} of the file submitted by the student. By doing so, we immediately see the student's total mark in cell \textbf{AG162}. \section{Guidelines and simulation}\label{sec:guidelines} The newness of this examination format made it necessary for us to carry out a simulation in the final class of the semester, taking place two working days before the examination. This simulation, being a quiz in exactly the same format as the examination but consisting only of 5 questions, aims (besides to check students' understanding on materials) to familiarise students with the new examination format, and examiners with technical issues that may be experienced by students during the examination and by examiners during the marking process. Before the quiz took place, we gave out a guideline sheet to be read and understood by all students so that no confusion will arise with respect to technicalities. The content of the sheet include (but is not limited to) the following. \begin{enumerate} \item Make sure that you know your own \textbf{examination code}. \item \label{guideline:excel} The quiz will be given in the form of \textbf{an \ul{Excel (.xlsx)} file} containing \textbf{\ul{5 short-answer questions}}. \textbf{You \ul{MUST} use \textul{MICROSOFT EXCEL} to open this file}. \item Every question has an \textbf{integer} answer. \item \label{guideline:before} Fill out the form on the heading of the examination sheet (\textbf{name}, \textbf{year of entry}, \textbf{last three digits of ID}, \textbf{examination code}) correctly \textbf{\ul{BEFORE}} beginning the quiz. \end{enumerate} The significance of the second sentence of guideline (\ref{guideline:excel}) will become clear in subsection \ref{subsec:weaknesses}. Guideline (\ref{guideline:before}) was the most important one to be stressed in class; the explicit statement of the same guideline on the quiz sheet (and later on the examination sheet; see step (\ref{step:parameters}) of section \ref{sec:spreadsheet} and Figure \ref{fig:Excel5}) served as a final reminder. An instruction on how submissions should be made was also included in the guideline sheet, in addition to an advice to save the quiz file periodically to avoid risks caused by sudden power outages, etc. Tables containing students' examination codes were given out separately. Students experience essentially no significant issues in completing and submitting the quiz as instructed. However, they have varying levels of fluency in using Excel. Some reported to the quiz invigilator ---the second author of this paper--- of seeing that, on their computers, some cells on the quiz paper contained \#s instead of comprehensible contents. Excel proficients knew that adjusting the magnification level solves this issue. From the examiners' side, we interestingly found out that approximately a third of students taking part in the quiz submitted their work in an unprotected condition. Since the quiz took place in Google Classroom, we believed that these students opened and completed the quiz using Google Sheets rather than Excel (the consequences being described in subsection \ref{subsec:weaknesses}). To reduce the probability of students doing this later in the examination, the examination sheet were distributed not by attaching it on Google Classroom but by providing an external link to which the sheet was uploaded, hoping that students clicking the link were automatically downloading the file to be opened with Excel installed on their computers. We found this to be an effective solution; in the examination there were no students submitting their work in an unprotected condition. A guideline sheet for the examination ---very similar to that for the quiz--- was also given out before the examination day. \section{Strengths and weaknesses}\label{sec:strengthsandweaknesses} In this final section, we discuss some strengths and weaknesses of our examination format. \subsection{Strengths} The main strength of this examination format certainly lies in the \begin{enumerate} \item[(1)] possibility of assigning to each student a different type of each examination question, making collaboration difficult and plagiarism impossible. \end{enumerate} In our actual examination, however, not every question had this possibility (e.g., questions containing only one parameter; see section \ref{sec:questions}), and for every question having the possibility, we did not go to the trouble of absolutely ensuring that each of our 81 students was assigned a different type, since our parameters ---especially examination codes--- were randomised. See Figure \ref{fig:parametertable} for a table detailing, for each question, the parameters on which it depends, the number of available types it has, and the number of students answering it correctly. \begin{figure}[h!] \centering \scalebox{0.825}{\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}\hline \multirow{2}{*}{Question} & \multicolumn{10}{c|}{Parameters} & Number of & Number of & Number of students\\\cline{2-11} & $\alpha_1$ & $\alpha_2$ & $\alpha_3$ & $\alpha_4$ & $\beta_1$ & $\beta_2$ & $\beta_3$ & $\gamma_1$ & $\gamma_2$ & $\gamma_3$ & parameters & available types & answering correctly\\\hhline{|=|=|=|=|=|=|=|=|=|=|=|=|=|=|} 1 & & & \checkmark & & & & & & & \checkmark & 2 & 18 & 65\\\hline 2 & & & & & & \checkmark & & \checkmark & & & 2 & 81 & 72\\\hline 3 & & & & & & & & & & \checkmark & 1 & 9 & 65\\\hline 4 & & & & & & & & \checkmark & & \checkmark & 2 & 81 & 62\\\hline 5 & & & & & & & & & \checkmark & \checkmark & 2 & 81 & 34\\\hline 6 & & & & & & \checkmark & & \checkmark & & \checkmark & 3 & 729 & 63\\\hline 7 & \checkmark & & & & & & & & \checkmark & \checkmark & 3 & 81 & 52\\\hline 8 & \checkmark & & & & & & & \checkmark & \checkmark & & 3 & 81 & 64\\\hline 9 & & & \checkmark & & & \checkmark & & \checkmark & & & 3 & 162 & 55\\\hline 10 & & & & \checkmark & \checkmark & & & & \checkmark & & 3 & 72 & 64\\\hline 11 & & & & & & & & \checkmark & \checkmark & & 2 & 81 & 62\\\hline 12 & & & & & & & & & \checkmark & & 1 & 9 & 73\\\hline 13 & & & & & & \checkmark & & \checkmark & & & 2 & 81 & 65\\\hline 14 & & & & & & & & \checkmark & & \checkmark & 2 & 81 & 79\\\hline 15 & & & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & 8 & 1049760 & 75\\\hline 16 & & & & & & \checkmark & & & \checkmark & & 2 & 81 & 53\\\hline 17 & & & & & & \checkmark & & & \checkmark & & 2 & 81 & 61\\\hline 18 & & & & & \checkmark & & & & \checkmark & & 2 & 18 & 68\\\hline 19 & & & \checkmark & & & \checkmark & \checkmark & \checkmark & & & 4 & 1620 & 73\\\hline 20 & & & & & & & & \checkmark & \checkmark & & 2 & 81 & 52\\\hline \end{tabular}} \caption{The parameters contained in, the number of available types of, and the number of students correctly answering each question.} \label{fig:parametertable} \end{figure} Plots of the number of correct answers, versus the number of parameters and versus the natural logarithm of the number of available question types, are displayed in Figure \ref{fig:plots}. Each plot suggests that no correlation exists between the variables in the respective axes. Therefore, the rare and randomly-occurring opportunities of collaboration due to a small number of questions having only a few types, as discussed in section \ref{sec:questions}, were not exploited by students. We believe that this is because these opportunities were not visible enough; the opposite could have happened if, e.g., each of our 20 questions were made to depend only on one parameter. \begin{figure}[h!] \centering \begin{tikzpicture} \begin{axis}[ xmin=-0.5, xmax=8.5, ymin=-5, ymax=85, xtick={0,2,4,6,8}, ytick={0,20,40,60,80}, samples=100, xlabel={\scriptsize number of parameters}, ylabel={\scriptsize number of students answering correctly}, width=6.875cm, height=6.875cm, ylabel near ticks ] \addplot[color=red,only marks,mark=x,thick] plot coordinates {(2,65) (2,72) (1,65) (2,62) (2,34) (3,63) (3,52) (3,64) (3,55) (3,64) (2,62) (1,73) (2,65) (2,79) (8,75) (2,53) (2,61) (2,68) (4,73) (2,52)}; \end{axis} \end{tikzpicture}\qquad \begin{tikzpicture} \begin{axis}[ xmin=-0.8529, xmax=14.5, ymin=-5, ymax=85, xtick={0,3,6,9,12}, ytick={0,20,40,60,80}, samples=100, xlabel={\scriptsize natural logarithm of number of types}, ylabel={\scriptsize number of students answering correctly}, width=6.875cm, height=6.875cm, ylabel near ticks ] \addplot[color=red,only marks,mark=x,thick] plot coordinates {(2.89,65) (4.39,72) (2.20,65) (4.39,62) (4.39,34) (6.59,63) (4.39,52) (4.39,64) (5.09,55) (4.28,64) (4.39,62) (2.20,73) (4.39,65) (4.39,79) (13.86,75) (4.39,53) (4.39,61) (2.89,68) (7.39,73) (4.39,52)}; \end{axis} \end{tikzpicture} \caption{Plots of ordered pairs, each of which representing a question: its second component is the number of students answering it correctly, and its first component is the number of parameters it contains (left panel) and the natural logarithm of the number of available types it has (right panel).} \label{fig:plots} \end{figure} Furthermore, our examination format is beneficial to examiners due to its \begin{enumerate} \item[(2)] reduced marking effort, \end{enumerate} and to students due to its \begin{enumerate} \item[(3)] easy submission process. \end{enumerate} In each of our three previous examinations, the students' submission process consists of five major steps: scanning or photographing their handwritten answers, converting the resulting images into PDF files, merging these into a single PDF file, renaming this file as pre-instructed, and uploading this file on the designated submission site. With our new examination format, the first three steps are not necessary. Finally, our examination format is also \begin{itemize} \item[(4)] paperless. \end{itemize} \subsection{Weaknesses}\label{subsec:weaknesses} As already apparent from previous sections, this examination format demands \begin{enumerate} \item[(1)] a thorough and potentially time-consuming preparation. \end{enumerate} In addition, \begin{enumerate} \item[(2)] the integer-answer, numerically-randomised format of its questions favours computational questions, and enables students to use computer algebra systems to complete the examination. \end{enumerate} Indeed, such a format is suboptimal for examining students' conceptual accuracy, let alone proof-writing proficiency (cf.\ \cite{BraswellKupin,Wolf}). (Nevertheless, some methods have been developed for online-assessing the latter \cite{BickertonSangwin}.) While it might be easy to incorporate to our format ---if at all desired--- multiple-choice questions (each of whose answers being the letter representing the student's choice, similarly randomised and marked), this is not the case for essay questions, for which we have not found an equally-efficient marking mechanism. On the practical side, \begin{enumerate} \item[(3)] not all students have Microsoft Excel on their computers, \end{enumerate} especially those whose computers run non-Microsoft operating systems. If they are only a minority, they could be instructed to inform the examiners several days before the examination. For each of them, the examiners could provide an adapted examination sheet; this is in the form of the PDF conversion of the original examination sheet in which the heading form has been filled out by the examiners with the respective student's data to generate the questions' numerical details accordingly. They are then instructed to submit their answers in the form of another PDF file. As a consequence, however, some extra effort is needed to mark their answers. Another practical weakness of this format is that \begin{enumerate} \item[(4)] Excel's sheet-protection and cell-locking mechanism in a spreadsheet do not function if the spreadsheet is opened without using Excel, e.g., using Google Sheets. \end{enumerate} Thus, any student who opens the examination sheet using Google Sheets is able to see all the randomisation formulae, and to edit any cell. This clarifies the significance of the second sentence of guideline (\ref{guideline:excel}) in section \ref{sec:guidelines}. However, students editing a question (e.g., to make the numerical details exactly the same as those received by a classmate, with whom they can then collaborate) are merely straying themselves, since during the marking we will nonetheless use the answer key to the original question. To conclude, it will be useful if one could develop a software which facilitates and optimises the implementation of the examination mechanism described in this paper. With such a software, it is hoped that the examination sheet could be produced in a format which can be opened and worked on by all students without the need to have a particular software on their computers, and that there is no way for them to see and tamper with the randomisation mechanism.
\section{Introduction}\label{sec:intro} The class of BCK-algebras was introduced in 1966 by Imai and Is\'{e}ki \cite{II66} as the algebraic semantics for a non-classical logic having only implication. While this class of algebras is not a variety (\cite{wronski83}), many subclasses are; for example, the subclass of commutative BCK-algebras forms a variety. As with any algebra of logic, the ideal theory plays an important role in their study. For a commutative BCK-algebra $\mb{A}$, it is known that $\con(\mb{A})\cong\id(\mb{A})$ (\cite{yutani77}), where $\id(\mb{A})$ is the lattice of ideals. It is also known that $\id(\mb{A})$ is a distributive lattice for any BCK-algebra $\mb{A}$ (\cite{palasinski81(2)}). In \cite{evans20(2)}, the author proved that the following five types of distributive lattice occurs as the ideal lattice of a commutative BCK-algebra: \begin{enumerate} \item any finite chain, \item any countably infinite chain isomorphic to $\bb{Z}_{\leq 0}\cup\{-\infty\}$, \item any finite subdirectly irreducible distributive p-algebra, \item any finite Boolean algebra, \item any distributive lattice $\mb{D}$ such that $\text{MI}(\mb{D})\cong T^\partial$, as posets, for some finite rooted tree $T$, where $T^\partial$ is the order dual of $T$. \end{enumerate} Additionally, any finite product of lattices where each factor lies in one of the above classes is the ideal lattice of a commutative BCK-algebra. For example, every divisor lattice is the ideal lattice of a commutative BCK-algebra, since it is a finite product of finite chains. We note also that Romanowski and Traczyk showed in \cite{rt80} that $\con(\mb{A})\cong\id(\mb{A})$ is Boolean for any finite cBCK-algebra $\mb{A}$. The purpose of this paper is to extend these results. The organization is as follows: in the next section we give the necessary background, recalling the definition of commutative BCK-algebras and their ideals. In section three we define an algebra denoted $\mc{FS}$, characterize its ideals and prime ideals, and prove the main theorem of the paper. In section four we recall the definition of the spectrum of a commutative BCK-algebra, and prove that any discrete topological space is the spectrum of a commutative BCK-algebra as a corollary of the main theorem. \section{Preliminaries} \begin{definition} A \textit{commutative BCK-algebra} (or \textit{cBCK-algebra}) is an algebra $\mb{A}=\langle A; \boldsymbol{\cdot}, 0\rangle$ of type $(2,0)$ such that \begin{enumerate} \item[]\hspace{-1cm} (BCK1)\; $(x\boldsymbol{\cdot} y)\boldsymbol{\cdot} z = (x\boldsymbol{\cdot} z)\boldsymbol{\cdot} y$ \item[]\hspace{-1cm} (BCK2)\; $x\boldsymbol{\cdot}(x\boldsymbol{\cdot} y)=y\boldsymbol{\cdot}(y\boldsymbol{\cdot} x)$ \item[]\hspace{-1cm} (BCK3)\; $x\boldsymbol{\cdot} x=0$ \item[]\hspace{-1cm} (BCK4)\; $x\boldsymbol{\cdot} 0=x$ \end{enumerate} for all $x,y,z\in A$. \end{definition} On any cBCK-algebra $\mb{A}$ we define a partial order by: $x\leq y$ if and only if $x\boldsymbol{\cdot} y=0$, and it can be shown that $0\boldsymbol{\cdot} x=0$ for all $x\in A$; so 0 is the smallest element of $\mb{A}$ with respect to $\leq$. The term operation $x\wedge y:=y\boldsymbol{\cdot}(y\boldsymbol{\cdot} x)$ is the greatest lower bound of $x$ and $y$, and $\mb{A}$ is a semilattice with respect to $\wedge$. Note that the identity (BCK2) tells us $x\wedge y=y\wedge x$. We also have $x\boldsymbol{\cdot} y\leq x$ with equality if and only if $x\wedge y=0$. For proofs of these, as well as other elementary properties of cBCK-algebras, we point the reader to Is\'{e}ki and Tanaka's introductory papers \cite{it78} and \cite{it76}, Tana\-ka's paper \cite{tanaka75}, Romanowska and Traczyk's paper \cite{rt80}, Traczyk's paper \cite{traczyk79}, Yutani's paper \cite{yutani77}, and the text \cite{mj94} by Meng and Jun. \begin{definition} An \textit{ideal} of a BCK-algebra $\mb{A}$ is a subset $I\subseteq A$ such that \begin{enumerate} \item $0\in I$ \item $x\boldsymbol{\cdot} y\in I$ and $y\in I$ implies $x\in I$. \end{enumerate} \end{definition} We denote the lattice of ideals of $\mb{A}$ by $\id(\mb{A})$, and point out that $\id(\mb{A})\cong \con(\mb{A})$, see \cite{AT77} or \cite{yutani77}. Of course $\{0\}$ and $\mb{A}$ are always ideals of $\mb{A}$, and if these are the only ideals we say $\mb{A}$ is \textit{simple}. For $n\in\bb{N}_0$, define the notation $x\boldsymbol{\cdot} y^n$ recurvisely as \begin{align*} x\boldsymbol{\cdot} y^0&=x\\ x\boldsymbol{\cdot} y^n&=(x\boldsymbol{\cdot} y^{n-1})\boldsymbol{\cdot} y\,, \end{align*} and note that this gives a decreasing sequence \[x\boldsymbol{\cdot} y^0\geq x\boldsymbol{\cdot} y^1\geq x\boldsymbol{\cdot} y^2\geq \cdots \geq x\boldsymbol{\cdot} y^n\geq\cdots\,.\] If the underlying poset of a cBCK-algebra is totally ordered, we will call it a \textit{cBCK-chain}. A cBCK-chain $\mb{A}$ is simple if and only if, for any $x,y\in\mb{A}$ with $y\neq 0$, there exists $n\in\bb{N}$ such that $x\boldsymbol{\cdot} y^n=0$ (see \cite{rt82} or \cite{evans20(2)}). For example, the non-negative reals $\bb{R}^+$ become a simple cBCK-chain under the operation $x\boldsymbol{\cdot} y=\max\{x-y, 0\}$. More generally, the positive cone of any Archimedean group can be viewed as a cBCK-algebra, and with this structure it is a simple cBCK-chain. For examples of non-simple cBCK-chains, see Examples 3.13 and 3.14 of \cite{evans20(2)}. For $S\subseteq A$, the smallest ideal of $\mb{A}$ containing $S$ is the \textit{ideal generated by $S$}, which we denote by $(S]$. If $S=\{a\}$, we will write $(a]$ rather than $(\{a\}]$. In \cite{it76}, Is\'{e}ki and Tanaka showed that $x\in(S]$ if and only if there exist $s_1, \ldots, s_n\in S$ such that \begin{equation*}\label{ideal} \bigl(\cdots\bigl((x\boldsymbol{\cdot} s_1)\boldsymbol{\cdot} s_2\bigr)\boldsymbol{\cdot} \cdots \boldsymbol{\cdot} s_{n-1}\bigr)\boldsymbol{\cdot} s_n=0\,.\tag{$\ast$} \end{equation*} One can show $I\vee J=(I\cup J]$ for $I, J\in \id(\mb{A})$. \begin{definition} Let $P$ be an ideal of $\mb{A}$. \begin{enumerate} \item We say $P$ is \textit{meet-prime} if $I\cap J\subseteq P$ implies $I\subseteq P$ or $J\subseteq P$ for all $I,J\in\id(\mb{A})$. \item We say $P$ is \textit{meet-irreducible} if $I\cap J=P$ implies $I= P$ or $J= P$ for all $I,J\in\id(\mb{A})$. \item We say $P$ is \textit{prime} if $x\wedge y\in P$ implies $x\in P$ or $y\in P$. \end{enumerate} \end{definition} Pa\l asinski showed in \cite{palasinski81(2)} that $\id(\mb{A})$ is a distributive lattice for any BCK-algebra $\mb{A}$, so definitions (1) and (2) above always coincide in $\id(\mb{A})$. But when $\mb{A}$ is commutative, all three definitions are equivalent; see \cite{palasinski81}. Let $\mrm{X}(\mb{A})$ denote the set of prime ideals of $\mb{A}$. \section{The algebra $\mc{FS}$} Let $X$ be any set and $\mb{T}$ a simple cBCK-chain. Put $\mc{F}(X, \mb{T})=\{f\colon X\to \mb{T}\}$, the set of all functions from $X$ to $\mb{T}$. When $X$ and $\mb{T}$ are understood, we will write $\mc{F}$ instead of $\mc{F}(X,\mb{T})$. The set $\mc{F}$ becomes a cBCK-algebra with pointwise operation $(f\boldsymbol{\cdot} g)(x)=f(x)\boldsymbol{\cdot}_\mb{T} g(x)$, where the zero element is the zero function $\mb{0}$. A partial proof is given in the author's PhD thesis \cite{evans20}, though it omits some of the more tedious details. This algebra is a generalization of Example 1 from \cite{it78}. We will use $\leq$ to denote the order on both $\mc{F}$ and $\mb{T}$, and it will always be clear from context. For $f\in\mc{F}$, define the \textit{support} of $f$ to be \[\supp(f)=\{\, x\in X\,\mid\, f(x)\neq 0\}=\{\, x\in X\,\mid\, f(x)> 0\}\,.\] We say that $f$ has \textit{finite support} if the support of $f$ is a finite set. Let $\mc{FS}(X,\mb{T})$ be the set of functions $f\colon X\to \mb{T}$ with finite support; when $X$ and $\mb{T}$ are understood we will write $\mc{FS}$. \begin{lemma} $\mc{FS}$ is a cBCK-subalgebra of $\mc{F}$. \end{lemma} \begin{proof} Take $f,g\in\mc{FS}$. We claim that $\supp(f\boldsymbol{\cdot} g)\subseteq\supp(f)$, from which the claim then follows. Take $x\in \supp(f\boldsymbol{\cdot} g)$. Then $(f\boldsymbol{\cdot} g)(x)=f(x)\boldsymbol{\cdot}_\mb{T} g(x)> 0$. But we know $f(x)\geq f(x)\boldsymbol{\cdot}_\mb{T} g(x)> 0$, and so $x\in\supp(f)$. Hence $\supp(f\boldsymbol{\cdot} g)\subseteq \supp(f)$. \end{proof} Consider the relation $R\subseteq \mc{FS}\times X$ defined by \[R=\{\, (f,x)\in \mc{FS}\times X\,\mid\, f(x) = 0\,\}\,.\] This relation induces a Galois connection: \begin{itemize}\itemsep=2ex \item for $\mc{G}\subseteq \mc{FS}$, put $P(\mc{G})=\{\, x\in X\,\mid\, g(x)=0 \text{ for all $g\in \mc{G}$}\,\}$ \item for $S\subseteq X$, put $V(S)=\{\, f\in\mc{F}\,\mid\, f(s)=0\text{ for all $s\in S$}\,\}\,.$ \end{itemize} For a singleton $\{x\}\subseteq X$, we will write $V(x)$ for $V(\{x\})$. We note this is an antitone Galois connection: if $S\subseteq T\subseteq X$, then certainly $V(T)\subseteq V(S)$ since any function vanishing on $T$ must also vanish on $S$. Similarly, $P(-)$ is order-reversing as well. Recall that a cBCK-chain $\mb{A}$ is simple if and only if, for every pair $x,y\in\mb{A}$ with $y\neq 0$, there exists $n\in\bb{N}$ such that $x\boldsymbol{\cdot} y^n=0$. \begin{theorem}\label{ideals of FS} A subset $I\subseteq \mc{FS}$ is an ideal if and only if $I=VP(I)$. In particular, every ideal of $\mc{FS}$ has the form $V(S)$ for some $S\subseteq X$. \end{theorem} \begin{proof} First we show that $V(S)$ is an ideal for any $S\subseteq X$. That $\mb{0}\in V(S)$ is clear. Suppose $f\boldsymbol{\cdot} g\in V(S)$ and $g\in V(S)$. If we had $f(s)> 0$ for some $s\in S$, then $(f\boldsymbol{\cdot} g)(s)> 0$ since $g(s)=0$, but this contradicts the fact that $f\boldsymbol{\cdot} g\in V(S)$. So we must have $f(s)=0$ for all $s\in S$, and thus $f\in V(S)$. Hence, $V(S)$ is an ideal of $\mc{FS}$. Thus, if $I=VP(I)$, we see that $I$ is an ideal. On the other hand, suppose $I$ is an ideal of $\mc{FS}$. Since $V(-)$ and $P(-)$ are a Galois connection, we know $I\subseteq VP(I)$. For the other inclusion, take $f\in VP(I)$ with $f\neq \mb{0}$. We know that $\supp(f)$ is finite, so enumerate the elements $\supp(f)=\{\,x_1, x_2,\ldots, x_k\,\}$. For each $x_i\in\supp(f)$, the fact that $f(x_i)\neq 0$ tells us $x_i\notin PVP(I)=P(I)$. Hence, for $i=1,\ldots, k,$ there is an element $g_i\in I$ such that $g_i(x_i)\neq 0$. We claim that \[\bigl(\cdots \bigl((f\boldsymbol{\cdot} g_1^{n_1})\boldsymbol{\cdot} g_2^{n_2}\bigr)\boldsymbol{\cdot} \cdots \boldsymbol{\cdot} g_{k-1}^{n_{k-1}}\bigr)\boldsymbol{\cdot} g_k^{n_k}=\mb{0}\] for suitable $n_1, n_2, \ldots, n_k\in\bb{N}$. Since $\mb{T}$ is a simple cBCK-chain, for each $i$ there is $n_i\in\bb{N}$ such that \[(f\boldsymbol{\cdot} g_i^{n_i})(x_i)=f(x_i)\boldsymbol{\cdot}_\mb{T} \bigl(g_i(x_i)\bigr)^{n_i}=0\,.\] Now, it may the case that $g_i(x_j)\neq 0$ for $i\neq j$, but \[(f\boldsymbol{\cdot} g_i^{n_i})(x_j)\leq f(x_j)\,,\] and hence \[\bigl((f\boldsymbol{\cdot} g_i^{n_i})\boldsymbol{\cdot} g_j^{n_j}\bigr)(x_j)\leq (f\boldsymbol{\cdot} g_j^{n_j})(x_j)=0\,.\] We note also that by (BCK1), the order in which the $g_i$'s are applied does not matter. Finally, for any $z\in X\setminus \supp(f)$ we have $(f\boldsymbol{\cdot} h)(z)=0$ for any $h\in\mc{FS}$, so the function $\bigl(\cdots \bigl((f\boldsymbol{\cdot} g_1^{n_1})\boldsymbol{\cdot} g_2^{n_2}\bigr)\boldsymbol{\cdot} \cdots \boldsymbol{\cdot} g_{k-1}^{n_{k-1}}\bigr)\boldsymbol{\cdot} g_k^{n_k}$ vanishes on $X\setminus\supp(f)$. Taking all these observations together, we have \[\bigl(\cdots \bigl((f\boldsymbol{\cdot} g_1^{n_1})\boldsymbol{\cdot} g_2^{n_2}\bigr)\boldsymbol{\cdot} \cdots \boldsymbol{\cdot} g_{k-1}^{n_{k-1}}\bigr)\boldsymbol{\cdot} g_k^{n_k}=\mb{0}\in I\,.\] Since each $g_i\in I$, repeatedly apply the ideal property to see $f\in I$. Thus, $VP(I)\subseteq I$ and we have $I=VP(I)$ as claimed. \end{proof} Before the next result, we note briefly that \[(f\wedge g)(x)=f(x)\wedge_\mb{T} g(x)\,.\] To see this, take $f,g\in\mc{F}$ and $x\in X$. Without loss of generality, we may assume $f(x)\leq g(x)$. This implies that $(f\boldsymbol{\cdot} g)(x)=0$ and $f(x)\wedge_\mb{T} g(x)=f(x)$. Then \begin{align*} (f\wedge g)(x) = \bigl(f\boldsymbol{\cdot} (f\boldsymbol{\cdot} g)\bigr)(x)&=f(x)\boldsymbol{\cdot}_\mb{T} (f\boldsymbol{\cdot} g)(x)\\ &=f(x)\boldsymbol{\cdot}_\mb{T} 0\\ &=f(x)\\ &=f(x)\wedge_\mb{T} g(x)\,. \end{align*} \begin{proposition}\label{V(x) is prime} An ideal $J$ of $\mc{FS}$ is prime if and only if $J=V(x)$ for some $x\in X$. \end{proposition} \begin{proof} We first show any ideal of the form $V(x)$ is prime. Suppose $f\wedge g\in V(x)$. Then $(f\wedge g)(x)=f(x)\wedge_\mb{T} g(x) = 0$, which implies either $f(x)=0$ or $g(x)=0$ since $\mb{T}$ is totally ordered. Thus, either $f\in V(x)$ or $g\in V(x)$, and we see $V(x)$ is a prime ideal. Conversely, suppose $J$ is a prime ideal. Since $J$ is an ideal, we know from Theorem \ref{ideals of FS} that $J=V(S)$ for some subset $S\subseteq X$. If $S=\emptyset$ -- that is, $|S|=0$ -- then $V(S)=\mc{FS}$, a contradiction since prime ideals are proper. If $|S|\geq 2$, take $x,y\in S$ with $x\neq y$. Let $f,g\in\mc{FS}$ such that $f(x)\neq 0$ but $f(s)=0$ for all $s\in S\setminus \{x\}$, while $g(y)\neq 0$ but $g(s)=0$ for all $s\in S\setminus \{y\}$. Then $(f\wedge g)(s)=0$ for all $s\in S$, so $f\wedge g\in V(S)$. Yet $f,g\notin V(S)$, and $J=V(S)$ is not prime. Hence, we must have $|S|=1$, meaning $J$ is of the form $V(x)$ for some $x\in X$. \end{proof} \begin{lemma}\label{V is bijective} The map $V\colon \mc{P}(X)\to\id(\mc{FS})$ is bijective, where $\mc{P}(X)$ is the powerset of $X$. \end{lemma} \begin{proof} The map $V$ is surjective by Theorem \ref{ideals of FS}. To see $V$ is injective, let $Y,Z\subseteq X$ with $Y\neq Z$. Without loss of generality, there is some $y\in Y\setminus Z$. Pick some non-zero $t\in\mb{T}$, and define $f\colon X\to\mb{T}$ by $f(x)=0$ for all $x\in X\setminus\{y\}$ and $f(y)=t$. Then certainly $f\in V(Z)$ but $f\notin V(Y)$, and hence $V(Y)\neq V(Z)$. \end{proof} \begin{lemma}\label{properties of V} Let $Y,Z\subseteq X$. Then \begin{align*} V(Y)\cap V(Z)&=V(Y\cup Z) \text{ and }\\ V(Y)\vee V(Z)&=V(Y\cap Z)\,. \end{align*} \end{lemma} \begin{proof} We begin with the first equality. Since $Y,Z\subseteq Y\cup Z$ we have $V(Y\cup Z)\subseteq V(Y), V(Z)$ since $V$ is order-reversing, and hence $V(Y\cup Z)\subseteq V(Y)\cap V(Z)$. For the other inclusion, simply note that any function vanishing on both $Y$ and $Z$ necessarily vanishes on $Y\cup Z$. For the second equality, begin by noting that $Y\cap Z\subseteq Y,Z$, and so $V(Y), V(Z)\subseteq V(Y\cap Z)$. This implies $V(Y)\vee V(Z)\subseteq V(Y\cap Z)$. For the opposite inclusion, take $f\in V(Y\cap Z)$ and let $\supp(f)=\{\, x_1, x_2, \ldots, x_k\,\}\subseteq Y^c\cup Z^c$. Pick a non-zero element $t\in \mb{T}$, and for $i=1,\ldots, k$ define $g_i\colon X\to \mb{T}$ by \[g_i(x)\begin{cases}t &\text{ if $x=x_i$}\\mb{0}&\text{ otherwise}\end{cases}\,.\] If $x_i\in Y^c$ then $g_i\in V(Y)$, and if $x_i\in Z^c$ then $g_i\in V(Z)$. So $\{g_1, g_2, \ldots, g_k\}\subseteq V(Y)\cup V(Z)$. If we now mimic the steps taken in Theorem \ref{ideals of FS}, we have $\bigl(\cdots \bigl((f\boldsymbol{\cdot} g_1^{n_1})\boldsymbol{\cdot} g_2^{n_2}\bigr)\boldsymbol{\cdot} \cdots \boldsymbol{\cdot} g_{k-1}^{n_{k-1}}\bigr)\boldsymbol{\cdot} g_k^{n_k}=\mb{0}$. Since each $g_i\in V(Y)\cup V(Z)$ we have $f\in \bigl(V(Y)\cup V(Z)\bigr]=V(Y)\vee V(Z)$ by \eqref{ideal}. Thus, $V(Y\cap Z)\subseteq V(Y)\vee V(Z)$ and the equality follows. \end{proof} \begin{theorem}\label{Id(FS) is Boolean} The ideal lattice $\id(\mc{FS})$ is a Boolean algebra. In particular, $\id(\mc{FS})\cong \mc{P}(X)$. \end{theorem} \begin{proof} We know $\id(\mc{FS})$ is a bounded distributive lattice, so all that remains is to show we have complements in $\id(\mc{FS})$. Given an ideal $I=V(S)$, its complement in $\id(\mc{FS})$ is the obvious natural candidate $V(S^c)$, which follows from Lemma \ref{properties of V}: \begin{align*} V(S)\cap V(S^c)&=V(S\cup S^c)=V(X)=\{\mb{0}\}\\ V(S)\vee V(S^c)&=V(S\cap S^c)=V(\emptyset)=\mc{FS}\,. \end{align*} So $\id(\mc{FS})$ is a Boolean algebra. We saw in Lemma \ref{V is bijective} that $V\colon \mc{P}(X)\to\id(\mc{FS})$ is bijective, and the preceding paragraph shows that $V$ sends complements in $\mc{P}(X)$ to complements in $\id(\mc{FS})$. Lemma \ref{properties of V} shows that $V$ sends meets to joins and vice versa. So $V$ is an Boolean anti-isomorphism, but Boolean algebras are self-dual. The claim follows. \end{proof} \begin{theorem}\label{CABA} Every complete atomic Boolean algebra is the congruence lattice of a cBCK-algebra. \end{theorem} \begin{proof} If $\bb{B}$ is a complete atomic Boolean algebra, then $\bb{B}\cong\mc{P}(X)$ for some set $X$. But then \[\bb{B}\cong\mc{P}(X)\cong \id\bigl(\mc{FS}(X,\bb{R}^+)\bigr)\cong \con\bigl(\mc{FS}(X,\bb{R}^+)\bigr)\,.\] \end{proof} Using this we can now show that any discrete topological space is the prime spectrum of a cBCK-algebra. We remind the reader of some definitions. \section{Discrete spectra} Let $\mb{A}$ be a cBCK-algebra. For $S\subseteq\mb{A}$, define \[\sigma(S)=\{P\in\mrm{X}(\mb{A})\mid S\not\subseteq P\}\,.\] The collection $\mc{T}(\mb{A})=\{\sigma(I)\mid I\in\id(\mb{A})\}$ is a topology on $\mrm{X}(\mb{A})$. There are several proofs of this in the literature, but we point the reader to the paper \cite{ADT93}, in which it is also shown that $\mc{T}(\mb{A})\cong \id(\mb{A})$ as lattices. \begin{definition} The space $\bigl(\mrm{X}(\mb{A})\,,\, \mc{T}(\mb{A})\bigr)$ is the \textit{(prime) spectrum} of $\mb{A}$.\end{definition} Given a topological space $Y$, let $\mc{T}_Y$ denote the lattice of open subsets. We say $Y$ is a \textit{spectral space} if it is homeomorphic to the prime spectrum of a commutative ring. In his paper \cite{hochster69}, Hochster proved that a space $Y$ is a spectral space if and only if $Y$ is compact, $T_0$, sober, and the compact open subsets form a basis that is a sublattice of $\mc{T}_Y$. A \textit{generalized spectral space} is a space satisfying the latter three of these conditions. Thus, a generalized spectral space which is compact is simply a spectral space. Meng and Jun proved in \cite{MJ98} that the spectrum of a bounded cBCK-algebra is a spectral space. The present author showed in \cite{evans20(2)} that the spectrum of any cBCK-algebra is a locally compact generalized spectral space, with compactness if and only if the algebra is finitely generated as an ideal. In general, given a generalized spectral space $Y$, it is difficult to say whether or not that space is the spectrum of a cBCK-algebra. But it is known that $Y\simeq \mrm{X}(\mb{A})$ for some cBCK-algebra $\mb{A}$ if and only if there is a lattice isomorphism $\mc{T}_Y \cong\id(\mb{A})$; see \cite{evans20(2)} for a proof. \begin{corollary} Let $Y$ be a discrete topological space. Then $Y$ is the spectrum of a cBCK-algebra. \end{corollary} \begin{proof} Since $Y$ is a discrete space, the lattice of open subsets is $\mc{P}(Y)$, and so by Theorem \ref{CABA} we have $\mc{T}_Y\cong \mc{P}(Y)\cong \id\bigl(\mc{FS}(Y,\bb{R}^+)\bigr)$. \end{proof}
\section{Introduction} The hybrid atom-optomechanics system has been exploited due to its rich physics that allows for many opportunities, from theoretical proposals to experimental implementations. Frequent configuration of the system consists of a mechanical membrane (oscillator) and a Bose-Einstein condensate (BEC) that are mutually coupled to cavity field modes~\cite{Jockel2015,Mann20182,Brennecke_2008,Pirkkalainen_2015}. Applications resulting from this system have been valuable. For example, the mechanical oscillator can be cooled down by enhancing the effective coupling strength between the membrane and the atom~\cite{Vogell_2015,Mann20182,Jockel2015,Bariani2014,Vogell2013,Vochezer2018}. At the same time, the BECs can have a nonequilibrium phase transition from the normal phase to the self-organized super-radiant phase~\cite{Mann2018,Bakhtiari2015,Xu_2019,Klinder2015,Gao2019} due to the $Z_2$ symmetry breaking~\cite{Cheng_2021}. The system is also applicable for metrology~\cite{Lau_2019,Cronin2009,Aspelmeyer2014} and quantum simulations~\cite{Bloch_2012,Manukhova_2020}. Last but not least, it provides a new platform to create new states of many-body physics, such as the spontaneous crystallization of atoms and light into a structure that features phonon-like excitations and bears similarities to a supersolid~\cite{Ostermann2016,Schuster2021,Baio2021,Mivehvar2018,Nagy2008}. This motivates the further study of this system to potentially realize marvelous dynamical phases such as time crystal and chaos. The time crystal phase breaks the time-translation symmetry~\cite{Timec1,Timec2}, which is beyond the strict thermal equilibrium~\cite{Else2016,Bruno2013,Bruno20132,Watanabe2015}. Indeed, while quantum time crystals were originally defined as systems whose lowest energy state undergoes periodic motion~\cite{Wilczek2012}, the definition has been extended to include nonlinear driven-dissipative systems~\cite{Colas2016,Nalitov2019}. Time crystals have been observed in many nonequilibrium experiments such as driven disordered dipolar spin impurities in diamond~\cite{Choi_2017}, the interacting spin chain of trapped atomic ions~\cite{Zhang_2017}, quantum computing processor~\cite{mi2021observation}, etc. On the other hand, the chaos phase represents unpredictable results after a long evolution time, which are sensitive to initial states~\cite{Eckmann1985}. In this case, chaotic attractors may arise, leading to orbits that converge to the corresponding chaotic region in the phase-space diagram~\cite{Lorenz_1963,Strelioff2006}. For optomechanical system, chaotic dynamics appears in the bad-cavity limit and is described by the semiclassical equations of motion~\cite{Bakemeier2015,Yang_2019,Montoya_2019}. The hybrid atom-optomechanics system can be conditioned such that it satisfies the requirements for both time crystal and chaotic phases, which urges for a proposal for their realization. Experimental implementations have been reported for the atom-optomechanics system with $^{87}$Rb atoms and Si$_3$N$_4$ or SiN membrane~\cite{Camerer2011,Jockel2015}, where the position of the membrane displaces the lattice potential for the atoms~\cite{Bloch_2005,Hammerer2010,Christoph2018,Bennett2014}. Meanwhile, the center-of-mass motion of the atoms will experience a restoring optical dipole force due to the absorption and stimulated emission~\cite{Camerer2011,Mann2018,Bakhtiari2015,Asboth2008}. The optical lattice for the atoms can be highly engineered with different potentials. The depth of the potential can be adjusted by the power of the laser, while the period can be tuned by changing the wavelength of the laser or the angle between two beams~\cite{Fallani_2005,Bloch_2012,Bloch_2005}. The effective coupling between the atoms and the membrane can be long distance interaction mediated by the laser field. The field interacts with the atoms via light-matter coupling, with an effective strength enhanced by the number of atoms ($\sim 10^{10}$)~\cite{Jockel2015,Vogell2013}. In this paper, we consider the atoms trapped in a double well-like potential created by two lasers, where the wavelength of one is half of the other. One of the lasers is filtered and enters a cavity where it couples to a membrane, which in turn affects its optical path. This way, the atoms will have both time-dependent and fixed potentials. In this configuration, relevant interactions include optomechanical coupling between the field and the membrane as well as light-matter coupling between the field and the atoms. The position and momentum of the atoms are treated classically, with their dynamical equations coupled to a quantum master equation characterizing the membrane, the cavity field, and the intrinsic degrees of freedom of the atoms (two-level systems). We show that by tuning the strength of the optomechanical and light-matter coupling, the system can be in regular, time crystal, or chaotic phases. We also computed experimentally familiar quantities such as the first and second-order correlation functions in different phases. \section{Model} Consider two-level atoms moving in an adjusted gauge field optical lattice, which is coupled to a membrane through the coherently driven cavity field as shown in Fig.~\ref{shiyi}. The cold atoms are trapped by two lasers with different wavelengths, giving two optical lattice potentials with different periods. The Hamiltonian ($\hbar=1$) describing the membrane, cavity field, and two-level atom, in a frame rotating with the driving frequency $\omega_l$ and with rotating-wave approximation, is written as \begin{eqnarray} H &=& \omega_m \hat b^{\dagger}\hat b-\Delta_c \hat a^\dagger \hat a - \Delta_a\hat \sigma^+ \hat \sigma^- +\eta(\hat a + \hat a^\dagger)\nonumber \\ &-&g_{mc}(\hat b^\dagger+\hat b)\hat a^{\dagger}\hat a + g_{ac}\sin(2x)(\hat a^\dagger \hat \sigma^- + \hat a\hat \sigma^+), \end{eqnarray} where $\omega_m$ is the frequency of the membrane, $\Delta_c = \omega_l - \omega_c$ and $\Delta_a=\omega_l - \omega_a$ are the detuning for the cavity and atom, respectively. $\omega_c$ denotes the cavity frequency, $\omega_a$ the atomic transition frequency and $\omega_l$ the frequency of the laser driving the cavity with strength $\eta$. The atom couples to the cavity (Jaynes-Cummings type) with strength $g_{ac}$, while the optomechanical coupling~\cite{Aspelmeyer2014} between the membrane and cavity is denoted by $g_{mc}$. The optical lattice has a mode function $\sin(2x)$, where $x$ is the atomic position, which is in units of the inverse cavity wave number. The annihilation operators for the cavity, atom, and membrane are denoted by $\hat a$, $\hat \sigma^-$, and $\hat b$, respectively. \begin{figure}[h!] \centering \includegraphics[width=0.5\textwidth]{shiyi.pdf}\\ \caption{The scheme of the hybrid atom-optomechanics system. The cold atoms are trapped by two lasers and only one of them is filtered to enter a cavity where it is coupled to a mechanical membrane.}\label{shiyi} \end{figure} \begin{figure*} \centering \includegraphics[width=0.85\textwidth]{OSC.pdf}\\ \caption{ The mean excitation of the membrane mode (first column), the cavity mode (second column) and the atom (third column). The parameters used are $\gamma_c/\gamma_a$=0.5, $\gamma_m/\gamma_a$=2, $\eta/\gamma_a$=5, $V_0/\gamma_a$=20, $V_1/\gamma_a$=40, $\omega_r/\gamma_a$=1, $\Delta_c/\gamma_a$=-1, and $\Delta_a/\gamma_a$=-2. Specific coupling parameters for different phases are given by (a1)-(a3): $g_{ac}/\gamma_a$=0.5, $g_{mc}/\gamma_a$=2; (b1)-(b3): $g_{ac}/\gamma_a$=2, $g_{mc}/\gamma_a$=2.5; and (c1)-(c3): $g_{ac}/\gamma_a$=2, $g_{mc}/\gamma_a$=2.}\label{osc} \end{figure*} The decays in the system are modelled by the Liouvillians and can be considered as Lindblad terms \begin{equation} \mathcal{L}_{\mu}[\rho,\hat O] = \gamma_{\mu}(2\hat O\rho \hat O^\dagger - \hat O^\dagger \hat O \rho - \rho \hat O^\dagger \hat O), \end{equation} where $\gamma_{\mu}$ is the dissipation rate of the membrane ($\mu=m$), cavity field ($c$), and two-level atom ($a$). Note that $\hat O$ denotes the corresponding annihilation operator of each system. As the initial state, we use uncorrelated states of the form $\rho=\rho_m\otimes\rho_c\otimes\rho_a$, where $\rho_m$, $\rho_c$, and $\rho_a$ represent the density matrix for the membrane, cavity field, and atom. The evolution follows the quantum master equation: \begin{equation}\label{EQ_QME} \dot \rho=-i[H,\rho]+\frac{1}{2}\left(\mathcal{L}_{m}[\rho,\hat b]+\mathcal{L}_{c}[\rho,\hat a]+\mathcal{L}_{a}[\rho,\hat \sigma^-]\right). \end{equation} In addition, we have classical differential equations of the atomic motion obtained from the Ehrenfest theorem: $\dot{x}={\partial \langle H\rangle}/{\partial p}$ and $\dot{p}=-{\partial \langle H\rangle}/{\partial x}$, where the observables $x$ and $p$ are treated simply as numbers in the classical regime. For this classical motion, the atom is situated in two potentials such that its Hamiltonian reads \begin{equation}\label{EQ_H_atom} H_a=\frac{p^2}{2m}+V_0\sin(x)^2+V_1 \sin(x), \end{equation} where $m$ is the mass of the atom, $V_0$ is the depth of the optical lattice, and $V_1 \sin(x)$ is the external periodic potential. We stress that only one of the potentials ($V_0$) ends up being coupled to the membrane. The equations of motion for the atom, taking into account the Hamiltonians $H$ and $H_a$, are written as \begin{eqnarray} \dot{x} &=& 2\omega_r p, \nonumber \\ \dot{p} &=& -4g_{ac}\cos(2x)~\Re\left\{\langle \hat a^\dagger \hat \sigma^-\rangle\right\} \nonumber \\ &&-\left[V_1 \cos(x)+V_0\sin(2x)\right], \end{eqnarray} where $\omega_r=1/(2m)$ is the recoil frequency. As initial conditions, we take $x(0)=-1$ and $p(0)=0$. We note that the quantum observable $\Re\left\{\langle \hat a^\dagger \hat \sigma^-\rangle\right\}$ updates the classical dynamics, while the latter affects the quantum dynamics via the change in the optical path, and hence, the mode function $\sin(2x)$. We show below with suitable parameters, that this quantum-classical coupled dynamics can produce regular, time crystal, and chaotic phases. See also the Appendix for calculations of the dynamics using the quantum trajectory method. \section{Different dynamical behaviors} The hybrid system has quantum and classical parts that are treated differently but are coupled to each other. For the quantum part, all three systems are also coupled, and consequently, we note that a particular phase in one system is an indication of the same phase in others. In what follows, we define three phases based on the dynamical behavior of mean excitations (either of the membrane $\langle n_{m}\rangle$, cavity field $\langle n_{c}\rangle$, or two-level atom $\langle \hat \sigma^+ \hat \sigma^- \rangle$): \begin{enumerate} \item \emph{Regular phase.}~The excitation of each system will have a stable value after a long evolution time, as shown in Figs.~\ref{osc}(a1)-(a3). In this case, the motion of the atom and the membrane will converge to a point in the phase-space diagram, as shown in Figs.~\ref{phasemotion}(a1)-(a2). \item \emph{Time crystal phase.}~The excitation of each system will oscillate periodically around a certain value, as shown in Figs.~\ref{osc}(b1)-(b3). Here, after a certain time, the motion of the atom and the membrane will continue to orbit a point in the phase-space diagram, see Figs.~\ref{phasemotion}(b1)-(b2). \item \emph{Chaotic phase.}~The excitation of each system will show random oscillation, as shown in Figs.~\ref{osc}(c1)-(c3). The motion of the atom and the membrane in the phase-space diagram will exhibit random orbits around two attractors, see Figs.~\ref{phasemotion}(c1)-(c2). \end{enumerate} Remarkably, the quantum-classical coupled dynamics can produce all three phases, by simply tuning the strength of the optomechanical ($g_{mc}$) and light-matter ($g_{ac}$) coupling, see Fig.~\ref{osc}. \begin{figure}[h!] \centering \includegraphics[width=0.47\textwidth]{motion.pdf}\\ \caption{ The motion of the atom (first column) and the membrane (second column) in the phase-space diagram. The parameters are given by $\gamma_c/\gamma_a$=0.5, $\gamma_m/\gamma_a$=2, $\eta/\gamma_a$=5, $V_0/\gamma_a$=20, $V_1/\gamma_a$=40, $\omega_r/\gamma_a$=1, $\Delta_c/\gamma_a$=-1, and $\Delta_a/\gamma_a$=-2. For panels (a1)-(a2): $g_{ac}/\gamma_a$=0.5, $g_{mc}/\gamma_a$=2; (b1)-(b2): $g_{ac}/\gamma_a$=2, $g_{mc}/\gamma_a$=2.5; and (c1)-(c2): $g_{ac}/\gamma_a$=2, $g_{mc}/\gamma_a$=2.}\label{phasemotion} \end{figure} Furthermore, the atomic motion ($x,p$) and expectation value of quadratures, e.g., for the membrane $(x_m, p_m)$, where $x_{m}=\langle \hat b+\hat b^{\dagger}\rangle/\sqrt{2}$ and $p_{m}=\langle \hat b-\hat b^{\dagger}\rangle/(i\sqrt{2})$ are plotted in phase-space diagrams in Fig.~\ref{phasemotion}. For the atom, as the period of one potential is twice the other (see Eq.~(\ref{EQ_H_atom})), the depths $V_0$ and $V_1$ allow for a double well-like potential shape, which consequently gives three optimum points, two of which are stable. The position of the two stable points are symmetric with respect to, e.g., $x=-\pi/2$ where the stronger potential $V_1\sin(x)$ has the lowest energy. Thus, the steady momentum is always zero in the regular phase, whereas it is oscillating around zero in other phases. The atomic motion will converge to one of the stable points in the regular phase while the trajectory will form a closed circle in the time crystal phase. When the system is in the chaotic phase, there are two attractors in the phase-space diagram and the motion of the atom is unpredictable. At the same time, the behaviors of the quantum degrees of freedom reflect that of the classical ones ($x,p$) of the atom, see the second column of Fig.~\ref{phasemotion} for the membrane's quadratures. The motion of the membrane will have non-zero momentum in the steady-state regime. Below we shall introduce quantities to indicate the phase of the system, and finally, obtain a phase transition diagram for varying values of the optomechanical and light-matter coupling strengths. We also computed the first and second order correlation functions $G^{(1)}(\tau)$ and $G^{(2)}(\tau)$ that are standardly measured in experiments. See the Appendix for details. As expected, the behaviors of these correlation functions follow that of the mean excitation in the corresponding phases. \begin{figure}[h!] \centering \includegraphics[width=0.5\textwidth]{frac.pdf}\\ \caption{The dynamics of the translation components $(x_{ac},\:p_{ac})$. The parameters used are $\gamma_c/\gamma_a$=0.5, $\gamma_m/\gamma_a$=2, $\eta/\gamma_a$=5, $V_0/\gamma_a$=20, $V_1/\gamma_a$=40, $\omega_r/\gamma_a$=1, $\Delta_c/\gamma_a$=-1, and $\Delta_a/\gamma_a$=-2. We also used (a): $g_{ac}/\gamma_a$=0.5, $g_{mc}/\gamma_a$=2; (b): $g_{ac}/\gamma_a$=2, $g_{mc}/\gamma_a$=2.5; (c): $g_{ac}/\gamma_a$=2, $g_{mc}/\gamma_a$=2; and (d): $g_{ac}/\gamma_a$=4, $g_{mc}/\gamma_a$=2}\label{fractal} \end{figure} \section{Quantification and classification of the phases} Here we shall present a way to numerically classify the phases previously described. In particular, we used two quantities, where one is recognizing the regular phase and the other the chaotic phase. Consequently, this method classifies all three possible phases in the phase transition diagram, which we will present below. \emph{The regular phase transition}. Recognizing the regular phase is straightforward as the mean excitation of all the systems will go towards a constant value, see Fig.~\ref{osc}. Here, after a long evolution time, one can choose a time range and compute $R=\max{(\langle n_{\mu}\rangle)}-\min{(\langle n_{\mu}\rangle)}$. The regular phase is given for $R<\epsilon$, where $\epsilon$ is a small constant. \emph{The 0-1 test for the chaotic phase transition}. The system in the chaotic phase will have a very different dynamical behavior, which can be tested by the regression or correlation method~\cite{Gottwald_2009}. Here, relevant functions are defined such that we can apply the above tests to our system. First, we take new translation components ($x_{ac}$,\:$p_{ac})$ and $\theta_c$ as follows \begin{eqnarray} p_{ac}(n+1)&=&\phi(n) \cos(\theta_c)+p_{ac}(n),\nonumber \\ x_{ac}(n+1)&=&\phi(n)\sin(\theta_c)+x_{ac}(n+1),\nonumber \\ \theta_c(n+1)&=&\nu+\theta_c(n)+\phi(n), \end{eqnarray} where $n=1,2,\cdots, N$ denotes the time index, $\phi(n)$ is a dynamical quantity, here taken as $x(n)+p(n)$ , and $\nu$ is a fixed constant $[0,\pi]$. The initial state of $p_{ac}$, $x_{ac}$ and $\theta_c$ are zero and they are updated by the position and the momentum of atoms. The quantities $q_{ac}$ and $p_{ac}$ are bounded if the dynamical behavior is regular, while in the chaotic phase they will behave asymptotically. The translation components resulting from the hybrid atom-optomechanical system are shown in Fig.~\ref{fractal}. The regular and time crystal phases have bounded states for ($x_{ac},p_{ac}$) as shown in Figs.~\ref{fractal}(a) and (b). However, they become unbounded in the chaotic phase, see Figs.~\ref{fractal}(c) and (d), showing the pattern of fractals. Given dynamical components ($x_{ac},p_{ac}$), the mean square displacement is defined as \begin{eqnarray} M_c(n)&=&\lim_{N\rightarrow\infty}\frac{1}{N}\sum_{j=1}^{N}\left[p_{ac}(j+n)-p_{ac}(j) \right]^2 \nonumber \\ &&+\left[ x_{ac}(j+n)-x_{ac}(j) \right]^2, \end{eqnarray} where $n\ll N$ is required. The test for chaos is based on the growth rate of $M_c(n)$ as a function of $n$. A modified mean square displacement $D_c(n)$ that exhibits the same asymptotic growth as $M_c(n)$, but with better convergence properties is given by \begin{equation} D_c(n)=M_c(n)-V_{osc}(\nu,n), \end{equation} where the oscillation term $V_{osc}$ is defined as $V_{osc}=(E_\phi)^2({1-\cos(n\nu)})/({1-\cos(\nu)}),$ and the expectation $E_\phi$ is given by $E_\phi=\lim_{N\rightarrow\infty}\frac{1}{N}\sum_{j=1}^N \phi(j)$. Note that the cut-off index $n_{\text{cut}}$ needs to be large enough such that the error of $D_c(n_{\text{cut}})$ is close to zero. \begin{figure}[h!] \centering \includegraphics[width=0.5\textwidth]{pd1.pdf} \caption{The phase transition diagram. The regular, time crystal and chaotic phases are denoted by I, II and III, respectively. The parameters used are $\gamma_c/\gamma_a$=0.5, $\gamma_m/\gamma_a$=2, $\eta/\gamma_a$=5, $V_0/\gamma_a$=20, $V_1/\gamma_a$=40, $\omega_r/\gamma_a$=1, $\Delta_c/\gamma_a$=-1, and $\Delta_a/\gamma_a$=-2. }\label{phad} \end{figure} The 0-1 test via regression method is calculated following the quantity $K_c=\lim_{n\rightarrow \infty}{\log M_c(n) }/{\log n}$, whose value is near zero (one) for non-chaotic (chaotic) phase. An alternative test, that we also consider, is via the correlation method~\cite{Gottwald_2009} and it is determined by the mean square displacement $D_c$ as follows \begin{eqnarray} \text{cov}(X,Y)&\equiv&\frac{1}{q}\sum_{j=1}^{q}\left( X(j)-\bar{X} \: \right) \left( Y(j)-\bar{Y} \right), \nonumber \\ K_c&=&\frac{\text{cov}(\xi,\Delta)}{\sqrt{\text{cov}(\xi,\xi)\text{cov}(\Delta,\Delta)}}, \label{corm} \end{eqnarray} where $\bar{X}$ and $\bar{Y}$ are the mean values of the vectors $X$ and $Y$ with length $q$. We take the vectors $\xi =(1,2,\cdots,n_{\text{cut}})$ and $\Delta =(D_c(1), D_c(2),\cdots,D_c(n_{\text{cut}}))$. \emph{The phase transition diagram}. The three phases are characterized by the two tests described above (regular and chaotic phase transition tests). The phase diagram for the two tests are plotted separately, see the Appendix. Here, we combine the diagrams, see Fig.~\ref{phad}, which shows the three phases for different coupling strengths. When the atom-cavity coupling is close to zero, only the regular phase exists with the balance of the rates of the decay and the drive. With the increase of $g_{ac}$, the time crystal phase will appear with periodic evolution of the interaction strength $g_{ac}\Re\left\{\langle \hat a^\dagger \hat \sigma^-\rangle\right\}$. For further increase of $g_{ac}$ the system reaches the chaotic phase. Remarkably, the coupling between the cavity and the membrane $g_{mc}$ also plays an important role in the time crystal and chaotic phases. If $g_{mc}$ is too small compared to $g_{ac}$ the model can be simplified to an atom cooling model and the membrane's oscillations can be ignored. On the contrary, if $g_{ac}$ is too small, the system can be transformed to an optomechanical model and the atoms can be ignored. The competition of the coupling strengths allows the system to have a rich phase diagram. \section{Conclusion} We theoretically considered a hybrid atom-optomechanics system to realize different dynamical phases by exploiting the competition of the coupling strength of the cavity and atoms, and that of the cavity and membrane. The atoms experience two potentials, including one that may be static, periodically oscillating, or randomly oscillating. The coupling of the cavity mode and the membrane allows them to have similar behavior, where the whole system can exhibit a regular, time crystal, or chaotic phase. These three phases are distinguished after evolving quantities from the system for a sufficiently long time, where we performed regular and chaotic phase transition tests. \section{Acknowledgements} This work was supported by the Singaporean Ministry of Education, via the Tier 2 Academic Research Fund project MOE2019-T2-1-004. \section{Appendix} \subsection{Quantum trajectory method} We also use the quantum trajectory (QT) method as a separate way to evolve the atom-optomechanics system. For a review on quantum trajectories, see Refs.~\cite{carmichael2009open,daley2014quantum}. As described in the main text, the evolution of the system is governed by the coupled quantum-classical dynamics. The quantum dynamics is described within the quantum master equation, which here we describe using the QT method. The observable $\Re\left\{\langle \hat a^\dagger \hat \sigma^-\rangle\right\}$ obtained from the QT will then update the classical dynamics for the atomic motion, which in turn affects the Hamiltonian (via $\sin(2x)$) of all the trajectories. We begin by noting that the quantum master equation in Eq.~(\ref{EQ_QME}) can be rewritten as \begin{equation}\label{EQ_QTEQ} \dot \rho=-i(H_{\text{eff}}\rho-\rho H_{\text{eff}}^\dagger)+\tilde b \rho \tilde b^\dagger+\tilde a \rho \tilde a^\dagger+\tilde \sigma^- \rho \tilde \sigma^+, \end{equation} where $H_{\text{eff}}=H-(i/2)(\tilde b^\dagger \tilde b+\tilde a^\dagger \tilde a+\tilde \sigma^+ \tilde \sigma^-)$ and the decay rates are absorbed into the operators, i.e., $\tilde b=\sqrt{\gamma_m}\hat b$, $\tilde a=\sqrt{\gamma_c}\hat b$, and $\tilde \sigma^-=\sqrt{\gamma_a}\hat \sigma^-$. The interpretation of Eq.~(\ref{EQ_QTEQ}) is that the system is evolved under $H_{\text{eff}}$ and at the same time possible \emph{jumps} may occur, from the rest of the terms. This way, the evolution of each trajectory from $t$ to $t+\delta t$ is constructed as follows. A candidate state is calculated as $|\psi^{(1)}(t+\delta t)\rangle=(\mathbbm{1}-iH_{\text{eff}}\delta t)|\psi(t)\rangle$. As $H_{\text{eff}}$ is not Hermitian, one obtains \begin{equation} \langle \psi^{(1)}(t+\delta t)|\psi^{(1)}(t+\delta t)\rangle=1-\delta p, \end{equation} where $\delta p$ is a probability. One can further note that \begin{eqnarray} \delta p&=&\delta t\langle \psi(t)|i(H_{\text{eff}}-H_{\text{eff}}^\dagger)|\psi(t)\rangle \nonumber \\ &=&\delta t \langle \psi(t)|\tilde b^\dagger \tilde b+\tilde a^\dagger \tilde a+\tilde \sigma^+ \tilde \sigma^-|\psi(t)\rangle \nonumber \\ &=& \delta p_m+\delta p_c+\delta p_a, \end{eqnarray} where we have used, e.g., $\delta p_m\equiv \delta t \langle \psi(t)|\tilde b^\dagger \tilde b |\psi(t)\rangle$. The stochastic evolution step is computed as follows: \begin{enumerate} \item With probability $1-\delta p$, the new state is \begin{equation} |\psi(t+\delta t)\rangle=\frac{|\psi(t+\delta t)\rangle}{\sqrt{1-\delta p}}. \end{equation} \item With probability $\delta p$, one of the jumps happens. The new state will be one of the following: \begin{eqnarray} |\psi(t+\delta t)\rangle&=&\frac{\tilde b|\psi(t)\rangle}{\sqrt{\delta p_m/\delta t}};\nonumber \\ |\psi(t+\delta t)\rangle&=&\frac{\tilde a|\psi(t)\rangle}{\sqrt{\delta p_c/\delta t}}; \nonumber \\ |\psi(t+\delta t)\rangle&=&\frac{\tilde \sigma^-|\psi(t)\rangle}{\sqrt{\delta p_a/\delta t}}. \end{eqnarray} The probability of each state is proportional to $\delta p_m$, $\delta p_c$, and $\delta p_a$, respectively. \end{enumerate} The expectation value of an observable is obtained from the average of all trajectories, e.g., \begin{equation} \langle n_c(t) \rangle=\frac{1}{N}\sum_j^N \langle \psi_j(t)|\hat a^\dagger \hat a|\psi_j(t)\rangle, \end{equation} where $|\psi_j(t)\rangle$ is the state of the $j$th trajectory. For initial states that are mixed, pure states are sampled from the ones composing the initial density matrix, which are then evolved following the QT method. We demonstrate the computation of $\langle n_c(t)\rangle$ with the QT method (using 1000 trajectories) in Fig.~\ref{FIG_QT}(a) and (b), where the initial states are taken as $|100\rangle$ and $|110\rangle$, respectively. It can be seen that the calculations from the QT method are close to that from the quantum master equation (solid black curves), as expected. The ratio of the mean excitation in panel (a) to panel (b) is simply the correlation function $G^{(2)}(\tau)$ (will be properly introduced later, see Eq.~(\ref{EQ_g22})), where $t$ is taken to be zero. For this example, $G^{(2)}(\tau)$ is plotted in panel (c), where it oscillates around unity. \begin{figure}[!h] \centering \includegraphics[width=0.45\textwidth]{FIG_QT.pdf}\\ \caption{The evolution of mean excitation of the cavity field mode via the quantum trajectory method. Panels (a) and (b) represent evolution starting with different initial states. Panel (c) is the second order correlation function. The corresponding results using the quantum master equation are also plotted in each panel (solid black curves). The error bars represents the standard error of the mean from 1000 trajectories. The parameters used are $\gamma_c/\gamma_a$=0.5, $\gamma_m/\gamma_a$=2, $\eta/\gamma_a$=5, $V_0/\gamma_a$=20, $V_1/\gamma_a$=40, $\omega_r/\gamma_a$=1, $\Delta_c/\gamma_a$=-1, $\Delta_a/\gamma_a$=-2, $g_{ac}/\gamma_a$=2, and $g_{mc}/\gamma_a$=2.5.}\label{FIG_QT} \end{figure} \subsection{The correlation functions} The correlation functions are normally used to describe coherence properties of electromagnetic fields. Here we shall compute these quantities for the cavity field mode of the atom-optomechanics system. The first and second order correlation functions are defined, respectively, as \begin{eqnarray} G^{(1)}(\tau)&=&\frac{\langle \hat a^\dagger(t+\tau) \hat a(t)\rangle}{\sqrt{ \langle {n}_c(t)\rangle \langle {n}_c(t+\tau)\rangle}}, \label{EQ_g1}\\ G^{(2)}(\tau)&=&\frac{\langle \hat a^\dagger(t)\hat a^\dagger(t+\tau)\hat a(t+\tau)\hat a(t)\rangle}{\langle{n}_c(t)\rangle \langle{n}_c(t+\tau)\rangle}, \label{EQ_g2} \end{eqnarray} where $\langle {n}_c(t)\rangle =\text{Tr}\left[\hat a^\dagger \hat a \rho(t) \right]$ and $\langle{n}_c(t+\tau)\rangle=\text{Tr}\left[\hat a^\dagger \hat a \rho(t+\tau)\right]$. To calculate the numerator of the first order correlation function $G^{(1)}(\tau)$ in Eq.~(\ref{EQ_g1}), the initial density matrix $\rho(0)$ is evolved to $\rho(t)$ with the quantum-classical coupled dynamics. The subsequent evolution requires helper states, defined as \begin{eqnarray} \tilde{\rho}_1(t)&=&(\mathbbm{1}+\hat a)\rho(t)(\mathbbm{1}+\hat a^\dagger), \nonumber \\ \tilde{\rho}_2(t)&=&(\mathbbm{1}-\hat a)\rho(t)(\mathbbm{1}-\hat a^\dagger), \nonumber \\ \tilde{\rho}_3(t)&=&(\mathbbm{1}+i\hat a)\rho(t)(\mathbbm{1}-i\hat a^\dagger), \nonumber \\ \tilde{\rho}_4(t)&=&(\mathbbm{1}-i\hat a)\rho(t)(\mathbbm{1}+i\hat a^\dagger). \end{eqnarray} Note that this way, we have $(\tilde{\rho}_1(t)-\tilde{\rho}_2(t)-i\tilde{\rho}_3(t)+i\tilde{\rho}_4(t))/4=\hat a\rho(t)\equiv \hat A(t)$. The normalised helper states (${\rho}_j(t)=\tilde{\rho}_j(t)/\text{Tr}\left[ \tilde{\rho}_j(t)\right]$) are physical density matrices, which are then evolved from $t$ to $t+\tau$. With this method, one obtains \begin{eqnarray} \hat A(t+\tau)&=&\frac{1}{4}[\tilde{\rho}_1(t+\tau)-\tilde{\rho}_2(t+\tau) \nonumber \\ &&-i\tilde{\rho}_3(t+\tau)+i\tilde{\rho}_4(t+\tau)]. \end{eqnarray} Finally, the first order correlation function is given by \begin{equation} G^{(1)}(\tau)=\text{Tr}\left[\hat a^\dagger \hat A(t+\tau)\right]/\sqrt{\langle n_c(t)\rangle \langle n_c(t+\tau)\rangle}. \end{equation} The second order correlation function is computed in a similar way. After the first evolution, leading to $\rho(t)$, one considers a photon-subtracted state ${\rho_p}(t)= \hat a \rho(t)\hat a^\dagger/\langle{n}_c(t)\rangle$. This physical state is then evolved from $t$ to $\tau$, giving ${\rho_p}(t+\tau)$. The correlation function in Eq.~(\ref{EQ_g2}) is then evaluated as \begin{equation}\label{EQ_g22} G^{(2)}(\tau)=\text{Tr}\left[\hat a^\dagger \hat a {\rho_p}(t+\tau)\right]/\langle n_c(t+\tau) \rangle. \end{equation} Recall that the denominator in Eq.~(\ref{EQ_g22}) is simply $\text{Tr}\left[\hat a^\dagger \hat a {\rho}(t+\tau)\right]$. Therefore, it is expected that in the regular phase, given large $\tau$, the state $\rho_p(t+\tau)=\rho(t+\tau)$ is the steady state solution, making $G^{(2)}(\tau)=1$. This is not the case for the time crystal and chaotic phases, as the mean excitation still oscillates for large $\tau$. In this case, the $G^{(2)}(\tau)$ will also oscillate and cross unity during its evolution. As exemplary cases, we present the first (dashed blue curves) and second (solid orange curves) order correlation functions in Fig.~\ref{cf}. It can be seen that $G^{(2)}(\tau)\rightarrow 1$ in the regular phase, Fig.~\ref{cf}(a1), while it is oscillating around one in the time crystal phase, as shown in Fig.~\ref{cf}(a2). This oscillation is also observed in the chaotic phase, but it is random, see Figs.~\ref{cf}(b1)-(b2). \begin{figure}[h!] \centering \includegraphics[width=0.5\textwidth]{cf.pdf}\\ \caption{The first and second order correlation functions of the cavity mode, indicated by the dashed blue and solid orange curves, respectively. The parameters are summarised as follows $\gamma_c/\gamma_a$=0.5, $\gamma_m/\gamma_a$=2, $\eta/\gamma_a$=5, $V_0/\gamma_a$=20, $V_1/\gamma_a$=40, $\omega_r/\gamma_a$=1, $\Delta_c/\gamma_a$=-1, $\Delta_a/\gamma_a$=-2, and for panel (a1): $g_{ac}/\gamma_a$=4, $g_{mc}/\gamma_a$=2; (a2): $g_{ac}/\gamma_a$=2, $g_{mc}/\gamma_a$=2.5; (b1): $g_{ac}/\gamma_a$=2, $g_{mc}/\gamma_a$=2; and (b2): $g_{ac}/\gamma_a$=4, $g_{mc}/\gamma_a$=2.}\label{cf} \end{figure} \subsection{The phase diagram for the regular and chaotic phase transition tests} \begin{figure}[h!] \centering \includegraphics[width=0.45\textwidth]{pd2.pdf} \caption{The regular phase transition test (a) and the correlation methods for the chaos test (b). The parameters used are $\gamma_c/\gamma_a$=0.5, $\gamma_m/\gamma_a$=2, $\eta/\gamma_a$=5, $V_0/\gamma_a$=20, $V_1/\gamma_a$=40, $\omega_r/\gamma_a$=1, $\Delta_c/\gamma_a$=-1, and $\Delta_a/\gamma_a$=-2. }\label{phad2} \end{figure} The phase diagram in the main text (Fig. \ref{phad}) is determined by two tests. The first one is the regular transition test where it recognizes the cavity mode's excitation converging to a certain value after a long evolution time. The second one is the chaos test, characterised by Eq.~(\ref{corm}), where $K_c$ will be close to $1$ when the system is in a chaotic phase. The regular phase transition is shown in Fig.~\ref{phad2} (a) with the blue region indicating the regular phase and the yellow one representing other phases. When the field-membrane coupling strength $g_{mc}$ is small, there is only regular phase regardless of the field-atom coupling strength $g_{ac}$. Along with the increase of $g_{mc}$, the system can be in a chaotic or time crystal phase. However, if $g_{mc}$ is too large, the influence of the atom in the time dependent Hamiltonian can be ignored and the system returns to the regular phase. The value of $K_c$ is shown in Fig. ~\ref{phad2} (b) and the chaotic phase, indicated by the redder region, can only exist in the yellow region of Fig.~\ref{phad2} (a). The chaotic phase appears in the region where $g_{ac}/\gamma_a>1$ and $g_{mc}/\gamma_a\gtrsim1$, i.e., the membrane and the atoms both influence the the dynamical behavior of the whole system. The sum of the values from Fig.~\ref{phad2} (a) and Fig.~\ref{phad2} (b) is plotted in Fig. \ref{phad} of the main text. The region I (blue color) indicates the regular phase and the region III the chaotic phase (red color). The time crystal phase is then inferred from the remaining region, labelled II (green color).
\section{Introduction} A visual boundary is a particular type of compactification of a proper geodesic metric space. The boundary is defined as a set of equivalence classes of asymptotic rays endowed with an appropriate topology. For hyperbolic spaces $X$ and $Y$, any quasi-isometry $X\to Y$ between them extends to a homeomorphism of their visual boundaries. Consequently, the homeomorphism type of the boundary of a hyperbolic group is a well-defined group invariant. This is not true for $\cat(0)$ groups - i.e.\ groups that act geometrically on $\cat(0)$ spaces. Bowers-Ruane give an example of a group $G$ acting geometrically on $\cat(0)$ spaces $X$ and $Y$, such that the associated $G$-equivariant quasi-isometry between the spaces does not extend to a homeomorphism between their visual boundaries \cite{BowersRuane96}. Croke-Kleiner provided an example of a $\cat(0)$ group $G$ and two $\cat(0)$ spaces $X,Y$, both admitting geometric actions by $G$ such that $\bdry X$ and $\bdry Y$ are non-homeomorphic \cite{CrokeKleiner2000}. Wilson further showed that in fact this same $G$ acts geometrically on uncountably many spaces with boundaries of distinct topological type \cite{Wilson2005}. The group $G$ in the Croke-Kleiner construction is the right-angled Artin group with the defining graph a path on four vertices. A $\cat(0)$ group $G$ is called \emph{boundary rigid}, if the visual boundaries of all $\cat(0)$ spaces admitting a geometric action by $G$ are homeomorphic. As noted above, hyperbolic $\cat(0)$ groups are boundary rigid while not all $\cat(0)$ groups are boundary rigid. Ruane proved that the direct product of hyperbolic groups is boundary rigid \cite{Ruane99}. Hosaka extended that to show that any direct product of boundary rigid groups is boundary rigid \cite{Hosaka2003}. Hruska-Kleiner proved that groups acting geometrically on $\cat(0)$ spaces with the isolated flats property are boundary rigid \cite{HruskaKleiner05}. In this note, we study a family of $\cat(0)$ groups acting geometrically on the product of two infinite, locally finite, regular trees of valence $\geq 3$. We will assume the groups preserve the factors, which is always the case after passing to an index $2$ subgroup. We refer to such groups as \emph{lattices in a product of trees}. We are interested in the following question: \begin{question} Are lattices in a product of trees boundary rigid? \end{question} The simplest example of a lattice in a product of trees is a direct product $F_n\times F_m$ of two finite rank free groups. These are boundary rigid by \cite{Ruane99}. However, there exist lattices in product of trees that are \emph{irreducible}, i.e.\ they do not split as direct products, even after passing to a finite index subgroups. Irreducible lattices in products of trees were first studies by Mozes \cite{Mozes92}, Burger-Mozes \cite{BurgerMozes97}, \cite{BurgerMozes2000} and by \cite{Wise96Thesis}. Burger-Mozes constructed examples of simple lattices in a product of trees, providing the first examples of simple $\cat(0)$ groups, as well as the first examples of simple amalgamated products of free groups. In this paper, we give the positive answer to the above for vertex-transitive lattices. \begin{thm}\label{thm:main} Let $G$ be a lattice in a product of trees acting freely and vertex-transitively. Suppose $G$ acts geometrically on a $\cat(0)$ space $X$. Then $\bdry X$ is the join $\mathcal C* \mathcal C$ of two copies of the Cantor set. Moreover, if $X$ is geodesically complete, then $X$ splits as a product of CAT(0) spaces $X_1\times X_2$, where $\bdry X_i = \mathcal C$ for each $i=1,2$. \end{thm} \begin{remark} We assume $G$ acts freely and vertex-transitively in order to exploit a particular type of presentation for $G$ (see Observation ~\ref{obs:pushing b} and Proposition ~\ref{lem:Z2 subgroups} here). We suspect these are not necessary assumptions for the proof of our theorem to work but the details are simplified when they are used here. \end{remark} There are two major steps in the proof of the theorem. We first show that $\bdry X$ splits as a join of two 0-dimensional subspaces and then show that each subspace is homeomorphic to $\mathcal C$. To show $\bdry X$ splits as a join, it suffices to show that $\partial_T X$, the Tits boundary of $X$ splits as a metric join of two discrete sets. In our setting, this will provide a quasi-dense subset $X'$ of $X$ which splits isometrically as a product $X_1\times X_2$. This is enough to conclude that the visual boundary $\bdry X$ splits as $\bdry X_1\star\bdry X_2$, with each factor 0-dimensional. Once we have this information about $ \bdry X$, we prove that $\bdry X_i=\mathcal C$ for $i=1,2$. This step is non-trivial when $G$ is irreducible. For contrast, see Remark ~\ref{remark:CubeComplexSplit} for case where $X$ is a $\cat(0)$ cube complex and the action of $G$ is essential (or we can assume $X$ has the geodesic extension property instead of essential action). The Rank Rigidity theorem of \cite{CapraceSageev2011} allows us to get the splitting of $\bdry X$ as a join of 0-dimensional subspaces almost immediately. We mention this case separately to illustrate the usefulness of the Rank Rigidity Theorem in the cube complex setting. The paper is organized as follows. In section ~\ref{sec:background} we give the background on lattices in products of trees as well as ends and boundaries of $\cat(0)$ spaces. In section ~\ref{sec:filtersandfolding} we review the machinery from \cite{GuralnikSwenson13} that we use in our proof and we provide a slightly strengthened version of Theorem A from that paper (see Theorem ~\ref{thm:Folding onto maximal tori} here). In section ~\ref{sec:splitting} we prove Theorem ~\ref{thm:join} which is the first of the two majors steps mentioned above. We finish the proof of the main theorem in section ~\ref{sec:from splitting to splitting of cantor sets}. \subsection*{Acknowledgements} This collaboration was facilitated by WIGGD 2020, which was sponsored by the National Science Foundation under grants DMS–1552234, DMS–1651963, and DMS–1848346. The first author was also supported by the National Science Foundation grant DMS-2105548, the second author by the Israel Science Foundation grant no.1562/19, and the last author by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany's Excellence Strategy EXC 2044 –390685587, Mathematics M\"unster: Dynamics–Geometry–Structure. \section{Background}\label{sec:background} \subsection{Lattices in products of trees}\label{sec:lattices} Let $T$ be an infinite, regular tree of degree $\geq 3$. We view $T$ as a metric space, with the path metric, where each edge has length $1$. The automorphism group $\Aut(T)$ is a group of all isometries $T\to T$, i.e.\ permutations of the vertex sets that preserve the adjacency. The group $\Aut(T)$ endowed with a compact-open topology, is a locally compact group. We now consider two infinite regular trees $T_1$ and $T_2$ of finite degrees $n,m\geq 3$ respectively. The product $T_1\times T_2$ has a natural structure of a square complex. It is easy to verify that each vertex link is a complete bipartite graph $K(n,m)$ and, in particular, it is a flag simplicial complex. Thus $T_1\times T_2$, with the path metric induced by the Euclidean metric on each square, is a CAT(0) square complex. Every lattice in a product of trees acting freely and vertex-transitively on $T_1\times T_2$ and preserving the factors has a special presentation of the form $\langle A\cup B\mid R\rangle$ where $R$ is a set of relators such that \begin{itemize} \item $R$ is a collection of relators of the form $a_1b_1a_2b_2$ where $a_1, a_2\in A^{\pm1}, b_1, b_2\in B^{\pm1}$, \item For every $a_1\in A^{\pm1}, b_1\in B^{\pm1}$, there exist unique $a_2\in A^{\pm1}, b_2\in B^{\pm1}$ such that a cyclic permutation of $a_1b_1a_2b_2$ belongs to $R^{\pm1}$. \end{itemize} Such group presentations are discussed in Caprace in \cite[Sec 4.1]{Caprace19}. An example is included later in this section. A proof that a lattice acting freely and vertex-transitively on a product of trees admits such a presentations can be found in \cite{RattaggiThesis04}. The presentation complex of such a presentation is a square complex with a unique vertex, whose link is a complete bipartite graph $K(n,m)$. Such square complexes are examples of \emph{complete square complexes}. See \cite{WiseCSC} for more details on complete square complexes. The subgroups $\langle A\rangle$ and $\langle B\rangle$ are free groups. We note the following. \begin{obs}\label{obs:pushing b} For any $b\in B$ we have $b\langle A\rangle\subseteq \bigcup_{b'\in B^{\pm}} \langle A\rangle b'$. \end{obs} We will also need the following fact: \begin{prop}[\cite{WiseVHtori}]\label{lem:Z2 subgroups} Every lattice in a product of trees acting freely and vertex-transitive contains a $\mathbb Z^2$ subgroups generated by some $a\in\langle A\rangle$ and $b\in \langle B\rangle$. \end{prop} \begin{exa} Let $G$ be a group on four generators $a,b,x,y$ with four relations: \begin{center} \begin{tikzpicture} \tikzset{>=latex} \begin{scope}[thick, decoration={ markings, mark=at position 0.62 with {\arrow{latex}}} ] \node[circle, draw, fill, inner sep = 0pt,minimum width = 1pt] (a) at (0,0) {}; \node[circle, draw, fill, inner sep = 0pt, minimum width = 1pt] (b) at (0,1) {}; \node[circle, draw, fill, inner sep = 0pt, minimum width = 1pt] (c) at (1,1) {}; \node[circle, draw, fill, inner sep = 0pt, minimum width = 1pt] (d) at (1,0) {}; \draw[postaction={decorate}] (a) -- node[left] {$a$} (b); \draw[postaction={decorate}] (b) --node[above] {$x$} (c); \draw[postaction={decorate}] (d) --node[right] {$b$} (c); \draw[postaction={decorate}] (d) --node[below] {$x$} (a); \end{scope} \begin{scope}[shift = {(2.75,0)}, thick, decoration={ markings, mark=at position 0.62 with {\arrow{>}}} ] \node[circle, draw, fill, inner sep = 0pt,minimum width = 1pt] (a) at (0,0) {}; \node[circle, draw, fill, inner sep = 0pt, minimum width = 1pt] (b) at (0,1) {}; \node[circle, draw, fill, inner sep = 0pt, minimum width = 1pt] (c) at (1,1) {}; \node[circle, draw, fill, inner sep = 0pt, minimum width = 1pt] (d) at (1,0) {}; \draw[postaction={decorate}] (a) -- node[left] {$a$} (b); \draw[postaction={decorate}] (b) --node[above] {$y$} (c); \draw[postaction={decorate}] (c) --node[right] {$b$} (d); \draw[postaction={decorate}] (d) --node[below] {$y$} (a); \end{scope} \begin{scope}[shift = {(5.5,0)},thick, decoration={ markings, mark=at position 0.62 with {\arrow{>}}} ] \node[circle, draw, fill, inner sep = 0pt,minimum width = 1pt] (a) at (0,0) {}; \node[circle, draw, fill, inner sep = 0pt, minimum width = 1pt] (b) at (0,1) {}; \node[circle, draw, fill, inner sep = 0pt, minimum width = 1pt] (c) at (1,1) {}; \node[circle, draw, fill, inner sep = 0pt, minimum width = 1pt] (d) at (1,0) {}; \draw[postaction={decorate}] (a) -- node[left] {$a$} (b); \draw[postaction={decorate}] (c) --node[above] {$y$} (b); \draw[postaction={decorate}] (c) --node[right] {$a$} (d); \draw[postaction={decorate}] (a) --node[below] {$x$} (d); \end{scope} \begin{scope}[shift = {(8.25,0)},thick, decoration={ markings, mark=at position 0.62 with {\arrow{>}}} ] \node[circle, draw, fill, inner sep = 0pt,minimum width = 1pt] (a) at (0,0) {}; \node[circle, draw, fill, inner sep = 0pt, minimum width = 1pt] (b) at (0,1) {}; \node[circle, draw, fill, inner sep = 0pt, minimum width = 1pt] (c) at (1,1) {}; \node[circle, draw, fill, inner sep = 0pt, minimum width = 1pt] (d) at (1,0) {}; \draw[postaction={decorate}] (a) -- node[left] {$b$} (b); \draw[postaction={decorate}] (b) --node[above] {$x$} (c); \draw[postaction={decorate}] (c) --node[right] {$b$} (d); \draw[postaction={decorate}] (a) --node[below] {$y$} (d); \end{scope} \end{tikzpicture} \end{center} The group $G$ is an irreducible lattice in the product of two copies of a $4$-valent tree \cite{JanzenWise09}. \end{exa} \subsection{Ends of a space} We recall the definitions and relevant facts about the space of ends of a topological space. For more details, see \cite{BridsonHaefliger}. Let $X$ be a topological space. A \emph{ray} in $X$ is a proper map $r:[0,\infty)\to X$. A \emph{ray at $x_0$} where $x_0$ is a point of $X$, is a ray with $r(0) = x_0$. An \emph{end} $e$ of $X$ is an equivalence class of rays in $X$ where $r_1\simeq r_2$ if and only if for every compact set $K\subseteq X$ there exists $N\geq 0$ such that $r_1([N,\infty])$ and $r_2([N, \infty])$ are contained in the same connected component of $X-K$. We denote the equivalence class of the ray $r$ by $e(r)$. The set of all ends of $X$ is denoted by $Ends{X}$. Let $U$ be an open set in $X$ and $e\in Ends(X)$, we use the notation $e< U$ to mean that for any $r:[0,\infty)\to X$ with $e(r)=e$, there exists $N\ge 0$ such that $r([N,\infty))\subseteq U$. The set $X\cup Ends(X)$, denoted by $\widehat X$, can be endowed with topology that is generated by the basis consisting of the following sets: \begin{itemize} \item open sets in $X$, \item sets of the form $U\cup \{e\in Ends(X)\ | e < U\}$ where $U$ is a connected component of $X-K$ for some compact set $K\subseteq X$. \end{itemize} The space $\widehat X$ is compact and is called the \emph{end compactification} of $X$. \subsection{Visual Boundary} Assume that $X$ is a metric space with metric $d$. Two geodesic rays $r,r'$ are \emph{asymptotic}, if there exists a constant $K>0$ such that $d(r(t), r'(t))<K$ for all $t\in[0,\infty)$. The \emph{boundary} of $X$, denoted $\partial X$, is the set of equivalence classes of geodesic rays, where two rays are equivalent if they are asymptotic. We denote the equivalence class of a ray $r$ by $r(\infty)$. When $X$ is a complete CAT(0) space, we can put a topology on $\partial X$ as follows. First fix a basepoint $x_0\in X$. The \emph{cone topology} on $\partial X$ with respect to $x_0$ is given by the neighborhood basis $\{U(r, R, \epsilon): r(\infty)\in \partial X,\, R,\epsilon>0\}$ where $$U(r,R,\epsilon) = \{r'(\infty)\in \partial X : r'(0) = x_0, d(r(R), r'(R))<\epsilon \}.$$ This topology seems to depend on the choice of basepoint $x_0\in X$ but in fact it does not. There is a well-defined change of basepoint homeomorphism between the topologies determined by different basepoints. This follows from the fact: \begin{prop}\label{prop: change of basepoint}\cite[Prop. II.8.2]{BridsonHaefliger} If $r$ is a geodesic ray based at $x$ in a complete CAT(0) space $X$, and $x'$ is a point not on this ray, then there exists a unique geodesic ray $r'$ with $r'(0)=x'$ that is asymptotic to $r$. \end{prop} The boundary $\partial X$ endowed with the cone topology is called the \emph{visual boundary} of $X$ and we denote it by $\partial_{\infty} X$. See \cite[Chap II.8]{BridsonHaefliger} for more details and properties of the visual boundary. If $X$ is a proper CAT(0) space, then $\bdry X$ is compact and there is a natural well-defined map $\partial_{\infty}X\to Ends(Y)$ sending a ray $r$ to $e(r)$. This map does not depend on the choice of a ray in the equivalence class of asymptotic rays. The map is a continuous surjection. \cite[Rem II.8.10]{BridsonHaefliger}. One important theorem we will use about the visual boundary is the following theorem of Geoghegan-Ontaneda. \begin{thm}[{\cite{GeogheganOntaneda2007}}]\label{dimension qi invariant} The topological dimension of $\partial_{\infty} X$ is a quasi-isometry invariant. In particular, if a group $G$ acts geometrically on CAT(0) spaces $X$ and $X'$, then their visual boundaries have the same topological dimension. \end{thm} \subsection{Tits Boundary} A finer topology on $\partial X$ comes from considering a metric induced by angles in the space $X$. The boundary of $X$ with this metric is called the \emph{Tits boundary}, and is denoted by $\partial_TX$. In a CAT(0) space, one can measure angles between two geodesics $r,r'$ that emanate from the same point. In fact, this angle can be expressed completely in terms of the metric in $X$. Let $x=r(0)=r'(0)$, then the angle at $x$ between the geodesics $r,r'$ emanating from $x$ can be given by: $$\angle_x (r,r') = \lim_{t\to 0} 2\arcsin{\frac{1}{2t}d(r(t),r'(t))}$$ Note this can be done for both geodesic segments and rays based at $x$. To define an angle metric on $\partial X$, one must view the two points from all possible basepoints $x\in X$. If $\xi,\eta$ are points of $\partial X$, we can define the angle between them (without reference to a basepoint) as follows: $$\angle (\xi,\eta) = \sup_{x\in X} \angle_x(\xi,\eta)$$ This formula gives a metric on $\partial X$ called the \emph{angle metric}. The Tits metric on $\partial X$ is the length metric associated to the angle metric, i.e.\ the Tits distance between points $\xi,\eta\in\partial X$ is the infimum of the lengths of all rectifiable curves between $\xi$ and $\eta$ where the length of a rectifiable path is measured in the usual way using the angle metric. See \cite[Chap II.9]{BridsonHaefliger} for more on the Tits boundary. A particularly useful property is that the Tits boundary of a non-positively curved space is spherical in the following sense. \begin{thm}[{\cite[II.9.20]{BridsonHaefliger}}]\label{CAT(1)} If $X$ is a complete $\cat(0)$ space, then $\partial_T X$ is a complete $\cat(1)$ space. Moreover, if $X$ is proper, then any two points $\xi_0, \xi_1 \in\partial X$ with finite Tits distance are joined by a geodesic segment in $\partial_T X$. \end{thm} \subsection{Relationship between $\partial_\infty X$ and $\partial_T X$} There is a natural continuous bijection from $\partial_TX\to \partial_{\infty} X$ induced by the identity map on $\partial X$. One consequence of this is that we can bound the geometric dimension of $\partial_T X$ by the topological dimension of $\bdry X$. Indeed, the geometric dimension of $\partial_T X$ is equal to the topological dimension of $\partial_T X$ by \cite{Kleiner99}. In order to show $\bdry X$ splits as a join of Cantor sets, it suffices to show $\partial_T X$ splits as a join. Indeed, under the assumption that $X$ is \emph{geodesically complete}, i.e.\ if every geodesic segment in $X$ can be extended to a geodesic ray, if $\partial_T X$ splits as a join the space $X$ splits as a metric product $X_1\times X_2$ for closed, convex subspaces $X_1, X_2$ \cite[Chap II. Thm 9.24]{BridsonHaefliger}. It is an elementary fact that the boundary of a metric product is a join - i.e. $\bdry (X_1\times X_2)=\bdry X_1\star\bdry X_2$, \cite[Chap II.8.11(6)]{BridsonHaefliger}. We do not want to assume $X$ is geodesically complete for our theorem so we use work of Caprace and Monod in \cite{CapraceMonod09} to get around this issue. We explain how to do this here. An action of a group $G$ on a CAT(0) space $X$ is \emph{minimal} if there does not exists a non-empty $G$-invariant closed convex subset of $X$. A CAT(0) space $X$ is \emph{minimal} if the action of its full isometry group is minimal. A CAT(0) space $X$ is \emph{boundary-minimal} if it possesses no closed convex subset $X'\subseteq X$ such that $\partial X' = \partial X$. A subset $X'\subseteq X$ is \emph{quasi-dense} in $X$ if there exists a $D>0$ such that each point of $X$ is within $D$ of $X'$. In particular, $\partial X=\partial X'$ as sets. Thus, for purposes of studying the boundary, we can always pass to a quasi-dense subset without losing any information. The following theorem will be used to avoid the extra assumption of geodesic completeness. \begin{thm}[{\cite{CapraceMonod09}, see also \cite[Ex II.4 and Prop III.10]{Caprace14Notes}}]\label{thm:CapraceMonod} \label{thmCapraceMonod} Let $G$ be a group acting geometrically on a CAT(0) space $X$. Then $G$ stabilizes a closed, convex, quasi-dense subspace $X'\subseteq X$ such that $G$ acts minimally on $X'$. In particular, $\partial X =\partial X'$ as sets. Moreover, $\partial_T X$ splits as join if and only if $X'$ splits as product $X_1\times X_2$. \end{thm} The subspace $X'$ in the above theorem is not necessarily unique. In fact, every closed, convex, quasi-dense subspace of $X$ on which $G$ acts minimally admits a splitting as a product, provided that $\partial_T X$ splits as a join. \subsection{CAT(0) spaces and their isometries} Definition and background on CAT(0) spaces can be found in \cite{BridsonHaefliger}. Let $X$ be a CAT(0) space and let $g$ be an isometry of $X$. The \emph{translation length} $|g|$ of $g$ is the infimum of $d(gx,x)$ taken over $x\in X$. The isometry $g$ is \emph{semi-simple} if the infimum is the minimum. A semi-simple isometry $g$ is \emph{elliptic} if and only if $\inf d(gx,x) =0$, i.e. $g$ has a fixed point in $X$. Otherwise $g$ is \emph{hyperbolic}. Every hyperbolic isometry $g$ has an \emph{axis}, i.e. a geodesic line $\gamma:\mathbb R\to X$ such that $g.\gamma(t) = \gamma(t+|g|)$ for all $t\in [0,\infty)$. If $G$ is a group acting properly and cocompactly on $X$, then every element of $G$ is a semi-simple isometry \cite[Prop II.6.10]{BridsonHaefliger}. We note that if $G$ acts properly and cocompactly on $X$ and $g\in G$ is an infinite order element, then $g$ is a hyperbolic isometry. Let $g$ be a hyperbolic isometry of $X$. Then the axis of $g$ restricted to positive or negative half-line is a geodesic ray. We denote by $g^\infty$ and $g^{-\infty}$ the corresponding elements of $\partial_\infty X$. Let $H$ be a subgroup of $G$. The \emph{limit set} of $\Lambda H$ is the intersection of $\partial_\infty X$ with the closure of an orbit $Hx_0$ in $X\cup\partial_\infty X$ for some (any) $x_0$. We point out two special cases of interest here. \begin{itemize} \item The limit set of an infinite cyclic group $\langle g \rangle$ where $g$ is a hyperbolic isometry is the set $\{g^\infty, g^{-\infty}\}$. \item The Flat Torus Theorem (\cite[Thm II.7.1]{BridsonHaefliger}) shows that if $H=\mathbb Z^n$ for $n>1$, there exists an isometrically embedded $n$-dimensional closed, convex, flat subspace $F$, in $X$, on which $H$ acts geometrically. Thus $\Lambda H=\bdry F$ which is homeomorphic to an $(n-1)$ sphere $S^{n-1}$. \end{itemize} \section{Limit operators and folding}\label{sec:filtersandfolding} This section follows \cite{GuralnikSwenson13}. We start with standard definitions of ultrafilters, Stone-\v{C}ech compactification, $\omega$-limits etc. For simplicity, we state those only in the context of a group. An \emph{ultrafilter} $\omega$ on a group $G$ is a collection of subsets of $G$ such that \begin{enumerate} \item $\emptyset\notin \omega$, \item if $A\in\omega$ and $A\subseteq B\subseteq G$, then $B\in \omega$, \item if $A,B\in \omega$, then $A\cap B\in\omega$, \item for every $A\subseteq G$ either $A\in\omega$ or $G-A\in\omega$. \end{enumerate} An ultrafilter is \emph{principal} if there exists $g\in G$ such that $\{g\}\in \omega$. We note that by properties $(1)$ and $(3)$ of an ultrafilter, the element $g$ such that $\{g\}\in\omega$ is unique. We denote such ultrafilter by $\rho_g$. We denote the set of all ultrafilters on $G$ by $\beta G$. The set $\beta G$ can be equipped with topology generated by the sets of the form $\{\omega \in \beta G: A\in \omega\}$ for subsets $A\subseteq G$. The group $G$ viewed as a discrete space embeds in $\beta G$ via $g\mapsto \rho_g$. The space $\beta G$ is called the \emph{Stone-\v{C}ech compactification} of $G$. Let $G$ be a group acting on a CAT(0) space $X$. We describe how the action of $G$ on $\overline X = X\cup \bdry X$ extends to the action of $\beta G$ on $\overline X$. Let $v = (v_g)_{g\in G}\in \overline X ^G$ be a $G$-sequence, i.e. a sequence of elements of $\overline X$ indexed by $G$, and let $\omega \in\beta G$. The limit with respect to $\omega$ is defined as follows. \begin{defn}[{\cite[Defn 2.1]{GuralnikSwenson13}}]\label{limit} We say that $\xi\in \overline X$ is the \emph{$\omega$-limit} of $v$, and write $\xi= \lim_{\omega}v_g$, if for every neighborhood $U\subseteq \overline X$ of $\xi$ we have $\{g\in G : v_g\in U\}\in \omega$. \end{defn} The $\omega$-limit exists and is unique for every $G$-sequence $v$ and every ultrafilter $\omega$ (see \cite[Prop 2.2]{GuralnikSwenson13}). An important special case is when the $G$-sequence $v$ is the orbit of a point, i.e. $v_g = g\cdot \xi$ for some $\xi\in \overline X$. Then the limit $\lim_{\omega}g\cdot \xi$ is denoted by $T^{\omega}(\xi) $. If $\omega= \rho_a$ is the principal ultrafilter determined by $a\in G$, then $T^{\rho_a}(\xi) = a\cdot \xi$ for every $\xi\in \overline X$. Suppose $\omega$ is a non-principal ultrafilter. Then $T^{\omega}(\xi)\in \partial X$ for all $\xi \in \overline X$. If $x\in X$, then the value $T^\omega (x)$ for $x\in X$ is independent of the choice of $x$ (see \cite{GuralnikSwenson13}), and we denote the point $T^{\omega}(x)\in\partial X$ by $\omega(\infty)$. Note that $\omega(\infty)$ is an accumulation point of the $G$-orbit of $x$. Given an ultrafilter $\omega\in\beta G$, the \emph{antipodal ultrafilter} $S\omega$ is defined as follows: for every $F\subseteq G$ we have $F\in S\omega \iff F^{-1}\in \omega$. We denote $S\omega(\infty)$ by $\omega(-\infty)$, and write $n\stackrel{\omega}{\rightsquigarrow} p$ to denote $\omega(-\infty) = n$ and $\omega(\infty) = p$. Note that $T^{\omega}(\omega(\infty)) = \omega(\infty)$, but in general $T^{\omega}(\omega(-\infty))$ and $\omega(-\infty)$ might be distinct. The group structure on $G$ naturally extends to a semi-group structure on $\beta G$. See \cite{GuralnikSwenson13} for details. We note the following fact. \begin{lem}[{\cite[Cor 2.12]{GuralnikSwenson13}}]\label{lem:semigroup structure} For every $\xi \in \bar X$ and for every $\nu,\omega \in \beta G$ one has $T^{\nu\cdot\omega}\xi = T^\nu T^\omega \xi$. \end{lem} The function $T^{\omega}:\partial_TX\to \partial_TX$ is $1$-Lipschitz in the Tits topology, but generally not continuous in the cone topology $\bdry X$. An important special case to consider is when $G$ is hyperbolic and we construct $\omega$ with a fixed hyperbolic element in mind. \begin{exa} Suppose $G$ is a hyperbolic group acting on a CAT(0) space $X$, and $g\in G$ is a hyperbolic element, and $\omega_g$ is an ultrafilter containing all the sets $\{g^n:n\geq N_0\}$ for all $N_0\in \mathbb Z$. Then $T^{\omega_g}(\partial_TX)$ consists of two points $g^\infty, g^{-\infty}\in \partial_TX$ where $T^{\omega_g}\xi = g^{\infty}$ for all $\xi\in \partial_TX -\{g^{-\infty}\}$ and $T^{\omega_g}(g^{-\infty})=g^{-\infty}$. \end{exa} Guralnik-Swenson generalize the above example where the two point set $\{g^{\infty}, g^{-\infty}\}$ is replaced by a top dimensional sphere in $\partial_T X$. Indeed, the Tits boundary of a proper hyperbolic space is 0-dimensional and thus the pair $\{g^{\infty}, g^{-\infty}\}$ is a top-dimensional sphere in that boundary. One could say Theorem ~\ref{thm:Folding onto maximal tori} is the higher dimensional version of this example. A \emph{round} sphere in $\partial_TX$ is an isometrically embedded copy of $\mathbb S^d$ where $d = \dim \partial_T X$. \begin{thm}[{\cite[Thm A]{GuralnikSwenson13}}]\label{thm:folding lemma} Suppose $G$ acts geometrically on a CAT(0) space $X$ and let $d$ be the geometric dimension of $\partial_T X$. Then for every $(d+1)$-flat $F_0$ in $X$ there exists an ultrafilter $\omega\in\beta G$ and a possibly different $(d+1)$-flat $F\subseteq X$ such that $T^{\omega}$ maps $\partial_TX$ to $\partial F$ and is an isometry while restricted to $\partial F_0$. \end{thm} We will use a slightly strengthened version of the theorem above in the situation where $G$ contains a subgroup isomorphic to $\mathbb Z^{d+1}$. Our proof follows quite closely the original proof from \cite{GuralnikSwenson13}. \begin{thm}\label{thm:Folding onto maximal tori} Let $G$ be a group acting geometrically on a CAT(0) space $X$ and let $d$ be the geometric dimension of $\partial_T X$. Suppose that $G$ has a subgroup $H\simeq \mathbb Z^{d+1}$. Then there exists an $H$-invariant isometrically embedded $(d+1)$-flat $F$ and $\omega\in\beta G$ such that $T^{\omega}(\partial_TX) =\partial F$ and $T^{\omega}$ is an identity map while restricted to $\partial F$. \end{thm} To prove Theorem~\ref{thm:Folding onto maximal tori} we will need the following notion and lemmas from~\cite{GuralnikSwenson13}. \begin{defn}[{\cite[Def 3.14]{GuralnikSwenson13}}] We say $\omega\in\beta G$ \emph{pulls away} from a point $\xi\in\partial_TX$ if there exists $x\in X$, a ray $\gamma$ with $\gamma(\infty) = \xi$ and $C>0$ such that $A\in S\omega$ for every $A = A_{x,\gamma, M,C} = \{g\in G\mid g\cdot x \in N_C(\gamma([M,\infty]))\}$ where $M\in(0,\infty)$. \end{defn} \begin{lem}[{\cite[Lem 3.19]{GuralnikSwenson13}}]\label{lem:pulling flats} Suppose $S\subseteq \partial_T X$ is a sphere bounding a flat $F$, and let $\ell\subseteq F$ be a line joining points $\xi, \eta$ in $S$. If $\omega$ pulls away from $\xi$ then $T^{\omega}S$ is a sphere bounding a flat isometric to $F$. In particular, $\omega(-\infty) = \xi$, $\omega(\infty) = T^{\omega}(\eta)$, and $d_T(T^{\omega}(\xi), T^{\omega}(\eta)) = \pi$. \end{lem} We say a subset $M\subseteq \partial_TX$ is \emph{$\pi$-convex} if for any $p,q\in M$ such that $d_T(p,q)<\pi$ every geodesic joining $p,q$ is contained in $M$. Let $p,q$ be a pair of points in $\partial_TX$ such that $d_T(p,q) = \pi$. The \emph{suspension} $\Sigma(p,q)$ is the set $\{\xi\in\partial_T X\mid d_T(p,\xi)+d_T(\xi,q) =\pi\}$. The suspension $\Sigma(p,q)$ is closed and $\pi$-convex in $\partial_T X$ \cite[Lem 3.22]{GuralnikSwenson13}. A \emph{suspension point} of a subset $M$ is a point $p\in M$ such that there exists $q\in M$ such that $M$ is the union of all geodesics in $M$ joining $p$ and $q$. \begin{lem}[{\cite[Cor 3.24]{GuralnikSwenson13}}]\label{lem:suspension} Suppose $\omega$ pulls away from $\xi$ and there exists $\eta\in \partial_T X$ such that $d_T(\xi,\eta) = \pi$. Then $T^{\omega}$ maps $\partial_T X$ into the suspension $\Sigma(T^{\omega}(\xi), \omega(\infty))$. \end{lem} We will also need the following corollary of Lemma~\ref{lem:suspension}. \begin{lem}\label{lem:Stabilizing centralizer} Let $a\in G$ be an infinite order element. Let $\omega\in\beta G$ contain all the sets $\{a^n\}_{n\geq N_0}$ for all $N_0$. Then $T^{\omega}(g^{\pm \infty}) = g^{\pm \infty}$ for all $g\in C(a)$ and $T^{\omega}$ maps $\partial_TX$ into $\Sigma(a^{\infty}, a^{-\infty})$. \end{lem} \begin{proof} Let $\omega\in\beta G$ contain all the sets $\{a^n\}_{n\geq N_0}$ for all $N_0$. Let $g\in C(a)$. To show that $T^{\omega}g^{\pm \infty} = g^{\pm \infty}$ we must check that $\omega$ contains the set $\{h\in G\mid h\cdot g^{\pm \infty}\in U\}$ for any neighborhood $U$ of $g^{\pm \infty}$. Note that $a^n\cdot g^{\pm\infty} = g^{\pm\infty}$ since $[a,g] = 1$. Thus for every neighborhood $U$ of $g^{\pm\infty}$ we have $a^n\cdot g^{\pm \infty}\in U$. It follows that $\{h\in G \mid h\cdot g^{\pm\infty}\in U\}\in \omega$ by Condition (2) from the definition of an ultrafilter. By Lemma~\ref{lem:suspension} $T^{\omega}$ maps $\partial_T X$ into $\Sigma(a^{\infty}, a^{-\infty})$ since $T^{\omega}(a^{-\infty}) = a^{-\infty}$ and $\omega(\infty) = a^\infty$. \end{proof} We are now ready to prove Theorem~\ref{thm:Folding onto maximal tori}. \begin{proof}[Proof of Theorem~\ref{thm:Folding onto maximal tori}] Let $\{a_0,\dots, a_d\}\subseteq H$ be a generating set of $H$. By the Flat Torus Theorem (\cite{BridsonHaefliger}, Thm II.7.1), we can choose an $H$-invariant $(d+1)$-flat $F$ on which $H$ acts via a torus action. This implies that for each $h\in H$, $F\subset\textrm{Min}(h)$. Let $\mathbb S = \partial F$. Throughout the proof, $\omega_g$ with $g\in G$ denotes an ultrafilter which contains all the sets $\{g^n\}_{n\geq N_0}$ for $N_0\in\mathbb Z$. Let $i\in \{0, \dots, d\}$. By Lemma~\ref{lem:Stabilizing centralizer} $T^{\omega_{a_i}}$ maps $\partial_T X$ into $\Sigma(a_i^\infty, a_i^{-\infty})$, and $T^{\omega_{a_i}}(h^{\pm\infty}) = h^{\pm\infty}$ for every $h\in H$. In particular, $T^{\omega_{a_i}}$ restricts to identity on $\mathbb S$. Let $\omega =\omega_{a_d}\cdots\omega_{a_0}$. Let $M$ denote the image of $\partial_T X$ under $T^{\omega} = T^{\omega_{a_d}}\cdots T^{\omega_{a_0}}$ (see Lemma~\ref{lem:semigroup structure}). Note that $T^{\omega}$ restricts to identity on $\mathbb S$. In particular, $\mathbb S\subseteq M$. Our goal is to prove $M\subseteq \mathbb S$. Let $i\in\{0,\dots, d\}$. We have $$M = T^{\omega}(\partial_T X)\subseteq T^{\omega_{a_d}\cdots \omega_{a_{i}}}(M)\subseteq T^{\omega_{a_d}\cdots \omega_{a_{i+1}}}(\Sigma(a_i^{\infty}, a_i^{-\infty})).$$ We also have \begin{align*} T^{\omega_{a_d}\cdots\omega_{a_{i+1}}}(\Sigma(a_i^{\infty}, a_i^{-\infty}))\subseteq \Sigma(T^{\omega_{a_d}\cdots\omega_{a_{i+1}}}(a_i^{\infty}),T^{\omega_{a_d}\cdots\omega_{a_{i+1}}}((a_i^{\infty})) =\\ = \Sigma(a_i^{\infty}, a_i^{-\infty}), \end{align*} so we have shown that $M\subseteq \Sigma(a_i^{\infty}, a_i^{-\infty})$ for every $i=0,\dots, d$. Let $Y$ be the intersection of all the suspensions $\Sigma(p,q)$ that contain $M$ as a subspace. The space $Y$ is closed, $\pi$-convex and points $a_i^{\pm\infty}$ for $i=0,\dots d$ belong to the set of its suspension points. Therefore $\mathbb S$ belongs to the set of its suspension points. By \cite[Thm 1.16]{GuralnikSwenson13} $Y = \mathbb S(Y)* E'(Y)$ where $\mathbb S(Y)$ is the set of suspension points of $Y$. Since $\mathbb S\subseteq \mathbb S(Y)$ and since the geometric dimension of $\mathbb S$ is equal to the geometric dimension of $\partial_TX$, the subspace $E'(Y)$ must be empty. Therefore $M\subseteq Y = \mathbb S$ which completes the proof. \end{proof} \begin{cor}\label{cor:folding periodic flat} Let $G$ be a lattice in a product of trees acting freely and vertex-transitively and let $a\in A, b\in B$ commute where $A,B$ are as in Section~\ref{sec:lattices}. Then there exists $\omega\in \beta G$ such that $\partial_T X$ folds onto $\Lambda\langle a,b\rangle\subseteq \partial_T X$. \end{cor} \section{Splitting}\label{sec:splitting} The goal of this section is to prove the following theorem. \begin{thm}\label{thm:join} Let $G$ be a lattice in a product of trees acting freely and vertex-transitively. Suppose $G$ acts geometrically on a CAT(0) space $X$. Then a quasi-dense, closed, convex subspace $X' \subseteq X$ splits as a nontrivial product. In particular, $\bdry X$ and $\partial_T X$ split as nontrivial joins. \end{thm} \begin{remark}\label{remark:CubeComplexSplit} In the special case when $X$ is a cube complex and $X$ is either geodesically complete or the action of $G$ on $X$ is essential, we can use rank rigidity for CAT(0) cube complexes to prove the above theorem. Every element of $G$ bounds a half-plane in $T_1\times T_2$, so $G$ contains no rank one elements. By rank rigidity for CAT(0) cube complexes \cite[Cor B]{CapraceSageev2011}, $X$ is a product of two CAT(0) cube complexes $X_1\times X_2$. Thus $\bdry X = \bdry X_1*\bdry X_2$. \end{remark} As discussed in Section~\ref{sec:lattices}, $G$ admits a group presentation with the two sets of generators $A, B$ and all the relations of the form $aba'b'$ for some $a,a'\in A$ and $b,b'\in B$. \begin{lem}\label{lem:limit set of A} Let $G$ be a lattice in a product of trees acting freely and vertex-transitively and suppose $G$ act geometrically on a CAT(0) space $X$. Then the limit set $\Lambda_A: = \Lambda \langle A\rangle$ is a closed, non-empty, proper $G$-invariant subset of $\partial_\infty X$. \end{lem} \begin{proof} Limit set of every subgroup is a closed subset of $\partial_\infty X$. For any infinite order element $a\in \langle A\rangle$, the points $a^{\pm \infty}$ are accumulation points of the set $\{a^kx_0\}_{k\in\mathbb Z}$, and hence belong to $\Lambda_A$, showing that the limit set is non-empty. Let $b\in \langle B\rangle$ be an infinite order element. We claim that $b^{+\infty}$ is not contained in $\Lambda_A$. If a sequence $\{a_nx_0\}_{n\in \mathbb N}$ accumulates at $b^{+\infty}$, then it must stay within a finite Hausdorff distance from $\{b^nx_0\}_{n\in \mathbb N}$. This implies that in the product of trees $T_1\times T_2$ (viewed as the Cayley complex of $G$) the sets $\{b^n\}_{n\in\mathbb N}$ and $\{a_n\}_{n\in\mathbb N}$ have finite Hausdorff distance, but this is a contradiction, since $d(b^n, A)\geq n$ for every $n\in \mathbb N$. Thus $\Lambda_A$ is a proper subset of $\partial_\infty X$. It remains to prove that $\Lambda_A$ is $G$-invariant. It suffices to verify that $b\Lambda_A = \Lambda_A$ for any generator $b\in B$. By Observation~\ref{obs:pushing b}, $b\langle A\rangle x_0\subseteq \bigcup_{b'\in B^{\pm 1}} \langle A\rangle b'x_0$. It follows that $b\Lambda_A\subseteq \Lambda_A$. Analogous argument shows that $b^{-1}\Lambda_A\subseteq \Lambda_A$, which implies $b\Lambda_A= \Lambda_A$. \end{proof} The following is proven by Ricks in \cite{Ricks2020} although it is not stated explicitly there. We include the proof referring to theorems in \cite{Ricks2020}. \begin{thm}[\cite{Ricks2020}]\label{thm:ricks} Let $G$ be any group acting geometrically on a CAT(0) space $X$ with $1$-dimensional Tits boundary $\partial_T X$ and $|\partial X|\geq 3$. Suppose there exists a closed, non-empty, proper $G$-invariant subset $\Lambda$ of $\partial_\infty X$, and a folded circle $\mathbb S\subseteq \partial_T X$ such that the intersection $\mathbb S\cap \Lambda$ consists of at most two antipodal (with respect to $\mathbb S$) points. Then a quasi-dense, closed, convex subspace $X' \subseteq X$ splits as a nontrivial product. In particular, $\bdry X$ and $\partial_T X$ split as nontrivial spherical joins. \end{thm} \begin{proof} By \cite[Cor 22]{Ricks2020}, radius$^{\partial X}(\Lambda)\le \frac{\pi}{2}$. If the action of $G$ on $X$ has a global fixed point, then by \cite[Lem 26]{PapasogluSwenson09}, $G$ virtually has $\mathbb Z$ as a direct factor. This is a contradiction. By \cite[Corollary B]{Ricks2020}, $X$ contains a quasi-dense, closed, convex subspace $X' \subseteq X$ which splits as a nontrivial product, $X'=X_1\times X_2$ for closed, convex subsets $X_1, X_2$. Since the boundaries of $X'$ and $X$ are set-wise equal, \cite[Ex II.8.11(6) and Cor II.9.11]{BridsonHaefliger} imply that $\bdry X=\bdry X_1\star\bdry X_2$. \end{proof} \begin{proof}[Proof of Theorem~\ref{thm:join}] The boundary $\partial_{\infty}X$ has topological dimension $1$, since the dimension of a visual boundary is a quasi-isometry invariant (see Theorem~\ref{dimension qi invariant}). This implies that the topological dimension of $\partial_T X$, and by \cite{Kleiner99} also the geometric dimension of $\partial_T X$, is at most $1$. By Proposition~\ref{lem:Z2 subgroups}, $G$ contains a $\mathbb Z^2$ subgroup, so there is a circle contained in $\partial_T X$. Therefore the dimension of $\partial_T X$ is $1$ and $\partial_T X$ has at least three points. By Lemma~\ref{lem:limit set of A}, $\Lambda_A$ is a closed, non-empty, proper $G$-invariant subset of $\bdry X$. By Proposition~\ref{lem:Z2 subgroups}, there exists $a\in\langle A\rangle$ and $b\in \langle B\rangle$ such that $[a,b]=1$. By Corollary~\ref{cor:folding periodic flat}, $\mathbb S:=\Lambda\langle a,b\rangle$ is a round, folded circle. Clearly $\mathbb S\cap\Lambda_A = \{a^{+\infty}, a^{-\infty}\}$ which is a pair of antipodal points on $\mathbb S$. Now, the claim follows from Theorem~\ref{thm:ricks}. \end{proof} \section{Analyzing the join factors}\label{sec:from splitting to splitting of cantor sets} Let $G$ be a lattice in a product of trees acting freely and vertex-transitively. In Theorem~\ref{thm:join} we have shown that if $G$ acts geometrically on a $\cat(0)$ space $X$, then $G$ acts minimally on a quasi-dense convex closed subspace $X'\subseteq X$ which splits as a product $X_1\times X_2$ where $X_1, X_2$ are closed convex subsets of $X$ with $0$-dimensional visual boundaries. In particular, $\bdry X$ splits as a nontrivial join of the form $\bdry X_1\star\bdry X_2$. In this section, we complete the proof of the main theorem by proving that $\bdry X_i$ are both Cantor sets. For completeness, we point out the three possibilities that can occur when $\bdry X$ is the join of 0-dimensional subspaces. \begin{prop}\label{prop:1-dimensional join} Let $G$ be any group acting geometrically on a $\cat(0)$ space $X$ with topological dimension of $\bdry X=1$ and $\bdry X=\bdry X_1\star\bdry X_2$ for closed convex subspaces $X_1, X_2$ in $X$. Then exactly one of the following holds: \begin{enumerate} \item $|\partial X_i|=2$ for $i=1,2$. In this case, $\bdry X$ is homeomorphic to a circle and $G$ is either virtually abelian or Fuchsian. \item $|\partial X_1|=2$ and $|\partial X_2|\ge 3$ (or vice versa). In this case $\bdry X$ is homeomorphic to the suspension of a Cantor set and $G$ is virtually $F\times\mathbb Z$ where $F$ is finitely generated and free. \item $|\partial X_i|\ge 3$ for both $i=1,2$. In this case, $\bdry X=\mathcal C\star\mathcal C$, the join of two Cantor sets. Each of the subspaces $X_i$ is quasi-isometric to a simplicial tree. \begin{com} We can add 'finite valence bushy tree' and the conclusion about being a lattice, when we figure out how to prove it. \Ann{I think, we can prove this using mentality of the action. I will add the proof at the bottom} \end{com} \end{enumerate} \end{prop} The first two cases follow directly from \cite{Ruane2006}. The statements in that paper assume geodesic completeness on $X$, however one can pass to a quasi-dense subset and the conclusions about the boundary and the groups still hold. The remainder of this section is devoted to proving that the third case is the only remaining case and that for our groups $G$, we are in that case. The subtlety involved here is that when the group $G$ is \emph{not} (virtually) a product of free groups, we do not have geometric group actions on $X_i$. \begin{lem}\label{lem:boundary=space of ends} Suppose $G$ acts geometrically on a $\cat(0)$ space $X$ with topological dimension of $\bdry X=1$ and $\bdry X=\bdry X_1\star\bdry X_2$ for closed convex subspaces $X_1, X_2$ in $X$. Then the boundary $\partial_{\infty} X_i$ is homeomorphic to $\textrm{Ends}(X_i)$, the ends space of $X_i$. \end{lem} \begin{proof} Let us first show that each $X_i$ is hyperbolic. Note that since $X$ is proper, so are $X_1$ and $X_2$. First, we show that the subspace $X_i$ for $i=1.2$ is a \emph{visibility space} i.e. given any two distinct points $\xi, \eta$ in $\bdry X_i$, there is a geodesic line in $X_i$ between them. Suppose there is no geodesic line in $X_i$ between $\xi$ and $\eta$. Then by \cite[Prop. II.9.21(2)]{BridsonHaefliger}, there is a geodesic segment in $\partial_T X_i$ joining them. This segment is an arc in $\partial_T X_i$ which would map to an arc in $\bdry X_i$ via the identity map on $\partial X$. This contradicts the fact that $\bdry X_i$ is 0-dimensional. Moreover, the action of $G$ on $X_i$ is cocompact, since so is the action of $G$ on $X$. Hence, $X_i$ is uniformly visible by \cite[Prop II.9.32]{BridsonHaefliger}. Finally, $X_i$ is hyperbolic by \cite[Prop III.1.4]{BridsonHaefliger}. Since $X_i$ is a proper hyperbolic space, the natural map $\bdry X_i\to \textrm{Ends}(X_i)$ is continuous and the fibers of that map are the connected components of $\partial X_i$ \cite[Exer III.H.3.9]{BridsonHaefliger}. Since $\bdry X_i$ is $0$-dimensional, the connected components are single points. Thus the map $\bdry X_i\to \textrm{Ends}(X_i)$ is a continuous bijection. Every continuous bijection from a compact space to a Hausdorff space is a homeomorphism. \end{proof} In \cite[Def 1.1]{Bestvina96}, Bestvina outlined a set of axioms that a group boundary should have in order to be useful for relating homological invariants of the boundary to cohomological invariants of the group. All of the axioms hold true for a hyperbolic group $G$ acting on $G\cup\bdry G$ and for a $\cat(0)$ group $G$ acting on $X\cup\bdry X$ where $G$ admits a geometric action on the $\cat(0)$ space $X$. One of the axioms requires the collection of translates of any compact set to form a null set in $X\cup\bdry X$ - i.e. for any open cover $\mathcal U$ of $X\cup\bdry X$ and any compact set $K$ in $X$, all but finitely many $G$-translates of $K$ are contained in an element of $\mathcal U$. The next lemma shows that each $X_i\cup\bdry X_i$ inherits this nullity condition on compact sets from $X\cup\bdry X$ even though we have no geometric group action on $X_i$. \begin{lem}\label{lem:Zset property} Suppose $G$ acts geometrically on a $\cat(0)$ space $X$ with $\bdry X=\bdry X_1\star\bdry X_2$ for closed convex subspaces $X_1, X_2$ in $X$. For every compact set $K\subseteq X_i$ and every open neighborhood of an end of $X_i$, there exists $g\in G$ such that $gK\subseteq U$. \end{lem} \begin{proof} We show that the lemma holds for $X_1$. The argument for $X_2$ is identical. Let $K\subseteq X_1$ and $K'\subseteq X_2$ be compact sets. Then $K\times K'$ is a compact set in $X$. By Lemma~\ref{lem:boundary=space of ends}, $\bdry X_1$ is homeomorphic to $\textrm{Ends}(X_1)$. Let $\xi\in\bdry X_1$, and let $U$ be an open neighborhood of $\xi$. Then $U\times X_2$ is an open neighborhood of $\xi$, viewed as a point in $\bdry X= \bdry X_1* \bdry X_2$. Since the action of $G$ on $X$ is geometric, there exists $g\in G$ such that $g(K\times K')\subseteq U\times X_2$ (see e.g.\ \cite[p.124]{Bestvina96}). It follows that in the action of $G$ on $X_1$, we have $gK\subseteq U$. \end{proof} The following is not stated explicitly, but it is proved in \cite{Hopf44}. It is also proved in a similar form in \cite{KronNotes}. We include the proof for completeness. We restrict our attention to the case of geodesic metric spaces, but the proposition holds in more general setting. \begin{prop}[\cite{Hopf44}]\label{prop:Hopf} Let $Y$ be a geodesic metric space with at least three ends. Let $G$ be a group acting on $Y$ cocompactly so that the following holds: for every compact set $K\subseteq Y$, and every open neighborhood $U$ of an end of $Y$, there exists $g\in G$ such that $gK\subseteq U$. Then the space of ends $\textrm{Ends}(Y)$ is perfect. \end{prop} \begin{proof} Suppose that there exists an end $e\in \textrm{Ends}(Y)$ that is isolated, i.e.\ there exists a neighborhood $U$ of $e$ that does not contain any other ends. First we show that without loss of generality, we can assume that $Y-U$ is connected. Indeed, if $Y-U$ is not connected, we construct a neighborhood $U'\subseteq U$ of $e$ such that $Y-U'$ is connected. Since $\widehat Y$ is compact, so is $\widehat Y-U$. Let $V_1, \dots, V_n$ be a finite collection of open sets covering $\widehat Y-U$ such that each $V_i$ is connected and does not contain $e$, and its closure $\widehat V_i$ in $\widehat Y$ is compact. The union $\bigcup_{i=1^n}V_i$ has finitely many components, and since $\textrm{Ends}(Y)$ is nowhere dense in $\widehat Y$, each $V_i$ contains points of $Y$. Each two points in $Y$ can be joined by a path in $Y$. In particular, there exists a closed connected set $Q$ which is the union of $\bigcup_{i=1^n}V_i$ and a finite number of paths in $Y$. Note that $Q$ does not contain $e$. The set $U' = \widehat Y-Q$ is an open neighborhood of $e$ and since $Y-U\subseteq \bigcup V_i\subseteq Q$, we have $U'\subseteq U$. Thus, $U'$ is the neighborhood we were looking for. By assumption, there are at least three distinct ends $e_1, e_2, e_3$ in $Y$. Let $K$ be a compact set in $Y$ such that each of the ends $e_1, e_2, e_3$ lies in a different connected component $Y_1, Y_2, Y_3$ of $Y-K$. By assumption, there exists an element $g\in G$ such that $gK\subseteq U$. We claim that for each $i=1,2,3$, either $gY_i\subseteq U$, or $g(Y-Y_i)\subseteq U$. Indeed, otherwise there exists point $p\in gY_i-U$ and $q\in g(Y-Y_i)-U$. Since $Y-U$ is connected, there exists a path $\gamma$ in $Y-U$ joining $p$ and $q$. Note that $p,q$ lie in distinct connected component of $Y-gK$, so $\gamma$ has to pass through $gK$. This is a contradiction, since $gK\subseteq U$. Since $U$ contains only one end, we have $g(Y-Y_i)\subseteq U$ for at least two $i$'s among $1,2,3$, say $1$ and $2$. It follows that $Y-U\subseteq gY_i$ for $i=1,2$. The subsets $Y_1$ and $Y_2$ are disjoint, and so are $gY_1$ and $gY_2$. This is a contradiction and therefore the space of $\textrm{Ends}(Y)$ has no isolated points. \end{proof} \begin{lem}\label{lem:boundary Cantor set} Suppose $G$ acts geometrically on a $\cat(0)$ space $X$ with dimension of $\bdry X=1$ and $\bdry X=\bdry X_1\star\bdry X_2$ for closed convex subspaces $X_1, X_2$ in $X$. If $|\partial X_i|\geq 3$, then $\partial X_i$ is homeomorphic to the Cantor set $\mathcal C$. \end{lem} \begin{proof} Since $X_i$ is a proper CAT(0) space, the boundary $\partial X_i$ is compact and metrizable \cite{BridsonHaefliger}. As $\dim \bdry X_i =0$, the boundary $\bdry X_i$ is totally disconnected. The action of $G$ on $X_i$ is cocompact, since so is the action of $G$ on $X$. By Lemma~\ref{lem:Zset property}, for every compact set $K\subseteq X_i$ and every open neighborhood $U\subseteq X_i$ of an end of $X_i$, there exists $g\in G$ such that $gK\subseteq U$. By Proposition~\ref{prop:Hopf}, $\textrm{Ends}(X_i)$ is a perfect space. This implies that $\bdry X_i$ is a perfect space because $\textrm{Ends}(X_i) = \bdry X_i$ by Lemma~\ref{lem:boundary=space of ends}. By the characterization of the Cantor set, as a non-empty, perfect, totally disconnected, compact metrizable space, we conclude that $\partial X_i$ is the Cantor set. \end{proof} \begin{proof}[Proof of Proposition~\ref{prop:1-dimensional join}] Since $\bdry X$ has dimension 1, both $\partial X_1$ and $\partial X_2$ are non-empty. Now suppose that $|\partial X_1|=1$. Note that an $\mathbb S^1$ in $\bdry X$ would have to have two points in each of $\partial X_1,\partial X_2$. Thus if $|\partial X_1|=1$, then $\bdry X$ does not contain any copies of $\mathbb S^1$. By \cite[Thm III.1.5]{BridsonHaefliger} $G$ must be hyperbolic and $\bdry X$ is $G$-equivariantly homeomorphic to the Gromov boundary of $G$. Since $\bdry X=\bdry X_1\star\bdry X_2$ with each factor non-empty, $\bdry X$ contains an interval and thus $G$ must be non-elementary. We note that the unique point $\xi$ in $\partial X_1$ is topologically distinguishable, unless $\partial X_2$ also has one point. In either case, $G$ or a subgroup of index $2$ of $G$ must fix $\xi$. This contradicts the convergence group action of $G$ on its boundary. Thus each of $\partial X_1,\partial X_2$ has at least two points. If $|\partial X_1|=|\partial X_2| =2$, then clearly $\bdry X\simeq S^1$ and by \cite[Thm 3.5]{Ruane2006} $G$ is either virtually abelian or Fuchsian. We note that the proof of that result follows without assuming geodesic completeness after passing to a closed, convex, quasi-dense subset of $X$. Now assume $|\partial X_1|= 2$ and $|\partial X_2|\geq 3$. By Lemma~\ref{lem:boundary Cantor set}, $\bdry X_2$ is homeomorphic to a Cantor set $\mathcal C$. Hence $\bdry X$ is a suspension of a Cantor set. By \cite[Thm 4.4]{Ruane2006} $G$ is virtually $F\times \mathbb Z$ where $F$ is a finitely generated free group. Finally, suppose that $|\partial X_i|\geq 3$ for $i=1,2$. By Lemma~\ref{lem:boundary Cantor set}, $\bdry X_i$ is homeomorphic to a Cantor set $\mathcal C$. Consequently, $\bdry X$ is homeomorphic to join of two copies of a Cantor set. We now show that $X_i$ is quasi-isometric to a tree, following \cite{Chao15}. By \cite[Lem 5.7]{Chao15}, $X_i$ has the bottleneck property, \begin{com} What are the assumption of that lemma? They are not stated there. \Ann{In the proof, geodesically completeness is not used, so we can apply it here, I think.} \end{com} and by \cite[Thm 4.6]{Mannning05} $X_i$ is quasi-isometric to a simplicial tree $T_i$. \begin{com} Can we show that $T_i$ is a finite valence bushy tree?\end{com} \end{proof} \begin{prop}\label{prop:factors are cantor sets} Let $G$ be a lattice in a product of trees acting freely and vertex-transitively. Suppose $G$ acts geometrically on a CAT(0) space $X$ where $\bdry X = \bdry X_1\star \bdry X_2$ for non-empty, closed, convex subspaces $X_1, X_2$ in $X$. Then each $\bdry X_1, \bdry X_2$ is homeomorphic to the Cantor set and each subspace $X_i$ is quasi-isometric to a tree. \end{prop} \begin{proof} By Lemma~\ref{lem:Z2 subgroups}, $G$ contains a $\mathbb Z^2$ subgroup. By the Flat Torus theorem there is a flat $F$ embedded in $X$ as a convex subspace. Thus, $\bdry F\simeq \mathbb S^1$ embeds in $\bdry X$. In particular, both $|\partial X_1|, |\partial X_2|\geq 2$. Since $G$ is neither virtually abelian, $F\times\mathbb Z$ or Fuchsian, by Proposition~\ref{prop:1-dimensional join} we conclude that $\bdry X\simeq \mathcal C\star \mathcal C$ and each of the factors $X_i$ is quasi-isometric to a tree. \end{proof} \bibliographystyle{alpha}
\section{Introduction} Robotic applications are typically built considering specific systems in mind. For example, popular motion planning methods (e.g., artificial potential field \cite{potential_field}, A* \cite{A_star_alg}, probabilistic techniques \cite{prob_technique}) and control methods (e.g., MPC, PID \cite{control_citation}) require fine tuning and knowledge about system model dynamics in order to be fully leveraged and obtain a desired performance on a selected platform. We also note that most technologies are developed through simulations which offer a practical and inexpensive mean to create and test the limits and performance of designed algorithms. Researchers usually spend considerable time and resources to create techniques for specific robotic systems and to adapt them on new systems, as well as to compensate for the simulation-reality gap during deployments on actual vehicles. Finally, even when a new technique is developed and deployed on a specific robot, it can still need to be adjusted or adapted over time due to mechanical aging, disturbances, and even failures that deprecate and modify the system's original model. In this paper we seek a general framework to transfer and adapt system's performance. As mentioned above the goal of the proposed work is to: \begin{itemize} \item Reduce the sim-to-real gap allowing a developer to quickly transfer motion planning and control methods onto a real platform. \item Transfer knowledge designed for a specific robot onto a different robot. \item Compensate for system deterioration/failures by learning quickly the limits and the proper input mapping to continue an operation. \end{itemize} All of the aforementioned problems can be simplified and cast as a {\em teacher} transferring knowledge to a {\em learner}. \begin{figure}[ht!] \centering \includegraphics[width=0.98\columnwidth]{Figs/introFigure_compressed.png} \vspace{-8pt} \caption{Pictorial representation of the proposed work in which motion planning and control policies are transferred from a teacher simulated vehicle to two vehicles to create the same behavior designed in simulation.} \vspace{-18pt} \label{fig:INTRO} \end{figure} Specifically, to address these problems, in this work we propose a novel method that leverages a variant of Schwarz–Christoffel mapping (SCM) \cite{driscoll2002schwarz} -- a conformal transformation of a simple poly area onto the interior of a rectangle -- to transfer a teacher vehicle's control input sequence to a learner vehicle, as depicted in Fig.~\ref{fig:INTRO}. Our proposed method allows the teacher to understand the learner limitations, so that the transferred control input is compatible with the learner capabilities. Finally, once these limitations are extracted, we propose a mechanism to adapt also the teacher motion planning scheme to create paths compatible with the learner constraints. To deal with this problem, our scheme leverages an optimized finite horizon primitive motion generation. The main contributions of this work are twofold: 1) a light-weight transfer framework that leverages SCM theory to directly transfers the control input from teacher to learner so that the learner can leverage the teacher's control policy while its own dynamics remain unknown; and 2) a method for adapting the source system's control and path planning policy to the learner. The method constrains the output of the source system's controller and of the path planner so that the transferred motion plan and control input is guaranteed to be compatible with the target system's dynamics. The rest of the paper is organized as follows: in Section~\ref{sec:relatedWork} we summarize the state-of-the-art approaches for solving sim-to-real problems in the current literature. We formally define the problem in Section~\ref{sec:problemFormulation} while the details of our SCM-based transfer learning framework are presented in Section~\ref{sec:methodology}. The proposed framework is validated with extensive simulations in Section~\ref{sec:simulation} and experiments on real robots in Section~\ref{sec:experiments}. At last, we draw conclusions in Section~\ref{sec:conclusion}. \section{Related Work} \label{sec:relatedWork} Transfer learning has been one of the most popular topics in robotics, especially since machine learning techniques have become widely exploited. The idea behind transfer learning is to migrate the knowledge between similar problems to boost the training process \cite{james2019sim}, take advantage of existing knowledge \cite{devin2017learning}, and reduce the risk of training \cite{fremont2020formal,zhang2020cautious}. Although machine learning approaches have been massively explored, we cannot ignore that they typically require a large amount of data and a lot of effort in training the model. The problem of transferring from the simulation to the real world, also known as sim-to-real problem, has gained rising attention recently. The gap between the simulation and the real system exists mainly because either the model is not accurate or the environment factors do not appear in the simulation. The modeling gap can be closed by retraining the pre-trained model in real world \cite{peng2018sim}. Dynamics randomization is another popular solution which aims to cover reality with augmented simulation scenarios \cite{peng2018sim} \cite{tan2018sim}. Other approaches include reducing the costly errors by predicting the blind spots in real environments \cite{ramakrishnan2020blind} and inflating safety critical regions to reduce the chance of collision \cite{ghosh2019new}. Learning from demonstration is another sub-field of transfer learning in which reinforcement learning is usually getting involved. These types of works typically learn the policy from teacher's examples by approximating the state-action mapping \cite{branavan2009reinforcement}, or by learning the system model \cite{model_learning}. Most of these problems turn into an optimization problem on tuning parameters. Although fewer training demos are desired, it can still take a large amount of data to address the problem. Thus, both the acquisition of data and the tuning process can be challenging when dealing with these types of problems. To the best of our knowledge, the SCM method proposed in this paper is rarely used in the robotics field. In \cite{notomista2018coverage}, the SCM is leveraged to map the planar motion to the continuous linear motion to solve a coverage control problem for wire-traversing robots. Comparing to the existing works, this paper proposes a light-weight transfer learning framework which does not rely on massive data collection. It is also the first work that exploits the conformal mapping method to directly transferring control inputs between two systems. \section{Problem Formulation} \label{sec:problemFormulation} \vspace{-2pt} The problem behind this work can be cast as a teacher transferring knowledge to a learner vehicle. We assume that the teacher has more capabilities than the learner, meaning that it can achieve all the learner's maneuver but not vice versa. This assumption is suitable for our problem since we are primarily interested in transferring knowledge into a vehicle with degraded capabilities, and as it is easier to create a virtual simulated vehicle with more capabilities than a real vehicle in sim-to-real problems. The learner's dynamics are assumed a black-box model with only access to the inputs and output. The goal is to transition the behavior and control knowledge of the teacher into the learner including adapting the teacher motion planning framework to consider the limitations of the learner. Formally we can define two problems: \vspace{-3pt} \begin{problem}\label{problem1}{\bf{\emph{Teacher-Learner Control Transfer:}}} Given a teacher robot with dynamics ${\bm{x_T}(t+1)}{=}f_T(\bm{x_T}(t),\bm{u_T}(t))$ and control law $\bm{u_{T}}{=}g(\bm{x})$, where $\bm{x}$ is the state vector and $\bm{u}$ is the control input, find a policy to map $\bm{u_{T}}$ to a learner input $\bm{u_{L}}$ such that $\bm{x_{L}}(t+1){=}f_L(\bm{x_L}(t),\bm{u_L}(t)){=}\bm{x_{T}}(t+1)$, with $f_L$ unknown. \end{problem} \vspace{-7pt} \begin{problem}\label{problem2}{\bf{\emph{Teacher-Learner Motion Planning Adaptation:}}} Consider a task to navigate from an initial location to a final goal $G$. Assume that the learner's input space $\bm{u_L}\in[{\bm{u_L}}_{min}, {\bm{u_L}}_{max}] \subset [{\bm{u_T}}_{min}, {\bm{u_T}}_{max}]$. Design a motion planning policy $\bm{\pi_{T}}^{L}$ for the teacher that considers the limitations of the learner and such that the computed desired trajectory $\tau$ can be tracked by the learner, i.e., such that $|\bm{x}_L-\bm{x}_{\tau}|\leq \epsilon$ where $\epsilon$ is a maximum allowable deviation threshold. \end{problem} \vspace{-3pt} \section{Methodology} \label{sec:methodology} \vspace{-1pt} Problem \ref{problem1} is solved by leveraging SCM to comformally map between the teacher's and the learner's command domains. Problem \ref{problem2} is addressed by constraining the teacher's control and planning policy in accordance with the learner's limitation. The block diagram in Fig.~\ref{fig:fullProcessDiagram} shows the architecture of the whole process. The remainder of this section describes the details of the components of the proposed approach. \begin{figure}[h \vspace{-10pt} \centering \includegraphics[width=.85\columnwidth]{Figs/dia_shijie.png} \vspace{-4pt} \caption{The architecture of the proposed transfer learning process.} \label{fig:fullProcessDiagram} \end{figure} \vspace{-10pt} \subsection{SCM-based Command Transferring} \label{sec:SCMapping} As we treat the dynamics of the learner as a black box, it is impossible to build a one-to-one command mapping without running inputs on the learner. In our work, we propose to use a limited number of teacher commands to characterize the learner's dynamics and then use SCM to find the mapping function between the region on the teacher's command domain and the corresponding region on the learner's side. We use command pairs to characterize the learner's dynamics. The command pair $\bm{u_{p}}{=}\langle\bm{u_T}, \bm{u_L}\rangle$ is a pair of commands which makes the two vehicles produce the same motion (i.e., reach the same pose, speed). Since the dynamics of the teacher are known, by observing the states of the learner before and after executing $\bm{u_L}$, the equivalent teacher's command $\bm{u_T}$ can be retrieved. A group of these command pairs can capture the dynamics of the learner on the teacher command domain. At each control step, the learner uses the teacher's control policy to generate a control input which is the teacher's desired command as if the learner was the teacher. Given a desired teacher's command and several command pairs around it, the region whose vertices are from the command pairs and contains the desired command can be chosen on the teacher side. The corresponding region on the learner command domain is decided automatically by the learner's commands that come from the same command pairs as the teacher's vertices. An example is shown in Fig.~\ref{fig:Calibration}. \begin{figure}[h!] \vspace{1pt} \centering \includegraphics[width=.7\columnwidth]{Figs/method_calibratio.png} \vspace{-18pt} \caption{SCM maps the two polygon regions which are constructed by the command pairs around the desired command (red cross on the left).} \label{fig:Calibration} \vspace{-15pt} \end{figure} Once the regions of interest are determined on both teacher's and learner's command space, the transfer problem becomes a problem of finding the mapping function that transfers from an irregular polygon on the teacher's domain to the other polygon on the learner's domain. To solve this problem, first we use SCM to map the two polygons on each side of the command domain onto two rectangles with unique aspect ratios, which are decided by the shape of the mapping area. The reason why we map the two regions onto two different rectangles will appear as we walk through the mapping procedure. Then, we use a unit square to bridge the two rectangles so a teacher command can be mapped to the learner's domain. Fig.~\ref{fig:mappingFlow} shows the mapping flow. \vspace{-5pt} \begin{figure}[h] \centering \includegraphics[width=.9\columnwidth]{Figs/mapflow.png} \vspace{-10pt} \caption{The mapping flow of transferring the desired teacher command to the learner. A unit square is used as an intermediate plane to bridge between rectangle mapping of the two polygons.} \label{fig:mappingFlow} \end{figure} \vspace{-7pt} Based on the user's preference, multiple command pairs can be selected to build the mapping areas $\Gamma$. For any of these irregular polygons, we can specify four of the vertices in the counterclockwise order to map to the rectangle's corners. These four vertices make $\Gamma$ a generalized quadrilateral. Fig.~\ref{fig:StripMapping} shows an example of this process, where we put the polygon from the teacher command domain onto the extended complex plane. \vspace{-10pt} \begin{figure}[h] \centering \includegraphics[width=.9\columnwidth]{Figs/StripMapping.png} \vspace{-10pt} \caption{The flow of conformal mapping that maps the polygon to the rectangle while using the bi-infinite strip as the intermediate plane.} \label{fig:StripMapping} \end{figure} \vspace{-5pt} As shown in Fig.~\ref{fig:StripMapping}, the vertices of the polygon $w_1, ..., w_N$, $(N{\geq} 4)$ are ordered in counterclockwise and the interior angles $\alpha_1\pi, ..., \alpha_n\pi$ at each of the vertex $w_N$ is defined as the angle that sweeps from the outgoing edge to the incoming edge. The conformal mapping from the polygon $\Gamma$ to the rectangle $\mathbb{Q}$ needs to borrow a bi-infinite strip $\mathbb{S}$ as an intermediate plane. The SCM function that maps the points on the boundary of the strip $\mathbb{S}$ to the vertices of the polygon is given by: \vspace{-10pt} \begin{equation} \label{eql:strip2polygon} w = f_{\mathbb{S}}^{\Gamma}(z) = A\int_{0}^{z}\prod_{j=0}^{N} f_{j}(z)dz +C \vspace{-5pt} \end{equation} where $A$ and $C$ are complex constants that rotate, translate and scale the polygon and are determined by its shape and location. Each factor $f_j$ sends a point on the boundary of the strip to a corner of the polygon while preserving its interior angles. The factor $f_j$ is a piecewise function which is defined by: \vspace{-10pt} \begin{numcases}{f_j(z) {=}} \label{eql:FunctionFactors} e^{\frac{1}{2}(\theta_+ - \theta_-)z} & $j {=} 0$, \nonumber \\ \{-i \cdot \sinh[{\textstyle\frac{\pi}{2}}(z - z_j)]\}^{\alpha_j} & $1\leq j \leq M$,\\ \{-i \cdot \sinh[-{\textstyle\frac{\pi}{2}}(z - z_j)]\}^{\alpha_j} & $M+1\leq j \leq N$, \nonumber \end{numcases} where $M$ is the number points on the bottom side of the strip. $\theta_+$ and $\theta_-$ denote the desired divergence angles at $+\infty$ and $-\infty$, which are $\theta_+ {=} \theta_- {=} \pi$ in our case. By leveraging the Jacobi elliptic of the first kind \cite{Byrd1971Handbook}, the SCM mapping $f_{\mathbb{Q}}^{\mathbb{S}}$ from the rectangle $\mathbb{Q}$ to the bi-infinite strip $\mathbb{S}$ can be defined by: \vspace{-4pt} \begin{equation} \label{eql:Jacobielliptic} z = f_{\mathbb{Q}}^{\mathbb{S}}(q) = \frac{1}{\pi}\cdot \ln(\sin(q|m)) \vspace{-3pt} \end{equation} where $q$ is the point on regular rectangle and $m$ is the modulus of the Jacobi elliptic that is decided by $q$. The details of this conformal mapping can be found in \cite{driscoll2002schwarz}. With Eqs. \eqref{eql:strip2polygon} and \eqref{eql:Jacobielliptic}, a mapping function from the generalized quadrilateral can be obtained. In order to explicitly solve \eqref{eql:strip2polygon}, there are three parameters $z_k$ that must be specified. For ease of computation, for example, we can fix $z_1 = 0$, $z_2 = L$, $z_{N-1} = i$, and $z_{N-2} = L+i$. The parameter $L$ here is linked to the conformal modulus $m$. While the angles of the polygon are computed with \eqref{eql:strip2polygon} and \eqref{eql:FunctionFactors}, we need to find where the pre-vertices lie on the boundary of the strip to keep the length for each edge of polygon. This problem is known as the parameter problem in SCM \cite{driscoll2002schwarz}. Since we already fix $z_{1} = 0$, in \eqref{eql:strip2polygon} the translation parameter is set to be $C = 0$. Hence, solving \eqref{eql:strip2polygon} is equal to solving: \vspace{-8pt} \begin{equation} \label{eql:strip2polygon_simplified} w_k = A\int_{}^{z_k}\prod_{j=0}^{N} f_{j}(z)dz, \quad k = 1,2,3,\dots,N \vspace{-4pt} \end{equation} In \eqref{eql:strip2polygon_simplified}, the scalar $A$ can be eliminated by the ratio of the adjacent sides length of the polygon: \begin{equation} \label{eql:ratio} \frac{w_{k+1}-w_k}{w_2-w_1} {=} \frac{\int_{z_k}^{z_{k+1}}\prod_{j=0}^{N} f_{j}(z)dz}{\int_{z_1}^{z_2}\prod_{j=0}^{N} f_{j}(z)dz}, \: k {=} 2,3,\dots,N-2 \vspace{-5pt} \end{equation} Let \vspace{-5pt} \begin{equation} I_k = \Big| \int_{z_k}^{z_{k+1}}\prod_{j=0}^{N} f_{j}(z)dz \Big|, \quad k = 1,2,\dots,N-2 \vspace{-3pt} \end{equation} Then \eqref{eql:ratio} can be rewritten as: \vspace{-2pt} \begin{equation} \label{eql:final} I_k = I_1 \cdot \frac{w_{k+1}-w_k}{w_2-w_1}, \quad k = 2,3,\dots, N-1 \vspace{-3pt} \end{equation} To this end, \eqref{eql:final} leaves us $N-3$ conditions and the unknown parameters of \eqref{eql:strip2polygon_simplified} are $z_k\, (k = 1,2,\dots,N-3)$ which is exactly the number of the side length conditions given by \eqref{eql:final} . We can get the complex constant $A$ by: \begin{equation} A = \frac{w_2-w_1}{\int_{z_1}^{z_2}\prod_{j=0}^{N} f_{j}(z)dz}. \vspace{-1pt} \end{equation} As we get the conformal mapping function $f_{\mathbb{S}}^{\Gamma}$ from the strip to the generalized quadrilateral, we can compute $ L = z_2- z_1 = {f_{\mathbb{S}}^{\Gamma}}^{-1}(w_2) - 0$. Considering \eqref{eql:Jacobielliptic} which maps the rectangle to the strip, the SCM function that maps the interior and the boundary of the generalized quadrilateral to the rectangle with an unique aspect ratio can be obtained by: \begin{equation} \vspace{-2pt} q = f_{SCM}(w) = {f_{\mathbb{Q}}^{\mathbb{S}}}^{-1}({f_{\mathbb{S}}^{\Gamma}}^{-1}(w)). \end{equation} As the shape of the rectangle $\mathbb{Q}$ depends on the parameter $L$, the aspect ratio of the rectangle is determined after $L$ is computed. This explains why we map the two polygons from teacher and the learner command domains to two different rectangles. Since the dynamics of the teacher and learner are different, the shape of the polygons from the teacher and the learner cannot be identical, and neither are the mapped rectangles. A unit square is borrowed to bridge between the two mapped rectangles resulting in a complete mapping process from teacher to the learner, such that any teacher command that falls in the teacher's mapping area is connected to an image on the learner side. There are a few points that are worth mentioning: 1) Although we use rectangle SCM and the number of the vertices for a polygon is at least 4 ($N \geq 4$), this mapping-based transferring framework still works for the triangle areas ($N =3$) by leveraging a disk SCM function or an upper half-plane SCM function. 2) If the distance between the desired command and the existed closest command pair is smaller than a threshold $ \psi $, it means that the desired motion is very similar to the motion produced by the closest pair. In this case, it is reasonable to skip the mapping procedure and directly use the learner's command from the closest pair. 3) If the command pairs that are used for constructing the mapping polygon are too far from the desired command, some local geometric features between the two domains may not be well captured during mapping. Thus, the number as well as the distribution of the command pairs can affect the mapping performance. More command pairs that cover the learner's command domain well are preferred. \subsection{Primitive Path Planning} As the vehicle learns the mapping function, it is also important to know the limitations of the learner so that the teacher's policy can generate the command to plan the motions that are compatible with the learner. This means that we want to find where the command boundary of the learner lies within the teacher command domain. This can be achieved by getting the command pair $\bm{u_p} {=} \langle\bm{u_{T}}(t), \bm{u_{L}}(t)\rangle $ when $\bm{u_{L}}(t) {=}{\bm{u_{L}}}_{max}$. As shown in Fig.~\ref{fig:Calibration}, the teacher's control inputs from these command pairs can build a multi-dimensional convex hull that separates the interior of the convex hull from the rest of the command area. From the teacher's perspective, the boundary of the convex hull indicates the limitations of the learner. Any of teacher's commands from the interior of the convex hull can be matched with the learner's command, enabling the two vehicles to produce the similar motion with their own commands. However, as it is pointed out at the end of Section \ref{sec:SCMapping}, to obtain better mapping performance, it is recommended to consider additional command pairs inside of the polygon. We use a trajectory tracking case study to validate our approach. The teacher uses a search-based path planning method to compose a sequence of motion primitives that allows it to drive along the desired path $P$ within a certain bounds. The teacher's input sequence associated to these primitives will be the desired commands for mapping. A motion primitive results from feeding a known sequence of control inputs to the vehicle. To build one primitive $p {=} [ {\bm{x_T}}_1,{\bm{x_T}}_2,\dots,{\bm{x_T}}_t ]$, we feed the teacher a sequence of the same control input for a certain amount of time and record its state sequence. Following the same procedure, a library of primitives can be built with different teacher's command. In Fig.~\ref{fig:PrimitivePathPlanning}, we show 5 different motion primitives that resulted from 5 different teacher's commands. The one-to-one primitives and the corresponding commands are color coded. The command pairs are shown as the gray points and the white region indicates the capability of the learner. \vspace{-7pt} \begin{figure}[ht!] \centering \includegraphics[width=.85\columnwidth]{Figs/primitivePathPlanning.png} \vspace{-8pt} \caption{The teacher commands and the corresponding motion primitives are shown on the left while a path planning scenario is shown on the right.} \vspace{-7pt} \label{fig:PrimitivePathPlanning} \end{figure} We want to point out that: 1) To better adapt to the capability of the learner, only the command which falls inside of the convex hull should be considered. 2) The learner can leverage the teacher's motion planner as soon as the convex hull is built. 3) The convex hull does not need to capture the entire command domain of the learner, it just provides a boundary that make sure the learner is operating within the known capability. As the path planner searches primitives from the library to use, it evaluates the difference between each of the primitive and the corresponding segment on the desired path. As shown in \eqref{eql:differencePrimitivePathPlanning} and in Fig.~\ref{fig:PrimitivePathPlanning}, the difference is measured by considering both the dynamic time warping (DTW) distance $e_{d}$ and the heading difference $e_{\theta}$ at the end of the primitive: \begin{equation} \begin{split} \delta_i&= k_d \cdot e_{d} + k_{\theta} \cdot e_{\theta} \\ &= k_d \cdot DTW(P, p_i) + k_\theta \cdot | (\theta_{P} - \theta_{p_i})|,\\ p_{i}^* &= \min_{p_1, ..., p_i} \delta_i. \\ \end{split} \label{eql:differencePrimitivePathPlanning} \vspace{-2pt} \end{equation} The two types of differences are weighted by two user-defined gains ($k_d {\geq} 0$, $k_\theta {\geq} 0$). A large $k_d$ will force the vehicle to remain close to the trajectory while a large $k_t$ will give the primitives that are parallel to the trajectory a better chance to be chosen. Using this metrics, the planner searches through all the primitives in the library and selects the one with the least difference as the optimal local path plan $p_i^{*}$. The teacher's control input $\bm{u_{T}}^{*}$, which is associated to $p_i^{*}$, is the command that will be mapped to the learner. After a command sequence is executed, the learner will evaluate the situation and use the planner to generate a new local path and corresponding command sequence. The learner will continue to repeat this planning procedure until it arrives to the destination. Since the learner has differing dynamics from the teacher, as the learner executes the command sequence to follow the composed path, it may deviate from it. When the learner is in an open area, such deviation is not critical because the command sequence only lasts a short period of time and it can always be corrected by the planner at the next planning step. However, such deviation can compromise the safety of the learner when it maneuvers in a cluttered environment. To provide safety guarantees to the system, we introduce an event triggered mechanism to monitor the learner at runtime. The runtime monitor measures the distance between the learner and the planned path $d_{\hat{e}}$. The re-planning procedure is triggered when $d_{\hat{e}} {>} \epsilon$. The smaller that the threshold $\epsilon$ is, the more conservative the learner behaves. As we discussed, the learner does not need to constantly re-plan if the deviation happens in an open area. Thus, the threshold $\epsilon$ should be dynamically changed to reflect how crowded the surroundings are. In our work, the threshold is defined as: \begin{equation} \epsilon = \begin{cases} \eta * \min(|| p - o_i||) & i = 1,2, \ldots , N_{o}, \\ \infty & i = \varnothing, \\ \end{cases} \end{equation} where $N_o$ is the number of obstacles in the learner's field of view, $o_i$ is the position of obstacle $i$, and $\eta$ is a constant. \section{Simulations} \label{sec:simulation} \begin{figure*}[b] \centering \includegraphics[width=1\textwidth]{Figs/simulation_result_v2_cropped.png} \caption{The path following result of the entire simulation is depicted in (a). The local path planning of the SCM mapping results for the robot at position `\textbf{A}' are shown in (b), (c), (d), and the results at position `\textbf{B}' are shown in (e), (f), and (g).} \label{fig:simulation_result} \end{figure*} \vspace{-5pt} For the simulations, we created a general case study which, we believe, is rich enough to represent the problems we are dealing with. With the following case studies we demonstrate how, thanks to our approach, a robot can quickly adapt to downgraded dynamics due for example to a failure or system's aging. In this case, the teacher is a vehicle with full capabilities while the learner is the same vehicle whose dynamics are compromised. For ease of implementation, we consider that both the teacher and the learner have small inertia thus the acceleration period can be neglected (e.g., an electric vehicle). The kinematics for both the teacher and the learner are given by the following bicycle model: \begin{align}\label{eql:dynamicmodel} \begin{split} \begin{bmatrix} \dot{x} \\ \dot{y} \\ \dot{\theta} \end{bmatrix} = \begin{bmatrix} (v\cdot v_{max}) \cdot \cos\theta \\ (v\cdot v_{max}) \cdot \sin\theta \\ \gamma \cdot \gamma_{max} \end{bmatrix}, \;\;\; \bm{u} &= \begin{bmatrix} v\\ \gamma\\ \end{bmatrix}, \end{split} \end{align} where $v_{max}$ and $\gamma_{max}$ denote the maximum capability on velocity and steering angle of the vehicle. The learner's model is treated as a black box which takes in a control input and produces the updated state of the learner. A Gaussian noise of $G \sim \mathcal{N}(0, 0.1)$ is added to the learner's position to simulate measurement errors. Since the teacher and the learner are the same vehicle, the range of the control inputs for both of the vehicles are same which are $\bm{u} {=} \{v, \gamma \; | \; v\in[0,1], \gamma \in [-1,1]\}$. However, the learner is downgraded so that it can not achieve the same level of performance as the teacher when it is given the same command. In this case study, the maximum velocity $v_{max}$ of the learner is downgraded from $3$~m/s to $1$~m/s while the maximum steering angle $\gamma_{max}$ is downgraded from $\pi/3$~rad/s to $\pi/8$~rad/s. For example, the same control input $v{=}1$ drives the teacher at $3$~m/s while the learner can only drive at $1$~m/s. The learner is asked to follow a "S"-shaped trajectory while navigating through a cluttered environment. Fig.~\ref{fig:simulation_result} shows two snapshots within the time frame of the entire simulation. As the result shows, the learner is able to closely follow the desired trajectory. The learner behaves more conservatively when the obstacles are within the field of view (FOV). In order to obtain the results in Fig.~\ref{fig:simulation_result}, a sequence of $5\times5$ grid commands were fed to the learner. Based on the change of the states before and after executing the command, an equivalent teacher command is retrieved and paired with learner's input. All the command pairs are shown in Fig.~\ref{fig:commandPairs}. The boundary of the commands on teacher's command space marks the limitation of the learner. The learner can map the teacher's command which falls in the boundary to get the learner's control input, and the mapped control input will produce a similar maneuver as the teacher. Fig.~\ref{fig:primitives} shows all the teacher's motion primitives and the corresponding commands. Each of the primitives are constructed by driving the teacher with a certain control input for $1$ second. The command pairs on the boundary of the convex hull are used to identify if the command for building the motion primitive is within the learner's capability. Among all the 121 motion primitives, 35 of them are preserved after the motion degradation and used for path planning. \begin{figure}[t] \centering \includegraphics[width=.85\columnwidth]{Figs/simulationCommandPairs.png} \vspace{-10pt} \caption{The command pairs are one-to-one color coded across the two command domains.} \label{fig:commandPairs} \vspace{-15pt} \end{figure} \begin{figure}[h] \vspace{-5pt} \centering \includegraphics[width=.85\columnwidth]{Figs/primitives.png} \vspace{-10pt} \caption{The primitives associated with the small gray commands in shaded area are beyond the limitation of the learner and thus are discarded. The available motion primitives and the associated commands are color coded.} \label{fig:primitives} \vspace{-8pt} \end{figure} For the path planner, we set the planning horizon to $s {=} 2$ and the threshold to trigger re-planning as $\eta {=} 0.5$. In Fig.~\ref{fig:simularion_noSCM}, we show the result of the learner driving directly with the teacher's commands without using our proposed approach. As expected, the learner failed because it used commands not adapted to its new dynamics. \begin{figure}[h] \vspace{-10pt} \centering \includegraphics[width=0.7\columnwidth]{Figs/simulation_noSCM_corrected.png} \vspace{-11pt} \caption{Simulation result for the case in which the downgraded learner is directly given the teacher's commands.} \vspace{-10pt} \label{fig:simularion_noSCM} \end{figure} \section{Experiments} \label{sec:experiments} Our proposed transfer learning approach was validated by a set of experiments in which we transferred the planning and control knowledge of a simulated teacher into two real learner vehicles. The video of all experiments are available in the provided supplemental material. In each of the experiments, we used the same simulated teacher vehicle. The vehicle dynamic model can be approximated to the one showed in the simulation experiments. The maximum velocity $v_{max}$ and the maximum steering angle $\gamma_{max}$ of the teacher were set to be $1.6$~m/s and $\pm 1.2$~rad/s respectively. The proposed method was implemented in MATLAB and we used the MATLAB ROS Toolbox together with Robot Operating System (ROS) to control the vehicles. We used MATLAB Schwarz-Christoffel toolbox \cite{driscoll2005algorithm} for computing the mapping function. The experiments were conducted in the indoor environment and the state of the vehicles are captured by a VICON motion capture system. \begin{figure}[h] \vspace{-10pt} \centering \includegraphics[width=.9\columnwidth]{Figs/experiment_jackalSCM.png} \vspace{-10pt} \caption{Jackal experiment with SCM.} \label{fig:ExpJackalSCM} \end{figure} \begin{figure}[h] \vspace{-17pt} \centering \includegraphics[width=1\columnwidth]{Figs/exp_jackalCalibration_matlab_cropped.png} \vspace{-20pt} \caption{The Jackal's capability is indicated within the white area. The gray points on the dashed boundary are the commands that were tested on the Jackal for extracting the limitations. The blue colored commands on the left create the primitives on the right and are used for mapping to the real UGV.} \label{fig:JackalCalibration} \end{figure} \begin{figure}[h] \vspace{-18pt} \centering \includegraphics[width=.9\columnwidth]{Figs/experiment_jackalNoSCM.png} \caption{Jackal experiment by directly feeding teacher's command.} \vspace{-3pt} \label{fig:ExpJackalNoSCM} \end{figure} For the first experiment, we asked the learner vehicle to follow an S-shaped path with the initial heading of $\frac{\pi}{4}$ from the desired orientation. As shown in Fig.~\ref{fig:ExpJackalSCM}, a narrow gate and an obstacle was set along the path. Using a Clearpath Jackal UGV as the learner vehicle, we tested its capability by sending certain commands over a period of 1 second, and based on the change to the state, we retrieved the equivalent teacher commands. The command pairs and the teacher's primitives that were used to plan the learner's path are demonstrated in Fig.~\ref{fig:JackalCalibration}. During the tracking mission, the maximum distance between the desired path and the actual trajectory was recorded as $0.1905$~m and the maximum deviation between the actual trajectory and the local motion plan was $0.0293$~m. Considering the vehicle's initial heading is not aligned with the desired path and the size of the vehicle is approximately $0.5$~m$\times0.43$~m$\times0.25$~m, the maximum deviation was negligible. For comparison, the same experiment without the SCM component was performed. As expected and as shown in Fig.~\ref{fig:ExpJackalNoSCM}, the learner vehicle collided with the gate and could not continue its task. Additionally, it can be clearly seen that there was a mismatch between the learner's trajectory and the primitive which was given by the path planner. This is also due to the fact that the teacher's control input was not mapped to the learner. To show the generalizability of our proposed framework, similar to the experiment with the Jackal UGV, we performed another experiment with the same settings but this time using a Turtlebot2 as learner. The command pairs and the primitives which were used for learner path planning are shown in Fig.~\ref{fig:TurtleCalibration}. The result shows that with our proposed approach, the Turtlebot2 could adapt the teacher controller and path planner to track the desired path with the maximum deviation of $0.1381$~m. The tracking error between the vehicle's trajectory and the local planned primitive was small within $0.0978$~m as can be noted in the figure in which the blue and the red segments are nearly overlapping throughout the whole process. \begin{figure}[h] \vspace{-5pt} \centering \includegraphics[width=1.1\columnwidth]{Figs/exp_turtleCalibration_matlab_cropped.png} \vspace{-15pt} \caption{Similar to the Jackal experiment, the turtlebot experiment command pairs and primitives are shown in the figure.} \label{fig:TurtleCalibration} \end{figure} \begin{figure}[h] \vspace{-20pt} \centering \includegraphics[width=.9\columnwidth]{Figs/experiment_turtlebotSCM.png} \vspace{-10pt} \caption{Turtlebot experiment with SCM.} \label{fig:ExpTurtlebotSCM} \end{figure} \section{Conclusion and future Work} \label{sec:conclusion} In this work, we proposed a novel light-weight transfer learning framework based on conformal mapping. We use SCM to directly map the control input from the teacher to the learner without knowing the dynamical model of the learner. The framework transfers not only the control policy but also adapts the teacher's motion planning policy to make it compatible with the learner. The proposed method is validated with both simulations and actual experiments. The results show that the learner can safely adapt the control and motion planning policy to suit its own dynamics. In our future work, we are looking into leveraging multi-dimensional conformal mapping to transfer from a higher-order system to a lower-order system, such as from an aerial vehicle to a ground vehicle. We plan also to extend our framework to deal with learners that have more capabilities than the teacher. \section{Acknowledgements} This work is based on research sponsored by DARPA under Contract No. FA8750-18-C-0090. \bibliographystyle{IEEEtran} \section{INTRODUCTION} This template provides authors with most of the formatting specifications needed for preparing electronic versions of their papers. All standard paper components have been specified for three reasons: (1) ease of use when formatting individual papers, (2) automatic compliance to electronic requirements that facilitate the concurrent or later production of electronic products, and (3) conformity of style throughout a conference proceedings. Margins, column widths, line spacing, and type styles are built-in; examples of the type styles are provided throughout this document and are identified in italic type, within parentheses, following the example. Some components, such as multi-leveled equations, graphics, and tables are not prescribed, although the various table text styles are provided. The formatter will need to create these components, incorporating the applicable criteria that follow. \section{PROCEDURE FOR PAPER SUBMISSION} \subsection{Selecting a Template (Heading 2)} First, confirm that you have the correct template for your paper size. This template has been tailored for output on the US-letter paper size. It may be used for A4 paper size if the paper size setting is suitably modified. \subsection{Maintaining the Integrity of the Specifications} The template is used to format your paper and style the text. All margins, column widths, line spaces, and text fonts are prescribed; please do not alter them. You may note peculiarities. For example, the head margin in this template measures proportionately more than is customary. This measurement and others are deliberate, using specifications that anticipate your paper as one part of the entire proceedings, and not as an independent document. Please do not revise any of the current designations \section{MATH} Before you begin to format your paper, first write and save the content as a separate text file. Keep your text and graphic files separate until after the text has been formatted and styled. Do not use hard tabs, and limit use of hard returns to only one return at the end of a paragraph. Do not add any kind of pagination anywhere in the paper. Do not number text heads-the template will do that for you. Finally, complete content and organizational editing before formatting. Please take note of the following items when proofreading spelling and grammar: \subsection{Abbreviations and Acronyms} Define abbreviations and acronyms the first time they are used in the text, even after they have been defined in the abstract. Abbreviations such as IEEE, SI, MKS, CGS, sc, dc, and rms do not have to be defined. Do not use abbreviations in the title or heads unless they are unavoidable. \subsection{Units} \begin{itemize} \item Use either SI (MKS) or CGS as primary units. (SI units are encouraged.) English units may be used as secondary units (in parentheses). An exception would be the use of English units as identifiers in trade, such as Ò3.5-inch disk driveÓ. \item Avoid combining SI and CGS units, such as current in amperes and magnetic field in oersteds. This often leads to confusion because equations do not balance dimensionally. If you must use mixed units, clearly state the units for each quantity that you use in an equation. \item Do not mix complete spellings and abbreviations of units: ÒWb/m2Ó or Òwebers per square meterÓ, not Òwebers/m2Ó. Spell out units when they appear in text: Ò. . . a few henriesÓ, not Ò. . . a few HÓ. \item Use a zero before decimal points: Ò0.25Ó, not Ò.25Ó. Use Òcm3Ó, not ÒccÓ. (bullet list) \end{itemize} \subsection{Equations} The equations are an exception to the prescribed specifications of this template. You will need to determine whether or not your equation should be typed using either the Times New Roman or the Symbol font (please no other font). To create multileveled equations, it may be necessary to treat the equation as a graphic and insert it into the text after your paper is styled. Number equations consecutively. Equation numbers, within parentheses, are to position flush right, as in (1), using a right tab stop. To make your equations more compact, you may use the solidus ( / ), the exp function, or appropriate exponents. Italicize Roman symbols for quantities and variables, but not Greek symbols. Use a long dash rather than a hyphen for a minus sign. Punctuate equations with commas or periods when they are part of a sentence, as in $$ \alpha + \beta = \chi \eqno{(1)} $$ Note that the equation is centered using a center tab stop. Be sure that the symbols in your equation have been defined before or immediately following the equation. Use Ò(1)Ó, not ÒEq. (1)Ó or Òequation (1)Ó, except at the beginning of a sentence: ÒEquation (1) is . . .Ó \subsection{Some Common Mistakes} \begin{itemize} \item The word ÒdataÓ is plural, not singular. \item The subscript for the permeability of vacuum ?0, and other common scientific constants, is zero with subscript formatting, not a lowercase letter ÒoÓ. \item In American English, commas, semi-/colons, periods, question and exclamation marks are located within quotation marks only when a complete thought or name is cited, such as a title or full quotation. When quotation marks are used, instead of a bold or italic typeface, to highlight a word or phrase, punctuation should appear outside of the quotation marks. A parenthetical phrase or statement at the end of a sentence is punctuated outside of the closing parenthesis (like this). (A parenthetical sentence is punctuated within the parentheses.) \item A graph within a graph is an ÒinsetÓ, not an ÒinsertÓ. The word alternatively is preferred to the word ÒalternatelyÓ (unless you really mean something that alternates). \item Do not use the word ÒessentiallyÓ to mean ÒapproximatelyÓ or ÒeffectivelyÓ. \item In your paper title, if the words Òthat usesÓ can accurately replace the word ÒusingÓ, capitalize the ÒuÓ; if not, keep using lower-cased. \item Be aware of the different meanings of the homophones ÒaffectÓ and ÒeffectÓ, ÒcomplementÓ and ÒcomplimentÓ, ÒdiscreetÓ and ÒdiscreteÓ, ÒprincipalÓ and ÒprincipleÓ. \item Do not confuse ÒimplyÓ and ÒinferÓ. \item The prefix ÒnonÓ is not a word; it should be joined to the word it modifies, usually without a hyphen. \item There is no period after the ÒetÓ in the Latin abbreviation Òet al.Ó. \item The abbreviation Òi.e.Ó means Òthat isÓ, and the abbreviation Òe.g.Ó means Òfor exampleÓ. \end{itemize} \section{USING THE TEMPLATE} Use this sample document as your LaTeX source file to create your document. Save this file as {\bf root.tex}. You have to make sure to use the cls file that came with this distribution. If you use a different style file, you cannot expect to get required margins. Note also that when you are creating your out PDF file, the source file is only part of the equation. {\it Your \TeX\ $\rightarrow$ PDF filter determines the output file size. Even if you make all the specifications to output a letter file in the source - if your filter is set to produce A4, you will only get A4 output. } It is impossible to account for all possible situation, one would encounter using \TeX. If you are using multiple \TeX\ files you must make sure that the ``MAIN`` source file is called root.tex - this is particularly important if your conference is using PaperPlaza's built in \TeX\ to PDF conversion tool. \subsection{Headings, etc} Text heads organize the topics on a relational, hierarchical basis. For example, the paper title is the primary text head because all subsequent material relates and elaborates on this one topic. If there are two or more sub-topics, the next level head (uppercase Roman numerals) should be used and, conversely, if there are not at least two sub-topics, then no subheads should be introduced. Styles named ÒHeading 1Ó, ÒHeading 2Ó, ÒHeading 3Ó, and ÒHeading 4Ó are prescribed. \subsection{Figures and Tables} Positioning Figures and Tables: Place figures and tables at the top and bottom of columns. Avoid placing them in the middle of columns. Large figures and tables may span across both columns. Figure captions should be below the figures; table heads should appear above the tables. Insert figures and tables after they are cited in the text. Use the abbreviation ÒFig. 1Ó, even at the beginning of a sentence. \begin{table}[h] \caption{An Example of a Table} \label{table_example} \begin{center} \begin{tabular}{|c||c|} \hline One & Two\\ \hline Three & Four\\ \hline \end{tabular} \end{center} \end{table} \begin{figure}[thpb] \centering \framebox{\parbox{3in}{We suggest that you use a text box to insert a graphic (which is ideally a 300 dpi TIFF or EPS file, with all fonts embedded) because, in an document, this method is somewhat more stable than directly inserting a picture. }} \caption{Inductance of oscillation winding on amorphous magnetic core versus DC bias magnetic field} \label{figurelabel} \end{figure} Figure Labels: Use 8 point Times New Roman for Figure labels. Use words rather than symbols or abbreviations when writing Figure axis labels to avoid confusing the reader. As an example, write the quantity ÒMagnetizationÓ, or ÒMagnetization, MÓ, not just ÒMÓ. If including units in the label, present them within parentheses. Do not label axes only with units. In the example, write ÒMagnetization (A/m)Ó or ÒMagnetization {A[m(1)]}Ó, not just ÒA/mÓ. Do not label axes with a ratio of quantities and units. For example, write ÒTemperature (K)Ó, not ÒTemperature/K.Ó \section{CONCLUSIONS} A conclusion section is not required. Although a conclusion may review the main points of the paper, do not replicate the abstract as the conclusion. A conclusion might elaborate on the importance of the work or suggest applications and extensions. \addtolength{\textheight}{-12cm} \section*{APPENDIX} Appendixes should appear before the acknowledgment. \section*{ACKNOWLEDGMENT} The preferred spelling of the word ÒacknowledgmentÓ in America is without an ÒeÓ after the ÒgÓ. Avoid the stilted expression, ÒOne of us (R. B. G.) thanks . . .Ó Instead, try ÒR. B. G. thanksÓ. Put sponsor acknowledgments in the unnumbered footnote on the first page. References are important to the reader; therefore, each citation must be complete and correct. If at all possible, references should be commonly available publications.
\section{Introduction} Shape design problems for fluid flow control captivate a vast number of mathematicians as well as engineers due to its applications in aeronautics, optimal mixing problems, and fluid-structure interaction problems, to name a few. Such problems are mostly formulated so as to optimize a given objective function constrained with the stationary fluid model, e.g. the stationary Stokes and Navier-Stokes equations. Among these studies are \cite{pironneau1974}, and \cite{pironneau2010} where the drag around a body in a fluid is minimized for viscous fluids. Z. Gao, et al. \cite{gao2008} on the other hand determined the gradient of the objective functional using three different methods, such as the use of Piola transform, minimax formulation, and the function space embedding technique. Aside from the mentioned references there is a pool of literature dealing with shape design problems constrained with the stationary fluid equations (see for example \cite{garcke2018}, \cite{haslinger2005}, \cite{haslinger2017}). In fact, majority of shape design problems involving fluid flow is governed by stationary equations, while there are only quite a few literature with the time-dependent case (see \cite{brandenburg2009}, \cite{yagi2005}, \cite{yagi2007}, \cite{gao2010}). One of the reasons for the disparity in the number of sources between the time-dependent and stationary problems is perhaps due to computational complexity of solving the dynamic systems. Aside from that, the assumption is that for long time horizons, the dynamic optimization problem generates a closely similar shape to that of the stationary problem. Such property has been proven to hold true for a lot of control problems and has been popularized as the {\it turnpike} property. The said property states that for large time optimal control problems, the solutions may be divided into three periods -- the first and last periods are known to be short-time periods, and the middle part is known to steer the solutions (both the state and the controls) to be exponentially close to the solutions of the stationary problem. See \cite{zaslavski2015, zaslavski2006} and the references therein for an extensive review of the turnpike property. In the case of fluid flow control problems, a very few literature can be cited for the turnpike property. In fact, until 2018, the problem of proving the turnpike property for an optimal control problem constrained with the Navier--Stokes equations is open. S. Zamorano \cite{zamorano2018} proved the occurence of turnpike to the control and the states. In the said reference, the author considered cases where the control is both time-dependent and independent. For shape design problems, on the other hand, turnpike property is mostly an open problem. Nevertheless, G. Lance, et al. \cite{lance2019} proved a weaker notion of the turnpike property and numerically illustrated that such phenomenon occurs for a shape optimization problem constrained with the heat equation for the time-dependent problem and the Poisson equation for the equilibrium problem. Another seminal result in long time behavior of shape design solutions is done by E. Trelat, et al. \cite{trelat2017}, where the authors showed that for the heat and Poisson equations, as the time horizon gets larger the shape solutions of the dynamic optimization problem asymptotically converges to that of the stationary problem. Furthermore, the authors established that the limiting domain - as the terminal time approaches infinity - converges to a domain that solves the stationary optimization problem. In this short note, we shall investigate the long time behavior of the solutions to shape optimization problems governed by the Navier-Stokes equations. Specifically, we shall study the asymptotic convergence of the solution of the shape optimization problem with instationary Navier--Stokes equations to the solution of the problem constrained with the stationary Navier--Stokes equations. To simplify the analysis, we assume that the fluid source function is not dependent on the time variable, and the optimization problem is formulated so as to steer the flow - in terms of the velocity and its gradient - into a prescribed profile. As opposed to the method used in \cite{trelat2017}, we shall not resort to the Hausdorff complement topology and the concept of $\Gamma$-convergence of domains, but instead we shall use the $L^\infty$-topology on the indicator functions of the domains and define the convergence of domains based on such topology. Nevertheless, we shall also show that when reduced to the Stokes equations, our results reflect the same results of E. Trelat, et al.\cite{trelat2017}. Our exposition will be as follows: in the next section we shall introduce the shape optimization problems, and their governing state equations. The said state equations will be modified so as to take into account the possibility of simplifying them into the Stokes equations. Section \ref{section:3} is dedicated to the existence and uniqueness of solutions to the fluid equations, while we prove existence of shape solutions in Section \ref{section:4}. In Section \ref{section:5}, we will prove our main results, then we shall provide a numerical illustration in Section \ref{section:6} where we will utilize traction methods for solving the deformation of domains. We leave some concluding remarks in the last section, as well as possible future directions. \section{Shape Design Problems} \label{section:2} Let $\mathcal{D}\subset\mathbb{R}^2$ be a non-empty open bounded connected domain, and $\omega \subsetneq \mathcal{D}$, we consider the following set of admissible domains \begin{align*} \mathcal{O}_{\omega} = &\left\{\Omega\subset \mathcal{D}: \Omega\supset\omega,\ \Omega\text{ is open, bounded, connected, and at least of class }C^{0,1} \right\}. \end{align*} We shall also consider a static fluid external force ${\blf}\in L^2(\mathcal{D};\mathbb{R}^2)$ for both stationary and time-dependent Navier--Stokes equations. In fact, for a given $\Omega\in \mathcal{O}_{\omega}$, we shall consider a dynamic equation on the interval $(0,T)$ given by \begin{align} \left\{ \begin{aligned} \partial_t{\bu} - \nu\Delta{\bu} + \gamma({\bu}\cdot\nabla){\bu} + \nabla p & = {\blf} && \text{in }\Omega\times (0,T),\\ \nabla\cdot{\bu} & = 0 &&\text{in }\Omega\times (0,T),\\ {\bu} & = 0 &&\text{in }\partial\Omega\times (0,T),\\ {\bu} & = {\bu}_0 &&\text{in }\Omega\times\{0\}. \end{aligned} \right. \label{system:timedependent} \end{align} where ${\bu}$ and $p$ correspond to the dynamic fluid velocity and pressure, respectively, and ${\bu}_0\in L^2(\mathcal{D};\mathbb{R}^2)$ is the initial velocity that satisfies $\nabla\cdot{\bu}_0 = 0$ in $\Omega$. On the other hand, the stationary Navier--Stokes equation is given by \begin{align} \left\{ \begin{aligned} - \nu\Delta{\bv} + \gamma({\bv}\cdot\nabla){\bv} + \nabla q & = {\blf} && \text{in }\Omega,\\ \nabla\cdot{\bv} & = 0 &&\text{in }\Omega,\\ {\bv} & = 0 &&\text{in }\partial\Omega. \end{aligned} \right. \label{system:stationary} \end{align} where ${\bv}$ and $q$ are the respective equilibrium fluid velocity and pressure. On both equations, $\nu>0$ denotes the fluid viscosity, and we call the parameter $\gamma\ge 0$ the convection constant. We note that if $\gamma = 1$, we are dealing with the usual Navier--Stokes equations, while when $\gamma = 0$ then both states are reduced to the Stokes equation. Our intent is focused on analyzing two shape optimization problems governed by equations \eqref{system:timedependent} and \eqref{system:stationary}. In particular, for a given static desired velocity ${\bu}_D \in L^2(\omega;\mathbb{R}^2)$, we consider the time average problem given by \begin{align} \left. \begin{aligned} \min_{\Omega\in \mathcal{O}_{\omega}} J_T(\Omega) := \frac{\nu}{T}&\int_0^T \|{\bu}(t) - {\bu}_D\|_{L^2(\omega;\mathbb{R}^2)}^2 + \|\nabla({\bu}(t) - {\bu}_D)\|_{L^2(\omega;\mathbb{R}^{2\times 2})}^2 \du t\\ \text{subject to }\eqref{system:timedependent}, \end{aligned} \right. \label{problem:timedependent} \end{align} and the stationary shape design problem given by \begin{align} \left. \begin{aligned} \min_{\Omega\in \mathcal{O}_{\omega}} J_s(\Omega) :=\nu\big(\|{\bv} &- {\bu}_D\|_{L^2(\omega;\mathbb{R}^2)}^2 + \|\nabla({\bv} - {\bu}_D)\|_{L^2(\omega;\mathbb{R}^{2\times2})}^2\big)\\ \text{subject to }\eqref{system:stationary}. \end{aligned} \right. \label{problem:stationary} \end{align} Our goal - assuming for now that \eqref{problem:timedependent} and \eqref{problem:stationary} are well-posed, with $\Omega_T$ and $\Omega_s$ being their respective solutions - is to show that \begin{align} |J_T^* - J_s^*| \le c \left( \frac{1}{T} + \frac{1}{\sqrt{T}} + \frac{\gamma}{2^{1/2}} \right), \label{ineq:goal} \end{align} where $J_T^* := J_T(\Omega_T)$, $J_s^*:= J_s(\Omega_s)$, and the constant $c := c( {\bu}_0,{\bu}_D, {\blf}, 1/\nu, \mathcal{D} ) >0$ is independent of $T$. \begin{remark} Note that when $\gamma = 0$, both systems \eqref{system:timedependent} and \eqref{system:stationary} become the Stokes equations, and can be realized as parabolic and elliptic problems. In fact, inequality \eqref{ineq:goal} reduces to that of the estimate in \cite{trelat2017}. \end{remark} \section{Existence and uniqueness of state solutions} \label{section:3} In this section, we show the existence of the solutions - in weak sense - of systems \eqref{system:timedependent} and \eqref{system:stationary}. We begin by introducing the necessary function spaces. Let $X$ and $Y$ be normed spaces. We denote by $\mathcal{L}(X;Y)$ the set of continuous linear operators from $X$ to $Y$ with the norm $\|f\|_{\mathcal{L}(X;Y)} = \sup_{x\in X\backslash\{0\}}\frac{\|f(x)\|_Y}{\|x\|_X}$ for $f\in\mathcal{L}(X;Y)$. The following spaces were already used in the previous section, but for the sake of completeness, we define them formally. For a measurable set $D\subset\mathbb{R}^2$, $d = 1,2,2\times2$ and $p\ge 1$, the space $L^p(D;\mathbb{R}^d)$ is the space of $p^{th}$ integrable functions from $D$ to $\mathbb{R}^d$, and the usual Sobolev spaces from $D$ to $\mathbb{R}^d$ are denoted by $W^{m,p}(D;\mathbb{R}^d)$ with $m \in\mathbb{N}$. For $p=2$, we use the notation $H^m(D;\mathbb{R}^d) = W^{m,p}(D;\mathbb{R}^d)$. The space of the functions in $H^m(D;\mathbb{R}^d)$ whose traces on the boundary of $D$ are zero will be denoted as $H^m_0(D;\mathbb{R}^d)$ upon which the norm \begin{align*} \|{\bu}\|_{H^m_0(D;\mathbb{R}^d)} = \left(\sum_{|\alpha| = m}\int_D |\partial^\alpha{\bu}|^2 \du x \right)^{\!1/2} \end{align*} is endowed, where $\alpha$ is a multi-index, and the partial derivatives $\partial^\alpha{\bu}$ are understood in the sense of distributions. For a domain $\Omega\in \mathcal{O}_{\omega}$, to take into account the divergence-free property of the fluid velocities, we consider the following spaces \begin{align*} & V(\Omega) := \{{\bu}\in H^1_0(\Omega;\mathbb{R}^2): \nabla\cdot{\bu} = 0\text{ in }L^2(\Omega;\mathbb{R}) \},\\ & H(\Omega) := \{{\bu}\in L^2(\Omega;\mathbb{R}^2): \nabla\cdot{\bu} = 0\text{ in }L^2(\Omega;\mathbb{R}),{\bu}\cdot{\bn} = 0 \text{ on }\partial\Omega \}. \end{align*} We denote by $V^*(\Omega)$ the dual space of $V(\Omega)$, with the norm \[ \|{\bu}\|_{V^*(\Omega)} = \sup_{{\bv} \in V(\Omega)\backslash\{0\}}\frac{{}_{V^*(\Omega)}\langle {\bu},{\bv}\rangle_{V(\Omega)}}{\|{\bv}\|_{V(\Omega)}}, \] where ${}_{V^*(\Omega)}\langle {\bu},{\bv}\rangle_{V(\Omega)}$ corresponds to the duality pairing of elements of $V^*(\Omega)$ and $V(\Omega)$. For the pressure term, we consider the space $L^2_0(\Omega;\mathbb{R}) = \{ q\in L^2(\Omega;\mathbb{R}): \int_\Omega q\du x = 0 \}$. We also use the notation $(\cdot,\cdot)_\Omega$ for the $L^2(\Omega;\mathbb{R}^d)$ inner product, where $d = 1,2,2\times2$. The time-dependent problems will be analyzed by virtue of the following spaces of Banach valued functions. For a terminal time $T>0$ and a real Banach space $X$, we denote the space of continuous functions from $I = (0,T)$ to $X$ by $C(I;X)$ with the norm $\sup_{t} \|u(t) \|_X$. The Bochner space $L^p(I;X)$ for $p\ge 1$ is also considered with the norm \begin{align*} \|u\|_{L^p(I;X)} = \left\{ \begin{aligned} &\mathrm{ess}\sup_{t\in I}\|u(t)\|_X &&\text{for }p=\infty,\\ &\left(\int_I \|u(t)\|_X^p \du t \right)^{\!1/p} &&\text{otherwise}. \end{aligned} \right. \end{align*} We also consider the space \[ W^p(\Omega):= \{{\bu} \in L^2(I;V(\Omega)); \partial_t{\bu}\in L^p(I;{V}^*(\Omega)) \}\] which is compactly embedded to $L^p(I;H(\Omega))$, and we have the following inclusion $W^2(\Omega)\subset C(\overline{I};H(\Omega))$. Suppose that ${\bu}_0\in H(\Omega)$, we call ${\bu} \in L^\infty(I;H(\Omega))\cap W^2(\Omega)$ a {\it weak solution} of \eqref{system:timedependent} if it satisfies \begin{align} \begin{aligned} {}_{V^*(\Omega)}\langle \partial_t{\bu}(t), {\bphi}\rangle_{V(\Omega)} + \nu(\nabla{\bu}(t),\nabla{\bphi})_\Omega + \gamma(({\bu}(t)\cdot\nabla){\bu}(t),{\bphi})_{\Omega} &= ({\blf},{\bphi})_{\Omega} \end{aligned} \label{weak:timedependent} \end{align} for all ${\bphi}\in V(\Omega)$, a.e. $t\in (0,T)$, and ${\bu}(0) = {\bu}_0$ in $H(\Omega)$. We note that the pointwise evaluation at $t = 0$ makes sense due to the inclusion $W^2(\Omega)\subset C(\overline{I};H(\Omega))$. Meanwhile, ${\bv}\in V(\Omega)$ is a {\it weak solution} of \eqref{system:stationary} if the following equation holds true \begin{align} \nu(\nabla{\bv},\nabla{\bphi})_{\Omega} + \gamma(({\bv}\cdot\nabla){\bv},{\bphi})_{\Omega} = ({\blf},{\bphi})_{\Omega}, \label{weak:stationary} \end{align} for all ${\bphi}\in V(\Omega)$. The existence of such weak solutions has been well-established (see for example \cite{girault1986},\cite{temam1977}). Nevertheless, we present the said results in the following theorem. \begin{theorem} Let $\Omega \in \mathcal{O}_{\omega}$ and ${\blf}\in L^2(\mathcal{D};\mathbb{R}^2)$. \begin{itemize} \item[i)] If ${\bu}_0\in H(\Omega)\cap L^2(\mathcal{D};\mathbb{R}^2)$, then the weak solution ${\bu} \in L^\infty(I;H(\Omega))\cap W^2(\Omega) $ of \eqref{system:timedependent} exists and satisfies the following estimates \begin{align} &\begin{aligned} \|{\bu}\|_{L^\infty(I;H(\Omega))} \le c_1\left(\sqrt{\frac{T}{\nu}}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)} + \|{\bu}_0\|_{L^2(\mathcal{D};\mathbb{R}^2)} \right), \label{estimate:Linf} \end{aligned}\\ &\begin{aligned} \|{\bu}\|_{L^2((0,t);V(\Omega))}^2 \le c_2\left(\frac{t}{\nu^2}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2 + \frac{1}{\nu}\|{\bu}_0\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2 \right),\quad \forall t\in[0,T]\label{estimate:L2} \end{aligned} \end{align} where $c_1,c_2>0$ are constants independent of $\Omega$ and $T$. \item[ii)] There exists a weak solution ${\bv}\in V(\Omega)$ of \eqref{system:stationary} which satisfies \begin{align} \|{\bv}\|_{V(\Omega)} \le \frac{c}{\nu}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)}, \label{estimate:stationary} \end{align} where $c>0$ is a constant which can be chosen to be independent of $\Omega$. Furthermore, if we assume that $2^{1/2}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)} < \nu^2$, then the solution is unique. \end{itemize} \label{theorem:statewp} \end{theorem} \begin{proof} The proof of existence and uniqueness can be easily done. Nonetheless, we shall show that the estimates \eqref{estimate:Linf}, \eqref{estimate:L2}, and \eqref{estimate:stationary} hold true. We begin at performing diagonal testing on the dynamic problem \eqref{weak:timedependent} by taking ${\bphi} = {\bu}(t)$. This results to the following expression \begin{align*} \frac{1}{2}\frac{d}{dt}\|{\bu}(t)\|_{H(\Omega)}^2 + \nu \|{\bu}(t)\|_{V(\Omega)}^2 = ({\blf},{\bu}(t))_\Omega. \end{align*} By utilizing H{\"o}lder and Young inequality on the right-hand side, then integrating over the whole interval $(0,t)$, we get \begin{align*} \|{\bu}(t)\|_{H(\Omega)}^2 + \nu\int_0^t \|{\bu}(t)\|_{V(\Omega)}^2\du t \le c\left( \frac{t}{\nu}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2 + \|{\bu}_0\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2 \right). \end{align*} Focusing on the first term on the left-hand side gives us \eqref{estimate:Linf}, while the second term yields \eqref{estimate:L2}. Substituting ${\bphi} = {\bv}$ into \eqref{weak:stationary} yields \begin{align*} \nu \|{\bv}\|_{V(\Omega)}^2 = ({\blf},{\bv})_{\Omega}. \end{align*} Using H{\"o}lder and Poincar{\'e} inequalities result to \eqref{estimate:stationary}. \end{proof} \begin{remark} (i) We note that the constant $c>0$ in \eqref{estimate:stationary} most of the time arises from Poincar{\'e} inequality, which results to it being dependent to the domain $\Omega$. Fortunately, we can use Faber-Krahn inequality arguments to show that it indeed depends only on $\mathcal{D}$ but not on $\Omega$ (see for e.g. \cite{bucur2005}). (ii) A more natural assumption for the uniqueness of the stationary Navier--Stokes solution is $\mathcal{B}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)} < \nu^2$, where $\mathcal{B} = {\displaystyle\sup_{{\bu},{\bv},{\bw}\in V(\Omega)}} \frac{(({\bu}\cdot\nabla){\bv},{\bw} )}{\|{\bu}\|_{V(\Omega)}\|{\bv}\|_{V(\Omega)}\|{\bw}\|_{V(\Omega)}}$. Meanwhile, from \cite[Lemma III.3.4]{temam1977} we infer that $\mathcal{B}\le 2^{1/2}$, which means that the uniqueness assumption in Theorem \ref{theorem:statewp}(ii) implies the usual assumption. \end{remark} We end this section by mentioning that in the subsequent parts, the necessary assumptions for existence and uniqueness of state solutions will be assumed even when such conditions are not explicitly mentioned. \section{Existence of shape solutions} \label{section:4} We show in this section that the problems \eqref{problem:timedependent} and \eqref{problem:stationary} possess solutions to exempt us from futile analyses. We shall utilize characteristic functions of domains in $\mathbb{R}^2$, i.e., for a given nonempty domain $A\subset\mathbb{R}^2$ the characteristic function denoted as $\chi_A :\mathbb{R}^2\to [0,1]$ is defined by \begin{align*} \chi_A(x) = \left\{ \begin{aligned} 1 &\qquad \text{if }x\in A,\\ 0 &\qquad \text{otherwise}. \end{aligned}\right. \end{align*} We shall take advantage of the $L^\infty$-topology, by which we shall define convergence of domains if their corresponding characteristic functions converge in the $L^\infty$ topology. To be precise, we say that a sequence of domains $\{\Omega_n\}\subset \mathcal{O}_{\omega}$ converges to $\Omega\in \mathcal{O}_{\omega}$ if $\chi_{\Omega_n} \to\chi_{\Omega}$ in the $L^\infty$-topology, in such case we denote the domain convergence as $\Omega_n\chiarrow\Omega$. A requirement for a good topology on the set of admissible domains is for it to be closed under such topology. As such, we shall utilize the so-called {\it cone property} introduced in \cite{chenais1975}. For the definition of such property, we refer the reader to the said literature. Nevertheless, we mention important properties inferred from such condition. \begin{lemma} Any element $\Omega\in\mathcal{O}_{\omega}$ satisfies the cone property. Furthermore, there exists $c>0$ such that for any $\Omega\in\mathcal{O}_{\omega}$ there exists $\mathcal{E}_\Omega^d\in\mathcal{L}(H^k(\Omega;\mathbb{R}^d);H^k(\mathcal{D};\mathbb{R}^d))$, for $d=1,2$ and $k = 0,1$, such that \begin{align} \max_{d,k}\{\|\mathcal{E}_\Omega^d\|_{\mathcal{L}(H^k(\Omega;\mathbb{R}^d),H^k(\mathcal{D};\mathbb{R}^d))}\}\le c. \label{ineq:uniformbound} \end{align} Lastly, for any sequence $\{\Omega_n\}\subset\mathcal{O}_{\omega}$, there exists a subsequence $\{\Omega_{n_k}\}\subset\{\Omega_n\}$ and an element $\Omega\in\mathcal{O}_{\omega}$ such that $\Omega_{n_k}\chiarrow \Omega$. \label{lemma:extensionundclosure} \end{lemma} \begin{proof} Since each $\Omega\in\mathcal{O}_{\omega}$ has a bounded and Lipschitz boundary, from \cite[Theorem 2.4.7]{henrot2018}, $\Omega$ satisfies the cone property. As for the uniform boundedness property \eqref{ineq:uniformbound} and compactness of $\mathcal{O}_{\omega}$ with respect to the $L^\infty$-topology, we refer the reader to \cite{chenais1975} and \cite[Theorem 2.4.10]{henrot2018}, respectively. \end{proof} The first step in establishing existence of shape solutions is by showing the continuity of the map $\Omega\mapsto{\bphi}$ where $\bphi$ is either the solution of \eqref{weak:timedependent} or \eqref{weak:stationary}. \begin{proposition} Let $\{\Omega_n\}\subset\mathcal{O}_\omega$ be a sequence converging to an element $\Omega^*\in\mathcal{O}_\omega$. \begin{itemize} \item[i)] For a fixed $T>0$, let ${\bu}_n\in L^\infty(I;H(\Omega_n))\cap W^2(\Omega_n)$ be the solution of \eqref{weak:timedependent} in $\Omega=\Omega_n$, and $\overline{\bu}_n := \mathcal{E}_{\Omega_n}^2({\bu}_n)$ be its extension by virtue of Lemma \ref{lemma:extensionundclosure}. Then there exists $\overline{\bu}\in L^\infty(I;L^2(\mathcal{D};\mathbb{R}^2))\cap L^2(I;H^1(\mathcal{D};\mathbb{R}^2))$ such that $\overline{\bu}_n \rightharpoonup \overline{\bu}$ in $L^2(I;H^1(\mathcal{D};\mathbb{R}^2))$ and $\overline{\bu}_n \ws \overline{\bu}$ in $L^\infty(I;L^2(\mathcal{D};\mathbb{R}^2))$. Furthermore, ${\bu}:=\overline{\bu}|_{\Omega^*}$ solves \eqref{weak:timedependent} in $\Omega=\Omega^*$. \item[ii)] Suppose that ${\bv}_n \in V(\Omega_n)$ is the solution of \eqref{weak:stationary} in $\Omega = \Omega_n$, and that $\overline{\bv}_n := \mathcal{E}_{\Omega_n}^2({\bv}_n)$ is its extension in $\mathcal{D}$, then there exists $\overline{\bv}\in H^1(\mathcal{D};\mathbb{R}^2)$ such that $\overline{\bv}_n\to \overline{\bv}$ in $H^1(\mathcal{D};\mathbb{R}^2)$ and ${\bv}:= \overline{\bv}|_{\Omega^*}$ solves \eqref{weak:stationary} in $\Omega=\Omega^*$. \end{itemize} \end{proposition} \begin{proof} {\it i)} From the uniform extension property \eqref{ineq:uniformbound}, we get for each $n\in\mathbb{N}$ \begin{align*} &\begin{aligned} \|\overline{\bu}_n\|_{L^\infty(I;L^2(\mathcal{D};\mathbb{R}^2))} \le c_1\left(\sqrt{\frac{T}{\nu}}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)} + \|{\bu}_0\|_{L^2(\mathcal{D};\mathbb{R}^2)} \right), \end{aligned}\\ &\begin{aligned} \|\overline{\bu}_n\|_{L^2(I;H^1(\mathcal{D};\mathbb{R}^2))}^2 \le c_2\left(\frac{t}{\nu^2}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2 + \frac{1}{\nu}\|{\bu}_0\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2 \right) \end{aligned} \end{align*} This implies that there exists $\overline{\bu}\in L^\infty(I;L^2(\mathcal{D};\mathbb{R}^2))\cap L^2(I;H^1(\mathcal{D};\mathbb{R}^2))$ upon which $\overline{\bu}_n \rightharpoonup \overline{\bu}$ in $L^2(I;H^1(\mathcal{D};\mathbb{R}^2))$ and $\overline{\bu}_n \ws \overline{\bu}$ in $L^\infty(I;L^2(\mathcal{D};\mathbb{R}^2))$. Furthermore, one can easily show that $\|\partial_t\overline{\bu}_n\|_{L^2(I;H^{-1}(\mathcal{D}))} \le c$ for some constant $c>0$ independent of $\Omega$ and $T>0$. Thus, we obtain the following convergences \begin{align} \left\{ \begin{aligned} \overline{\bu}_n &\rightharpoonup \overline{\bu} &&\text{in }L^2(I;H^1(\mathcal{D};\mathbb{R}^2)),\\ \overline{\bu}_n &\ws \overline{\bu} &&\text{in }L^\infty(I;L^2(\mathcal{D};\mathbb{R}^2)),\\ \overline{\bu}_n &\to \overline{\bu} &&\text{in }L^2(I;L^2(\mathcal{D};\mathbb{R}^2)).\\ \end{aligned} \right. \label{conv:timedependent} \end{align} Since ${\bu}_n\in L^\infty(I;H(\Omega_n))\cap L^2(I;V(\Omega_n))$ solves \eqref{weak:timedependent}, then the extension satisfies \begin{align*} (\chi_{n}\partial_t\overline{\bu}_n(t), {\bphi} )_{\mathcal{D}} + \nu(\chi_{n}\nabla\overline{\bu}_n(t),\nabla{\bphi})_{\mathcal{D}} + \gamma(\chi_{n}(\overline{\bu}(t)\cdot\nabla)\overline{\bu}(t),{\bphi})_{\mathcal{D}} &= (\chi_{n}{\blf},{\bphi})_{\mathcal{D}}, \end{align*} for all ${\bphi}\in H^1(\mathcal{D};\mathbb{R}^2)$, where $\chi_n := \chi_{\Omega_n}$. Using the convergences in \eqref{conv:timedependent}, and the fact that $\chi_n\to\chi$ (where $\chi:=\chi_{\Omega^*}$) in $L^\infty(\mathcal{D};\mathbb{R})$ yield \begin{align*} (\chi\partial_t\overline{\bu}(t), {\bphi} )_{\mathcal{D}} + \nu(\chi\nabla\overline{\bu}(t),\nabla{\bphi})_{\mathcal{D}} + \gamma(\chi(\overline{\bu}(t)\cdot\nabla)\overline{\bu}(t),{\bphi})_{\mathcal{D}} & = (\chi{\blf},{\bphi})_{\mathcal{D}}, \end{align*} for any ${\bphi}\in H^1(\mathcal{D};\mathbb{R}^2)$. By letting ${\bpsi}\in V(\Omega)$ and taking ${\bphi} = {\bpsi}$ in $\Omega^*$ and ${\bphi}=0$ in $\mathcal{D}\backslash\Omega^*$, we infer that ${\bu} = \overline{\bu}|_{\Omega^*} \in L^\infty(I;H(\Omega^*))\cap L^2(I;V(\Omega^*))$ satisfies \eqref{weak:timedependent} in $\Omega = \Omega^*$. {\it ii)} For the stationary problem, we refer the reader to \cite{kasumba2012}, among others. \end{proof} \begin{remark} As a consequence of the strong convergence of the extensions in $H^1(\mathcal{D};\mathbb{R}^2)$, for any sequence ${\Omega_n}\subset\mathcal{O}_{\omega}$ such that $\Omega\chiarrow\Omega^*$ for some $\Omega^*\in\mathcal{O}_{\omega}$, we get the following convergence \begin{align} {\bv}_n \to \bv \text{ in }H^1(\omega;\mathbb{R}^2) \label{conv:strongstationary} \end{align} where ${\bv}_n\in V(\Omega_n)$ solves \eqref{weak:stationary} in $\Omega_n$, and ${\bv}\in V(\Omega^*)$ solves \eqref{weak:stationary} in $\Omega^*$. \end{remark} \begin{theorem} Suppose that the assumptions for Theorem \ref{theorem:statewp} hold, then both problems \eqref{problem:timedependent} and \eqref{problem:stationary} admit solutions. \end{theorem} \begin{proof} Note that for any $\Omega\in\mathcal{O}_\omega$, $J_T(\Omega)\ge 0$. Hence, we obtain a minimizing sequence $\{\Omega_{T,n}\}\subset\mathcal{O}_\omega$, i.e., \[ \lim_{n\to\infty}J_T( \Omega_{T,n} ) = \inf_{\Omega\in\mathcal{O}_\omega} J_T(\Omega) =: J_T^* . \] Since $\mathcal{O}_\omega$ is closed under the topology induced by the $L^\infty$-topology of characteristic functions, there exists a subsequence, which we denote similarly as $\{\Omega_{T,n}\}$, such that $\Omega_{T,n}\chiarrow\Omega_T$. Since $J_T$ is convex and continuous with respect to the state variable $\bu$, then \begin{align*} J_T( \Omega_T) \le \liminf_{n\to\infty} J_T( \Omega_{T,n}) = J_T^*. \end{align*} This implies that $\Omega_T\in\mathcal{O}_\omega$ is a minimizer of $J_T$. Similar arguments can be done to show that there exists $\Omega_s\in\mathcal{O}_\omega$ that minimizes $J_s$. \end{proof} \section{Proof of estimate (5)} \label{section:5} In this section, given the recently established existence of shape solutions, we now prove \eqref{ineq:goal}. \begin{theorem} Suppose that ${\blf}\in L^2(\mathcal{D};\mathbb{R}^2)$, ${\bu}_0\in H(\Omega)\cap L^2(\mathcal{D};\mathbb{R}^2)$, and ${\bu}_D \in L^2(\omega;\mathbb{R}^2)$. If $J_T^* := J_T(\Omega_T)$ and $J_s^* := J_s(\Omega_s)$, where $\Omega_T$ and $\Omega_s$ are the solutions of \eqref{problem:timedependent} and \eqref{problem:stationary}, respectively; then there exists $c>0$, independent of $T$, such that \eqref{ineq:goal} holds. \label{theorem:goal} \end{theorem} \begin{proof} Firstly, note that since $J_T^*$ is the minimizer of $J_T$, $J_T^* \le J_T(\Omega_s)$. Hence, $J_T^* - J_s^* \le J_T(\Omega_s) - J_s(\Omega_s)$. We consider the solution ${\bu}_s \in L^\infty(I;H(\Omega_s))\cap L^2(I;V(\Omega_s))$ of \eqref{weak:timedependent} on $\Omega = \Omega_s$. According to Theorem \ref{theorem:statewp}({\it i}), this solution satisfies \eqref{estimate:Linf} and \eqref{estimate:L2} in $\Omega = \Omega_s$. We also consider the element $\delta{\bu}_s(t) : = {\bu}_s(t) - {\bv}_s$ for $t\in [0,T]$, where ${\bv}_s\in V(\Omega_s)$ is the optimal state for the problem \eqref{problem:stationary} that solves \eqref{weak:stationary} in $\Omega = \Omega_s$. This element solves the following variational equation \begin{align} \begin{aligned} &{}_{V^*(\Omega_s)}\langle \partial_t\delta{\bu}_s, {\bphi}\rangle_{V(\Omega_s)} + \nu(\nabla\delta{\bu}_s,\nabla{\bphi})_{\Omega_s} + \gamma(({\bv}_s\cdot\nabla)\delta{\bu}_s,{\bphi})_{\Omega_s} = \gamma ((\delta{\bu}_s\cdot\nabla){\bphi},{\bv}_s)_{\Omega_s}, \end{aligned} \label{weak:sdelta} \end{align} for all ${\bphi}\in V(\Omega_s)$, and almost every $t\in [0,T]$. Furthermore, $\delta{\bu}_s$ satisfies the initial condition $\delta{\bu}_s(0) : = {\bu}_0 - {\bv}_s$. By letting ${\bphi} = \delta{\bu}_s$ in \eqref{weak:sdelta}, we get \begin{align} \begin{aligned} \frac{1}{2}\partial_t\|\delta{\bu}_s(t)\|_{H(\Omega_s)}^2 &+ \nu \|\delta{\bu}_s(t)\|_{V(\Omega_s)}^2 = \gamma((\delta{\bu}_s(t)\cdot\nabla){\bu}_s(t),{\bv}_s)_{\Omega}. \end{aligned} \label{eqn:diagdelta} \end{align} Taking the integral of both sides of \eqref{eqn:diagdelta} over $(0,t)\subset [0,T]$ and employing Young inequality yield \begin{align*} \frac{1}{2}\|\delta{\bu}_s(t)\|_{H(\Omega_s)}^2 + \nu\int_0^t\|\delta{\bu}_s(t)\|_{V(\Omega_s)}^2\du t = \|{\bu}_0 - {\bv}_s\|_{H(\Omega_s)}^2 + \gamma\int_0^t ((\delta{\bu}_s(t)\cdot\nabla){\bu}_s(t),{\bv}_s)_{\Omega}\du t\\ \le \|{\bu}_0 - {\bv}_s\|_{H(\Omega_s)}^2 + \frac{\nu}{2}\int_0^t\|\delta{\bu}_s(t)\|_{V(\Omega_s)}^2\du t + \frac{\gamma^2}{2\nu}\|{\bv}_s\|_{V(\Omega_s)}^2\int_0^t\|{\bu}_s(t)\|_{V(\Omega_s)}^2\du t.& \end{align*} Multiplying 2 to both sides of the computation above, and by utilizing estimates \eqref{estimate:L2} and \eqref{estimate:stationary} we get \begin{align} \begin{aligned} \|\delta{\bu}_s(t)\|_{H(\Omega_s)}^2& + {\nu}\int_0^t\|\delta{\bu}_s(t)\|_{V(\Omega_s)}^2\du t \le 2\|{\bu}_0 - {\bv}_s\|_{H(\Omega_s)}^2 + \frac{\gamma^2}{\nu}\|{\bv}_s\|_{V(\Omega_s)}^2\int_0^t\|{\bu}_s(t)\|_{V(\Omega_s)}^2\du t\\ \le &\, 2\|{\bu}_0 - {\bv}_s\|_{H(\Omega_s)}^2 + \frac{c\gamma^2}{\nu^2}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2\|{\bu}_s\|_{L^2((0,t);V(\Omega_s))}^2\\ \le &\, 2\|{\bu}_0 - {\bv}_s\|_{H(\Omega_s)}^2 + \frac{c\gamma^2}{\nu^2}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2\left(\frac{t}{\nu^2}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2 + \frac{1}{\nu}\|{\bu}_0\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2 \right). \end{aligned} \label{estimate:delta} \end{align} Let us now derive an estimate for $J_T^* - J_s^*$. We use Poincar{\'e} inequality, reverse triangle inequality, and the estimates \eqref{estimate:Linf}, \eqref{estimate:L2}, \eqref{estimate:stationary}, and \eqref{estimate:delta} to get \begin{align*} J_T^* - J_s^* \le& \, J_T(\Omega_s) - J_s(\Omega_s) \le \frac{c\nu}{T}\int_0^T \|\nabla({\bu}_s(t) - {\bu}_D)\|_{L^2(\omega;\mathbb{R}^{2\times 2})}^2 - \|\nabla({\bv}_s - {\bu}_D)\|_{L^2(\omega;\mathbb{R}^{2\times2})}^2\du t\\ \le &\, \frac{c\nu}{T}\int_0^T \big(\|\nabla({\bu}_s(t) - {\bu}_D)\|_{L^2(\omega;\mathbb{R}^{2\times 2})} - \|\nabla({\bv}_s - {\bu}_D)\|_{L^2(\omega;\mathbb{R}^{2\times2})}\big)\\ & \times \big(\|\nabla({\bu}_s(t) - {\bu}_D)\|_{L^2(\omega;\mathbb{R}^{2\times 2})} + \|\nabla({\bv}_s - {\bu}_D)\|_{L^2(\omega;\mathbb{R}^{2\times2})}\big)\du t\\ \le &\, \frac{c\nu}{T}\|\nabla\delta{\bu}_s \|_{L^2(I;V(\Omega_s)}\Big(\int_0^T\|\nabla{\bu}_s(t)\|_{L^2(\omega;\mathbb{R}^2)}^2 \du t + T\|\nabla{\bv}_s \|_{L^2(\omega;\mathbb{R}^2)}^2 + T\|\nabla{\bu}_D\|_{L^2(\omega;\mathbb{R}^2)}^2 \Big)^{\!1/2}\\ \le &\, \frac{c\nu}{T}\|\nabla\delta{\bu}_s \|_{L^2(I;V(\Omega_s)}\Big(\frac{(c_2+1)T}{\nu^2}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2 + \frac{1}{\nu}\|{\bu}_0\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2 + T\|\nabla{\bu}_D\|_{L^2(\omega;\mathbb{R}^2)}^2 \Big)^{\!1/2}\\ \le &\, \frac{c\nu^{1/2}}{T}\Big( 2\|{\bu}_0 - {\bv}_s\|_{H(\Omega_s)}^2 + \frac{c\gamma^2T}{\nu^4}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2 + \frac{c\gamma^2}{\nu^3}\|{\bu}_0\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2 \Big)^{\!1/2}\\ &\times \Big(\frac{(c_2+1)T}{\nu^2}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2+ \frac{1}{\nu}\|{\bu}_0\|_{L^2(\mathcal{D};\mathbb{R}^2)}^2 + T\|\nabla{\bu}_D\|_{L^2(\omega;\mathbb{R}^2)}^2 \Big)^{\!1/2}\\ \le &\, \frac{c}{T}\left( C_1 + C_2\sqrt{T} + C_3 \frac{\gamma T}{\nu^2}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)} \right), \end{align*} where $C_1 : = C_1( {\bu}_0, {\blf}, 1/\nu, \mathcal{D} )$, $C_2 : = C_2( {\bu}_0,{\bu}_D, {\blf}, 1/\nu, \mathcal{D} )$, and $C_3 := C_3( {\bu}_D, {\blf}, 1/\nu, \mathcal{D} )$. Furthermore, from the uniqueness assumption $2^{1/2}\|{\blf}\|_{L^2(\mathcal{D};\mathbb{R}^2)} < \nu^2$, we get \begin{align*} J_T^* - J_s^* \le C\left( \frac{1}{T} + \frac{1}{\sqrt{T}} + \frac{\gamma}{2^{1/2}} \right). \end{align*} Similarly, if we consider the solution $\Omega_T$ of \eqref{problem:timedependent}, then $J_s^* \le J_s(\Omega_T)$, hence $J_s^* - J_T^* \le J_s(\Omega_T) - J_T(\Omega_T)$. Moreover, by considering the optimal state ${\bu}_T \in L^\infty(I;H(\Omega_T))\cap L^2(I;V(\Omega_T))$, and the element ${\bv}_T \in V(\Omega_T)$ that solves \eqref{weak:stationary} in $\Omega = \Omega_T$, we can show, by using the same arguments as in the previous step, that \begin{align} \begin{aligned} J_s^* - J_T^* & \le J_s(\Omega_T) - J_T(\Omega_T) \le c\left( \frac{1}{T} + \frac{1}{\sqrt{T}} + \frac{\gamma}{2^{1/2}} \right) \end{aligned} \label{ineq:omegaT} \end{align} for some $c : = c( {\bu}_0,{\bu}_D, {\blf}, 1/\nu, \mathcal{D} ) > 0$. This proves inequality \eqref{ineq:goal}. \end{proof} As a consequence, we obtain a sense of convergence of solutions of \eqref{problem:timedependent} to a solution of \eqref{problem:stationary}. We formalize this result in the following corollary. \begin{corollary} Suppose that the assumptions in Theorem \ref{theorem:goal} hold; then there exists $\Omega^*\in\mathcal{O}_\omega$, such that $\Omega_T\chiarrow \Omega^*$ as $T\to\infty$, and that $| J_s^* -J_s(\Omega^*)|\le 2^{1/2}c\gamma$, where $c>0$ is the same constant as in Theorem \ref{theorem:goal}. \end{corollary} \begin{proof} Let $\{T_n\}\subset(0,\infty)$ be a sequence such that $T_n\to\infty$ as $n\to\infty$. For each $n\in\mathbb{N}$, $J_{T_n}$ has a minimizer denoted as $\Omega_{T_n}\in\mathcal{O}_\omega$, hence we obtain a sequence $\{\Omega_{T_n}\}\subset\mathcal{O}_\omega$ and an element $\Omega^*\in\mathcal{O}_\omega$ such that $\Omega_{T_n}\chiarrow\Omega^*$. From \eqref{conv:strongstationary}, ${\bv}_{T_n}\to {\bv}^*$ in $H^1(\omega;\mathbb{R}^2)$, where ${\bv}_{T_n}\in V(\Omega_{T_n})$ solves \eqref{weak:stationary} in $\Omega = \Omega_{T_n}$ and ${\bv}^*\in V(\Omega^*)$ is a solution of \eqref{weak:stationary} in $\Omega=\Omega^*$. From \eqref{ineq:goal}, \eqref{ineq:omegaT} and $J_{T_n}^* := J_{T_n}(\Omega_{T_n})$, we now get \begin{align*} | J_s^* -J_s(\Omega^*)| \le&\, |J_s^* - J_{T_n}^*| + |J_{T_n}(\Omega_{T_n}) - J_s(\Omega_{T_n})| + |J_s(\Omega_{T_n}) - J_s(\Omega^*)|\\ \le&\, 2c\left( \frac{1}{T_n} + \frac{1}{\sqrt{T_n}} + \frac{\gamma}{2^{1/2}} \right) + |J_s(\Omega_{T_n}) - J_s(\Omega^*)|. \end{align*} For the term $|J_s(\Omega_{T_n}) - J_s(\Omega^*)|$, we have the following computations \begin{align*} |J_s(\Omega_{T_n})& - J_s(\Omega^*)| \le c\nu \left|\|{\bv}_{T_n} - {\bu}_D\|_{H^1(\omega;\mathbb{R}^2)}^2 - \|{\bv}^* - {\bu}_D\|_{H^1(\omega;\mathbb{R}^{2})}^2 \right|\\ \le &\, c\nu \left|\|{\bv}_{T_n} - {\bu}_D\|_{H^1(\omega;\mathbb{R}^2)} - \|{\bv}^* - {\bu}_D\|_{H^1(\omega;\mathbb{R}^{2})} \right|\times \left|\|{\bv}_{T_n} - {\bu}_D\|_{H^1(\omega;\mathbb{R}^2)} + \|{\bv}^* - {\bu}_D\|_{H^1(\omega;\mathbb{R}^{2})} \right|\\ \le &\, c\nu \|{\bv}_{T_n} - {\bv}^*\|_{H^1(\omega;\mathbb{R}^2)}\big( \|{\bv}_{T_n}\|_{H^1(\omega;\mathbb{R}^2)} + \|{\bv}^*\|_{H^1(\omega;\mathbb{R}^2)} + \|{\bu}_D\|_{H^1(\omega;\mathbb{R}^2)} \big) \end{align*} By letting $n\to \infty$ and from \eqref{conv:strongstationary}, the inequality above implies that $|J_s(\Omega_{T_n}) - J_s(\Omega^*)|\to 0$, and therefore \[| J_s^* -J_s(\Omega^*)|\le 2^{1/2}c\gamma.\] \end{proof} \section{Numerical Realization}\label{section:6} In this section we illustrate the convergence numerically. For simplicity, we only consider the $L^2$ version of the objective functions, i.e., we consider \begin{align} \left. \begin{aligned} \min_{\Omega\in \mathcal{O}_{\omega}} J_{T,\times}(\Omega) := \frac{\nu}{T}&\int_0^T \|{\bu}(t) - {\bu}_D\|_{L^2(\omega;\mathbb{R}^{2})}^2 \du t\quad \text{subject to }\eqref{system:timedependent}, \end{aligned} \right. \label{problem:extimedependent} \end{align} and \begin{align} \left. \begin{aligned} \min_{\Omega\in \mathcal{O}_{\omega}} J_{s,\times}(\Omega) :=\nu\|{\bv} - {\bu}_D\|_{L^2(\omega;\mathbb{R}^{2})}^2\quad \text{subject to }\eqref{system:stationary}. \end{aligned} \right. \label{problem:xstationary} \end{align} Note that the analyses done in the previous sections hold true due to Poincar{\'e} inequality. To solve the problem numerically, we shall rely on a gradient descent method induced by the identity perturbation operator. In particular, for a given domain $\Omega\in\mathcal{O}_{\omega}$, we consider the following family of perturbed domains $\{\Omega_\tau:=T_\tau(\Omega): 0\le\tau\le\tau_0 \}\subset\mathcal{O}_\omega$, where $T_\tau:\mathcal{D}\to \mathbb{R}^2$ is defined as $T_\tau(x) = x + \tau\theta(x)$ for any $x\in \mathcal{D}$ and $\tau\in[0,\tau_0]$, where $\theta\in \Theta :=\{\vartheta\in C^{1,1}(\mathcal{D};\mathbb{R}^2): \theta = 0 \text{ on }\partial\mathcal{D} \}$ is known as the deformation field and $\tau_0$ is a given threshold parameter so as to make sure that $\{\Omega_\tau:=T_\tau(\Omega): 0\le\tau\le\tau_0 \}\subset\mathcal{O}_\omega$ and that the translated states are well-posed. For more details, we refer to \cite{zolesio2011} or \cite{sokolowski1992}. We compute the shape derivative of the objective functions in the sense of Hadamard's, that is, the shape derivative of a given objective function $\mathcal{J}:\mathcal{O}_\omega\to\mathbb{R}$ in the direction of $\theta\in\Theta$ is denoted by $d\mathcal{J}(\Omega)\theta$ and is defined as \[ d\mathcal{J}(\Omega)\theta = \lim_{\tau\searrow0}\frac{\mathcal{J}(\Omega_\tau)-\mathcal{J}(\Omega)}{\tau}. \] The shape derivatives of $J_{T,\times}$ and $J_{s,\times}$ have been computed by several authors, hence we skip such step in this exposition. Refer to \cite{gao2008,ito2008,kasumba2013b,pironneau2010} among others for such computations. Nevertheless, we give such derivatives below: \begin{align} dJ_{T,\times}(\Omega)\theta &=\frac{\nu}{T} \int_0^T\left[\int_{\partial\Omega}\left( \frac{\partial{\bu}(t)}{\partial{\bn}}\cdot\frac{\partial{\bw(t)}}{\partial{\bn}} \right)\theta\cdot{\bn}\du\sigma +\int_\Omega \nabla\cdot( \chi_\omega|{\bu}(t) - {\bu}_D|^2\theta)\du x \right]\du t,\\ dJ_{s,\times}(\Omega)\theta &={\nu} \int_{\partial\Omega}\left( \frac{\partial{\bv}}{\partial{\bn}}\cdot\frac{\partial{\bz}}{\partial{\bn}} \right)\theta\cdot{\bn}\du\sigma +\int_\Omega \nabla\cdot( \chi_\omega|{\bv} - {\bu}_D|^2\theta)\du x , \end{align} where ${\bw}\in L^\infty(I;H(\Omega))\cap L^2(I;V(\Omega))$ is the adjoint variable for the time dependent problem that solves the following variational problem \begin{align} &\begin{aligned} {}_{V^*(\Omega)}\langle -\partial_t{\bw}(t), {\bphi}\rangle_{V(\Omega)} + &\nu(\nabla{\bw}(t),\nabla{\bphi})_\Omega + \gamma(({\bphi}\cdot\nabla){\bu}(t),{\bw}(t))_{\Omega}\\ &- \gamma(({\bu}(t)\cdot\nabla){\bw}(t),{\bphi})_{\Omega} = 2({\bu}(t)-{\bu}_D,{\bphi})_{\omega} \quad\forall{\bphi}\in V(\Omega), \end{aligned} \label{weak:timeadjoint} \end{align} and satisfies the transversality condition $w(T) = 0$, while ${\bz}\in V(\Omega)$ solves the following weak equation \begin{align} & \nu(\nabla{\bz},\nabla{\bphi})_\Omega + \gamma(({\bphi}\cdot\nabla){\bv},{\bz})_{\Omega}- \gamma(({\bv}\cdot\nabla){\bz},{\bphi})_{\Omega} = 2({\bv}-{\bu}_D,{\bphi})_{\omega} \quad\forall{\bphi}\in V(\Omega). \label{weak:adjoint} \end{align} Note that we can express both derivatives in the form of the Zolesio-Hadamard structure, i.e., \[ d\mathcal{J}(\Omega)\theta = \int_{\partial\Omega} \nabla J{\bn}\cdot\theta \du\sigma, \] where $\nabla J$ is called the shape gradient. In particular, by virtue of the divergence theorem, we get the following shape gradients \begin{align*} \nabla J_{T,\times} &= \frac{\nu}{T}\int_0^T \frac{\partial{\bu}(t)}{\partial{\bn}}\cdot\frac{\partial{\bw(t)}}{\partial{\bn}} + \chi_\omega|{\bu}(t) - {\bu}_D|^2 \du t,\\ \nabla J_{s,\times} &= {\nu}\left[ \frac{\partial{\bv}}{\partial{\bn}}\cdot\frac{\partial{\bz}}{\partial{\bn}} + \chi_\omega|{\bv} - {\bu}_D|^2 \right], \end{align*} for the time-dependent and stationary objective functions, respectively. These shape gradients will be the basis of our descent directions, that is, by choosing $\theta = -\nabla J{\bn}$ in $\partial\Omega$ we are assured that \[ d\mathcal{J}(\Omega)\theta = -\|\theta\|^2_{L^2(\partial\Omega;\mathbb{R}^2)}. \] Numerically though, such choice of descent direction may cause oscillations on the perturbed domains $\Omega_\tau$. Because of that, we shall resort to a traction method that intends to extend the choice $\theta = -\nabla J{\bn}$ to the whole domain, say for example by a Robin boundary problem which we shall briefly discuss later. The variational equations are solved using Galerkin finite element methods. For the nonlinearity of the stationary Navier--Stokes equations, we employ Newton's method \cite{girault1986}, while for the dynamic Navier-Stokes equations and the time-dependent adjoint equations we utilize a Lagrange-Galerkin method based on characteristics (see for example \cite{notsu2016}). Since the stationary adjoint equation is a linear system, we utilize the usual Galerkin method. For the resolution of the deformation fields, we shall utilize an $H^1$-gradient based method \cite{azegami2006}. For the deformation field of the stationary problem, we solve the following variational problem: \begin{align} \varepsilon (\nabla\theta,\nabla\bphi)_\Omega + (\theta,\bphi)_{\partial\Omega} = -(\nabla J_{s,\times},{\bphi})_{\partial\Omega}\quad \forall{\bphi}\in H^1_0(\mathcal{D};\mathbb{R}^2). \label{deform:stationary} \end{align} Meanwhile, due to the time-dependent nature of the shape gradient of \eqref{problem:timedependent} we propose a time-averaged deformation field, in particular, by letting $K(\bu,\bw)(t)$ be such that $\nabla J_{T,\times} =\frac{1}{T} \int_0^T K(\bu,\bw)(t)\du t$, then we aim to solve for $\vartheta(t)\in H^1_0(\mathcal{D};\mathbb{R}^2) $ that satisfies, for any $t\in[0,T]$, the equation \begin{align} \varepsilon (\nabla\vartheta(t),\nabla\bphi)_\Omega + (\vartheta(t),\bphi)_{\partial\Omega} = -(K(\bu,\bw)(t),{\bphi})_{\partial\Omega}\quad \forall{\bphi}\in H^1_0(\mathcal{D};\mathbb{R}^2). \label{deform:instationary} \end{align} From these time-dependent {\it vector fields}, we then determine the deformation field by $\theta = \frac{1}{T}\int_0^T\vartheta\du t$. Note that in both equations \eqref{deform:stationary} and \eqref{deform:instationary}, $\varepsilon>0$ can be chosen small enough so that $\theta \approx -\nabla J_{s,\times}$ and $\vartheta(t)\approx -K({\bu},{\bw})(t)$ on $\partial\Omega$. \subsection{Finite-Dimensional Approximation Schemes and Optimization Algorithms} The variational problems, as previously mentioned, will be solved using finite element methods. Let $\mathcal{T}_h = \{K\}$ be a regular triangulation of a domain $\Omega\in\mathcal{O}_\omega$ so that $\cup_{\mathcal{T}_h} K =:\Omega_h\subset\Omega $ and that there exists $\mathcal{T}_{h,\omega}\subset\mathcal{T}_h$ such that $\cup_{\mathcal{T}_{h,\omega}} K=:\omega_h$ is a discretization of $\omega$, and $\mathbb{P}^k(K;\mathbb{R}^d)$ be the space of $k^{th}$ degree polynomials from $K$ onto $\mathbb{R}^d$, we consider the following space Taylor-Hood finite element spaces \begin{align*} X_h &:= \{{\bv}_h\in C(\overline{\Omega};\mathbb{R}^2): {\bv}_h|_{K}\in \mathbb{P}^2(K;\mathbb{R}^2),\, \forall K\in\mathcal{T}_h \},\\ M_h &:= \{{q}_h\in C(\overline{\Omega};\mathbb{R}): {\bv}_h|_{K}\in \mathbb{P}^1(K;\mathbb{R}),\, \forall K\in\mathcal{T}_h \}, \end{align*} $V_h := X_h \cap H_0^1(\Omega;\mathbb{R}^2)$, $W_h:= X_h\cap H^1(\Omega;\mathbb{R}^2)$, $Q_h:= M_h\cap L^2(\Omega;\mathbb{R})$, and $Y_h := V_h\times M_h$. For approximating the solution to the state equation \eqref{weak:stationary}, let $\mathcal{F}_h:Y_h\to Y_h^*$ be an operator defined as \begin{align*} {}_{Y_h^*}\langle \mathcal{F}_h({\bv},q),({\bphi},\psi)\rangle_{Y_h} := \nu(\nabla{\bv},\nabla{\bphi})_{\Omega_h}& + \gamma(({\bv}\cdot\nabla){\bv},{\bphi})_{\Omega_h} - (\nabla\cdot{\bv},\psi)_{\Omega_h} - (\nabla\cdot{\bphi},q)_{\Omega_h} - ({\blf},{\bphi})_{\Omega_h}. \end{align*} Since $b({\bv},\psi) := -(\nabla\cdot{\bv},\psi)_{\Omega_h} $ satisfies the inf-sup condition in our particular choice of finite element spaces, we are assured of the existence of the solution $({\bv}_h,q_h)\in Y_h$ to $\mathcal{F}_h({\bv}_h,q_h) = 0 $ in $Y_h^*$. Furthermore, the first coordinate of the solution $({\bv}_h,q_h)\in Y_h$ satisfies \eqref{weak:stationary} in its discretized form. Of course, the integrals on the discrete domain $\Omega_h$ are understood as discrete integrals, say for example by Gaussian quadrature. Due to the nonlinearity of $\mathcal{F}_h$, its root will be approximated using Newton's scheme, so that for an initial point $({\bv}^0_h,q^0_h)\in Y_h$, a sequence $\{({\bv}^k_h,q^k_h)\}\subset Y_h$ is generated by solving the equation \begin{align} ({\bv}^{k+1}_h,q^{k+1}_h) = ({\bv}^k_h,q^k_h) - [\mathcal{F}_h'({\bv}^k_h,q^k_h)]^{-1}\cdot \mathcal{F}_h({\bv}^k_h,q^k_h), \label{newton:dualform} \end{align} or equivalently, by writing $(\delta{\bv}^k_h,\delta q^k_h) = ({\bv}^{k+1}_h,q^{k+1}_h)-({\bv}^k_h,q^k_h)$, \begin{align} {}_{Y_h^*}\langle \mathcal{F}_h'({\bv}^k_h,q^k_h)(\delta{\bv}^k_h,\delta q^k_h),({\bphi},\psi)\rangle_{Y_h} = - {}_{Y_h^*}\langle \mathcal{F}_h({\bv}^k_h,q^k_h),({\bphi},\psi)\rangle_{Y_h} \label{newton:primalform} \end{align} The existence of solutions to \eqref{newton:dualform} and \eqref{newton:primalform} are due to the isomorphism of $\mathcal{F}_h\in\mathcal{L}(Y_h,Y_h^*)$ which is a consequence of the uniqueness assumption $2^{1/2}\|{\blf}\|_{L^2*(\mathcal{D};\mathbb{R}^2)}<\nu^2$. We end the generation of the elements of the sequence $\{({\bv}^k_h,q^k_h)\}\subset Y_h$ when we reach a certain tolerance which is measured by $\|\delta{\bv}^k \|_{V(\Omega)}/\|{\bv}^k \|_{V(\Omega)}$. The approximation ${\bz}_h\in V_h$ of the adjoint variable ${\bz}\in V(\Omega)$, on the other hand, is done by solving the variational equation \begin{align} {}_{Y_h^*}\langle \mathcal{F}_h'({\bv}^{\star}_h,q^{\star}_h)({\bphi},\psi),({\bz}_h,\pi_h)\rangle_{Y_h} = 2({\bv}_h^{\star} - {\bu}_{D},{\bphi})_{\omega_h} \quad \forall({\bphi},\psi)\in Y_h, \label{newton:adjoint} \end{align} where $({\bv}^{\star}_h,q^{\star}_h)\in Y_h$ is the approximation of the solution of \eqref{weak:stationary} yielding from Newton's scheme, and $\pi_h\in Q_h$ is the adjoint pressure. For the time-dependent problems, we utilize Lagrange-Galerkin methods. An upwind Lagrange-Galerkin method is intended to solve the state equation \eqref{weak:timedependent} while a downwind method is for the adjoint equation \eqref{weak:timeadjoint}. Let us define the material derivative $D/Dt$ by \begin{align*} \frac{D[\bullet]}{Dt} := \frac{\partial[\bullet]}{\partial t} + \gamma({\bu}\cdot\nabla)[\bullet]. \end{align*} We shall consider characteristic lines that solve the differential equation \begin{align} \frac{d\boldsymbol{x}}{dt} = \gamma{\bu}(\boldsymbol{x}(t),t), \label{ode:char} \end{align} so that for sufficiently smooth ${\bu}$, and velocity field ${\bw}:\Omega\times[0,T]\to\mathbb{R}^2$ \begin{align*} \frac{D{\bw}}{Dt} = \frac{d}{dt}{\bw}(\boldsymbol{x}(t),t). \end{align*} Let $\Delta t = T/N$ be a time increment over $N$ subintervals of the interval $[0,T]$, $t^n:=n\Delta$, and $h:\Omega\times[0,T]\to \mathbb{R}^d$, we denote the evaluation $h(\cdot,t^n)$ by $h^n$. Let $x\in \mathbb{R}^2$. The solution to \eqref{ode:char} with initial value $\boldsymbol{x}(t^n) = x$ will be denoted as $\boldsymbol{x}(\cdot;x,t^n)$. From a velocity ${\bu}$, we will utilize the upwind point of $x\in\mathbb{R}^2$ with respect to ${\bu}$ which is defined as and denoted by $\boldsymbol{x}_u({\bu},\Delta t)(x) : = x-{\bu}\Delta t$, and the downwind point of $x$ with respect to ${\bu}$ defined as and denoted by $\boldsymbol{x}_d({\bu},\Delta t)(x) := x + {\bu}\Delta t$. From these directions, we have the following approximations \begin{align*} \boldsymbol{x}_u({\bu}^{n-1},\Delta t) & \approx \boldsymbol{x}(t^{n-1};x,t^n),\\ \boldsymbol{x}_d({\bu}^{n+1},\Delta t) & \approx \boldsymbol{x}(t^{n+1};x,t^n). \end{align*} We can then consider a first order forward in-time approximation of the material derivative at $(x,t^n)$ by \begin{align*} \frac{D \bw}{D t}(x,t^n) & = \frac{d}{dt}{\bw}(\boldsymbol{x}(t;x,t^n),t)\big|_{t = t_n}\\ & = \frac{{\bw}(\boldsymbol{x}(t^n;x,t^n),t^n) - {\bw}(\boldsymbol{x}(t^{n-1};x,t^n),t^{n-1})}{\Delta t}\\ & \approx \frac{{\bw}^n - {\bw}^{n-1}\circ\boldsymbol{x}_u({\bu}^{n-1},\Delta t)}{{\Delta t}}(x). \end{align*} Meanwhile, for the first order backward in-time approximation, we have \begin{align*} \frac{D \bw}{D t}(x,t^n) & = \frac{d}{dt}{\bw}(\boldsymbol{x}(t;x,t^n),t)\big|_{t = t_n}\\ & = \frac{{\bw}(\boldsymbol{x}(t^{n+1};x,t^n),t^{n+1}) - {\bw}(\boldsymbol{x}(t^{n};x,t^n),t^{n})}{\Delta t}\\ & \approx \frac{{\bw}^{n+1}\circ\boldsymbol{x}_d({\bu}^{n+1},\Delta t) - {\bw}^n}{{\Delta t}}(x). \end{align*} From these, we can approximate the solutions to \eqref{weak:timedependent} and \eqref{weak:timeadjoint} as follows. For the Navier--Stokes equations \eqref{weak:timedependent}, by letting $(\bu_h^0,p_h^0)\in Y_h$ the projection of $(\bu_0,0)\in (H(\Omega)\cap L^2(\mathcal{D};\mathbb{R}^2))\times L^2_0(\Omega;\mathbb{R})$, we generate the sequence $\{({\bu}_h^n,p_h^n)\}_{n=1}^N\subset Y_h$ that satisfies, for each $n = 1,2,\ldots,N$, the equation \begin{align} \begin{aligned} \Big(\frac{{\bu}_h^n - {\bu}_h^{n-1}\circ\boldsymbol{x}_u({\bu}_h^{n-1},\Delta t)}{{\Delta t}},&\bphi \Big)_{\Omega_h} + \nu(\nabla{\bu}_{h}^n,\nabla{\bphi})_{\Omega_h}\\ & - (\nabla\cdot{\bphi},p_h^n )_{\Omega_h} - (\nabla\cdot{\bu}_h^n,\psi)_{\Omega_h} = ({\blf},{\bphi})_{\Omega_h} \end{aligned}\quad\forall({\bphi},\psi)\in Y_h. \label{LG:navstokes} \end{align} While the adjoint equation \eqref{weak:timeadjoint} is approximated in a backward manner, so that for $({\bw}_h^N,\pi_h^N) = (0,0)\in Y_h$, the sequence $\{({\bw}_h^m,\pi_h^n)\}_{n=0}^{N-1}\subset Y_h$ is generated by the difference equation \begin{align} \begin{aligned} \Big(\frac{{\bw}_h^n - {\bw}_h^{n+1}\circ\boldsymbol{x}_d({\bu}_h^{n+1},\Delta t)}{{\Delta t}}&,\bphi \Big)_{\Omega_h} + \nu (\nabla{\bw}_h^n,\nabla{\bphi})_{\Omega_h} + \gamma([\nabla{\bu}_h^n]^\top{\bw}_h^n,{\bphi} )_{\Omega_h}\\ -& (\nabla\cdot{\bphi},\pi_h^n )_{\Omega_h} - (\nabla\cdot{\bw}_h^n,\psi)_{\Omega_h} = 2({\bu}_h^n - {\bu}_{D},{\bphi})_{\omega_h} \end{aligned}\ \ \forall({\bphi},\psi)\in Y_h. \label{LG:adjoint} \end{align} Due to the linear nature of the Robin problems \eqref{deform:stationary} and \eqref{deform:instationary}, we can solve them quite easily. In particular, for the approximation of the deformation field of the stationary problem, we have the following discretized equation: \begin{align} \varepsilon(\nabla\theta_h,\nabla\varphi)_{\Omega_h} + (\theta_h,\varphi)_{\partial\Omega_h} = - (\nabla J_{s,\times,h},\varphi)_{\partial\Omega_h} \quad\forall \varphi\in W_h, \label{discretedeform:stationary} \end{align} where $\nabla J_{s,\times,h}$ is the evaluation of the shape gradient $\nabla J_{s,\times}$ at the discrete solutions ${\bv}_h^\star$, ${\bz}_h$. Similarly, we solve the Robin problems, for each $t^n = n\Delta$ (same as the time discretization previously discussed), as \begin{align} \varepsilon(\nabla\vartheta_h(t^n),\nabla\varphi)_{\Omega_h} + (\vartheta_h(t^n),\varphi)_{\partial\Omega_h} = -(K({\bu}_h^n,{\bw}_h^n)(t^n),\varphi)_{\partial\Omega_h}\quad \forall\varphi\in W_h. \label{discretedeform:instationary} \end{align} We then solve the time-averaged deformation field for the time-dependent problem using a trapezoidal rule given by \begin{align} \theta_h = \frac{1}{N}\left( \frac{1}{2}\vartheta_h(t^0) + \sum_{k=1}^{N-1}\vartheta_h(t^k) + \frac{1}{2}\vartheta_h(t^N)\right). \label{deformtrap} \end{align} For the choice of the gradient descent step size, we utilize an Armijo-Goldstein-type line search method. In particular, for a general objective function $\mathcal{J}$ (may it be the stationary or the time-dependent objective function) with the deformation field $\theta$, for some $\alpha\in(0,1]$ we initially choose the step size \begin{align} \tau = \alpha\frac{\mathcal{J}(\Omega)}{\|\theta\|_{L^2(\partial\Omega;\mathbb{R}^2)}}. \label{stepsize} \end{align} Since this choice of step size is not sufficient to ensure the descent of the objective function, we employ a backtracking scheme, i.e., we choose the smallest $i\in\mathbb{N}$ so that $\mathcal{J}(T_{i}(\Omega)) < \mathcal{J}(\Omega)$ and that $\omega\subset T_i(\Omega)$, where $T_{i} (x) = x + [(0.5)^i\tau]\theta(x)$. With the ingredients presented above, we lay down the iterative scheme upon which we solve the minimization problems. For the stationary problem, we have the following algorithm\footnote{The steps except that of {\bf Step 0} are inside a \texttt{for loop}.}: \begin{pethau} \item[Step 0.] Choose an initial guess $\Omega_h^0$, and determine the solution ${\bv}_{h}^{\star}(\Omega_h^0)$ of the state equation via Newton's scheme \eqref{newton:primalform} in $\Omega_h^0$. \item[Step 1.] Evaluate $J_{s,\times}(\Omega_h^k)$, and solve for the adjoint variable ${\bz}_h(\Omega_h^k)$ in $\Omega_h^k$ from \eqref{newton:adjoint} and the deformation field $\theta_h(\Omega_h^k)$ from \eqref{discretedeform:stationary} in $\Omega_h^k$; \item[Step 2.] Update the domain by $\Omega_h^{k+1} := T_i(\Omega_k)$, solve for the state solution ${\bv}_h^{\star}(\Omega_{k+1})$ from Newton's scheme \eqref{newton:primalform} in $\Omega_{k+1}$, and evaluate $J_{s,\times}(\Omega_h^{k+1})$. \item[Step 3.] If $J_{s,\times}(\Omega_h^{k+1})<J_{s,\times}(\Omega_h^k)$ accept $\Omega_h^{k+1}$ as the new domain, else increase the value of $i\in \mathbb{N}$ and repeat {\bf Step 2}. \end{pethau} For the time dependent problem, let us first discuss the method by which we evaluate the objective function $J_{T,\times}$. In fact, we shall use a trapezoidal rule, i.e., using the same time discretization as above and a discretized domain $\Omega_h$ we have \begin{align} J_{T,\times}(\Omega_h) \approx \frac{1}{N}\left( \frac{1}{2} \int_{\omega_h} |{\bu}_h^0 - {\bu}_D|^2 \du x + \sum_{k=1}^{N-1} \int_{\omega_h} |{\bu}_h^k - {\bu}_D|^2 \du x + \frac{1}{2}\int_{\omega_h} |{\bu}_h^N - {\bu}_D|^2 \du x\right), \end{align} where $\{{\bu}_h^k\}_{k=0}^N$ is the Lagrange--Galerkin approximation of the Navier--Stokes solution from \eqref{LG:navstokes}. From these, we present the following algorithm: \begin{pethau} \item[Step 0.] Choose an initial guess $\Omega_h^0$, and determine the solution $\{{\bu}_{h}^j(\Omega_h^0)\}_{j=0}^N$ of the state equation from \eqref{LG:navstokes} in $\Omega_h^0$. \item[Step 1.] Evaluate $J_{T,\times}(\Omega_h^k)$, and solve for the adjoint variable $\{{\bw}_h^j(\Omega_h^k)\}_{j=0}^N$ in $\Omega_h^k$ from \eqref{LG:adjoint} and the deformation field $\theta_h(\Omega_h^k)$ from \eqref{discretedeform:instationary} and \eqref{deformtrap}; \item[Step 2.] Update the domain by $\Omega_h^{k+1} := T_i(\Omega_k)$, solve for the state solution $\{{\bu}_{h}^j(\Omega_h^0)\}_{j=0}^N$ from \eqref{LG:navstokes} in $\Omega_{k+1}$, and evaluate $J_{s,\times}(\Omega_h^{k+1})$. \item[Step 3.] If $J_{s,\times}(\Omega_h^{k+1})<J_{s,\times}(\Omega_h^k)$ accept $\Omega_h^{k+1}$ as the new domain, else increase the value of $i\in \mathbb{N}$ and repeat {\bf Step 2}. \end{pethau} \subsection{Numerical Implementation} The finite element problems are solved using \texttt{FreeFem++} \cite{hecht2012} on an Intel Core i7 CPU $@$ 3.80 GHz with 64GB RAM and the codes are stored in the repository \url{https://github.com/jhsimon/NSShapeOptiLongTime}. For simplicity, we choose the source function to be ${\blf} = \frac{1}{10}(y^3,-x^3)$, the desired function ${\bu}_D$ is determined by solving the stationary Stokes version of the state equations (i.e., with $\gamma=0$) with $\nu = 1/5$ in a domain enclosed in a circle that satisfies $x^2 + y^2 = 4$, and the domain $\omega\subset\mathbb{R}^2$ is the set $\{(x,y)\in\mathbb{R}^2: x^2+y^2\le 1 \}$. The shape optimization problems \eqref{problem:extimedependent} and \eqref{problem:xstationary} - including the state equations \eqref{weak:timedependent} and \eqref{weak:stationary} that respectively constrain them- are then solved with the assumption that $\nu = \gamma = 1$. Due to the uniqueness assumption for the stationary Navier--Stokes equations, we know that the solution yielding from Newton's scheme is a local solution in a branch of nonsingular solutions around the trivial solution ${\bv} \equiv 0$ \cite{girault1986}. From this point of view, we can choose the initial velocity of the time-dependent Navier--Stokes to be ${\bu}_0=0$. For the resolution of the deformation fields, the value $\varepsilon=0.05$ is chosen for both \eqref{deform:stationary} and \eqref{deform:instationary}, and the value $\alpha = 1$ is used for the step size coefficient in \eqref{stepsize}. For simplicty, the initial domain $\Omega^0$ is defined as the region bounded by the ellipse $9x^2 + 4y^2 = 36$ and is discretized with constant diameter $h = 1/10$. We also mention that due to the tendency of the deformed domains to be degenerate, we employ a mesh refinement at the end of each iterative loop so that the new domain is regular with diameter $h = 1/10$. Lastly, we terminate the optimization loop when $[\mathcal{J}(\Omega_h^{k+1})-\mathcal{J}(\Omega_h^{k}) ] /\mathcal{J}(\Omega_h^{k+1}) < \texttt{tol} = 1\times 10^{-6}$. For the stationary problem, Figure \ref{fig1}(A) shows the evolution of the boundary $\partial\Omega$ which is initially chosen as an ellipse and turned into a circle with radius of approximately 3.25 units after 20 iterations which we denote as $\partial\Omega_h^{20} = \partial\Omega_{s,h}$. Figure \ref{fig1}(B) on the other hand shows the decreasing trend of the objective functional on each iterate. \begin{figure}[h] \centering \includegraphics[width=1\textwidth]{figures/Fig1.eps} \caption{ Evolution of the boundary $\partial\Omega$ from the iterative scheme (A), and the normalized trend of the objective function values at each iteration (B). } \label{fig1} \end{figure} To show the convergence of the solutions of the time dependent problems, we implement the numerical simulations with varying terminal time given as $T = 1,2,4,8,16,32,64,$ and $128$, upon which the time discretization is done with a fixed time increment $\Delta t = 0.2$. For each final time $T$, we denote the final solution as $\Omega_{T,h}$, with boundary $\partial\Omega_{T,h}$. We compare the numerical final solutions in Figure \ref{fig2}(A), where it can be seen that the boundary of the solutions $\partial\Omega_{T,h}$ becomes closer to the boundary $\partial\Omega_{s,h}$ as the terminal time $T$ gets bigger. Figure \ref{fig2}(B) shows the log-log plot of the gap $|J_{T,\times}-J_{s,\times}|$ versus the terminal time $T$. In the same figure, we plotted the log-log plots of $\mathcal{O}(T^{-1})$ and $\mathcal{O}(T^{-1/2})$ to have a gauge on the experimental order of convergence. As expected, we can see that for lower values of $T$, the order of convergence nearly follows that of $\mathcal{O}(T^{-1/2})$, while for the higher values of $T$ we observe a convergence that is similar with that of $\mathcal{O}(T^{-1})$. \begin{figure}[h] \centering \includegraphics[width=1\textwidth]{figures/Fig2.eps} \caption{ Illustration of how the boundary of the shape solution of the time-dependent problem \eqref{problem:extimedependent} converges to the boundary of the solution of the equilibrium problem \eqref{problem:xstationary} as $T$ gets larger (A); log-log plots of $|J_{T,\times}-J_{s,\times}|$, $\mathcal{O}(T^{-1})$, and $\mathcal{O}(T^{-1/2})$(B); trend of the Hausdorff distance between the solutions of \eqref{problem:extimedependent} and \eqref{problem:xstationary} (C). } \label{fig2} \end{figure} Lastly, we quantified the convergence of the boundaries $\partial\Omega_{T,h}$ to the boundary $\partial\Omega_{s,h}$ by the virtue of the Hausdorff distance, which is - for any set $A,B$ - denoted and computed as \begin{align} d_{H}(A,B) : = \max\left\{\sup_{x\in A}d(x,B),\sup_{y\in B}d(A,y) \right\} \end{align} where the distance between a set $B$ and a point $x$ is defined as $d(x,B) = \displaystyle\inf_{y\in B}d(x,y)$, and where $d(x,y)$ denotes the distance between $x$ and $y$, which in this case is the usual Euclidean distance. From Figure \ref{fig2}(C), we observe that the Hausdorff distance indeed gets smaller as the value of $x$, which is such that $T = 2^x$, increases. Before we end this section, let us point out that due to the choice of the viscosity constant $\nu$ in the resolution of the state equations, the advective effects on the fluid is almost negligible. In short, the flow almost mimics that of the Stokes equations. For this reason, we observe an {\it almost full convergence} which is theoretically true for the Stokes versions, and in fact the elliptic/parabolic versions, of our shape design problems. \section{Conclusion} In this work, we were able to establish an estimate for the gap between the minimum value of the objective functionals of the dynamic and stationary problems. In particular, we were able to show that the gap decreases as the time horizon gets large. Furthermore, we established that as the time horizon goes to infinity the shape solution converges to a domain that is around the neighborhood of a solution of the stationary problem. Lastly, we numerically illustrated the convergence by virtue of the traction method. Here, we have shown that visually, and quantitatively -- by measuring the gap between the optimal value of the stationary and the time-dependent shape design problems with varying terminal time $T$ and with the help of the Hausdorff distance -- the solutions to the dynamic problem indeed converge to the solution of the stationary problem as the time horizon gets bigger. As mentioned before, we analyzed the systems where the source function is independent of the time variable. Nevertheless, one can also study a more complex problem where the said function is time-dependent but one should also assume some convergence assumption as $T\to\infty$. One can also impose such assumptions on the desired velocity ${\bu}_D$. Lastly, one can also study where the shape also depends on time, upon which the turnpike property now takes place. Such property has never been theoretically proven for shape design problems but has been numerically illustrated by \cite{lance2019}. \section*{Acknowledgments} This work is supported by the Japanese Government (MEXT) Scholarship. The author would also like to acknowledge Professor Hirofumi Notsu for his insights during the course of this work. \bibliographystyle{siamplain}
\section{Introduction} \label{intro} This article explain the morphophonological aspects of \emph{Mapudüngun} which have to be taken into account when developing a rule based morphological analyser, which is our purpose. The implementation we have chosen is by means of Finite State Transducers (FST). The language that feed these machines (the FST) is made out of complex regular expressions which need to encode from the language of interest, \emph{Mapudüngun} in this case, the way the different elements (roots and suffixes) interact, the conditions they have to fulfil in doing so, and the changes this very same interaction produces among the elements. So, this work tells how we have translated \emph{Mapudüngun}’s morphophonological behaviour into regular expressions, which have to be as accurate as possible in order to obtain optimal results by means of an FST analyser\footnote{The system user interface is is available on\\ \href{http://www.chandia.net/dungupeyem}{http://www.chandia.net/dungupeyem} and the code is on\\ \href{http://www.chandia.net/dungupeyem/repositorio}{http://www.chandia.net/dungupeyem/repositorio}}. Along this section (\ref{sec:01}) we present the \emph{Mapuche} language, its typology and morphology are the central topics, which include the suffixes of this language and how the verbs are formed, from the stem to the final form, along with some exceptions and particularities. Section \ref{sec:23}, p. \pageref{sec:23}, is centred in the computational technology we use and the specific tool to achieve our goal. We begin by explaining what computational morphology implies, and how it can be handled by Finite State Transducers (FST). FOMA is the FST compiling program we use to generate our tools, so we do a review of it. And finally, we refer to the first steps in the incorporation of the \emph{Mapudüngun} elements into the computational flow of work. Section \ref{sec:38}, p. \pageref{sec:38} presents the embodiment of the processes and phenomena explained in the section describing \emph{Mapudüngun} into the code the compiler is capable of interpret and process. The techniques applied in order to encode the different parts of \emph{Mapudüngun} are also described, and the rules that manage their interaction and changes derived from it; and how the different aspects of \emph{Mapudüngun} morphology are treated from the computational point of view. We will explain in detail the stems typology, and the strategies to manage them; the interaction of suffixes after the stem, verb paradigms and verb nominalisation. The mobility of some suffixes and the special behaviour of some verb roots are also presented in this section. In section \ref{sec:53}, p. \pageref{sec:53}, we do account of some \emph{Mapudüngun} realisations that come from other sources and dialects, different from Smeets' work which is the base of our development. We explain how and why we have incorporate them into our system. A brief count on the FST analyser comes in section \ref{sec:64}, p. \pageref{sec:64}, where we display data on the amount of lexicon, suffixes, and rules, besides the compilation values. Section \ref{sec:65}, p. \pageref{sec:65} brings up the subject of assessment. We explain how our machine has been evaluated, the parameters taken into account. We introduce some other machines to compare to, and also another similar system; all for the sake of an accurate comparison and subsequent evaluation of the outcome the system produces. In this section there is also a comprehensive analysis of the forms that were not recognised by the system, and the reasons for that. The final section \ref{sec:80}, p. \pageref{sec:80} (before the conclusions, p. \pageref{sec:80}), is just a brief account of the web interfaces we have developed to access our tools. We simply show the elements found on these interfaces and how to operate them. \section{\emph{Mapudüngun}, the \emph{Mapuche} language} \label{sec:01} \paragraph{} \label{tp:1} Along this section we present \emph{Mapudüngun}, its location, typology and a basic description of its conformation, which includes the phonemes it presents and their graphic representation. Morphology comes next, where we present some information about \emph{Mapudüngun} suffixes and how the verbs are formed. Finally we introduce the stems formation and its particularities. Mainly, we present the morphophonological aspect of some specific phenomena of \emph{Mapudüngun}. A complete description of the language is found in the book we base our analyser upon: "A Grammar of \emph{Mapuche}" by Ineke Smeets \cite{RefB:21}. \emph{Mapudüngun} is an isolated language\footnote{The relationship between \emph{Mapudüngun} and others aboriginal American languages has not yet been established.} spoken actively by approximately 144,000 people in Chile [Zúñiga 2006] \cite{RefB:24}, as well as by some 8,400 people in Argentina [Instituto Nacional de Estadísticas y Censos 2005], virtually all of whom are bilingual in Spanish [Sadowsky, S. 2013: 87-96] \cite{RefB:18}. The word \emph{Mapudüngun} is a compound of two nominal roots, \emph{mapu} meaning 'soil, land, earth, ground, country'; \emph{düngu} meaning 'language, matter, subject, tongue (as in mother tongue)'. \emph{Mapudüngun} is usually translated as 'the language of the land, the speaking of earth' or 'lengua/habla de la tierra' in Spanish. \subsection{\emph{Mapudüngun}: polysynthetic and agglutinative} \label{sec:02} \paragraph{} \label{tp:2} Polysynthesis means that there are many elements or morphemes in (verb) forms, which is typical of the Native American languages, \emph{Mapudüngun} among them. In agglutinative languages a series of concepts are distributed in several morphemes [Zúñiga 2006: 199] \cite{RefB:24}. Agglutination is when morphemes are inside words, not altering their own form and being identifiable in different contexts, as in Basque, Turkish, Quechua and \emph{Mapudüngun}. The original meaning of the stem is modified by the affixes attached to it. In \emph{Mapudüngun}, verbs may contain many morphemes, e.g., \emph{di-tu-l-me-tu-a-fi-ñ} 'I will reach it, I will find it'. This word has eight significant elements. "The fact that the language is polysynthetic means that it is rich, in terms of the ability to create new words " [Zúñiga 2006: 202] \cite{RefB:24}. In \emph{Mapudüngun}, nominal forms are simple, while verbal ones are extremely complex, presenting a good number of derivative and inflectional morphemes. They can realise as univalent, only one actant as subject; bivalent or mono-transitive verbs, two actants, subject and object; and trivalent or bi-transitive verbs, three actants, subject, primary object and secondary object with the semantic roles of agent (A), human receiver (R), and inanimate patient or theme (T), respectively. "In verbal phrases there are morphemes that behave as verbal derivatives (verbaliser, causative, transitivizer, benefactive/malefactive, modal, locative and directional, manner; and affixes that are part of non-finite verb forms), also obligatory verbal inflectional suffixes (time, mode, person and number) and facultative (negation, aspect, passive, reflexive/reciprocal/medial and mediative)" [Fernández-Garay \& Malvestitti 2002: 36-37] \cite{RefB:07}. \subsection{The \emph{Mapuche} alphabet} \label{sec:03} \paragraph{} \label{tp:3} Smeets states that 19 consonants [table \ref{tab:01}] and 6 vowels [table \ref{tab:02}] form the \emph{Mapuche} phonemic system. \begin{table}[htb] \caption{Consonants [Smeets, I. 2008: 23] \cite{RefB:21}} \label{tab:01} \begin{tabular}{|c|c|c|c|c|c|c|} \hline\noalign{\smallskip} & Labial & \makecell{Interdental\\alveolar} & Palatal & Retroflex & Velar \\ \noalign{\smallskip}\hline\noalign{\smallskip} Plosives & p & t & ch & tr & k \\ \noalign{\smallskip}\hline\noalign{\smallskip} Fricatives & f & \textcrd~ ~~~|~~~ s & sh & & \\ \noalign{\smallskip}\hline\noalign{\smallskip} Glides & w & & y & r & q \\ \noalign{\smallskip}\hline\noalign{\smallskip} Nasals & m & n & ñ & & ng \\ \noalign{\smallskip}\hline\noalign{\smallskip} Laterals & & l & ll & & \\ \noalign{\smallskip}\hline \end{tabular} \end{table} \begin{table}[htb] \caption{Vowels [Smeets, I. 2008: 25] \cite{RefB:21}} \label{tab:02} \begin{tabular}{|c|c|c|c|} \hline\noalign{\smallskip} & Front & Central & Back\\ \noalign{\smallskip}\hline\noalign{\smallskip} High & i & ü & u\\ \noalign{\smallskip}\hline\noalign{\smallskip} Mid & e & & o\\ \noalign{\smallskip}\hline\noalign{\smallskip} Low & & a &\\ \noalign{\smallskip}\hline \end{tabular} \end{table} Smeets also adds loaned sounds from Spanish b, d, g (as in Spanish '\textbf{b}ote', '\textbf{d}uen\textbf{d}e' and '\textbf{gu}erra' respectively) and the voiceless fricative x (as in Spanish "\textbf{j}efe"). She does not include the interdental series present in some \emph{Mapudüngun} variants, usually represented as \emph{l'}, \emph{n'}, \emph{t'}; because the dialect she studied did not present it, and her data, "in agreement with Croese's findings, do not call for a distinction between the interdental" and the alveolar series \emph{l}, \emph{n}, \emph{t}. "A tentative conclusion might be that the distinction is dying out" [Smeets, I. 2008: 31] \cite{RefB:21}. \section{\emph{Mapudüngun} morphology} \label{sec:04} \paragraph{} \label{tp:4} In this section, and along this article, we mainly refer to the verb morphology because it is the more complex part of \emph{Mapudüngun}, and virtually all morphophonological changes are found inside the verb form. Other categories of words are mentioned because they occur as verbal stems together with a verbalising suffix. In other cases they are used to bring up a special case, or because a specific suffix also interacts with nouns, adjectives, adverbs, etc. in a non verbal form. This does not mean that our work only covers the \emph{Mapuche} verb; but for making this article not too extensive we do not expand the topic to all parts of speech (categories). \subsection{Verb suffixes} \label{sec:05} \paragraph{} \label{tp:5} We begin by exposing suffixes because they occur in almost all verb stems, the only stems where a suffix do not occur are those formed by a single verbal root. But in \emph{Mapudüngun}, adjective, adverb, noun and other roots need a suffix to become verbal stems. \begin{quote} \label{note:01} {\small To simplify, we call verb stem to any form, simple or complex, to which suffixes are bonded in order to form a complete verb predication. A simple stem is made of one root only, a complex stem may imply two roots, a root with some suffixes, or a combination of them all. It may be argued that these are lemmas instead, but as we say, to keep it simple, we call all these forms verb stems. More details are found in sections \ref{sec:13} \nameref{sec:13}, p. \pageref{sec:13}; \ref{sec:16} \nameref{sec:16}, p. \pageref{sec:16} and \ref{sec:45} \nameref{sec:45}, p. \pageref{sec:45}.} \end{quote} After the stem, in a \emph{Mapuche} verb form, suffixes "occur in a more or less fixed position relative to one another" [Smeets, I. 2008: 17] \cite{RefB:21}. But also there are quite a few incidental factors that shape the \emph{Mapuche} complex verb form. Verb suffixes are located on one of the thirty-six slots assigned to the verb form on the basis of their relative position and function. Slot 1 occupies word final position and slot 36 is next to the root. The order of these slots determine the morphotactics of the verb forms. Some slots host a few mutually excluding affixes, some of them may present variation in their form and some others may be zero markers. Some suffixes may exclude others from different slots for grammatical or semantic reasons. Even though it is not rare to find up to seven or eight suffixes following the root (see E\ref{ex:1}), verbs usually contain between four and six suffixes in spontaneous speech. In the following lines we try to graphically represent three different \emph{Mapuche} verb forms. \textbf{S} represents the stem. Every dot represents a slot; the leftmost dot is slot 36, the rightmost dot is slot 1. \textbf{X} is a suffix occurrence in a slot. \textbf{Ø} is also a suffix occurrence but with a null morpheme, which is a morpheme that has no phonemic or graphic realisation. \\ Minimal intransitive verb 2\textsuperscript{nd} person plural \\ S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X X X . . . \\ Minimal transitive verb 2\textsuperscript{nd} → 1\textsuperscript{st} persons plural\\ S . . . . . . . . . . . X . . . . . . . . . . . . . . . . . . X Ø X . . . \\ Representation of example E\ref{ex:1}\\ S . . . . X . . . . . X . . . . . . . X X X . . . . . . . . . X . X Ø X X \\ \begin{example} \label{ex:1}\ Verb with 10 suffixes [Smeets, I. 2008: 443 (76)] \cite{RefB:21}\\ \emph{nü-nie-ñma-r-pu-tu-e-y-iñ-mu}\\ 'they continued to take it away from us'\\ Root: \emph{nü-} \texttt{-TV.nü\_tomar} \begin{enumerate} \item[] Suffixes: \item \emph{-nie-} Progressive persistent (\texttt{+PRPS.nie32}) \item \emph{-ñma-} Indirect object (\texttt{+IO.ñma26}) \item \emph{-r-} Interruptive (\texttt{+ITR.r18}) \item \emph{-pu-} Locative (\texttt{+LOC.pu17}) \item \emph{-tu-} Iterative/restorative (\texttt{+RE.tu16}) \item \emph{-e-} Internal direct object (\texttt{+IDO.e6}) \item \emph{-y-} Indicative (\texttt{+IND.y4}) \item \emph{-Ø-} First person (\texttt{+1.Ø3}) \item \emph{-iñ-} Plural (\texttt{+PL.iñ2}) \item \emph{-mu} Dative subject(\texttt{+DS3A.mew1}) \end{enumerate} \end{example} \begin{quote} \label{note:02} {\small In example E\ref{ex:1} the root and suffixes are displayed as items to better identify them, but the analyser output is visualised linearly, as follows:\newline \texttt{-TV.nü\_tomar+PRPS.nie32+IO.ñma26+ITR.r18+LOC.pu17 +RE.tu16+IDO.e6+IND.y4+1.Ø3+PL.iñ2+DS3A.mew1}\newline Analysis tags express, starting from the left, the abbreviated name of the part of speech (PoS) or suffix.\newline PoS are introduced by a \textbf{-} (minus) sign, suffixes, by a \textbf{+} (plus) sign. \texttt{-TV} is 'transitive verb', \texttt{-IV} is 'intransitive verb', \texttt{-N} is 'noun', etc.\newline Concerning suffixes, \texttt{+PRPS} is 'progressive persistent', \texttt{+IDO} is 'internal direct object', \texttt{+PL} is 'plural', etc. A complete list of tags meaning is found in annex \ref{anx:01} \nameref{anx:01}, p. \pageref{anx:01}.\newline After the abbreviated name of the PoS or suffix, separated by a dot, it is the root or suffix standard form. Roots are followed by their meaning in Spanish with an underscore \_ as separator: \texttt{.nü\_tomar} in E\ref{ex:1}. For the already mentioned suffixes, the forms are \texttt{.nie}, \texttt{.e} and \texttt{.iñ}, respectively.\newline The number at the end of each tag indicates the slot (the position in the verb chain) where the verb suffix is located.\newline For instance:\newline \texttt{-TV.nü\_tomar}: "the transitive verb root \emph{nü} which means 'tomar' in Spanish ('take')"\newline \texttt{+PRPS.nie32}: "the progressive persistent suffix, which form is \emph{nie}, is located in slot 32".\newline \texttt{+IDO.e6}: "the internal direct object suffix, which form is \emph{e}, is located in slot 6, etc.\newline These items will be the result from the analyser we have built, and similar structure and information will be shown in all the examples.} \end{quote} Slots 1 to 15 hold inflectional suffixes in fixed positions. Slots 16 to 27 hold derivational suffixes, some of which are mobile. Slots 28 to 36 hold derivational suffixes in fixed positions, except for the rather mobile suffix \emph{‑uw-}, which usually fits in slot 31 and marks reflexivity/reciprocity. Mobile suffixes are assigned to their most usual position. "A difference in order of the suffixes does not always result in a semantic difference" [Smeets, I. 2008: 177] \cite{RefB:21} (see sections \ref{sec:10}, p \pageref{sec:10} and \ref{sec:50}, p. \pageref{sec:50}). \subsubsection{Verbalisers (slot 36)} \label{sec:06} \paragraph{} \label{tp:6} Nouns, adjectives, adverbs and numerals (roots) "can be changed into verbs by means of suffixation" [Smeets, I. 2008: 304] \cite{RefB:21}. "There are six verbalising suffixes. They immediately follow the root and fill slot 36" [Smeets, I. 2008: 121] \cite{RefB:21}. \begin{enumerate} \label{it:01} \item Suffix \emph{-Ø-} indicates the verbalisation of a noun, adjective, numeral and a number of adverb roots. \item Suffix \emph{-l-} verbalises noun, adverb, numeral roots and the interrogative pronoun \emph{tunte-} 'how much'. \item Suffix \emph{-nge-} can verbalise noun, adjective, numeral roots and the interrogative element \emph{chum-} 'how'. A verb formed with \emph{-nge-} is intransitive. \item Suffix \emph{-ntu-} verbalises adjective roots. \item Suffix \emph{-tu-} verbalises noun roots. \item Suffix \emph{-ye-} verbalises noun roots. \end{enumerate} \begin{example} \label{ex:2} \\ \emph{mapu-che} 'person of the land (\emph{Mapuche} person)'\\ \texttt{-NN.mapu\_tierra-NN.che\_persona} \medskip \\ \emph{mapu-che-nge-n} 'I am a person of the land (a \emph{Mapuche})'\\ \texttt{-NN.mapu\_tierra-NN.che\_persona\\ +VRB.nge36-IV+IND1SG.n3}\\ \end{example} \subsubsection{Stem formative (slot 36)} \label{sec:07} \paragraph{} \label{tp:7} Reduplication is another resource in \emph{Mapudüngun}, and reduplicated roots are also used to form verbs, but for doing so, they are obligatorily followed by a verbalising suffix, even when it is a reduplicated verb root, in this case Smeets calls these suffixes "stem formative in reduplicated roots (SFR)" and they are also assigned in slot 36. There are four stem formative: \begin{enumerate} \label{it:02} \item Suffix \emph{-Ø-} occurs when the reduplicated root is an onomatopoeia or a verb. The resulting verb is intransitive. \item Suffix \emph{-nge-} is added to reduplicated verb roots, the resulting verb is intransitive. \item Suffix \emph{-tu-} is added to reduplicated noun or verb roots. The resulting verb of a reduplicated verb root has the same valence as the single form. \item Suffix \emph{-ye-} is added to reduplicated verb roots, the resulting verb is transitive. \end{enumerate} \begin{example} \label{ex:3} [Smeets, I. 2008: 481 (33)] \cite{RefB:21} \\ \emph{ñiwa-ñiwa-tu-fu-n} 'I always did my best'\\ \texttt{-IV.ñiwa\_esforzar-RVBR+SFR.tu36+IPD.fu8\\ +IND1SG.n3} \end{example} \subsubsection{Derivational suffixes (slots 16 to 35)} \label{sec:08} \paragraph{} \label{tp:8} From slot 16 to 27 the suffixes mostly act as semantic modifiers. From slot 28 to 35, they have an aspectual or valency function. Suffixes most commonly used are: \begin{itemize} \label{it:03} \item[] Causatives \emph{-l-} (e.r.\footnote{e.r. stands for "examples references". In the referred section there is a list of the examples that contain the suffix being mentioned. The entire list is under annex \ref{anx:08} \nameref{anx:08}, p. \pageref{anx:08}.} \ref{tp:133}) and \emph{-m-} (e.r. \ref{tp:134}), slot 34. These suffixes make the event denoted by the stem to be actually applied or happen, in this sense, they operate as transitivizers also. \medskip \item[] Factitive \emph{-ka-} (e.r. \ref{tp:135}) and trasitivizer \emph{-tu-} (e.r. \ref{tp:136}), slot 33. It indicates that the agent causes the event denoted by the verb to take place, often it also adds intensive value. \medskip \item[] Reflexive/reciprocal \emph{-w-} (e.r. \ref{tp:139}), slot 31. It indicates reflexivity when combined with a singular subject. The reflexive morpheme -(u)w- indicates reflexivity or reciprocity when it combines with a dual or plural subject. \medskip \item[] Stative \emph{-le-} (e.r. \ref{tp:142}), slot 28. It denotes a state which may or may not involve agentivity on the part of the subject. With a few verbs, it may denote either an ongoing event or the resulting state. It may be used to indicate a quality or characteristic that is not permanent or intrinsic. \medskip \item[] Beneficiary \emph{-el-} (e.r. \ref{tp:143}), slot 27. It makes the (animate) patient become the beneficiary of the event. \medskip \item[] Passive \emph{-nge-} (e.r. \ref{tp:147}), slot 23. It indicates that a participant, a 3\textsuperscript{rd} person with the role of agent, is not found in the situation described by the sentence, but outside the speech act. \medskip \item[] 1\textsuperscript{st} person agent \emph{-w-} (e.r. \ref{tp:148}), slot 23. It indicates a non declared participant to be determined by the context. Which is a first person non-singular, the agent, and implicitly includes the listener who is the patient. \medskip \item[] Thither \emph{-me-} (e.r. \ref{tp:153}), slot 20. It indicates that the denoted situation involves motion away from the speaker or another orientation point, with a connotation of temporariness. \medskip \item[] Persistence \emph{-we-} (e.r. \ref{tp:154}), slot 19. It indicates a situation which persists after a previous event has taken place. \medskip \item[] Hither \emph{-pa-} (e.r. \ref{tp:157}), slot 17. It indicates that the denoted situation either involves a movement towards the speaker or takes place at a location near the speaker. It may indicate a development towards the present. \medskip \item[] Locative \emph{-pu-} (e.r. \ref{tp:158}), slot 17. It indicates that the event takes place away from the speaker. It does not imply motion and indicates a permanent situation. \end{itemize} \subsubsection{Inflectional suffixes (slots 5 to 15)} \label{sec:09} \paragraph{} \label{tp:9} Among these suffixes are those that indicate aspect, tense, negation and truth value: \begin{itemize} \label{it:04} \item[] Pluperfect \emph{-wye-}, slot 15. Indicates that the event takes place before the past or future orientation moment (see following example and E\ref{ex:5}). \begin{example} \label{ex:4} [Smeets, I. 2008: 69 (62)] \cite{RefB:21} \\ \emph{tripa-\textbf{wye}-y} 'he had left'\\ \texttt{-IV.tripa\_salir+PLPF.wye15+IND.y4+3.Ø3} \end{example} \medskip \item[] Constant feature \emph{-ke-} (e.r. \ref{tp:162}), slot 14. Indicates a constant or characteristic feature of the subject. \medskip \item[] Proximity \emph{-pe-} (e.r. \ref{tp:163}), slot 13. It seems to indicate an event or a feature in the recent past, a strong probability and doubt. \medskip \item[] Reportative \emph{-rke-}, slot 12. It indicates that the situation has not been directly witnessed; the speaker has been informed by others, has heard rumours or has deduced it (see following example). \begin{example} \label{ex:5} [Smeets, I. 2008: 254 (1)] \cite{RefB:21} \\ \emph{füta-nge-wye-\textbf{rke}-y} 'she had been married, they say'\\ \texttt{-NN.füta\_marido+VRB.nge36-IV+PLPF.wye15\\+REP.rke12+IND.y4+3.Ø3} \end{example} \medskip \item[] Affirmative \emph{-lle-}, slot 11. It adds emphasis (E\ref{ex:59}). \medskip \item[] Non-realised situation \emph{-a-} (e.r. \ref{tp:169}), slot 9. It denotes a non-actual fact. The situation will take place after the orientation moment. \medskip \item[] Impeditive \emph{-fu-} (e.r. \ref{tp:170}), slot 8. It denotes that the event does not concludes as expected or that it can not be completed. \medskip \item[] Pluperfect \emph{-mu-}(e.r. \ref{tp:171}), slot 7. It indicates that an event is realised before an orientation moment in the past. It occurs in complementary distribution with the pluperfect \emph{-wye-}, slot 15. \medskip \item[] Constant feature \emph{-ye-}, slot 5. As suffix \emph{-ke-}, slot 14, it also denotes a characteristic or constant feature, and they appear in complementary distribution (E\ref{ex:162}). \end{itemize} \subsubsection{Suffix mobility} \label{sec:10} \paragraph{} \label{tp:10} Smeets identify suffixes from slots 28 to 36 as fixed suffixes, and from slots 16 to 27 as mobile, later ones appear in non common positions respect to other suffixes. A detailed list of the mobile suffixes with their usual position (slot) follows: \begin{itemize} \label{it:05} \item[] Repetitive/Restorative \emph{-tu-} (e.r. \ref{tp:160}), slot 16. It indicates that a situation is repeated or restored. \medskip \item[] Hither \emph{-pa-} (e.r. \ref{tp:157}), slot 17. (Explained in \ref{it:03}). \medskip \item[] Persistence \emph{-we-} (e.r. \ref{tp:154}), slot 19. (Explained in \ref{it:03}). \medskip \item[] Thither \emph{-me-} (e.r. \ref{tp:153}), slot 20. (Explained in \ref{it:03}). \medskip \item[] Immediate \emph{-fem-}, slot 21. It denotes immediate action (see following example). \begin{example} \label{ex:6} [Smeets, I. 2008: 271 (20)] \cite{RefB:21} \\ \emph{ye-nge-\textbf{fem}-üy} 'it was brought immediately'\\ \texttt{-TV.ye\_traer+PASS.nge23+IMM.fem21\\+IND.y4+3.Ø3} \end{example} \medskip \item[] Sudden \emph{-rume-}, slot 21. (E\ref{ex:162}). It denotes sudden action. \medskip \item[] Play \emph{-kantu-}, slot 22 (E\ref{ex:200}). It denotes an action performed in jest, for fun, not in earnest, or just to pretend to be doing. \medskip \item[] Simulative \emph{-faluw-}, slot 22. It indicates simulation, not real intention to do something (see following example). \begin{example} \label{ex:7} [Smeets, I. 2008: 265 (9)] \cite{RefB:21} \\ \emph{illku-le-\textbf{faluw}-ün} 'I pretended to be angry'\\ \texttt{--IV.illku\_enojar+ST.le28+SIM.faluw22\\+IND1SG.n3} \end{example} \medskip \item[] Passive \emph{-nge-} (e.r. \ref{tp:146}), slot 23. (Explained in \ref{it:03}). \medskip \item[] Pluraliser \emph{-ye-}, slot 24 (E\ref{ex:91}). It is especially used with intransitive verbs which take a 3\textsuperscript{rd} person subject. With a 1\textsuperscript{st} or 2\textsuperscript{nd} person plural subject, it indicates a numerous subject. With transitive verbs, it indicates that numerous patients of the event.\medskip \item[] Force \emph{-fal-}, slot 25 (E\ref{ex:155}). It indicates either that there is a necessity or obligation for the subject to perform the action, or that the subject orders someone else to perform the action. \medskip \item[] Beneficiary \emph{-el-} (e.r. \ref{tp:143}), slot 27. (Explained in \ref{it:03}). \medskip \item[] Stative \emph{-le-} (e.r. \ref{tp:142}), slot 28. (Explained in \ref{it:03}). \medskip \item[] Reflexive/Reciprocal \emph{-w-} (e.r. \ref{tp:139}), slot 31. (Explained in \ref{it:03}). \medskip \item[] Transitivizer \emph{-tu-} (e.r. \ref{tp:136}), slot 33. It may be added to intransitive and transitive verbs, and it adds an object. With intransitive verbs, the form has one object. With transitive verbs, the form has two objects. \end{itemize} Mobility does not imply a semantic change, and as more suffixes a verb presents less displacement occurs. See the following examples: \begin{example} \label{ex:8} [Smeets, I. 2008: 270 (19)] \cite{RefB:21}\\ \emph{ngilla-l-\textbf{me}-mu-y-iñ} 'you went to buy for us'\\ \texttt{‑TV.ngilla\_comprar+BEN.el27+TH.me20+2A.mu23\\+IND.y4+1.Ø3+PL.iñ2} \end{example} \begin{example} \label{ex:9} [Smeets, I. 2008: 263 (11)] \cite{RefB:21}\\ \emph{i-\textbf{me}-we-ke-la-y} 'he no longer always eats there'\\ \texttt{‑TV.i\_comer+TH.me20+PS.we19+CF.ke14+NEG.la10\\+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:10} [Smeets, I. 2008: 421 (62)] \cite{RefB:21}\\ \emph{pütu-yekü-\textbf{me}-tu-y-ng-ün} 'they drank all the time'\\ \texttt{‑TV.püto\_beber+ITR.yekü18+TH.me20+RE.tu16\\+IND.y4+3.ng3+PL.ün2} \end{example} In the examples above, the thither suffix \emph{-me-} presents three different positions respect to the other suffixes. In E\ref{ex:8} it is close to slot 27, displaced beyond slot 23. In E\ref{ex:9} it occurs in its usual position, just before the suffix \emph{-we-}, slot 19. Finally, in E\ref{ex:10}, it appears between suffixes of slots 18 and 16, to the right of its usual position. \subsubsection{Verb paradigms} \label{sec:11} \paragraph{} \label{tp:11} In the previous section we have skipped suffixes from slots 10 and 6, they take part in the transitive verb paradigm, we include them here. Suffixes of slot 23 are also included in this paradigm together with those of mood, person, number and dative subject of slots 4, 3, 2 and 1 respectively. Negation, positioned in slot 10, may actually be part of transitive and intransitive forms. There are three negation morphemes, one per mood, reason to show them in the verb paradigms. The simplest verb form is intransitive, less suffixes than in transitive forms are mandatory: mood (slot 4), person (slot 3) and number (slot 2). See examples below: \begin{example} \label{ex:11}\ \\ \emph{küpa-y-m-i} 'you (sg) came'\\ \texttt{‑IV.küpa\_venir+IND.y4+2.m3+SG.i2} \end{example} \begin{example} \label{ex:12}\ \\ \emph{küpa-la-y-m-u} 'you two did not come'\\ \texttt{‑IV.küpa\_venir+NEG.la10+IND.y4+2.m3+DL.u2} \end{example} \begin{example} \label{ex:13}\ \\ \emph{küpa-no-l-m-ün} 'if you (pl) do not come'\\ \texttt{‑IV.küpa\_venir+NEG.no10+CND.l4+2.m3+PL.ün2} \end{example} The imperative mood have forms for 1\textsuperscript{st} person singular; 2\textsuperscript{nd} person singular, dual and plural; and for 3\textsuperscript{rd} person (undefined number). Indicative forms of 1\textsuperscript{st} person dual and plural may be used adhortatively. Negation suffix for imperative is \emph{-ki-} (slot 10), which always co-occur with the conditional marker \emph{-l-} (slot 4). Negation of the adhortative forms, which are indicative, is accomplished by the \emph{-ki-l-} combination of imperative negation and conditional mood mark when the intention is imperative (adhortative). See examples below (the complete conjugation of the intransitive verb \emph{küpa-} 'to come' is in annex \ref{anx:10}, table \ref{tab:13}): \begin{example} \label{ex:14}\ \\ \emph{küpa-m-u} 'come, you both!'\\ \texttt{‑IV.küpa\_venir+IMP.Ø4+2.m3+DL.u2} \end{example} \begin{example} \label{ex:15}\ \\ \emph{küpa-ki-l-chi} 'I better not come'\\ \texttt{‑IV.küpa\_venir+NEG.ki10+CNI\footnote{Even though the form is the same, we have labelled it \texttt{+CND} 'conditional' and \texttt{+CNI} 'conditional marker in imperative forms, to better distinguish them'.}.l4+IMP1SG.chi3} \end{example} \begin{example} \label{ex:16}\ \\ \emph{küpa-y-u} ind: 'we both came' imp: 'let we both come'\\ \texttt{‑IV.küpa\_venir+IND.y4+1.Ø3+DL.u2} \end{example} \begin{example} \label{ex:17}\ \\ \emph{küpa-ki-l-y-u} 'let we both not come'\\ \texttt{‑IV.küpa\_venir+NEG.ki10+CNI.l4+1.y3+DL.u2} \end{example} The transitive paradigm demands more suffixes to reflect the relations between agent, patient and object. Interacting also the suffixes \emph{-w-} 1\textsuperscript{st} person agent, and \emph{-mu-} 2\textsuperscript{nd} person agent, slot 23; \emph{-e-} internal direct object and \emph{-fi-} external direct object, slot 6; and \emph{-Ø-} dative subject, 1\textsuperscript{st} or 2\textsuperscript{nd} person agent, and \emph{-mew-} $\sim$ \emph{-ew-} dative subject, 3\textsuperscript{rd} person agent (no number), slot 1. A complete explanation of the transitive paradigm is in chapter 26 "Slots" of Smeets 2008 \cite{RefB:21}. See examples below (the complete conjugation of the transitive verb \emph{pi-} 'to say (to tell)' is in annex \ref{anx:11}, table \ref{tab:14} and the negative imperative forms in annex \ref{anx:12}, table \ref{tab:15}): \begin{example} \label{ex:18}\ \\ \emph{pi-e-y-u} 'I told you'\\ \texttt{‑TV.pi+IDO.e6+IND.y4+1.Ø3+DL.u2+DS12A.Ø1} \end{example} \begin{example} \label{ex:19}\ \\ \emph{pi-mu-l-i} 'if you (non-sg) tell me'\\ \texttt{‑TV.pi+2A.mu23+CND.l4+1.i3+SG.Ø2} \end{example} \begin{example} \label{ex:20}\ \\ \emph{pi-fi-m-u} 'tell him, you both'\\ \texttt{‑TV.pi+EDO.fi6+IMP.Ø4+2.m3+DL.u2} \end{example} \begin{example} \label{ex:21}\ \\ \emph{pi-ki-fi-l-y-iñ} 'let us (pl) not tell him'\\ \texttt{‑TV.pi+NEG.ki10+EDO.fi6+CNI.l4+1.y3+PL.iñ2} \end{example} \subsubsection{Verb inflectional nominalisation} \label{sec:12} \paragraph{} \label{tp:12} In a \emph{Mapuche} sentence, subordinates are derived from verbs, nominalised by inflectional nominalisers. These suffixes share position in slot 4 with mood markers, therefore, a verb form is either finite or nominalised. Finite forms take mood, person and number. Nominalised forms can not take those suffixes, taking instead one of the inflectional nominalisers. Besides as subordinates of verbs, nominalised verbs may also act "as subject, direct object, instrumental object or complement noun phrase, indicating an event as such, a participant, an instrument, time, place, reason, purpose or background event" [Smeets, I. 2008: 188] \cite{RefB:21}; as noun modifiers, and as predicates in nominal sentences. "Some nominalised forms can be used as a finite verb form. The subject of a subordinate is usually indicated by a possessive pronoun, which immediately precedes the subordinate. However, when a subordinate is used as a temporal or causal clause, or as a finite verb form, the subject is indicated by a personal pronoun" [Smeets, I. 2008: 189] \cite{RefB:21}. There are seven inflectional nominalisers: \begin{itemize} \label{it:06} \item[] Agentive verbal noun \emph{-t-}\\ This suffix may denote an event as such; an instrument or location, and the patient or agent of an event. \begin{example} \label{ex:22} [Smeets, I. 2008: 215 (186)] \cite{RefB:21}\\ \emph{tüfa ñi pi-e-\textbf{t}-ew}\\ \texttt{-DP.tüfa\_este -SP.ñi\_mi\_su\\-TV.pi\_decir+IDO.e6+AVN.t4+DS3A.ew1}\\ 'this is what he told me' lit: 'this his told me' \end{example} \item[] Completive subjective verbal noun \emph{-wma-}\\ This suffix indicates the subject of a completed event. \begin{example} \label{ex:23} [Smeets, I. 2008: 400 (24)] \cite{RefB:21}\\ \emph{füta-nge-\textbf{wma}-rke}\\ \texttt{‑NN.füta\_marido+VRB.nge36‑IV+CSVN.wma4\\+REP.rke}\\ 'she has been married, some say' \end{example} \item[] Instrumental verbal noun \emph{-m}\\ This suffix may indicate an instrument, a location, or an event as such. In combination with \emph{-a-} non-realised action (slot 9), it may indicates purpose. With \emph{-ye-} constant feature (slot 5), it forms a temporal clause. \begin{example} \label{ex:24} [Smeets, I. 2008: 206 (137)] \cite{RefB:21} \\ \emph{iñchiñ ta-yiñ lleg-mu-\textbf{m}}\\ \texttt{‑NN.-PP.iñchiñ\_nosotros\\-AP.ta\_el-SP.yiñ\_nuestro-s\\-IV.lleg\_crecer+PLPF.mu7+IVN.m4}\\ 'where we (pl) have grown up' lit: 'we the our have grown up place' \end{example} \item[] Objective verbal noun \emph{-el} $\sim$ \emph{-Ø}\\ This suffix expresses a passive participle, indicating the patient of the event. It can also be used to indicate an event as such; and rarely it is also used as an instrumental or locative. \begin{example} \label{ex:25} [Smeets, I. 2008: 76 (16)] \cite{RefB:21}\\ \emph{kuyfi pichi-ka-\textbf{el}}\\ \texttt{-AV.kuyfi\_antes\\-AJ.pichi\_pequeño+VRB.Ø36+CONT.ka16+OVN.el4}\\ 'long time ago when I was still young' lit: 'before, in the still little' \end{example} \item[] Plain verbal noun \emph{-n}\\ This suffix indicates an event as such, without time mark. It can convert the form into an adjective denoting an attribute or quality of the modified noun. It can also form a noun denoting a person or thing involved in the event referred to by the verb. It is usually translated as an infinitive: \emph{küdaw} 'the work', \emph{küdaw-ün} 'to work'. \begin{example} \label{ex:26} [Smeets, I. 2008: 192 (51)] \cite{RefB:21}\\ \emph{pütrem-tu-\textbf{n} küme-la-y}\\ \texttt{-NN.pütrem\_tabaco+VRB.tu36+PVN.n4\\-AJ.küme\_bueno+VRB.Ø36+NEG.la10+IND.y4+3.Ø3}\\ 'smoking is not good' lit: 'tobaccoing good not it is' \end{example} \item[] Subjective verbal noun \emph{-lu} $\sim$ \emph{-Ø}\\ This suffix denotes the subject of an event. It may also be used as an active participle, and form a temporal or causal clause. \begin{example} \label{ex:27} [Smeets, I. 2008: 218 (203)] \cite{RefB:21}\\ \emph{pichi che kim-nu-\textbf{lu}}\\ \texttt{-AJ.pichi\_pequeño -NN.che\_persona\\-TV.kim\_saber+NEG.no10+SVN.lu4}\\ 'a child that does not know' lit: 'little person not knower' \end{example} \item[] Transitive verbal noun \emph{-fiel}\\ This suffix may be used as an infinitive, passive participle, locative or instrumental. \begin{example} \label{ex:28} [Smeets, I. 2008: 237 (16)] \cite{RefB:21}\\ \emph{iñche müle-y mi pe-a-\textbf{fiel}}\\ \texttt{-PP.iñche\_yo -IV.müle\_estar+IND.y4+3.Ø3\\-SP.mi\_tuyo -TV.pe\_ver+NRLD.a9+TVN.fiel4}\\ 'I have to see you (sg)' lit: 'I am in your will be seen' \end{example} \end{itemize} \subsubsection{Verb derivational nominalisation} \label{sec:13} \paragraph{} \label{tp:13} Some non-verbal suffixes can turn a verb into an adjective or a noun; the stem may be formed by a unique root, a verbal compound, a verbalised root, a verbalised compound or a reduplicated root; or even by a complex stem, a root followed by some suffixes, mainly from slots 35, 34 or 33. \begin{itemize} \label{it:07} \item[]\emph{-fal} \texttt{+ADJDO} indicates that the event denoted by the verb can actually be done. \begin{example} \label{ex:29} [Smeets, I. 2008: 312 (12)] \cite{RefB:21}\\ \emph{pepi-l-\textbf{fal}} 'feasible, practicable'\\ \texttt{-TV.pepi\_poder-hacer+CA.l34+ADJDO.fal} \end{example} \item[]\emph{-fe} \texttt{+NOMAG} denotes a characteristic agent. \begin{example} \label{ex:30} [Smeets, I. 2008: 311 (1)] \cite{RefB:21}\\ \emph{kofke-tu-\textbf{fe}} 'bread eater'\\ \texttt{-NN.kofke\_pan+VRB.tu36+NOMAG.fe} \end{example} \item[]\emph{-nten} \texttt{+ADJQE} indicates that the event denoted by the verb may be realised quickly and/or easily. \begin{example} \label{ex:31} [Smeets, I. 2008: 312 (14)] \cite{RefB:21}\\ \emph{afü-\textbf{nten}} 'it gets quickly cooked'\\ \texttt{-IV.afü\_cocinar+ADJQE.nten} \end{example} \item[]\emph{-we} \texttt{+NOMPI} denotes a characteristic place or instrument. \begin{example} \label{ex:32} [Smeets, I. 2008: 312 (9)] \cite{RefB:21}\\ \emph{püra-püra-\textbf{we}} 'stairs'\\ \texttt{-IV.püra\_subir-RVBR+SFR.Ø36-IV+NOMPI.we} \end{example} \end{itemize} \subsubsection{Non-verbal suffixes} \label{sec:14} \paragraph{} \label{tp:14} In the previous section there were already presented four suffixes that can turn verbs into adjectives or nouns, these resulting forms may, in turn, be complex verb stems, i.e., a verb converted into an adjective or a noun may be used as a verb stem, it may be "re-verbalised". There are other suffixes that act upon non-verbal forms; the final form, i.e., "non-verb + suffix", in its turn can also be a complex verb stem (see \ref{sec:16} \nameref{sec:16}, p. \pageref{sec:16}). Some of these suffixes change the class (category) of the form they are attached to, and some others do not. \begin{itemize} \label{it:08} \item[]Class-changing suffixes (\texttt{CC}) \item[]\emph{-chi} \texttt{+ADJ} changes a noun or nominalised verb into an adjective. \begin{example} \label{ex:33} [Smeets, I. 2008: 114 (25)] \cite{RefB:21}\\ \emph{lef-\textbf{chi} che} 'runner' lit:'running person'\\ \texttt{-IV.lef\_correr+SVN.Ø4+ADJ.chi\\-NN.che\_persona} \end{example} \item[]\emph{-tu} \texttt{+ADV} changes a noun or nominalised verb into an adverb. \begin{example} \label{ex:34} [Smeets, I. 2008: 114 (b)] \cite{RefB:21}\\ \emph{amu-n-\textbf{tu}} 'going', 'on my way there'\\ \texttt{-IV.amu\_ir+PVN.n4+ADV.tu} \end{example} \end{itemize} \begin{itemize} \label{it:09} \item[]Non class-changing suffixes (\texttt{NCC}) \item[]\emph{-ke} \texttt{+DISTR} is affixed to adjectives, adverbs and numerals. It indicates a whole consisting of several component parts, each of which has the feature expressed by the form it accompanies. \begin{example} \label{ex:35} [Smeets, I. 2008: 112 (17)] \cite{RefB:21}\\ \emph{küla-\textbf{ke}} 'a threesome'\\ \texttt{-NU.küla\_tres+DISTR.ke} \end{example} \item[]\emph{-em} \texttt{+EX} is affixed to a noun of which indicates that is dead or no longer in function or existence. \begin{example} \label{ex:36} [Smeets, I. 2008: 110 (6)] \cite{RefB:21}\\ \emph{fey-tüfa ñi küdaw-\textbf{yem}} 'this was my former job'\\ \texttt{-DP.fey\_que-DP.tüfa\_este -SP.ñi\_mi\_su\\-NN.küdaw\_trabajo+EX.em} \end{example} \item[]\emph{-ntu} \texttt{+GR} it refers to a group as a whole or a place which is characterised by the presence of many items referred to by the noun. \begin{example} \label{ex:37}\ \\ \emph{küra-\textbf{ntu}} 'scree'\\ \texttt{-NN.küra\_piedra+GR.ntu} \end{example} \item[]\emph{-rke} \texttt{+REP} indicates that the situation or thing expressed by the form it accompanies has not been witnessed by the speaker himself. The speaker has been informed by others, he has heard rumours or he has deduced a conclusion. It may express surprise after the sudden realisation of something. \begin{example} \label{ex:38} [Smeets, I. 2008: 110 (8)] \cite{RefB:21}\\ \emph{trewa-\textbf{rke}!} 'a dog!', 'what a big dog!', 'it must have been a dog' (at wondering about who ate the meat that disappeared)'\\ \texttt{-NN.trewa\_perro+REP.rke} \end{example} \item[]\emph{-we} \texttt{+TEMP} indicates a period subsequent to an orientation moment. \begin{example} \label{ex:39}\ \\ \emph{kechu-\textbf{we} antü} 'in five days'\\ \texttt{-NU.kechu\_cinco+TEMP.we -NN.antü\_sol\_día} \end{example} \item[]\emph{-wen} \texttt{+REL} refers to the people relation indicated by the noun it accompanies. \begin{example} \label{ex:40}\ \\ \emph{kompañ-\textbf{wen} iñchiu} 'we are partners' lit: 'we both are partners of one another'\\ \texttt{-NN.kompañ\_compañero+REL.wen\\-PP.iñchiu\_nosotros-dos} \end{example} \end{itemize} \subsubsection{Instrumental object suffix -mew} \label{sec:15} \paragraph{} \label{tp:15} This suffix may never be part of a complex stem but it may be added to nominalised verbs (E\ref{ex:43}), nouns and pronouns. It indicates instrument, place, time, cause and is used in comparative and partitive constructions. It may also refer to the circumstances under which an event takes place. See next examples: \begin{example} \label{ex:41} [Smeets, I. 2008: 62 (5)] \cite{RefB:21}\\ \emph{anel-tu-fi-ñ kiñe kuchillo-\textbf{mew}} 'I threatened him with a knife'\\ \texttt{-TV.anel\_amenazar+TR.tu33+EDO.fi6+IND1SG.n3\\-NU.kiñe\_uno -NN.kuchillu\_cuchillo+INST.mew} \end{example} \begin{example} \label{ex:42} [Smeets, I. 2008: 62 (9)] \cite{RefB:21}\\ \emph{uma-pu-n ta-ñi peñi-\textbf{mu}} 'I stayed at my brother's'\\ \texttt{-IV.uma\_pernoctar+LOC.pu17+IND1SG.n3\\-AP.ta\_el-SP.ñi\_mi\_su\\ -NN.peñi\_hermano+INST.mew} \end{example} \begin{example} \label{ex:43} [Smeets, I. 2008: 62 (7)] \cite{RefB:21}\\ \emph{are-tu-n-\textbf{mew} monge-li-y} 'he lives on borrowing'\\ \texttt{-TV.are\_prestar+TR.tu33+PVN.n4+INST.mew\\-IV.monge\_vivir+ST.le28+IND.y4+3.Ø3} \end{example} \subsection{Verb stems} \label{sec:16} \paragraph{} \label{tp:16} We have classified different types of stems depending on the way they are composed. In this respect we do not strictly follow Smeets. Verbs stems are completed by the verbalising suffix (\texttt{+VRB}) when there is no verb root present, or a stem formative (\texttt{+SFR}) when there is a reduplicated root. The following list shows the different types of stems from the simplest to the most complex ones: \begin{itemize} \label{it:10} \item[]Simple stems \item Verb root \begin{example} \label{ex:44} [Smeets, I. 2008: 64 (29)] \cite{RefB:21}\\ \emph{\textbf{amu}-y-ng-ün} 'they (pl) went'\\ \texttt{-IV.amu\_ir+IND.y4+3.ng3+PL.ün2} \end{example} \item Verb compound (verb root + verb root) \begin{example} \label{ex:45} [Smeets, I. 2008: 420 (54)] \cite{RefB:21}\\ \emph{\textbf{amu-mayna}-tu-e-n-ew} 'he made me stumble'\\ \texttt{-IV.amu\_ir-TV.mayna\_atar-los-pies-CR.TV\\+TR.tu33+IDO.e6+IND1SG.n3+DS3A.ew1} \end{example} \item Verb compound (verb root + non-verb root / non-verb root + verb root) \begin{example} \label{ex:46} [Smeets, I. 2008: 401 (38)] \cite{RefB:21}\\ \emph{\textbf{ad-kintu}-a-l} 'to have a look'\\ \texttt{-NN.ad\_forma-TV.kintu\_mirar+NRLD.a9+OVN.el4} \end{example} \item Non-verb root \texttt{+VRB} (verbaliser suffix) \begin{example} \label{ex:47} [Smeets, I. 2008: 68 (56)] \cite{RefB:21}\\ \emph{küla \textbf{antü-nge}-y} 'it was three days ago'\\ \texttt{-NU.küla\_tres\\-NN.antü\_sol\_día+VRB.nge36-IV+IND.y4+3.Ø3} \end{example} \item Reduplicated root \texttt{+SFR} (stem formative suffix) \begin{example} \label{ex:48} [Smeets, I. 2008: 112 (22)] \cite{RefB:21}\\ \emph{\textbf{aku-aku-nge}-y} 'continually arrive (e.g. letters)'\\ \texttt{-IV.aku\_llegar-RVBR+SFR.nge36-IV+IND.y4+3.Ø3} \end{example} \item Non-verb compound (non-verb + non-verb) \texttt{+VRB} \begin{example} \label{ex:49} [Smeets, I. 2008: 123 (11)] \cite{RefB:21}\\ \emph{\textbf{trewa-ad-nge}-y} 'he has dog face'\\ \texttt{-NN.trewa\_perro-NN.ad\_cara+VRB.nge36-IV\\+IND.y4+3.Ø3} \end{example} \end{itemize} \begin{itemize} \label{it:11} \item[]Complex single root stems \medskip \item Numeral + non class-changing suffix \texttt{+VRB} \begin{example} \label{ex:50} [Smeets, I. 2008: 400 (30)] \cite{RefB:21}\\ \emph{\textbf{kiñe-ke-l}-fi-y} 'he gave one to each of them'\\ \texttt{-NU.kiñe\_uno+DISTR.ke+VRB.l36\\+EDO.fi6+IND.y4+3.Ø3} \end{example} \item Adjective + non class-changing suffix or inflectional nominaliser \texttt{+VRB} \begin{example} \label{ex:51} [Smeets, I. 2008: 473 (40)] \cite{RefB:21}\\ \emph{\textbf{pichi-n-tu}-ki-y} 'it was for little time'\\ \texttt{-AJ.pichi\_pequeño+PVN.n4+VRB.tu36\\+CF.ke14+IND.y4+3.Ø3} \end{example} \item Question \texttt{+VRB} + inflectional nominaliser \texttt{+VRB} \begin{example} \label{ex:52} [Smeets, I. 2008: 243 (52)] \cite{RefB:21}\\ \emph{\textbf{chum-nge-n-tu}-y-m-i-?} 'what do you (sg) think (about it)?'\\ \texttt{-QC.chum\_cómo+VRB.nge36-IV+PVN.n4+VRB.tu36\\+IND.y4+2.m3+SG.i2} \end{example} \item Adjective + inflectional nominaliser \texttt{+VRB} + derivational nominaliser \texttt{+VRB} \begin{example} \label{ex:53} [Smeets, I. 2008: 375 (25)] \cite{RefB:21}\\ \emph{\textbf{awka-n-tu-fe-nge}-y} 'he is playful'\\ \texttt{-AJ.awka\_salvaje+PVN.n4+VRB.tu36+NOMAG.fe\\+VRB.nge36-IV+IND.y4+3.Ø3} \end{example} \item Adverb + non class-changing suffix or inflectional nominaliser + optional class-changing suffix \texttt{+VRB} \begin{example} \label{ex:54} [Smeets, I. 2008: 383 (18)] \cite{RefB:21}\\ \emph{\textbf{alü-n-tu}-y-ng-ün} 'they were more'\\ \texttt{-AV.alü\_mucho+PVN.n4+VRB.tu36\\+IND.y4+3.ng3+PL.ün2} \end{example} \item Noun + non class-changing suffix + inflectional nominaliser + class-changing suffix \texttt{+VRB} \begin{example} \label{ex:55} [Smeets, I. 2008: 411 (53)] \cite{RefB:21}\\ \emph{\textbf{tukuyu-ke-chi}-le-wü-y} 'it looks like (long) fabric'\\ \texttt{-NN.tukuyu\_tela+DISTR.ke+SVN.Ø4+ADJ.chi\\+VRB.Ø36+ST.le28+REF.w31+IND.y4+3.Ø3} \end{example} \item Noun + optional transitivizer or factitive + optional reflexive + optional non-realised + class-changing suffix or non class-changing suffix or inflectional nominaliser \texttt{+VRB} \begin{example} \label{ex:56} [Smeets, I. 2008: 90 (34)] \cite{RefB:21}\\ \emph{\textbf{as-ka-w-ün-nge}-y} 'he is capricious'\\ \texttt{-NN.ad\_costumbre+FAC.ka33+REF.w31+PVN.n4\\+VRB.nge36-IV+IND.y4+3.Ø3} \end{example} \item Verb + optional causative + optional transitivizer or factitive + optional reflexive + optional stative + optional hither + optional non-realised + inflectional or derivational nominaliser \texttt{+VRB} \begin{example} \label{ex:57} [Smeets, I. 2008: 225 (243)] \cite{RefB:21}\\ \emph{\textbf{llüka-nten-nge}-wma} 'I was someone who easily gets afraid'\\ \texttt{-IV.llüka\_temer+ADJQE.nten+VRB.nge36-IV\\+CSVN.wma4} \end{example} \item Reduplicated verb root + causative\\ (verb \texttt{+CA} + verb \texttt{+CA} \begin{example} \label{ex:58} [Smeets, I. 2008: 412 (68)] \cite{RefB:21}\\ \emph{\textbf{ap-üm-ap-üm-ye}-nge-y} 'we have gradually been finished off'\\ \texttt{-IV.af\_acabar+CA.m34-RVBR+SFR.ye36-TV\\+PASS.nge23+IND.y4+3.Ø3} \end{example} \end{itemize} In the last example, the form corresponds to two roots and two suffixes, but it is actually a reduplicated stem of one root with a suffix attached, reason to list it as a single root complex stem. Complex compound stems are the most complex ones, they are not listed here but on the section \nameref{tp:61}, p. \pageref{tp:61}, where we expose them together with the encoding expressions and rules that manage them, these stems are formed by two roots and at least one suffix apart from the verbaliser. \subsection{Special verbs} \label{sec:17} \paragraph{} \label{tp:17} Some roots (verbs and non-verbs), due to semantic or grammatical reasons, must co-occur with certain suffixes when forming complete verb forms. There are some exceptions and/or conditions needed for these roots to behave this way. Smeets writes about the conditions, we have found the exceptions. \subsubsection{Question roots} \label{sec:18} \paragraph{} \label{tp:18} Interrogative roots may be verbalised, but not all forms take the same verbalisers (see D\ref{def:25}). \emph{chem-} 'what, which' may be verbalised by suffixes \texttt{-Ø-} and \texttt{-ye-}, see following examples: \begin{example} \label{ex:59} [Smeets, I. 2008: 434 (86)] \cite{RefB:21}\\ \emph{chem-lle-a-l-e} 'whatever they would do' \\ \texttt{-QC.chem\_qué\_cuál+VRB.Ø36+AFF.lle11+NRLD.a9\\+CND.l4+3.e3} \end{example} \begin{example} \label{ex:60} [Smeets, I. 2008: 128 (39)] \cite{RefB:21}\\ \emph{chem-\textbf{ye}-w-üy-m-u} 'how are you both related?' \\ \texttt{-QC.chem\_qué\_cuál+VRB.ye36+REF.w31\\+IND.y4+2.m3+DL.u2} \end{example} \emph{chuchi- $\sim$ tuchi-} 'which' is verbalised by the null suffix \texttt{-Ø-}, see following example: \begin{example} \label{ex:61} [Smeets, I. 2008: 405 (7)] \cite{RefB:21}\\ \emph{chuchi-künu-al} 'how they should carry on' \\ \texttt{-QC.chuchi\_cuál+VRB.Ø36+PFPS.künu32\\+NRLD.a9+OVN.el4} \end{example} \emph{chum-} 'how' is verbalised by \texttt{-Ø-} or \texttt{-nge-}, see following examples: \begin{example} \label{ex:62} [Smeets, I. 2008: 416 (15)] \cite{RefB:21}\\ \emph{chum-la-e-n-ew} 'he did not do anything to me' \\ \texttt{-QC.chum\_cómo+VRB.Ø36+NEG.la10+IDO.e6\\+IND1SG.n3+DS3A.ew1} \end{example} \begin{example} \label{ex:63} [Smeets, I. 2008: 225 (246)] \cite{RefB:21}\\ \emph{chum-\textbf{nge}-wma} 'how it was' \\ \texttt{-QC.chum\_cómo+VRB.nge36-IV+CSVN.wma4} \end{example} \emph{tunte- $\sim$ chunte-} may be verbalised by suffixes \texttt{-Ø-}\footnote{Smeets does not specifically mention that \emph{tunte} may be verbalised by \texttt{-Ø-}, but we have deduced it from the following text: "The interrogative \emph{tunten $ \sim $ chunten} is a quantity noun, which contains the plain verbal noun marker \emph{-n} \texttt{+PVN.n4}" [Smeets, I. 2008: 105] \cite{RefB:21}. To be able to be bound to the \texttt{+PVN.n4} suffix, the interrogative pronoun must be verbalised; since there is no realised form between the root \emph{tunte-} and morpheme \emph{-n}, the only possible verbaliser is \texttt{-Ø-}.}, \texttt{-l-} and \texttt{-ntu-}, see following examples: \begin{example} \label{ex:64} [Smeets, I. 2008: 114 (c)] \cite{RefB:21}\\ \emph{tunte-n-tu}\footnote{According to Smeets, the form \emph{tuntentu} has two more possible analyses [Smeets, I. 2008: 559 (\emph{tunte})] \cite{RefB:21}: \\ 1) \emph{tunte-ntu-} 'to stay', 'to be for how long' \\ \texttt{-QT.tunte\_cuánto+VRB.ntu36} \smallskip \\ 2) \emph{tunte-n-tu-} 'to take how much' \\ \texttt{-QT.tunte\_cuánto+VRB.Ø36+PVN.n4+VRB.tu36}} 'for how long?' \\ \texttt{-QT.tunte\_cuánto+VRB.Ø36+PVN.n4+ADV.tu} \end{example} \begin{example} \label{ex:65} [Smeets, I. 2008: 128 (33)] \cite{RefB:21}\\ \emph{tunte-\textbf{l}-e-y-mew} 'how much did he give to you?' \\ \texttt{-QT.tunte\_cuánto+VRB.l36+IDO.e6\\+IND.y4+3.Ø3+DS3A.mew1} \end{example} \begin{example} \label{ex:66} [Smeets, I. 2008: 399 (19)] \cite{RefB:21}\\ \emph{tunte-\textbf{ntu}-la-y} 'it did not last long' \\ \texttt{-QT.tunte\_cuánto+VRB.ntu36+NEG.la10\\+IND.y4+3.Ø3} \end{example} \subsubsection{Deictic verbs} \label{sec:19} \paragraph{} \label{tp:19} "Deictic verbs are derived from the roots \emph{fa-} 'to become like this' and \emph{fe-} 'to become like that'. These roots do not occur without a derivational suffix. A verb which is derived from the root \emph{fa-} denotes a situation which is contextually determined. A verb which is derived from the root \emph{fe-} denotes an instance which is situationally determined" [Smeets, I. 2008: 321] \cite{RefB:21}. Smeets says that deictic verbs do not occur without a derivational suffix, but there is a case in which \emph{fe-} directly takes a inflectional suffix without any derivational one: \begin{example} \label{ex:67} [Smeets, I. 2008: 246 (4)] \cite{RefB:21}\\ \emph{\textbf{fi-y} llemay}\footnote{"The particle \emph{llemay} conveys certainty on the part of the speaker" [Smeets, I. 2008: 334] \cite{RefB:21}. It consists of the affirmative suffix \emph{-lle-} \texttt{+AFF.lle11} and the particle \emph{may} which is used as a rhetoric question or a question expecting an affirmative answer.} 'that is certainly so'\\ \texttt{-IV.fe\_ser-eso+IND.y4+3.Ø3\\-PT.llemay\_seguro\_ciertamente} \end{example} Compare it with the following examples (which follow the rule): \begin{example} \label{ex:68} [Smeets, I. 2008: 462 (61)] \cite{RefB:21}\\ \emph{kom \textbf{fe-le}-y} 'they all are that way'\\ \texttt{-AV.kom\_todo\\-IV.fe\_ser-eso+ST.le28+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:69} [Smeets, I. 2008: 321 (4)] \cite{RefB:21}\\ \emph{\textbf{fente}}\footnote{\emph{-nte-} is an unproductive derivative suffix that can yield \emph{fe-nte-} 'adv. that much' and \emph{fa-nte-} 'adv. this much'. As it is unproductive, the adverbial form is collected as such in the lexicon.} \emph{-n-üy} 'it is as much/big as...'\\ \texttt{AV.fente\_tanto+PVN.n4+VRB.Ø36+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:70} [Smeets, I. 2008: 322 (7)] \cite{RefB:21}\\ \emph{ka \textbf{fe-le-pa-tu}-n} 'I was in the same situation as before'\\ \texttt{-AJ.ka\_otro\\-IV.fe\_ser-eso+ST.le28+HH.pa17+RE.tu16\\+IND1SG.n3} \end{example} \begin{example} \label{ex:71} [Smeets, I. 2008: 321 (1)] \cite{RefB:21}\\ \emph{\textbf{fa-le}-wma iñche} 'this is how I was'\\ \texttt{-IV.fa\_ser-esto+ST.le28+CSVN.wma4\\-PP.iñche\_yo} \end{example} \begin{example} \label{ex:72} [Smeets, I. 2008: 322 (10)] \cite{RefB:21}\\ \emph{\textbf{fa-m-nge}-chi küdaw-ke-n} 'I work this way'\\ \texttt{-IV.fa\_ser-esto+CA.m34+PASS.nge23\\+SVN.Ø4+ADJ.chi\\-IV.küdaw\_trabajar+CF.ke14+IND1SG.n3} \end{example} \subsubsection{Defective verbs} \label{sec:20} \paragraph{} \label{tp:20} Roots of posture (of the body) verbs obligatorily occur together with the perfect persistence marker \texttt{+PFPS.künu32}, the progressive persistence marker \texttt{+PRPS.nie32} or the stative morpheme \texttt{+ST.le28} when they are the only root of a stem, i.e., when they are not in compounds. Otherwise, when these verbs occur as part of compounds they are not compelled to use any of the three suffixes. Verbs identified by Smeets are: \begin{itemize} \label{it:12} \item[]\emph{kopüd-} 'to lie down on one's belly' \item[]\emph{kudu-} 'to lie down' \item[]\emph{külü-} 'to lean on one's elbow' \item[]\emph{llikosh-} 'to sit down on one's heels', 'to squat' \item[]\emph{payla-} 'to lie down on one's back' \item[]\emph{potri-} 'to lean over' \item[]\emph{potrong-} 'to bow forward' (the head) \item[]\emph{potrü-} 'to bow forward' (the body) \item[]\emph{rekül-} 'to lean' \item[]\emph{üñif-} 'to lie down on the floor' \item[]\emph{wira-} 'to sit down with spread legs' \item[][Smeets, I. 2008: 235] \cite{RefB:21} \end{itemize} \begin{example} \label{ex:73} [Smeets, I. 2008: 296 (21)] \cite{RefB:21}\\ \emph{\textbf{üñif-künu}-a-fi-ñ} 'I will spread it out'\\ \texttt{-TV.ünif\_extender+PFPS.künu32\\+NRLD.a9+EDO.fi6+IND1SG.n3} \end{example} \begin{example} \label{ex:74} [Smeets, I. 2008: 261 (2)] \cite{RefB:21}\\ \emph{\textbf{kudu-le}-me-we-la-n} 'I am not going to lay down there any more'\\ \texttt{-IV.kudu\_yacer+ST.le28+TH.me20+PS.we19\\+NEG.la10+IND1SG.n3} \end{example} For the combination of these verbs with \texttt{+PRPS.nie32} we have found no examples in Smeets or elsewhere. Smeets provides two meanings for \emph{kopüd-} when taking this suffix, but no example: \begin{enumerate} \label{it:13} \item[]\emph{kopüd-nie-} \item to hold someone on his belly [Smeets, I. 2008: 235] \cite{RefB:21} \item to hold in a face downward position [Smeets, I. 2008: 519] \cite{RefB:21} \end{enumerate} As we are following Smeets' description of \emph{Mapudüngun}, we have implemented what she states about these verbs, but, besides the issue presented about \texttt{+PRPS.nie32}, there are others that do not support her statement about these verbs. Probably she have worked on not published data. For the verb \emph{kopüd-} 'to lie down on one's belly' there are no examples but the meaning it takes with \texttt{+PFPS.künu32}, \texttt{+PRPS.nie32} and \texttt{+ST.le28}. We have found examples in other texts, but some of them show a different behaviour to what Smeets explains, i.e., they do not present the "obligatory" suffixes. \begin{example} \label{ex:75} [Febrés, A.]\footnote{All the examples that come from Augusta, F., Febrés, A. and Valdivia, L. has been consulted on-line on the CORLEXIM site \cite{RefB:03}.}\\ \emph{\textbf{kopu}-n} 'to be face down lying on the floor or head down, or half bent the body.'\\ \texttt{-IV.kopüd\_yacer-boca-abajo+PVN.n4} \end{example} \begin{example} \label{ex:76} [Valdivia, L.] \cite{RefB:03}\\ \emph{\textbf{kopu}-w-ün} 'to be facing the floor'\\ \texttt{-IV.kopüd\_yacer-boca-abajo+PS.we19+PVN.n4} \end{example} For verbs \emph{kudu-} 'to lie down' and \emph{külü-} 'to lean on one's elbow', Smeets herself presents examples contradicting its obligatory co-occurrence with the treated suffixes. Other texts also contradict her (Augusta, F. \cite{RefB:03}, Febrés \cite{RefB:03}, Zúñiga \cite{RefB:24}, Mösbach \cite{RefB:14}). \begin{example} \label{ex:77} [Smeets, I. 2008: 349 (17)] \cite{RefB:21}\\ \emph{\textbf{kudu}-pu-a-el} 'to go to bed'\\ \texttt{-IV.kudu\_yacer+LOC.pu17+NRLD.a9+OVN.el4} \end{example} \begin{example} \label{ex:78} [Smeets, I. 2008: 244 (4)] \cite{RefB:21}\\ \emph{\textbf{kudu}-nu-l-m-i} 'if you do not go to bed'\\ \texttt{-IV.kudu\_yacer+NEG.no10+CND.l4+2.m3+SG.i2} \end{example} \begin{example} \label{ex:79} [Smeets, I. 2008: 526 (\emph{lüf-})] \cite{RefB:21}\\ \emph{\textbf{külü}-a-y antü} 'the Sun will lay down'\\ \texttt{-IV.külü\_apoyar+NRLD.a9+IND.y4+3.Ø3\\-NN.antü\_sol} \end{example} For \emph{llikosh-} Smeets gives the meaning it takes with two of the suffixes but no example. The example we show comes from Augusta, F. \cite{RefB:03}. \begin{itemize} \label{it:14} \item[]\emph{llikosh-küle-} 'to squat, to crouch' \item[]\emph{llikosh-künu-w-} 'to squat down, to crouch down' \item[][Smeets, I. 2008: 528] \cite{RefB:21} \end{itemize} \begin{example} \label{ex:80} [Augusta, F.] \cite{RefB:03}\\ \emph{\textbf{llikod-küle}-n} 'to be snuggled'\\ \texttt{-IV.llikosh\_acurrucar+ST.le28+PVN.n4} \end{example} For \emph{payla-} there are also no examples in Smeets but the definition in combination with two of the three suffixes. Examples coming from other sources contradict Smeets' observations. \begin{itemize} \label{it:15} \item[]\emph{payla-le-} 'to be lying on one's back' \item[]\emph{payla-künu-w-} 'to lie down on one's back' \item[][Smeets, I. 2008: 543] \cite{RefB:21} \end{itemize} \begin{example} \label{ex:81} [Augusta, Febrés \& Valdivia] \cite{RefB:03}. [Mösbach, E. 1936] \cite{RefB:14}\\ \emph{\textbf{payl'a}-n} 'to lie on one's back'\\ \texttt{-IV.payla\_yacer-de-espalda+PVN.n4} \end{example} \begin{example} \label{ex:82} [Febrés, A.] \cite{RefB:03}\\ \emph{\textbf{paylla-l}-ün}\footnote{This example seems to support Smeets' statements, if the phonological changes are that stative \emph{-le-} drops its vocalic element and the indicative 1\textsuperscript{st} person adds an epenthetic schwa in presence of the previous consonant. Normally, \emph{-le-} keeps the vocal and the following suffix, beginning in consonant, remains the same.} 'to put or leave something on its own back, or in peace'\\ \texttt{-IV.payla\_yacer-de-espalda+ST.le28+IND1SG.n3} \end{example} For \emph{potri-} 'to lean', Smeets gives two examples and the meaning acquired with one of the three suffixes, and in a compound. We did not find examples of \emph{potri-} in other texts. We believe that \emph{potri-} and \emph{potrü-} 'to bow forward' are two variants of the same verb, even though Smeets defines them differently. The interchangeability between \emph{ü} and \emph{i} is not rare. She provides two different translations for an example with \emph{potrü-}, the second one in alignment with the same example using \emph{potri-} instead. compare: \begin{example} \label{ex:83} [Smeets, I. 2008: 549 (\emph{potri-})] \cite{RefB:21}\\ \emph{\textbf{potri-tripa}-n ti wangku-mu} 'I toppled out of the chair'\\ \texttt{-IV.potri\_inclinar-IV.tripa\_salir-CR.IV\\+IND1SG.n3\\-AP.ti\_el -NN.wangku\_silla+INST.mew} \end{example} \begin{example} \label{ex:84}\ \\ \emph{\textbf{potrü-tripa}-n ti wangku-mu} \item[1.]'I fell backward from the chair' [Smeets, I. 2008: 62 (11)] \cite{RefB:21} \item[2.]'I toppled from the chair' [Smeets, I. 2008: 563 (\emph{tripa-})] \cite{RefB:21}\\ \texttt{-IV.potrü\_inclinar-IV.tripa\_salir-CR.IV\\+IND1SG.n3\\-AP.ti\_el -NN.wangku\_silla+INST.mew} \end{example} \begin{itemize} \label{it:16} \item[]\emph{potri-le-} 'to be leaning (over)' \item[]\emph{potri-tripa-} 'to topple' \item[][Smeets, I. 2008: 543] \cite{RefB:21} \end{itemize} \begin{example} \label{ex:85} [Smeets, I. 2008: 296 (20)] \cite{RefB:21}\\ \emph{\textbf{potri-künu}-w-ün} 'I bent forward'\\ \texttt{-IV.potrü\_inclinar+PFPS.künu32\\+REF.w31+IND1SG.n3} \end{example} We did find examples of \emph{potrü-} in other texts, and as in previous cases, they show no concordance with Smeets statements: \begin{example} \label{ex:86} [Augusta, F.] \cite{RefB:03}\\ \emph{\textbf{potrü}-w-ün} 'to buck'\\ \texttt{-IV.potrü\_inclinar+PS.we19+PVN.n4} \end{example} For the verb \emph{rekül-} 'to lean' there are some examples in other texts contradicting Smeets. \begin{example} \label{ex:87} [Augusta, F.] \cite{RefB:03}\\ \emph{\textbf{rekül}-tu-n} 'to caddle up, to lie down'\\ \texttt{-IV.rekül\_apoyar+TR.tu33+PVN.n4}\\ \emph{\textbf{rekül}-tu-we} 'back (of something)'\\ \texttt{-IV.rekül\_apoyar+TR.tu33+NOMPI.we} \end{example} \begin{example} \label{ex:88} [Febrés, A.] \cite{RefB:03}\\ \emph{\textbf{rekül}-ün} 1.'to cuddle up, to stand or stand on something' 2.'to lean'\\ \texttt{-IV.rekül\_apoyar+PVN.n4} \end{example} For the verb \emph{üñif-} $\sim$ \emph{ünif-} 'to lie down on the floor' we did not find examples other than the one given by Smeets, see example E\ref{ex:73}, p. \pageref{ex:73}. For the verb \emph{wira-} 'to sit down with spread legs', Smeets presents no examples but definitions in combination with two of the three suffixes: \begin{itemize} \label{it:17} \item[]\emph{wira-künu-w-} 'to adopt a position with the legs apart' \item[]\emph{wira-le-} 'to sit with the legs apart' \item[][Smeets, I. 2008: 576] \cite{RefB:21} \end{itemize} Examples from other texts: \begin{example} \label{ex:89} [Augusta, F.] \cite{RefB:03}\\ \emph{\textbf{wira-le}-n} 'to be with legs open'\\ \texttt{-IV.wira\_sentar-con-las-piernas-abiertas\\+ST.le28+PVN.n4} \end{example} \begin{example} \label{ex:90} [Mösbach, E. 1936] \cite{RefB:14}\\ \emph{\textbf{wira-l-küle}-chi} 'the open ones'\\ \texttt{-IV.wira\_sentar-con-las-piernas-abiertas\\+CA.l34+ST.le28+SVN.Ø4+ADJ.chi} \end{example} \begin{example} \label{ex:91} [Mösbach, E. 1936] \cite{RefB:14}\\ \emph{\textbf{wira}}\footnote{It looks like Pascual Koña uses \emph{wira-} with the sense of "two things that spread appart", not only the legs. Mösbach collected Koña's memoires in the book cited in reference \cite{RefB:14}. }\emph{\textbf{-l-künu}-ye-nge-ke-fu-y} 'they remain open'\\ \texttt{-IV.wira\_sentar-con-las-piernas-abiertas\\+CA.l34+PFPS.künu32+PLR.ye24+PASS.nge23\\+CF.ke14+IPD.fu8+IND.y4+3.Ø3} \end{example} \subsubsection{Verbs that need a directional} \label{sec:21} \paragraph{} \label{tp:21} There is another group of verbs that require a directional to be expressed if they are not part of a compound or take a transitivizer or causative suffix. Directional suffixes are \emph{-me-} thither (slot 20), \emph{-pa-} hither (slot 17) and \emph{-pu-} locative (slot 17). The affected verbs are: \begin{itemize} \label{it:18} \item[]\emph{antü-} 'to spend a day' \item[]\emph{fül-} 'to come near' \item[]\emph{küyen-} 'to spend a month' \item[]\emph{llekü-} 'to approach' \item[]\emph{nge-} 'to have been' (it only requires \emph{-me-} thither or \emph{-pa-} hither) \item[]\emph{pülle-} 'to come near' \item[]\emph{ru-} 'to pass, to go through' (it only requires \emph{-me-} thither or \emph{-pa-} hither) \item[]\emph{tripantu-} 'to spend a year' \item[] \item[]And the following compounds: \item[]\emph{kim-kon-} '(know-enter-) to find out, to understand' requires \emph{-pa-} hither \item[]\emph{kim-püra-} '(know-go\_up-) to realise' requires \emph{-me-} thither or \emph{-pa-} hither \item[]\emph{trem-tripa-} '(grow\_up-go\_out-) to become conscious of while growing up' requires \emph{-pa-} hither \item[][Smeets, I. 2008: 325, 326] \cite{RefB:21} \end{itemize} For \emph{antü-} 'to spend a day' there are some examples refuting Smeets' observations, i.e., showing the occurrence of the verb without the directionals nor the transitivizer or causative: \begin{itemize} \label{it:19} \item[]Augusta, F. \cite{RefB:03} \emph{antü-n, antü-le-iñ, antü-y, antü-ñma-le-n, antü-ñma-n} \item[]Febrés, A. \cite{RefB:03} \emph{antü-n, antü-ku-n} \item[]Mösbach, E. \cite{RefB:14} \emph{antü-y} \item[]Smeets, I. \cite{RefB:21} \emph{antü-le-y, antü-a-y, antü-y, antü-le-chi} \item[]Zúñiga, F. \cite{RefB:24} \emph{antü-y} \item[]Valdivia. L. \cite{RefB:03} \emph{antü-n, antü-n-ku-n} \end{itemize} For \emph{fül-} 'to come near', it happens as with \emph{antü-}: \begin{itemize} \label{it:20} \item[]Augusta, F. \cite{RefB:03} \emph{fül-küle-n, fül-ma-n, fül-ün} \item[]Mösbach, E. \cite{RefB:14} \emph{fül-a-n, fül-el, fül-la-e-y-ew, fül-küle-le-n, fül-ma-nge-fu-lu, fül-e-y} \item[]Smeets, I. \cite{RefB:21} \emph{fül-küle-n} \end{itemize} For \emph{küyen-} 'to spend a month', Smeets gives no examples, and we have also found contradicting ones from other authors: \begin{itemize} \label{it:21} \item[]Augusta, F. \cite{RefB:03} \emph{küyen'-ün} \item[]Febrés, A. \cite{RefB:03} \emph{küyen-pe-n, küyen-a-y} \end{itemize} For \emph{llekü-} 'to approach', Smeets gives one example, and other authors have contrary examples. \begin{example} \label{ex:92} [Smeets, I. 2008: 503 (\emph{elu-})] \cite{RefB:21}\\ \emph{\textbf{llekü-pu}-el} 'to come near'\\ \texttt{-IV.llekü\_acercar+LOC.pu17+OVN.el4} \end{example} \begin{itemize} \label{it:22} \item[]Augusta, F. \cite{RefB:03} \emph{llekü-n, llekü-le-n, llekü-ñma, llekü-ñma-le-n, llekü-ñma-nie-n} \item[]Febrés, A. \cite{RefB:03} \emph{lleku-n, lleku-le-n} \item[]Mösbach, E. \cite{RefB:14} \emph{llekü-n, llekü-ñma-nie-lu} \item[]Valdivia. L. \cite{RefB:03} \emph{llekü-n, llekü-le-n} \end{itemize} For \emph{nge-} 'to have been', Smeets remarks that an exception is when the negation marker \emph{-la-} co-occurs. But we have found that the exception also applies with the negation marker \emph{-no-}. The first two following forms found in Smeets are also realised without directional suffixes: \begin{itemize} \label{it:23} \item[]Exceptions: \emph{nge-n, nge-y} \item[]Negation \emph{-la-}: \emph{nge-\textbf{la}-y, nge-\textbf{la}-n, nge-we-\textbf{la}-y, nge-ke-\textbf{la}-fu-y, nge-we-tu-\textbf{la}-y} \item[]Negation \emph{-no-}: \emph{nge-\textbf{nu}-n, nge-ke-\textbf{nu}-lu, nge-\textbf{nu}-n-mu} \end{itemize} For \emph{pülle-} 'to come near', there are contrary examples even in Smeets: \begin{itemize} \label{it:24} \item[]Augusta, F. \cite{RefB:03} \emph{pülle-le-n, pülle-künu-n, pülle-lu, pülle-le-ye-lu, pülle-le-chi, pülle-le-nu-chi, pülle-nie-gel-chi, pülle-ke-ñma-w-küle-y, pülle-ñma-w-küle-y-u} \item[]Mösbach, E. \cite{RefB:14} \emph{pülle-ñma-w-ke-chi} \item[]Smeets, I. \cite{RefB:21} \emph{pülle-le-y, pülle-le-lu} \end{itemize} For \emph{ru-} 'to pass, to go through' the occurrence are as Smeets describes them, except for two examples found at Febrés, A. \cite{RefB:03} (\emph{ru-n, ru-a-n}), which we have no way yet to confirm as right or wrong. \begin{example} \label{ex:93} [Augusta, F.] \cite{RefB:03}\\ \emph{\textbf{ru-l-pa}-nütram-pe-lu} 'interpreter, translator'\\ \texttt{-IV.ru\_pasar+CA.l34+HH.pa17\\-NN.nütram\_conversación+PX.pe13+SVN.lu4} \end{example} For \emph{tripantu-} 'to spend a year' there are also examples from other authors not supporting Smeets' findings: \begin{itemize} \label{it:25} \item[]Augusta, F. \cite{RefB:03} \emph{tripantu-le-n, tripantu-n, tripantu-y,\\ tripantu-chi} \item[]Febrés, A. \cite{RefB:03} \emph{tripantu-n, tripantu-a-n, tripantu-y} \item[]Mösbach, E. \cite{RefB:14} \emph{tripantu-a-m, tripantu-n, tripantu-el} \item[]Valdivia, L. \cite{RefB:03} \emph{tripantu-n} \end{itemize} Finally, for compounds \emph{kim-kon-} 'to find out, to understand', \emph{kim-püra-} 'to realise' and \emph{trem-tripa-} 'to become conscious of while growing up', we have found no other examples than Smeets', who also gives a contradictory example: E\ref{ex:94}. \begin{example} \label{ex:94} [Smeets, I. 2008: 447 (26)] \cite{RefB:21}\\ \emph{\textbf{kim-kon}-y-iñ} 'we had become aware'\\ \texttt{-TV.kim\_saber-IV.kon\_entrar-CR.IV\\+IND.y4+1.Ø3+PL.iñ2} \end{example} \begin{example} \label{ex:95} [Smeets, I. 2008: 447 (24)] \cite{RefB:21}\\ \emph{\textbf{kim-kon-pa}-n} 'I understood, I realised'\\ \texttt{-TV.kim\_saber-IV.kon\_entrar-CR.IV+HH.pa17\\+IND1SG.n3} \end{example} \begin{example} \label{ex:96} [Smeets, I. 2008: 381 (1)] \cite{RefB:21}\\ \emph{\textbf{kim-püra-me}-n} 'I bcame aware, I came to appreciate'\\ \texttt{-TV.kim\_saber-IV.püra\_subir-CR.IV+TH.me20\\+IND1SG.n3} \end{example} \begin{example} \label{ex:97} [Smeets, I. 2008: 446 (11)] \cite{RefB:21}\\ \emph{\textbf{kim-püra-me-pa}-n} 'I realised'\\ \texttt{-TV.kim\_saber-IV.püra\_subir-CR.IV+TH.me20\\+HH.pa17+IND1SG.n3} \end{example} \begin{example} \label{ex:98} [Smeets, I. 2008: 262 (10)] \cite{RefB:21}\\ \emph{\textbf{kim-püra-me-pa}-fi-ñ} 'I have come to know him'\\ \texttt{-TV.kim\_saber-IV.püra\_subir-CR.IV+TH.me20\\+HH.pa17+EDO.fi6+IND1SG.n3} \end{example} \begin{example} \label{ex:99} [Smeets, I. 2008: 415 (4)] \cite{RefB:21}\\ \emph{\textbf{trem-tripa-pa}-y} 'they grew up knowing (about)'\\ \texttt{-IV.trem\_crecer-IV.tripa\_salir-CR.IV\\+IND.y4+3.Ø3} \end{example} \subsection{Morphophonology} \label{sec:22} \paragraph{} \label{tp:22} As we have mentioned in the introduction, interaction among roots and suffixes creates different contexts in which the form of these elements may be affected. Most common changes correspond to epenthesis and elision, but there are also cases of phoneme alternation, some are obligatory and others, optional. We present all of these changes in section \ref{sec:39} \nameref{sec:39}, p. \pageref{sec:39}, where, at the same time, we explain how these variations have been encoded to be processed by the FST analyser. \section{The computational approach} \label{sec:23} \paragraph{} \label{tp:23} In this section, after a basic introduction to computational morphology and Finite State Transducers (FST), we explain how morphophonologic phenomena of \emph{Mapudüngun} have been encoded in order to process \emph{Mapuche} words through FST analysis, and obtain a proper identification of the parts (roots and suffixes) forming these words. We do a quick review on FOMA implementations. FOMA is the FST compiling program we use to generate the analyser (see section \ref{sec:30}). And finally, in section \ref{sec:31}, we enter into \emph{Mapudüngun} encoding, starting by the alphabet and finishing by the lexicon: roots and suffixes. \subsection{Computational morphology} \label{sec:24} \paragraph{} \label{tp:24} Computational morphology is the branch of computational linguistics concerned with word structure\footnote{In this section we follow Gasser [2011: 55] \cite{RefB:08}.}. Two kinds of processing are of interest. One is morphological analysis, by which a surface word form is analysed into a lexical representation, consisting of the word's component morphemes or grammatical features. The other is morphological generation, by which a lexical representation is converted to a surface word form. Consider the \emph{Mapuche} verb \emph{lelien} 'you looked at me'. A basic morphological analysis would simply segment the word into the morphemes that make it up, as seen below: \begin{example} \label{ex:100}\ \\ \emph{lelien} → \emph{leli‐e-n} \end{example} A more abstract lexical representation output would indicate the lexical and grammatical significance of the morphemes. The word \emph{lelien} could be represented at the lexical level as shown right below: \begin{example} \label{ex:101}\ \\ \emph{leli-e-n} 'you looked at me / look at me!'\\ ‑TV.leli\_mirar\footnote{The analyser lexicon is collected with the Spanish translation, that's why all the analyses presented in this article carry the root meaning in Spanish.}+IDO\footnote{Tags meaning are found in annex \ref{anx:01} \nameref{anx:01}.}.e6+IND1SG.n3+DS12A.Ø1 \end{example} This chain of tags represents the root of the verb \emph{leli-} meaning 'look at', the internal direct object \emph{-e-}, the portmanteau suffix indicative 1\textsuperscript{st} person singular \emph{-n}, and the null dative subject for 2\textsuperscript{nd} or 1\textsuperscript{st} agent persons\footnote{We follow Smeets' descriptions throughout this work, but it is important to know that in this issue there is discrepancy among authors of \emph{Mapudüngun} descriptive grammars. Basically, what Smeets [2008] \cite{RefB:21} identifies as "agent-patient paradigm" is what Zúñiga [2006] \cite{RefB:24} calls "verbal inversion", and Salas [2006] \cite{RefB:19} "person focalization".}. Three types of information are required to perform morphological analysis: a lexicon, the morphotactics and the (alternation) rules. A lexicon is composed of roots or stems, which combine with grammatical morphemes to yield surface word forms. \paragraph{Morphotactics} \label{tp:25} refer to constraints on the order and class of the morphemes that make up a word within a particular category. For example, the morphotactics of \emph{Mapudüngun} verbs specify the following minimal sequence of morphemes: mood (indicative, conditional or imperative, slot 4), subject (slot 3) and number (slot 2). \paragraph{Alternation rules} \label{tp:26} are responsible for the variation of forms that morphemes take in the presence of other morphemes. For example, the portmanteau suffix of 1\textsuperscript{st} person indicative mood takes two forms, one before vowels, another before consonants, where an epenthetic \emph{-ü} appears. Together, knowledge of alternation rules, morphotactics, and the forms of roots or stems in the lexicon represent the morphology of a given language. Morphological analysis may be efficiently handled by finite state transducers (FST). An FST is a network of states and transitions between them, and the analysis of a word is a path through this network. Each of the transitions along the path specifies a correspondence between input characters (or phones) and output characters. The transducer\footnote{A transducer is a device or machine that converts energy from one form into another, e.g., a microphone is a transducer that converts the vibrations captured from the air into analogous electrical impulses. An FST converts a chain of symbols into another chain of symbols.} converts sequences of input characters to sequences of output characters. One very useful property of FSTs is that they may be inverted. This means that the same transducer that implements analysis (surface to lexical representation) for a given rule, it can also implement generation (lexical to surface representation) through simple reversal of the input and output characters. Another useful property is composition: a sequence of FSTs, converting a surface representation into a lexical representation with various intermediate stages, it may be merged into a single FST which behaves the same as the original sequence of FSTs (see \ref{tp:29} \nameref{tp:29}, p. \pageref{tp:29}). \subsubsection{Finite state method} \label{sec:25} \paragraph{} \label{tp:27} A finite state transducer (FST) is a piece of software that operates as an enhanced finite state machine (FSM) which in its turn is capable of representing and operating over finite state networks (FSNs)\footnote{In this section we follow the explanation given by Ríos [2015: 18-21] \cite{RefB:17}}. \subsubsection{Finite state transducers (FSTs)} \label{sec:26} \paragraph{} \label{tp:28} There is an important distinction between FSMs that are one-sided, and FSTs that have an upper and a lower side, or more generally, an input and an output level. Since an FST has two sides, it can not only decide if a given word is part of its regular language, but it will also return the corresponding output to the given input [Beesley \& Karttunen 2003: 11] \cite{RefB:01}. An FST accordingly implements a relation between two regular languages: an upper side and a lower side regular languages, and it literally "transduces" strings from one language into the other. In a non-deterministic FST it may produce more than one possible outputs for a given string. See figure \ref{fig:01} for an example of an FST that contains the relation of two of the following four word forms with the \emph{Mapudüngun} root \emph{miaw-} 'to wander', and their respective morphological analysis\footnote{\emph{miaw-ün} 'I wandered', \emph{miaw-üy-m-i} 'you wandered', \emph{miaw-a-n} 'I will wander', \emph{miaw-a-y-m-i} 'you will wander'.}: \begin{figure}[H] \includegraphics[width=\columnwidth,height=2.851cm]{figs/Fig01.eps} \caption{Finite state transducer for \emph{miaw-} with Ind1Sg, present/past or future} \label{fig:01} \end{figure} \begin{example} \label{ex:102}\ \\ \emph{miawün} → \texttt{miaw+Ind1Sg3}\footnote{The number at the end of each suffix tag indicates its assigned slot. For a complete explanation on how to read suffixes tags see the note following E\ref{ex:1}, p. \pageref{note:02}.} (in figure \ref{fig:01})\\ \emph{miawüymi} → \texttt{miaw+Ind4+2p3+Sg2}\\ \emph{miawan} → \texttt{miaw+Nrld9+Ind1Sg3} (in figure \ref{fig:01})\\ \emph{miawaymi} → \texttt{miaw+Nrld9+Ind4+2p3+Sg2} \end{example} Note that the transducer contains an empty transition \textcyrillic{є:є} which makes the NRLD suffix \emph{-a-} optional. The transducer in figure \ref{fig:01} may be applied in both directions: \begin{quote} \label{note:03} {\small Given \emph{miawüymi} 'you wandered' as input, applied in "upward" direction, it produces:\\ \texttt{‑IV.miaw\_merodear+IND.y4+2.m3+SG.i2} as output. This is the procedure for morphological analysis. \\\\ Given \texttt{‑IV.miaw\_merodear+IND1SG.n3} as input, applied in "downward" direction, it produces \emph{miawün} 'I wandered' as output. This is the procedure for generation.} \end{quote} \paragraph{Composition} \label{tp:29} is a "hard to handle" concept in finite state processing. However, here it suffices to affirm that a cascade of rules compiled into finite state transducers may be combined into a single equivalent FST via composition. See figure \ref{fig:02}. \begin{figure}[H] \includegraphics[width=\columnwidth,height=5.500cm]{figs/Fig08.eps} \caption{A cascade of rules compiled into finite state transducers may be combined into a single equivalent FST via composition. This mathematical possibility, shown by Johnson, may be performed in practice using a finite state software [Beesley \& Karttunen 2003: 35] \cite{RefB:01}} \label{fig:02} \end{figure} \subsubsection{Two levels morphology} \label{sec:27} \paragraph{} \label{tp:30} The upper language, also called the abstract level, the lower language also called surface level, and the relation they establish as part of an FST are well explained in Beesley \& Karttunen [2003] \cite{RefB:01}. Related images (figures \ref{fig:03} and \ref{fig:04}) are presented here just to illustrate a general idea about these three concepts: upper and lower languages, and the relation among them. Table \ref{tab:03} shows that relations contain pairs of strings. For analysis, the lower language is used as input, and the upper language is produced as output [figures \ref{fig:03} and \ref{fig:04}]: \begin{table}[htb] \caption{Article/Determiner/Quantifier distinctions.} \label{tab:03} \begin{tabular}{|l|l|} \hline\noalign{\smallskip} Upper: the+Art+Def & Upper: a+Art+Indef\\ \noalign{\smallskip}\hline\noalign{\smallskip} Lower: the & Lower: a\\ \noalign{\smallskip}\hline \end{tabular} \end{table} \begin{figure}[H] \includegraphics[width=\columnwidth,height=2.851cm]{figs/Fig02.eps} \caption{Analysing canto [Beesley \& Karttunen 2003: 13] \cite{RefB:01}} \label{fig:03} \end{figure} \begin{figure}[H] \includegraphics[width=\columnwidth,height=1.251cm]{figs/Fig03.eps} \caption{Another path in the Spanish morphological analyser [Beesley \& Karttunen 2003: 13] \cite{RefB:01}} \label{fig:04} \end{figure} \paragraph{Regular expressions as rules} \label{tp:31} In the development of this system we mainly used two types of operators "restriction and replacement" (\texttt{=>, ->}), complemented with composition \\(\texttt{.o.}), context (\texttt{||}), and some others operators. Restriction is one of the fundamental functions in two-level calculus: \begin{example} \label{ex:103} \texttt{[a => c \_ [r|t]];} \end{example} E\ref{ex:103} denotes the language of strings that have the property that the string "\textbf{a}" is immediately preceded by the string "\textbf{c}" and immediately followed by the string "\textbf{r}" or "\textbf{t}"; so, the final strings \texttt{"cat"} and \texttt{"car"} satisfy the condition, but strings such as \texttt{"cab"} or \texttt{"can"} do not. \begin{example} \label{ex:104} \texttt{[y -> \{ie\} || \_ [r|\{st\}]];} \end{example} E\ref{ex:104} denotes the relation in which the string "\textbf{y}" is transformed into "\textbf{ie}" (here a condition is introduced, in this case is the context represented by the twin pipes (\texttt{||})) when followed by "\textbf{r}" or "\textbf{st}"; so, \texttt{"ugly"} becomes \texttt{"uglier"} or \texttt{"ugliest"}, and \texttt{"pretty"} becomes \texttt{"prettier"} or\\ \texttt{"prettiest"}\footnote{The actual rule to treat this behaviour is much more complex, it is presented in this simplistic way just as an example.}. Composition is the concatenation of rules, for example, E\ref{ex:104} could be decomposed into two concatenated rules, i.e. they together form a "composition" of rules: \begin{example} \label{ex:105} \texttt{[y -> \{ie\} || \_ r] .o. \newline [y -> \{ie\} || \_ \{st\}];} \end{example} Or it could be represented stating two different contexts for the change to occur: \begin{example} \label{ex:106} \texttt{[y -> \{ie\} || \_ r, \_ \{st\}];} \end{example} In general, regular expressions may be redundant because some of the operators could easily be defined in terms of others, which means that a string and its restrictions may be expressed in different ways by means of regular expressions. For more detailed descriptions on regular expressions operators, please consult: FOMA's Regular Expression Reference: \href{https://code.google.com/archive/p/foma/wikis/RegularExpressionReference.wiki}{https://code.google.com/archive/p/foma/wikis/\\RegularExpressionReference.wiki} Another excellent reference is Beesley \& Karttunen's "Finite State Morphology" book \cite{RefB:01}. \subsection{The bases of the analyser} \label{sec:28} \paragraph{} \label{tp:32} The main script of the analyser is the series of regular expressions (regexps) encoding the \emph{Mapudüngun} grammar. \\This is where the different parts forming the \emph{Mapuche} language are declared: roots, suffixes, particles, etc., and the rules for them to interact in the way \emph{Mapudüngun} accepts it. \paragraph{} \label{tp:33} We follow Smeets description of \emph{Mapudüngun}: "A Grammar of \emph{Mapuche}" \cite{RefB:21} to implement the analyser and generator. We begun treating only one variant or dialect of this language, which is known as central \emph{Mapudüngun}. The analyser, which is basically the same as the generator, has little broader rules that accept mainly spelling variants, that in some cases come from different dialects, but generally correspond to a certain syncretism (and confusion) generated after the different spelling proposals and the influence of Spanish orthography. The spelling proposal we follow is AMU, "Alfabeto \emph{Mapuche} Unificado" [Sochil 1986, 1988] \cite{RefB:23}. This "grafemario" is also known as the "academic proposal". Having half mind in computational technology and the other half in linguistics, finding a description of a language such as the one Smeets does of \emph{Mapudüngun} in her thesis work, leads straight to think in a computational implementation of her grammar. The suffixes organised in slots and the description of interaction rules are the words that reflect what regular expressions can encode. We did further research on other descriptions of \emph{Mapudüngun} while implementing the analyser but only to compare descriptions (Other sources of \emph{Mapudüngun} grammars we have consulted are Fernández-Garay \& Malvestiti \cite{RefB:07}, Lonkon \cite{RefB:12}, Ragileo \cite{RefB:15}, Salas \cite{RefB:19} and Zúñiga \cite{RefB:24}). \subsection{The analyser} \label{sec:29} \paragraph{} \label{tp:34} This is a rule based morphological analyser (and generator) applied to the \emph{Mapudüngun} language. It was built with finite state transducers using the algorithms developed by Mans Hulden\footnote{\href{https://en.wikipedia.org/wiki/Mans\_Hulden}{https://en.wikipedia.org/wiki/Mans\_Hulden}} for his FOMA\footnote{\href{https://fomafst.github.io/}{https://fomafst.github.io/}} project, an open source application to compile finite state transducers. The rules that were generated for the analyser, as well as the tags used in its outputs, are based on the description and study made by Dr. Ineke Smeets of \emph{Mapudüngun}, and published in her book "A Grammar of \emph{Mapuche}" [Smeets, I. 2008] \cite{RefB:21}\footnote{\href{https://www.degruyter.com/view/product/22765}{https://www.degruyter.com/view/product/22765}}. \subsection{FOMA implementations} \label{sec:30} \paragraph{} \label{tp:35} The path we follow is Annette Ríos work on Quechua, she have developed various tools, the main one being the finite state morphological analyser and generator [Ríos 2015] \cite{RefB:17}. Ríos development for the analyser and generator was with XFST and other tools released by Xerox [Beesley \& Kartunnen 2003] \cite{RefB:01}. She used FOMA for the spell checker. We decided to use FOMA for everything, mainly because it is open source software and we wanted to develop a totally free set of linguistic tools for \emph{Mapudüngun}. FOMA is a very well-known software used by many linguists and computer developers for a wide range of tasks, but mainly for language applications. Searching in the Internet we have looked for the FOMA implementations\footnote{This information was compiled using Google Scholar only. Some publications mention more than one FOMA implementation, some times at different years; to simplify, we have counted the publications about FOMA implementations, and we have left out those that mention FOMA only as a reference. The results vary as the search is repeated.} per year, shown in table \ref{tab:04}: FOMA has been widely used in Basque [Alegria et al. 2009] related tools, but also in a good amount of American aboriginal languages (Quechua [Rios. 2015]; Arapaho [Kazeminejad, Cowell, \& Hulden. 2017]; Nahuatl [Escobar. 2019]), Turkish [Yıldız, Avar, \& Ercan. 2019], Indonesian [Larasati et al. 2011], Japanese [Sim. 2013], Arabic [Attia, Al-Badrashiny, \& Diab. 2014], Kazakh [Kessikbayeva \& Cicekli. 2014] and others\footnote{There are many more FST implementations for different languages, with other available FST compilers; but as we have developed our own with FOMA, we just list those.}. We list here some of the implementations counted in table \ref{tab:04}. \begin{itemize} \label{it:26} \item[] 2020. \emph{A Finite-State Morphological Analyser for Evenki}. Zueva, A., Kuznetsova, A. \& Tyers, F. (Indiana University). \item[] \item[] 2019. \emph{Improved Finite-State Morphological Analysis for St. Lawrence Island Yupik Using Paradigm Function Morphology}. Chen, E., Park, H. \& Schwartz, L. (University of Illinois Urbana-Champaign). \item[] \item[] 2018. \emph{Computational syntactic analysis of Setswana}. Berg, A. (North-West University. Johannesburg). \item[] \item[] 2017. \emph{Creating lexical resources for polysynthetic languages — the case of Arapaho}. Kazeminejad, A., Cowell, A. \& Hulden, M. (University of Colorado). \item[] \item[] 2016. \emph{ZeuScansion: A tool for scansion of English poetry}. Agirrezabal, M., Astigarraga. A., Arrieta, B. (University of the Basque Country) \& Hulden, M. (University of Colorado Boulder). \item[] \item[] 2015. \emph{A Basic Language Technology Toolkit for Quechua}. Ríos, A. (University of Zurich). \item[] \item[] 2014. \emph{GWU-HASP: Hybrid Arabic Spelling and Punctuation Corrector}. Attia, M., Al-Badrashiny, M. \& Diab, M. (The George Washington University). \item[] \item[] 2013. \emph{A Morphological Analyzer for Japanese Nouns, Verbs and Adjectives}. Sim, Y. (Carnegie Mellon University). \item[] \item[] 2012. \emph{Finite State Methods Applied to Hebrew Noun Patterns (Mishqalim)}. Rozenberg, F. (Eberhard Karls Universität. Tübingen, Germany). \item[] \item[] 2011. \emph{Matxin, an open-source rule-based machine translation system for Basque}. Mayor, A., Alegria, I., Díaz de Ilarraza, A., Labaka, G., Lersundi, M. \& Sarasola, K. (University of the Basque Country). \end{itemize} \begin{table}[htb] \caption{FOMA implementations per year (2011 to 2020)} \label{tab:04} \begin{tabular}{lllll} 2020: 12 & 2019: 17 & 2018: 16 & 2017: 14 & 2016: 10 \\ \noalign{\smallskip} 2015: 11 & 2014: 13 & 2013: 09 & 2012: 12 & 2011: 13 \end{tabular} \end{table} \subsection{The encoded \emph{Mapuche} alphabet} \label{sec:31} \paragraph{} \label{tp:36} We present in this section the alternative representation of some graphemes in the analyser, alternative from those of Smeets. Finally, the rules implying variation in the spelling of words, generated either by elision, epenthesis or other similar phenomena. As it also deals with orthography, this section brings up the subject of \nameref{sec:54} (see \ref{sec:54}, p. \pageref{sec:54}). The sigma alphabet of the analyser includes every non-epsilon (not empty) symbol that appears in the network, either by itself or as a component of a symbol pair [Beesley \& Karttunen 2003: 57, 58] \cite{RefB:01}. For example, the sigma alphabet of the network compiled from [cat "+Noun":0] consists of the symbols a, c, t and +Noun [Beesley \& Karttunen 2003: 62] \cite{RefB:01}. Then, the sigma alphabet is a list of all the single symbols that occur either on the upper or lower side of the arcs [Beesley \& Karttunen 2003: 99] \cite{RefB:01} (see \ref{sec:26} \nameref{sec:26}, p. \pageref{sec:26}). The analyser's sigma, among all the symbols it comprises, contains the \emph{Mapuche} alphabet: \begin{quote} \label{note:04} {\small VOW [ a | e | i | o | u | ü ];\\ SVW [ w | y | g ];\\ CON [ \{ch\} | d | f | k | l | \{ll\} | m | n | ñ | \{ng\} | p | r | s | \{sh\} | t | \{tr\} ];\\\\ \{VOW, SVW, CON\} ${\in}$ $\Sigma $ of the analyser} \end{quote} In order to apply morphotactics (see \ref{sec:24} \nameref{sec:24}, p. \pageref{sec:24}) and rules, the alphabet has been divided into three groups: \subsubsection{Vowels} \label{sec:32} \paragraph{} \label{tp:37} For this group of characters (see table \ref{tab:02}, p. \pageref{tab:02}) Smeets' proposal was adopted without any variation. They conform the group named \texttt{VOW}. It is worth to mention though, that "\emph{Mapudüngun} has six vowel phonemes, /\textsci~ë~\textturna~ö~\textupsilon~\textreve/... It should be noted that vowels of \emph{Mapudüngun} have traditionally been treated as the five vowels of Spanish (/i e a o u/), with identical stressed and unstressed allophones, plus a high central unrounded vowel /\textbari/ (commonly known as the 'sixth vowel') having a mid central allophone [\textschwa] in unstressed position" [Sadowsky, S. 2013] \cite{RefB:18}. The previous paragraph comes to say that the grapheme \emph{ü} represents two sounds: /\textbari/ and /\textschwa/ which realise in complementary contexts. \subsubsection{Semivowels:} \label{sec:33} \paragraph{} \label{tp:38} Smeets identifies them as glides (see table \ref{tab:01}, p. \pageref{tab:01}). She includes the \emph{r}, and counts the glides among the consonants, while in the analyser these are separated from the consonants to form the semivowels group, except for the \emph{r}. With this categorisation we can treat certain phonological phenomena that involve these semivowels, such as elision and epenthesis (see \ref{sec:39}, p. \pageref{sec:39}). We could have called them glides as Smeets does, but following Beesley \& Kartunnen [2003] \cite{RefB:01}, we have called them semivowels. Anyway, they do occur as both, semivowels and glides\footnote{Glides immediately precede the vowel, semivowels immediately follow the vowel, both are less sonorous than the vowel.}. The sound /{\textgamma}/ usually represented by a \emph{g}, Smeets represents it by a \emph{q} to reflect a difference in sound, which is softer than the one she represents using \emph{g}, for instance, in the loan from Spanish \emph{\textbf{g}ayeta} 'cookie', so written in Smeets' work. She spells the \emph{Mapuche} word for 'seven' as \emph{re\textbf{q}le}, while we spell it \emph{re\textbf{g}le}. This word and all those that Smeets spells with \emph{q} have been traditionally spelled with \emph{g}. This distinction does not affect the meaning of words, then \emph{g} spelling has been adopted by us to represent all the /{\textgamma}/ variants. For the other two graphemes, \emph{w} and \emph{y}, no changes were made. All three are grouped under the \texttt{SVW} denomination. \subsubsection{Consonants:} \label{sec:34} \paragraph{} \label{tp:39} Contrary to Smeets, who states that there are 19 consonants, and because we have counted out the three glides identified in the previous paragraphs as semivowels, there are 16 recognised consonants. Smeets uses \textcrd~ to represent the voiceless\footnote{Not in all dialects this sound is voiceless, prove of that is in the early transcriptions made by Jesuit monks, all of them used \emph{d}, which represents a voiced sound.} interdental fricative /\texttheta/ to make clear the difference with the d from Spanish loans. We use \emph{d} because this distinction does not affect the meaning of words. For the interdental series \emph{t'}, \emph{n'}, \emph{l'}, we have eliminated the apostrophe to interpret these letters as the alveolar counterpart. Letters with apostrophe appear mainly in the older texts. In more recent texts they sometimes appear, even though not consistently. Some times the writer introduces an interdental in a word, later it does not, not even for the same word. Due to this misleading usage of the interdental variant and the "dying out" of the distinction [Smeets, I. 2008: 31] \cite{RefB:21}, the inclusion of interdentals has been avoided for morphological generation, while they are accepted as variants in the analysis. The elimination of apostrophe broadens the possibilities of analysis. The words and roots to be analysed are collected in the lexicon; if it appears just \emph{newen} 'force, strength' in the lexicon, the variant \emph{n'ewen'} would be taken as an unknown root, while by eliminating the apostrophe before analysis, it allows the transducer to analyse any introduced variant, either \emph{n'ewen}, \emph{n'ewen'}, \emph{newen'} or \emph{newen} as the same root. Loaned sounds /b/ (bilabial, plosive, voiced), represented by b, and /x/ (velar, fricative, voiceless), represented by j, from Spanish, are not included in our system. They are converted into the corresponding letter of the \emph{Mapudüngun} alphabet by means of the spelling unifier (see \ref{sec:54} below); b into \emph{f} and j into \emph{k}, which are the most usual conversions we have found reflected in some dictionaries: jabón → \emph{kafon}; burro → \emph{furiku}, etc. [Febrés 1882\footnote{Consulted at \href{http://corlexim.cl}{http://corlexim.cl} <2019-07-11>. More examples are found in Febrés dictionary [1882] \cite{RefB:06}.}]. Other possible conversions are directly reflected in the lexicon: vaca → \emph{waka}\footnote{Today it is well-known that in Spanish there was never a difference in pronunciation of words spelled with b or v (see \href{http://lema.rae.es/dpd/srv/search?id=d45ahCOicD6TkHkns8}{http://lema.rae.es/dpd/srv/search?id=d45ahCOicD6TkHkns8} for more information), otherwise, probably the inclusion of vaca into \emph{Mapuche} lexicon should have been as \emph{faka}.}; vehículo → \emph{weikulo}; voto → \emph{woto}; jamón → \emph{kümon}; junio → \emph{kunio}, etc. Within the consonants group, \texttt{CON}, note the representation for digraphs (\emph{\{ch\}, \{ll\}, \{ng\}, \{sh\}, \{tr\}}) in curly braces. This indicates that these two symbols together form a single representation of a sound. In other words, the concatenation of these two symbols is invariable and univocal. \subsection{Intermediate representation symbols} \label{sec:35} \paragraph{} \label{tp:40} These symbols are created to treat different morphophonological changes that occur in the language due to the interaction between suffixes, between roots, and among all of them together. It may be said that they are part of the alphabet, at least in an abstract level, because they are used to represent a certain stage in a change process, from which the surface form (the one we write or read) arises. A few of them are listed here as an example, the complete list of these symbols with their function is found in annex \ref{anx:09} \nameref{anx:09}, p. \pageref{anx:09}: \begin{example} \label{ex:107}\\ \texttt{"@G"} is used to treat epenthesis of glottal stops represented by \emph{g} in the spelling, see \ref{sec:59}, E\ref{ex:116}, E\ref{ex:117} and R\ref{R:01}, p. \pageref{ex:116}. \end{example} \begin{example} \label{ex:108} \texttt{"@Ü"} is used to treat schwa insertion represented by \emph{ü} in the spelling, see E\ref{ex:110}, E\ref{ex:111} and E\ref{ex:112}, p. \pageref{ex:112}. \end{example} \begin{example} \label{ex:109} \texttt{"@GK"} is used to treat radical alternation in some intransitive verbs which change their last consonant from \emph{g} to \emph{k} if they are in contact with the causative suffix \emph{-üm-}, which transitivizes them, see D\ref{def:19} and D\ref{def:19}, p. \pageref{def:19}. \end{example} \subsection{Roots encoding} \label{sec:36} \paragraph{} \label{tp:41} In the FST, this section headline is "Read in roots", because the system reads the files containing the roots lexicon and incorporate them into the analyser. Lists are separated by part of speech (grammatical categories). \begin{definition} \label{def:01} \\ \texttt{define AVROOT @re"roots/avroot.lex"; \\ define NROOT @re"roots/nroot.lex";} \end{definition} The expression above introduces the lists of roots for adverb and noun categories, so any listed noun may be found throughout "\texttt{NROOT}", which encodes nouns as shown below: \begin{definition} \label{def:02} Sample of nouns lexicon:\\ \texttt{|["‑NN"\{.aylen\_brasa\}]: ["@G"\{aylen\}]\\ |["‑NN"\{.aywiñ\_sombra\}]: ["@G"\{aywiñ\}]\\ |["‑NN"\{.chachay\_papá-afectuoso\}]: [\{chacha\}|\\\{chachay\}|\{tatay\}]\\ |["‑NN"\{.chadi\_sal\}]: \{chadi\}\\ |["‑NN"\{.chaf\_cáscara\_piel-de-frutas\}]: \{chaf\}\\ |["‑NN"\{.chafid\_bagazo)\}]: \{chafid\}} \end{definition} \begin{quote} \label{note:05} {\small In D\ref{def:02} \texttt{"‑NN"} stands for (simple) noun or nominal (root). \texttt{"@G"} is an intermediate language tag to treat glottal stop insertion, see \ref{sec:59}, E\ref{ex:116}, E\ref{ex:117} and R\ref{R:01}, p. \pageref{ex:116}.} \end{quote} In the same way D\ref{def:01} shows noun and adverb roots encoding, there is a file per part of speech and other forms (verbs, adjectives, particles, interjections, etc.). We have divided the lexicon in two major groups: the roots that may be verbalised, and the forms that can not be verbalised. Among the roots, all except for the verb roots may be independent (without suffixes) words. \begin{enumerate} \label{it:27} \item[] Roots (verbalisable) \item File \texttt{ajroot.lex}: adjectives \item File \texttt{avroot.lex}: adverbs \item File \texttt{ivroot.lex}: intransitive verb roots \item File \texttt{names.lex}: proper nouns \item File \texttt{nroot.lex}: nouns \item File \texttt{nuroot.lex}: numerals \item File \texttt{onroot.lex}: onomatopoeia \item File \texttt{qroot.lex}: question forms \item File \texttt{tvroot.lex}: transitive verb roots \end{enumerate} \begin{enumerate} \label{it:28} \item[] Other lexicon (non-verbalisable) \item File \texttt{adverb.lex}: adverbs \item File \texttt{anaphpr.lex}: anaphoric pronouns \item File \texttt{auxv.lex}: auxiliary verbs \item File \texttt{conj.lex}: conjunctions \item File \texttt{dempr.lex}: demonstrative pronouns \item File \texttt{forexp.lex}: foreign expressions (Spanish loans) \item File \texttt{intpr.lex}: interrogative pronouns \item File \texttt{itj.lex}: interjections \item File \texttt{neg.lex}: negation particles \item File \texttt{numbers.lex}: numbers \item File \texttt{part.lex}: particles \item File \texttt{perspr.lex}: personal pronouns \item File \texttt{posspr.lex}: possessive pronouns \item File \texttt{prep.lex}: prepositions \item File \texttt{punct.lex}: punctuation marks \end{enumerate} \nameref{anx:01} is found in annex \ref{anx:01}. There is a list of tags assigned to every part of speech and suffix with the name (in Spanish) identifying them, on:\\ \href{http://www.chandia.net/glosas-del-dungupeyem}{http://www.chandia.net/glosas-del-dungupeyem} \subsection{Suffixes encoding} \label{sec:37} \paragraph{} \label{tp:42} As every suffix is assigned to a slot, which in turn is encoded in a file, the addition of such information to the main script is carried out by calling these files under the script section "Read in slots". Each file contains the fillers of the corresponding slot. For example: \begin{definition} \label{def:03}\ \\ \texttt{define NEG @re"slots/1-15-Inflectional-Suffixes\\/slot‑10.aff";} \end{definition} D\ref{def:03} is the definition of an expression named "\texttt{NEG}", which in turn, is composed by the regular expressions stored in the text file\\"\texttt{slot-10.aff}", for which its complete location route is indicated: "\texttt{slots/1-15‑Flexive‑Suffixes/}" [See figure \ref{fig:05}]. \begin{figure}[H] \includegraphics[width=\columnwidth,height=2.000cm]{figs/Fig07.eps} \caption{Directory tree structure for the location of a suffix file.} \label{fig:05} \end{figure} This file, deployed in D\ref{def:04} below, contains negation suffixes filling slot 10: \begin{definition} \label{def:04} \\ \texttt{["+NEG"{.la10}]: \{la\}\\ | ["+NEG"\{.ki10\}]: "@NK"\\ | ["+NEG"\{.no10\}]: [\{no\}|\{nu\}]\\ | ["+NEG"\{.kino10\}]: [\{kino\}|\{kinu\}];}\footnote{This regexp is written in only one line, but for the sake of better understanding each of its parts is exposed in separated lines.} \end{definition} D\ref{def:04} expresses four suffixes filling slot 10. They are separated by the pipe (vertical bar | ) symbol. Every suffix section indicates its upper or abstract level (right of the colon) and lower or surface level (left of the colon). Every abstract form is returned at the analysis process after a cleaning task leaves only the category tag, the suffix form and the slot number: "\texttt{+NEG.no10}". These same forms, before being cleaned up, are used to apply morphotactics in the abstract level at analysis and generation processes. At the surface level we find the forms given by analysis and/or the tags that trigger a process of replacement, like in the case of \texttt{"@NK"} (in D\ref{def:04} above) which further down the script has a rule replacing it for certain form in a defined context. The complete list of files per slot containing the suffixes is given in annex \ref{anx:02}, p. \pageref{anx:02}. \section{The \emph{Mapudüngun} FST analyser} \label{sec:38} \paragraph{} \label{tp:43} In this section we expose and explain how the different aspects of \emph{Mapudüngun} morphology are treated in order to implement our FST analyser and generator. The order of presentation is not necessarily the same as in the encoding script. There are some encoding already presented in previous sections: the \emph{Mapuche} alphabet [section \ref{sec:31}, p. \pageref{sec:31}]; the spelling unifier [section \ref{sec:54}, p. \pageref{sec:54}]; the lexicon inclusion [section \ref{sec:36}, p. \pageref{sec:36}], and the suffixes inclusion [section \ref{sec:37}, p. \pageref{sec:37}]. We begin by explaining phonological changes (\ref{sec:39}), including special cases (see \ref{sec:40}, \ref{sec:41}, \ref{sec:42}, p. \pageref{sec:40}). Then we move on to the stems typology and the strategies to manage them. The interaction of suffixes after the stem comes next, this section introduces the verb paradigms and verb nominalisation. It also brings up the subject of the mobility of some suffixes and how to deal with it. Some verb roots present a special behaviour, we treat them at the end of this section. \subsection{Phonological changes into spelling} \label{sec:39} \paragraph{} \label{tp:44} The occurrence of roots and suffixes in a verb form generates certain phonological changes when interacting with their neighbours suffixes or roots. In \emph{Mapudüngun} that interaction may be between suffixes, between the root and the consecutive suffix, between roots inside a compound stem, or between all the previous ones inside complex stems. These changes are encoded in the "lower" or "surface" side of the language (see sections \ref{sec:26} and \ref{sec:27}, p. \pageref{sec:26}), therefore, they are under the section "Lower rules" in the FST script, and they affect the word form. There are frequent phonological changes in \emph{Mapudüngun}, which are reflected in spelling, except for the epenthesis of the voiced velar fricative /{\textgamma}/ represented by \emph{g}. Which is optional between the sequences \emph{ii, uu, üü}, and obligatory between the sequences \emph{ae, ea, ee, ai, ia}, where the first vowel of the sequence is the last of a suffix, and the second vowel of the sequence is the first of a consecutive suffix\footnote{In Smeets' texts, this /{\textgamma}/ is never transcribed, but in texts from other authors is sometimes present: \emph{kellu-ke-(\textbf{g})e-n} 'you helped me' \texttt{-NN.kellu\_ayuda+VRB.Ø36+CF.ke14+IDO.e6+IND1SG.n3\\+DS12A.Ø1} [Mösbach, E. \cite{RefB:14}].}. The epenthesis of schwa (sometimes \emph{i, e, u}) is obligatory between a form (root or suffix) ending in consonant or semivowel and the following form beginning in consonant or semivowel. \begin{example} \label{ex:110} [Smeets, I. 2008: 353 (43)] \cite{RefB:21}\\ \emph{kim-\textbf{u}w-küle-y-iñ} 'we (pl) know each other'\\ \texttt{‑TV.kim\_saber+REF.w31+ST.le28+IND.y4+1.Ø3\\+PL.iñ2} \end{example} \begin{example} \label{ex:111} [Smeets, I. 2008: 68 (56)] \cite{RefB:21}\\ \emph{puw-\textbf{ü}n} 'to arrive'\\ \texttt{‑IV.puw\_llegar+PVN.n4} \end{example} \begin{example} \label{ex:112} [Smeets, I. 2008: 109 (1)] \cite{RefB:21}\\ \emph{mamüll-\textbf{e}ntu} 'grove' \texttt{‑NN.mamüll\_árbol+GR.ntu} \end{example} "A schwa is optionally inserted between a consonant and the suffix sequence \emph{-l-e} \texttt{+CND.l4+3.e3} and between a consonant and the suffix sequence \emph{-y-iñ} \texttt{+IND.y4+1.Ø3+PL.iñ2} and \emph{-y-u} \texttt{+IND.y4+1.Ø3+DL.u2}" [Smeets, I. 2008: 51].\\Sometimes it is \emph{i} instead of schwa. \begin{example} \label{ex:113} [Smeets, I. 2008: 52] \cite{RefB:21}\\ \emph{kim-l-e → kim-\textbf{ü}l-e} 'if he knows'\\ \texttt{‑TV.kim\_saber+CND.l4+3.e3} \end{example} \begin{example} \label{ex:114}\ \\ \emph{lef-y-u → lef-\textbf{ü}y-u} 'we both ran'\\ \texttt{‑IV.lef\_correr+IND.y4+1.Ø3+DL.u2} \end{example} \begin{example} \label{ex:115} [Smeets, I. 2008: 52] \cite{RefB:21}\\ \emph{lef-y-iñ → lef-\textbf{i}y-iñ} 'we (pl) ran'\\ \texttt{‑IV.lef\_correr+IND.y4+1.Ø3+PL.iñ2} \end{example} Lexical forms must be collected in an intermediate form with the appropriate tags to later apply the rules transforming them into the final surface forms, e.g., the portmanteau suffix for indicative, 1\textsuperscript{st} person, singular may occur as \emph{-ün-, -üñ-, -n-} or \emph{-ñ-}. It is encoded as: \begin{definition} \label{def:05} \texttt{["+IND1SG"\{.n3\}] : ["@Ü"[n|ñ]];} \end{definition} The intermediate form is encoding two variants: the tag \texttt{"@Ü"} followed by \emph{n} or \emph{ñ}. The rules to generate the four forms mentioned above are: \begin{definition} \label{def:06} \texttt{["@Ü" -> ü || [CON|SVW|.\#.] \_ ] \newline .o. ["@Ü" -> 0 || VOW \_ ];} \end{definition} These are two rules concatenated by the composition symbol \texttt{.o.} (see figure \ref{fig:02}). They are applicable not only to this case, but wherever the tag \texttt{"@Ü"} is found. The first rule indicates that the tag \texttt{"@Ü"} is replaced by \emph{ü} in the context (twin pipes \texttt{||} indicate the context) where a consonant or semivowel precedes it, or when it is at the beginning of the word (\texttt{.\#.} "word boundary character"), the tag position being marked by the underscore "\texttt{\_}". The second rule indicates that the tag is deleted if preceded by a vowel. In combination with the "intermediate representation", the FST compiles the four possible forms for this suffix. The suffixes affected by these rules are the following ones: \begin{itemize} \label{it:30} \item More implicated object (s29) \emph{-l-} \texttt{["@Ü"l]} \item Satisfaction (s25) \emph{-ñmu-} \texttt{["@Ü"\{ñmu\}]}\footnote{Some suffixes have multiple forms, as the case presented in D\ref{def:05} and D\ref{def:06}; or satisfaction \emph{-ñmu-} that it may also be \emph{-ñmo-}. For simplicity, we present here only the most common form of the suffix.} \item Interruptive (s18) \emph{-r-} \texttt{["@Ü"r]} \item Reportative (s12 \& NCC) \emph{-rke-} \texttt{["@Ü"\{rke\}]} \item Conditional (s4) \emph{-l-} \texttt{["@Ü"l]} \item Plain verbal noun (s4) \emph{-n-} \texttt{["@Ü"n]} \item Indicative 1\textsuperscript{st} singular (s3) \emph{-n-} \texttt{["@Ü"n]} \item Adjectiviser quick \& easy (NOM) \emph{-nten-} \texttt{["@Ü"\{nten\}]} \end{itemize} Some suffixes may trigger an \emph{-ü-} or an \emph{-u-} (the first two), or only an \emph{-u-} (the last two): \begin{itemize} \label{it:31} \item Pluperfect (s15) \emph{-wye-} \texttt{[["@Ü"|"@U"]\{wye\}]} \item Completive subjective verbal noun (s4) \emph{-wma-}\\ \texttt{[["@Ü"|"@U"]\{wma\}]} \item Reflexive/reciprocal (s31) \emph{-w-} \texttt{["@U"w]} \item 1\textsuperscript{st} person agent (s23) \emph{-w-} \texttt{["@U"w]} \end{itemize} Tags are created and assigned arbitrarily. For the rules to work it is necessary to place the corresponding tag in the appropriate position. As the rule is applied to the surface level, the tag is placed at that same level, which is encoded to the right of the colon, e.g.: \begin{definition} \label{def:07} \texttt{["+PLPF"\{.üwye15\}] : ["@Ü"\{wye\}];} \end{definition} The encoding above incorporates the pluperfect marker into the system. To the left of the colon is the upper or abstract level, the analysis representation. To the right, it is the lower level, the surface representation, where the tag is added preceding the suffix as the initial character. Once the tag is appropriately replaced, there is another rule that eliminates the unused tags. Epenthesis of a glottal stop is optional between the ending vowel of a root and the initial vowel of a following root in compounds. \begin{example} \label{ex:116} [Smeets, I. 2008: 52] \cite{RefB:21}\\ \emph{dewma-iyal-la-y → dewma-\textbf{g}iyal-la-y} 'he did not prepare food'\\ \texttt{‑TV.dewma\_hacer-N.iyal}\footnote{\emph{iyal} is a lexicalized form for "food" that may be analysed as \texttt{-TV.i\_comer+NRLD.a9+OVN.el4} 'what will be eaten'.}\texttt{\_comida‑CR.TV+NEG.la10\\+IND.y4+3.Ø3} \end{example} To apply the rule described above, we have marked, in the lower level, all the roots beginning in vowel, placing a "@G" before the root; for example: \begin{example} \label{ex:117} \item[]\texttt{["-AJ"\{.allush\_tibio\}]: ["@G"\{allush\}]} \item[]\texttt{["-AJ"\{.awka\_rebelde\}]: ["@G"\{awka\}]} \item[]\texttt{["-AV"\{.aymüñ\_bastante\}]: ["@G"\{aymüñ\}]} \item[]\texttt{["-AV"\{.ina\_cerca\}]: ["@G"\{ina\}]} \item[]\texttt{["-IV"\{.echiw\_estornudar\}]: ["@G"\{echiw\}]} \item[]\texttt{["-IV"\{.uma\_dormir\}]: ["@G"\{uma\}]} \item[]\texttt{["-NN"\{.antü\_sol\}]: ["@G"\{antü\}]} \item[]\texttt{["-NN"\{.epew\_cuento\}]: ["@G"\{epew\}]} \item[]\texttt{["-TV"\{.ingka\_defender\}]: ["@G"\{ingka\}]} \item[]\texttt{["-TV"\{.üngüm\_esperar\}]: ["@G"\{üngüm\}]} \end{example} The rules encoding this change are the next ones: \begin{exercise} \label{R:01} \textbf{Glottal stop insertion (between roots)} \\ \texttt{define RuGlot ["@G" (->) g || VOW \_ ]\\ .o. ["@G" -> 0];} \end{exercise} The first rule, to the left of the concatenation (\texttt{.o.}) symbol, encodes the optionality by enclosing the direction operator between parenthesis. The change applies only when the tag is preceded by a vowel, otherwise, the second rule transforms it into 0 (zero = null character), i.e., it is deleted. A glottal stop is also optionally added between suffixes, but only in the cases where the sequence \emph{ii} is generated. Instead of adding a tag to the suffixes, this change is treated with a more general rule: \begin{exercise} \label{R:02} \textbf{Glottal stop insertion (between suffixes)} \\ \texttt{define RuleEliGem}\footnote{This is a wider rule that treats elision, epenthesis and gemination of other phonemes, see R\ref{R:03}.} \texttt{[\{ii\} (->) \{igi\}];} \end{exercise} Applying this rule we can analyse words like the following one: \begin{example} \label{ex:118} [Smeets, I. 2008: 51] \cite{RefB:21}\\ \emph{leli-l-i-iñ → leli-l-i-\textbf{g}iñ} 'if we look'\\ \texttt{‑TV.leli\_mirar+CND.l4+1.i3+PL.iñ2} \end{example} Two equal consonants geminate in careful speech, and became a single sound in colloquial speech. And this fact is sometimes transcribed into written text. \begin{example} \label{ex:119} [Smeets, I. 2008: 51] \cite{RefB:21}\\ \emph{ko\textbf{n-n}u-l-i → ko\textbf{n}u-l-i} 'if I do not enter'\\ \texttt{‑IV.kon\_entrar+NEG.no10+CND.l4+1.i3+SG.Ø2} \end{example} To treat gemination we use the same type of rule shown in R\ref{R:02}. The following rule not only encodes the gemination of \emph{n}, but also of \emph{m} and \emph{e}\footnote{In the case of \emph{e} the phonological term is not gemination but lengthening.}: \begin{exercise} \label{R:03} \textbf{Gemination simplification} \\ \texttt{define RuleEliGem [\{nn\} (->) n, \\ \{mm\} (->) m, \{ee\} (->) e];} \end{exercise} \begin{example} \label{ex:120} [Smeets, I. 2008: 437 (17)] \cite{RefB:21}\\ \emph{fille\textbf{m-m}ew → fille\textbf{m}ew} 'in every respect'\\ \texttt{-NN.fillem\_toda-clase-de-cosas+INST.mew} \end{example} \begin{example} \label{ex:121} [Smeets, I. 2008: 278 (1)] \cite{RefB:21}\\ \emph{nie-\textbf{e}-y-u → ni\textbf{e}-y-u} 'I hold you (sg)'\\ \texttt{-TV.nie\_tener+IDO.e6+IND.y4+1.Ø3+DL.u2\\+DS12A.Ø1} \end{example} The non-realised affix \emph{-a-} (s9) separates itself from a preceding \emph{a-} inserting \emph{-y} in between. In this case we have an intermediate representation of the suffix (D\ref{def:08}), and a couple of rules treating the corresponding tag \texttt{"@Y"} in context (R\ref{R:04}): \begin{definition} \label{def:08} \texttt{["+NRLD"\{.a9\}]: ["@Y"a];} \end{definition} \begin{exercise} \label{R:04} \textbf{\emph{y} epenthesis} \\ \texttt{define RuTrEPENTHy ["@Y" (->) y ||[a|.\#.] \_] \\.o. ["@Y" -> 0 || \textbackslash a}\footnote{Term negation (\textbackslash X). Any single symbol except X. Equivalent to [?~-~X] [Hulden, M. in \href{https://code.google.com/archive/p/foma/wikis/RegularExpressionReference.wiki}{https://code.google.com/archive/p/foma/wikis/\\RegularExpressionReference.wiki}].} \texttt{\_ ];} \end{exercise} This concatenated rule says that \texttt{"@Y"} becomes \emph{y} when preceded by an \emph{a} or at the beginning of the word, and it becomes a null character when preceded by any character except \emph{a}. \begin{example} \label{ex:122} [Smeets, I. 2008: 63 (19)] \cite{RefB:21}\\ \emph{tripa-a-n → tripa-\textbf{y}a-n} 'I will leave'\\ \texttt{‑IV.tripa\_salir+NRLD.a9+IND1SG.n3} \end{example} Pronouns \emph{engu} 'they (dl)' and \emph{engün} 'they (pl)' are optionally realised as \emph{yengu} and \emph{yengün} respectively, either isolated or forming part of a compound where the previous element ends in vowel. Here also applies definition D\ref{def:08}. \begin{example} \label{ex:123} [Smeets, I. 2008: 95 (ii)] \cite{RefB:21}\\ \emph{tüfa-\textbf{y}engu} 'these two'\\ \texttt{-DP.tüfa\_este-PP.engu\_ellos-dos} \end{example} The sequence \emph{ae} is optionally simplified as \emph{a}. \begin{example} \label{ex:124} [Smeets, I. 2008: 52] \cite{RefB:21}\\ \emph{leli-l\textbf{a-e}-y-u → leli-l\textbf{a}-y-u} 'I shall not look at you (sg)'\\ \texttt{‑TV.leli\_mirar+NEG.la10+IDO.e6+IND.y4+1.Ø3\\+DL.u2+DS12A.Ø1} \end{example} \begin{example} \label{ex:125} [Smeets, I. 2008: 52] \cite{RefB:21}\\ \emph{i-me-\textbf{a-e}l → i-me-\textbf{a}-l} 'eat there!' (lit.: 'you will eat there')\\ \texttt{‑TV.i\_comer+TH.me20+NRLD.a9+OVN.el4} \end{example} The sequence \emph{ae} is never simplified when \emph{a} is followed by \emph{-e-n} \texttt{+IDO.e6+IND1SG.n3+DS12A.Ø1} or by \emph{e-n-ew}\\ \texttt{+IDO.e6+IND1SG.n3+DS3A.ew1}. \begin{example} \label{ex:126} [Smeets, I. 2008: 48] \cite{RefB:21}\\ \emph{elu-\textbf{a-e}-n} 'you (sg) will give to me'\\ \texttt{‑TV.elu\_dar+NRLD.a9+IDO.e6+IND1SG.n3+DS12A.Ø1} \end{example} \begin{example} \label{ex:127} [Smeets, I. 2008: 485 (4)] \cite{RefB:21}\\ \emph{ayü-l\textbf{a-e}-n-ew} 'she did not love me'\\ \texttt{‑TV.ayü\_amar+NEG.la10+IDO.e6+IND1SG.n3\\+DS3A.ew1} \end{example} \subsubsection{Interaction between suffixes of slots 10 to 4} \paragraph{} \label{tp:45} Most common suffixes in a verb form are those located between slots 10 and 4. There are multiple morphophonological changes depending on the suffixes occurring. The sequence \emph{a-e} mentioned above is only one of them. All the suffixes triggering morphophonological changes that need special rules and belonging to this series of slots are encoded as follows: \begin{definition} \label{def:09} Slot 10: Negation\footnote{Some slots of this series encode more suffixes than the ones displayed here, which are the ones having relevance for the rules generated and explained in this section.}\\ \texttt{["+NEG"\{.la10\}] : \{la\}\\| ["+NEG"\{.ki10\}] : [k"@NK"];} \end{definition} \begin{definition} \label{def:10} Slot 9: Non-realised situation\\ \texttt{["+NRLD"\{.a9\}]: ["@Y"a];} \end{definition} \begin{definition} \label{def:11} Slot 8: Impeditive\\ \texttt{["+IPD"\{.fu8\}] : [f"@IP"];} \end{definition} \begin{definition} \label{def:12} Slot 6: Internal and external direct objects\\ \texttt{["+EDO"\{.fi6\}] : "@ED"\\| ["+IDO"\{.e6\}] : "@ID";} \end{definition} \begin{definition} \label{def:13} Slot 4: inflectional nominalisers\\ \texttt{["+OVN"\{.el4\}] : "@EL";} \end{definition} \begin{definition} \label{def:14} Slot 3PTMT: Portmanteau morphs\\ \texttt{["+IND1SG"\{.n3\}] : ["@Ü"[n|ñ];} \end{definition} The following set of rules deals with the suffixes shown above: \begin{exercise} \label{R:05} \textbf{Negation for imperative forms} (\emph{ki → k}) \\ \texttt{define RuNegKi ["@NK"(->)[i|e] || \_[e|"@ID"]]\\ .o. ["@NK" -> i]} \end{exercise} From slot 10, there are two negation suffixes that can play a role in this set of interconnected rules: one is the negation for indicative \emph{-la-}, the final \emph{a} has to be taken into account when interacting with \texttt{+IDO} suffix \emph{-e-}, slot 6. The other negation suffix is \emph{-ki-} for imperatives. It may drop its final \emph{i}, or replace it by \emph{e} when followed by \emph{e}, which is also the form of the \texttt{+IDO} suffix encoded as \texttt{"@ID"} in the intermediate representation. This is what previous rule R\ref{R:05} manages. "When the negative marker \emph{-ki-} (slot 10) is followed by \emph{e}, the sequence \emph{ie} is optionally replaced by \emph{ee} or contracted to \emph{e}" [Smeets, I. 2008: 52 (8.1.4.3)] \cite{RefB:21}. \begin{example} \label{ex:128} [Smeets, I. 2008: 52 (8.1.4.3)] \cite{RefB:21}\\ \emph{sungu-we-k\textbf{i-e}-l-i} $\sim$ \emph{sungu-we-k\textbf{e-e}-l-i} $\sim$ \emph{sungu-we-k-\textbf{e}-l-i}\\ 'don't speak to me any more'\\ \texttt{-NN.düngu\_palabra+VRB.Ø36+PS.we19\\+NEG.ki10+IDO.e6+CNI.l4+1.i3+SG.Ø2+DS12A.Ø1} \end{example} Another suffix that has the same conditions of interaction as the negation suffix \emph{-la-}, with \texttt{+IDO} suffix, is \texttt{+NRLD} suffix \emph{-a-}, slot 9. This suffix may also be realised as \emph{-ya-} (see D\ref{def:08} and R\ref{R:04}). We will recall \emph{-la-} \texttt{+NEG} and \emph{-a-} \texttt{+NRLD} further down in R\ref{R:10}. The occurrence of the suffixes sequence \texttt{+IPD} \emph{-fu-} and \texttt{+EDO} \emph{-fi-} may yield \emph{-fufi-} or \emph{-fwi-} in Smeets' texts, but also \emph{-fui-} in some other texts. \begin{example} \label{ex:129} [Smeets, I. 2008: 39 (c)] \cite{RefB:21}\\ \emph{angkad-\textbf{fu-fi}-n} → \emph{angkad-\textbf{fwi}-n} 'the one I had taken on the back of my horse'\\ \texttt{‑TV.angkad\_llevar-en-ancas+IPD.fu8+EDO.fi6\\+IND1SG.n3} \end{example} \begin{example} \label{ex:130} [Mösbach, E. 1936: 16] \cite{RefB:14}\\ \emph{kim-la-\textbf{fu-fi}-ñ} → \emph{kim-la-\textbf{fui}-ñ} 'I didn't know (about) that'\\ \texttt{‑TV.kim\_saber+NEG.la10+IPD.fu8+EDO.fi6\\+IND1SG.n3} \end{example} \begin{exercise} \label{R:06} \textbf{Impeditive + EDO}\\ \texttt{define RuTrIPDEDO \item[] [["@IP" -> [u"@1"|w"@2"] || \_ "@ED"] .o. \item[] ["@ED" -> [{fi}|i] || "@1" \_ ] .o. \item[] ["@ED" -> i || "@2" \_ ]];} \end{exercise} R\ref{R:06} encodes the changes exemplified in E\ref{ex:129} and E\ref{ex:130}. \texttt{RuTrIPDEDO} is composed of three concatenated rules. First sub-rule states that \texttt{"@IP"} is either transformed into \texttt{"u@1"} or \texttt{"w@1"} when followed by \texttt{"@ED"}, which is expressed in the realisation context (the underscore marks the position of the treated element): \texttt{|| \_ "@ED"}. It must be taken into account that rules are applied sequentially, so, when the transformation of \texttt{"@IP"} is carried out, this very same tag, which indicates the context for the subsequent change of \texttt{"@ED"}, is lost (it has been transformed in something else). This is why when changing \texttt{"@IP"}, new context marks are given for the subsequent \texttt{"@ED"} change. These new tags (\texttt{"@1"} and \texttt{"@2"}) are only used as context marks to continue processing the forms. In a later step, context tags are cleared out. Second sub-rule of \texttt{RuTrIPDEDO}, (concatenated by \texttt{.o.}), states that \texttt{"@ED"} is either transformed into \emph{fi} or \emph{i} when preceded by \texttt{"@1"}. Third sub-rule states that \texttt{"@ED"} is replaced only by \emph{i} when preceded by \texttt{"@2"}. \texttt{"@1"} and \texttt{"@2"} were established as contextual marks by the previous rule. Rules are applied sequentially. Whenever \texttt{+IPD} (impeditive) is followed by \texttt{+EDO} (external direct object), the context is given, so the rule is applied accepting three combinations for analysis. The process just described is illustrated in figure \ref{fig:06} below. It is important to be aware that it shows the generation direction because it is easier to explain and understand. Also note that the FSTs are reversible, therefore rules may be applied backwards, i.e., in the analysis direction. The resulting analysis for any of the three possible spellings \emph{-fufi-, -fwi-, -fui-} will yield the analysis \texttt{"+IPD.fu8+EDO.fi6"}. \begin{figure}[H] \includegraphics[width=\columnwidth,height=7.200cm]{figs/Fig09.eps} \caption{Concatenated rules for generation process: simplified view of rule \texttt{RuTrIPDEDO} that processes the interaction between suffixes impeditive \emph{-fu-} and external direct object \emph{-fi-}.} \label{fig:06} \end{figure} When \texttt{+IPD} \emph{-fu-} occurs followed by \texttt{+IDO} \emph{-e-} they yield the form \emph{-fue-}, but they may optionally yield the contracted form \emph{-fe-}. \begin{example} \label{ex:131} [Smeets, I. 2008: 52 (8.1.6)] \cite{RefB:21}\\ \emph{ellka-l-ke-rke-\textbf{fu-e}-y-ew} → \emph{ellka-l-ke-rke-\textbf{f-e}-y-ew} 'she used to hide it, they say'\\ \texttt{‑TV.ellka\_ocultar+CA.l34+CF.ke14+REP.rke12\\+IPD.fu8+IDO.e6+IND.y4+3.Ø3+DS3A.ew1} \end{example} \texttt{+IPD} and \texttt{+OVN} may co-occur in a sequence yielding \mbox{\emph{-fu-el}} or \emph{-f-el}. Smeets gives no examples to this respect, but she writes "The suffix \emph{-fu-} may occur in indicative and conditional forms and in subordinates except those marked with the plain verbal noun suffix \emph{-n} \texttt{+PVN} (s4) or the completive subjective verbal noun suffix \emph{-wma} \texttt{+CSVN} (s4)" [Smeets, I. 2008: 231] \cite{RefB:21}. Then, the sequence \texttt{+IPD} \texttt{+OVN} is feasible, and we do have found examples where \emph{-el} contracts with a previous form ending in \emph{e}, and examples of \emph{-fu-el} from other authors: \begin{example} \label{ex:132} [Smeets, I. 2008: 245 (10)] \cite{RefB:21}\\ \emph{ni\textbf{e-e}l} → \emph{ni\textbf{e}l} 'to have had'\\ \texttt{-TV.nie\_tener+OVN.el4} \end{example} \begin{example} \label{ex:133} [Smeets, I. 2008: 249 (7)] \cite{RefB:21}\\ \emph{küdaw-p\textbf{e-e}l} → \emph{küdaw-p\textbf{e}l} 'the own job'\\ \texttt{-IV.küdaw\_trabajar+PX.pe13+OVN.el4} \end{example} \begin{example} \label{ex:134} [Smeets, I. 2008: 411 (53)] \cite{RefB:21}\\ \emph{fende-k\textbf{e-e}l-chi} → \emph{fende-k\textbf{e}l-chi} 'a sold thing'\\ \texttt{-TV.fende\_vender+CF.ke14+OVN.el4+ADJ.chi} \end{example} \begin{example} \label{ex:135} [Zúñiga, F. 2006: 144 (54)] \cite{RefB:21}\\ \emph{nge-we-ke-no-f\textbf{u-e}l} → \emph{nge-we-ke-no-f\textbf{e}l} 'to be no more'\\ \texttt{-IV.nge\_ser\_estar+PS.we19+CF.ke14+NEG.no10\\+IPD.fu8+OVN.el4} \end{example} \begin{exercise} \label{R:07} \textbf{Impeditive + Internal Direct Object or \\ Objective Verbal Noun} \\ \texttt{define RuTrIPDIDOOVN \newline [["@IP" -> [[u"@3"]|"@3"] || \_ ["@ID"|"@EL"]] \\ .o. ["@ID" -> e, "@EL" -> {el} || "@3" \_ ]];} \end{exercise} R\ref{R:07} encodes the changes exemplified in E\ref{ex:131} and E\ref{ex:135}. \texttt{RuTrIPDIDOOVN} is composed of two concatenated rules. The first rule states that \texttt{"@IP"} is either transformed into \texttt{"u@3"} or \texttt{"@3"} (the last one being the elision of \emph{u}) when followed by \texttt{"@ID"} or \texttt{"@EL"}. Once that conversion is done, if the sequence is completed by \texttt{"@ID"}, this one is transformed into \emph{e}, yielding two possible intermediate representations, \texttt{fu@3e} or \texttt{f@3e}. If the sequence is completed by \texttt{"@EL"}, this one is transformed into \emph{el}, also yielding two possible intermediate representations, \texttt{fu@3el} or \texttt{f@3el}. Then \texttt{"@3"} is wiped out giving \emph{fue} or \emph{fe} for \texttt{"+IPD+IDO"}, and \emph{fuel} or \emph{fel} for \texttt{"+IPD+OVN"}. R\ref{R:08} converts \texttt{"@IP"} into \emph{u} in any other context, yielding \emph{fu}, as shown in E\ref{ex:136}: \begin{exercise} \label{R:08} \textbf{Impeditive} \\ \texttt{define RuTrIPD ["@IP" -> u];} \end{exercise} \begin{example} \label{ex:136} [Smeets, I. 2008: 63 (17)] \cite{RefB:21}\\ \emph{kutran-\textbf{fu}-n} 'to have been ill'\\ \texttt{-NN.kütran\_enfermedad+VRB.Ø36+IPD.fu8\\+IND1SG.n3} \end{example} R\ref{R:09} converts \texttt{"@ED"} into \emph{fi} when is preceded by anything but \texttt{"@IP"}, as shown in E\ref{ex:137}: \begin{exercise} \label{R:09} \textbf{External direct object} \\ \texttt{define RuTrEDO ["@ED" -> \{fi\} || \textbackslash "@IP" \_ ];} \end{exercise} \begin{example} \label{ex:137} [Smeets, I. 2008: 65 (31)] \cite{RefB:21}\\ \emph{allkü-tu-nie-\textbf{fi}-n} 'I am listening to him'\\ \texttt{-TV.allkü\_oir+TR.tu33+PRPS.nie32+EDO.fi6\\+IND1SG.n3} \end{example} \begin{exercise} \label{R:10} \textbf{Internal direct object} \\ \texttt{define RuTrIDO [["@ID" -> e || [CON|SVW] \_ ] \\ .o. ["@ID" -> e || a \_ "@Ü"n[\{ew\}|.\#.]] \\ .o. ["@ID" (->) e || [VOW|"@NK"] \_ ]];} \end{exercise} R\ref{R:10} contemplates other possible contexts of realisation for \texttt{+IDO}. It becomes \emph{e} when preceded by any consonant or semivowel. \begin{example} \label{ex:138} [Smeets, I. 2008: 87 (21)] \cite{RefB:21}\\ \emph{kim-\textbf{e}-y-u} 'I recognised you' lit: 'I knew you'\\ \texttt{-TV.kim\_saber+IDO.e6+IND.y4+1.Ø3+DL.u2\\+DS12A.Ø1} \end{example} \texttt{+IDO} also becomes \emph{e} when is preceded by \emph{a} and is followed by the intermediate form \texttt{"@Ü"n}, which corresponds to the portmanteau suffix for indicative, 1\textsuperscript{st} person, singular; which in turn, it either ends the verb form (because it implies the presence of the null suffix \emph{-Ø} \texttt{+DS12A} following it), or it is followed by \emph{-ew} \texttt{+DS3A}. \begin{example} \label{ex:139} [Smeets, I. 2008: 157 (17)] \cite{RefB:21}\\ \emph{pe-\textbf{e}-n} 'you saw me' \\ \texttt{-TV.pe\_ver+IDO.e6+IND1SG.n3+DS12A.Ø1} \end{example} \begin{example} \label{ex:140} [Smeets, I. 2008: 94 (63)] \cite{RefB:21}\\ \emph{pe-me-\textbf{e}-n-ew} 'there he saw me' \\ \texttt{-TV.pe\_ver+TH.me20+IDO.e6+IND1SG.n3+DS3A.ew1} \end{example} The last context of realisation for \texttt{+IDO} says that \texttt{"@ID"} is optionally transformed into \emph{e}, which means that it may be elided, when preceded by a vowel or by the tag for negation in imperatives \texttt{"@NK"} (see R\ref{R:05} and examples E\ref{ex:128} and E\ref{ex:141}). \begin{example} \label{ex:141} [Smeets, I. 2008: 94 (63)] \cite{RefB:21}\\ \emph{ina-ni-a-\textbf{Ø}-lu-mu} 'they have been followed' \\ \texttt{-AV.ina\_detrás+VRB.Ø36+PRPS.nie32\\+NRLD.a9+IDO.e6+SVN.lu4+DS3A.mew1} \end{example} The last rule of the set treating suffixes between slots 10 and 4, deals with the objective verbal noun suffix \texttt{+OVN} \emph{-el}. \begin{exercise} \label{R:11} \textbf{Objective Verbal Noun}\\ \texttt{define RuOVN \newline ["@EL" -> [l|\{el\}] || [a|e|"@ID"] \_ ]\\ .o. ["@EL" -> \{el\}];} \end{exercise} R\ref{R:11} specifies that \texttt{"@EL"}, which is how \texttt{+OVN} is encoded, may be converted into \emph{l} or \emph{el} when preceded by \emph{a, e} or \texttt{"@ID"} (e.r. \ref{tp:179}). And in any other context it will be converted into \emph{el}, see examples below: \begin{example} \label{ex:142} [Smeets, I. 2008: 114 (26)] \cite{RefB:21}\\ \emph{lang-üm-\textbf{el}-chi ufisha} 'killed sheep' \\ \texttt{-IV.la\_morir+CA.m34+OVN.el4+ADJ.chi\\-NN.ufisha\_oveja} \end{example} \begin{example} \label{ex:143} [Smeets, I. 2008: 189 (45)] \cite{RefB:21}\\ \emph{pi-\textbf{el}-mew} 'of what is said' \\ \texttt{-TV.pi\_decir+OVN.el4+INST.mew} \end{example} \begin{example} \label{ex:144} [Smeets, I. 2008: 189 (46)] \cite{RefB:21}\\ \emph{entu-\textbf{el}} 'what is taken (out)' \\ \texttt{-TV.entu\_sacar+OVN.el4} \end{example} \subsubsection{Special case: suffix -nge-} \label{sec:40} \paragraph{} \label{tp:46} Corresponding to the verbaliser (see \ref{sec:06}) or stem formative (see \ref{sec:07}) located in slot 36, or to the passive suffix, slot 23, the form \emph{-nge-} may alternate with \emph{-ngi-} when followed by the indicative suffix \emph{-y-}, and the verb form corresponds to the 3\textsuperscript{rd} person non-specified for number. All of which is encoded by the next rule: \begin{exercise} \label{R:12} \textbf{Alternative \emph{nge} form} \\ \texttt{define RuNGE ["@EY" (->) i || \_ "@Ü"y]\\ .o. ["@EY" -> e];} \end{exercise} For this rule to work, all mentioned suffixes were encoded as follows: \begin{definition} \label{def:15} \\ \texttt{["+VRB"\{.nge36\}"-IV"] : [\{ng\}"@EY"]; \newline ["+SFR"\{.nge36\}"-IV"] : [\{ng\}"@EY"]; \newline ["+PASS"\{.nge23\}] : [\{ng\}"@EY"];} \end{definition} An example of each case is rendered below: \begin{example} \label{ex:145} [Smeets, I. 2008: 456 (3)] \cite{RefB:21}\\ \emph{wentru-\textbf{ngi}-y} 'they were men' \\ \texttt{-NN.wentru\_hombre+VRB.nge36-IV+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:146} [Smeets, I. 2008: 305 (2)] \cite{RefB:21}\\ \emph{weyel-weyel-\textbf{ngi}-y} 'he always swims' \\ \texttt{-IV.weyel\_nadar-RVBR+SFR.nge36-IV+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:147} [Smeets, I. 2008: 445 (3)] \cite{RefB:21}\\ \emph{elu-\textbf{ngi}-y mapu} 'he was given land' \\ \texttt{-TV.elu\_dar+PASS.nge23+IND.y4+3.Ø3\\ -NN.mapu\_tierra} \end{example} \subsubsection{Special case: verb i- 'to eat'} \label{sec:41} \paragraph{} \label{tp:47} The verb \emph{i-} may be realised as \emph{i-, iy-} or \emph{yi-} depending on the context. To apply the rules (R\ref{R:13}) that regulate this verb form in the different contexts, the verb \emph{i-} has been encoded as follows: \begin{definition} \label{def:16} \texttt{["-TV"{.i\_comer}]: "@i";} \end{definition} First sub-rule of R\ref{R:13} avoids \emph{i-} to be recognised and analysed as the final \emph{i} of any word by deleting it. \begin{exercise} \label{R:13} \textbf{Forms of verb \emph{i-} 'to eat'} \\ \texttt{define Verbi \item[] ["@i" -> 0 || \_ .\#.] .o. \item[]["@i" -> "@G"\{iy\} || \_ [a|e|"@Y"|"@ID"|\\"@EL"]] .o. \item[] ["@i" -> \{yi\} || \_ k [i|ü|"@NK"], "@i" \_ ,\\ \_ "@i"] .o. \item[] ["@i" (->) \{yi\} || \_ w] .o. \item[] ["@i" -> "@G"i]];} \end{exercise} Second sub-rule converts \texttt{"@i"} into the intermediate form \texttt{"@G"\{iy\}} which set the verb ready to be part of a compound where \texttt{"@G"} will optionally become \emph{g} if preceded by a vowel (see E\ref{ex:116}, E\ref{ex:117}, p. \pageref{ex:116}; R\ref{R:01} and R\ref{R:02}, p. \pageref{R:02}). This change is carried out when \texttt{"@i"} is followed by \emph{a, e} or the intermediate forms \texttt{"@Y", "@ID", "@EL"}. \begin{example} \label{ex:148}\ \\ \emph{dewma-\textbf{iy}-a-l-mew → dewma-\textbf{giy}-a-l-mew} 'while preparing food' \\ \texttt{-TV.dewma\_hacer-TV.i\_comer-CR.TV+NRLD.a9\\+OVN.el4+INST.mew} \end{example} \begin{example} \label{ex:149} [Smeets, I. 2008: 204 (125)] \cite{RefB:21}\\ \emph{\textbf{i}-el → \textbf{iy}-el} 'what had been eaten' \\ \texttt{-TV.i\_comer+OVN.el4} \end{example} Third sub-rule in R\ref{R:13} converts \texttt{"@i"} into \emph{yi} in different contexts: 1) when \texttt{"@i"} is followed by \emph{ki, kü} or the intermediate form \texttt{"@NK"} (see R\ref{R:05} and E\ref{ex:128}, p. \pageref{R:05}): \begin{example} \label{ex:150} [Smeets, I. 2008: 445 (3)] \cite{RefB:21}\\ \emph{\textbf{i-ki}-fi-l-nge → \textbf{yi-ki}-fi-l-nge} 'you need not eat it' \\ \texttt{-TV.i\_comer+NEG.ki10+EDO.fi6+CNI.l4\\+IMP2SG.nge3} \end{example} 2) \texttt{"@i"} is converted into \emph{yi} when preceded by itself and followed by itself, this way the rule is managing reduplication of the verb root \emph{i-} 'to eat': \begin{example} \label{ex:151} [Smeets, I. 2008: 307 (8)] \cite{RefB:21}\\ \emph{\textbf{i-i}-künu-fi-ñ → \textbf{yi-yi}-künu-fi-ñ} 'I ate it quickly' \\ \texttt{-TV.i\_comer-RVBR+SFR.Ø36-IV+PFPS.künu32\\+EDO.fi6+IND1SG.n3} \end{example} In the fourth sub-rule, \texttt{"@i"} is optionally converted into \emph{yi} when followed by \emph{w}: \begin{example} \label{ex:152} [Smeets, I. 2008: 263 (11)] \cite{RefB:21}\\ \emph{\textbf{i}-we-me-ke-la-y} 'he no longer goes there to eat (as he used to)' \\ \texttt{-TV.i\_comer+PS.we19+TH.me20+CF.ke14+NEG.la10\\+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:153} [Smeets, I. 2008: 260 (4)] \cite{RefB:21}\\ \emph{\textbf{i}-we-la-n → \textbf{yi}-we-la-n} 'I eat no more' \\ \texttt{-TV.i\_comer+PS.we19+NEG.la10+IND1SG.n3} \end{example} Finally, fifth sub-rule states that \texttt{"@i"} is converted in the intermediate representation \texttt{"@G"i} in any other context. So, if it forms part of a compound being the second member, it can up bring a \emph{g} before itself when the previous element of the compound ends in vowel (see E\ref{ex:148}). \begin{example} \label{ex:154} [Smeets, I. 2008: 309 (4)] \cite{RefB:21}\\ \emph{\textbf{i}-püra-fi-ñ} 'I ate it reluctantly' \\ \texttt{-TV.i\_comer+AIML.püda+EDO.fi6+IND1SG.n3} \end{example} \begin{example} \label{ex:155} [Smeets, I. 2008: 43 (f)] \cite{RefB:21}\\ \emph{\textbf{i}-fal-ün} 'I must eat' \\ \texttt{-TV.i\_comer+FORCE.fal25+IND1SG.n3} \end{example} \subsubsection{Special case: verb entu- 'to take out'} \label{sec:42} \paragraph{} \label{tp:48} The verb \emph{entu-} may be realised as \emph{ntu-, entu-} or \emph{nentu-} depending on the context. To apply the rules (R\ref{R:14}) that regulate this verb form in the different contexts, the verb \emph{entu-} has been encoded as follows: \begin{definition} \label{def:17} \texttt{["-TV"{.entu\_sacar\_quitar}]: ["@VE"\{ntu\}];} \end{definition} \begin{exercise} \label{R:14} \textbf{Forms of verb \emph{entu-} 'to take out'} \\ \texttt{define Verbentu \item[] ["@VE" -> [["@G"e]|\{ne\}] || [.\#.|a|i] \_ ].o. \item[] ["@VE" -> [\{ne\}|0] || ü \_ ] .o. \item[] ["@VE" -> e || [d|f|m] \_ ] .o. \item[] ["@VE" -> \{ne\} || [e|u] \_ ] .o. \item[] ["@VE" -> e ];} \end{exercise} There are 5 different contexts shaping the form of this verb. First sub-rule of R\ref{R:14} indicates that \texttt{"@VE"} may be converted into (the intermediate form) \texttt{"@G"e} or \emph{ne} at word beginning, or after \emph{a} or \emph{i}, in both last cases the tag \texttt{"@G"} is optionally converted into \emph{g} (see R\ref{R:01} and E\ref{ex:116}, p. \pageref{R:01}): \begin{example} \label{ex:156} [Smeets, I. 2008: 448 (32)] \cite{RefB:21}\\ \emph{\textbf{e}ntu-fi-y-iñ} 'we took him out' \\ \texttt{-TV.entu\_sacar+EDO.fi6+IND.y4+1.Ø3+PL.iñ2} \end{example} \begin{example} \label{ex:157} [Smeets, I. 2008: 318 (8)] \cite{RefB:21}\\ \emph{\textbf{ne}ntu-antü-y} 'they fixed a date' \\ \texttt{-TV.entu\_sacar-NN.antü\_día+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:158} [Smeets, I. 2008: 407 (24)] \cite{RefB:21}\\ \emph{taym\textbf{a-e}ntu-nge-pa-y} 'they were taken out there' \\ \texttt{-TV.tayma\_eliminar-TV.entu\_sacar-CR.TV\\+PASS.nge23+HH.pa17+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:159} [Smeets, I. 2008: 315] \cite{RefB:21}\\ \emph{witr\textbf{a-ne}ntu-n} 'I pulled out' \\ \texttt{-TV.witra\_levantar-TV.entu\_sacar-CR.TV\\+IND1SG.n3} \end{example} \begin{example} \label{ex:160} [Smeets, I. 2008: 409 (40)] \cite{RefB:21}\\ \emph{dull\textbf{i-e}ntu-a-y-iñ} 'we will choose him' \\ \texttt{-TV.dulli\_elegir-TV.entu\_sacar-CR.TV\\+NRLD.a9+IND.y4+1.Ø3+PL.iñ} \end{example} \begin{example} \label{ex:161} [Smeets, I. 2008: 553 (\emph{rapi-})] \cite{RefB:21}\\ \emph{rap\textbf{i-ne}ntu-y} 'he threw up' \\ \texttt{-IV.rapi\_vomitar-TV.entu\_sacar-CR.TV\\+IND.y4+3.Ø3} \end{example} Second sub-rule of R\ref{R:14} converts \texttt{"@VE"} into \emph{ne} after \emph{ü} or eliminates it, which means that the verb may be realised as \emph{ntu-} when the tag is eliminated, or \emph{nentu-} when the tag is converted: \begin{example} \label{ex:162} [Smeets, I. 2008: 318 (8)] \cite{RefB:21}\\ \emph{wem\textbf{ü}-ntu-nge-rume-ye-m} 'they were suddenly expelled\\ without realising (it)' \\ \texttt{-TV.wemü\_perseguir-TV.entu\_sacar-CR.TV\\+PASS.nge23+SUD.rume21+CF.ye5+IVN.m4} \end{example} \begin{example} \label{ex:163} [Smeets, I. 2008: 556 (\emph{rüfü-})] \cite{RefB:21}\\ \emph{rüf\textbf{ü-ne}ntu-me-ki-y} 'he is busy serving out there' \\ \texttt{-TV.rüfü\_servir-comida-TV.entu\_sacar-CR.TV\\+TH.me20+CF.ke14+IND.y4+3.Ø3} \end{example} Third sub-rule converts \texttt{"@VE"} into \emph{e} after \emph{d, f} or \emph{m} yielding the \emph{entu-} form of the verb: \begin{example} \label{ex:164} [Smeets, I. 2008: 405 (7)] \cite{RefB:21}\\ \emph{a\textbf{d-e}ntu-a-l} 'how to settle' \\ \texttt{-NN.ad\_forma-TV.entu\_sacar+NRLD.a9+OVN.el4} \end{example} \begin{example} \label{ex:165} [Smeets, I. 2008: 201 (102)] \cite{RefB:21}\\ \emph{ütrü\textbf{f-e}ntu-fi-n} 'I have thrown it away' \\ \texttt{-TV.ütrüf\_tirar-TV.entu\_sacar-CR.TV\\+EDO.fi6+IND1SG.n3} \end{example} \begin{example} \label{ex:166} [Smeets, I. 2008: 486 (16)] \cite{RefB:21}\\ \emph{ki\textbf{m-e}ntu-a-n} 'I shall declare' \\ \texttt{-TV.kim\_saber-TV.entu\_sacar-CR.TV\\+NRLD.a9+IND1SG.n3} \end{example} Fourth sub-rule converts \texttt{"@VE"} into \emph{ne} when preceded by \emph{e} or \emph{u} yielding the \emph{nentu-} form of the verb: \begin{example} \label{ex:167} [Smeets, I. 2008: 88 (23)] \cite{RefB:21}\\ \emph{weñ\textbf{e-ne}ntu-nge-r-pu-y} 'it would eventually be robbed' \\ \texttt{-TV.weñe\_robar-TV.entu\_sacar-CR.TV\\+PASS.nge23+ITR.r18+LOC.pu17+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:168} [Smeets, I. 2008: 556 (\emph{rüfü-})] \cite{RefB:21}\\ \emph{utr\textbf{u-ne}ntu-y} 'she spilled it out' \\ \texttt{-TV.utru\_derramar-TV.entu\_sacar-CR.TV\\+IDO.e6+IND.y4+3.Ø3+DS12A.Ø1} \end{example} The last sub-rule converts \texttt{"@VE"} into \emph{e} in any other context not considered in the R\ref{R:14} set of rules, yielding the \emph{entu-} form of the verb. \subsubsection{Special case: radical consonant alternation before causative -üm-} \label{sec:43} \paragraph{} \label{tp:49} \emph{Mapuche} verb roots which have an intransitive meaning may be transitivized by adding causatives suffixes \emph{-el-, -ül-, -üm-}, slot 34, the factitive \emph{‑ka-} or transitivizer \emph{-tu-} suffixes, slot 33. Few roots undergo a change through this process, actually, Smeets says that it is an "unproductive relic phenomena" [Smeets 2008: 53] \cite{RefB:21}. She gives the following exhaustive list: \begin{itemize} \label{it:32} \item[] \emph{af-} 'to come to an end' → \emph{a\textbf{p}-üm-} 'to finish' \item[] \emph{lef-} 'to run' → \emph{le\textbf{p}-üm-} 'to make run (animals)' \item[] \emph{traf-} 'to fit in/on' → \emph{tra\textbf{p}-üm-} 'to cause to fit in/on' \item[] \emph{lleg-} 'to come up (plants)' → \emph{lle\textbf{k}-üm-} 'to plant' (tr.),\\ but \emph{lleg-üm-} 'to make come up' \item[] \emph{nag-} 'to go down' → \emph{na\textbf{k}-üm-} 'to carry down',\\ but \emph{nag-üm-} 'to take down' \item[] \emph{la-} 'to die' → \emph{la\textbf{ng}-üm-} 'to kill' \end{itemize} We have also found some other cases: \begin{itemize} \label{it:33} \item[] \emph{trof-} 'to explode, crack' (itr.) → \emph{tro\textbf{p}-üm-} 'to crack' (tr.) \item[] \emph{nel-} 'to get loose' → \emph{nel(\textbf{k})-üm-} 'to let loose, to set free' \item[] \emph{lüf-} 'to burn' (itr.) → \emph{lü\textbf{p}-üm-} 'to burn' (tr.), 'to set fire' \end{itemize} As the goal of the FST is analysis, the system was set for the maximum analysis possible. So, instead of introducing both forms (intransitive and transitive), only the intransitive verb form was introduced in the lexicon, together with the creation of a rule to handle the radical change. \begin{definition} \label{def:18} Encoding of forms with radical change: \texttt{ \item[] ["‑IV"{.af\_acabar}]: ["@G"a"@FP"]; \item[] ["‑IV"{.la\_morir}]: [{la}"@NG"]; \item[] ["‑IV"{.lef\_correr}]: [{le}"@FP"]; \item[] ["‑IV"{.lleg\_crecer}]: [{lle}"@GK"]; \item[] ["-IV"{.lüf\_quemar}]: [{lü}"@FP"]; \item[] ["‑IV"{.nag\_bajar}]: [{na}"@GK"]; \item[] ["-IV"{.nel\_soltar}]: [{nel}"@GK"]; \item[] ["‑IV"{.traf\_encajar}]: [{tra}"@FP"]; \item[] ["-IV"{.trof\_romper}]: [{tro}"@FP"];} \end{definition} The forms on the list have a tag on the right side. \texttt{"@FP"} when the root has to end in \emph{f} for the intransitive meaning and in \emph{p} for the transitive sense. \texttt{"@NG"} appears when the root does not change anything regarding intransitiveness, and add \emph{ng} when transitive. \texttt{"@GK"}, intransitive ending in \emph{g}, transitive ending either in \emph{g} or \emph{k}. The later are the ones with a "but" on the "list of forms with radical change" (\ref{def:18}). \begin{definition} \label{def:19} Causative \emph{-üm-} encoding: \\ \texttt{["+CA"{.m34}]: ["@ÜC"m];} \end{definition} \begin{exercise} \label{R:15} \textbf{Radical consonant alternation before \emph{-üm-}} \\ \texttt{define RuCAlt01 \item[] [["@NG" -> \{ng\}"@4", "@FP" -> p"@5", \\"@GK" -> [[k|g]"@6"] || \_ "@ÜC"] .o. \item[] ["@ÜC" -> ü || ["@4"|"@5"|"@6"|CON|SVW] \_ ]\\ .o. \item[] ["@4"|"@5"|"@6" -> 0]]; \bigskip \item[] define RuCAlt02 \item[] [["@NG" -> 0, "@FP" -> f, "@GK" -> [g|0]] \\.o. \item[] ["@ÜC" -> 0 || ["@NG"|VOW] \_ ] .o. \item[] ["@ÜC" -> ü || ["@FP"|"@GK"|CON|SVW] \_ ] .o. \item[] ["@NG"|"@FP"|"@GK"|"@ÜC" -> 0]];} \end{exercise} The above set of rules is similar to the one defined by \texttt{RuTrIPDEDO} (R\ref{R:06} p. \pageref{R:06}), in the sense that it follows the same logic. Basically, when any of the tags \texttt{"@NG"}, \texttt{"@FP"} or \texttt{"@GK"} enters in contact with \texttt{"@ÜC"}, the transitivizing option is activated implying a new context tag \texttt{"@4"}, \texttt{"@5"}, \texttt{"@6"} to allow the subsequent change of \texttt{"@ÜC"} into \emph{ü}. After these two steps, context tags (\texttt{"@4"}, etc.) are wiped out. Rule \texttt{RuCAlt02} operates on the intransitive change, i.e. it either eliminates the tag or transforms it into the intransitive form. The following analyses show that processes described above are successfully carried out: \begin{example} \label{ex:169} [Smeets, I. 2008: 192 (52)] \cite{RefB:21}\\ \emph{a\textbf{f}-a-y} 'it will stop' \\ \texttt{‑IV.af\_acabar+NRLD.a9+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:170} [Smeets, I. 2008: 313 (15)] \cite{RefB:21}\\ \emph{a\textbf{p}-üm-fal-iy} 'it can be finished' \\ \texttt{‑IV.af\_acabar+CA.üm34+ADJDO.fal}\footnote{Smeets labels \emph{-fal} as a nominaliser putting it under the category of derivative nominalisers as a broad term for non-verbal suffixes (see chap. 28.1 of 'A Grammar of \emph{Mapuche}'), but we have tagged it as adjectivizer because \emph{-fal} indicates that the action denoted by the verb is applicable to the subject of the phrase (e.g., edible) [Smeets 2008: 312] \cite{RefB:21}.}\texttt{+VRB.Ø36\\+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:171} [Smeets, I. 2008: 34] \cite{RefB:21}\\ \emph{le\textbf{f}-iy} 'he ran' \\ \texttt{‑IV.lef\_correr+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:172} [Smeets, I. 2008: 265 (6)] \cite{RefB:21}\\ \emph{le\textbf{p}-üm-kantu-nge-y} 'they made it run' (they made a mare run for exercise) \\ \texttt{‑IV.lef\_correr+CA.üm34+PLAY.kantu22\\+PASS.nge23+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:173} [Smeets, I. 2008: 304 (23)] \cite{RefB:21}\\ \emph{tra\textbf{f}-me-n} 'I went to meet' (somebody) \\ \texttt{‑IV.traf\_encajar+TH.me20+IND1SG.n3} \end{example} \begin{example} \label{ex:174} [Smeets, I. 2008: 560 (\emph{traf-})] \cite{RefB:21}\\ \emph{tra\textbf{p}-üm-a-fi-n} 'I will gather' (it) \\ \texttt{‑IV.traf\_encajar+CA.üm34+NRLD.a9\\+EDO.fi6+IND1SG.n3} \end{example} \begin{example} \label{ex:175} [Smeets, I. 2008: 206 (137)] \cite{RefB:21}\\ \emph{lle\textbf{g}-mu-m} 'where it had grown up' \\ \texttt{‑IV.lleg\_crecer+PLPF.mu7+IVN.m4} \end{example} \begin{example} \label{ex:176} [Smeets, I. 2008: 528 (\emph{lleg-})] \cite{RefB:21}\\ \emph{lle\textbf{k}-üm-fi-ñ} 'I grew it' \\ \texttt{‑IV.lleg\_crecer+CA.üm34+EDO.fi6+IND1SG.n3} \end{example} \begin{example} \label{ex:177} [Zúñiga, F. 2006: 306 (parir)] \cite{RefB:24}\\ \emph{lle\textbf{g}-üm-ün} 'I grew' \\ \texttt{‑IV.lleg\_crecer+CA.üm34+IND1SG.n3} \end{example} \begin{example} \label{ex:178} [Smeets, I. 2008: 49] \cite{RefB:21}\\ \emph{na\textbf{k}-üm-fi-y-u} 'we brought him down' \\ \texttt{‑IV.nag\_bajar+CA.üm34+EDO.fi6+IND.y4\\+1.Ø3+DL.u2} \end{example} \begin{example} \label{ex:179} [Smeets, I. 2008: 137 (37)] \cite{RefB:21}\\ \emph{na\textbf{g}-ün} 'it went down / the going down' \\ \texttt{‑IV.nag\_bajar+PVN.n4} \end{example} \begin{example} \label{ex:180} [Smeets, I. 2008: 243 (1)] \cite{RefB:21}\\ \emph{la-le-la-y} 'she is not dead' \\ \texttt{‑IV.la\_morir+ST.küle28+NEG.la10+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:181} [Smeets, I. 2008: 243 (2)] \cite{RefB:21}\\ \emph{lan\textbf{g}-üm-ki-fi-l-nge} 'don't kill it' \\ \texttt{‑IV.la\_morir+CA.üm34+NEG.ki10+EDO.fi6+CNI.l\\+IMP2SG.nge3} \end{example} \begin{example} \label{ex:182} [Guevara 1913: 77] \cite{RefB:09}\\ \emph{tro\textbf{f}-lu} 'the exploding one' \\ \texttt{‑IV.trof\_explotar+SVN.lu4} \end{example} \begin{example} \label{ex:183} [Augusta, F. (\emph{tropümün})] \cite{RefB:03}\\ \emph{tro\textbf{p}-üm-ün} 'snap, shoot' \\ \texttt{‑IV.trof\_explotar+CA.üm34+PVN.n4} \end{example} \begin{example} \label{ex:184} [Augusta, F. (\emph{nel-})] \cite{RefB:03}\\ \emph{nel-ün kawellu} 'loose horse' \\ \texttt{-IV.nel\_soltar+IND1SG.n3\\-NN.kawellu\_caballo} \end{example} \begin{example} \label{ex:185} [Smeets, I. 2008: 441 (60)] \cite{RefB:21}\\ \emph{nel\textbf{k}-üm-nge-nu-a-l} 'not to get fired' \\ \texttt{‑IV.nel\_soltar+CA.üm34+PASS.nge23\\+NEG.no10+NRLD.a9+OVN.el4} \end{example} \begin{example} \label{ex:186} [Smeets, I. 2008: 526 (\emph{lüf-})] \cite{RefB:21}\\ \emph{lü\textbf{f}-a-y} 'it will burn' \\ \texttt{‑IV.lüf\_quemar+NRLD.a9+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:187} [Augusta, F. (encender)] \cite{RefB:03}\\ \emph{lü\textbf{p}-üm-ün} 'to set fire to' \\ \texttt{‑IV.lüf\_quemar+CA.üm34+PVN.n4} \end{example} \subsection{Morphotactics: constructing the verb form} \label{sec:44} \paragraph{} \label{tp:50} As it was explained in \nameref{tp:25}, p. \pageref{tp:25}, morphotactics is the set of constraints that regulates the co-occurrence of morphemes. Once the lexicon and suffixes that interact in the verb form are declared (see \ref{sec:36} \nameref{sec:36}, p. \pageref{sec:36} and \ref{sec:37} \nameref{sec:37}, p. \pageref{sec:37}.), it is necessary to regulate their interaction. We have introduced the \emph{Mapuche} verb form in section \ref{sec:04}, p \pageref{sec:04}. In a concise way, the verb is a stem followed by a series of suffixes that complete the verb form. \subsubsection{Stems codification} \label{sec:45} \paragraph{} \label{tp:51} Section \ref{sec:16} \nameref{sec:16}, p. \pageref{sec:16} exposes different stem configurations. Most simple stem type is formed by a single verbal root. Verb suffixes may be added immediately to this type of stem. See example E\ref{ex:44}, p. \pageref{ex:44}. Other type of stem that accepts verb suffixes immediately is the simple (implying no suffixes) compound where one of the members is a verbal root, the other member may be another verbal root, an adjectival, adverbial, nominal, numeral or a question root. See examples E\ref{ex:45}, E\ref{ex:46}, p. \pageref{ex:45} and following table. \begin{table}[htb] \caption{Simple stem forms} \label{tab:05} \begin{tabular}{|r|c|} \hline\noalign{\smallskip} Stem & Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} Verbal root & +Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} Verbal root + Verbal root & +Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} Verbal root + Non-verbal root & +Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} ~~~~~~~~~~ Non-verbal root + Verbal root & +Suffixes\\ \noalign{\smallskip}\hline \end{tabular} \end{table} \begin{definition} \label{def:20} Simple stems encoding\\ \texttt{define CMPVBVAL \newline [CAjVbVSTEM|CAvVbSTEM|CNnVbSTEM|CQtVbSTEM|\\CVbAjSTEM|CVbAvSTEM|CVbNnSTEM|CVbVbSTEM];} \end{definition} \begin{itemize} \label{it:34} \item[] \texttt{CAjVbVSTEM} Complex adjective+verb compound stem \item[] \texttt{CAvVbSTEM} Complex adverb+verb compound stem \item[] \texttt{CNnVbSTEM} Complex noun+verb compound stem \item[] \texttt{CQtVbSTEM} Complex question+verb compound stem \item[] \texttt{CVbAjSTEM} Complex verb+adjective compound stem \item[] \texttt{CVbAvSTEM} Complex verb+adverb compound stem \item[] \texttt{CVbNnSTEM} Complex verb+noun compound stem \item[] \texttt{CVbVbSTEM} Complex verb+verb compound stem \end{itemize} Definition D\ref{def:20} above, defined as \texttt{CMPVBVAL}, digests, among others in the FST script, the possible \emph{Mapuche} simple stems. \texttt{CMPVBVAL} stands for "verbal compounds with their corresponding valence" (see \ref{tp:54} below). \paragraph{Compounds encoding.} \label{tp:52} In D\ref{def:21}, \texttt{formCNnVbROOT} encodes the form of a "noun + verb" compound. The whole form is enclosed in brackets and the tag \texttt{"-NVCR"} is attached to it. Then, sub-rule \texttt{CNnVbSTEM} applies neutralisation of tags (see \ref{tp:53} below) and verb valence (see \ref{tp:54} below) to the compound. \begin{definition} \label{def:21}\ Noun + verb compound \\ \texttt{define formCNnVbROOT \newline [[NROOT [IVROOT|TVROOT]]"-NVCR"];\\ define CNnVbSTEM [RuIVCNnVb .o. RuTVCNnVb .o.\\ RuCNnVb01 .o. [neutCNnVb .o. formCNnVbROOT]];} \end{definition} \paragraph{Neutralisation of tags.} \label{tp:53} Compound stems, complex stems (see \nameref{tp:59}, p. \pageref{tp:59}) and complex compound stems (see \nameref{tp:61}, p. \pageref{tp:61}), are qualified as "complex" because they incorporate suffixes into the stem, and have their own rules of interaction. For this reason, PoS and suffixes tags are converted into different tags while applying the inner compound rules (R\ref{R:16}). We call this process "neutralisation" because it makes general rules not affect stems. This change is reverted before the analysis output, so the user does not have to interpret a wider set of tags. Neutralisation is applied first, and then compound rules are applied to the resulting form, therefore the rules are generated taking into account the converted tags (see \texttt{CNnVbSTEM} in D\ref{def:21}). R\ref{R:16} is an example of how neutralisation is applied: \begin{exercise} \label{R:16} \textbf{Neutralisation of PoS and suffixes tags} (sample)\\ \texttt{define NeutAj ["-aj0" <- "-AJ"];\\ define NeutNn ["-nn0" <- "-NN"];\\ define NeutIv ["-iv0" <- "-IV"];\\ define NeutTv ["-tv0" <- "-TV"];\\ define NeutAdjdo ["+adjdo0" <- "+ADJDO"];\\ define NeutCa [{"+ca0"} <- {"+CA"}];\\ define NeutDistr ["+distr0" <- "+DISTR"];\\ define NeutHh ["+hh0" <- "+HH"];\\ define NeutNomag ["+nomag0" <- "+NOMAG"];\\ define NeutPvn ["+pvn0" <- "+PVN"];\\ define NeutRef ["+ref0" <- "+REF"];\\ define NeutTh ["+th0" <- "+TH"];\\ define NeutTr ["+tr0" <- "+TR"];} \end{exercise} \paragraph{Valence in compounds.} \label{tp:54} When one of the roots in a compound is a verb and the other is not, the resulting compound gets the valence from the verb root. When both members of a compound are verb roots, the valence is derived from the second. This needs to be encoded because transitive verbs take suffixes that intransitive ones do not. \begin{exercise} \label{R:17} \textbf{Valence in verbal compounds} (sample) \\ \texttt{define RuIVCNnVb ["-CR.IV" <- "-NVCR" ||\\ "-nn0" \$["-iv0"]}\footnote{This notation is equivalent to \texttt{?* "-iv0" ?*}: \texttt{"-iv0"} surrounded by none or any amount of elements to the right and to the left.}\texttt{ \_ ];\\ define RuTVCNnVb ["-CR.TV" <- "-NVCR" ||\\ "-nn0" \$["-tv0"] \_ ];\\ define RuIVCVbVb ["-CR.IV" <- "-VCR" || \newline ["-tv0"|"-iv0"] \$["-iv0"] \_ ];\\ define RuTVCVbVb ["-CR.TV" <- "-VCR" || \newline ["-tv0"|"-iv0"] \$["-tv0"] \_ ];} \end{exercise} R\ref{R:17} has two examples of valence application, one for "noun + verb" compounds and another for "verb + verb" compounds. Each of them have a rule for transitive and another for intransitive valences. The tag \texttt{"-NVCR"}, that was added to the compound in rule \texttt{formCNnVbROOT} (D\ref{def:21}), is transformed into \texttt{"-CR.IV"} when preceded by the sequence of neutralised tags \texttt{"-nn0" ?* "-iv0"} (\texttt{?*} indicates zero or more elements in between). This process establishes the intransitive valence for this compound. Transitive process is analogous. When the compound is made up of two adjectives, two nouns or two verbs, we need to process the compound in a way to not accept equal roots, in which case it would not be a compound but a reduplicated root. \begin{definition} \label{def:22}\ Verb + verb compound \\ \texttt{define formCVbVbROOT [[\%< [TVROOT|IVROOT] \%\#\\ \%< [IVROOT|TVROOT] \%\#]"-VCR"];\\ define neutCVbVb [NeutIv .o. NeutTv];\\ define preCVbVbROOT [\_eq(formCVbVbROOT,\\ \%< , \%\#)];\\ define CVbVbSTEM [RuIVCVbVb .o. RuTVCVbVb .o. \newline [neutCVbVb .o. formCVbVbROOT - preCVbVbROOT]];} \end{definition} As in the case of the "noun + verb" compound (D\ref{def:21}), in D\ref{def:22} the first rule \texttt{formCVbVbROOT} defines the elements and their order in the compound, but it also adds some marks to the roots. Both roots are marked with \texttt{<} on the left and \texttt{\#} on the right: "\texttt{\%< ROOT \%\#}". The \texttt{\%} (percentage) escapes the symbols to read them literally. Then, the whole form is enclosed in brackets and the tag \texttt{"-VCR"} is attached to it. The next rule \texttt{neutCVbVb}, defines the tags to be neutralised (see \nameref{tp:53}, p. \pageref{tp:53}). Rule \texttt{preCVbVbROOT} filters from the output side of\\ \texttt{formCVbVbROOT} all those strings where some sub-strings occurring between the delimiters \texttt{<} and \texttt{\#} are different. This rule\footnote{"\texttt{\_eq(X,L,R)}\\ Filters from the output side of \texttt{X} all those strings where some sub-strings occurring between the delimiters \texttt{L} and \texttt{R} are different. Example:\\ Consider the language \texttt{\%< a* b \%> \%< a b* \%>}, which contains an infinite number of strings:\\ \texttt{<b><a> <b><ab> <ab><a> <ab><ab> <ab><abbb> ...}\\ However, only one of the strings in this language has identical sub-strings between all instances of \texttt{<} and \texttt{>}, namely \texttt{<ab><ab>}. Hence, the language containing the single string\\ \texttt{<ab><ab>}\\ is produced by the regular expression:\\ \texttt{\_eq(\%< a* b \%> \%< a b* \%> , \%< , \%>) ;}\\ This operation is mostly used to model reduplication in natural language lexicons. Usually, the bare words to be reduplicated are marked with delimiters, say \texttt{<} and \texttt{>}, after which one can produce the reduplicated forms. For example:\\ \texttt{define Lexicon \{cat\}|\{dog\}|\{horse\};\\ define RLexicon \%< Lexicon \%> (\%- \%< \textbackslash [\%<|\%>]+ \%>);\\ regex \_eq(RLexicon, \%<, \%>) .o. \%<|\%> -> 0 ;}\\ and now we get:\\ \texttt{foma[1]: lower-words cat cat-cat dog dog-dog horse horse-horse.}" \newline [Hulden, M. in \href{https://code.google.com/archive/p/foma/wikis/RegularExpressionReference.wiki}{https://code.google.com/archive/p/foma/wikis/\\RegularExpressionReference.wiki}].} is meant to treat reduplicated roots, but we have modified it a little, so we can apply it to the compounds in order to not analyse reduplication as composition. Actually, what we do is subtract from the form (defined by \texttt{formCVbVbROOT}) the result of the calculus made at \texttt{preCVbVbROOT}, obtaining only those forms where both members are different. Finally, \texttt{CVbVbSTEM} holds the result of applying neutralisation, valence definition (see \nameref{tp:54}, p. \pageref{tp:54}) and the subtraction explained in the previous paragraph. All type of stems will be later collected under the rule \texttt{VERBSTEM} (D\ref{def:28}, p \pageref{def:28}), where \texttt{CMPVBVAL} (see table \ref{tab:05} and D\ref{def:20}) is one of them. \paragraph{Stems formed with a verbaliser suffix.} \label{tp:55} One more degree of complexity is given by the necessity of some single roots or compounds of adding a verbalising suffix in slot 36 (see section \ref{sec:06} \nameref{sec:06}, p. \pageref{sec:06}) to be used as verb stems. Single roots that need this kind of suffix are adjectives, adverbs, nouns, numerals, onomatopoeia, proper nouns and question forms. Reduplicated roots of any category also need these suffixes, which are called "stem formative" in this case (see section \ref{sec:07} \nameref{sec:07}, p. \pageref{sec:07}). Compounds where none of the two roots forming them is a verb, also need a verbaliser in slot 36. Table \ref{tab:06} summarises what have been explained in the previous paragraph. \begin{table}[htb] \caption{Simple stem forms: 1\textsuperscript{o} complexity} \label{tab:06} \begin{tabular}{|r|c|c|} \hline\noalign{\smallskip} Stem & \makecell{Verbalisers\\Slot 36} & Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} Non-verbal root & +VRB & +Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} ~~~~~~~~~~ Non-verbal compound & +VRB & +Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} Reduplicated root & +SFR & +Suffixes\\ \noalign{\smallskip}\hline \end{tabular} \end{table} \paragraph{Single non-verbal roots.} \label{tp:56} They need a verbaliser to become verbal stems; see them collected in definition D\ref{def:24}, encoded as\\ \texttt{SPNVBROOT}. Verbalisers, slot 36, are encoded in D\ref{def:23} below. \begin{definition} \label{def:23} Verbalisers (slot 36)\\ \texttt{["+VRB"\{.Ø36\}] : 0\\ | ["+VRB"\{.nge36\}"-IV"] : [\{ng\}"@EY"]\\ | ["+VRB"\{.tu36\}] : \{tu\}\\ | ["+VRB"\{.ntu36\}] : ["@N"\{tu\}]\\ | ["+VRB"\{.l36\}] : l\\ | ["+VRB"\{.ye36\}] : \{ye\};} \end{definition} \begin{definition} \label{def:24}\ Single non-verbal roots + verbaliser\\ \texttt{define SPNVBROOT [AJROOT|AVROOT|NROOT|NUROOT|\\PROPN|QROOT] SVRB;} \end{definition} \texttt{SPNVBROOT} states that any of the single roots it collects must be followed by a verbaliser (collected under \texttt{SVRB}) in order to occur with verbal suffixes. R\ref{R:18} exposes the rules that regulate the suffixation of verbalisers by category (see section \ref{sec:06}, p \pageref{sec:06}): \begin{exercise} \label{R:18} \textbf{Non-verb roots forming verb stems} \\ \texttt{define RuAj [["-AJ"|"-CAJ"] =>\\ \_ ?* [\{.Ø36\}|\{.l36\}|\{.nge36\}|\{.ntu36\}]]; \medskip \\ define RuAv [["-AV"|"-CAV"] =>\\ \_ ?* [\{.Ø36\}|\{.l36\}|\{.nge36\}|\{.ntu36\}]]; \medskip \\ define RuNn [["-NN"|"-PN"|"-CNN"|"-CPN"] =>\\ \_ ?* [\{.Ø36\}|\{.nge36\}|\{.tu36\}|\{.ye36\}]]; \medskip \\ define RuNu ["-NU" =>\\ \_ ?* [\{.Ø36\}|\{.l36\}|\{.nge36\}]]; \medskip \\ define RuQc [["@Q1" => \_ ?* [\{.Ø36\}|\{.ye36\}]]\\ .o. ["@Q2" => \_ ?* \{.Ø36\}]\\ .o. ["@Q3" => \_ ?* [\{.Ø36\}|\{.nge36\}]]]; \medskip \\ define RuQt ["-QT" => \_ ?* [\{.l36\}|\{.ntu36\}]]} \end{exercise} Rule \texttt{RuAj} in R\ref{R:18} allows adjectives, compounds made of two adjectives and complex adjective stems (see ref{tp:59} \nameref{tp:59}, p. \pageref{tp:59}) to be completed as verbal stems by suffixes \texttt{-Ø-, -l-, -nge-} or \texttt{-ntu-}, slot 36 (see section \ref{sec:06} \nameref{sec:06}, p. \pageref{sec:06}). Rule \texttt{RuAv} allows adverbs and complex adverb stems (see \ref{tp:59}, p. \pageref{tp:59}) to be completed as verbal stems by suffixes \texttt{-Ø-, -l-, -nge-} or \texttt{-ntu-}, slot 36. Rule \texttt{RuNn} allows nouns, proper nouns, nominal compounds and complex noun stems (\ref{tp:59}, p. \pageref{tp:59}) to be completed as verbal stems by suffixes \texttt{-Ø-, -nge-, -tu-} or \texttt{-ye-}, slot 36. Rule \texttt{RuNu} allows numerals to form verbal stems with suffixes \texttt{-Ø-, -l-} or \texttt{-nge-}, slot 36. Rules \texttt{RuQc} and \texttt{RuQt} regulate verbalising suffixes for question roots, there are only four question roots and they have diverse behaviour, so they have been encoded distinctively, as shown in D\ref{def:25}: \begin{definition} \label{def:25}\ Question roots\\ \texttt{["-QC""@Q1"\{.chem\_qué\_cuál\}]:\{chem\}\\ |["-QC""@Q2"\{.chuchi\_cuál\}]:[\{chuchi\}|\{tuchi\}]\\ |["-QC""@Q3"\{.chum\_cómo\}]:\{chum\}\\ |["-QT"\{.tunte\_cuánto\}]:\{tunte\};} \end{definition} Question root tagged \texttt{"@Q1"} is verbalised by suffixes \texttt{-Ø-} and \texttt{-ye-} (see E\ref{ex:59} and E\ref{ex:59}, p. E\pageref{ex:59}). Question root tagged \texttt{"@Q2"} is verbalised by suffix \texttt{-Ø-} (see E\ref{ex:61}, p. E\pageref{ex:61}). Question roots tagged \texttt{"@Q3"} are verbalised by suffixes \texttt{-Ø-} and \texttt{-nge-} (see E\ref{ex:62} and E\ref{ex:63}, p. E\pageref{ex:62}). Question root identified by \texttt{-QT} is verbalised by suffixes \texttt{-Ø-}, \texttt{-l-} and \texttt{-ntu-} (see E\ref{ex:64}, E\ref{ex:65} and E\ref{ex:66}, p. E\pageref{ex:64}). All restrictions encoded in R\ref{R:18} are applied to\\ \texttt{SPNVBROOT} (D\ref{def:24}) by means of a new rule, \texttt{SPNVBSTEM} (D\ref{def:26}) displayed below, which in turn is collected by \texttt{VERBSTEM} (see D\ref{def:28}, p \pageref{def:28}). \begin{definition} \label{def:26}\ Verbalisable single non-verbal roots\\ \texttt{define SPNVBSTEM [RuAj .o. RuAv .o. RuNn .o.\\ RuNu .o. RuQc .o. RuQt .o. SPNVBROOT];} \end{definition} \paragraph{Non-verbal compounds.} \label{tp:57} One type is made up by two adjectives, which is recognised as an adjectival compound; another types are "adjective + noun", or two nouns, both recognised as nominal compounds. Another compound, not registered by Smeets, but present in other authors' texts, is "numeral + noun", also recognised as nominal compound. As single non-verbal roots, these compounds may be verbalised by a suffix of slot 36. The same suffixes that verbalise single adjectives, verbalise also adjective compounds. The same suffixes that verbalise single noun roots, verbalise nominal compounds. These are collected in their own rule: \texttt{CPNVBROOT} in D\ref{def:27}. Then, \texttt{CPNVBSTEM} applies verbalisation restrictions: \begin{definition} \label{def:27}\ Non-verbal simple compounds + verbaliser\\ \texttt{define CPNVBROOT [CAjAjROOT|CAjNnROOT|\\CNnNnROOT|CNuNnROOT] SVRB;\\ define CPNVBSTEM [CLEANu .o. RuAj .o. RuNn\\ .o. CPNVBROOT .o. CLEANd];} \end{definition} Forms resulting from \texttt{CPNVBSTEM} are also collected in \texttt{VERBSTEM} (see D\ref{def:28}, p \pageref{def:28}). \paragraph{Reduplicated root stems.} \label{tp:58} As shown in table \ref{tab:06} (p \pageref{tab:06}), reduplication, even verbal one, needs what Smeets calls a stem formative (slot 36) to further attach verb suffixes. We explain the case of nominal reduplication encoding, which is analogous to the other two types, verbal and onomatopoeic. \begin{exercise} \label{R:19} \textbf{Nominal root reduplication} \\ \texttt{define NROOTNT [NeutNn .o. NROOT];\\ define NROOTx2 [\%< NROOTNT \%>"-RNNR"];\\ define InsNRoot [[..] -> \%< NROOTNT \%> ||\\ \%> \$[\_] "-RNNR"];\\ define APPLYNN [NROOTx2 .o. InsNRoot];\\ define REDNNROOT [0 <- \%<|\%> .o.\\ \_eq(APPLYNN, \%<,\%>) .o. \%<|\%>|"-RNNR" -> 0];} \end{exercise} First rule in R\ref{R:19} neutralises the nominal tag (see \ref{tp:54}, p. \pageref{tp:54}). Second rule marks the reduplicated element and adds a tag to the entire structure. In \texttt{InsNRoot, [..]} (Epsilon modifier\footnote{Epsilon modifier [..]\\The LHS of a rule may be wrapped in the epsilon modifier, in which case any epsilons on the LHS get a special interpretation, where only one empty string is assumed to exist between each symbol in the input string. For example, the rule:\\ \texttt{[.a*.] -> x} will produce a transducer that maps the input string \texttt{a} unambiguously to \texttt{xxx}.\\Also, \texttt{[..]} will simply produce a rule that inserts one instance of the RHS whenever the context is matched:\\ \texttt{[..] -> x} will map \texttt{aaa} to \texttt{xaxaxax}. \newline [Hulden, M. in \href{https://code.google.com/archive/p/foma/wikis/RegularExpressionReference.wiki}{https://code.google.com/archive/p/foma/wikis/\\RegularExpressionReference.wiki}].}) produces a rule that inserts one instance of \texttt{< NROOTNT >} in between \texttt{>} and \texttt{"-RNNR"}, which is the right side of the form defined in the previous rule \texttt{NROOTx2}. Rule \texttt{APPLYNN} combines and applies previous configurations. Finally \texttt{REDNNROOT} cleans \texttt{<} and \texttt{>} from the grammatical representation, filter the form out of the previous rule, and clean any tag from the lexical side, to end up in a clean analysis (see examples E\ref{ex:32}, p. \pageref{ex:32}; E\ref{ex:48}, p. \pageref{ex:48}; E\ref{ex:146}, p. \pageref{ex:146} and E\ref{ex:151}, p. \pageref{ex:151}): \begin{exercise} \label{R:20} \textbf{Reduplicated roots stem formation} \\ \texttt{define REDSTEMS [[REDONROOT|REDVBROOT|\\REDNNROOT] SSFR];\\ define RuRdOnSt ["-RONR" => \_ ?* \{.Ø36\}];\\ define RuRdVbSt ["-RVBR" => \_ ?* [\{.Ø36\}|\\ \{.nge36\}|\{.tu36\}|\{.ye36\}]];\\ define RuRdNnSt ["-RNNR" => \_ ?* [\{.nge36\}|\\ \{.tu36\}]];\\ define RDROOTSTEM [RuRdOnSt .o. RuRdVbSt .o.\\ RuRdNnSt .o. REDSTEMS];} \end{exercise} R\ref{R:20} assigns the appropriate \texttt{+SFR} to each type of reduplicated root to convert them into verbal stems. Reduplicated noun, onomatopoeia and verb roots forming stems are collected in \texttt{RDROOTSTEM}, which in turn will be part of the \texttt{VERBSTEM} definition (see D\ref{def:28}, p \pageref{def:28}). \paragraph{Complex single root stems.} \label{tp:59} As we have explained before (\nameref{tp:53}, p. \pageref{tp:53}), stems made up by a single root, a compound or a reduplicated root that incorporates at least one suffix (rarely more than three) into the structure are considered "complex stems". Complex single root stems (one root plus one or more suffixes forming a verb stem, see \ref{it:11}, p. \pageref{it:11}) that we encode are adjectival, adverbial, nominal, numeral, questions and nominalised verbs (for the later see sections \ref{sec:12} \nameref{sec:12}, p. \pageref{sec:12}; and \ref{sec:13} \nameref{sec:13}, p. \pageref{sec:13}). We explain here the complex nominalised verb stem. The other ones follow the same procedure with the appropriate rules for their category; they were listed in item \ref{it:11}, p. \pageref{it:11} as "Complex single root stems". \begin{exercise} \label{R:21} \textbf{Complex nominalised verb stem: 1\textsuperscript{st} step} \\ \texttt{define formCXVBROOT [[IVROOT|TVROOT] (CA)\\ (TRFAC) (REF) (ST) (HH) (NRLD) \newline [FLECNOM|NMZ] SVRB];} \end{exercise} In R\ref{R:21} we have a composition of 9 rules, some of them including two or three sub-rules. As in the treatment of compounds, we first define the form and order of elements in the stem. In this case \texttt{formCXVBROOT} states that the stem begins with a transitive or intransitive verb root. Then there is a series of suffixes that are optional, which means that they can co-occur (rarely more than three) in any combination, respecting the order. These suffixes are causative \emph{-l-} or \emph{-m-}, slot 34; factitive \emph{-ka-} or transitivizer \emph{-tu-}, slot 33; reflexive/reciprocal \emph{-w-}, slot 31; stative \emph{-le-}, slot 28; hither \emph{-pa-}, slot 17; and non-realised situation \emph{-a-}, slot 9. Then come the obligatory nominalisers, those may be inflectional (see \ref{sec:12}, p. \pageref{sec:12}) or derivational (see \ref{sec:13}, p. \pageref{sec:13}). A verbaliser, slot 36, completes the stem. \begin{exercise} \label{R:22} \textbf{Complex nominalised verb stem: 2\textsuperscript{nd} step} \\ \texttt{define neutCXVb [NeutAdjdo .o. NeutAdjqe .o.\\ NeutCa .o. NeutFac .o. NeutHh .o. NeutNrld .o. NeutNomag .o. NeutPvn .o. NeutRef .o. NeutSt\\ .o. NeutSvn .o. NeutTr .o. NeutIv .o. NeutTv]; \medskip define CXVBROOT [neutCXVb .o. formCXVBROOT]; \smallskip \\ define RuCxV01 [$\sim$\$[["-iv0"|"-tv0"] ?* ["+OVN"\\|"+IVN"|"+TVN"|"+AVN"|\{.Ø4\}|"+CSVN"|"+NOMPI"\\|"+NOM"]]];} \end{exercise} Tag neutralisation of all the members in the stem, and the application to the stem form comes in the second and third rules. Rule \texttt{RuCxV01} specifies which of the nominalising suffixes do not form part of this stem. Those are not neutralised because while forbidding them, they need no further interaction rules. \begin{exercise} \label{R:23} \textbf{Complex nominalised verb stem: 3\textsuperscript{rd} step} \\ \texttt{define RuCxV02 [["+pvn0"|"+nomag0"|"+adjqe0"]\\ => \_ ?* [\{.Ø36\}|\{.nge36\}]]; \smallskip \\ define RuCxV03 [[\{.lu4\}|"+adjdo0"]\\ => \_ ?* \{.Ø36\}]; \smallskip \\ define RuCxV04 [["+ca0" => \_ ?* "+adjdo0"]\\ .o. ["+ref0" => \_ \$["+pvn0"] \{.nge36\}] .o. \newline ["+tr0" => \_ \$["+nomag0"|"+pvn0"] \{.nge36\}] \\ .o. ["+st0" => \_ ?* "+svn0"]]; \smallskip \\ define RuCxV05 [$\sim$\$["+ca0" ?* ["+tr0"|"+fac0"|\\"+ref0"|"+st0"|"+nrld0"|\{.Ø4\}]]] .o. \newline [$\sim$\$[["+tr0"|"+ref0"] ?* ["+st0"|"+nrld0"|\\ \{.Ø4\}]]];} \end{exercise} Rules \texttt{RuCxV02, RuCxV03, RuCxV04, RuCxV05} regulate the interaction of all possible suffixes in the stem, including the verbalisers. \begin{exercise} \label{R:24} \textbf{Complex nominalised verb stem: 4\textsuperscript{th} step} \\ \texttt{define CXVBSTEM [RuCxV01 .o. RuCxV02 .o.\\ RuCxV03 .o. RuCxV04 .o. RuCxV05 .o. RuCCXVbSt\\ .o. RuPr50 .o. CXVBROOT];} \end{exercise} Final rule \texttt{CXVBSTEM} compiles all together producing the final possible forms for this type of stem. All complex single root stems are also collected in\\ \texttt{VERBSTEM} (see D\ref{def:28}). \paragraph{Complex reduplicated root stem.} \label{tp:60} As it was explained with example E\ref{ex:58}, p. \pageref{ex:58}, this stem is listed as a single root complex stem because it is "one" root and "one" stem that reduplicate, i.e., the whole stem reduplicates. This form was not encoded as a compound nor as a single root, but in the section that deals with reduplicated roots. The difference between the rule for this case and the one presented in \ref{R:19} for nominal reduplication, is that the root is encoded together with the suffix, and that the identifying tag suits with the category of the stem, see below: \begin{exercise} \label{R:25} \textbf{Verbal root reduplication}\\ \texttt{define VBROOTNT [[IVROOT|TVROOT] (CA)];\\ define VBROOTx2 [\%< [IVROOT|TVROOT] (CA)\\ \%>"-RVBR"];\\ define RuVbCA [$\sim$\$[["-IV"|"-TV"] ?* \{.l34\}]];\\ define InsVBRoot [[..] -> \%< VBROOTNT \%> ||\\ \%> \$[\_] "-RVBR"];\\ define APPLYVB [RuVbCA .o. VBROOTx2 .o.\\ InsVBRoot];\\ define REDVBROOT [0 <- \%<|\%> .o. \_eq(APPLYVB,\\ \%<,\%>) .o. \%<|\%>|"-RVBR" -> 0];} \end{exercise} The differences we have mentioned in the paragraph above are found in the line starting with \texttt{"define VBROOTx2"}, where there is an optional suffix \texttt{CA} (causative), and the corresponding tag for the reduplicated verb root \texttt{"-RVBR"}. The causative suffix \emph{-üm-} is the only one found in a reduplicated stem, at least in Smeets' texts. \paragraph{Complex compound stems.} \label{tp:61} Basically, this type of stem is formed in the same way as the "complex single root stem" (p. \pageref{tp:10}), but implicating two roots. Complex compound stems (see p. \pageref{it:11}) that we encode are: \begin{itemize} \label{it:35} \item adjective (+ suffixes)\footnote{Parenthesis express optionality.} + noun (+ suffixes): see E\ref{ex:192}; \item adjective (+ suffixes) +verb +nominaliser, see E\ref{ex:193}; \item adverb (+suffxes) + verb, see E\ref{ex:188}; \item noun (+suffxes) + noun (+suffxes), see E\ref{ex:194}; \item noun (+suffxes) + verb, see E\ref{ex:189}; \item verb (+suffxes) + noun, see E\ref{ex:191}; \item verb (+suffxes) + verb, see E\ref{ex:190}; \end{itemize} All complex compound stems are collected together with simple compounds in \texttt{CMPVBVAL}, see D\ref{def:20}. And as for the previous types of stems, the later ones are also collected in rule \texttt{VERBSTEM} (D\ref{def:28}), which is summarised in table \ref{tab:07}: \begin{definition} \label{def:28} Verb stems\\ \texttt{define VERBSTEM [IVROOT|TVROOT|CXVBSTEM|\\CXNNSTEM|CXNNSTEM2|CXAJSTEM|CXAJSTEM2|\\CXAVSTEM|CXNUSTEM|CXQUSTEM|RDROOTSTEM|\\CMPVBVAL|CPNVBSTEM|SPNVBSTEM];} \end{definition} \begin{itemize} \label{it:36} \item \texttt{IVROOT}: Intransitive verb root \item \texttt{TVROOT}: Transitive verb root \item \texttt{CXVBSTEM}: Complex verb root stem (R\ref{R:21}) \item \texttt{CXNNSTEM}: Complex noun root stem \item \texttt{CXNNSTEM2}: Complex noun root stem (form 2) \item \texttt{CXAJSTEM}: Complex adjective root stem \item \texttt{CXAJSTEM2}: Complex adjective root stem (form 2) \item \texttt{CXAVSTEM}: Complex adverb root stem \item \texttt{CXNUSTEM}: Complex numeral root stem \item \texttt{CXQUSTEM}: Complex question root stem \item \texttt{RDROOTSTEM}: Reduplicated root stems (R\ref{R:20}) \item \texttt{CMPVBVAL}: Verbal compound stem with valence (D\ref{def:20}) \item \texttt{CPNVBSTEM}: Verbalised non-verbal compounds (D\ref{def:27}) \item \texttt{SPNVBSTEM}: Verbalised single non-verbal roots (D\ref{def:26}) \end{itemize} \begin{table}[htb] \caption{\emph{Mapudüngun} stems} \label{tab:07} \begin{tabular}{|r|c|c|} \hline\noalign{\smallskip} Stem & \makecell{Verbalisers\\Slot 36} & Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} Verbal root & & +Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} Verbal root + Verbal root & & +Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} Verbal root + Non-verbal root & & +Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} Non-verbal root + Verbal root & & +Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} Non-verbal root & +VRB & +Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} Non-verbal compound & +VRB & +Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} Reduplicated root & +SFR & +Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} Root + suffixes & +VRB & + Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} Root + suffixes + Root & +VRB & + Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} (Root + suffix) reduplicated & +SFR & + Suffixes\\ \noalign{\smallskip}\hline\noalign{\smallskip} Root + suffixes + Root + suffixes & +VRB & + Suffixes\\ \noalign{\smallskip}\hline \end{tabular} \end{table} Different conformations of stems where identified in section \ref{sec:16} \nameref{sec:16}, p. \pageref{sec:16}; in this point, we expose the rules that regulate the interaction among the elements introduced above, roots (section \ref{sec:36}) and suffixes (section \ref{sec:37}), which take part of the different types of stems. \paragraph{Complex compound stems} \label{tp:62} "Adverb + optional causative + optional transitivizer + verb" \\ Rule:\footnote{Rules are presented here in a simple way, just to show the elements involved, but actually, rules are much more complex in the system because they have to deal with the generation of the compounds, the addition of tags to carry out the processes, and the elimination of these tags once used. See this example of one of the simplest rules in the FST script, which does not have to deal with the addition of a verbaliser because there is a verb root implied:\\ \texttt{\#\#\# Question / Verb\\ define ensCQtVbROOT \newline [[\%< QROOT \%\# \%< [IVROOT2|TVROOT2]]"-QVCR"];\\ define neutCQtVb \newline [NeutIv .o. NeutQc .o. NeutQt .o. NeutTv];\\ define preCQtVbROOT [\_eq(ensCQtVbROOT, \%< , \%\#)];\\ define CQtVbSTEM [RuIVCQtVb .o. RuTVCQtVb .o. RuCCXVbSt .o. [neutCQtVb .o. formCQtVbROOT]];\\ define CMPVBVAL [CLEANu .o. CQtVbSTEM .o. CLEANd];}} \texttt{AVROOT (CA) (TR) [IVROOT2|TVROOT2];} \begin{example} \label{ex:188} [Smeets, I. 2008: 387 (26)] \cite{RefB:21}\\ \emph{ñi \textbf{pülle-tu-pe}-lu} 'he came close to see'\\ \texttt{-SP.ñi\_mi\_su\\-AV.pülle\_cerca+TR.tu33-TV.pe\_ver+SVN.lu4}\\ \end{example} "Noun + optional transitivizer or factitive + verb"\\ Rule: \texttt{NROOT (TRFAC) [IVROOT2|TVROOT2];} \begin{example} \label{ex:189} [Smeets, I. 2008: 358 (5)] \cite{RefB:21}\\ \emph{\textbf{trari-ntuku}-künu-nge-ke-fu-y} 'they were caught and left tied up'\\ \texttt{-NN.trari\_amarra-TV.tuku\_poner+PFPS.künu32\\+PASS.nge23+CF.ke14+IPD.fu8+IND.y4+3.Ø3}\\ \end{example} "Verb + optional experiencer + optional causative + optional transitivizer or factitive + optional reflexive + optional hither or locative + verb"\\ Rule: \texttt{[TVROOT|IVROOT] (EXPOO) (CA) (TRFAC)\\ (REF) (HHLOC) [IVROOT2|TVROOT2];} \begin{example} \label{ex:190} [Smeets, I. 2008: 408 (28)] \cite{RefB:21}\\ \emph{ñi \textbf{ru-pa-aku}-lu} 'he has gone by'\\ \texttt{-SP.ñi\_mi\_su\\-IV.ru\_pasar+HH.pa17-IV.aku\_llegar-CR.IV\\+SVN.lu4}\\ \end{example} "Verb + optional causative + optional transitivizer or factititve + optional reflexive + optional hither + noun"\\ Rule: \texttt{[TVROOT|IVROOT] (CA) (TRFAC) (REF)\\ (HH) NROOT2;} \begin{example} \label{ex:191} [Smeets, I. 2008: 456 (8)] \cite{RefB:21}\\ \emph{\textbf{kim-el-tu-che}-ke-fu-y} 'he used to teach people'\\ \texttt{-TV.kim\_saber+CA.l34+TR.tu33-NN.che\_persona\\+CF.ke14+IPD.fu8+IND.y4+3.Ø3}\\ \end{example} "Adjective + transitivizer or factitive + noun + optional derivational nominaliser \texttt{+VRB}"\\ Rule: \texttt{AJROOT (TRFAC) NROOT2 (NMZ) SVRB;} \begin{example} \label{ex:192} [Smeets, I. 2008: 90 (36)] \cite{RefB:21}\\ \emph{\textbf{wisa-ka-sungu}-n, ta eymi} 'what a dirty talker you [are]!'\\ \texttt{-AJ.weda\_malo+FAC.ka33-NN.düngu\_palabra\\+VRB.Ø36+PVN.n4\\-AP.ta\_el\\-PP.eymi\_tu}\\ \end{example} "Adjective + optional transitivizer or factitive + verb + derivational nominaliser \texttt{+VRB}"\\ Rule: \texttt{AJROOT (TRFAC) [IVROOT2|TVROOT2] NMZ SVRB;} \begin{example} \label{ex:193} \\ \emph{\textbf{küme-ka-puru-fe-nge}-y} 'he is (always) a good dancer'\\ \texttt{-AJ.küme\_bueno+FAC.ka33-IV.puru\_bailar\\+NOMAG.fe+VRB.nge36-IV+IND.y4+3.Ø3}\\ \end{example} "Noun + optional transitivizer or factitive or non class-change suffixes + noun + optional non class-change suffixes or derivational nominalisers \texttt{+VRB}"\\ Rule: \texttt{NROOT (TRFAC|NCC) NROOT2 (NCC|NMZ) SVRB;} \begin{example} \label{ex:194} [Smeets, I. 2008: 459 (36)] \cite{RefB:21}\\ \emph{ta-yiñ pu \textbf{peñi-wen-lamngen-wen-nge}-n} 'we are all related as brothers and sisters' lit: 'this is our brothers relation sisters relation'\\ \texttt{-AP.ta\_este-SP.yiñ\_nuestro-COLL.pu\\-NN.peñi\_hermano+REL.wen-NN.lamngen\_hermana\\+REL.wen+VRB.nge36-IV+PVN.n4} \end{example} \subsection{Morphotactics of verb suffixes} \label{sec:46} \paragraph{} \label{tp:63} In section "\ref{sec:05} \nameref{sec:05}", p. \pageref{sec:05}, we have explained that suffixes belonging to the same slot are mutually exclusive. There are about eighty verbal suffixes spread in thirty-six slots. Some suffixes exclude others for grammatical or semantic reasons, for example, once a verb has taken an inflectional nominaliser, slot 4, it can not take suffixes of mood (slot 4), person (slot 3) and number (slot 2). To start treating suffixes co-occurrence, we first established the suffix sequence with all the possible variants generated by suffix mobility (see \ref{sec:10}, p. \pageref{sec:10} and \ref{sec:50}, p. \pageref{sec:50}), see next rule: \begin{definition} \label{def:29}\ Verb suffixes\\ \texttt{define VERBSUFFIX [(REF) (EXPOO) (PASS) (REF)\\ (TR) (CA) (REF) (TRFAC) (FORCE) (BEN) (FORCE)\\ (PRPSPFPS) (REF) (HH) (CIRCINT) (PLAYSIM)\\ (MIO) (STPR) (BEN) (OS) (IMMSUD) (PLR) (IO)\\ (PASS) (FORCESAT) (PLR) (FORCE) (TH)\\ (PASS1A2A) (PLAYSIM) (IMMSUD) (TH) (PS) (ITR)\\ (HHLOC) (TH) (PS) (REF) (RE) (RECONT) (PLPF15) (CF14) (PX) (REP) (RE) (AFF) (NEG) (NRLD)\\ (IPD) (PLPF07) (EIDO) (CF05) \newline [[[(MOOD) [PERSON|PTMT] (NUMBER)] (DS)]| \newline [[FLECNOM|NMZ] (DS) (NCC) (CC) (INST)]]];} \end{definition} The names or tags appearing in D\ref{def:29} encode the suffixes assigned to each slot (see \ref{sec:37} \nameref{sec:37}, p. \pageref{sec:37}). The first thing that may call the attention is repetition of some tags in different positions, e.g. \texttt{PASS, REF, FORCE, IMMSUD}, etc. This is to deal with suffix mobility (see \ref{sec:10}, p. \pageref{sec:10} and \ref{sec:50}, p. \pageref{sec:50}). Also note that almost all suffixes are marked as optional, they are between parenthesis, except for \texttt{PERSON, PTMT, FLECNOM} and \texttt{NMZ}. The \emph{Mapuche} verb is either finite (\texttt{PERSON} and \texttt{PTMT}) or nominalised (\texttt{FLECNOM} or \texttt{NMZ}). These are the obligatory suffixes for those forms. \paragraph{Methodology.} \label{tp:64} To encode suffixes occurrence in the \emph{Mapuche} verb form, we started incorporating the minimal verb form, i.e., an intransitive verb root plus suffixes expressing mood, person and number (see annex \ref{anx:10} "\nameref{anx:10}", p. \pageref{anx:10}), which are obligatory in a finite verb form. We continued adding the transitive verb related suffixes. So, we first established a set of rules dealing with the minimal forms for both, intransitive and transitive verbs (see annex \ref{anx:11} "\nameref{anx:11}", p. \pageref{anx:11}). \subsubsection{Verb paradigms} \label{sec:47} \paragraph{} \label{tp:65} In D\ref{def:29} above, the last two lines reflect the two forms a verb may take. Penultimate line corresponds to finite forms; in slot 4 is mood, in slot 3 is person or the portmanteau morphs\footnote{"Portmanteau morphs which include a subject marker are assigned subject position (slot 3)" [Smeets 2008: 152] \cite{RefB:21}. We have also seen that assigning portmanteau morphs in this position allows the conditional marker, obligatory in negative imperative forms, appears in its natural position, slot 4 for mood.} (see \texttt{slot-03PTMT.aff} in annex \ref{anx:03}, p. \pageref{it:53}); in slot 2 is number, and dative subject (used in transitive forms) is in slot 1. It was also necessary to incorporate suffixes assigned to slots 23 and 6, as they complete the transitive verb paradigm (see section \ref{sec:11} \nameref{sec:11}, p. \pageref{sec:11}), and negation suffixes in slot 10, even though they are not strictly obligatory and occur in transitive and intransitive forms, they complement with mood suffixes and have a particular incidence in the case of imperative negative forms, (see annex \ref{anx:12} "\nameref{anx:12}", p. \pageref{anx:12}). \begin{table}[htb] \caption{Intransitive and transitive suffixes per slot} \label{tab:08} \begin{tabular}{|c|c|c|c|c|c|c|c|} \hline\noalign{\smallskip} Slot & 23 & 10 & 6 & 4 & 3 & 2 & 1 \\ \noalign{\smallskip}\hline\noalign{\smallskip} Itr & - & neg. & - & mood & \makecell{pers.\\ptmt} & num. & - \\ \noalign{\smallskip}\hline\noalign{\smallskip} Tr & agent & neg. & obj. & mood & \makecell{pers.\\ptmt} & num. & \makecell{dative\\subj.} \\ \noalign{\smallskip}\hline \end{tabular} \end{table} Table \ref{tab:08} shows suffixes per slot\footnote{"It is remarkable that the subject-object paradigm is completed with suffixes which occupy a position in between derivational suffixes, away from the inflectional block at the end of a verb form. The suffixes \emph{-mu-} \texttt{+2A} and \emph{-w-} \texttt{+1A} share their position, slot 23, with the passive marker \emph{-nge-} [Smeets, I. 2008: 161] \cite{RefB:21}.} implied in transitive and intransitive \emph{Mapuche} verbs. Not all suffixes in table \ref{tab:08} co-occur in a transitive form, for instance, agent markers (slot 23) do not co-occur with direct objects (slot 6) or dative subjects (slot 1). To regulate the verbal paradigms, thirty-three rules were necessary, some of them containing sub-rules, and some including the interaction with inflectional nominalisers, slot 4. No reference to mood, person or number may be made when a verb takes one of the nominalisers, but nominalised verbs may include agents (E\ref{ex:195}, E\ref{ex:196}) or objects with the corresponding dative subject (E\ref{ex:195}, E\ref{ex:198}): \begin{example} \label{ex:195} [Smeets, I. 2008: 269 (11)] \cite{RefB:21}\\ \emph{mütrüm-\textbf{uw}-lu} 'his calling to' \\ \texttt{-TV.mütrüm\_llamar+1A.w23+SVN.lu4} \end{example} \begin{example} \label{ex:196} [Smeets, I. 2008: 269 (14)] \cite{RefB:21}\\ \emph{fey-pi-\textbf{mu}-a-fiel} 'what you will tell me' \\ \texttt{-TV.feypi\_decir+2A.mu23+NRLD.a9+TVN.fiel4} \end{example} \begin{example} \label{ex:197} [Smeets, I. 2008: 394 (38)] \cite{RefB:21}\\ \emph{chem-pi-\textbf{e}-t-\textbf{ew}} 'what they where told by' \\ \texttt{-QC.chem\_qué-TV.pi\_decir-CR.TV\\+IDO.e6+AVN.t4+DS3A.ew1} \end{example} \begin{example} \label{ex:198} [Smeets, I. 2008: 485 (5)] \cite{RefB:21}\\ \emph{pe-\textbf{fi}-lu iñche} 'at my seeing her' \\ \texttt{-TV.pe\_ver+EDO.fi6+SVN.lu4\\-PP.iñche\_yo} \end{example} \begin{exercise} \label{R:26} \textbf{Dependency rule 1} \\ \texttt{define RuDp01 \newline [["+DS3A"|"+DS12A"] => "+IDO" ?* \_ ];} \end{exercise} R\ref{R:26} is what we call a "dependency" rule, it says that for suffixes \texttt{+DS3A} and \texttt{+DS12A} to occur it must previously occur the suffix \texttt{+IDO}, i.e., \texttt{+DS3A} and \texttt{+DS12A} depend on \texttt{+IDO} occurrence. \begin{exercise} \label{R:27} \textbf{Prohibition rule 10} \\ \texttt{define RuPr10 [$\sim$\$["+CND" ?* [["+1"\{.Ø3\}]\\ | ["+3"[\{.Ø3\}|\{.ng3\}]]]]];} \end{exercise} R\ref{R:27} is a prohibition rule. The combination of symbols \texttt{$\sim$\$}\footnote{\texttt{$\sim$X} calculates the complement of \texttt{X}, i.e. finds all the elements in the group that are not part of \texttt{X}, or that are not \texttt{X}. \texttt{\$X} denotes the language that contains a sub-string drawn from the language \texttt{X} [Hulden, M. in \href{https://code.google.com/archive/p/foma/wikis/RegularExpressionReference.wiki}{https://code.google.com/archive/p/foma/wikis/\\RegularExpressionReference.wiki}].} may be read as "it can not be the case that", and the rest of this regexp is read as "the conditional is followed by a 1\textsuperscript{st} person suffix in its null form \emph{-Ø-}, or the 3\textsuperscript{st} person suffix in its forms null or \emph{-ng-}. \begin{exercise} \label{R:28} \textbf{Obligation rule 9} \\ \texttt{define RuOb09 [[["+NEG"[\{.ki10\}|\{.kino10\}]]\\ => \_ ?* "+CNI"];} \end{exercise} R\ref{R:28} is an obligation rule which regulates the obligatory occurrence of the conditional marker when there is a negation in the imperative form (see e.r. \ref{tp:135} and annex \ref{anx:12} \nameref{anx:12}, p. \pageref{anx:12}). \subsubsection{Nominalised verbs} \label{sec:48} \paragraph{} \label{tp:66} Last line of D\ref{def:29} (p. \pageref{def:29}), reflects the form of a nominalised verb, either by inflectional (see section \ref{sec:12} \nameref{sec:12}, p. \pageref{sec:12}) or derivational (see section \ref{sec:13} \nameref{sec:13}, p. \pageref{sec:13}) nominalisers. In both cases a nominalised verb may be followed by a dative subject (see E\ref{ex:197}), a non class-changing suffix (see \texttt{NCC.aff} in annex \ref{anx:06}, p. \pageref{anx:06}), a class-changing suffix (see \texttt{CC.aff} in annex \ref{anx:06}, p. \pageref{anx:06}), or the instrumental suffix (see section \ref{sec:15} \nameref{sec:15}, p. \pageref{sec:15}). To regulate verb nominalisation twelve rules were added. Note that these rules regulate co-occurrence among the suffixes of "\texttt{[FLECNOM|NMZ] (DS) (NCC) (CC) (INST)}",\\ and some times with suffixes from other slots; but in general, there are other rules to deal with co-occurrence of these suffixes, or the ones belonging to the transitive and intransitive paradigms, and the derivational ones. \begin{exercise} \label{R:29} \textbf{nominalisation prohibition for completive subjective verbal noun} \\ \texttt{define RuPr19 [$\sim$\$["+CSVN" ?* ["+DS3A"|\\"+DS12A"|"+INST"|"+ADJ"]]];} \end{exercise} R\ref{R:29} forbids dative subject suffixes (slot 1), instrumental, or adjectivizer (class-changing suffix), to appear when the verb has been nominalised by the "completive subjective verbal noun" (slot 4). \begin{exercise} \label{R:30} \textbf{Obligation for agentive verbal noun} \\ \texttt{define RuOb12 ["+AVN" =>\\ "+IDO" \$[\_] ["+DS3A"{.ew1}]];} \end{exercise} R\ref{R:30} forces the "agentive verbal noun" (slot 4) to occur together with the "internal direct object" (slot 6) and the "dative subject for 3\textsuperscript{rd} person agent" (slot 1) in its form \emph{-ew} (see E\ref{ex:22}, p. \pageref{ex:22} and E\ref{ex:197}, p. \pageref{ex:197}). \begin{exercise} \label{R:31} \textbf{Only plain verbal noun may be adverbialized} \\ \texttt{define RuDp05 ["+ADV" => "+PVN" ?* \_ ];} \end{exercise} R\ref{R:31} states that the class-changing suffix \emph{-tu} may only adverbialize a verb nominalised by the "plain verbal noun" \emph{-n-} (see E\ref{ex:34}, p. \pageref{ex:34}). In other words the adverbializer depends on the "plain verbal noun" to occur with a verb. Examples of inflectionally nominalised verbs may be found through e.r. \ref{tp:178}, e.r. \ref{tp:179}, e.r. \ref{tp:180}, e.r. \ref{tp:181}, e.r. \ref{tp:182}, e.r. \ref{tp:183}, e.r. \ref{tp:184} and e.r. \ref{tp:185}. Examples of derivationally nominalised verbs are: E\ref{ex:29}, E\ref{ex:30}, E\ref{ex:31}, E\ref{ex:32}, E\ref{ex:87}, and the following ones: \begin{example} \label{ex:199} [Smeets, I. 2008: 314 (\emph{-Ø})] \cite{RefB:21}\\ \emph{anü-m-ka} 'planting' \\ \texttt{-IV.anü\_sentar+CA.m34+FAC.ka33+NOM.Ø} \end{example} \begin{example} \label{ex:200} [Smeets, I. 2008: 314 (\emph{-Ø})] \cite{RefB:21}\\ \emph{ül-kantu} 'song' \\ \texttt{-NN.ül\_canto+VRB.Ø36+PLAY.kantu22+NOM.Ø} \end{example} \begin{example} \label{ex:201} [Smeets, I. 2008: 314 (\emph{-Ø})] \cite{RefB:21}\\ \emph{yall-tuku} 'illegitimate child' \\ \texttt{-NN.yall\_hijo-de-un-hombre\\-TV.tuku\_poner-CR.TV+NOM.Ø} \end{example} \begin{example} \label{ex:202} [Smeets, I. 2008: 314 (\emph{-Ø})] \cite{RefB:21}\\ \emph{ru-pa} 'time' \\ \texttt{-IV.ru\_pasar+HH.pa17+NOM.Ø} \end{example} \begin{example} \label{ex:203} [Smeets, I. 2008: 312 (8)] \cite{RefB:21}\\ \emph{angkü-m-tu-\textbf{we}} 'poison', 'device to dry things' \\ \texttt{-IV.angkü\_secar+CA.m34+TR.tu33+NOMPI.we} \end{example} \subsubsection{Occurrence of suffixes between slots 5 and 35} \label{sec:49} \paragraph{} \label{tp:67} There are thirty more rules to regulate the occurrence of suffixes that are not obligatory in the minimal transitive or intransitive forms. Most of the rules come from descriptions of the suffixes made by Smeets, for example the rule for the reflexive reciprocal \emph{-w-}: "The suffix \emph{-w-} does not combine with a suffix in slot 23, 6 or 1. The reflexive morpheme \emph{-w-} may occur with intransitive verbs, i.e. with verbs which do not take a suffix in slot 6" [Smeets, I. 2008: 291] \cite{RefB:21}; R\ref{R:32} reflects the previous description: \begin{exercise} \label{R:32} \textbf{Reflexive do not occur in transitive forms} \\ \texttt{define RuPr48 [$\sim$\$["+REF" ?* ["+REF"|"+PASS"\\|"+1A"|"+2A"|"+IDO"]]];} \end{exercise} In the description of (non) combinations of \texttt{+REF}, Smeets also mentions suffixes of slot 1. These are not collected in R\ref{R:32} because there is a previous dependency rule (R\ref{R:26}, p. \pageref{R:26}) stating that dative subjects (slot 1) need the \texttt{+IDO} suffix (slot 6) to occur; as this one is forbidden to occur with \texttt{+REF} the condition does not fulfil for the \texttt{+DS} (slot 1) to occur. \begin{exercise} \label{R:33} \textbf{More involved object obligatory contexts} \\ \texttt{define RuOb16 ["+MIO" => "+CIRC" ?* \_ ,\\ \_ ?* ["+PASS"|"+EDO"|"+TVN"]];} \end{exercise} The rule presented in R\ref{R:33} derives from what we have found in Smeets' examples, there are no explicit combination rules for the more involved object suffix labelled \texttt{+MIO}. It is important to rule this suffix due to its form \emph{-l-} after vowel, \emph{-ül-} after consonant or semivowel, sometimes \emph{-el-} after \emph{r}. These forms coincide with other suffixes forms like stative's or causative's ones, which are proximate in their occurrence position, therefore, they may be erroneously identified. There are fourteen examples given by Smeets, where \texttt{+MIO} (slot 29) is present. In six of them is preceded by \texttt{+CIRC} (slot 30), circular (erratic) movement suffix \emph{-iaw-}. There are another six where it co-occurs with \texttt{+EDO} (slot 6), external direct object suffix \emph{-fi-}. One where it co-occurs with \texttt{+PASS} (slot 23), passive \emph{-nge-}. And one more where it co-occurs with \texttt{+TVN} (slot 4), transitive verbal noun \emph{-fiel-}. \texttt{+MIO} "indicates a more direct, intense or complete involvement of the patient in the event" [Smeets, I. 2008: 287] \cite{RefB:21}; \texttt{+CIRC} "denotes an ongoing event which involves movement in no particular direction" [Smeets, I. 2008: 288] \cite{RefB:21}. It is not clear for us the semantic or grammatical relation between \texttt{+MIO} and \texttt{+CIRC}, but when these two suffixes co-occur, nor \texttt{+PASS} nor \texttt{+EDO} occur. On the other hand, the other three suffixes in the rule have a grammatical relation with \texttt{+MIO}. For \texttt{+EDO}, the external direct object, \texttt{+MIO} gives a further degree of prominence to the object, see following example: \begin{example} \label{ex:204} [Smeets, I. 2008: 288 (6)] \cite{RefB:21}\\ \emph{koyla-tu-künu-\textbf{l-fi}-ñ} 'I lied to him' \\ \texttt{-NN.koyla\_mentira+VRB.tu36+PFPS.künu32\\+MIO.l29+EDO.fi6+IND1SG.n3} \end{example} The same happens with the objects denoted in a passive \texttt{+PASS} construction (E\ref{ex:205}), or in a transitive \texttt{+TVN} clause (E\ref{ex:206}). In the case of a verb nominalised by the transitive verbal noun suffix, \texttt{+CIRC} and \texttt{+TVN} may co-occur (E\ref{ex:207}), rule R\ref{R:33} does not prevent it. \begin{example} \label{ex:205} [Smeets, I. 2008: 397 (62)] \cite{RefB:21}\\ \emph{yiñ ngünen-ka-\textbf{l-nge}-we-no-a-m} 'we are no longer deceived' \\ \texttt{-SP.yiñ\_nuestro\\-NN.ngünen\_engaño+VRB.Ø36+FAC.ka33+MIO.l29\\+PASS.nge23+PS.we19+NEG.no10+NRLD.a9+IVN.m4} \end{example} \begin{example} \label{ex:206} [Smeets, I. 2008: 288 (5)] \cite{RefB:21}\\ \emph{eymi mi wirar-\textbf{ül}-meke-ke-\textbf{fiel}-mew iñche} 'you are always shouting at me' \\ \texttt{-PP.eymi\_tu -SP.mi\_tu\_tuyo\\-IV.wirar\_gritar+MIO.l29+PR.meke28+CF.ke14\\+TVN.fiel4+INST.mew} \end{example} \begin{example} \label{ex:207} [Smeets, I. 2008: 398 (5)] \cite{RefB:21}\\ \emph{ñi küdaw-\textbf{kiaw-ül}-el-\textbf{fiel} pu ülmen} 'he worked around for the rich people' \\ \texttt{-SP.ñi\_mi\_su\\-IV.küdaw\_trabajar+CIRC.iaw30+MIO.l29\\+BEN.el27+TVN.fiel4 \\-COLL.pu -NN.ülmen\_adinerado} \end{example} \begin{exercise} \label{R:34} \textbf{Circular movement context restrictions} \\ \texttt{define RuPr41 [$\sim$\$[["+CIRC"|"+INT"|"+ST"|"+PR"] ?* ["+ST"|"+PR"]]];} \end{exercise} \subsubsection{Treating suffix mobility} \label{sec:50} \paragraph{} \label{tp:68} As it was explained in section \ref{sec:10}, p. \pageref{sec:10}, some suffixes may occur in different positions, this is call "mobility". To deal with it, we have declared the slot containing the suffix in all the positions it may appear along the suffixes chain (see D\ref{def:29}, p. \pageref{def:29}). When a slot holds more than one suffix and only one of them is mobile, we have created a new file containing only the mobile suffix. For example, slot 17, encoded in file \texttt{slot-17.aff}, holds hither \emph{-pa-} and locative \emph{-pu-} and only \texttt{+HH} is mobile. We have created the file \texttt{slot-17M.aff} that holds the hither only, and is declared as \texttt{HH} in the script. In D\ref{def:29}, \texttt{HH} is found once alone and once together with \texttt{LOC}, as \texttt{HHLOC}, these are the two positions where it may occur; the same stands for the other mobile suffixes. In R\ref{R:34} above, also in R\ref{R:32}, p. \pageref{R:32}, there are suffixes repeated on both sides of the expression, left and right of the \texttt{?*} symbols. These are prohibition rules, interpreted as "it can not be the case that", as we have explained for R\ref{R:27}, p. \pageref{R:27}. So, "it can not be the case that \texttt{+ST} co-occurs with \texttt{+ST}, or \texttt{+PR} with \texttt{+PR}", in R\ref{R:34}. And "it can not be the case that \texttt{+REF} co-occurs with \texttt{+REF}", in R\ref{R:32}, p. \pageref{R:32}. All of this is to avoid that the same suffix may be recognised twice in a verb form, due to being declared in two different positions. These rules are also used to exclude the co-occurrence of these suffixes with different ones for grammatical or semantic reasons, e.g., R\ref{R:34} states that "it can not be the case that \texttt{+CIRC} co-occurs with \texttt{+ST}, one expresses the opposite idea of the other: circular movement / stative; or \texttt{+INT} (intensifier) with \texttt{+PR} (progressive)" . \subsubsection{Over-generation} \label{sec:51} \paragraph{} \label{tp:69} One of the problems derived from encoding homograph suffixes, or suffixes that do not phonetically realise (null suffixes \emph{Ø}) is that first ones may be mistakenly recognised, and the seconds could be virtually recognised at any position. To solve these issues we have generated some rules that do not have to do with the \emph{Mapudüngun} morphotactics, but help in preventing wrong recognition. These rules have derived from the observation of analysing results (see \nameref{tp:91}, p. \pageref{tp:91}). \begin{exercise} \label{R:35} \textbf{Forbidden null morpheme sequence occurrence} \\ \texttt{define RuPr46 [$\sim$\$["+NOM" ?* [["+OVN"{.Ø4}]|\newline["+SVN"\{.Ø4\}]|"+IMP"|["+1"\{.Ø3\}]|["+3"\{.Ø3\}]|\newline["+SG"\{.Ø2\}]|"+DS12A"]]];} \end{exercise} Rule R\ref{R:35} forbids the nominaliser which has a null form \emph{-Ø-} to be followed by other suffixes that also have a null realisation: \texttt{+OVN, +SVN, +IMP, +1, +3, +SG, +DS12A} \paragraph{Complete forms.} \label{tp:70} There is another set of eight rules that acts upon the entire verb forms when the stems are verbalised roots, complex stems, compounds or complex compounds. Some suffixes in the stem condition the entire form. \begin{exercise} \label{R:36} \textbf{nominalisation of verbalised noun} \\ \texttt{define RuPr51 [$\sim$\$[["-nn0"|"-pn0"] \$["+VRB"] \\ \$["+OVN"|"+IVN"|"+TVN"|"+AVN"|"+SVN"\\|"+CSVN"] "+ADV"]];} \end{exercise} The prohibition rule R\ref{R:36} states that a noun or proper noun once verbalised may be nominalised by any of the inflectional nominalisers but not adverbialized. Note that in this rule coexist neutralised tags belonging to the stem with non-neutralised ones that belong to suffixes chain of the verb. \subsubsection{Special roots} \label{sec:52} \paragraph{} \label{tp:71} In this section we explain how roots of \nameref{sec:19}, p. \pageref{sec:19}, and \nameref{sec:20}, p. \pageref{sec:20}, are encoded. Also, some other special cases are explained: \begin{itemize} \label{it:37} \item[] List of special roots {\fontsize{8pt}{11pt}\selectfont \item[]\texttt{["-AV""@SC01"\{.fül\_cerca\}]: \{fül\}} \item[]\texttt{["-AV""@SC01"\{.pülle\_cerca\}]: \{pülle\}} \item[]\texttt{["-IV""@SC01"\{.llekü\_acercar\}]: \{llekü\}} \item[]\texttt{["-IV""@SC02"\{.chekod\_encuclillar\}]: \{chekod\}} \item[]\texttt{["-IV""@SC02"\{.kopüd\_yacer-boca-abajo\}]: \{kopüd\}} \item[]\texttt{["-IV""@SC02"\{.kudu\_yacer\}]: \{kudu\}} \item[]\texttt{["-IV""@SC02"\{.külü\_apoyar\}]: \{külü\}} \item[]\texttt{["-IV""@SC02"\{.llikosh\_encuclillar\}]: \{llikosh\}} \item[]\texttt{["-IV""@SC02"\{.payla\_yacer-de-espalda\}]: \{payla\}} \item[]\texttt{["-IV""@SC02"\{.potrong\_inclinar-la-cabeza\}]:\{potrong\}} \item[]\texttt{["-IV""@SC02"\{.potrü\_inclinar\}]: [\{potrü\}|\{potri\}]} \item[]\texttt{["-IV""@SC02"\{.rekül\_apoyar\}]: \{rekül\}} \item[]\texttt{["-TV""@SC02"\{.ünif\_extender\}]: ["@G"[\{ünif\}|\{üñif\}]]} \item[]\texttt{["-IV""@SC02"\{.wira\_sentar-en-ancas\}]: \{wira\}} \item[]\texttt{["-IV""@SC03"\{.trem\_crecer\}]: \{trem\}} \item[]\texttt{["-TV""@SC03"\{.kim\_saber\}]: \{kim\}} \item[]\texttt{["-IV""@SC04"\{.kon\_entrar\}]: \{kon\}} \item[]\texttt{["-IV""@SC04"\{.tripa\_salir\}]: [\{tripa\}|\{chipa\}]} \item[]\texttt{["-IV""@SC05"\{.püra\_subir\}]: [\{püra\}|\{ñpüra\}]} \item[]\texttt{["-IV""@SC06"\{.müle\_estar\_vivir\}]: [\{müle\}|\{müli\}]} \item[]\texttt{["-TV""@SC06"\{.meke\_ocupar\}]: [\{mek\}"@EI"]} \item[]\texttt{["-TV""@SC06"\{.nie\_tener\}]: [\{nee\}|\{ne\}|[\{ni\}"@E0"]]} \item[]\texttt{["-IV""@SC07"\{.miaw\_merodear\}]: \{miaw\}} \item[]\texttt{["-IV""@SC08"\{.nge\_ser\_estar\}]: \{nge\}} \item[]\texttt{["-IV""@SC09"\{.pepi\_ser-capaz-de\}]: \{pepi\}} \item[]\texttt{["-IV""@SC10"\{.ru\_pasar\}]: \{ru\}} \item[]\texttt{["-IV""@FA"\{.fa\_ser-esto\}]: \{fa\}} \item[]\texttt{["-IV""@FE"\{.fe\_ser-eso\}]: \{fe\}} \item[]\texttt{["-AJ""@CF"\{.küme\_bueno\}]: \{küme\}} \item[]\texttt{["-AJ""@CF"\{.weda\_malo\}]: [\{weda\}|\{wesha\}]} \item[]\texttt{["-IV""@CF"\{.aye\_reír\}]: ["@G"\{aye\}]} \item[]\texttt{["-IV""@CF"\{.lladkü\_entristecer\_enojar\}]: \{lladkü\}} \item[]\texttt{["-IV""@CF"\{.llüka\_asustar\_temer\}]: \{llüka\}} \item[]\texttt{["-IV""@CF"\{.welu\_intercambiar\}]: \{welu\}} \item[]\texttt{["-NN""@CF"\{.lofo\_lobo\_salvaje\}]: \{lofo\}} \item[]\texttt{["-TV""@CF"\{.yewe\_avergonzar\_respetar\}]: \{yewe\}} } \end{itemize} \begin{exercise} \label{R:37} \textbf{Realisation contexts for 1\textsuperscript{st} type of defective\\ verbs} \\ \texttt{define RuVSC01 ["@SC01" =>\\ \_ \$["+CA"|"+TR"] ["+HH"|"+TH"|"+LOC"],\\ \_ ?* ["+CA"|"+ca0"|"+TR"|"+tr0"|"+ST"],\\ \_ ?* ["+HH"|"+TH"|"+LOC"]];} \end{exercise} \paragraph{Defective roots,} \label{tp:72} marked \texttt{@SC01} have three obligatory contexts of realisation. In the first possible context they have to be followed by causatives \emph{-l-}, \emph{-m-} (slot 34) or transitivizer \emph{-tu-} (slot 33), which in turn have to co-occur with hither \emph{-pa-}, locative \emph{-pu-} (slot 17), or thither \emph{-me-} (slot 20). In the second possible context for roots tagged \texttt{@SC01}, they have to be followed by causatives \emph{-l-}, \emph{-m-} (slot 34), transitivizer \emph{-tu-} (slot 33) or stative \emph{-le-} (slot 28). Note that in this second context is found the neutralised tag for causative \texttt{+ca0} and transitivizer \texttt{+tr0}, this is because the rule also applies when these roots form a complex stem or a complex compound stem: \begin{example} \label{ex:208} [Smeets, I. 2008: 316 (5)] \cite{RefB:21}\\ \emph{fül-\textbf{üm}-tuku-fi-n} 'I put it closer to' \\ \texttt{-AV.fül\_cerca+CA.m34-TV.tuku\_poner-CR.TV\\+EDO.fi6+IND1SG.n3} \end{example} In the third possible context, these roots must co-occur with hither \emph{-pa-}, locative \emph{-pu-} (slot 17), or thither \emph{-me-} (slot 20): \begin{example} \label{ex:209} [Smeets, I. 2008: 419 (46)] \cite{RefB:21}\\ \emph{pülle-\textbf{pu}-el} 'going to a near place' \\ \texttt{-AV.pülle\_cerca+VRB.Ø36+LOC.pu17+OVN.el4}\\ \end{example} \begin{exercise} \label{R:38} \textbf{Realisation contexts for 2\textsuperscript{nd} type of defective\\ verbs} \\ \texttt{define RuVSC02 ["@SC02" =>\\ \_ ?* ["-CR.IV"|"-CR.TV"],\\ \_ ?* ["+ST"|"+PRPS"|"+PFPS"|"+LOC"|\{.no10\}|\\"+NRLD"]] .o.\\ $\sim$\$["@SC02" ?* ["-CR.IV"|"-CR.TV"]\\ ?* ["+ST"|"+PRPS"|"+PFPS"]];} \end{exercise} Roots tagged \texttt{@SC02} have different contexts of realisation too, but they also have forbidden contexts, this is why R\ref{R:38} is a concatenation of two rules. The first rule treats \texttt{@SC02} roots in compounds, when this roots are before tags \texttt{-CR.IV, -CR.TV} is because they form part of a compound, \texttt{-CR} stands for "compound root": \begin{example} \label{ex:210} [Smeets, I. 2008: 522 (\emph{külü-})] \cite{RefB:21}\\ \emph{\textbf{külü-ru}-pa-n antü} 'when the sun is going down' \\ \texttt{-IV.külü\_apoyar-IV.ru\_pasar-CR.IV+HH.pa17\\+PVN.n4 -NN.antü\_sol} \end{example} The second context, obligatorily places \texttt{@SC02} roots together with stative \emph{-le-} (slot 28), progressive persistent \emph{-nie-} or perfect persistent \emph{-künu-} (slot 32), locative \emph{-pu-} (slot 17), negation for conditional \emph{-no-} (slot 10) or non-realised situation \emph{-a-} (slot 9): \begin{example} \label{ex:211} [Smeets, I. 2008: 281] \cite{RefB:21}\\ \emph{\textbf{rekül-künu}-w-üy} 'then, he leaned over' \\ \texttt{-IV.rekül\_apoyar+PFPS.künu32+REF.w31\\+IND.y4+3.Ø3} \end{example} The concatenated prohibition rule states that \texttt{@SC02} roots can not be part of a compound and form a verb taking the suffixes stative \emph{-le-} (slot 28), progressive persistent \emph{-nie-} or perfect persistent \emph{-künu-} (slot 32). \begin{exercise} \label{R:39} \textbf{Realisation contexts for 1\textsuperscript{st} type of compounded defective verbs} \\ \texttt{define RuVSC03 ["@SC03" ?* "@SC05"] =>\\ \_ ?* ["+TH"|"+HH"];} \end{exercise} R\ref{R:39} obliges compounds made with \texttt{@SC03} and \texttt{@SC05} roots to occur together with markers for thither \emph{-me-} (slot 20) or hither \emph{-pa-} (slot 17): \begin{example} \label{ex:212} [Smeets, I. 2008: 262 (9)] \cite{RefB:21}\\ \emph{\textbf{kim-püra-me-pa}-n} 'there I realised' \\ \texttt{-TV.kim\_saber-IV.püra\_subir-CR.IV\\+TH.me20+HH.pa17}\footnote{In this example both suffixes appear, but only one is obligatory.}\texttt{+IND1SG.n3} \end{example} \begin{example} \label{ex:213} [Smeets, I. 2008: 381 (1)] \cite{RefB:21}\\ \emph{\textbf{kim-püra-me}-n} 'I came to appreciate' \\ \texttt{-TV.kim\_saber-IV.püra\_subir-CR.IV+TH.me20\\+IND1SG.n3} \end{example} \begin{exercise} \label{R:40} \textbf{Realisation contexts for 3\textsuperscript{rd} type of defective\\ verbs} \\ \texttt{define RuVSC04\\ $\sim$\$["@SC06" ?* ["+ST"|"+PR"|"+PRPS"|"+PFPS"]];} \end{exercise} Prohibition rule R\ref{R:40} forbids roots tagged \texttt{@SC06} to take suffixes stative \emph{-le-} or progressive \emph{-meke-} (slot 28), progressive persistent \emph{-nie-} or perfect persistent \emph{-künu-} (slot 32). \begin{exercise} \label{R:41} \textbf{Realisation contexts for 4\textsuperscript{th} type of defective\\ verbs} \\ \texttt{define RuVSC05 $\sim$\$["@SC07" ?* ["+CIRC"|"+ST"|\\"+PR"|"+PRPS"|"+PFPS"]];} \end{exercise} Prohibition rule R\ref{R:41} forbids roots tagged \texttt{@SC07} to take suffixes of circular movement \emph{-iaw-} (slot30), stative \emph{-le-} or progressive \emph{-meke-} (slot 28), progressive persistent \emph{-nie-} or perfect persistent \emph{-künu-} (slot 32). \begin{exercise} \label{R:42} \textbf{Realisation contexts for verb \emph{nge-} 'to be'} \\ \texttt{define RuVSC06 ["@SC08" => \_ ?* ["+CA"|"+TR"],\\ \_ ?* ["+HH"|"+TH"],\\ \_ ?* "+NEG"] .o.\\ $\sim$\$["@SC08"?*["+HH"|"+TH"]?*["+NEG"\{.la10\}]];} \end{exercise} R\ref{R:42} is another rule made by composition, the first sub-rule defines the contexts where the verb root \emph{nge-} 'to be / to have' must happen. The first context for this root, tagged \texttt{@SC08}, demands it to be followed either by \texttt{+CA} causative (slot 34) \emph{-l-} or \emph{-m-}, or by \texttt{+TR} transitivizer (slot 33) \emph{-tu-}: \begin{example} \label{ex:214} [Smeets, I. 2008: 126 (28)] \cite{RefB:21}\\ \emph{\textbf{nge-l-me}-fi-ñ} 'I have taken them' \\ \texttt{-IV.nge\_ser+CA.l34+TH.me20}\footnote{The obligatory suffixes of this and next rule co-occur in this verb, which is another possible context.}\texttt{+EDO.fi6+IND1SG.n3} \end{example} The second possible context for \emph{nge-} makes it occur with hither \emph{-pa-} (slot 17) or thither \emph{-me-} (slot 20): \begin{example} \label{ex:215} [Smeets, I. 2008: 231 (1)] \cite{RefB:21}\\ \emph{\textbf{nge-me}-fu-n} 'I was there' \\ \texttt{-IV.nge\_ser+TH.me20+IPD.fu8+IND1SG.n3} \end{example} \begin{example} \label{ex:216} [Smeets, I. 2008: 534 (\emph{mungel})] \cite{RefB:21}\\ \emph{\textbf{nge-pa}-yaw-ki-y-m-i} 'You were hanging around here' \\ \texttt{-IV.nge\_ser+HH.pa17+CIRC.iaw30+CF.ke14\\+IND.y4+2.m3+SG.i2} \end{example} The last possible context for \emph{nge-} says that it must be followed by a negation marker, slot 10. This rule may be read as an exception for the previous rules: \emph{nge-} must be followed by \emph{-l-}, \emph{-m-}, \emph{-tu-}, \emph{-pa-} or \emph{-me-}, except when it takes a negation suffix, making previous suffixes optional: \begin{example} \label{ex:217} [Smeets, I. 2008: 407 (17)] \cite{RefB:21}\\ \emph{\textbf{nge}-ke-\textbf{la}-fu-y} 'they were not' \\ \texttt{-IV.nge\_ser+CF.ke14+NEG.la10+IPD.fu8\\+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:218} [Smeets, I. 2008: 194 (64)] \cite{RefB:21}\\ \emph{\textbf{nge-nu}-n} 'there was not' \\ \texttt{-IV.nge\_ser+NEG.no10+PVN.n4} \end{example} Finally, the prohibition concatenated rule for \emph{nge-} 'to be' prevents its co-occurrence with \texttt{+HH}, \texttt{+TH} and the negation for indicative \emph{-la-}. \begin{exercise} \label{R:69} \textbf{Realisation contexts for verb \emph{pepi-} 'to be able to'} \\ \texttt{define RuVSC07 ["@SC09" =>\\ \_ ?* [["+CA"\{.ül34\}]|"+FAC"]];} \end{exercise} The root \emph{pepi-} 'to be able to' in a single root stem must always be followed by \emph{-l-} causative form or by factitive \emph{-ka-}: \begin{example} \label{ex:219} [Smeets, I. 2008: 402 (45)] \cite{RefB:21}\\ \emph{\textbf{pepi-ka}-w-ün} 'the setting of preparations' \\ \texttt{-TV.pepi\_poder-hacer+FAC.ka33+REF.w31+PVN.n4} \end{example} \begin{example} \label{ex:220} [Smeets, I. 2008: 545 (\emph{pepi})] \cite{RefB:21}\\ \emph{\textbf{pepi-l}-fal-la-y} 'it can not be done' \\ \texttt{-TV.pepi\_poder-hacer+CA.l34+FORCE.fal25\\+NEG.la10+IND.y4+3.Ø3} \end{example} \begin{exercise} \label{R:44} \textbf{Realisation contexts for verb \emph{ru-} 'to go through'} \\ \texttt{define RuVSC08 ["@SC10" =>\\ \_ ?* ["+HH"|"+hh0"|"+TH"|"th0"]];} \end{exercise} Root \emph{ru-} 'to go through' does not occur without direction markers \emph{-me-} (thither slot 20) or \emph{-pa-} (hither slot 17), even in complex stems or compounds. \begin{example} \label{ex:221} [Smeets, I. 2008: 247 (3)] \cite{RefB:21}\\ \emph{amu-\textbf{ru-me}-y mawün-mew} 'he went through the rain' \\ \texttt{-IV.amu\_ir-IV.ru\_pasar-CR.IV+TH.me20\\+IND.y4+3.Ø3\\-NN.mawün\_lluvia+INST.mew} \end{example} \begin{example} \label{ex:222} [Smeets, I. 2008: 515 (\emph{kata-})] \cite{RefB:21}\\ \emph{kata-\textbf{ru}-l-\textbf{me}-y} 'it pierced through' \\ \texttt{-TV.kata\_perforar-IV.ru\_pasar-CR.IV\\+CA.l34+TH.me20+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:223} [Smeets, I. 2008: 555 (\emph{ru-})] \cite{RefB:21}\\ \emph{külü-\textbf{ru-pa}-n antü} 'after noon' \\ \texttt{-IV.külü\_apoyar-IV.ru\_pasar-CR.IV\\+HH.pa17+PVN.n4} \end{example} \begin{example} \label{ex:224} [Smeets, I. 2008: 462 (63)] \cite{RefB:21}\\ \emph{\textbf{ru}-l-\textbf{pa}-antü-le-y-iñ} 'we spent the day' \\ \texttt{-IV.ru\_pasar+CA.l34+HH.pa17-NN.antü\_día-CR.IV\\+ST.le28+IND.y4+1.Ø3+PL.iñ2} \end{example} \paragraph{Deictic roots.} \label{tp:73} See section \ref{sec:19}, p. \pageref{sec:19}. Root \emph{fa-} is tagged \texttt{@FA} and root \emph{fe-} is tagged \texttt{@FE}, this allow us to apply rules that verbs formed from these roots require. \begin{exercise} \label{R:45} \textbf{Realisation contexts for deictic verbs} \\ \texttt{define RuVSC09 ["@FA" => \_ ?* ["+CA"|"+ST"]]\\ .o. ["@FE" => \_ ?* ["+CA"|"+ST"],\\ \_ \$["+IND"] "+3"];} \end{exercise} R\ref{R:45} states that verbs containing \emph{fa-} 'to be like this' or \emph{fe-} 'to be like that' must also contain causative suffixes \mbox{\emph{-l-}}, \emph{-m-}, or stative suffix \emph{-le-}. However, verbs derived from \emph{fe-} do not obligatory fit this rule when they end in \emph{-y} which corresponds to indicative mood, 3\textsuperscript{rd} person (see examples E\ref{ex:67} to E\ref{ex:72}, p. \pageref{ex:67}). \paragraph{Verbs with causative and factitive.} \label{tp:74} Finally, there is a number of verbs, which roots are tagged \texttt{@CF}, that "do not take the causative suffix \emph{-l-} \texttt{+CA} (slot 34) without simultaneously taking the factitive morpheme \emph{-ka-} \texttt{+FAC} (slot 33)" [Smeets, I. 2008: 301] \cite{RefB:21}: \begin{exercise} \label{R:46} \textbf{Realisation contexts for deictic verbs occurring with causative} \\ \texttt{define RuVSC10 [["@CF" ?*[["+CA"|"+ca0"]{.l34}]]\\ => \_ ?* ["+FAC"|"+fac0"]];} \end{exercise} R\ref{R:46} do not force roots marked \texttt{@CF} to be followed by causative suffix, instead, it states that the sequence "\mbox{\texttt{@CF}\emph{-l-}}" must co-occur with factitive \emph{-ka-}. All of this may be read as "if a \texttt{@CF} root is followed by \texttt{+CA} it must also follows \texttt{+FAC}. This rule also covers complex stems an complex compounds by means of "neutralised" tags (see \nameref{tp:53}, p. \pageref{tp:53}): \begin{example} \label{ex:225} [Smeets, I. 2008: 66 (42)] \cite{RefB:21}\\ \emph{\textbf{küme}-y} 'it is good' \\ \texttt{-AJ.küme\_bueno+VRB.Ø36+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:226} [Smeets, I. 2008: 255 (3)] \cite{RefB:21}\\ \emph{\textbf{küme-l-ka}-le-tu-n} 'I am well' \\ \texttt{-AJ.küme\_bueno+VRB.Ø36+CA.l34+FAC.ka33\\+ST.le28+RE.tu16+IND1SG.n3} \end{example} \begin{example} \label{ex:227} [Smeets, I. 2008: 349 (17)] \cite{RefB:21}\\ \emph{\textbf{llüka}-le-n} 'I am afraid' \\ \texttt{-IV.llüka\_temer+ST.le28+IND1SG.n3} \end{example} \begin{example} \label{ex:228} [Smeets, I. 2008: 375 (25)] \cite{RefB:21}\\ \emph{\textbf{llüka-l-ka}-che-ke-y} 'he frightens people' \\ \texttt{-IV.llüka\_asustar+CA.l34+FAC.ka33\\-NN.che\_persona-CR.IV+CF.ke14+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:229} [Smeets, I. 2008: 572 (\emph{welu\textsuperscript{2}})] \cite{RefB:21}\\ \emph{ti lifru \textbf{welu}-y} 'the book was exchanged' \\ \texttt{-AP.ti\_el -NN.lifru\_libro\\-IV.welu\_intercambiar+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:230} [Smeets, I. 2008: 572 (\emph{welu\textsuperscript{2}})] \cite{RefB:21}\\ \emph{\textbf{welu-l-ka}-ñma-fi-ñ} 'I exchanged it' \\ \texttt{-IV.welu\_intercambiar+CA.l34+FAC.ka33\\+IO.ñma26+EDO.fi6+IND1SG.n3} \end{example} \section{Beyond "A grammar of \emph{Mapuche}"} \label{sec:53} \paragraph{} \label{tp:75} "A grammar of \emph{Mapuche}" [Smeets, I. 2008] \cite{RefB:21}, our development base, describes the central \emph{Mapuche} dialect. We have added into the analyser words that are not in Smeets' work. Compounds that she have not found throughout her study but some other authors mention. Also some minor dialectal variations. \subsection{The spelling unifier} \label{sec:54} \paragraph{} \label{tp:76} There is a significant variation in \emph{Mapudüngun} spelling, mainly due to the existence of different spelling proposals, together with the strong influence of Spanish orthography. Some texts may present a mixture of these orthographic proposals along with Castilianized orthography. This is something to sort out before analysing a text, either with rule based analysers or statistical ones, because the divergence in input means more rules for the first ones and poor results for the second ones. The task of the unifier is to replace characters; from a series of possible inputs, a single output is returned. This process is called "unification". Initially, the idea was to change different graphemic proposals for the \emph{Mapuche} language into one single spelling. But the strong influence of Spanish orthography in written \emph{Mapudüngun} was noticed along the way. Therefore, the final implementation reflects mainly this fact, including anyway a couple of rules related to some of the graphemic proposals. This process is embedded in the analyser. \emph{Mapudüngun} vowels should not have accentuation marks, if there is any, it is transformed into its non accentuated version: \begin{quote} \label{note:06} {\small á → \emph{a}, é → \emph{e}, etc.} \end{quote} The morphological analysis is performed on words in lowercase letters. The unifier section makes the main FST interpret every uppercase letter as a lowercase one, which does not mean it gives a lowercase output, as it is demonstrated below: \begin{quote} \label{note:07} {\small \emph{Kasinta} → ‑PN.Kasinta\_Jacinta} \end{quote} Other changes are: \begin{quote} \label{note:08} {\small b → \emph{f}\\ ca → \emph{ka}, co → \emph{ko}, cu → \emph{ku}\\ ce → \emph{se}, ci → \emph{si}\\ gue → \emph{ge}, gui → \emph{gi}\\ hua → \emph{wa}, hue → \emph{we}, hui → \emph{wi}, huo → \emph{wo}, huu → \emph{wu}, when \emph{h} is not preceded by \emph{c}\\ ha → \emph{a}, he → \emph{e}, hi → \emph{i}, ho → \emph{o}, hu → \emph{u} when \emph{h} is not preceded by \emph{c} (\emph{che})\\ j → \emph{k}, qu → \emph{k}\\ v → \emph{ü} when v is between consonants or semivowels, v → \emph{f} otherwise\\ q → \emph{g} when q is not followed by u\\ tx → \emph{tr}, x → \emph{tr}\\ z → \emph{d}} \end{quote} From all these changes, only the last three and the first part of the fourth backwards (v into \emph{ü}) do not have to do with Spanish but with some graphemic proposal for \emph{Mapudüngun}. The \emph{Mapuche} alphabet we encode has twenty-five graphemes, five of which are digraphs. There are six vowels, three semivowels and seventeen consonants: \begin{quote} \label{note:09} {\small \emph{a, ch, d, e, f, g, i, k, l, ll, m, n, ng, ñ, o, p, r, s, sh, t, tr, u, ü, w, y}} \end{quote} There are additional graphemes that we accept for analysis, which belong to other graphemic proposals for \emph{Mapudüngun} or to Spanish: \begin{quote} \label{note:10} {\small b, c, h, j, l', n', q, t', tx, x, v, z} \end{quote} \subsection{Lexicon} \label{sec:55} \paragraph{} \label{tp:77} We have augmented our lexicon mostly from Augusta's dictionaries \cite{RefB:03}. But not only new words have been introduced, also many variants to the already collected words from Smeets, do not forget that \emph{Mapudüngun} spelling is not fixed yet. But what most variants generates are the differences in pronunciation of some sounds, for instance, final \emph{-n} is usually interchanged by final \emph{-ñ}; \emph{ü} in any positions is commonly interchanged with \emph{u, i} and sometimes \emph{e}, or the other way around; \emph{tr} with \emph{ch}, \emph{d} with \emph{s}, etc., see table \ref{tab:09}\footnote{Spaces with a dash in Smeets' column of table \ref{tab:09} mean the introduction of a new term not found in her work.} for some examples: \begin{table}[htb] \caption{Spelling variants in lexicon} \label{tab:09} \begin{tabular}{|c|c|c|c|} \hline\noalign{\smallskip} PoS & Smeets & Variant & Meaning \\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{-AJ} & \emph{arke\textbf{n}} & \emph{arke\textbf{ñ}} & evaporated\\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{-AJ} & \emph{kol\textbf{ü}$\sim$koll\textbf{ü}} & \emph{kol\textbf{i}$\sim$koll\textbf{i}} & \makecell{brown, reddish brown,\\beige}\\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{-AJ} & - & \emph{liuke} & clean, clear, pure (water)\\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{-AV} & \emph{ki\textbf{s}u$\sim$ki\textbf{sh}u} & \emph{ki\textbf{d}u} & alone, self, own\\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{-AV} & - & \emph{kashill} & near\\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{-AV} & \emph{küt\textbf{u}} & \emph{küt\textbf{o}} & even, also\\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{-IV} & - & \emph{yawa} & make noise\\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{-IV} & \emph{w\textbf{i}tra} & \emph{w\textbf{ü}tra} & get up\\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{-IV} & \emph{cheko\textbf{d}$\sim$lliko\textbf{sh}} & \emph{lliko\textbf{d}} & \makecell{to squat,\\to sit down on one's heels}\\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{-NN} & \emph{achaw\textbf{all}} & \makecell{\emph{achaw}$\sim$\\ \emph{achaw\textbf{üll}}} & chicken\\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{-NN} & \emph{chaf\textbf{o}} & \emph{chaf\textbf{a}} & cough, catarrh, cold \\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{-NN} & - & \makecell{\emph{da\textbf{g}llu}$\sim$\\ \emph{da\textbf{w}llu}} & river shrimp\\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{-TV} & \emph{in\textbf{g}ka} & \emph{inka} & to defend \\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{-TV} & - & \makecell{\emph{kedi\textbf{n}}$\sim$\\ \emph{kedi\textbf{ñ}}} & to shear \\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{-TV} & \emph{\textbf{ü}trüf} & \emph{\textbf{i}trüf} & to throw \\ \noalign{\smallskip}\hline \end{tabular} \end{table} \subsection{\emph{Williche} verb forms} \label{sec:56} \paragraph{} \label{tp:78} "In \emph{Williche}\footnote{\texttt{-NN.willi\_sur-NN.che\_persona} 'Southern people'}, the southernmost dialect of \emph{Mapudüngun}, transitive verbs expressing the 1 → 2 relationship (with a total number of participants greater than two) is indicated by the combination of \emph{-e-} and a second person subject marker in slot 3 (Mösbach 1962: 80, and Augusta 1903: 84–86 (cited by Salas 1979a: 307)), e.g. \emph{pe-e-y-m-i} 'I saw you (sg)', \emph{pe-e-y-m-u} 'I saw you (dl)'; \emph{pe-e-y-m-ün} 'I saw you (pl)'" [Smeets, I. 2008: 160] \cite{RefB:21}. This very same relations are included in a single form of central \emph{Mapudüngun} when participants are more than two \texttt{+1A.w23+IND.y4+1.Ø3+PL.iñ2}, which may be disambiguated by means of personal or possessive pronouns. But Smeets also gives as example \emph{pe-e-y-m-i} 'I saw you (sg)' which are actually two participants, central \emph{Mapudüngun} and \emph{Williche} also differ in this form. Note that \emph{Williche} forms are ended by the null morpheme of dative subject \texttt{+DS12A} demanded by the \texttt{+IDO} marker \emph{-e-}, see the following examples to compare: \begin{example} \label{ex:231}\ central \emph{Mapudungün} 1s → 2s [Smeets, I. 2008: 157 (20)] \cite{RefB:21}\\ \emph{pe-\textbf{e}-y-\textbf{u}} 'I see you (sg)' \\ \texttt{-TV.pe\_ver+IDO.e6+IND.y4+1.Ø3+DL.u2+DS12A.Ø1} \end{example} \begin{example} \label{ex:232}\ \emph{Williche} 1s → 2s [Smeets, I. 2008: 160] \cite{RefB:21}\\ \emph{pe-\textbf{e}-y-\textbf{m-i}} 'I see you (sg)' \\ \texttt{-TV.pe\_ver+IDO.e6+IND.y4+2.m3+SG.i2+DS12A.Ø1} \end{example} \begin{example} \label{ex:233}\ central \emph{Mapudungün} 1 → 2 (more than two participants) [Smeets, I. 2008: 572 ()] \cite{RefB:21}\\ \emph{kellu-\textbf{w}-y-\textbf{iñ}} 'I helped you (d/p), we (d/p) helped you (s/d/p)' \\ \texttt{-NN.kellu\_ayuda+VRB.Ø36\\+1A.w23+IND.y4+1.Ø3+PL.iñ2} \end{example} \begin{example} \label{ex:234}\ \emph{Williche} 1s → 2d [Smeets, I. 2008: 160] \cite{RefB:21}\\ \emph{pe-\textbf{e}-y-\textbf{m-u}} 'I see you (dl)' \\ \texttt{-TV.pe\_ver+IDO.e6+IND.y4+2.m3+DL.u2+DS12A.Ø1} \end{example} \begin{example} \label{ex:235}\ \emph{Williche} 1s → 2p [Smeets, I. 2008: 160] \cite{RefB:21}\\ \emph{pe-\textbf{e}-y-\textbf{m-ün}} 'I see you (pl)' \\ \texttt{-TV.pe\_ver+IDO.e6+IND.y4+2.m3+PL.ün2+DS12A.Ø1} \end{example} Rules generated for central \emph{Mapudüngun} correctly analyse the \emph{Williche} form \emph{pe-e-y-m-u} 'I saw you (dl)'. For the other two forms we had to change two rules in the system, compare: \begin{exercise} \label{R:47} \textbf{Central \emph{Mapudüngun} imperative/plural form} \\ \texttt{define RuPr06 $\sim$\$[["+IMP1SG"|"+PL"] ?* \newline [["+DS3A"\{.ew1\}]|"+DS12A"]]} \end{exercise} \begin{exercise} \label{R:48} \textbf{\emph{Williche} imperative/plural form} \\ \texttt{define RuPr06 $\sim$\$[["+IMP1SG"|"+PL"] ?* \newline ["+DS3A"{.ew1}]] .o. $\sim$\$["+IMP1SG" ?* "+DS12A"];} \end{exercise} In central \emph{Mapudüngun}, the plural \texttt{+PL} \emph{-ün-} can not be followed by the dative subject for 1\textsuperscript{st} or 2\textsuperscript{nd} person agent \emph{-Ø-}. On the contrary, it is necessary in the \emph{Williche} dialect, and correctly analysed as shown in E\ref{ex:235}. \begin{exercise} \label{R:49} \textbf{Central \emph{Mapudüngun} dative subject occurrence} \\ \texttt{define RuPr12 $\sim$\$[["+EDO"|"+PVN"|"+TVN"\\|["+SG"\{.i2\}]] ?* ["+DS3A"|"+DS12A"]]} \end{exercise} \begin{exercise} \label{R:50} \textbf{\emph{Williche} dative subject occurrence} \\ \texttt{define RuPr12 $\sim$\$[["+EDO"|"+PVN"|"+TVN"\\|["+SG"\{.i2\}]] ?* "+DS3A"] .o. \\ $\sim$\$[["+EDO"|"+PVN"|"+TVN"] ?* "+DS12A"]} \end{exercise} As in the previous case, in central \emph{Mapudüngun}, the singular \texttt{+SG} \emph{-i-} can not be followed by the dative subject for 1\textsuperscript{st} or 2\textsuperscript{nd} person agent \emph{-Ø}. Which is also necessary in the \emph{Williche} dialect, and correctly analysed as shown in E\ref{ex:232}. \subsection{Following Zúñiga} \label{sec:57} \paragraph{} \label{tp:79} Even though Zúñiga seems to base "\emph{Mapudüngun}. El habla \emph{mapuche}" [Zúñiga, F. 2006] \cite{RefB:24} in central \emph{Mapudüngun}, texts included in his work present some variations respect Smeets. We have included these divergence in the analyser. \subsubsection{Different indicative form} \label{sec:58} \paragraph{} \label{tp:80} "The mark for indicative mood is \emph{-i-}. It appears as a vowel if the root ends in a consonant, as a semivowel \emph{-y-} if the root ends in a vowel other than \emph{i-}, and it does not appear if the root ends in \emph{i-}"\footnote{Translation is ours, the original is in Spanish} [Zúñiga, F. 2006: 105] \cite{RefB:24}. Instead of the "root ending", it should be said "the preceding sound", because this one may actually belong to the root, but also to a previous suffix. We have found that it realises as \emph{-i-} after semivowel too (E\ref{ex:237}); and is a null suffix when found either preceded or followed by \emph{i} (E\ref{ex:239}). In Smeets work, the indicative is either \emph{-y-} after vowel or semivowel, or \emph{-üy-} after consonant; there is a \emph{-iy-} variant for the later. To treat the variant presented by Zúñiga, we have added an \texttt{@IZ} tag to the already existent encoding of \texttt{+IND} suffix, D\ref{def:30}. And added a new rule to deal with contexts of conversion of the intermediate representation \texttt{@IZ} (R\ref{R:51}): \begin{definition} \label{def:30} \texttt{["+IND"\{.y4\}]: [[["@ÜI"|"@Ü"]y]|"@IZ"]} \end{definition} \begin{exercise} \label{R:51} \textbf{Zúñiga's indicative form} \\ \texttt{define RuIndZu ["@IZ" -> 0 || i \_ , \_ i]\\ .o. ["@IZ" -> i];} \end{exercise} D\ref{def:30} encodes indicative mood suffix, we have introduced the \texttt{@IZ} tag to treat Zúñiga's variant. Preceding this new tag is the suffix as Smeets presents it (E\ref{ex:238}). \texttt{@Ü} is for \mbox{"\texttt{CON}-\emph{üy-}"}, "\texttt{VOW|SVW}-\emph{y-}"; \texttt{@ÜI} is for "\texttt{CON}-\emph{iy-}". R\ref{R:51} defines, by context, the form \texttt{@IZ} should take, transforming it always into \emph{i}, except when occurs either before (E\ref{ex:239}) or after (E\ref{ex:240}) \emph{i}, in which case it is transformed into \emph{0}, acting as a null suffix. Otherwise, the tag remains until the end of the process, when it is cleared out (E\ref{ex:236}, E\ref{ex:237} and E\ref{ex:238}). \begin{example} \label{ex:236} [Zúñiga, F. 2006: 105 (Cuadro III-3a / 2\textsuperscript{a})] \cite{RefB:24}\\ \emph{kon-\textbf{i}-m-i} 'you enter' \\ \texttt{-IV.kon\_entrar+IND.y4+2.m3+SG.i2} \end{example} \begin{example} \label{ex:237} [Zúñiga, F. 2006: 283 (\emph{pewma})] \cite{RefB:24}\\ \emph{chum-yaw-\textbf{i-m}-i} 'what are you doing around?' \\ \texttt{-QC.chum\_cómo+VRB.Ø36+CIRC.iaw30\\+IND.y4+2.m3+SG.i2} \end{example} \begin{example} \label{ex:238} [Zúñiga, F. 2006: 105 (Cuadro III-3b / 2\textsuperscript{a})] \cite{RefB:24}\\ \emph{tripa-\textbf{y}-m-i} 'you leave' \\ \texttt{-IV.tripa\_salir+IND.y4+2.m3+SG.i2} \end{example} \begin{example} \label{ex:239} [Zúñiga, F. 2006: 227 (84)] \cite{RefB:24}\\ \emph{amu-a-iñ} 'let us go' \\ \texttt{-IV.amu\_ir+NRLD.a9+IND.Ø4+1.Ø3+PL.iñ2} \end{example} \begin{example} \label{ex:240} [Zúñiga, F. 2006: 105 (Cuadro III-3c / 2\textsuperscript{a})] \cite{RefB:24}\\ \emph{pi-m-i} 'you say' \\ \texttt{-TV.pi\_decir+IND.Ø4+2.m3+SG.i2} \end{example} \subsubsection{Glottal stop before \texttt{+IDO}} \label{sec:59} \paragraph{} \label{tp:81} When the internal direct object \emph{-e-} is preceded by \emph{a-}, there is an optional epenthesis of a glottal stop in between, reflected as \emph{-g-} in spelling. As there is already a rule that treat glottal stop epenthesis in compounds where the second root starts in vowel. We just added the appropriate tag \texttt{@G} to the \texttt{+IDO} suffix, D\ref{def:31} (see E\ref{ex:116}, E\ref{ex:117}, E\ref{ex:118}, R\ref{R:01} and R\ref{R:02}, p. \pageref{R:01}): \begin{definition} \label{def:31} Encoding of the \texttt{+IDO} suffix\\ \texttt{["+IDO"\{.e6\}]: ["@G""@ID"]} \end{definition} \begin{example} \label{ex:241} [Zúñiga, F. 2006: 274 (56)] \cite{RefB:24}\\ \emph{kulli-\textbf{a-g-e}-y-u} 'I will pay you both' \\ \texttt{-TV.kulli\_pagar+NRLD.a9+IDO.e6\\+IND.y4+1.Ø3+DL.u2+DS12A.Ø1} \end{example} \begin{example} \label{ex:242} [Zúñiga, F. 2006: 279 (109)] \cite{RefB:24}\\ \emph{elu-tu\textbf{a-g-e}-n} 'give it back to me' \\ \texttt{-TV.elu\_dar+RE.tu16+NRLD.a9+IDO.e6\\+IND1SG.n3+DS12A.Ø1} \end{example} \begin{example} \label{ex:243} [Zúñiga, F. 2006: 130 (note 10)] \cite{RefB:24}\\ \emph{elu-\textbf{la-g-e}-n} 'you did not give me' \\ \texttt{-TV.elu\_dar+NEG.la10+IDO.e6+IND1SG.n3+DS12A.Ø1} \end{example} \subsubsection{Nominal compounds} \label{sec:60} \paragraph{} \label{tp:82} We have only explained the \emph{Mapuche} verb throughout this article. We have not introduced the nominal forms as such, but as one of the possible verbal stems. Nominal forms are much more simpler than the verbal ones. We do not want to make this article too extensive adding encoding details that are well explained with the verb form, it is suffice to say that there is nominal compounding in \emph{Mapudüngun}. Zúñiga defines \emph{püle} 'by, towards' as a post-position [Zú-ñiga, F. 2006: 195] \cite{RefB:24}. Smeets defines it as a post-position too, 'side'; but also as a noun [Smeets, I. 2008: 69 (10.4)] \cite{RefB:24}, which is how we have incorporated \emph{püle} 'side, direction' into our lexicon. Even classifying \emph{püle} as a post-position, in many occasions this word forms compounds in Zúñiga's texts, which are not recognised by the Smeets derived rules of the analyser. \begin{exercise} \label{R:52} \textbf{Nominal compound (\emph{püle})} \\ \texttt{define formCXNN\newline [[\%<[DEMPR|IVROOT|INTPR]\%\# \%<NROOT\%\#]"-CNN"];\\ define preCXNN\newline [\_eq(formCXNN, \%< , \%\#)];\\ define RuleCXNN1\newline ["-NN" => ["@TYA"|"@FA"|"@T"] ?* \_ ];\\ define CXNN\newline [CLEANu .o. RuleCXNN1 .o. \\ formCXNN - RuleCXNN1 .o. CLEANNVFd];} \end{exercise} The mechanism for compounding was already explained at \nameref{tp:52}, p. \pageref{tp:52}, so here we add that in R\ref{R:52} the form of these nominal compounds is defined as having a first member that may be a demonstrative pronoun, an intransitive verb or an interrogation pronoun. \texttt{RuleCXNN1} specifies which forms, out of these categories, are actually accepted to form the compound with the noun as a second member. The specific forms has been tagged to filter them out, \texttt{@TYA, @FA}\footnote{The verb root tagged \texttt{@FA} is also identified as a deictic verb with the same tag (see \nameref{tp:73}, p. \pageref{tp:73}).} and \texttt{@T} respectively; actually, only one member of each category is tagged. In the examples we show compounds that are not recognised following Smeets, compounds that take \emph{püle} as a second member (In Smeets, \emph{püle} may be the second noun in a nominal compound): \begin{example} \label{ex:244} [Zúñiga, F. 2006: 275 (65)] \cite{RefB:24}\\ \emph{fa-püle} 'around here' \\ \texttt{-IV.fa\_ser-esto-NN.püle\_lugar} \end{example} \begin{example} \label{ex:245} [Zúñiga, F. 2006: 191 (Cuadro III-17)] \cite{RefB:24}\\ \emph{kañ}\footnote{This is an epenthetic \emph{ñ}.}\emph{-püle} 'somewhere else' \\ \texttt{-AJ.ka\_otro-NN.püle\_lugar}\footnote{There is a colloquial expression in Chile, 'salta pal lao' which means something like 'I don't believe you', 'are you kidding', 'you better not...', depending on the situation. \emph{Payllafilu} says that this expression is equivalent to \emph{kañpüle} in \emph{Mapudüngun}.} \end{example} \begin{example} \label{ex:246} [Zúñiga, F. 2006: 273 (49)] \cite{RefB:24}\\ \emph{tie-püle} 'over there' \\ \texttt{-DP.tüye\_aquel-de-allá-NN.püle\_lugar} \end{example} \begin{example} \label{ex:247} [Zúñiga, F. 2006: 182 (95.d)] \cite{RefB:24}\\ \emph{tuchi-püle} 'wherever' \\ \texttt{-IP.chuchi\_qué\_cuál-NN.püle\_lugar} \end{example} \begin{example} \label{ex:248} [Zúñiga, F. 2006: 275 (67)] \cite{RefB:24}\\ \emph{üye-püle} 'over there' \\ \texttt{-AV.üye\_allí\_allá-NN.püle\_lugar} \end{example} \paragraph{Augusta's nominal compound.} \label{tp:83} Another nominal compound integrated into the analyser was found in Augusta, F. \cite{RefB:03}. It has a numeral as first member and a noun as second member: \begin{example} \label{ex:249} [Augusta, F. (\emph{epuange})] \cite{RefB:24}\\ \emph{epu-ange} 'two faces\footnote{Two faces, (be of) two faces, a designation of a \emph{wekufü} which owns the sea or lake and is also called \emph{Millalongko} 'golden head' or \emph{Kawekufü} 'water daemon'. \emph{Kutranelenew Epuange} '\emph{Epuange} has made me sick'. Epithet that in some places \emph{Mapuche} give as first name to a god, e.g. \emph{Epuange ngünechen} 'two faces father regulator', either because they represent two sexes, or because with this expression they allude to the benign and serene heaven and to the unfavourable heaven; or to the severity and benignity that the supreme being can demonstrate to men. In addition, the idea is applied to both God and Mayorwekufu 'major daemon'. V. Augusta (1910, p. 227) [Augusta, F. \emph{epuange}] \cite{RefB:03}}' \\ \texttt{-NU.epu\_dos-NN.ange\_cara} \end{example} \begin{example} \label{ex:250} [Zúñiga, F. 2006: 319 (\emph{kiñepüle})] \cite{RefB:24}\\ \emph{kiñe-püle} 'by/towards this side/place' \\ \texttt{-NU.kiñe\_uno-NN.püle\_lugar} \end{example} \subsubsection{Instrumental and ad-position \emph{mew}} \label{sec:61} \paragraph{} \label{tp:84} Smeets classifies \emph{-mew} as an instrumental suffix that follows nouns, deverbal nouns and pronouns (see Smeets, I. 2008: 61 - 67, "10.1 The instrumental \emph{-mew} $\sim$ \emph{-mu}" \cite{RefB:21}). Zúñiga defines \emph{mew} as an ad-position that is realised separated from the noun or deverbal noun that follows, but together with pronouns or adverbs (see Zúñiga, F. 2006: 194 - 197. "4.1 Las adposiciones y los sustantivos relacionales" \cite{RefB:24}). In order to recognise \emph{mew} as an independent form, but still as the instrumental suffix, it was declared as such in the non-verbal section of the script: \begin{example} \label{ex:251} [Zúñiga, F. 2006: 195 (105.a)] \cite{RefB:24}\\ \emph{müle-ka-n ruka \textbf{mew}} 'I am still at home' \\ \texttt{-IV.müle\_estar+CONT.ka16+IND1SG.n3\\ -NN.ruka\_casa +INST.mew} \end{example} \begin{example} \label{ex:252} [Zúñiga, F. 2006: 195 (105.b)] \cite{RefB:24}\\ \emph{amu-tu-n waria \textbf{mew}} 'I went back to the city' \\ \texttt{-IV.amu\_ir+RE.tu16+IND1SG.n3\\ -NN.wariya\_ciudad +INST.mew} \end{example} \begin{example} \label{ex:253} [Zúñiga, F. 2006: 195 (105.c)] \cite{RefB:24}\\ \emph{waria \textbf{mew} küpa-n} 'I came from the city' \\ \texttt{-NN.wariya\_ciudad +INST.mew\\ -IV.küpa\_venir+IND1SG.n3} \end{example} \begin{example} \label{ex:254} [Zúñiga, F. 2006: 201 (2.b)] \cite{RefB:24}\\ \emph{fey-\textbf{mew} kintu‐ke‐y‐ng‐ün meli mamüll} 'then they looked for four trees' \\ \texttt{-AV.fey\_entonces+INST.mew\\ -TV.kintu\_buscar+CF.ke14+IND.y4+3.ng3+PL.ün2\\ -NU.meli\_cuatro -NN.mamüll\_árbol} \end{example} \subsection{\emph{Wüño} as auxiliary} \label{sec:62} \paragraph{} \label{tp:85} According to Smeets, in \emph{Mapudüngun} there are five auxiliary verbs. These are elements separated from the main verb. They are verbal stems without inflection, which immediately precede the main verb, without any other element in between [Smeets, I. 2008: 175 (25.4)] \cite{RefB:21}. These are: \begin{itemize} \label{it:38} \item[] \emph{kalli} 'enabling' \item[] \emph{kim} 'knowing how to' \item[] \emph{küpa} 'wishing' \item[] \emph{pepi} 'being able' \item[] \emph{shinge} 'moving up/along'. \end{itemize} Lonkon calls these elements, "modal prefixes". She identifies four of them: \emph{kalli, kim-, küpa- and pepi-}, giving them the same values as Smeets. But Lonkon considers them prefixes, therefore, attached to the verb they are moulding, except for the permissive/enabling \emph{kalli} [Lonkon, E. 2011: 249] \cite{RefB:12}. Zúñiga identifies two of these modal elements: \emph{kim-} and \emph{pepi-}. He says that they form part of "complex verb stems", which means that both verb roots, the modal and the moulded one, form a compound. However, he says, they can also be expressed as separated elements, then he calls them "pre-verbal particles" [Zúñiga, F. 2006: 136] \cite{RefB:24}. Zúñiga also displays a list of verb roots that form complex verb stems, and, in fact, he devotes a paragraph to explain that they may be formed by radical concatenation, and by nominal incorporation. In the list is found the verb root \emph{wüño-} 're-', 'return, come back'. In the list are also \emph{kalli-} and \emph{küpa-}, but not \emph{shinge-} [Zúñiga, F. 2006: 179] \cite{RefB:24}. Zúñiga explains that these forms are frequently found as pre-verbal particles, i.e., separated from the main verb, which is reflected in spelling. He treats them as radical concatenation, though. Salas calls them "modals", and he identifies \emph{kim-} 'know', \emph{küpa-} 'wish' and \emph{pepi-} 'be able'. He says that they function as prefixes of single and complex stems [Salas, A. 2006: 192] \cite{RefB:19}. Augusta defines \emph{wüño-} as a suffix equivalent to the prefix morpheme 're-', which mainly expresses the idea of redoing the action indicated by the following verb. We have realised that \emph{wüño} also expresses the idea of retrospective and/or backwards action [Augusta, F. \emph{wüño}] \cite{RefB:03}. Among the examples given by Augusta, there are some that show \emph{wüño} separated from the main verb, and others, forming a compound with the moulded verb. Many \emph{Mapudüngun} native speakers perceive \emph{wüño} separated from the verb it is moulding, and they reflect it as Zúñiga shows in its examples. An affix does not realise isolated in \emph{Mapudüngun}, it must be attached to a verb or another root (adjective, noun, etc.). It can neither work as a root accepting suffixes to be attached. \emph{wüño}, on the other hand, also works as a verb root that may be inflected by attaching suffixes to it. Therefore, \emph{wüño} meets the auxiliary definition given by Smeets. \emph{wüño} $\sim$ \emph{wiño} either forms a compound, originates an inflected verb, or is a separated element. If some native speakers perceive it as a separate element, it may indicate that it is a modal element, thus, following Smeets, this verb would fulfil the "auxiliary" function as she defines it. Or the "pre-verbal particle" function, as Zúñiga calls it. Anyway, not all \emph{Mapudüngun} native speakers spell \emph{wüño} $\sim$ \emph{wiño} separated from the main verb. Many of them use it in the verb as a compound, i.e., as a "modal prefix", as Lonkon calls it. We have added \emph{wüño} as auxiliary into the lexicon list through the following entry: \begin{definition} \label{def:32}\ \\ \texttt{["-XV"\{.wüño\_re-\_volver-a\}]: [\{wüño\}|\{wiño\}]} \end{definition} \begin{example} \label{ex:255} [Zúñiga, F. 2006: 148 (63)] \cite{RefB:24}\\ \emph{\textbf{wüño}-witra-me-tu-a-fiel } 'to go there to recover them' \\ \texttt{-IV.wüño\_volver-IV.wütra\_levantar-CR.IV\\+TH.me20+RE.tu16+NRLD.a9+TVN.fiel4} \end{example} \begin{example} \label{ex:256} [Augusta, F. \emph{contestar}] \cite{RefB:03}\\ \emph{\textbf{wüño} fey-pin} 'to answer' \\ \texttt{-XV.wüño\_re-\_volver-a -TV.feypi\_decir+PVN.n4} \end{example} \begin{example} \label{ex:257} [Lonkon, E. 2017] \cite{RefB:13}\\ \emph{\textbf{wiño} wütra-m-püra-m-nge-tu-a-fu-y} 'it revitalised' \\ \texttt{-XV.wüño\_re-\_volver-a\\ -IV.wütra\_levantar+CA.m34-IV.püra\_subir-CR.IV\\+CA.m34+PASS.nge23+RE.tu16+NRLD.a9\\+IPD.fu8+IND.y4+3.Ø3} \end{example} \subsection{Proposing \emph{-ñma} as adverbializer} \label{sec:63} \paragraph{} \label{tp:86} Smeets lists \emph{-ñma} as an unproductive suffix [Smeets, I. 2008: 116] \cite{RefB:21}, giving a series of examples with this suffix: \begin{enumerate} \label{it:39} \item \emph{fücha-ñma} 'very long' (\emph{fücha} 'long') \item \emph{we-ñma} 'very new' (\emph{we} 'new') \item \emph{wesha-ñma} 'very bad' (\emph{wesha} 'bad') \item \emph{rume-ñma} 'extremely' (\emph{rume} 'very') \item \emph{welu-ñma} 'wrong, reversely' (\emph{welu} 'but, wrong, reversely') \item \emph{alü-ñma} 'for a long time' (\emph{alü} 'much'), cf. \emph{alü-ñma-mew} 'much later, a long time after that' \item \emph{fentre-ñma $\sim$ fentre-yma} 'for a long time' (\emph{fentre} 'much') \item \emph{epu-ñma} 'with the two of us' (\emph{epu} 'two') \item \emph{ka-ruka-ñma} 'neighbour' (\emph{ka-ruka} 'neighbour') \end{enumerate} Except for the examples 5, 8 and 9, it is quite evident the part of the meaning contributed by \emph{-ñma}, 'very'. In other texts we have found: \begin{enumerate} \label{it:40} \item \emph{weda-ñma} 'evil, too bad' (\emph{weda} 'bad') [Zúñiga, F. 2006: 270 (15)] \cite{RefB:24} \item \emph{pichi-ñma} 'just now, recently' (\emph{pichi} 'little') [Zúñiga, F. 2006: 271 (30)] \cite{RefB:24} \item \emph{fücha-ñma} 'very big' (\emph{fücha} 'big, old') [Augusta, F.\\ (\emph{füchañma})] \cite{RefB:03} \item \emph{llekü-ñma} 'very close' (\emph{llekü} 'close, near') [Augusta, F. (\emph{llekü-ñma})] \cite{RefB:03} \end{enumerate} We have not gone through an exhaustive research of this suffix, that is why it is just a proposal. We think it is quite clear that \emph{-ñma} adds the 'very' part of the meaning, but we have observed that it is applied only to adjectives and certain adverbs with this sense, and only as part of the nominal compounding. There is only one case, mentioned by Smeets, where it seems to be part of a verbal stem, but there are no examples of it; so in the cases of E\ref{ex:258} it could be either the indirect object marker, slot 26, or the experience suffix, slot 35, which share the form \emph{-ñma}: \begin{example} \label{ex:258} [Smeets, I. 2008: 574 (\emph{wesha})] \cite{RefB:21}\\ \emph{wesha-\textbf{ñma}-nge-} (Vi) to be a bad person; \\ \emph{wesha-\textbf{ñma}-w-} (Vi) to break down, to fall apart, to become a bad person; \\ \emph{wesha-\textbf{ñma}-w-küle-} (Vi) to be broken/in pieces, to feel awful; \end{example} \begin{definition} \label{def:33} \texttt{["+ADV"\{.ñma\}]: ["@ÜÑ"\{ma\}];} \end{definition} \begin{exercise} \label{R:53} \textbf{Prevent adverbializer to appear as verbal suffix} \\ \texttt{define RuPr51 $\sim$\$[\$["+ADV"\{.ñma\}]]];} \end{exercise} \begin{exercise} \label{R:54} \textbf{Apply adverbializer only to adjectives and adverbs} \\ \texttt{define NvsOpRu01 [["+ADV"\{.ñma\}] => \newline ["-AJ"|"-AV"] ?* \_ ];} \end{exercise} D\ref{def:33} encodes \emph{-ñma} as adverbializer. R\ref{R:53} prevents it to appear along the verb sequence of suffixes. R\ref{R:54} restricts it to co-occur only with adjectives and adverbs. The other forms, nouns, numerals, that occur with this suffix are collected as lexicalized forms in the lexicon: \begin{definition} \label{def:34} \\ \texttt{["-AV"{.epuñma\_con-nosotros-dos}]:["@G"\{epuñma\}]} \end{definition} \section{Analyser dimensions} \label{sec:64} \paragraph{} \label{tp:87} This section exposes data referent to the amount of each type of element interacting in the system: lexicon, suffixes, rules, states, etc. There is a flow chart (deployed in figures \ref{fig:09}, \ref{fig:10} and \ref{fig:11}) showing the interconnection of all the analyser elements along the process in annex \ref{anx:13}, p. \pageref{anx:13}. \begin{itemize} \label{it:41} \item[] \textbf{Roots (verbalisable lexicon): 2,096} \item[] Adjectives: 128 \item[] Adverbs: 24 \item[] Intransitive verbs: 257 \item[] Proper nouns: 68 \item[] Nouns: 1,325 \item[] Numerals: 14 \item[] Onomatopoeia: 12 \item[] Questions: 4 \item[] Transitive verbs: 264 \end{itemize} \begin{itemize} \label{it:42} \item[] \textbf{Non verbalisable lexicon: 266} \item[] Adverbs: 88 \item[] Anaphoric pronouns: 5 \item[] Auxiliaries: 8 \item[] Conjunctions: 9 \item[] Demonstrative pronouns: 6 \item[] Foreign expressions: 7 \item[] Interrogative pronouns: 8 \item[] Interjections: 27 \item[] Negations: 1 \item[] Numbers: 10\footnote{\texttt{["-NBR"]: [[\%0|1|2|3|4|5|6|7|8|9]+];} This regex declares the unities and the + sign encodes any combination formed by one to infinite unities, all of which would be tagged \texttt{"-NBR"}.} \item[] Particles: 19 \item[] Personal pronouns: 9 \item[] Possessive pronouns: 6 \item[] Prepositions: 5 \item[] Punctuation marks: 58 \end{itemize} \begin{itemize} \label{it:43} \item[] \textbf{Suffixes: 116} \begin{itemize} \item[] \textbf{Verb suffixes: 101} \item[] Inflectionals: 56 \item[] Mobile derivationals: 20 \item[] Fix\footnote{In this category not all derivational are fix, but most of them; as in the previous category not all suffixes are mobile, but many of them.} derivationals: 24 \item[] Non-slot assigned: 1 \end{itemize} \begin{itemize} \label{it:44} \item[] \textbf{Non-verb\footnote{These suffixes may actually be added to nominalised verbs, but never to finite verb forms, i.e. verbs that have mood, person and number.} suffixes: 15} \item[] Class-changing: 3 \item[] Instrumental: 1 \item[] Non class-changing: 6 \item[] nominalisers: 5 \end{itemize} \end{itemize} \begin{itemize} \label{it:45} \item[] \textbf{Rules: 472} \item[] Regexs (files\footnote{These are files containing regular expressions encoding the lexicon and suffixes, which a are separated from the main script.}) location: 76 \item[] Character definitions\footnote{These are the lists of consonants, vowels and semivowels.}: 3 \item[] Phonological: 44 \item[] Morphological: 345 \item[] Cleaning\footnote{These rules clear symbols used as marks when processing morphological and phonological changes.}: 4 \end{itemize} \begin{itemize} \label{it:46} \item[] \textbf{Compilation values} \item[] Size: 200.3 MB. \item[] States: 2,858,426 \item[] Arcs: 13,128,696 \item[] FST type: cyclic \end{itemize} \section{Evaluating the analyser} \label{sec:65} \subsection{Corpora in use} \label{sec:66} \subsubsection{Gold standard} \label{sec:67} \paragraph{} \label{tp:88} We have collected a corpus made of sentences coming from "A grammar of \emph{Mapuche}" [Smeets, I. 2008] \cite{RefB:21}, which is our "Gold standard" corpus. Words in the corpus were analysed and disambiguated by Smeets. The Gold Standard corpus includes all the sentences from chapters 10 to 18, and 21 [Smeets, I. 2008: 61-116, 121-128] \cite{RefB:21}. These chapters deal with nouns, adjectives, adverbs, numerals, demonstratives and anaphoric pronouns, personal pronouns, possessive pronouns, interrogative pronouns, suffixation and verbalisation. The corpus also contains all the seventeen texts of "Part VIII - Texts" [Smeets, I. 2008: 369-487] \cite{RefB:21}, which is obviously the most abundant source of \emph{Mapuche} writings in the Gold standard. Texts titles are: \begin{itemize} \label{it:47} \item[] Text 1. Demons \item[] Text 2. Work \item[] Text 3. Youth \item[] Text 4. Missionary \item[] Text 5. The war \item[] Text 6. An old man \item[] Text 7. Olden times \item[] Text 8. Conversation about demons \item[] Text 9. Conversation about youth \item[] Text 10. Conversation about work on big farms \item[] Text 11. Conversation about land disappropriation \item[] Text 12. Our reservation \item[] Text 13. My father \item[] Text 14. Brick \item[] Text 15. Song 1 \item[] Text 16. Song 2 \item[] Text 17. Song 3 \end{itemize} \subsubsection{Control corpus} \label{sec:68} \paragraph{} \label{tp:89} Out of the Gold standard we have extracted a control corpus of 240 sentences containing a total of 1,671 words, which correspond to 650 forms. \begin{example} \label{ex:259} \\ \emph{ñi trewa, ñi ñarki ka ñi kawell} 'my dog, my cat and my horse' \end{example} In example E\ref{ex:259} there are seven words, but 5 forms which are \emph{ka, kawell, ñarki, ñi} and \emph{trewa}. The 3 \emph{ñi} words count as 1 form. The control corpus is used to check results obtained from the analyser. A correct analysis for every word of this corpus must appear in the output. \subsubsection{Comparison corpus} \label{sec:69} \paragraph{} \label{tp:90} This corpus is collected from Zúñiga's texts [Zúñiga, F. 2006: 270 (15)] \cite{RefB:24}. It is made of 170 sentences that contain 1,256 words which correspond to 511 forms (see previous section \ref{sec:68} and example E\ref{ex:259}). The texts are extracted from "\emph{Mapudüngun}. El habla \emph{Mapuche}", chapter V. Textos en \emph{mapudüngun} [Zúñiga, F. 2006: 266 - 288] \cite{RefB:24}. Text titles are: \begin{enumerate} \label{it:48} \item \emph{Feychi ngürü afngünengelu} 'That crafty fox' \item \emph{Mawün} 'Rain' \item \emph{Pewma} 'A dream' \item \emph{Ngillañ mawün} 'Asking for rain' \item \emph{We tripantu} 'New year' \item Pausa\_Historia 'Pause\_History' \item Abuela\_Voz 'Granny\_Voice' \end{enumerate} \subsection{Establishing the ambiguity parameter} \label{sec:70} \paragraph{Ambiguity.} \label{tp:91} In any language some words present ambiguity. These word forms, known as homographs, correspond to different meanings, which are disambiguated by context; for example, the English word \textbf{drop} means 'a little amount of liquid' in "a \textbf{drop} of coffee stained my letter". And it means 'to fall' or 'let fall' in "do not \textbf{drop} papers on the floor". The only way to know which meaning \textbf{drop} is referring to, i.e., the only way to "disambiguate" it, is by putting it into context. In \emph{Mapudüngun} there are quite few ambiguous words (homophones which once written become homographs) that appear very often in texts, like \emph{ka}, \emph{fey} and most of the words ending in \emph{n} which is the shared form between the "1\textsuperscript{st} person, singular" suffix and the "plain verbal noun" suffix, examples of them are below (see \ref{sec:51} \nameref{sec:51}, p. \pageref{sec:51}): \begin{itemize} \label{it:49} \item[]\emph{ka} \texttt{→ -AJ.ka\_otro} \item[]\emph{ka} \texttt{ → -CJ.ka\_y} \item[]\emph{ka} \texttt{ → -PT.ga\_ciertamente\_indignación\_cinismo} \item[] \item[]\emph{fey} \texttt{ → -AV.fey\_entonces} \item[]\emph{fey} \texttt{ → -DP.fey\_que\_aquel\_ese} \item[]\emph{fey} \texttt{ → -IV.fe\_ser-eso+IND.y4+3.Ø3} \item[]\emph{fey} \texttt{ → -PP.fey\_él\_ella\_ellos} \item[] \item[]\emph{küdawün} \texttt{ → -IV.küdaw\_trabajar+IND1SG.n3} \item[]\emph{küdawün} \texttt{ → -IV.küdaw\_trabajar+PVN.n4} \end{itemize} \paragraph{Mapudüngun ambiguity calculus.} \label{tp:92} If we add up all the analysis of three previous words: \texttt{9}, and divide it by the number of words we are taking into account: \texttt{3}, we obtain the "average \emph{Mapudüngun} ambiguity" (\textbf{ama}) of these words: \texttt{3}. We use this result as a reference parameter when comparing analysis results. As we have explained before, the development of the analyser arises from Smeets' description of \emph{Mapudüngun} morphology [Smeets, I. 2008] \cite{RefB:21}. We have first developed an analyser that strictly fits with Smeets work, we have generated an FST from it, we call it "SmeetsAnalyser". Then, we have expanded the analyser in lexicon and rules that fit another variants of \emph{Mapudüngun}, provisionally, we call it \emph{Düngupeyem}\footnote{\emph{düngu} 'word, speech, language'; \emph{pe} 'proximity suffix, it indicates physic and or temporal proximity with the action expressed by the verb; \emph{ye} 'constant feature suffix'; \emph{m} 'it indicates instrument or location'. All together it is something like 'instrument always used to do things with language'. We intended to say 'language tool'. That is one of the reasons to be a provisional name. 'Tool' in \emph{Mapudüngun} is \emph{küdaw-ka-we}, so another possibility is to call our analyser \emph{Düngu-ka-we}. Another reason to be a provisional name is that we have found no native \emph{Mapuche} yet, who validates the name.}. To calculate the average \emph{Mapudüngun} ambiguity, and establish it as a reference parameter, we have analysed the control corpus with the "SmeetsAnalyser". \begin{itemize} \label{it:50} \item[] Control corpus analysed with "SmeetsAnalyser" \item word-forms = 650 \item produced analyses = 2,232 \item unknown words = 2 \item[] \item[] \fbox{$\mathbf{2,232 \div (650 - 2) = 3.59 ~ ama}$} \end{itemize} Following this calculus we obtain \textbf{3.59 ama}, this means that every word-form has an average of 3.59 possible analyses, this is our reference parameter. \paragraph{Increased ambiguity calculus.} \label{tp:93} The incorporations we have made in the system, those mentioned in section \ref{sec:53}, [p. \pageref{sec:53}], increase the ambiguity in analysis results because they imply more ways of analysis for every form. Increasing the lexicon also produces this effect. Now we calculate the "average increased ambiguity" (\textbf{aia}) to be able to compare the results and verify if the system is still reliable. \begin{itemize} \label{it:51} \item[] Control corpus analysed with \emph{Düngupeyem} \item word-forms = 650 \item produced analyses = 2,477 \item unknown words = 2 \item[] \item[] \fbox{$\mathbf{2,477 \div (650 - 2) = 3.82 ~ aia}$} \end{itemize} As expected, ambiguity rises, but not too much, less than 0.24 points per word-form, which indicates that the reliability of the analyser is quite good. \subsubsection{Comparison corpus results} \label{sec:71} \paragraph{} \label{tp:94} To check if the additions (see \ref{sec:53}, p. \pageref{sec:53}) we have made to the FST really worth it, we analyse the comparison corpus. \begin{itemize} \label{it:52} \item[] Comparison corpus analysed with "SmeetsAnalyser" \item word-forms = 511 \item produced analyses = 1,368 \item unknown words = 120 \item[] \item[] \fbox{$\mathbf{1,368 \div (511 - 120) = 3.49 ~ aa}$} \end{itemize} \begin{itemize} \label{it:53} \item[] Comparison corpus analysed with \emph{Düngupeyem} \item word-forms = 511 \item produced analyses = 1,828 \item unknown words = 10 \item[] \item[] \fbox{$\mathbf{1,828 \div (511 -10) = 3.64 ~ aa}$} \end{itemize} At first glance, these results confirm a good performance of \emph{Düngupeyem}, the difference in the average ambiguity (\textbf{aa}) even diminishes from 0.24 to 0.15. But there is a factor that we did not considerate in the calculus with the control corpus, it would have made no difference in results. There were too few unrecognised words (only 2), and the same amount for both analysers. Analysing the comparison corpus, we obtain 120 unrecognised words from "SmeetsAnalyser", and only 10 from \emph{Düngupeyem}. To measure the impact of this factor in the ambiguity index, we have used a "root guesser\footnote{The root guesser is a tool derived from the analyser, which have no lexicon of roots, but the possible root structures in terms of consonants, vowels and semivowels, e.g., CVC, CVSV, CVCVCVC are valid \emph{Mapuche} root structures. The lexicon of suffixes is included, also their combination rules. This machine first check the possible root structures and then the possible suffixes combinations. This FST is not described in this article because that would have made it too extensive.}" to count the possible analyses the unknown words generate. Then, we add the resulting possible analyses to the known analysis and recalculate the ambiguity index. \begin{itemize} \label{it:54} \item[] 120 unrecognised words from "SmeetsAnalyser" \item words producing no possible analyses = 49 \item words producing possible analyses = 71 \item total number of possible analyses = 636 \item[] \item[] \fbox{$\mathbf{(1,368 + 636) \div (511 - 49) = 4.33 ~ aa}$} \end{itemize} \begin{itemize} \label{it:55} \item[] 10 unrecognised words from \emph{Düngupeyem} \item words producing no possible analyses = 3 \item words producing possible analyses = 7 \item total number of possible analyses = 56 \item[] \item[] \fbox{$\mathbf{(1,828 + 56) \div (511 - 3) = 3.70 ~ aa}$} \end{itemize} These calculi confirm that the analyser is reliable, even more after adding the considerations for other dialects of \emph{Mapudüngun} and more lexicon. The average analyses (\textbf{aa}) have raised, but too little as to consider it a problem, only 0.06 between the analyses that does not take into account the possible analyses for unknown roots (3.64), and the one that does take them into account (3.70). \subsection{Comparing against other analysers} \label{sec:72} \paragraph{} \label{tp:95} For this purpose we have used the Gold standard corpus (see \ref{sec:67}, p. \pageref{sec:67}) to train two different analysers, and we have analysed the comparison corpus (see \ref{sec:69}, p. \pageref{sec:69}) with these tools and our analyser to compare results. \subsubsection{Trainable systems to compare against} \label{sec:73} \paragraph{} \label{tp:96} A trainable system receives a disambiguated corpus to learn from, i.e., it stores in its memory (or data base) the correct forms that have been introduced in the training process. Then, using different algorithms, it compares an input text to the stored data and tags input accordingly. The trainable systems we have compared our analyser against are RFTagger\footnote{We wanted to use another tagger, one built with neuronal networks that we have trained last year. But we could not make it work now, it seems that Python modules have change too much and we only get errors with it.} [Schmid \& Laws 2008] \cite{RefB:20} and Morfette [Chrupala et al. 2008] \cite{RefB:04}. \paragraph{RFTagger.} \label{tp:97} This is a tool for the annotation of text with fine-grained part of speech tags\footnote{This is the developers own definition found on the RFTagger site: \href{https://www.cis.uni-muenchen.de/~schmid/tools/RFTagger/}{https://www.cis.uni-muenchen.de/$\sim$schmid/tools/RFTagger/} <22/08/2020>.}. It is a Hidden-Markov-Model tagging method that is particularly suitable for PoS tag sets with numerous detailed tags [Schmid \& Laws 2008: 1] \cite{RefB:20}. An HMM part of speech tagger calculates the most likely sequence of PoS tags for a given word sequence. The difference with our analyser is that RFTagger identifies a complete form and tags it accordingly, while our morphological analyser breaks down the input form and gives a tag for each part that construct the full form. \paragraph{Morfette.} \label{tp:98} This is a tool for supervised learning of inflectional morphology. Given a corpus of sentences annotated with lemmas and morphological labels, and optionally a lexicon, Morfette learns how to morphologically analyse new sentences\footnote{This is the developers own definition found on the Morfette site: \href{https://hack-age.haskell.org/package/morfette}{https://hack-age.haskell.org/package/morfette} <22/08/2020>}. This is a data-driven modular probabilistic system that learns to perform morphological tagging from morphologically annotated corpora. The system is composed of two learning modules that use a maximum entropy classifier to predict morphological tags. The third module dynamically combines the predictions of the Maximum-Entropy models and generates a probability distribution over the sequences of tag-lemma pairs [Chrupala et al. 2008: 1] \cite{RefB:04}. \paragraph{Training RFTagger and Morfette.} \label{tp:99} The text of the Gold standard corpus has to be tokenized, one token per line. For each token, a tag is entered after a tab space. For verbs, the tag shows 38 slots for attributes. 36 verbal slots and two additional ones for nominal, temporal, instrumental or nominalising suffixes; each unavailable attribute\footnote{Grammatical categories are collected with attributes, which are the aspects that detail the category, for example, the word "plastic" has the category Noun; a fine-grained tag for it would be NSM, where N stands for "noun", S for "singular" and M for "masculine", which are the attributes.}, which fits into a slot, is indicated by a 0 (zero), as shown in the following example: \begin{example} \label{ex:260}\ \emph{amu-ke-fu-y} 'he used to go'\\ \texttt{amukefuy IV.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.\\0.0.0.0.0.+CF@ke14.0.0.0.0.0.+IPD@fu8.0.0.0.\\+IND@üy4.+3@Ø3.0.0.0.0} \end{example} For non-verbal forms, the tag holds four positions for attributes, the first one occupied by the category of the form and the last three by possible nominal suffixes, as shown in the following example: \begin{example} \label{ex:261}\ \emph{peñi-mu} 'at my brother's'\\ \texttt{peñimu NN.0.0.+INST@mew} \end{example} Morfette requires a bit more information. There is an additional column between the form and the tag to enter the lemma, where the root was added instead. Unlike RFTagger, attributes of the tag are not preceded by dots, compare E\ref{ex:260} with the following example: \begin{example} \label{ex:262}\ \emph{amu-ke-fu-y} 'he used to go'\\ \texttt{amukefuy amu IV0000000000000000000000+CF@ke14\\00000+IPD@fu8000+IND@üy4+3@Ø30000} \end{example} Both machines were trained in their standard way, that is, with their default settings, except that in the case of Morfette we chose the vector representations of words (see E\ref{ex:260}, E\ref{ex:261}, E\ref{ex:262}). The vector representation for tags uses a \texttt{0} (zero) for each possible attribute, where the realised ones replace them in the appropriate position. It is the only configuration that RFTagger accepts. \subsubsection{Results from the three analysers} \label{sec:74} \paragraph{} \label{tp:100} Results from the two comparison tools are not ambiguous, they output only one tag per form, which gives us a binary value, either right or wrong tag assignation. They always set a tag for every form, so there are no unknown forms neither. We plan to add a disambiguator to the system so we can analyse words in context and, instead of outputting all possible analyses per word, only output the most suitable one. The training corpus, the "Gold standard", is made up of 1,220 sentences, which in turn are made up of 9,209 tokens of which 1,998 are punctuation marks; when subtracting the latter, the total of unambiguously annotated word-forms is 7,211. This material is actually insufficient\footnote{In data driven tools the more training data receive the tool the better it performs its tasks. Text applied tools use to be trained with thousands of sentences. For the tools we have used (RFTagger and Morfette) we believe that about 15 thousand sentences would give good quality results; in Smeets' work there are about 1,800 morphologically tagged sentences.} for an accurate training that can obtain acceptable results. Note that this is one of the main reasons for developing a morphological analyser based on rules, as there are not enough \emph{Mapuche} annotated corpora available to carry out the data-driven type of approach with computational tools. \begin{table}[htb] \caption{Analysing results for the comparison corpus (see \ref{sec:69})} \label{tab:10} \begin{tabular}{|c|c|c|c|} \hline\noalign{\smallskip} Data type & RFTagger & Morfette & \emph{Düngupeyem} \\ \noalign{\smallskip}\hline\noalign{\smallskip} Tokens & 1,471 - 100\% & 1,471 - 100\% & 1,471 - 100\% \\ \noalign{\smallskip}\hline\noalign{\smallskip} Right & 723 - 49.1\% & 786 - 53.4\% & 1,460 - 99,2\% \\ \noalign{\smallskip}\hline\noalign{\smallskip} Wrong & 749 - 50.8\% & 685 - 46.5\% & 0 \\ \noalign{\smallskip}\hline\noalign{\smallskip} Unknown & - & - & 11 - 0.75\%\\ \noalign{\smallskip}\hline\noalign{\smallskip} Analyses & 1,471 & 1,471 & 4,533 \\ \noalign{\smallskip}\hline \end{tabular} \end{table} \paragraph{RFTagger results.} \label{tp:101} This tool can not be blamed for this low performance (nor Morfette either). The insufficient amount of training material is the cause of the poor results. RFTagger was not developed for agglutinative languages explicitly, or the complexities of \emph{Mapudüngun}. Also keep in mind that agglutinative languages have potentially an infinite number of words, as English, for example, has potentially an infinite number of phrases. Therefore, it is more difficult for the system to learn from such a variety of forms how to tag accurately. \paragraph{Morfette results.} \label{tp:102} This tool can handle the analysis process a little better than RFTagger. More words are correctly analysed, and less words are incorrectly analysed. Throughout the results validation we have noticed that Morfette breaks down the forms to apply its inferred assumptions on analysed suffixes. But both machines fail though, in assuming almost all the words starting by a capital letter as a proper noun. \paragraph{Düngupeyem results.} \label{tp:103} To make the results comparable, we have generated a mathematical formula that approach the two types of data and give us a way to explain the numbers. The average ambiguity (\textbf{aa}) of the comparison corpus (see \ref{it:53}, p. \pageref{it:53}) is \textbf{3.64 aa}. On subtracting the number of analyses corresponding to that percentage, of \emph{Düngupeyem}'s correct analyses (1,460) we relate this amount to those of Morfette and RFTagger right analyses. Then, we recalculate the percentage obtaining a closer degree of correspondence among the three machines results:\\ \minibox[frame]{ \medskip $\mathbf{3,64(aa)~\%~1,460~=~53.29~(ambiguous~words)}$ \\ \medskip $\mathbf{1,460~-~53.29~=~1,406.71}$ \\ \medskip $\mathbf{1,471~=~100\%~(analysed~words)}$ \\ $\mathbf{1,406.71~=~95.62\%~(correctly~analysed~words)}$} \bigskip After these results, it is again clear the system's reliability, and the analyses' high degree of accuracy. We see that regardless counting not recognised words as if they were wrong analyses, failed analyses reach only 0.75\%, while success overcomes 95\%. The other two tools are around 50\% in right and wrong analyses. \subsection{Comparing against a Quechua analyser} \label{sec:75} \paragraph{} \label{tp:104} Our work follows the path that Annette Ríos\footnote{\href{https://www.cl.uzh.ch/de/people/team/compling/arios.html}{https://www.cl.uzh.ch/de/people/team/compling/arios.html}} has drawn for Quechua. This step is not an exception. Although there are notable differences, \emph{Düngupeyem}'s evaluation is largely based on the same process for Quechua FST tools carried out by Ríos [Ríos, A. 2015: 36-39] \cite{RefB:17}. The Quechua system is made up of 5 cascading transducers [Ríos, A. 2015: 22] \cite{RefB:17}, and some of these FSTs use a disambiguator for specific parts of the forms. For example, to unravel whether a root is nominal or verbal; or on another transducer to reveal if a suffix is of one or another type, etc. So the final Quechua form has been disambiguated throughout the analysis process. Training material also differs. Quechua system used about 3,000 disambiguated sentences. \emph{Mapuche} training material (see \ref{sec:70}, p. \pageref{sec:70} and \ref{sec:73}, p. \pageref{sec:73}) consists of less than the half of those sentences, 1,220 to be exact. In both cases, however, this is too little material to train data-driven systems well enough. Comparison corpus are similar. Ours contains 170 sentences with 2,207 tokens (1,475 words + 732 punctuation marks) (see \ref{sec:69}, p. \pageref{sec:69}), Quechua has 322 sentences containing 2,142 tokens [Ríos, A. 2015: 36] \cite{RefB:17}. Although the procedure was also performed differently, the final counting (the addition of results) may serve as comparison data. In the Quechua case, both texts of the comparison corpus were tagged separately, to later compare them with each other. In the \emph{Mapuche} case, by contrast, texts were tagged at once. \subsubsection{Quechua results} \label{sec:76} \paragraph{} \label{tp:105} Quechua results are transferred and presented in the style used in this article, different from their original presentation, for comparison reasons\footnote{Data are taken form table 2.13: Evaluation: Disambiguated Texts [Ríos, A. 2015: 38] \cite{RefB:17}.}. \begin{table}[htb] \caption{Analysis results. RFTagger / Morfette / Quechua system} \label{tab:11} \begin{tabular}{|c|c|c|c|} \hline\noalign{\smallskip} Data type & RFTagger & Morfette & Quechua S. \\ \noalign{\smallskip}\hline\noalign{\smallskip} Tokens & 2,142 - 100\% & 2,142 - 100\% & 2,091 - 97.6\% \\ \noalign{\smallskip}\hline\noalign{\smallskip} Right & 1,459 - 68.1\% & 1,505 - 70.2\% & 2,041 - 95.2\% \\ \noalign{\smallskip}\hline\noalign{\smallskip} Wrong & 683 - 31.8\% & 637 - 29.7\% & 50 - 2.33\% \\ \noalign{\smallskip}\hline \end{tabular} \end{table} \begin{table}[htb] \caption{Results RFTagger / Morfette - Quechua / \emph{Mapudüngun}} \label{tab:12} \begin{tabular}{|c|c|c|c|c|} \hline\noalign{\smallskip} & \multicolumn{2}{c|}{RFTagger} & \multicolumn{2}{c|}{Morfette} \\ \noalign{\smallskip}\hline\noalign{\smallskip} & Right & Wrong & Right & Wrong \\ \noalign{\smallskip}\hline\noalign{\smallskip} Quechua & 68.11\% & 31.88\% & 70.26\% & 29.73\% \\ \noalign{\smallskip}\hline\noalign{\smallskip} \emph{Mapudüngun} & 49.12\% & 50.88\% & 53.43\% & 46.57\% \\ \noalign{\smallskip}\hline\noalign{\smallskip} Difference & 18.99\% & 19\% & 16.83\% & 16.84\% \\ \noalign{\smallskip}\hline\noalign{\smallskip} Average difference & \multicolumn{2}{c|}{18.99\%} & \multicolumn{2}{c|}{16,83\%} \\ \noalign{\smallskip}\hline \end{tabular} \end{table} \paragraph{RFTagger results.} \label{tp:106} table \ref{tab:11} shows that increasing the amount of training data (1,220 to 3,000 sentences), results improve consequently for both, RFTagger and Morfette. RFTagger worked well with 68\% of the Quechua forms, which is 19\% more than with \emph{Mapuche} ones. The percentage of wrongly analysed forms is also better, being 19\% lower. Thus, performance of RFTagger with Quechua was 19\% better than with \emph{Mapudüngun} (see table \ref{tab:12}). However, be aware of the differences between the two evaluation processes (see \ref{sec:75}, p. \pageref{sec:75}). \paragraph{Morfette results.} \label{tp:107} This tool also performs better for Quechua (compare results in table \ref{tab:12}). As with \emph{Mapuche} texts, Morfette performs better than RFTagger in the Quechua texts tagging. Morfette results with Quechua texts were 16.8\% better than with \emph{Mapuche} texts (see table \ref{tab:12}). It produced 16.8\% more of correct analysis, and the same percentage less of incorrect analyses. The difference is smaller, as it is in the \emph{Mapuche} texts analysis. Recall that the percentage of correctly analysed words of our analyser was 95.62\% (see \nameref{tp:103}, p. \pageref{tp:103}). table \ref{tab:11} shows, in the case of the Quechua system, 95.2\% of correctness. Despite the differences between both systems (see \ref{sec:75}, p. \pageref{sec:75}) results are similar. So, if Ríos considers her machine performs successfully based on her analyses results, we may go along with the same consideration for our system. \subsection{Not analysed!} \label{sec:77} \paragraph{} \label{tp:108} In analyses of the control corpus (\ref{it:51}, p. \pageref{it:51}), made up of Smeets' sentences [Smeets, I. 2008] \cite{RefB:21}, there were two unknown words. We analyse these cases below. \subsubsection{Smeets' not analysed words.} \label{sec:78} \paragraph{eluwün-antü \emph{'funeral day'}} \label{tp:109} [Smeets, I. 2008: 402 (74)] \cite{RefB:21}. Presented this way, this word is a nominal compound. But we have not collected \emph{eluwün} 'funeral' as a noun because it is actually a nominalised verb: \begin{example} \label{ex:263} [Smeets, I. 2008: 404 (7)] \cite{RefB:21} \\ \emph{el-uw-ün} 'funeral', lit: 'the leaving behind/going' \\ \texttt{-TV.el\_dejar-atrás\_partir+REF.w31+PVN.n4} \end{example} \begin{example} \label{ex:264} [Smeets, I. 2008: 66 (48)] \cite{RefB:21} \\ \emph{antü} 'day' \\ \texttt{-NN.antü\_sol\_día\_tiempo} \end{example} This is another type of compound that we have not encoded in our system. We think it is not worth to include it because, up to this moment, it has only appear two or three times. Adding variants of whatever form increases the ambiguity, which negatively affects the performance of the analyser. \paragraph{mapuche-domo \emph{'Mapuche woman'}} \label{tp:110} [Smeets, I. 2008: 399 (18)] \cite{RefB:21}. This is another nominal compound that Smeets presents as made up two nouns. But these are actually three noun roots: \begin{example} \label{ex:265} [Smeets, I. 2008: 117] \cite{RefB:21} \\ \emph{mapu-che} 'land person' \\ \texttt{-NN.mapu\_tierra-NN.che\_persona} \end{example} \begin{example} \label{ex:266} [Smeets, I. 2008: 76 (20)] \cite{RefB:21} \\ \emph{domo} 'woman' \\ \texttt{-NN.domo\_mujer} \end{example} A compound of three roots is not contemplated in the system either, for the same reasons of the previous compound. But, a solution to successfully analyse these type of compounds may be to cascade another FST capable of analysing three roots compounds after the main FST is unable to do it, this way we do not increase ambiguity in the main analyser. \subsubsection{Zúñiga's not analysed words.} \label{sec:79} \paragraph{} \label{tp:111} In the analyses of the comparison corpus (\ref{it:53}, p. \pageref{it:53}), made up of Zúñiga's sentences [Zúñiga, F. 2006: 266 - 288] \cite{RefB:24}, there were ten unknown words (\emph{puru} 'to dance' is repeated, so, actually nine). In this section we try to find out why these words could not successfully go through the analyser. \paragraph{are-tu \emph{'borrowed'}} \label{tp:112} [Zúñiga, F. 2006: 280 (122)] \cite{RefB:24}. In Zú-ñiga and Augusta, F. \cite{RefB:03}, this root is an adjective. From the perspective of Spanish or English it should be the participle form of the verb. Smeets and Augusta collect it as verb \emph{are-} 'to lend', and when followed by the suffix \emph{-tu-}, \emph{are-tu-} 'to borrow'. "An \emph{-n} form occurs as an adjective denoting an attribute or quality of the modified noun" [Smeets, I. 2008: 190] \cite{RefB:21}, among other functions of the plain verbal noun. This lead us to think that \emph{aretu} may be analysed as \emph{are-tu-Ø}, where the plain verbal noun is elided, or realised as a null suffix. A solution, then, to correctly analyse this form, would be to add the null form of the plain verbal noun to the list of suffixes. The problem is that this action would enormously increase the ambiguity, because every non verbal root allowed to take the verbaliser \emph{Ø}, would be analysed as \texttt{root} and \texttt{root+VRB.Ø36+PVN.Ø4}. \paragraph{ina-lef-nepe-n \emph{'I startled wake up'}} \label{tp:113} [Zúñiga, F. 2006: 283\\ (\emph{pewma})] \cite{RefB:24}. From the meaning Zúñiga gives to this word, we think that it is a short form for: \begin{example} \label{ex:267}\ \emph{ina-lef-ün nepe-n} lit: 'I woke up on the run' \\ \texttt{-AV.ina\_a-través-IV.lef\_correr-CR.IV\\+PASS.nge23+PX.pe13+PVN.n4\\-IV.nepe\_despertar+IND1SG.n3 } \end{example} \paragraph{ngen-ko \emph{'god of the waters'}} \label{tp:114} [Zúñiga, F. 2006: 285 (\emph{we tripantü})] \cite{RefB:24}. It is the same case as \emph{eluwün-antü} 'funeral day' (see \nameref{tp:109}, p. \pageref{tp:109}). In Smeets is found as in the following example: \begin{example} \label{ex:268} [Smeets, I. 2008: 138 (41)] \cite{RefB:21} \\ \emph{nge-n ko} lit: 'owner/master of the water' \\ \texttt{-TV.nge\_tener+PVN.n4\\-NN.ko\_agua} \end{example} \paragraph{puru \emph{'to dance'}} \label{tp:115} [Zúñiga, F. 2006: 287 (Pausa\_Historia)] \cite{RefB:24}. We think it is the same case as \emph{are-tu}, even though, this is a single root, and is not collected as 'danced', not by Zúñiga nor by Augusta (see \nameref{tp:112}, p. \pageref{tp:112}). So, it is probably: \begin{example} \label{ex:269}\ \emph{puru-Ø} 'to dance' \\ \texttt{-IV.puru\_bailar+PVN.Ø4} \end{example} \paragraph{purunenutuy} \label{tp:116} [Zúñiga, F. 2006: 287 (Pausa\_Historia)] \cite{RefB:24}. We are not certain how Zúñiga translates it. The form \emph{enu} inside this word is unknown for us, but we guess it may be: \begin{example} \label{ex:270}\ \emph{puru-nentu-tu-y} 'get oneself dancing\footnote{Maybe from the expression in Spanish 'sacar a bailar' 'ask someone to dance with'.}'\\ \texttt{-IV.puru\_bailar-TV.entu\_sacar-CR.TV\\+RE.tu16+IND.y4+3.Ø3} \end{example} \paragraph{taku-tu-mu-tu-y \emph{'she sheltered herself'}} \label{tp:117} [Zúñiga, F. 2006: 279 (108)] \cite{RefB:24}. If the suffix \emph{-mu-} of the form corresponds to the 2\textsuperscript{nd} person agent, slot 23, then this form is not possible following Smeets description. "The subject (s3) of a verb which takes the morpheme \emph{-mu-} s23 indicates first person. The participant which is deleted from the situation indicated by a \emph{-mu-} form must be second person. It cannot be first person because the subject marker indicates first person. The participant which is deleted from the situation cannot be third person (for then one would have used the passive marker \mbox{\emph{-nge-}}), nor can it be included in the subject referent (for then one would have used the reflexive marker \emph{-w-}) ... The suffix \emph{-mu-} is used when the total number of participants is greater than two. The number marker (slot 2) co-refers to the subject marker and may indicate singular, dual or plural" [Smeets, I. 2008: 268] \cite{RefB:21}. Following Smeets, and fitting in Zúñiga's translation, the verb should have been: \begin{example} \label{ex:271}\ \emph{taku-tu-nge-tu-y} lit: 'she was sheltered by herself'\\ \texttt{-TV.taku\_cubrir+TR.tu33+PASS.nge23+RE.tu16\\+IND.y4+3.Ø3} \end{example} Another possibility is that \emph{-mu-} corresponds to an alternative form for another suffix (that is not in our system) like \emph{-me-}, thither, slot 20 or \emph{-m-}, causative, slot 34. Finally, if we add the suffix \emph{-u} (dual) at the end of the form, we obtain an analysis, because this form implies the first person in its null form \emph{-Ø-}, but we distance from the meaning given by Zúñiga: \begin{example} \label{ex:272}\ \emph{taku-tu-mu-tu-y-u} 'you sheltered us both'\\ \texttt{-TV.taku\_cubrir+TR.tu33+2A.mu23+RE.tu16\\+IND.y4+1.Ø3+DL.u2} \end{example} \paragraph{uf-kün-tuku-pa-y \emph{'they camped in memory'}} \label{tp:118} [Zúñiga, F. 2006: 288 (Abuela\_Voz)] \cite{RefB:24}. First, note that this word is at a poem. Then, following Zúñiga's translation, roots and suffixes interpretations we do for this word are as follows: \begin{example} \label{ex:273}\ \emph{uf-kün-tuku-pa-y} lit: 'they tight up and put memory/knowledge there'\\ \texttt{-TV.uf\_apretar\_afirmar-TV.kim\_saber\_recordar\\-TV.tuku\_poner+HH.pa17+IND.y4+3.Ø3} \end{example} The first reason for this analysis not being produced by our machine is the three roots stem, as we have explained in \nameref{tp:110} (p. \pageref{tp:110}). Then, we are guessing the stem to be composed as \emph{uf-kün-tuku-}. Smeets collects \emph{üfi-} 'to become tight, to tighten' [Smeets, I. 2008: 567] \cite{RefB:21}. Augusta, F. \cite{RefB:03}, \emph{uf-ün} 'tighten the straws with bands (when roofing)', \emph{uf-tüku-n} 'tighten with tools'. But also \emph{üfü-n} 'tighten with something to tie'. So \emph{uf-} and \emph{üfi-} are, very likely, variants of each other. In Smeets' dictionary are \emph{kim-tuku-} 'to have known/un-derstood for some time' and \emph{kim-tu-} 'to remember' [Smeets, I. 2008: 559] \cite{RefB:21}. Febrés' dictionary presents \emph{kün-tüku-l-ün} 'make someone else to remember'; \emph{kün-tüku-n} 'to remember'; \emph{kün-tüku-pe-m} 'the memory' Febrés, A. \cite{RefB:03}. It is quite probable that \emph{kim-} and \emph{kün-} are also variants of each other. \emph{tuku-} and \emph{tüku-} are undoubtedly variants or each other, and it can not be \emph{tü-ku-} because there is no attested \emph{-ku-} suffix. \paragraph{wima-kütu-ye-nge-y \emph{'she was whipped'}} \label{tp:119} [Zúñiga, F. 2006: 281 (123)] \cite{RefB:24}. A more literal translation would be 'she was taken to be whipped all along' if the parts forming this verb are the ones we suggest: \emph{wima-} 'dipstick, thin stick'. \emph{-kütu-} it seems to corresponds to a suffix that adds the sense of 'all along'. Augusta defines it as 'suffix and post-position: (Variant used in \emph{Pangi}). From (temporarily). \emph{kuyfi \textbf{kütu}} 'from a long time'. Conjunction: and even, until' Augusta, F. \cite{RefB:03}. Valdivia recognises in it a locative sense, 'from and to; \emph{fa \textbf{kütu} tüye \textbf{kütu}} 'from here to there'' Valdivia, L. \cite{RefB:03}. Smeets only recognises it as an adverb, \emph{küto $ \sim $ kütu} 'even, also'. There is a root, though, that Smeets collects as \emph{weñangkü-} 'to get sad' [Smeets, I. 2008: 573] \cite{RefB:21}. Augusta collects it as \emph{weñang-} 'to have pain, annoyance, desire', but also \emph{weñang-kü-n} 'get sad'. So, maybe \emph{-kütu-} is formed by two suffixes \emph{-kü-tu-}, being \emph{-kü-} this suffix of the 'all along' sense, and \emph{-tu-} the transitivizer suffix. This is not totally rare in \emph{Mapudüngun}, see the case of \emph{llemay} in the note to E\ref{ex:67} (p. \pageref{ex:67}). Concluding, the verb is made up of a complex stem, which is formed by a 'noun root + 1 or 2 suffixes + verb root', possibly: \begin{example} \label{ex:274}\ \emph{wima-kü-tu-ye-nge-y} \\ \texttt{-NN.wima\_vara+THR.kü35+TR.tu33\\-TV.ye\_traer\_llevar+PASS.nge23+IND.y4+3.Ø3} \end{example} \begin{example} \label{ex:275}\ \emph{wima-kütu-ye-nge-y} \\ \texttt{-NN.wima\_vara+THR.kütu35\\-TV.ye\_traer\_llevar+PASS.nge23+IND.y4+3.Ø3} \end{example} We have tagged \texttt{THR} the new suffix, from 'through', that comes from the idea of 'all along'. An we have assigned it to slot 35, which seems to be a suitable position for this suffix, of course all of this is tentative. \paragraph{witra-n-püra-may-a-n \emph{'That raise it up'}} \label{tp:120} [Zúñiga, F. 2006: 284 (\emph{Ngillañmawün})] \cite{RefB:24}. The division we propose for this verb would give a meaning like 'I rose it up in assent' or ' I rose up my assenting X'. This way, the stem is complex and formed by three roots, a not allowed analysis in our system. The analysis would be: \begin{example} \label{ex:276}\ \emph{witra-n-püra-may-a-n} \\ \texttt{-TV.witra\_levantar+PVN.n4-IV.püra\_subir\\-TV.may\_asentir-CR.TV+NRLD.a9+IND1SG.n3} \end{example} \section{Public user interface} \label{sec:80} \paragraph{} \label{tp:121} In this section we briefly present the exploitation interface we have developed for open access to our analyser. The URL to access it is:\\ \href{http://www.chandia.net/dungupeyem}{http://www.chandia.net/dungupeyem} \begin{figure}[H] \includegraphics[width=\columnwidth,height=5.500cm]{figs/Fig10.eps} \caption{Analyser public web interface.} \label{fig:07} \end{figure} \begin{enumerate} \label{it:56} \item[] Numbers in figure \ref{fig:07} mark: \item Text box to paste or type \emph{Mapuche} words to be analysed. \item An e-mail field to add the user address in order to receive comments about unknown words. And the "analyse" button to submit the text. \item A field that allows to upload a .doc, .docx, .odt or .txt file to be analysed. \item A text field to input analyse glosses in order to generate \emph{Mapuche} words. \item A link to a contact form in case the user needs some feedback from us. \end{enumerate} \begin{figure}[H] \includegraphics[width=\columnwidth,height=2.500cm]{figs/Fig11.eps} \caption{Analysis results on screen.} \label{fig:08} \end{figure} Figure \ref{fig:08} shows the analysis results for the word \emph{amu-ke-fu-y} 'he used to go', where all tags are in blue and show the tag name when hovered. When the user uploads a file to be analysed, the system gives a link back to download a text file containing all the analyses. The user can review information about the tags on a complementary page called "Glosas del \emph{Düngupeyem}". There is also a search block available where tags and suffixes may be queried. Whenever a user submits an unknown word to the system, or uploads a file to analyse, we receive an e-mail with this information to check if there were some issues, and improve the system if necessary. \section{Conclusions} \label{sec:81} \paragraph{} \label{tp:122} The FST analyser has been developed and it has proved to be a reliable tool, of course it is improvable, and it can extend its use to other tools, something that we have already started to do, but not explained in this article, which is devoted to the analyser implementation, specifically in the \emph{Mapuche} verb treatment. Throughout this article, the process and results have been described in detail to explain the quality, scale and precision of the system. We continue working on tools derived from the analyser, which is the basic system for current and future work on automatic processing of \emph{Mapudüngun}. \begin{acknowledgements} We deeply and sincerely thank Iñaki Alegria who have guide us along the confection of this article. He has spent countless hours of revision to improve and present this work in a clear, concise and understandable manner. \end{acknowledgements}
\section{Introduction}\label{sec1} The Gamma function can be defined for $Re(x) > 0$ as \begin{equation} \Gamma(x) := \int \limits_{0}^{\infty} t^{x-1} \cdot e^{-t} \ dt \end{equation} known as the Eulerian integral of the second kind. In 1809 Legendre discovered a duplication formula for $x > 0$: \begin{equation} \Gamma(x) \cdot \Gamma(x + \frac{1}{2}) = \frac{\sqrt{\pi}}{2^{2x-1}} \cdot \Gamma(2x) \end{equation} In 1812 Gauß found the general multiplication formula for $x \in \mathbb{C} \setminus -\mathbb{N}_{0}$: \begin{equation} \forall \ n \in \mathbb{N}: \ \Gamma(x) \cdot \Gamma(x + \frac{1}{n}) \cdot ... \cdot \Gamma(x + \frac{n-1}{n}) = \frac{(2 \pi)^{\frac{n-1}{2}}}{n^{nx - \frac{1}{2}}} \cdot \Gamma(nx) \end{equation} The Euler Beta function can be defined for $Re(w)>0$ and $Re(z)>0$ as: \begin{equation} B(w,z) := \int \limits_{0}^{1} t^{w-1} \cdot (1-t)^{z-1} \ dt \end{equation} known as the Eulerian integral of the first kind. The central identity in the theory of the Beta function is \cite{remmert}: \begin{equation} \forall \ Re(w),Re(z) > 0: \ B(w,z) = \frac{\Gamma(w) \cdot \Gamma(z)}{\Gamma(z+w)} \end{equation} In 1749 Euler found the famous Euler relation: \begin{equation} \forall \ x \in \mathbb{C} \setminus \mathbb{Z}: \ \Gamma(x) \cdot \Gamma(1-x) = \frac{\pi}{sin(\pi x)} \end{equation} In 1796 the 19 year-old Gauß solved the problem of determining the length of the arc of the lemniscate in his diary. He defines the lemniscate arcsine function \cite{siegel}: \begin{equation} arcsl(x) := \int \limits_{0}^{x} \frac{1}{\sqrt{1-r^4}} \ dr \end{equation} and the lemniscate constant \begin{equation} \varpi := 2 \cdot \int \limits_{0}^{1} \frac{1}{\sqrt{1-r^4}} \ dr \end{equation} in analogy to the length of the arc of the circle \begin{equation} arcsin(x) := \int \limits_{0}^{x} \frac{1}{\sqrt{1-r^2}} \ dr \end{equation} and the half-length of the unit circle \begin{equation} \pi := 2 \cdot \int \limits_{0}^{1} \frac{1}{\sqrt{1-r^2}} \ dr \end{equation} Lastly, Euler and Gauß both knew of an identity involving the curva elastica \cite{euler}: \begin{equation} A \cdot B := (\int \limits_{0}^{1} \frac{1}{\sqrt{1-r^4}} \ dr) \cdot (\int \limits_{0}^{1} \frac{r^2}{\sqrt{1-r^4}} \ dr) = \frac{\pi}{4} \end{equation} \\ \\ \\ \section{Particular values of the Gamma function}\label{sec2} \begin{definition}\label{def1} The \textbf{n-th hyperelliptic constant} is defined for $n \in \mathbb{N}$ as \begin{equation} \pi_n := 2 \cdot \int \limits_{0}^{1} \frac{1}{\sqrt{1-r^n}} \ dr \end{equation} \end{definition} \begin{definition}\label{df2} The hyperelliptic \textbf{arcsine of n-th order} is defined for $n \in \mathbb{N}$ as \begin{equation} arcs_{n}(x) := \int \limits_{0}^{x} \frac{1}{\sqrt{1-r^n}} \ dr, \ x \in V_n := \left\{\begin{array}{lr} [-1,1] & \text{for n even}\\ (-\infty, 1], & \text{for n odd}\\ \end{array}\right\} \end{equation} \end{definition} \begin{proposition}\label{pr3} \begin{equation} \forall \ \lvert x \rvert < 1: arcs_n(x) = \sum_{k=0}^{\infty} \binom{2k}{k} \frac{x^{nk+1}}{4^{k} \cdot (nk+1)} \end{equation} and in particular we have \begin{equation} \frac{\pi_n}{2} = \sum_{k=0}^{\infty} \binom{2k}{k} \frac{1}{4^{k} \cdot (nk+1)} \end{equation} \end{proposition} \begin{proof} Let $ \lvert x \rvert \leq r < 1$ be arbitrary. \begin{equation*} arcs_n(x) = \int \limits_{0}^{x} \sum_{k=0}^{\infty} \binom{-1/2}{k} \cdot (-1)^{k} \cdot y^{nk} \ dy = \int \limits_{0}^{x} \sum_{k=0}^{\infty} \binom{2k}{k} \cdot \frac{y^{nk}}{4^{k}} \ dy \end{equation*} Since $\sum_{k=0}^{\infty} \binom{2k}{k} \cdot \frac{y^{nk}}{4^{k}}$ converges uniformally for $\lvert y \rvert \leq r$ we obtain: \begin{equation*} = \sum_{k=0}^{\infty} \binom{2k}{k} \frac{x^{nk+1}}{4^{k} \cdot (nk+1)} \ , \forall \ \lvert x \rvert \leq r \end{equation*} For every fixed $ \lvert x \rvert < 1$ and in particular for $x=1$, the series converges by comparison with the arcsine series. Abel's limit theorem yields the result. \end{proof} Our next goal is to find a halving formula by proving an auxiliary formula. \begin{proposition}\label{pr4} \begin{equation} \forall n \in \mathbb{N}: \ \frac{\Gamma(\frac{1}{n})^{2} \cdot 2^{\frac{2}{n} - 1}}{\Gamma(\frac{2}{n}) \cdot n} = \frac{\pi_n}{2} \end{equation} \end{proposition} \begin{proof} Let $m,n \in \mathbb{N}$. \\ \\ On the one hand we have: \begin{equation*} B(\frac{1}{2}, \frac{m}{n}) = \frac{\sqrt{\pi} \cdot \Gamma(\frac{m}{n})}{\Gamma(\frac{m}{n} + \frac{1}{2})} \end{equation*} On the other hand: \begin{equation*} B(\frac{1}{2}, \frac{m}{n}) = B(\frac{m}{n}, \frac{1}{2}) = \int \limits_{0}^{1} t^{\frac{m}{n} - 1} \cdot (1-t)^{- \frac{1}{2}} \ dt \end{equation*} Substituting $t := u^n$ yields: \begin{equation*} = n \cdot \int \limits_{0}^{1} \frac{u^{m-1}}{\sqrt{1 - u^{n}}} \ du \end{equation*} Therefore \begin{equation*} \frac{\sqrt{\pi} \cdot \Gamma(\frac{m}{n})}{\Gamma(\frac{m}{n} + \frac{1}{2})} = n \cdot \int \limits_{0}^{1} \frac{u^{m-1}}{\sqrt{1 - u^{n}}} \ du \end{equation*} For $m=1$ we obtain: \begin{equation*} \frac{\sqrt{\pi} \cdot \Gamma(\frac{1}{n})}{\Gamma(\frac{1}{n} + \frac{1}{2}) \cdot n} = \int \limits_{0}^{1} \frac{1}{\sqrt{1 - u^{n}}} \ du = \frac{\pi_n}{2} \end{equation*} \begin{equation*} \implies \frac{\sqrt{\pi}}{\Gamma(\frac{1}{n} + \frac{1}{2})} = \frac{n \cdot \pi_n}{\Gamma(\frac{1}{n}) \cdot 2} \end{equation*} \\ Rearranging the Legendre duplication formula for $x > 0$ yields: \begin{equation*} \frac{\sqrt{\pi}}{\Gamma(x + \frac{1}{2})} = \frac{\Gamma(x) \cdot 2^{2x - 1}}{\Gamma(2x)} \end{equation*} Setting $x = \frac{1}{n}$: \begin{equation*} \frac{\sqrt{\pi}}{\Gamma(\frac{1}{n} + \frac{1}{2})} = \frac{\Gamma(\frac{1}{n}) \cdot 2^{\frac{2}{n} - 1}}{\Gamma(\frac{2}{n})} \end{equation*} \\ Comparing both equations implies: \begin{equation*} \frac{n \cdot \pi_n}{\Gamma(\frac{1}{n}) \cdot 2} = \frac{\Gamma(\frac{1}{n}) \cdot 2^{\frac{2}{n} - 1}}{\Gamma(\frac{2}{n})} \end{equation*} \end{proof} \begin{theorem}\label{th5} \begin{equation} \forall n \in \mathbb{N}: \ \Gamma(\frac{1}{2n}) = \sqrt{\frac{\pi_{2n} \cdot \Gamma(\frac{1}{n}) \cdot 2n}{2^{\frac{1}{n}}}} \end{equation} \end{theorem} \begin{proof} Let $l \in \mathbb{N}$. \\ In Proposition $\ref{pr4}$ set $n = 2l$ and rearrange. \end{proof} \begin{corollary}\label{co6} \begin{equation} \forall n \in \mathbb{N}: \ \Gamma(\frac{1}{2^{n}}) = \prod_{k=1}^{n} (2^{n-1} \cdot \pi_{2^{k}})^{\frac{1}{2^{(n-k+1)}}} \end{equation} \end{corollary} \begin{proof} Let $n \in \mathbb{N}$. \\ \\ Initial case) For $n=1$: $\Gamma(\frac{1}{2}) = \sqrt{\pi_2} = \sqrt{\pi}$ \\ \\ Induction hypothesis) Suppose that our claim holds for arbitrary, but once chosen, fixed $n \in \mathbb{N}$. \\ \\ Induction step) For $n \mapsto n+1$: \begin{equation*} \Gamma(\frac{1}{2^{n+1}}) = \sqrt{\pi_{2^{n+1}} \cdot \Gamma(\frac{1}{2^n}) \cdot 2^n \cdot 2^{\frac{2^n - 1}{2^n}}} \end{equation*} \begin{equation*} = \sqrt{\pi_{2^{n+1}} \cdot 2^{n+1 - \frac{1}{2^n}}} \cdot \sqrt{\prod_{k=1}^{n} (2^{n-1} \cdot \pi_{2^{k}})^{\frac{1}{2^{(n-k+1)}}}} \end{equation*} \\ The 2 at the left now transfers the powers $\sum_{k=1}^{n} (\frac{1}{2})^k = 1 - \frac{1}{2^n}$ into the product. \\ \begin{equation*} = \sqrt{\pi_{2^{n+1}} \cdot 2^{n}} \cdot \sqrt{\prod_{k=1}^{n} (2^{n} \cdot \pi_{2^{k}})^{\frac{1}{2^{(n-k+1)}}}} \ = \ \prod_{k=1}^{n+1} (2^{n} \cdot \pi_{2^{k}})^{\frac{1}{2^{(n-k+2)}}} \end{equation*} \\ By the principle of induction, our claim holds for all $n \in \mathbb{N}$. \end{proof} \begin{example}\label{ex7} \begin{equation} \Gamma(\frac{1}{2}) = \sqrt{\pi_2} = \sqrt{\pi} \end{equation} \begin{equation} \Gamma(\frac{1}{4}) = \sqrt{2 \pi_4 \sqrt{2\pi_2}} = \sqrt{2 \varpi \sqrt{2\pi}} \end{equation} The Euler relation yields: \begin{equation} \Gamma(\frac{3}{4}) = \frac{\pi}{\sqrt{\varpi \sqrt{2 \pi}}} \end{equation} The pattern continues: \begin{equation} \Gamma(\frac{1}{8}) = \sqrt{4 \pi_8 \sqrt{4 \pi_4 \sqrt{4\pi_2}}} \end{equation} \\ In general we obtain for the "quarter-length" of the "unit curve" $q_n:= \frac{\pi_n}{2}$: \\ \begin{equation} \Gamma(\frac{1}{2^{n}}) = \sqrt{2^n \cdot q_{2^n} \cdot \sqrt{2^n \cdot q_{2^{(n-1)} \cdot \sqrt{... \cdot \sqrt{2^n \cdot q_{2}}}}}} \end{equation} \end{example} We will now try to get a more general division formula, again by proving an auxiliary formula. But first, we need to introduce auxiliary constants. \begin{definition}\label{def8} For $l,n,k \in \mathbb{N}$ and $l \geq 2$ and $k < l$ we define \begin{equation} \pi_{l,n,k} := 2 \cdot \int \limits_{0}^{1} \frac{1}{\sqrt[l]{(1-t^n)^{k}}} \ dt \end{equation} \end{definition} \begin{proposition}\label{pr9} \begin{equation} \frac{l^{\frac{l}{n} - \frac{1}{2}} \cdot \Gamma(\frac{1}{n})^{2} \cdot \Gamma(\frac{k}{l}) \cdot \prod \limits_{j=1,j \neq k}^{l-1} \Gamma(\frac{1}{n} + \frac{j}{l})}{(2 \pi)^{\frac{l-1}{2}} \cdot \Gamma(\frac{l}{n}) \cdot n} = \frac{\pi_{l,n,l-k}}{2} \end{equation} For $n,k,l \in \mathbb{N}$ and $l \geq 2$, where $\ 1 \leq k \leq l-1$ fixed. \end{proposition} \begin{proof} Let $n,k,l \in \mathbb{N}, \ l \geq 2, \ 1 \leq k \leq l-1$ fixed.\\ \\ On the one hand we have: \begin{equation*} B(\frac{1}{n}, \frac{k}{l}) = \frac{\Gamma(\frac{1}{n}) \cdot \Gamma(\frac{k}{l})}{\Gamma(\frac{1}{n} + \frac{k}{l})} \end{equation*} On the other hand, substituting $u^n := t$: \begin{equation*} B(\frac{1}{n}, \frac{k}{l}) = \int \limits_{0}^{1} t^{(\frac{1}{n} - 1)} \cdot (1-t)^{(\frac{k}{l} - 1)} \ dt \end{equation*} \begin{equation*} = n \cdot \int \limits_{0}^{1} \frac{1}{\sqrt[l]{(1-u^n)^{l-k}}} \ du = \frac{\pi_{l,n,l-k}}{2} \end{equation*} Therefore we have: \begin{equation*} \frac{2 \cdot \Gamma(\frac{1}{n}) \cdot \Gamma(\frac{k}{l})}{n \cdot \pi_{l,n,l-k}} = \Gamma(\frac{1}{n} + \frac{k}{l}) \end{equation*} \\ Rearranging the Gaußian multiplication formula and setting $x:= \frac{1}{n}$ yields: \\ \begin{equation*} \frac{(2 \pi)^{\frac{l-1}{2}} \cdot l^{(\frac{1}{2} - \frac{l}{n})} \cdot \Gamma(\frac{l}{n})}{\prod \limits_{j=0,j \neq k}^{l-1} \Gamma(\frac{1}{n} + \frac{j}{l})} = \Gamma(\frac{1}{n} + \frac{k}{l}) \end{equation*} By comparing both equations we get the desired result. \end{proof} \begin{theorem}\label{th10} \begin{equation} \Gamma(\frac{1}{l \cdot n}) = \sqrt{\frac{\Gamma(\frac{1}{n}) \cdot l \cdot n \cdot (2 \pi)^{\frac{l-1}{2}} \cdot l^{\frac{1}{2} - \frac{1}{n}} \cdot \pi_{l,l \cdot n,l-k}}{\Gamma(\frac{k}{l}) \cdot 2 \cdot \prod \limits_{j=1,j \neq k}^{l-1} \Gamma(\frac{1}{l \cdot n} + \frac{j}{l})}} \end{equation} For $n,k,l \in \mathbb{N}$ and $l \geq 2$, where $\ 1 \leq k \leq l-1$ is fixed. \end{theorem} \begin{proof} In Proposition \ref{pr9} replace $n$ by $l \cdot n$ and rearrange. \end{proof} A useful special case in the proof of Proposition \ref{pr9} is the following \begin{corollary}\label{co11} \begin{equation} \forall n \in \mathbb{N}: \ \frac{\Gamma(\frac{1}{n})^{2}}{\Gamma(\frac{2}{n}) \cdot n} = \frac{\pi_{n,n,n-1}}{2} \end{equation} \end{corollary} \begin{proof} In the proof of Proposition \ref{pr9}, we deduced \begin{equation*} \frac{2 \cdot \Gamma(\frac{1}{n}) \cdot \Gamma(\frac{k}{l})}{n \cdot \pi_{l,n,l-k}} = \Gamma(\frac{1}{n} + \frac{k}{l}) \end{equation*} Now set $l=n$ and $k=1$. \end{proof} This provides important information about dependencies between the auxiliary constants and the hyperelliptic constants. Therefore, the auxiliary constants should $\textbf{not}$ be seen as a generalisation of the hyperelliptic constants. \begin{corollary}\label{co12} \begin{equation} \forall n \in \mathbb{N}: \ \pi_{2n} = \frac{\pi_{2n,2n,2n-1}}{2^{(1 - \frac{1}{n})}} \end{equation} \end{corollary} \begin{proof} Let $n \in \mathbb{N}$. \\ Corollary $\ref{co11}$ also yields a halving formula: \begin{equation*} \frac{\Gamma(\frac{1}{2n})^{2}}{\Gamma(\frac{1}{n}) \cdot n} = \pi_{2n,2n,2n-1} \end{equation*} whereas Proposition $\ref{pr4}$ yields the halving formula: \begin{equation*} \frac{\Gamma(\frac{1}{2n})^{2}}{\Gamma(\frac{1}{n}) \cdot n} = \frac{\pi_{2n}}{2^{(\frac{1}{n} - 1)}} \end{equation*} By comparing both halving formulas, the result follows. \end{proof} \begin{remark}\label{re13} \begin{equation} \Gamma(\frac{1}{3}) = \sqrt[3]{\sqrt[2]{3} \cdot \pi_{3} \cdot \pi_{2} \cdot \sqrt[3]{2}} \end{equation} \end{remark} \begin{proof} In the proof of Proposition $\ref{pr4}$ we deduced: \begin{equation}\label{eqkk} \frac{\sqrt{\pi} \cdot \Gamma(\frac{1}{n})}{\Gamma(\frac{1}{n} + \frac{1}{2}) \cdot n} = \int \limits_{0}^{1} \frac{1}{\sqrt{1 - u^{n}}} \ du \end{equation} Setting $n=3$: \begin{equation*} \frac{\sqrt{\pi} \cdot \Gamma(\frac{1}{3})}{\Gamma(\frac{5}{6}) \cdot 3} = \int \limits_{0}^{1} \frac{1}{\sqrt{1 - u^{3}}} \ du \end{equation*} By Legendres duplication formula we have: \begin{equation*} \Gamma(\frac{5}{6}) = \Gamma(\frac{1}{3} + \frac{1}{2}) = \frac{\frac{\sqrt{\pi}}{2^{\frac{2}{3} - 1}} \cdot \Gamma(\frac{2}{3})}{\Gamma(\frac{1}{3})} \end{equation*} Applying the Euler relation, we get in total: \begin{equation}\label{eqk} \frac{\Gamma(\frac{1}{3})^3}{\sqrt{3} \cdot \pi \cdot \sqrt[3]{2^4}} = \int \limits_{0}^{1} \frac{1}{\sqrt{1 - u^{3}}} \ du = \frac{\pi_3}{2} \end{equation} \end{proof} The integral identities $\ref{eqk}$ and $\ref{eqkk}$ were remarked by Konrad Königsberger and can be found in his book \cite{koenigsberger}. \\ In the book \cite{freitag} by Freitag and Busam, we find the identity \begin{equation} \Gamma(\frac{1}{6}) = 2^{- \frac{1}{3}} \cdot (\frac{3}{\pi})^{\frac{1}{2}} \cdot \Gamma(\frac{1}{3})^2 \end{equation} Applying the halving formula to $\ref{re13}$ we obtain \begin{equation} \Gamma(\frac{1}{6}) = \sqrt[2]{\pi_6 \cdot 3 \cdot \sqrt[3]{4 \cdot \sqrt[3]{2} \cdot \sqrt[2]{3} \cdot \pi_2 \cdot \pi_3}} \end{equation} plugging in the values into the identity, we obtain \begin{remark}\label{re14} \begin{equation} \pi_6 = \sqrt{3} \cdot \frac{\pi_3}{2} \end{equation} \end{remark} This is plausible, because by definition \begin{remark}\label{re15} \begin{equation} \lim_{n \to \infty} q_n = \lim_{n \to \infty} \frac{\pi_n}{2} = 1 \end{equation} \end{remark} Remark $\ref{re14}$ leads to the following question: Which hyperelliptic constants are algebraically independent of each other? I suspect the following \begin{conjecture}\label{co16} Let $n \in \mathbb{N}$ be composite and $n \neq p^m$ for $p \in \mathbb{P}, m \in \mathbb{N}_{0}$. Then there exists $d \ \vert \ n$ with $1 < d < n$, such that $\pi_n$ and $\pi_d$ are $\overline{ \mathbb{Q}}$-linearly dependent. \end{conjecture} Now what is the nature of the hyperelliptic constants? Are they irrational, or even transcendental? Thanks to a theorem by Theodor Schneider in \cite{schneider}, we immediately conclude the answer. \begin{schneider}\label{th17} For all $\ a, b \in \mathbb{Q} \setminus \mathbb{Z}$ it holds, that $B(a,b)$ is transcendental. \end{schneider} \begin{corollary}\label{co18} For all $n \geq 2$ it holds, that $\pi_n$ is transcendental. \end{corollary} \begin{proof} Let $n \geq 2$ be arbitrary. \\ \\ In the proof of proposition $\ref{pr4}$, we deduced: \begin{equation*} B(\frac{1}{2}, \frac{m}{n}) = n \cdot \int \limits_{0}^{1} \frac{u^{m-1}}{\sqrt{1 - u^{n}}} \ du \end{equation*} \begin{equation*} \implies \frac{2}{n} \cdot B(\frac{1}{2}, \frac{1}{n}) = \pi_n \end{equation*} Suppose, $\pi_n$ would be algebraic. \begin{equation*} \implies \pi_n \cdot \frac{n}{2} = B(\frac{1}{2}, \frac{1}{n}) \end{equation*} algebraic, which contradicts Schneider's theorem. \end{proof} We now turn our attention to the mysterious identity involving the curva elastica. It seems, that the ratio of powers might determine which hyperelliptic constant appears. \begin{proposition}\label{pr19} \begin{equation} \forall n \in \mathbb{N} : \ A_{2n} \cdot B_{\frac{n}{2n}}:= \ (\int \limits_{0}^{1} \frac{1}{\sqrt{1-t^{2n}}} \ dt) \cdot (\int \limits_{0}^{1} \frac{t^n}{\sqrt{1-t^{2n}}} \ dt) = \frac{\pi}{2n} \end{equation} \begin{equation} \iff \forall n \in \mathbb{N} : \ \int \limits_{0}^{1} \frac{t^n}{\sqrt{1-t^{2n}}} \ dt = \frac{\pi_2}{n \cdot \pi_{2n}} \end{equation} \end{proposition} \begin{proof} Using the taylor series of $arcs_n$ in Proposition $\ref{pr3}$: \begin{equation*} (\int \limits_{0}^{1} \frac{1}{\sqrt{1-t^{2k}}} \ dt) \cdot (\int \limits_{0}^{1} \frac{t^k}{\sqrt{1-t^{2k}}} \ dt) \end{equation*} \begin{equation*} = (\sum \limits_{k=0}^{\infty} \binom{2k}{k} \cdot \frac{1}{4^k \cdot (2nk+1)}) \cdot (\sum \limits_{k=0}^{\infty} \binom{2k}{k} \cdot \frac{1}{4^k \cdot (2nk + n +1)}) \end{equation*} Taking the Cauchy product, one verifies: \begin{equation*} = \frac{1}{n} \cdot \sum \limits_{k=0}^{\infty} \binom{2k}{k} \cdot \frac{1}{4^k \cdot (2k+1)} \end{equation*} \end{proof} We may now conclude \begin{theorem}\label{th20} \begin{equation} \forall k \in \mathbb{N}: \ \frac{\Gamma(\frac{k+1}{2k})}{\Gamma(\frac{2k+1}{2k})} = \frac{2k \cdot \Gamma(\frac{k+1}{2k})}{\Gamma(\frac{1}{2k})} = \frac{\sqrt{\pi_2} \cdot 2}{\pi_{2k}} \end{equation} \end{theorem} \begin{proof} On the one hand by the integral formula in Proposition $\ref{pr19}$: \begin{equation*} \int \limits_{0}^{1} \frac{t^k}{\sqrt{1-t^{2k}}} \ dt = \frac{\pi}{k \cdot \pi_{2k}} \end{equation*} On the other hand by the identity in the proof of Proposition $\ref{pr4}$: \begin{equation*} \int \limits_{0}^{1} \frac{u^{m-1}}{\sqrt{1 - u^{n}}} \ du = \frac{\sqrt{\pi} \cdot \Gamma(\frac{m}{n})}{\Gamma(\frac{m}{n} + \frac{1}{2}) \cdot n} \end{equation*} For $m=k+1, \ n= 2k$: \begin{equation*} \frac{\Gamma(\frac{k+1}{2k})}{\Gamma(\frac{2k+1}{2k})} = \frac{\sqrt{\pi_2} \cdot 2}{\pi_{2k}} \end{equation*} \end{proof} If we had more integral formulas, we would have more identities for values of the Gamma function by the same proof. \begin{corollary}\label{co21} \begin{equation} \forall n \geq 2: \ \Gamma(\frac{2^{n-1} + 1}{2^n}) = \frac{1}{2^{n-1}} \cdot \frac{\sqrt{\pi_2}}{\pi_{2^n}} \cdot \Gamma(\frac{1}{2^n}) \end{equation} \end{corollary} \begin{proof} In Theorem $\ref{th20}$, set $k = 2^{n-1}$ and use Corollary $\ref{co6}$. \end{proof} For the sake of completion, by Corollary $\ref{co6}$ and the Euler relation and knowing that \begin{equation} \forall n \geq 2: \ sin(\frac{\pi}{2^n}) = \frac{\sqrt{2-\sqrt{2 + \sqrt{2 + \sqrt{...}}}}}{2} \end{equation} with $(n-1)$ nested square-roots, we have for $n \geq 2$: \begin{remark}\label{re22} \begin{equation} \Gamma(\frac{2^n - 1}{2^n}) = \frac{2 \cdot \pi_2}{(\ \sqrt{2^{n-1} \cdot \pi_{2^n} \cdot \sqrt{2^{n-1} \cdot \pi_{2^{(n-1)} \cdot \sqrt{... \cdot \sqrt{2^{n-1} \cdot \pi_{2}}}}}} \ ) \cdot ( \ \sqrt{2-\sqrt{2 + \sqrt{2 + \sqrt{...}}}} \ )} \end{equation} \end{remark} For computation, note that $\Gamma(\frac{1}{2^n})$ has $n$ nested square-roots, whereas $sin(\frac{\pi}{2^n})$ only has $(n-1)$ nested square-roots. \begin{theorem}\label{th23} \begin{equation} \forall n \in \mathbb{N}: \ \Gamma(\frac{2+n}{2n}) = \frac{\Gamma(\frac{1}{n}) \cdot 2 \cdot \sqrt{\pi}}{n \cdot \pi_n} \end{equation} \end{theorem} \begin{proof} Let $n \in \mathbb{N}$ be arbitrary. \\ \\ By the Legendre duplication formula for $x = \frac{1}{n}$ we have: \begin{equation*} \Gamma(\frac{2}{n}) = \frac{\Gamma(\frac{1}{n}) \cdot \Gamma(\frac{2+n}{2n}) \cdot 2^{(\frac{2}{n}-1)}}{\sqrt{\pi}} \end{equation*} Comparison with the duplication formula in Proposition $\ref{pr4}$ yields: \begin{equation*} \frac{\Gamma(\frac{1}{n})}{n \cdot \pi_n} = \frac{\Gamma(\frac{2+n}{2n}) \cdot 2^{-1}}{\sqrt{\pi}} \end{equation*} \end{proof} \section{Trigonometric functions}\label{sec3} Let $V_n := \left\{\begin{array}{lr} [-1,1] & \text{for n even}\\ (-\infty, 1], & \text{for n odd}\\ \end{array}\right\}$ and $D_n := \left\{\begin{array}{lr} \mathbb{R} & \text{for n even}\\ \left[-1, \infty \right), & \text{for n odd}\\ \end{array}\right\}$. \begin{definition}\label{def24} The hyperelliptic \textbf{arcus sinus of n-th order} for the case k is defined as \begin{equation} arcs_{k,n}(x) := \int \limits_{0}^{x} \frac{1}{\sqrt[k]{1-t^{n}}} \, dt \ , \ \ n,k \in \mathbb{N} , \ x \in V_n, \ k \geq 2 \end{equation} \end{definition} \begin{definition}\label{def25} The hyperelliptic \textbf{arcus cosinus of n-th order} for the case k is defined as \begin{equation} arcc_{k,n}(x) := \int \limits_{x}^{1} \frac{1}{\sqrt[k]{1-t^{n}}} \ dt \ ,\ n,k \in \mathbb{N}, \ x \in V_n, \ k \geq 2 \end{equation} \end{definition} \begin{definition}\label{def26} The hyperelliptic \textbf{area sinus hyperbolicus of n-th order} for the case k is defined as \begin{equation} ars_{k,n}h(x) := \int \limits_{0}^{x} \frac{1}{\sqrt[k]{1+t^{n}}} \ dt \ ,\ n,k \in \mathbb{N}, \ x \in D_n, \ k \geq 2 \end{equation} \end{definition} \begin{definition}\label{def27} The hyperelliptic \textbf{area cosinus hyperbolicus of n-th order} for the case k is defined as \begin{equation} arc_{k,n}h(x) := \int \limits_{1}^{x} \frac{1}{\sqrt[k]{t^n - 1}} \ dt \ , \ n,k \in \mathbb{N} \ , \ x \geq 1, \ k \geq 2 \end{equation} \end{definition} The reason why we introduced k-th roots, will become apparent later on. All functions are strictly monotonically increasing on their respective domain of definition, therefore restriction of the domain of values to the image leads to the following inverse functions. \begin{definition}\label{def28} The hyperelliptic \textbf{sinus of n-th order} for the case k is defined as \begin{equation} s_{k,n}(x) := arcs_{k,n}^{-1}(x), \ x \in arcs_{k,n}(V_n) \end{equation} \end{definition} \begin{definition}\label{def29} The hyperelliptic \textbf{cosinus of n-th order} for the case k is defined as \begin{equation} c_{k,n}(x) := arcc_{k,n}^{-1}(x), \ x \in arcc_{k,n}(V_n) \end{equation} \end{definition} \begin{definition}\label{def30} The hyperelliptic \textbf{sinus hyperbolicus of n-th order} for the case k is defined as \begin{equation} s_{k,n}h(x) := ars_{k,n}h^{-1}(x), \ x \in ars_{k,n}h(D_n) \end{equation} \end{definition} \begin{definition}\label{def31} The hyperelliptic \textbf{cosinus hyperbolicus of n-th order} for the case k is defined as \begin{equation} c_{k,n}h(x) := arc_{k,n}h^{-1}(x), \ x \in arc_{k,n}h(\left[1, \infty \right)) \end{equation} \end{definition} The following power series induce analytic continuations on $\mathbb{E}$. \begin{remark} \begin{equation} \forall \ \lvert x \lvert \ < 1: \ arcs_{k,n}(x) = \sum_{m=0}^{\infty} \binom{- \frac{1}{k}}{m} \cdot (-1)^m \cdot \frac{x^{mn+1}}{mn+1} \end{equation} \begin{equation} \forall \ \lvert x \lvert \ < 1: \ arcc_{k,n}(x) = \sum_{m=0}^{\infty} \binom{- \frac{1}{k}}{m} \cdot (-1)^m \cdot \frac{(1 - x^{mn+1})}{mn+1} \end{equation} \begin{equation} \forall \ \lvert x \lvert \ < 1: \ ars_{k,n}h(x) = \sum_{m=0}^{\infty} \binom{- \frac{1}{k}}{m} \cdot \frac{x^{mn+1}}{mn+1} \end{equation} \end{remark} Now we recall, that the following holds: \begin{equation} \forall z \in \mathbb{C}: \ exp(z) = cosh(z) + sinh(z) \end{equation} By this definition, we are combining both power series, filling up the gaps. \begin{definition}\label{def32} For $x \in ars_{k,n}h(D_n) \ \cap \ arc_{k,n}h(\left[1, \infty \right))$, we define \begin{equation} e_{k,m,n}(x) := c_{k,n}h(x) + s_{m,n}h(x) \ , \ k,m,n \in \mathbb{N} ,\ k,m \geq 2 \end{equation} \end{definition} We introduce the notations \begin{equation} \zeta_{n}^{k} \ := \ exp(\frac{2 \pi i \cdot k}{n}) ; \ k,n \in \mathbb{N} \end{equation} \begin{equation} [a,z] \ : \ [0,1] \to \mathbb{C}, \ t \mapsto a + t(z-a) \end{equation} \begin{theorem}\label{th33} $\forall \ z \in ars_{m,n}h(\mathbb{E}) \ \cap \ arcc_{k,n}(\mathbb{E})$, we have \begin{equation} e_{k,m,n}(z) = c_{k,n}(\zeta_{2k}^{l} \cdot z) + \zeta_{2n}^{\mu} \cdot s_{m,n}(\zeta_{2n}^{2n - \mu} \cdot z) \end{equation} For $\ l=2v-1, \ \mu = 2w-1,$ where $v,w,k,m,n \in \mathbb{N}$ and $k,m,n \geq 2$, such that \\ $l$ and $\mu$ are selected according to the respective branch. \end{theorem} \begin{proof} Let $v,w,k,m,n \in \mathbb{N}$ and $k,m,n \geq 2$. \\ Let $l=2v-1$ and $\mu = 2w-1$. \\ Let $w \in \mathbb{E}$. \\ \\ $\psi(u) := \zeta_{2n}^{\mu} u$ effects a biholomorphic mapping. \begin{equation*} ars_{m,n}h(w) = \int \limits_{[0,w]} \frac{1}{\sqrt[m]{1 + u^n}} \ du = \zeta_{2n}^{\mu} \cdot \int \limits_{[0, \zeta_{2n}^{2n - \mu} w]} \frac{1}{\sqrt[m]{1 - v^n}} \ dv = \zeta_{2n}^{\mu} \cdot arcs_{m,n}(\zeta_{2n}^{2n - \mu} w) \end{equation*} Let $s_{m,n}h(z) = w$. It follows that \begin{equation*} \zeta_{2n}^{\mu} \cdot s_{m,n}(\zeta_{2n}^{2n - \mu} \cdot z) = s_{m,n}h(z) \end{equation*} \\ As $2k$ is even, $\zeta_{2k}^{2k-l}$ is one solution of $- \frac{1}{\sqrt[k]{-1}}$, where $l$ is selected according to the branch of $arc_{k,n}h$. \begin{equation*} arc_{k,n}h(w) = \int \limits_{[1,w]} \frac{1}{\sqrt[k]{u^n - 1}} \ du = \zeta_{2k}^{2k-l} \cdot \int \limits_{[w,1]} \frac{1}{\sqrt[k]{1 - u^n}} \ du = \zeta_{2k}^{2k-l} \cdot arcc_{k,n}(w) \end{equation*} As $arcc_{k,n}$ is defined on $\mathbb{E}$, this induces an analytic continuation of $arc_{k,n}h$ on $\mathbb{E}$ after selecting a branch. \\ \\ Let $c_{k,n}h(z) = w$. It follows that \begin{equation*} c_{k,n}(\zeta_{2k}^{l} \cdot z) = c_{k,n}h(z) \end{equation*} \end{proof} Note, that the trivial case $n=1$ was excluded. \\ For the hyperelliptic cases $n > 4$, addition theorems are needed to extend the respective domains of definition. \begin{example}\label{ex34} In the elliptic case $k=m=2$ for $l = \mu = 1$ for the circle $n=2$, we already know: \begin{equation} e_{2,2,2}(\zeta_{4}^{1} \cdot \phi) = c_{2,2}(\phi) + \zeta_{4}^{1} \cdot s_{2,2}(\phi) \end{equation} \end{example} \begin{corollary}\label{co35} In the elliptic case $k=m=2$ for $l = \mu = 1$ for the lemniscate $n=4$, we obtain: \begin{equation} e_{2,2,4}(\zeta_{8}^{1} \cdot \phi) = c_{2,4}(i \cdot \zeta_{8}^{1} \cdot \phi) + \zeta_{8}^{1} \cdot s_{2,4}(\phi) \end{equation} \end{corollary} The reason for the k-th root is, that it allows us to obtain analogues of the Euler equation. \begin{corollary}\label{co36} For $n=2w+1$, in the case $k=n$ and $l = \mu = n$, we obtain an Euler equation for odd n. \begin{equation} e_{n,m,n}(\zeta_{2n}^{n} \cdot \phi) = c_{n,n}(\phi) + \zeta_{2n}^{n} \cdot s_{m,n}(\phi) \ ; \ m,w \in \mathbb{N}; \ m \geq 2 \end{equation} \end{corollary} \begin{corollary}\label{co37} For $n=2w$, in the case $k=n$ and $\mu = n-1$, $l = n+1$, we obtain an Euler equation for even n. \begin{equation} e_{n,m,n}(\zeta_{2n}^{n-1} \cdot \phi) = c_{n,n}(\phi) + \zeta_{2n}^{n-1} \cdot s_{m,n}(\phi) \ ; \ m,w \in \mathbb{N}; \ m \geq 2 \end{equation} \end{corollary} It is possible to define $l_{k,m,n}(x) := e_{k,m,n}^{-1}(x)$, but we will not pursue this matter further here. \section{Definition of the Gamma function}\label{sec4} If we take the n-th derivative after the parameter in the Eulerian integral of the second kind, the term $ln(t)^n$ appears. This creates unnecessary complications. Therefore in \begin{equation*} \Gamma^{(1)}(s) = \int \limits_{0}^{\infty} ln(t) \cdot t^{s-1} \cdot e^{-t} \ dt \end{equation*} we substitute $x:= ln(t)$ and arrive at the following \begin{definition}\label{def38} We define the Gamma function for all $Re(s)>0$ as \begin{equation} \Gamma(s) := \int \limits_{-\infty}^{\infty} e^{s \cdot x} \cdot e^{-(e^x)} \ dx \end{equation} \end{definition} This is an unpublished definition by Carl Friedrich Gauß \footnote{According to the commentator Schering, it was jotted down on his hand copy of Disqu. gen. circa seriem etc., claiming that it is the best definition for $\Pi$.} \cite{gauss}. \\ Substituting $x := ln(t)$, this definition is equivalent to the Eulerian integral of the second kind. \\ The functional equation follows by partial integration of $e^{s \cdot x}$ and \begin{equation*} \lim_{x \to - \infty} (\frac{1}{s} \cdot e^{(sx - e^x)}) = \lim_{x \to + \infty} (\frac{1}{s} \cdot e^{(sx - e^x)}) = 0 \end{equation*} We also have for all $Re(s)>0$: \begin{equation} \forall n \in \mathbb{N}_{0}: \ \Gamma^{(n)}(s) = \int \limits_{-\infty}^{\infty} x^n \cdot e^{(sx - e^x)} \ dx \end{equation} \begin{theorem}\label{th39} For $Re(s)>0$ we have \begin{equation} \forall n \in \mathbb{N}_{0}: \ \Gamma^{(n)}(s) + \frac{s}{n+1} \cdot \Gamma^{(n+1)}(s) = \frac{1}{n+1} \cdot \Gamma^{(n+1)}(s+1) \end{equation} \end{theorem} \begin{proof} Let $Re(s)>0$, let $n \in \mathbb{N}_0$ be arbitrary. \begin{equation*} \Gamma^{(n)}(s) = \int \limits_{-\infty}^{\infty} x^n \cdot e^{(sx - e^x)} \ dx \end{equation*} \begin{equation*} = \left[ \frac{1}{n+1} \cdot x^{n+1} \cdot e^{(sx - e^x)} \right]_{- \infty}^{+ \infty} - \frac{1}{n+1} \cdot \int \limits_{-\infty}^{\infty} s \cdot x^{n+1} \cdot e^{(sx - e^x)} - x^{n+1} \cdot e^{((s+1)x - e^x)} \ dx \end{equation*} It follows that \begin{equation*} \int \limits_{-\infty}^{\infty} x^n \cdot e^{(sx - e^x)} \ dx + \frac{s}{n+1} \cdot \int \limits_{-\infty}^{\infty} x^{n+1} \cdot e^{(sx - e^x)} \ dx - \frac{1}{n+1} \cdot \int \limits_{-\infty}^{\infty} x^{n+1} \cdot e^{((s+1)x - e^x)} \ dx \end{equation*} \begin{equation*} = \left[ \frac{1}{n+1} \cdot x^{n+1} \cdot e^{(sx - e^x)} \right]_{- \infty}^{+ \infty} \end{equation*} And \begin{equation*} \lim_{x \to - \infty} (\frac{1}{n+1} \cdot x^{n+1} \cdot e^{(sx - e^x)}) = \lim_{x \to + \infty} (\frac{1}{n+1} \cdot x^{n+1} \cdot e^{(sx - e^x)}) = 0 \end{equation*} \end{proof} Rearranging theorem $\ref{th39}$ for $\Gamma^{(n)}(s)$, it follows inductively for $N \in \mathbb{N}_{0}$ that \begin{equation} \Gamma(s) = \sum_{n=0}^{N} (-1)^n \cdot \frac{\Gamma^{(n+1)}(s+1)}{(n+1)!} \cdot s^n + (-1)^{N+1} \cdot \frac{\Gamma^{(N+1)}(s)}{(N+1)!} \cdot s^{N+1} \end{equation} taking the limit $N \to \infty$ we conclude: \begin{corollary}\label{co40} \begin{equation} \forall \ Re(s)>0: \ \Gamma(s) = \sum_{n=0}^{\infty} (-1)^n \cdot \frac{\Gamma^{(n+1)}(s+1)}{(n+1)!} \cdot s^n \end{equation} \end{corollary} The derivative behaviour of the Gaußian parameter integral is remarkable. On a side note, if we define for $Re(s)>0$ \begin{equation*} f(s,x) := e^{(sx -e^x)} \end{equation*} we have \begin{remark}\label{re41} \begin{equation} \int \limits_{-\infty}^{\infty} \frac{\partial f(s,x)}{\partial x} \ dx = s \cdot \Gamma(s) - \Gamma(s+1) = 0 \end{equation} \end{remark} \begin{proof} \begin{equation*} \int \limits_{-\infty}^{\infty} \frac{\partial f(s,x)}{\partial x} \ dx = \int \limits_{-\infty}^{\infty} e^{(sx-e^x)} \cdot (s - e^x) \ dx \end{equation*} \end{proof} Now, if we define for $n \in \mathbb{N}_{0}$ \begin{equation} f_n(s,x) := x^n \cdot e^{(sx - e^x)} \end{equation} By the same reasoning, we have \begin{remark}\label{re42} \begin{equation} \forall n \in \mathbb{N}_0 : \ \int \limits_{-\infty}^{\infty} \frac{\partial f_n(s,x)}{\partial x} \ dx = n \cdot \Gamma^{(n-1)}(s) + s \cdot \Gamma^{(n)}(s) - \Gamma^{(n)}(s+1) = 0 \end{equation} \end{remark} \section{Applications}\label{sec5} It is well known, that the singular values $K(\lambda^*(n))$ of the complete elliptic integral, where $\lambda^*(n) := \sqrt{\lambda(i \cdot \sqrt{n})}$ and $\lambda$ the modular lambda function, are expressible via the Gamma function \cite{wolfram}. We obtain the following values: \begin{equation} K(\lambda^*(1)) = K(\frac{1}{\sqrt{2}}) = \frac{\varpi}{\sqrt{2}} \end{equation} \begin{equation} K(\lambda^*(3)) = K(\frac{\sqrt{6} - \sqrt{2}}{4}) = \frac{\sqrt{3 \sqrt{3}} \cdot \pi_3}{4} \end{equation} \begin{equation} K(\lambda^*(4)) = K((\sqrt{2} - 1)^2) = \frac{\varpi}{\sqrt{8}} + \frac{\varpi}{4} \end{equation} \begin{equation} K(\lambda^*(9)) = K(\frac{(\sqrt{3}-1) \cdot (\sqrt{2} - \sqrt[4]{3})}{2}) = \sqrt{\frac{\sqrt{3}}{9} + \frac{1}{6}} \cdot \varpi \end{equation} \begin{equation} K(\lambda^*(16)) = K((\sqrt{2} + 1)^2 \cdot (\sqrt[4]{2}-1)^4) = \frac{(\sqrt[4]{2} + 1)^2 \cdot \varpi}{2^3} \end{equation} \begin{equation} K(\lambda^*(25)) = K(\frac{(\sqrt{10} - 2 \cdot \sqrt{2}) \cdot (3 - 2 \cdot \sqrt[4]{5})}{2}) = \frac{\sqrt{2}}{5} \cdot \varpi + \frac{1}{\sqrt{10}} \cdot \varpi \end{equation} \\ Certain limits of the arithmetic-geometric-mean are also expressible via the Gamma function \cite{wikipedia}. We obtain the following values: \begin{equation} AGM(1,\sqrt{2}) = \frac{\pi}{\varpi} \end{equation} \begin{equation} AGM(2, \sqrt{2 + \sqrt{3}}) = \frac{4 \cdot \pi_2}{\sqrt[4]{27} \cdot \pi_3} \end{equation} \begin{equation} AGM(1+\sqrt{3}, \sqrt{8}) = \frac{\sqrt[12]{2^{27}} \cdot \pi_2}{\sqrt[4]{3 \cdot 4 \cdot \pi_{6}^{3} \cdot \sqrt[2]{3} \cdot \pi_3}} \end{equation} Since \begin{equation*} K(k) = \frac{\pi}{2 \cdot AGM(1, \sqrt{1-k^2})} \end{equation*} and \begin{equation*} \lambda^{*}(x)^2 + \lambda^{*}(\frac{1}{x})^2 = 1 \end{equation*} we have for $n \in \mathbb{N}$ \begin{equation} AGM(1, \lambda^{*}(\frac{1}{n})) = \frac{\pi}{2 \cdot K(\lambda^{*}(n))} \end{equation} \\ It is possible, that hyperelliptic constants appear for certain values of sums of type \begin{equation} \sum_{k=0}^{\infty} \frac{\zeta_{n}^{k}}{(ak+b)^s}, \ a,b,n \in \mathbb{N}, \ s \in \mathbb{C} \end{equation} \\ because by well known identities, we have for the Dirichlet beta function \begin{equation} \beta(2) = \sum \limits_{k=0}^{\infty} \frac{(-1)^k}{(2k+1)^2} = \frac{\psi^{(1)}(\frac{1}{4})}{16} - \frac{\psi^{(1)}(\frac{3}{4})}{16} \end{equation} which yields \begin{equation} \beta(2) = \frac{\Gamma^{(2)}(\frac{1}{4})}{16} \cdot \frac{1}{\sqrt{2 \varpi \sqrt{2 \pi}}} - \frac{\Gamma^{(2)}(\frac{3}{4})}{16} \cdot \frac{\sqrt{\varpi \sqrt{2 \pi}}}{\pi} - \frac{\pi}{8} \cdot (\gamma + 3 \cdot ln(2)) \end{equation} suggesting, that $\pi_4 = \varpi$ may appear in the final value. \\ Note, that the denominator in the trigamma function seems to match up with the hyperelliptic constant. \\ For the Riemann zeta function, we have \begin{equation} \zeta(3) = - \frac{\psi^{(2)}(1)}{2} \end{equation} which yields \begin{equation} \zeta(3) = - \frac{1}{2} \cdot \Gamma^{(3)}(1) - \gamma \cdot \frac{\pi^2}{4} - \frac{1}{2} \cdot \gamma^3 \end{equation} suggesting, that $\pi_2 = \pi$ may appear in the final value. \\ By the functional equation \begin{equation*} \zeta(s) = 2^{s} \cdot \pi^{s-1} \cdot sin(\frac{\pi s}{2}) \cdot \Gamma(1-s) \cdot \zeta(1-s) \end{equation*} we compute for $s = \frac{3}{4}$ \begin{equation} \frac{\zeta(\frac{3}{4})}{\zeta(\frac{1}{4})} = \sqrt{(2 + \sqrt{2}) \cdot 2 \varpi} \end{equation} Now setting $s = \frac{2^{n} - 1}{2^{n}}$ we have \begin{equation*} \frac{\zeta(\frac{2^{n} - 1}{2^{n}})}{\zeta(\frac{1}{2^{n}})} = \frac{\sqrt{2 + \sqrt{2 + \sqrt{...}}} \cdot \sqrt{2^{n-1} \cdot \pi_{2^n} \sqrt{... \sqrt{2^{n-1} \cdot \pi_2}}}}{\sqrt[2^n]{2 \pi_2}} \end{equation*} therefore \begin{equation} \forall \ n \in \mathbb{N}: \ \frac{\zeta(\frac{2^{n} - 1}{2^{n}})}{\zeta(\frac{1}{2^{n}})} = \sqrt{2 + \sqrt{2 + \sqrt{...}}} \cdot \sqrt{2^{n-1} \cdot \pi_{2^n} \sqrt{... \sqrt{2^{n-1} \cdot \pi_4 \sqrt{2^{n-2}}}}} \end{equation} with $n$ nested square-roots, respectively. \\ \\ A superellipse is defined for $n \in \mathbb{N}$ and $a,b > 0$ as \begin{equation} C_n : \ \lvert \frac{x}{a} \lvert^{n} \ + \ \lvert \frac{y}{b} \lvert^{n} \ = 1 \end{equation} It is well known, that the area is given by \begin{equation} A_{C_{n}} = 4 \cdot ab \cdot \frac{\Gamma(\frac{n+1}{n})^2}{\Gamma(\frac{n+2}{n})} = 4 \cdot ab \cdot \frac{1}{2n} \cdot \frac{\Gamma(\frac{1}{n})^2}{\Gamma(\frac{2}{n})} \end{equation} For the case $n = 2^{\nu}$ we calculate \begin{equation*} A_{C_{2^{\nu}}} = 4 \cdot ab \cdot \frac{1}{2^{\nu + 1}} \cdot \frac{2^{\nu - 1} \cdot \pi_{2^{\nu}} \cdot \sqrt{2^{\nu - 1} \cdot \pi_{2^{\nu - 1} \cdot \sqrt{...}}}}{\sqrt{2^{\nu - 2} \cdot \pi_{2^{\nu - 1} \cdot \sqrt{...}}}} \end{equation*} With ($\nu - 1$) nested square-roots, we obtain: \\ \begin{equation} \forall \nu \in \mathbb{N}: \ A_{C_{2^{\nu}}} = \pi_{2^{\nu}} \cdot ab \cdot \sqrt{2 \sqrt{2 \sqrt{2 \sqrt{...}}}} \end{equation} where $0$ nested square-roots are to be understood as the factor $1$.
\section{Introduction}\label{Sec:intro} The spatial arrangement of keypoints of dynamic organisms characterizes their complex pose, providing a computational representation of the way they behave. Recently, computer vision models offer fine grained behavioral modeling through dense keypoints that establish an injective mapping from the image coordinates to the continuous body surface of humans~\cite{guler2018densepose} and chimpanzees~\cite{sanakoyeu2020transferring}. These models predict the continuous keypoint field from an image, supervised by a set of densely annotated keypoints, which shows remarkable performance on real-world imagery and brings out a number of applications including 3D mesh reconstruction~\cite{zhang2020learning, zeng20203d, rong2019delving, xu2019denserac, guler2019holopose, kolotouros2019convolutional}, texture/style transfer~\cite{neverova2018dense, shysheya2019textured}, and geometry learning~\cite{jafarian2021tiktok, alldieck2019tex2shape}. Nonetheless, attaining such densely annotated data is labor intensive, and more importantly, the quality of the annotations is fundamentally bounded by the visual ambiguity of keypoints, e.g., points on textureless shirt. This visual ambiguity leads to a suboptimal model when applying it to out-of-sample distributions. In this paper, we present a new semi-supervised method to learn a dense keypoint detection model from the unlabeled multiview images. \begin{figure*}[t] \centering \includegraphics[width=0.95\textwidth]{figure/teaser3.pdf} \vspace{-3mm} \caption{We use unlabeled multiview images to learn a dense keypoint model via the epipolar geometry in an end-to-end fashion. As a byproduct, we can reconstruct the 3D body surface by triangulating visible regions of body parts.} \label{Fig:teaser} \end{figure*} Our main conjecture is that the dense keypoint model is optimal when it is geometrically consistent across views. That is, every pair of corresponding keypoints, independently predicted by two views, must satisfy the epipolar constraint~\cite{hartley:2004}. However, enforcing the epipolar constraint to learn a dense keypoint model is challenging because (1) the ground truth 3D model is unknown and thus the projections of the 3D model cannot be used as the ground truth dense keypoints; (2) the predicted dense keypoints are inaccurate and continuous over the body surface, and therefore, existing multiview supervision approaches~\cite{yao2019monet, simon2017hand, thewlis2017unsupervisedsparse} for sparse keypoints are not applicable. In these previous methods, the epipolar constraint was enforced between two keypoints (or features) of which semantic meaning was explicitly defined by a finite set of joints (e.g., elbow channel in a network); and (3) establishing correspondences across views requires knowing an inverse mapping from the body surface to the image that can be neither analytically derived nor differentiable. These challenges limit the performance of previous work~\cite{li2018capture} that relies on iterative offline bootstrapping, which is not end-to-end trainable, or requires additional parameters to learn for 3D reconstruction\footnote{An analogous insight has been used for fundamental matrix, directly computed from correspondences that does not require additional variables for 3D reconstruction.}. We tackle these challenges through a \textit{probabilistic epipolar constraint} by incorporating an uncertainty in correspondences. This new constraint encodes the two desired properties. (1) Soft correspondence: given a keypoint in one image, we define matchability---the likelihood of correspondence for all predicted keypoints in another image based on the geodesic distance in the body surface coordinate (e.g., texture coordinate). This allows evaluating geometric consistency in the form of a weighted average of epipolar errors over continuous body surface coordinates, eliminating the requirement of exact correspondences. (2) Geometric consistency: we generalize symmetric Sampson distance~\cite{hartley:2004} for all possible pairs of keypoints from two views to enforce the epipolar constraint, collectively. With these properties, we derive a new differentiable multiview consistency measure that is label-agnostic, allowing us to utilize a large number of the unlabeled multiview images without explicit 3D reconstruction. We design an end-to-end trainable twin network architecture that takes a pair of images as an input and outputs geometrically consistent dense keypoint fields. This network design builds the affinity maps between two keypoint fields based on the matchability and epipolar errors, which facilitates measuring the probabilistic epipolar errors for all possible correspondences. In addition, inspired by knowledge distillation, we use a pretrained model to regularize network learning, which can prevent degenerate cases. Our method shows superior performance compared to existing methods, including non-differentiable bootstrapping~\cite{li2018capture} in terms of keypoint accuracy, multiview consistency, and 3D reconstruction accuracy. Our contributions include: (1) a novel formulation of probabilistic epipolar constraint that can be used to enforce multiview consistency on continuous dense keypoint fields in a differentiable way; (2) a new design of the neural network that enable to precisely measure the probabilistic epipolar error, which allows utilizing a large number of the unlabeled multiview images; (3) a distillation-based regularization to prevent degenerate model learning; (4) strong performance on real-world multiview image data, including Human3.6M~\cite{ionescu2013human3}, Ski-Pose~\cite{sporri2016reasearch}, and OpenMonkeyPose~\cite{Bala2020}, outperforming existing methods including non-differentiable dense keypoint learning~\cite{li2018capture}. \noindent\textbf{Broader Impact Statement} The ability to understand animals' individual and social behaviors is of central importance to multiple disciplines such as biology, neuroscience, and behavioral science. Measuring their behaviors has been extremely challenge due to limited annotated data. This approach offers a way to address this challenge with a limited number of annotated data, which will lead to a scalable behavioral analysis. The negative societal impact of this work is minimum. \section{Related Work} Our framework aims at training a dense keypoint field estimation model via multiview supervision. We briefly review the related works. \noindent\textbf{Dense Keypoint Field Estimation} Finding dense correspondence fields between two images is a challenging problem in computer vision. 3D measurements (e.g., depth and pointcloud) can provide a strong geometric cues which enable matching of deformable shapes~\cite{taylor2012vitruvian, pons2015metric, wei2016dense}. Similarly, in 2D, visual and geometric cues have been used to find the dense correspondence fields in an unsupervised learning~\cite{zhou2016learning, gaur2017weakly, bristow2015dense, thewlis2017unsuperviseddense, thewlis2019unsupervised}. Notably, for special foreground targets such as humans, the dense matching problem can be cast as finding a dense keypoint field that maps pixel coordinates to a canonical body surface coordinates~\cite{loper2015smpl} (e.g., DensePose~\cite{guler2018densepose}). These works were built upon a large amount of data labeled by crowd-workers and generalized to learn the correspondence fields for face~\cite{alp2017densereg} and chimpanzees~\cite{sanakoyeu2020transferring}. Key limitations of these approaches the inaccuracy of labeling and requirement of large labeled data. We address these limitations by formulating multiview supervision that can enforce geometric consistency, which allows utilizing a large amount of unlabeled multiview images. \noindent\textbf{Multiview Feature Learning} Epipolar geometry can be used to learn a visual representation by transferring visual information from one image to another via epipolar lines or 3D reconstruction. For instance, a fusion layer can be learned to fuse feature maps across views~\cite{qiu2019cross}. Such fusion models can be factored into generic and camera-dependent parts to reduce the number of learnable parameters and improve generalizability~\cite{xie2020metafuse}. Given the camera calibration, a light fusion module can be learned to directly fuse deep features~\cite{he2020epipolar} or heatmaps~\cite{zhang2020adafuse} from other view along corresponding epipolar line. Several works combine multiview image features to form 3D features~\cite{iskakov2019learnable, tu2020voxelpose} or view-invariant feature in 2D~\cite{remelli2020lightweight}. \noindent\textbf{Multiview Supervision} Synchronized multiview images~\cite{ionescu2013human3, joo2017panoptic, yu2020humbi} possess a unique geometric property: images are visually similar yet geometrically distinctive, provided by stereo parallax. Such property offers a new opportunity to learn a geometrically coherent representation without labels. Bootstrapping by 3D reconstruction~\cite{li2018capture} can be used to learn a keypoint detector supervised by the projection of the 3D reconstruction to enforce cross-view consistency. MONET~\cite{yao2019monet} enables an end-to-end learning by eliminating the necessity of 3D reconstruction and directly minimizing epipolar error. Learning keypoints can be combined with 3D pose estimation~\cite{rhodin2018learning, iqbal2020weakly} by enforcing predicting the same pose in all views while using a few labeled examples with 3D or 2D pose annotations to prevent degeneration. One can alleviate the need for large amounts of annotations by matching the predicted 3D pose with the triangulated pose~\cite{kocabas2019self}. Several works further learn a latent representation encoding 3D geometry from images~\cite{chen2019weakly, mitra2020multiview} or 2D pose~\cite{rhodin2018unsupervised, sun2020view} by enforcing consistent embedding, texture~\cite{pavlakos2019texturepose}, and view synthesis~\cite{thewlis2017unsupervisedsparse} across views. Unlike these approaches designed for sparse keypoints where the geometric consistency is applied on finite points, we study geometric consistency on continuous dense keypoint fields. Capture Dense~\cite{li2018capture} is the closest work to ours, which uses bootstrapping through 3D reconstruction of human mesh model~\cite{joo2018total}. However, due to the non-differentiable nature of bootstrapping, it is not end-to-end trainable. A temporal consistency has been also used for self-supervise the dense keypoint detector~\cite{neverova2019slim}. \section{Method} We present a novel method to learn a dense keypoint detector by using unlabeled multiview images. We formulate the epipolar constraint for continuous correspondence fields, which allows us to enforce geometric consistency between views. \subsection{Dense Epipolar Geometry} \label{method:probabilistic_epipolar_constraint} Given a pair of synchronized images from two different views, a pair of corresponding points $\mathbf{x}\leftrightarrow\mathbf{x}'$, are related by a fundamental matrix given the calibrated cameras, i.e. $\widetilde{\mathbf{x}}'^ {\mathsf{T}}\mathbf{F}\widetilde{\mathbf{x}} = 0$, where $\mathbf{F}\in\mathbb{R}^{3\times3}$ is the fundamental matrix, and $\widetilde{\mathbf{x}} \in \mathds{P}^2$ is a homogeneous representation of $\mathbf{x}$. The measure of geometric consistency between the two images can be written as \cite{hartley:2004}: \begin{align} d(\mathbf{x}, \mathbf{x}'; \mathbf{F}) = \frac{|\widetilde{\mathbf{x}}'^{\mathsf{T}}\mathbf{F}\widetilde{\mathbf{x}}|}{\sqrt{(\mathbf{F}\widetilde{\mathbf{x}})_1^2 + (\mathbf{F}\widetilde{\mathbf{x}})_2^2}}, ~~~~\mathbf{x}\leftrightarrow \mathbf{x}' \end{align} where $(\mathbf{Fx})_i$ is the $i^{\rm th}$ entry of $\mathbf{F}\mathbf{x}$. Consider an injective dense keypoint mapping $\phi:\mathds{R}^2\rightarrow \mathds{R}^2$ that maps a pixel coordinate to a canonical 2D body surface coordinate, i.e., $\mathbf{u} = \phi(\mathbf{x}; \mathcal{I})$ where $\mathbf{x}\in\Theta(\mathcal{I})$ is the range of the foreground pixels in the image $\mathcal{I}$, and $\mathbf{u}\in \mathds{R}^2$ is the 2D coordinate in the body surface as shown in Figure~\ref{Fig:concept}. One can find a correspondence between the two images through $\mathbf{u}$, i.e., $\phi^{-1}(\mathbf{u};\mathcal{I})\leftrightarrow \phi^{-1}(\mathbf{u};\mathcal{I}')$ where $\mathcal{I}$ and $\mathcal{I}'$ the two view images. However, $\phi$ is an injective mapping where the analytic inverse does not exist in general. Given a point $\mathbf{x}$ in the image $\mathcal{I}$, one can measure the expectation of geometric error by a nearest neighbor search on the body surface space: \begin{align} \mathds{E}(\mathbf{x}) = d(\mathbf{x}, \mathbf{x}'; \mathbf{F}),~~~\mathbf{x}' = \underset{ \mathbf{x}' \in \Theta(\mathcal{I}')}{\operatorname{argmin}}~\|\phi(\mathbf{x};\mathcal{I})-\phi(\mathbf{x}';\mathcal{I}')\|, \nonumber \end{align} where $\mathds{E}(\mathbf{x})$ is the expectation of geometric error at $\mathbf{x}$. The expectation of the geometric error measures the epipolar error over all possible matches in the other view image, i.e., $\forall \mathbf{x}'\in \Theta(\mathcal{I}')$. There are two limitations in the nearest neighbor search: (1) The correspondences are not exact, leading to a biased estimate of the geometric error expectation. For instance, a point that is not visible from another view is forced to be matched to a non-existing point, producing a large geometric error. (2) The argmin operation is not differentiable, which cannot be used to learn a dense keypoint detector in an end-to-end fashion. \begin{figure*}[t] \centering \vspace{-2mm} \includegraphics[width=\textwidth]{figure/prob_epi.pdf} \caption{A dense keypoint field maps a point in an image to the canonical body surface coordinate, i.e., $\mathbf{u} = \phi(\mathbf{x};\mathcal{I})$. Establishing a correspondence between two view images requires the analytic inverse of $\phi$ which does not exist in general. We present a matchability $P(\mathbf{u},\mathbf{u}') = P(\phi(\mathbf{x}; \mathcal{I}), \phi(\mathbf{x}'; \mathcal{I}'))$, a likelihood of matching through the body surface coordinate. We combine the matchability with the epipolar constraint to obtain the probabilistic epipolar error, or expectation of geometric error $\mathds{E}(\mathbf{x})$. It is a weighted average of epipolar errors of $\mathbf{x}$ over all possible correspondences in $\mathcal{I}'$.} \label{Fig:concept} \end{figure*} Instead, we make use of a soft correspondence to address these limitations. Consider a matchability in the body surface coordinate: \begin{align} P(\mathbf{u}, \mathbf{u}') = \exp\left(-\frac{\|\mathbf{u}-\mathbf{u}'\|^2}{2\sigma^2}\right) / \sum_{\mathbf{v} \in \Omega} \exp\left(-\frac{\|\mathbf{u}-\mathbf{v}\|^2}{2\sigma^2}\right) \nonumber \end{align} where $P(\mathbf{u}, \mathbf{u}')$ is a matchability---a likelihood of $\mathbf{u}$ matched to $\mathbf{u}'$ in the body surface coordinate (Figure~\ref{Fig:concept}). $\Omega$ is the range of the body surface, and $\sigma$ is the standard deviation that controls the smoothness of matching, e.g., when $\sigma \rightarrow 0$, it approximates the nearest neighbor search. We use the matchability to form a probabilistic epipolar distance: \begin{align} \mathds{E}(\mathbf{x}, \mathbf{x}') = P\left(\phi(\mathbf{x};\mathcal{I}), \phi(\mathbf{x}';\mathcal{I}')\right) d(\mathbf{x}, \mathbf{x}'; \mathbf{F}) \end{align} where $\mathds{E}(\mathbf{x},\mathbf{x}')$ is the expectation of geometric error between the corresponding points. The error expectation of $\mathbf{x}$ can be computed by marginalizing over all $\mathbf{x}'$: \begin{align} \mathds{E}(\mathbf{x}) = \sum_{\mathbf{x}' \in \Theta(\mathcal{I}')} \mathds{E}(\mathbf{x}, \mathbf{x}') \end{align} That is, the expectation of the geometric error of $\mathbf{x}$ measures a weighted average of epipolar errors for all possible correspondences. The higher matchability, the more contribution to the error expectation. Given the probabilistic epipolar error over the dense keypoint field, we derive a symmetric multiview consistency loss $\mathcal{L}_{\rm M}$ as: \begin{align} \label{eq:multiview_consistency_loss} \mathcal{L}_{\rm M}(\mathcal{I}, \mathcal{I}') = \frac{1}{V}\sum_{\mathbf{x}\in \Theta(\mathcal{I})} v(\mathbf{x}, \mathcal{I}') \mathds{E}(\mathbf{x}) + \frac{1}{V'}\sum_{\mathbf{x}'\in \Theta(\mathcal{I'})} v(\mathbf{x}', \mathcal{I})\mathds{E}(\mathbf{x}') \end{align} where $v(\mathbf{x}, \mathcal{I}')\in \{0,1\}$ is a visibility indicator that output one if a point $\mathbf{x}$ is visible in the other view image $\mathcal{I}'$ and zero otherwise, $V=\sum_{ \mathbf{x}\in \Theta(\mathcal{I})} v(\mathbf{x}, \mathcal{I}')$ and $V'=\sum_{\mathbf{x}\in \Theta(\mathcal{I})} v(\mathbf{x}, \mathcal{I}')$ are the numbers of foreground pixels visible in $\mathcal{I}'$ and $\mathcal{I}$, respectively. In fact, this loss over field-to-field correspondence is a generalization of Sampson distance~\cite{hartley:2004} over point-to-point correspondence. Figure~\ref{Fig:concept} illustrates the probabilistic epipolar error through the matchability. Given the dense keypoint fields from two views, $\phi(\mathbf{x};\mathcal{I})\leftrightarrow\phi(\mathbf{x}';\mathcal{I}')$, we compute the matchability $P(\phi(\mathbf{x};\mathcal{I}), \phi(\mathbf{x}';\mathcal{I}'))$ by measuring the geodesic distance in the body surface coordinate. We combine the matchability with the epipolar constraint $d(\mathbf{x}, \mathbf{x}';\mathbf{F})$ over all possible correspondences given $\mathbf{x}$. This results in the probabilistic epipolar error, or the expectation of geometric error for $\mathbf{x}$. Existing approaches such as bootstrapping~\cite{li2018capture} establish the matching through 3D reconstruction of mesh and enforce the geometric error in an alternating fashion due to the non-differentiability of matching. Our differentiable formulation allows learning the dense keypoint detector in an end-to-end manner, which is flexible and shows superior performance. \subsection{Multiview Semi-supervised Learning} We learn the dense keypoint detector $\phi$ by minimizing the following error: \iffalse \begin{align} \mathcal{L} &= \sum_{\{\mathcal{I},\mathbf{U}\}\in \mathcal{D}_{\rm L}}\mathcal{L}_{\rm L}(\mathbf{U},\mathcal{I}) + \lambda_{\rm M}\sum_{\{\mathcal{I},\mathcal{I}'\}\in \mathcal{D}_{\rm P}}\mathcal{L}_{\rm M}(\mathcal{I},\mathcal{I}')\nonumber\\ &+ \lambda_{\rm R}\sum_{\mathcal{I}\in\mathcal{D}_{\rm U}}\mathcal{L}_{\rm R} (\mathcal{I}) \end{align} \fi \begin{align} \mathcal{L} &= \sum_{\{\mathcal{I},\mathbf{U}\}\in \mathcal{D}_{\rm L}}\mathcal{L}_{\rm L}(\mathbf{U},\mathcal{I}) + \lambda_{\rm M}\sum_{\{\mathcal{I},\mathcal{I}'\}\in \mathcal{D}_{\rm P}}\mathcal{L}_{\rm M}(\mathcal{I},\mathcal{I}') + \lambda_{\rm R}\sum_{\mathcal{I}\in\mathcal{D}_{\rm U}}\mathcal{L}_{\rm R} (\mathcal{I}) + \lambda_{\rm T}\sum_{\{\mathcal{I},\mathcal{I}'\}\in \mathcal{D}_{\rm P}}\mathcal{L}_{\rm T}(\mathcal{I},\mathcal{I}')\nonumber \end{align} where $\mathcal{L}_{\rm L}$ is the labeled data loss, $\mathcal{L}_{\rm M}$ is the multiview supervision loss, $\mathcal{L}_{\rm R}$ is the regularization loss, and $\mathcal{L}_{\rm T}$ is the multiview photometric consistency loss. $\lambda_{\rm M}$, $\lambda_{\rm R}$ and $\lambda_{\rm T}$ are the relative weights to control the importance of multiview consistency loss, regularization loss, and multiview photometric consistency loss respectively. $\mathcal{D}_{\rm L} = \{\mathcal{I},\mathbf{U}\}$ is the labeled dataset where $\mathbf{U}\in \mathds{R}^{2\times H\times W}$ specify the ground truth dense keypoint coordinate. $\mathcal{I}\in\mathcal{D}_{\rm U}$ is the unlabeled image dataset, and $\mathcal{D}_{\rm P}$ is the dataset of synchronized multiview image pairs, including labeled and unlabeled images. \begin{figure*}[t] \begin{center} \includegraphics[trim={0 0 0 0},clip,width=0.9\textwidth]{./figure/progressive.png} \end{center} \vspace{-3mm} \caption{Our multiview supervision progressively minimizes the epipolar error between two views (top and bottom) as learning the dense keypoint detection model. The keypoint detection, independently by a pretrained model (Iter 0), is not geometrically consistent. As the optimization progresses, the error is significantly reduced, resulting in a geometrically coherent model. } \label{fig:progression} \end{figure*} \noindent \textbf{Supervised Loss} We learn the dense keypoint detector from the labeled data by minimizing the following error: \begin{align} \mathcal{L}_{\rm L}(\mathbf{U},\mathcal{I}) = \sum_{\mathbf{x}\in\Theta(\mathcal{I})} \|\mathbf{U}_\mathbf{x} - \phi(\mathbf{x};\mathcal{I})\|_1 \label{Eq:loss_sup} \end{align} where $\mathbf{U}_\mathbf{x}$ is the ground truth keypoint coordinate at $\mathbf{x}$. In practice, when DensePose~\cite{guler2018densepose} is used, the dense keypoint field is defined for each body part. We apply Equation~(\ref{Eq:loss_sup}) to each body part. \noindent \textbf{Distillation Based Regularization Loss} Enforcing multiview consistency alone can lead to degenerate cases. \label{regularization_loss} For instance, consider a linear transformation in the body surface, e.g., $\mathbf{v} = \mathbf{T}\mathbf{u}$ where $\mathbf{T}\in \mathds{R}^{2\times2}$ is a non-singular affine transformation. Any $\phi$ that satisfies the following condition can be equivalent dense keypoint detector: \begin{align} \phi(\mathbf{x};\mathcal{I}) \equiv \mathbf{T} \phi(\mathbf{x};\mathcal{I}). \end{align} This indicates that there exist an infinitely number of dense keypoint detectors that satisfy the epipolar geometry. To alleviate this geometric ambiguity, we use a distillation-based regularization using a pretrained model. Let $\phi_0$ be a dense keypoint detector pretrained by the labeled data. We prevent the learned detector $\phi$ deviating too much from the pretrained detector $\phi_0$ for the unlabeled data: \begin{align} \mathcal{L}_{\rm R}(\mathcal{I}) = \sum_{\mathbf{x}\in \Theta(\mathcal{I})}\|\phi_0(\mathbf{x};\mathcal{I})-\phi(\mathbf{x};\mathcal{I})\|^2,\end{align} where $\mathcal{L}_{\rm R}$ is the loss for the distillation-based regularization, minimizing the difference from the pretrained model. Similar to the labeled data loss, in practice, we augment the loss for body parts. \noindent \textbf{Multiview Photometric Consistency Loss} We leverage photometric consistency across views. Assuming ambient light, pixels across views corresponding to the same 3D point in space should have the same RGB value. Similar to $\mathcal{L}_{\rm M}$, we minimize the photometric error as follow: \begin{align} \mathcal{L}_{\rm T}(\mathcal{I}, \mathcal{I}') = \frac{1}{V}\sum_{\mathbf{x}\in \Theta(\mathcal{I})} v(\mathbf{x}, \mathcal{I}') \mathds{T}(\mathbf{x}) + \frac{1}{V'}\sum_{\mathbf{x}'\in \Theta(\mathcal{I'})} v(\mathbf{x}', \mathcal{I})\mathds{T}(\mathbf{x}') \end{align} where $\mathds{T}(\mathbf{x})$ is the expectation of photometric error of $\mathbf{x}$ similar to $\mathds{E}(\mathbf{x})$, i.e. $\mathds{T}(\mathbf{x}) = \sum_{\mathbf{x}' \in \Theta(\mathcal{I}')} \mathds{T}(\mathbf{x}, \mathbf{x}')$ where $\mathds{T}(\mathbf{x}, \mathbf{x}') = P\left(\phi(\mathbf{x};\mathcal{I}), \phi(\mathbf{x}';\mathcal{I}')\right) \|\mathcal{I}(\mathbf{x})-\mathcal{I}'(\mathbf{x}')\|^2$. \subsection{Network Design} We design a new network architecture composed of twin networks to learn the dense keypoint detector by enforcing multiview consistency over dense keypoint fields as shown in Figure~\ref{Fig:network}. Each network is made of a fully convolutional network that outputs the dense keypoint field per body part. Given two dense keypoint fields, we compute the probabilistic epipolar error by constructing two affinity matrices: matchability matrix and epipolar matrix, $\mathbf{M}, \mathbf{E}\in \mathds{R}^{|\Theta(\mathcal{I})|\times |\Theta(\mathcal{I}')|}$ where $|\Theta(\mathcal{I})|$ is the cardinality of the range of foreground pixels. These two matrices are defined by: \iffalse \begin{align} \mathbf{M}_{ij} &= P(\phi(\mathbf{x}_i;\mathcal{I}), \phi(\mathbf{x}_j;\mathcal{I}'))\nonumber\\ \mathbf{E}_{ij} &= d(\mathbf{x}_i, \mathbf{x}_j;\mathbf{F})\nonumber \end{align} \fi \begin{align} \mathbf{M}_{ij} &= P(\phi(\mathbf{x}_i;\mathcal{I}), \phi(\mathbf{x}_j;\mathcal{I}')), \mathbf{E}_{ij} = d(\mathbf{x}_i, \mathbf{x}_j;\mathbf{F})\nonumber \end{align} where $\mathbf{M}_{ij}$ is the $i,j$ entry of the matrix $\mathbf{M}$. $\mathbf{x}_i$ and $\mathbf{x}_j$ are the $i^{\rm th}$ and $j^{\rm th}$ points from the images $\mathcal{I}$ and $\mathcal{I}'$, respectively. We also compute the visibility maps $\mathbf{V}_i = v(\mathbf{x},\mathcal{I}')$ and $\mathbf{V}'_i = v(\mathbf{x}',\mathcal{I})$. We design a new operation to measure the multiview supervision loss in Equation~(\ref{eq:multiview_consistency_loss}): \begin{align} \mathcal{L}_{\rm M} = \mathbf{V}^\mathsf{T} (\mathbf{M} \odot \mathbf{E})\mathbf{1}_{|\Theta(\mathcal{I}')|} + {\mathbf{V}'}^\mathsf{T} (\mathbf{M} \odot \mathbf{E})^\mathsf{T}\mathbf{1}_{|\Theta(\mathcal{I})|}, \nonumber \end{align} where $\mathbf{1}_n$ is the $n$-dimensional vector of which entries are all one. \begin{figure*}[t] \centering \includegraphics[width=\textwidth]{figure/network.pdf} \vspace{-5mm} \caption{We design a new architecture composed of twin networks that detect dense keypoint fields. The dense keypoint fields from two views are combined to form two affinity matrices: matchability $\mathbf{M}$ and epipolar error $\mathbf{E}$. $\mathbf{M}$ is obtained from the dense keypoint fields ($\mathbf{u}$ and $\mathbf{u}'$), and $\mathbf{E}$ is obtained from the epipolar error of pixel coordinates ($\mathbf{x}$ and $\mathbf{x}'$). These matrices allow us to compute epipolar errors for all possible correspondences using probabilistic epipolar error ($\mathcal{L}_{\rm M}$). In addition, we make use of distillation-based regularization using a pretrained model $\phi_0$ to avoid degenerate cases ($\mathcal{L}_{\rm R}$). We measure the labeled loss $\mathcal{L}_{\rm L}$ if the ground truth dense keypoint field is available. } \label{Fig:network} \end{figure*} \section{Experiments} We perform experiments on human and monkey targets as two example applications to evaluate the effectiveness of our proposed semi-supervised learning pipeline. \subsection{Implementation Details} \label{Sec:detail} We use HRNet~\cite{SunGMXLZW20} as the backbone network followed by four head networks made up of convolutional layers to predict foreground mask, body part index, and UV coordinates on the canonical body surface, respectively. Each network takes as an input a 224$\times$224 image and outputs 15-channel (for foreground mask head only) or 25-channel 56$\times$56 feature maps~\cite{guler2018densepose}. We train the network in two stages. In the first stage, we train an initial model using the labeled data by the labeled data loss $\mathcal{L}_{\rm L}$ or using a pretrained model as the teacher network to distillate the knowledge into our network. Specifically, for application on human we follow the first approach and use 48K human instances in DensePose-COCO~\cite{guler2018densepose} training set, while for application on monkey we adopted the second one since we do not have access to the labelled data but only a pretrained model on chimpanzee~\cite{sanakoyeu2020transferring}. This initial model is used for two purposes: (1) distillation-based regularization and (2) refinement via multiview supervision. For distillation-based regularization, the weights of the pretrained network is fixed. Then we leverage full loss to learn the refined network. \subsection{Evaluation Datasets} \label{datasets} \noindent\textbf{Human3.6M}~\cite{ionescu2013human3} is a large-scale indoor multiview dataset captured by 4 cameras for 3D human pose estimation. It contains 3.6 millions of images captured from 7 subjects performing 15 different daily activities, e.g. Walking, Greeting, and Discussion. Following common protocols, we use subject S1, S5, S6, S7 and S8 for training, and reserve subject S9 and S11 for testing. Following \cite{zhang2020learning} and \cite{zeng20203d}, we leverage SMPL parameters generated by HMR\cite{kanazawa2018end} via applying MoSh~\cite{loper2014mosh} to the sparse 3D MoCap marker data to recover ground truth 3D human meshes. We further perform Procrustes analysis~\cite{sorkine2017least} to align them with ground truth 3D poses in global coordinate system and then render ground truth IUV maps using PyTorch3D~\cite{ravi2020pytorch3d}. Since it is the only multiview human dataset that we have access to ground truth 3D mesh / IUV maps, we use this dataset to perform comprehensive experiment and studies. \noindent\textbf{Ski-Pose PTZ-Camera Dataset}~\cite{sporri2016reasearch} is a multiview dataset capturing competitive skiers performing giant slalom runs. 6 synchronized and calibrated pant-tile-zoom-cameras (PTZ) cameras are used to track a single skier at a time. The global locations of the cameras were measured by a tachymeter theodolite. It contains 8.5K training images and 1.7K testing images. We use this dataset to evaluate generalization towards in-the-wild multiview settings. We use its standard train/test split to train and evaluation our model. We select 6 adjacent view pairs to form training samples. \noindent\textbf{OpenMonkeyPose}~\cite{Bala2020} is a large landmark dataset of rhesus macaques captured by 62 synchronized multiview cameras. It consists of nearly 200K labeled images with four macaque subjects that freely move in a large cage while performing foraging tasks. Each monkey instance is annotated with 13 2D and 3D joints. We use this dataset to show our model's ability on transferring dense keypoints to monkey data. We split about 64K images for training and 12K images for testing. For training, we generate the densepose of monkey data using a pretrained model~\cite{sanakoyeu2020transferring} as pseudo-labels. These pseudo-labels are then used for refining the pretrained model. \subsection{Baselines} In our experiments, we consider four baselines: (1) A model fully-supervised by labeled data, e.g. DensePose-COCO~\cite{guler2018densepose}, which is also our initial model. We refer to this as Supervised in the following. (2) A model trained using multiview bootstrap strategy~\cite{simon2017hand, li2018capture}, where multiview triangulation results from previous stage are used as the pseudo ground truth. (3) A learnable 3D mesh estimation method where dense keypoint estimation can be acquired by reprojecting 3D mesh to image domain, e.g. HMR~\cite{kanazawa2018end}. (4) A 3D mesh estimation framework similar to HMR but additionally incorporating Model-fitting in the Loop, e.g. SPIN~\cite{kolotouros2019learning}. Supervised is also used as an initial model for our approach. \subsection{Metrics} We evaluate the performance of our dense keypoint model using metrics from three aspects: (1) geometric consistency, (2) accuracy of dense keypoints, and (3) accuracy of 3D reconstruction from multiple views. \noindent\textbf{Geometric Consistency} We use epipolar distance (unit: pixel) averaged over views and frames as the metric for evaluating multiview geometric consistency. Ideally, two dense keypoints corresponding to the same point on 3D surface should have epipolar distance equal to 0. This metric can be evaluated on any multiview dataset with ground truth camera parameters available. \noindent\textbf{Dense Keypoint Accuracy} We evaluate the model's performance on dense keypoint accuracy from two aspects: (1) Ratio of Correct Point (RCP) and (2) Ratio of Correct Instances (RCI). RCP evaluates correspondence accuracy over the whole image domain. Specifically, it records the ratio of foreground pixels on images with corresponding 3D body surface correctly predicted as a function of geodesic distance threshold, where the prediction is considered correct if its geodesic distance to the ground truth is below the threshold (10cm and 30cm). RCIs consider instance-wise accuracy where an instance is declared to be correct if its geodesic point similarity (GPS)~\cite{guler2018densepose} is above the threshold. We also report the mean RCI (mRCI) and the mean GPS for all instances (mGPS). \begin{table*}[t] \scriptsize \hspace{-2mm} \centering \begin{tabular}{p{0.2cm}lp{0.6cm}p{0.6cm}p{0.6cm}p{0.6cm}cp{0.6cm}p{0.6cm}p{0.6cm}}\toprule & \multicolumn{1}{c}{} & \multicolumn{4}{c}{Keypoint accuracy} & \multicolumn{1}{c}{Geom. consistency} & \multicolumn{2}{c}{Recon. accruacy}\\ \cmidrule(lr){3-6} \cmidrule(lr){7-7} \cmidrule(lr){8-9} &Method &AUC$_{10}$ &AUC$_{30}$ &mRCI &mGPS &Epi. error &MPVPE &mMVS\\ \midrule \parbox[t]{2mm}{\multirow{5}{*}{\rotatebox[origin=c]{90}{Comparison}}} & Supervised &0.428 &0.705 &0.728 &0.83 &6.52 &65.71 &0.484 \\ & Bootstrapping~\cite{li2018capture} &0.393 &0.683 &0.707 &0.820 &5.73 &64.12 &0.513 \\ & HMR~\cite{kanazawa2018end} &\textbf{0.495} &0.68 &0.589 &0.76 &4.0 &55.9 &\textbf{0.809} \\ & SPIN~\cite{kolotouros2019learning} &0.456 &0.615 &0.44 &0.685 &3.26 &\textbf{54.22} &0.712 \\ & Ours &0.468 &\textbf{0.72} &\textbf{0.738} &\textbf{0.834} &\textbf{2.7} &{58.8} &{0.544} \\ \hline \parbox[t]{2mm}{\multirow{4}{*}{\rotatebox[origin=c]{90}{General.}}} & Supervised (Train view 0,2 / Test view 1,3) &0.428 &0.724 &0.76 &0.855 &5.87 &58.98 &0.521 \\ & Ours (Train view 0,2 / Test view 1,3) &\textbf{0.454} &\textbf{0.734} &\textbf{0.766} &\textbf{0.858} &\textbf{3.62} &\textbf{55.38} &\textbf{0.555} \\ & Supervised (Train view 1,3 / Test view 0,2) &0.46 &0.735 &0.762 &0.856 &5.83 &57.9 &0.462 \\ & Ours (Train view 1,3 / Test view 0,2) &\textbf{0.519} &\textbf{0.756} &\textbf{0.771} &\textbf{0.861} &\textbf{3.04} &\textbf{49.94} &\textbf{0.536} \\ \hline \parbox[t]{2mm}{\multirow{4}{*}{\rotatebox[origin=c]{90}{Ablation}}} & Supervised ($\mathcal{L}_{\rm L}$) &0.48 &0.748 &0.777 &0.864 &5.54 &58.71 &0.521 \\ & $\mathcal{L}_{\rm L} + \mathcal{L}_{\rm M}$ &0.12 &0.448 &0.487 &0.719 &1.46 &176.9 &0.285 \\ & $\mathcal{L}_{\rm L} + \mathcal{L}_{\rm M} + \mathcal{L}_{\rm R}$ &0.513 &0.76 &0.782 &0.867 &2.18 &55.16 &0.563 \\ & $\mathcal{L}_{\rm L} + \mathcal{L}_{\rm M} + \mathcal{L}_{\rm R} + \mathcal{L}_{\rm T}$ &\textbf{0.525} &\textbf{0.764} &\textbf{0.783} &\textbf{0.868} &\textbf{2.13} &\textbf{51.17} &\textbf{0.597} \\ \bottomrule \end{tabular} \vspace{-2mm} \caption{We performance cross-method evaluation, study on model's generalizability towards new views and ablation study on Human3.6M dataset and report performance on keypoint accuracy, geometric consistency and reconstruction accuracy. (Epipolar error unit: pixel; MPVPE unit: mm)} \label{tab:1} \end{table*} \noindent\textbf{Reconstruction Accuracy} Given dense keypoints, we measure 3D reconstruction error by triangulating them in 3D. We compute Mean Per mesh Vertex Position Error (MPVPE) as the metric for reconstruction accuracy, which is defined as the mean euclidean distance between triangulated vertices and corresponding ground truth ones. In addition, inspired by geodesic point similarity~\cite{guler2018densepose}, we define vertex similarity as: ${\rm VS} =\frac{1}{|V|} \sum_{\mathbf{v}_i \in V} \exp\left(-\frac{-d(\mathbf{\hat{v}}_i-\mathbf{v}_i)^2}{2\kappa^2}\right) \nonumber$, where $d(\mathbf{\hat{v}}_i-\mathbf{v}_i)$ is the euclidean distance between triangulated vertex $\mathbf{\hat{v}}_i$ and corresponding ground truth one $\mathbf{v}_i$, and $V$ is the set of visible ground truth vertices from both views. $\kappa$ is a normalizing parameter. For $\mathbf{v}_i$ that does not correspond to the triangulated vertex, it is set to infinity. Further, to account for false positives in triangulated vertices (vertices not visible from both views), we define masked vertex similarity (MVS) as ${\rm MVS} = \sqrt{{\rm VS} \cdot I}$, where $I$ is the intersection over union between the set of triangulated vertices and $V$. We report mean MVS (mMVS) over all instances. \subsection{Evaluation on Human3.6M Dataset} We use Human3.6M dataset to perform (1) comprehensive cross-method evaluations, (2) study on model's generalizability towards new views, and (3) ablation study on losses used for training. Results are summarized in Table~\ref{tab:1} with all metrics reported. \textbf{Cross-method Evaluation} We evaluation the performance of our model against other methods on images from all activities of subject S9 and S11 in 10Hz. Our model and bootstrapping are trained using images from all activities of subject S1, S5, S6, S7 and S8 in 10Hz. For metrics of keypoint accuracy and geometry consistency, ours outperforms all other methods. Note that HMR and SPIN form the upper bound performance on 3D reconstruction accuracy because these models are supervised by 3D ground truth mesh model. Nevertheless, ours still achieve better performance in terms of keypoint accuracy (except for $AUC_{10}$ only second to HMR) and geometric consistency (by a large margain of 32.5\% and 17.2\%). \textbf{Generalizability towards new views} We evaluate generalization by testing on different views: two views are used for training and other two views are used for testing. The results are summarized in Table~\ref{tab:1}. As can be seen, although the model trained purely on one camera pair does not seen any sample captured by the other pair, its performance still get improved on all metrics on top of \textit{baseline} model by a margin of 0.6\%-12.8\% on keypoint accuracy, 38.3\% - 47.9\% on geometric consistency, and 6.5\% - 13.7\% on reconstruction accuracy. This shows that model trained by our semi-supervised approach can be generalized to new views. \textbf{Ablation Study} We conduct an ablation study to evaluate the impact of each loss. The results are reported in Table~\ref{tab:1}. It proves that the model trained with $\mathcal{L}_{\rm L}$ + $\mathcal{L}_{\rm M}$ shows inferior performance because of degenerate cases (Section \ref{regularization_loss}). This limitation can be addressed by the regularization $\mathcal{L}_{\rm R}$, and further, $\mathcal{L}_{\rm T}$ improves the performance, in particular, for reconstruction accuracy. \subsection{Evalution on Ski-Pose PTZ-Camera Dataset and OpenMonkeyPose Dataset} \begin{wraptable}{r}{5cm} \vspace{-5mm} \scriptsize \hspace{-2mm} \centering \begin{tabular}{l|cc} \toprule Method &Ski-Pose~\cite{sporri2016reasearch} &Monkey~\cite{Bala2020} \\ \hline Supervised &11.38 &11.83 \\ Bootstrap~\cite{li2018capture} &8.64 &9.12 \\ HMR~\cite{kanazawa2018end} &13.4 & N/A \\ SPIN~\cite{kolotouros2019learning} &11.83 & N/A \\ Our &\textbf{5.43} &\textbf{6.21} \\ \bottomrule \end{tabular} \vspace{-3mm} \footnotesize{\caption{Comparison on geometry consistency for in-the-wild data (Epipolar error unit: pixel).}} \label{tab:others} \end{wraptable} We evaluate our method on multiview in-the-wild datasets: Ski-pose and OpenMonkeyPose. Since no ground truth is available, we evaluate geometric consistency summarized in Table~\ref{tab:others} and show qualitative results (2nd and 3rd columns in Figure~\ref{fig:qualitative}). The results show that our model outperforms other baselines by a large margin: 37.2\%-54.1\% on Ski-Pose and 31.9\%-47.5\% on OpenMonkeyPose, which can be visually identified by qualitative results. \begin{figure*}[t] \begin{center} \includegraphics[trim={1.8cm 1.8cm 1.8cm 1.8cm},clip,width=\textwidth]{./figure/qualitative.pdf} \end{center} \vspace{-3mm} \caption{Qualitative results on Human3.6M, Ski-Pose PTZ-Camera and OpenMonkeyPose Datasets. Heatmaps overlapping on images indicate epipolar error for each pixels.} \label{fig:qualitative} \end{figure*} \section{Conclusion} We present a novel end-to-end semi-supervised approach to learn a dense keypoint detector by leverage a large amount of unlabeled multiview images. Due to the nature of continuous keypoint representation, finding exact correspondences between views is challenging unlike sparse keypoints. We address this challenge by formulating a new probabilistic epipolar constraint that allows measuring a field-to-field geometric error without knowing exact correspondences. Additionally, we proposed a distillation-based regularization to prevent degenerated cases. We design a new network architecture made of twin networks that can effectively measure the probabilistic epipolar error by considering all possible correspondences using affinity matrices. We show that our method outperforms the baseline approaches in keypoint accuracy, multiview consistency, and reconstruction accuracy. \section{Appendix} \section{Training Details} We use the following loss weights: $\mathcal{L}_{\rm M} = 1.0$, $\mathcal{L}_{\rm R} = 2000$, $\mathcal{L}_{\rm T} = 10$. We use mini-batches of size 8, each one containing a pair of images. We train our model using Adam optimizer~\cite{kingma2014adam} with a learning rate of $10^{-4}$ on a single NVIDIA Tesla V100-SXM2 GPU with 32.5G memory. \section{Limitations} We characterize some failure cases in terms of geometric consistency, as shown in Figure~\ref{fig:failure}. Our approach fails when the following assumptions do not hold. (1) Relative camera pose (i.e., fundamental matrix) must be accurate. In the last two rows of the second column in Figure~\ref{fig:failure}, the camera poses are inaccurate where epipolar constraint provides misguidance to supervise the dense keypoints. (2) There must be enough corresponding points between two views. In the first 3 rows of first 2 columns of Figure~\ref{fig:failure}, two cameras capture very different views of the target, resulting in very small area visible from both views. (3) The initial dense keypoint field must be reasonably accurate. In the last column of Figure~\ref{fig:failure}, initial dense keypoint field are not accurate enough because poses are from out-of-sample distribution. Besides, samples in the last 2 rows of the first column of Figure~\ref{fig:failure} correspond to poses do not happen very often in the training set. \begin{figure*}[t] \begin{center} \includegraphics[width=\textwidth]{./figure/failure_cases.pdf} \end{center} \vspace{-3mm} \caption{Failure cases on Human3.6M, Ski-Pose PTZ-Camera and OpenMonkeyPose Datasets. Heatmaps overlapping on images indicate epipolar error for each pixels.} \label{fig:failure} \end{figure*} \section{More Results} Here we show more dense keypoint detection results in Figure~\ref{fig:more}. \begin{figure*}[t] \begin{center} \includegraphics[width=\textwidth]{./figure/more.png} \end{center} \vspace{-3mm} \caption{Dense keypoint detection results.} \label{fig:more} \end{figure*}
\section{Introduction}\label{sect_intro} Let $S = \k[x_1, ..., x_n]$ be a standard graded polynomial ring over a field $\k$. Let $I = I(G)$ be the edge ideal of a simple graph $G$ on the vertex set $[n]$. For each $s \ge 1$, we have the following containments of ideals $I^s \subseteq \overline{I^s} \subseteq I^{(s)}$ where $\overline{I^s}$ is the integral closure of $I^s$ and $I^{(s)}$ is the $s$-th symbolic powers of $I$ (see Section \ref{sec_basic} for the definition of integral closure and symbolic powers). In \cite{MNPTV}, together with Nam, Phong, and Thuy, we laid out a general procedure for comparing regularity of monomial ideals and proved that $\reg I^s = \reg I^{(s)}$ for $s = 2, 3$. Subsequently, in \cite{MV1, MV2}, we proved a rigidity property of the regularity of intermediate ideals lying between $I^s$ and $I^{(s)}$. More precisely, for monomial ideals $J \subseteq K$, we define $\Inter(J,K)$ the set of monomial ideals $L$ such that $L = J + (f_1, \ldots, f_t)$ where $f_i$ are among minimal monomial generators of $K$. In this paper, we apply this procedure to prove that all ideals in $\Inter(I^s, \overline{I^s})$ have the same regularity for $s \le 4$. \begin{thm}\label{main_thm}Let $I$ be the edge ideal of a simple graph $G$. For all $s \le 4$ and all intermediate ideals $J \in \Inter(I^s,\overline{I^s})$, we have $$\reg J = \reg \overline{I^s} = \reg (I^s).$$ \end{thm} The asymptotic property of regularity of integral closure of powers $\reg \overline{I^s}$ was established in \cite{CHT} alongside the asymptotic property of regularity of powers $\reg I^s$ in \cite{CHT, Kod}. Nonetheless, to our knowledge, there was no explicit calculation of regularity of integral closure of powers of edge ideals in the case where $I$ is not normal. By \cite{SVV,OH}, $I$ is not normal, i.e. $\overline{I^s} \neq I^s$ for some $s > 1$ if and only if $G$ has an induced subgraph which is the disjoint union of two odd cycles. In the simplest case where $I$ is not normal, i.e. $G$ is an odd bicyclic graphs, Kumar and Kumar \cite{KK} prove that $\reg I^s = \reg \overline{I^s}$ for all $s$. The regularity of powers of edge ideals of bicyclic graphs is calculated in few cases \cite{CJNP, G}; though, these edge ideals are normal. The inequality $\reg \overline{I^s} \le \reg I^s$ is known in some cases \cite{BCDMS}. We realize that the Stanley-Reisner ideal $I_\Delta$ of a one-dimensional simplicial complex $\Delta$ provides plenty of examples of non-normal squarefree monomial ideals. Indeed, if $\Delta$ viewed as a graph, contains an induced subgraph that is isomorphic to the complete bipartite graph $K_{3,3}$, then $I_\Delta$ is non-normal. Using the arguments in \cite{MV2}, we deduce the following \medskip \noindent\textbf{Theorem \ref{dim1}.} Let $I = I_\Delta$ be the Stanley-Reisner ideal of a one-dimensional simplicial complex $\Delta$. Assume that $I$ is non-normal. Then $\girth \Delta \le 4$. Furthermore, for all $s \ge 1$, and all $J \in \Inter(I^s, \overline{I^s})$, we have $$\reg J = \reg I^s = \begin{cases} 3s & \text{ if } \girth \Delta = 3\\ 2s + 1 & \text{ if } \girth \Delta = 4.\end{cases}$$ This paper is a continuation of \cite{MNPTV} where we analyse the degree complex $\Delta_\a(J)$ via the radical ideal $\sqrt{J:x^\a}$. When studying the degree complex $\Delta_\a(I^s)$ with $\a$ supports on two odd cycles, we discover the following example whose all powers have regularity depend on the characteristic of the base field. \begin{exm} Let \begin{gather*} I=(x_1y_1, x_2y_1, x_3y_1, x_7y_1, x_9y_1, x_1y_2, x_2y_2, x_4y_2, x_6y_2, x_{10}y_2,x_1y_3, x_3y_3, x_5y_3,x_6y_3,\\ x_8y_3, x_2y_4, x_4y_4, x_5y_4, x_7y_4, x_8y_4,x_3y_5, x_4y_5, x_5y_5, x_9y_5, x_{10}y_5,x_6y_6,x_7y_6, x_8y_6,x_9y_6,\\ x_{10}y_6,z_1z_2,z_2z_3,z_1z_3,z_4z_5,z_5z_6,z_4z_6) \subseteq k[x_1,\ldots,x_{10},y_1,\ldots,y_6,z_1,\ldots,z_6], \end{gather*} be the edge ideal of the disjoint union of two triangles and the graph in the Dalili and Kummini's example \cite{DK}. By Corollary \ref{cor_char_dependence}, for each $s \ge 1$, we have $$\reg I^s = \reg \overline{I^s} = \reg I^{(s)} = \begin{cases} 5 + 2s & \text{ when } \charr \k = 2 \\ 4 + 2s & \text{ when } \charr \k \neq 2. \end{cases}$$ In particular, $\reg I^s, \reg \overline{I^s}, \reg I^{(s)},$ and their asymptotic constants all depend on the characteristic of the base field. \end{exm} The example shows that the asymptotic linearity constant of $\reg I^s$ is not combinatorial. Note that, for edge ideals in the examples of Katzman \cite{Kat} and Dalili and Kummini \cite{DK}, the regularity of their second powers do not depend on the characteristic of the base field. We now describe the idea of proof of Theorem \ref{main_thm}. For a monomial ideal $J$, an exponent $(\a,i) \in \NN^n \times \NN$ is called an extremal exponent of $J$ if $\reg S/J = |\a| + i$ and $\lk_{\Delta_\a(J)} F$ has a non-vanishing homology in degree $i-1$ for some face $F$ of $\Delta_\a(J)$ such that $F \cap \supp \a = \emptyset$. The steps to prove Theorem \ref{main_thm} ($s = 3$ and $s = 4$) are: \begin{enumerate} \item Let $J_1 \subseteq J_2 \in \Inter(I^s,\overline{I^s})$ be intermediate ideals. Let $(\a,i)$ be an extremal exponent of $J_2$. We prove that if $\sqrt{J_2:x^\a} \neq \sqrt{J_1:x^\a}$, then there exists a variable $x_t$ such that $x_t \in \sqrt{J_2:x^\a}$ and $x_t \notin \supp x^\a$. By induction, Lemma \ref{red0}, and Lemma \ref{extremal_red} we deduce that $\reg J_2 \le \reg J_1.$ \item For each form $x^\a \notin I^s$, for which $\Delta_\a(I^s) \neq \Delta_\a(\overline{I^s})$, using Lemma \ref{red0} and induction, we reduce to the case where $G$ is the disjoint union of a smaller subgraph and odd cycles. We then use \cite[Theorem 1.1]{NV1} to establish the reverse inequality $\reg I^s \le \reg \overline{I^s}$. \end{enumerate} Since we do not have a mixed sum type formula for the regularity of the integral closure of powers, we need to consider disconnected graphs in our arguments. The main obstruction to carry out this comparison for higher powers is that when $s \ge 5$, the difference between $\sqrt{\overline{I^s}:x^\a}$ and $\sqrt{I^s:x^\a}$ are hard to describe. Now we explain the organization of the paper. In Section \ref{sec_basic}, we recall some notation and basic facts about Castelnuovo-Mumford regularity, the integral closure, and the degree complexes of monomial ideals. In Section \ref{sec_proof}, we prove Theorem \ref{main_thm}. In section \ref{sec_dim1}, we compute the regularity of intermediate ideals in $\Inter(I_\Delta^s,\overline{I_\Delta^s})$ for Stanley-Reisner ideals of one-dimensional simplicial complexes. In Section \ref{sec_ex}, we provide examples of graphs whose all powers have regularity depend on the characteristic of the base field. \section{Castelnuovo-Mumford regularity, integral closure, and degree complexes}\label{sec_basic} In this section, we recall some definitions and properties concerning Castelnuovo-Mumford regularity, the degree complexes of monomial ideals, symbolic powers of squarefree monomial ideals, and integral closure of powers of edge ideals. See \cite{BH, D, E, S, V} for more details. Throughout the paper, let $S = \k[x_1,...,x_n]$ be a standard graded polynomial ring over a field $\k$. For statements without proper citations, we refer to \cite{MNPTV} for proofs. \subsection{Graphs and their edge ideals} Let $G$ denote a finite simple graph over the vertex set $V(G)=[n] = \{1,2,\ldots,n\}$ and the edge set $E(G)$. For a vertex $x\in V(G)$, let the neighbours of $x$ be the subset $N_G(x)=\{y\in V(G)~|~ \{x,y\}\in E(G)\}$, and set $N_G[x]=N_G(x)\cup\{x\}$. For a subset $U$ of the vertices set $V(G)$, $N_G(U)$ and $N_G[U]$ are defined by $N_G(U)=\cup_{u\in U}N_G(u)$ and $N_G[U]=\cup_{u\in U}N_G[u]$. If $G$ is fixed, we shall use $N(U)$ or $N[U]$ for short. An independent set in $G$ is a set of pairwise non-adjacent vertices. A subgraph $H$ is called an induced subgraph of $G$ if for any vertices $u,v\in V(H)\subseteq V(G)$ then $\{u,v\}\in E(H)$ if and only if $\{u,v\}\in E(G)$. An induced matching is a subset of the edges that do not share any vertices and it is an induced subgraph. The induced matching number of $G$, denoted by $\mu(G)$, is the largest size of an induced matching in $G$. A $m$-cycle in $G$ is a sequence of $m$ distinct vertices $1,\ldots, m\in V(G)$ such that $\{1,2\},\ldots, \{m-1,m\}, \{m,1\}$ are edges of $G$. The girth of $G$, denoted $\girth(G)$ is the size of a smallest induced cycle in $G$. A clique in $G$ is a complete subgraph of $G$. We also call a clique of size $3$ a triangle. A graph $G$ is bipartite if $[n]$ can be partition into two disjoint subsets $[n] = U\cup V$ such that every edge connects a vertex in $U$ to one in $V$. The edge ideal of $G$ is defined to be $$I(G)=(x_ix_j~|~\{i,j\}\in E(G))\subseteq S.$$ For simplicity, we often write $i \in G$ (resp. $ij \in G$) instead of $i \in V(G)$ (resp. $\{i,j\} \in E(G)$). By abuse of notation, we also call $x_ix_j \in I(G)$ an edge of $G$. \subsection{Simplicial complexes and Stanley-Reisner correspondence} Let $\Delta$ be a simplicial complex on $[n]=\{1,\ldots, n\}$ that is a collection of subsets of $[n]$ closed under taking subsets. We put $\dim F = |F|-1$, where $|F|$ is the cardinality of $F$. The dimension of $\Delta$ is $\dim \Delta = \max \{ \dim F \mid F \in \Delta \}$. The set of its maximal elements under inclusion, called by facets, is denoted by $\F(\Delta)$. A simplicial complex $\D$ is called a cone over $x\in [n]$ if $x\in B$ for any $B\in \F(\Delta)$. If $\D$ is a cone, it is acyclic (i.e., has vanishing reduced homology). For a face $F\in\Delta$, the link of $F$ in $\Delta$ is the subsimplicial complex of $\Delta$ defined by $$\lk_{\Delta}F=\{G\in\Delta \mid F\cup G\in\Delta, F\cap G=\emptyset\}.$$ For each subset $F$ of $[n]$, let $x_F=\prod_{i\in F}x_i$ be a squarefree monomial in $S$. We now recall the Stanley-Reisner correspondence \begin{defn}For a squarefree monomial ideal $I$, the Stanley-Reisner complex of $I$ is defined by $$ \Delta(I) = \{ F \subset [n] \mid x_F \notin I\}.$$ For a simplicial complex $\Delta$, the Stanley-Reisner ideal of $\Delta$ is defined by $$I_\Delta = (x_F \mid F \notin \Delta).$$ The Stanley-Reisner ring of $\Delta$ is $\k[\Delta] = S/I_\Delta.$ \end{defn} From the definition, it is easy to see the following: \begin{lem}\label{cone} Let $I, J$ be squarefree monomial ideals of $S = \k [x_1,\ldots, x_n]$. Then \begin{enumerate} \item $\Delta(I)$ is a cone over $t \in [n]$ if and only if $x_t$ does not divide any minimal generator of $I$. \item $I \subseteq J$ if and only if $\Delta(I) \supseteq \Delta(J)$. \item $\Delta(I + J) = \Delta(I) \cap \Delta(J).$ \item $\Delta(I \cap J) = \Delta(I) \cup \Delta(J).$ \end{enumerate} \end{lem} \subsection{Castelnuovo-Mumford regularity}\label{subsection_reg} Let $\m = (x_1,\ldots, x_n)$ be the maximal homogeneous ideal of $S$. For a finitely generated graded $S$-module $L$, let $$a_i(L)= \begin{cases} \max\{j\in\ZZ \mid H_{\m}^i(L)_j \ne 0\} &\text{ if $H_{\m}^i(L)\ne 0$}\\ -\infty &\text{ otherwise,} \end{cases} $$ where $H^{i}_{\m}(L)$ denotes the $i$-th local cohomology module of $L$ with respect to $\m$. Then, the Castelnuovo-Mumford regularity (or regularity for short) of $L$ is defined to be $$\reg(L) = \max\{a_i(L) +i\mid i = 0,\ldots, \dim L\}.$$ For a non-zero and proper homogeneous ideal $J$ of $S$ we have $\reg(J)=\reg(S/J)+1$. We frequently use the result on the regularity of powers of mixed sum \cite[Theorem 1.1]{NV1} in this paper, so we state a part of it here for ease of reference. \begin{thm}\label{thm_mixed_sum} Let $I \subseteq R$ and $J \subseteq S$ be proper monomial ideals in standard graded polynomial rings over a field $\k$. Let $P$ be the sum of the extensions of $I$ and $J$ to $R \otimes_\k S$. Then $$\reg P^s = \max_{i\in [1,s-1], j\in [1,s]} \left ( \reg I^i + \reg J^{s-i}, \reg I^j + \reg J^{s-j+1} - 1\right ).$$ In particular, $$\reg P^s \ge \reg I^j + \reg J^{s-j+1} - 1, \text{ for } j \in [1,s].$$ \end{thm} \subsection{Integral closure of monomial ideals} \begin{defn} Let $I$ be a monomial ideal of $S$. The exponent set of $I$ is $E(I) = \{\a \in \NN^n | x^\a \in I\}$. The Newton polyhedron of $I$ is $$\NP(I) = \conv (\a \in \NN^n | x^\a \in I ),$$ the convex hull of the exponent set of $I$ in $\RR^n$. \end{defn} The following characterization of the integral closure of $I$ in term of the Newton polyhedron of $I$ is well-known (see e.g. \cite{E}). \begin{lem}\label{lem_NP} Let $I$ be a monomial ideal of $S$. Then the integral closure of $I$ is a monomial ideal with the exponent set $E(\overline {I}) = \NP(I) \cap \ZZ^r.$ \end{lem} \begin{defn}A monomial ideal $I$ of $S$ is said to be normal if $\overline{I^s} = I^s$ for all $s \ge 1$. \end{defn} For a monomial $f$ in $S$, the support of $f$, denoted $\supp(f)$, is the set of all indices $i \in [n]$ such that $x_i|f$. For a monomial ideal $J$ of $S$ and a subset $V$ of $[n]$, the restriction of $J$ to $V$, denoted $J_V$ is: $$J_V = (f \mid f \text{ is a minimal generator of J} \text{ such that } \supp f \subseteq V).$$ We have \begin{cor}\label{restriction} Let $I$ be a monomial ideal. Then $$\overline{(I_V)} = (\overline{I})_V.$$ \end{cor} \begin{proof} Follows from Lemma \ref{lem_NP}. \end{proof} \begin{cor}\label{restriction_intermediate} Let $I$ be a monomial ideal. Let $J \in \Inter(I^s,\overline{I^s})$ be an intermediate ideal. Let $V \subseteq [n]$ be a subset. Then $J_V \in \Inter(I_V^s, \overline{I_V^s}).$ \end{cor} \begin{proof}Follows from the definition and Corollary \ref{restriction}. \end{proof} For a monomial $f$ of $S$ and $i \in [n]$, $\deg_i(f) = \max (t \mid x_i^t \text{ divides } f)$ denotes the degree of $x_i$ in $f$. For a monomial ideal $I$, the degree of $x_i$ in $I$ is defined by $$\rho_i(I)=\max\{\deg_{i}(u) \mid u\text{ is a minimal monomial generator of } I\}.$$ We have the following property of minimal generators of integral closure. \begin{lem}\label{partial_degree} Let $I$ be a monomial ideal. Then $\rho_j(\overline{I}) \le \rho_j(I),$ for all $j = 1, \ldots, n$. In particular, if $I$ is squarefree, then $\rho_j(\overline{I^s}) \le s$ for all $j = 1, \ldots, n$. \end{lem} \begin{proof}Let $x^\a$ be a minimal generator of $\overline{I}$. By Lemma \ref{lem_NP}, there exists non-negative real numbers $c_1, ..., c_m$ with $\sum_{i=1}^m c_i = 1$ and minimal generators $x^{\b_1}, ..., x^{\b_m}$ of $I$ such that $$a_j \ge \sum_{i=1}^m c_i b_{ij}$$ for all $j$. Since $x^\a$ is minimal, this implies that $a_j = \lceil \sum_{i=1}^m c_i b_{ij} \rceil$ for all $j$. Since $b_{ij} \le \rho_j(I)$ and $\sum_{i=1}^m c_i = 1$, this implies that $\sum_{i=1}^m c_i b_{ij} \le \rho_j(I)$. Thus $a_j \le \rho_j(I)$. The conclusion follows. \end{proof} We now describe the minimal generators of the integral closure of powers of edge ideals of simple graphs. \begin{thm}\label{expansion_edge} Let $I = I(G)$ be the edge ideal of a simple graph $G$. Let $f$ be a minimal generator of $\overline{I(G)^s}$. Then there exist odd cycles $C_1, ..., C_{2a}$, and edges $e_1, ...,e_b$ of $G$ such that $$f = C_1 \cdots C_{2a} \cdot e_1 \cdots e_b,$$ where $(|C_1| + \cdots + |C_{2a}|)/2 + b = s.$ Furthermore, the odd cycles $C_i$ can be chosen so that $N(C_i) \cap C_j = \emptyset$ for all $i \neq j \in \{1, ..., 2a\}$. \end{thm} \begin{proof} For each pair $C_1, C_2$ of induced disjoint odd cycles, denote $m_{C_1,C_2} = x_{C_1} \cdot x_{C_2}$. Denote $P$ the set of all pairs of disjoint odd cycles in $G$. By \cite[Proposition 8.7.19]{V}, we have $$\overline{\mathcal{R}(It)} = S[It,m_{C_i,C_j}t^{m_{i,j} /2} \mid (C_i,C_j) \in P],$$ where $m_{i,j} = \deg m_{C_i,C_j}$. The conclusion follows by taking the graded component of degree $s$ and a remark that if $N(C_i) \cap C_j \neq \emptyset$, then $x_{C_i}\cdot x_{C_j} \in I^{u}$ with $u= m_{i,j}/2.$ \end{proof} \subsection{Symbolic powers} Let $I$ be a non-zero and proper homogeneous ideal of $S$. Let $\{P_1,\ldots,P_r\}$ be the set of the minimal prime ideals of $I$. Given a positive integer $s$, the $s$-th symbolic power of $I$ is defined by $$I^{(s)}=\bigcap_{i=1}^r I^sS_{P_i}\cap S.$$ \subsection{Degree complexes} For a monomial ideal $I$ in $S$, Takayama in \cite{T} found a combinatorial formula for $\dim_\k H_\m^i(S/I)_\a$ for all $\a\in\ZZ^n$ in terms of certain simplicial complexes which are called degree complexes. For every $\a = (a_1,\ldots, a_n) \in \ZZ^n$ we set $G_\a = \{i\mid \ a_i < 0\}$ and write $x^{\a} = \Pi_{j=1}^n x_j^{a_j}$. Thus, $G_\a =\emptyset$ whenever $\a \in \NN^n$. The degree complex $\D_\a(I)$ is the simplicial complex whose faces are $F \setminus G_\a$, where $G_\a\subseteq F\subseteq [n]$, so that for every minimal generator $x^\b$ of $I$ there exists an index $i \not\in F$ with $a_i < b_i$. It is noted that $\D_\a(I)$ may be either the empty complex or $\{\emptyset\}$ and its vertex set may be a proper subset of $[n]$. The next lemma is useful to compute the regularity of a monomial ideal in terms of its degree complexes. \begin{lem}\label{Key0} Let $I$ be a monomial ideal in $S$. Then \begin{multline*} \reg(S/I)=\max\{|\a|+i~|~\a\in\NN^n,i\ge 0,\h_{i-1}(\lk_{\D_\a(I)}F;\k)\ne 0\\ \text{ for some $F\in \D_\a(I)$ with $F\cap \supp \a=\emptyset$}\}. \end{multline*} In particular, if $I=I_\D$ is the Stanley-Reisner ideal of a simplicial complex $\D$ then $\reg(\k[\D])=\max\{i \mid \h_{i-1}(\lk_{\D}F;\k)\ne 0\text{ for some }F\in \D\}$. \end{lem} \begin{rem}\label{rem_T} Let $I$ be a monomial ideal in $S$ and a vector $\a\in \NN^n$. In the proof of \cite[Theorem 1]{T}, the author showed that if there exists $j\in [n]$ such that $a_j\ge \rho_j(I)$ then $\D_\a(I)$ is either a cone over $\{j\}$ or the void complex. \end{rem} \begin{defn}\label{exdef} Let $I$ be a monomial ideal in $S$. A pair $(\a,i) \in \NN^n\times\NN$ is called {\it an extremal exponent of $I$} if $\reg(S/I) = |\a| + i$ as in Lemma \ref{Key0}. \end{defn} \begin{rem}\label{rem_extremal_set} We sometime call $\a$ instead of $(\a,i)$ an extremal exponent of $I$. Let $\a$ be an extremal exponent of $I$. Then $x^\a \notin I$ and $\Delta_{\a}(I)$ is not a cone over $t$ with $t\in\supp\a$. In particular, by Remark \ref{rem_T}, $\a$ belongs to the finite set $$\Gamma(I)=\{\a\in\NN^n~|~ a_j<\rho_j\text{ for all } j=1,\ldots,n\}.$$ \end{rem} Furthermore, we have the following interpretation of the degree complex $\Delta_\a(I)$. \begin{lem}\label{Key1} Let $I$ be a monomial ideal in $S$ and $\a\in\NN^n$. Then $$I_{\Delta_{\a}(I)}=\sqrt{I : x^\a}.$$ \end{lem} \begin{rem}\label{rem_mingens_degree_complex} Let $\a$ be an extremal exponent of $I$. By Lemma \ref{cone}, Lemma \ref{Key1}, and Remark \ref{rem_extremal_set}, for each $t \in \supp \a$, there exists a minimal generator $f$ of $\sqrt{I:x^\a}$ such that $x_t | f$. \end{rem} We have the following inequality on the regularity of restriction of a monomial ideal. \begin{lem}\label{restriction_in} Let $I$ be a monomial ideal and $x$ be a variable. Then $$\reg (I,x) \le \reg I.$$ \end{lem} \begin{proof} See \cite[Corollary 4.8]{CHHKTT} or \cite[Lemma 2.14]{MNPTV}. \end{proof} \begin{lem}\label{restriction_inq} Let $J$ be a monomial ideal in $S$ and $V \subseteq [n]$. We have $$\reg (J_V) \le \reg (J).$$ In particular, for a monomial ideal $I \subseteq S$ then $$\reg \overline{I_V^s} \le \reg I^s.$$ \end{lem} \begin{proof} Let $\{t,\ldots,n\} = [n] \setminus V$. Then, $J_V + (x_t,...,x_n) = J + (x_t,...,x_n).$ The conclusion follows from Lemma \ref{restriction_in} and the fact that $x_t,\ldots, x_n$ is a regular sequence with respect to $S/J_V$. The last statement follows from the first statement and Lemma \ref{restriction}. \end{proof} The following lemma is essential to using the induction method in studying the regularity of a monomial ideal. \begin{lem}\label{red0} Let $I$ be a monomial ideal and the pair $(\a,i) \in \NN^n\times\NN$ be its extremal exponent. If $x$ is a variable that appears in $\sqrt{I:x^\a}$ and $x \notin \supp \a$, then $$\reg (I) = \reg (I,x).$$ \end{lem} For comparing regularity, we have the following useful lemma. \begin{lem}\label{extremal_red} Let $I, J$ be proper monomial ideals of $S$. Let $(\a,i)$ be an extremal exponent of $I$. If $\Delta_\a(I) = \Delta_\a(J)$, then $\reg I \le \reg J$. In particular, if $J \subseteq I$ and $\Delta_\a(I) = \Delta_\a(J)$ for all exponent $\a\in\NN^n$ such that $x^\a \notin I$ then $\reg I \le \reg J.$ \end{lem} For a monomial $f$ in $S$, the radical of $f$ is defined by $\sqrt{f} = \prod_{i \in \supp f} x_i$. We have the following simple observation on the generators of the radical of colon ideal. \begin{lem}\label{radical_colon} Let $I$ be a monomial ideal in $S$ generated by the monomials $f_1, ..., f_s$ and $\a \in \NN^n$. Then $\sqrt{I:x^\a}$ is generated by $\sqrt{f_1/\gcd(f_1, x^\a)}, ..., \sqrt{f_s/\gcd(f_s,x^\a)}$. \end{lem} Let $\a \in \NN^n$ be an exponent. To study the radical ideal of the form $\sqrt{I^s:x^\a}$, we introduce the notion of $I-\a$-radical power. For a monomial $f \in S$, the $I-\a$-radical power of $f$ is $$\rp_\a^I(f) = \max (t \mid f^m x^\a \in I^t \text{ for some } m > 0).$$ If $f \in I$ then $\rp_\a^I(f) = \infty$. When fixing an ideal $I$, we omit $I$ in the notation, and simply write $\rp_\a(f)$. Assume now that $I = I(G)$ is the edge ideal of a graph. The following description of generators of $\sqrt{I^s:x^\a}$ helps to simplify our arguments later on. The $I$-order of $f$ is defined by $$\ord_I(f) = \max (t \mid f \in I^t).$$ From the definition, it is clear that if $g|f$, then $\ord_I(g) \le \ord_I(f)$. \begin{lem}\cite[Lemma 2.16]{MV2}\label{criterion_in_power} Let $F$ be an independent set of $G$, and $\a \in \NN^n$ an exponent. Assume that \begin{equation} \sum_{j\in N(F)} a_j + \ord_I \left ( \prod_{u \notin N[F]} x_u^{a_u} \right ) \ge s, \label{eq_in_power} \end{equation} then $x_F \in \sqrt{I^s:x^\a}$. Conversely, if $x_F$ is a minimal generator of $\sqrt{I^s:x^\a}$ then \eqref{eq_in_power} holds. \end{lem} We have the following property of the radical powers. \begin{lem}\label{lem_radical_power} Let $I = I(G)$ be an edge ideal of a simple graph $G$. Let $\a, \b \in \NN^n$ be exponents, and $f$ a monomial in $S$. Then \begin{enumerate} \item $\rp_\a(f) \ge \ord_I(x^\a)$. \item $\rp_{\a + \b}(f) \ge \rp_\a(f) + \rp_\b(f)$. \item If $\supp f \cup \supp \a \supseteq \supp C$, where $C$ is an odd cycle of length $2\ell+1$, then $\rp_\a(f) \ge \ell$. Furthermore, if $\supp f \cap \supp C \neq \emptyset$ then $\rp_\a(f) \ge \ell+1.$ \item Let $C_1, C_2$ be disjoint odd cycles of length $2 \ell_1 +1, 2\ell_2+1$ respectively. If $\supp f \cup \supp \a \supseteq (\supp C_1 \cup \supp C_2)$, and $\supp f \cap (\supp C_1 \cup \supp C_2) \neq \emptyset$ then $\rp_\a(f) \ge \ell_1 + \ell_2 + 1.$ \item Let $F = \supp f$. Then $$\rp_\a(f) \ge \sum_{j\in N(F)} a_j + \ord_I \left ( \prod_{u \notin N[F]} x_u^{a_u} \right ).$$ \end{enumerate} \end{lem} \begin{proof} Parts (1) and (2) follow from the definition. For part (3), it suffices to note that $\ord_I(x_C) = \ell$ and $\ord_I(x_ix_C) = \ell+1$ for any $i \in \supp C$. Part (4) follows from Part (2) and Part (3). Part (5) follows from Lemma \ref{criterion_in_power} and a remark that if $F$ is not an independent set then $\rp_\a(f) = \infty$. \end{proof} \section{Proof of Theorem \ref{main_thm}}\label{sec_proof} Let $G$ be a simple graph with vertex set $[n]$ and edge set $E(G)$. We assume that $G$ has no isolated vertices; $G$ might be disconnected. Let $I=I(G)$ be the edge ideal of $G$. In this section, we will prove Theorem \ref{main_thm}. By Theorem \ref{expansion_edge}, $\overline{I} = I$ and $\overline{I^2} = I^2$, we have two cases $s = 3$ and $s=4$. We start with a general formula for the radical of colon ideal in the case it contains a set of 'good variables'. \begin{lem}\label{rad_good_colon} Let $I$ be the edge ideal of a simple graph $G$. Let $\a \in \NN^n$ be an exponent such that $x^\a \notin I^s$. Assume that $\a$ has a decomposition $\a = \b + \c$ satisfying the following conditions: \begin{enumerate} \item $x_i \in \sqrt{I^s:x^\a}$ for all $i \in N[\supp \b]$, \item $N[\supp \b] \cap \supp \c = \emptyset$. \end{enumerate} Let $H$ be the restriction of $G$ to $[n] \setminus N[\supp \b]$. Denote $t = s - \ord_I(x^\b)$. Then, \begin{equation}\label{eq_rad_colon} \sqrt{I^s:x^\a} = \left ( x_i \mid i \in N[\supp \b] \right ) + \sqrt{I(H)^{t}:x^\c}. \end{equation} In particular, if $(\a,i)$ is an extremal exponent of $I^s$ then \begin{equation}\label{eq_reg_inequality} \reg (I^s) \le \reg I(H)^t + |\b|. \end{equation} \end{lem} \begin{proof} First, we prove the equality \eqref{eq_rad_colon}. From the assumption, it is clear that the left hand side contains the right hand side. Let $V = [n] \setminus N[\supp \b]$. It suffices to prove that if $f$ is a minimal generator of $\sqrt{I^s:x^\a}$ with $\supp f \subseteq V$, then $f \in \sqrt{I(H)^t:x^\c}$. If $f \in I$, then by definition, $f \in I(H) \subseteq \sqrt{I(H)^t:x^\c}$. Thus, we may assume that $F = \supp f$ is an independent set. By Lemma \ref{criterion_in_power}, we have $$\sum_{j \in N(F)} a_j + \ord_I( h )\ge s, \text{ where } h:= \prod_{u \notin N[F]} x_u^{a_u}.$$ Since $N[\supp \b] \cap \supp \c = \emptyset$, $N[\supp \c] \cap \supp \b = \emptyset$. In particular, $N[F] \cap \supp \b = \emptyset$. Hence, \begin{equation}\label{eq_3_1_2} \sum_{j\in N(F) \cap V} c_j = \sum_{j \in N(F)} a_j. \end{equation} Let $$h_1 := \prod_{u\in V\setminus N[F]} x_u^{c_u} = \prod_{u \in V \setminus N[F]} x_u^{a_u}.$$ Hence, $h = x^\b h_1$. Since $N[\supp \b] \cap \supp h_1 = \emptyset$, $\ord_I(h) = \ord_I(x^\b) + \ord_I(h_1)$. Thus $$\sum_{j \in N(F) \cap V} c_j + \ord_I(h_1) = \sum_{j \in N(F)} a_j + \ord_I(h) - \ord_I(b) \ge t.$$ By Lemma \ref{criterion_in_power}, $f \in \sqrt{I(H)^t : x^\c}$ as required. We now prove \eqref{eq_reg_inequality}. By \eqref{eq_rad_colon}, $\Delta_\a(I^s) = \Delta_\c(I(H)^t)$. Since $(\a,i)$ is an extremal exponent of $I^s$, $x^\a \notin I^s$, hence $t \ge 1$ and $x^\c \notin I^t$. By Lemma \ref{Key0}, $$\reg I^s = |\a| +i+1 = |\b| + |\c| + i+1 \le |\b| + \reg I(H)^t.$$ The conclusions follow. \end{proof} \begin{defn} A decomposition $\a = \b + \c$, where $\b \neq 0$ satisfying the conditions of Lemma \ref{rad_good_colon} is called a {\em good decomposition} of $\a$ with respect to $I^s$. We also call a decomposition $x^\a = x^\b \cdot x^\c$ good if the corresponding decomposition on the exponents $\a = \b + \c$ is. \end{defn} In proving the inequality $\reg I^s \le \reg \overline{I^s}$, we see that the extremal exponents $\a$ of $I^s$ with $\Delta_\a(I^s) \neq \Delta_\a(\overline{I^s})$ usually have good decompositions. We then use induction and Theorem \ref{thm_mixed_sum} to establish the required inequality. \begin{lem}\label{lem_inequality_special}Let $I$ be the edge ideal of a simple graph $G$. Fix a power $s \ge 2$. Let $\a \in \NN^n$ be an extremal exponent of $I^s$. Assume that $\a$ has a good decomposition $\a = \b + \c$. Let $H$ be the restriction of $G$ to $[n] \setminus N[\supp \b]$. Let $K$ be the restriction of $G$ to a proper subset of $\supp \b$. Assume that $\reg I(K)^{s-t+1} \ge |\b| + 1$, where $t = s - \ord_I(x^\b)$ and that $L = I(H) + I(K)$ satisfies $\reg L^s \le \reg \overline{L^s}$. Then $\reg I^s \le \reg \overline{I^s}$. \end{lem} \begin{proof}By Lemma \ref{rad_good_colon}, $\reg I^s \le \reg I(H)^s + |\b|$. By Theorem \ref{thm_mixed_sum}, $$\reg L^s \ge \reg I(H)^t + \reg I(K)^{s-t+1} - 1 \ge \reg I(H)^t + |\b| \ge \reg I^s.$$ By assumption $\reg L^s \le \reg \overline{L^s}$, hence $$\reg I^s \le \reg L^s \le \reg \overline{L^s} \le \overline{I^s},$$ where the last inequality follows from Lemma \ref{restriction_inq}. \end{proof} We now proceed to the proof of Theorem \ref{main_thm} for $s = 3$. First, we have \begin{lem}\label{lem_colon_3} Let $J_1 \subseteq J_2$ be any two intermediate ideals in $\Inter(I^3, \overline{I^3})$. Let $\a\in \NN^n$ be an exponent such that $x^\a \notin J_2$. Then $$\sqrt{J_2:x^\a} = \sqrt{J_1:x^\a}.$$ In particular, $\Delta_\a(J_2) = \Delta_\a(J_1)$. \end{lem} \begin{proof} Since $J_1 \subseteq J_2$, $\sqrt{J_1:x^\a} \subseteq \sqrt{J_2:x^\a}$. By Lemma \ref{radical_colon}, it suffices to prove that if $f = \sqrt{P/\gcd(P,x^\a)}$ for a minimal generator $P$ of $J_2$ then $f \in \sqrt{J_1:x^\a}$. We may assume that $P \notin J_1$. In particular, $P \notin I^3$. By Theorem \ref{expansion_edge}, there exist two disjoint triangles $C_1$ and $C_2$ such that $P = x_{C_1} \cdot x_{C_2}$. Since $f = \sqrt{P/\gcd(P,x^\a)}$, we have \begin{equation}\label{eq_lem_1_1} \supp f \subseteq \supp P \subseteq \supp f \cup \supp \a. \end{equation} Since $f\neq 1$, $\supp f \cap \supp P \neq \emptyset$. By Lemma \ref{lem_radical_power}, $$\rp_\a(f) \ge 3 \implies f \in \sqrt{I^3:x^\a} \subseteq \sqrt{J_1:x^\a}.$$ The last statement follows from Lemma \ref{Key1}. \end{proof} \begin{thm}\label{third_pow} Let $I$ be the edge ideal of a simple graph $G$. Let $J \in \Inter(I^3, \overline{I^3})$ be an intermediate ideal. Then $$\reg J = \reg \overline {I^3} = \reg I^3.$$ \end{thm} \begin{proof} Let $J_1 \subseteq J_2$ be any two intermediate ideals in $\Inter(I^3, \overline{I^3})$. By Lemma \ref{lem_colon_3} and Lemma \ref{extremal_red}, $\reg J_2 \le \reg J_1.$ It remains to prove that $\reg I^3 \le \reg \overline{I^3}$. We prove by induction on $n = |V(G)|$. By Theorem \ref{expansion_edge}, we may assume that $n \ge 6$, as if $n \le 5$, then $\overline{I^3} = I^3$. Let $(\a,i)\in\NN^n\times\NN$ be an extremal exponent of $I^3$. If $x^\a \notin \overline{I^3}$, by Lemma \ref{lem_colon_3} and Lemma \ref{extremal_red}, $\reg I^3 \le \reg \overline {I^3}$. Now assume that $x^\a \in \overline{I^3}$. By Theorem \ref{expansion_edge}, there exist two triangles $C_1$, $C_2$ in $G$ such that $N[C_1] \cap C_2 = \emptyset$ and $x^\a = x_{C_1} \cdot x_{C_2} \cdot f$, for some monomial $f \in S$. Since $x^\a \notin I^3$, \begin{equation}\label{eq_3_1} N[C_1 \cup C_2] \cap \supp f = \emptyset. \end{equation} Furthermore, $x_i \in \sqrt{I^3:x^\a}$ for all $i \in N[C_1 \cup C_2]$. Thus, the decomposition $x^\a = (x_{C_1} x_{C_2}) \cdot f$ is a good decomposition of $I^3$. Let $K$ be a maximum induced matching of $C_1 \cup C_2$. Then $\reg I(K)^3 = 7 = |\b| + 1$. Then $L := I(H) + I(K)$ is the restriction of $I$ to $K \cup H$ which is a proper subset of $[n]$. By induction $\reg L^3 \le \reg \overline{L^3}$. By Lemma \ref{lem_inequality_special}, $\reg I^3 \le \reg \overline{I^3}.$ The conclusion follows. \end{proof} For the fourth power, we first prove a relation on radical of colon ideal. We also use the following notation. Let $\a \in \NN^n$ be an exponent and $V \subset [n]$. The restriction of $\a$ to $V$ is an exponent $\b$ such that $b_i = a_i$ if $i \in V$ and $b_i = 0$ if $i \notin V$. \begin{lem}\label{lem_colon_4} Let $J_1 \subseteq J_2$ be intermediate ideals in $\Inter(I^4, \overline{I^4})$. Let $\a$ be an exponent such that $x^\a \notin J_2$. Assume that $\sqrt{J_2 : x^\a} \neq \sqrt{J_1:x^\a}$. Let $f$ be a minimal generator of $\sqrt{J_2:x^\a}$ such that $f \notin \sqrt{J_1:x^\a}$. Then we must have \begin{enumerate} \item There exist two triangles $C_1$, $C_2$ with $N[C_1] \cap C_2 = \emptyset$ such that $x^\a = C_1 \cdot C_2 \cdot x^\b$ where $1 \neq x^\b \notin I$. \item $\deg f = 1$ and $\supp f \notin \supp \a$. \end{enumerate} \end{lem} \begin{proof} By Lemma \ref{radical_colon}, there exists a minimal generator $P$ of $J_2$ such that $f = \sqrt{P/\gcd(P,x^\a)}$. In particular, \begin{equation}\label{eq_3_2} \supp f \subseteq \supp P \subseteq \supp f \cup \supp \a. \end{equation} Since $f \notin \sqrt{J_1 :x^\a}$, we have $P \notin I^4$ and $f \notin I$. By Theorem \ref{expansion_edge}, there are two cases. \smallskip \noindent\textbf{Case 1.} $P = x_{C_1} \cdot x_{C_2}$ where $C_1, C_2$ are disjoint cycles of length $3$ and $5$ respectively. By Lemma \ref{lem_radical_power} and \eqref{eq_3_2}, $$\rp_\a(f) \ge 4 \implies f \in \sqrt{I^4:x^\a} \subseteq \sqrt{J_1:x^\a}, \text{ a contradiction}.$$ \smallskip \noindent\textbf{Case 2.} $P = x_{C_1} \cdot x_{C_2} \cdot x_e$, where $C_1, C_2$ are $3$-cycles such that $N[C_1] \cap C_2 = \emptyset$ and $e$ is an edge of $G$. Assume that $C_1 = 123$, $C_2 = 456$, and $e = uv$, note that $u,v$ might coincide with $\{1, ..., 6\}$. Since $f \notin I$, \begin{equation}\label{eq_3_3} |\supp f \cap \{1,2,3\}| \le 1, |\supp f \cap \{4,5,6\}| \le 1, \text{ and } | \supp f \cap \{u,v\} | \le 1. \end{equation} Let $\b, \c$ be the restriction of $\a$ to $\{1,2,3\}$ and $\{4,5,6\}$ respectively. There are several subcases: Subcase 2.a. $|\{u,v\} \cap \{1,2,3,4,5,6\} | = 2$. Since $N[123] \cap \{4,5,6\} = \emptyset$, we may assume that $u = 5$, $v = 6$. If $\supp f \cap \{1,2,3\} \neq \emptyset$, then $\rp_\b(f) \ge 2$, $\rp_\c(f) \ge 2$. If $\supp f \cap \{4,5,6\} \neq \emptyset$, then $\rp_\b(f) \ge 1$, $\rp_\c(f) \ge 3$. In either cases, $\rp_\a(f) \ge 4$, hence $f\in \sqrt{I^4:x^\a}$, a contradiction Subcase 2.b. $|\{u,v\} \cap \{1,2,3,4,5,6\}| = 1$. We may assume that $u = 6$, $v = 7$. If $\supp f \cap \{1,2,3\} \neq \emptyset$, then $\rp_\b(f) \ge 2$, $\rp_\c(f) \ge 2$, hence $f \in \sqrt{I^4:x^\a}$, a contradiction. Thus, we must have $\supp f \cap \{1,2,3\} = \emptyset$. If $\supp f \cap \{4,5,6\} \neq \emptyset$, by \eqref{eq_3_3}, there are subcases as follows. 2.b.$\alpha$. If $4 \in \supp f$ or $5 \in \supp f$ then $6\in \supp \c$. Thus $\rp_\c(f) \ge 3$, hence $\rp_\a(f) \ge 4$, a contradiction. 2.b.$\beta$. If $6 \in \supp f$, let $\mathbf{d}$ be the restriction of $\a$ to $\{4,5,7\}$. Then $\rp_{\mathbf{d}}(f) \ge 3$, hence $\rp_\a(f) \ge \rp_\b(f) + \rp_{\mathbf{d}} (f) \ge 4$, a contradiction. Thus, we must have $\supp f \cap \{1,..,6\} = \emptyset$. Therefore, $f = x_7$, and $x_1\cdots x_5 x_6^2 | x^\a$. But $$x_7^2 x_6^2 x_4x_5 x_1x_2 \in I^4 \implies f \in \sqrt{J_1:x^\a}, \text{ a contradiction}.$$ Subcase 2.c. $|\{u,v\} \cap \{1,2,3,4,5,6\} | = 0$. We may assume that $u = 7, v=8$. Let $\mathbf{d}$ be the restriction of $\a$ to $\{7,8\}$. If $\supp f \cap \{1,2,3\} \neq \emptyset$, then $\rp_\b(f) \ge 2$. If $\supp f \cap \{4,5,6\} \neq \emptyset$, then $\rp_\c(f) \ge 2$. In either cases, $\rp_\a(f) \ge \rp_\b(f) + \rp_\c(f) + \rp_{\mathbf{d}}(f) \ge 2 + 1 + 1 = 4$, a contradiction. Therefore, $\supp f \cap \{1, ..., 6\} = \emptyset$. Thus $\supp f \subseteq \{7,8\}$. Since $f \notin I$, $\deg f = 1$. We may assume that $f = x_8$. Hence $x_1\cdots x_7 | x^\a$. Furthermore, $8 \notin \supp \a$, as $f = \sqrt{P/\gcd(P,x^\a)}$. The conclusion follows. \end{proof} \begin{lem}\label{fourth_in} Let $I = I(G)$ be the edge ideal of a simple graph $G$. Let $J_1 \subseteq J_2$ be intermediate ideals in $\Inter(I^4, \overline{I^4})$. Then $$\reg J_2 \le \reg J_1.$$ \end{lem} \begin{proof} We prove by induction on $n = |V(G)|$. Let $(\a,i)$ be an extremal exponent of $J_2$. By Lemma \ref{extremal_red}, we may assume that $\Delta_\a(J_2) \neq \Delta_\a(J_1)$. By Lemma \ref{lem_colon_4}, there exists $f \in \sqrt{J_2 : x^\a}$ such that $\deg f = 1$ and $\supp f \notin \supp \a$. Let $K_1, K_2$ be the restriction of $J_1, J_2$ to $V = [n] \setminus \supp f$. By Corollary \ref{restriction_intermediate}, $K_1 \subseteq K_2$ are intermediate ideals in $\Inter(I_V^4,\overline{I_V^4})$. By induction $\reg K_2 \le \reg K_1$. By Lemma \ref{red0} and Lemma \ref{restriction_inq}, $$\reg J_2 = \reg (J_2,f) = \reg(K_2,f) \le \reg(K_1,f) = \reg(J_1,f) \le \reg J_1.$$ The conclusion follows. \end{proof} To prove the reverse inequality $\reg(S/I^4) \le \reg (S/ \overline {I^4})$, we also use induction on $n=|V(G)|$. For simplicity of exposition, throughout the rest of this section, we always assume that $(\a,i)\in\NN^n\times\NN$ is an extremal exponent of $I^4$, where $I=I(G)$. It is clear that $x^\a\notin I^4$. By Lemma \ref{extremal_red}, it suffices to consider the cases $x^\a\notin \overline{I^4}$ with $\D_\a(I^{4})\ne\D_\a(\overline{I^4})$ or $x^\a\in \overline{I^4}$. We will see frequently that $\a$ has a good decomposition $\a = \b + \c$. As in the proof of Theorem \ref{third_pow}, we then take $K$ to be a maximum induced matching of $G$ restricted to $\supp \b$. It is fairly simple to show that all the assumptions of Lemma \ref{lem_inequality_special} hold, hence $\reg I^4 \le \reg \overline{I^4}$. Thus, once we show that $\a$ has a good decomposition, we conclude our argument. We treat each form of $\a$ in the following lemmas. \begin{lem}\label{lem_4_1} Assume that there exist two induced cycles $C_1$, $C_2$ with $N[C_1] \cap C_2 = \emptyset$ of length $3$ and $5$ respectively, such that $x_{C_1}x_{C_2} | x^\a$. Then $\reg I^4 \le\reg \overline {I^4}.$ \end{lem} \begin{proof} Write $x^\a = x_{C_1} x_{C_2} \cdot f$, where $f$ is a monomial in $S$. Since $x^\a\notin I^4$, \begin{equation}\label{eq_4_1} N[C_1 \cup C_2] \cap \supp (f) =\emptyset. \end{equation} Furthermore, $x_i \in \sqrt{I^4:x^\a}$ for all $i \in N[C_1 \cup C_2]$. Thus the decomposition $x^\a = (x_{C_1}x_{C_2}) \cdot f$ is a good decomposition. Hence, $\reg I^4 \le \reg \overline{I^4}$. \end{proof} \begin{lem}\label{lem_4_2} Assume that there exist two triangles $C_1, C_2$ with $N[C_1] \cap C_2 = \emptyset$ and an edge $e$ such that $x_{C_1}x_{C_2}x_e | x^\a$. Then $\reg(I^4) \le \reg \overline{I^4}.$ \end{lem} \begin{proof} Without loss of generality, we may assume that $x^\a = x_1 \cdots x_6 x_ux_v \cdot f$, where $C_1=123$ and $C_2=456$ are triangles with $N[C_1] \cap C_2 = \emptyset$, $uv$ is an edge of $G$ and $f$ is a monomial in $S$. Note that $u,v$ might belong to $\{1, ..., 6\}$. Since $x_i(x_1\cdots x_6) \in I^3$ for all $i \in N[\{1, ..., 6\}]$, and $x^\a \notin I^4$, we have \begin{equation}\label{eq_4_2_1} x_i \in I^4:x^\a \text{ for all } i \in N[\{1, ...,6\}] \implies N[\{1,...,6\}] \cap \supp f = \emptyset. \end{equation} Assume first that $\{u,v\} \cap \{1, ..., 6\} \neq \emptyset$. Say $u = 6$. If $i \in N(v)$, then $$(x_1x_2)(x_4x_6)(x_5x_6)(x_vx_i)x_3 \in I^4 \implies x_i \in I^4:x^\a.$$ Together with \eqref{eq_4_2_1} and the fact that $x^\a \notin I^4$, we have \begin{equation} x_i \in I^4:x^\a \text{ for all } i \in N[\supp \b] \implies N[\supp \b ] \cap \supp f = \emptyset, \end{equation} where $x^\b = x_1\cdots x_5 \cdot x_6^2 \cdot x_v$. Thus the decomposition $x^\a = x^\b \cdot f$ is a good decomposition, hence $\reg I^4 \le \reg \overline{I^4}$. We now assume that $\{u,v\} \cap \{1,...,6\} = \emptyset$. Assume that $u = 7, v= 8$. There are two cases. \smallskip \noindent\textbf{Case 1.} $N(\{1,...,6\}) \cap \{7,8\} = \emptyset$. By \eqref{eq_4_2_1}, the decomposition $x^\a = (x_1\cdots x_6) \cdot (x_7x_8 f)$ is a good decomposition, hence $\reg I^4 \le \reg \overline{I^4}$. \smallskip \noindent\textbf{Case 2.} $N(\{1,...,6\}) \cap \{7,8\} \neq \emptyset$. We may assume that $67 \in G$. Since $x^\a \notin I^4$, we deduce that \begin{equation}\label{eq_4_2_2} N(\{1,2,3\}) \cap (\{8\} \cup \supp f) = \emptyset. \end{equation} We claim that $7 \notin N(\{1,2,3\})$. Assume by contradiction that $7 \in N(\{1,2,3\})$. Since $x^\a \notin I^4$, $a_7 = 1$ and $x_8 \notin N(\{1, ..., 6\})$. Furthermore, \begin{equation}\label{eq_4_2_4} x_i \in I^4:x^\a \text{ for all } i \in N(\{8\} \cup \supp f). \end{equation} By Remark \ref{rem_mingens_degree_complex}, there exists a minimal generator $g$ of $\sqrt{I^4:x^\a}$ such that $x_8 | g$. By \eqref{eq_4_2_1} and \eqref{eq_4_2_4}, $\supp g$ is an independent set and $$\supp g \cap N(\supp \a \setminus \{7\}) = \emptyset \implies N(\supp g) \cap \supp \a = \{7\}.$$ Let $h = \prod_{u \notin N[\supp g]} x_u^{a_u}.$ Since $8\in \supp g$, $7 \in N(\supp g)$, hence $h | x_1\cdots x_6 \cdot f$ has $\ord_I(h) \le 2$. Thus $$\sum_{j \in N(\supp g)} a_j + \ord_I(h) \le 3,$$ a contradiction to Lemma \ref{criterion_in_power}. Thus, $7 \notin N(\{1,2,3\})$. By \eqref{eq_4_2_1} and \eqref{eq_4_2_2} the decomposition $x^\a = (x_1x_2x_3) \cdot (x_4\cdots x_8 \cdot f)$ is a good decomposition. Hence, $\reg I^4 \le \reg \overline{I^4}.$ \end{proof} Recall that $(\a,i)$ is an extremal exponent of $I^4$. We now fix a face $F\in \D_{\a}(I^4)$ such that $F\cap\supp(\a)=\emptyset$ and $\h_{i-1}(\lk_{\D_{\a}(I^4)} F;\k)\ne 0$. \begin{lem}\label{lem_4_3} Assume that $x^\a\notin \overline{I^4}$ and $\Delta_\a(I^4) \neq \Delta_\a(\overline{I^4})$. Then $\reg I^4 \le \reg \overline{I^4}$. \end{lem} \begin{proof} By Lemma \ref{lem_colon_4}, there exist two triangles $123$ and $456$ with $N[\{1,2,3\}] \cap \{4,5,6\} = \emptyset$ and a monomial $f \neq 1$ such that $\supp f$ is an independent set and $x^\a = x_1 \cdots x_6 \cdot f$. Since $x^\a \notin \overline{I^4}$, we have $|\supp f \cap \{1,...,6\} | \le 1$. First assume that $|\supp f \cap \{1,...,6\} | = 1$, say $x_6 |f$. Write $x^\a = x_1 \cdots x_5 \cdot x_6^t \cdot g$, where $ t \ge 2$. Since $x^\a \notin I^4$, \begin{equation}\label{eq_4_3_1} x_i \in I^4:x^\a \text{ for all } i \in N[\{1,2,3\}] \implies N[\{1,2,3\}] \cap \supp g = \emptyset. \end{equation} Thus the decomposition $x^\a = (x_1x_2x_3) \cdot (x_4x_5x_6^tg)$ is a good decomposition. Hence, $\reg I^4 \le \reg \overline{I^4}$. Thus, we may assume that $x^\a = x_1 \cdots x_6 \cdot x_7^{a_7} \cdots x_u^{a_u}$, where $a_7, ..., a_u > 0$. There are two cases. \smallskip \noindent\textbf{Case 1.} $N(\{1,...,6\}) \cap \{7, ...,u\} \neq \emptyset$. Assume that $67 \in G$. Since $x^\a \notin I^4$, we have \begin{equation}\label{eq_4_3_2} x_i \in I^4:x^\a \text{ for } i \in N[\{1,2,3\}] \implies N[\{1,2,3\}] \cap \{8, ..., u\} = \emptyset. \end{equation} There are two subcases: Subcase 1.a. $7 \in N(\{1,2,3\})$. Since $x^\a \notin I^4$, $a_7 = 1$. With argument similar to \textbf{Case 2} in the proof of Lemma \ref{lem_4_2}, we see that if $u > 7$, then $\Delta_\a(I^4)$ is a cone over $u$, which is a contradiction. Thus, $x^\a = x_1 \cdots x_7$. Then $$\sqrt{I^4:x^\a} = (x_i \mid i \in N[\{1,...,6\}]) + I(H),$$ where $H$ is the restriction of $G$ to $[n] \setminus N[\{1,...,6\}]$. Thus $\Delta_\a(I^4) = \Delta(I(H))$. By Lemma \ref{Key0}, $\reg I^4 \le \reg I(H) + 7$. Let $L= I(H) + K$ be the restriction of $I$ to $[n] \setminus N[\{1,...,6\}] \cup \{1,2,4,5\}$, where $K = (x_1x_2,x_4x_5)$. Then by induction, $\reg L^4 \le \reg \overline{L^4}$. By Theorem \ref{thm_mixed_sum}, we have $$\reg L^4 \ge \reg I(H) + \reg K^4 - 1 = \reg I(H) + 8 > \reg I^4,$$ which is a contradiction to Lemma \ref{restriction_inq}. Subcase 1.b. $7 \notin N(\{1,2,3\})$. By \eqref{eq_4_3_2}, the decomposition $x^\a = (x_1x_2x_3) \cdot (x_4x_5x_6 x_7^{a_7}\cdots x_u^{a_u})$ is a good decomposition. Hence $\reg I^4 \le \reg \overline{I^4}$. \smallskip \noindent\textbf{Case 2.} $N(\{1,...,6\}) \cap \{7, ...,u\} = \emptyset$. If either of the intersections $N[\{1,2,3\}] \cap N[\{4,5,6\}], N(\{1,...,6\}) \cap N(\{7, ..., u\}), N(i) \cap N(j)$ for $i \neq j \in \{7,...,u\}$ is non-empty, say $r$ belongs to one of them, then $x_r \in \sqrt{I^4:x^\a}$ and $r \notin \supp \a$. Let $J$ be the restriction of $I$ to $[n] \setminus \{r\}$. By Lemma \ref{restriction_inq}, Lemma \ref{red0}, and induction, $$\reg I^4 = \reg (I^4,x_r) = \reg (J^4,x_r) \le \reg (\overline{J^4},x_r) \le \reg \overline{I^4}.$$ Thus, we may assume that \begin{equation}\label{eq_4_3_3} N[123] \cap N[456] = \emptyset, N[\{1,...,6\}] \cap N(\{7,...,u\}) = \emptyset, \text{ and } N(i) \cap N(j) = \emptyset, \end{equation} for $i\neq j \in \{7, ..., u\}$. For a set $U \subset [n]$, we denote by $(U) := (x_i \mid i \in U)$ the ideal generated by variables in $U$. The notation $(U)*(V)$ denotes the product of two linear ideals. Since $\ord_I(x_1 \cdots x_6) = 2$, it is clear that \begin{align} \label{eq_4_3_4} \begin{split} \sqrt{I^4:x^\a} & \supseteq I + (N[\{1,...,6\}]) * (N(\{7,...,u\}) ) \\ &+ (N[\{1,2,3\}]) * (N[\{4,5,6\}]) + \sum_{i,j \in \{7,...,u\}, ~ i < j} (N(i)) * (N (j)). \end{split} \end{align} We first claim \begin{equation}\label{eq_4_3_5} a_j = 1 \text { for all } j = 7,\ldots, u. \end{equation} \begin{proof}[Proof of \eqref{eq_4_3_5}] Assume by contradiction that $a_t > 1$ for some $t\in \{7, ..., u\}$. Without loss of generality, we may assume that $a_j > 1$ for all $j = 7, ..., t$ and $a_j = 1$ for all $j = t+1, ..., u$. Then \begin{equation}\label{eq_4_3_6} x_i \in \sqrt{I^4:x^\a} \text{ for all } i \in N(\{7,...,t\}). \end{equation} By Remark \ref{rem_mingens_degree_complex}, there exists a minimal generator $g$ of $\sqrt{I^4:x^\a}$ such that $x_7 | g$. Since $g$ is minimal, by \eqref{eq_4_3_3}, \eqref{eq_4_3_4} and \eqref{eq_4_3_6}, we deduce that $\supp g$ is an independent set and \begin{equation}\label{eq_4_3_7} \supp g \cap N(\{7,...,t\}) = \emptyset \text{ and } |\supp g \cap (N[\{1,...,6\}] \cup N(\{t+1, ..., u\})) | \le 1. \end{equation} In particular, $\sum_{j \in N(\supp g)} a_j \le 1$. Furthermore, $\ord_I(x^\a) = 2$, thus $$\sum_{j \in N(\supp g)} a_j + \ord_I \left ( \prod_{u\notin N[\supp g]} x_u^{a_u} \right ) \le 1 + 2 = 3,$$ a contradiction to Lemma \ref{criterion_in_power}. \end{proof} Thus $x^\a = x_1 \cdots x_6 \cdot x_7 \cdots x_u$. We now claim that \eqref{eq_4_3_4} is an equality, namely \begin{align} \label{eq_4_3_8} \begin{split} \sqrt{I^4:x^\a} & = I + (N[\{1,...,6\}]) * (N(\{7,...,u\}) ) \\ &+ (N[\{1,2,3\}]) * (N[\{4,5,6\}]) + \sum_{i,j \in \{7,...,u\}, ~ i < j} (N(i)) * (N (j)). \end{split} \end{align} \begin{proof}[Proof of \eqref{eq_4_3_8}] Let $x_U$ be a minimal generator of $\sqrt{I^4:x^\a}$. We may assume that $U$ is an independent set. Since $\ord_I(x^\a) = 2$, by Lemma \ref{criterion_in_power}, we must have $\sum_{j\in N(U)} a_j \ge 2$. Furthermore, by assumption \eqref{eq_4_3_3}, we deduce that there are two indices $i,j \in \{1, ..., u\}$ such that $U \cap N(i) \neq 0$ and $U \cap N(j) \neq 0$. Thus $x_U$ belongs to the right hand side. \end{proof} We now claim: \begin{equation}\label{eq_4_3_9} u = 7, \text { hence } x^\a = x_1 \cdots x_7. \end{equation} \begin{proof}[Proof of \eqref{eq_4_3_9}] Assume by contradiction that $u > 7$. Let \begin{align*} J &= I + (N[\{1,2,3\}]) * (N[\{4,5,6\}]) + (N[\{1,...,6\}]) * (N(\{7,...,u\}) ) \\ &+ \sum_{i,j \in \{7,...,u\}, ~ i < j, (i,j) \neq (u-1,u)} (N(i)) * (N (j)). \end{align*} By \eqref{eq_4_3_8}, $\sqrt{I^4:x^\a} = J + (N(u-1))* (N(u)) = (J + (N(u-1)) \cap (J+(N(u)))$. Let $\Gamma_1$ and $\Gamma_2$ be the simplicial complexes corresponding to $J + (N(u-1))$ and $J + (N(u))$. By Lemma \ref{cone}, $\Delta_\a(I^4) = \Gamma_1 \cup \Gamma_2$ and $\Gamma_1 \cap \Gamma_2$ corresponds to $J + (N(u-1)) + (N(u))$. By Lemma \ref{cone}, $\Gamma_1$ is a cone over $u-1$ and $\Gamma_2$ and $\Gamma_1 \cap \Gamma_2$ are cones over $u$. Since $F \cap \supp \a = \emptyset$, $\lk_{\Gamma_1} F$ is a cone over $u-1$, $\lk_{\Gamma_2} F$ and $\lk_{\Gamma_1 \cap \Gamma_2} F$ are cones over $u$. Looking at the Mayer-Vietoris sequence for simplicial homology, $\lk_{\Delta_\a(I^4)} F$ has trivial homology, a contradiction. \end{proof} Thus, $x^\a = x_1 \cdots x_7$. Let $J = I + (N[\{1,2,3]) * (N[\{4,5,6\}])$. Then by \eqref{eq_4_3_8}, $\sqrt{I^4:x^\a} = (J + (N[\{1,\ldots,6\}])) \cap (J + (N(7))).$ Let $\Delta = \Delta_\a(I^4)$ and $\Gamma_1$ and $\Gamma_2$ be the simplicial complexes corresponding to $J + (N[\{1,\ldots,6\}])$ and $J + (N(7))$. Then $\Delta = \Gamma_1 \cup \Gamma_2$. By Lemma \ref{cone}, $\Gamma_2$ and $\Gamma_1 \cap \Gamma_2$ are cones over $7$. Thus $\lk_{\Gamma_2}F$ and $\lk_{\Gamma_1} F \cap \lk_{\Gamma_2}F$ have trivial homology. Applying the Mayer-Vietoris sequence we have $$ 0\to \h_{i-1} (\lk_{\Gamma_1} F;\k) \to \h_{i-1} (\lk_{\Delta}F;\k) \to 0.$$ By Lemma \ref{Key0}, $$\reg I^4 = |\a| + i + 1 \le \reg I_{\Gamma_1} + 7.$$ Since $J + (N[\{1,...,6\}]) = I(H) + (N[\{1,...,6\}])$ where $H$ is the restriction of $I$ to $[n] \setminus N[\{1,...,6\}]$. Thus $I_{\Gamma_1} = I(H)$. Let $L$ be the restriction of $I$ to $[n] \setminus N[\{1,...,6\}] \cup \{1,2,4,5\}$. Then $L = I(H) + K$, where $K = (x_1x_2,x_4x_5)$. By induction, $\reg L^4 \le \reg \overline{L^4}$. By Theorem \ref{thm_mixed_sum}, $$\reg L^4 \ge \reg I(H) + \reg K^4 - 1 = \reg I(H) + 8 > \reg I^4,$$ a contradiction to Lemma \ref{restriction_inq}. That concludes the proof of the Lemma. \end{proof} \begin{thm}\label{fourth_pow} Let $I$ be the edge ideal of a simple graph $G$. Let $J \in \Inter(I^4, \overline{I^4})$ be an intermediate ideal. Then $$\reg J = \reg \overline {I^4} = \reg I^4.$$ \end{thm} \begin{proof} By Lemma \ref{fourth_in}, it suffices to prove that $\reg I^4 \le \reg \overline{I^4}$. Let $(\a,i)$ be an extremal exponent of $I^4$. There are two cases. \smallskip \noindent\textbf{Case 1.} $x^\a \notin \overline{I^4}$. By Lemma \ref{extremal_red}, we may assume that $\Delta_\a(I^4) \neq \Delta_\a(\overline{I^4)}$. By Lemma \ref{lem_4_3}, $\reg I^4 \le \reg \overline{I^4}$. \smallskip \noindent\textbf{Case 2.} $x^\a \in \overline{I^4}$. Since $x^\a \notin I^4$, the conclusion follows from Theorem \ref{expansion_edge}, Lemma \ref{lem_4_1}, and Lemma \ref{lem_4_2}. \end{proof} We are now ready for the proof of the main theorem. \begin{proof}[Proof of Theorem \ref{main_thm}] Follows from Theorem \ref{expansion_edge}, Theorem \ref{third_pow}, and Theorem \ref{fourth_pow}. \end{proof} \section{Integral closure of powers of Stanley-Reisner ideals of one-dimensional simplicial complexes}\label{sec_dim1} In this section, we compute the regularity of intermediate ideals in $\Inter(I_\Delta^s,\overline{I_\Delta^s})$ for a one-dimensional simplicial complex $\Delta$. \begin{thm}\label{dim1} Let $I = I_\Delta$ be the Stanley-Reisner ideal of a one-dimensional simplicial complex $\Delta$. Assume that $I$ is non-normal. Then $\girth \Delta \le 4$. Furthermore, for all $s \ge 1$, and all $J \in \Inter(I^s, \overline{I^s})$, we have $$\reg J = \reg I^s = \begin{cases} 3s & \text{ if } \girth \Delta = 3\\ 2s + 1 & \text{ if } \girth \Delta = 4.\end{cases}$$ \end{thm} \begin{proof} If $\girth \Delta \ge 4$ then $I_\Delta$ is the edge ideal of a graph $G$ which is a complement of $\Delta$. By Theorem \ref{expansion_edge}, $I$ is non-normal if and only if $G$ has an induced subgraph consisting of two disjoint odd cycles. Since $\dim \Delta = 1$, these two odd cycles must be triangles. Hence, $\girth \Delta \le 4$. Let $(\a,i)$ be an extremal exponent of $J$. By Lemma \ref{partial_degree} and Remark \ref{rem_extremal_set}, $a_j \le s-1$ for all $j \in [n]$. There are two cases. \noindent\textbf{Case 1.} $\girth \Delta = 3$. The arguments in \cite[Lemma 3.2]{MV2} carry over give us $\reg J = 3s$. \noindent\textbf{Case 2.} $\girth \Delta = 4$. Then $I = I_\Delta$ is the edge ideal of a graph $G$ which is the complement of $\Delta$. The lower bound $\reg J \ge 2s + 1$ follows from Lemma \ref{restriction_inq}. Thus, it suffices to prove that $|\a| +i \le 2s$. The argument in \cite[Lemma 3.3]{MV2} stills apply, and thus if $i = 2$, then $|\a| \le 2s-2$, hence $|\a| + i \le 2s$. Now assume that $i \le 1$, thus we may assume that $|\a| \ge 2s-1$. Since $I^s \subseteq J \subseteq \overline{I^s} \subseteq I^{(s)}$, we have $$\sqrt{I^s:x^\a} \subseteq \sqrt{J:x^\a} \subseteq \sqrt{I^{(s)}:x^\a} = \sqrt{I^s:x^\a}$$ where the last equality follows from Lemma \ref{Key0} and \cite[Lemma 3.5]{MV2}. By Lemma \ref{Key0}, $\Delta_\a(J) = \Delta_\a(I^s)$. By Lemma \ref{extremal_red} and \cite[Theorem 1.1]{MV2}, we deduce that $$\reg J \le \reg I^s = 2s+1.$$ That concludes the proof of the Theorem. \end{proof} \begin{exm} Let \begin{align*} I = & (x_1x_2,x_1x_3,x_2x_3, x_4x_5,x_4x_6,x_5x_6,x_3x_7,x_1x_4x_7,x_2x_4x_7,x_1x_5x_7,x_2x_5x_7,\\ & x_6x_7,x_1x_8,x_2x_4x_8,x_3x_4x_8,x_5x_8,x_2x_6x_8,x_3x_6x_8,x_2x_7x_8,x_4x_7x_8) \subseteq \k[x_1,...,x_8]. \end{align*} It is easy to check with Macaulay2 \cite{M2} that $\dim \Delta(I) = 1$. Furthermore, $I$ is non-normal, as $f = x_1\cdots x_6 \in \overline{I^3}$, but $f \notin I^3$. For each $s \ge 0$, let $f_1 = f \cdot (x_1x_8)^s, f_2 = f\cdot (x_2x_6x_8)^s$. Then $f_1, f_2$ are minimal generators of $\overline{I^{s+3}}$. By Theorem \ref{dim1}, $$\reg \left ( I^{s+3} + (f_1) \right ) = \reg \left ( I^{s+3} + (f_1,f_2) \right ) = 3s + 9,$$ for all $s \ge 0$. \end{exm} There are also plenty of examples of non-normal edge ideals of graphs $I(G)$ with $\dim \Delta(I) = 1$, and $G$ has more than two odd cycles. \begin{exm} Let \begin{align*} I = & (x_1x_2,x_1x_3,x_2x_3, x_4x_5,x_4x_6,x_4x_7,x_5x_6,x_5x_7,x_6x_7,x_3x_8,x_4x_8,x_5x_8,x_6x_8,x_7x_8,\\ & x_1x_9,x_2x_9,x_3x_9,x_4x_9,x_7x_9,x_1x_{10},x_2x_{10}, x_3x_{10},x_5x_{10},x_6x_{10},x_8x_{10}) \subseteq \k[x_1,...x_{10}]. \end{align*} It is easy to check with Macaulay2 \cite{M2} that $\dim \Delta(I) = 1$. For each $s \ge 0$, let $f_1 = x_1\cdots x_6 (x_8x_{10})^s$, $f_2 = x_1\cdots x_5 x_7 (x_4x_9)^s$, $f_3 = x_1\cdots x_4 x_6x_7 (x_7x_8)^s$. Then $f_1, f_2,f_3$ are minimal generators of $\overline{I^{s+3}}$. By Theorem \ref{dim1}, $$\reg \left ( I^{s+3} + (f_1,f_2) \right ) = \reg \left ( I^{s+3} + (f_1,f_3) \right ) = 2s+7,$$ for all $s \ge 0$. \end{exm} \section{Characteristic dependence of regularity of powers}\label{sec_ex} In this section, we provide an example of an ideal whose regularity of powers depends on the characteristic of the base field. We first give a general statement which is a simple consequence of \cite[Theorem 1.1]{NV1}. \begin{thm}\label{thm_ex} Let $H$ be a graph whose edge ideal $I(H)$ satisfies the condition $$\reg I(H)^s \le \reg I(H) + 2s - 2 \text{ for all } s \ge 1.$$ Let $T$ be a graph whose edge ideal $I(T)$ satisfies the condition $$\reg I(T)^s = \reg I(T) + 2s-2 \text{ for all } s \ge 1.$$ Let $G = H \cup T$ be the disjoint union of $H$ and $T$. Then for all $s \ge 1$ we have $$\reg I(G)^s = \reg I(H) + \reg I(T) + 2s - 3.$$ \end{thm} \begin{proof} By Theorem \ref{thm_mixed_sum}, we have $$\reg I(G)^s = \max_{i\in[1,s-1],j\in[1,s]} (\reg I(H)^i + \reg I(T)^{s-i}, \reg I(H)^j + \reg I(T)^{s-j+1} - 1).$$ For all $1 \le i \le s-1$, we have \begin{align*} \reg I(H)^i + \reg I(T)^{s-i} &\le \reg I(H) + 2i- 2 + \reg I(T) + 2(s-i)-2\\ & < \reg I(H) + \reg I(T) + 2s-3. \end{align*} For all $2 \le j \le s$, we have \begin{align*} \reg I(H)^j + \reg I(T)^{s-j+1} &\le \reg I(H) + 2j - 2 + \reg I(T) + 2(s-j) \\ & = \reg I(H) + \reg I(T)+2s-2. \end{align*} Finally, $$\reg I(H) + \reg I(T)^s = \reg I(H) + \reg I(T) + 2s- 2.$$ The conclusion follows. \end{proof} \begin{cor}\label{cor_char_dependence} Let $G = C_1 \cup C_2 \cup H$ be the disjoint union of two triangles and a bipartite graph $H$ whose $\reg I(H)$ depends on the characteristic of the base field (e.g. the Dalili-Kummini's example \cite{DK}). Then for all $s \ge 1$, we have $$\reg I^s = \reg I^{(s)} = \reg \overline{I^s} = \reg I(H) +2s.$$ In particular, $\reg I^s, \reg \overline{I^s}, \reg I^{(s)}$ depend on the characteristic of the base field as $\reg H$ does. \end{cor} \begin{proof}By Theorem \ref{thm_ex} $$\reg I^s = \reg I(H) + \reg I(C_1 \cup C_2) + 2s-3 = \reg I(H) + 2s.$$ With similar argument as in the proof of Theorem \ref{thm_ex}, by \cite[Theorem 5.11]{HNTT}, and the fact that $I(H)^s = I(H)^{(s)}$, $\reg I(C_1)^{(s)} = \reg I(C_2)^{(s)} = 2s$ for all $s \ge 1$, we deduce that $$\reg I^{(s)} = \reg I(H) + \reg I(C_1 \cup C_2) + 2s-3 = \reg I(H) + 2s.$$ By \cite[Theorem 4.14]{KK}, we have $\reg I^s = \reg \overline{I^s}$. The Corollary follows. \end{proof} \begin{rem} Let $H$ be the bipartite graph in Dalili-Kummini's example. Computation with Macaulay2 \cite{M2} shows that $\reg I(H)^2 = 6$ does not depend on the characteristic of the base field. Let $G$ be the union of $H$ and an edge. Then $G$ is a bipartite graph. By Theorem \ref{thm_ex}, for all $s \ge 1$, $\reg I(G)^s = \reg I(H) + 2s - 1$ depend on the characteristic of the base field. To get an example of a connected graph with the same phenomenon as in Corollary \ref{cor_char_dependence}, let $P$ be the fiber product of the edge ideal $I(G)$ in Corollary \ref{cor_char_dependence} with any edge ideal $I(L)$ of a bipartite graph such that $\reg I(L)^s < 2s + 4$. By \cite[Corollary 5.2]{NV2}, \cite[Lemma 6.2]{MV1}, and \cite[Theorem 4.14]{KK}, we deduce that $\reg P^s = \reg P^{(s)} = \reg \overline{P^s} = \reg I(G)^s$ depend on the characteristic of the base field. \end{rem} \begin{rem}[Katzman's example]Let $I\subseteq \k[x_1,\ldots,x_{11}]$ be the following edge ideal: \begin{gather*} I=(x_1x_2, x_1x_6, x_1x_7, x_1x_9, x_2x_6, x_2x_8, x_2x_{10}, x_3x_4, x_3x_5, x_3x_7, x_3x_{10},\\ x_4x_5, x_4x_6, x_4x_{11}, x_5x_8, x_5x_9, x_6x_{11}, x_7x_9, x_7x_{10}, x_8x_9, x_8x_{10}, x_8x_{11}, x_{10}x_{11}). \end{gather*} Computation with Macaulay2 \cite{M2} shows that $\reg I^2 = 5$ does not depend on the characteristic of the base field. It is interesting if we can prove that $$\reg I^s \le \reg I + 2s - 2,$$ for all $s \ge 2$. If this is true, then the mixed sum $P$ of $I$ with the edge ideal of a triangle gives an example of a non-normal edge ideal on $14$ variables with $$\reg P^s = \begin{cases} 3 + 2s & \text{ if } \charr \k = 2 \\ 2 + 2s & \text{ if } \charr \k \neq 2.\end{cases},$$ for all $s \ge 1$. \end{rem}
\chapter{Introduction} \epigraph{\emph{There are three rules for writing the novel. Unfortunately, no one knows what they are.}}{W. Somerset Maugham.} \section{Irreversible stochastic processes} Many phenomena in natural sciences such as biology, chemistry and physics, are modelled by stochastic processes. In this thesis, we encounter for instance stochastic models of molecular motors~\cite{JulicherAjdariProst1997,KolomeiskyFisher07,Kolomeisky13}. Various other examples may be found in the monograph of Risken on Fokker-Planck equations~\cite[Chapters~1,~3~and~12]{Risken1996}. The stochasticity is usually introduced in order to model the effect of noise in the dynamical systems. Our general objective in the works presented in this thesis is to analyse the dynamics of several examples of stochastic processes. \smallskip Frequently, the dynamics simplifies in a certain limit where it becomes predictable. An example of such a simplification is the transition from microscopic to macroscopic scales. To illustrate this transition, imagine we would see the world only through a strong microscope. Then a familiar phenomenon such as a glas of water would all of a sudden appear complicated. Peering into the glas with our microscope, we observe the particles erratically moving back and forth, bouncing off and chasing each other in an unpredictable way. However, the moment we lay aside the microscope, this microscopic chaos disappears from our view; on the macroscopic scale, the density of particles does not evolve randomly, but becomes predictable. When describing the particle density as a stochastic process, we should find that this stochastic process becomes deterministic in the limit of infinitely many particles. \smallskip There is a vast activity in probability theory and analysis to investigate mathematical theories of both microscopic and macroscopic dynamics. In particular, the focus lies on deriving a relationship between the dynamics at micro- and macroscales. Liggett~\cite{Liggett2004} as well as Kipnis and Landim~\cite{KipnisLandim1998} review and summarize works on interacting particle systems. Typically, the stochastic dynamics on the microscale incorporates basic features such as repulsion or attraction between particles~(for instance, the exclusion or the inclusion processes). A common characteristic of the stochastic models is that in the limit of infinitely many particles, the particle density evolves deterministically according to a partial differential equation, such as the diffusion equation. \smallskip Phenomena on the macroscopic scale such as first-order phase transitions originate from their underlying microscopic dynamics and may be explained using such micro-macro connections. More background and examples on this matter may be found in the books of Berglund and Gentz about noise-induced phenomena~\cite{BerglundGentz2005} and of Bovier and den Hollander on metastability~\cite{BovierDenHollander2016}. We remark that the randomness in the microscopic stochastic models is often rather put in by hand than derived from first principles. This point of view builds up on two aspects coming together. First, the modelled system is chaotic in the sense of being highly sensitive towards the initial condition. Second, we have only partial knowledge about the initial condition. The system's behaviour appears to be random if both aspects, chaos and ignorance, come together. In this sense, the stochastic system may be seen as the approximation of a chaotic deterministic system. We refer to Bricmont~\cite{Bricmont1996} for more background on chaos. \smallskip In this thesis, we analyse irreversible stochastic processes by means of large deviation theory. Our central goals are to derive their limiting dynamics, and to characterize their fluctuations around this limiting dynamics by means of Lagrangian rate functions. As we shall further discuss at the end of Section~\ref{intro:sec:large-deviatoin-theory}, we are motivated by the fact that while reversible processes lead via large deviation theory to gradient flows, it is an open question of which variational formulations can, in principle, be derived for irreversible processes. \smallskip In Section~\ref{intro:sec:large-deviatoin-theory}, we introduce our main tool for the analysis of irreversible processes, large deviation theory. Then we give examples that clarify the concepts of pathwise large deviation principles and Lagrangian rate functions. In Section~\ref{intro:sec:overview-of-the-thesis}, we give a more detailed overview of the thesis. In Chapter~2, we provide an introduction to our main method for proving large deviation principles, the Feng-Kurtz method~\cite{FengKurtz2006}. In Chapter~3, we consider stochastic models of walking molecular motors. In Chapter~4, we analyse a Markov chain Monte Carlo method based on the irreversible zig-zag sampler. In Chapters~5 and~6, our interest lies in deriving---by means of large deviation principles---limiting evolution equations of mean-field interacting particles that are coupled to fast external processes. In Chapter~7, we consider a limit problem of variational structures of certain PDEs. Finally, we discuss our results in Chapter~\ref{chapter:discussion}. \section{Large deviation theory} \label{intro:sec:large-deviatoin-theory} The first unified treatment of large deviation theory in the sense of an abstract framework is attributed to Srinivasa Varadhan, who laid the ground for decades of active mathematical research by his landmark paper~\cite{Varadhan1966}. Varadhan was honored in 2007 with the Abel Prize "for his fundamental contributions to probability theory and in particular for creating a unified theory of large deviations". Numerous works have enriched the scope of large deviation theory by connecting it to other mathematical fields and applications in natural sciences. The most commonly used techniques for studying large deviations are summarized in a number of different books and papers; we only give an incomplete list here. Varadhan relates among other things function space integrals with large deviations in his lectures~\cite{Varadhan1984}. Freidlin and Wentzell were the first to explore pathwise large deviations of stochastic processes~\cite{FreidlinWentzell1998}. Ellis shows the relation of large deviations and statistical mechanics~\cite{Ellis1985}. Deuschel and Strook introduced the term \emph{exponential tightness}~\cite{DeuschelStroock1989}. Numerous abstract techniques that are frequently used in large deviation theory are presented by Dembo and Zeitouni~\cite{DemboZeitouni1998}. A concise overview of large deviations with many examples may be found in the lectures of den Hollander~\cite{denHollander2000}. Bovier and den Hollander also give a brief overview in their book on metastability~\cite[Chapter~6]{BovierDenHollander2016}. Recent monographs focusing on stochastic processes are the semigroup approach of Feng and Kurtz~\cite{FengKurtz2006}, and the weak-convergence approach initiated by Dupuis and Ellis~\cite{DupuisEllis1997}, which Budhiraja and Dupuis extend in~\cite{BudhirajaDupuis2019}. \smallskip In this section, we first exemplify the general definition of a large deviation principle. The first example is a simple observation of \emph{exponential decay} of probabilities. With the second example, we illustrate a \emph{concentration effect} that occurs \emph{exponentially}, and furthermore motivate the notion of \emph{large deviations}. The examples provide a useful mental image for interpreting the general definition. For further reading and examples suitable for familiarization, we refer to Richard Ellis' beautiful note on Boltzmann's discoveries~\cite[Section~3]{Ellis1999}, where he illustrates how relative entropies arise naturally from Stirling's formula. Further illustrating examples may also be found in Ellis' lectures on large deviations~\cite{Ellis1995}, and in particular in Hugo Touchette's review~\cite[Section~2]{Touchette2009}. We also refer to Terence Tao's note~\cite{Tao2015_275A} for a short introduction to the mathematical notions from probability theory we use below. \smallskip After having introduced the concept of a large deviation principle, we will specialize further to the setting of this thesis: pathwise large deviations for stochastic processes. We illustrate by means of a classical example some interesting aspects of a pathwise large deviation principle, with a focus on the so-called \emph{action-integral representation} of the rate function. \newpage \begin{example*} If we toss a fair coin~$n$ times, the probability of observing "only heads" is \begin{equation*} \mathbb{P}\left(\text{only heads}\right) = \left(\frac{1}{2}\right)^n = e^{-n \log 2}. \end{equation*} Let us point out the following observations: \begin{enumerate}[$\bullet$] \item If $n$ is large, the event "only heads" is \emph{unlikely} or \emph{improbable}. \item As we let $n$ grow, the event "only heads" becomes \emph{increasingly} unlikely. \item The probability of observing "only heads" is \emph{exponentially small} with respect to~$n$. The event "only heads" decays exponentially with rate~$\log 2$. \end{enumerate} \end{example*} \begin{example*}\label{ex:Gaussian-rv} Let~$X_1,X_2,\dots$ be a sequence of~i.i.d. real-valued random variables. Suppose each~$X_i$ is normally distributed with mean~$\mu\in\mathbb{R}$ and variance one, \begin{equation*} \mathbb{P}\left(X_i \in A\right) = \int_A \rho(x)\, \mathrm{d} x,\quad \rho(x)= \frac{1}{\sqrt{2\pi}}e^{-(x-\mu)^2/2}. \end{equation*} Let us focus on the behaviour of their partial sums $S_n:=\sum_{i=1}^nX_i$ for large~$n$. The probability distribution~$\rho_n$ of the averages~$\frac{1}{n}S_n$ is depicted in~Figure~\ref{fig:gaussians_concentrating}. \begin{figure}[!htbp] \centering {\labellist \pinlabel $x$ at 1050 50 \pinlabel $\rho_n(x)=\sqrt{\frac{n}{2\pi}}\,e^{-n(x-\mu)^2/2}$ at 100 400 \pinlabel $\mu$ at 525 -25 \pinlabel {\color{dark_green}{$n=250$}} at 670 430 \pinlabel {\color{red_one}{$n=50$}} at 670 220 \pinlabel {\color{dark_blue}{$n=10$}} at 750 100 \endlabellist \centering \includegraphics[scale=.2]{normal_distr_n_10_50_250} } \caption{ The probability distribution~$\rho_n(x)$ of the averages~$\frac{1}{n}S_n$. As~$n$ increases, the probability distribution concentrates around the mean~$\mu$. } \label{fig:gaussians_concentrating} \end{figure} We observe a concentration effect of the distribution around the mean as~$n$ increases. That means for large~$n$, we are likely to observe~$\frac{1}{n}S_n\approx \mu$. To summarize this concentration effect, let~$\varepsilon>0$, and write~$B_\varepsilon(\mu):=(\mu-\varepsilon,\mu+\varepsilon)$ for the small interval around~$\mu$. In accordance with the weak law of large numbers, we have \begin{equation} \label{intro:ex2:LLN} \mathbb{P}\left(\frac{1}{n}S_n\in B_\varepsilon(\mu)\right) \xrightarrow{n\to\infty} 1. \end{equation} A natural question is: how fast does the distribution of the averages concentrate around the mean as~$n$ tends to infinity? Let us show that there is a rate with which it concentrates \emph{exponentially}. We abbreviate the quadratic function in the exponent of~$\rho_n$ by~$\mathcal{I}(x):=(x-\mu)^2/2$. For~$\varepsilon>0$, we want to estimate~$\mathbb{P}\left((1/n)S_n \notin B_\varepsilon(\mu)\right)$. Using the formula of the probability density~$\rho_n$ and exploiting its symmetry, we find \begin{align}\label{intro:eq:Ex2:log-of-prob} \frac{1}{n}\log \mathbb{P}\left(\frac{1}{n}S_n\notin B_\varepsilon(\mu)\right) = \frac{1}{n}\log\left(2\, \sqrt{\frac{n}{2\pi}}\right) + \frac{1}{n}\log \int_{\mu+\varepsilon}^{\infty} e^{-n \,\mathcal{I}(x)}\, \mathrm{d} x. \end{align} As~$n\to\infty$, the first term vanishes. In the second term, the lowest value of the exponent dominates the integral. The precise statement is the Laplace principle; for a set~$A$ and a function~$g$ bounded from below, \begin{equation*} \frac{1}{n}\log\int_A e^{-n\,g(x)}\, \mathrm{d} x \xrightarrow{n\to\infty}\sup_{x\in A} \left(-g(x)\right) = -\inf_{x\in A}g(x). \end{equation*} With these remarks, we find \begin{align*} \lim_{n\to\infty}\frac{1}{n}\log \mathbb{P}\left(\frac{1}{n}S_n\notin B_\varepsilon(\mu)\right) = - \inf_{x\in(\mu+\varepsilon,\infty)}\mathcal{I}(x) = -\frac{\varepsilon^2}{2}. \end{align*} Hence for any~$\delta>0$ (smaller than~$\varepsilon^2/2$), we find for all~$n$ large enough that \begin{equation*} \mathbb{P}\left(\frac{1}{n}S_n\notin B_\varepsilon(\mu)\right) \leq \exp\left\{-n \left[\frac{1}{2}\varepsilon^2 - \delta\right]\right\}. \end{equation*} In this sense the concentration effect~\eqref{intro:ex2:LLN} occurs exponentially. With similar reasoning, we find for any closed~$A\subseteq \mathbb{R}$ not containing~$\mu$, \begin{equation}\label{intro:eq:ex2-log-P-converges} \frac{1}{n}\log\mathbb{P}\left(\frac{1}{n}S_n\in A\right) \xrightarrow{n\to\infty} - \inf_{x\in A}\mathcal{I}(x). \end{equation} Therefore, with~$\mathrm{r}(A):=\inf_A\mathcal{I}(\cdot)$, we find for~$\delta>0$ that for~$n$ sufficiently large, \begin{equation*} \mathbb{P}\left(\frac{1}{n}S_n\in A\right)\leq e^{-n \left(\mathrm{r}(A)-\delta\right)}. \end{equation*} Let us summarize: in regions~$A$ away from the mean, the probability mass is exponentially small with respect to~$n$, and the exponential decay rate~$r(A)$ is the minimum of the quadratic function~$\mathcal{I}(\cdot)$ evaluated over~$A$. \smallskip We close this example by pointing out in what sense the above considerations are related to large deviations. The random variable~$\sqrt{n}\left((1/n)S_n-\mu\right)$ is normally distributed around zero with variance one. This means that observations of the type~$S_n \approx n\mu + \sqrt{n}\,x$ are normally distributed for large~$n$. This is a deviation from what we expect by~$\sqrt{n}\,x$, and in that sense, fluctuations of order~$\sqrt{n}$ are "normal" (the generalization of this statement is the central limit theorem). For any~$\varepsilon$, the event~$\frac{1}{n}S_n\notin B_\varepsilon(\mu)$ corresponds to observing events of the type~$S_n\approx n\mu + n\,\varepsilon$. This is a deviation of order~$n$, which is no longer captured by the central limit theorem. Therefore, these type of events are called large deviations. The generalization of these observations beyond this example ($X_i$ that are not normally distributed) is known as Cramér's theorem~\cite{Cramer1938,CramerTouchette2018}, and we refer to~\cite[Chapter~I and Theorem~I.4]{denHollander2000} for more details.\qed \end{example*} \subsubsection{Precise formulation of a large deviation principle.} We typically consider sequences of probability measures~$\mathrm{P}_n$ on a state space~$\mathcal{X}$, concentrating at a single element~$x\in\mathcal{X}$. Above in Example~2, the measures~$\mathrm{P}_n$ correspond to the distribution of the averages~$\frac{1}{n}S_n$ with state space~$\mathcal{X}=\mathbb{R}$, that means~$\mathrm{P}_n=\mathbb{P}((1/n)S_n\in \cdot)$. The single element is the mean value~$x=\mu$, and the concentration effect can be formulated as a weak law of large numbers; denoting by~$B_\varepsilon(x)$ the ball of radius~$\varepsilon>0$ around~$x$, \begin{equation*} \mathrm{P}_n\left(B_\varepsilon(x)\right)\xrightarrow{n\to\infty} 1, \end{equation*} and for any Borel set~$A\subseteq\mathcal{X} $ whose closure does not contain~$x$, \begin{equation*} \mathrm{P}_n(A) \xrightarrow{n\to\infty} 0. \end{equation*} Frequently, we can observe an exponential decay of these probabilities; at least intuitively, we find a rate~$\mathrm{r}(A)$ depending in the set~$A$ with which for large~$n$, \begin{equation*} \mathrm{P}_n(A) \approx e^{-n \cdot \mathrm{r}(A)}. \end{equation*} One attempt of making this rigorous would be to say: a sequence of probability measures~$\mathrm{P}_n$ satisfies a large deviation principle if there is a rate~$\mathrm{r}:\mathcal{B}(\mathcal{X})\to[0,\infty)$ with which for any Borel subset~$A\subseteq\mathcal{X}$, \begin{equation}\label{eq:intro:LDP:log-conv-to-r-A} \frac{1}{n}\log\mathrm{P}_n(A) \xrightarrow{n\to\infty} -\mathrm{r}(A). \end{equation} Furthermore, the example from above suggests that this rate can be characterized by a so-called rate function~$\mathcal{I}:\mathcal{X}\to[0,\infty]$ as \begin{equation}\label{eq:intro:LDP:rate-inf-RF} \mathrm{r}(A) = \inf_{x\in A} \mathcal{I}(x). \end{equation} Varadhan's definition is a suitable more general form of~\eqref{eq:intro:LDP:log-conv-to-r-A}. We first give his definition here. A complete separable metric space~$\mathcal{X}$ is called a \emph{Polish space}. We call a map~$\mathcal{I}:\mathcal{X}\to[0,\infty]$ a \emph{rate function} if the sublevel sets~$\{x\in\mathcal{X}\,:\,\mathcal{I}(x)\leq C\}$ are compact for all~$C\geq 0$. In the literature, such rate functions are called good rate functions---since all rate functions we encounter in this thesis are good, we adopt the convention of~\cite{BudhirajaDupuis2019} and omit the adjective "good". For a Borel subset~$A\subseteq\mathcal{X}$, we let~$\mathrm{int}(A)$ be its interior and~$\mathrm{clos}(A)$ be its closure. \begin{definition}[Large Deviation Principle]\label{def:LDP} For~$n = 1,2,\dots,$ let~$\mathrm{P}_n$ be a probability measure on a Polish space~$\mathcal{X}$. We say the family of measures $\{\mathrm{P}_n\}_{n\in \mathbb{N}}$ satisfies a \emph{large deviation principle} with rate function $\mathcal{I}:\mathcal{X} \to [0,\infty]$ if for any Borel subset~$A\subseteq \mathcal{X}$, \begin{align*} -\inf_{x\in \mathrm{int}(A)}\mathcal{I}(x) &\leq \liminf_{n\to\infty}\frac{1}{n}\log\mathrm{P}_n(A)\\ &\leq\limsup_{n\to\infty}\frac{1}{n}\log\mathrm{P}_n(A) \leq -\inf_{x\in\mathrm{clos}(A)}\mathcal{I}(x). \tag*\qed \end{align*} \end{definition} Let~$X^n$ be a random variable with law~$\mathrm{P}_n\in\mathcal{P}(\mathcal{X})$. We say that the sequence of random variables~$\{X^n\}_{n\in\mathbb{N}}$ satisfies a large deviation principle if the sequence of their laws~$\{\mathrm{P}_n\}_{n\in\mathbb{N}}$ does. In this case, we write~$\mathrm{P}_n=\mathbb{P}\left(X^n\in\cdot\right)$ for the law. Furthermore, we abbreviate the statement that~$\{X^n\}_{n\in\mathbb{N}}$ satisfies a large deviation prinicple with rate function~$\mathcal{I}:\mathcal{X}\to[0,\infty]$ as follows: \begin{equation}\label{intro:LDP-written-in-local-form} \mathbb{P}\left(X^n\approx x\right) \sim e^{-n\,\mathcal{I}(x)},\quad n\to\infty. \end{equation} We alert the reader that the tilde has no mathematical precise meaning. Equation~\eqref{intro:LDP-written-in-local-form} should rather be read as a total statement summarizing all the essential information; the probability that~\emph{$X^n$ is close to~$x$} (~$X^n\approx x$) decays \emph{exponentially} as~$n$ tends to infinity (~$\sim e^{-n\,\mathcal{I}(x)}$). The notation is motivated by the fact that \begin{equation*} \lim_{\varepsilon\to 0} \limsup_{n\to\infty}\frac{1}{n}\log \mathbb{P}\left(X^n\in B_\varepsilon(x)\right) = -\mathcal{I}(x). \end{equation*} Let us mention how a large deviation principle really corresponds to the exponential decay of probabilities. If the rate function is continuous, then we recover~\eqref{eq:intro:LDP:log-conv-to-r-A} for Borel subsets~$A\subseteq\mathcal{X}$ satisfying~$\mathrm{clos}(\mathrm{int}(A))=\mathrm{clos}(A)$~\cite[Corollary~1]{Ellis1999}, and in particular for any~$\varepsilon>0$, if~$n$ is large enough, \begin{equation*} e^{-n(\mathrm{r}(A)+\varepsilon)} \leq \mathrm{P}_n(A) \leq e^{-n(\mathrm{r}(A)-\varepsilon)}. \end{equation*} In general, if a non-trivial rate function has a unique minimizer~$x$, then for a Borel set~$A$ whose closure does not contain~$x$, we have~$\mathrm{r}(\mathrm{clos}(A))>0$, and the limsup bound implies exponential decay of~$\mathrm{P}_n(A)$~\cite[Corollary~2]{Ellis1999}. \smallskip We may motivate Varadhan's definition of a large deviation principle in terms of the liminf- and limsup bounds by analogy to weak convergence of probability measures. To that end, consider~$\mathrm{P}_n$ and~$\mathrm{P}\in\mathcal{P}(\mathcal{X})$. The measures~$\mathrm{P}_n$ are said to converge weakly to~$\mathrm{P}$ if for any Borel set~$A\subseteq\mathcal{X}$, \begin{equation}\label{eq:intro:LDP:liminf-limsup-weak-convergence} \mathrm{P}(\mathrm{int}(A))\leq \liminf_{n\to\infty}\mathrm{P}_n(A) \leq \limsup_{n\to\infty}\mathrm{P}_n(A) \leq \mathrm{P}(\mathrm{clos}(A)). \end{equation} Demanding "pointwise" convergence~$\mathrm{P}_n(A)\to \mathrm{P}(A)$ for all~$A$ would exclude examples such as~$\mathrm{P}_n = \delta_{1/n}$ and~$\mathrm{P}=\delta_0$ with~$\mathcal{X}=\mathbb{R}$. Also in Example~2 from above with~$\mathrm{P}_n$ the law of~$(1/n)S_n$ and~$\mathrm{P}=\delta_\mu$, the singleton set~$A=\{\mu\}$ violates this strong convergence condition. The notion of weak convergence applies to many interesting examples while still providing useful information. By the Portmanteau Theorem~\cite[Theorem~2.1]{Billingsley1999}, weak convergence is equivalent to the convergence of expectations;~$\int f\, \mathrm{d}\mathrm{P}_n\to\int f\, \mathrm{d}\mathrm{P}$ for any function~$f\in C_b(\mathcal{X})$. An equivalent formulation is to demand the liminf-bound for all open sets and the limsup-bound for all closed sets~\cite[Theorem~2.1]{Billingsley1999}. \smallskip Next, we motivate the fact that the exponential decay rates~$\mathrm{r}(A)$ are characterized by minimizing a rate function~$\mathcal{I}(\cdot)$ over the region~$A$. For two real-valued positive sequences $a_n,b_n$, suppose $a_n>b_n$ for all $n$ sufficiently large. Then \begin{equation*} \left|\frac{1}{n}\log\left(a_n+b_n\right) - \frac{1}{n}\log (a_n)\right| = \frac{1}{n}\log\left(1 + b_n/a_n\right) \leq \frac{1}{n}\log 2\xrightarrow{n\to\infty} 0. \end{equation*} Hence the maximal value~$a_n=\max(a_n,b_n)$ dominates the sum on the logarithmic scale. This fact is known as the so-called \emph{the-winner-takes-it-all} principle. Now suppose a set~$A$ satisfies~\eqref{eq:intro:LDP:log-conv-to-r-A} with some rate~$\mathrm{r}(A)>0$, and suppose we can decompose~$A=A_1\cup A_2$ into disjoint sets~$A_1,A_2$ satisfying~\eqref{eq:intro:LDP:log-conv-to-r-A} as well. Then using additivity,~$\mathrm{P}_n(A_1\cup A_2)=\mathrm{P}_n(A_1)+\mathrm{P}_n(A_2)$, we find by the winner-takes-it-all principle \begin{equation*} \frac{1}{n}\log\mathrm{P}_n(A_1\cup A_2) \xrightarrow{n\to\infty} -\min\left\{\mathrm{r}(A_1),\mathrm{r}(A_2)\right\}. \end{equation*} Therefore, we may expect the exponential rates to be given by~\eqref{eq:intro:LDP:rate-inf-RF}. Similar to the definition of weak convergence~\eqref{eq:intro:LDP:liminf-limsup-weak-convergence}, passing to the interior and closure in Definition~\ref{def:LDP} is necessary in order for the limits to hold for any Borel set~$A$. \smallskip A large deviation principle is a type of concentration inequality, and therefore implies a strong type of convergence of random variables. The minimizers of the rate function are the elements corresponding to the strong law of large numbers, as demonstrated by the following theorem. For a rate function~$\mathcal{I}:\mathcal{X}\to[0,\infty]$, we denote by $\{\mathcal{I} = 0 \}$ the set of its global minimizers. \begin{theorem} \label{thm:math-formulation-LDP:LDP-implies-as} For $n=1,2\dots$, let $X^n$ be a random variable taking values in a Polish space~$(\mathcal{X},d)$. Suppose that~$\{X^n\}_{n \in \mathbb{N}}$ satisfies a large deviation principle with rate function $\mathcal{I}$. Then $d(X^n,\{\mathcal{I} = 0\}) \to 0$ almost surely as $n \to \infty$. \end{theorem} This theorem can be proven via the limsup-bound of the large deviation principle, and applying the Borel-Cantelli Lemma. In many examples, we can verify uniqueness of the minimizer~$x_0$ of a rate function. Then by Theorem~\ref{thm:math-formulation-LDP:LDP-implies-as}, a large deviation principle implies~$X^n\to x_0$ almost surely. We point out that the rate function in Theorem~\ref{thm:math-formulation-LDP:LDP-implies-as} is assumed to have compact sub-level sets. \smallskip Next to the law of large numbers, the central limit theorem can as well be understood from a large deviation principle. Specialising to $E=\mathbb{R}$, a formal Taylor expansion around a minimizer $x_0$ of the rate function yields for $x\approx x_0$, \begin{equation*} \mathbb{P}\left(X^n\approx x\right) \sim e^{-n\left[\mathcal{I}(x_0) + (x-x_0)\mathcal{I}'(x_0) + \frac{1}{2}(x-x_0)^2\mathcal{I}''(x_0)\right]} = e^{-n \mathcal{I}''(x_0)(x-x_0)^2/2}. \end{equation*} In that sense, fluctuations around minimizers of the rate function are normally distributed. The curvature of the rate function is inverse proportional to the variance: if the rate function is rapidly growing near the minimizer, then the variance is small, and vice versa. Bryc makes this connection precise in~\cite{Bryc1993}. \subsubsection{Pathwise large deviations in stochastic systems.} In this thesis, we will mostly focus our attention on stochastic processes~$X^n$ that become deterministic in the limit of a parameter~$n$ tending to infinity. In particular, we are interested in situations in which this transition to a deterministic limit occurs exponentially in the sense of a large deviation principle. In this context, we speak of \emph{pathwise} large deviations, because we make statements about the paths of~$X^n$. Here, we illustrate with a classical example what makes a pathwise large deviation principle interesting. In the example, we will point out the following two central features. First, the \emph{typical behaviour}: the expected trajectory of~$X^n$, corresponding to the law of large numbers limit, is recovered from the minimizer of the rate function. Second, the \emph{least-action principle}: if the stochastic process realizes an event far away from this expected trajectory, the most likely way in which this event occurs can be determined by minimizing the rate function. \begin{example*} Let $E=\mathbb{R}$,~$x_0\in E$. For $n\in\mathbb{N}$, consider the process~$X^n$ solving \[ \mathrm{d} X^n_t = \frac{1}{\sqrt{n}}\, \mathrm{d} B_t,\quad X^n(0) =x_0, \] where~$B_t$ is the standard Brownian motion. For large~$n$, the process~$X^n$ corresponds to a small-diffusion regime. The transition probabilities $P_n(t,x, \mathrm{d} y)$ of~$X^n$ are normal distributions, \[ \mathbb{P}\left(X^n(t)\in \mathrm{d} y\,|\,X^n(0)=x\right) \stackrel{\mathclap{\text{def}}}{=} P_n(t,x, \mathrm{d} y) = \sqrt{\frac{n}{2\pi t}}\,e^{-n(y-x)^2/2t}\, \mathrm{d} y. \] We fix a time interval~$[0,T]$. Let~$\mathcal{X}=C_\mathbb{R}[0,T]$ be the set of continuous maps~$x:[0,T]\to\mathbb{R}$, equipped with the uniform norm. We consider the~$X^n$ as random variables in~$\mathcal{X}$, and are interested in the behaviour of~$X^n$ in the limit~$n\to\infty$. \smallskip For large values of $n$, typical realizations of~$X^n$ are shown in Figure~\ref{fig:small-diffusion-10-realizations}. \begin{figure}[!htbp] \centering {\labellist \pinlabel $t$ at 1150 50 \pinlabel $x_0$ at -40 250 \pinlabel $0$ at -40 50 \pinlabel $X^n_t(\omega)$ at 100 500 \endlabellist \centering \includegraphics[scale=.2]{small_diff_10_realiz_ThickLines} } \caption{ Ten realizations~$X^n(\omega)$ of the stochastic process~$X^n$ with deterministic initial condition~$X^n_0=x_0$. } \label{fig:small-diffusion-10-realizations} \end{figure} Judging by eye, most realizations are close to the constant path $\overline{x}\equiv x_0$ determined by the initial starting point~$x_0$. Indeed, for any~$t\in[0,T$], the one-dimensional time marginals~$X^n(t)$ are converging to~$x_0$, as can be seen from the transition probabilities. In fact, the probability of observing realizations of~$X^n$ that deviate from the constant path~$\overline{x}(t) := x_0$ vanishes exponentially fast as~$n\to\infty$: the path measures~$\mathrm{P}_n := \mathbb{P}\left(X^n\in \cdot\right)\in\mathcal{P}(\mathcal{X})$ satisfy a large deviation principle with rate function ~$\mathcal{I}:\mathcal{X}\to[0,\infty]$ given by \begin{equation}\label{intro:eq:RF-Schilders-Theorem} \mathcal{I}(x) = \int_0^T \frac{1}{2}|\partial_t x(t)|^2\, \mathrm{d} t. \end{equation} This fact is known as Schilder's theorem (e.g.~\cite[Theorem~5.2.3]{DemboZeitouni1998}), which is a special case of the Freidlin-Wentzell theorem (e.g.~\cite[Theorem~5.6.3]{DemboZeitouni1998}). If a trajectory~$x$ is not absolutely continuous or~$x(0)\neq x_0$, then~$\mathcal{I}(x)=\infty$. As we discussed below the definition of a large deviation principle, an informal but useful interpretation is to say that for a path~$x$ satisfying $x(0)=x_0$, we have \begin{equation}\label{intro:eq:LDP-Schilders-Theorem} \mathbb{P}\left(X^n \approx x\right) \sim e^{-n \,\mathcal{I}(x)}, \quad \text{as}\;n\to\infty. \end{equation} Alternatively, let~$B_\varepsilon(x)$ be the ball of radius~$\varepsilon$ around~$x$ with respect to the uniform norm in~$\mathcal{X}$. Then with~$\mathcal{I}(B_\varepsilon(x)):=\inf_{B_\varepsilon(x)}\mathcal{I}$, \begin{equation*} \mathbb{P}\left(X^n\in B_\varepsilon(x)\right)\sim \exp\{-n\, \mathcal{I}(B_\varepsilon(x))\},\quad \text{as}\;n\to\infty. \end{equation*} In terms of the topology on~$\mathcal{X}$, this means the probability of~$X^n$ being inside an~$\varepsilon$-tube around~$x$ decays exponentially with respect to~$n$. \smallskip Let us point out two interesting conclusions from the large deviation principle~\eqref{intro:eq:LDP-Schilders-Theorem}. First, suppose that~$\mathcal{I}(x)>0$. Then the probability of~$X^n$ being close to~$x$ with respect to the uniform norm decays exponentially with increasing~$n$. Since~$\mathcal{I}(x)>0$ whenever~$x$ has a non-zero velocity, we conclude that realizations of~$X^n$ are with high probability close to the minimizer~$\overline{x}$ of the rate function~\eqref{intro:eq:RF-Schilders-Theorem}. The minimizer is unique and given by the constant path~$\overline{x} \equiv x_0$. This identifies~$\overline{x}$ as the law of large number limit of~$X^n$, by Theorem~\ref{thm:math-formulation-LDP:LDP-implies-as} from above. \smallskip Second, we illustrate the least-action principle. Consider a closed subset of trajectories~$A\subseteq\mathcal{X}$ not containing~$\overline{x}$. This set represents an atypical event. Suppose~$x$ is the unique trajectory minimizing the rate function evaluated over~$A$, \begin{equation*} \mathcal{I}(x) = \min_{y\in A} \mathcal{I}(y). \end{equation*} Then if the event~$A$ occurs, it will most likely be realized as~$X^n\approx x$. More precisely, for any~$\varepsilon>0$, we have by~\cite[Theorem~1.4]{BudhirajaDupuis2019} that \begin{equation*} \mathbb{P}\left(X^n\in B_\varepsilon(x)\,|\,X^n\in A\right) \xrightarrow{n\to\infty} 1. \end{equation*} For instance, fix~$C>0$ and consider~$A=\{x\in\mathcal{X}\,:\,x(0)=x_0,\,x(T)\geq x_0+C\}$. This event corresponds to~$X^n$ exceeding the threshold~$x_0+C$ at final time~$T$. To determine the most likely way in which this rare event occurs, we have to solve the corresponding minimization problem with rate function~\eqref{intro:eq:RF-Schilders-Theorem}, \begin{equation*} \mathcal{I}(x) = \min_{y\in A} \int_0^T \frac{1}{2}|\partial_t y(t)|^2\, \mathrm{d} t. \end{equation*} Solving the Euler-Lagrange equation with the boundary conditions~$y(0)=x_0$ and~$y(T) = \lambda$ (any~$\lambda\geq C$), we find that the minimizing trajectory~$x$ is the path with constant velocity~$C/T$, that is~$x(t) = x_0 + t\,C/T$. \qed \end{example*} The example illustrates in what sense a large deviation principle for stochastic processes contains more information than the law of large numbers. We have an exponential estimate on the probabilities of deviating from the law of large number limit, and the rate function contains information about the rare-event behaviour. In the example, the Brownian motion exceeds the threshold $x_0+C$ most likely by following the path with a constant slope. Determining the rare-event behaviour for more involved examples is an interesting topic, but we will not study it in this thesis. For more background on the least-action principle, we refer to the following papers and the references therein. Weinan, Ren and Vanden-Eijnden use Freidlin-Wentzell theory to study rare events in a couple of perturbed dynamical systems, including for instance the one-dimensional Ginzburg-Landau model~\cite{WeinanRenVanden-Eijnden2004}, and introduced the string method~\cite{WeinanRenVanden-Eijnden2002}. Metzner, Sch{\"u}tte and Vanden-Eijnden provide an overview of illustrating examples~\cite{MetznerSchutteVanden-Eijnden2006}, and Grafke and Vanden-Eijnden explore numerical methods for various rare-event algorithms~\cite{GrafkeVanden-Eijnden2019}. \smallskip The form of the rate function~\eqref{intro:eq:RF-Schilders-Theorem} is a special case of a more general principle. For many examples, we can derive rate functions of the form \begin{equation}\label{intro:eq:RF-action-integral} \mathcal{I}(x) = \int_0^T \mathcal{L}(x(t),\partial_t x(t))\, \mathrm{d} t. \end{equation} The map~$\mathcal{L}:\mathbb{R}\times\mathbb{R}\to[0,\infty]$ appearing in the rate function is called the \emph{Lagrangian}. In the above example,~$\mathcal{L}(x,v) = v^2/2$ is independent of~$x$. We call~\eqref{intro:eq:RF-action-integral} an \emph{action-integral representation} or~\emph{Lagrangian rate function}, which is motivated from the least-action principle that we discussed above. If a process~$X^n$ satisfies a large deviation principle with a Lagrangian rate function, then its limiting dynamics~$\overline{x}=\overline{x}(t)$ can be determined by solving~$\mathcal{L}(\overline{x}(t),\partial_t\overline{x}(t))=0$. \smallskip For more involved stochastic processes, it is often difficult to derive an exact characterization of their limiting dynamics in the first place. In these situations, deriving the Lagrangian provides one way of finding a good characterization. This is what we do in the first part of this thesis, where we are interested in two main aspects: deriving Lagrangians and extracting useful information from them. A common feature making the stochastic processes that we study interesting is their irreversibility with respect to time. We close this chapter by pointing out our motivation for considering irreversible processes. \subsubsection{The role of irreversibility---an open question.} Jordan, Kinderlehrer and Otto demonstrated that the solution of the diffusion equation is the steepest descent of the relative entropy~\cite[Theorem~5.1]{JordanKinderlehrerOtto1998}. Their variational formulation is motivated by the backward Euler approximation scheme, and represents an example of a \emph{gradient flow}---we introduce these concepts in more detail in Section~\ref{GF_NGF:sec:GF} of Chapter~\ref{chapter:GF-to-NGF}. A special role in the gradient flow is played by the Wasserstein distance between probability measures, which serves as the metric in the gradient flow. Therefore, this variational formulation is called the Wasserstein gradient flow. Such a variational structure involving the Wasserstein distance can be recognized in many other PDEs, e.g.~\cite{AmbrosioGigliSavare2008,BlanchetCalvezCarrillo2008,CarrilloDiFrancescoFigalliLaurentSlepcev2011,CarrilloYoungPilTse2019,CarlenGangbo2004,Gigli2010,GianazzaSavareToscani2009,MatthesMcCannSavare2009,Savare2007,Lisini2009}. Many of these PDEs arise from stochastic particle systems, but it is a priori not clear how to find a corresponding gradient flow. Therefore, it is helpful to know how to derive the corresponding Wasserstein gradient flows from the microscopic dynamics. A recent example of such a derivation is the study of Gavish, Nyquist and Peletier~\cite{GavishNyquistPeletier2019} about hard-rod systems. \smallskip Adams, Dirr, Peletier and Zimmer derived the Wasserstein gradient flow for the diffusion equation by means of large deviation theory~\cite[Theorem~3]{AdamsDirrPeletierZimmer2011}, by considering the empirical density of independent Brownian motions and sending the number of particles to infinity. Soon after, Mielke, Peletier and Renger revealed that the gradient flow is a consequence of microscopic \emph{reversibility} of the Brownian motions~\cite{MielkePeletierRenger2014}. The argument exploits an action-integral form of the rate function. Let us briefly state in what sense. For~$n$ independent Brownian motions~$\{B^i\}_{i=1,\dots,n}$, the empirical particle density defined by~$\rho^n = \frac{1}{n}\sum_{i=1}^n \delta_{B^i}$ is a measure-valued process that converges in the narrow topology to the solution of the diffusion equation as~$n\to\infty$. That means~$\rho^n\rightharpoonup\rho$, where~$\partial_t\rho = \Delta \rho$. The sequence also satisfies a large deviation principle in~$\mathcal{X}=C_{\mathcal{P}(\mathbb{R})}[0,\infty)$ with a rate function given by \begin{equation}\label{intro:eq:action-RF-measure-valued-process} \mathcal{I}(\mu) = \int_0^\infty\mathcal{L}(\mu(t),\partial_t\mu(t))\, \mathrm{d} t. \end{equation} The rate function satisfies~$\mathcal{I}(\rho)=0$. We ignore here the initial conditions and do not go into details, but refer to~\cite[Theorem~13.3]{FengKurtz2006} for the precise statement. Mielke, Peletier and Renger show in~\cite[Section~4.2]{MielkePeletierRenger2014} how to decompose the Lagrangian in~\eqref{intro:eq:action-RF-measure-valued-process} in such a way that one can recognize the Wasserstein gradient-flow structure in the rate function~\eqref{intro:eq:action-RF-measure-valued-process}. \smallskip The argument that connects the rate function to a gradient flow is based on reversibility. This argument extends from the abovementioned example to a wider class of reversible Markov processes, which by large deviations give rise to so-called \emph{generalized gradient flows}~\cite{MielkePeletierRenger2014} (see also Section~\ref{GF_NGF:sec:GF} of Chapter~\ref{chapter:GF-to-NGF}). Triggered by this connection between variational structures of PDEs and large deviations, a natural question we can ask is: \emph{which variational structures can we derive from irreversible processes?} While this question is still open, we remark that the starting point for this connection in the reversible case is a Lagrangian rate function. The main questions we ask in the first part of this thesis are thus: \emph{how can we prove large deviation principles for irreversible dynamics and obtain action-integral representations of the rate functions?} \emph{How can we establish useful characterizations of the Lagrangians?} We hope that the techniques we develop by answering such questions can contribute to extending the abovementioned connection to a suitable class of irreversible processes. The study of irreversible processes is also of independent interest, since various non-equilibrium phenomena are modelled by irreversible processes; we refer to the note of Harris and Touchette~\cite[Section~1.2]{TouchetteHarris2011} for more. A broader overview on irreversibility may be found in Bricmont's note~\cite[Section~3]{Bricmont1996}. \smallskip Since we will come back to reversibility, let us close this section by formulating this property here. For a state space~$E$ and a trajectory~$\gamma\in\mathcal{X}=C_E[0,T]$, let~$\mathrm{rev}(\gamma)$ be the trajectory defined by \begin{equation*} \mathrm{rev}(\gamma)(t):= \gamma(T-t),\quad t\in [0,T]. \end{equation*} That means~$\mathrm{rev}(\gamma)$ is the time-reversed trajectory of~$\gamma$. For a Borel set of trajectories~$A\subseteq \mathcal{X}$, let~$\mathrm{rev}(A) := \{\mathrm{rev}(\gamma)\,:\,\gamma\in A\}$. For~$\mu\in\mathcal{P}(E)$, we write~$\mathbb{P}_\mu$ for the path distribution of a process~$X$ with initial distribution~$X(0)\sim \mu$. A measure~$\pi\in\mathcal{P}(E)$ is \emph{stationary} if~$\mathbb{E}_\pi f(X(t))$ is constant in time for any observable~$f=f(x)$. \begin{definition}[Reversibility]\label{intro:def:reversibility} Let~$X$ be a Markov process with path distributions~$\mathbb{P}_\mu$ and stationary measure~$\pi\in\mathcal{P}(E)$. We say~$X$ is \emph{reversible} with respect to~$\pi$ if for any Borel subset~$A\subseteq\mathcal{X}$, \begin{align} \mathbb{P}_\pi\left(X\in A\right) = \mathbb{P}_\pi\left(X\in \mathrm{rev}(A)\right). \tag*\qed \end{align} \end{definition} For illustration, an example of a reversible process is a jump process on~$\{1,2,3\}$ with uniform nearest-neighbor jump rates; its stationary measure is the uniform measure. A counterexample is a jump process on~$\{1,2,3\}$ with jumps only clockwise,~$r(1\to 2)=r(2\to 3)=r(3\to 1)>0$, and all other jump rates equal to zero. The stationary measure is also the uniform measure, but for the set~$A_\circlearrowright$ containing all trajectories only going clockwise,~$\mathrm{rev}(A_\circlearrowright)=A_\circlearrowleft$, and therefore \begin{equation*} \mathbb{P}_\pi\left(X\in A_\circlearrowright\right) = 1\quad \text{and}\quad \mathbb{P}_\pi\left(X\in \mathrm{rev}(A_\circlearrowright)\right) = 0. \end{equation*} The notion of reversibility of Definition~\ref{intro:def:reversibility} is sometimes also refered to as \emph{microscopic reversibility} or \emph{time reversibility}. For Markov processes, there are several useful equivalent characterizations of reversibility that we will work with. For instance, reversibility is equivalent to symmetry of the infinitesimal generator or the semigroup, in the sense made precise in~\cite[Proposition~5.3]{Liggett2004}. \section{Overview of the thesis} \label{intro:sec:overview-of-the-thesis} Here we outline the content of the subsequent chapters. We further detail the relation of our results to the literature in the introductory parts of the chapters. \paragraph{Chapter~\ref{chapter:LDP-via-HJ}: Large Deviations via Hamilton-Jacobi Equations.} In this chapter we demonstrate how to prove pathwise large deviation principles by exploiting the connection to Hamilton-Jacobi equations~\cite{FengKurtz2006}. The gist of this connection is that solving certain PDEs of Hamilton-Jacobi type allows us to prove an action-integral representation of the rate function involving the so-called Lagrangian. The crucial insight we take from this chapter is an algorithm that allows us to rigorously derive the Lagrangian starting from microscopic dynamics. \smallskip While the results in this chapter are not novel, some proofs simplify because we choose to illustrate all concepts in a simpler setting. The extension to theorems including the general settings are presented in the monograph of Jin Feng and Thomas Kurtz~\cite{FengKurtz2006}. We close the chapter by outlining the relation of our presentation to such general settings. \paragraph{Chapter~\ref{chapter:LDP-for-switching-processes}: Large Deviations of Switching Processes.} This chapter is based on a joint work with Mark Peletier~\cite{PeletierSchlottke2019}. Our work is inspired by a series of papers by Mirrahimi, Perthame and Souganidis about PDEs describing molecular motors~\cite{PerthameSouganidis09a, PerthameSouganidis2009Asymmetric, Mirrahimi2013}. We consider a general class of switching Markov processes that comprise the PDE models as a special case, and prove pathwise large deviation principles. The large-deviation theorems extend and generalize the results of~\cite{PerthameSouganidis09a, PerthameSouganidis2009Asymmetric, Mirrahimi2013}. The main tool we work with is the connection of large deviations to Hamilton-Jacobi equations. In particular, this connection allows us to study within the same framework multiple limit regimes as well as continuous and discrete models of molecular motors. \smallskip As an application, we show how macroscopic transport properties of molecular motors can be deduced from associated principal-eigenvalue problems. We work with variational formulas of principal eigenvalues to demonstrate that breaking detailed balance is necessary for obtaining transport. In Section~\ref{subsec:model-of-molecular-motor} we discuss an example of a continuous molecular-motor model that illustrates our more general results. \paragraph{Chapter~\ref{chapter:LDP-of-empirical-measures}: Large Deviations of Empirical Measures.} This chapter is based on a joint work with Joris Bierkens and Pierre Nyquist~\cite{BierkensNyquistSchlottke2019}. Joris Bierkens and Gareth Roberts discovered the zig-zag process as a scaling limit of the Lifted Metropolis-Hastings~\cite{BierkensRoberts2017}. The zig-zag process is an example of a piecewise deterministic Markov process in position and velocity space. The process can be designed to have an arbitrary Gibbs-type marginal probability density for its position coordinate, which makes it suitable for Monte Carlo simulation of continuous probability distributions. An important question in assessing the efficiency of this method is how fast the empirical measure converges to the stationary distribution of the process. We provide a partial answer to this question by characterizing the large deviations of the empirical measure from the stationary distribution. Based on the Feng-Kurtz approach to large deviations~\cite{FengKurtz2006}, we develop an abstract framework aimed at encompassing piecewise deterministic Markov processes in position-velocity space. We derive explicit conditions for the zig-zag process to allow the Donsker-Varadhan variational formulation of the rate function, both for a compact setting (the torus) and one-dimensional Euclidean space. \smallskip For reversible processes, Donsker and Varadhan offer an exact formula of the rate function involving the stationary measure. There is no generic formula for irreversible processes, which makes it generally harder to draw conclusions from the rate function. For the zig-zag process however, we derive an explicit expression for the Donsker-Varadhan functional for the case of a compact state space. We use this form of the rate function to address a key question concerning the optimal choice of the switching rate of the zig-zag process. We show that maximal irreversibility corresponds to the fastest possible convergence to the stationary distribution. \paragraph{Chapter~\ref{chapter:LDP-in-slow-fast-systems}: Large Deviations in Stochastic Slow-Fast Systems.} This chapter is based on a work in progress with Richard Kraaij. We give conditions for proving pathwise large deviations in stochastic slow-fast systems in the limit of time-scale separation tending to infinity. The conditions are imposed in order to solve the corresponding Hamilton-Jacobi equations. In the limit regime we consider, the convergence of the slow variable to its deterministic limit and the convergence of the fast variable to equilibrium are competing at the same scale. We cast the rate functions in action-integral form and interpret the Lagrangians in two ways: in terms of a double-optimization problem of the slow variable's velocity and the fast variable's distribution, and in terms of a principal-eigenvalue problem associated to the slow-fast system. \smallskip As an application, we provide a large-deviation theorem for the empirical density-flux pair of mean-field interacting particles coupled to fast diffusion. This system cannot be treated with classical methods. We further show how the Lagrangian can be used to derive an averaging principle from the large deviation principle. \paragraph{Chapter~\ref{chapter:CP-for-two-scale-H}: Comparison Principle for Two-Scale Hamiltonians.} This chapter is based on a joint work with Richard Kraaij~\cite{KraaijSchlottke2019}. We study the well-posedness of Hamilton-Jacobi-Bellman equations on subsets of~$\mathbb{R}^d$. The Hamiltonian consists of two parts: an internal Hamiltonian depending on an external control variable and a cost function penalizing the control. We show under suitable assumptions that if a comparison principle holds for the Hamilton-Jacobi equation involving only the internal Hamiltonian, then the comparison principle holds for the Hamilton-Jacobi-Bellman equation involving the full Hamiltonian. In addition to establishing uniqueness, we give sufficient conditions for existence of solutions. Our key features are that the internal Hamiltonian is allowed to be non-Lipschitz and non-coercive in the momentum variable, and that we allow for discontinuous cost functions. To compensate for the greater generality of our approach, we assume sufficient regularity of the cost function on its sub-level sets and that the internal Hamiltonian satisfies a comparison principle uniformly in the control variable on compact sets. As an application, we show our established result to cover interesting examples that were posed as open problems in the literature as well as mean-field Hamiltonians that cannot be treated with standard methods. \paragraph{Chapter~\ref{chapter:GF-to-NGF}: Gradient Flow to Non-Gradient-Flow.} This chapter is based on a work in progress with Mario Maurelli and Mark Peletier. We study a singular limit problem arising in modelling chemical reactions. At finite~$\varepsilon>0$, the model is a Fokker-Planck equation corresponding to a particle diffusing in a double-well potential. In the limit~$\varepsilon=0$, the solution concentrates at the two potential wells. Arnrich, Mielke, Peletier, Savaré and Veneroni~\cite{ArnrichMielkePeletierSavareVeneroni2012} considered a \emph{symmetric} double-well potential and proved Gamma convergence of the associated Wasserstein gradient-flow structures. We take the double-well potential to be \emph{asymmetric}. In that case, the Wasserstein gradient flows do no longer converge. This is because the relative entropies diverge in the limit. To obtain a meaningful limit of a variational structure associated to the family of equations, we consider density-flux functionals rather than density functionals. The Wasserstein gradient flow is obtained from the density-flux functional by contraction. \paragraph{Chapter~\ref{chapter:discussion}: Discussion and Future Questions.} In this final chapter, we first summarize the results presented in this thesis. Then we discuss their limitations and point out questions that we could not answer so far. \chapter{Introduction to Large Deviations via Hamilton-Jacobi Equations} \label{chapter:LDP-via-HJ} \chaptermark{LDP via Hamilton-Jacobi Equations} \section{A general strategy of proof} \label{BG:sec:math-gem} This chapter is an introduction to a connection between two mathematical subjects: pathwise large deviations of stochastic processes on the one hand, and Hamilton-Jacobi equations on the other hand. Jin Feng and Thomas Kurtz show in their monograph~\cite{FengKurtz2006} how to rigorously connect these subjects by means of mathematical theorems. The scope of the approach is demonstrated by the examples given in~\cite[Section~I.1.4]{FengKurtz2006}. \smallskip When I first tried to work with the theory, I had difficulties to get started. This was mainly because the general conditions are involved, which can make it difficult for a newcomer to grasp the essence. I write this chapter with the intention to facilitate for other newcomers the process of getting started. To do so, I sacrifice generality for clarity, and answer three straightforward questions I initially struggled to answer for myself, and to which I could not find straight answers in the literature. Before we get to the questions, let us first have a look at the gist of the connection. \subsubsection{The connection in a nutshell.} For $E:=\mathbb{R}^d$ and a finite~$T>0$, let~$\mathcal{X}:= C_E[0,T]$ be the set of~$E$-valued continuous trajectories~$x:[0,T]\to E$, equipped with the supremum norm. Consider a sequence of Markov processes~$\{X^n\}_{n=1,2\dots}$, where each~$X^n$ is regarded as a random variable in~$\mathcal{X}$, with deterministic initial conditions~$X^n(0)=x_0$. \smallskip We will typically consider~$X^n$ that become deterministic in the limit~$n\to\infty$: frequently we expect by the law of large numbers that there exists a trajectory~$\overline{x}\in\mathcal{X}$ such that~$X^n\to \overline{x}$ almost surely as~$n\to\infty$. Then for any closed set of trajectories~$A\subseteq \mathcal{X}$ not containing~$\overline{x}$, we have~$\mathbb{P}\left(X^n\in A\right)\to 0$ as~$n\to\infty$. We say~$X^n$ satisfies a \emph{pathwise large deviation principle} if these probabilities are exponentially small with respect to~$n$ in the sense of Definition~\ref{def:LDP}. Our goal is both to prove a large deviation principle and to find a useful formula of the rate function. \smallskip Let us state the connection to Hamilton-Jacobi equations. We denote the transition probabilities of~$X^n$ by~$P_n(t,x, \mathrm{d} y)$. Define for a bounded measurable function~$f\in B(E)$ and~$t\geq 0$ the function~$V_n(t)f$ by \begin{equation}\label{eq:BG:def-nonlinear-semigroup-Vn} V_n(t) f(x) := \frac{1}{n}\log\int_{E}e^{n f(y)}\,P_n(t,x, \mathrm{d} y). \end{equation} For each~$n=1,2,\dots$, the family~$\{V_n(t)\}_{t\geq 0}$ forms a one-parameter semigroup of maps acting on~$B(E)$. Further below, we prove that the convergence of these semigroups~$V_n$ to a limiting semigroup~$\{V(t)\}_{t\geq 0}$ implies a pathwise large deviation principle of~$X^n$. This limiting semigroup can be regarded as the \emph{semigroup flow} of a Hamilton-Jacobi equation; there is a map~$\mathcal{H}:E\times\mathbb{R}^d\to\mathbb{R}$ called the \emph{Hamiltonian} with which the function~$u(t,x) := V(t)f(x)$ is the solution to \begin{equation*} \begin{cases} \partial_t u(t,x) = \mathcal{H}(x,\nabla_x u(t,x)),\\ u(0,x) = f(x). \end{cases} \end{equation*} In which precise sense~$u$ solves this equation is not important here. The Hamiltonian fully characterizes the large-deviation fluctuations via its Legendre dual defined as the map~$\mathcal{L}(x,v) := \sup_{p}[p\cdot v-\mathcal{H}(x,p)]$, which we call the \emph{Lagrangian}. Indeed, frequently the large-deviation rate function~$\mathcal{I}:\mathcal{X}\to[0,\infty]$ satisfies \begin{equation}\label{BG:eq:intro-RF-action-integral} \mathcal{I}(x) = \int_0^T\mathcal{L}(x(t),\partial_t x(t))\, \mathrm{d} t. \end{equation} This is a useful formula which allows us to determine the law of large number limit for complicated processes~$X^n$, namely as the path~$\overline{x}$ satisfying~$\mathcal{I}(\overline{x})=0$, which solves the equation~$\mathcal{L}(\overline{x}(t),\partial_t\overline{x}(t))=0$. We call~\eqref{BG:eq:intro-RF-action-integral} an \emph{action-integral representation}. \smallskip The Hamiltonian can be derived by taking the limit of the so-called \emph{nonlinear generators}~$H_n$ of the semigroups~$V_n(t)$, which are formally determined by~$H_n := \frac{ \mathrm{d}}{ \mathrm{d} t}|_{t=0}V_n(t)$. These nonlinear generators converge in a suitable sense to a limiting operator~$H$ acting on functions as~$Hf(x)=\mathcal{H}(x,\nabla f(x))$, where~$\mathcal{H}$ is the Hamiltonian from above. This derivation will provide us with a recipe for three aspects at once: finding the Hamiltonian, giving a rigorous proof of large deviations, and proving the action-integral formula~\eqref{BG:eq:intro-RF-action-integral}. The goal of this chapter is to prove a rigorous version of this recipe in a simplified setting.\qed \subsubsection{Three questions that we answer in this chapter.} Our first question is: \begin{enumerate}[label=(\arabic*)] \item \emph{Why is verifying the convergence of the nonlinear semigroups~$V_n(t)$ to a limiting semigroup~$V(t)$ sufficient for proving pathwise large deviation principles?} \end{enumerate} We answer this question in Section~\ref{BG:sec:LDP-from-convergence-of-semigroups} by means of Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}---the additional assumption of exponential tightness appearing therein is not important for now. \smallskip In practice, verifying convergence of the nonlinear semigroups~$V_n(t)$ from scratch is hard. In that sense, the result formulated in Theorem~\ref{thm:LDP-via-semigroup-convergence:compact} really only serves as a stepping stone to obtain useful and applicable results. The bulk of the general functional analytical work in~\cite{FengKurtz2006} lies in detecting useful conditions to verify the convergence of nonlinear semigroups from the convergence of their \emph{generators}. Let us briefly sketch the idea. For a bird's-eye view on semigroups, we refer to Chapters~I and~VII of Engel's and Nagel's monograph~\cite{EngelNagel1999}. \begin{example}\label{ex:semigroups-are-exponentials} Let $T:[0,\infty)\to\mathbb{C}$ be a continuous map forming a semigroup, that means~$T(t+s)=T(t)T(s)$ and~$T(0)=1$. Cauchy and Abel proved the existence of a unique scalar $g\in \mathbb{C}$ with which the semigroup is given by $T(t)=e^{tg}$ (\cite[Theorem~1.4]{EngelNagel1999}). We call $g$ the \emph{generator} of the semigroup~$T(t)$. Let us point out two aspects about this result: \begin{enumerate}[$\bullet$] \item The whole semigroup~$T$ is uniquely identified by its generator~$g$. \item While the map $T$ is only assumed to be continuous, its semigroup property $T(t+s)=T(t)T(s)$ actually enforces differentiability. Its generator is uniquely determined by $g = \frac{d}{dt}T(0)$. \end{enumerate} Based on this result, we can prove the following recipe for convergence of a sequence of semigroups $\{T_n\}_{n\in\mathbb{N}}$. First, identify their generators by computing $g_n = \frac{d}{dt}T_n(0)$. Second, identify the limit $g:=\lim_n g_n$. Then this limit generates a semigroup by $T(t) := e^{tg}$, and the semigroups~$T_n$ converge to~$T$ uniformly over compact time intervals. \qed \end{example} In the spirit of this example, the natural question we can ask is whether there exists a similar recipe for proving convergence of the semigroups~$V_n(t)$. That means first identifying generators~$H_n$ by making sense of $H_n = \frac{d}{dt}V_n(0)$, and then secondly identifying a suitable limit $H:=\lim_n H_n$. In the above example the semigroups are complex scalars, and the fact that the limit~$g$ is a complex scalar is sufficient to generate a semigroup by means of the formula~$T(t):=e^{tg}$. Since the semigroups~$V_n(t)$ are nonlinear maps defined on~$B(E)$, the conditions on a limit~$H$ are more involved. \smallskip Therefore, our second question is: \begin{enumerate}[label=(\arabic*)] \setcounter{enumi}{1} \item \emph{How does the recipe from Example~\ref{ex:semigroups-are-exponentials} for verifying convergence of semigroups carry over to the nonlinear semigroups~$V_n(t)$?} \end{enumerate} The answer we give in Section~\ref{BG:sec:LDP-from-convergence-of-semigroups} identifies the generators~$H_n$ as certain nonlinear operators and establishes conditions on a limit operator~$H$ to generate a nonlinear semigroup~$V(t)$. We find that the convergence of generators~$H_n\to H$ indeed implies the desired convergence of semigroups~$V_n\to V$. The conditions on the limit operator~$H$ are imposed in order to make sense of the formula~$V(t)=e^{tH}$. In Theorem~\ref{thm:LDP-classical-sol} in Section~\ref{subsec:LDP-via-classical-sol}, we first see how this program leads to the problem of solving PDEs of the form \begin{equation*} (1-\tau H) f = h, \end{equation*} where~$\tau>0$ and the function~$h=h(x)$ are given. In a running example, by which we illustrate intermediate results, this PDE is \[ f(x) - \tau \frac{1}{2}|\nabla f(x)|^2 = h(x),\quad x\in\mathbb{R}. \] We show in Section~\ref{subsec:LDP-via-visc-sol} why the notion of viscosity solutions provides the right tools to solve these type of PDEs. The recipe we obtain for proving pathwise large deviation principles is summarized in Theorem~\ref{thm:LDP-visc-sol}, and we apply this theorem to the running example. The drawback of this theorem is that the rate function is still intricate. Therefore, our third question is: \begin{enumerate}[label=(\arabic*)] \setcounter{enumi}{2} \item \emph{How can we prove an action-integral representation~\eqref{BG:eq:intro-RF-action-integral} of the rate function?} \end{enumerate} We provide an answer in Section~\ref{BG:sec:semigroup-flow-HJ-eq}. The required Hamiltonian~$\mathcal{H}$ is identified from the limit operator~$H$, by recognizing the latter to act on functions by \begin{equation*} Hf(x) = \mathcal{H}(x,\nabla f(x)). \end{equation*} Let us summarize where we stand after we will have answered the above three questions. We find an algorithm that provides us with a convenient method for guessing the form of a rate function. For a sequence of~$\mathbb{R}^d$-valued Markov processes~$X^n$, the algorithm can be divided into five steps. First, start from the generators~$L_n$ of~$X^n$. Second, compute the nonlinear generators defined by acting on functions as~$H_n f := \frac{1}{n}e^{-nf}L_n e^{nf}$. Third, identify the limit operator~$Hf=\lim_n H_nf$. Fourth, identify the Hamiltonian~$\mathcal{H}:\mathbb{R}^d\times\mathbb{R}^d\to\mathbb{R}$ as the map satisfying~$Hf(x)=\mathcal{H}(x,\nabla f(x))$ for all~$f$ in the domain of~$H$. Finally, define the Lagrangian as the Legendre-Fenchel dual~$\mathcal{L}(x,v):=\sup_{p\in\mathbb{R}^d}\left[p\cdot v - \mathcal{H}(x,p)\right]$. Now details aside, the rate function satisfies~\eqref{intro:eq:RF-action-integral} with this Lagrangian. In Section~\ref{BG:sec:setting}, we briefly summarize some aspects about Markov processes that we will work with in the subsequent sections. Each subsequent section is devoted to answer one of the three questions posed above. Section~\ref{BG:sec:LDP-from-convergence-of-semigroups} answers the first question about semigroup convergence, Section~\ref{sec:LDP-via-generators} the second question about deriving semigroup convergence from generator convergence, and Section~\ref{BG:sec:semigroup-flow-HJ-eq} the third question about the action-integral representation. \section{Setting: Markov process in compact state space} \label{BG:sec:setting} We denote by~$E$ a Polish space, that is a complete separable metric space. We will assume~$E$ to be compact. For~$T>0$, let~$\mathcal{X}:=C_E[0,T]$ be the set of continuous maps~$\gamma:[0,T]\to E$, equipped with the supremum norm. We consider a set of transition probabilities $\{P(t,x, \mathrm{d} y)\}_{t\geq 0}$ such that: \begin{enumerate}[label=(\roman*)] \item For any~$x\in E$,~$P(t,x,\cdot)$ is a probability measure on~$E$, and~$P(0,x,\cdot)=\delta_x$. \item For any Borel subset $A\subseteq E$, the map $x\mapsto P(t,x,A)$ is measurable on~$E$, and for any $s\leq t$, we have~$P(s+t,x,A) = \int_E P(s,y,A) \, P(t,x, \mathrm{d} y)$. \end{enumerate} By Theorem~1.1 in Chapter~IV of~\cite{EthierKurtz1986}, such a collection of transition probabilities gives rise to a corresponding Markov process~$X(t)|_{t\geq 0}$; for~$t\in[0,T]$, we have a random variable~$X(t)$ in~$E$, and~$X$ is a random variable in~$\mathcal{X}$. The Markov process is identified with the path distributions~$\{\mathbb{P}_x\}_{x\in E}$, where each~$\mathbb{P}_x$ is a probability measure on~$\mathcal{X}$ describing the law of the process when starting at~$x$. \smallskip If we think of the process as describing a particle that moves in~$E$, then the value~$P(t,x,A)$ corresponds to the probability that starting from~$x$, the particle propagates in time~$t$ into the region~$A$. It is the conditional probability \[ P(t,x,A) = \mathbb{P}\left(X(t)\in A\,|\,X(0)=x\right) = \mathbb{P}_x\left(X(t)\in A\right). \] Let~$B(E)$ be the set of bounded and measurable functions on~$E$. We call the family of maps~$\{S(t)\}_{t\geq 0}$, with $S(t):B(E)\to B(E)$ given by \begin{equation}\label{BG:eq:def:Markov-semigroup} S(t)f(x) := \int_E f(y)\,P(t,x, \mathrm{d} y), \end{equation} the \emph{semigroup} associated to the Markov process $X$. Its semigroup property, that is~$S(t+s)=S(t)S(s)$, is inherited from the transition probabilities. \section{Large deviations via convergence of semigroups} \label{BG:sec:LDP-from-convergence-of-semigroups} The main point of this section is to answer our first key question: why is the convergence of nonlinear semigroups sufficient for proving pathwise large deviation principles? We answer it by proving Theorem~\ref{thm:LDP-via-semigroup-convergence:compact} below, which is a simplification of~\cite[Theorem~5.15, Corollary~5.17]{FengKurtz2006}. \begin{definition}[Nonlinear Semigroup associated to Markov process]\label{def:nonlinear-semigroups} Let $E$ be a Polish space. For a Markov process~$X^n$ with transition probabilities $P_n(t,x, \mathrm{d} y)$, define the map $V_n(t):B(E)\to B(E)$ by~\eqref{eq:BG:def-nonlinear-semigroup-Vn}; that is for~$f\in B(E)$, \begin{equation}\label{eq:def:nonlinear-semigroup} V_n(t)f(x) := \frac{1}{n}\log\int_E e^{nf(y)}\,P_n(t,x, \mathrm{d} y). \end{equation} We call the family~$\{V_n(t)\}_{t\geq 0}$ the \emph{nonlinear semigroup} associated to the process~$X^n$.\qed \end{definition} We will see further below how Bryc's formula leads us directly to consider these nonlinear semigroups. The family $\{V_n(t)\}_{t \geq 0}$ inherits its semigroup property from the semigroup $\{S_n(t)\}_{t\geq 0}$ of the Markov process~$X^n$, since \begin{align*} V_n(t+s)f(y) &\stackrel{\mathclap{\text{def}}}{=} \frac{1}{n}\log S_n(t+s) e^{nf}(y)\\ &= \frac{1}{n}\log S_n(t)\left[S_n(s)e^{nf}\right](y)\\ &= \frac{1}{n}\log S_n(t)\left[e^{n V_n(s)f}\right](y) \stackrel{\mathclap{\text{def}}}{=} V_n(t) \left[V_n(s) f\right](y). \end{align*} For the theorem, we also need the following condition. \begin{definition}[Exponential tightness] Let $\{\mathrm{P}^n\}_{n\in\mathbb{N}}$ be a sequence of probability measures on a Polish space~$\mathcal{X}$. The sequence $\{\mathrm{P}^n\}_{n\in\mathbb{N}}$ is \emph{exponentially tight} if for any $\ell > 0$, there exists a compact set $K_\ell \subseteq E$ such that \begin{align*} \limsup_{n\to\infty} \frac{1}{n} \log \mathrm{P}^n\left(\mathcal{X}\setminus K_\ell\right) \leq -\ell. \tag*\qed \end{align*} \end{definition} Exponential tightness means the mass of the probability measures $\mathrm{P}^n$ concentrates exponentially fast on compact sets: given an arbitrary rate $\ell > 0$, for any $\varepsilon > 0$ there exists a compact set $K_{\ell,\varepsilon}\subseteq \mathcal{X}$ such that for $n$ large enough, \[ \mathrm{P}^n\left(\mathcal{X}\setminus K_{\ell,\varepsilon}\right)\leq e^{-n(\ell-\varepsilon)}. \] We comment further below on the role of exponential tightness. Let us first formulate the theorem. For a function~$g\in B(E)$, we write~$\|g\|_E:=\sup_E |g|$. \begin{theorem}[Large deviations via convergence of nonlinear semigroups] \label{thm:LDP-via-semigroup-convergence:compact} For~$n=1,2,\dots$, let~$X^n$ be a Markov process in~$\mathcal{X}=C_E[0,T]$ with path distribution denoted by~$\mathrm{P}^n := \mathbb{P}(X^n\in \cdot)\in\mathcal{P}(\mathcal{X})$, and with the corresponding nonlinear semigroup~$V_n$ from Definition~\ref{def:nonlinear-semigroups}. Assume the following: \begin{enumerate}[label=(\roman*)] \item The sequence $\{\mathrm{P}^n\}_{n\in\mathbb{N}}$ is exponentially tight in $\mathcal{X}$. \item\label{BG:item:LDP-via-semigroup:conv-Vn} There are maps $V(t):C(E)\to C(E)$, $t\geq 0$, such that for any sequence of functions $f_n\in B(E)$ and $f\in C(E)$, \begin{equation*} \text{if}\quad \|f-f_n\|_E\xrightarrow{n\to\infty}0,\qquad\text{then}\quad \|V(t)f-V_n(t)f_n\|_E\xrightarrow{n\to\infty}0. \end{equation*} \end{enumerate} Suppose furthermore that the initial conditions~$\{X^n(0)\}_{n\in\mathbb{N}}$ satisfy a large deviation principle in~$E$ with rate function $\mathcal{I}_0:E\to[0,\infty]$. Then the sequence $\{X^n\}_{n\in \mathbb{N}}$ satisfies a large deviation principle in $\mathcal{X}$ with rate function $\mathcal{I}:\mathcal{X}\to[0,\infty]$ given by~\eqref{eq:RF-with-semigroup-approach} below. \end{theorem} For any~$n\in\mathbb{N}$, the sequence~$X^n$ with initial conditions~$X^n(0)\sim \nu_n$ has a path distribution~$\mathrm{P}^n = \mathbb{P}_{\nu_n}(X^n\in \cdot)\in\mathcal{P}(\mathcal{X})$. The theorem gives two conditions under which a large deviation principle for the initial condition bootstraps to these path distributions. The rate function in Theorem~\ref{thm:LDP-via-semigroup-convergence:compact} is determined by the limit~$V(t)$, \begin{equation}\label{eq:RF-with-semigroup-approach} \mathcal{I}(x) = \mathcal{I}_0(x(0)) + \sup_{k\in\mathbb{N}}\sup_{(t_1,\dots,t_k)} \sum_{i=1}^k \mathcal{I}_{t_i-t_{i-1}}(x(t_i)|x(t_{i-1})), \end{equation} where $\mathcal{I}_t(z|y)$ given by \begin{equation}\label{BG:eq:RF-1d-marginals} \mathcal{I}_t(z|y) = \sup_{f\in C(E)}\left[f(z)-V(t)f(y)\right]. \end{equation} We will encounter the functions~$\mathcal{I}_t(\cdot|y)$ as the rate functions for the one-dimensional marginals. Before we give an overview of the proof of Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}, a remark on exponential tightness. This property is always expected: if a sequence of probability measures on a Polish space satisfies the large-deviation upper bound, then the sequence is exponentially tight~\cite[Exercise~4.1.10]{DemboZeitouni1998}. In general, the role of exponential tightness is to bootstrap the large-deviation upper bound from compact to closed sets~\cite[Lemma~1.2.18]{DemboZeitouni1998}. \smallskip In our context, it allows us to deduce pathwise large deviations from large deviations of the finite-dimensional marginals. If for each tuple $0\leq t_1<t_2<\dots<t_k$, the marginals $\left\{(X^n(t_1),\dots,X^n(t_k))\right\}_{n\in\mathbb{N}}$ satisfy large deviations in $E^k$ with rate function $\mathcal{I}_{t_1\dots t_k}:E^k\to[0,\infty]$, then the sequence of processes $\{X^n\}_{n\in\mathbb{N}}$ satisfies a large deviation principle in $\mathcal{X}$ with rate function $\mathcal{I}:\mathcal{X}\to[0,\infty]$ given by \begin{equation}\label{eq:RF-sup-over-finite-dim-distr} \mathcal{I}(x) := \sup_{k\in\mathbb{N}}\sup_{(t_1,\dots,t_k)}\mathcal{I}_{t_1\dots t_k}\left(x_1(t_1),\dots,x_k(t_k)\right), \end{equation} where the supremum is taken over all finite tuples $t_1<t_2<\dots<t_k$. A proof of this fact can be found in~\cite[Theorem~4.28]{FengKurtz2006}. The rate function~\eqref{eq:RF-sup-over-finite-dim-distr} is an example of bootstrapping large deviations from lower to higher-dimensional spaces, known as the Dawson-G\"artner Theorem~\cite[Theorem~4.6.1]{DemboZeitouni1998}. We postpone the problem of how to obtain exponential tightness to Section~\ref{sec:LDP-via-generators}. \begin{proof}[Overview of the proof of Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}] The pathwise large deviation principle follows from the large deviation principles of finite-dimensional distributions by exponential tightness~\cite[Theorem~4.28]{FengKurtz2006}. We first prove in Section~\ref{BG:sec:LDP-1d} the large deviation principle for the one-dimensional time marginals~$X^n(t)$. Then we see how the argument iterates to finite-dimensional distributions in Proposition~\ref{prop:LDP-multidim-compact:semigroup}. That gives the pathwise large deviation principle of~$\{X^n\}_{n\in\mathbb{N}}$ with rate function given by the formula~\eqref{eq:RF-sup-over-finite-dim-distr}. Finally, we prove in Proposition~\ref{prop:LDP-semigroups:conditional-RF} the formula~\eqref{eq:RF-with-semigroup-approach} of the rate function. \end{proof} \subsection{Varadhan's Lemma and Bryc's Formula} The main point of this section is to formulate the equivalence of large deviations and asymptotic evaluation of integrals of continuous functions, since this equivalence will be our starting point for proving large deviations of finite-dimensional distributions. For the following theorems, we consider a sequence of probability measures~$\mathrm{Q}_n$ on a compact Polish space~$\mathcal{S}$. \begin{theorem}[Varadhan's Lemma]\label{thm:Varadhans-lemma} Suppose that the sequence $\{\mathrm{Q}_n\}_{n\in\mathbb{N}}$ satisfies a large deviation principle with rate function~$\mathcal{I}:\mathcal{S}\to[0,\infty]$. Then for any bounded and continuous function $f:\mathcal{S}\to\mathbb{R}$, \begin{equation*} \lim_{n\to\infty}\frac{1}{n}\log\int_\mathcal{S} e^{nf(x)}\,\mathrm{Q}_n\left( \mathrm{d} x\right) = \sup_{x\in \mathcal{S}} \left[f(x)-\mathcal{I}(x)\right]. \end{equation*} \end{theorem} \begin{theorem}[Bryc's Formula]\label{thm:Brycs-formula} Suppose that for any~$f\in C(\mathcal{S})$, the limit \begin{equation}\label{BG:eq:rate-transform} \Lambda(f) := \lim_{n\to\infty}\frac{1}{n}\log\int_\mathcal{S} e^{nf(x)}\,\mathrm{Q}_n\left( \mathrm{d} x\right). \end{equation} exists. Then the sequence~$\{\mathrm{Q}_n\}_{n\in\mathbb{N}}$ satisfies a large deviation principle with rate function~$\mathcal{I}:\mathcal{S}\to[0,\infty]$ given by \begin{equation}\label{BG:eq:Brycs-formula} \mathcal{I}(x) = \sup_{f\in C(\mathcal{S})}\left[f(x)-\Lambda(f)\right]. \end{equation} \end{theorem} Varadhan's Lemma is a generalization of winner-takes-it-all principle. For a continuous function $g:[a,b]\to\mathbb{R}$ on a closed interval $[a,b]$, we have \[ \frac{1}{n}\log \int_a^b e^{ng(x)}\, \mathrm{d} x \xrightarrow{n\to\infty} \sup_{x\in[a,b]} g(x) =:\overline{g}. \] This follows from the fact that~$(g-\overline{g})\leq 0$ on $[a,b]$ and \[ \frac{1}{n}\log \int_a^b e^{ng(x)}\, \mathrm{d} x = \overline{g}+\frac{1}{n}\log\int_a^be^{n(g(x)-\overline{g})}\, \mathrm{d} x. \] Consider a sequence of probability measures $\mathrm{Q}_n\in\mathcal{P}(\mathbb{R})$ satisfying large deviations. At least intuitively, this means an approximation of the type \[ \mathrm{Q}_n\left( \mathrm{d} x\right) \approx e^{-n\mathcal{I}(x)}\, \mathrm{d} x \] is valid for large~$n$. Then for a bounded and continuous function $f$ on $\mathbb{R}$, \[ \int_\mathbb{R} e^{nf(x)}\,\mathrm{Q}_n\left( \mathrm{d} x\right) \approx \int_\mathbb{R} e^{nf(x)} e^{-n\mathcal{I}(x)}\, \mathrm{d} x,\quad n\to\infty \] Hence on the logarithmic scale, we expect the dominant contribution to come from the maximal value of $g:=f-\mathcal{I}$. Varadhan's Lemma states both the existence of the limit and that it equals to what we expect from the winner-takes-it-all principle. Proofs closely following the above sketch are given for instance by Budhiraja and Dupuis~\cite[Theorem~1.5]{BudhirajaDupuis2019} and Frank den Hollander~\cite[Theorem~III.13]{denHollander2000}. A proof based on the exponential Chebyshev inequality is given by Feng and Kurtz in~\cite[Proposition~3.8]{FengKurtz2006}. Dembo and Zeitouni prove it in regular topological spaces under an additional tail bound~\cite[Theorem~4.3.1]{DemboZeitouni1998}. \smallskip Bryc proved the inverse to Varadhan's Lemma in~\cite{Bryc1990}. The point of Bryc's formula is: if we can compute the rate transforms, then we obtain a rate function. Bryc's formula focuses on the existence of the limit~$\Lambda(f)$ and does not require to identify a rate function beforehand. We refer to the map~$\Lambda:C(\mathcal{S})\to\mathbb{R}$ as the \emph{rate transform} associated to $\{\mathrm{Q}_n\}_{n\in\mathbb{N}}$. By Varadhan's Lemma, we have \begin{equation*} \Lambda(f) = \sup_{x\in \mathcal{S}}\left[f(x)-\mathcal{I}(x)\right]. \end{equation*} \subsection{Large deviations of one-dimensional marginals} \label{BG:sec:LDP-1d} Here we show how Bryc's formula directly leads to a proof of large deviations of the one-dimensional time marginales. To recall the setting of Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}, we consider a sequence of Markov processes~$X^n$ with paths in~$\mathcal{X}=C_E[0,T]$, where~$E$ is a compact Polish space. For any~$t\in[0,T]$, the time marginal~$X^n(t)$ is a random variable in~$E$. We denote its distribution by~$\mathbb{P}^n_t\in\mathcal{P}(E)$. \smallskip Fix~$t\in[0,T]$. By Bryc's Formula, the sequence $\{X^n(t)\}_{n \in \mathbb{N}}$ satisfies a large deviation principle if for any $f\in C(E)$, the sequence \begin{equation*} \Lambda^n_t(f) := \frac{1}{n}\log \int_E e^{nf(y)}\,\mathbb{P}_t^n\left( \mathrm{d} y\right) \end{equation*} converges as $n$ tends to infinity. First, let us suppose that the initial condition is deterministic, that means $X^n(0) \sim \mathbb{P}^n_0 := \delta_{x_0}$ for some fixed~$x_0\in E$. \smallskip Let~$S_n$ be the semigroup corresponding to~$X^n$. For every $f\in B(E)$, we have by conditioning (e.g.~\cite[Proposition~4.1.6]{EthierKurtz1986} or~\cite[Definition~1.6]{Liggett2004}) \begin{equation}\label{BG:eq:setting:1d-distr-by-conditioning} \int_E f(y)\,\mathbb{P}_t^n\left( \mathrm{d} y\right) = \int_E S_n(t)f(x)\,\mathbb{P}_0^n\left( \mathrm{d} x\right). \end{equation} Therefore \begin{equation}\label{BG:eq:Vn-condition-to-P0} \int_E e^{n f(y)}\,\mathbb{P}^n_t\left( \mathrm{d} y\right) \overset{\eqref{BG:eq:setting:1d-distr-by-conditioning}}{=} \int_E S_n(t) e^{nf(x)}\,\mathbb{P}^n_0( \mathrm{d} x) \stackrel{\mathclap{\text{def}}}{=} \int_E e^{n V_n(t)f(x)}\,\mathbb{P}^n_0\left( \mathrm{d} x\right). \end{equation} Hence using~$\mathbb{P}^n_0=\delta_{x_0}$, we find \begin{align*} \Lambda_t^n(f)&\stackrel{\mathclap{\text{def}}}{=} \frac{1}{n}\log \int_E e^{nf(y)}\,\mathbb{P}_t^n\left( \mathrm{d} y\right) \overset{\eqref{BG:eq:Vn-condition-to-P0}}{=} \frac{1}{n}\log \int_E e^{nV_n(t)f(x)}\,\mathbb{P}_0^n( \mathrm{d} x) \\ &=\frac{1}{n}\log e^{nV_n(t)f(x_0)}= V_n(t)f(x_0). \end{align*} This is how the semigroups~$V_n(t)$ arise directly from Bryc's formula. Recall that we assume the convergence~$V_n(t)\to V(t)$ as~$n\to\infty$. Hence with the special initial condition~$\mathbb{P}_0^n=\delta_{x_0}$, the rate transform~$\Lambda(f)$ from~\eqref{BG:eq:rate-transform} is \begin{equation*} \Lambda(f) = V(t)f(x_0). \end{equation*} By Bryc's formula~\eqref{BG:eq:Brycs-formula}, the rate function $\mathcal{I}_t(\cdot|x_0) : E \to [0,\infty]$ takes the form \begin{equation*} \mathcal{I}_t(x|x_0) = \sup_{f\in C(E)} \left[f(x) - V(t)f(x_0)\right]. \end{equation*} This is the conditional rate function introduced in~\eqref{BG:eq:RF-1d-marginals}. We just proved that the conditional probability measures \begin{equation*} A\mapsto P_n(t,x_0,A) = \mathbb{P}\left(X^n(t)\in A\,|\,X^n(0)=x_0\right) \end{equation*} satisfy a large deviation principle with rate function~$\mathcal{I}_t(\cdot|x_0)$. \smallskip Both the fact that we only need convergence of $V_n(t)f$ at the point $x_0$ and that the limit $\Lambda(f)$ depends on $x_0$ are an artefact of the special form of the initial distribution, $X^n(0) \sim \delta_{x_0}$. \begin{proposition}\label{prop:LDP-1d-compact:semigroup} Let~$t\in[0,T]$. Under the conditions of Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}, the sequence of one-dimensional time marginals $\{X^n(t)\}_{n\in\mathbb{N}}$ satisfies a large deviation principle in~$E$ with rate function $\mathcal{I}_t:E\to[0,\infty]$ given by \begin{equation*} \mathcal{I}_t(x) = \sup_{f\in C(E)}\left\{f(x)-\Lambda_0\left[V(t)f\right]\right\}, \end{equation*} where $\Lambda_0$ is the rate transform~\eqref{BG:eq:rate-transform} associated to the initial conditions~$\{X^n(0)\}$. \end{proposition} \begin{proof}[Proof of Proposition~\ref{prop:LDP-1d-compact:semigroup}] Let~$\mathbb{P}_t^n\in\mathcal{P}(E)$ be the distribution of~$X^n(t)$. If for any function~$f\in C(E)$ the rate transform \begin{equation*} \Lambda_t(f) := \lim_{n\to\infty}\frac{1}{n}\log\int_E e^{n f(y)}\,\mathbb{P}^n_t\left( \mathrm{d} y\right) \end{equation*} exists, then by Bryc's formula,~$\{X^n(t)\}$ satisfies a large deviation principle with rate function~$\mathcal{I}_t:E\to[0,\infty]$ given by \begin{equation*} \mathcal{I}_t(x) = \sup_{f\in C(E)}\left[f(x)-\Lambda_t(f)\right]. \end{equation*} Since the initial conditions~$\{X^n(0)\}$ satisfy large deviations, the rate transform \begin{equation*} \Lambda_0(g):= \lim_{n\to\infty} \frac{1}{n}\log\int_E e^{ng(y)}\,\mathbb{P}^n_0\left( \mathrm{d} y\right),\quad g\in C(E), \end{equation*} exists by Varadhan's Lemma. Hence we can prove the Proposition by showing that~$\Lambda_t(f)$ is equal to~$\Lambda_0\left[V(t)f\right]$. Let~$f\in C(E)$. Then \begin{align*} \int_E e^{n f(y)}\,\mathbb{P}^n_t\left( \mathrm{d} y\right) \overset{\eqref{BG:eq:Vn-condition-to-P0}}{=} \int_Ee^{n V_n(t)f(x)}\,\mathbb{P}^n_0\left( \mathrm{d} x\right). \end{align*} The functions~$h_n:=V_n(t)f\in B(E)$ converge by assumption uniformly to the function~$h:=V(t)f\in C(E)$. The map $g\mapsto \Lambda_0^n(g) := \frac{1}{n}\log\int_E e^{ng(x)}\,\mathbb{P}_0^n\left( \mathrm{d} x\right)$ is well-defined on~$B(E)$ and satisfies the bounds \begin{equation*} -\|h-h_n\|_E + \Lambda_0^n(h) \leq \Lambda_0^n(h_n) \leq \Lambda_0^n(h) + \|h-h_n\|_E. \end{equation*} Now the equality $\Lambda_t(f) = \Lambda_0\left[V(t)f\right]$ follows by taking the limit~$n\to\infty$. This last step requires the limit $V(t)f$ to be a continuous function on~$E$, since Varadhan's Lemma a priori only guarantees the rate transform~$\Lambda_0$ on continuous functions. \end{proof} \begin{running_example*}[Small diffusion] We illustrate the above result for the process $ \mathrm{d} X^n_t=n^{-1/2} \mathrm{d} B_t$ on~$E=\mathbb{R}$, ignoring for the moment the fact that~$\mathbb{R}$ is not compact. The transition probabilities~$P_n(t,x, \mathrm{d} y)$ are explictly known, \begin{equation*} P_n(t,x, \mathrm{d} y) = \sqrt{\frac{n}{2\pi t}} \exp\{-n(y-x)^2/2t\}\, \mathrm{d} y. \end{equation*} Hence the nonlinear semigroups are \[ V_n(t)f(x) = \frac{1}{n}\log\left(\int_\mathbb{R}\exp\left\{n\left[f(y)-\frac{1}{2t}(y-x)^2\right]\right\}\, \mathrm{d} y\right) + \frac{1}{n}\log\left(\sqrt{\frac{n}{2\pi t}}\,\right). \] The second term vanishes in the limit $n\to\infty$. In the integral term, the highest value dominates in the limit, which gives \[ V(t)f(x) \stackrel{\mathclap{\text{def}}}{=} \lim_{n\to\infty} V_n(t)f(x) = \sup_{z\in\mathbb{R}}\left[f(z)-\frac{1}{2t}(z-x)^2\right]. \] This expression is the well-known Hopf-Lax formula. Thus~$X^n(t)$ conditioned to~$X^n(0)=x$ satisfies a large deviation principle with rate function \begin{align*} \mathcal{I}_t(y|x) &= \sup_{f\in C_b(\mathbb{R})}\left[f(y) - V(t)f(x)\right] \end{align*} Inserting~$V(t)$ and evaluating, we find by proving two inequalities that \begin{align*} \mathcal{I}_t(y|x) &= \sup_{f\in C_b(\mathbb{R})}\inf_{z\in\mathbb{R}}\left[f(y)-f(z)+\frac{1}{2t}(z-x)^2\right] = \frac{1}{2t}(y-x)^2. \end{align*} This confirms what we can readily see from the transition probabilites. \end{running_example*} \subsection{Large deviations of finite-dimensional marginals} We first consider two-dimensional time marginals $\{(X^n(t_1),X^n(t_2))\}$ for some fixed $t_2>t_1\geq 0$. To that end, denote the distribution of~$(X^n(t_1),X^n(t_2))$ by~$\mathbb{P}^n_{t_1t_2}\in\mathcal{P}(E\times E)$. We copy the strategy of one-dimensional marginals based on Bryc's formula: for proving large deviations of~$\{(X^n(t_1),X^n(t_2))\}_{n\in\mathbb{N}}$, it is sufficient to prove for any $f\in C(E\times E)$ the existence of the following limit: \begin{equation*} \Lambda_{t_1t_2}\left(f\right) := \lim_{n\to\infty}\frac{1}{n}\log\int_{E\times E}e^{n f(x,y)}\,\mathbb{P}^n_{t_1t_2}\left( \mathrm{d} x \mathrm{d} y\right). \end{equation*} We would like to use conditioning in order to reduce this convergence problem to convergence of the nonlinear semigroups~$V_n(t)$, as in the proof regarding one-dimensional marginals. To that end, we would like to consider only functions of the form $f_{12}(y,z) = f_1(y)+f_2(z)$, with~$f_1,f_2\in C(E)$. The fact that proving convergence for functions of this form is sufficient is the content of the following Lemma. It can be seen as strengthening Bryc's formula for Cartesian products. To shorten the presentation, we just indicate below where to find the proof. \begin{lemma}[Considering sums is sufficient]\label{lemma:LDP-multidim-distr:sums-are-good} Let~$\mathcal{S}_1,\mathcal{S}_2$ be a compact Polish spaces and $\{\mathrm{P}_n\}_{n\in\mathbb{N}}$ be a sequence of probability measures on~$\mathcal{S}_1\times \mathcal{S}_2$. For~$f_1\in C(\mathcal{S}_1)$ and $f_2\in C(\mathcal{S}_2)$, we write~$f_{12}\in C\left(\mathcal{S}_1\times \mathcal{S}_2\right)$ for the function~$f_{12}(y,z):=f_1(y)+f_2(z)$. Suppose that for any~$f_1,f_2$, the rate transform \[ \Lambda(f_{12}) := \lim_{n\to\infty}\frac{1}{n}\log\int_{\mathcal{S}_1\times\mathcal{S}_2}e^{nf_1(y) + nf_2(z)}\,\mathrm{P}_n\left( \mathrm{d} y \mathrm{d} z\right) \] exists. Then the family $\left\{\mathrm{P}_n\right\}_{n\in\mathbb{N}}$ satisfies a large deviation principle with rate function $\mathcal{I}:\mathcal{S}_1\times \mathcal{S}_2\to[0,\infty]$ given by \[ \mathcal{I}(y,z) = \sup_{\substack{f_1\in C(\mathcal{S}_1)\\ f_2\in C(\mathcal{S}_2)}}\left[f_1(y) + f_2(z) - \Lambda(f_{12})\right]. \] \end{lemma} \begin{proof}[Sketch of proof of Lemma~\ref{lemma:LDP-multidim-distr:sums-are-good}] If two subsets of functions $D_1\subseteq C(\mathcal{S}_1)$ and~$D_2\subseteq C(\mathcal{S}_2)$ are bounded above and isolates points, then the set of functions on $\mathcal{S}_1\times \mathcal{S}_2$ defined by $D_{12}:=\{f_1+f_2\,|f_1\in D_1,f_2\in D_2\}$ is bounded above and isolates points~\cite[Lemma~3.22]{FengKurtz2006}. Hence by Proposition~3.20 of~\cite{FengKurtz2006}, the set $F_{12}:=\{f_1+f_2\,:\,f_1\in C(\mathcal{S}_1),\,f_2\in C(\mathcal{S}_2)\}\subseteq C(\mathcal{S}_1\times\mathcal{S}_2)$ contains a set that is bounded above and isolates points. Therefore~$F_{12}$ is rate-function determining in the sense of Definition~3.15 of~\cite{FengKurtz2006}. \end{proof} \begin{proposition}\label{prop:LDP-multidim-compact:semigroup} Let~$0<t_1<t_2\leq T$. Under the conditions of Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}, the sequence of two-dimensional time marginals $\{\left(X^n(t_1),X^n(t_2)\right)\}_{n\in\mathbb{N}}$ satisfies a large deviation principle with rate function $\mathcal{I}_{t_1t_2}:E\times E\to[0,\infty]$ given by \begin{equation*} \mathcal{I}_{t_1t_2}(y,z) = \sup_{f_1,f_2\in C(E)}\left\{f_1(y)+f_2(z)-\Lambda_0\left[V(t_1)\left(f_1 + V(t_2-t_1)f_2\right)\right]\right\}. \end{equation*} \end{proposition} \begin{proof}[Proof of Proposition~\ref{prop:LDP-multidim-compact:semigroup}] Let~$\mathbb{P}_{t_1t_2}^n$ be the distribution of~$(X^n(t_1),X^n(t_2))$. We know by Lemma~\ref{lemma:LDP-multidim-distr:sums-are-good}, if for any function of the form~$f_{12}(y,z) := f_1(y) + f_2(z)$ with functions~$f_1,f_2\in C(E)$ the rate transform \begin{equation*} \Lambda_{t_1t_2}\left(f_{12}\right) := \lim_{n\to\infty}\frac{1}{n}\log\int_{E\times E}e^{nf_{12}(y,z)}\,\mathbb{P}^n_{t_1t_2}\left( \mathrm{d} y \mathrm{d} z\right) \end{equation*} exists, then the large deviation principle holds with rate function \begin{equation*} \mathcal{I}_{t_1t_2}(y,z) = \sup_{f_1, f_2 \in C(E)}\left\{f_1(y) + f_2(z) - \Lambda_{t_1t_2}\left[f_{12}\right]\right\}. \end{equation*} The initial conditions~$\{X^n(0)\}$ satisfy a large deviation principle by assumption. Hence by Varadhan's Lemma, for any~$g\in C(E)$ the rate transform \begin{equation*} \Lambda_0(g):= \lim_{n\to\infty} \frac{1}{n}\log\int_E e^{ng(y)}\,\mathbb{P}^n_0\left( \mathrm{d} y\right) \end{equation*} exists. We have~$V(t_1)(f_1+V(t_2-t_1)f_2)\in C(E)$ since~$V(t)$ is a map from~$C(E)$ to~$C(E)$. Therefore, the proposition follows if we prove \begin{equation*} \Lambda_{t_1t_2}\left[f_{12}\right]=\Lambda_0\left[V(t_1)\left(f_1+V(t_2-t_1)f_2\right)\right]. \end{equation*} As in the proof of one-dimensional distributions, we condition to earlier times (\cite[Proposition~4.1.6]{EthierKurtz1986}), and find \begin{align*} \int_{E\times E}e^{n (f_1(y)+f_2(z))}\,\mathbb{P}_{t_1t_2}^n\left( \mathrm{d} y \mathrm{d} z\right) &= \int_E e^{n (f_1(y) + V_n(t_2-t_1)f_2(y))}\,\mathbb{P}_{t_1}^n( \mathrm{d} y)\\ &= \int_E e^{n V_n(t_1)\left[f_1 + V_n(t_2-t_1)f_2\right](x)}\,\mathbb{P}_0^n\left( \mathrm{d} x\right). \end{align*} By the convergence assumption on the nonlinear semigroups $V_n(t)$, \begin{equation*} f_1 + V_n(t_2-t_1)f_2 \xrightarrow{n\to\infty} f_1 + V(t_2-t_1)f_2 \end{equation*} uniformly on $E$. Hence again by the convergence assumption, \begin{equation*} h_n:= V_n(t_1)\left[f_1 + V_n(t_2-t_1)f_2\right] \xrightarrow{n\to\infty} h:=V(t_1)\left[f_1 + V(t_2-t_1)f_2\right]. \end{equation*} The map $g\mapsto \Lambda_0^n(g) := \frac{1}{n}\log\int_E e^{ng(x)}\,\mathbb{P}_0^n\left( \mathrm{d} x\right)$ is well-defined on~$B(E)$ and satisfies the bounds \begin{equation*} -\|h-h_n\|_E + \Lambda_0^n(h) \leq \Lambda_0^n(h_n) \leq \Lambda_0^n(h) + \|h-h_n\|_E, \end{equation*} and the desired equality follows by taking the limit~$n\to\infty$. \end{proof} The convergence condition on the nonlinear semigroups $V_n(t)$ is sufficient for iterating to finite-dimensional marginals $\left(X^n(t_1),\dots,X^n(t_k)\right)$. The rate function is then given by \begin{equation} \label{eq:LDP-semigroup-multidim:RF-multidim} \mathcal{I}_{t_1\dots t_k}(x_1,\dots,x_k) = \sup_{f_1\dots f_k \in C(E)}\left\{\sum_i f_i(x_i)-\Lambda_{t_1\dots t_k}\left[f_1,\dots,f_k\right]\right\}, \end{equation} where the rate transform $\Lambda_{t_1\dots t_k}$ includes concatinations of the limiting map~$V(t)$, \[ \Lambda_{t_1\dots t_k}\left[f_1,\dots,f_k\right] = \Lambda_0\left[V(t_1)\left(f_1 + V(t_2-t_1)(f_2+\dots+V(t_k-t_{k-1})f_k)\dots))\right)\right]. \] \subsection{Conditional structure of the rate function} In this section, we show how to cast the rate function for finite-dimensional distributions from~\eqref{eq:LDP-semigroup-multidim:RF-multidim} into the more convenient form~\eqref{eq:prop:condtional-RF-finite-dim-marginals} given below. \begin{proposition}[]\label{prop:LDP-semigroups:conditional-RF} For $t_k>t_{k-1}>\dots>t_1> = 0$, consider the rate function $\mathcal{I}_{t_1\dots t_k}:E^k\to[0,\infty]$ of finite-dimensional time-marginals $\left\{X^n(t_1),\dots,X^n(t_k)\right\}_{n\in\mathbb{N}}$ given by~\eqref{eq:LDP-semigroup-multidim:RF-multidim}. Then \begin{equation}\label{eq:prop:condtional-RF-finite-dim-marginals} \mathcal{I}_{t_1\dots t_k}(x_1,\dots,x_k) = \mathcal{I}_{t_1}(x_1) + \mathcal{I}_{t_2-t_1}(x_2|x_1) + \dots + \mathcal{I}_{t_k-t_{k-1}}(x_{k}|x_{k-1}), \end{equation} where $\mathcal{I}_{t}$ is the rate function for $X^n(t_1)$ and the conditional rate functions $\mathcal{I}_{t}(z|y)$ are \begin{equation}\label{eq:LDP-semigroups:conditional-RF} \mathcal{I}_t(z|y) = \sup_{f\in C(E)}\left[f(z)-V(t)f(y)\right]. \end{equation} \end{proposition} \begin{proof}[Proof of Proposition~\ref{prop:LDP-semigroups:conditional-RF}] We consider the case $k=2$. Then \[ \mathcal{I}_{t_1t_2}(x_1,x_2) = \sup_{f_1,f_2 \in C(E)}\left\{\,f_1(x_1)+f_2(x_2)-\Lambda_0\left[V(t_1)\left(f_1+V(t_2-t_1)f_2\right)\right]\,\right\}. \] Concatinating the supremum and adding zero, we obtain \begin{multline*} \mathcal{I}_{t_1t_2}(x_1,x_2) = \sup_{f_2\in C(E)}\bigg[ f_2(x_2) - V(t_2-t_1)f_2(x_1) \\ +\sup_{f_1\in C(E)}f_1(x_1) + V(t_2-t_1)f_2(x_1) - \Lambda_0\left[V(t_1)\left(f_1+V(t_2-t_1)f_2\right)\right] \bigg]. \end{multline*} Since $V(t):C(E)\to C(E)$, we may shift in the second supremum to functions of the form $f_1 = g_1 - V(t_2-t_1)f_2$, with $g_1\in C(E)$, to obtain \begin{align*} \mathcal{I}_{t_1t_2}(x_1,x_2) &= \sup_{f_2}\left[ f_2(x_2) - V(t_2-t_1)f_2(x_1)\right] + \sup_{g_1}\left[g_1(x_1)-\Lambda_0\left[V(t_1)g_1\right]\right]\\ &\stackrel{\mathclap{\text{def}}}{=} \mathcal{I}_{t_2-t_1}\left(x_2|x_1\right) + \mathcal{I}_{t_1}(x_1). \end{align*} This finishes the proof for $k=2$. Similarly, we obtain for $k=3$ \begin{align*} \mathcal{I}_{t_1t_2t_3}(x_1,x_2,x_3) &= \mathcal{I}_{t_3-t_2}(x_3|x_2) + \mathcal{I}_{t_1t_2}(x_1,x_2). \end{align*} The general case follows by induction. \end{proof} Proposition~\ref{prop:LDP-semigroups:conditional-RF} represents the fact that for a Markov process $X^n$, the time marginals such as~$X^n(t_1)$ and~$X^n(t_2)$ for~$t_1<t_2$ are in general not independent, but correlated. From the large deviation principles \[ \mathbb{P}\left[X^n(t_1)\approx x_1\right]\sim e^{-n \mathcal{I}_{t_1}(x_1)}\quad\text{and}\quad \mathbb{P}\left[X^n(t_2)\approx x_2\right]\sim e^{-n \mathcal{I}_{t_2}(x_2)}, \] we can not conclude the large deviation principle of the pair~$(X^n(t_1),X^n(t_2)$ as \[ \mathbb{P}\left[X^n(t_1)\approx x_1,X^n(t_2)\approx x_2\right] \overset{?}{\sim} e^{-n \left[\mathcal{I}_{t_1}(x_1)+\mathcal{I}_{t_2}(x_2)\right]}. \] Rather, the rate functions reflect the fact that the event $X^n(t_1)\approx x_1$ takes place before the event $X^n(t_2)\approx x_2$. This condition appears in the rate function~$\mathcal{I}_{t_1t_2}$ of the joint event: \[ \mathbb{P}\left[X^n(t_1)\approx x_1,X^n(t_2)\approx x_2\right]\sim e^{-n\left[\mathcal{I}_{t_1}(x_1) + \mathcal{I}_{t_2-t_1}(x_2|x_1)\right]}. \] \begin{running_example*}[Small diffusion] Let $E=\mathbb{R}$ and $ \mathrm{d} X^n_t = n^{-1/2} \mathrm{d} B_t$, and suppose $X^n(0)=x_0$. Again we ignore that~$\mathbb{R}$ is not compact. We find \begin{equation*} \mathbb{P}\left[X^n(t_1)\approx x_1,X^n(t_2)\approx x_2\right] \sim e^{-n \left[\mathcal{I}_{t_1}(x_1) + \mathcal{I}_{t_2-t_1}(x_2|x_1)\right]}, \end{equation*} where we already computed $\mathcal{I}_t(x_2|x_1) = (x_2-x_1)^2/2t$. Since the process starts at~$x_0$, we have $\mathcal{I}_{t_1}(x_1)=(x_1-x_0)^2/2t$. For a partition~$0=t_0<t_1<\dots t_k= T$ of the time interval~$[0,T]$, \begin{equation*} \mathbb{P}\left[X^n(t_1)\approx x_1,\dots,X^n(t_k)\approx x_k\right]\sim \exp\{-n \cdot \mathcal{I}_{t_1\dots t_k}(x_1,\dots,x_k)\}, \quad n\to\infty. \end{equation*} Suppose~$t_i-t_{i-1}\approx \Delta t>0$ is small. Then massaging the rate function a bit, \begin{align*} \mathcal{I}_{t_1\dots t_k}(x_1,\dots,x_k) &\overset{\eqref{eq:prop:condtional-RF-finite-dim-marginals}}{=} \mathcal{I}_{t_1}(x_1) + \mathcal{I}_{t_2-t_1}(x_2|x_1) + \dots + \mathcal{I}_{t_k-t_{k-1}}(x_{k}|x_{k-1})\\ &= \frac{1}{2}\frac{(x_1-x_0)^2}{(t_1-t_0)} + \frac{1}{2} \frac{(x_2-x_1)^2}{(t_2-t_1)} + \dots + \frac{1}{2} \frac{(x_k-x_{k-1})^2}{(t_k-t_{k-1})}\\ &\approx \frac{1}{2} \sum_{i=1}^k \left(\frac{x_{i}-x_{i-1}}{t_i-t_{i-1}}\right)^2 \Delta t. \end{align*} Hence with a fine partition and regarding the points~$x_i$ as corresponding to a path~$x:[0,T]\to E$ via~$x_i=x(t_i)$, we expect \begin{equation} \mathcal{I}_{t_1\dots t_k}(x_1,\dots,x_k) \overset{k\gg 1}{\approx} \int_0^T \frac{1}{2} (\partial_t x(t))^2\, \mathrm{d} t. \end{equation} The rigorous version of this derivation is Schilder's Theorem, and we will prove the corresponding rigorous statement further below. This small calculation is based on the explicit formula for the conditional rate functions. In general, we will be able to obtain something like \begin{equation*} \mathcal{I}_{t_1\dots t_k}(x_1,\dots,x_k) \overset{k\gg 1}{\approx} \int_0^T \mathcal{L}(\partial_t x(t))\, \mathrm{d} t,\quad \mathcal{L}(\cdot)\;\text{convex}. \end{equation*} We provide more details in Section~\ref{BG:sec:semigroup-flow-HJ-eq} below. \end{running_example*} \section{Large deviations via convergence of generators} \label{sec:LDP-via-generators} In the previous section, we introduced in Definition~\ref{def:nonlinear-semigroups} the nonlinear semigroups $V_n(t)$ associated to a Markov process $X^n$ with paths in~$\mathcal{X}=C_E[0,T]$. We summarized the main preliminary result in Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}, which identifies two conditions for proving pathwise large deviation principles: \begin{enumerate}[label=(\roman*)] \item The sequence~$\{X^n\}_{n\in\mathbb{N}}$ is exponentially tight. \item The semigroups $V_n(t)|_{t\geq 0}$ converge to a semigroup $V(t)|_{t\geq 0}$. \end{enumerate} We say that Theorem~\ref{thm:LDP-via-semigroup-convergence:compact} is preliminary for a couple of reasons: \begin{enumerate}[$\bullet$] \item Verifying exponential tightness is a nasty and unfortunate task that we would like to avoid carrying out on a case-by-case analysis. \item Typically, the nonlinear semigroups $V_n(t)$ are not computable, and it is hard to even \emph{identify} a possible limit candidate $V(t)$ in the first place, yet proving convergence. \item The formula~\eqref{eq:RF-with-semigroup-approach} for the rate function is complicated. Even a simple question like "what is its minimizer?" is hard to answer. \end{enumerate} In this section, we answer the second key question from Section~\ref{BG:sec:math-gem}: how can we verify the convergence of semigroups from convergence of generators? To that end, let us turn to the recipe of semigroup convergence as outlined in Example~\ref{ex:semigroups-are-exponentials} above: we want to identify the generator~$H_n=(d/dt)V_n(0)$ and then identify a suitable limit~$H=\lim_n H_n$. Finally, we hope to conclude the semigroup convergence~$V_n\to V$. We start with deriving~$H_n$. \smallskip For a Markov process with semigroup~$S(t)$, the generator~$L$ is a linear operator characterizing the infinitesimal time evolution by \begin{equation*} S(t+\Delta t)f(x) = \mathbb{E}\left[f(X(t+\Delta t))|X(t)=x\right] = f(x) + Lf(x) \Delta t + \mathcal{O}(\Delta t^2). \end{equation*} \begin{definition}[Infinitesimal generator] \label{BG:def:infinitesimal-generator} Consider a strongly continuous contraction semigroup $S(t):C(E)\to C(E)$. Its corresponding \emph{infinitesimal generator} $L$ is a linear operator $L:\mathcal{D}(L)\subseteq C(E)\to C(E)$, where for any~$f\in C(E)$, if there is some~$g\in C(E)$ such that uniformly on~$E$, \[ g = \lim_{t\to 0}\frac{1}{t}\left(S(t)f-f\right), \] then $f\in \mathcal{D}(L)$ and $Lf:= g$. \qed \end{definition} We consider a Markov process~$X^n\in C_E[0,T]$ with corresponding transition probabilities~$P_n(t,x, \mathrm{d} y)$ and linear semigroup $S_n(t)f(x) := \int_Ef(y)P_n(t,x, \mathrm{d} y)$. Let~$L_n$ be its infinitesimal generator. For any function~$f\in\mathcal{D}(L)$, \begin{equation*} L_n f = \frac{ \mathrm{d}}{ \mathrm{d} t}\bigg|_0 S_n(t)f. \end{equation*} The nonlinear semigroups $V_n(t)$ from Definition~\ref{def:nonlinear-semigroups} are given by \begin{equation*} V_n(t)f(x) = \frac{1}{n}\log S_n(t)e^{nf(\cdot)}|_x. \end{equation*} Taking the time derivative and evaluating at zero, the chainrule formally yields \begin{align*} \frac{ \mathrm{d}}{ \mathrm{d} t}\bigg|_{t=0} V_n(t)f(x) &= \frac{1}{n}\frac{1}{S_n(0)e^{nf(\cdot)}|_x}\frac{ \mathrm{d}}{ \mathrm{d} t}\bigg|_{t=0}S_n(t)e^{nf(\cdot)}|_x\\ &= \frac{1}{n}e^{-nf(x)}L_n e^{nf(x)}. \end{align*} This suggests the operators~$H_nf := n^{-1}e^{-nf}L_n e^{nf}$ are the generators of~$V_n(t)$. \begin{running_example*} Let~$E=\mathbb{R}$ and~$ \mathrm{d} X^n_t = n^{-1/2} \mathrm{d} B_t$. The linear generator is~$L_nf=(2n)^{-1}\Delta f$ with domain~$\mathcal{D}(L_n)=C_b^2(\mathbb{R})$. We find \begin{equation*} H_nf \stackrel{\mathclap{\text{def}}}{=} \frac{1}{n}e^{-nf}L_n e^{nf} = \frac{1}{2}\frac{1}{n}\Delta f + \frac{1}{2}|\nabla f|^2, \end{equation*} writing $\nabla f = f'$ and $\Delta f = f''$. \qed \end{running_example*} \begin{definition}[Nonlinear generators]\label{def:nonlinear-generators} Let~$E$ be a compact Polish space and let a linear operator~$L_n:\mathcal{D}(L_n)\subseteq C(E)\to C(E)$ be the generator of an $E$-valued Markov process. The corresponding \emph{nonlinear generator} $H_n$ is defined as the map \begin{equation}\label{BG:eq:nonlinear-generators} H_nf (x):= \frac{1}{n}e^{-nf(x)}L_ne^{nf(\cdot)}(x), \end{equation} defined on the domain $\mathcal{D}(H_n):=\{f\,|\,e^{nf}\in\mathcal{D}(L_n)\}$. \qed \end{definition} Here, the operators~$H_n$ have to be understood as \emph{formal} generators of~$V_n(t)$. We only took the above calculation as a motivation, but do not claim the nonlinear generator to be a generator in the mathematically precise sense as for instance in the Hille-Yosida Theorem. Also in~\cite{FengKurtz2006} it is never claimed that we can make precise sense of $\frac{d}{dt}V_n(0)=H_n$. The formal calculations merely suggest that the limiting behaviour of~$H_n$ is closely related to the limiting behaviour of~$V_n(t)$. Jump processes form an important exception, where we will indeed find the relation~$\frac{d}{dt}V_n(0)=H_n$. \smallskip Equipped with Definition~\ref{def:nonlinear-generators}, we can tackle the task of deriving semigroup convergence from generator convergence. In Section~\ref{subsec:LDP-via-classical-sol}, we find conditions under which convergence of the nonlinear generators~$H_n$ to a limiting operator~$H$ implies large deviations (Theorem~\ref{thm:LDP-classical-sol}). The main ingredient of the proof of Theorem~\ref{thm:LDP-classical-sol} is a convergence statement that translates the Trotter-Kato approximation theorem for linear semigroups to the nonlinear setting. We call this convergence statement the Feng-Kurtz approximation theorem. In addition, we have to pose conditions on the limit~$H$ in order to construct a semigroup~$V(t)$ from it. Below the proof of Theorem~\ref{thm:LDP-classical-sol}, we illustrate with the running example which condition is hard to verify. \smallskip In Section~\ref{subsec:LDP-via-visc-sol}, we motivate the consideration of viscosity solutions. With this type of weak solutions, the conditions on the limit~$H$ are verifiable. The summarize this main result in Theorem~\ref{thm:LDP-visc-sol}, and we verify its conditions for the running example. \subsection{Using classical solutions}\label{subsec:LDP-via-classical-sol} The main point of this section is to show under which conditions convergence of generators implies the large deviation principle (Theorem~\ref{thm:LDP-classical-sol}). In the following definitions, nonlinear operators~$H$ acting on Banach spaces~$B$ are regarded as subsets of~$B\times B$. We denote by~$\overline{H}$ the closure of~$H$ with respect to the graph norm. For a Polish space~$E$, we will consider the Banach space~$B(E)$ of measurable bounded functions on~$E$, equipped with the supremum norm denoted by~$\|\cdot\|$. The following two properties are posing solvability conditions on an equation of the type~$(1-\tau H)f=h$ for a nonlinear operator~$H$, where~$\tau>0$ and~$h(x)$ are given and a solution~$f(x)$ in the domain of~$H$ is sought. We say~$f$ is a \emph{classical solution} if~$f\in\mathcal{D}(H)$ and~$(1-\tau H)f=h$. \begin{definition}[Dissipative operator] For a Polish space~$E$, a nonlinear operator $H\subseteq B(E)\times B(E)$ with domain $\mathcal{D}(H)$ is called \emph{dissipative} if for all $\tau>0$ and any $f_1,f_2\in\mathcal{D}(H)$, the following estimate is satisfied: \begin{align*} \|f_1-f_2\| \leq \|(f_1-\tau Hf_1) - (f_2-\tau Hf_2)\|. \tag*\qed \end{align*} \end{definition} Dissipativity corresponds to uniqueness of classical solutions. For $\tau>0$ and $h\in B(E)$, suppose two functions~$f_1,f_2\in\mathcal{D}(H)$ satisfy $(1-\tau H)f_1=h$ and $(1-\tau H)f_2=h$. If $H$ is a dissipative operator, then $\|f_1-f_2\| \leq 0$. \begin{definition}[Range condition]\label{def:range-condition} Let $E$ be a Polish space and let $H$ be a nonlinear operator $H\subseteq B(E)\times B(E)$ with domain $\mathcal{D}(H)$. We say that $H$ satisfies the \emph{range condition} if there exists a $\tau_0>0$ such that for all $0<\tau <\tau_0$, we have \begin{align*} \mathcal{D}(H) \subseteq \overline{\text{range}\left(1-\tau H\right)}. \tag*\qed \end{align*} \end{definition} The range condition corresponds to the existence of classical solutions. For dissipative operators, we have $\overline{\text{range}(1-\tau H)}=\text{range}(1-\tau \overline{H})$. If a dissipative operator $H$ satisfies the range condition, then for any $h\in\mathcal{D}(H)$ and $\tau>0$ sufficiently small, there exists a function $f\in\mathcal{D}(\overline{H})$ such that $(1-\tau \overline{H})f=h$. \begin{theorem}[{Crandall-Liggett,~\cite{CrandallLiggett1971}}] Let $E$ be a Polish space and let $H$ be a nonlinear operator $H\subseteq B(E)\times B(E)$ with domain $\mathcal{D}(H)$. Suppose that $H$ is dissipative and satisfies the range condition. Then for each $f\in \overline{\mathcal{D}(H)}$, the map \[ V(t)f := \lim_{k\to\infty}\left(1-\frac{t}{k}\overline{H}\right)^{-k}f \] exists and $\{V(t)\}_{t\geq 0}$ defines a contraction semigroup $V(t):\overline{\mathcal{D}(H)}\to \overline{\mathcal{D}(H)}$. \end{theorem} In Example~\ref{ex:semigroups-are-exponentials}, we considered semigroups taking values in~$\mathbb{C}$. In that context, given a generator~$g\in\mathbb{C}$, we can use different equivalent formulas of the exponential map to associate a continuous semigroup $T(t)=e^{tg}$ to it: \begin{equation*} T(t) := \sum_{k=0}^\infty \frac{1}{k!}(tg)^k\quad \text{or}\quad T(t) := \lim_{k\to\infty}\left(1-\frac{t}{k}\,g\right)^{-k}. \end{equation*} The first formula can be used in the context of linear semigroups whose generators are bounded operators (Hille-Yosida Theorem). The Crandall-Liggett Theorem is based on the second formula. For an operator~$H$ and~$\tau>0$, it uses the resolvent~$R(\tau) := \left(1-\tau H\right)^{-1}$ defined by finding a unique solution~$f$ to~$(1-\tau H)f=h$ for each given~$\tau>0$ and~$h\in C(E)$. Then~$V(t)=\lim_k R(t/k)^k$ serves as the rigorous version of~$V(t)=e^{tH}$. \smallskip If $E$ is compact and we work with $\mathcal{D}(H)\subseteq C(E)$ dense, then the associated semigroup consists of maps $V(t):C(E)\to C(E)$. The following Theorem is a simplification of Proposition~5.5 in~\cite{FengKurtz2006}. \begin{theorem}[Feng-Kurtz approximation]\label{thm:feng-kurtz-approx} Let~$E$ be a compact Polish space and let $G_n:B(E)\to B(E)$ and $H:\mathcal{D}(H)\subseteq C(E)\to C(E)$ be two dissipative operators that both satisfy the range condition with the same~$\tau_0$. Let~$V_n(t)$ and~$V(t)$ be the corresponding generated semigroups in the Crandall-Liggett sense. Suppose the following: \begin{enumerate}[label=(\roman*)] \item For each~$f\in\mathcal{D}(H)$, there exist~$f_n \in B(E)$ such that \[ \|f-f_n\|_E\xrightarrow{n\to\infty}0\quad\text{and}\quad \|Hf-G_nf_n\|_E\xrightarrow{n\to\infty}0. \] \end{enumerate} Then for any~$f\in\overline{\mathcal{D}(H)}$ and $f_n\in B(E)$ such that $\|f-f_n\|_E\to 0$, we have \begin{align*} \|V(t)f-V_n(t)f_n\|_E \xrightarrow{n\to\infty}0. \tag*\qed \end{align*} \end{theorem} We will apply the Feng-Kurtz approximation to operators~$G_n$ that are Hille-Yosida approximations of Markov generators. These Hille-Yosida approximations are generators of jump processes and satisfy the conditions of the Feng-Kurtz approximation theorem. A detailed discussion on their construction is given in~\cite[Section~IV.2]{EthierKurtz1986}. The fact that they are dissipative and satisfy the range condition is proven in~\cite[Lemma~5.7]{FengKurtz2006}. We now use Lemmas of~\cite[Chapter~5]{FengKurtz2006} to prove the following simplification of~\cite[Corollary~5.19]{FengKurtz2006}. \begin{theorem}[Large deviations via classical solutions]\label{thm:LDP-classical-sol} Let $E$ be a compact Polish space and for $n=1,2,\dots$, let $L_n:\mathcal{D}(L_n)\subseteq C(E)\to C(E)$ be the generator of an $E$-valued Markov process $X^n_t|_{t\geq 0}$ with continuous sample paths in~$\mathcal{X}=C_E[0,T]$. Let $H_n$ be the nonlinear generators~\eqref{BG:eq:nonlinear-generators}. Suppose the following: \begin{enumerate}[label=(\roman*)] \item \label{item:LDP-classical-sol:H-to-Hn}There exists a densely defined operator $H:\mathcal{D}(H)\subseteq C(E)\to C(E)$ such that for any $f\in \mathcal{D}(H)$, there are $f_n\in\mathcal{D}(H_n)$ satisfying \[ \|f-f_n\|_E\xrightarrow{n\to\infty}0 \quad \text{and}\quad \|Hf-H_nf_n\|_E \xrightarrow{n\to\infty}0. \] \item \label{item:LDP-classical-sol:range} The operator $H$ satisfies the range condition (Definition~\ref{def:range-condition}). \end{enumerate} Suppose furthermore that $X^n(0)$ satisfies the large deviation principle in~$E$ with rate function $\mathcal{I}_0:E\to[0,\infty]$. Then~$H$ satisfies the conditions of the Crandall-Liggett Theorem and hence generates a semigroup~$V(t)$, and the sequence $\{X^n\}_{n\in\mathbb{N}}$ satisfies the large deviation principle in $\mathcal{X}$ with a rate function $\mathcal{I}:\mathcal{X}\to[0,\infty]$ given by~\eqref{eq:RF-with-semigroup-approach}. \end{theorem} \begin{proof}[Sketch of proof of Theorem~\ref{thm:LDP-classical-sol}] We verify the conditions of Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}, according to which a large deviation principle of~$\{X^n\}$ follows from two conditions: exponential tightness and convergence of the nonlinear semigroups $V_n(t)$ to some limiting semigroup~$V(t):C(E)\to C(E)$. \smallskip Under the above convergence condition on the nonlinear generators~$H_n$, exponential tightness of~$\{X^n\}_{n\in\mathbb{N}}$ follows by~\cite[Corollary~4.17]{FengKurtz2006}. We do not give the details here, but comment briefly on why: (a) the exponential compact containment condition is always satisfied for compact spaces, (b) we can take $F=C(E)$ since $\mathcal{D}(H)$ is dense in~$C(E)$, and (c) exploits the fact that by the convergence condition $H_n\to H$, the sequences $H_nf_n$ are uniformly bounded. \smallskip We are left with showing that 1) we can define~$V(t)$ in terms of the limit operator~$H$ by means of the Crandall-Liggett Theorem and 2) that we obtain the semigroup-convergence $V_n(t)\to V(t)$ as specified in Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}. \smallskip 1) By assumption, the operator~$H$ satisfies the range condition, and we only need to verify dissipativity. To that end, we henceforth only work with the full generator of~$X^n$, the graph in~$B(E)\times B(E)$ defined as (see \cite[Section~1.1.5]{EthierKurtz1986}) \begin{equation*} \left\{\left(f,g\right)\in B(E)\times B(E)\,:\,\;\forall \,t,\, S_n(t)f-f=\int_0^tS_n(s)g\, \mathrm{d} s\right\}. \end{equation*} We will denote them as well by $L_n$, and their associated nonlinear generators as well by~$H_n$. The reason for considering the full generator is that by Proposition~5.1 in~\cite{EthierKurtz1986}, it is a linear dissipative operator with resolvent \begin{equation*} \left(\lambda - L_n\right)^{-1}h = \int_0^\infty e^{-\lambda t}S_n(t)h\, \mathrm{d} t. \end{equation*} Consider for $\varepsilon_n:=\exp\{-n^2\}$ the Hille-Yosida approximations $L_n^{\varepsilon_n}$ defined by \[ L_n^{\varepsilon_n} := L_n\left(1-\varepsilon_n L_n\right)^{-1}. \] The map~$L_n^{\varepsilon_n}:B(E)\to B(E)$ defines a bounded, linear and dissipative operator (\cite[Lemma~1.2.4]{EthierKurtz1986}) that generates a Markov jump process on~$E$. Define the associated nonlinear generators $H_n^{\varepsilon_n}:B(E)\to B(E)$ by \[ H_n^{\varepsilon_n}f:= \frac{1}{n}e^{-nf}L_n^{\varepsilon_n}e^{nf}. \] Then~$H_n^{\varepsilon_n}$ is dissipative~\cite[Lemma~5.7]{FengKurtz2006}. We prove below that our Assumption~\ref{item:LDP-classical-sol:H-to-Hn} on the convergence $H_n\to H$ implies that $H_n^{\varepsilon_n}\to H$ in the same sense. That establishes dissipativity of~$H$ as the limit of the dissipative operators~$H_n^{\varepsilon_n}$; for any $f_1,f_2\in \mathcal{D}(H)$, let $f_1^n,f_2^n\in B(E)$ be such that $f_1^n\to f_1$ and $f_2^n\to f_2$ uniformly on~$E$. Then using dissipativity of $H_n^{\varepsilon_n}$ and that the corresponding images converge uniformly, we find that \begin{align*} \|f_1-f_2\|_E &\leq \|f_1^n-f_2^n\|_E + o(1)_{n\to\infty}\\ &\leq \|\left(f_1^n-\tau H_n^{\varepsilon_n}f_1^n\right)-\left(f_2^n-\tau H_n^{\varepsilon_n}f_2^n\right)\|_E +o(1)_{n\to\infty}\\ &\leq \|\left(f_1-\tau Hf_1\right) - \left(f_2-\tau Hf_2\right)\|_E + o(1)_{n\to\infty}. \end{align*} Now taking the limit~$n\to\infty$ shows that~$H$ is dissipative. \smallskip We are left with verifying $H_n^{\varepsilon_n}\to H$. For~$f\in \mathcal{D}(H)$, let~$f_n\in\mathcal{D}(H_n)$ be such that $f_n\to f$ and $H_nf_n\to Hf$, both uniformly on~$E$. Then since~$H_nf_n$ is bounded, $n\varepsilon_nH_nf_n\to 0$ as~$n\to\infty$. Hence $e^{nf_n}(1-n\varepsilon_n \, H_nf_n) > 0$ eventually. We show that the functions~$f_n^{\varepsilon_n}$ defined by \[ e^{nf_n^{\varepsilon_n}} := e^{nf_n}\left(1-n\varepsilon_n H_n f_n\right) =\left(1-\varepsilon_n L_n\right) e^{nf_n} \] satisfy $f_n^{\varepsilon_n}\to f$ and $H_n^{\varepsilon_n}f_n^{\varepsilon_n}\to Hf$. The first convergence follows from the fact that~$f_n\to f$ and~$e^{n(f_n^{\varepsilon_n}-f_n)}\to 1$. We find by the definition of the Hille-Yosida approximants~$L_n^{\varepsilon_n}$ that \begin{align*} H_n^{\varepsilon_n}f_n^{\varepsilon_n} &= \frac{1}{n} e^{-nf_n^{\varepsilon_n}} L_n^{\varepsilon_n} (1-\varepsilon_nL_n) e^{nf_n}\\ &= e^{-nf_n^{\varepsilon_n}} \frac{1}{n}L_n e^{nf_n} = e^{n(f_n-f_n^{\varepsilon_n})} H_nf_n. \end{align*} Hence $H_n^{\varepsilon_n}f_n^{\varepsilon_n}\to Hf$ is implied by $H_nf_n\to Hf$. That finishes the proof of~1): the operator~$H$ is dissipative and satisfies the range condition, and hence generates a semigroup~$V(t)$. \smallskip 2) Since the operators $H_n^{\varepsilon_n}$ defined above are dissipative and satisfy the range condition (\cite[Lemma~5.7]{FengKurtz2006}), they generate a semigroup~$V_n^{\varepsilon_n}(t)$ acting on~$B(E)$. We showed above the convergence $H_n^{\varepsilon_n}\to H$. Hence by the Feng-Kurtz approximation (Theorem~\ref{thm:feng-kurtz-approx}) applied to $G_n=H_n^{\varepsilon_n}$, we obtain $V_n^{\varepsilon_n}(t)\to V(t)$: for any function $f\in C(E)$ and functions $f_n\in B(E)$ such that $\|f-f_n\|_E\to 0$, \[ \|V(t)f-V_n^{\varepsilon_n}(t)f_n\|_E \xrightarrow{n\to\infty}0. \] Furthermore, the semigroup~$V_n^{\varepsilon_n}(t)$ approximates~$V_n(t)$, in the sense that for any function $f_n\in\mathcal{D}(H_n)$, \begin{equation}\label{eq:Vn-close-to-Vn_varep} \|V_n^{\varepsilon_n}(t)f_n-V_n(t)f_n\| \leq \sqrt{2\varepsilon_n t}\, e^{2n\|f_n\|}\|H_nf_n\|, \end{equation} which is proven in~\cite[Lemma~5.11]{FengKurtz2006}. The choice $\varepsilon_n=\exp\{-n^2\}$ implies that the difference vanishes in the limit $n\to\infty$. With that, \begin{align*} \|V(t)f-V_n(t)f_n\| &\leq \|V(t)f-V_n^{\varepsilon_n}(t)f_n\| + \|V_n^{\varepsilon_n}(t)f_n-V_n(t)f_n\| \to 0, \end{align*} which finishes the proof. \end{proof} \begin{running_example*} We illustrate on the small-diffusion process which condition of Theorem~\ref{thm:LDP-classical-sol} is difficult to verify in practice. We consider the small-diffusion process on the flat torus~$E=\mathbb{T}=\mathbb{R}/\mathbb{Z}$; that means the infinitesimal generator is the map $L_n:C^2(\mathbb{T})\to C(\mathbb{T})$ given by \[ L_nf(x) = \frac{1}{2} \frac{1}{n} \Delta f(x). \] Therefore, the nonlinear generators~$H_n:C^2(\mathbb{T})\to C(\mathbb{T})$ read \[ H_nf(x) = \frac{1}{n} e^{-nf(x)}L_n e^{nf(x)} = \frac{1}{2}\frac{1}{n}\Delta f(x) + \frac{1}{2}|\nabla f(x)|^2. \] They converge to~$Hf(x) := \frac{1}{2}|\nabla f(x)|^2$. Indeed, if we take for instance the domain~$\mathcal{D}(H) := C^2(\mathbb{T})$, then for any~$f\in\mathcal{D}(H)$, the constant sequence~$f_n:=f$ satisfies \[ \|Hf-H_n f_n\|_\mathbb{T} =\frac{1}{2}\frac{1}{n} \|\Delta f\|_\mathbb{T} \to 0, \] with $\|\cdot\|_\mathbb{T}$ the supremum norm. We are only left with verifying the range condition for~$H$ in order to apply Theorem~\ref{thm:LDP-classical-sol}. The definition translates to the following PDE-problem: for a $C^2$ function $h:\mathbb{T}\to\mathbb{R}$ and for $\tau > 0$, find $u:\mathbb{T}\to\mathbb{R}$ in the domain of $H$ such that for any $x\in\mathbb{T}$, we have \[ u(x) - \tau \frac{1}{2}|\nabla u(x)|^2 = h(x). \] There is no general theory available providing the existence of such a solution. The problem lies in the differentiability that solutions have to satisfy. \qed \end{running_example*} Using viscosity solutions makes the semigroup approach to large deviations applicable. In the words of Jin Feng and Thomas Kurtz~\cite[Preface]{FengKurtz2006}: \smallskip \emph{"This work began as a research paper intended to show how the convergence of nonlinear semigroups associated with a sequence of Markov processes implied the large deviation principle for the sequence. We expected the result to be of little utility for specific applications, since classical convergence results for nonlinear semigroups involve hypotheses that are very difficult to verify, at least using classical methods. We should have recognized at the beginning that the modern theory of viscosity solutions provides the tools needed to overcome the classical difficulties."} \smallskip We sketch in the next section how the approach using viscosity solutions works out in the compact setting. \subsection{Using viscosity solutions} \label{subsec:LDP-via-visc-sol} In the previous section, we discussed how to verify the convergence of nonlinear semigroups $V_n$ from the convergence of associated formal nonlinear generators~$H_n$. The Feng-Kurtz approximation (Theorem~\ref{thm:feng-kurtz-approx}) was the key to obtain semigroup convergence from generator convergence. The example above illustrates that while finding a candidate limit~$H$ of the~$H_n$ is often straightforward, verifying the range condition for~$H$ is hard. We required the range condition to generate a semigroup by the Crandall-Liggett theorem. Here, we discuss why viscosity solutions are well suited for generating the desired limiting semigroup. \smallskip The basic idea is to use weak solutions~$u$ of~$(1-\tau H)u=h$ that are not required to be in the domain of~$H$. Then we define an auxiliary operator~$\widehat{H}$ by adding the weak solutions to the domain of~$H$ and the corresponding ranges to the image of~$H$. If the requirement on a solution is weak enough, we can find enough solutions until the domain~$\mathcal{D}(\widehat{H})$ is dense in~$C(E)$, such that the operator~$\widehat{H}$ automatically satisfies the range condition. However, we also want~$\widehat{H}$ to be a dissipative operator in order to use the Crandall-Liggett Theorem. The limit operators~$H$ that we start from are dissipative, which follows from the convergence~$H_n\to H$ (see the proof of Theorem~\ref{thm:LDP-classical-sol}). Therefore, we are searching for weak solutions such that we keep dissipativity while enlargening~$H$. \smallskip We now motivate why viscosity solutions are suited for that purpose. A generator~$L$ of a Markov process satisfies the positive maximum principle; for a function~$f$ in the domain of~$L$, if $x$ is a local maximum of~$f$, then $Lf(x)\leq 0$. This propery carries over to their nonlinear generators~$Hf=e^{-f}Le^f$, where we obtain that if $(f_1-f_2)(x)=\sup(f_1-f_2)$, then $Hf_1(x)- Hf_2(x)\leq 0$. In general, operators satisfying the positive maximum principle are dissipative. \smallskip Hence adding weak solutions such that the extended operator~$\widehat{H}$ still satisfies the positive maximum principle suffices for our purposes. Now given a "weak solution" $u$ to the equation $(1-\tau H)u=h$, consider the extended operator $\widehat{H} := H\cup \left(u,(u-h)/\tau\right)$; that is we added the weak solution and its corresponding image "$Hu$"$=(u-h)/\tau$ to the graph of~$H$. Let us see how the newly added elements affect the maximum principle. If $u$ is a weak solution and $(u-f)(x)=\sup(u-f)$, with~$f\in\mathcal{D}(H)$ such that~$\widehat{H}f=Hf$, then \begin{align*} (\widehat{H}u-\widehat{H}f)(x) &= \frac{1}{\tau}(u-h)(x) - Hf(x)\\ &= \frac{1}{\tau} \left[u(x)-\tau Hf(x)-h(x)\right] \stackrel{!}{\leq}0. \end{align*} When considering $(f-u)$, then $(f-u)(x)=\sup(f-u)$ should imply \begin{align*} (\widehat{H}f-\widehat{H}u)(x) &= Hf(x) -\frac{1}{\tau}(u-h)(x)\\ &= -\frac{1}{\tau} \left[u(x)-\tau Hf(x)-h(x)\right] \stackrel{!}{\leq}0. \end{align*} This motivates the following definition. \begin{definition}[Viscosity solutions]\label{def:viscosity-sol:beginner-guide} For a compact Polish space~$E$, let~$\tau > 0$ and~$h\in C(E)$. For an operator $H:\mathcal{D}(H)\subseteq C(E)\to C(E)$ with domain~$\mathcal{D}(H)$, consider the equation~$(1-\tau H)u=h$. \begin{enumerate}[label=(\roman*)] \item We say that a function~$u_1:E\to\mathbb{R}$ is a \emph{viscosity subsolution} if it is bounded, upper semicontinuous and for any function~$f\in\mathcal{D}(H)$, if a point~$x\in E$ is such that $(u_1-f)(x)=\sup_E(u_1-f)$, then \[ u_1(x)-\tau Hf(x)-h(x)\leq 0. \] \item We call a function~$u_2:E\to\mathbb{R}$ a \emph{viscosity supersolution} if it is bounded, lower semicontinuous and for any function~$f\in\mathcal{D}(H)$, if a point~$x\in E$ is such that $(f-u_2)(x)=\sup_E(f-u_2)$, then \[ u_2(x)-\tau Hf(x)-h(x)\geq 0. \] \item A function $u:E\to\mathbb{R}$ is a \emph{viscosity solution} if it is both a viscosity subsolution and a viscosity supersolution. \qed \end{enumerate} \end{definition} A viscosity solution in the sense of Definition~\ref{def:viscosity-sol:beginner-guide} is both upper- and lower semicontinuous, and hence continuous. \begin{definition}[Comparison principle] We say that $(1-\tau H)u=h$ as in Definition~\ref{def:viscosity-sol:beginner-guide} satisfies the \emph{comparison principle} if for any viscosity subsolution~$u_1$ and viscosity supersolution~$u_2$, the inequality $u_1\leq u_2$ holds on~$E$.\qed \end{definition} If the comparison principle holds, then any two viscosity solutions~$u,v$ are equal: since $u$ is a viscosity subsolution and~$v$ a viscosity supersolution,~$u\leq v$. Reversing the roles, we find $v\leq u$. Hence~$u=v$, and thus the comparison principle implies uniqueness of viscosity solutions. \smallskip We now formulate the viscosity-analogue of Theorem~\ref{thm:LDP-classical-sol}. For that purpose, we define for an operator $H:\mathcal{D}(H)\subseteq C(E)\to C(E)$ its extension~$\widehat{H}$ as follows. If for any~$\tau > 0$ and $h\in C(E)$ there exists a unique viscosity solution~$u$ of the equation~$(1-\tau H)u=h$, then we denote it by $R(\tau)h:=u$. The map~$R(\tau)$ is called the resolvent. We denote by~$\widehat{H}\subseteq C(E)\times C(E)$ the operator defined as the graph \[ \widehat{H} := \bigcup_{\tau > 0}\left\{\left(R(\tau)h,\frac{1}{\tau}(R(\tau)h-h)\right)\,:\,h \in C(E)\right\}. \] \begin{theorem}[Theorem~6.14 in~\cite{FengKurtz2006}, Large Deviations via Viscosity Solutions]\label{thm:LDP-visc-sol} Let~$E$ be a compact Polish space and~$\{X^n\}$ be a sequence of Markov processes in~$\mathcal{X}=C_E[0,T]$, with generators~$L_n$ and associated nonlinear generators~$H_n$ from Definition~\ref{def:nonlinear-generators}. Assume the following: \begin{enumerate}[label=(\roman*)] \item There is a densely defined operator $H:\mathcal{D}(H)\subseteq C(E) \to C(E)$ such that $H_n$ converges to~$H$; for every~$f\in\mathcal{D}(H)$, there are functions~$f_n\in\mathcal{D}(H_n)$ such that \[ \|f-f_n\|_E\xrightarrow{n\to\infty}0 \quad \text{and}\quad \|Hf-H_nf_n\|_E \xrightarrow{n\to\infty}0. \] \item For~$\tau>0$ and~$h\in C(E)$, the comparison principle holds for~$(1-\tau H)u=h$. \end{enumerate} Suppose furthermore that the initial conditions~$X^n(0)$ satisfy a large deviation principle with rate function~$\mathcal{I}_0$. Then the sequence~$\{X^n\}$ satsifies a large deviation principle in~$\mathcal{X}$ with a rate function~$\mathcal{I}$ given by~\eqref{eq:RF-with-semigroup-approach}, where the semigroup~$V(t)$ is generated by the operator~$\widehat{H}$: for every~$f\in C(E)$, we have~$V(t)f = \lim_{k\to\infty}[R(t/k)]^k f$. \end{theorem} \begin{proof}[Sketch of proof of Theorem~\ref{thm:LDP-visc-sol}] Just as in the previous section, we want to verify exponential tightness and convergence of the nonlinear semigroups~$V_n(t)$ to some limit~$V(t)$. Then the large-deviation statement follows from Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}. Exponential tightness follows from the convergence condition~$H_n\to H$, just as we indicated in the proof of Theorem~\ref{thm:LDP-classical-sol} in the previous section. \smallskip We are left with showing that the operator~$\widehat{H}$ satisfies the conditions of the Crandall-Liggett Theorem (dissipativity and the range condition) with dense domain, so that it generates a semigroup~$V(t)$ acting on~$C(E)$, and that we have convergence~$V_n(t)\to V(t)$ as in Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}. The argument is based on the same techinque as in Theorem~\ref{thm:LDP-classical-sol}: we use the Hille-Yosida approximations~$L_n^{\varepsilon_n}$ of~$L_n$ and their corresponding nonlinear generators~$H_n^{\varepsilon_n}$. \smallskip The operator~$\widehat{H}$ is defined via the existence of unique viscosity solutions. We first show that its domain is dense in~$C(E)$. To that end, fix~$\tau>0$ and a function~$h\in C(E)$. Since~$\text{range}(1-\tau H_n^{\varepsilon_n})=C(E)$ (\cite[Lemma~5.7]{FengKurtz2006}), there exists a classical solution~$f_n\in C(E)$ to~$(1-\tau H_n^{\varepsilon_n})f_n = h$. In particular,~$f_n$ is a viscosity solution. Define the functions~$u_1,u_2:E\to\mathbb{R}$ by \begin{align*} u_1(x)&:=\lim_{k\to\infty}\sup\left\{f_n(z)\,|\,n\geq k,\, d(x,z)\leq \frac{1}{k}\right\}\\ u_2(x)&:=\lim_{k\to\infty}\inf\left\{f_n(z)\,|\,n\geq k,\, d(x,z)\leq \frac{1}{k}\right\} \end{align*} It is shown in~\cite[Lemma~6.9]{FengKurtz2006} that~$u_1$ is a viscosity subsolution and~$u_2$ is a viscosity supersolution of~$(1-\tau H)u=h$. By construction, $u_1\geq u_2$. By assumption, the comparison principle holds, which gives~$u_1\leq u_2$. Hence the function $u:=u_1=u_2$ is the unique viscosity solution to~$(1-\tau H)u=h$. Define the resolvent map $R(\tau):C(E)\to C(E)$ by setting $R(\tau)h:=u$. Lemma~6.9 also establishes the estimate \[ \|u-f\|\leq \|h-(f-\tau Hf)\| \] for any~$f\in\mathcal{D}(H)$. Specializing to~$h$ in the domain of~$\mathcal{D}(H)$ and choosing in the estimate $f=h$, this implies \[ \|R(\tau)h-h\| \leq \tau \|Hh\| \xrightarrow{\tau \to 0} 0. \] That demonstrates $\mathcal{D}(H)\subseteq \overline{\mathcal{D}(\widehat{H})}$, and we conclude that~$\mathcal{D}(\widehat{H})$ is dense in~$C(E)$ since~$\mathcal{D}(H)$ is dense in~$C(E)$. \smallskip We showed in the proof of Theorem~\ref{thm:LDP-classical-sol} that the assumed convergence condition~$H_n\to H$ implies~$H_n^{\varepsilon_n}\to H$, and that the operator~$H$ is dissipative as the limit of the dissipative operators~$H_n^{\varepsilon_n}$. The fact that dissipativity transfers further to~$\widehat{H}$ is proven in~\cite[Theorem~6.13]{FengKurtz2006}, part~(c); the operators~$H_n$ appearing therein are the Hille-Yosida approximants~$H_n^{\varepsilon_n}$. The range condition on~$\widehat{H}$ is satisfied by construction. Now the fact that~$V(t)=\lim_k R(t/k)^k$ follows from the Feng-Kurtz approximation theorem. \end{proof} In summary, with introducing viscosity solutions, we weakened the requirement on a function being a solution. The existence of sub- and supersolutions is guaranteed as a consequence of the convergence $H_n\to H$. However, dissipativity of~$H$ is no longer sufficient for uniqueness of viscosity solutions. That is because viscosity solutions are in general not in the domain of~$H$, which breaks the argument shown below Definition~\ref{def:range-condition}. This contrasts the classical approach, where uniqueness of solutions is for free while existence of solutions remains open. We close this section by illustrating Theorem~\ref{thm:LDP-visc-sol}. \begin{running_example*} Consider the small-diffusion process $ \mathrm{d} X^n_t=n^{-1/2} \mathrm{d} B_t$ on the torus~$\mathbb{T}$. The linear generators are $L_nf = (2n)^{-1}\Delta f$, and \[ H_nf = \frac{1}{n}e^{-nf}L_n e^{nf} = \frac{1}{2}\frac{1}{n}\Delta f + \frac{1}{2}|\nabla f|^2. \] We already checked in the previous section that they converge to $Hf = \frac{1}{2}|\nabla f|^2$. Here, we can take for instance the domain~$\mathcal{D}(H)=C^{17}(\mathbb{T})$. \smallskip For applying Theorem~\ref{thm:LDP-visc-sol}, we must verify the comparison principle. To that end, fix~$\tau >0$ and~$h\in C(\mathbb{T})$, and let~$u_1$ be a vioscosity subsolution and~$u_2$ be a viscosity supersolution of $(1-\tau H)u=h$. We want to prove that $u_1\leq u_2$. For illustration, suppose first that they are classical sub- and supersolutions; they are in the domain of~$\mathcal{D}(H)$ and for any~$x\in \mathbb{T}$, \begin{align*} u_1(x)-\tau Hu_1(x) - h(x)\leq 0 \quad \text{and}\quad u_2(x)-\tau Hu_2(x)-h(x)\geq 0. \end{align*} Let $x_m$ be a point such that $(u_1-u_2)(x_m) = \sup_\mathbb{T}(u_1-u_2)$. Then we have $\nabla u_1(x_m)=\nabla u_2(x_m)$, and by the sub-and supersolution inequalities, we obtain \begin{align*} (u_1-u_2)(x) \leq (u_1-u_2)(x_m) &\leq Hu_1(x_m) - Hu_2(x_m) \\&= \frac{1}{2}\left(|\nabla u_1(x_m)|^2-|\nabla u_2(x_m)|^2\right) = 0. \end{align*} That shows uniqueness of classical solutions to~$(1-\tau H)u=h$. \smallskip For viscosity sub- and supersolutions, we can not rely on~$u_1,u_2$ being in the domain of~$H$. The classical trick is to use distance-like functions that are in the domain in order to approximate $\sup_\mathbb{T}(u_1-u_2)$. Here, we can take \[ \Psi(x,y) := \sin^2(\pi(x-y)). \] Then $\Psi(\cdot,y)$ and $\Psi(x,\cdot)$ are smooth on~$\mathbb{T}$, and hence in the domain~$\mathcal{D}(H)=C^{17}(\mathbb{T})$. For $\alpha>0$, define \[ \Phi_\alpha(x,y) := u_1(x)-u_2(y) - \alpha \Psi(x,y). \] By the semi-continuity properties of~$u_1,u_2$, for every~$\alpha>0$ there are~$x_\alpha,y_\alpha$ such that \[ \Phi_\alpha(x_\alpha,y_\alpha) = \sup_{x,y}\Phi_\alpha(x,y). \] The point is that since~$u_1,u_2$ are bounded, these maximizing points~$x_\alpha,y_\alpha$ will converge to each other as~$\alpha\to\infty$; indeed, observing that $\Phi_\alpha(x_\alpha,x_\alpha)\leq \Phi(x_\alpha,y_\alpha)$, we obtain \[ \Psi(x_\alpha,y_\alpha) \leq \frac{2}{\alpha}(u_2(x_\alpha)-u_2(y_\alpha)) \leq \frac{4}{\alpha}\|u_2\| \xrightarrow{\alpha\to\infty} 0. \] Since $\Psi(x,y)\geq 0$ and~$\Psi(x,y)=0$ if and only if $x=y$, we approximate the supremum of $(u_1-u_2)$ in the sense that $x_\alpha \approx y_\alpha$ and \begin{align*} \sup_{\mathbb{T}}(u_1-u_2) &= \sup_{x\in\mathbb{T}}\left(u_1(x)-u_2(x)-\alpha \Psi(x,x)\right)\\ &\leq \sup_{x,y}\Phi_\alpha(x,y) = \Phi_\alpha(x_\alpha,y_\alpha)\\ &\leq u_1(x_\alpha)-u_2(y_\alpha). \end{align*} Now we can use the sub- and supersolution inequalities. The test functions defined by \begin{align*} f_1^\alpha(x) := u_2(y_\alpha) + \alpha\Psi(x,y_\alpha)\quad\text{and}\quad f_2^\alpha(y):=u_1(x_\alpha) - \alpha\Psi(x_\alpha,y) \end{align*} are smooth, and hence are both in the domain of~$H$. By construction, \[ (u_1-f_1^\alpha)(x_\alpha) = \sup_\mathbb{T}(u_1-f_1^\alpha)\quad\text{and}\quad (f_2^\alpha-u_2)(y_\alpha) = \sup_{\mathbb{T}}(f_2^\alpha-u_2), \] so that with the sub- and supersolution inequalities, \begin{align*} u_1(x_\alpha)-\tau Hf_1^\alpha(x_\alpha)-h(x_\alpha)\leq 0\quad\text{and}\quad u_2(y_\alpha)-\tau Hf_2^\alpha(y_\alpha)-h(y_\alpha)\geq 0. \end{align*} With these, we can further estimate $u_1(x_\alpha)-u_2(y_\alpha)$ to arrive at \[ \sup_{\mathbb{T}}(u_1-u_2) \leq \tau \left[Hf_1^\alpha(x_\alpha)-Hf_2^\alpha(y_\alpha)\right] + h(x_\alpha)-h(y_\alpha). \] Since $Hf=(1/2) |\nabla f|^2$ depends only on the gradient and $\nabla f_1^\alpha(x_\alpha)=\nabla f_2^\alpha(y_\alpha)$, the difference of the Hamiltonians is zero. The function~$h$ is uniformly continuous on the compact space~$\mathbb{T}$. Then since $\Psi(x_\alpha,y_\alpha)\to 0$, we obtain finally \begin{align*} \sup_\mathbb{T}(u_1-u_2) \leq \liminf_{\alpha\to 0}|h(x_\alpha)-h(y_\alpha)| = 0, \end{align*} which finishes the verification of the comparison principle. \qed \end{running_example*} The running example also illustrates a principle that applies more generally. We can choose the domain of the limiting operator~$H$ as small as we want, provided that it contains sufficient functions to allow for verifying the comparison principle. In the example, merely using smooth functions was sufficient. As a rule of thumb, in compact spaces one wants to make sure that distance functions are in the domain of~$H$. \section{Action-integral representation of rate functions} \label{BG:sec:semigroup-flow-HJ-eq} Let us summarize where we stand after the previous section. We considered a sequence of Markov processes $X^n$ in~$\mathcal{X}=C_E[0,T]$ and established that the following two conditions imply a pathwise large deviation principle: \begin{enumerate}[label=(\roman*)] \item The nonlinear generators converge $H_n\to H$. \item The comparison principle holds for $(1-\tau H)u=h$. \end{enumerate} We illustrated on the example of small diffusion how one can verify these conditions in practice. The rate function is given via the limiting semigroup~$V(t)$ generated by~$H$, based on finding unique viscosity solutions of~$(1-\tau H)u=h$. \smallskip In this section, we focus on this rate function, which is given by \begin{equation}\label{eq:RF-with-semigroup-approach:last-sec} \mathcal{I}(x) = \mathcal{I}_0(x(0)) + \sup_{k\in\mathbb{N}}\sup_{(t_1,\dots,t_k)} \sum_{i=1}^k \mathcal{I}_{t_i-t_{i-1}}(x(t_i)|x(t_{i-1})), \end{equation} where the conditional rate functions~$\mathcal{I}_t(z|y)$ are \begin{equation}\label{BG:eq:RF-1d-marginals:last-sec} \mathcal{I}_t(z|y) = \sup_{f\in C(E)}\left[f(z)-V(t)f(y)\right]. \end{equation} We specialize henceforth to the state space~$E=\mathbb{T}$, the one-dimensional flat torus. Denote by~$\mathcal{A}\mathcal{C}_E[0,T]$ the set of absolutely continuous curves in~$E$. Our aim in this section is to find conditions under which the rate function~$\mathcal{I}:\mathcal{X}\to[0,\infty]$ is given by a Lagrangian~$\mathcal{L}:\mathbb{R}\to[0,\infty]$ via the formula \begin{equation} \label{BG:eq:action-integral-formula} \mathcal{I}(x) = \begin{cases} \mathcal{I}_0(x(0))+\int_0^T \mathcal{L}(\partial_t x(t))\, \mathrm{d} t, &\qquad x\in\mathcal{A}\mathcal{C}_E[0,T],\\ +\infty, &\qquad \text{otherwise}. \end{cases} \end{equation} We first indicate how to obtain~\eqref{BG:eq:action-integral-formula} from~\eqref{eq:RF-with-semigroup-approach:last-sec} via an informal calculation. Then we show how this can be obtained rigorously based on identifying the semigroup~$V(t)$ at least formally as a Hamilton-Jacobi semigroup~$V_\mathcal{H}(t)$---we give details below by Proposition~\ref{BG:prop:good-Lagrangians-give-action}. Finally, we show in what sense the required equality~$V(t)=V_\mathcal{H}(t)$ follows from solving a Hamilton-Jacobi equation. \subsubsection{Action-integral via an informal calcuation.} Here we consider the operator $Hf = \mathcal{H}(\nabla f)$ with the Hamiltonian $\mathcal{H}(p)=\frac{1}{2}p^2$. Let~$x\in\mathcal{A}\mathcal{C}_E[0,T]$. We want to show~\eqref{BG:eq:action-integral-formula} starting from~\eqref{eq:RF-with-semigroup-approach:last-sec}. To that end, we compute~$\mathcal{I}_{t_2-t_1}\left(z|y\right)$ for $y$ close to $z$ and $t=t_2-t_1>0$ small, having in mind that $y=x(t_1)$ and $z=x(t_2)$ are close to each other. With the formal expansions \[ e^{tH}\approx 1+tH\quad\text{and}\quad f(z)-f(y) \approx (z-y)\cdot\nabla f(y), \] and thinking of~$V(t)=e^{tH}$ (the generator of~$V(t)$ is~$H$), we obtain from~\eqref{BG:eq:RF-1d-marginals:last-sec} \begin{align*} \mathcal{I}_t(z|y) &\approx \sup_f \left[f(z)-f(y) - tHf(y)\right]\\ &\approx t \cdot \sup_f \left[\nabla f(y) \cdot \frac{z-y}{t} - \mathcal{H}(\nabla f(y))\right] = t\cdot \sup_p\left[p \cdot \frac{z-y}{t} - \mathcal{H}(p)\right]. \end{align*} Hence with $\mathcal{L}(v)=\sup_p\left[pv-\mathcal{H}(p)\right]$, which here is equal to $v^2/2$, we find \begin{align*} \mathcal{I}_{t_2-t_1}(z|y) &\approx (t_2-t_1)\mathcal{L}\left(\frac{z-y}{t_2-t_1}\right) = \int_{t_1}^{t_2} \mathcal{L}(\partial_s \gamma_{t_1t_2}(s))\, \mathrm{d} s, \end{align*} where $\gamma_{t_1t_2}:[t_1,t_2]\to\mathbb{R}$ is the linear path connecting $y$ and $z$. Now starting from~\eqref{eq:RF-with-semigroup-approach:last-sec}, the action-integral formula follows from summing up all the conditional rate functions, since the linear paths~$\gamma_{t_kt_{k+1}}$ approximate~$x$ in~$[t_k,t_{k+1}]$. \subsubsection{Action-integral via rewriting the semigroup.} Here we indicate how to make the above informal calculation rigorous. We start from an operator~$H$ acting on functions as~$Hf(x)=\mathcal{H}(\nabla f(x))$, with a convex Hamiltonian~$\mathcal{H}:\mathbb{R}\to\mathbb{R}$ satisfying~$\mathcal{H}(0)=0$. Define the Lagrangian~$\mathcal{L}$ as the Legendre dual~$\mathcal{L}(v):=\sup_{p\in\mathbb{R}}\left[pv-\mathcal{H}(p)\right]$, and the semigroup~$V_\mathcal{H}(t)$ by \begin{equation}\label{BG:eq:control-semigroup} V_\mathcal{H}(t)f(x) := \sup_{\substack{\gamma\\\gamma(0)=x}} \left[f(\gamma(t))-\int_0^t\mathcal{L}(\partial_s\gamma(s))\, \mathrm{d} s\right], \end{equation} where the supremum is taken over absolutely continuous paths $\gamma:[0,t]\to E$. Formally taking the time derivative, exchanging limit and supremum, we obtain \begin{align*} \frac{ \mathrm{d}}{ \mathrm{d} t}\bigg|_{t=0} V_\mathcal{H}(t)f(x)&= \sup_{\gamma(0)=x} \left[\nabla f(\gamma(0)) \cdot\partial_t\gamma(0) - \mathcal{L}(\partial_t\gamma(0))\right]\\ &= \sup_{v\in\mathbb{R}}\left[\nabla f(x)\cdot v - \mathcal{L}(v)\right] = \mathcal{H}(\nabla f(x)). \end{align*} That is why we indeed expect the the operator~$H$ to be the generator of~$V_\mathcal{H}(t)$. \begin{proposition} \label{BG:prop:good-Lagrangians-give-action} Suppose that~$V(t)=V_\mathcal{H}(t)$. Then the rate function~\eqref{eq:RF-with-semigroup-approach:last-sec} satisfies the action-integral form~\eqref{BG:eq:action-integral-formula}. \end{proposition} \begin{proof}[Sketch of proof of Proposition~\ref{BG:prop:good-Lagrangians-give-action}] We first show that the Lagrangian is superlinear, that means~$(\mathcal{L}(v)/|v|) \to \infty$ as~$|v|\to\infty$. Then for any~$t,M\geq0$, the sub-level sets $\{\gamma\in\mathcal{X}\,|\,\int_0^t\mathcal{L}\left(\partial_s\gamma(s)\right)\, \mathrm{d} s\leq M\}$ are compact in~$\mathcal{X}$---we do not prove this compactness statement here, but comment on it in Section~\ref{BG:sec:bibliographical-notes}. Regarding superlinearity, for any~$c>0$ we have \begin{align*} \frac{\mathcal{L}(v)}{|v|} &=\sup_{p\in\mathbb{R}}\left[p\cdot \frac{v}{|v|}-\frac{\mathcal{H}(p)}{|v|}\right]\\ &\geq \sup_{|p|=c}\left[p\cdot \frac{v}{|v|}-\frac{\mathcal{H}(p)}{|v|}\right] \geq c - \frac{1}{|v|}\sup_{|p|=c}\mathcal{H}(p). \end{align*} The convex Hamiltonian is continuous, and therefore~$\sup_{|p|=c}\mathcal{H}(p)$ is finite. Hence for arbitrary~$c>0$, we have~$\mathcal{L}(v)/|v| > c/2$ for all~$|v|$ large enough. \smallskip Let $x:[0,T]\to E$ be absolutely continuous and take two arbitrary~$t_1<t_2$. We show for $y:=x(t_1)$ and $z:=x(t_{2})$ that \begin{equation}\label{eq:action-int:two-point-RF-is-L} \mathcal{I}_{t_2-t_1}\left(z|y\right) = \inf_{\substack{\gamma(t_1)=y\\\gamma(t_2)=z}}\int_{t_1}^{t_2} \mathcal{L}\left(\partial_s\gamma\right)\, \mathrm{d} s, \end{equation} where the infimum is taken over absolutely continuous paths $\gamma:[t_1,t_2]\to E$. Once we have this equality established, we obtain for arbitrary~$k\in\mathbb{N}$ and points in time $t_1,\dots,t_k=T$ the esimate \begin{align*} \mathcal{I}_{t_1}(x_1|x_0) + \mathcal{I}_{t_2-t_1}(x_2|x_1) + \dots + \mathcal{I}_{t_{k}-t_{k-1}}(x_k|x_{k-1}) \leq \int_0^{T} \mathcal{L}(\partial_s x)\, \mathrm{d} s, \end{align*} since~$x$ satisfies the begin- and endpoint contraints. For the reverse inequality, we note that adding time points increases the two-point rate functions since we add a condition on the paths; for $t_1<t_2<t_3$, \begin{align*} \mathcal{I}_{t_3-t_1}(x_3|x_1) &= \inf_{\substack{\gamma(t_1)=x_1\\\gamma(t_3)=x_3}}\left[\int_{t_1}^{t_2} \mathcal{L}(\partial_t\gamma)\, \mathrm{d} t + \int_{t_2}^{t_3}\mathcal{L}(\partial_t\gamma)\, \mathrm{d} t\right] \\ &\leq \inf_{\substack{\gamma(t_1)=x_1\\\gamma(t_2)=x_2}}\left[\int_{t_1}^{t_2} \mathcal{L}(\partial_t\gamma)\, \mathrm{d} t\right] + \inf_{\substack{\gamma(t_2)=x_2\\\gamma(t_3)=x_3}}\left[ \int_{t_2}^{t_3}\mathcal{L}(\partial_t\gamma)\, \mathrm{d} t\right] \\ &= \mathcal{I}_{t_3-t_2}(x_3|x_2) + \mathcal{I}_{t_2-t_1}(x_2|x_1). \end{align*} The partitions of a time interval~$[0,T]$ give rise to a monotonically increasing sequence. In the limit, we obtain \begin{align*} \sup_k \sup_{t_i}\sum_{i=1}^k \mathcal{I}_{t_i-t_{i-1}}(x(t_i)|x(t_{i-1})) = \int_0^T \mathcal{L}\left(\partial_s x(s)\right)\, \mathrm{d} s. \end{align*} We do not show that here, but refer to~\cite[Definition~7.11,~Example~7.12]{Villani2008}. We now show how~\eqref{eq:action-int:two-point-RF-is-L} follows from the compact sub-level sets. Starting from the assumption~$V(t)=V_\mathcal{H}(t)$, we have \begin{align*} \mathcal{I}_t\left(z|y\right) &\stackrel{\mathclap{\text{def}}}{=} \sup_f\left[f(z)-V(t)f(y)\right] = \sup_f\left[f(z)-V_\mathcal{H}(t)f(y)\right]\\ &= \sup_{f}\inf_{\substack{\gamma(0)=y}}\left[f(z)-f(\gamma(t))+\int_0^t\mathcal{L}\left(\partial_s \gamma\right)\, \mathrm{d} s\right]. \end{align*} For any $f\in C(E)$, \[ \inf_{\gamma(0)=y}\left[f(z)-f(\gamma(t))+\int_0^t\mathcal{L}(\partial_s\gamma)\, \mathrm{d} s\right] \leq \inf_{\substack{\gamma(0)=y\\\gamma(t)=z}} \int_0^t\mathcal{L}(\partial_s\gamma)\, \mathrm{d} s, \] since $\{\gamma:\gamma(0)=y\}$ contains $\{\gamma:\gamma(0)=y,\gamma(t)=z\}$. Taking the supremum over all~$f$ shows the inequality "$\leq$". \smallskip For the reverse, let~$f\in C(E)$. There are curves $\gamma_m$ satisfying~$\gamma_m(0)=y$ and \begin{align*} \inf_{\gamma(0)=y}\left[f(z)-f(\gamma(t))+\int_0^t\mathcal{L}(\partial_s\gamma)\, \mathrm{d} s\right] + \frac{1}{m} \geq f(z)-f(\gamma_m(t))+\int_0^t\mathcal{L}(\partial_s\gamma_m)\, \mathrm{d} s. \end{align*} Since $f$ is bounded, this implies~$\limsup_{m\to\infty}\int_0^t\mathcal{L}(\partial_s\gamma_m)\, \mathrm{d} s < \infty$. By compactness of sublevel sets, we can pass to a converging subsequence (denoted as well by~$\gamma_m$). If $\gamma_m(t)\not\to z$, then~$\mathcal{I}_t(z|y)=\infty$, and the desired estimate holds. If $\gamma_m(t)\to z$, then by lower semicontinuity of $\gamma\mapsto\int_0^t\mathcal{L}(\partial_s\gamma)\, \mathrm{d} s$, \begin{align*} \inf_{\gamma(0)=y}\left[f(z)-f(\gamma(t))+\int_0^t\mathcal{L}(\partial_s\gamma)\, \mathrm{d} s\right]&\geq \liminf_{m\to\infty}f(z)-f(\gamma_m(t))+\int_0^t\mathcal{L}(\partial_s\gamma_m)\, \mathrm{d} s\\ &\geq \int_0^t\mathcal{L}(\partial_s\gamma)\, \mathrm{d} s \geq \inf_{\substack{\gamma(0)=y\\\gamma(t)=z}}\int_0^t\mathcal{L}(\partial_s\gamma)\, \mathrm{d} s, \end{align*} and the reverse inequality follows. \end{proof} \subsubsection{Rewriting the semigroup via solving the Hamilton-Jacobi equation.} We saw above that if~$V(t)=V_\mathcal{H}(t)$, then the action-integral form of the rate function follows. In this section we illustrate how to verify this equality. The semigroup~$V(t)$ is defined by the resolvent map $h\mapsto R(\tau)h:=u$, where~$u$ is the unique viscosity solution of~$(1-\tau H)u=h$; for~$f\in C(E)$, we have uniformly \[ V(t)f = \lim_{k\to\infty}[R(t/k)]^k f. \] For a Hamiltonian~$\mathcal{H}$ with corresponding Lagrangian~$\mathcal{L}$, define~$R_\mathcal{H}(\tau)$ by \begin{equation}\label{BG:HJ-resolvent} R_\mathcal{H}(\tau)h(x) := \sup_{\substack{\gamma\in\mathcal{A}\mathcal{C}_E[0,\infty)\\\gamma(0)=x}}\int_0^\infty \frac{1}{\tau}e^{-s/\tau} \left[h(\gamma(s)) - \tau \mathcal{L}\left(\partial_s \gamma(s)\right)\right]\, \mathrm{d} s. \end{equation} One can show, under suitable conditions on the Lagrangian, that also \begin{equation}\label{BG:eq:H-semigroup-from-resolvent} V_\mathcal{H}(t)f = \lim_{k\to\infty}[R_\mathcal{H}(t/k)]^k f. \end{equation} Therefore the desired equality~$V(t)=V_\mathcal{H}(t)$ follows if we prove~$R(\tau)=R_\mathcal{H}(\tau)$ for all~$\tau>0$. Let us first focus on establishing~$R(\tau)=R_\mathcal{H}(\tau)$, and defer the problem of obtaining~\eqref{BG:eq:H-semigroup-from-resolvent}. We will show that~$R_\mathcal{H}(\tau)$ gives viscosity solutions to~$(1-\tau H)u=h$. Then~$R_\mathcal{H}(\tau)=R(\tau)$ follows by definition of~$R(\tau)$. The following definition summarizes the key properties to look after. \begin{definition}\label{def:visc-sol-machine} For~$\tau>0$, let~$\mathrm{R}(\tau)$ be a map~$\mathrm{R}(\tau):C(E)\to C(E)$. We call the family~$\{\mathrm{R}(\tau)\}_{\tau >0}$ a \emph{contractive pseudo-resolvent} if: \begin{enumerate}[label=(\roman*)] \item \label{item:visc-machine:resolv-id} For any $0<\tau_1<\tau_2$, we have \[ \mathrm{R}(\tau_2) = \mathrm{R}(\tau_1)\left[\mathrm{R}(\tau_2)-\frac{\tau_1}{\tau_2}\left(\mathrm{R}(\tau_2)-\mathbf{1}\right)\right]. \] \item \label{item:visc-machine:contr} The map $\mathrm{R}(\tau)$ is contractive: for any two functions $h_1,h_2\in C(E)$, we have the estimate $\sup_E\left(\mathrm{R}(\tau)h_1-\mathrm{R}(\tau)h_2\right)\leq \sup_E \left(h_1-h_2\right)$. \end{enumerate} \end{definition} \begin{theorem}[]\label{thm:viscosity-sol-machine} Let~$\mathrm{R}(\tau)$ be a contractive pseudo-resolvent and suppose that for any~$f\in\mathcal{D}(H)$, we have~$f = \mathrm{R}(\tau) (\mathbf{1}-\tau H)f$ on~$E$. Then for any~$\tau>0$ and~$h\in C(E)$, the function~$\mathrm{R}(\tau)h$ is a viscosity solution of $(1-\tau H)u=h$. \end{theorem} For the proof Theorem~\ref{thm:viscosity-sol-machine}, we will use the following simplification of~\cite[Lemma~7.8]{FengKurtz2006} (the proof in there is incorrect---see~\cite[Lemma~3.5]{Kraaij2019GenConv}). \begin{lemma}\label{lemma:visc-sol-machine} Let~$f,g:E\to\mathbb{R}$ be two continuous functions on a compact Polish space~$E$. Suppose that for any~$\varepsilon>0$, the inequality $\sup_E f \leq \sup_E (f-\varepsilon g)$ holds true. Then there is a point~$x\in E$ such that both $f(x)=\sup_E f$ and $g(x)\leq 0$. Similarly, if $\inf_E f\geq \inf_E (f-\varepsilon g)$, then $f(x)=\inf_E f$ and $g(x)\geq 0$ for some point~$x\in E$. \end{lemma} \begin{proof}[Proof of Theorem~\ref{thm:viscosity-sol-machine}] Fix~$\tau>0$ and~$h\in C(E)$. Let~$f\in\mathcal{D}(H)$. For every~$\varepsilon>0$, we show below the estimate \begin{equation}\label{BG:eq:estimate-to-get-subsolution} \sup_E \left[\mathrm{R}(\tau)h-f\right] \leq \sup_E\left\{\mathrm{R}(\tau)h-f -\varepsilon\left[ \frac{1}{\tau}\left(\mathrm{R}(\tau)h-h\right)- Hf\right]\right\}. \end{equation} Then by Lemma~\ref{lemma:visc-sol-machine}, there is a point~$x\in E$ such that both \[ (\mathrm{R}(\tau)h-f)(x)=\sup_E \left(\mathrm{R}(\tau)h-f\right) \quad\text{and}\quad \left[ \frac{1}{\tau}\left(\mathrm{R}(\tau)h-h\right)- Hf\right](x)\leq 0, \] which establishes that~$\mathrm{R}(\tau)h$ is a viscosity subsolution. The argument for the supersolution case is similar. We now prove the estimate~\eqref{BG:eq:estimate-to-get-subsolution}. We use the resolvent identity~\ref{item:visc-machine:resolv-id} to rewrite $\mathrm{R}(\tau)h$, and the fact that~$f=\mathrm{R}(\varepsilon) (\mathbf{1}-\varepsilon H)f$, to find \begin{equation*} \mathrm{R}(\tau)h-f = \mathrm{R}(\varepsilon)\left[\mathrm{R}(\tau)h-\frac{\varepsilon}{\tau}\left(\mathrm{R}(\tau)h-h\right)\right]-\mathrm{R}(\varepsilon)\left(f-\varepsilon Hf\right). \end{equation*} Since~$\mathrm{R}(\tau)$ is contractive~\ref{item:visc-machine:contr}, \begin{align*} \sup_E\left[\mathrm{R}(\tau)h-f\right] \leq \sup_E \left\{\mathrm{R}(\tau)h-\frac{\varepsilon}{\tau}\left(\mathrm{R}(\tau)h-h\right)-\left(f-\varepsilon Hf\right)\right\}, \end{align*} which establishes the desired estimate. \end{proof} To summarize where we are, Theorem~\ref{thm:viscosity-sol-machine} tells us that if~$R_\mathcal{H}(\tau)$ is a contractive pseudo-resolvent satisfying~$f = R_\mathcal{H}(\tau) (\mathbf{1}-\tau H)f$ for all~$f\in\mathcal{D}(H)$, then we have proven our desired equality~$R(\tau)=R_\mathcal{H}(\tau)$. We finish this section by showing that reasonable Hamiltonians give indeed rise to pseudo-resolvents. In the following theorem, we consider an operator~$H:\mathcal{D}(H)\subseteq C^1(E)\to C(E)$ acting functions by~$Hf(x)=\mathcal{H}(\nabla f(x))$, with a dense domain~$\mathcal{D}(H)\subseteq C(E)$. We associate the Lagrangian~$\mathcal{L}(v)=\sup_p[pv-\mathcal{H}(p)]$. \begin{theorem}\label{BG:thm:resonable-H-gives-pseudo-resolvent} Suppose~$\mathcal{H}:\mathbb{R}\to\mathbb{R}$ is convex, continuously differentiable, and that~$\mathcal{H}(0)=0$. Then~$R_\mathcal{H}(\tau)$ defined by~\eqref{BG:HJ-resolvent} is a contractive pseudo-resolvent such that for all functions~$f\in\mathcal{D}(H)$,~$f = R_\mathcal{H}(\tau) (\mathbf{1}-\tau H)f$, and~\eqref{BG:eq:H-semigroup-from-resolvent} holds true. \end{theorem} \begin{proof}[Sketch of proof of Theorem~\ref{BG:thm:resonable-H-gives-pseudo-resolvent}] We first verify~$f=R_\mathcal{H}(1-\tau H)f$. For~$f\in\mathcal{D}(H)$, \begin{align*} R_\mathcal{H}(\tau)(f-\tau Hf)(x) \overset{\mathrm{def}}{=} \sup_{\gamma(0)=x}\int_0^\infty e^{-s/\tau}\left[\frac{1}{\tau}f(\gamma(s))- Hf(\gamma(s)) - \mathcal{L}(\partial_s\gamma(s)) \right] \mathrm{d} s. \end{align*} Since~$Hf=\mathcal{H}(\nabla f)$ and~$\mathcal{L}(v)+\mathcal{H}(p)\geq pv$ for any~$p,v\in\mathbb{R}$, we have \begin{align*} R_\mathcal{H}(\tau)(f-\tau Hf)(x) \leq \sup_{\gamma(0)=x}\int_0^\infty e^{-s/\tau}\left[\frac{1}{\tau}f(\gamma(s))-\nabla f(\gamma(s))\cdot \partial_s\gamma(s)\right] \mathrm{d} s. \end{align*} Using~$\nabla f(\gamma)\cdot\partial_s\gamma=(d/ds) f(\gamma)$ and integration by parts, we find the estimate \begin{equation*} R_\mathcal{H}(\tau)(f-\tau Hf)(x) \leq f(x). \end{equation*} For the reverse inequality, we find a path~$\gamma$ such that~$\gamma(0)=x$ and \begin{equation*} \int_0^\infty e^{-s/\tau}\left[\frac{1}{\tau}f(\gamma(s))- Hf(\gamma(s)) - \mathcal{L}(\partial_s\gamma(s)) \right] \mathrm{d} s \geq f(x). \end{equation*} We will in fact prove equality. Let~$\gamma$ be the path solving \begin{align}\label{BG:eq:proof-R-is-pseudores:eq-in-Young} \partial_t \gamma(t) = \partial_p\mathcal{H}(\nabla f(\gamma(t))),\qquad t\geq 0. \end{align} Such a path exists since the vector field~$F(x)=\partial_p\mathcal{H}(\nabla f(x))$ is continuous and bounded---continuity follows by~$\mathcal{H}\in C^1(\mathbb{R})$ and~$f\in C^1(\mathbb{T})$, and boundedness from compactness of~$E=\mathbb{T}$. The precise argument for the existence is given for instance in~\cite[Lemma~3.4]{Kraaij2016}, which is~based on~\cite{Crandall1972}. With this path~$\gamma$, \begin{equation}\label{BG:eq:exact-eq-in-Young-inequ} Hf(\gamma) + \mathcal{L}(\partial_s\gamma) = \nabla f(\gamma)\cdot\partial_s\gamma, \end{equation} and~\eqref{BG:eq:proof-R-is-pseudores:eq-in-Young} follows from~$\nabla f(\gamma)\cdot\partial_s\gamma=(d/ds)f(\gamma)$ and integration by parts. \smallskip Since~$\mathcal{H}(0)=0$, the Lagrangian is non-negative. With that, the properties of a contractive pseudo-resolvent are verified by writing out the definitions. For instance, for~$f\in C(E)$ and and any path~$\gamma$, \begin{equation*} \int_0^\infty\frac{1}{\tau}e^{-s/\tau}\left[f(\gamma(s))-\tau \mathcal{L}(\partial_s\gamma(s))\right]\, \mathrm{d} s \leq \|f\| \int_0^\infty \frac{1}{\tau}e^{-s/\tau}\, \mathrm{d} s = \|f\|. \end{equation*} Therefore~$\|R(\tau)f\|\leq \|f\|$. With a similar estimate, taking arbitrary~$h_1,h_2$, we find contractivity of~$R(\tau)$ in the sense of~\ref{item:visc-machine:contr}. The resolvent identity~\ref{item:visc-machine:resolv-id} follows from rearrangements involving integration by parts. \smallskip The argument for proving~\eqref{BG:eq:H-semigroup-from-resolvent} is given in~\cite[Lemma~8.18]{FengKurtz2006}. One exploits the fact that with a unit exponential random variable~$\Delta$, \begin{equation*} R_\mathcal{H}(\tau)h(x) = \sup_{\gamma(0)=x} \mathbb{E}\left[h(\gamma(\tau\Delta)) - \int_0^{\tau\Delta}\mathcal{L}(\partial_s\gamma(s))\, \mathrm{d} s\right]. \end{equation*} The path~$x^t$ in the proof of Lemma~8.18, cited from~Lemma~8.16, is the one satisfying \begin{equation*} V_\mathcal{H}(t)f(x) = f(x^t(t))-\int_0^t\mathcal{L}(\partial_sx^t(s))\, \mathrm{d} s. \end{equation*} The proof of~\cite[Lemma~8.16]{FengKurtz2006} carries over verbatim; the fact that for every~$x_0$, there exists a path~$\gamma$ satisfying~$\gamma(t_0)=x_0$ and \begin{equation}\label{BG:eq:zero-cost-flow-of-L} \int_{t_0}^\infty \mathcal{L}(\partial_t\gamma(t))\, \mathrm{d} t=0 \end{equation} follows in our case from~\eqref{BG:eq:exact-eq-in-Young-inequ} specialized to~$f\equiv 1$. \end{proof} \section{Bibliographical notes} \label{BG:sec:bibliographical-notes} Outlines of the idea of~\cite{FengKurtz2006} are also offered for instance in Feng's paper~\cite{Feng2006} and the introduction of Kraaij's PhD thesis~\cite{Kraaij2016PhDThesis}. The focus in~\cite{FengKurtz2006} lies on conditions for proving large deviation principles for particle systems that lead to Hamilton-Jacobi equations in the space of probability measures, which requires to solve various functional-analytic problems in non-locally compact spaces. Here we comment on some relations to our simplified treatment. \paragraph{Markov processes via solution to martingale problems.} We specified Markov processes from the existence of transition probabilities. Since these are generally unknown, Markov processes are in practice not obtained by writing down an explicit family of transition probabilities. A common strategy is to find a semigroup satisfying the conditions of~\cite[Proposition~1.3]{Liggett2004}, which by~\cite[Theorem~1.5]{Liggett2004} gives a Markov process defined by means of a family of path distributions. In general, the semigroup determines all finite-dimensional distributions~\cite[Proposition~4.1.6]{EthierKurtz1986}, which induces the path distribution of a stochastic process by the Daniell-Kolmogorov extension Theorem~\cite[Theorem~3.38]{BovierDenHollander2016}. However, frequently we only have an idea about the infinitesimal time evolution of the process. Hence we would like to construct the Markov process by specifying its generator. This point of view is explored for instance in~\cite[Chapter~4]{EthierKurtz1986} and~\cite[Sections~5.3]{BovierDenHollander2016}. The starting assumption in many theorems in~\cite{FengKurtz2006} is the well-posedness of the so-called martingale problem, which associated a path distribution~$\mathbb{P}_\nu$ to a generator~$A$ and an initial distribution~$\nu$. Overviews of the martingale approach can be found for instance in~\cite[Sections~4.3-4.5 and~8]{EthierKurtz1986},~\cite[Section~5.4]{BovierDenHollander2016} and~\cite[Section~1.5]{Liggett2004}. \paragraph{Large deviations via convergence of semigroups.} Theorem~\ref{thm:LDP-via-semigroup-convergence:compact} is a special case of~\cite[Theorem~5.15]{FengKurtz2006}. The proofs we outlined in Section~\ref{BG:sec:LDP-from-convergence-of-semigroups} carry over to non-compact Polish spaces. The only adaptions are: replace~$C(E)$ with~$C_b(E)$ (continuous and bounded), demand convergence of semigroups bounded and uniformly on compact sets (buc-convergence), and exploit exponential tightness of the initial conditions to conclude as in the proof of Proposition~\ref{prop:LDP-1d-compact:semigroup}. The idea behind the proof of Proposition~\ref{prop:LDP-semigroups:conditional-RF} has been communicated to me by Richard Kraaij. This proof carries over verbatim to the non-compact setting. Finally, a generalization of a collection of compact subsets that is required for non-locally compact spaces is given by~\cite[Definition~2.5]{FengKurtz2006}. \paragraph{Large deviations via convergence of generators.} In Section~\ref{subsec:LDP-via-classical-sol}, we indicated how Theorem~\ref{thm:LDP-classical-sol} (which is a simplification of~\cite[Corollary~5.19]{FengKurtz2006}) can be proven with Lemmas from~\cite[Section~5]{FengKurtz2006}. The extension to locally-compact state spaces such as~$\mathbb{R}^d$ can be executed by replacing the convergence conditions on the~$H_n$ with uniform convergence on compact subsets---this means specialising as shown in~\cite[Example~2.6]{FengKurtz2006}, which leads to the notion of buc-convergence. The convergence of corresponding semigroups carries over as shown in~\cite[Lemma~5.13~(b)]{FengKurtz2006}. \smallskip A notable difference is that in contrast to the compact case, exponential tightness is no longer a direct consequence of the convergence of~$H_n$. Instead, exponential tightness follows if in addition one can verify the exponential containment condition~\cite[Condition~2.8]{FengKurtz2006}. This condition corresponds to controlling the probability of the process escaping compact sets. There is a convenient way of verifying this condition from the limit operator~$H$; finding a so-called good containment function is sufficient. A detailed account on this is offered in the appendix of Collet's and Kraaij's paper~\cite{CoKr17}, in particular~Proposition~A.15 therein. In our running example on~$\mathbb{R}$, the function~$\Upsilon(x)=\log(1+x^2)$ is a good containment function. More general conditions based on Lyapunov function techniques are given in~\cite[Section~4]{FengKurtz2006}. \paragraph{Comparison principle in non-compact state space.} There is an extensive literature on comparison principles. The concept of viscosity solutions is outlined in the user's guide of Crandall, Ishii and Lions~\cite{CIL92}. Another introduction to techniques for verifying the comparison principle in~$\mathbb{R}^d$ can be found in Bardi's and Cappuzzo-Dolcetta's monograph~\cite[Chapter~2]{BardiDolcetta1997}. The proof of comparison principle follows the same idea as in the running example at the end of Section~\ref{subsec:LDP-via-visc-sol}; one only has to use a good containment function~$\Upsilon$ to reduce the analysis to compact sets. This point of view is further explained in Chapter~6 and in~\cite[Appendix~A]{CoKr17}. The analysis is more involved in infinite dimensions; see for instance the works of Tataru~\cite{Tataru1992,Tataru1994} and Feng~\cite{Feng2006} in linear spaces, and the recent paper by Feng, Mikami and Zimmer~\cite{FengMikamiZimmer2019} in the space of probability measures, where methods from~\cite[Chapter~13]{FengKurtz2006} are extended. \paragraph{Action-integral representation.} In Section~\ref{BG:sec:semigroup-flow-HJ-eq}, we worked with~$E=\mathbb{T}$ and proper convex Hamiltonians of the form~$\mathcal{H}=\mathcal{H}(p)$, which allowed us to exploit superlinearity of the Lagrangian defined as the Legendre dual. The information contained in the superlinearity is generalized by~\cite[Condition~8.9]{FengKurtz2006}; the compactness of sub-level sets we used in Proposition~\ref{BG:prop:good-Lagrangians-give-action}---for which I could not find a simple proof---is proven under the more general Condition~8.9 in~\cite[Proposition~8.13]{FengKurtz2006}. Furthermore, we assumed differentiability of the Hamiltonian in in Theorem~\ref{BG:thm:resonable-H-gives-pseudo-resolvent} in order to find a path~$\gamma$ satisfying~\eqref{BG:eq:exact-eq-in-Young-inequ}. We used this path to prove~$R_\mathcal{H}(\tau) (\mathbf{1}-\tau H)f\geq f$, and to find the zero-cost flow~\eqref{BG:eq:zero-cost-flow-of-L} required for proving~\eqref{BG:eq:H-semigroup-from-resolvent}. The condition of finding a path~$\gamma$ is generalized by~\cite[Condition~8.11]{FengKurtz2006}, and the existence of a zero-cost flow is generalized by~\cite[Condition~8.10]{FengKurtz2006}. The generalization of Proposition~\ref{BG:prop:good-Lagrangians-give-action} is given by~\cite[Theorem~8.14]{FengKurtz2006}, and the generalizations of verifying equality of semigroups from equality of resolvents are found in~\cite[Corollaries~8.28, 8.29]{FengKurtz2006}. \paragraph{Pseudo-resolvents.} Richard Kraaij proofs large deviation principles by generalizing the concept of pseudo-resolvents~\cite{Kraaij2019ExpResolv,Kraaij2019GenConv}. Instead of working with the Hille-Yosida approximants as in the proof of Theorem~\ref{thm:LDP-classical-sol}, Kraaij shows in~\cite{Kraaij2019ExpResolv} how to rigorously obtain the semigroup~$V_n(t)$ from the nonlinear generators~$H_n$ via resolvents~$R_n$. The resolvents are defined by finding viscosity solutions to~$(1-\tau H_n)u=h$ via a control problem involving the relative entropy as a cost---this step replaces the argument in~\cite{FengKurtz2006} of passing to Hille-Yosida approximants. The existence of viscosity solutions follows from generalizing the concept outlined in Theorem~\ref{thm:viscosity-sol-machine}. Our case is a simplified version of the strategy carried out in~\cite[Section~8.4]{FengKurtz2006}. In the generalizations, one proves the fact that the images~$R(\tau)h$ are continuous functions by exploiting the comparison principle, and passing to lower- and upper semicontinuous regularizations first. We avoided these details to clarify the idea. \chapter{Large Deviations of Switching Processes} \label{chapter:LDP-for-switching-processes} \section{Introduction---molecular motors} \label{section:intro} In this chapter we focus on switching Markov processes motivated by stochastic models of walking molecular motors. Broadly speaking, \emph{molecular motors} are proteins that are capable of binding on and moving on filaments in a living cell. Molecular motors such as kinesin and dynein drag vesicles along while moving, and thereby they transport them within the cell. The motors achieve their directed mechanical motion by converting chemical energy of surrounding ATP molecules. In that sense, molecular motors enable living cells to organise directed transport of vesicles. Jonathan Howard provides an overview of the phenomenon of molecular motors in~\cite{Howard2001}. \smallskip There are several mathematical models of molecular motors describing the motor's movement on a filament. J{\"u}licher, Ajardi and Prost review the most common approaches in the Physics literature, with a focus on the relation between models and numerous experimental results~\cite{JulicherAjdariProst1997}. Recent overviews of mathematical models are offered for instance by Anatoly Kolomeisky and Michael Fisher~\cite{Kolomeisky13,KolomeiskyFisher07}. \smallskip Mathematical models can help us to answer questions about the mechanism behind the transport phenomenon based on molecular motors. For instance, is there an underlying common working principle? How do transport properties such as the effective velocity, energy efficiency, stability with respect to perturbations, and response to external forces depend on physical characteristics such as the involved chemical reaction times or the structure of the polymeric filaments? \smallskip Peskin, Dwight and Elston show that the \emph{Brownian ratchet model} predicts a decrease of the motor's speed when increasing stiffness of the string connecting motor and cargo~\cite{PeskinElston2000}. On the other hand, the \emph{correlation ratchet model} introduced by Peskin, Ermentrout and Oster~\cite{PeskinErmentroutOster1995} predicts an increase of the speed when increasing stiffness~\cite{PeskinDwightElston2000}. Deville and Vanden-Eijnden consider models of multiple motors pulling the same cargo to investigate synchronization effects~\cite{DevilleVandenEijnden2008}. In the models, the gait of a motor regularizes when pulling a cargo, and multiple motors synchronize their actions when pulling together. The authors reveal a similar effect for Brownian ratchet models~\cite{DevilleVandenEijnden2007}. \smallskip We focus on correlation ratchet models for a single motor. In Section~\ref{subsec:model-of-molecular-motor} below, we describe a stochastic version of these models. What makes them interesting is the fact that they do not prescribe a directional movement by introducing a uniform bias. The models rather describe a working principle, and the movement can be derived thereof. Given a specific model, the challenge lies therefore in predicting the precise dynamics in the first place. \smallskip The models are specified by periodic potentials and reaction rates. Simply put, a potential describes the motor's interaction with the periodic filament when being in a certain chemical state, and the reaction rates describe how likely the motor's chemical state changes---we provide more details in Section~\ref{subsec:model-of-molecular-motor}. Many works investigate Fokker-Planck equations associated to the model. For instance, Hastings, Kinderlehrer and Mcleod study their stationary solution and find sufficient conditions for the occurence of transport in terms of distributions of minima of the potentials and a suitable choice of reaction rates~\cite[Theorem~2.1]{HastingsKinderlehrerMcleod08}, and~\cite[Theorems~3.1,~3.2]{HastingsKinderlehrerMcLeod2008}. Wang, Peskin and Elston provide numerical results for such models~\cite{WangPeskinElston2003}. Perthame, Souganidis and Mirrahimi use homogenization techniques to characterize transport in terms of a cell problem~\cite{PerthameSouganidis09a, PerthameSouganidis2009Asymmetric, Mirrahimi2013}. Our work relates closest to their results, and we comment further on their work in Section~\ref{MM:sec:larger-context-and-aim}. \smallskip We propose to analyse the underlying stochastic models by means of large deviation theory. While molecular motors are naturally stochastic on the microscale, they move with a nearly deterministic velocity on the macroscale. In the mathematical models, this stability is reflected in the fact that the large-deviation results do not depend on the microscopic details of the dynamics. \paragraph{Overview of this chapter.} We first illustrate in Section~\ref{subsec:model-of-molecular-motor} our general results on a specific example of a molecular-motor model. We sketch, without diving into details, how large deviation theory can be utilized to study stochastic models of molecular motors. The example also provides a picture to interpret the general results that follow. We continue with outlining in Section~\ref{MM:sec:larger-context-and-aim} why we choose to analyse switching Markov processes. Basically, we want to separate the general arguments of large devation theory from the specific arguments depending on the molecular-motor models. The main results are presented in Section~\ref{section:MM:results}. We specify switching Markov processes in a periodic setting in Section~\ref{section:switching-MP}, formulate a general large-deviation theorem for the spatial components in Section~\ref{subsection:results:LDP_switching_MP}, and provide an action-integral representation of the rate functions in Section~\ref{subsection:results:action_integral_rep}. Then we specialize the large deviation theorems to continuous and discrete models of molecular motors (Section~\ref{subsection:results:LDP_in_MM}). Finally, we give an exact formula for the macroscopic velocity in terms of Hamiltonians that are derived from the microscopic dynamics. The detailed-balance condition in molecular motors implies symmetry of the Hamiltonians and thereby of the large-deviation fluctuations. We show that as a consequence, breaking detailed balance is necessary for transport (Section~\ref{MM:subsec:det-bal-implies-symmetric-H}). While this particular conclusion is not new, it comes from a large-deviation perspective. We close with the proof sections and an outline on the literature on principal-eigenvalue problems. \section{Example---large deviations for molecular motors} \sectionmark{Large deviations for molecular motors} \label{subsec:model-of-molecular-motor} In this example, we consider a two-component Markov process~$(X^\varepsilon,I^\varepsilon)$ with values in $\mathbb{T} \times \{1,2\}$, where $\mathbb{T} = \mathbb{R} / \mathbb{Z}$ is the one-dimensional flat torus, $\varepsilon = 1/n$ a small parameter, and $n$ an integer. We fix the initial condition; that means for some~$(x_0,i_0) \in \mathbb{T} \times \{1,2\}$, we have~$\left(X^\varepsilon(0),I^\varepsilon(0)\right) =(x_0,i_0)$. Let~$\psi(\cdot,1)$ and~$\psi(\cdot,2)$ be smooth functions on the torus, and write $\psi'(\cdot,i)$ for the derivative of $\psi(\cdot,i) \in C^\infty(\mathbb{T})$. The evolution of $(X^\varepsilon, I^\varepsilon)$ is characterized by the stochastic differential equation \begin{equation}\label{eq:intro:example_SDE} \mathrm{d} X_t^\varepsilon = -\psi'\left(\frac{1}{\varepsilon}X_t^\varepsilon,I_t^\varepsilon\right)\, \mathrm{d} t + \sqrt{\varepsilon}\, \mathrm{d} B_t. \end{equation} where $B_t$ is a standard Brownian motion. The process~$I^\varepsilon_t$ is a continuous-time Markov chain on~$\{1,2\}$, which evolves with jump rates~$r_{ij}(\cdot)$ such that % \begin{equation} \mathbb{P} \left[I^\varepsilon_{t+\Delta t} = j\,|\,I^\varepsilon_t =i, X^\varepsilon_t =x \right] = \frac{1}{\varepsilon} r_{ij}\left(\frac{x}{\varepsilon}\right)\Delta t + \mathcal{O}(\Delta t^2), \quad \text{as}\;\Delta t \to 0. \label{eq:intro:example_evolution_jump_rates} \end{equation} % In summary, the \emph{spatial component}~$X^\varepsilon$ is a drift-diffusion process, the \emph{configurational component}~$I^\varepsilon$ is a jump process on~$\{1,2\}$, and the two are coupled through their respective rates. The drift-term in~\eqref{eq:intro:example_SDE} depends on the value of~$I^\varepsilon$, and thereby the role of~$I^\varepsilon$ is to determine the kind of dynamics that~$X^\varepsilon$ is following. Let~$\{T_k\}_{k=1,2\dots}$ be the jump times of~$I^\varepsilon$, and set~$T_0:=0$. Then~$I^\varepsilon(t)$ is constant in the time windows~$[T_k,T_{k+1})$ (denote its value by~$j_k$), in which the spatial component is a drift-diffusion process with drift term~$-\psi'(\cdot,j_k)$. For details about the construction of such switching diffusions, we refer to~\cite[Chapter~2]{yin2010hybrid}. Figure~\ref{MM:fig:evolution-and-tx-diagram} depicts a typical realization of~$(X^\varepsilon, I^\varepsilon)$, where the trajectory of the spatial component is lifted from the torus to~$\mathbb{R}$. \begin{figure}[h!] \labellist \pinlabel $t$ at 1800 90 \pinlabel $x$ at 760 90 \pinlabel $\psi(x,1)$ at -50 230 \pinlabel $\psi(x,2)$ at -50 500 \pinlabel \small $1.$ at 290 130 \pinlabel \small $2.$ at 310 360 \pinlabel \small $3.$ at 410 540 \pinlabel \small $4.$ at 490 520 \pinlabel \small $5.$ at 570 400 \pinlabel \small $6.$ at 570 290 \pinlabel \small $1.$ at 1300 80 \pinlabel \small $2.$ at 1190 150 \pinlabel \small $3.$ at 1260 200 \pinlabel \small $4.$ at 1100 430 \pinlabel \small $5.$ at 1510 285 \pinlabel \small $6.$ at 1330 670 \pinlabel {\color{red_one}{$X^{\varepsilon}(t)$}} at 1000 640 \endlabellist \centering \includegraphics[scale=.18]{Evolution_and_tx_diagram} \caption{A typical time evolution of $(X^\varepsilon_t, I^\varepsilon_t)$ satisfying~\eqref{eq:intro:example_SDE} and~\eqref{eq:intro:example_evolution_jump_rates}. In the left diagram, the black bullet represents a particle that moves according to~\eqref{eq:intro:example_SDE}. A red arrow corresponds to the value of the spatial component~$X^\varepsilon_t$, and a green arrow indicates a switch of the configurational component~$I^\varepsilon_t$, which changes the potential landscape in which the particle is diffusing. On the right diagram, the spatial component's evolution is shown in a $x$-$t$-diagram, where the red dots represent the values of~$X^\varepsilon_t$. The green bullets indicate a jump of the configurational component~$I^\varepsilon_t$. One forward power stroke consists of the following typical phases: 1. diffusive motion of~$X^\varepsilon$ near minimum; 2. configurational change of~$I^\varepsilon$; 3. flow of~$X^\varepsilon$ towards new minimum.} \label{MM:fig:evolution-and-tx-diagram} \end{figure} \smallskip Let us give one possible motivation for the specific $\varepsilon$-scaling. One can start from a process~$(X_t, I_t)$ satisfying \begin{align*} \mathrm{d} X_t&= -\psi'(X_t,I_t)\, \mathrm{d} t + \mathrm{d} B_t, \end{align*} where the jump process $I_t$ on $\{1,2\}$ evolves according to \begin{equation*} \text{Prob}\left[I_{t+\Delta t}=j\,|\,I_t=i, X_t=x\right]=r_{ij}(x)\Delta t+\mathcal{O}(\Delta t^2),\quad i\neq j, 1\leq i,j\leq 2. \end{equation*} The large-scale behaviour of $(X_t, I_t)$ is studied by considering the rescaled process~$(X^\varepsilon_t, I^\varepsilon_t)$ defined by~$X^\varepsilon_t := \varepsilon X_{t / \varepsilon}$ and~$I^\varepsilon_t := I_{t / \varepsilon}$. This rescaling corresponds to zooming out of the $x$-$t$ phase space, which is illustrated below in Figure~\ref{MM:fig:zooming-out}. It\^o calculus implies that the process $(X^\varepsilon_t, I^\varepsilon_t)$ satisfies~\eqref{eq:intro:example_SDE} and~\eqref{eq:intro:example_evolution_jump_rates}. \begin{figure}[h!] \labellist \pinlabel $t$ at 1000 50 \pinlabel $x$ at 50 800 \pinlabel $t$ at 2125 50 \pinlabel $x$ at 1170 800 \pinlabel $v=\partial_p\mathcal{H}(0)$ at 1850 280 \pinlabel $\varepsilon=1$ at 500 800 \pinlabel $\varepsilon\ll 1$ at 1600 800 \pinlabel {\color{red_one}{$X^{\varepsilon}(t)$}} at 400 600 \pinlabel {\color{red_one}{$X^\varepsilon(t)$}} at 1500 600 \endlabellist \centering \includegraphics[scale=.17]{Small_scale_and_large_scale} \caption{Two typical realizations of the spatial component~$X_t^\varepsilon$ of the two-component process~$(X_t^\varepsilon,I_t^\varepsilon)$ satisfying~\eqref{eq:intro:example_SDE} and~\eqref{eq:intro:example_evolution_jump_rates}. On the left, a realization is depiced for~$\varepsilon$ of order one, and on the right for small~$\varepsilon$. Both graphs depict the lifted trajectory on~$\mathbb{R}$.} \label{MM:fig:zooming-out} \end{figure} \smallskip We are interested in the behaviour of the spatial component~$X^\varepsilon$ as $\varepsilon \to 0$. The behaviour of~$X^\varepsilon$ for small~$\varepsilon$ is shown in Figure~\ref{MM:fig:zooming-out}. This figure suggests that for small~$\varepsilon$, the spatial component closely follows a path with a constant velocity. Indeed, when specifying our results of this chapter to the example at hand---the process $(X^\varepsilon, I^\varepsilon)$ defined by~\eqref{eq:intro:example_SDE} and~\eqref{eq:intro:example_evolution_jump_rates}---we find that the spatial component~$X^\varepsilon$ satisfies a pathwise large deviation principle in the limit~$\varepsilon\to 0$. \smallskip To describe this fact more precisely, let~$\mathcal{X}:=C_\mathbb{T}[0,\infty)$ the set of continuous trajectories in~$\mathbb{T}$, equipped with the Skorohod metric, that means the topology of uniform convergence on compact time intervals. The spatial component~$X^\varepsilon$ is a random variable in~$\mathcal{X}$, with a path distribution~$\mathbb{P}(X^\varepsilon\in\cdot)\in\mathcal{P}(\mathcal{X})$. We will show that there exists a rate function~$\mathcal{I}:\mathcal{X}\to[0,\infty]$ with which~$\{X^\varepsilon\}_{\varepsilon>0}$ satisfies a pathwise large deviation principle in the sense of Definition~\ref{def:LDP} from Chapter~1. The gist of this statement is that for any trajectory~$x\in\mathcal{X}$, we have at least intuitively \begin{equation}\label{MM:eq:intro:example-LDP} \mathbb{P}\left(X^\varepsilon\approx x\right) \sim e^{-\varepsilon^{-1} \, \mathcal{I}(x)},\quad\varepsilon\to 0. \end{equation} The rate function is given by means of a Lagrangian~$\mathcal{L}:\mathbb{R}\to[0,\infty)$, \begin{equation}\label{MM:eq:intro:example-LDP-RF} \mathcal{I}(x)=\mathcal{I}_0(x(0)) + \int_0^\infty\mathcal{L}(\partial_t x(t))\, \mathrm{d} t. \end{equation} In there,~$\mathcal{I}_0:\mathbb{T}\to[0,\infty]$ is the rate function of the initial conditions~$X^\varepsilon(0)$, which is given by~$\mathcal{I}_0(x_0)=0$ and~$+\infty$ otherwise---this is because we assume a deterministic initial condition~$X^\varepsilon(0)=x_0$. The Lagrangian is the Legendre dual of a Hamiltonian~$\mathcal{H}:\mathbb{R}\to\mathbb{R}$, that is~$\mathcal{L}(v)=\sup_p [pv-\mathcal{H}(p)]$, and the Hamiltonian is the principal eigenvalue of an associated cell problem described in Lemma~\ref{lemma:LDP_MM:contI:principal_eigenvalue}. We show in Sections~\ref{subsection:results:LDP_switching_MP} and~\ref{section:LDP_in_MM} further below how to obtain the associated cell problem and the principal eigenvalue. \smallskip Here, we focus on how this large-deviation result confirms the claim suggested by Figure~\ref{MM:fig:zooming-out}. The rate function~\eqref{MM:eq:intro:example-LDP-RF} has the following properties: \begin{enumerate}[(i)] \item $\mathcal{I} : \mathcal{X} \rightarrow [0,\infty]$ is nonnegative. \item $\mathcal{I}(x) = 0$ if and only if~$\partial_tx(t)=v$, with~$v=\partial_p\mathcal{H}(0)$. \end{enumerate} These two properties together characterize the unique minimizer of the rate function, and thereby in particular the typical behaviour of~$X^\varepsilon$ for small~$\varepsilon$. Whenever~$\mathcal{I}(x) > 0$ for a path~$x\in\mathcal{X}$, then by~\eqref{MM:eq:intro:example-LDP}, the probability that a realization of~$X^\varepsilon$ is close to~$x$ in the Skorohod metric is exponentially small in $\varepsilon$. More precisely, the large deviation principle implies almost-sure convergence of~$X^\varepsilon$ to the unique minimizer of the rate function (Theorem~\ref{thm:math-formulation-LDP:LDP-implies-as}). \smallskip Equipped with the large deviation principle, we can investigate which sets of potentials and rates~$\{\psi_1,\psi_2,r_{12},r_{21}\}$ induce transport, which means observing a non-zero macroscopic velocity~$v=\partial_p\mathcal{H}(0)$. We do not find general sufficient conditions for transport, but can draw some conclusions if the process~$(X^\varepsilon,I^\varepsilon)$ satisfies \emph{detailed balance}. Here, detailed balance is satisfied if~$r_{12}e^{-\psi_1} = C r_{21}e^{-\psi_2}$ for some constant~$C>0$. This condition implies time-reversibility of~$(X^\varepsilon,I^\varepsilon)$ in the sense of Definition~\ref{intro:def:reversibility}---we clarify this connection in Section~\ref{MM:subsec:det-bal-implies-symmetric-H}. There, we will also show that detailed balance implies symmetry of the Hamiltonian, that is~$\mathcal{H}(p)=\mathcal{H}(-p)$. In particular, we find~$v=0$ under detailed balance. \smallskip We close this section by describing how the stochastic process~$(X^\varepsilon, I^\varepsilon)$ models the movement of a molecular motor on a polymeric filament. The molecular motor consists of two chains whose heads can attach to the filament. A sequence of chemical reactions provides energy that triggers a forward power stroke of a motor head, thereby leading to a spatial displacement of the motor. The spatial component~$X^\varepsilon_t$ corresponds to the position of the molecular motor on the filament, while a change of the configurational component~$I^\varepsilon_t$ corresponds to the event of a chemical reaction. The information of how the motor moves forward is encoded in the potentials. The periodicity of the potential reflects the periodic structure of a filament. One can think of the minima of the potentials as corresponding to the head's binding spots on the filament. Finally, the noise term in~\eqref{eq:intro:example_SDE} models friction arising from collisions of the motor with molecules in the environment. Because of the highly viscous environment, it is common to consider a drift-diffusion process. A justification for this overdamped limit regime is offered for instance by Wang and Elston~\cite{WangElston2007}. When coarse-graining the continuous model to a Markov jump process on the binding spots, we obtain a discrete model. We discuss these jump models in Section~\ref{subsection:results:LDP_in_MM}. \section{Larger context and aim of this chapter} \label{MM:sec:larger-context-and-aim} One inspiration for the subject of this chapter is a series of papers by Perthame, Souganidis and Mirrahimi~\cite{PerthameSouganidis09a, PerthameSouganidis2009Asymmetric, Mirrahimi2013}. There, the authors start from the Fokker-Planck equations associated with $(X^\varepsilon, I^\varepsilon)$ from \eqref{eq:intro:example_SDE} and \eqref{eq:intro:example_evolution_jump_rates}: \begin{align} \begin{cases} \displaystyle \partial_t \rho_\varepsilon^1 = \;\varepsilon \frac{1}{2} \partial_{xx} \rho_\varepsilon^1 + \text{div}_x \left[\rho_\varepsilon^1\,\psi'_1\left(\frac{x}{\varepsilon}\right)\right] + \frac{1}{\varepsilon}r_{21}\left(\frac{x}{\varepsilon}\right)\rho_\varepsilon^2 - \frac{1}{\varepsilon}r_{12}\left(\frac{x}{\varepsilon}\right)\rho_\varepsilon^1,\\ \quad \\ \displaystyle \partial_t \rho_\varepsilon^2 = \; \varepsilon \frac{1}{2} \partial_{xx} \rho_\varepsilon^2 + \text{div}_x \left[\rho_\varepsilon^2\,\psi'_2\left(\frac{x}{\varepsilon}\right)\right] + \frac{1}{\varepsilon}r_{12}\left(\frac{x}{\varepsilon}\right)\rho_\varepsilon^1 - \frac{1}{\varepsilon}r_{21}\left(\frac{x}{\varepsilon}\right)\rho_\varepsilon^2. \end{cases} \label{eq:intro:FP_eq} \end{align} The functions $\{\psi^i,r_{ij}\}$ are taken to be $1$-periodic and smooth. The system of equations \eqref{eq:intro:FP_eq} describes the evolution of the partial probability densities given in terms of the process by~$\rho^i_\varepsilon(t, \mathrm{d} x) = \mathbb{P}\left(X^\varepsilon_t \in \mathrm{d} x, I^\varepsilon_t = i\right)$. \smallskip Perthame and Souganidis define in~\cite{PerthameSouganidis09a} a notion of asymmetry for a given set of functions $\{\psi^i,r_{ij}\}$. This notion is based on migration of density in the stationary Fokker-Planck system ($\partial_t\rho_\varepsilon^i = 0 $ in~\eqref{eq:intro:FP_eq}) on the spatial domain~$(0,1)$ with periodic boundaries. The authors consider~$\psi_2=0$ and find a condition under which the densities $\rho^1_\varepsilon$ and $\rho^2_\varepsilon$ converge to a delta mass supported at one end of the interval, which is refered to as the \emph{motor effect} or as \emph{transport}. In all three papers, Perthame, Souganidis and Mirrahimi address the question of what exactly characterizes the class of potentials and rates $\{\psi^i,r_{ij}\}$ that induce transport, and prove convergence statements for the Fokker-Planck system \eqref{eq:intro:FP_eq}. \smallskip In \cite{PerthameSouganidis09a}, the authors find a sufficient condition for transport in terms of an effective Hamiltonian $\mathcal{H}(p)$ and a total flux $F(p)$, where $p\in\mathbb{R}$. System $\eqref{eq:intro:FP_eq}$ exhibits the motor effect if and only if $\partial_p\mathcal{H} (0)\neq 0$, or equivalently if $F(0)\neq 0$. The effective Hamiltonian is the principal eigenvalue of an associated cell problem, obtained after an exponential change of variables. It is the same principal eigenvalue that appears in the example from above, and we explain in Section~\ref{section:LDP_in_MM} how to obtain it from a large-deviation perspective. Because they consider the stationary system, the information about how fast the density migrates cannot be determined, since that is a question about the dynamics. \smallskip More recently, in~\cite{Mirrahimi2013}, Mirrahimi and Souganidis analysed the system~\eqref{eq:intro:FP_eq} on~$\mathbb{R}^d$, again with~$\psi_2=0$. When taking the limit~$\varepsilon \rightarrow 0$, they find that the sum of partial probabilities converges to a moving delta mass with velocity $v = \partial_p\mathcal{H}(0)$. More precisely, they find~$\rho^1_\varepsilon(t,x)+\rho^2_\varepsilon(t,x)\rightarrow \delta(x-tv)I_0$ in the sense of measures, where $I_0$ is determined by the initial data. This is consistent with the previously found criterion for the motor effect \cite{PerthameSouganidis09a}, $\partial_p\mathcal{H}(0) \neq 0$. Theorem~\ref{thm:results:LDP_cont_MM_Limit_I} further below recovers this result with a stronger form of convergence. \smallskip We point out again that we do not provide any new sufficient conditions for obtaining transport, due to the larger generality of our considerations. We do prove under general conditions that detailed balance leads to a symmetric Hamiltonian (see Theorem~\ref{thm:results:detailed_balance_limit_I} below). This implies that detailed balance has to be broken in order for transport to occur. \smallskip The methods that Perthame, Souganidis and Mirrahimi apply in~\cite{PerthameSouganidis09a, PerthameSouganidis2009Asymmetric, Mirrahimi2013} are inspired by large deviation theory. However, in their papers, they do not explicitly prove large deviations, but prove convergence statements on the level of Fokker-Planck equations. When proving the associated large deviation principles, as we will do in this chapter, there is a clear distinction between the contributions that come from general large deviation theory on the one hand, and the model-specific contributions on the other hand. \smallskip Our aim is not only to prove the large-deviation results, but also to separate those parts of the argument which are general and come from large deviation theory, from those parts that are specific to the model at hand. We make this explicit by considering so-called Markov processes with random switching, a class of stochastic processes that we introduce in Section~\ref{section:switching-MP}. The process introduced above by \eqref{eq:intro:example_SDE} and \eqref{eq:intro:example_evolution_jump_rates} is an example of such a process, and in particular represents a motivating example for considering this class of processes. In Section~\ref{subsection:results:LDP_switching_MP}, we illustrate by means of example how the argument is then separated into large-deviation parts and model-specific parts. \section{Main Results} \label{section:MM:results} In this section, we give an overview of our results. We first define in Section~\ref{section:switching-MP} switching Markov processes. We formulate and explain sufficient conditions under which the spatial component of a switching Markov process satsfies a large deviation principle (Theorem~\ref{thm:results:LDP_switching_MP}). Since the rate functions are a priori of intricate form, we cast the rate functions in action-integral form (Theorem~\ref{thm:results:action_integral_representation}). In summary, by working with switching Markov processes we show which properties the large deviation principles for molecular motors depend on. \smallskip We specialize to models of molecular motors in Section~\ref{subsection:results:LDP_in_MM}, where we state large deviation principles for two limit regimes. The Hamiltonians in the action-integral rate functions are principal eigenvalues of certain cell problems. In Section~\ref{MM:subsec:det-bal-implies-symmetric-H}, we work with variational formulas of such principal eigenvalues in order to study the behaviour of molecular motors under the detailed-balance condition. The main challenge is to derive useful formulas for the Hamiltonians that allow us to draw concrete conclusions. We show symmetry of the Hamiltonians under detailed balance. In particular, this implies $v = \partial_p\mathcal{H}(0)=0$, which means transport can only occur if detailed balance is broken. This result about transport is expected and not new, but follows in our case from a more general symmetry of large deviations. \subsection{Switching Markov processes in a periodic setting} \label{section:switching-MP} We introduce switching Markov processes as certain two-component stochastic processes~$(X^\varepsilon, I^\varepsilon)$ taking values in a state space $E_\varepsilon$. The state space of~$I^\varepsilon$ is a finite set~$\{1,\dots,J\}$, while~$X^\varepsilon$ takes values in some compact Polish space~$E_\varepsilon^X$. We are interested in studying processes in a periodic setting. Therefore, we consider the flat $d$-dimensional torus $\mathbb{T}^d := \mathbb{R}^d / (\ell \cdot \mathbb{Z}^d)$, for some fixed length~$\ell\in\mathbb{N}$. We henceforth omit the dependence on~$\ell$. \begin{condition}[Setting] Fix~$J\in\mathbb{N}$ and let~$\varepsilon = 1/n > 0$ for an integer~$n$. The state space~$E_\varepsilon$ is a product space~$E_\varepsilon := E_\varepsilon^X \times \{1, \dots, J\}$, where~$E_\varepsilon^X$ be a compact Polish space satisfying the following. There are continuous maps $\iota_\varepsilon : E_\varepsilon^X \rightarrow \mathbb{T}^d$ such that for all $x \in \mathbb{T}^d$ there exist $x_\varepsilon \in E_\varepsilon^X$ with which $\iota_\varepsilon(x_\varepsilon) \rightarrow x$ as $\varepsilon \rightarrow 0$.\qed \label{condition:results:general_setting} \end{condition} This condition means that~$E_\varepsilon^X$ is asymptotically dense in the torus~$\mathbb{T}^d$. The typical example is a finite, discrete and periodic lattice with spacing~$\varepsilon$, so that in the limit of~$\varepsilon$ to zero one obtains the torus. Another example is simply~$E_\varepsilon^X\equiv \mathbb{T}^d$. When it is clear from the context, we omit $\iota_\varepsilon$ in the notation. \smallskip We now define switching Markov processes by specifying their generators from the following ingredients: \begin{enumerate}[(1)] \item For~$i\in\{1,\dots,J\}$, we have a map~$L_\varepsilon^{i}:\mathcal{D}(L_\varepsilon^{i}) \subseteq C(E_\varepsilon^X) \rightarrow C(E_\varepsilon^X)$ that is the generator of an~$E_\varepsilon^X$-valued Markov process. \item For~$i,j\in\{1,\dots,J\}$, we have a continuous map~$r_{ij}^\varepsilon:E_\varepsilon^X\to[0,\infty)$. \end{enumerate} With that, define the map~$L_\varepsilon:\mathcal{D}(L_\varepsilon) \subseteq C(E_\varepsilon) \rightarrow C(E_\varepsilon)$ by \begin{equation} L_\varepsilon f(x,i) := L_\varepsilon^{i} f(\cdot,i) (x) + \sum_{j = 1}^J r_{ij}^\varepsilon(x) \left[ f(x,j) - f(x,i) \right], \label{eq:intro:MP_with_switching_L_varepsilon} \end{equation} where the domain is~$\mathcal{D}(L_\varepsilon) = \{ f \in C(E_\varepsilon) \, : \, f(\cdot,i) \in \mathcal{D}(L_\varepsilon^{i}), i = 1, \dots, J \}$. Let~$\mathcal{X}_\varepsilon:=D_{E_\varepsilon}[0,\infty)$ be the set of trajectories in~$E_\varepsilon$ that are right-continuous and have left limits. We equip~$\mathcal{X}_\varepsilon$ with the Skorohod topology~\cite[Section~3.5]{EthierKurtz1986}. For an initial condition~$\mu\in\mathcal{P}(E_\varepsilon)$, we associate a two-component process $(X_t^\varepsilon, I_t^\varepsilon)$ with values in $E_\varepsilon$ to the generator~$L_\varepsilon$ by finding its path distribution~$\mathbb{P}_\mu\in\mathcal{P}(\mathcal{X}_\varepsilon)$. To do so, we assume well-posedness of the associated martingale-problem associated to the pair~$(L_\varepsilon,\mu)$. For the precise statement of the martingale problem, we refer to~\cite[Section~4.3]{EthierKurtz1986}. \begin{condition}[Well-posedness] Let~$\mu \in \mathcal{P}(E_\varepsilon)$. Then existence and uniqueness holds of the $\mathcal{X}_\varepsilon$-martingale problem for $(L_\varepsilon,\mu)$. Denote the solution to the martingale-problem solution of $L_\varepsilon$ by~$\mathbb{P}_\mu$. The map~$E_\varepsilon \ni z \mapsto \mathbb{P}_{\delta_z} \in \mathcal{P}(\mathcal{X}_\varepsilon)$ is Borel measurable with respect to the weak topology on $\mathcal{P}(\mathcal{X}_\varepsilon)$.\qed \label{condition:intro:sol_martinagle_problem} \end{condition} % Condition~\ref{condition:intro:sol_martinagle_problem} is the basic assumption on the processes in~\cite{FengKurtz2006}. A sufficient condition for the measurability is given in~\cite[Theorem~4.4.6]{EthierKurtz1986}. In this chapter, we consider switching Markov processes in the following sense. \begin{definition}[Switching Markov processes in a periodic setting] Let~$(X^\varepsilon,I^\varepsilon)$ be a two-component Markov proces taking values in~$E_\varepsilon = E^X_\varepsilon \times \{1,\dots,J\}$ satisfying Condition~\ref{condition:results:general_setting}. We call~$(X^\varepsilon,I^\varepsilon)$ a \emph{switching Markov process} if its generator~$L_\varepsilon$ is given by~\eqref{eq:intro:MP_with_switching_L_varepsilon} and satisfies Condition~\ref{condition:intro:sol_martinagle_problem}.\qed \label{def:intro:MP_with_switching} \end{definition} We do not give general conditions on a map~$L_\varepsilon$ that imply Condition~\ref{condition:intro:sol_martinagle_problem}. However, all the examples of stochastic processes modelling molecular motors will satisfy this condition. Further details about existence and regularity properties can be found in the book of Yin and Zhu about switching hybrid diffusions~\cite[Part~I]{yin2010hybrid}. \smallskip We close this section by mentioning that the process of the introductory example satisfying~\eqref{eq:intro:example_SDE} and~\eqref{eq:intro:example_evolution_jump_rates} is a switching Markov process. The state space is~$E_\varepsilon=\mathbb{T}\times\{1,2\}$, and its generator is of the form~\eqref{eq:intro:MP_with_switching_L_varepsilon}. The jump rates are given by~$r_{ij}^\varepsilon(x) = r_{ij}(x/\varepsilon) / \varepsilon$, and for~$i=1,2$, we have \begin{equation*} L_\varepsilon^{i}g(x) := -\psi'(x/\varepsilon,i)\,g'(x) + \varepsilon\,g''(x),\quad x\in\mathbb{T}. \end{equation*} This is the generator of a drift-diffusion process on $\mathbb{T}$ satisfying \begin{equation*} \mathrm{d} Y_t^\varepsilon = -\psi'\left((Y_t^\varepsilon/\varepsilon),i\right)\, \mathrm{d} t + \sqrt{2\varepsilon}\, \mathrm{d} B_t. \end{equation*} A scheme of how to obtain a process on the torus~$\mathbb{T}$ is presented for instance in~\cite[Chapter~3.2]{bensoussan2011asymptotic}. \subsection{Large deviation principle for switching Markov processes} \label{subsection:results:LDP_switching_MP} We consider switching Markov processes~$(X^\varepsilon,I^\varepsilon)$ in the sense of Definition~\ref{def:intro:MP_with_switching}, with generators of the form~\eqref{eq:intro:MP_with_switching_L_varepsilon}. The essence of this section is Theorem~\ref{thm:results:LDP_switching_MP}, which provides general conditions under which a pathwise large deviation principle of the spatial component~$X^\varepsilon$. We alert the reader here that we illustrate the concepts and notations by means of an example below Theorem~\ref{thm:results:LDP_switching_MP}. We state the conditions in terms of the nonlinear generators defined as follows. \begin{definition}[Nonlinear generators] \label{MM:def:nonlinear-generators-switching-MP} Let~$L_\varepsilon$ be the map defined by~\eqref{eq:intro:MP_with_switching_L_varepsilon}. The \emph{nonlinear generator} is the map~$H_\varepsilon : \mathcal{D}(H_\varepsilon) \subseteq C(E_\varepsilon) \rightarrow C(E_\varepsilon)$ defined by \begin{equation} H_\varepsilon f(x) := \varepsilon \, e^{-f(x)/\varepsilon} L_\varepsilon (e^{f(\cdot)/\varepsilon})(x), \label{eq:results:H_varepsilon} \end{equation} with the domain~$\mathcal{D}(H_\varepsilon) := \{f \in C(E_\varepsilon) \, : \, e^{f(\cdot)/\varepsilon} \in \mathcal{D}(L_\varepsilon)\}$.\qed \end{definition} We will require the nonlinear generators~$H_\varepsilon$ to converge in the limit~$\varepsilon\to 0$. To formulate this convergence condition, we need to introduce an additional state space~$E'$ for collecting up-scaled variables. The following diagram depicts the relation between the state spaces: \begin{equation*} \begin{tikzcd}[row sep = tiny] & \mathbb{T}^d \times E^\prime \arrow[dd, "\mathrm{proj}_1"] \\ E_\varepsilon \arrow[ur, "(\eta_\varepsilon {,} \eta_\varepsilon^\prime)"] \arrow[dr, "\eta_\varepsilon"'] & \\ & \mathbb{T}^d \end{tikzcd} \end{equation*} % In the diagram,~$\eta_\varepsilon : E_\varepsilon \to \mathbb{T}^d$ is the projection defined by~$\eta_\varepsilon (x,i) := \iota_\varepsilon(x)$, where~$\iota_\varepsilon:E_\varepsilon^X\to\mathbb{T}^d$ is the embedding. The map $\eta_\varepsilon^\prime : E_\varepsilon \to E^\prime$ is continuous. We assume that~$E_\varepsilon$ is asymptotically dense: \begin{enumerate}[(C1)] \item \label{MM:item:C1} For~$(x,z') \in \mathbb{T}^d \times E'$ there are $y_\varepsilon\in E_\varepsilon$ such that $\eta_\varepsilon(y_\varepsilon) \to x$ and $\eta_\varepsilon'(y_\varepsilon) \to z^\prime$ as $\varepsilon \to 0$. \end{enumerate} The limit operator of~$H_\varepsilon$ are generally multivalued, that means defined by a subset~$H\subseteq C(\mathbb{T}^d)\times C(\mathbb{T}^d\times E')$. We assume the following convergence condition: \begin{enumerate}[(C2)] \item \label{MM:item:C2} For any~$(f,g)\in H$, there are functions~$f_\varepsilon\in\mathcal{D}(H_\varepsilon)$ such that \[ \| f\circ\eta_\varepsilon - f_\varepsilon \|_{L^\infty(E_\varepsilon)} \rightarrow 0 \quad \text{ and } \quad \| g\circ (\eta_\varepsilon,\eta_\varepsilon') - H_\varepsilon f_\varepsilon \|_{L^\infty(E_\varepsilon)} \rightarrow 0. \] \end{enumerate} Frequently, for any~$f$ in the domain of~$H$, the corresponding image functions~$g$ are naturally parametrized by a set of functions on~$E'$. \begin{enumerate}[(C3)] \item \label{MM:item:C3} There are a set~$\mathcal{C}\subseteq C(E')$ and functions~$H_{f,\varphi}\in C(\mathbb{T}^d\times E')$ with which \begin{equation*} H = \left\{\left(f,H_{f,\varphi}\right)\,:\,f\in\mathcal{D}(H),\varphi\in\mathcal{C}\right\}. \end{equation*} \end{enumerate} Below the theorem, we illustrate by an example how to find the multivalued operator starting from the nonlinear generators. \begin{theorem}[Large deviation principle for switching processes] Let~$(X^\varepsilon,I^\varepsilon)$ be a switching Markov process in the sense of Definition~\ref{def:intro:MP_with_switching}, with nonlinear generators~$H_\varepsilon$ of Definition~\ref{MM:def:nonlinear-generators-switching-MP}. Suppose that there exists a compact metric space~$E^\prime$ satisfying~\ref{MM:item:C1} and a multivalued operator~$H\subseteq C(\mathbb{T}^d)\times C(\mathbb{T}^d\times E')$ with domain~$\mathcal{D}(H)$ satisfying~$C^\infty(\mathbb{T}^d) \subseteq \mathcal{D}(H) \subseteq C^1(\mathbb{T}^d)$ such that: \begin{enumerate}[(T1)] \item \label{MM:item:T1} The operator~$H$ satisfies~\ref{MM:item:C2} and~\ref{MM:item:C3} from above. For every $\varphi\in\mathcal{C}$ there is a map~$H_\varphi : \mathbb{R}^d \times E^\prime \to \mathbb{R}$ such that for all~$f \in \mathcal{D}(H)$, \begin{equation*} H_{f,\varphi}(x,z^\prime) = H_\varphi(\nabla f(x),z^\prime),\qquad (x,z') \in \mathbb{T}^d\times E'. \end{equation*} \item \label{MM:item:T2} For every $p \in \mathbb{R}^d$, there exists a function $\varphi_p \in \mathcal{C}$ and a constant $\mathcal{H}(p) \in \mathbb{R}$ such that~$H_{\varphi_p}(p,z^\prime)=\mathcal{H}(p)$ for all $z^\prime \in E^\prime$. \end{enumerate} Suppose furthermore that~$\{X^\varepsilon(0)\}_{\varepsilon>0}$ satisfies a large deviation principle in~$\mathbb{T}^d$ with rate function~$\mathcal{I}_0 : \mathbb{T}^d \rightarrow [0,\infty]$. % Then the family of processes $\{X^\varepsilon\}_{\varepsilon>0}$ satisfies a large deviation principle in $D_{\mathbb{T}^d}[0,\infty)$ with a rate function $\mathcal{I} :D_{\mathbb{T}^d}[0,\infty)\rightarrow[0,\infty]$. \label{thm:results:LDP_switching_MP} \end{theorem} The proof of Theorem~\ref{thm:results:LDP_switching_MP} is given in Section~\ref{section:LDP_switching_MP}. The formula for the rate function is not important here, which is why we give it only in the proofs. While Condition~\ref{MM:item:T1} corresponds to the convergence of nonlinear generators, Condition~\ref{MM:item:T2} usually corresponds to solving a principal-eigenvalue problem. The constant~$\mathcal{H}(p)$ is then uniquely determined as the principal eigenvalue of a certain cell problem. Further below, we give feasible conditions on the map $p\mapsto \mathcal{H}(p)$ under which the rate function admits an action-integral representation (Theorem~\ref{thm:results:action_integral_representation} in Section~\ref{subsection:results:action_integral_rep}). Here, we illustrate by an example how conditions~\ref{MM:item:T1} and~\ref{MM:item:T2} can be obtained starting from the nonlinear generators. Even though the example is not a switching Markov process, it shows the features arising from the mixed scales. \paragraph{Example illustrating the general case.} Let~$\mathbb{T}$ be the one-dimensional flat torus, $\psi(\cdot) \in C^\infty(\mathbb{T})$, and consider the process~$X_t^\varepsilon$ solving \begin{equation*} \mathrm{d} X_{t}^\varepsilon = -\psi'(X_t^\varepsilon / \varepsilon) \, \mathrm{d} t + \sqrt{\varepsilon} \, \mathrm{d} B_{t}, \end{equation*} where~$\varepsilon = 1/n$ with some integer $n$. Its generator is given by \begin{equation*} L_\varepsilon f(x) = -\psi'(x/\varepsilon) f'(x) + \varepsilon\, \frac{1}{2} f''(x),\quad f\in C^2(\mathbb{T}). \end{equation*} Therefore the nonlinear generators $H_\varepsilon$ are \begin{equation*} H_\varepsilon f(x)=-\psi'(x/\varepsilon) f'(x)+\frac{1}{2}|f'(x)|^2 + \varepsilon\,\frac{1}{2} f''(x). \end{equation*} The aim is to obtain a limit of $H_\varepsilon$ as $\varepsilon \to 0$. In order to determine the behaviour of $H_\varepsilon f$ for small $\varepsilon$, we have to deal with the problem that the drift-term $\psi'(x/\varepsilon)$ is fastly oscillating as $\varepsilon$ tends to zero. This is solved by considering functions that are of the form~$f_\varepsilon (x) = f(x) + \varepsilon\, \varphi(x/\varepsilon)$. Then we obtain \begin{multline*} H_\varepsilon f_\varepsilon (x)=-\psi'(x/\varepsilon) \cdot \left[f'(x) + \varphi'(x/\varepsilon)\right]+\frac{1}{2} | f'(x) + \varphi'(x/\varepsilon)|^2\\ +\frac{1}{2} \varphi''(x/\varepsilon)+\frac{\varepsilon}{2} f''(x). \end{multline*} We want these images to converge in the limit~$\varepsilon \to 0$. The~$\varepsilon \,\frac{1}{2} f''(x)$ term is of order~$\varepsilon$ and therefore not problematic. The remaining terms are in general oscillating in~$\varepsilon$. However, with the right choice of the function~$\varphi$, one can make this term to be independent of the~$(x/\varepsilon)$-variable, and thereby independent of~$\varepsilon$ altogether. In order to see how, we rewrite~$H_\varepsilon f_\varepsilon$ by introducing the fast spatial variable~$y=x/\varepsilon$, with which we find that \begin{multline} H_\varepsilon f_\varepsilon (x)=e^{-\varphi(y)}\left[ \frac{1}{2} |f'(x)|^2 - \psi'(y) f'(x)+ \left(f'(x) - \psi'(y)\right) \partial_y+ \frac{1}{2} \partial_{yy}\right]e^{\varphi(y)}\\ +\varepsilon\,\frac{1}{2} f''(x) \qquad\left(y=\frac x\varepsilon\right). \end{multline} Hence we aim to find a function $\varphi(\cdot)$ such that the term $e^{-\varphi} [ \cdots ] e^\varphi$ is constant as a function of the $x/\varepsilon$-variable, regarding the $x$-variable as a parameter. This term depends on $x$ only via the derivative of $f$. Hence if we can find such a function~$\varphi$, we can denote the constant by~$\mathcal{H}(\partial_x f(x))$. Then with that choice of the function~$\varphi$, the values of $H_\varepsilon f_\varepsilon$ are given by \begin{equation*} H_\varepsilon f_\varepsilon (x) = \mathcal{H}(\partial_x f(x)) + \mathcal{O}(\varepsilon), \end{equation*} and we find for small $\varepsilon$ that $H_\varepsilon f_\varepsilon(x) \approx \mathcal{H}(\partial_x f(x))$. Making this strategy rigorous can be realized in two steps via~\ref{MM:item:T1} showing convergence of nonlinear generators and~\ref{MM:item:T2} solving a principal-eigenvalue problem, as follows: \smallskip \ref{MM:item:T1}: The images $H_\varepsilon f_\varepsilon(x)$ are given by $H_{f,\varphi}(x,x/\varepsilon) + \varepsilon\, \frac{1}{2} f''(x)$, where % $$ H_{f,\varphi}(x,y) := -\psi'(y) \left[ f'(x) + \varphi'(y) \right] + \frac{1}{2} |f'(x) + \varphi'(y)|^2 + \frac{1}{2} \varphi''(y). $$ % By taking arbitrary $\varphi \in C^2(\mathbb{T})$, we collect all these possible limits of $H_\varepsilon f_\varepsilon$ and summarize them in a multivalued operator % $ H \subseteq C(\mathbb{T}) \times C(\mathbb{T} \times \mathbb{T}) $ % defined by % \begin{equation} H := \{ (f,H_{f,\varphi}) \, : \, f \in C^2(\mathbb{T}) \text{ and } \varphi \in C^2(\mathbb{T}) \}. \label{eq:results:example_H} \end{equation} The set of upscaled variables is~$E'=\mathbb{T}$, and~\ref{MM:item:C1} is satisfied with~$\eta_\varepsilon'(x)=x/\varepsilon$. The nonlinear generator~$H_\varepsilon$ converges to the limit operator~$H$ as demanded in~\ref{MM:item:C2}: for~$(f,H_{f,\varphi}) \in H$, the functions~$f_\varepsilon (x) = f(x) + \varepsilon\, \varphi(x/\varepsilon)$ satisfy \begin{equation*} \sup_{x \in \mathbb{T}} | f(x) - f_\varepsilon(x) | \xrightarrow{\varepsilon\to 0} 0 \quad\text{and}\quad \sup_{x \in \mathbb{T}} | H_{f,\varphi}(x,\eta^\prime_\varepsilon(x)) - H_\varepsilon f_\varepsilon (x) | \xrightarrow{\varepsilon\to 0} 0. \end{equation*} Condition~\ref{MM:item:C3} is satisfied by construction, with~$\mathcal{C}=C^2(\mathbb{T})$. Finally, the images of the limit operator $H$ are given by % \begin{align*} H_{f, \varphi}(x,y) &= e^{-\varphi(y)} \left[ V_{f'(x)}(y) + B_{f'(x)} \right] e^{\varphi(\cdot)}(y) =: H_{\varphi}(f'(x),y), \end{align*} % where~$V_p(y) := \frac{1}{2} p^2 - p \, \psi'(y)$ and~$B_p := (p - \psi'(y)) \partial_y + \frac{1}{2} \partial_{yy}$, for $p \in \mathbb{R}$. \smallskip \ref{MM:item:T2}: Fix~$p\in\mathbb{R}$. Finding a function $\varphi(\cdot)$ such that~$H_{\varphi}(p,y)$ becomes constant as a function of~$y$ is equivalent to finding a constant~$\mathcal{H}(p)$ such that on~$\mathbb{T}$, \begin{equation*} \left[ V_p + B_p \right] e^{\varphi} = \mathcal{H}(p) e^{\varphi}. \end{equation*} This is a principal-eigenvalue problem, where the constant~$\mathcal{H}(p)$ corresponds to the principal eigenvalue. We come back to principal eigenvalues when considering the results about molecular motor models in Section~\ref{subsection:results:LDP_in_MM} and their proofs in Section~\ref{section:LDP_in_MM}. In Section~\ref{appendix:prinipal_ev}, we further outline to what extend the principal-eigenvalue problems that we encounter in this chapter are solved in the literature.\qed \smallskip This example hints at a more general structure comprising all molecular-motor models that we consider in this chapter. The different models are specified by the choice of the $\varepsilon$-scaling, the state space $E^X_\varepsilon$, the spatial dynamics defined by the generators $L^{i}_\varepsilon$, and the reaction rates $r_{ij}^\varepsilon(\cdot)$. However, the proofs of large deviation principles are independent from these choices; they all follow Theorem~\ref{thm:results:LDP_switching_MP}. The model-specific contribution is only to determine in which setting~\ref{MM:item:T1} and~\ref{MM:item:T2} have to be verified. \subsection{Action-integral representation of the rate function} \label{subsection:results:action_integral_rep} In this section, our main goal is to give a feasible condition under which the rate function of Theorem~\ref{thm:results:LDP_switching_MP} is of action-integral form. We say that a rate function~$\mathcal{I}:D_{\mathbb{T}^d}[0,\infty)\to[0,\infty]$ is of action-integral form if there is a convex map~$\mathcal{L}:\mathbb{R}^d\to[0,\infty]$ with which \begin{equation*} \mathcal{I}(x) = \begin{cases} \mathcal{I}_0(x(0))+ \int_0^\infty\mathcal{L} \left(\partial_t x(t)\right) \, \mathrm{d} t &\quad \text{if } x\in \mathcal{A}\mathcal{C}([0,\infty); \mathbb{T}^d),\\ +\infty & \quad \text{otherwise}. \end{cases} \end{equation*} \begin{theorem} Consider the setting of Theorem~\ref{thm:results:LDP_switching_MP}. For~$p\in\mathbb{R}^d$, let~$\mathcal{H}(p)$ be the constant obtained in~\ref{MM:item:T2} of Theorem \ref{thm:results:LDP_switching_MP}. Suppose the following: \begin{itemize} \item[(T3)] The map $p \mapsto \mathcal{H}(p)$ is convex and $\mathcal{H}(0) = 0$. \end{itemize} Then the rate function of Theorem~\ref{thm:results:LDP_switching_MP} is of action-integral form with Lagrangian as the Legendre-Fenchel transform of $\mathcal{H}$, that is~$\mathcal{L}(v)=\sup_{p\in\mathbb{R}^d}\left[p\cdot v - \mathcal{H}(p)\right]$. \label{thm:results:action_integral_representation} \end{theorem} % We give the proof in Section~\ref{section:action_integral}. The argument is based on the general strategy of~\cite[Chapter~8]{FengKurtz2006}. The idea of how to obtain such representations is also outlined in Section~\ref{BG:sec:semigroup-flow-HJ-eq} of Chapter~2 in this thesis. \subsection{Large deviations for models of molecular motors} \label{subsection:results:LDP_in_MM} In this section we formulate large deviation theorems for stochastic processes motivated by molecular motors. The proofs are given in Section~\ref{section:LDP_in_MM}. All proofs are based on verifying the conditions of Theorems~\ref{thm:results:LDP_switching_MP} and~\ref{thm:results:action_integral_representation} above. We first define the continuous model---for a motivation, in particular of the $\varepsilon$-scaling, we refer to Section~\ref{subsec:model-of-molecular-motor}. \begin{definition}[Continuous model] The pair~$(X^\varepsilon, I^\varepsilon)$ is a switching Markov process in~$E_\varepsilon = \mathbb{T}^d \times \{1,\dots,J\}$ with generator~$L_\varepsilon$ defined by \begin{multline} L_\varepsilon f(x,i) := b^i(x/\varepsilon) \cdot \nabla_x f(\cdot,i) (x) + \frac{\varepsilon}{2} \Delta_x f(\cdot,i) (x)\\ + \sum_{j = 1}^J \frac{1}{\varepsilon} \gamma(\varepsilon) r_{ij}(x/\varepsilon) \left[ f(x,j) - f(x,i) \right], \label{eq:intro:L_varepsilon_cont_MM} \end{multline} where~$\gamma(\varepsilon)>0$,~$r_{ij}(\cdot) \in C^\infty(\mathbb{T}^d; [0,\infty))$, and~$b^i(\cdot) \in C^\infty(\mathbb{T}^d)$. This is an example of a switching Markov process with generators~$L_\varepsilon^{i}$ defined on the core~$C^2(\mathbb{T}^d)$ by \begin{equation*} L^{i}_\varepsilon g(x) := b^i(x/\varepsilon) \cdot \nabla g(x) + \varepsilon \,\frac{1}{2} \Delta g(x), \end{equation*} and rates~$r_{ij}^\varepsilon(x)=(\gamma(\varepsilon)/\varepsilon)r_{ij}(x/\varepsilon)$. The domain of~$L_\varepsilon$ is the set given by~$\mathcal{D}(L_\varepsilon) = \{ f(x,i)\,:\, f(\cdot,i) \in \mathcal{D}(L_\varepsilon^{i})\}$.\qed \label{def:intro:cont_MM} \end{definition} \begin{definition}\label{MM:def:irreducible-matrix} Let~$J\in\mathbb{N}$. We call a matrix~$A\in\mathbb{R}^{J\times J}$ \emph{irreducible} if there is no decomposition of~$\{1,\dots,J\}$ into two disjoint sets $\mathcal{J}_1$ and $\mathcal{J}_2$ such that $A_{ij} = 0$ whenever $i \in \mathcal{J}_1$ and $j \in \mathcal{J}_2$.\qed \end{definition} \begin{theorem}[Continuous model, limit I] Let $(X^\varepsilon_t, I^\varepsilon_t)$ be the Markov process of Definition \ref{def:intro:cont_MM} with~$\gamma\equiv 1$. Assume that the matrix~$R$ with entries $R_{ij} = \sup_{y \in \mathbb{T}^d}r_{ij}(y)$ is irreducible. Suppose furthermore that the family of initial conditions $X^\varepsilon(0)$ satisfies a large deviation principle in $\mathbb{T}^d$ with rate function $\mathcal{I}_0 :\mathbb{T}^d \rightarrow [0,\infty]$. Then the family of stochastic processes $\{X^\varepsilon\}_{\varepsilon > 0}$ satisfies a large deviation principle in $C_{\mathbb{T}^d}[0,\infty)$ with rate function of action-integral form. The Hamiltonian~$\mathcal{H}(p)$ is the principal eigenvalue of an associated cell problem described in~\eqref{eq:LDP_MM:contI:cell_problem} of Lemma~\ref{lemma:LDP_MM:contI:principal_eigenvalue}. % \label{thm:results:LDP_cont_MM_Limit_I} \end{theorem} The example of Section~\ref{subsec:model-of-molecular-motor} corresponds to~$d = 1$,~$J = 2$ and~$b^i=-\psi'(\cdot,i)$. The irreducibility condition is imposed to solve the principal-eigenvalue problem that we obtain, and is inspired by what Guido Sweers assumes to solve a coupled system of elliptic PDE's~\cite{Sweers92}. \smallskip The parameter~$\gamma(\varepsilon)$ models an additional time-scale separation of the components. For large~$\gamma$, the spatial component is effectively driven by potentials averaged over the stationary measure of the fast configurational component. The following theorem shows that if~$\gamma(\varepsilon)\to\infty$, then the large deviation principle is governed by an averaged Hamiltonian. \begin{theorem}[Continuous model, limit II] Let $(X^\varepsilon_t, I^\varepsilon_t)$ be the Markov process of Definition~\ref{def:intro:cont_MM}, with~$\gamma(\varepsilon) \rightarrow \infty$ as~$\varepsilon \rightarrow 0$. Assume that for every~$y\in\mathbb{T}^d$, the matrix~$R(y)$ with entries~$R(y)_{ij}=r_{ij}(y)$ is irreducible. Suppose furthermore that the family of random variables $\{X^\varepsilon(0)\}_{\varepsilon > 0}$ satisfies a large deviation principle in $\mathbb{T}^d$ with rate function $\mathcal{I}_0 :\mathbb{T}^d \rightarrow [0,\infty]$. Then~$\{X^\varepsilon\}_{\varepsilon > 0}$ satisfies a large deviation principle in $C_{\mathbb{T}^d}[0,\infty)$ with rate function of action-integral form. The Hamiltonian $\overline{\mathcal{H}}(p)$ is the principal eigenvalue of an associated averaged cell problem described in Lemma~\ref{lemma:LDP_MM:contII:principal_eigenvalue}. \label{thm:results:LDP_cont_MM_Limit_II} \end{theorem} In the discrete model, the spatial component is not a drift-diffusion process, but a jump process on a discrete periodic lattice. We consider only nearest-neighbor jumps. We use the integer $n$ as the scaling parameter. For~$\ell\in\mathbb{N}$, we denote by~$\mathbb{T}_{\ell, n}$ the discrete one-dimensional flat torus of length $\ell$, lattice spacing $1/n$ and with $n \cdot \ell$ points. As a set,~$\mathbb{T}_{\ell, n} \simeq \{0, 1/n, \dots, \ell-1/n\}$ with periodic boundary. \begin{definition}[Discrete model] The pair~$(X^n, I^n)$ be a switching Markov process in $E_n = \mathbb{T}_{\ell, n} \times \{1,\dots,J\}$ with generator~$L_n$ defined on~$\mathcal{D}(L_n) = C(E_n)$, \begin{multline}\label{eq:intro:L_N_discr_MM} L_nf(x,i) = n r_+^i(nx) \left[ f(x + 1/n, i) - f(x,i) \right] + n r_-^i(nx) \left[ f(x - 1/n, i) - f(x,i) \right] \\ + \sum_{j = 1}^J n \gamma(n) r_{ij}(nx) \left[ f(x,j) - f(x,i) \right], \end{multline} where~$r_{ij}(\cdot) : \mathbb{T}_{\ell, 1} \rightarrow [0,\infty)$,~$r_\pm^i : \mathbb{T}_{\ell, 1} \rightarrow (0,\infty)$, and~$\gamma(n)>0$. To connect with our definition of switching Markov processes, the generators $L_n^i$ are \begin{align*} L^i_n g(x):=n r_+^i(nx) \left[ g(x + 1/n) - g(x) \right]+n r_-^i(nx) \left[ g(x - 1/n) - g(x) \right].\tag*\qed \end{align*} \label{def:intro:discr_MM} \end{definition} The discrete lattice $\mathbb{T}_{\ell, n}$ covers the continuous torus $\mathbb{T}_\ell = \mathbb{R}/({\ell \cdot \mathbb{Z}})$ in the limit~$n\to\infty$. \begin{theorem}[Discrete model, limit I] Let $(X^n_t,I^n_t)$ be the Markov process from Definition \ref{def:intro:discr_MM}, with $\gamma\equiv 1$. Suppose that the matrix~$R$ with entries defined by~$R_{ij} = \sup_{k \in \mathbb{T}_{\ell, 1}}r_{ij}(k)$ is irreducible. Suppose furthermore that~$\{X^n(0)\}_{n\in\mathbb{N}}$ satisfies a large deviation principle in $\mathbb{T}_\ell$ with rate function $\mathcal{I}_0 : \mathbb{T}_\ell \rightarrow [0,\infty]$. Then~$\{X^n\}_{n \in \mathbb{N}}$ satisfies a large deviation principle in $D_{\mathbb{T}_\ell}[0,\infty)$ with rate function $\mathcal{I} : D_{\mathbb{T}_\ell}[0,\infty) \rightarrow [0,\infty]$ of action-integral form. The Hamiltonian~$\mathcal{H}(p)$ is the principal eigenvalue of a cell problem described in Lemma~\ref{lemma:LDP_MM:discrI:principal_ev}. \label{thm:results:LDP_discr_MM_Limit_I} \end{theorem} If~$\gamma(n)$ is large, the spatial component~$X^n_t$ is driven by the average jump rates that result from averaging over the stationary distribution of the configurational component~$I^n_t$. If~$\gamma(n)\to\infty$, large deviations are characterized by an averaged Hamiltonian. \begin{theorem}[Discrete model, limit II] Let $(X^n_t,I^n_t)$ be the Markov process from Definition \ref{def:intro:discr_MM}, with $\gamma(n) \rightarrow \infty$ as $n \rightarrow \infty$. In addition to the assumptions of Theorem \ref{thm:results:LDP_discr_MM_Limit_I}, suppose that for each $ k \in \mathbb{T}_{\ell,1} \simeq \{0,1, \dots, \ell-1\}$, there exists a stationary measure $\mu_k \in \mathcal{P}(\{1,\dots,J\})$ for the jump process on $\{1,\dots,J\}$ with frozen jump rates $r_{ij}(k)$. Suppose furthermore that~$\{X^n(0)\}_{n \in \mathbb{N}}$ satisfies a large deviation principle in $\mathbb{T}_\ell$ with rate function $\mathcal{I}_0 : \mathbb{T}_\ell \rightarrow [0,\infty]$. Then $\{X^n_t|_{t \geq 0}\}_{n \in \mathbb{N}}$ satisfies a large deviation principle in $D_{\mathbb{T}_\ell}[0,\infty)$ with rate function of action-integral form. The Hamiltonian is the principal eigenvalue of an averaged cell problem described in Lemma~\ref{lemma:LDP_MM:discrII:principal_ev}. \label{thm:results:LDP_discr_MM_Limit_II} \end{theorem} \subsection{Detailed balance implies symmetric Hamiltonians} \label{MM:subsec:det-bal-implies-symmetric-H} In this section we show how the large deviation principles can be used to analyse which sets of potentials and rates induce transport on macroscopic scales. To that end, we consider the generator defined in~\eqref{eq:intro:L_varepsilon_cont_MM}, with~$b^i(y)=-\nabla_y\psi_i(y)$. We say that the set of potentials and rates~$\{r_{ij},\psi_i\}$ satisfies \emph{detailed balance} if for all~$i,j\in\{1,\dots,J\}$ and~$y\in\mathbb{T}^d$, we have \begin{align}\label{MM:eq:detailed-balance} r_{ij}(y) e^{-2\psi_i(y)}=r_{ji}(y) e^{-2\psi_j(y)}. \end{align} Let us motivate detailed balance. The Fokker-Planck equations of~$(X^\varepsilon,I^\varepsilon)$ are \begin{equation*} \partial_t \rho_\varepsilon^i = \varepsilon\frac{1}{2}\Delta\rho_\varepsilon^i+\mathrm{div}_x\left[\rho_\varepsilon^i\nabla_y\psi_i(x/\varepsilon)\right] +\frac{1}{\varepsilon} \sum_{j=1}^Jr_{ji}(x/\varepsilon)\rho_\varepsilon^j,\qquad i=1,\dots,J, \end{equation*} with~$r_{ii}:=-\sum_{j\neq i}r_{ij}$. In general, the stationary measure~$\pi_\varepsilon\in\mathcal{P}(\mathbb{T}^d\times\{1,\dots,J\})$ satisfying~$\partial_t\pi_\varepsilon=0$ is not known explicitly. Define the total flux~$J$ by \begin{equation*} J = \sum_iJ_i\,,\qquad J_i(t,x):=-\varepsilon \frac{1}{2}\nabla_x \rho_\varepsilon^i(t,x) - \rho_\varepsilon^i(t,x) \nabla_y\psi_i(x/\varepsilon). \end{equation*} Since~$0=\partial_t\sum_i\pi_\varepsilon^i=-\mathrm{div}_x\sum_iJ_i$, the total flux is constant if the system is stationary. Detailed balance is achieved if in addition, 1) each~$J_i$ is constant and 2) the flux between any two configurations~$i$ and~$j$ is balanced. If~$J_i$ is constant, then the stationary component~$\pi_\varepsilon^i$ is a Boltzmann distribution, that means there are constants~$C_i$ such that~$\pi_\varepsilon^i( \mathrm{d} x)=C_ie^{-2\psi_i(x/\varepsilon)} \mathrm{d} x$. The constants are inessential and can be absorbed into the potentials (since constant shifts of the potentials do not affect the dynamics), with which we find the stationary measure \begin{equation*} \pi_\varepsilon( \mathrm{d} x \mathrm{d} i) = Z^{-1}\,e^{-2\psi_i(x/\varepsilon)}\, \mathrm{d} x \mathrm{d} i,\quad Z = \sum_i\int e^{-2\psi_i(x/\varepsilon)}\, \mathrm{d} x. \end{equation*} Regarding 2), we find from~$\partial_t\pi_\varepsilon=0$ by summing over~$i$ that \begin{equation*} 0=\sum_j \left(r_{ji}\pi_\varepsilon^j-r_{ij}\pi_\varepsilon^i\right). \end{equation*} The detailed-balance condition~\eqref{MM:eq:detailed-balance} requires that each term in the summation vanishes. This motivates the notion of \emph{detailed} balance---if the system is stationary, then the flow from~$i$ to~$j$ is equal to the flow from~$j$ to~$i$. \smallskip Detailed balance implies time-reversibility of the process~$(X^\varepsilon,I^\varepsilon)$ in the sense of Definition~\ref{intro:def:reversibility}. This follows from the fact that symmetry of the generator is equivalent to time-reversibility~\cite[Chapter~II, Proposition~5.3]{Liggett2004}. A calculation shows that the generator~$L_\varepsilon$ is symmetric with respect to the stationary measure~$\pi_\varepsilon$; for all~$f,g\in\mathcal{D}(L_\varepsilon)$, we have~$\langle L_\varepsilon f,g\rangle_{\pi_\varepsilon} = \langle f,L_\varepsilon g\rangle_{\pi_\varepsilon}$. \begin{theorem}[Detailed balance implies a symmetric Hamiltonian] Let~$(X^\varepsilon_t, I^\varepsilon_t)$ be the stochastic process of Definition~\ref{def:intro:cont_MM} with~$b^i=-\nabla_y\psi_i$, where the~$\psi_i$ are smooth potentials. Suppose that the assumptions of Theorem~\ref{thm:results:LDP_cont_MM_Limit_I} and the detailed-balance condition~\eqref{MM:eq:detailed-balance} are satisfied. Then the Hamiltonian satisfies~$\mathcal{H}(p) = \mathcal{H}(-p)$ for all~$p\in\mathbb{R}^d$. \label{thm:results:detailed_balance_limit_I} \end{theorem} % \begin{theorem}[Separation of time scales implies a symmetric Hamiltonian] Let the stochastic process~$(X^\varepsilon_t, I^\varepsilon_t)$ of Definition~\ref{def:intro:cont_MM} with~$b^i=-\nabla\psi^i$ satisfy the assumptions from Theorem \ref{thm:results:LDP_cont_MM_Limit_II}. Suppose in addition that the rates $r_{ij}(\cdot)$ are constant on $\mathbb{T}^d$. Then $\overline{\mathcal{H}}(p) = \overline{\mathcal{H}}(-p)$, where $\overline{\mathcal{H}}(p)$ is the Hamiltonian from Theorem \ref{thm:results:LDP_cont_MM_Limit_II}. \label{thm:results:symmetry_limit_II} \end{theorem} In both situations, the macroscopic velocity given by $v = \partial_p\mathcal{H}(0)$ vanishes due to the symmetry of the Hamiltonians. Theorem~\ref{thm:results:symmetry_limit_II} confirms the numerical results of Weng, Peskin and Elston~\cite[Section~4.3]{WangPeskinElston2003}. Since the proofs of Theorems~\ref{thm:results:detailed_balance_limit_I} and~\ref{thm:results:symmetry_limit_II} are solely based on a suitable formula for~$\mathcal{H}(p)$, we give them here---the formulas of~$\mathcal{H}(p)$ are proven in Section~\ref{subsection:detailed_balance}. Since the derivation of these formulas is similar, we only give the argument for the more involved case of Theorem~\ref{thm:results:detailed_balance_limit_I}. \begin{proof}[Proof of Theorem~\ref{thm:results:detailed_balance_limit_I}] We prove in Proposition~\ref{prop:results:detailed_balance_limit_I} that under the detailed-balance condition, the principal eigenvalue~$\mathcal{H}(p)$ is given by % $$ \mathcal{H}(p) = \sup_{\mu \in \mathbf{P}} \left[ K_p(\mu) - \mathcal{R}(\mu) \right], $$ % where $\mathbf{P} \subset \mathcal{P}(E^\prime)$ is a subset of probability measures on $E^\prime = \mathbb{T}^d \times \{1, \dots, J\}$ specified in Proposition~\ref{prop:results:detailed_balance_limit_I}, $\mathcal{R}(\mu)$ is the relative Fisher information specified in~\eqref{MM:eq:relative-Fisher-information}, and $K_p(\mu)$ is given by % \begin{multline*} K_p(\mu)= \inf_{\phi}\bigg\{ \sum_{i = 1}^J \int_{\mathbb{T}^d} \left( \frac{1}{2}|\nabla \phi_i(x) + p|^2 - \sum_{j = 1}^J r_{ij}(x) \right) \, \mathrm{d} \mu_i(x) \\+ \sum_{i, j = 1}^J \int_{\mathbb{T}^d} \pi_{ij}(x) \sqrt{\overline{\mu}_i(x) \overline{\mu}_j(x)} e^{\psi_j(x) + \psi_i(x)} \cosh{(\phi(x,j) - \phi(x,i))} \, \mathrm{d} x \bigg\}, \end{multline*} % where $\pi_{ij}(x) = r_{ij}(x) e^{-2\psi_i(x)}$, the infimum is taken over vectors of functions $\phi_i = \phi(\cdot,i) \in C^2(\mathbb{T}^d)$, and $ \mathrm{d} \mu_i(x) = \overline{\mu}_i(x) \mathrm{d} x$. \smallskip Let~$\mu \in \mathbf{P}$. We show that~$K_p(\mu) = K_{-p}(\mu)$, which implies~$\mathcal{H}(p) = \mathcal{H}(-p)$. Since~$\cosh(\cdot)$ is symmetric, the sum in which the $\cosh(\cdot)$ terms appear is invariant under transforming as $\phi \to (-\phi)$, in the sense that for % $$ C(\phi):= \sum_{i, j = 1}^J \int_{\mathbb{T}^d} \pi_{ij}(x) \sqrt{\overline{\mu}_i(x) \overline{\mu}_j(x)} e^{\psi_j(x) + \psi_i(x)} \cosh{(\phi(x,j) - \phi(x,i))} \, \mathrm{d} x, $$ % we have $C(\phi) = C(-\phi)$. Hence the bijective transformation $\phi \to (-\phi)$ implies the claimed symmetry~$K_p(\mu) = K_{-p}(\mu)$. \end{proof} % \begin{proof}[Sketch of proof of Theorem~\ref{thm:results:symmetry_limit_II}] Under the detailed-balance condition, one can prove that the principal eigenvalue $\overline{\mathcal{H}}(p)$ is given by % $$ \overline{\mathcal{H}}(p) = \sup_{\mu \in \mathbf{P}} \left[ K_p(\mu) - \mathcal{R}(\mu) \right],\quad K_p(\mu) = \inf_{\varphi} \frac{1}{2} \int_{\mathbb{T}^d} | \nabla \varphi + p|^2 \, \mathrm{d} \mu, $$ where $\mathbf{P} \subset \mathcal{P}(\mathbb{T}^d)$ is a subset of the probability measures on $\mathbb{T}^d$, \[ \mathbf{P} = \left\{ \mu \in \mathcal{P}(\mathbb{T}^d) \, : \, \mu \ll \mathrm{d} x, \, \mathrm{d} \mu = \overline{\mu} \mathrm{d} x, \, \text{ and } \nabla \left( \log \overline{\mu} \right) \in L^2_{\mu}(\mathbb{T}^d) \right\}. \] The map~$\mathcal{R}$ is the relative Fisher information; with the stationary measure~$\nu$ of the jump process on~$\{1,\dots,J\}$ with rates~$r_{ij}$, we have \begin{equation*} \mathcal{R}(\mu) = \frac{1}{8}\int_{\mathbb{T}^d}\left|\nabla\log\left(\frac{\overline{\mu}}{e^{-2\overline{\psi}}}\right)\right|^2\, \mathrm{d}\mu,\quad \overline{\psi}(x)=\sum_i \nu_i\,\psi_i(x). \end{equation*} We have~$K_p(\mu) = K_{-p}(\mu)$, since the bijective transformation $\varphi \to (-\varphi)$ leaves the infimum invariant. This implies~$\overline{\mathcal{H}}(p) = \overline{\mathcal{H}}(-p)$. \end{proof} With a similar analysis, we can study the behaviour of molecular motors under external forces. Let $(X^\varepsilon_t, I^\varepsilon_t)$ be the stochastic process from Theorem \ref{thm:results:LDP_cont_MM_Limit_I} in dimension $d = 1$ with drift~$b^i(y)=F - \psi'(y,i)$, where~$F$ is a constant modelling an external force and~$\psi \in C^\infty(\mathbb{T})$ is a smooth periodic potential. The process~$(X^\varepsilon_t, I^\varepsilon_t)$ is $\mathbb{T} \times \{1,\dots,J\}$-valued and satisfies % $$ \mathrm{d} X^\varepsilon_t = (F - \psi'((X^\varepsilon_t / \varepsilon), I^\varepsilon_t))\, \mathrm{d} t + \sqrt{\varepsilon} \, \mathrm{d} B_t, $$ where $I^\varepsilon_t$ a jump process on $\{1,\dots,J\}$ with jump rates~$\frac{1}{\varepsilon} r_{ij}\left(x/\varepsilon\right)$. In this case, the Hamiltonian is given by % \begin{multline*} \mathcal{H}(p) = \frac{1}{2} |p + F|^2 - \frac{1}{2} F^2 \\ + \inf_{\varphi} \sup_{(y,i)} \bigg[ \frac{1}{2} \varphi''(y,i) + (p + F - \psi'(y,i)) \varphi'(y,i) - \psi'(y,i) p \\+ \sum_{i = 1}^J r_{ij}(y) \left( e^{\varphi(y,j) - \varphi(y,i)} - 1 \right) \bigg]. \end{multline*} Using detailed balance, this Hamiltonian is symmetric around $(-F)$; one can deal with the variational terms similar as above. Since~$\mathcal{H}(0) = 0$ and~$\mathcal{H}(p)$ is strictly convex, this means that the model predicts a positive force-velocity feedback, since~$F > 0$ implies~$\partial_p\mathcal{H}(0) > 0$, and~$F < 0$ implies~$\partial_p\mathcal{H}(0) < 0$. Establishing a similar result for systems not satisfying detailed balance would be interesting. \section{Proof of large deviations of switching processes} \label{section:LDP_switching_MP} In this section, we prove~Theorem~\ref{thm:results:LDP_switching_MP} (large deviations of switching processes) and Theorem~\ref{thm:results:action_integral_representation} (action-integral representation of the rate function). To do so, we exploit the connection of pathwise large deviations to Hamilton-Jacobi equations~\cite{FengKurtz2006}. In Section~\ref{appendix:LDP_via_CP}, we adapt of~\cite[Theorem~7.18]{FengKurtz2006} to our compact setting. Then we prove Theorem~\ref{thm:results:LDP_switching_MP} in Section~\ref{MM:sec:proof-LDP-switching-MP}, and Theorem~\ref{thm:results:action_integral_representation} in Section~\ref{section:action_integral}. \subsection{Pathwise large deviations via comparison principle} \label{appendix:LDP_via_CP} In the following definitions,~$E$ and~$E^\prime$ are compact metric spaces. In the examples of our note, the space $E$ corresponds to $\mathbb{T}^d$, and $E^\prime$ to the space of upscaled variables. In this section,~$\text{BUSC}(E),\text{BLSC}(E)$ denote the sets of bounded and upper (lower) semicontinuous functions on~$E$, and $\text{BLSC}(E)$ for the bounded and lower semicontinuous functions on~$E$. We adapt~\cite[Definition~7.1]{FengKurtz2006} to the compact setting. % % \begin{definition}[Viscosity solutions] Let $H \subseteq C(E) \times C(E\times E^\prime)$ be a multivalued operator with domain~$\mathcal{D}(H) \subseteq C(E)$. Let~$h\in C(E)$ and~$\tau>0$. \begin{itemize} \item[i)] $u_1\in \text{BUSC}(E)$ is a viscosity subsolution of $(1 - \tau H) u = h$ if for all $(f,g)\in H$ there exists a point $(x,z^\prime)\in E\times E^\prime$ such that % \[ (u_1-f)(x)=\sup(u_1-f)\quad\text{and}\quad u_1(x)-\tau g(x,z^\prime)-h(x)\leq 0. \] % \item[ii)] $u_2\in \text{BLSC}(E)$ is a viscosity supersolution of $(1 - \tau H) u = h$ if for all $(f,g)\in H$ there exists a point $(x,z^\prime)\in E\times E^\prime$ such that % \[ (f-u_2)(x)=\sup(f-u_2)\quad\text{and}\quad u_2(x)-\tau g(x, z^\prime)-h(x)\geq 0. \] % \item[iii)] $u_1\in\text{BUSC}(E)$ is a strong viscosity subsolution of $(1 - \tau H) u = h$ if for all $(f,g) \in H$ and $x\in E$, whenever % \[ (u_1-f)(x)=\sup(u_1-f), \] % then there exists a $z^\prime\in E^\prime$ such that % \[ u_1(x)-\tau g(x,z^\prime)-h(x)\leq 0. \] % Similarly for strong supersolutions. \end{itemize} % A function $u\in C(E)$ is called a viscosity solution of $(1 - \tau H) u = h$ if it is both a viscosity sub- and supersolution. \label{def:appendix:viscosity_solutions_multivalued_op} \end{definition} % % \begin{definition}[Comparison Principle]\quad\\ We say that the \emph{comparison principle} holds for viscosity sub- and supersolutions of~$(1-\tau H)u=h$ if for any viscosity subsolution~$u_1$ and viscosity supersolution~$u_2$, we have~$u_1\leq u_2$ on~$E$. \label{def:appendix:CP_single_valued_operator} \end{definition} In the following adaptation of~\cite[Theorem 7.18]{FengKurtz2006}, the compact Polish spaces $E_n$, $E$ and $E^\prime$ are related with continuous embeddings $\eta_n$ and $\eta_n^\prime$ by $$ \begin{tikzcd}[row sep = tiny] & E \times E^\prime \arrow[dd, "\mathrm{proj}_1"] \\ E_n \arrow[ur, "(\eta_n {,} \eta_n^\prime)"] \arrow[dr, "\eta_n"'] & \\ & E \end{tikzcd} $$ % such that for any $x \in E$, there exist $x_n \in E_n$ such that $\eta_n(x_n) \to x$ as $n \to \infty$. % \begin{theorem} Let $L_n$ be the generator of an $E_n$-valued process $Y^n$, and let $H_n$ be the nonlinear generators defined by $H_n f = \frac{1}{n} e^{-nf} L_n e^{nf}$. Let the compact Polish spaces $E_n, E$ and $E'$ be related as in the above diagram. In addition, suppose: \begin{enumerate}[(i)] \item(Condition 7.9 of \cite{FengKurtz2006} on the state spaces) There exists an index set $Q$ and approximating state spaces $A_n^q \subseteq E_n$, $q \in Q$, such that the following holds: % \begin{enumerate}[(a)] \item For $q_1, q_2 \in Q$, there exists $q_3 \in Q$ such that $A_n^{q_1} \cup A_n^{q_2} \subseteq A_n^{q_3}$. \item For each $x \in E$, there exists $q \in Q$ and $y_n \in A^q_n$ such that $\eta_n(y_n) \to x$ as $n \to \infty$. \item For each $q \in Q$, there exist compact sets $K_1^q \subseteq E$ and $K_2^q \subseteq E \times E^\prime$ such that % \[ \sup_{y \in A^q_n} \inf_{x \in K_1^q} d_E(\eta_n(y), x) \xrightarrow{n\to\infty} 0, \] and \[ \sup_{y \in A^q_n} \inf_{(x,z) \in K_2^q} \left[ d_E(\eta_n(y),x)) + d_{E'}(\eta_n'(y),z) \right] \xrightarrow{n\to\infty} 0. \] % \item For each compact $K \subseteq E$, there exists $q \in Q$ such that % $ K \subseteq \liminf \eta_n(A_n^q). $ % \end{enumerate} % \item (Convergence Condition 7.11 of \cite{FengKurtz2006}) There exist $H_\dagger, H_{\ddagger} \subseteq C(E) \times C(E \times E^\prime)$ which are the limit of the $H_n$'s in the following sense: \begin{enumerate}[(a)] \item For each $(f,g) \in H_\dagger$, there exist $f_n \in \mathcal{D}(H_n)$ such that \[ \sup_n \left( \sup_{x \in E_n} |f_n (x)| + \sup_{x \in E_n} |H_n f_n (x)| \right) < \infty, \] and for each $q\in Q$,~$\lim_{n \to \infty} \sup_{y \in A_n^q}|f_n(y) - f(\eta_n(y))| = 0.$ % % Furthermore, for each $q \in Q$ and every sequence $y_n \in A_n^q$ such that $\eta_n (y_n) \to x \in E$ and $\eta'_n(y_n) \to z^\prime \in E^\prime$, we have~$\limsup_{n \to \infty} H_n f_n (y_n) \leq g(x,z^\prime)$. \item For each $(f,g) \in H_\ddagger$, there exist $f_n \in \mathcal{D}(H_n)$ (not necessarily the same as above in (a)) such that \[ \sup_n \left( \sup_{x \in E_n} |f_n (x)| + \sup_{x \in E_n} |H_n f_n (x)| \right) < \infty, \] and for each $q\in Q$,~$\lim_{n \to \infty} \sup_{y \in A_n^q}|f_n(y) - f(\eta_n(y))| = 0$. % Furthermore, for each $q \in Q$ and every sequence $y_n \in E_n$ such that $\eta_n (y_n) \to x \in E$ and $\eta'_n(y_n) \to z^\prime \in E^\prime$, we have~$\liminf_{n \to \infty} H_n f_n (y_n) \geq g(x,z^\prime)$. % \end{enumerate} \item (Comparison principle) For each $h \in C(E)$ and $\tau > 0$, the comparison principle holds for viscosity subsolutions of $(1 - \tau H_\dagger) u = h$ and viscosity supersolutions of $(1 - \tau H_\ddagger) u = h$. \end{enumerate} % Let $X^n_t := \eta_n (Y^n_t)$ be the corresponding $E$-valued process. If $\{X^n(0)\}_{n \in \mathbb{N}}$ satisfies a large deviation principle in $E$ with rate function $\mathcal{I}_0 : E \to [0,\infty]$, then % $\{X^n\}_{n \in \mathbb{N}}$ satisfies the large deviation principle with rate function $\mathcal{I} : C_E[0,\infty) \to [0,\infty]$ given as in~\eqref{eq:RF-with-semigroup-approach} and~\eqref{BG:eq:RF-1d-marginals} of Chapter~2. \label{thm:appendix:LDP_via_CP:Jin_LDP_thm} \end{theorem} The formula for the rate function involves a limiting semigroup~$V(t)$, which we discuss in Chapter~2. We do not repeat its formula here, since we will not work with it. \subsection{Proof of large deviation principle} \label{MM:sec:proof-LDP-switching-MP} Here we prove Theorem~\ref{thm:results:LDP_switching_MP} by verifying the conditions of Theorem~\ref{thm:appendix:LDP_via_CP:Jin_LDP_thm}, which are convergence of nonlinear generators (Proposition~\ref{prop:LDP_switching_MP:convergence_condition_sufficient}) and the comparison principle (Proposition~\ref{prop:LDP_switching_MP:comparison_principle}). The rest of this section below the proof of Theorem~\ref{thm:results:LDP_switching_MP} is devoted to proving the propositions. We point out that the main challenge is to prove the comparison principle using~\ref{MM:item:T1} and~\ref{MM:item:T2}. \begin{proposition} In the setting of Theorem~\ref{thm:results:LDP_switching_MP}, Condition~(i) of Theorem~\ref{thm:appendix:LDP_via_CP:Jin_LDP_thm} is satisfied. Let $H \subseteq C^1(\mathbb{T}^d) \times C(\mathbb{T}^d \times E^\prime)$ be a multivalued operator satisfying~\ref{MM:item:T1}. Then~$H$ satisfies the convergence condition (ii) of Theorem \ref{thm:appendix:LDP_via_CP:Jin_LDP_thm}. \label{prop:LDP_switching_MP:convergence_condition_sufficient} \end{proposition} % % \begin{proposition} In the setting of~Theorem \ref{thm:results:LDP_switching_MP}, let $H \subseteq C^1(\mathbb{T}^d) \times C(\mathbb{T}^d \times E^\prime)$ be a multivalued operator satisfying conditions~\ref{MM:item:T1} and~\ref{MM:item:T2}. Then for $\tau > 0$ and $h \in C(\mathbb{T}^d)$, the comparison principle holds for viscosity sub- and supersolutions of % $ (1 - \tau H) u =h. $ % \label{prop:LDP_switching_MP:comparison_principle} \end{proposition} % \begin{proof}[Proof of Theorem \ref{thm:results:LDP_switching_MP}] By Proposition~\ref{prop:LDP_switching_MP:convergence_condition_sufficient}, conditions (i) and (ii) of Theorem~\ref{thm:appendix:LDP_via_CP:Jin_LDP_thm} hold with the single operator $H = H_\dagger = H_\ddagger$. By Proposition~\ref{prop:LDP_switching_MP:comparison_principle}, the comparison principle is satisfied for $(1 - \tau H)u = h$, and hence condition (iii) of Theorem~\ref{thm:appendix:LDP_via_CP:Jin_LDP_thm} holds with a single operator $H = H_\dagger = H_\ddagger$. Therefore the conditions of Theorem~\ref{thm:appendix:LDP_via_CP:Jin_LDP_thm} are satisfied, and the large deviation principle follows. \end{proof} \begin{proof}[Proof of Proposition \ref{prop:LDP_switching_MP:convergence_condition_sufficient}] Recall that with $E_\varepsilon = E_\varepsilon^X \times \{1,\dots,J\}$ and $\iota_\varepsilon : E^X_\varepsilon \to \mathbb{T}^d$ from Condition~\ref{condition:results:general_setting}, the state spaces are related as in the following diagram, in which $\eta_\varepsilon : E_\varepsilon \to \mathbb{T}^d$ is defined by $\eta_\varepsilon(x,i) = \iota_\varepsilon(x)$ and $\eta_\varepsilon' : E_\varepsilon \to E'$ is a continuous map, % $$ \begin{tikzcd}[row sep = tiny] & \mathbb{T}^d \times E^\prime \arrow[dd, "\mathrm{proj}_1"] \\ E_\varepsilon \arrow[ur, "(\eta_\varepsilon {,} \eta_\varepsilon^\prime)"] \arrow[dr, "\eta_\varepsilon"'] & \\ & \mathbb{T}^d \end{tikzcd} $$ % In the notation of Theorem \ref{thm:appendix:LDP_via_CP:Jin_LDP_thm}, we have $E = \mathbb{T}^d$. For verifying the general condition (i) of Theorem \ref{thm:appendix:LDP_via_CP:Jin_LDP_thm} on the approximating state spaces $A_\varepsilon^q$, we take the singleton $Q = \{q\}$ and set $A_\varepsilon^q := E_\varepsilon$. Then part (a) holds, and parts (b) and~(d) are a consequence of Condition~\ref{condition:results:general_setting} on $E_\varepsilon$, which says that for any $x \in \mathbb{T}^d$, there exist $ x_\varepsilon \in E_\varepsilon^X$ such that $\iota_\varepsilon(x_\varepsilon) \to x$. Part (c) follows by taking the compact sets $K_1^q := \mathbb{T}^d$ and $K_2^q := \mathbb{T}^d \times E^\prime$. \smallskip We verify the convergence Condition (ii) of Theorem \ref{thm:appendix:LDP_via_CP:Jin_LDP_thm}. By~\ref{MM:item:T1}, part~\ref{MM:item:C2}, there exist $f_\varepsilon \in \mathcal{D}(H_\varepsilon)$ such that % $$ \| f\circ\eta_\varepsilon - f_\varepsilon \|_{L^\infty(E_\varepsilon)} \xrightarrow{\varepsilon\to 0} 0 \quad\text{and}\quad \| H_{f,\varphi}\circ (\eta_\varepsilon, \eta_\varepsilon') - H_\varepsilon f_\varepsilon \|_{L^\infty(E_\varepsilon)} \xrightarrow{\varepsilon\to 0} 0. $$ % With these $f_\varepsilon$, both conditions (a) and (b) are simultaneously satisfied for the operator $H = H_\dagger = H_\ddagger$, where condition~\ref{MM:item:C1} guarantees that for any point $(x,z') \in \mathbb{T}^d \times E'$ there exist $y_\varepsilon \in E_\varepsilon$ such that both $\eta_\varepsilon(y_\varepsilon) \to x$ and $\eta_\varepsilon'(y_\varepsilon) \to z'$. The boundedness % $$ \sup_{\varepsilon > 0} \left( \sup_{y \in E_\varepsilon}|f_\varepsilon(y)| + \sup_{y \in E_\varepsilon}|H_\varepsilon f_\varepsilon(y)|\right) < \infty $$ follows the uniform-convergence condition~\ref{MM:item:C2} and compactness of~$E_\varepsilon$. \end{proof} For proving Proposition \ref{prop:LDP_switching_MP:comparison_principle}, we use two operators~$H_1,H_2$ that are derived from a multivalued limit $H$. Define~$H_1,H_2$ by \begin{equation*} H_1f(x) := \inf_{\varphi} \sup_{z^\prime \in E^\prime} H_{f, \varphi}(x,z^\prime) \quad\text{and}\quad H_2f(x) := \sup_{\varphi} \inf_{z^\prime \in E^\prime} H_{f, \varphi}(x,z^\prime), \end{equation*} with equal domains~$\mathcal{D}(H_1) = \mathcal{D}(H_2) := \mathcal{D}(H)$. Since the images of~$H$ are of the form $H_{f,\varphi}(x,z^\prime) = H_{\varphi}(\nabla f(x),z^\prime)$, the operators $H_1$ and $H_2$ are as well of the form $H_1 f(x) = \mathcal{H}_1(\nabla f(x))$ and $H_2 f(x) = \mathcal{H}_2(\nabla f(x))$, with two maps $\mathcal{H}_1,\mathcal{H}_2 : \mathbb{R}^d \rightarrow \mathbb{R}$. % We prove Proposition \ref{prop:LDP_switching_MP:comparison_principle} with the following Lemmas. \begin{lemma}[Local operators admit strong solutions] Let % $ H \subseteq C^1(\mathbb{T}^d) \times C(\mathbb{T}^d\times E^\prime) $ % be a multivalued limit operator satisfying (T1) from Theorem \ref{thm:results:LDP_switching_MP}. Then for any $\tau > 0$ and $h \in C(\mathbb{T}^d)$, viscosity solutions of % $ (1 - \tau H) u =h $ % coincide with strong viscosity solutions in the sense of Definition \ref{def:appendix:viscosity_solutions_multivalued_op}. \label{lemma:LDP_switching_MP:local_op_strong_sol} \end{lemma} % \begin{lemma}[$H_1$ and $H_2$ are viscosity extensions] Let $H$ be a multivalued operator satisfying~\ref{MM:item:T1} and~\ref{MM:item:T2} of Theorem~\ref{thm:results:LDP_switching_MP}. For all $h \in C(\mathbb{T}^d)$ and $\tau > 0$, strong viscosity subsolutions $u_1$ of % $ (1 - \tau H) u =h $ % are strong viscosity subsolutions of % $ (1 - \tau H_1) u =h, $ % and strong viscosity supersolutions $u_2$ of % $ (1 - \tau H) u = h $ % are strong viscosity supersolutions of % $ (1 - \tau H_2) u =h. $ % \label{lemma:LDP_switching_MP:H_to_H1-H2} \end{lemma} % \begin{lemma}[$H_1$ and $H_2$ are ordered] Let $H$ be a multivalued operator satisfying~\ref{MM:item:T1} and~\ref{MM:item:T2} of Theorem~\ref{thm:results:LDP_switching_MP}. Then~$\mathcal{H}_1(p)\leq \mathcal{H}_2(p)$ for all~$p\in\mathbb{R}^d$.. \label{lemma:LDP_switching_MP:H1_leq_H2} \end{lemma} % \begin{proof}[Proof of Proposition \ref{prop:LDP_switching_MP:comparison_principle}] Let $u_1$ be a subsolution and $u_2$ be a supersolution of the equation $(1 - \tau H)u = h$. By Lemma~\ref{lemma:LDP_switching_MP:local_op_strong_sol}, $u_1$ is a strong subsolution and $u_2$ a strong supersolution of $(1 - \tau H) u = h$, respectively. By Lemma~\ref{lemma:LDP_switching_MP:H_to_H1-H2}, $u_1$ is a strong subsolution of $(1 - \tau H_1) u = h$, and $u_2$ is a strong supersolution of $H_2$. \smallskip With that, we establish below the inequality % \begin{equation} \max_{\mathbb{T}^d} (u_1 - u_2) \leq \tau \left[ \mathcal{H}_1(p_\delta) - \mathcal{H}_2(p_\delta) \right] + h(x_\delta) - h(x_\delta^\prime), \label{eq:LDP_switching_MP:CP_visc_ineq} \end{equation} % with some $x_\delta, x_\delta^\prime \in \mathbb{T}^d$ such that $\text{dist}(x_\delta,x_\delta^\prime) \rightarrow 0$ as $\delta \rightarrow 0$, and certain $p_\delta \in \mathbb{R}^d$. Then using that $h\in C(\mathbb{T}^d)$ is uniformly continuous since~$\mathbb{T}^d$ is compact, and that $\mathcal{H}_1(p_\delta) \leq \mathcal{H}_2(p_\delta)$ by Lemma~\ref{lemma:LDP_switching_MP:H1_leq_H2}, we can further estimate as % $$ \max_{\mathbb{T}^d} (u_1 - u_2) \leq h(x_\delta) - h(x_\delta^\prime) \leq \omega_h(\text{dist}(x_\delta,x_\delta^\prime)), $$ % where $\omega_h : [0,\infty) \rightarrow [0,\infty)$ is a modulus of continuity satisfying $\omega_h(r_\delta) \rightarrow 0$ for $r_\delta \rightarrow 0$. Then $(u_1 - u_2) \leq 0$ follows by taking the limit $\delta \rightarrow 0$. \smallskip We are left with proving \eqref{eq:LDP_switching_MP:CP_visc_ineq}. The line of argument is similar to the one outlined at the end of Section~\ref{subsec:LDP-via-visc-sol} of Chapter~2. Define $\Phi_\delta : \mathbb{T}^d \times \mathbb{T}^d \rightarrow \mathbb{R}$ by % $$ \Phi_\delta(x,x^\prime) := u_1(x) - u_2(x^\prime) - \frac{\Psi(x,x^\prime)}{2 \delta}, $$ % where % \begin{equation} \Psi(x,x^\prime) := \sum_{j=1}^d \sin^2\left( \pi(x_j - x_j^\prime) \right), \qquad \text{ for all } x,x^\prime \in \mathbb{T}^d. \label{eq:LDP_switching_MP:dist_function_E} \end{equation} % Then $\Psi \geq 0$, and $\Psi(x,x^\prime) = 0$ holds if and only if $x = x^\prime$, and % \begin{equation} \nabla_1 \left[ \Psi(\cdot,x^\prime)\right](x) = - \nabla_2 \left[ \Psi(x,\cdot) \right](x^\prime) \qquad \text{ for all } x,x^\prime \in \mathbb{T}^d. \label{eq:LDP_switching_MP:dist_function_asymm_deriv} \end{equation} % By boundedness and upper semicontinuity of $u_1$ and $(-u_2)$, and compactness of $\mathbb{T}^d \times \mathbb{T}^d$, for each $\delta > 0$ there exists a pair $(x_\delta,x_\delta^\prime) \in \mathbb{T}^d \times \mathbb{T}^d$ such that $$ \Phi_\delta(x_\delta,x_\delta^\prime) = \max_{x,x^\prime} \Phi_\delta(x,x^\prime). $$ % Using~$\Phi_\delta(x_\delta, x_\delta) \leq \Phi(x_\delta,x_\delta^\prime)$ and boundedness of~$u_2$, we obtain % $$ \Psi(x_\delta,x_\delta^\prime) \leq 2\delta \left( u_2(x_\delta) - u_2(x_\delta^\prime) \right) \leq 4 \delta \|u_2\|_{L^\infty(\mathbb{T}^d)} = \mathcal{O}(\delta), $$ % hence~$\Psi(x_\delta,x_\delta^\prime) \rightarrow 0$ as~$\delta \rightarrow 0$. \smallskip In order to use the sub- and supersolution properties of $u_1$ and $u_2$, introduce the smooth test functions $f^\delta_1$ and $f^\delta_2$ as % $$ f_1^\delta(x) := u_2(x_\delta^\prime) + \frac{\Psi(x,x_\delta^\prime)}{2\delta} \quad \text{ and } \quad f_2^\delta(x^\prime) := u_1(x_\delta) - \frac{\Psi(x_\delta,x^\prime)}{2\delta}, $$ % Then $f_1^\delta, f_2^\delta \in C^\infty(\mathbb{T}^d) \subseteq \mathcal{D}(H)$ are both in the domain of $H$, and hence in the domain of $H_1$ and $H_2$, respectively. Furthermore, $(u_1 - f_1)$ has a maximum at $x = x_\delta$, and $(f_2 - u_2)$ has a maximum at $x^\prime = x_\delta^\prime$, by definition of $(x_\delta,x_\delta^\prime)$ and $\Phi_\delta$. Since $u_1$ is a strong subsolution of $(1 - \tau H_1) u = h$, % $$ u_1(x_\delta) - \tau H_1 f_1^\delta(x_\delta) - h(x_\delta) \leq 0, $$ % and since $u_2$ is a strong supersolution of $(1 - \tau H_2) u = h$, % $$ u_2(x_\delta^\prime) - \tau H_2 f_2^\delta(x_\delta^\prime) - h(x_\delta^\prime) \geq 0. $$ % Thereby, we can estimate $\max (u_1 - u_2)$ as % \begin{align*} \max_{\mathbb{T}^d}(u_1 - u_2) &\leq \Phi_\delta(x_\delta,x_\delta^\prime) \\ &\leq u_1(x_\delta) - u_2(x_\delta^\prime) \\ &\leq \tau \left[ H_1 f_1^\delta(x_\delta)) - H_2 f_2^\delta(x_\delta^\prime)\right] + h(x_\delta) - h(x_\delta^\prime) \\ &= \tau \left[ \mathcal{H}_1 (\nabla f_1^\delta(x_\delta)) - \mathcal{H}_2 (\nabla f_2^\delta(x_\delta^\prime))\right] + h(x_\delta) - h(x_\delta^\prime). \end{align*} % By \eqref{eq:LDP_switching_MP:dist_function_asymm_deriv}, % $ \nabla f_1^\delta(x_\delta) = \nabla f_2^\delta(x_\delta^\prime) =: p_\delta \in \mathbb{R}^d, $ % which establishes \eqref{eq:LDP_switching_MP:CP_visc_ineq}, and thereby finishes the proof. \end{proof} % The rest of the section, we prove Lemmas \ref{lemma:LDP_switching_MP:local_op_strong_sol}, \ref{lemma:LDP_switching_MP:H_to_H1-H2} and \ref{lemma:LDP_switching_MP:H1_leq_H2}. Regarding Lemma \ref{lemma:LDP_switching_MP:local_op_strong_sol}, a proof for single valued operators is given in~\cite[Lemma 9.9]{FengKurtz2006}. \begin{proof}[Proof of Lemma \ref{lemma:LDP_switching_MP:local_op_strong_sol}] Let $\tau>0$, $h\in C(\mathbb{T}^d)$. We verify that subsolutions are strong subsolutions. For a subsolution $u_1\in\text{BUSC}(\mathbb{T}^d)$ of $(1-\tau H)u=h$ and $(f,H_{f,\varphi}) \in H$, let $x\in \mathbb{T}^d$ be such that~$(u_1-f)(x)=\sup(u_1-f)$. The function~$\tilde{f}(x^\prime)=\Psi(x^\prime,x)$ with $\Psi(x^\prime,x)$ from~\eqref{eq:LDP_switching_MP:dist_function_E} is smooth and therefore in the domain $\mathcal{D}(H)$. Then $x$ is the unique maximal point of $(u_1-(f+\tilde{f}))$, % \[ (u_1-(f+\tilde{f}))(x)=\sup_{\mathbb{T}^d}(u_1-(f+\tilde{f})). \] % Since~$u_1$ is a subsolution, there exists at least one element $(x,z^\prime)\in \mathbb{T}^d\times E^\prime$ such that the subsolution inequality with test function~$f+\tilde{f}$ holds. Since $x$ is the only point maximising $u_1-(f+\tilde{f})$, the viscosity-subsolution inequality with test function $(f+\tilde{f})$ holds for the point $x\in \mathbb{T}^d$ and some point $z^\prime\in E^\prime$: % \[ u_1(x)-\tau H_{f+\tilde{f},\varphi}(x,z^\prime)-h(x)\leq 0. \] Since~$\nabla\tilde{f}(x)=0$ and~$H$ depends only on gradients by~\ref{MM:item:T1}, we obtain % \[ H_{f+\tilde{f},\varphi}(x,z^\prime) = H_{\varphi}\left((\nabla f+\nabla \tilde{f})(x),z^\prime\right) = H_{\varphi}(\nabla f(x),z^\prime) = H_{f,\varphi}(x,z^\prime). \] Hence the same point~$(x,z')$ satisfies % \[ u_1(x)-\tau H_{f,\varphi}(x,z^\prime)-h(x)\leq 0. \] % Thus~$u_1$ is a strong subsolution. The argument is similar for the supersolution case, where one can use $(-\tilde{f})$. \smallskip Vice versa, when given a strong sub- or supersolution $u_1$ or $u_2$, for every $f\in\mathcal{D}(H)$, $(u_1-f)$ and $(f-u_2)$ attain their suprema at some $x_1,x_2\in \mathbb{T}^d$ due to the continuity assumptions on the domain of $H$, the half continuity properties of $u_1$ and $u_2$, and compactness of $\mathbb{T}^d$. By the strong solution properties, the sub- and supersolution inequalities follow. % \end{proof} % % \begin{proof}[Proof of Lemma \ref{lemma:LDP_switching_MP:H_to_H1-H2}] Let $u_1\in\text{BUSC}(\mathbb{T}^d)$ be a strong subsolution of~$(1-\tau H)u=h$, that is for any $(f,H_{f, \varphi})\in\tilde{H}$, if~$(u_1-f)(x)=\sup(u_1-f)$ for a point~$x\in \mathbb{T}^d$, then there exists~$z^\prime\in E^\prime$ such that % $$ u_1(x)-\tau H_{f, \varphi}(x,z^\prime)-h(x)\leq 0. $$ % Let $f\in\mathcal{D}(H_1)=\mathcal{D}(H)$ and $x\in \mathbb{T}^d$ be such that $(u_1-f)(x)=\sup(u_1-f)$. For any $\varphi$ there exists a point $z^\prime\in E^\prime$ such that the above subsolution inequality holds. Therefore for all~$x$, % $$ u_1(x)-h(x) \leq \tau\sup_{z^\prime\in E^\prime} H_{f, \varphi}(x,z^\prime). $$ % Since the point $x\in \mathbb{T}^d$ is independent of $\varphi$, we obtain % \[ u_1(x)-H_1f(x)-h(x)\overset{\text{def}}{=} u_1(x)-\tau\inf_{\varphi}\sup_{z^\prime \in E^\prime} H_{f, \varphi}(x,z^\prime)-h(x)\leq 0. \] % The argument is similar for supersolutions. \end{proof} % % \begin{proof}[Proof of Lemma \ref{lemma:LDP_switching_MP:H1_leq_H2}] By~\ref{MM:item:T2},~\ref{MM:item:C3}, for every $p\in\mathbb{R}^d$ there exists a $\varphi_p\in C(E^\prime)$ such that for all $z^\prime\in E^\prime$, % \[ H_{\varphi_p}(p,z^\prime)=\mathcal{H}(p). \] % Thus % \[ \sup_{z^\prime \in E^\prime} H_{\varphi_p}(p,z^\prime) = \mathcal{H}(p) = \inf_{z^\prime\in E^\prime}H_{\varphi_p}(p, z^\prime). \] Taking the infimum and supremum over~$\varphi$, we find % \begin{align*} \mathcal{H}_1(p) &= \inf_{\varphi}\sup_{z^\prime}H_{\varphi}(p,z^\prime)\\ &\leq \sup_{z^\prime}H_{\varphi_p}(p,z^\prime) = \mathcal{H}(p) =\inf_{z^\prime}H_{\varphi_p}(p,z^\prime)\\ &\leq \sup_{\varphi}\inf_{z^\prime}H_{\varphi}(p,z^\prime) = \mathcal{H}_2(p), \end{align*} which finishes the proof. \end{proof} \subsection{Proof of action-integral representation} \label{section:action_integral} In this section, we first prove Theorem~\ref{thm:results:action_integral_representation} by means of Proposition~\ref{prop:action_integral:bold_H} below. The rest of the section is then devoted to proving Proposition~\ref{prop:action_integral:bold_H}. % % \begin{proposition} Under the same assumptions of Theorems~\ref{thm:results:LDP_switching_MP} and~\ref{thm:results:action_integral_representation}, define the operator $\mathbf{H} : \mathcal{D}(\mathbf{H}) \subseteq C^1(\mathbb{T}^d) \to C(\mathbb{T}^d)$ on the domain $\mathcal{D}(\mathbf{H}) = \mathcal{D}(H)$ by setting $\mathbf{H} f(x) := \mathcal{H}(\nabla f(x))$. Then: % \begin{enumerate}[(i)] \item The Legendre-Fenchel transform $\mathcal{L}(v) := \sup_{p \in \mathbb{R}^d} (p\cdot v - \mathcal{H}(p))$ and the operator $\mathbf{H}$ satisfy Conditions 8.9, 8.10 and 8.11 of \cite{FengKurtz2006}. % \item For all $\tau > 0$ and $h \in C(\mathbb{T}^d)$, the comparison principle holds for % $ (1 - \tau \mathbf{H}) u = h. $ % \item For all $\tau > 0$ and $h \in C(\mathbb{T}^d)$, viscosity solutions of $(1 - \tau H) u = h$ are also viscosity solutions of $(1 - \tau \mathbf{H}) u = h$. % \end{enumerate} \label{prop:action_integral:bold_H} \end{proposition} % \begin{proof}[Proof of Theorem \ref{thm:results:action_integral_representation}] Let $V(t) : C(\mathbb{T}^d) \to C(\mathbb{T}^d)$ be the semigroup $$ V(t) = \lim_{m \to \infty} \left[ \left( 1 - \frac{t}{m} H \right)^{-1} \right]^m, $$ % where the resolvant $(1 - \tau H)^{-1}$ is defined by means of unique viscosity solutions to the equation $(1 - \tau H) u = h$, and the limit is made precise in Theorem 6.13, (d), of \cite{FengKurtz2006}. Furthermore, let $V_{\mathrm{NS}}(t) : C(\mathbb{T}^d) \to C(\mathbb{T}^d)$ be the Nisio semigroup with cost function $\mathcal{L}$, that is $V_{\mathrm{NS}}(t)$ is defined as % $$ V_{\text{NS}}(t) f(x) = \sup_{ \substack{ \gamma \in \mathrm{AC}_{\mathbb{T}^d}[0,\infty) \\ \gamma(0) = x}} \left[ f(\gamma(t)) - \int_0^t \mathcal{L}(\dot{\gamma}(s)) \, \mathrm{d} s \right], $$ % where $\mathrm{AC}_{\mathbb{T}^d}[0,\infty)$ denotes the set of absolutely continuous paths in the torus. In Definition 8.1 and Equation 8.10 in \cite{FengKurtz2006}, relaxed controls are considered in order to cover a general class of possible cost functions. Since the Legendre-Fenchel transform $\mathcal{L}(v)$ is convex, it follows that $V_{\mathrm{NS}}(t)$ equals the semigroup given in 8.10 of \cite{FengKurtz2006} by using that $\lambda_s = \delta_{\dot{x}(s)}$ is an admissible control, and by applying Jensen's inequality, an argument that is given for example in Theorem 10.22 in \cite{FengKurtz2006}. Below we prove that $V(t) = V_{\mathrm{NS}}(t)$; by Theorem 8.14 in \cite{FengKurtz2006}, if $V(t) = V_{\mathrm{NS}}(t)$ on $C(\mathbb{T}^d)$, then the rate function of our Theorem~\ref{thm:results:LDP_switching_MP} satisfies the control representation 8.18 of \cite{FengKurtz2006}. The action-integral representation follows by again applying Jensen's inequality. \smallskip It remains to prove that $V(t) = V_{\mathrm{NS}}(t)$. By (i) and (ii) of Proposition \ref{prop:action_integral:bold_H}, the Conditions of~\cite[Theorem 8.27]{FengKurtz2006} are satisfied, so that we have $V_{\mathrm{NS}}(t) = \mathbf{V}(t)$, where $\mathbf{V}(t)$ is generated by means of unique viscosity solutions to the equation $(1- \tau \mathbf{H}) u = h$ as shown in~\cite[Theorem 8.27]{FengKurtz2006}, that is % $$ \mathbf{V}(t) = \lim_{m \to \infty} \left[ \left( 1 - \frac{t}{m} \mathbf{H} \right)^{-1} \right]^m. $$ % Part (iii) of Proposition \ref{prop:action_integral:bold_H} implies by Corollary 8.29 of \cite{FengKurtz2006} that $V(t) = \mathbf{V}(t)$. \end{proof} \begin{proof}[Proof of (i) in Proposition \ref{prop:action_integral:bold_H}] % We first show that the following conditions imply Conditions 8.9, 8.10 and 8.11 of \cite{FengKurtz2006}, which are formulated in order to cover a more general and non-compact setting. % \begin{enumerate}[(i)] % \item The function $\mathcal{L}:\mathbb{R}^d\rightarrow[0,\infty]$ is lower semicontinuous and for every $C \geq 0$, the level set % $ \{v\in \mathbb{R}^d\,:\,\mathcal{L}(v)\leq C\} $ % is relatively compact in $\mathbb{R}^d$. % \item For all $f\in\mathcal{D}(H)$ there exists a right continuous, nondecreasing function $\psi_f:[0,\infty)\rightarrow[0,\infty)$ such that for all $(x_0,v)\in \mathbb{T}^d \times \mathbb{R}^d$, % \[ |\nabla f(x_0)\cdot v|\leq \psi_f(\mathcal{L}(v))\qquad \text{and} \qquad \lim_{r\rightarrow\infty}\frac{\psi_f(r)}{r}=0. \] % \item For each $x_0\in E$ and every $f\in\mathcal{D}(\mathbf{H})$, there exists an absolutely continuous path $x : [0,\infty) \to \mathbb{T}^d$ such that % \begin{equation} \int_0^t \mathcal{H}(\nabla f (x(s))) \, ds = \int_0^t \left[ \nabla f(x(s)) \cdot \dot{x}(s) - \mathcal{L}(\dot{x}(s)) \right] \, ds. \label{eq:action_integral:optimal_path_for_H} \end{equation} % \end{enumerate} % Then regarding Condition 8.9 of \cite{FengKurtz2006}, the operator $A f(x,v) := \nabla f(x) \cdot v$ on the domain $\mathcal{D}(A) = \mathcal{D}(H)$ satisfies (1). For (2), we can take $\Gamma = \mathbb{T}^d \times \mathbb{R}^d$, and for $x_0 \in \mathbb{T}^d$, take the pair $(x,\lambda)$ with $x(t) = x_0$ and $\lambda(dv \times dt) = \delta_{0} (dv) \times dt$. Part (3) is a consequence of the above Item~(i). Part (4) follows since $\mathbb{T}^d$ is compact. Part (5) is implied by the above Item~(ii). Condition~8.10 is implied by Condition~8.11 and the fact that $\mathbf{H}1 = 0$, see Remark 8.12 (e) in \cite{FengKurtz2006}. Finally, Condition~8.11 is implied by the above Item~(iii), with the control $\lambda(dv \times dt) = \delta_{\dot{x}(t)}(dv) \times dt$. \smallskip We turn to verifying (i), (ii) and (iii). Since $\mathcal{H}(0) = 0$, we have $\mathcal{L} \geq 0$. The Legendre-transform $\mathcal{L}$ is convex, and lower semicontinuous since the map $\mathcal{H}(p)$ is convex and finite-valued, hence in particular continuous. For $C \geq 0$, we prove that the set $\{v\in\mathbb{R}^d\,:\,\mathcal{L}(v)\leq C\}$ is bounded, and hence is relatively compact. For any $p \in \mathbb{R}^d$ and $v \in \mathbb{R}^d$, we have $p \cdot v\leq \mathcal{L}(v) + \mathcal{H}(p)$. Thereby, if $\mathcal{L}(v)\leq C$, then % $ |v| = \sup_{|p|=1} p \cdot v \leq \sup_{|p|=1} \left[ \mathcal{L}(v) + \mathcal{H}(p) \right] \leq C + C_1, $ % where $C_1$ exists due to continuity of $\mathcal{H}$. Then for $R := C + C_1$, % $ \{ v \, : \, \mathcal{L}(v) \leq C \} \subseteq \{ v \, : \, |v| \leq R\}, $ % thus $\{\mathcal{L}\leq C\}$ is a bounded subset in $\mathbb{R}^d$. % \smallskip Item~(ii) can be proven as in~\cite[Lemma 10.21]{FengKurtz2006}. We finish the proof by verifying (iii). This is shown for instance in~\cite[Lemma 3.2.3]{Kraaij2016} under the assumption of continuous differentiability of $\mathcal{H}(p)$, by solving a differential equation with a globally bounded vectorfield. Here, we verify (iii) under the milder assumption of convexity of $\mathcal{H}(p)$ by solving a suitable subdifferential equation. For $p_0 \in \mathbb{R}^d$, define the subdifferential $\partial \mathcal{H}(p_0)$ at $p_0$ as the set % $$ \partial \mathcal{H}(p_0) := \{\xi \in \mathbb{R}^d \; | \; \forall p \in \mathbb{R}^d\;: \mathcal{H}(p) \geq \mathcal{H}(p_0) + \langle \xi, p - p_0\rangle\}. $$ % We shall solve for any $f \in C^1(\mathbb{T}^d)$ the subdifferential equation~$\dot{x} \in \partial \mathcal{H}(\nabla f(x))$. This means we show that for any initial condition~$x_0\in \mathbb{T}^d$, there exists an absolutely continuous path $x:[0,\infty)\rightarrow \mathbb{T}^d$ satisfying both~$x(0)=x_0$ and~$\dot{x}(t) \in \partial \mathcal{H}(\nabla f(x(t)))$ almost everywhere on $[0,\infty)$. Then \eqref{eq:action_integral:optimal_path_for_H} follows by noting that % $ \mathcal{H}(\nabla f(y))\geq \nabla f(y)\cdot v-\mathcal{L}(v) $ % for all $y \in \mathbb{T}^d$ and $v \in \mathbb{R}^d$, by convex duality. In particular, % $ \mathcal{H}(\nabla f(x(s)))\geq \nabla f(x(s))\cdot \dot{x}(s)-\mathcal{L}(\dot{x}(s)), $ % and integrating gives one inequality in \eqref{eq:action_integral:optimal_path_for_H}. Regarding the other inequality, since $\dot{x}\in\partial \mathcal{H}(\nabla f(x))$, we know that for almost every $t \in [0,\infty)$ and for all $p\in\mathbb{R}^d$, we have % $ \mathcal{H}(p) \geq \mathcal{H}(\nabla f(x(t)))+\dot{x}(t)\cdot(p-\nabla f(x(t))). $ % Therefore, a.e. on $[0,\infty)$, \begin{align*} \mathcal{H}(\nabla f(x(t))) &\leq \nabla f(x(t))\cdot\dot{x}(t)-\sup_{p\in\mathbb{R}^d}\left[p\cdot \dot{x}(t)-\mathcal{H}(p)\right] \\&= \nabla f(x(t))\cdot\dot{x}(t)-\mathcal{L}(\dot{x}(t)), \end{align*} and integrating gives the other inequality. \smallskip For solving the subdifferential equation, define $F: \mathbb{R}^d \to 2^{ \mathbb{R}^d}$ by $F(x):=\partial \mathcal{H}(\nabla f(x))$, where the function $f \in C^1(\mathbb{T}^d)$ is regarded as a periodic function on $\mathbb{R}^d$. We apply Lemma 5.1 in \cite{De92} for solving $\dot{x}\in F(x)$. The conditions of Lemma 5.1 in the case of $\mathbb{R}^d$ are satisfied if the following holds: $\sup_{x \in \mathbb{R}^d} \|F(x)\|_{\text{sup}}$ is finite, for all $x\in \mathbb{R}^d$, the set $F(x)$ is non-empty, closed and convex, and the map $x\mapsto F(x)$ is upper semicontinuous. \smallskip For $\xi \in F(x)$, note that for all $p\in\mathbb{R}^d$ % $ \xi \cdot (p-\nabla f(x))\leq \mathcal{H}(p)-\mathcal{H}(\nabla f(x)) $. % Therefore, by shifting $p=p^\prime+\nabla f(x)$, we obtain for all $p^\prime\in\mathbb{R}^d$ that % $ \xi \cdot p^\prime\leq \mathcal{H}(p^\prime+\nabla f(x))-\mathcal{H}(\nabla f(x)) $. % By continuous differentiability and periodicity of~$f$, and continuity of~$\mathcal{H}$, the right-hand side is bounded in $x$, and we obtain % \begin{align*} \sup_{x \in \mathbb{R}^d} \sup_{\xi \in F(x)}|\xi| &= \sup_{x \in \mathbb{R}^d} \sup_{\xi \in F(x)} \sup_{|p^\prime| = 1} \xi \cdot p^\prime\\ &\leq \sup_{x \in \mathbb{R}^d} \sup_{\xi \in F(x)} \sup_{|p^\prime|=1}\left[\mathcal{H}(p^\prime+\nabla f(x))-\mathcal{H}(\nabla f(x))\right] < \infty. \end{align*} For any $x \in \mathbb{R}^d$, the set $F(x)$ is non-empty, since the subdifferential of a proper convex function $\mathcal{H}(\cdot)$ is nonempty at points where $\mathcal{H}(\cdot)$ is finite and continuous~\cite{rockafellar1966characterization}. Furthermore, $F(x)$ is convex and closed, which follows from the properties of a subdifferential set. \smallskip Regarding upper semicontinuity, recall the definition from \cite{De92}: the map $F:\mathbb{R}^d \to 2^{\mathbb{R}^d} \setminus \{\emptyset\}$ is upper semicontinuous if for all closed sets $A\subseteq\mathbb{R}^d$, the set $F^{-1}(A)\subseteq \mathbb{R}^d$ is closed, where % $ F^{-1}(A)=\{x\in \mathbb{R}^d\;|\;F(x)\cap A\neq\emptyset\}. $ % Let $A\subseteq\mathbb{R}^d$ be closed and $x_n\rightarrow x$ in $\mathbb{R}^d$, with $x_n\in F^{-1}(A)$. That means for all $n\in\mathbb{N}$ that the sets % $ \partial \mathcal{H}(\nabla f(x_n))\cap A $ % are non-empty, and consequently, there exists a sequence $\xi_n \in F(x_n)\cap A$. We proved above that the set $F(y)\cap A$ is uniformly bounded in $y \in \mathbb{R}^d$. Hence the sequence~$\xi_n$ is bounded, and passing to a subsequence if necessary, it converges to some~$\xi$. By definition of $F(x_n)$, for all $p\in\mathbb{R}^d$, % \begin{align*} \xi_n(p-\nabla f(x_n)) \leq \mathcal{H}(p)-\mathcal{H}(\nabla f(x_n)). \end{align*} % Passing to the limit, we obtain that for all $p \in \mathbb{R}^d$, % $$ \xi (p-\nabla f(x)) \leq \mathcal{H}(p)-\mathcal{H}(\nabla f(x)). $$ % This implies by definition that $\xi\in\partial \mathcal{H}(\nabla f(x))$. Since $\xi_n\in A$ and $A$ is closed, we have $\xi\in A$. Hence $x\in F^{-1}(A)$, and $F^{-1}(A)$ is indeed closed. \end{proof} % % \begin{proof}[Proof of (ii) in Proposition \ref{prop:action_integral:bold_H}] The comparison principle for the operator $\mathbf{H}$ follows from the fact that~$\mathbf{H}f=\mathcal{H}(\nabla f)$ depends on~$x$ only via gradients. Indeed, for subsolutions $u_1$ and supersolutions $u_2$ of $(1-\tau \mathbf{H})u =h $, we have % $ \max(u_1-u_2) \leq \tau [\mathcal{H} \left( \nabla f_1(x_\delta) \right) - \mathcal{H}\left(\nabla f_2(x_\delta^\prime)\right)] + h(x_\delta)-h(x_\delta^\prime), $ % with test functions $f_1,f_2\in\mathcal{D}(H)$ satisfying $ \nabla f_1(x_\delta) = \nabla f_2(x_\delta^\prime), $ % and~$\text{dist}(x_\delta,x_\delta^\prime)\rightarrow 0$ as~$\delta \to 0$. Therefore $\mathcal{H}\left(\nabla f_1(x_\delta)\right)-\mathcal{H}\left(\nabla f_2(x_\delta^\prime)\right) = 0$, and~$\max(u_1-u_2)\leq 0$ follows by taking the limit $\delta\rightarrow 0$. \end{proof} % \begin{proof}[Proof of (iii) in Proposition \ref{prop:action_integral:bold_H}] Let $u \in C(\mathbb{T}^d)$ be a viscosity solution of the equation~$(1 - \tau H) u = h$. By Lemmas~\ref{lemma:LDP_switching_MP:local_op_strong_sol} and~\ref{lemma:LDP_switching_MP:H_to_H1-H2}, $u$ is a strong viscosity subsolution of $(1 - \tau H_1) u = h$ and a strong viscosity supersolution of $(1- \tau H_2) u = h$. In the proof of Lemma~\ref{lemma:LDP_switching_MP:H1_leq_H2} we obtained $\mathcal{H}_1 \leq \mathcal{H} \leq \mathcal{H}_2$, which in particular implies the inequalities % $ - H_1 \geq -\mathbf{H} \geq -H_2. $ % With that, we find that $u$ is both a strong viscosity sub- and supersolution of $(1 - \tau \mathbf{H}) u = h$. \end{proof} \section{Proofs of large deviations for molecular motors} \sectionmark{LDP for molecular motors} \label{section:LDP_in_MM} In this section, we prove the theorems of Section \ref{subsection:results:LDP_in_MM} about the stochastic processes motivated by molecular-motor systems. The proofs regarding the continuous model (Theorems~\ref{thm:results:LDP_cont_MM_Limit_I} and~\ref{thm:results:LDP_cont_MM_Limit_II}) are collected in Section~\ref{subsection:cont_MM}, and regarding the discrete model (Theorems~\ref{thm:results:LDP_cont_MM_Limit_I} and~\ref{thm:results:LDP_cont_MM_Limit_II}) in Section~\ref{subsection:discr_MM}. In each proof we verify the conditions of the general theorems for switching Markov processes (Theorems~\ref{thm:results:LDP_switching_MP} and~\ref{thm:results:action_integral_representation}). Finally, we prove in Section~\ref{subsection:detailed_balance} the representation of Hamiltonians~$\mathcal{H}(p)$ that we use to prove symmetry under the detailed balance condition. \subsection{Proof for the continuous models} \label{subsection:cont_MM} In this section, we consider the stochastic process $(X^\varepsilon_t, I^\varepsilon_t)$ of Defintion~\ref{def:intro:cont_MM} and prove Theorems~\ref{thm:results:LDP_cont_MM_Limit_I} and \ref{thm:results:LDP_cont_MM_Limit_II}. The generator~$L_\varepsilon$ is given by \begin{multline*} L_\varepsilon f(x,i)= \varepsilon \frac{1}{2} \Delta_x f(\cdot,i) (x) +b^i(x/\varepsilon) \cdot \nabla_x f(\cdot,i) (x)\\ + \sum_{j = 1}^J \frac{1}{\varepsilon} \gamma(\varepsilon) r_{ij}(x/\varepsilon) \left[ f(x,j) - f(x,i) \right], \end{multline*} with state space $E_\varepsilon = \mathbb{T}^d \times \{1,\dots, J\} = \{(x,i)\}$, drifts $b^i \in C^\infty(\mathbb{T}^d)$, jump rates $r_{ij} \in C^\infty(\mathbb{T}^d;[0,\infty))$, and~$\gamma(\varepsilon)>0$. We frequently write $f(x,i) = f^i(x)$. The nonlinear generators defined by~$H_\varepsilon f = \varepsilon e^{-f / \varepsilon} L_\varepsilon e^{f(\cdot) / \varepsilon}$ are given by \begin{multline}\label{eq:LDP_MM:cont:H_varepsilon} H_\varepsilon f(x,i)= \frac{\varepsilon}{2} \Delta_x f^i(x)+\frac{1}{2}|\nabla_x f^i(x)|^2+b^i\left(x/\varepsilon\right)\nabla_x f^i(x) \\+ \gamma(\varepsilon) \sum_{j=1}^J r_{ij}\left(x/\varepsilon\right) \left[ e^{ \left(f(x,j)-f(x,i)\right) / \varepsilon}-1 \right]. \end{multline} \subsubsection{Proof of Theorem \ref{thm:results:LDP_cont_MM_Limit_I}} \label{subsubsection:LDP_cont_MM_Limit_I} \begin{proof}[Verification of~\ref{MM:item:T1} of Theorem \ref{thm:results:LDP_switching_MP}] With~$f_\varepsilon(x,i)=f(x)+\varepsilon\,\varphi\left(x/\varepsilon, i\right))$, we find \begin{multline*} H_\varepsilon f_\varepsilon(x,i) = \frac{\varepsilon}{2}\Delta f(x) + \frac{1}{2}\Delta_y\varphi^i\left(x/\varepsilon\right) + \frac{1}{2}\big|\nabla f(x)+\nabla_y\varphi^i\left(x/\varepsilon\right)\big|^2 \\+ b^i\left(x/\varepsilon\right)\left(\nabla f(x)+\nabla_y\varphi^i\left(x/\varepsilon\right)\right) \\ + \sum_{j = 1}^J r_{ij}\left(x/\varepsilon\right) \left[ e^{\varphi\left(x/\varepsilon, j\right)-\varphi\left(x/\varepsilon, i\right)}-1 \right], \end{multline*} % where $\nabla_y$ and $\Delta_y$ denote the gradient and Laplacian with respect to the variable $y = x/\varepsilon$. The only term of order $\varepsilon$ that remains is $\varepsilon\,\Delta f(x)/2$. This suggests to take the remainder terms as the definition of the multivalued operator $H$. In the notation of Theorem \ref{thm:results:LDP_switching_MP}, we choose $E^\prime = \mathbb{T}^d \times\{1,\dots,J\}$ as the state space of the macroscopic variables, and define \begin{align}\label{MM:eq:limit-H-proof-cont-MM-model} H:= \left\{ (f, H_{f,\varphi}) \, : \, f \in C^2(\mathbb{T}^d), \; H_{f, \varphi} \in C(\mathbb{T}^d \times E^\prime) \text{ and } \varphi \in C^2(E^\prime) \right\}. \end{align} In $H$, the image functions $H_{f,\varphi} : \mathbb{T}^d \times E^\prime \to \mathbb{R}$ are defined by % \begin{multline} H_{f,\varphi}(x,y,i) := \frac{1}{2}\Delta_y\varphi^i(y) + \frac{1}{2} \big|\nabla f(x)+\nabla_y\varphi^i(y) \big|^2 +b^i(y)(\nabla f(x) + \nabla_y\varphi^i(y)) \\+ \sum_{j = 1}^J r_{ij}(y)\left[e^{\varphi(y, j)-\varphi(y, i)}-1\right], \label{eq:LDP_MM:contI:limit_op_H} \end{multline} % where we write $\varphi = (\varphi^1, \dots, \varphi^J)$ via the identification $C^2(E^\prime) \simeq (C^2(\mathbb{T}^d))^J$. Define the maps $\eta_\varepsilon^\prime:E_\varepsilon \to E^\prime$ by $\eta_\varepsilon^\prime(x,i) := (x/\varepsilon,i)$, and recall that $\eta_\varepsilon(x,i) := x$ are projections $\eta_\varepsilon:E_\varepsilon\to \mathbb{T}^d$. \smallskip We now verify~\ref{MM:item:C1},~\ref{MM:item:C2} and~\ref{MM:item:C3} of~\ref{MM:item:T1}. For~\ref{MM:item:C1}, for any $(x,y,i) \in \mathbb{T}^d \times E^\prime$, we search for elements $(y_\varepsilon,i_\varepsilon) \in \mathbb{T}^d \times \{1,\dots,J\}$ such that both $\eta_\varepsilon(y_\varepsilon,i_\varepsilon) \to x$ and $\eta_\varepsilon^\prime(y_\varepsilon,i_\varepsilon) \to (y,i)$ as $\varepsilon \to 0$. The point $y_\varepsilon := x + \varepsilon(y - x)$ satisfies $y_\varepsilon \to x$ and $y_\varepsilon / \varepsilon = y$, since $x / \varepsilon = x$ in $\mathbb{T}^d$. Therefore,~\ref{MM:item:C1} holds with $y_\varepsilon = x + \varepsilon(y-x)$ and $i_\varepsilon = i$. Regarding~\ref{MM:item:C2}, let $(f, H_{f,\varphi}) \in H$. Then the function~$f_\varepsilon$ defined by $f_\varepsilon(x,i):=f(x)+\varepsilon\,\varphi\left(x/\varepsilon, i\right)$ satisfies % $$ \|f\circ\eta_\varepsilon-f_\varepsilon\|_{L^\infty(E_\varepsilon)} = \sup_{(x,i)\in E_\varepsilon}|f(x)-f_\varepsilon(x,i)| = \varepsilon\cdot \|\varphi \|_{L^\infty(E_\varepsilon)}\xrightarrow{\varepsilon\rightarrow 0}0, $$ and % \begin{align*} \|H_{f,\varphi}\circ\eta_\varepsilon^\prime-H_\varepsilon f_\varepsilon\|_{L^\infty(E_\varepsilon)} &= \sup_{(x,i)\in E_\varepsilon}|H_{f,\varphi}(x,x/\varepsilon,i)-H_\varepsilon f_\varepsilon(x,i)|\\ &= \frac{\varepsilon}{2}\;\sup_{(x,i)\in E_\varepsilon}|\;\Delta f(x)|\leq \varepsilon \frac{1}{2}\sup|\Delta f| \xrightarrow{\varepsilon\rightarrow 0}0. \end{align*} % Item~\ref{MM:item:C3}, the fact that the images $H_{f,\varphi}$ depend on $x$ only via the gradients of $f$, can be recognized in~\eqref{eq:LDP_MM:contI:limit_op_H}. \end{proof} % % \begin{proof}[Verification of (T2) of Theorem \ref{thm:results:LDP_switching_MP}] % Let $f$ be a function in $\mathcal{D}(H)=C^2(\mathbb{T}^d)$ and $x\in \mathbb{T}^d$. We establish the existence of a vector function $\varphi=(\varphi^1,\dots,\varphi^J)\in (C^2(\mathbb{T}^d))^J$ such that for all $(y,i) \in E^\prime = \mathbb{T}^d \times \{1,\dots,J\}$ and some constant $\mathcal{H}(\nabla f(x)) \in \mathbb{R}$, we have % $$ H_\varphi(\nabla f(x),y,i) = \mathcal{H}(\nabla f(x)). $$ For the flat torus $E = \mathbb{T}^d$, this means that for fixed $\nabla f(x)=p\in\mathbb{R}^d$, we search for a vector function $\varphi_p$ such that $\tilde{H}_{\varphi_p}(p,y,i) = \mathcal{H}(p)$ becomes independent of the variables $(y,i)\in E^\prime$. We can find this vector function by solving a principal eigenvalue problem. We prove Item~\ref{MM:item:T2} with the following Lemma. \begin{lemma} Let $E^\prime = \mathbb{T}^d \times \{1, \dots, J\}$ and $H$ be the limit operator~\eqref{MM:eq:limit-H-proof-cont-MM-model}. Then: \begin{enumerate}[(a)] \item For $f \in \mathcal{D}(H)$, the limiting images $H_{\varphi}(\nabla f(x),y,i)$ are of the form % \[ H_\varphi(\nabla f(x) , y, i) = e^{-\varphi(y,i)} \left[ (B_p + V_p + R)e^{\varphi} \right] (y,i), \] % with $ p = \nabla f(x) \in\mathbb{R}^d$, and operators $B_p, V_p, R : C^2(E^\prime) \rightarrow C(E^\prime)$ defined as % \begin{align*} (B_p h)(y,i) &:= \frac{1}{2} \Delta_y h(y,i) + \left( p +b^i(y)\right)\cdot \nabla_y h(y,i) \\ (V_p h)(y,i) &:= \left(\frac{1}{2} p^2 + p\cdot b^i(y)\right) h(y,i), \\ (R\,h)(y,i) &:= \sum_{j = 1}^J r_{ij}(y) \left[h(y,j) - h(y,i)\right]. \end{align*} % \item For any $p \in \mathbb{R}^d$, there exists an eigenfunction $g_p = (g_p^1,\dots, g_p^J) \in (C^2(\mathbb{T}^d))^J$ with strictly positive component functions, $g^i_p > 0 $ on $\mathbb{T}^d$ for $ i =1,\dots, J$, and an eigenvalue $\mathcal{H}(p) \in \mathbb{R}$ such that % \begin{equation} \left[B_p + V_p + R\right] g_p = \mathcal{H}(p)\,g_p. \label{eq:LDP_MM:contI:cell_problem} \end{equation} \end{enumerate} \label{lemma:LDP_MM:contI:principal_eigenvalue} \end{lemma} Now~(T2) follows by (a) and (b), since with $\varphi_p := \log g_p$, \begin{align*} H_{\varphi_p}(p , y, i) &\overset{(a)}{=} e^{-\varphi_p(y,i)} \left[ B_p + V_p + R \right] e^{\varphi_p(y,i)} \\&= \frac{1}{g_p(y,i)} \left[B_p + V_p + R\right] g_p (y,i) \overset{(b)}{=} \mathcal{H}(p). \end{align*} \emph{Proof of Lemma \ref{lemma:LDP_MM:contI:principal_eigenvalue}.} Writing $p = \nabla f(x)$, Item~(a) follows directly by regrouping the terms in~\eqref{eq:LDP_MM:contI:limit_op_H}. Regarding Item~(b),~$\left[B_p + V_p +R\right] g_p = \mathcal{H}(p) g_p$ is a system of weakly coupled nonlinear elliptic PDEs on the flat torus. They are weakly coupled in the sense that the component functions $g_p^i$ are only coupled in the lowest order terms by means of the operator $R$, while the operators $B_p$ and $V_p$ act solely on the diagonal. When cast in matrix form, the eigenvalue problem to solve reads as follows: for $D_p + R$, with a diagonal matrix~$D_p$ and a coupling matrix $R$ with entries $R_{ij} = r_{ij}$ ($i \neq j$) and $R_{ii} = - \sum_{j\neq i}r_{ij}$ on the diagonal, \begin{align*} D_p = \begin{pmatrix} B_p^1 + V^1_p & & 0 \\ & \ddots & \\ 0 & & B_p^J + V^J_p \end{pmatrix}, \qquad R = \begin{pmatrix} R_{11} & & \geq 0 \\ & \ddots & \\ \geq 0 & & R_{JJ} \end{pmatrix}, \end{align*} % find a strictly positive vector function $g_p > 0$ such that $\left[ D_p + R \right] g_p = \mathcal{H}(p) g_p$. Guido Sweers showed how to obtain the principal eigenvalue for such kind of coupled systems for bounded sets~$\Omega \subseteq \mathbb{R}^d$ under Dirichlet boundary conditions~\cite{Sweers92}, but the line of argument applies to the periodic setting as well---we summarize the result in Proposition \ref{proposition:appendix:PrEv:fully_coupled_system}. Under our irreducibility assumption on~$R$, there exists a $\lambda(p)$ and $g_p > 0$ such that $\left[-D_p - R \right] g_p = \lambda(p) g_p$. Thereby, $\left[D_p + R \right] g_p = \mathcal{H}(p) g_p$ follows with the same eigenfunction $g_p > 0$ and the principal eigenvalue $\mathcal{H}(p) = - \lambda(p)$. This finishes the verification of~\ref{MM:item:T2}. \end{proof} % \begin{proof}[Verification of (T3) of Theorem \ref{thm:results:action_integral_representation}] We prove that the principal eigenvalue $\mathcal{H}(p)$ of Lemma \ref{lemma:LDP_MM:contI:principal_eigenvalue} is convex in $p\in\mathbb{R}^d$ and satisfies $\mathcal{H}(0)=0$. % To that end, we use an explicit variational representation formula for the principal eigenvalue. By Proposition \ref{proposition:appendix:PrEv:fully_coupled_system}, the eigenvalue $\mathcal{H}(p) = - \lambda(p)$ admits the representation % \begin{align*} \mathcal{H}(p) &= - \sup_{g > 0} \inf_{z^\prime \in E^\prime} \left\{ \frac{1}{g(z^\prime)}\left[ (-B_p - V_p - R)g \right](z^\prime) \right\} \\ &= \inf_{g > 0} \sup_{z^\prime \in E^\prime} \left\{ \frac{1}{g(z^\prime)} \left[ (B_p + V_p + R)g \right](z^\prime) \right\} \\ &= \inf_{\varphi} \sup_{z^\prime \in E^\prime} \left\{ e^{-\varphi(z^\prime)} \left[(B_p + V_p + R)e^{\varphi} \right] (z^\prime) \right\} =: \inf_{\varphi} \sup_{z^\prime \in E^\prime} F(p,\varphi)(z^\prime). \end{align*} % The map $F$ is given by % \begin{multline*} F(p,\varphi)(y,i) = \frac{1}{2}\Delta\varphi^i(y) + \frac{1}{2} |\nabla\varphi^i(y)+p|^2 + b^i(y)(\nabla\varphi^i(y)+p) \\+ \sum_{j = 1}^J r_{ij}(y) \left[ e^{\varphi^j(y)-\varphi^i(y)}-1 \right], \end{multline*} % and hence is jointly convex in $p$ and $\varphi$. For the eigenfunction $\varphi = \varphi_p$, equality holds in the sense that for any $z \in E^\prime$, we have $\mathcal{H}(p) = F(p,\varphi_p)(z)$. Therefore, we obtain for $\tau\in[0,1]$ and any $p_1, p_2 \in \mathbb{R}^d$ with corresponding eigenfunctions $g_1 = e^{\varphi_1}$ and $g_2 = e^{\varphi_2}$ that % \begin{align*} \mathcal{H}(\tau p_1 + (1-\tau) p_2) &= \inf_\varphi\sup_{E^\prime}F\left(\tau p_1 + (1-\tau) p_2, \varphi\right)\\ &\leq \sup_{E^\prime}F\left(\tau p_1 + (1-\tau) p_2, \tau \varphi_1+(1-\tau)\varphi_2\right)\\ &\leq \sup_{E^\prime}\left[\tau F(p_1,\varphi_1) + (1-\tau) F(p_2,\varphi_2)\right]\\ &\leq \tau \sup_{E^\prime}F(p_1,\varphi_1) + (1-\tau) \sup_{E^\prime} F(p_2,\varphi_2) \\ &= \tau \mathcal{H}(p_1) + (1-\tau) \mathcal{H}(p_2). \end{align*} % Regarding the claim $\mathcal{H}(0) = 0$, we choose the constant function $\varphi = (1,\dots,1)$ in the variational representation of $\mathcal{H}(p)$. Thereby, we obtain the estimate $\mathcal{H}(0) \leq 0$. For the opposite inequality, we show that for any $\varphi \in C^2(E^\prime)$ % $$ \lambda(\varphi) := \sup_{z^\prime \in E^\prime} \left\{ e^{-\varphi(z^\prime)} \left[ (B_0 + V_0 + R) e^{\varphi} \right](z^\prime) \right\} \geq 0, $$ % which then implies $\mathcal{H}(0) = \inf_{\varphi} \lambda(\varphi) \geq 0$. Let $\varphi\in C^2(E^\prime)$; the continuous function $\varphi$ on the compact set $E^\prime$ admits a global minimum $z_m = (y_m, i_m) \in E^\prime$. Thereby, noting that $V_0 \equiv 0$, we find % \begin{multline*} \lambda(\varphi) \geq e^{-\varphi(z_m)}(B_0 + R) e^{\varphi(z_m)} = \underbrace{\frac{1}{2} \Delta_y \varphi(y_m,i_m)}_{ \displaystyle \geq 0} + \frac{1}{2}|\underbrace{\nabla_y \varphi(y_m,i_m)}_{\displaystyle = 0}|^2 \\+ b^{i_m}(y_m)\cdot \underbrace{\nabla_y \varphi(y_m,i_m)}_{\displaystyle = 0} + \sum_{j\neq i} r_{ij}(y_m) \underbrace{\left[ e^{\varphi(y_m,j) - \varphi(y_m,i_m)} - 1 \right]}_{\displaystyle \geq 0} \geq 0. \end{multline*} % This finishes the verification of (T3), and thereby the proof of Theorem \ref{thm:results:LDP_cont_MM_Limit_I}. \end{proof} \subsubsection{Proof of Theorem \ref{thm:results:LDP_cont_MM_Limit_II}} \label{subsubsection:LDP_cont_MM_Limit_II} % % In this section, we consider the process $(X^\varepsilon_t, I^\varepsilon_t)$ from Definition \ref{def:intro:cont_MM} in the limit regime $\gamma(\varepsilon) \to \infty$ as $\varepsilon \to 0$. As above in the proof of Theorem \ref{thm:results:LDP_cont_MM_Limit_I}, we start with the nonlinear generator $H_\varepsilon$ from \eqref{eq:LDP_MM:cont:H_varepsilon}, and verify Conditions (T1), (T2) and (T3) of Theorems \ref{thm:results:LDP_switching_MP} and \ref{thm:results:action_integral_representation}. \begin{proof}[Verification of (T1) of Theorem \ref{thm:results:LDP_switching_MP}] We can not make the same Ansatz as in the proof of Theorem \ref{thm:results:LDP_cont_MM_Limit_I}, since the reaction terms with $\gamma(\varepsilon)$ diverge whenever the exponent remains of order one. We have three different scales: order $1$ via the variable $x$, of order $1/\varepsilon$ via $(x/\varepsilon)$, and of order $\gamma(\varepsilon)/\varepsilon \gg 1/\varepsilon$ in the variable $i$. Therefore, we choose functions $f_\varepsilon(x,i)$ of the form % $$ f_\varepsilon(x,i) = f(x) + \varepsilon \, \varphi \left( \frac{x}{\varepsilon} \right) + \frac{\varepsilon}{\gamma(\varepsilon)} \, \xi\left( \frac{x}{\varepsilon},i \right). $$ % We abbreviate in the following $y=x/\varepsilon$. Then computing $H_\varepsilon f_\varepsilon$ results in % \begin{multline*} H_\varepsilon f_\varepsilon (x,i) = \frac{\varepsilon}{2}\Delta f(x) + \frac{1}{2}\left[\Delta\varphi(y)+\frac{1}{\gamma(\varepsilon)}\Delta\xi^i(y)\right] \\+ \frac{1}{2} \big| \nabla f(x)+\nabla\varphi(y)+\frac{1}{\gamma(\varepsilon)}\nabla\xi^i(y) \big|^2 + b^i(y)\left(\nabla f(x)+\nabla\varphi(y) + \frac{1}{\gamma(\varepsilon)} \nabla\xi^i(y)\right) \\+ \gamma(\varepsilon)\sum_{j = 1}^J r_{ij}(y)\left[e^{(\xi(y,j)-\xi(y,i))/\gamma}-1\right]. \end{multline*} % The $1/\gamma$ terms vanish as $\gamma\rightarrow\infty$. The last term satisfies % $$ \gamma \sum_{j = 1}^J r_{ij}(y) \left[ e^{(\xi^j-\xi^i)/\gamma}-1 \right] = \sum_{j = 1}^Jr_{ij}(y) \left[ \xi^j(y)-\xi^i(y) \right] + \mathcal{O}(\gamma^{-2}). $$ % Therefore, we choose again $E^\prime := \mathbb{T}^d \times \{1,\dots, J\}$ as the state space of the macroscopic variables, and use the following limit operator $H$, % \begin{align}\label{MM:eq:multi-H-proof-cont-averaged} H:= \left\{ (f, H_{f,\varphi,\xi} \, : \, f \in C^2(\mathbb{T}^d) \text{ and } H_{f, \varphi,\xi} \in C(\mathbb{T}^d \times E^\prime) \right\}, \end{align} with functions $\varphi$ and $\xi$ in the sets $\varphi \in C^2(\mathbb{T}^d)$ and $\xi = (\xi^1, \dots, \xi^J) \in C^2(E^\prime) \simeq (C^2(\mathbb{T}^d))^J$. The image functions $H_{f,\varphi,\xi} : \mathbb{T}^d \times \mathbb{T}^d \times \{1,\dots,J\} \to \mathbb{R}$ are % % \begin{multline} H_{f,\varphi,\xi}(x,y,i) := \frac{1}{2}\Delta_y\varphi(y) + \frac{1}{2} |\nabla f(x)+\nabla_y\varphi(y)|^2 + b^i(y) \left(\nabla f(x)+\nabla_y\varphi(y)\right) \\ + \sum_{j = 1}^J r_{ij}(y)\left[\xi(y,j)-\xi(y,i)\right]. \label{eq:LDP_MM:contII:limit_op_H} \end{multline} % Then $H$ satisfies (T1), which is shown by the same line of argument as above in the proof of Theorem \ref{thm:results:LDP_cont_MM_Limit_I}, with the same maps $\eta_\varepsilon$ and $\eta_\varepsilon^\prime$ as there. The image functions depend only on gradients,~$H_{f,\varphi,\xi}(x,y,i)=H_{\varphi,\xi}(\nabla f(x),y,i)$. % \end{proof} % % \begin{proof}[Verification of (T2) of Theorem \ref{thm:results:LDP_switching_MP}] % For any $p \in \mathbb{R}^d$, we establish the existence of functions $\varphi_p \in C^2(\mathbb{T}^d)$ and $\xi \in C^2(E^\prime)$ such that $H_{\varphi, \xi}(p,\cdot)$ becomes constant on $E^\prime = \mathbb{T}^d \times \{1,\dots,J\}$. To that end, we find a constant $\mathcal{H}(p) \in \mathbb{R}$ and $\varphi_p$ and $\xi_p$ such that for all $(y,i) \in E^\prime$, we have % $$ H_{\varphi_p,\xi_p}(p,y,i) = \mathcal{H}(p). $$ % We reduce the problem to finding a principal eigenvalue. % \begin{lemma} Let $E^\prime = \mathbb{T}^d \times \{1,\dots,J\}$ and let~$H$ be the operator~\eqref{MM:eq:multi-H-proof-cont-averaged}. Then: % \begin{enumerate}[(a)] \item For $f \in \mathcal{D}(H)$, the images $H_{\varphi,\xi}$ are given by % \[ \tilde{H}_{\varphi,\xi}(p,y,i) = e^{-\varphi(y)}\left[ (B^i_{p} + V^i_{p}) e^{\varphi}\right](y) + \sum_{j = 1}^J r_{ij}(y)\left[\xi(y,j)-\xi(y,i)\right], \] % where $p = \nabla f(x) \in \mathbb{R}^d$, $B_p^i = \frac{1}{2}\Delta + (p + b^i(y))\cdot\nabla$ and multiplication operator~$V_p^i(y) = p^2/2 + p\cdot b^i(y)$. \item For any $\varphi$ and $y\in \mathbb{T}^d$, there exists a function $\xi(y,\cdot)$ on $\{1,\dots,J\}$ such that $\xi \in C^2(E^\prime)$ and for all $i=1,\dots,J$, % \[ e^{-\varphi}\left[ (B^i_{p} + V^i_{p}) e^{\varphi}\right](y) + \sum_{j = 1}^J r_{ij}(y)\left[\xi(y,j)-\xi(y,i)\right] = e^{-\varphi(y)} \left[ B_p + V_p \right] e^{\varphi(y)}, \] % where $B_p = \frac{1}{2}\Delta + (p + \overline{b}(y))\cdot\nabla$, $V_p(y) = \frac{p^2}{2} + p\cdot\overline{b}(y)$. In the operators, $\overline{b}(y) := \sum_{i = 1}^J \mu_y(i)b^i(y)$ is the average drift with respect to the stationary measure $\mu_y \in \mathcal{P}(\{1, \dots, J\})$ of the jump process with frozen jump rates~$r_{ij}(y)$. \item There exists a strictly positive eigenfunction $g_p$ and an eigenvalue $\mathcal{H}(p) \in \mathbb{R}$ such that % \begin{equation} \left[ B_p + V_p \right] g_p = \mathcal{H}(p) g_p. \label{eq:LDP_MM:contII:PrEv_eq} \end{equation} \end{enumerate} \label{lemma:LDP_MM:contII:principal_eigenvalue} \end{lemma} By (a), (b) and (c), taking $\varphi_p = \log g_p$ and the corresponding $\xi(y,i)$, we obtain~(T2) via % \begin{align*} H_{\varphi_p,\xi}(p,y,i) &\overset{(a)}{=} e^{-\varphi_p(y)}\left[ B^i_{p} + V^i_{p}\right] e^{\varphi_p(y)} + \sum_{j\in\mathcal{J}}r_{ij}(y)\left[\xi(y,j)-\xi(y,i)\right] \\&\overset{(b)}{=} e^{-\varphi_p(y)} \left[ (B_p + V_p)e^{\varphi} \right] (y) \overset{(c)}{=} \mathcal{H}(p). \end{align*} % \emph{Proof of Lemma \ref{lemma:LDP_MM:contII:principal_eigenvalue}.} Regarding (a), writing $\xi(y,i)=\xi_y(i)$ and $p = \nabla f(x)\in\mathbb{R}^d$, for all $(y,i)\in E^\prime$ we find % \begin{align*} H_{\varphi,\xi}(p,y,i) &= \underbrace{\frac{1}{2}\Delta\varphi + \frac{1}{2} \big|p + \nabla\varphi \big|^2 + b^i(p+\nabla\varphi)}_{\displaystyle=e^{-\varphi}(B_{p,i}+V_{p,i})e^{\varphi}} + \underbrace{\sum_{j = 1}^J r_{ij}(y) \left[ \xi(y,j)-\xi(y,i) \right]}_{\displaystyle =:R_y \xi(y,\cdot)(i)}, \end{align*} % with a generator $R_y$ of a jump process with frozen jump rates~$r_{ij}(y)$. \smallskip For (b), let $\varphi \in C^2(\mathbb{T}^d)$ and $y\in \mathbb{T}^d$. We wish to find a function~$\xi_y(\cdot) = \xi(y,\cdot) \in C(\{1,\dots,J\})$ such that % $$ e^{-\varphi}\left[B_{p,i}+V_{p,i}\right]e^{\varphi} + R_y \xi_y(i) $$ % becomes constant in $i = 1,\dots, J$. By the Fredholm alternative, for any vector~$h\in C(\{1,\dots,J\})$, the equation $R_y\xi_y = h$ has a solution $\xi_y(\cdot)\in C(\{1,\dots,J\})$ if and only if $h \perp \text{ker}(R_y^\ast)$. Since $R_y$ is the generator of a jump process on the finite discrete set $\{1, \dots, J\}$ with rates $r_{ij}(y)$, the null space $\text{ker}(R_y^\ast)$ is one-dimensional and spanned by the unique stationary measure $\mu_y\in\mathcal{P}(\{1,\dots,J\})$, which exists by our irreducibility assumption of Theorem~\ref{thm:results:LDP_cont_MM_Limit_II} (e.g.~\cite[Theorem~17.51]{klenke2013probability}). % Hence % $ e^{-\varphi}\left[B_{p,i}+V_{p,i}\right]e^{\varphi} + R_y \xi_y(i) = h(p,y) $ % is independent of $i \in \{1,\dots,J\}$ iff % \[ \sum_{i = 1}^J \mu_y(i)\left[(h(p,y)-e^{-\varphi}\left[B_{p,i}+V_{p,i}\right]e^{\varphi}\right]=0. \] This solvability condition leads to % \begin{align*} \sum_{i = 1}^J \mu_y(i) \left[(h(p,y) - e^{-\varphi} \left( B_{p,i}+V_{p,i}\right) e^{\varphi} \right] &= h(p,y)- e^{-\varphi(y)}\left( B_p + V_p \right) e^{\varphi(y)} = 0. \end{align*} Hence for $h(p,y) := e^{-\varphi(y)}\left[ B_p + V_p \right]e^{\varphi(y)}$, there exists~$\xi(y,i)$ solving the equation~$R_y \xi(y,\cdot) = h$. Furthermore, since the stationary measure is an eigenvector of a one-dimensional eigenspace, and the rates $r_{ij}(\cdot)$ are smooth by assumption, the eigenfunctions $\xi_y$ depend smoothly on $y$ as well, and (b) follows. \smallskip Regarding (c) in Lemma \ref{lemma:LDP_MM:contII:principal_eigenvalue}, note that \eqref{eq:LDP_MM:contII:PrEv_eq} is a principal eigenvalue problem for a second-order uniformly elliptic operator. By Proposition \ref{proposition:appendix:PrEv:elliptic_op}, the principal eigenvalue problem $\left[ - B_p - V_p \right] g _p = \lambda(p) g_p$ has a solution $g_p > 0$, with eigenvalue $\lambda(p) \in \mathbb{R}$. The same function $g_p$ and the eigenvalue $\mathcal{H}(p) = -\lambda(p)$ solve~\eqref{eq:LDP_MM:contII:PrEv_eq}. % \end{proof} % % \begin{proof}[Verification of (T3) of Theorem \ref{thm:results:action_integral_representation}] The principal eigenvalue $\mathcal{H}(p)$ is of the form % $$ \mathcal{H}(p) = \inf_\varphi\sup_{y\in \mathbb{T}^d} F\left(p,\varphi\right)(y), $$ % with $F$ jointly convex in $p$ and $\varphi$. Convexity of~$\mathcal{H}(p)$ and~$\mathcal{H}(0) = 0$ follow as above in the proof of Theorem~\ref{thm:results:LDP_cont_MM_Limit_I}. % \end{proof} \subsection{Proof for the discrete models} \label{subsection:discr_MM} In this section, we prove the large-deviation Theorems \ref{thm:results:LDP_discr_MM_Limit_I} and \ref{thm:results:LDP_discr_MM_Limit_II} of the stochastic process $(X^n_t, I^n_t)$ from Defintion~\ref{def:intro:discr_MM}. We alert the reader that we use~$n$ as a scaling parameter instead of~$\varepsilon$. The generator $L_n$ in~\eqref{eq:intro:L_N_discr_MM} is % \begin{multline*} L_n f(x,i) = n r_+^i(nx) \left[ f(x + 1/n, i) - f(x,i) \right] + n r_-^i(nx) \left[ f(x - 1/n, i) - f(x,i) \right] \\ + \sum_{j = 1}^J n \gamma(n) r_{ij}(nx) \left[ f(x,j) - f(x,i) \right], \end{multline*} % with~$\gamma(n)>0$, the state space $E_n = \mathbb{T}_{\ell,n} \times \{1,\dots, J\} = \{(x,i)\}$, and $\mathbb{T}_{\ell,n}$ the discrete one-dimensional torus with lattice spacing $1/n$ and of length $\ell$. As in the continuous case, we verify~\ref{MM:item:T1},~\ref{MM:item:T2} and~(T3) of the large-deviation Theorems \ref{thm:results:LDP_switching_MP} and \ref{thm:results:action_integral_representation}. We start from the nonlinear generators~$H_n f = n ^{-nf} L_n e^{nf}$, % \begin{multline} H_n f(x,i) = r^i_{+}(nx)\left[e^{n\left(f(x+1/n,i)-f(x,i)\right)}-1\right] + r^i_{-}(nx)\left[e^{n\left(f(x-1/n,i)-f(x,i)\right)}-1\right] \\ + \gamma(n)\sum_{j = 1}^J r_{ij}(nx)\left[e^{n\left(f(x,j)-f(x,i)\right)}-1\right]. \label{eq:LDP_MM:discr:H_N} \end{multline} \subsubsection{Proof of Theorem \ref{thm:results:LDP_discr_MM_Limit_I}} \label{subsubsection:LDP_discr_MM_Limit_I} \begin{proof}[Verification of (T1) of Theorem \ref{thm:results:LDP_switching_MP}] We have~$\gamma\equiv 1$. Choose functions of the form $f_n(x,i) = f(x) + \frac{1}{n}\varphi(nx,i)$, where $(x,i) \in \mathbb{T}_{\ell, n} \times \{1,\dots,J\}$ and the~$\varphi(\cdot,i) \in C_{\ell\text{-per}}(\mathbb{Z}) \simeq C(\mathbb{T}_{\ell,1})$ are $\ell$-periodic functions. Then we obtain % \begin{multline*} H_nf_n(x,i) = r^i_{+}(nx)\left[e^{n\left(f(x+\frac{1}{n})-f(x)\right)}e^{\varphi^i(nx+1)-\varphi^i(nx)}-1\right] \\+ r^i_{-}(nx)\left[e^{n\left(f(x-\frac{1}{n})-f(x)\right)}e^{\varphi^i(nx-1)-\varphi^i(nx)}-1\right] \\ + \sum_{j = 1}^J r_{ij}(nx)\left[e^{\left(\varphi(nx,j)-\varphi(nx,i)\right)}-1\right]. \end{multline*} % Then $H_n f_n$ depends on the variables~$x\in\mathbb{T}_{\ell, n}$,~$nx\in\mathbb{T}_{\ell,1}$ and~$i \in \{1,\dots,J\}$. Therefore choose $E^\prime = \mathbb{T}_{\ell,1} \times \{1,\dots,J\}$ for the macroscopic variables, and set % \begin{multline*} H:= \bigg\{ (f, H_{f,\varphi)} \, : \, f \in C^1(\mathbb{T}_\ell) \text{ and } H_{f, \varphi} \in C(\mathbb{T}_{\ell} \times E^\prime),\\ \varphi = (\varphi^1, \dots, \varphi^J) \in C(E^\prime) \simeq (C(\mathbb{T}_{\ell, 1}))^J \bigg\}. \end{multline*} The image funcitons $H_{f,\varphi} : \mathbb{T}_\ell \times E^\prime \to \mathbb{R}$ are defined as % \begin{multline} H_{f,\varphi}(x,y,i) := r^i_{+}(y) \left[ e^{\partial_x f(x)}e^{\varphi^i(y+1)-\varphi^i(y)}-1 \right] \\+ r^i_{-}(y) \left[ e^{-\partial_x f(x)}e^{\varphi^i(y-1)-\varphi^i(y)}-1 \right] \\ + \sum_{j = 1}^J r_{ij}(y)\left[e^{\varphi(y,j)-\varphi(y,i)}-1\right]. \label{eq:LDP_MM:discrI:limit_op_H} \end{multline} % Then with the embedding $\eta_n': E_n \to E^\prime, (x,i) \mapsto \eta_n'(x,i):=(nx,i)$, and the projection $\eta_n (x,i) = x$, (C1) is satisfied. Regarding (C2), for $(f,H_{f,\varphi}) \in H$, the function $f_n(x,i):= f(x)+\frac{1}{n}\varphi(nx,i)$ satisfies $f_n\rightarrow f$ uniformly in $(x,i)\in E_n$ with respect to $\eta_n$, using that $\sup_{E^\prime}\varphi<\infty$. Regarding the images, we note that % \begin{multline*} \sup_{x,i} \big| H_{f,\varphi}(x,nx,i) - H_n f_n (x,i) \big| \\\leq \sup_{x,i}\bigg| r_+^i(nx) \left[ e^{\partial_x f(x)} - e^{n\left(f(x+1/n)-f(x)\right)}\right] e^{\varphi(nx+1,i) - \varphi(nx,i)} \bigg| \\ + \sup_{x,i}\bigg| r_-^i(nx) \left[ e^{-\partial_x f(x)} - e^{n\left(f(x-1/n)-f(x)\right)}\right] e^{\varphi(nx-1,i) - \varphi(nx,i)} \bigg|, \end{multline*} % which converges to zero as $n$ goes to infinity, since $\sup_{E^\prime}\varphi < \infty$ and we have uniformly bounded jump rates $r_\pm^i$. Furthermore, the images depend on $x$ only via the derivatives of $f$: $H_{f,\varphi}(x,y,i) = H_\varphi(\partial_x f(x),y,i)$. Hence (C3) is satisfied, and this finishes the verification of (T1). \end{proof} % % \begin{proof}[Verification of (T2) of Theorem \ref{thm:results:LDP_switching_MP}] % For $p \in \mathbb{R}$, we want to find a function $\varphi_p$ such that the images $H_{\varphi}(p,y,i)$ become constant in $(y,i)$. As in the continuous case, this can be achieved by solving a principal eigenvalue problem. Here in the discrete case, instead of elliptic partial differential equations, we encounter principal eigenvalues of irreducible M-matrices. % \begin{lemma}\label{lemma:LDP_MM:discrI:principal_ev} Let $E^\prime = \mathbb{T}_{\ell,1} \times \{1,\dots,J\}$ and $H \subseteq C^1(\mathbb{T}_\ell) \times C(\mathbb{T}_\ell \times E^\prime)$ be the multivalued operator from \eqref{eq:LDP_MM:discrI:limit_op_H}, and let $p \in \mathbb{R}$. Then: % \begin{enumerate}[(a)] \item Writing $g(y,i) = g^i(y) := e^{\varphi^i(y)}$, the images $H_\varphi(p,y,i)$ are of the form % \[ \tilde{H}_\varphi(p,y,i) = \frac{1}{g(y,i)} \left[ B_p + R \right]g (y,i), \] % where % \[ B_p g(y,i) : = r^i_+(y)\left[e^pg^i(y+1)-g^i(y)\right] + r^i_-(y)\left[e^{-p}g^i(y-1)-g^i(y)\right], \] % and % \[ R g (y,i) := \sum_{j = 1}^J r_{ij}(y) \left[ g(y,j)-g(y,i) \right]. \] % \item There exist strictly positive vectors $g^i = \left( g^i(0),\dots,g^i(\ell-1)\right) \in \mathbb{R}^\ell$, $g^i(y) > 0$ for all $i = 1,\dots, J$ and $y = 0, \dots, \ell-1$, and an eigenvalue $\mathcal{H}(p) \in \mathbb{R}$ such that % \[ [B_p + R] g(y,i) = \mathcal{H}(p) g(y,i). \] \end{enumerate} \end{lemma} By (a) and (b), choosing $\varphi(y,i) := \log g(y,i)$, we obtain % $$ H_\varphi(p,y,i) \overset{(a)}{=} \frac{1}{g(y,i)} \left[ B_p + R \right]g (y,i) \overset{(b)}{=} \mathcal{H}(p). $$ \emph{Proof of Lemma \ref{lemma:LDP_MM:discrI:principal_ev}.} Part (a) follows from rewriting the images $H_\varphi(p,y,i)$. Regarding (b), when cast in matrix form, the eigenvalue problem reads % \begin{align*} \left[ \begin{pmatrix} B_p^1 & & 0 \\ & \ddots & \\ 0 & & B_p^J \end{pmatrix} + \begin{pmatrix} R_{11} & & \geq 0 \\ & \ddots & \\ \geq 0 & & R_{JJ} \end{pmatrix} \right] \begin{pmatrix} g^1 \\ \vdots \\ g^J \end{pmatrix} = \mathcal{H}(p) \begin{pmatrix} g^1 \\ \vdots \\ g^J \end{pmatrix}, \end{align*} % where each $g^i$ is a vector, $g^i = \left( g^i(0), \dots, g^i(\ell-1) \right) \in \mathbb{R}^\ell$, and the square matrices $B^i_p \in \mathbb{R}^{\ell \times \ell}$ are similar to a discretized Laplacian with periodic boundaries. More precisely, the matrix $B_p^i$ has entries $-(r_+^i(y) + r_-^i(y))$ on the diagonal that are flanked by $r_+^i(y)e^p$ to the right and $r_-^i(y) e^{-p}$ to the left next entries. % Each~$R_{ii}$ is a diagonal matrix with~$(R_{ii})_{kk}=-\sum_{j\neq i}r_{ij}(k)$, where~$k=0,1,\dots,\ell-1$. The remaining block matrices in~$R$ are non-negative and mix the different component vectors $g^i$ and $g^j$. \smallskip By the irreducibility assumption in Theorem~\ref{thm:results:LDP_discr_MM_Limit_I} on $R$. Since all off-diagonal terms in $B_p + R$ are non-negative, the off-diagonal elements form an irreducible matrix. Therefore, $M_p := -B_p - R$ is an irreducible M-matrix (Definition~\ref{def:appendix:PrEv:irreducible_M_matrix} further below), and by Proposition~\ref{proposition:appendix:PrEv:M_matrix}, it admits a principal eigenvalue $\lambda(p)$ with strictly positive eigenvector~$g_p$, that is~$M_p g_p = \lambda (p) g_p$. Consequently, we find~$\left[ B_p + R \right] g_p = \mathcal{H}(p) g_p$ with the same eigenvector~$g_p$ and principal eigenvalue~$\mathcal{H}(p) = -\lambda(p)$. This finishes the verification of~\ref{MM:item:T2}. % \end{proof} \begin{proof}[Verification of (T3) of Theorem \ref{thm:results:action_integral_representation}] By Proposition~\ref{proposition:appendix:PrEv:M_matrix}, the eigenvalue satisfies \begin{multline*} \mathcal{H}(p) = - \sup_{g>0} \inf_{y,i} \left[ \frac{1}{g(y,i)} \left( -B_p - R \right)g(y,i) \right] \\= \inf_{\varphi} \sup_{y,i} \bigg\{ r^i_{+}(y) \left[ e^{p}e^{\varphi^i(y+1)-\varphi^i(y)}-1 \right] + r^i_{-}(y) \left[ e^{-p}e^{\varphi^i(y-1)-\varphi^i(y)}-1 \right] \\+ \sum_{j = 1}^J r_{ij}(y) \left[ e^{\varphi(y,j)-\varphi(y,i)}-1 \right] \bigg\}. \end{multline*} Hence the eigenvalue is of the form % \[ \mathcal{H}(p) = \inf_{\varphi} \sup_{y,i} F(p, \varphi)(y,i), \] % with $F(p,\varphi)$ jointly convex in $p$ and $\varphi$, and convexity of $\mathcal{H}(p)$ follows as demonstrated in the proof of Theorem~\ref{thm:results:LDP_cont_MM_Limit_I}. Choosing the constant vector $\varphi = (1,\dots, 1)$ in the variational representation, we obtain $\mathcal{H}(0) \leq 0$. Conversely, any $\varphi$ admits a global minimum $(y_m,i_m)$. We have the estimate~$ F(0,\varphi)(y_m,i_m) \geq 0$. Therefore,~$\sup F(0,\varphi)\geq0$ for any $\varphi$, and~$\mathcal{H}(0) \geq 0$ follows. \end{proof} \subsubsection{Proof of Theorem \ref{thm:results:LDP_discr_MM_Limit_II}} \label{subsubsection:LDP_discr_MM_Limit_II} \begin{proof}[Verification of (T1) of Theorem \ref{thm:results:LDP_switching_MP}] We have~$\gamma(n)\to\infty$ as~$n\to\infty$. With functions of the form $f_n(x,i) = f(x) + \frac{1}{n} \varphi(nx) + \frac{1}{n\gamma(n)} \xi(nx,i)$, with functions~$\varphi$ and~$\xi(\cdot,i)$ in $C(\mathbb{T}_{\ell,1})$, we obtain % \begin{multline*} H_nf_n(x,i) = r^i_{+}(nx)\left[e^{n\left(f(x+\frac{1}{n})-f(x)\right)}e^{\varphi(nx+1)-\varphi(nx)} e^{\left( \xi(nx + 1,i) - \xi(nx,i) \right) / \gamma(n)}-1\right] \\ + r^i_{-}(nx)\left[e^{n\left(f(x-\frac{1}{n})-f(x)\right)}e^{\varphi(nx-1)-\varphi(nx)} e^{\left( \xi(nx - 1,i) - \xi(nx,i) \right) / \gamma(n)} -1\right] \\ + \gamma(n)\sum_{j = 1}^J r_{ij}(nx)\left[e^{\left(\xi(nx,j)-\xi(nx,i)\right) / \gamma(n)}-1\right]. \end{multline*} Take $E^\prime := \mathbb{T}_{\ell,1} \times \{1,\dots,J\}$ and set % \begin{multline*} H:= \bigg\{ (f, H_{f,\varphi,\xi}) \, : \, f \in C^1(\mathbb{T}_\ell) \text{ and } H_{f, \varphi, \xi} \in C(\mathbb{T}_\ell \times E^\prime), \\ \varphi \in C(\mathbb{T}_{\ell,1}), \; \xi = (\xi^1, \dots, \xi^J) \in C(E^\prime) \simeq (C(\mathbb{T}_{\ell,1}))^J \bigg\}, \end{multline*} with image functions $H_{f,\varphi} : \mathbb{T}_\ell \times E^\prime \to \mathbb{R}$ defined by % \begin{multline} H_{f,\varphi}(x,y,i) := r^i_{+}(y)\left[e^{\partial_x f(x)}e^{\varphi(y+1)-\varphi(y)}-1\right]+r^i_{-}(y)\left[e^{-\partial_x f(x)}e^{\varphi(y-1)-\varphi(y)}-1\right]\\ + \sum_{j = 1}^J r_{ij}(y)\left[\xi(y,j) - \xi(y,i)\right]. \label{eq:LDP_MM:discrII:limit_op_H} \end{multline} % Then with the embedding $\eta_n': E_n \to E^\prime, (x,i)\mapsto\eta_n^\prime(x,i):=(nx,i)$, and the projection $\eta_n (x,i) = x$, Item~(C1) is satisfied. Regarding Item~(C2), consider a pair~$(f,H_{f,\varphi,\xi}) \in H$. The function $f_n(x,i):=f(x)+\frac{1}{n}\varphi(nx) + \frac{1}{n\gamma(n)} \xi(nx,i)$ satisfies~$f_n\rightarrow f$ uniformly in $(x,i)$ with respect to $\eta_n$. For the convergence of images, use % \[ \sup_{x,i} \bigg| \left(\xi(nx + 1,i) - \xi(nx,i)\right)/\gamma(n) \bigg| \leq \frac{1}{\gamma(n)} \sup_{y,i} \bigg| \xi(y + 1,i) - \xi(y,i) \bigg| \xrightarrow{n\to\infty} 0. \] % Expanding the exponential terms in $H_n f_n$ and using the same uniform bounds lead to the claimed convergence. Finally, (C3) is satisfied, since the images \eqref{eq:LDP_MM:discrII:limit_op_H} depend on $x$ only via derivatives of $f$. % \end{proof} % % \begin{proof}[Verification of (T2) of Theorem \ref{thm:results:LDP_switching_MP}] % For any $p \in \mathbb{R}$, we wish to obtain functions $\varphi \in C(\mathbb{T}_{\ell,1})$ and $\xi \in C(E^\prime)$ such that the images $H_{\varphi,\xi}(p,y,i)$ are constant in $(y,i)$. We reduce that to a principal-eigenvalue problem. \begin{lemma}\label{lemma:LDP_MM:discrII:principal_ev} Let $E^\prime = \mathbb{T}_{\ell,1} \times \{1,\dots,J\}$, $p\in\mathbb{R}$, and let $H \subseteq C^1(\mathbb{T}_\ell) \times C(\mathbb{T}_\ell \times E^\prime)$ be the multivalued operator from \eqref{eq:LDP_MM:discrII:limit_op_H}. Then: % \begin{enumerate}[(a)] \item The images $H_{\varphi,\xi}(p,y,i)$ are of the form % \[ \tilde{H}_{\varphi,\xi}(p,y,i) = \frac{1}{g(y)} B^i_p g(y) + R \xi(y,i), \] % where~$g(y) := e^{\varphi(y)}$, % \[ B^i_p g(y) : = r^i_+(y)\left[e^pg(y+1)-g(y)\right] + r^i_-(y)\left[e^{-p}g(y-1)-g(y)\right] \] % and % \[ R \xi (y,i) := \sum_{j = 1}^J r_{ij}(y) \left[ \xi(y,j)-\xi(y,i) \right]. \] % \item For any $g(y) = e^{\varphi(y)}$ and $y\in \mathbb{T}_{\ell,1} \simeq \{0,1,\dots,\ell-1\}$, there exists a function $\xi_p(y,\cdot) \in C(\{1,\dots,J\})$ such that for all $i \in \{1,\dots,J\}$, % \[ \frac{1}{g(y)} B^i_{p} g(y) + R\xi(y,i) = \frac{1}{g(y)} B_p g(y), \] % with % \[ B_p g(y) : = \overline{r}_+(y)\left[e^pg(y+1)-g(y)\right] + \overline{r}_-(y)\left[e^{-p}g(y-1)-g(y)\right], \] % where $\overline{r}_{\pm}(y) = \sum_{i = 1}^J \mu_y(i) r_{\pm}^i(y)$ are the average jump rates with respect to the stationary measure $\mu_y \in \mathcal{P}(\{1,\dots,J\})$ of the jump process with rates~$r_{ij}(y)$. \item There exists a strictly positive eigenvector $g_p = \left( g_p(0), \dots, g_p(\ell-1) \right) \in \mathbb{R}^\ell$, $g_p(y) > 0$ for all $y = 0, \dots, \ell-1$, and a corresponding principal eigenvalue $\mathcal{H}(p) \in \mathbb{R}$ such that % $$ B_p g_p = \mathcal{H}(p) g_p. $$ \end{enumerate} \end{lemma} With $\varphi_p := \log g_p$ and the corresponding function~$\xi_p(y,i)$ of~(b), we find % $$ H_{\varphi_p,\xi_p}(p,y,i) \overset{(a)}{=} \frac{1}{g(y)} B^i_p g(y) + R \xi_p(y,i) \overset{(b)}{=} \frac{1}{g_p(y)} B_p g_p(y) \overset{(c)}{=} \mathcal{H}(p). $$ \emph{Proof of Lemma \ref{lemma:LDP_MM:discrII:principal_ev}.} Part (a) follows from rewriting the images in terms of $g(y) = \log\varphi(y)$. For part (b), the argument is similar to the one given in the proof of Theorem \ref{thm:results:LDP_cont_MM_Limit_II}. By the Fredholm alternative, for every $y \in \mathbb{T}_{\ell,1} \simeq \{0,\dots,\ell-1\}$, the equation % $$ R\xi(y,i) = \frac{1}{g(y)} \left[B^i_p - B_p\right]g (y) $$ % has a solution $\xi(y,\cdot) \in C(\{1,\dots,J\})$ if and only if for the stationary measure $\mu_y \in \mathcal{P}(\{1,\dots,J\})$ satisfying $R^\ast \mu_y = 0$, we have % $$ \bigg\langle \mu_y , \frac{1}{g(y)} \left[ B^i_p - B_p \right]g (y) \bigg\rangle = 0, $$ % where the pairing corresponds to a sum over the $i \in \{1,\dots,J\}$. Writing out that condition leads exactly to the average operator $B_p$ as given in (b). \smallskip For part (c), we note that $B_p g_p = \mathcal{H}(p) g_p$ is a matrix eigenvalue problem. The matrix $B_p \in \mathbb{R}^{\ell \times \ell}$ has nonzero entries similar to a discretized Laplacian with periodic boundaries: % \begin{align*} B_p = \begin{pmatrix} -(\overline{r}_+(0) + \overline{r}_-(0)) & \overline{r}_+(0) e^p & \dots & \overline{r}_-(0)e^{-p} \\ \overline{r}_-(1) e^{-p} & -(\overline{r}_+(1) + \overline{r}_-(1)) & \overline{r}_+(1)e^p & \dots \\ 0 & \overline{r}_-(2)e^{-p} & -(\overline{r}_+(2) + \overline{r}_-(2)) & \dots \\ \vdots & \vdots & \ddots & \vdots\\ \end{pmatrix}. \end{align*} % By the positivity assumptions on the rates $r_\pm^i$ in Definition \ref{def:intro:discr_MM}, the average rates $\overline{r}_\pm$ are positive. Thereby, $M_p := -B_p$ is an irreducible $M$-matrix, so that by Proposition \ref{proposition:appendix:PrEv:M_matrix}, there exists a strictly positive eigenvector $g_p > 0$ and a principal eigenvalue $\lambda(p) \in \mathbb{R}$ such that % $ M_p g_p = \lambda(p) g_p. $ % That implies $B_p g_p = \mathcal{H}(p) g_p$ with the same eigenvector $g_p$ and principal eigenvalue $\mathcal{H}(p) = -\lambda(p)$. This finishes the proof of Lemma \ref{lemma:LDP_MM:discrII:principal_ev}, and thereby the verification of (T2). \end{proof} % % \begin{proof}[Verification of (T3) of Theorem \ref{thm:results:action_integral_representation}] We prove the claimed properties of~$\mathcal{H}(p)$ by means of a variational representation. By Proposition~\ref{proposition:appendix:PrEv:M_matrix}, we have % \begin{align*} \mathcal{H}(p) &= - \sup_{g>0} \inf_{y} \left[ \frac{1}{g(y)} (-B_p) g(y) \right] \\ &= \inf_{\varphi} \sup_{y} \bigg\{ \overline{r}_+(y)\left[e^p e^{\varphi(y+1)-\varphi(y)} - 1\right] + \overline{r}_-(y)\left[e^{-p} e^{\varphi(y-1)-\varphi(y)} - 1\right] \bigg\}. \end{align*} % The representation is of the form % \[ \mathcal{H}(p) = \inf_{\varphi} \sup_{y} F(p, \varphi(y)), \] % with a joint convex $F$. With that, convexity and~$\mathcal{H}(0)=0$ follow as above. \end{proof} \subsection{Detailed balance implies symmetry of the Hamiltonian} \label{subsection:detailed_balance} In Theorem~\ref{thm:results:detailed_balance_limit_I}, we proved that detailed-balance implies symmetric Hamiltonians. The proof was based on a suitable variational representation of the Hamiltonian. In this section, we show how to obtain this representation. \smallskip To that end, we recall the setting. We work with~$E^\prime = \mathbb{T}^d \times \{1, \dots, J\}$, and denote by~$\mathcal{P}(E^\prime)$ the set of probability measures on $E^\prime$. The Hamiltonian~$\mathcal{H}(p)$ is the principal eigenvalue of the cell problem~\eqref{eq:LDP_MM:contI:cell_problem} described in Lemma~\ref{lemma:LDP_MM:contI:principal_eigenvalue}. Here, we start from the fact that this Hamiltonian satisfies \begin{equation} \mathcal{H}(p) = \sup_{\mu\in\mathcal{P}(E^\prime)} \left[ \int_{E^\prime} V_p(z) \, \mathrm{d} \mu(z) - I_p(\mu) \right]. \label{eq:results:LDP_MM:DV_var_rep_H(p)} \end{equation} In this formula, we have the continuous map \begin{equation}\label{MM:eq:function-V-in-Hamiltonian} V_p (x,i) := \frac{1}{2} p^2 - p\cdot \nabla\psi^i(x), \end{equation} and the Donsker-Varadhan functional \begin{equation} I_p(\mu)=-\inf_{u > 0}\int_{E^\prime} \frac{L_p u}{u}\, \mathrm{d} \mu, \label{eq:results:LDP_MM:DV_functional} \end{equation} where the infimum is over strictly positive~$u\in C^2(E')$ and the operator~$L_p$ is \begin{equation} L_p u(x,i) := \frac{1}{2} \Delta_x u(x,i) + (p-\nabla \psi_i(x))\cdot \nabla_x u(x,i) + \sum_{j = 1}^J r_{ij}(x) \left[u(x,j) - u(x,i)\right]. \label{eq:results:LDP_MM:L_p_in_DV_functional} \end{equation} The variational representation~\eqref{eq:results:LDP_MM:DV_var_rep_H(p)} is a special case of Donsker's and Varadhan's results on principal eigenvalues~\cite{DonskerVaradhan75, DonskerVaradhan76}. Under their general conditions, the infimum is taken over functions that are in the domain of the infinitesimal generator of the semigroup generated by~$L_p$. Pinsky showed that the infimum can be taken over~$C^2$ functions if the coefficient functions appearing in the operators are smooth~\cite{pinsky1985evaluating, Pi07}. \smallskip Given in the form~\eqref{eq:results:LDP_MM:DV_var_rep_H(p)}, it is not clear why~$\mathcal{H}(p)$ should be symmetric under the detailed-balance condition. We perform a suitable shift in the infimum of the Donsker-Varadhan functional~\eqref{eq:results:LDP_MM:DV_functional} to obtain a suitable representation. Let us first briefly describe this transformation in an informal way. Representing in~\eqref{eq:results:LDP_MM:DV_functional} the strictly positive functions as~$u=\exp(\varphi)$, we find \begin{equation*} I_p(\mu)=-\inf_{\varphi} \sum_i \int\left[ \frac{1}{2}\Delta\varphi_i + \frac{1}{2}|\nabla\varphi_i|^2 +(p-\nabla\psi_i) \nabla\varphi_i+\sum_j r_{ij}\left(e^{\varphi_j-\varphi_j}-1\right)\right] \mathrm{d}\mu_i. \end{equation*} Suppose that~$ \mathrm{d}\mu_i=\overline{\mu}_i\, \mathrm{d} x$ with strictly positive~$\overline{\mu}_i$, where~$ \mathrm{d} x$ is the Lebesgue measure on the torus. Then shifting in the infimum as~$\varphi_i\to\varphi_i+\psi_i+\frac{1}{2}\log\overline{\mu}_i$, we find by calculation that \begin{equation} \label{MM:eq:DV-functional-after-shift} I_p(\mu)=\mathcal{R}(\mu)+\int_{E^\prime} V_p \, \mathrm{d}\mu - K_p(\mu), \end{equation} where~$\mathcal{R}(\mu)$ is the Fisher information given by \begin{equation} \label{MM:eq:relative-Fisher-information} \mathcal{R}(\mu) := \frac{1}{8}\sum_i\int_{\mathbb{T}^d}\left|\nabla \left(\log\frac{\overline{\mu}_i}{e^{-2\psi_i}}\right)\right|^2\, \mathrm{d}\mu_i, \end{equation} and~$K_p(\mu)$ is given by \begin{multline} K_p(\mu) = \inf_{\phi}\bigg\{\sum_{i = 1}^J \int_{\mathbb{T}^d}\left( \frac{1}{2}|\nabla \phi_i(x) + p|^2 -\sum_{j = 1}^J r_{ij}(x)\right) \, \mathrm{d} \mu_i(x)\\ +\sum_{i, j = 1}^J \int_{\mathbb{T}^d}r_{ij}(x) e^{-2\psi_i(x)}\sqrt{\overline{\mu}_i(x) \overline{\mu}_j(x)} e^{\psi_j(x) + \psi_i(x)} e^{\phi(x,j) - \phi(x,i)} \, \mathrm{d} x\bigg\}. \label{eq:results:LDP_MM:K_p(mu)_I} \end{multline} Plugging formula~\eqref{MM:eq:DV-functional-after-shift} into the variational representation~\eqref{eq:results:LDP_MM:DV_var_rep_H(p)} leads to the desired representation of the Hamiltonian. The transformation we used corresponds to shifting by~$(1/2)\log(\overline{\mu}_i/\pi_i)$, where~$\pi_i=e^{-2\psi_i}$ is the stationary measure (up to multiplicative constant). This transformation is actually reminiscent of a \emph{symmetrization} discussed in Touchette's notes~\cite[Eq.~(36)]{Touchette2018}. Finally, when formulating the detailed-balance condition with additional constants in~\eqref{MM:eq:detailed-balance} (meaning not shifting the potentials by constants to renormalized), one can include these constants in the shift to arrive at the same conclusions. \smallskip To make the strategy displayed above rigorous, we prove that we can work with measures~$\mu$ having the required regularity properties. The central idea is to exploit the fact that~$I_p(\mu)$ is finite since~$\mathcal{H}(p)$ is finite. By a result of Stroock~\cite[Theorem 7.44]{stroock2012introduction}, finiteness of the Donsker-Varadhan functional implies certain regularity properties in case the generator is reversible. Since the generator~$L_p$ is not reversible, we instead bound~$I_p$ by a suitable Donsker-Varadhan functional~$I_\mathrm{rev}$ corresonding to a reversible process, and can then apply~\cite[Theorem 7.44]{stroock2012introduction}. This strategy appears in the proof of the following proposition. The formula we use in the proof of Theorem~\ref{thm:results:detailed_balance_limit_I} of Section~\ref{subsection:results:LDP_in_MM} is given in~(c). \begin{proposition} The Hamiltonian~$\mathcal{H}(p)$ given by~\eqref{eq:results:LDP_MM:DV_var_rep_H(p)} satisfies the following: \begin{enumerate}[(a)] \item % The supremum in \eqref{eq:results:LDP_MM:DV_var_rep_H(p)} can be taken over a smaller set $\mathbf{P}$ of measures, that is % $$ \mathcal{H}(p) = \sup_{\mu\in\mathbf{P}} \left[ \int_{E^\prime} V_p \, \mathrm{d}\mu - I_p(\mu) \right], $$ % where % $ \mathbf{P} \subset \mathcal{P}(E^\prime)$ are the probability measures $\mu = (\mu_1,\dots,\mu_J)$ such that: % \begin{enumerate}[(P1)] \item Each $\mu_i$ is absolutely continuous with respect to the uniform measure on $\mathbb{T}^d$. \item For each~$i$, we have~$\nabla (\log \overline{\mu}_i) \in L^2_{\mu_i}(\mathbb{T}^d)$, where $ \mathrm{d}\mu_i(x) = \overline{\mu}_i(x) \mathrm{d} x$. \end{enumerate} % \item We have % \begin{equation} \mathcal{H}(p) = \sup_{\mu \in \mathbf{P}} \left[ K_p(\mu) - \mathcal{R}(\mu) \right], \label{eq:results:LDP_MM:new_representation_H(p)} \end{equation} with the maps~$\mathcal{R}$ and~$K_p$ given by~\eqref{MM:eq:relative-Fisher-information} and~\eqref{eq:results:LDP_MM:K_p(mu)_I} above. In~$K_p(\mu)$, the infimum can be taken over vectors of functions $\phi_i = \phi(\cdot,i)$ such that $\nabla \phi_i \in L^{2}_{\mu_i}(\mathbb{T}^d)$. \item Under the detailed balance condition, \begin{multline} K_p(\mu) = \inf_{\phi}\bigg\{ \sum_{i = 1}^J \int_{\mathbb{T}^d} \left( \frac{1}{2}|\nabla \phi^i(x) + p|^2 - \sum_{j = 1}^J r_{ij}(x) \right) \, \mathrm{d} \mu_i(x) \\ + \sum_{i, j = 1}^J \int_{\mathbb{T}^d} r_{ij}(x)e^{-2\psi_i(x)} \sqrt{\overline{\mu}_i(x) \overline{\mu}_j(x)} e^{\psi_j(x) + \psi_i(x)} \cosh{(\phi(x,j) - \phi(x,i))} \, \mathrm{d} x \bigg\}. \label{eq:results:LDP_MM:K_p(mu)_I:det_bal} \end{multline} % \end{enumerate} % \label{prop:results:detailed_balance_limit_I} \end{proposition} % The representation~\eqref{eq:results:LDP_MM:K_p(mu)_I:det_bal} follows from~\eqref{eq:results:LDP_MM:K_p(mu)_I} by rewriting the sums appearing therein as~$\sum_{ij} a_{ij} = \frac{1}{2} \sum_{ij} (a_{ij} + a_{ji})$, where % $$ a_{ij} = \int_{\mathbb{T}^d} r_{ij}e^{-2\psi_i} \sqrt{\overline{\mu}^i(x) \overline{\mu}^j(x)} e^{\psi^j(x) + \psi^i(x)} e^{\phi(x,j) - \phi(x,i)} \, \mathrm{d} x. $$ This leads to the $\cosh(\cdot)$ terms in \eqref{eq:results:LDP_MM:K_p(mu)_I:det_bal}, and proves (c). We now give the proof of (a) and (b) of Proposition \ref{prop:results:detailed_balance_limit_I}. % \begin{proof}[Proof of (a) in Proposition \ref{prop:results:detailed_balance_limit_I}] Since $\mathcal{H}(p)$ is finite for any $p$ and $V_p(\cdot)$ is bounded, the supremum can be taken over measures $\mu$ such that $I_p(\mu)$ is finite. We show that finiteness of $I_p(\mu)$ implies that $\mu$ must satisfy (P1) and (P2). To that end, define the map $L_{\text{rev}} : \mathcal{D}(L_{\mathrm{rev}}) \subseteq C(E^\prime) \to C(E^\prime)$ by $\mathcal{D}(L_{\mathrm{rev}}) := C^2(E^\prime)$ and % $$ L_{\mathrm{rev}} f(x,i) = \frac{1}{2} \Delta_x f(x,i) - \nabla \psi_i(x) \cdot \nabla_x f(x,i) + \overline{\gamma} \sum_{j \neq i} s_{ij}(x) \left[ f(x,j) - f(x,i) \right], $$ % with jump rates $s_{ij}$ defined as % $ s_{ij} \equiv 1 $ % and % $ s_{ji} \equiv e^{2\psi_j - 2\psi_i}, $ % for $i \leq j$, and with % $ \overline{\gamma} := \sup_{\mathbb{T}^d} \left( r_{ij} / s_{ij}\right) < \infty, $ % where $r_{ij}(\cdot)$ are the jump rates appearing in~$L_p$. Furthermore, define $I_{L_{\text{rev}}} : \mathcal{P}(E^\prime) \to [0,\infty]$ by % $$ I_{L_\mathrm{rev}}(\mu) := -\inf_{\varphi \in C^2(E^\prime)} \int_{E^\prime} e^{-\varphi} L_{\mathrm{rev}} (e^{\varphi}) \, \mathrm{d}\mu. $$ % We prove two statements. First, if $I_{L_{\mathrm{rev}}}(\mu)$ is finite, the measure $\mu$ satisfies (P1) and (P2). Second, if $I_p(\mu)$ is finite, then $I_{L_{\mathrm{rev}}}(\mu)$ is finite. Since % $ s_{ij} e^{-2\psi_i} = s_{ji} e^{-2\psi_j}, $ % the operator $L_\mathrm{rev}$ admits a reversible measure $\nu_{\text{rev}}$ in $\mathcal{P}(E^\prime)$ given by % $$ \nu_{\mathrm{rev}}(A_1, \dots, A_J) = \frac{1}{\mathcal{Z}} \sum_{i = 1}^J \nu_{\mathrm{rev}}^i(A_i), \quad \text{ where } \mathrm{d}\nu_{\mathrm{rev}}^i = e^{-2 \psi_i} \mathrm{d} x \text{ and } \mathcal{Z} = \sum_i \nu_\mathrm{rev}^i(\mathbb{T}^d). $$ % The measure $\nu_{\mathrm{rev}}$ is reversible for $L_{\mathrm{rev}}$ in the sense that for all $f,g \in \mathcal{D}(L_\text{rev})$, % $$ \langle L_\mathrm{rev} f, g \rangle_{\nu_\mathrm{rev}} = \langle f, L_\mathrm{rev} g \rangle_{\nu_\mathrm{rev}}, \quad \text{ where } \langle f, h \rangle_{\nu_\mathrm{rev}} = \frac{1}{\mathcal{Z}} \sum_i \int_{\mathbb{T}^d} f^i(x)h^i(x) \, \mathrm{d}\nu_\mathrm{rev}^i(x). $$ % Hence by Stroock's result~\cite[Theorem 7.44]{stroock2012introduction}, % \begin{align*} I_{L_{\text{rev}}}(\mu) &= \begin{cases} \displaystyle -\langle f_\mu, L_\text{rev} f_\mu \rangle_{\nu_\text{rev}} ,& f_\mu = \sqrt{g_\mu} \in D^{1/2} := \mathcal{D}\left( \sqrt{-L_\text{rev}} \right) \text{ and } g_\mu = \frac{ \mathrm{d}\mu}{ \mathrm{d} \nu_\text{rev}}, \\ \displaystyle +\infty ,& \text{otherwise}, \end{cases} \end{align*} where $ \mathrm{d}\mu / \mathrm{d}\nu_\text{rev}$ is the Radon-Nikodym derivative. This statement entails that if~$I_{L_\mathrm{rev}}(\mu)$ is finite, then~$\mu\ll\nu_{\mathrm{rev}}$. Then~$I_{L_\mathrm{rev}}(\mu)$ is explicitly given by % \begin{multline} I_{L_{\text{rev}}}(\mu) = -\langle f, L_\text{rev} f \rangle_{\nu_\text{rev}} \\= \frac{1}{\mathcal{Z}}\sum_{i=1}^J \left[ \int_{\mathbb{T}^d} |\nabla f^i(x)|^2 \, d\nu_\text{rev}^i(x) + \overline{\gamma} \sum_{j = 1}^J \int_{\mathbb{T}^d} s_{ij}(x)|f^j(x) - f^i(x)|^2 \, d\nu_\text{rev}^i(x) \right], \label{eq:LDP_MM:det_bal:I_L_rev_explicit} \end{multline} % where we write $f^i = ( \mathrm{d}\mu^i/ \mathrm{d}{\nu^i_{\text{rev}}})^{1/2}$. Furthermore, $\mu^i$ is absolutely continuous with respect to $\nu^i = e^{-2\psi^i} \mathrm{d} x$. Since~$e^{-2\psi^i} \mathrm{d} x \ll \mathrm{d} x$, we find that~$\mu^i$ is absolutely continuous with respect to the volume measure on $\mathbb{T}^d$. Hence (P1) holds true. \smallskip We prove that finiteness of $I_{L_\mathrm{rev}}(\mu)$ implies (P2) by showing that the integral % $ \int_{\mathbb{T}^d} |\nabla (\log \overline{\mu}^i)|^2 \, d\mu^i $ % is finite. Let $g^i_\mu := \mathrm{d}\mu^i / \mathrm{d}\nu^i_{\mathrm{rev}}$ be the density of $\mu^i$ with respect to $\nu_\mathrm{rev}^i$. Then the densities $\overline{\mu}^i = \mathrm{d} \mu^i/ \mathrm{d} x$ satisfy~$g_\mu^i = \overline{\mu}^i e^{2\psi^i}$, because % $$ \overline{\mu}^i = \frac{ \mathrm{d}\mu^i}{ \mathrm{d}\nu^i_\text{rev}} \frac{ \mathrm{d}\nu_\text{rev}^i}{ \mathrm{d} x} = \frac{ \mathrm{d}\mu^i}{ \mathrm{d}\nu^i_\text{rev}} e^{-2\psi^i}. $$ Let $f_\mu^i := \sqrt{g_\mu^i}$. If $I_{L_\mathrm{rev}}(\mu)$ is finite, then by~\eqref{eq:LDP_MM:det_bal:I_L_rev_explicit}, $\int_{\mathbb{T}^d}|\nabla f_\mu^i|^2 \mathrm{d}\nu_\mathrm{rev}^i$ is finite for every $i = 1,\dots, J$. Hence with the estimate % \begin{align*} \int_{\mathbb{T}^d} |\nabla f_\mu^i|^2 \mathrm{d}\nu_\text{rev}^i &\geq \int_{\mathbb{T}^d} |\nabla f_\mu^i|^2 \mathbf{1}_{\{ \overline{\mu}^i > 0\}} \mathrm{d}\nu_\text{rev}^i = \frac{1}{4}\int_{\mathbb{T}^d} \frac{|\nabla g_\mu^i|^2}{g_\mu^i} \mathbf{1}_{\{ \overline{\mu}^i > 0\}} \mathrm{d}\nu^i_\text{rev} \\ &= \frac{1}{4}\int_{\mathbb{T}^d} \frac{| e^{2\psi^i} \nabla \overline{\mu}^i + 2 \overline{\mu}^i \nabla \psi^i e^{2\psi^i}|^2 }{\overline{\mu}^i} e^{-4\psi^i} \mathbf{1}_{\{ \overline{\mu}^i > 0\}} \mathrm{d} x\\ &= \frac{1}{4} \int_{\mathbb{T}^d} | \nabla (\log \overline{\mu}^i) + 2 \nabla \psi^i |^2 \mathbf{1}_{\{ \overline{\mu}^i > 0\}} \mathrm{d}\mu^i \\ &\geq \frac 18 \int_{\mathbb{T}^d} |\nabla(\log \overline{\mu}^i)|^2 \mathbf{1}_{\{ \overline{\mu}^i > 0\}} \mathrm{d}\mu^i - \int_{\mathbb{T}^d} |\nabla \psi^i|^2 \mathbf{1}_{\{ \overline{\mu}^i > 0\}} \mathrm{d}\mu^i, \end{align*} we find~$\nabla (\log \overline{\mu}^i) \in L^2_{\mu^i}(\mathbb{T}^d)$. We are left with proving that if $I_p(\mu)$ is finite, then $I_{L_{\mathrm{rev}}}(\mu)$ is finite. Estimating $r_{ij} / s_{ij}$ from above by $\overline{\gamma} = \sup_{\mathbb{T}^d} (r_{ij} / s_{ij})$, we find % \begin{multline*} I_p(\mu) \geq \sup_\varphi \sum_i \int_{\mathbb{T}^d} - \bigg[ \frac{1}{2} \Delta \varphi^i(x) + \frac{1}{2} |\nabla \varphi^i(x)|^2 + (p - \nabla\psi^i(x)) \nabla \varphi^i(x) \\+ \overline{\gamma} \sum_{j\neq i} s_{ij}(x) (e^{\varphi(x,j) - \varphi(x,i)} -1) \bigg] \, \mathrm{d}\mu^i - s_0(\mu), \end{multline*} % where % $ s_0(\mu) = \sum_{ij} \int_{\mathbb{T}^d} \left[ \overline{\gamma} \, s_{ij}(x) - r_{ij}(x) \right] \mathrm{d}\mu^i $ % is finite. For $p = 0$, this means that $I_0 (\mu) \geq I_{L_\mathrm{rev}}(\mu) - s_0(\mu)$ holds for all $\mu \in \mathcal{P}(E^\prime)$. In particular, if $I_0 (\mu)$ is finite, then $I_{L_\mathrm{rev}}(\mu)$ is finite. For $p \neq 0$, the additional $p$-term is dealt with by Young's inequality applied as $-p\cdot \nabla \phi^i \geq - p^2/(2 \varepsilon) - \frac{\displaystyle \varepsilon}{2} |\nabla\phi^i|^2$. Thereby, % \begin{multline*} I_p(\mu) \geq \sup_\varphi \sum_i \int_{\mathbb{T}^d} - \bigg[ \frac{1}{2} \Delta \varphi^i(x) + \frac{1 + \varepsilon}{2} |\nabla \varphi^i(x)|^2 + - \nabla\psi^i(x) \nabla \varphi^i(x) \\+ \overline{\gamma} \sum_{j\neq i} s_{ij}(x) (e^{\varphi(x,j) - \varphi(x,i)} -1) \bigg] \, \mathrm{d}\mu^i -\frac{p^2}{2\varepsilon}- s_0(\mu) \\= \frac{1}{\lambda} \sup_\varphi \sum_i \int_{\mathbb{T}^d} - \bigg[ \frac{1}{2} \Delta \varphi^i(x) + \frac{1}{2} |\nabla \varphi^i(x)|^2 + - \nabla\psi^i(x) \nabla \varphi^i(x) \\+ \lambda \overline{\gamma} \sum_{j\neq i} s_{ij}(x) (e^{(\varphi(x,j) - \varphi(x,i)) / \lambda} -1) \bigg] \, \mathrm{d}\mu^i -\frac{p^2}{2\varepsilon}- s_0(\mu), \end{multline*} % where the last equality follows by rescaling $\varphi \rightarrow \varphi / \lambda$, with $\lambda = 1 + \varepsilon > 1$. Therefore, apart from the factor $1/\lambda$ in the exponential term and the multiplicative factor $\lambda \overline{\gamma}$, we obtain the same estimate as above in the $p = 0$ case. Denoting the supremum term in the last line by $I^\lambda_{L_\text{rev}}$, we found the estimate % \[ I_p(\mu) \geq \frac{1}{\lambda} I^\lambda_{L_\text{rev}}(\mu) - s_p(\mu), \] % where % $ s_p(\mu) = \frac{p^2}{2\varepsilon} + s_0(\mu) $ % is finite. We now show that~$I_{L_\text{rev}}(\mu) = \infty$ implies $I^\lambda_{L_{\text{rev}}}(\mu) = \infty$, which proves that finiteness of $I_{L_\text{rev}}^\lambda (\mu)$ implies finiteness of $I_{L_{\text{rev}}}(\mu)$. If $I_{L_\text{rev}}(\mu) = \infty$, then by definition, there exist functions $\varphi_n$ such that % \begin{multline*} a(\varphi_n) := -\sum_{i=1}^J \int_{\mathbb{T}^d} \bigg[ \frac{1}{2} \Delta\varphi_n^i + \frac{1}{2} |\nabla \varphi_n^i|^2 -\nabla\psi^i \nabla \varphi_n^i \\+ \overline{\gamma} \sum_{j\neq i} s_{ij} \left( e^{\varphi_n(x,j) - \varphi_n(x,i)} - 1 \right) \bigg] \, \mathrm{d}\mu^i(x) \xrightarrow{ n \rightarrow \infty} \infty. \end{multline*} % We aim to prove that $a(\varphi_n) \leq I^\lambda_{L_\text{rev}}(\mu)$ holds for all $n$. To that end, write % \begin{multline*} a^\lambda(\varphi_n) := - \sum_i \int_{\mathbb{T}^d} \bigg[ \frac{1}{2} \Delta \varphi_n^i + \frac{1}{2} |\nabla \varphi_n^i|^2 + - \nabla\psi^i \nabla \varphi_n^i \\+ \lambda \overline{\gamma} \sum_{j\neq i} s_{ij} (e^{(\varphi_n(x,j) - \varphi_n(x,i)) / \lambda} -1) \bigg] \, \mathrm{d}\mu^i \end{multline*} % for the according evaluation of $\varphi_n$ in $I^\lambda_{L_\text{rev}}(\mu)$. we have % $ I^\lambda_{L_\text{rev}}(\mu) \geq a^\lambda(\varphi_n), $ and show that $a^\lambda(\varphi^n) \rightarrow \infty$. The only difference between $a(\varphi_n)$ and $a^\lambda(\varphi_n)$ lies in the $\lambda$-factors that appear in the exponential terms. Since~$e^x \geq e^x \mathbf{1}_{\{x \geq 0\}}$, % \begin{multline*} \overline{a}_n := -\sum_{i=1}^J \int_{\mathbb{T}^d} \bigg[ \frac{1}{2} \Delta\varphi_n^i + \frac{1}{2} |\nabla \varphi_n^i|^2 -\nabla\psi^i \nabla \varphi_n^i \\+ \overline{\gamma} \sum_{j\neq i} s_{ij} \left( e^{\varphi_n(x,j) - \varphi_n(x,i)} \mathbf{1}_{\{\varphi_n(x,j) - \varphi_n(x,i) \geq 0\}} - 1 \right) \bigg] \, \mathrm{d}\mu^i(x) \end{multline*} % diverges as $n \rightarrow \infty$ (we have $a(\varphi_n) \leq \overline{a}_n$). Define this analogously for $a^\lambda(\varphi_n)$, % \begin{multline*} \overline{a}^\lambda_n := - \sum_i \int_{\mathbb{T}^d} \bigg[ \frac{1}{2} \Delta \varphi_n^i + \frac{1}{2} |\nabla \varphi_n^i|^2 + - \nabla\psi^i \nabla \varphi_n^i \\+ \lambda \overline{\gamma} \sum_{j\neq i} s_{ij} \left( e^{(\varphi_n(x,j) - \varphi_n(x,i)) / \lambda} \mathbf{1}_{\{ \varphi_n(x,j) - \varphi_n(x,i) \geq 0 \}} -1 \right) \bigg] \, \mathrm{d}\mu^i. \end{multline*} Since~$a^\lambda(\varphi_n)\geq \overline{a}^\lambda_n - \sum_{ij} \int_E \lambda \overline{\gamma} s_{ij}(x) \, d\mu^i(x)$, proving that $\overline{a}_n^\lambda \rightarrow \infty$ as $n \to \infty$ is sufficient for obtaining $a^\lambda(\varphi_n) \rightarrow \infty$. Finally, the fact that $\overline{a}^\lambda_n$ diverges as $n \to \infty$ follows by noting that $\overline{a}_n\leq \overline{a}^\lambda_n$, which can be seen via % \begin{multline*} \overline{a}_n - \overline{a}^\lambda_n = -\sum_i \int_{\mathbb{T}^d} \overline{\gamma} \sum_{j \neq i} s_{ij} \left( e^{\varphi_n^j - \varphi_n^i} \mathbf{1}_{\{ \varphi_n^j - \varphi_n^i \geq 0 \}} - 1 \right) d\mu^i \\+ \lambda \overline{\gamma} \sum_i \int_{\mathbb{T}^d} s_{ij} \left( e^{\varphi_n^j - \varphi_n^i} \mathbf{1}_{\{ \varphi_n^j - \varphi_n^i \geq 0 \}} - 1 \right) \mathrm{d}\mu^i \\ = \overline{\gamma} (1 - \lambda) \sum_{ij} \int_{\mathbb{T}^d} s_{ij} d\mu^i + \overline{\gamma} \sum_{ij} \int_{\mathbb{T}^d} s_{ij} \left( e^{(\varphi_n^j - \varphi_n^i) / \lambda} - e^{\varphi_n^j - \varphi_n^i} \right) \mathbf{1}_{\{ \varphi_n^j - \varphi_n^i \geq 0 \}} \mathrm{d}\mu^i, \end{multline*} % which is bounded above by zero since $\lambda = 1 + \varepsilon > 1$ and $e^{x / \lambda} \leq e^{x}$ for $x \geq 0$. This finishes the proof of part (a) of Proposition \ref{prop:results:detailed_balance_limit_I}. % \end{proof} % % \begin{proof}[Proof of (b) of Proposition \ref{prop:results:detailed_balance_limit_I}] It is sufficient to show that for any $\mu \in \mathbf{P}$, the Donsker-Varadhan functional~$I_p(\mu)$ satisfies~\eqref{MM:eq:DV-functional-after-shift}. Integration by parts gives \begin{multline*} I_p(\mu) = -\inf_{\varphi} \sum_i \int_{\mathbb{T}^d} \bigg[ -\frac{1}{2} \nabla\varphi^i \nabla(\log \overline{\mu}^i) + \frac{1}{2}|\nabla\varphi^i|^2 +(p-\nabla\psi^i) \nabla\varphi^i \\+ \sum_j r_{ij} \left( e^{\varphi^j - \varphi^i} - 1 \right) \bigg] \mathrm{d} \mu^i, \end{multline*} % where $ \mathrm{d} \mu^i = \overline{\mu}^i \mathrm{d} x$. By a density argument, the infimum can be taken over functions in~$L^{1,2}_{\mu^i}(\mathbb{T}^d)$. Now shifting in the infimum as~$\varphi_i\to\varphi_i+\frac{1}{2}\log(\overline{\mu}_i) + \psi^i$, we find after some algebra that \begin{multline*} I_p(\mu) = -\inf_\varphi \sum_i \int_{\mathbb{T}^d} \bigg[ \frac{1}{2} |\nabla\varphi^i + p|^2 - \frac{1}{2} | (p - \nabla\psi^i) - \frac{1}{2} \nabla \log\overline{\mu}^i|^2 \\+ \sum_j r_{ij} \left( \sqrt{\frac{\overline{\mu}^j}{\overline{\mu}^i}} e^{\psi^j - \psi^i} e^{\varphi^j - \varphi^i} - 1\right) \bigg]\, \mathrm{d}\mu^i. \end{multline*} The term containing the square roots and logarithms are not singular since they are integrated against $ \mathrm{d}\mu^i$, so that the integration is over the set $\{\overline{\mu}^i > 0\}$. Now writing out the terms and reorganizing them leads to the claimed equality. % \end{proof} % \section{Principal eigenvalues and their variational representations} \sectionmark{Principal eigenvalues} \label{appendix:prinipal_ev} In this section, we collect some results about the principal eigenvalue problems that we encounter in this chapter. \begin{definition}[Irreducible M-matrix] A matrix $P \in \mathbb{R}^{d\times d}$ is an \emph{irreducible M-matrix} if $P = s\mathbf{1} - R$, with some $s\in \mathbb{R}$ and an irreducible matrix $R \geq 0$ with non-negative elements. \label{def:appendix:PrEv:irreducible_M_matrix} \end{definition} The eigenvalue problems are the following: \begin{enumerate}[(E1)] \item For an irreducible M-matrix~$P \in \mathbb{R}^{d \times d}$, find a real eigenvalue $\lambda$ and a corresponding eigenvector $v > 0$ that has strictly positive components $v_j > 0$, such that $P v = \lambda v$. The eigenvalue problems arising for the discrete models (Lemmas \ref{lemma:LDP_MM:discrI:principal_ev} and \ref{lemma:LDP_MM:discrII:principal_ev}) are of that type. % \item For a second-order uniformly elliptic operator given by % \begin{equation} P = -\sum_{k \ell} a_{k \ell}(\cdot) \frac{\partial^2}{\partial x^k \partial x^\ell} + \sum_k b_k(\cdot) \frac{\partial}{\partial x^k} + c(\cdot), \label{eq:appendix:uniform_elliptic_op} \end{equation} % with smooth coefficients $a_{k \ell}, b_k, c \in C^\infty(\mathbb{T}^d)$, find a real eigenvalue $\lambda$ and a corresponding strictly positive eigenfunction $u$ such that $P u = \lambda u$. This corresponds to the eigenvalue problem in Lemma \ref{lemma:LDP_MM:contII:principal_eigenvalue}, with $a_{k \ell} = 1$. % \item For a coupled system of second-order elliptic operators on $\mathbb{T}^d$, find a real eigenvalue $\lambda$ and a vector of strictly positive functions $u = (u^1, \dotsm u^J)$, $u^i > 0$ on $\mathbb{T}^d$, such that % \begin{equation} \left[ \begin{pmatrix} L^{(1)} & & 0 \\ & \ddots & \\ 0 & & L^{(J)} \end{pmatrix} - \begin{pmatrix} R_{11} & & \geq 0 \\ & \ddots & \\ \geq 0 & & R_{JJ} \end{pmatrix} \right] \begin{pmatrix} u^1 \\ \vdots \\ u^J \end{pmatrix} = \lambda \begin{pmatrix} u^1 \\ \vdots \\ u^J \end{pmatrix}, \label{eq:appendix:PrEv:eigenproblem:coupled_system_of_elliptic_op} \end{equation} % where $L : C^2(\mathbb{T}^d)^J \rightarrow C(\mathbb{T}^d)^J$ is a $J\times J $ diagonal matrix of uniformly elliptic operators, % \begin{align} L = \begin{pmatrix} L^{(1)} & & 0 \\ & \ddots & \\ 0 & & L^{(J)} \end{pmatrix},\;L^{(i)} = -\sum_{k \ell}^J a_{k \ell}^{(i)}(\cdot) \frac{\partial^2}{\partial x^k \partial x^\ell} + \sum_k^J b^{(i)}_k(\cdot)\frac{\partial}{\partial x^k} + c^{(i)}(\cdot), \label{eq:appendix:elliptic_operators_in_coupled_system} \end{align} % with % $ a_{k \ell}^{(i)}(\cdot), b_k^{(i)}(\cdot), c^{(i)}(\cdot) \in C^\infty(\mathbb{T}^d), $ % and $R$ is a $J\times J$ matrix with non-negative functions on the off-diagonal, % \begin{align*} R = \begin{pmatrix} R_{11} & & \geq 0 \\ & \ddots & \\ \geq 0 & & R_{JJ} \end{pmatrix}, \qquad R_{ij} \geq 0 \text{ for all } i \neq j. \end{align*} % Coupled systems of this type appear in Lemma \ref{lemma:LDP_MM:contI:principal_eigenvalue}. % \end{enumerate} % The principal-eigenvalue problems (E1), (E2) and (E3) can be solved by means of the Krein-Rutman Theorem. We recall the setting of the Theorem. \begin{definition}[{Ordered Banach space $\left(X,\geq\right)$~ \cite[Appendix 4]{dautray2000spectral}}] For a real Banach space $X$, a closed set $K\subseteq X$ with nonempty interior is called a \emph{cone} if i) $0 \in K$, ii) whenever $v,w\in K$ then $av + bw \in K$ for all reals $a,b \geq 0$, iii) if $v\in K$ and $(-v)\in K$, then $v = 0$, and iv) $X = K - K$. For given $v,w\in X$, we write $v \geq w$ if $ v- w \in K$, and denote the elements $v$ in $K$ as $v\geq 0$ the elements in the interior $\mathring{K}$ as $v>0$. Further, $K^\ast \subseteq X^\ast$ is called a \emph{dual cone} if for all $\ell \in K^\ast$, $\langle \ell, v \rangle \geq 0$ whenever $v\ \geq 0$. We write $(X,\geq)$ for an ordered Banach space $X$, where the order $\geq$ is defined by means of a cone $K$. \end{definition} % For an ordered Banach space $(X,\geq)$ and an operator $P:\mathcal{D}(P)\subseteq X \rightarrow X$, we want to find a strictly positive eigenvector~$u>0$ with an associated eigenvalue~$\lambda \in \mathbb{R}$ such that % \begin{equation} P u = \lambda u. \tag{PrEv} \label{eq:solving_principal_ev:basic_ev_equation} \end{equation} The problems (E1), (E2) and (E3) are of this type, in the following settings: % \begin{enumerate}[(E1)] \item $X = \mathbb{R}^d$, with cone $K = \{v\in\mathbb{R}^d : v_j\geq 0,\,j =1,\dots,d\}$, and corresponding interior $\mathring{K} = \{ v \in K : v_j > 0,\,j=1,\dots,d\}$. The operator $P: \mathbb{R}^d \to \mathbb{R}^d$ is an irreducible M-matrix. % \item $X = C(\mathbb{T}^d)$, with cone $K = \{ f \in X: f \geq 0\}$ and corresponding interior $\mathring{K} = \{f\in X : f > 0\}$. The operator $P : C^2(\mathbb{T}^d) \subseteq C(\mathbb{T}^d) \to C(\mathbb{T}^d)$is~\eqref{eq:appendix:uniform_elliptic_op}. % \item $X = C(E^\prime)$, with $E^\prime = \mathbb{T}^d \times \{1, \dots, J\}$ and cone $K = \{f \in X: f(x,i) \geq 0,\, x \in \mathbb{T}^d\, i = 1,\dots,J\}$, and interior $\mathring{K} = \{f\in K : f(\cdot,i) > 0,\,i = 1,\dots,J\}$. We identify $C(E^\prime)$ with $C(\mathbb{T}^d)^J$ via $f(x,i) = f^i(x)$, $f = (f^1, \dots, f^J)$. % \end{enumerate} An operator $B : \mathcal{D}(B) \subseteq X \rightarrow X$ is is called positive if $f\geq 0$ implies $Bf \geq 0$, and is called strongly positive if $f\geq 0$ and $f \neq 0$ imply $Bf > 0$. % \begin{theorem}[Krein-Rutman, Appendix 4 in \cite{dautray2000spectral}] Let $(X,\geq)$ be an ordered Banach space and $T :X \rightarrow X$ be a linear bounded operator. If $T$ is also compact and strongly positive, then there exist unique $g>0$ and $g^\ast > 0$ such that % \[ T g = r(T) g, \; \|g\|_X =1, \qquad \text{and} \qquad T^\ast g^\ast = r(T) g^\ast, \; \|g^\ast\|_{X^\ast} = 1, \] % with $T^\ast$ the dual operator to $T$, and $\langle g^\ast , f\rangle >0$ whenever $f\geq 0$ and $f\neq 0$. Here, $r(T) = r(T^\ast) $ is the spectral radius of $T$. \label{thm:appendix:solving_principal_ev:KR-theorem} \end{theorem} % \begin{theorem}[Positive and compact resolvant implies existence of a principal eigenvalue] If for some $\alpha \in \mathbb{R}$, $P_\alpha := P + \alpha \mathbf{1}$ is such that $T_\alpha := P_\alpha^{-1}$ exists as a linear bounded operator $T_\alpha :X \rightarrow X$ that is compact and strongly positive, then \eqref{eq:solving_principal_ev:basic_ev_equation} holds with $\lambda = \frac{1}{r(T_\alpha)} - \alpha$ and eigenfunction $u = T_\alpha g$, where $g$ satisfies $T_\alpha g = r(T_\alpha) g$. Furthermore, $\lambda \in \mathbb{R}$ is the unique eigenvalue with a strictly positive eigenvector. \label{thm:appendix:solving_principal_ev:apply_KR} \end{theorem} % \begin{proof}[Proof of Theorem \ref{thm:appendix:solving_principal_ev:apply_KR}] By the Krein-Rutman Theorem \ref{thm:appendix:solving_principal_ev:KR-theorem}, there exists a $g>0$ such that $T_\alpha g = r(T_\alpha) g$. By strong positivity of $T_\alpha$, we have $u:= T_\alpha g > 0$, and in particular $r(T_\alpha) >0$. By definition of $T_\alpha$ as the solution operator $h\mapsto f$ of $P_\alpha f =h$, the vector $u \in \mathring{K}$ satisfies $P_\alpha u = \frac{1}{r(T_\alpha)} u$, and \eqref{eq:solving_principal_ev:basic_ev_equation} follows with principal eigenvalue $\lambda = \frac{1}{r(T_\alpha)} - \alpha$ and strictly positive eigenfunction $u > 0$. Regarding uniqueness of the eigenvalue $\lambda$, note that every solution to \eqref{eq:solving_principal_ev:basic_ev_equation} defines an eigenfunction for $T_\alpha$, by shifting with $\alpha$. Thus two independent solutions to \eqref{eq:solving_principal_ev:basic_ev_equation} would correspond to two independent solutions to $T_\alpha g = r(T_\alpha) g$, contradicting the uniqueness (after normalization) of $g>0$ in the Krein-Rutman Theorem. \end{proof} % Theorem \ref{thm:appendix:solving_principal_ev:apply_KR} applies to the eigenvalue problems (E1), (E2) and (E3). \begin{proposition} In the setting (E1), if $P \in \mathbb{R}^{d \times d}$ is an irreducible M-matrix, then there exists an eigenvector $u>0$ and a unique principal eigenvalue $\lambda \in \mathbb{R}$ such that \eqref{eq:solving_principal_ev:basic_ev_equation} holds. The principal eigenvalue~$\lambda$ is given by % $$ \lambda = \sup_{w > 0} \inf_{i \in \{1, \dots, J\}} \frac{P w(i)}{w(i)}. $$ % \label{proposition:appendix:PrEv:M_matrix} \end{proposition} % % \begin{proposition} In the setting (E2), let $P$ be given by~\eqref{eq:appendix:uniform_elliptic_op}. Then there exists a strictly positive eigenfunction $u \in C^\infty(\mathbb{T}^d)$ and a unique principal eigenvalue $\lambda \in \mathbb{R}$ satisfying \eqref{eq:solving_principal_ev:basic_ev_equation}. The principal eigenvalue~$\lambda$ is given by % $$ \lambda = \sup_{g > 0} \inf_{x\in \mathbb{T}^d} \left[\frac{P g(x)}{g(x)}\right] = \inf_{\mu \in \mathcal{P}(\mathbb{T}^d)} \sup_{g > 0} \left[ \int_{\mathbb{T}^d} \frac{Pg}{g} \,d\mu \right]. $$ % \label{proposition:appendix:PrEv:elliptic_op} \end{proposition} % % \begin{proposition} In the setting (E3), let~$L$ be given by~\eqref{eq:appendix:PrEv:eigenproblem:coupled_system_of_elliptic_op} and~\eqref{eq:appendix:elliptic_operators_in_coupled_system}. Suppose that the matrix $\overline{R}$ with entries $\overline{R}_{ij} := \sup_{y \in \mathbb{T}^d} R_{ij}(y)$ is irreducible. Then for the operator $P:= L - R$, there exists a unique principal eigenvalue $\lambda \in \mathbb{R}$ and a strictly positive eigenvector $u \in \left(C^\infty(\mathbb{T}^d)\right)^J$, $u^i(\cdot) > 0$ for all $i = 1, \dots, J$, solving \eqref{eq:solving_principal_ev:basic_ev_equation}. Furthermore, the principal eigenvalue is given by % $$ \lambda = \sup_{g > 0} \inf_{z \in E^\prime} \left[\frac{P g(z)}{g(z)}\right] = \inf_{\mu \in \mathcal{P}(E^\prime)} \sup_{g > 0} \left[ \int_{E^\prime} \frac{Pg}{g} \,d\mu \right]. $$ % \label{proposition:appendix:PrEv:fully_coupled_system} \end{proposition} % The principal eigenvalue problem on closed manifolds, such as $\mathbb{T}^d$, is solved for instance by Padilla \cite{padilla1997principal}. Donsker and Varadhan's variational representations \cite{DonskerVaradhan75, DonskerVaradhan76} apply to the case of compact metric spaces without boundary. A proof of how to obtain the principal eigenvalue for coupled systems of equations is given by Sweers \cite{Sweers92} and Kifer \cite{kifer1992principal}. Sweers considers a Dirichlet boundary problem, but his results transfer to the compact setting without boundary. Kifer gives an independent proof for the case of a compact manifold, in Lemma 2.1 and Proposition 2.2 in \cite{kifer1992principal}. \chapter{Large Deviations of Empirical Measures} \label{chapter:LDP-of-empirical-measures} \section{Introduction} In this chapter, we are motivated by the task of sampling from a distribution~$\pi$ with density with respect to Lebesgue measure given by \begin{align*} \mathrm{d} \pi (y) = C^{-1}e^{-U(y)}\, \mathrm{d} y, \quad C = \int_E e^{-U(y)}\, \mathrm{d} y, \end{align*} for some potential function $U: E \to \mathbb{R}$ and state space $E$. The most common approach is to use Markov chain Monte Carlo (MCMC) methods, which are now essential tools in areas such as computational statistics, molecular dynamics and machine learning~\cite{RobertCasella2004,AsmussenGlynn07,AndrieuEtAl03}. \smallskip The idea behind MCMC is to construct a Markov process $Y_t$ with $\pi$ as the invariant measure and use the corresponding empirical measure to obtain approximations. For example, under ergodicity, for any observable $f \in L^1 (\pi)$ we have almost surely \begin{equation*} \lim_{t\to\infty} \frac{1}{t}\int_0^t f(Y_s)\, \mathrm{d} s = \int_E f(y)\,\pi( \mathrm{d} y). \end{equation*} Therefore, for $t>0$ large, $\frac{1}{t} \int _0 ^t f(Y_s)\, \mathrm{d} s$ can be used to approximate the expected value $\int_E f (y) \pi ( \mathrm{d} y)$. Although many standard MCMC constructions, such as the Metropolis-Hastings algorithm \cite{Metropolis1953}, can be used to sample from essentially any target distribution $\pi$, most suffer from slow convergence to the invariant distribution or heavy computational costs per iteration. Designing new, efficient dynamics has therefore become an important research direction within applied probability. \smallskip Over the last decade, piecewise-deterministic Markov processes (PDMPs) have emerged as a new tool for the numerical simulation of probability distributions. An introduction to these processes is offered by Davis' monograph~\cite{davis1984piecewise}. The two main examples of such processes used in MCMCs are the Bouncy Particle Sampler and the Zig-Zag Sampler \cite{BouchardCoteVollmerDoucet2017,bierkens2019zig}, after similar ideas appeared first in~\cite{PetersDeWith2012} and~\cite{Monmarche2016}. The idea of using PDMPs extends the ubiquitous discrete time MCMC methodology towards a new continuous time approach, having several advantageous aspects. First, by construction PDMPs are irreversible Markov processes, which typically results in a smaller asymptotic variance as compared to reversible methods. For instance, Duncan, Lelièvre and Pavliotis demonstrate variance reduction for irreversible Langevin samplers~\cite{DuncanLelievrePavliotis2016}. We refer to~\cite{Andrieu2019a} for a recent study of this effect, and to~\cite{bierkens2019zig,Fearnhead2016a} for details of the computational aspects of PDMP trajectories on a computer. \smallskip In order to employ this new PDMP methodology a solid understanding of the mathematical properties of these methods is necessary. Whereas the theoretical properties of PDMPs have been an active research area in recent years, our understanding of the performance of the corresponding MCMC methods is still incomplete. In particular knowledge of the speed of convergence of time averages is essential in choosing the most suitable sampling technology for a particular problem and in tuning the parameters of the chosen method. In the spirit of recent work on empirical measure large deviations in the MCMC context \cite{dupuis2012infinite, rey2015irreversible}, we propose the use of large deviation results for studying and comparing the performance of PDMPs. \smallskip In summary, the main contributions we develop in this chapter are: \begin{itemize} \item A semigroup approach to establish the large deviation principles for the empirical measures of a class of Markov processes satisfying assumptions aimed at position-velocity PDMPs. \item The large deviation principle for empirical measures of the zig-zag process in both a compact and non-compact setting. \item A derivation of an explicit form of the rate function associated with the zig-zag process. \item Evaluation of the zig-zag rate function as a function of the additional switching rate $\gamma$, providing an answer to a key question about the switching rate. \end{itemize} Donsker and Varadhan studied large deviations for empirical measures in a series of papers~\cite{donsker1975asymptoticI, donsker1975asymptoticII, DonskerVaradhan76}. In the simulation context it is well-known that for rare-event simulation, sample-path large deviations play an important r\^ole in evaluating and designing efficient algorithms ; see \cite{AsmussenGlynn07, Bucklew04, BudhirajaDupuis2019} and references therein. In contrast, empirical measure large deviations are much less explored as a tool for analysing Monte Carlo methods. Standard measures for analysing the efficiency of methods based on ergodic Markov processes include the spectral gap of the associated semigroup and the asymptotic variance for given observables, see for example \cite{Rosenthal2003, BedardRosenthal08,DiaconisHolmesNeal00,FrankeEtAl10,FrigessiEtAl93,HwangHwangSheu05, MengersenTweedie96, RobertsRosenthal04}. However these measures are not necessarily appropriate for studying the rate of convergence, as they only link indirectly to the empirical measure, the quantity of interest in Monte Carlo methods. Empirical measure large deviations on the other hand connect explicitly to the relevant properties, such as the transient behaviour of the underlying process. In a similar spirit, \cite{BirrellRB19} recently used concentration inequalities to obtain non-asymptotic performance guarantees for PDMPs. \smallskip The first results using empirical measure large deviations for the analysis of MCMC methods were obtained in~\cite{plattner2011infinite, dupuis2012infinite}. Therein empirical measure large deviations, specifically the associated rate function, was proposed as a tool for analysing parallel tempering, one of the computational workhorses of the physical sciences, leading to a new type of simulation method (infinite swapping). In the subsequent work~\cite{DDN2018} empirical measure large deviations were again used, combined with associated stochastic control problems, to analyse the convergence properties of these algorithms. Similarly, in~\cite{rey2015irreversible} Rey-Bellet and Spiliopoulos use empirical measure large deviations to analyse the performance of certain irreversible MCMC samplers. \smallskip The work by Donsker and Varadhan is the starting point for many results and application of empirical measure large deviations and their work has been extended in numerous directions, see e.g.\ \cite{DemboZeitouni1998, FengKurtz2006, BudhirajaDupuis2019} for an overview and further references. However, naively applying the existing theory to PDMPs does not work since the transition probabilities are not sufficiently regular: for every $t > 0$ there is a positive probability that the process has not switched by time $t$, resulting in an atomic component of the Markov transition kernel. As a first step towards using empirical measure large deviations for analysing the performance of PDMPs we must therefore establish the relevant large deviations principles. \smallskip In this chapter, our focus is to establish general large deviation results aimed at PDMPs and then to specialize to the zig-zag process. In the process of proving the necessary large deviation results we consider a general class of Markov processes that can have position-velocity PDMPs, such as the bouncy particle and the zig-zag samplers, as special cases. In particular, this class includes processes that are not of diffusion type and irreversible processes. When specialising to the zig-zag process, we derive an explicit form of the rate function, going beyond the variational form typical for results of Donsker-Varadhan-type. To the best of our knowledge this is the first instance where an explicit form of the rate function has been obtained for irreversible processes that do not have a drift-diffusion character. \smallskip A key question for using the zig-zag process for MCMC is whether or not it is advantageous for convergence to use the minimal (canonical) switching rates, or if one should allow for additional switches according to a fixed refreshment rate $\gamma >0$. Our analysis of the rate function associated with the zig-zag process allows us to give a partial answer to this question: in Section~\ref{sec:rate} we establish that the rate function is decreasing as a function of the additional rate $\gamma$, establishing that from a large deviations perspective it is optimal to use the smallest possible rates, i.e.\ set $\gamma =0$. This goes in the opposite direction of the conclusion drawn from a spectral analysis (see \cite[Section 7.3]{BierkensVerduynLunel2019}), which shows at least a small benefit of increasing gamma beyond zero. This highlights the different nature of convergence of empirical averages by studying large deviations or asymptotic variance (e.g.~\cite{Andrieu2019a,BierkensDuncan2016}) and convergence to equilibrium, using e.g. the spectral gap to describe rate of convergence; We refert to~\cite{Rosenthal2003} for more on this phenomenon. Our conclusion is in line with the earlier observation that having more irreversibility increases the rate function~\cite{rey2015irreversible}: one can view increasing $\gamma$ as decreasing the extent of irreversibility inherent to the process. In that sense,~$\gamma=0$ corresponds to "maximal irreversibility" of the zig-zag process. The fact that the spectral gap can not always detect the benefits of irreversibility is best illustrated with the following example, which can also be found in~\cite[Example~2.9]{rey2015irreversible}. \paragraph{Example.} Consider the diffusion~$ \mathrm{d} X_t = v\, \mathrm{d} t + \mathrm{d} B_t$ on the one-dimensional flat torus~$\mathbb{T}$, where~$v$ is a parameter. We focus on the behavior of its empirical measure~$\eta_T$ defined on Borel subsets~$A\subseteq\mathbb{T}$ by \begin{equation*} \eta_T (A) = \frac{1}{T}\int_0^T\mathbf{1}_A\left(X_t\right)\, \mathrm{d} t. \end{equation*} For a set~$A$,~$\eta_T(A)$ measures the fraction of time that the process~$X_t$ spends in~$A$. As~$T\to\infty$, the empirical measure converges to the uniform measure~$ \mathrm{d} x$ on~$\mathbb{T}$. We are interested in how the convergence rate depends on the drift~$v$. The spectrum of its generator~$L_v=v\nabla + (1/2)\Delta$ is \begin{equation*} \sigma(L_v) =\left\{-n^2 + inv\,:\,n\in\mathbb{Z}\right\}. \end{equation*} Hence the spectral gap is~$-1$, and is in particular independent of~$v$. Therefore, the spectral gap does not provide us with any information about how the rate of convergence changes with~$v$. However, for a measure~$ \mathrm{d}\mu(x) = u(x)\, \mathrm{d} x $ with a smooth and positive density~$u$, the Donsker-Varadhan rate function for the empirical measure is \begin{equation*} \mathcal{I}_v(\mu) = \frac{1}{8}\int_\mathbb{T}\left|\nabla \log u\right|^2\, \mathrm{d}\mu + \frac{1}{2} \,v^2 \left(1-\frac{1}{\int_\mathbb{T}\frac{1}{u(x)} \mathrm{d} x}\right). \end{equation*} The family~$\{\eta_T\}_{T>0}$ satisfies a large deviation principle with this rate function in the limit~$T\to\infty$. Informally, this means \begin{equation*} \mathbb{P}\left(\eta_T \approx \mu\right) \sim e^{-T\,\mathcal{I}_v(\mu)},\quad T\to\infty. \end{equation*} In conclusion, for higher values of~$v$, the empirical measure converges faster to the uniform measure, since rate function increases with increasing~$v$. The limit of~$\eta_T$ is independent of~$v$; we always find~$\mathcal{I}_v( \mathrm{d} x)=0$.\qed \smallskip Evaluation of the large deviation rate function for empirical measures, beyond the variational form given by Donsker and Varadhan, is typically a challenging task. For the diffusion setting, including both reversible and irreversible processes, see \cite{dupuis2018large} and the references therein. In \cite{dupuis2015large} the authors consider reversible jump Markov processes and use stochatic control and weak convergence arguments to derive an explicit form of the rate function. Lastly, in the MCMC context, \cite{rey2015irreversible} consider diffusion processes on a compact manifold where the drift can be decomposed into sufficiently smooth reversible and irreversible parts. The rate function can then be expressed in terms of the rate function of a related reversible diffusion and the solution of an elliptic PDE associated with the irreversible component of the drift. \smallskip The proofs of the large deviation results are based on the general Hamilton-Jacobi approach to empirical measures developed by Feng and Kurtz in~\cite[Chapter 12]{FengKurtz2006}. We describe this approach, in the context of this paper, in more detail in Section~\ref{sec:aux}. \smallskip The remainder of this chapter is organised as follows. In Section \ref{sec:prelim} we give the necessary preliminaries: notation and relevant definitions, background on the zig-zag process and empirical measure large deviations. In particular we recall well-known large deviation results for empirical measures by Donsker and Varadhan. The main results are then presented in Section \ref{sec:main}. The section is split into the main assumptions and general large deviation statements (Section \ref{sec:gen_LDP}), large deviation results for the zig-zag process (Section \ref{sec:LDP_zigzag}) and an explicit expression of the rate function associated with the zig-zag process (Section \ref{sec:rate}). All proofs are deferred to Section \ref{sec:proofs}. \section{Preliminaries} \label{sec:prelim} \subsection{Notation and definitions} \label{sec:notation} Throughout this chapter, $E$ will denote a complete separable metric space (Polish space) and $\mathcal B (E)$ the relevant $\sigma$-algebra on $E$; unless otherwise stated this is taken to be the Borel $\sigma$-algebra. $C(E)$ and $C_b(E)$ are the spaces of functions $f : E \to \mathbb{R}$ that are continuous and bounded continuous, respectively. The space of continuous and right-continuous functions from $[0, \infty)$ to $E$ is denoted by $C_E[0, \infty)$ and $D_E [0,\infty)$, respectively. A sequence of functions $\{ f_n \}_n$ on $E$ converges {\it boundedly and uniformly on compacts} to a function $f$ if and only if $\sup _n \norm{f_n} < \infty$ and for each compact $K \subseteq E$, \begin{align*} \lim _{n\to \infty} \sup_{x \in K} | f_n(x) - f(x) | =0. \end{align*} This is denoted as $f = buc-\lim_{n\to \infty} f_n$. For a Markov process $Y = \{ Y_t: \ t \geq 0\}$, we denote by $S = \{ S(t): t \geq 0 \}$ the associated Markov semigroup. A semigroup $S(t)$ acting on $C(E)$ is {\it Feller continuous} if, for any $t$, $S(t) : C(E) \to C(E)$, {\it strongly continuous} if $S(t) f \to f$ as $t \to 0$ for any $f \in C(E)$ and {\it buc-continuous} if $buc-\lim _{t\to 0} S(t) f = f$ for $f \in C_b(E)$. For an operator $L$, $\mathcal D (L)$ denotes the domain of $L$. For functions in $\mathcal D (L)$, $\mathcal D ^+ (L)$ denotes those that are strictly positive and $\mathcal D^{++}(L)$ those that are positive and uniformly bounded from below by a positive constant. For a given $L$ we use $B$ to denote the extended generator associated with $L$. We use $\mathcal{P}(E)$ to denote the space of probability measures on $E$, and $\mathcal P _c (E)$ is the subset of probability measures with compact support. Throughout the paper we equip $\mathcal P (E)$ with the topology of weak convergence: $\rho _n \to \rho$ in this topology if \begin{align*} \int _E f(x) \rho _n (dx) \to \int _E f(x) \rho (dx), \ n\to \infty, \ \ \forall f \in C_b (E). \end{align*} A special case that will be considered several times is $\mathcal{P}(D_E [0,\infty))$, which is also equipped with the weak topology. For a process $\{ Y(t), t \geq 0 \}$ taking values in $E$ and $y \in E$, we denote by $\mathbb{P}_y \in \mathcal{P}(D_E [0,\infty) )$ the distribution of the process $Y(t)|_{t \geq 0}$ starting at~$y \in E$. The set of positive Borel measures on $E$ is denoted by $\mathcal M (E)$ and the set of finite Borel measures on $E$ are denoted by $\mathcal M _f (E) \subset \mathcal M (E)$. We let $\mathcal L (E)$ denote the following subset of $\mathcal M (E \times [0,\infty))$: \begin{align*} \mathcal L (E) = \{ z \in \mathcal M (E \times [0, \infty)): \ z(E \times [0,t]) = t, \ t \geq 0 \}. \end{align*} The set $\mathcal L (E)$ is endowed with the topology of weak convergence on bounded time intervals: for $\{ \rho_n \} \subset \mathcal L (E)$, $\rho_n \to \rho$ if for all $f \in C_b(E \times [0, \infty))$ and all $t \geq 0$, \begin{align*} \int _{E \times [0,t]} f(x,s) d\rho_n(x,s) \to \int _{E \times [0,t]} f(x,s) d\rho(x,s). \end{align*} Then $\mathcal L (E)$ is the set of Borel-measures on $E \times [0, \infty)$ of the form \begin{align*} d\rho (x,t) = \mu _t (dx) dt, \end{align*} for probability measures $\mu_t \in \mathcal P (E)$. That is , for every $\rho \in \mathcal L (E)$, there exists a measurable path $s \mapsto \mu_s \in \mathcal P (E)$ such that \begin{align*} \rho (A \times [0,t] ) = \int _0 ^t \mu _s (A)ds, \ \textrm{ for any } A \in \mathcal B (E), \ t >0. \end{align*} \subsection{Large deviations for empirical measures} \label{sec:intro_LDP} Consider a Markov process $Y = \{ Y_t: t \geq 0 \}$ taking values in a Polish space~$E$, with associated generator $L : \mathcal{D}(B) \subseteq C_b(E) \to C_b(E)$ and semigroup $S(t)$. The {\it empirical measure} $\eta_t$ associated with $Y_t$ is the stochastic process with values in $\mathcal{P}(E)$ defined by \begin{equation*} \eta_t (A) = \frac{1}{t} \int_0^t \boldsymbol{1}_A(Y_s)ds,\quad A \in \mathcal{B}(E). \end{equation*} Empirical measures play an important role in, for example, the settings of MCMC methods and steady-state simulations, via the pairing of measures and observables: For a probability measure $\mu \in \mathcal{P}(E)$ and a function $V \in C_b(E)$, we write \begin{equation*} \mu(V) = \int_E V(y) d\mu(y) \end{equation*} for the pairing of measures and observables. For the empirical measure $\eta_t$, this pairing corresponds to time averages, \begin{equation} \label{eq:etaV} \eta_t(V) = \frac{1}{t}\int_0^t V(Y_s) ds. \end{equation} If there is an invariant measure $\pi \in \mathcal{P}(E)$ associated with the generator $L$, ergodicity of the process $Y_t$ will ensure the convergence $\eta _t \to \pi$ as $t\to \infty$, w.p.\ 1 in $\mathcal P (E)$, from which it follows that for any $V \in C_b(E)$, \begin{align*} \eta_t(V) \to \pi(V) \quad \text{ as } t \to \infty, \; \mathbb{P}-a.s. \end{align*} Thus, time averages such as \eqref{eq:etaV} are precisely what is used to form approximations in Monte Carlo methods and there is a direct link between the performance of such simulation methods and the properties of the empirical measure. The theory of large deviations for empirical measures is concerned with deviations of $\eta _t$ from $\pi$ as $t$ grows large. Recall that the gist of the so-called large deviations principle is that for any $\rho \in \mathcal{P} (E)$, for large $t$ \begin{align*} \mathbb{P}_y (\eta _t \approx \rho) \sim \exp \left\{ -t \, \mathcal{I}(\rho) \right\}, \end{align*} where the function $\mathcal{I} : \mathcal P (E) \to [0,\infty]$ is the rate function associated with the process. This formula is just a short notation for Definition~\ref{def:LDP}; that means~$\mathcal{I}$ has compact sublevel-sets, and for any measurable subset $A \subseteq \mathcal P (E)$, we have \begin{align*} - \inf _{\mu \in \mathrm{int}(A)} I (\mu) &\leq \liminf _{t\to \infty} \frac{1}{t} \log \mathbb{P} \left(\eta _t \in A \right) \\ &\leq \limsup _{t\to \infty} \frac{1}{t} \log \mathbb{P} \left( \eta _t \in A \right) \leq -\inf _{\mu \in \mathrm{clos}(A)} I(\mu), \end{align*} where $\mathrm{int}(A)$ and $\mathrm{clos}(A)$ are the interior and closure of the set $A$. \smallskip Under relatively mild conditions on the dynamics of the process $Y$ the rate function will be strictly convex and satisfy $\mathcal{I}(\mu) =0$ if and only if $\mu = \pi$. Thus, the rate function characterises the exponential rate of decay of probabilities of sets not including the invariant distribution $\pi$. Moreover the rate function can be used to characterise {\it how} events may occur - for sets $A$ that do not include $\pi$, the minimisers of $\mathcal{I}$ over $A$ represent the behaviour $\eta _t$ is most likely to exhibit if $A$ occurs. For empirical measures of Markov processes, the rate function associated with an LDP can often be expressed using a variational form, obtained by Donsker and Varadhan~\cite{donsker1975asymptoticI}, involving the generator $L$ of the underlying process. For the compact setting, they proved the following result. \begin{theorem}[{\cite[Theorem 3]{donsker1975asymptoticI}}]\label{thm:proving_LDP:DV_I} Take $E$ to be a compact, complete separable metric space. Let $S(t)$ be a Markov semigroup acting on $C(E)$ equipped with the supremum norm, and let $L$ be the generator associated to $S(t)$. Assume the following: \begin{enumerate}[label =(DV.\arabic*)] \item\label{item:thm_DV_I:Feller} The semigroup is Feller continuous and strongly continuous. \item\label{item:thm_DV_I:reference_measure} There exists a probability measure $\lambda \in \mathcal{P}(E)$ such that for each $t > 0$ and $x\in E$, the transition probabilities $P(t,x,dy)$ are absolutely continuous with respect to $\lambda$, that is \begin{equation*} P(t,x,dy) = p(t,x,y) \lambda(dy), \end{equation*} for some $p$ with $0< a(t) \leq p(t,x,y) \leq A(t) < \infty$. \end{enumerate} Then the associated sequence $\{\eta_t\}_{t > 0}$ satisfies a large deviation principle in $\mathcal{P}(E)$, with rate function $\mathcal{I}: \mathcal{P}(E) \to [0,\infty]$ given by \begin{equation}\label{eq:proving_LDP:DV_rate_function} \mathcal{I}(\mu) = -\inf_{u \in \mathcal{D}^+(L)}\int_E \frac{Lu}{u} d\mu. \end{equation} \end{theorem} The theorem applies in particular to drift-diffusions taking values in a compact space. Roughly speaking, for such processes, with reasonable coefficients, the Feller-continuity is satisfied and the diffusive part ensures absolute continuity with respect to a volume measure $dx$. In \cite{rey2015irreversible} Rey-Bellet and Spiliopoulos use this result to study performance of specific irreversible MCMC methods based on drift-diffusions; their Assumption~(H) allows for an application of Theorem \ref{thm:proving_LDP:DV_I}. Condition~\ref{item:thm_DV_I:reference_measure} is a reasonable transitivity assumption for processes that involve a diffusive term. However, this condition excludes many interesting examples, such as continuous-time jump processes, see e.g.\ \cite{dupuis2015large}. The issues highlighted therein are present also for the zig-zag process on $\mathbb{R} \times \{ \pm 1\}$: in a sense, the absence of a diffusive operator excludes the possibility of finding a suitable reference measure. If the process $Y_t$ is reversible with respect to the reference measure, that is $p(t,x,y) = p(t,y,x)$, then the rate function takes a more explicit form, see e.g.\ Theorem~5 in~\cite{donsker1975asymptoticI}. However, our interests are explicitly in irreversible processes, such as the zig-zag process, and therefore such representations are not available. In conclusion, while Theorem \ref{thm:proving_LDP:DV_I} can be a starting point for many drift-diffusion processes, it is not a sufficient tool for many other interesting processes, including the position-velocity PDMPs. In order to use large deviation results to study performance of such MCMC algorithms we must first overcome this obstacle and establish the relevant large deviations principles. In~\cite{dupuis2018large}, Dupuis and Lipshutz consider large deviations of empirical measures of $\mathbb{R}^d$-valued drift-diffusions. Their Condition~2.2 corresponds to a type of stability criterion in terms of a Lyapunov function. A transitivity property similar to Condition~\ref{item:thm_DV_I:reference_measure} of Theorem~\ref{thm:proving_LDP:DV_I} is satisfied due to the diffusive part, and they prove a different, explicit representation of the rate function, assuming only standard regularity conditions on the coefficients. In particular, this representation holds for irreversible drift-diffusions. \subsection{The zig-zag process} \label{sec:zig-zag} In this section we will discuss very concisely the zig-zag process. As discussed in the introduction the zig-zag process is an example of a piecewise deterministic Markov process \cite{davis1984piecewise}. As the name indicates, a piecewise deterministic Markov process is a Markov process with deterministic trajectories, in between event times at which the process makes a discontinuous change. For the one-dimensional zig-zag process, the state space is either $E = \mathbb R \times \{\pm 1\}$ or $E = \mathbb{T} \times \{\pm 1\}$ and a typical state is denoted in this paper by $(x,v)$. Here $x$ represents a position and $v$ a velocity. Starting from $(x,v)$ at time $t= T_0 := 0$, the dynamics of a Markov process $(X_t, V_t)$ are given, until the first (random) event time $T_1 > 0$, by \[ (X_t, V_t) = (x +t v, v), \quad 0 \leq t < T_1.\] In other words, the position changes according to the constant velocity $v$, which itself does not change in between event times. The random time $T_1$ at which the first event happens is distributed according to \[ \P_{x,v}(T_1 \geq t) = \exp \left( -\int_0^t \lambda(X_s, V_s) \, d s \right) = \exp \left( -\int_0^t \lambda(x + vs, v) \, d s \right),\] where $\lambda : E \rightarrow [0,\infty)$ is the \emph{event rate}, which is in the case of the zig-zag process also known as the \emph{switching rate}, which we will discuss in more detail below. At an event time $T$ the velocity changes sign and the position remains unchanged: \[ V_{T_1} = -V_{T_1-} \quad \text{and} \quad X_{T_1} = X_{T_1-}.\] From the time $T_1$ onward, the process repeats the dynamics described above: for $i = 1, 2, \dots$ \begin{align*} & X_t = X_{T_{i-1}} +(t- T_{i-1}) V_{T_{i-1}}, \quad V_t = V_{T_{i-1}}, \quad T_{i-1}\leq t < T_{i}, \\ & \P(T_i \geq t \mid T_{i-1}, X_{T_{i-1}}, V_{T_{i-1}}) = \exp \left( -\int_{T_{i-1}}^t \lambda(X_{T_{i-1}} + s V_{T_{i-1}}, V_{T_{i-1}}) \, d s \right), \\ & X_{T_i} = X_{T_i-}, \quad V_{T_i} = -V_{T_i-}. \end{align*} The switching rate $\lambda : E \rightarrow \mathbb R$ is assumed to be continuous. If $\lambda$ satisfies \begin{equation} \label{eq:switching-intensity-condition-1} \lambda(x, 1) - \lambda(x,-1) = U'(x), \end{equation} for a continuously differentiable function $U$, then the measure defined by \begin{equation*} \pi( \mathrm{d} x, \mathrm{d} v) = \exp(-U(x)) \, \mathrm{d} x \otimes \mathrm{Unif}_{\pm 1}( \mathrm{d} v) \end{equation*} is a stationary measure for $(X_t, V_t)$. An equivalent condition to~\eqref{eq:switching-intensity-condition-1} is that for some continuous non-negative function $\gamma(x)$, we have \begin{equation} \label{eq:switching-intensity-condition-2} \lambda(x,v) = \max (0, v U'(x)) + \gamma(x). \end{equation} Here $(\max 0, vU'(x))$ is called the \emph{canonical switching intensity}, and $\gamma$ is called the \emph{excess switching intensity} or \emph{refreshment rate}. As a rule of thumb, high values of~$\gamma$ lead to many switches of the velocity. We study the dependence of the empirical measure of the process~$(X_t, V_t)$ on~$\gamma$ in Section~\ref{sec:rate}. \smallskip The zig-zag process can be extended in a natural way to a multi-dimensional process in $\mathbb R^d \times \{\pm 1\}^d$ (\cite{bierkens2019zig, bierkens2019ergodicity}). Since we focus in this paper on properties of the one-dimensional process we will not discuss this extension here. The ergodic properties of the zig-zag process are essential in order to establish a large deviation principle for the empirical measure. Under mild conditions it can be shown that the zig-zag process is exponentially ergodic, which is proven in~\cite{BierkensRoberts2017} for the one-dimensional case and in~\cite{bierkens2019ergodicity} for the multi-dimensional zig-zag process. Finally, by \cite[Theorem 26.14]{Davis1993}, the extended generator of the zig-zag process is given by \[ B f(x,v) = v \partial_x f(x,v) + \lambda(x,v) [ f(x,-v) - f(x,v)], \quad (x,v) \in E,\] with \[ \mathcal D(B) = \{ f : E \rightarrow \mathbb R : f(\cdot,v) \, \text{is absolutely continuous for } v = \pm 1\}.\] \section {Large deviations for empirical measures of PDMPs} \label{sec:main} In this section we present our main results: we establish a large deviations principle for the empirical measure of a Markov process under fairly general assumptions which include in particular examples of position-velocity PDMPs such as the zig-zag process. After obtaining these general results we focus for concreteness on the zig-zag process, for which we verify the stated assumptions. We also give an explicit characterisation of the corresponding rate function, a necessary step towards using the LDP for analysing the performance and properties of approximations based on the zig-zag process. To streamline the presentation we split the analysis according to whether we consider a compact or non-compact state space~$E$. \smallskip To facilitate the proof of the LDP for the empirical measures, we first formulate in Section~\ref{sec:gen_LDP} two more general large deviations results (compact and non-compact setting) for empirical measures arising from certain continous-time stochastic processes. We then show that the zig-zag process is a special case in this class of processes in Section \ref{sec:LDP_zigzag}. It is worth to emphasise that we do not aim for greatest generality in the large deviations results Theorems \ref{thm:proving_LDP:LDP_compact} and \ref{thm:proving_LDP:LDP_non_compact}. Rather, we settle for conditions that make the general conditions of Lemma \ref{lemma:FengKurtz} more transparent and concrete whilst still allowing us to prove the large deviations principle for the empirical measures of the zig-zag process. \subsection{Results aimed at position-velocity PDMPs} \label{sec:gen_LDP} Before we specialize to the zig-zag process, we consider the setting described in Section~\ref{sec:notation} to PDMPs: $Y$ is a Markov process taking values in a locally compact complete separable metric space $E$, with associated semigroup $S(t)$ and infinitesimal generator $L$. We also make use of the extended generator $B$; see \cite{Davis1993,EthierKurtz1986} and Section~\ref{sec:zig-zag}. Typically, $E=\mathbb{R}^d\times\mathcal{S}$ where $\mathbb R^d$ is the state space for a position variable $X_t$ and $\mathcal{S}$ is a compact set that models the state space of the velocity variables $V_t$. For the zig-zag process, $\mathcal{S}=\{\pm 1\}^d$, and for the Bouncy Particle Sampler $\mathcal S$ can be taken to be the $(d-1)$-dimensional unit sphere. Note that for $d =1 $ these two choices coincide. \smallskip The following are the assumptions we will impose in order to establish an LDP for the empirical measures of the process $Y$. Not all conditions are required at the same time: we impose conditions~\ref{item:thm_LDP_compact:Feller}, \ref{item:thm_LDP_compact:tight} and~\ref{item:thm_LDP_compact:principal_eigenvalue} for the compact case and \ref{item:thm_LDP_compact:Feller}, \ref{item:thm_LDP_compact:tight}, \ref{item:thm_LDP_non_compact:Lyapunov} and~\ref{item:thm_LDP_non_compact:mixing} for the non-compact case. \begin{enumerate}[label = (A.\arabic*)] \item\label{item:thm_LDP_compact:Feller} The semigroup $S(t)$ is a Feller semigroup. \item\label{item:thm_LDP_compact:tight} For any compact set $K\subseteq E$, the set of measures $\{\mathbb{P}_y: y \in K\}$ is tight in $\mathcal{P}(D_E[0,\infty))$. \item\label{item:thm_LDP_compact:principal_eigenvalue} For any function $V \in C(E)$, there exists a function $u \in \mathcal{D}^+(L)$ and a real eigenvalue $\beta \in \mathbb{R}$ such that pointwise on $E$, \begin{equation*} (V+L) u = \beta u. \end{equation*} \item\label{item:thm_LDP_non_compact:Lyapunov} There exist two non-negative functions $g_1,g_2 \in C(E;[0,\infty))$ such that: \begin{enumerate} \item\label{item:thm_LDP_non_compact:Lyapunov1} For any $\ell \geq 0$, the sublevel-sets $\{g_i\leq \ell\}$ are compact and $g_i(y)\to\infty$ as $|y|\to\infty$, \item\label{item:thm_LDP_non_compact:Lyapunov2} $g_1(y)/g_2(y) \to 0$ as $|y|\to\infty$, \item\label{item:thm_LDP_non_compact:Lyapunov3} $e^{g_i} \in \mathcal D(B)$, for any $c\in\mathbb{R}$ the superlevel-sets $\{y\in E\,:\,e^{-g_i(y)} B(e^{g_i})(y)\geq c\}$ are compact, and $e^{-g_1(y)} B(e^{g_1})(y)\to-\infty$ as $|y|\to\infty$, \end{enumerate} where we recall that $B$ is the extended generator of $Y$. We write $|y_n|\to\infty$ if $d(y_n,z)\to\infty$ for all points~$z\in E$. \item\label{item:thm_LDP_non_compact:mixing} For any two compactly supported probability measures $\nu_1,\nu_2 \in \mathcal{P}_c(E)$, there exist constants $T,M > 0$ and measures $\rho_1,\rho_2 \in \mathcal{P}([0,T])$ such that for all Borel sets $A \subseteq E$, % \begin{equation}\label{eq:proving_LDP:LDP_non_compact:mixing} \int_0^T\int_E P(t,y,A)\, d\nu_1(y)d\rho_1(t) \leq M \int_0^T\int_E P(t,z,A)\, d\nu_2(z)d\rho_2(t), \end{equation} % where $P(t,y,dy')$ denotes the transition probabilities associated to $Y_t$. \end{enumerate} Conditions \ref{item:thm_LDP_compact:Feller}-\ref{item:thm_LDP_compact:principal_eigenvalue} are enough to prove Theorem \ref{thm:proving_LDP:LDP_non_compact}, the large deviations principle in a compact setting. In this setting conditions \ref{item:thm_LDP_compact:Feller} and \ref{item:thm_LDP_compact:tight} replace Condition~\ref{item:thm_DV_I:Feller} of Theorem \ref{thm:proving_LDP:DV_I}; Condition \ref{item:thm_LDP_compact:tight} can also be weakened to $\mathbb{P}_{y_n} \to \mathbb{P}_y$ in $\mathcal{P}(D_E[0,\infty))$ whenever $y_n \to y$. Together Conditions \ref{item:thm_LDP_compact:Feller} and \ref{item:thm_LDP_compact:tight} imply strong continuity of the semigroup $S$ (see e.g. \ \cite[Remark~11.22]{FengKurtz2006}). \smallskip As pointed out in Section \ref{sec:intro_LDP}, the processes we have in mind do not satisfy a transitivity condition similar to Condition \ref{item:thm_DV_I:reference_measure} of Theorem \ref{thm:proving_LDP:DV_I}. In the compact setting this can be replaced by condition~\ref{item:thm_LDP_compact:principal_eigenvalue}, which corresponds to a principal-eigenvalue problem for the operator $L+V$. In compact settings, such eigenvalue problems can usually be solved if the coefficients of the generator are regular enough. In Section \ref{sec:LDP_zigzag} we show that this is the case for the zig-zag process taking values in the compact torus. \smallskip In the non-compact setting, the eigenvalue problem \ref{item:thm_LDP_compact:principal_eigenvalue} is replaced by conditions \ref{item:thm_LDP_non_compact:Lyapunov} and \ref{item:thm_LDP_non_compact:mixing}. Condition~\ref{item:thm_LDP_non_compact:Lyapunov} is closely related to the stability conditions assumed in~\cite{donsker1976asymptotic} and~\cite{dupuis2018large}. Because $e^{g_1}$ is unbounded, formally we have to use the extended generator $B$ instead of the infinitesimal generator $L$ to formulate Condition~\ref{item:thm_LDP_non_compact:Lyapunov3}. The same problem occurs in Condition~2.2 of~\cite{dupuis2018large}: for a diffusion process $Y_t$ in $\mathbb{R}^d$ satisfying $ dY_t = -Y_t dt + dW_t, $ the second-order differential operator \begin{equation*} Bf (x) = \frac{1}{2} \Delta f(x) - x\nabla f(x) \end{equation*} acting on $C^2(\mathbb{R}^d)$ is well-defined and is equal to the infinitesimal generator $L$ of the process when restricted to $C^2_b(\mathbb{R}^d)$. With $g_1(x) = \delta |x|^2/2$, the function $e^{-g_1(x)}Be^{g_1}(x)$ goes to minus infinity for $\delta$ small enough. A second Lyapunov function is $g_2(x) = \sqrt{1+|x|^2}$. In the context of the zig-zag process, since $E$ is of the form $E=\mathbb{R}^d\times\{\pm 1\}^d$, using continuous functions that grow to infinity when fixing the velocity variable is sufficient for obtaining compact level sets. \smallskip Condition~\ref{item:thm_LDP_non_compact:mixing} plays the role of a transitivity assumption in the non-compact case. While it is feasible to solve a principal-eigenvalue problem for a compact state space, this is much more difficult in the non-compact setting. It would require deriving not only the eigenvalue itself, but also the corresponding eigenfunction on a non-compact space, for which general existence results are not available. In this setting the transitivity condition \ref{item:thm_DV_I:reference_measure} of Theorem \ref{thm:proving_LDP:DV_I} is instead partly replaced by the mixing property \ref{item:thm_LDP_non_compact:mixing}. It is a weakened version of~\cite[Condition B.8]{FengKurtz2006},which is based on~\cite[Condition~$\tilde{U}$, page~113]{DeuschelStroock1989}. It is weaker in that it requires the transition probabilities to be comparable only for compactly supported initial conditions~$\nu_1,\nu_2 \in \mathcal{P}_c(E)$. This weakening is crucial for the results in this paper, because the stronger condition fails to be true for the zig-zag process if for instance $\nu_1 = \mathcal{N}(0,1) \otimes \mathrm{Unif}_{\pm 1}$ and $\nu_2 = \delta_y$. In that example, while the left-hand side of \eqref{eq:proving_LDP:LDP_non_compact:mixing} is in this case positive for any Borel set $A \subseteq E$, the right-hand side can become zero. This is because the zig-zag process has finite speed propagation, so that for arbitrary $T > 0$, if $\mathrm{dist}(A,y) > T$, then the probability of transitioning from $y$ into $A$ is zero. However for compactly supported measures the condition is satisfied. We verify the conditions of Theorem \ref{thm:proving_LDP:LDP_non_compact} for the zig-zag process in Section \ref{sec:LDP_zigzag}. \smallskip We are now ready to state the two general large deviations results of this paper, which in Section \ref{sec:LDP_zigzag} will be used to derive the large deviations principle for the empirical measures of the zig-zag process. We start with the compact setting. % \begin{theorem}\label{thm:proving_LDP:LDP_compact} Let $E$ be compact, $S(t)$ a Markov semigroup acting on $C(E)$ equipped with the supremum norm, and $Y_t$ the corresponding Markov process. Let $L$ be the infinitesimal generator of $Y_t$, and assume that $Y_t$ solves the associated martingale problem. Suppose Assumptions \ref{item:thm_LDP_compact:Feller}, \ref{item:thm_LDP_compact:tight} and \ref{item:thm_LDP_compact:principal_eigenvalue} hold. Then the empirical measures $\{\eta_t\}_{t > 0}$ associated to $Y_t$ satisfy a large deviations principle in $\mathcal{P}(E)$ with rate function $\mathcal{I}:\mathcal{P}(E) \to [0,\infty]$ given by~\eqref{eq:proving_LDP:DV_rate_function}. \end{theorem} Theorem \ref{thm:proving_LDP:LDP_compact} remains valid when replacing the eigenvalue-problem condition~\ref{item:thm_LDP_compact:principal_eigenvalue} by the mixing condition~\ref{item:thm_LDP_non_compact:mixing}. This is because the latter is a weaker condition sufficient for verifying the inequality \eqref{eq:ineqH1H2}, upon which the proof of the theorem hinges. The next theorem gives the corresponding large deviations result for the non-compact setting; this is the result we use for proving the large deviations principle for the zig-zag process on $\mathbb{R} \times \{\pm 1\}$ (Theorem \ref{thm:LDP-zigzag:non-compact-1d}). \begin{theorem}\label{thm:proving_LDP:LDP_non_compact} Let $S(t)$ be a Markov semigroup acting on $C_b(E)$ and $Y_t$ the corresponding Markov process. Let $L$ be the infinitesimal generator of $Y_t$ and assume that $Y_t$ solves the associated martingale problem. Assume \ref{item:thm_LDP_compact:Feller}, \ref{item:thm_LDP_compact:tight}, \ref{item:thm_LDP_non_compact:Lyapunov} and \ref{item:thm_LDP_non_compact:mixing}. Then, if $Y_0 \in K$ for some compact set $K$, the empirical measures $\{\eta_t\}_{t > 0}$ associated to the Markov process $Y_t$ satisfy a large deviations principle in $\mathcal{P}(E)$, with rate function $\mathcal{I} : \mathcal{P}(E) \to [0,\infty]$ given by \begin{equation*} \mathcal{I}(\mu) = -\inf_{u \in \mathcal{D}^{++}(L)} \int_E \frac{Lu}{u} d\mu. \end{equation*} \end{theorem} The proofs of Theorems \ref{thm:proving_LDP:LDP_compact} and \ref{thm:proving_LDP:LDP_non_compact} are given in Sections ~\ref{section:proof-of-LDP:compact} and \ref{section:proof-of-LDP:non-compact}, respectively. \subsection{The empirical measures of the zig-zag process} \label{sec:LDP_zigzag} Having established the general large deviations results Theorems \ref{thm:proving_LDP:LDP_compact} and \ref{thm:proving_LDP:LDP_non_compact}, we now specialize to the zig-zag process. Throughout the section, $Y_t$ is used to denote the zig-zag process, $Y_t = (X_t, V_t)$ with $X_t$ and $V_t$ as in Section \ref{sec:zig-zag}. However the state space $E$ will change as we split the large deviations statements for the empirical measures of $Y$ into compact (torus) and non-compact ($\mathbb{R}$) settings. Although \ref{thm:proving_LDP:LDP_non_compact} holds for arbitrary dimension $d \geq 1$, for the zig-zag process we limit ourselves to verifying the conditions for the case $d = 1$. Extending these results to $d > 1$ is substantially more difficult and remains a topic of further research. While conditions~\ref{item:thm_LDP_compact:Feller}, \ref{item:thm_LDP_compact:tight}, \ref{item:thm_LDP_non_compact:Lyapunov} hold true, the main challenge is verifying~\ref{item:thm_LDP_non_compact:mixing}. We begin by considering the compact state space $\mathbb{T} \times\{\pm 1\}$. In this case the infinitesemal generator $L$ of the semigroup $S(t)$ is has domain $\mathcal{D}(L) = C^1(\mathbb{T} \times \{ \pm 1\}) = \{f\in C(\mathbb{T} \times \{ \pm 1\}): f(\cdot,\pm 1) \in C^1(\mathbb{T})\}$, and takes the form \begin{equation} \label{eq:gen_compact} Lf (x,v) = v \partial_x f(x,v) + \lambda(x,v) \left[f(x,-v) - f(x,v)\right], \end{equation} with $\lambda$ given by \eqref{eq:switching-intensity-condition-2}. The LDP for the empirical measures associated with $Y$ and this state space is given in Theorem \ref{thm:LDP-zigzag:compact}. We prove this result in Section~\ref{section:zig-zag:LDP:compact} by verifying the conditions of Theorem \ref{thm:proving_LDP:LDP_compact}, the large deviations principle for processes taking values in a compact state space. \begin{theorem}\label{thm:LDP-zigzag:compact} Suppose that $U \in C^2(\mathbb{T})$. Then the family of empirical measures $\{\eta_t\}_{t>0}$ of the zig-zag process taking values in $\mathbb{T} \times \{\pm 1\}$ satisfies a large deviations principle in the limit $t \to \infty$, with rate function $\mathcal{I}:\mathcal{P}(\mathbb{T} \times \{\pm 1\}) \to [0,\infty]$ given by \begin{equation*} \mathcal{I}(\mu) = -\inf_{u \in \mathcal{D}^+(L)} \int_{\mathbb{T} \times \{\pm 1\}} \frac{Lu}{u} d\mu. \end{equation*} \end{theorem} We now move to the setting of a non-compact state space. Specifically, we consider the zig-zag process $Y_t =(X_t,V_t) $ taking values in $\mathbb{R} \times \{ \pm 1 \}$. As before, $L$ is the generator of this process, i.e.\ $L : \mathcal{D}(L) \subseteq C_b(\mathbb{R} \times \{ \pm 1\}) \to C_b(\mathbb{R} \times \{ \pm 1\})$ is a densely defined linear operator, on the set of functions $\{ f(\cdot, \pm 1) \in C_b ^1(\mathbb{R}) \}$ we have the representation \begin{align*} Lf(x,v) = v \partial _x f(x,v) + \lambda(x,v) \left[ f(x, -v) - f(x,v) \right], \ \ f \in \mathcal D (L), \end{align*} with $\lambda(x,v)=\max(0,vU'(x))+\gamma(x)$. To prove the large deviations principle in this non-compact setting we need additional assumptions on the potential function $U$ determining the jump rates. \begin{enumerate}[label =($B$.\arabic*)] \item\label{item:thm-LDP-zig-zag:Ui} $U(x) \to \infty$ as $|x| \to \infty$ and $U'(x) \to \pm \infty$ as $x \to \pm \infty,$ \item\label{item:thm-LDP-zig-zag:Uii} $U'(x)/U(x) \to 0$ as $|x| \to \infty,$ \item\label{item:thm-LDP-zig-zag:Uiii} $U''(x)/U'(x) \to 0$ as $|x| \to \infty.$ \end{enumerate} Furthermore, we will assume that there exists a second potential $V \in C^2(\mathbb{R})$ such that: \begin{enumerate}[label =($C$.\arabic*)] \item\label{item:thm-LDP-zig-zag:Upsi} $V(x) \to \infty$ as $|x| \to \infty$ and $V'(x) \to \pm \infty$ as $x \to \pm \infty$, \item\label{item:thm-LDP-zig-zag:Upsii} $V(x)/U(x) \to 0$, $U'(x)/V(x) \to 0 $ and $V'(x)/U'(x) \to 0$ as $|x| \to \infty$, \item\label{item:thm-LDP-zig-zag:Upsiii} $U''(x)/V'(x) \to 0$ as $|x| \to \infty$. \end{enumerate} In Section~\ref{section:zig-zag:LDP:non_compact}, we prove the following Theorem. \begin{theorem}\label{thm:LDP-zigzag:non-compact-1d} Assume that $U\in C^3(\mathbb{R})$ satisfies \ref{item:thm-LDP-zig-zag:Ui} - \ref{item:thm-LDP-zig-zag:Uiii}, that there is a function $V \in C^2(\mathbb{R})$ satisfying \ref{item:thm-LDP-zig-zag:Upsi} - \ref{item:thm-LDP-zig-zag:Upsiii} and the function $\gamma$ in \eqref{eq:switching-intensity-condition-2} is uniformly bounded by some $\bar \gamma$. Suppose that the initial condition $Y_0$ belongs to a compact set $K \subseteq \mathbb{R} \times \{ \pm 1\}$. Then the empirical measures $\{\eta_t\}_{t > 0}$ of $Y$ satisfies a large deviations principle on $\mathcal{P}(\mathbb{R} \times \{ \pm 1\})$ with speed $t$ and rate function $\mathcal{I}:\mathcal{P}(\mathbb{R} \times \{ \pm 1\}) \to [0,\infty]$ given by \begin{equation*} \mathcal{I}(\mu) = -\inf_{u \in \mathcal{D}^{++}(L)} \int_{\mathbb{R} \times \{ \pm 1\}} \frac{Lu}{u} d\mu. \end{equation*} \end{theorem} Some comments on the additional assumptions \ref{item:thm-LDP-zig-zag:Ui} - \ref{item:thm-LDP-zig-zag:Uiii} and \ref{item:thm-LDP-zig-zag:Upsi} - \ref{item:thm-LDP-zig-zag:Upsiii} are in place. The condition $U \in C^3(\mathbb{R})$ is imposed to allow for an application of Theorem 4 of \cite{bierkens2019ergodicity}, which is used to verify that \ref{item:thm_LDP_non_compact:mixing} holds. The auxiliary potential $V$ is used to find a second Lyapunov function for $L$ that grows slower than $U$ at infinity; roughly speaking, $V$ behaves asymptotically in-between the potential $U$ and its derivative $U'$ as $|x|$ grows. As an example, in the Gaussian case, $U(x) = x^2/2$ satisfies Conditions \ref{item:thm-LDP-zig-zag:Ui} - \ref{item:thm-LDP-zig-zag:Uiii}, and for any $0<\kappa<1$, the potential $V(x) = |x|^{1+\kappa}/(1+\kappa)$ satisfies \ref{item:thm-LDP-zig-zag:Upsi} - \ref{item:thm-LDP-zig-zag:Upsiii}. In general, any potential $U$ growing at infinity as $(1+|x|^2)^{\beta/2}$ with $\beta > 1$ satisfies the conditions, with $0<\kappa < 1$ such that $\beta - \kappa > 1$ and auxiliary potential $V(x) \sim (1+|x|^2)^{(\beta - \kappa)/2}$. \subsection{Explicit expression for the rate function} \label{sec:rate} In Theorems \ref{thm:LDP-zigzag:compact} and \ref{thm:LDP-zigzag:non-compact-1d} we establish the LDP for the empirical measures of the zig-zag process taking values in $\mathbb{T} \times \{ \pm 1\}$ and $\mathbb{R} \times \{ \pm 1 \}$, respectively. In those results the rate function is given on the variational form of the results by Donsker and Varadhan, see Section \ref{sec:intro_LDP}. This form follows from the more general large deviations results in Section \ref{sec:gen_LDP} and are not specific to the zig-zag process. Here, we use the properties of the latter to derive a more explicit form of the rate function for the case $E = \mathbb{T} \times \{\pm 1\}$, taking a first step towards using it as a tool for analysing the corresponding simulation algorithms. We assume throughout that $E = \mathbb{T} \times \{\pm 1\}$ and the switching rate $\lambda(x,v)$ satisfies $\lambda(x,v) > 0$ for all $(x,v) \in E$. This does not include the canonical rates $\lambda(x,v) = \max(0, v U'(x))_+$; however at the end of this section we present a formal expression for this case. Define a reference measure $\nu_0$ on $E$ by $\nu_0(dx, dv) = \mathrm{Leb}(dx) \otimes \mathrm{Unif}_{\pm 1}(dv)$. For any function $f : E \rightarrow \mathbb R$ we write $f^+(x) := f(x,+1)$ and $f^-(x) := f(x,-1)$. Recall the $\operatorname{arcsinh}$ function, \[ \operatorname{arcsinh}(\xi) = \log \left( \xi + \sqrt{\xi^2 +1} \right), \quad \xi \in \mathbb R.\] The proofs of the following results are given in Section~\ref{sec:proofs-rate-function}. \begin{proposition} \label{prop:expression-ratefunction} Suppose $\mu(dx, dv) = \rho(x,v) \nu_0(dx, dv)$ for a continuously differentiable function $\rho : E \rightarrow [0,\infty)$. If $\frac{d \rho^+}{dx}(x)= \frac{d \rho^-}{dx}(x)$ and $\rho^+$, $\rho^-$ are strictly positive for all $x \in \mathbb{T}$ then the Donsker-Varadhan functional is given by \begin{align} \label{eq:rate-function} \nonumber \mathcal I(\mu)& = \int_{\mathbb{T}} \bigg\{\tfrac 1 2 \rho' \log \left( \frac{\lambda^+ \rho^+}{\lambda^- \rho^-} \right)+ \rho' \operatorname{arcsinh} \left( \frac{ \rho'}{2 \sqrt{ \lambda^+ \lambda^- \rho^+ \rho^-}}\right) \\ & \quad \quad \quad- \sqrt{ 4 \lambda^+ \lambda^- \rho^+ \rho^- + (\rho')^2} + \lambda^+ \rho^+ + \lambda^- \rho^- \bigg\} \ \mathrm{d} x. \end{align} If $\rho^+ \geq 0$ and $\rho^- \geq 0$ are constant, then \begin{equation} \label{eq:rate-function-constant-density} \nonumber \mathcal I(\mu) = \int_{\mathbb{T}} \left( \sqrt{\lambda^+ \rho^+} - \sqrt{\lambda^- \rho^-} \right)^2 \ \mathrm{d} x. \end{equation} If $\frac{d \rho^+(x)}{dx}(x) \neq \frac{d \rho^-(x)}{dx}$ for some $x \in \mathbb{T}$ then $\mathcal I(\mu) = \infty$. \end{proposition} Note that if $\mu(dx,dv) = \rho(x,v) \nu_0(dx, dv)$ and $\frac{d \rho^+}{dx}= \frac{d \rho^-}{dx}$ on $\mathbb{T}$, then for some constant $c \in \mathbb R$ and a probability density function $\rho$ on $\mathbb{T}$ we have $\rho^+(x,v) = \rho(x) + c$ and $\rho^-(x,v) = \rho(x) - c$. A useful application of the rate function~$\mathcal I(\mu)$ is in estimating deviations of ergodic averages, which typically requires the computation of \[ \inf_{\mu \in \mathcal P} \left(\mathcal I(\mu) - \int_E V \ \mathrm{d} \mu \right). \] The rigorous statement is the Laplace principle~\cite[Definition~1.6, Theorem~1.8]{BudhirajaDupuis2019}. If the function $V$ does not depend on $v$, then by the following result we can safely assume $c = 0$ and thus restrict the minimization problem to minimization over probability densities on $\mathbb{T}$. \begin{proposition} \label{prop:no-v-dependence} Let $\rho \in C^1(\mathbb{T})$ be a strictly positive probability density function on $\mathbb{T}$. Let $|k| := \inf_{x} \rho(x)$. Consider the one-parameter family of probability measures $(\mu_c)_{c \in (-k,+k)} \in \mathcal P_{eq}$ with probability density functions $\rho_c : E \rightarrow (0, \infty)$ given by \[ \rho_c(x,+1) = \rho(x) + c, \quad \rho_c(x,-1) = \rho(x) - c, \quad c \in (-k, +k).\] Then $c \mapsto \mathcal I(\mu_c)$ is minimized at $c = 0$. Furthermore, for $\mu = \mu_0$, \begin{equation} \label{eq:ratefunction-simplified} \begin{aligned} \mathcal I(\mu) & = \int_{\mathbb{T}} \bigg\{ \tfrac 1 2 \rho' \log \left( \frac{ \lambda^+}{\lambda^-} \right) + \rho' \operatorname{arcsinh} \left( \frac{\rho'}{2 \rho \sqrt{ \lambda^+ \lambda^-}} \right) \\ & \quad \quad \quad - \sqrt{ 4 \lambda^+ \lambda^- \rho^2 + (\rho')^2} + (\lambda^+ + \lambda^-) \rho \bigg\} \ \mathrm{d} x. \end{aligned} \end{equation} \end{proposition} We will specialize to the case in which $\rho = \rho^+ = \rho^-$ and use the representation $\rho = \exp(-W)$, where $W \in C^1(\mathbb{T})$. We then find \begin{equation} \label{eq:in-W} \begin{aligned} \mathcal I(\mu) & = \int_{\mathbb{T}} \bigg\{ -\tfrac 1 2 W' \log \left( \frac{\lambda^+}{\lambda^-} \right) + W' \operatorname{arcsinh} \left( \frac{ W'}{2 \sqrt{\lambda^+ \lambda^-}} \right) \\ & \quad \quad \quad - \sqrt{4 \lambda^+ \lambda^- + (W')^2} + \lambda^+ + \lambda^- \bigg\} \exp(-W) \ \mathrm{d} x. \end{aligned} \end{equation} Let \begin{equation} \label{eq:switching-rate} \lambda^+(x) = \gamma + \max(0, U'(x)) \quad \mbox{and} \quad \lambda^-(x) = \gamma + \max(0, - U'(x)),\end{equation} where $\gamma > 0$ is constant, so that $\lambda^{\pm}$ satisfy~\eqref{eq:switching-intensity-condition-2} and hence the measure with $\nu_0$-density $\exp(-U(x))$ is invariant. We call $\gamma$ the \emph{excessive switching intensity} or \emph{refreshment rate}. We can now investigate the dependence of the rate function $\mathcal I$, through the expression~\eqref{eq:in-W}, on $\gamma$. The derivative of the integrand of~\eqref{eq:in-W} with respect to $\gamma$ can be computed to be \begin{equation} \label{eq:gamma-derivative} \left( \frac{4 \lambda^+ \lambda^- +(\lambda^+ - \lambda^-)W' - (\lambda^+ + \lambda^-)\sqrt{4 \lambda^- \lambda^+ + (W')^2}}{2 \lambda^+ \lambda^-}\right)\exp(-W),\end{equation} which is non-positive, and zero only if $W' = \lambda^+ - \lambda^- = U'$ (which can be seen by maximizing with respect to $W'$). It follows that $\mathcal I(\mu)$ is strictly decreasing as a function of $\gamma$ for $\mu$ not equal to the stationary measure. In other words, for a smaller refreshment rate $\gamma$, the rate function increases. Hence the convergence of empirical averages to equilibrium is faster for smaller~$\gamma$. Suppose that $\nu_0 (\{ x \in \mathbb{T} : U'(x) = 0\}) = 0$, i.e. the set of points where the derivative of $U$ vanishes is $\nu_0$-negligible. In the formal limit~$\gamma \downarrow 0$ in~\eqref{eq:switching-rate}, we obtain the following expression for the rate function: \begin{equation} \label{eq:limit-functional} \begin{aligned} \mathcal I(\mu) & = \begin{cases} \int_{\mathbb{T}} \left\{ |W'| \left( \log\left( \frac{ W'}{U'} \right) - 1 \right) + |U'| \right\} \exp(-W) \ \mathrm{d} x \quad & \mbox{if $\operatorname{sign}(W') \equiv \operatorname{sign}(U')$}, \\ \infty \quad & \mbox{otherwise}. \end{cases} \end{aligned} \end{equation} \section{Proofs} \label{sec:proofs} \subsection{General large-deviation Theorems \ref{thm:proving_LDP:LDP_compact} and \ref{thm:proving_LDP:LDP_non_compact}} \label{sec:aux} In this section we give the proofs of Theorems \ref{thm:proving_LDP:LDP_compact} and \ref{thm:proving_LDP:LDP_non_compact}, which are used to obtain the large deviations principle for the empirical measures of the zig-zag process. The case of a compact state space is treated in Section \ref{section:proof-of-LDP:compact} and the non-compact case in Section \ref{section:proof-of-LDP:non-compact}. Before we embark on these proofs we outline the overall strategy; a more detailed description can be found in the book by Feng and Kurtz~\cite[Chapter~12]{FengKurtz2006}. \smallskip Consider the empirical measure \begin{equation*} \eta_t(\cdot) = \frac{1}{t} \int_0^t \delta_{Y_s} (\cdot) \mathrm{d} s. \end{equation*} With a change of variable $s \mapsto ts$ in the integral we can express this as \begin{align*} \eta_t (\cdot) = \int _0 ^1 \delta _{Y_{st} } (\cdot) \mathrm{d} s, \end{align*} the empirical measure for the sped-up process (we can think of $t>1$) $Y^t _s = Y_{st}$ over the time interval $[0,1]$; in fact we will use $t=n \in \mathbb{N} _+$ below. We can consider the empirical measure of this time-scaled process $Y_t$ on time intervals of lengths other than unity: for $\tau >0$ define $\eta _t ^{\tau}$ as \begin{align*} \eta _t ^{\tau} (\cdot) = \int _0 ^{\tau} \delta _{Y_{st}} \mathrm{d} s. \end{align*} This empirical measure is viewed as an element of $\mathcal L (E)$, the set of Borel measures on $E \times [0, \infty)$ of the form $ \mathrm{d}\rho (x,s) = \mu_s ( \mathrm{d} x) \mathrm{d} s$, $\mu _s \in \mathcal P (E)$ (see Section \ref{sec:notation}). Any such $\rho \in \mathcal L (E)$ defines a continuous path $t \mapsto \rho _t = \rho (\cdot \times [0,t]) \in \mathcal M _f (E)$ and for $t=1$ this is a probability measure. The strategy for proving the large deviations principle for $\{ \eta _t \}$ is to first show that $\{ \eta _t ^{\tau} \}$ satisfies a large deviations principle in $\mathcal L (E)$. We can then use the fact that projections are continuous maps on $\mathcal L (E)$ (Lemma~\ref{lemma:proofs_LDP:continuous_projection}) and an application of the contraction principle to obtain the sought-after large deviations principle on $\mathcal P (E)$. This is summarised in the following proposition. \begin{proposition} \label{prop:LDP_strategy} Suppose that the family $\{\eta^\tau_t\}_{t > 0}$ satisfies a large deviations principle in $\mathcal{L}(E)$ with rate function $\mathcal{J}:\mathcal{L}(E) \to [0,\infty]$ given by \begin{equation*} \mathcal{J}(\rho) = \int_0^\infty \mathcal{I}(\mu_s) \mathrm{d} s, \quad \text{ for } \, \rho_t = \int_0^t \mu_s \mathrm{d} s, \end{equation*} where $\mathcal{I} : \mathcal{P}(E) \to [0,\infty]$ is the rate function appearing in the Donsker-Varadhan results, \begin{equation*} \mathcal{I}(\mu) = -\inf_{u \in \mathcal{D}^{++}(L)} \int_E\frac{Lu}{u} \mathrm{d}\mu. \end{equation*} Then $\eta_t $ satisfies a large deviations principle in $\mathcal{P}(E)$ with rate function $\mathcal{I}$. \end{proposition} \begin{proof} Because $\{\eta^\tau_t\}_{t > 0}$ satisfies a large deviations principle on $\mathcal{L}(E)$ and the projection $\pi_1 : \mathcal{L}(E) \to \mathcal{P}(E)$ given by \begin{align*} \pi _1 (\rho) = \rho _1, \end{align*} is continuous (Lemma~\ref{lemma:proofs_LDP:continuous_projection} below), by the contraction principle the sequence evaluated at~$\tau=1$,~$\{\eta_t ^1\}_{t > 0}$, satisfies a large deviation principle on~$\mathcal{P}(E)$ with rate function~$\tilde{\mathcal{I}}: \mathcal{P}(E) \to [0,\infty]$ given by \begin{align*} \tilde{\mathcal{I}} (\nu) &= \inf\left\{ \mathcal{J}(\rho) = \int_0^\infty \mathcal{I}(\mu_s) \, \mathrm{d} s : \rho_t = \int_0^t \mu_s \, \mathrm{d} s \in \mathcal{L}(E), \rho_1 = \nu \right\}. \end{align*} It remains to show that $\tilde{\mathcal I} (\nu) = \mathcal I (\nu)$ for every $\nu \in \mathcal P (E)$. First, in the integral defining $\mathcal J (\rho)$, the integrand is always positive after time $t=1$. It is therefore enough to consider only integrating to time $t=1$ in the infimum, as we are free to chose the the form of $\rho$ after that time. Thus, \begin{align*} \tilde{\mathcal I} (\nu) = \inf \left\{ \int _0 ^1 \mathcal I (\mu _t) \mathrm{d} t : \rho _t = \int _0 ^t \mu_s \mathrm{d} s \in \mathcal L (E), \ \rho_1 = \nu \right\}. \end{align*} For a fixed $\nu \in \mathcal P (E)$, take any $\rho_t = \int _0 ^t \mu _s ds \in \mathcal L (E)$ such that $\rho _1 = \nu$. The rate function $\mathcal I $ is convex on $\mathcal P (E)$ and by Jensen's inequality we have \begin{align*} \mathcal I (\nu) &= \mathcal I \left( \rho _1 \right) \\ &= \mathcal I \left( \int _0 ^1 \mu _s \mathrm{d} s \right) \\ &\leq \int _0 ^1 \mathcal I \left( \mu _s \right) \mathrm{d} s. \end{align*} Taking the infimum over all such $\rho \in \mathcal L(E)$ yields the inequality \begin{align*} \mathcal I (\nu) \leq \tilde{\mathcal I} (\nu), \end{align*} The constant path $\mu _s = \nu$ gives equality and we have that $\tilde{\mathcal I} = \mathcal I $ as functionals on $\mathcal P(E)$. \end{proof} \begin{lemma}[Projection is continuous]\label{lemma:proofs_LDP:continuous_projection} Let $\mathcal{L}(E)$ be the above space with the topology of weak convergence on bounded time intervals. Let $\mathcal{P}(E)$ be equipped with the weak topology. Then the projection $\pi_1 : \mathcal{L}(E) \to \mathcal{P}(E)$ defined by $\pi_1 (\rho) := \rho_1$ is a continuous map. \end{lemma} \begin{proof}[Proof of Lemma~\ref{lemma:proofs_LDP:continuous_projection}] Let $\rho^n \to \rho$ in $\mathcal{L}(E)$. We need to prove that for any bounded and continuous function $g$ on $E$, we have \begin{equation*} \int_E g(u) \mathrm{d}\rho^n_1(u) \to \int_E g(u) \mathrm{d}\rho_1. \end{equation*} Since \begin{equation*} \int_E g(u) \mathrm{d}\rho^n_1(u) = \int_{E \times [0,1]} g(u) \mathrm{d}\rho^n(u,s), \end{equation*} and~$\varphi(u,s) = g(u)$ is continuous and bounded on~$E \times [0,\infty)$, this is implied by~$\rho^n \to \rho$. \end{proof} Armed with Proposition \ref{prop:LDP_strategy}, one way to prove Theorems \ref{thm:proving_LDP:LDP_compact} and \ref{thm:proving_LDP:LDP_non_compact} is to prove the large deviations principle for the empirical measures of the associated sped-up versions of underlying processes and apply the proposition. This is the approach we take and we rely on the following result from \cite{FengKurtz2006} for proving the large deviations principles on $\mathcal L (E)$. \begin{lemma}[Theorem~12.7 of~\cite{FengKurtz2006}] \label{lemma:FengKurtz} Suppose that the following conditions hold: \begin{enumerate}[label=(FK.\arabic*)] \item The martingale problem for $L$ is well-posed. \label{cond:FK1} \item The semigroup $S$ is Feller-continuous. \label{cond:FK2} \item The semigroup $S$ is $buc$-continuous. \label{cond:FK3} \item There is an index set $\mathcal Q$ and a family of subsets of $E$, $\{ \tilde{K} ^q _n \subset E : q \in \mathcal Q\}$, such that for $q_1, q_2 \in \mathcal Q$, there exists $q_3 \in \mathcal Q$ with $\tilde{K} ^{q_1} _n \cup \tilde{K} ^{q_2} _n \subset \tilde{K} ^{q_3} _n$, and for every $y \in E$, there exists $q \in \mathcal Q$ such that $\lim _{n\to \infty} d (y, \tilde{K} ^{q} _n) =0$. Moreover, for each $q \in \mathcal Q$, $T>0$ and $a >0$, there exists a $\hat q (q,a,T) \in \mathcal Q$ satisfying \begin{align*} \limsup _{n \to \infty} \sup _{y \in \tilde{K} ^q _n} \frac{1}{n} \log \mathbb{P}_{y} \left( Y_t \notin \tilde{K} ^{\hat q (q,a,T)} _n, \ \textrm{some } t \leq nT \right) \leq -a. \end{align*} \label{cond:FK4} \item There exists an upper semicontinuous function $\Psi$ on $E$, $\{ \varphi _n \} \subset \mathcal D ^{++} (B_0)$, and $q_0 \in \mathcal Q$ such that $\Psi$ is bounded above, $\{ y\in E: \Psi(y) \geq c \}$ is compact for each $c \in \mathbb{R}$, $0 < \inf _{y \in K _n ^{q_0}} \varphi _n (y) < 2 \inf _{y\in E} \varphi _n(y)$, $\inf_{n, y \in E} \varphi_n (y) >0$, \begin{align*} \lim _{n\to \infty} \frac{1}{n} \log \norm{\varphi _n} =0, \ \ \sup_{n,y} \frac{L \varphi _n (y) }{ \varphi_n (y)} < \infty, \end{align*} and for each $q \in \mathcal Q$, \begin{align*} \lim _{n \to \infty} \sup _{y \in \tilde{K} ^q _n} \left( \frac{L \varphi _n (y) }{ \varphi_n (y)} - \Psi (y) \right) \leq 0, \ \ q\in \mathcal Q. \end{align*} In addition, for each $n$ and $\beta \in (-\infty, 1]$, \begin{align*} \lim_{t\to 0} \norm{S(t) \varphi_n^{\beta} - \varphi_n^{\beta}} =0. \end{align*} \label{cond:FK5} \item For each $a >0$ there exists compact $K$ and $q \in \mathcal Q$ such that \begin{align*} \limsup _{n \to \infty} \frac{1}{n} \log \mathbb{P} \left( Y^n _0 \notin K \cap \tilde{K} ^{q} _n \right) \leq -a. \end{align*} \label{cond:FK6} \item Take $\mathcal C \subset C_b (E)$ separating and define, with $\Psi$ as in \ref{cond:FK5}, \begin{align*} H_1 ^{\beta, \Psi}& = \inf_{0 < \kappa \leq 1} \inf_{f \in \mathcal{D}^{++}(L)} \sup_{y \in E} \left[ \beta (y) \cdot p + (1-\kappa) \frac{Lf(y)}{f(y)} + \kappa \Psi(y)\right],\\ H_2 ^{\beta, \Psi} &= \sup_{\kappa > 0} \sup_{f \in \mathcal{D}^{++}(L)} \inf_{y \in E} \left[ \beta (y) \cdot p + (1+\kappa) \frac{Lf(y)}{f(y)} - \kappa \Psi(y)\right]. \end{align*} It holds that $H_1 ^{\beta, \Psi} \leq H_2 ^{\beta, \Psi}$, for $\beta \in \mathcal C ^d$, $d=1,2.\dots$. \label{cond:FK7} \end{enumerate} Then $\{ \eta ^{\tau} _n \} _n$ satisfies the large deviations principle in $C_E[0, \infty)$ with rate function \begin{align*} \label{eq:rateFK} \hat \mathcal J (\rho) = \int _0 ^\infty I^{\Psi} (\rho_s) \mathrm{d} s, \ \rho \in \mathcal L (E), \end{align*} where \begin{align*} I^{\Psi} (\mu) = -\min\left[\inf _{u \in \mathcal D^{++} (L)} \int _{E} \frac{Lu}{u} \mathrm{d}\mu , \int _E \Psi \mathrm{d}\mu\right]. \end{align*} \end{lemma} \subsubsection{Proof of Theorem~\ref{thm:proving_LDP:LDP_compact}---compact state-space $E$} \label{section:proof-of-LDP:compact} As outlined in the previous section, we can prove Theorem \ref{thm:proving_LDP:LDP_compact} by first verifying the conditions of Lemma \ref{lemma:FengKurtz} under the given assumptions and then apply Proposition \ref{prop:LDP_strategy}. \begin{proof}[Proof of Theorem \ref{thm:proving_LDP:LDP_compact}] First, Conditions \ref{cond:FK1}-\ref{cond:FK3} follow from the assumption of Feller continuity \ref{item:thm_LDP_compact:Feller} and tightness; see e.g.\ Remark 11.22 in \cite{FengKurtz2006}. Next, Conditions \ref{cond:FK4} and \ref{cond:FK5} always hold for compact $E$: take $\varphi_n \equiv 1$, $\Psi \equiv 0$, $Q = \{q\}$ (singleton), and $K^q_n :=E$ for every $n \in \mathbb{N}$. For this choice both conditions are met---it is only for non-compact spaces $E$ that these conditions become non-trivial (see the proof of Theorem \ref{thm:proving_LDP:LDP_non_compact}). Condition \ref{cond:FK6} is trivially true for compact $E$. Remains to verify the inequality $H_1 ^{\beta} \leq H_2 ^{\beta}$. Take $d \geq 1$ and $\beta \in \mathcal C ^d$. With the choice $\Psi \equiv 0$ the definitions of $H_i ^{\beta}: \mathbb{R} ^d \to \mathbb{R}$, $i=1,2$, become \begin{align*} H_1 ^{\beta}& = \inf_{f \in \mathcal{D}^{++}(L)} \sup_{y \in E} \left[ \beta (y) \cdot p + \frac{Lf(y)}{f(y)} \right],\\ H_2 ^{\beta} &= \sup_{f \in \mathcal{D}^{++}(L)} \inf_{y \in E} \left[ \beta (y) \cdot p + \frac{Lf(y)}{f(y)} \right]. \end{align*} We now show that the required inequality follows from Assumption \ref{item:thm_LDP_compact:principal_eigenvalue}, solvability of the principal eigenvalue problem. For any $\beta \in \mathcal C ^d$ and $p \in \mathbb{R} ^d$, define the map $V_p (y): E \to \mathbb{R}$ as \begin{align*} V_p (y) = \beta (y) \cdot p \end{align*} This is a continuous function on $E$ and for every $p$ there exists a function $f_p \in \mathcal D ^+ (L)$ and real eigenvalue $\lambda_p$ such that \begin{align*} (L + \beta \cdot p) f_p = \lambda _p f_p. \end{align*} It follows that, for any $p \in \mathbb{R}^d$, we have \begin{align*} \lambda _p = \sup_{y \in E} \left[ \frac{Lf_p(y)}{f_p(y)} + \beta(y) \cdot p \right] = \inf_{y \in E} \left[ \frac{Lf_p(y)}{f_p(y)} + \beta(y) \cdot p \right], \end{align*} which leads to the upper bound % \begin{align*} H^\beta_1(p) &= \inf_{f \in \mathcal{D}^{+}(L)} \sup_{y \in E} \left[ \frac{Lf(y)}{f(y)} + \beta(y) \cdot p \right] \\ &\leq \sup_{y \in E} \left[ \frac{Lf_p(y)}{f_p(y)} + \beta(y) \cdot p \right] \\ &= \inf_{y \in E} \left[ \frac{Lf_p(y)}{f_p(y)} + \beta(y) \cdot p \right] \\ &\leq \sup_{f \in \mathcal{D}^{+}(L)} \inf_{y \in E} \left[ \frac{Lf(y)}{f(y)} + \beta(y) \cdot p \right] \\ &= H^\beta_2(p). \end{align*} % This shows that Condition \ref{cond:FK7} of Lemma \ref{lemma:FengKurtz} follows from \ref{item:thm_LDP_compact:principal_eigenvalue}. As a result, in the setting of compact $E$, Assumptions \ref{item:thm_LDP_compact:Feller} - \ref{item:thm_LDP_compact:principal_eigenvalue} ensure that Lemma \ref{lemma:FengKurtz} is applicable. This gives the large deviations principle for the empirical measures associated with sped-up versions of the process $Y$ and Proposition \ref{prop:LDP_strategy} transfers this to the empirical measures of the original process. This concludes the proof of the large deviations principle. The form of the rate function is trivially seen to be equal to the prescribed form because of the choice of $\Psi \equiv 0$. \end{proof} \subsubsection{Proof of Theorem~\ref{thm:proving_LDP:LDP_non_compact}---non-compact state space $E$} \label{section:proof-of-LDP:non-compact} We prove large deviations of the family of measures~$\{\eta_t ^\tau\}_{t > 0}$ introduced at the beginning of Section \ref{sec:aux} by verifying the assumptions of Lemma \ref{lemma:FengKurtz}. Proposition \ref{prop:LDP_strategy} then implies the large deviations principle of the empirical measures $\{\eta_t\}_{t > 0}$ with the prescribed rate function. Whereas the conditions of Lemma \ref{lemma:FengKurtz} where straightforward to verify in the compact setting of Theorem \ref{thm:proving_LDP:LDP_compact}, the non-compact case requires more work. Specifically, because we can no longer assume that there is a solution to the principal eigenvalue problem---such an assumption would not allow us to prove the large deviations principle for the zig-zag process---and the state space is no longer compact, \ref{cond:FK4}-\ref{cond:FK7} are more difficult to verify. A crucial component of the proof of Theorem \ref{thm:proving_LDP:LDP_non_compact} is an inequality that is connected to the necessary comparison principle. To streamline the proof we now state this inequality as a separate result. \smallskip For any $V \in C_b(E)$ and $\Psi : E \to \mathbb{R}$, define $H_1 ^{\Psi}, H_2 ^{\Psi} \in \mathbb{R}$ by \begin{equation} \begin{split} H_1 ^{\Psi} &= \inf_{0 < \kappa \leq 1} \inf_{f \in \mathcal{D}^{++}(L)} \sup_{y \in E} \left[ V(y) + (1-\kappa) \frac{Lf(y)}{f(y)} + \kappa \Psi(y)\right], \label{eq:H1_H2} \\ H_2 ^{\Psi} &= \sup_{\kappa > 0} \sup_{f \in \mathcal{D}^{++}(L)} \inf_{y \in E} \left[ V(y) + (1+\kappa) \frac{Lf(y)}{f(y)} - \kappa \Psi(y)\right]. \end{split} \end{equation} \begin{proposition}\label{prop:non_compact:H1_leq_H2} Take any $V \in C_b (E)$ and suppose~\ref{item:thm_LDP_non_compact:mixing} holds and that for any $c\in\mathbb{R}$, the superlevel-set $\{\Psi \geq c\}$ is compact. Then \begin{align} \label{eq:ineqH1H2} H_1 ^{\Psi} \leq H _2 ^{\Psi}. \end{align} \end{proposition} We first complete the proof of Theorem \ref{thm:proving_LDP:LDP_non_compact}. \begin{proof}[Proof of Theorem \ref{thm:proving_LDP:LDP_non_compact}] The proof amounts to showing that Conditions \ref{cond:FK1}-\ref{cond:FK7} of Lemma \ref{lemma:FengKurtz} hold. We start with the ones that are straightforward to obtain from the assumptions of the theorem. Conditions \ref{cond:FK1}-\ref{cond:FK3} follow from \ref{item:thm_LDP_compact:Feller} and \ref{item:thm_LDP_compact:tight}. For condition \ref{cond:FK6} the existence of such a compact set follows immediately from the assumption that the initial value $Y(0)$ belongs to a compact set $K \subseteq E$. We now show that Conditions \ref{cond:FK4} and \ref{cond:FK5} follow from \ref{item:thm_LDP_non_compact:Lyapunov}, the existence of Lyapunov functions $g_1$ and $g_2$ with certain growth properties. We start with \ref{cond:FK4} and define the family of compact sets $K^q_n \subseteq E$ by \begin{equation*} K^q_n = \{y \in E\,:\, g_2(y) \leq qn\},\quad q,n \in \mathbb{N} \end{equation*} For any $q_1, q_2$ and with $q_3 = \max (q_1, q_2)$, it then holds that \begin{align*} K^{q_1}_n \cup K^{q_2}_n \subseteq K^{q_3}_n, \ \ \forall n \in \mathbb{N}. \end{align*} Because $g_2 (y)$ is finite for any $y\in E$, there exists $q, N \in \mathbb{N}$ such that $n \geq N$ implies that $y \in K_n ^{q}$. In particular, $\textrm{dist} (y, K_n ^q) = 0$. For the last part of Condition \ref{cond:FK4}, take $q \in \mathbb{N}$ and $T, a > 0$. It remains to find a $\tilde q$ such that \begin{align*} \limsup _{n \to \infty} \sup _{y \in K ^{q} _n} \frac{1}{n} \log \mathbb{P} _y \left( Y_t \notin K ^{\tilde q} _n, \ \textrm{some } t \leq nT \right) \leq -a. \end{align*} By Lemma 4.20 in \cite{FengKurtz2006}, for any open neighbourhood $\mathcal O$ of $K_n ^q$, \begin{align} \label{eq:openN} \mathbb{P}\left(Y_t \notin \mathcal{O}, \,\mathrm{some}\, t \leq nT \,|\, Y_0 \in K^q_n\right) \leq \mathbb{P}\left(Y_0 \in K^q_n\right) e^{-\beta _q + nT\gamma(\mathcal{O})}, \end{align} where the constants $\beta_q$ and $\gamma(\mathcal{O})$ are given by \begin{align*} \beta_q = \inf_{E \setminus \mathcal{O}} g_2 - \sup_{K^q_n} g_2, \end{align*} and \begin{align*} \gamma(\mathcal{O}) = \max \left(\sup_{\mathcal{O}}e^{-g_2} B e^{g_2}, 0\right). \end{align*} By the growth condition for $g_2$ (part (a) of \ref{item:thm_LDP_non_compact:Lyapunov}) for any $\tilde q > \hat q > q$ large enough, there exists an open set $\mathcal O$ such that \begin{align*} K_n ^q \subseteq K_n ^{\hat q} \subseteq \mathcal O \subseteq K^{\tilde q} _n. \end{align*} By definition, $g_2 \leq nq$ on $K ^q _n$ and because $K ^{\hat q} _n \subseteq \mathcal O$, we have $g_2 \geq \hat{q} n$ on $E \setminus \mathcal O$. Combined with the upper bound $\gamma (\mathcal O) \leq \gamma (E)$ this gives, starting from \eqref{eq:openN}, \begin{align*} \frac{1}{n} \log \mathbb{P} \left( Y_t \notin K ^{\tilde q} _n, \ \textrm{some } t\leq nT | Y_0 \in K_n ^q \right) &\leq T \gamma(\mathcal O) - \frac{1}{n} \beta _q \\ &\leq T \gamma(E) +q - \hat{q}. \end{align*} The last part of Condition \ref{cond:FK4} is now straightforward to obtain. First, take $\hat q = \hat q (q, a, T)$ large enough that the right-hand side of the last display is bounded by $-a$: \begin{align*} T \gamma(E) +q - \hat{q} \leq -a. \end{align*} Next, choose $\tilde q = \tilde q (q, a, T)$ large enough that there is an open set $\mathcal O$ such that $K ^{\hat q} _n \subseteq \mathcal O \subseteq K^{\tilde q} _n$. The asymptotic statement then follows, which concludes the verification of condition \ref{cond:FK4} of Lemma \ref{lemma:FengKurtz}. \smallskip To show that condition \ref{cond:FK5} is fulfilled we generalize the arguments used in Example 11.24 in \cite{FengKurtz2006}. The functions $\varphi_n$ are constructed from the Lyapunov functions $g_1$ and $g_2$. First, define \begin{equation}\label{eq:proving_LDP:r_n} r_n := \sup \left\{g_1(y) \,: \, y \in E,\, g_1(y) g_2(y) \leq n^2\right\}. \end{equation} Then $r_n \to \infty$ and $r_n/n \to 0$ as $n \to \infty$, since~\ref{item:thm_LDP_non_compact:Lyapunov2} and the condition in the set imply \begin{equation*} \frac{r_n}{n} = \frac{g_1(y_n)}{n} \leq \sqrt{\frac{g_1(y_n)}{g_2(y_n)}} \to 0. \end{equation*} Furthermore, for each $q$ there exists $n_q$ such that $n \geq n_q$ implies \begin{equation*} K^q_n \subseteq \left\{y\,:\, g_1(y) \leq r_n\right\}. \end{equation*} For a smooth, non-decreasing and concave function $\rho : [0,\infty) \to [0,2]$ satisfying $\rho(r) = r$ for $0 \leq r \leq 1$ and $\rho(r) = 2$ for $r \geq 3$, define the functions $\varphi_n$ by cutting off $g_1$: \begin{equation}\label{eq:proving_LDP:varphi_n} \varphi_n(y) := e^{r_n} \rho(e^{-r_n} e^{g_1(y)}). \end{equation} We have $\varphi_n = e^{g_1}$ on the compact sets $K^q_n$. Setting $\Psi = e^{-g_1} B e^{g_1}$, we therefore obtain \begin{equation*} \frac{L \varphi_n(y)}{\varphi_n(y)} = \Psi(y),\quad y \in K^q_n,\, n \geq n_q. \end{equation*} The fact that $r_n/n\to 0$ as $n\to\infty$ implies $n^{-1}\log\|\varphi_n\| \to 0$ as $n\to\infty$. For proving that \begin{equation*} \sup_{n,y}\frac{L\varphi_n(y)}{\varphi_n(y)}<\infty, \end{equation*} it is sufficient to show that for any positive function $u:E \to (0,\infty)$ in the domain of $B$ and for any $y_0 \in E$, we have \begin{equation}\label{eq:proof-LDP-noncompact:ineq-pos-max-pr} \frac{B (\rho(u))(y_0)}{\rho(u)(y_0)} \leq \frac{\max\left(B u(y_0),0\right)}{u(y_0)}. \end{equation} Then with $u=e^{-r_n}e^{g_1}$ and noting that $L\varphi_n=B\varphi_n$, by linearity we obtain \begin{equation*} \frac{L\varphi_n}{\varphi_n} \leq \frac{\max\left(B e^{g_1},0\right)}{e^{g_1}}, \end{equation*} and the result follows since $\Psi(y)=e^{-g_1(y)} \left(B e^{g_1}\right)(y)\to-\infty$ as $|y|\to\infty$. Hence we are left with verifying~\eqref{eq:proof-LDP-noncompact:ineq-pos-max-pr}. If $u(y_0) \in (3,\infty)$, then $\rho(u)(y_0)$ is maximal. Hence by the positive maximum principle, $B\rho(u)(y_0) \leq 0$, and the inequality follows. If $u(y_0) \in (0,3]$, then $a_0 := \rho'(u(y_0)) \in [0,1]$, the region where $\rho$ goes from slope one to slope zero. Consider the function $f_0 := \rho(u) - a_0 u$. Since $g_0(s) := \rho(s) - a_0 s$ is maximal for $s_0$ satisfying $\rho'(s_0) = a_0$, we obtain that $y_0$ is an optimizer, that is $f_0(y_0) = \sup_y f(y)$. Furthermore, $g_0(s_0) \geq 0$, so by the positive maximum principle $Bf_0(y_0) \leq 0$. By linearity of $B$ and since $r \leq \max(r,0)$, we obtain the inequality $B \rho(u)(y_0) \leq a_0 \cdot \max\left(Bu(y_0),0\right)$. Hence \begin{equation*} \frac{B \rho(u)(y_0)}{\rho(u)(y_0)} \leq \frac{a_0}{\rho(u)(y_0)}\max(Bu(y_0),0) \leq \frac{1}{u(y_0)} \max(Bu(y_0),0), \end{equation*} using that $0 \leq g_0(s_0) = \rho(u)(y_0)-a_0 u(y_0)$. This finishes the verification of~\eqref{eq:proof-LDP-noncompact:ineq-pos-max-pr}. \smallskip It remains to show that condition \ref{cond:FK7} is fulfilled. However, this is precisely the conclusion of Proposition \ref{prop:non_compact:H1_leq_H2} - the function $V(y) = \beta (y)\cdot p$ where $\beta$ is as in condition (vii) is an element of $C_b (E)$, and by~\ref{item:thm_LDP_non_compact:Lyapunov3}, the function $\Psi$ has compact superlevel-sets. \smallskip We have shown that under the assumptions of the theorem, all conditions of Lemma \ref{lemma:FengKurtz} are fulfilled. The large deviations principle for the empirical measures of the sped-up versions thus holds and Proposition \ref{prop:LDP_strategy} then gives the large deviations principle for the empirical measures $\{ \eta _t \}$ associated with~$Y$. \smallskip We are left with showing that the rate function $I ^{\Psi}$ of Proposition \ref{prop:LDP_strategy} satisfies \begin{align*} I ^{\Psi} (\mu) = -\inf _{u \in \mathcal D^{++} (L)} \int _{E} \frac{Lu}{u} \mathrm{d}\mu. \end{align*} Below, we prove that \begin{equation*} \limsup_{n\to\infty}\int_{E}\frac{L\varphi_n}{\varphi_n} \mathrm{d}\mu \leq \int_E \Psi \mathrm{d}\mu. \end{equation*} Then \begin{equation*} \inf_{u \in \mathcal D^{++} (L)}\int_E\frac{Lu}{u} \mathrm{d}\mu \leq \inf_n \int_E \frac{L\varphi_n}{\varphi_n} \mathrm{d}\mu \leq \int_E \Psi \mathrm{d}\mu, \end{equation*} and hence the rate function is given by \begin{align*} I^{\Psi} (\mu) = -\min \left[ \inf _{u \in \mathcal D^{++} (L)} \int _{E} \frac{Lu}{u} \mathrm{d}\mu, \int _E \Psi d\mu \right] = -\inf _{u \in \mathcal D^{++} (L)} \int _{E} \frac{Lu}{u} \mathrm{d}\mu. \end{align*} To see that the functions $\varphi_n$ satisfy the limsup inequality, note that $\Psi$ has compact super-level sets and $\Psi(y)\to-\infty$ as $|y|\to\infty$. Since the compact sets $K_n^q$ exhaust $E$ in the sense that $E = \cup_n K^q_n$ and $K^q_n\subseteq K^q_{n+1}$, there exists a constant $C > 0$ such that \begin{equation*} f_n = -\frac{L\varphi_n}{\varphi_n} + C \geq 0 . \end{equation*} Pointwise, we have $f=-\Psi + C = \liminf_n f_n$. Therefore, by Fatou's lemma \begin{equation*} \liminf_{n\to\infty} \int_E \left[-\frac{L\varphi_n}{\varphi_n} + C\right]\, \mathrm{d}\mu \geq \int_E\left[-\Psi + C\right]\, \mathrm{d}\mu, \end{equation*} and the required limsup inequality follows from reorganizing. \end{proof} We now prove the important Proposition \ref{prop:non_compact:H1_leq_H2}. The proof is essentially a combination of different arguments from Chapter 11 and Appendix B of \cite{FengKurtz2006} (see especially Lemmas 11.12, 11.37, B.9-B.11 for full details). We present the proof as to make the presentation self-contained and give a succinct derivation of the results for the setting we consider. The main novelty compared to the arguments in \cite{FengKurtz2006} is that we work with measures $\nu \in \mathcal P _c (E) $ rather than imposing the condition $\int _E \Psi \nu > -\infty$, and we must verify that we can indeed modify the latter. \begin{proof}[Proof of Proposition \ref{prop:non_compact:H1_leq_H2}] The strategy is to find two constants, depending on $V$, $c_V^\ast$ and $c_V ^{\ast\ast}$ such that $c_V ^\ast \geq c_V ^{\ast \ast} $ and \begin{align} \label{eq:ineqH} H_1 ^{\Psi} \leq c_V ^{\ast\ast}, \, \, \textrm{and }\, H_2 ^{\psi} \geq c_V ^\ast, \end{align} To achieve this we study the following quantity: for $\nu \in \mathcal P_c (E)$, define \begin{align*} c_V (\nu) = \limsup _{t \to \infty} \frac{1}{t} \log \mathbb{E} \left[ \mathrm{exp}\left\{ \int _0 ^t V(Y(s)) \mathrm{d} s \right\} \right]. \end{align*} It can be shown - see e.g. Lemma B.9 in \cite{FengKurtz2006} - that under \ref{item:thm_LDP_non_compact:mixing}, $c_V (\nu)$ exists for each $\nu \in \mathcal P _c (E)$ and the necessary inequalities for $H_i ^{\Psi}$ can be derived for \begin{align*} c_V^{\ast} = \inf_{\nu \in \mathcal P _c (E)} c_V(\nu) \quad \text{ and } \quad c_V^{\ast\ast} = \sup_{\nu \in \mathcal P _c (E)} c_V(\nu). \end{align*} Cleary $c_V ^\ast \leq c_V ^{\ast \ast}$. However it can be shown, again using~\ref{item:thm_LDP_non_compact:mixing}, that the two quantities are in fact equal, that $c_V (\nu)$ is independent of $\nu$ on $\mathcal P _c (E)$. If we can prove \eqref{eq:ineqH} this would then yield the claim. We start with the upper bound \begin{align*} H_1 ^{\Psi} \leq c_V ^{\ast\ast}. \end{align*} An argument similar to what will follow is also used in \cite{DonskerVaradhan75}, in the proof of their Lemma~2. Because $\Psi$ has compact superlevel-sets $\{ \Psi \geq c \}$, $c\in \mathbb{R}$, and $\Psi (y) \to - \infty$ as $\norm{y} \to \infty$, it can be shown using the arguments of Lemma B.11 of \cite{FengKurtz2006} that \begin{align*} \sup_{\nu \in \mathcal{P}_c(E)} \inf_{f \in \mathcal{D}^{++}(L)} \int_E \left(V + \frac{Lf}{f}\right)d\nu \leq c_V^{\ast\ast}. \end{align*} It therefore suffices to show that \begin{align} \label{eq:ineqH1} H_1 ^{\Psi} \leq \sup_{\nu \in \mathcal{P}_c(E)} \inf_{f \in \mathcal{D}^{++}(L)} \int_E \left(V + \frac{Lf}{f}\right)d\nu. \end{align} For any finite collection of functions $f_1, \dots , f_m$ in $\mathcal D ^{++} (L)$ and scalars $\alpha_i \geq 0$, $i=1,\dots , m$, $\sum \alpha_i =1$, we have \begin{align*} H_1 ^{\Psi} \leq \inf_{0 < \kappa \leq 1} \inf_{\alpha_i} \inf_{f_1,\dots,f_m} \sup_{y \in E} \left[ V(y) + (1-\kappa)\sum_{i=1}^m \alpha_i \frac{Lf_i(y)}{f_i(y)} + \kappa \Psi(y), \right] \end{align*} which follows as in Lemma~11.35 of~\cite{FengKurtz2006}; define for $t>0$ \begin{align*} h_t = \frac{1}{t} \int _0 ^t S(\tau) \prod _{i=1} ^m f_i ^{\alpha _i} d \tau. \end{align*} Then as we let $t\to 0$, \begin{align*} \lim_{t \to 0} h_t = \prod_i f_i^{\alpha_i}, \end{align*} and we have the upper bound \begin{align*} \lim_{t \to 0}Lh_t \leq \left(\prod_i f_i^{\alpha_i}\right) \sum_i \alpha_i \frac{Lf_i}{f_i}, \end{align*} where the convergence is uniform. Now specializing in the definition of~$H_1^\Psi$ to with these type of functions~$h_t$ with $f_1,\dots,f_m$ and according~$\alpha_i$, and taking the limit $t\to 0$ gives the above estimate for~$H_1^\Psi$. By Lemma~11.37 of~\cite{FengKurtz2006}, we can select a sequence of functions $\{ f_i \} $ from $\mathcal D ^{++} (L)$ such that for any $\mu \in \mathcal P (E)$, \begin{equation*} \inf_{i} \int_E \frac{Lf_i}{f_i} d\mu = \inf_{f \in \mathcal{D}^{++}(L)} \int_E \frac{Lf}{f} d\mu. \end{equation*} % Specialising to these functions, for any $m \in \mathbb{N}$ and $\kappa > 0$ we have the upper bound % \begin{equation*} H_1 ^{\Psi} \leq \inf_{\alpha_i} \sup_{y \in E} \left[ V(y) + (1-\kappa)\sum_{i=1}^m \alpha_i \frac{Lf_i(y)}{f_i(y)} + \kappa \Psi(y). \right] \end{equation*} % The functions $V + Lf_i/f_i$ are bounded, but a priori there is no guarantee that the supremum is attained in a given compact set. However, because $\Psi(y) \to -\infty$ as $\norm{y} \to \infty$, for any $m \in \mathbb{N}$ and $\kappa > 0$, there exists a constant $\ell = \ell(m,\kappa) > 0$ such that the supremum is attained in the compact set $K_{\ell} = \{\Psi \geq -\ell\}$. Therefore, if we define $\mathcal{K}_\ell = \{\nu \in \mathcal{P}(E): \nu(K_\ell) = 1\}$, then % \begin{align*} H_1 ^{\Psi} &\leq \inf_{\alpha_i} \sup_{y \in K_{\ell}} \left[ V(y) + (1-\kappa)\sum_{i=1}^m \alpha_i \frac{Lf_i(y)}{f_i(y)} + \kappa \Psi(y) \right] \\ &= \inf_{\alpha_i} \sup_{\nu \in \mathcal{K}_\ell} \left[ \int_E\left(V(y) + (1-\kappa)\sum_{i=1}^m \alpha_i \frac{Lf_i(y)}{f_i(y)} + \kappa \Psi(y) \right) d\nu(y) \right]. \end{align*} % For any $\ell$, we have $\mathcal{K}_\ell \subseteq \mathcal{P}_c(E)$, so that % \begin{equation*} H_1 ^{\Psi} \leq \inf_{\alpha_i} \sup_{\nu \in \mathcal{P}_c(E)} \left[ \int_E\left(V + (1-\kappa)\sum_{i=1}^m \alpha_i \frac{Lf_i}{f_i} + \kappa \Psi \right) d\nu \right]. \end{equation*} % For any $m \in \mathbb{N}$, the set $\{ \alpha_i: \alpha _i \geq 0, \sum _{i=1} ^m \alpha _i =1 \}$ is compact and the infimum and supremum in the last display can be exchanged by Sion's Theorem. This yields % \begin{align*} H_1 ^{\Psi} &\leq \sup_{\nu \in \mathcal{P}_c(E)} \inf_{\alpha_i} \left[ \int_E\left(V + (1-\kappa)\sum_{i=1}^m \alpha_i \frac{Lf_i}{f_i} + \kappa \Psi \right) d\nu \right] \\ &= \sup_{\nu \in \mathcal{P}_c(E)} \left[ \int_E\left(V + (1-\kappa)\min_{i\leq m} \frac{Lf_i}{f_i} + \kappa \Psi \right) d\nu \right], \end{align*} % where we have used that $\inf_{\alpha_i}\sum \alpha_i x_i = \min_i x_i$ for non-negative $x$ and $f_i \in \mathcal D ^{++} (L)$. Taking the infimum over $\kappa$ and the limit $m \to \infty$, % \begin{align*} H_1 ^{\Psi} &\leq \lim_{m \to \infty} \inf_{0 < \kappa \leq 1} \sup_{\nu \in \mathcal{P}_c(E)} \left[ \int_E V d\nu + (1-\kappa) \min_{i \leq m} \int_E \frac{Lf_i}{f_i} d\nu + \kappa \int_E \Psi d\nu \right] \\ & = \lim_{m \to \infty} \sup_{\nu \in \mathcal{P}_c(E)} \left[ \int_E V d\nu + \min\left\{\min_{i \leq m} \int_E \frac{Lf_i}{f_i} d\nu, \int_E \Psi d\nu \right\} \right]. \end{align*} % The limit and supremum can be shown to commute similarly to the last part of the proof of Lemma 11.12 in \cite{FengKurtz2006}, leading to \begin{align*} H_1 ^{\Psi} &\leq \sup_{\nu \in \mathcal{P}_c(E)} \left[ \int_E V d\nu + \min\left\{\inf_{f \in \mathcal{D}^{++}(L)} \int_E \frac{Lf}{f} d\nu, \int_E \Psi d\nu\right\} \right] \\ &\leq \sup_{\nu \in \mathcal{P}_c(E)} \left[ \int_E V d\nu + \inf_{f \in \mathcal{D}^{++}(L)} \int_E \frac{Lf}{f} d\nu \right] . \end{align*} This completes the proof of the upper bound for $H^ {\Psi} _1$. Next, we move to the lower bound for $H_2 ^{\Psi}$. Take $\lambda < c_V^\ast$. We prove that for any $\varepsilon > 0$, we have $H_2 ^{\Psi} \geq \lambda - \varepsilon$. To this end, we define the new semigroup $ \{ T(t) \} $ by \begin{align*} (T(t)f)(y) = \mathbb{E} \left[ f(Y_t) e^{\int_0 ^t V(Y_s)ds} | Y(0)=y \right], \end{align*} set \begin{align*} R_{\lambda} ^t f = \int _0 ^t e^{-\lambda s} T(s) g ds, \end{align*} and take $\Gamma$ to be the collection of functions $f_{\gamma}$ of the form \begin{align*} f_{\gamma} = \int _0 ^\infty R_{\lambda} ^t 1 \gamma (dt), \ \ \gamma \in \mathcal P ([0,\infty)). \end{align*} Then $\Gamma \subseteq \mathcal{D}^{++}(L)$ and for any $f \in \Gamma$ we have the uniform lower bound % \begin{equation} \label{eq:uniformLower} V(y) + (1+\kappa) \frac{Lf (y)}{f(y)}\geq -(1-2\kappa)\|V\|, \ \ y \in E. \end{equation} % Because $\Gamma \subseteq \mathcal D ^{++} (L)$, for any $\kappa >0$ we have the lower bound % \begin{equation*} H_2 ^{\Psi} \geq \sup_{f \in \Gamma} \inf_{y\in E} \left[ V(y) + (1+\kappa)\frac{Lf(y)}{f(y)} - \kappa \Psi (y) \right]. \end{equation*} % Due to the uniform lower bound \eqref{eq:uniformLower} and the fact that $\Psi(y) \to -\infty$ as $\norm{y} \to \infty$, for any $\kappa$ there exists an $\ell = \ell(\kappa)$ such that the infimum over $E$ is attained in the compact set $K_\ell = \{ \Psi \geq -\ell\}$. Therefore, % \begin{align*} H_2 ^{\Psi} &\geq \sup_{f \in \Gamma} \inf_{y\in K_\ell} \left[ V(y) + (1+\kappa)\frac{Lf(y)}{f(y)} - \kappa \Psi(y) \right] \\ &= \sup_{f \in \Gamma} \inf_{\nu \in \mathcal{K}_\ell} \left[ \int_E \left( V + (1+\kappa)\frac{Lf}{f} - \kappa \Psi\right)\,d\nu \right] \\ &= \sup_{f \in \Gamma} \inf_{\nu \in \mathcal{K}_\ell} \frac{1}{\int_E f d\nu} \left[ -\kappa \int_E (V + \Psi) f d\nu + \int_E (1+\kappa) (V+L)f d\nu \right], \end{align*} % where $\mathcal{K}_\ell = \{\nu \in \mathcal{P}(E): \nu(K_\ell) = 1\}$. The second equality follows from the fact that $\inf_\nu \int_E (a/b) d\nu = \inf_\nu (\int_E a d\nu)/ (\int_E b d\nu)$ for $b > 0$. By compactness of $\mathcal{K}_\ell$ and the fact that both $\mathcal{K}_\ell$ and $\Gamma$ are convex, the infimum and supremum are exchangable by Sion's Theorem. This gives the lower bound % \begin{align*} H_2 ^{\Psi} &\geq \inf_{\nu \in \mathcal{K}_\ell} \sup_{f \in \Gamma} \frac{1}{\int_E f d\nu} \left[ -\kappa \int_E (V + \Psi) f d\nu + \int_E (1+\kappa) (V+L)f d\nu \right] \\ &\geq \inf_{\nu \in \mathcal{P}_c(E)} \sup_{f \in \Gamma} \frac{1}{\int_E f d\nu} \left[ -\kappa \int_E (V + \Psi) f d\nu + \int_E (1+\kappa) (V+L)f d\nu \right], \end{align*} The second estimate follows since $\mathcal{K}_\ell \subseteq \mathcal{P}_c(E)$ for any $\ell$. The rest of the proof follows arguments similar to those used in~\cite{FengKurtz2006}: taking the limit $\kappa \to 0$, and moving it inside the infimum and supremum, we obtain the lower bound % \begin{align*} H_2 ^{\Psi} & \geq \inf_{\nu \in \mathcal{P}_c(E)} \sup_{f \in \Gamma} \left[ \frac{1}{\int_E f d\nu}\int_E (V+L)f d\nu \right]. \end{align*} % Therefore, for any $\varepsilon$, there exists a $\nu_\varepsilon \in \mathcal{P}_c(E)$ such that % \begin{align*} H_2 ^{\Psi} \geq \sup_{f \in \Gamma} \left[ \frac{1}{\int_E f d\nu_\varepsilon}\int_E (V+L)f d\nu_\varepsilon \right] - \varepsilon. \end{align*} % There exist functions $f_t \in \Gamma$ satisfying % \begin{align*} \frac{\int_E (V+L) f_t d\nu}{\int_E f_t d\nu} = \lambda + \frac{ \int_E e^{-\lambda t} T(t) 1 d\nu - 1}{\int_E f_t d\nu}, \end{align*} % for any $\nu \in \mathcal{P}_c(E)$. Specialising to such $f_t$, we obtain % \begin{align*} H_2 ^{\Psi} \geq \lambda + \frac{\int_E e^{-\lambda t} T(t)1 d\nu_\varepsilon - 1}{\int_E f_t d\nu_\varepsilon} - \varepsilon. \end{align*} % Since $\limsup_{t \to \infty} \int_E e^{-\lambda t} T(t) 1 d\nu_\varepsilon = \infty$, the second term is positive for $t$ large enough, giving the bound % \begin{equation*} H_2 ^{\Psi} \geq \lambda - \varepsilon. \end{equation*} % This completes the proof of the lower bound for $H_2 ^{\Psi}$, and thereby the lemma. \end{proof} \subsection{Proofs for the empirical measure of the zig-zag process} In this section, we prove the large deviations theorems for the empirical measures of the zig-zag process. \subsubsection{Proof of Theorem~\ref{thm:LDP-zigzag:compact}---compact case} \label{section:zig-zag:LDP:compact} For the proof of Theorem~\ref{thm:LDP-zigzag:compact}, recall that the zig-zag generator takes the form \begin{equation*} Lf(x,v)=v\partial_x f(x,v) + \lambda(x,v)\left[f(x,-v)-f(x,v)\right], \quad (x,v)\in E:= \mathbb{T}\times\{\pm 1\}. \end{equation*} It is enough to show that assumptions \ref{item:thm_LDP_compact:Feller}-\ref{item:thm_LDP_compact:principal_eigenvalue} hold for the zig-zag process on $E$, the result then follows form Theorem \ref{thm:proving_LDP:LDP_compact}. We first verify that $L$ is a closed operator that generates the zig-zag process. Note that $L$ is a restriction of the extended generator (see Section~\ref{sec:zig-zag}). We verify that $L$ is a closed operator. Let $\{ f_n \}$ be a sequence in $\mathcal{D}(L)$ such that $f_n \to f$ and $Lf_n \to g$, some $f,g$, both uniformly on~$E$. Then \begin{equation*} \lim_{n \to \infty} v \partial_x f_n(x,v) = g(x,v) - \lambda(x,v) \left[ f(x,-v) - f(x,v) \right]. \end{equation*} We can represent $f_n (x,v)$ as \begin{equation*} f_n(x,v) = f_n(0,v) + v \int_0^x v \partial_x f_n(\xi,v) \, d\xi, \end{equation*} and from the dominated convergence theorem we obtain that \begin{equation*} f(x,v) = f(0,v) + v \int_0^x \left[ g(\xi,v) - \lambda(\xi,v) \left( f(\xi,-v) - f(\xi,v) \right) \right] \, d\xi. \end{equation*} In particular, $f \in \mathcal{D}(L)$, and $Lf = g$ follows from taking derivative $\partial_x$ and multiplying by $v$. The Feller-continuity property \ref{item:thm_LDP_compact:Feller} of the zig-zag semigroup $S$ is proven in Proposition~4 of~\cite{BierkensRoberts2017}. Since $\mathbb{T}$ is compact, this also follows from the boundedness of the continuous rates $\lambda$, see \cite[Theorem 27.6]{Davis1993}. It remains to verify assumption \ref{item:thm_LDP_compact:principal_eigenvalue}, the principal-eigenvalue problem. Take $V \in C(E)$. We will show that for any constant $\gamma > \sup_E V$, as a map from $C(E)$ to $\mathcal{D}(L) \subseteq C(E)$, the resolvent % \begin{align} \label{eq:resolvent} R_\gamma = \left( \gamma - (V+L) \right)^{-1}, \end{align} % is compact and strongly positive; here strongly positive means that if $f \geq 0$ and $f \neq 0$, then $R_\gamma f > 0$ on $E$. Given strong positivity and compactness, by the Krein-Rutman theorem there exists a strictly positive function $g \in C(E)$ and a real eigenvalue $\beta >0 $ such that % \begin{equation*} \left( \gamma - (V+L) \right)^{-1} g = \beta g. \end{equation*} % The resolvent maps into the domain of $L$, so that $g \in \mathcal{D}(L)$. An application of $\gamma - (V+L)$ in the eigenvalue equation gives % \begin{equation*} (V+L) g = \left(\gamma - \frac{1}{\beta}\right) g. \end{equation*} This is precisely \ref{item:thm_LDP_compact:principal_eigenvalue} with function $g$ and eigenvalue $(\gamma - 1/\beta)$. We are left with verifying that the resolvents defined by \eqref{eq:resolvent} are strongly positive and compact. For strong positivity, because $V$ is continuous on $E$, it is sufficient to prove strong positivity of $(\gamma - L)^{-1}$; see \cite[Proposition C-III-3.3]{arendt1986one}. The resolvent $(\gamma - L)^{-1}$ exists for any $\gamma > 0$, and is given by % \begin{equation} \label{eq:resolvent2} (\gamma - L)^{-1} f = \int_0^\infty e^{-\gamma t} S(t)f \, dt. \end{equation} % The semigroup associated to the zig-zag process is irreducible in the following sense: for any $f \in C(E)$ such that $f \geq 0$ and $ f \neq 0$, \begin{align*} \cup_{t \geq 0}\left\{ z \in E \,:\, S(t) f(z) > 0 \right\} = E. \end{align*} Combined with \eqref{eq:resolvent2} this implies strong positivity of $(\gamma - L) ^{-1}$; see \cite[Definition C-III-3.1]{arendt1986one}. \smallskip For compactness of $R_\gamma$, let $A \subseteq C(E)$ be bounded. We show that the image $B := R_\gamma(A) \subseteq C(E)$ is bounded and equi-continuous. Compactness of the resolvent then follows from an application of the Arzelà-Ascoli theorem. To show boundedness, by dissipativity of $L$ we obtain, for any $g \in B$, % \begin{align*} (\gamma -\|V\|_E) \|g \| &\leq \|(\gamma - (V+L))g\| \\ & \leq \sup_{f \in A} \|f\| \\ &< \infty. \end{align*} % Hence $B$ is bounded by $C_A / (\gamma - \|V\|_E)$, where $ C_A := \sup _{f \in A} \|f\|$, and we end the proof by showing that $B$ is equi-continuous. For any $g \in B$ we have $(\gamma - (V + L))g = f$ for some $f \in A$, which implies % \begin{equation*} v \partial_x g(x,v) = f(x,v) + V(x,v) g(x,v) + \gamma g(x,v) - \lambda(x,v) (g(x,-v) - g(x,v). \end{equation*} % By boundedness of the functions $\lambda(x,v)$ and $V$ on $E$ and the sets $A$ and $B$, % \begin{equation*} \sup_{g \in B} \|\partial_x g\| \leq C \sup_{g \in B}\|g\| + \sup_{f \in A}\|f\| < \infty. \end{equation*} % Hence functions in $B$ have uniformly bounded derivatives, and as a consequence, $B$ is equi-continuous. It follows that $R_{\gamma}$ in \eqref{eq:resolvent} is compact and strongly continuous. This finishes the verification of \ref{item:thm_LDP_compact:principal_eigenvalue} and we have shown that assumptions \ref{item:thm_LDP_compact:Feller}-\ref{item:thm_LDP_compact:principal_eigenvalue} hold for the zig-zag process on the compact state space $\mathbb{T} \times \{ \pm 1\}$. An application of Theorem \ref{thm:proving_LDP:LDP_compact} then proves the claimed large deviations principle. \subsubsection{Proof of Theorem~\ref{thm:LDP-zigzag:non-compact-1d}---non-compact case} \label{section:zig-zag:LDP:non_compact} For notational simplicity we take $E = \mathbb{R} \times \{ \pm 1\}$. Similar to the proof of Theorem \ref{thm:LDP-zigzag:compact}, the strategy is to verify the conditions of the more general large deviations result Theorem \ref{thm:proving_LDP:LDP_non_compact}, which covers the non-compact setting. That is, it suffices to verify \ref{item:thm_LDP_compact:Feller}, \ref{item:thm_LDP_compact:tight}, \ref{item:thm_LDP_non_compact:Lyapunov} and \ref{item:thm_LDP_non_compact:mixing}. \smallskip Condition \ref{item:thm_LDP_compact:Feller}, Feller-continuity of the Markov semigroup, is proven in Proposition 4 of~\cite{BierkensRoberts2017}. Next, we use Theorem 7.2 of \cite{EthierKurtz1986} to verify \ref{item:thm_LDP_compact:tight}. Define the metric $d$ on $E$ as \begin{align*} d((x,v),(y,v')) = |x-y|_\mathbb{R} + |v-v'|, \end{align*} and for any path $\gamma \in D_E[0,\infty)$ set % \begin{equation*} w'(\gamma,\delta,T) = \inf_{\{t_i\}} \max_i \sup_{s,t \in [t_i,t_{i+1})} d(\gamma(s),\gamma(t)), \end{equation*} % where the infimum is taken over finite partitions $\{ t_i \}$ of $[0,T]$ such that $\min_i |t_{i+1}-t_i| > \delta$. Theorem 7.2 of \cite{EthierKurtz1986} states that tightness of $\{ \mathbb{P} _y : \ y \in K \}$ is equivalent to the following two conditions: \begin{enumerate}[label =(\arabic*)] \item \label{item:proof-LDP-zigzag:tightness1} For any $\varepsilon > 0$ and rational $t > 0$, there exists a compact set $K_{\varepsilon,t} \subseteq E$ such that % \begin{equation*} \inf_{y \in K} \mathbb{P}_y\left[Y_t \in K_{\varepsilon,t} \right] \geq 1 - \varepsilon. \end{equation*} % \item \label{item:proof-LDP-zigzag:tightness2} For any $\varepsilon > 0$ and $T > 0$, there exists a $\delta > 0$ such that % \begin{equation*} \sup_{y \in K} \mathbb{P}_y\left[w'\left(Y,\delta,T\right) \geq \varepsilon\right] \leq \varepsilon. \end{equation*} \end{enumerate} The spatial component $X_t$ of the zig-zag process propagates with finite speed. This implies that there exists a compact set $K_t \subseteq \mathbb{R}$ such that if $y \in K$, then \begin{equation*} \mathbb{P}_y \left[X_t \in K_t \right] = 1. \end{equation*} For any $\varepsilon > 0$ and $t>0$, taking $K_{\varepsilon,t} = K_t \times \{\pm 1\}$ gives~\ref{item:proof-LDP-zigzag:tightness1}. \smallskip For part \ref{item:proof-LDP-zigzag:tightness2}, let $\varepsilon > 0$ and $T > 0$. For any realization $Y(\omega)$ of the zig-zag process on the time interval $[0,T]$, if the sojourn times $\tau_i$ satisfy $\min_i \tau_i > 2\delta$, then $w'(Y(\omega),\delta,T) \leq 2\delta$. In particular, for $\delta$ small enough, $w'(Y(\omega),\delta,T) < \varepsilon$. The probability of having at least one sojourn time that is less than $2\delta$ can be estimated uniformly over starting points $y\in K$. Let $K(T)$ denote the set of points that the zig-zag can reach in the time interval $[0,T]$ when starting in the set $K$ and set $\lambda_K = \sup_{y \in K(T)}\lambda(y)$, a uniform upper bound on the jump rates $\lambda(x,v)$. An estimate for the probability of at least one sojourn time that is less than $2\delta$ is then given by \begin{equation*} \sup_{y\in K} \mathbb{P}_y\left[\min_i \tau_i \leq 2\delta\right] \leq 1 - e^{-\lambda_K 2\delta}. \end{equation*} For any $y\in K$ we obtain the bound \begin{align*} \mathbb{P}_y\left[w'(Y,\delta,T) \geq \varepsilon\right] &= \mathbb{P}_y\left[\{w'(Y,\delta,T)\geq \varepsilon\} \cap \{\min_i \tau_i > 2\delta\}\right] \\ & \quad + \mathbb{P}_y\left[\{w'(Y,\delta,T)\geq \varepsilon\} \cap \{\min_i \tau_i \leq 2\delta\}\right]\\ &\leq 0 + \mathbb{P}_y\left[\{\min_i \tau_i \leq 2\delta\}\right] \\ &\leq 1 - e^{-\lambda_K 2\delta}. \end{align*} It follows that, as $\delta \to 0$, \begin{equation*} \sup_{y \in K} \mathbb{P}_y\left[\{\min_i \tau_i \leq 2\delta\}\right] \leq 1 - e^{-\lambda_K 2\delta} \to 0, \end{equation*} and \ref{item:proof-LDP-zigzag:tightness2} follows from taking $\delta$ small enough that $1 - e^{-\lambda_K 2\delta} < \epsilon$. We now move to verifying Condition \ref{item:thm_LDP_non_compact:Lyapunov}, by explicitly defining two Lyapunov functions $g_1,g_2 : E \to \mathbb{R}$ satisfying the condition. For brevity, we carry out the calculations for the case of $\gamma (x) \equiv 0$ in the switching rate $\lambda$ (see \eqref{eq:switching-intensity-condition-2}). Then we can use the following functions: for $\alpha_1,\alpha_2 \in (0,1)$ and $\beta > 0$, let \begin{align*} g_1(x,v) &= \alpha_1 V(x) + \beta v U'(x),\\ g_2(x,v) &= \alpha_2 U(x) + \beta v U'(x). \end{align*} For non-constant $\gamma$ that is uniformly bounded by some $\bar \gamma$, the following functions can instead be used: \begin{align*} g_1(x,v) &= \alpha_1 V(x) + \phi(v U'(x)),\\ g_2(x,v) &= \alpha_2 U(x) + \phi(v U'(x)), \end{align*} where $\phi(s) = \beta \frac{1}{2} \text{sign}(s) \log(\bar{\gamma} + |s|)$ and $\beta \in (0,1)$. For example, for the choice $\beta = 1/2$ calculations analogous to the ones below hold. We now return to the case $\gamma \equiv 0$ and take $g_1, g_2$ accordingly. Without loss of generality we can assume $g_1, g_2 \geq 0$: we can take $\beta$ small enough and if necessary add a constant to ensure that this holds. We show that for suitable $\alpha_i$ small enough, the functions $g_1,g_2$ satisfy \ref{item:thm_LDP_non_compact:Lyapunov}. For two real-valued functions $f$ and $g$, we write~$f \sim g$ as $x \to \infty$ to say that they asymptotically equivalent in the limit $x \to \infty$, that means~$(f(x)/g(x)))\to 1$ as~$x\to\infty$. \smallskip By \ref{item:thm-LDP-zig-zag:Upsi}, $V(x) \to \infty$, and by \ref{item:thm-LDP-zig-zag:Upsii}, $U'(x)/V(x) \to 0$. It follows that $g_1$ grows to infinity as $|x| \to \infty$. Moreover, $g_2$ grows to infinity by the assumption \ref{item:thm-LDP-zig-zag:Ui} on $U$; since $g_1$ and $g_2$ are continuous, this settles part (a) of \ref{item:thm_LDP_non_compact:Lyapunov}. Part (b) of \ref{item:thm_LDP_non_compact:Lyapunov} requires that that $g_2$ grows faster than $g_1$ at infinity. This follows from Assumption \ref{item:thm-LDP-zig-zag:Upsii} on the potentials $U$ and $V$: both dominate the derivative $U'$, and $U$ grows faster than $V$. \smallskip To show that \ref{item:thm_LDP_non_compact:Lyapunov} holds for the zig-zag process, we show that both $g_1$ and $g_2$ satisfy \begin{equation*} e^{-g_i(x,v)} (B e^{g_i})(x,v) \to -\infty \quad |x|\to\infty. \end{equation*} Then since $e^{-g_i(x,v)} (B e^{g_i})(x,v)$ is continuous, the compactness of superlevel-sets follows. \smallskip By the definition of $g_1, g_2$ and the extended generator $B$, \begin{align*} e^{-g_1(x,v)} (B e^{g_1})(x,v) &= \alpha_1 v V'(x) + \beta U''(x) + \max(vU'(x),0) \left[e^{-2v\beta U'(x)} - 1\right], \end{align*} and \begin{align*} e^{-g_2(x,v)} (B e^{g_2})(x,v) &= \alpha_2 v U'(x) + \beta U''(x) + \max(vU'(x),0) \left[e^{-2v\beta U'(x)} - 1\right]. \end{align*} We first verify the condition for $g_2$. For $v = +1$, we have \begin{equation*} e^{-g_2(x,+1)} (B e^{g_2})(x,+1) = \alpha_2 U'(x) + \beta U''(x) + \max(U'(x),0) \left[e^{-2 \beta U'(x)} - 1\right]. \end{equation*} For $x \to + \infty$, we have $U'(x) \to + \infty$ by~\ref{item:thm-LDP-zig-zag:Ui}, so that \begin{align*} e^{-g_2(x,+1)} (B e^{g_2})(x,+1) &= U'(x) \left[\alpha_2 -1 + \beta \frac{U''(x)}{U'(x)} + e^{-2\beta U'(x)}\right] \\ &\sim U'(x) (\alpha_2 - 1) \to -\infty,\quad x \to + \infty, \end{align*} since $U''/U' \to 0$ by~\ref{item:thm-LDP-zig-zag:Uiii} and $\alpha_2 < 1$. \smallskip For $x \to -\infty$, we have $U'(x) \to -\infty$ by~\ref{item:thm-LDP-zig-zag:Ui}, in particular $U'(x) < 0$ for large $x$. Hence, \begin{align*} e^{-g_2(x,+1)} (B e^{g_2})(x,+1) &= U'(x) \left[\alpha_2 + \beta \frac{U''(x)}{U'(x)}\right] \\ &\sim U'(x) \alpha_2 \to -\infty,\quad x \to - \infty. \end{align*} For $v = -1$, the argument is analogous and we omit the details; this concludes the treatment of $g_2$. \smallskip We now consider $g_1$. For $v = +1$, \begin{align*} e^{-g_1(x,+1)} (B e^{g_1})(x,+1) &= \alpha_1 V'(x) + \beta U''(x) + \max(U'(x),0) \left[ e^{-2v\beta U'(x)} - 1\right]. \end{align*} In the limit $x \to + \infty$, $U'(x) \to +\infty$ and $V'(x)/U'(x) \to 0$ by~\ref{item:thm-LDP-zig-zag:Upsii}. It follows that \begin{align*} e^{-g_1(x,+1)} (B e^{g_1})(x,+1) &= \alpha_1 V'(x) + \beta U''(x) + U'(x) \left[ e^{-2v\beta U'(x)} - 1\right]\\ &= U'(x) \left[\alpha_1 \frac{V'(x)}{U'(x)} + \beta \frac{U''(x)}{U'(x)} + e^{-2\beta U'(x)} - 1\right] \\ &\sim - U'(x) \to - \infty, \quad x \to + \infty. \end{align*} For $x \to -\infty$, similar to the computations for $g_2$, \begin{align*} e^{-g_1(x,+1)} (B e^{g_1})(x,+1) &= \alpha_1 V'(x) + \beta U''(x)\\ &= V'(x) \left[\alpha_1 + \beta \frac{U''(x)}{V'(x)}\right] \to - \infty, \quad x \to + \infty, \end{align*} since $U''/V' \to 0$ by~\ref{item:thm-LDP-zig-zag:Upsiii} and $V' \to - \infty$ by~\ref{item:thm-LDP-zig-zag:Upsi}. The case $v = -1$ can be handled using similar arguments. The preceding computations conclude the verification of Condition~\ref{item:thm_LDP_non_compact:Lyapunov}. We are left with verifying the mixing property \ref{item:thm_LDP_non_compact:mixing}. Let $\nu_1,\nu_2 \in \mathcal{P}_c(E)$. Then there exists a compact set $K\subseteq E$ with $\nu_1(K) = \nu_2(K) = 1$. To show that \ref{item:thm_LDP_non_compact:mixing} holds, we must find $T,M > 0$ and $\rho_1,\rho_2 \in \mathcal{P}([0,T])$ such that for all $A \in \mathcal{B}(E)$, \begin{equation*} \int_0^T\int_E P(t,y,A) \,d\nu_1(y)d\rho_1(t) \leq M \int_0^T\int_E P(t,y,A) \,d\nu_2(y)d\rho_2(t). \end{equation*} By Fubini's theorem, it is sufficient to prove that for any points $y_1 \in \text{supp}(\nu_1)$ and $y_2 \in \text{supp}(\nu_2)$, \begin{equation}\label{eq:proof-LDP-zigzag:sufficient-Fubini} \int_0^T P(t,y_1,A)\,d\rho_1(t) \leq M \int_0^T P(t,y_2,A)\,d\rho_2(t), \end{equation} with $\rho_1,\rho_2,T,M$ independent of $y_1,y_2$. To that end, let $K\subseteq E$ be a compact set containing the support of both $\nu_1$ and $\nu_2$. Without loss of generality, we can take $K$ of the form $K_\mathbb{R} \times \{\pm 1\}$, where $K_\mathbb{R}$ is a closed interval. For $t_1 > 0$, let $K(t_1)$ be the set of points that the zig-zag process with speed one can reach in the time interval $[0,t_1]$ when starting in $K$: \begin{equation*} K(t_1) = \left\{y \in E\,:\, \text{dist}_E(y,K) \leq t_1\right\}. \end{equation*} We prove the inequality \eqref{eq:proof-LDP-zigzag:sufficient-Fubini} for arbitrary points $y_1,y_2 \in K$, using the following two steps; in what follows we set $\mu = \mathrm{Leb} \otimes \mathrm{Unif}_{\pm 1}$. \begin{enumerate}[label=(\roman*)] \item \label{item:proof-zigzag:step_one} For any $t_1 > 0$ and with $\rho_1$ the uniform distribution over $[0,t_1]$, there is a positive constant $C_{K,t_1}$ depending only on $K$ and $t_1$ such that for any $T > t_1$, we have \begin{equation*} \int_0^T P(t,y_1,A)\,d\rho_1(t) \leq C_{K,t_1} \cdot \mu\left(A \cap K(t_1)\right), \quad \text{ for all } A \in \mathcal{B}(E), \end{equation*} with $\mu$ as the reference measure on $\mathcal{B}(E)$. \item \label{item:proof-zigzag:step_two} There exist positive constants $T > 0$ and $C'_{K,T}$ such that with $\rho_2$ the uniform distribution over $[0,T]$, we have \begin{equation*} \int_0^T P(t,y_2,A)\,d\rho_2(t) \geq C'_{K,T}\cdot \mu\left(A \cap K(t_1)\right), \quad \text{ for all } A \in \mathcal{B}(E). \end{equation*} \end{enumerate} Suppose \ref{item:proof-zigzag:step_one} and \ref{item:proof-zigzag:step_two} hold. Then the estimate \eqref{eq:proof-LDP-zigzag:sufficient-Fubini} also holds, with $M = C_{K,t_1}/C'_{K,T}$, some $t_1 < T$. \smallskip To verify \ref{item:proof-zigzag:step_one}, note that the measure \begin{equation*} \mu_{y_1}(A) = \int_0^T P(t,y_1,A)\,d\rho_1(t) \end{equation*} is absolutely continuous with respect to $\mu= \mathrm{Leb} \otimes \mathrm{Unif}_{\pm 1}$ and its density is uniformly bounded in $K$. Now~\ref{item:proof-zigzag:step_one} follows since $P(t,K,A) = 0$ whenever $A \cap K(t_1) = \emptyset$ and $t \leq t_1$. \smallskip Next, we use Lemma 8 of \cite{bierkens2019ergodicity} to show \ref{item:proof-zigzag:step_two}. To that end, recall that a tuple $(y,y')$ in $E \times E$ is called reachable if there exists an admissible path from $y$ to $y'$. By Theorem 4 of \cite{bierkens2019ergodicity}, any two points are reachable as long as the potential $U$ has at least one non-degenerate local minimum (which is trivially satisfied on $\mathbb R$ under our assumptions) and satisfies $U\in C^3(\mathbb{R})$. \smallskip By Lemma 8 in \cite{bierkens2019ergodicity}, for any two points $y_a = (x_a,v_a)$ and $y_b = (x_b,v_b)$ in $E$, there are open neighborhoods $U_{y_a}$ of $x_a$ and $U_{y_b}$ of $x_b$, a time interval $(t_0,t_0 + \varepsilon]$ and a constant $c > 0$ such that for all $x_a'\in U_{y_a}$ and $t \in (t_0,t_0 + \varepsilon]$, \begin{equation*} P\left(t,(x_a',v_a),A_\mathbb{R} \times \{v_b\}\right) \geq c \, \mathrm{Leb}(A \cap U_{z_b}),\quad \text{ for all }A_\mathbb{R} \in \mathcal{B}(\mathbb{R}). \end{equation*} The spatial part of $K \times K(t_1)$ can be covered by open squares associated to all pairs of start and final points $y_a$ and $y_b$, with $y_a \in K$ and $ y_b \in K(t_1)$, as \begin{equation*} K_\mathbb{R} \times K(t_1)_\mathbb{R} \subseteq \bigcup_{(y_a,y_b)} U_{y_a} \times U_{y_b}, \end{equation*} where each $U_{y}$ is an open interval in $\mathbb{R}$. By compactness, there exists a finite subcover by open squares $U_{y_a^i} \times U_{y_b^i}$ corresponding to pairs $(y_a^i,y_b^i)$, \begin{equation*} K_\mathbb{R} \times K(t_1)_\mathbb{R} \subseteq \bigcup_{i = 1}^N U_{y_a^i} \times U_{y_b^i}. \end{equation*} Thereby, the set $K \times K(t_1) \subseteq E \times E$ is covered as \begin{equation*} K \times K(t_1) \subseteq \bigcup_{i = 1}^N \left[ \left(U_{y_a^i}\times \{\pm 1\}\right) \times \left(U_{y_b^i}\times \{\pm 1\}\right)\right]. \end{equation*} Hence for each $z = (x,v) \in K$, there are finitely many open sets $U_{y_b^i}$ covering $K(t_1)_\mathbb{R}$, with corresponding constants $c_i,t_i,\varepsilon_i$ such that for all $t \in (t_i,t_i+\varepsilon_i]$, \begin{equation}\label{eq:proof-LDP-zigzag:bound-P-below} P(t,y,A_\mathbb{R} \times \{v_b^i\}) \geq c_i \mathrm{Leb}(A_\mathbb{R} \cap U_{z_b^i}), \quad \text{ for all } A_\mathbb{R} \in \mathcal{B}(\mathbb{R}). \end{equation} For any $A = A_\mathbb{R} \times A_\pm \in \mathcal{B}(E)$, write \begin{align*} A^+ &:= A \cap (\mathbb{R} \times \{+1\}),\\ A^- &:= A \cap (\mathbb{R} \times \{-1\}). \end{align*} Then with $T > 0$ large enough for all intervals $(t_i,t_i+\varepsilon_i]$ to be contained in $[0,T]$, taking $\rho_2 = \mathrm{Unif}([0,T])$, for any $z \in K$ it holds that \begin{align*} \int_0^T P(t,y,A)\,d\rho_2(t) &\geq \int_0^T P(t,y,A) \sum_i \mathbf{1}_{(t_i,t_i+\varepsilon_i]}(t)\,d\rho_2(t) \\ &= \frac{1}{T}\sum_i \int_{t_i}^{t_i+\varepsilon_i} \left[P(t,y,A^+) + P(t,y,A^-)\right]\, dt. \end{align*} In each time interval $(t_i,t_i+\varepsilon_i]$, at least one transition probability is bounded from below as in~\eqref{eq:proof-LDP-zigzag:bound-P-below}, while the other one can be bounded from below by zero. Thereby, \begin{align*} \int_0^T P(t,y,A)\,d\rho_2(t) &\geq \frac{1}{T} \sum_i \varepsilon_i \cdot c_i\cdot \mathrm{Leb}(A_\mathbb{R} \cap U_{y_b^i}) \\ &\geq \frac{1}{T} \min_i(\varepsilon_i c_i) \sum_i \mu\left[A \cap (U_{y_b^i}\times\{\pm 1\})\right] \\ &\geq \frac{1}{T} \min_i(\varepsilon_ic_i) \cdot \mu \left[A \cap \bigcup_i \left(U_{y_b^i}\times\{\pm 1\}\right) \right] \\ &\geq \frac{1}{T} \min_i(\varepsilon_ic_i) \cdot \mu\left[A \cap K(t_1)\right], \end{align*} where the last inequality follows from $K(t_1)$ being covered by the $U_{y_b^i}\times\{\pm 1\}$. Hence \ref{item:proof-zigzag:step_two} follows with $C_{K,T}' = \min_i(\varepsilon_i c_i)/T$. \smallskip This finishes the verification of Condition \ref{item:thm_LDP_non_compact:mixing}, and thereby the proof of Theorem \ref{thm:LDP-zigzag:non-compact-1d}. \subsection{Derivation of the explicit form of the rate function} \label{sec:proofs-rate-function} Here we prove the results described in Section~\ref{sec:rate}. Recall that the state space is now taken as $E = \mathbb{T} \times \{ \pm 1\}$. Suppose $\mu$ is absolutely continuous with respect to $\nu_0$ and write $\frac{d \mu}{d \nu_0}(x,v) = \rho(x,v)$ for the Radon-Nikodym density of $\mu$ with respect to $\nu_0$, where $\rho$ is assumed to be absolutely continuous. Define a mapping $H : \mathcal D^+(L) \rightarrow \mathbb R$ by \begin{equation} \label{eq:H-functional} H (u) := \int_E \frac{ L u}{u} \ d \mu = \sum_{v\in \{-1,+1\}} \int_{\mathbb{T}} \frac{Lu}{u} (x,v) \rho(x,v) \ d x . \end{equation} We compute \begin{multline}\label{eq:first-steps} H(u) = \int_{\mathbb{T}} \left\{\frac{d \log u^+}{d x} + \lambda^+ \left( \frac{u^-}{u^+} - 1 \right) \right\} \rho^+ \ d x \\+ \int_{\mathbb{T}} \left\{ - \frac{d \log u^-}{d x} + \lambda^- \left( \frac{u^+}{u^-} - 1 \right) \right\} \rho^- \ d x \\= \int_{\mathbb{T}} \left\{ -\log u^+ \frac{d \rho^+}{dx} + \lambda^+ \rho^+ \left( \frac{u^-}{u^+} - 1 \right) \right\} \ d x \\+ \int_{\mathbb{T}} \left \{ \log u^- \frac{d \rho^-}{d x} + \lambda^- \rho^-\left( \frac{ u^+}{u^-} - 1 \right) \right\} \ d x. \end{multline} \begin{lemma} \label{lem:to-infinity} Suppose $\rho \in C(E)$ is absolutely continuous and satisfies \[ \nu_0 \left\{\dfrac{d\rho^+}{d x} \neq \dfrac{d \rho^-}{dx} \right\} > 0.\] Then $\inf_{u \in \mathcal D^+(L)} H(u)=-\infty$. \end{lemma} \begin{proof} Let $u^+_t(x) = u^-_t(x) = \exp \left( - t \left\{ \dfrac{d \rho^+}{d x} - \dfrac{d \rho^-}{d x} \right\}\right)$. From~\eqref{eq:first-steps} it follows that \[ H(u_t) = - t \int_{\mathbb{T}} \left( \dfrac{d \rho^+}{d x} - \dfrac{d \rho^-}{dx} \right)^2 \ d x.\] Now let $t \rightarrow \infty$. \end{proof} \begin{lemma} \label{lem:reparametrization} Suppose $\rho \in C(E)$ is absolutely continuous and $\frac{d \rho^+}{dx} = \frac{d \rho^-}{dx}$ for all $x \in \mathbb{T}$. Then $\mathcal I$ admits the representation \begin{equation} \label{eq:I-in-eta} \mathcal I(\mu) = - \inf_{\eta \in C(\mathbb{T})} \int_{\mathbb{T}} \left\{ - \rho' \eta + \lambda^+ \rho^+ (\exp(-\eta) - 1) + \lambda^- \rho^- (\exp(\eta) - 1) \right\} \ d x.\end{equation} \end{lemma} \begin{proof} Write $\rho' : =\frac {d \rho^+}{dx}$, and note that by our assumption $\rho' = \frac{d \rho^-}{dx}$. By~\eqref{eq:first-steps} we may write \[ H(u) = \int_{\mathbb{T}} \left\{ - \log \left( u^+/u^- \right) \rho' + \lambda^+\rho^+ (u^-/u^+ -1) + \lambda^- \rho^- (u^+/u^- - 1) \right\} \ d x.\] We see that only the ratio $u^+/u^-$ determines the value of $H(u)$. To any choice of $u \in \mathcal D^+(L)$ we may associate $\eta = \log u^+ - \log u^- \in C^1(\mathbb{T})$, and correspondingly, to any $\eta \in C^1(\mathbb{T})$ we can associate $u \in \mathcal D^+(L)$ by letting \[ u^+(x) = \exp(\tfrac 1 2 \eta(x)), \quad u^-(x) = \exp(-\tfrac 1 2 \eta(x)), \quad x \in \mathbb{T}.\] By the continuous dependence of $H$ on $\eta$, and the fact that $C^1(\mathbb{T})$ is dense in $C(\mathbb{T})$, we obtain the stated representation of $I(\mu)$. \end{proof} \begin{lemma} \label{lem:pointwise-minimization} Suppose $\rho \in C^1(E)$ and $\frac{ d \rho^+}{d x} = \frac{d \rho^-}{dx}$ for all $x \in \mathbb{T}$. Furthermore suppose $\lambda^- \lambda^+ \rho^- \rho^+ > 0$ on $\mathbb{T}$, and $\lambda^{\pm}$ are continuous. Then $\mathcal I$ is given by~\eqref{eq:rate-function}. \end{lemma} \begin{proof} Differentiating the integrand in~\eqref{eq:I-in-eta} pointwise with respect to $\eta$ gives the first order condition \[ -\rho' - \lambda^+ \rho^+ \exp(-\eta) + \lambda^- \rho^- \exp(\eta) = 0,\] which is solved uniquely by \[ \eta = \tfrac 1 2 \log \left( \frac{\lambda^+ \rho^+}{\lambda^- \rho^-} \right) + \operatorname{arcsinh} \left( \frac{ \rho'}{2 \sqrt{ \lambda^+ \lambda^- \rho^+ \rho^-}}\right),\] as long as $\lambda^- \lambda^+ \rho^- \rho^+ \neq 0$. Furthermore $\eta \in C(\mathbb{T})$ by the conditions on $\lambda$ and $\rho$. The second order derivative with respect to $\eta$ is given by \[ \lambda^+ \rho^+ \exp(-\eta) + \lambda^- \rho^- \exp(\eta) \geq 0,\] which shows that the critical value of $\eta$ corresponds to a pointwise global minimum of the integrand. \end{proof} \emph{Proof of Proposition~\ref{prop:expression-ratefunction}} The result for unequal derivatives is a consequence of Lemma~\ref{lem:to-infinity}, and the expression in case of equality follows from Lemma~\ref{lem:pointwise-minimization}. \begin{proof}[Proof of Proposition~\ref{prop:no-v-dependence}] We inspect the dependence of the various terms in the integrand of the expression~\eqref{eq:rate-function} $I(\mu_c)$ on $c$. For the first term, interchanging integral and derivative, \begin{align*} & \frac{d}{dc} \int_{\mathbb{T}} \rho' \log \left( \frac{\lambda^+ (\rho + c)}{\lambda^- (\rho-c)}\right) \ d x = \int_{\mathbb{T}} \rho' \left(\frac{1}{\rho + c} + \frac 1 {\rho-c} \right) \ d x \\ & = \int_{\mathbb{T}} \frac{d}{dx} \left( \log(\rho +c) + \log(\rho -c) \right) \ d x = 0. \end{align*} The following terms (i.e. the $\operatorname{arcsinh}$ and the square root) in the expression for $I(\mu_c)$ are decreasing with respect to the value of $\rho^+ \rho^- = \rho^2 -c^2$. It follows that the integrands are minimized at $c = 0$. Finally, we have that \[ \int_{\mathbb{T}} (\lambda^+ \rho^+ + \lambda^- \rho^- ) \ d x = \int_{\mathbb{T}} \left\{ ( \lambda^+ + \lambda^-) \rho + c (\lambda^+ - \lambda^-) \right\} \ d x.\] The linear term in $c$ vanishes since $\int_{\mathbb{T}} \{ \lambda^+ - \lambda^- \} \ d x= \int_{\mathbb{T}} U' \ dx = 0$. It follows that $c = 0$ minimizes $c \mapsto I(\mu_c)$. The stated expression for $I(\mu_0)$ is obtained after a manipulation of~\eqref{eq:rate-function}. \end{proof} \chapter{Large Deviations in Stochastic Slow-Fast Systems} \label{chapter:LDP-in-slow-fast-systems} \chaptermark{LDP in Stochastic Slow-Fast Systems} \section{Stochastic slow-fast systems---two time scales} Our focus in this chapter lies on stochastic systems with two time scales. In various stochastic problems arising for instance in atmospheric models~\cite{BouchetNardiniTangarife2013,BouchetGrafkeTangarifeVandenEijnden2016}, hydrodynamic limits~\cite{KipnisLandim1998}, genetic networks~\cite{CruduDebusscheRadulescu2009}, and statistical physics~\cite{MatosPerez1991,ColletDaiPra2012}, we can identify slow and fast components in the system. The distinction of slow and fast components in a system is based on the observation of different time scales: the fast components converge to their equilibrium state at a much shorter time scale at which the slow components have hardly evolved. As a consequence, the slow components evolve approximately under the averaged effect of the fast components. This observed separation of time scales motivates the term \emph{slow-fast system}. In a stochastic framework, slow-fast systems are frequently modelled by Markov processes that consist of two components, where one component models the slow variables and the other component the fast variables. \smallskip A valid approximation of the slow components by averaging over the fast components is also known as the \emph{averaging principle}~\cite{FreidlinWentzell1998}. Establishing an averaging principle in stochastic models has the benefit of rigorously reducing the complexity and leading to simpler models. In stochastic models, this transition from the full system to an approximation via averaging can be justified by the law of large numbers, as demonstrated for instance by Ball, Kan, Kurtz, Popovic and Rempala for the example of reaction networks~\cite{BallKurtzPopovicRempala2006,KangKurtz2013,KangKurtzPopovic2014}. Freidlin and Koralov proved averaging in quasi-linear parabolic PDEs~\cite{FreidlinKoralov2012}, and recently investigated averaging in a slow-fast system whose fast process admits multiple stationary measures~\cite{FreidlinKoralov2020}. \smallskip However, the approximation via an averaged evolution is only valid in the limit of infinite time-scale separation. In order to estimate the approximation error, many efforts have therefore concentrated on establishing finer asymptotic results. An example of such an asymptotic result is a pathwise large deviation principle of the slow component as the time-scale separation tends to infinity. Verifying such a large deviation principle is interesting for various reasons. If a large deviation principle is verified for the slow component, then we know the error of the average-approximation to vanish exponentially fast as a function of the time-scale separation. Furthermore, the exponential convergence rate is explicitly known as the so-called large-deviation rate function, which in many situations can be calculated. In the context of multiscale diffusions, Dupuis, Spiliopoulos and Wang show how the large-deviation rate function can be used to design Monte-Carlo for estimating rare-event probabilities~\cite{DupuisSpiliopoulosWang2012}. The rate function is also the crucial ingredient for characterizing the rare-event behaviour of the system~\cite[Theorem~1.4]{BudhirajaDupuis2019}. Vanden-Eijnden introduced numerical methods for systems with multiple time scales that do not require to derive the limiting effective equations~\cite{Vanden-Eijnden2003}, and further investigated numerical schemes with Fatkullin~\cite{FatkullinVanden-Eijnden2004} and Weinan and Liu~\cite{WeinanLiuVanden-Eijnden2005,WeinanLiuVanden-Eijnden2007}. We also refer to the monographs of Berglund and Gentz~\cite{BerglundGentz2005}, Kuehn~\cite[Chapter~15]{Kuehn2015} and Pavliotis and Stuart~\cite{PavliotisStuart2008} for more background on both stochastic and deterministic multiscale systems. \smallskip Establishing the large deviation principles in slow-fast systems is usually a delicate enterprise, and there has been vivid activity during the last decades to embark on that journey. In their monograph on random perturbations~\cite[Chapter~7]{FreidlinWentzell1998}, Freidlin and Wentzell prove large deviations for several examples where a process is perturbed by a fast process. The two processes are assumed to be weakly coupled in the sense that either the fast process evolves independently of the slow process, or the fast process has a deterministic diffusion coefficient, or the slow process is deterministic. Lipster and Veretennikov also consider a slow diffusion process whose coefficients are coupled to an independent fast diffusion process~\cite{Liptser1996,Veretennikov2000}, and Veretennikov allows for a weak coupling between diffusions in~\cite{Veretennikov1999}, similar to Freidlin and Wentzell. For coupled diffusions where the fast diffusion coefficient is indepedent of the slow process, Feng and Kurtz offer a proof based on Hamilton-Jacobi theory~\cite[Section~11.6, Lemma~11.60~(1)]{FengKurtz2006}. Kifer studies ODE's coupled to fast diffusions~\cite{Kifer1992,Kifer2009}. Bouchet, Grafke, Tangarife and Vanden-Eijnden~\cite{BouchetGrafkeTangarifeVandenEijnden2016} complement this study by specifying the ODEs to concrete examples in order to calculate the Hamiltonians, thereby obtaining a more explicit rate function. \smallskip Puhalskii studies fully coupled slow-fast diffusions~\cite{Puhalskii2016} by building up on Lipster's method of considering the joint distribution of the slow process and the empirical measure of the fast process~\cite{Liptser1996}. Spiliopoulos proves large deviations on the path level, and provides importance-sampling schemes for coupled diffusions~\cite{Spiliopoulos2013}. Feng, Fouque and Kumar prove large deviations for the time marginals of a slow diffusion process coupled to fast diffusions~\cite{FengFouqueKumar2012}, and Ghili provides a generalization of their results~\cite{Ghilli2018}. \smallskip More recently, fast components modelled by jump processes attracted more interest in the large-deviation context. He and Yin couple diffusions to fast jump processes~\cite{HeYin2014}, considering different scaling regimes of the time-scale separation. Similar in spirit to Puhalskii's paper, Huang, Mandjes and Spreij apply Lipster's idea from~\cite{Liptser1996} to prove large deviations of a slow diffusion process coupled to an independent fast jump process, by first proving joint large deviations of the slow process and the empirical measure process, and then using the contraction principle~\cite{HuangMandjesSpreij2016}. Bressloff and Faugeras start from large-deviation results and derive action-integral representations via contraction~\cite{BressloffFaugeras2017}. Budhiraja, Dupuis and Ganguly~\cite{BudhirajaDupuisGanguly2018} proof process-level large deviations of a slow diffusion process and fast jumps, with fully-coupled components. The rate functions are characterized via an optimal control problem, involving the empirical measure of the fast variable. Popovic and Kumar~\cite{KumarPopovic2017} tackle the general case where both slow and fast components are mixed jump-diffusion processes. They show that under the assumption of well-posedness of a certain Hamilon-Jacobi equation, the one-dimensional time marginals satisfy large deviations. \smallskip Despite the enormous interest and the huge literature on the topic of slow-fast systems, the important class of physical models of mean-field interacting particles described by jump processes on a finite state space has not been treated so far in the context of slow-fast systems. These Markovian jump models are frequently consulted as approximations to physical models describing certain non-equilibrium phenomena, such as spin dynamics. An overview involving different spin models is offered for instance by Martinelli~\cite{Martinelli1999}. A typical example is the Glauber dynamics in Ising-models and Potts-models describing ferromagnets. Other fields of applications include communication networks~\cite{AntunesFrickerRobert2006}, game theory with models involving a large number of agents~\cite{GomesMohrSouza2010}, and chemical reactions~\cite{MielkePattersonPeletierRenger2017}. \smallskip There is very recent activity in the study of Markovian mean-field jump processes from a large-deviation perspective. Dupuis, Ramanan and Wu prove large deviations of the empirical densities~\cite{DupuisRamananWu2016}, the clue being to allow for more than one jump simultaneously. In another paper with Fischer, they investigate the stability of the nonlinear limit evolution equation of the particle system by constructing Lyapunov functions from relative entropies~\cite{BudhirajaDupuisFischerRamanan2015}. Renger proves large deviations of density-flux pairs of non-interacting particles exploiting Girsanov transformations~\cite{Renger2017}, which Kraaij extended to include weak interactions~\cite{Kr17}. Bertini, Chetrite, Faggionato, and Gabrielli consider a mean-field system with deterministic time-periodic rates~\cite{BertiniChetriteFaggionatoGabrielli2018}, and prove large deviations in the large number of particles limit. Budhiraja and Wu also consider moderate deviations~\cite{BudhirajaWu2017}. \smallskip In our work, we contribute to these very recent studies by proving dynamic large deviation principles in mean-field interacting particles coupled to fast external processes. In general, the main methods used in the literature to prove large deviations in slow-fast systems are the weak-convergence method (\cite{BudhirajaDupuis2019}), classical techniques based on Girsanov transformations, and the method based on convergence of nonlinear generators and Hamilton-Jacobi Theory~\cite{FengKurtz2006}. Despite the interest in mean-field systems, there are few results illuminating the large-deviation behaviour of mean-field particles from a Hamilton-Jacobi point of view. A system of interacting diffusions is considered in~\cite[Chapter~13]{FengKurtz2006}. Feng, Mikami and Zimmer extend the methods therein to prove the comparison principle for equations involving Hamiltonians that arise in this context~\cite{FengMikamiZimmer2019}. Moreover, proofs about large deviations in coupled systems, like slow-fast systems, assume well-posedness of the comparison principle rather than verifying the comparison principle. The main novelties presented here are the following: \begin{itemize}[] \item We provide a general set of conditions under which we prove pathwise large deviations of slow components in slow-fast systems via Hamilton-Jacobi equations. The conditions allow for irreversible fast processes. \item We find Lagrangian rate functions. Next to the standard characterization of the Lagrangian in terms of the dual of a principal eigenvalue, we establish a characterization in terms of a double-optimization. \item As our main example, we treat density-flux large deviations of mean-field interacting particles on a finite state space coupled to fast drift-diffusion processes on a compact periodic space. This example requires arguments that are different from those currently available in the literature. We derive an averaging principle from the large deviation principle. \item The large-deviation results apply to small-diffusion processes coupled to fast jump processes. This solves a challenge pointed out by Budhiraja, Dupuis and Ganguly in~\cite{BudhirajaDupuisGanguly2018}, which is the fact that in slow-fast systems, classical results about comparison principles are not applicable due to the Hamiltonians having poor regularity properties. \end{itemize} \paragraph{Overview of this chapter.} In Section~\ref{SF:sec:toy-ex}, we treat two toy examples of stochastic slow-fast systems. The first toy example shows how fast variables affect the large-deviation behaviour of the slow variables. The second toy example illustrates the characterization of the Lagrangians in terms of a double-optimization, and it's connection to averaging principles. The examples provide the necessary background to have in picture in mind for the general results that follow. \smallskip In Section~\ref{SF:sec:main-results}, we state our main results: a general large-deviation theorem for slow components in a slow-fast system (Theorem~\ref{SF:thm:LDP_general}), an action-integral form of the rate functions (Theorem~\ref{SF:thm:rate-function}), a large-deviation theorem for mean-field interacting particles coupled to a fast diffusion process (Theorem~\ref{SF:thm:LDP-mean-field}), and an application of the large deviation principle to the averaging principle for mean-field systems (Theorem~\ref{SF:thm:mean-field-averaging}). In Section~\ref{SF:sec:assumptions:general-LDP-theorem} we collect the assumptions for the general large-deviation results. The remaining sections contain the proofs. \section{Two toy examples}\label{SF:sec:toy-ex} \subsection{Fastly-varying diffusion} We start from the large deviation principle of a small-diffusion process. Then we couple this process to a fast process to illustrate a slow-fast system. \paragraph{Single component.} For fixed $n \in \mathbb{N}$ and a fixed positive constant~$\sigma>0$, consider the stochastic process $Y^n_t \in \mathbb{R}$ solving \begin{equation*} \mathrm{d} Y^n_t = \frac{1}{\sqrt{n}} \sigma \cdot \mathrm{d} B_t, \quad Y^n(0) = 0. \end{equation*} We call the constant~$\sigma$ the diffusion coefficient, and $B_t$ denotes Brownian motion in $\mathbb{R}$. By Schilder's Theorem~(\cite[Theorem~5.2.3]{DemboZeitouni1998}), the process $Y^n_t$ satisfies a pathwise large deviation principle in the small-diffusion limit $n \to \infty$. The rate function is given by (see also Section~\ref{BG:sec:semigroup-flow-HJ-eq} in Chapter~2) \begin{equation*} J(y) = \int_0^\infty \frac{1}{2 a} |\partial_t y(t)|^2 \, \mathrm{d} t, \quad a := \sigma^2. \end{equation*} This corresponds to the Hamiltonian~$\mathcal{H}(p)=ap^2/2$. \paragraph{Slow-fast system.} To transition from the single-component process to a slow-fast system, we pass from the constant diffusion coefficient to a switching diffusion coefficient. The switching times depend on a jump process~$Z^n_t$ flipping between~$\pm 1$. The slow-fast system is defined as a two-component process~$(X_t^n,Z_t^n)$, where the first component evolves according to \begin{equation*} \mathrm{d} X_t^n = \frac{1}{\sqrt{n}}\sigma\left(Z_t^n\right) \mathrm{d} B_t,\quad X^n(0)=0. \end{equation*} The jump process evolves independently of the diffusion~$X_t^n$. In between the jump times of~$Z_t^n$, the dynamics of~$X_t^n$ is just the dynamics of the process~$Y_t^n$ from above, where depending on the value of the second component $Z^n_t$, the diffusion constant is either given by $\sigma_- := \sigma(-1)$ or by $\sigma_+ := \sigma(+1)$. To model the time-scale separation, we take~$Z_t^n$ to evolve with jump rates given by~$r_n(-1,+1)=n\cdot r_-$ and~$r_n(+1,-1)=n\cdot r_{+}$ for some fixed~$r_\pm > 0$. In this two-component process,~$X_t^n$ is the slow and~$Z_t^n$ is the fast component. \smallskip The typical questions we ask about such a slow-fast system are: does the slow component satisfy a pathwise large deviation principle? How does the dependence on~$Z_t^n$ affect the large-deviation behaviour? In this toy example, both questions can be answered explicitly. The first question is answered by the fact that the slow component~$X_t^n$ indeed satisfies pathwise large deviations with some rate function~$J_\pm$. The second question is answered by describing this rate function. As in the single-component version, the rate function is of action-integral form. The Lagrangian is the Legendre-Fenchel transform $\mathcal{L}_\pm(v)$ of a Hamiltonian $\mathcal{H}_\pm : \mathbb{R} \to \mathbb{R}$. However, due to the fast jump process, the Hamiltonian is no longer quadratic, but given by \begin{multline} \label{SF:eq:intro:Hamiltonian-vastly-varying-diffusion} \mathcal{H}_\pm(p) = \frac{p^2}{4}(a_{+} + a_{-}) - \frac{1}{2}(r_{+} + r_{-})\\ + \frac{1}{2}\sqrt{(r_{+} + r_{-})^2 + p^2(a_{+} - a_{-})(r_{-}-r_{+}) + \frac{1}{4}p^4(a_{+} - a_{-})^2}, \end{multline} where~$a_\pm := \sigma_\pm^2$. This Hamiltonian is the principal eigenvalue of the matrix \begin{equation*} M(p) = \frac{p^2}{2} \begin{pmatrix} a_- & 0\\ 0 & a_+ \end{pmatrix} + \begin{pmatrix} -r_- & r_-\\ r_+ & -r_+ \end{pmatrix}. \end{equation*} \begin{figure}[h!] \labellist \pinlabel $v$ at 2400 -80 \pinlabel $v$ at 4700 -80 \pinlabel $\mathcal{L}(v)/\mathcal{L}_\pm(v)$ at 3700 850 \pinlabel $\sigma_+^2$ at 3000 1500 \pinlabel {\color{dark_blue}{$\mathcal{L}(v)$}} at 600 1000 \pinlabel {\color{red_one}{$\mathcal{L}_\pm(v)$}} at 2300 580 \endlabellist \begin{center} \includegraphics[scale=.07]{./Figures/SlowFast/ToyEx} \end{center} \caption{In blue the quadratic Lagrangian with a constant~$\sigma>0$. In red the Lagrangian of with flipping between two values~$\sigma_\pm$ with~$\sigma_-=\sigma$ and~$\sigma_+>\sigma_-$. In the right graph the quotient~$\mathcal{L}/\mathcal{L}_\pm$.} \label{SF:fig:toy-ex:Lagrangians} \end{figure} \smallskip If the diffusion coefficients are equal, then $a_+=a_-$, and we recover the above quadratic Hamiltonian for the small diffusion limit. If the diffusion coefficient is flipping between two values~$\sigma_\pm$ with~$\sigma_+>\sigma_-$, then asymptotically, the exit probabilities \begin{equation*} \mathbb{P}\left[X^n(T)\geq C\right] \sim e^{-n T\mathcal{L}_\pm(C/T)},\quad n\to\infty, \end{equation*} are larger. This is illustrated in Figure~\ref{SF:fig:toy-ex:Lagrangians}, which depicts the fact that the Lagrangian~$\mathcal{L}_\pm$ is smaller with flipping than without flipping, provided $\sigma=\sigma_-$ and~$\sigma_+>\sigma_-$. Indeed, one can verify for instance the estimate \begin{equation*} \sigma_+^2\frac{1}{1+\sigma_+^2/v^2} \leq \left[\mathcal{L}(v)/\mathcal{L}_\pm(v)\right] \leq \sigma_+^2. \end{equation*} In this very specific example, the fast variable does not influence the law of large number limit: in both cases, uncoupled or coupled, the deterministic limit of the small-diffusion process is the path constant equal to zero. While in this simplified toy example, we can find an explicit formula for the Hamiltonian, this is no longer the case in more complicated systems. However, also in more involved systems the large-deviation behaviour is goverened by a principal-eigenvalue problem derived from the slow-fast system---see Section~\ref{SF:sec:proof-general-LDP-Theorem}. We close this example by formally deriving~$\mathcal{}H_\pm(p)$ from the generators~$L_n$ of~$(X^n,Z^n)$, \begin{equation*} L_nf(x,z)=\frac{1}{2n}\sigma(z)^2\Delta_x f(x,z) + n\cdot r(z,z')(f(x,z')-f(x,z)),\quad z':=(-1)\cdot z. \end{equation*} The nonlinear generators~$H_nf=n^{-1}e^{-nf}L_ne^{nf}$ are given by \begin{equation*} H_nf(x,z)=\frac{1}{2n}\sigma(z)^2 \Delta_x f + \frac{1}{2}\sigma(z)^2|\nabla_xf|^2 + r(z,z')\left[e^{n(f(x,z')-f(x,z))}-1\right]. \end{equation*} Consider functions of the form~$g_n(x,z)=g(x)+n^{-1}\varphi(z)$ to take the scale separation into account. Then \begin{align*} H_ng_n(x,z)\xrightarrow{n\to\infty} H_{g,\varphi}(x,z):=\frac{1}{2}\sigma(z)^2|\nabla g(x)|^2 +r(z,z') \left[e^{\varphi(z')-\varphi(z)}-1\right]. \end{align*} We want this limit to be independent of the fast variable~$z$. We fix~$x$, and thereby also~$p=\nabla g(x)$. By Perron-Frobenius type results, there exists a unique eigenvalue~$\lambda(p)\in\mathbb{R}$ and a vector~$\varphi=(\varphi(-),\varphi(+))$ such that \begin{equation*} \frac{1}{2}\sigma(z)^2p^2 +r(z,z') \left[e^{\varphi(z')-\varphi(z)}-1\right]=\lambda(p). \end{equation*} This eigenvalue~$\lambda(p)$ is precisely the Hamiltonian~$\mathcal{H}_\pm(p)=\lambda(p)$, and its explicit formula is~\eqref{SF:eq:intro:Hamiltonian-vastly-varying-diffusion} from above. \subsection{Fastly-alternating drifts} We slightly vary the previous toy example to illustrate how the Lagrangians in form of a double-optimization provide us with a convenient tool to connect the large-deviation results to the averaging principle. \paragraph{Single component.} For fixed~$u\in\mathbb{R}$ and~$n\in\mathbb{N}$, consider \begin{equation*} \mathrm{d} Y_t^n = u \, \mathrm{d} t + \frac{1}{\sqrt{n}}\, \mathrm{d} B_t,\quad Y^n(0)=0. \end{equation*} Then~$\{Y^n\}_{n=1,2,\dots}\in C_\mathbb{R}[0,\infty)$ (equipped with the Skorohod topology) satisfies a large deviation principle by the Freidlin-Wentzell Theorem, with rate function \begin{equation*} J(y) = \int_0^\infty \frac{1}{2}|\partial_t y (t) - u|^2\, \mathrm{d} t. \end{equation*} In particular, the limit of~$Y^n$ as~$n\to\infty$ is the path with constant velocity~$u$. \paragraph{Slow-fast system.} We consider the same setting as above, but let the velocity flip fastly between two values~$u_+,u_-\in\mathbb{R}$. As in the previous toy example, this means we introduce a jump process~$Z^n$ on~$\{-1,+1\}$ and consider the two-component process~$(X^n,Z^n)$, where~$X^n$ follows the dynamics \begin{equation*} \mathrm{d} X_t^n = u(Z_t^n)\, \mathrm{d} t + \frac{1}{\sqrt{n}}\, \mathrm{d} B_t,\quad X^n(0)=0, \end{equation*} with~$u(\pm 1)=u_\pm$. The jump process~$Z^n$ evolves independently of~$X^n$, with the same jump rates of order~$n$ as in the first toy example. Let~$\pi=\pi_-\delta_-+\pi_+\delta_+$ be the stationary measure of~$Z^n$. Since~$Z^n$ equilibriates fastly, we expect~$X^n$ to converge to the path~$\overline{x}$ with constant average velocity~$\overline{u}=u_-\pi_-+u_+\pi_+$. This statement is an example of the averaging principle. \smallskip Let us see how to obtain the averaging principle from a large-deviation perspective. Here, we argue heuristically: \begin{enumerate}[(a)] \item The jump process~$Z^n$ equilibriates exponentially fast at~$\pi$ with speed~$n$, \begin{equation*} \mathbb{P}\left(\int_0^1 \mathbf{1}_{Z^n(t)}(\cdot)\, \mathrm{d} t \approx \mu(\cdot)\right) \sim \exp\{- n \mathcal{I}(\mu)\},\quad n\to\infty, \end{equation*} with the Donsker-Varadhan functional~$\mathcal{I}:\mathcal{P}(\{-1,+1\})\to[0,\infty)$ \begin{equation*} \mathcal{I}(\mu) = \sup_{\xi\in\mathbb{R}^2} \left[r_-\mu_-(1-e^{\xi_+-\xi_-}) + r_+\mu_+(1-e^{\xi_--\xi_+})\right], \end{equation*} and~$\mathcal{I}(\mu)=0$ if and only if~$\mu=\pi$. \item Suppose that~$Z^n$ remains stationary at law~$\pi$. Then Freidlin-Wentzell large deviations suggest that for large~$n$, \begin{multline*} \mathbb{P}\left(X^n\approx x\,|\,\mathrm{law}(Z^n)=\pi\right) \\ \sim \exp\left\{-n\int_0^\infty\left[\frac{1}{2}|\partial_tx(t)-u_-|^2 \pi_- + \frac{1}{2}|\partial_tx(t)-u_+|^2 \pi_+\right]\, \mathrm{d} t\right\}. \end{multline*} \end{enumerate} When taking the limit~$n\to\infty$, both the convergence of~$Z^n$ to equilibrium and the convergence of~$X^n$ to a path with constant velocity are competing at the same scale or order~$n$. Therefore both effects contribute to the probabilistic cost when computing the rate function of the slow component deviating from its most likely path. To observe a velocity~$v$ of the process~$X^n(t)$ in a small time-window~$[t,t+\Delta t)$, three events can contribute: the fast process is distributed as~$\mu$ (instead of~$\pi$); while~$Z^n$ is in state~$-1$, the slow component's velocity is~$v_-$ (instead of~$u_-$); while~$Z^n$ is in state~$+1$, the slow component's velocity is~$v_+$ (instead of~$u_+$). The only condition for observing~$v$ is $v=v_-\mu_- + v_+\mu_+$. Since the winner takes it all, the rate~$\mathcal{L}(v)$ is obtained by optimizing over~$\mu,v_-,v_+$, and taking into account the cost of each event: \begin{equation}\label{SF:toy-ex:Lagrangian-fast-flip-drift} \mathcal{L}(v)=\inf_{\substack{\mu,v_-,v_+\\vee_-\mu_-+v_+\mu_+=v}}\frac{1}{2}|v_--u_-|^2\mu_- + \frac{1}{2}|v_+-u_+|^2\mu_+ + \mathcal{I}(\mu). \end{equation} When specializing Theorem~\ref{SF:thm:rate-function} to this example, we find that~$X^n$ satisfies pathwise large deviations with rate function~$J$ with this Lagrangian, \begin{equation*} J(x) = \int_0^\infty \mathcal{L}(\partial_t x(t))\, \mathrm{d} t. \end{equation*} This is an instant of a general principle expressed by Theorem~\ref{SF:thm:rate-function}, where we prove this double optimization to hold under the same conditions under which we prove large deviations. \smallskip We close this example by deriving the averaging principle from this rate function. As a consequence of the large deviation principle,~$X^n\to \overline{x}$ almost surely, where~$J(\overline{x})=0$ (Theorem~\ref{thm:math-formulation-LDP:LDP-implies-as}). Hence~$\mathcal{L}(\partial_t\overline{x}(t))=0$ with the Lagrangian~\eqref{SF:toy-ex:Lagrangian-fast-flip-drift}. Since all three terms in the Lagrangian are non-negative, each term must vanish. Thus~$(\mu,v_-,v_+)=(\pi,u_-,u_+)$ is the optimizer in this case, and we must have~$\partial_t\overline{x}(t) = u_-\pi_-+u_+\pi_+$. \section{Main results}\label{SF:sec:main-results} \subsection{Preliminaries}\label{SF:sec:preliminaries} For a Polish space~$E$, we denote by $C(E)$ and $C_b(E)$ the spaces of continuous and bounded continuous functions respectively. If $E \subseteq \mathbb{R}^d$ then we denote by $C_c^\infty(E)$ the space of smooth functions that vanish outside a compact set in $E$. We denote by $C_{cc}^\infty(E)$ the set of smooth functions that are constant outside of a compact set, and by $\mathcal{P}(E)$ the space of probability measures on $E$. We equip $\mathcal{P}(E)$ with the weak topology, that is, the one induced by convergence of integrals against bounded continuous functions. \smallskip We consider Markov processes defined via solutions to the martingale problem of a linear operator~$A : \mathcal{D}(A) \subseteq C_b(E) \rightarrow C_b(E)$. We write~$\mathcal{X}:=D_E[0,\infty)$ for the Skorokhod space of trajectories that are right-continuous and have left limits, equiped with its usual topology~\cite[Section~3.5]{EthierKurtz1986}. \begin{definition} Let $\mu \in \mathcal{P}(E)$. We say that a measure $\mathbb{P} \in \mathcal{P}(\mathcal{X})$ solves \textit{the martingale problem} for $(A,\mu)$ if for all $f \in \mathcal{D}(A)$ the process \begin{equation*} M_f(t) := f(X(t)) - f(X(0)) - \int_0^t Af(X(s)) \mathrm{d} s \end{equation*} is a martingale with respect to the filtration $t \mapsto \mathcal{F}_t := \left\{X(s) \, | \, s \leq t\right\}$, and if the projection of $\mathbb{P}$ on the time $0$ coordinate equals $\mu$. We say that~$\mathbb{P} \in \mathcal{P}(\mathcal{X})$ solves the martingale problem for $A$ if it solves the martingale problem for $(A,\mu)$ for some starting measure~$\mu$. We say that the process $\{X(t)\}_{t \geq 0}$ on $\mathcal{X}$ solves the martingale problem for $A$ if its distribution solves the martingale problem. A martingale problem is \textit{well-posed} if there exists a unique solution to the martingale problem for each starting measure.\qed \end{definition} \subsection{Setting of slow-fast systems}\label{SF:sec:general-setting} Here we introduce stochastic \emph{slow-fast systems} as certain two-component Markov processes~$(Y_t^n,Z_t^n)$, where the first component corresponds to the slow process, the second to the fast process. To incorporate the feature of being \emph{slow-fast}, we include a scaling parameter $r_n$ that introduces a separation of time-scales for the two processes. \smallskip We first fix the state space of a slow-fast system. To focus only on the features that arise due to the coupling of slow and fast variables, we will assume that the fast process $Z_t^n$ takes values in a compact Polish space $F$. This compactness assumption, as well as the fact that $F$ does not depend on $n$, can both be relaxed at the cost of more but non-trivial technicalities~(e.g.~\cite{Ghilli2018}). Furthermore, for each $n = 1, 2, \dots$, the slow process $X_t^n$ takes values in Polish spaces $E_n$ such that $\eta_n(E_n) \subseteq E \subseteq \mathbb{R}^d$, where $\eta_n : E_n \to E$ is a continuous embedding and $E$ is a Polish space as well. We assume that $E$ is contained in the $\mathbb{R}^d$-closure of its $\mathbb{R}^d$-interior, which ensures that gradients of functions on $E$ are determined by the values of the function in $E$. The setting of the state spaces is summarized in the following basic condition. \begin{condition}[Basic condition on the state spaces $E_n$ and $F$] \label{SF:condition:compact_setting:state-spaces} The state space $F$ is a compact Polish space. The state spaces $E_n$ are Polish spaces that are asymptotically dense in $E \subseteq \mathbb{R}^d$ with respect to continuous embeddings $\eta_n : E_n \to E$; that means for any $x \in E$, there exist $x_n \in E_n$ such that $\eta_n(x_n) \to x$ as $n \to \infty$. Furthermore, suppose that for each compact $K \subseteq E$ the set $\eta_n^{-1}(K)$ is compact in $E_n$ and that there exists a compact set $\widehat{K} \subseteq E$ such that \begin{equation*} K \subseteq \liminf_n \eta^{-1}_n(\widehat{K}). \end{equation*} The last condition means that for every compact $K \subseteq E$ there is a compact set $\widehat{K} \subseteq E$ such that for all $x \in K$ there is an increasing map $k : \mathbb{N}\rightarrow \mathbb{N}$ and $x_{k(n)} \in \eta_{k(n)}^{-1}(\widehat{K})$ such that $\lim_n \eta_{k(n)}(x_{k(n)}) = x$.\qed \end{condition} We consider two-component processes~$(Y_t^n,Z_t^n)$ defined by generators that decompose into slow and fast parts in the following sense. \begin{definition}[Generator of slow-fast system]\label{SF:def:generator-slow-fast} We say that a sequence of linear operators $A_n : \mathcal{D}(A_n) \subseteq C_b(E_n \times F) \to C_b(E_n \times F)$ corresponds to a slow-fast system if $A_n$ is given by \begin{equation}\label{SF:eq:setting:generator-slow-fast-system} A_n f(y,z) := A^\mathrm{slow}_{n,z} f(\cdot,z) (y) + r_n \cdot A^\mathrm{fast}_{n,y} f(y,\cdot)(z), \end{equation} where~$r_n$ is a sequence of positive real numbers such that $r_n \rightarrow \infty$ and \begin{enumerate}[label = (\roman*)] \item for each $z \in F$ and $n = 1,2,\dots$, there is a generator % \begin{equation*} A^\mathrm{slow}_{n,z} : \mathcal{D}(A^\mathrm{slow}_{n}) \subseteq C_b(E_n) \to C_b(E_n) \end{equation*} of an $E_n$-valued Markov process $Y^n_t$. The domain of $A^{\mathrm{slow}}_{n,z}$ is independent of $z$, denoted by $\mathcal{D}(A^\mathrm{slow}_n)$. For $f \in \mathcal{D}(A_n)$, we have $f(\cdot,z) \in \mathcal{D}(A^\mathrm{slow}_n)$. \item For each $y \in E_n$, there is a generator \begin{equation*} A^\mathrm{fast}_{n,y} : \mathcal{D}(A^\mathrm{fast}) \subseteq C(F) \to C(F) \end{equation*} of a Markov process on $F$. The domain is independent of $n$ and $y$, denoted by $\mathcal{D}(A^\mathrm{fast})$. For $f \in \mathcal{D}(A_n)$, we have $f(y,\cdot) \in \mathcal{D}(A^\mathrm{fast})$.\qed \end{enumerate} \end{definition} The sequence of positive numbers~$r_n$ models the time-scale separation of the two processes. The fast component runs at a time scale of order~$r_n$ compared to the slow component. In the law of large number limit, the time separation tends to infinity. \smallskip For a sequence of slow-fast systems constructed form operators~ $A_n$ defined as above, we make the following well-posedness assumption regarding solvability of the associated martingale problem. \begin{condition}[Well-posedness of martingale problem] \label{SF:condition:compact_setting:well-posedness-martingale-problem} Consider a slow-fast system constructed from operators $A_n$ as in Definition~\ref{SF:def:generator-slow-fast}. For each $n \in \mathbb{N}$ and each initial distribution $ \mu \in \mathcal{P}(E_n \times F)$, existence and uniqueness hold for the $(A_n,\mu)$-martingale problem on the Skorohod-space $D_{E_n \times F}[0,\infty)$. Denote the Markov process solving the martingale problem by~$(Y_n(t),Z_n(t))$. The mapping $(y,z) \mapsto P^n_{y,z}$ of $E_n \times F$ into $\mathcal{P}(D_{E_n \times F}[0,\infty))$ is continuous with respect to the weak topology on $\mathcal{P}(D_{E_n \times F}[0,\infty))$, where~$P^n_{y,z}$ is the distribution of the Markov process~$(Y_n(t),Z_n(t))$ starting at~$(y,z)$.\qed \end{condition} The assumption that $(y,z) \mapsto P^n_{y,z}$ is continuous is equivalent to the fact that the semigroup of the process~$(Y_n,Z_n)$ is Feller-continuous and that the set $\{P_{x,z}:(x,z)\in K\}$ is tight for any compact $K\subseteq E_n\times F$~(\cite[Remark~11.22]{FengKurtz2006}. We assume continuity in order to apply the general large-deviation results established by Kraaij in~\cite{Kraaij2019ExpResolv}. \subsection{General large-deviation theorem} \label{SF:sec:result:general-LDP} We formulate our main result for general slow-fast systems by two theorems. All assumptions stated in the theorems are collected in Section~\ref{SF:sec:assumptions:general-LDP-theorem}. For the large-deviation result, we consider a sequence of slow-fast systems~$(Y_t^n,Z_t^n)$ with values in~$E_n\times F$ satisfying Condition~\ref{SF:condition:compact_setting:state-spaces}. The following theorem establishes conditions under which slow components~$Y_t^n$ satisfy a pathwise large deviation principle. Recall the state spaces~$E_n$ imbedded into~$E$ by a continuous map~$\eta_n$. \begin{theorem}[Large-deviation principle of slow component]\label{SF:thm:LDP_general} Let ~$(Y_t^n,Z_t^n)$ be a slow-fast system satisfying the well-posedness Condition~\ref{SF:condition:compact_setting:well-posedness-martingale-problem}. In addition, suppose that Assumptions~\ref{SF:assumption:convergence-slow-nonlinear-generators},~\ref{SF:assumption:convergence-fast-nonlinear-generators},~\ref{SF:assumption:principal-eigenvalue-problem},~\ref{SF:assumption:regularity-V} and~\ref{SF:assumption:regularity-I} are satisfied. Let $X_n := \eta_n(Y_n)$ and suppose the large deviation principle holds for~$X_n(0)$ on~$E$ with speed~$r_n$ and rate function~$J_0$. Then the process~$X_n$ satisfies a large deviation principle in~$D_E[0,\infty)$ with speed~$r_n$ and with rate function~$J$ given in~\eqref{SF:eq:Richard-general-LDP-thm-rate-function} in Section~\ref{SF:sec:proof-general-LDP-Theorem}. \end{theorem} We prove Theorem~\ref{SF:thm:LDP_general} in Section~\ref{SF:sec:proof-general-LDP-Theorem}. The rate function is only implicitly characterized by the limit of nonlinear semigroups associated to the slow-fast system, and is therefore not satisfying. This is why we establish two alternative representations of the rate function. These alternative representations establish the rate function as a time-integral over a Lagrangian, which is why we call it action-integral representation. \begin{theorem}[Action-integral representation]\label{SF:thm:rate-function} In addition to the assumptions of Theorem~\ref{SF:thm:LDP_general}, suppose that also Assumption~\ref{SF:assumption:Hamiltonian_vector_field} is satisfied. Then there exists a map~$\mathcal{L}:E\times\mathbb{R}^d\to[0,\infty]$ such that the rate function~$J$ from Theorem~\ref{SF:thm:LDP_general} is \begin{equation}\label{SF:eq:action-integral-rate-function} J(\gamma) = \begin{cases} J_0(\gamma(0)) + \int_0^\infty \mathcal{L}(\gamma(s),\dot{\gamma}(s)) \mathrm{d} s & \text{if } \gamma \in \mathcal{A}\mathcal{C}([0,\infty);E), \\ \infty & \text{otherwise}. \end{cases} \end{equation} The map~$\mathcal{L}:E\times\mathbb{R}^d\to[0,\infty]$ admits the two representations specified below in~\eqref{SF:eq:Lagrangian-is-Legendre-dual} and~\eqref{SF:eq:results-Lagr-opt-proc}. \end{theorem} The proof is given in Section~\ref{SF:sec:proof-action-integral-form-RF}. The map~$\mathcal{L}$ is called the \emph{Lagrangian}. We characterize the Lagrangian in two ways, as the Legendre-Fenchel transform of a principal eigenvalue (Eq.~\eqref{SF:eq:variational_Hamiltonian} below), and as an optimization problem (Eq.~\eqref{SF:eq:results-Lagr-opt-proc} below). Both characterizations involve a Hamiltonian that we call \emph{slow Hamiltonian}, and the so-called Donsker-Varadhan rate functional. We first describe these two ingredients, and then give the representations of the Lagrangian. \smallskip For fixed~$z\in F$, consider the process~$\widehat{X}_z^n(t)$ with generator $A_{n,z}^\mathrm{slow}$. Intuitively, this means considering the dynamics when freezing the fast process to~$z$. By our assumptions, the process~$\widehat{X}_z^n(t)$ satisfies pathwise large deviations, \begin{equation*} \mathbb{P}\left[\widehat{X}_z^n\approx \gamma(\cdot)\right]\sim \exp\left\{-n\int_0^\infty \widehat{\mathcal{L}}(\gamma,\partial_t\gamma,z)\, \mathrm{d} t\right\},\quad n\to\infty, \end{equation*} where the \emph{slow Lagrangian}~$\widehat{\mathcal{L}}$ is the Legendre-Fenchel transform of a function that we call the \emph{slow Hamiltonian}~$V_{x,p}(z)$, as \begin{equation*} \widehat{\mathcal{L}}(x,v,z) = \sup_{p}\left[p\cdot v - V_{x,p}(z)\right]. \end{equation*} The slow Hamiltonian~$V_{x,p}(z)$ is derived from the slow generator. For~$p\in\mathbb{R}^d$ and a function~$f$ with~$\nabla f(x)=p$, it satifies \begin{equation}\label{SF:eq:main-result:slow-Hamiltonian} V_{x,p}(z) = \lim_{n\to\infty} \frac{1}{r_n}e^{-r_nf(x)}A_{n,z}^\mathrm{slow}e^{r_nf(x)}. \end{equation} We call~$V_{x,p}(z)$ the slow Hamiltonian since it arises from the slow dynamics when completely decoupling the slow and fast processes, which effectively means to consider the slow dynamics only. \smallskip Vice versa, consider the process~$\widehat{Z}_x^n(t)$ with generator~$r_n\cdot A_{x}^\mathrm{fast}$. As before, this intuitively means to consider the slow process frozen to~$x$, and to follow the fast dynamics independently of the slow dynamics. The operator~$A_x^\mathrm{fast}$ arises from our assumptions as the limit of the fast generators~$A_{x,n}^\mathrm{fast}$. Under appropriate ergodicity assumptions, the fast process converges exponentially fast to equilibrium with speed~$r_n$ in the sense that for a distribution~$\nu\in\mathcal{P}(F)$, \begin{equation*} \mathbb{P}\left[\int_0^1 \mathbf{1}_{\widehat{Z}_x^n(t)}(\cdot) \mathrm{d} t\approx \nu\right]\sim \exp\{-r_n \cdot \mathcal{I}(x,\nu)\},\quad n\to\infty. \end{equation*} The map~$\mathcal{I}(x,\cdot):\mathcal{P}(F)\to[0,\infty]$ is the Donsker-Varadhan functional. In terms of the limiting fast generator, it is given by \begin{equation}\label{SF:eq:main-results:DV-functional} \mathcal{I}(x,\nu) = -\inf_{\substack{u \in \mathcal{D}(A_x^\mathrm{fast})\\ u > 0}}\int_F \frac{A_x^\mathrm{fast}u}{u}\, \mathrm{d}\nu. \end{equation} We give more background on this type of convergence in Chapter~4, where we prove convergence to equilibrium for piecewise-deterministic processes. \smallskip The Lagrangian of Theorem~\ref{SF:thm:rate-function} admits two representations in terms of the slow Hamiltonian~$V_{x,p}(z)$ and the Donsker-Varadhan functional~$\mathcal{I}(x,\nu)$. \paragraph{Legendre dual of principal eigenvalue.} For~$(x,p)\in E\times\mathbb{R}^d$, let~$\mathcal{H}(x,p)$ be the principal eigenvalue of the operator $V_{x,p}(\cdot)+A^\mathrm{fast}_x$, meaning there exists a strictly positive function~$u:F\to(0,\infty)$ such that~$(V_{x,p}(z)+A^\mathrm{fast}_x)u(z)=\mathcal{H}(x,p) u(z)$. This Hamiltonian~$\mathcal{H}(x,p)$ admits the variational representation \begin{equation} \label{SF:eq:variational_Hamiltonian} \mathcal{H}(x,p) = \sup_{\nu \in \mathcal{P}(F)} \left\{\int V_{x,p}(z) \, \nu( \mathrm{d} z) - \mathcal{I}(x,\nu) \right\}. \end{equation} The Lagrangian is the Legendre dual \begin{equation}\label{SF:eq:Lagrangian-is-Legendre-dual} \mathcal{L}(x,v) = \sup_{p\in\mathbb{R}^d}\ip{p}{v} -\mathcal{H}(x,p). \end{equation} \paragraph{Optimization over velocities.} The Lagrangian~$\mathcal{L}$ defined by~\eqref{SF:eq:Lagrangian-is-Legendre-dual} satisfies \begin{multline}\label{SF:eq:results-Lagr-opt-proc} \mathcal{L}(x,v) = \inf \left\{ \int_F \widehat{\mathcal{L}}(x,w(z),z) \, \nu( \mathrm{d} z) + \mathcal{I}(x,\nu) \, \middle| \, \nu \in \mathcal{P}(F), \right. \\ \left. w : F \rightarrow \mathbb{R}^d \text{ $\nu$-integrable and } \int_F w(z) \, \nu( \mathrm{d} z) = v \right\}. \end{multline} We close this section by sketching how~\eqref{SF:eq:results-Lagr-opt-proc} follows from~\eqref{SF:eq:variational_Hamiltonian} and~\eqref{SF:eq:Lagrangian-is-Legendre-dual}. Starting from the latter, we find by exchanging infimum and supremum that \begin{align*} \mathcal{L}(x,v) &=\sup_{p} \inf_\nu \left[\ip{p}{v}-\int_F V_{x,p}\, \mathrm{d} \nu + \mathcal{I}(x,\nu)\right]\\ &= \inf_\nu \left[\sup_p \int_F \left(\ip{p}{w}-V_{x,p}\right)\, \mathrm{d} \nu + \mathcal{I}(x,\nu)\right], \end{align*} for any~$w$ averaging to~$v$. Passing the supremum inside the integral gives~\eqref{SF:eq:results-Lagr-opt-proc}. \subsection{Mean-field coupled to fast diffusion} \label{SF:sec:mean-field-fast-diffusion} In this section, we provide a large-deviation result for mean-field interacting jump processes coupled to a fast diffusion process. Concretely, we take the simultaneous limit of infinitely many particles and inifinte time-scale separation, and are interested in the large deviations of the empirical density-flux pairs of the mean-field system. For formulating the large-deviation result by Theorem~\ref{SF:thm:LDP-mean-field} below, we first introduce the processes~$X_t^n$ (Eq.~\eqref{SF:eq:def:density-flux} below) and~$Z_t^n$ (Eq.~\eqref{SF:eq:intro-mean-field:fast-generator} below) independently from one another, and then consider the coupling. We start with describing the mean-field system. \paragraph{The slow process: mean-field system.} The mean-field system of~$n$ particles is described by~$n$ weakly-interacting jump processes on a finite state space. That means every jump process~$Y_{n,i}$ takes values in~$\{1,\dots,q\}$, for~$i=1,\dots,n$. We collect the states of all particles in a vector \begin{equation*} Y_n(t) := (Y_{n,1}(t),\dots,Y_{n,n}(t)) \in \{1,\dots,q\}^n. \end{equation*} Each jump process can jump over an edge~$(a,b)$; for the set of directed edges in~$\{1,\dots,q\}$, we write $\Gamma = \left\{(a,b) \in \{1,\dots,q\}^2 \, \middle| \, a \neq b \right\}$. We assume that only one particle can jump at a time. The time-evolution of~$Y_n$ is specified by jump rates~$r(a,b)$ attached to each bond~$(a,b)\in \Gamma$. To incorporate the assumption of \emph{weak interactions}, the jump rates are assumped to depend on the configuration of the particles only via their distribution. More specifically, consider the \emph{empirical density} \begin{equation*} \mu_n(Y_n(t)) := \frac{1}{n}\sum_{i=1}^n\delta_{Y_{n,i}(t)}\in\mathcal{P}(\{1,\dots,q\}). \end{equation*} Then the transitions of~$Y_n$ as a jump process on~$\{1,\dots,q\}^n$ are determined by a family of rates~$\{r_n(a,b,\mu):(a,b)\in\Gamma,\mu\in\mathcal{P}(\{1,\dots,q\}\}$. For fixed~$\mu$, the scalar~$r_n(a,b,\mu)\geq 0$ is the rate at which transitions from~$a$ to~$b$ occur when the empirical density is in configuration~$\mu$. Put differently, if the particles are in configuration~$Y_n(t)$, then the jump~$Y_{n,i}(t)\to b$ of the i'th particle occurs at rate \begin{equation*} r_n\left(Y_{n,i}(t),b,\mu_n(Y_n(t)\right). \end{equation*} Next to the empirical density, we keep track of the number of jumps that occured over each bond. To that end, let~$t \mapsto W_{n,i}(t) \in \mathbb{N}^\Gamma$ be the process counting the number of times the i'th particle jumps over each bond, \begin{equation*} W_{n,i}(t)(a,b) := \#\left\{0\leq s \leq t \, \middle| \, \left(X_{n,i}(s-), X_{n,i}(s)\right) = (a,b) \right\}. \end{equation*} We regard~$W_{n,i}(t)$ as a random vector taking values in~$\mathbb{N}^\Gamma$. The average fluxes over all bonds are captured by the \emph{empirical flux}~$W_{n}$ defined as \begin{equation*} W_n(t) :=\frac{1}{n}\sum_{i=1}^nW_{n,i}(t). \end{equation*} The slow process we are interested in is the pair of empirical density and flux, \begin{equation}\label{SF:eq:def:density-flux} X_t^n := \left(\mu_n(Y_n(t)),W_n(t)\right) \in E:= \mathcal{P}(\{1,\dots,q\}) \times [0,\infty)^\Gamma, \end{equation} which we will refer to as the \emph{density-flux process}. We write~$x$ for the variables in~$E$, which are pairs~$x=(\mu,w)$ of configurations~$\mu\in\mathcal{P}(\{1,\dots,q\})$ and average fluxes~$w\in[0,\infty)^\Gamma$. We identify the probability measures~$\mathcal{P}(\{1,\dots,q\})$ with the simplex in~$\mathbb{R}^q$, \begin{equation*} \{\mu\in\mathbb{R}^q\,:\, \sum_{i=1}^q \mu_i = 1,\,\mu_i\geq 0\}, \end{equation*} equipped with the Euclidean topology inherited from~$\mathbb{R}^d$, so that convergence in the simplex coincides with weak convergence in~$\mathcal{P}(\{1,\dots,q\})$. We also identify the~$n$-atomic measures $P_n:=\{(1/n)\sum_{i=1}^n\delta_{q_i}\,:\,q_i\in\{1,\dots,q\}\}$ with the simplex intersected with~$(1/n)\mathbb{Z}^q$. We sometimes write~$\mu_i=\mu(i)$. \smallskip Finally, we describe the generator of~$X_t^n$. If~$\mu_n(Y_n(t))=:\mu$, then the transition of a particle from~$a$ to~$b$ occurs at rate~$r_n(a,b,\mu)$. The number of particles in state~$a$ is $n\cdot \mu(a)$. Hence the rate at which the configuration~$\mu$ transitions to the configuration $\mu + (\delta_b-\delta_a)/n$ is given by~$n\cdot \mu(a)\cdot r_n(a,b,\mu)$. Therefore, the generator~$A_n^\mathrm{slow}:C_b(E)\to C_b(E)$ of the jump process~$X_t^n$ is \begin{equation}\label{SF:eq:intro-mean-field:slow-generator} A_n^\mathrm{slow} f(x) = \sum_{a,b;a\neq b} n\cdot \mu(a)\cdot r_n(a,b,\mu)\left[f(x_{a\to b}^n)-f(x)\right], \end{equation} where for a state~$x=(\mu,w)\in E$, we denote by~$x_{a\to b}^n$ the state after the jump. Since after the jump, exactly one particle has changed its state from~$a$ to~$b$, \begin{equation*} x_{a\to b}^n = \left(\mu + \frac{1}{n}(\delta_b-\delta_a), w+\frac{1}{n}\delta_{(a,b)}\right). \end{equation*} \paragraph{The fast process: drift-diffusion.} The process $Z_t^n$ is a drift-diffusion process on the flat torus~$F=\mathbb{T}^m$, some~$m\in\mathbb{N}$. While our arguments that concern~$Z_t^n$ also hold true on a closed, smooth, compact, connected manifold, we do not consider this generalization in order to avoid geometric discussions. The generator of~$Z_t^n$ is a second-order uniformly-elliptic differential operator given by \begin{equation}\label{SF:eq:intro-mean-field:fast-generator} A_n^\mathrm{fast} f(z) = \sum_{i=1}^m b_n^i(z)\partial_i f(z) + \sum_{ij=1}^ma_n^{ij}(z)\partial_i\partial_j f(z), \end{equation} where~$a_n(z) = \sigma_n(z)\sigma_n(z)^T$ are symmetric positive-definite matrices and~$b_n(z)$ are vector fields. The domain~$\mathcal{D}(A^\mathrm{fast})$ of~$A_n^\mathrm{fast}$ is independent of~$n$ and is dense in~$C(F)$. In one dimension,~$\mathcal{D}(A^\mathrm{fast})=C^2(F)$, while for any dimension~$m\geq 2$, the domain is larger. On functions~$f\in C^2(F)$ however, the action of the generator is always given by~\eqref{SF:eq:intro-mean-field:fast-generator}. For details on the construction of the process from the operator, we refer to Ikeda's and Watanabe's monograph~\cite[Theorem~IV.6.1]{IkedaWatanabe2014} and the discussion thereafter. \paragraph{The coupled slow-fast system.} We described two processes above. First, the density-flux process~$X_t^n$ given in terms of jump rates~$r_n(a,b,\mu)$, whose generator~$A_n^\mathrm{slow}$ is a pure jump process on a finite subset of~$E$. Secondly, the drift-diffusion process~$Z_t^n$ defined in terms of drifts~$b_n^i(z)$, diffusion-coefficient matrices~$\sigma_n(z)$, and the generator~$A_n^\mathrm{fast}$. In order to obtain a coupled system, we consider coefficients depending on both slow and fast variables: \begin{enumerate}[label=(\roman*)] \item The jump rates are in addition~$z$-dependent,~$r_n=r_n(a,b,\mu,z)$. \item The drifts and diffusion-coefficients are in addition~$x$-dependent, meaning $b_n^i=b_n^i(x,z)$ and~$\sigma_n^{ij}=\sigma_n^{ij}(x,z)$. \end{enumerate} The pair~$(X_t^n,Z_t^n)$ we want to obtain is an example of coupling a jump process to a drift-diffusion process. The following regularity condition is imposed in order to ensure that we obtain a Feller-continuous process~$(X_t^n,Z_t^n)$ solving the martingale problem~\cite[Theorem~2.1, Section~2.5 and Theorem~2.18]{YinZhu2009}. \begin{condition}[Regularity]\label{SF:condition:mean-field:reg-coefficients} For each~$i,j\in 1$,~$n=1,2,\dots$, we have: \begin{enumerate}[label=(\arabic*)] \item For each~$x\in E$,~$a_n^{ij}(x,\cdot)\in C^2(F)$ and~$b_n^i(x,\cdot)\in C^1(F)$. \item There is a constant~$C>0$ such that $\ip{a_n(x,z)\xi}{\xi}\geq C|\xi|^2$ for all~$\xi\in T_z F$ and for all~$(x,z)\in E\times F$. \item For each~$(a,b)\in\Gamma$, the jump rates~$r_n(a,b,\mu,z)$ depend continuously on~$(\mu,z)$, and $r_n(a,b,\mu,\cdot)\in C^1(F)$ for each~$\mu\in E$. \qed \end{enumerate} \end{condition} Accordingly, we consider the operators~$A_{n,z}^\mathrm{slow}$ and~$A_{n,x}^\mathrm{fast}$ by replacing the coeffients in~\eqref{SF:eq:intro-mean-field:slow-generator} and~\eqref{SF:eq:intro-mean-field:fast-generator}, \begin{align} A_{n,z}^\mathrm{slow} g(x) &:= \sum_{a,b;a\neq b} n\cdot \mu(a)\cdot r_n(a,b,\mu,z)\left[g(x_{a\to b})-g(x)\right],\\ A_{n,x}^\mathrm{fast} h(z) &:= \sum_i b_n^i(x,z)\partial_i h(z) + \sum_{ij}a_n^{ij}(x,z)\partial_i\partial_j h(z). \end{align} Furthermore, we let the diffusion process run on the time-scale of order~$n$. The generator~$A_n$ of the couple~$(X_t^n,Z_t^n)$ is \begin{equation}\label{SF:eq:intro-mean-field:generator-slow-fast} A_n f(x,z) := A_{n,z}^\mathrm{slow}f(\cdot,z)(x) + n\cdot A_{n,x}^\mathrm{fast}f(x,\cdot)(z). \end{equation} We obtained a two-component process~$(X^n,Z^n)\in D_{E\times F}[0,\infty)$ with generator~$A_n$. The diffusion process~$Z^n$ is running at a time-scale or order~$n$ faster compared to the density-flux process~$X^n$. Therefore we refer to~$Z^n$ as the fast process and to~$X^n$ as the slow process. \paragraph{Large deviations of the slow component.} We take the limit~$n\to\infty$ and ask the following questions: does the density-flux process~$X_t^n$ satisfy a large deviation principle in~$D_E[0,\infty)$ under the influence of the fast diffusion process~$Z^n$? How exactly does the fast process affect the large-deviation fluctuations of the particle system? We answer these questions by Theorem~\ref{SF:thm:LDP-mean-field}. \smallskip A large-deviation result can only be expected if the jump rates of the particle system and the coefficients of the diffusion process converge as~$n\to\infty$. We work under the following convergence assumptions. \begin{assumption}[Convergence of rates]\label{SF:mean-field:conv-rates} There is a kernel~$r=r(a,b,\mu,z)$ such that for each edge~$(a,b)\in\Gamma$, \begin{equation*} \lim_{n\to\infty}\sup_{\mu\in \mathcal{P}_n}\sup_{z\in F}\left| r_n(a,b,\mu,z)-r(a,b,\mu,z)\right| = 0. \end{equation*} There are constants~$0<r_\mathrm{min}\leq r_{\mathrm{max}}<\infty$ such that for all edges~$(a,b)\in\Gamma$ satisfying~$\sup_{\mu,z}r(a,b,\mu,z)>0$, we have \begin{equation*} r_\mathrm{min}\leq \inf_{\mu,z}r(a,b,\mu,z) \leq \sup_{\mu,z}r(a,b,\mu,z) \leq r_\mathrm{max}. \end{equation*} \end{assumption} \begin{assumption}[Convergence of coefficients]\label{SF:mean-field:conv-coeff} For each~$i,j$, there are functions~$b^i$ and~$\sigma^{ij}$ on~$E\times F$ such that whenever~$x_n=(\mu_n,w_n)\to (\mu,w)$, then \begin{equation*} \|b^i(\mu,\cdot)-b_n^i(x_n,\cdot)\|_{F}\to 0\quad\text{and}\quad \|\sigma^{ij}(\mu,\cdot)-\sigma_n^{ij}(x_n,\cdot)\|_{F}\to 0, \end{equation*} where~$\|g\|_F=\sup_F|g|$. The maps~$\mu\mapsto\sigma^{ij}(\mu,\cdot)$ are continuous as functions from~$\mathcal{P}(\{1,\dots,q\})$ to~$C(F)$ equiped with the uniform norm.\qed \end{assumption} \begin{theorem}[Large deviations of the density-flux process] \label{SF:thm:LDP-mean-field} Let~$(X^n,Z^n)$ be the Markov process with generator~\eqref{SF:eq:intro-mean-field:generator-slow-fast}. Suppose that Assumptions~\ref{SF:mean-field:conv-rates} and~\ref{SF:mean-field:conv-coeff} hold true and that $X^n(0)$ satisfies a large deviation principle with good rate function $J_0:E\to[0,\infty]$ on $E = \mathcal{P}(\{1,\dots,q\}) \times [0,\infty)^\Gamma$. \smallskip Then $\{X^n\}_{n = 1,2\dots}$ satisfies a large deviation principle on $D_{E}[0,\infty)$ with good rate function $J$ given by \begin{equation*} J(x) = \begin{cases} J_0(\gamma(0)) + \int_0^\infty \mathcal{L}(\gamma(t),\partial_t \gamma(t)) \mathrm{d} t & \text{if } \gamma \in \mathcal{A}\mathcal{C}([0,\infty);E), \\ \infty & \text{otherwise}, \end{cases} \end{equation*} where the Lagrangian $\mathcal{L} : E \times \mathbb{R}^d \rightarrow [0,\infty]$ satisfies the two representations shown below.\qed \end{theorem} As in the general large-deviation result (Theorem~\ref{SF:thm:rate-function}), the Lagrangian admits two characterizations. To fix notation, a path~$\gamma:[0,\infty)\to E$ is a time-dependent pair~$\gamma_t=(\mu_t,w_t)\in \mathcal{P}(\{1,\dots,q\})\times[0,\infty)^\Gamma$, where we identify the probability measures with the simplex in~$\mathbb{R}^q$. The set~$E$ is a subset of~$\mathbb{R}^d$ with dimension~$d=q+|\Gamma|$. \smallskip We use the terminology from Section~\ref{SF:sec:result:general-LDP} to formulate the Lagrangian in terms of the following ingredients. The slow Hamiltonian; for~$(x,p)\in E\times \mathbb{R}^d$, \begin{equation*} V_{x,p}(z) = \sum_{ab}\mu_ar(a,b,\mu,z)\left[e^{p_b-p_a + p_{ab}}-1\right]. \end{equation*} The Donsker-Varadhan functional; for~$x\in E$, \begin{equation*} \mathcal{I}(\mu,\pi) = -\inf_{\substack{u>0\\u\in C^2(F)}} \int_F \frac{A_\mu^\mathrm{fast}u}{u}\, \mathrm{d}\pi, \end{equation*} where~$A_\mu^\mathrm{fast}u(z) := \sum_i b^n(\mu,z)\partial_i u(z) + \sum_{ij} a^{ij}(\mu,z)\partial_i u(z)\partial_j u(z)$. The relative entropy function $S(a|b)$, \begin{equation*} S(a \, | \, b) := \begin{cases} b & \text{if } a = 0, \\ a \log \left(a/b\right) - (a-b) & \text{if } a \neq 0, b \neq 0, \\ +\infty & \text{if } a \neq 0, b = 0. \end{cases} \end{equation*} \paragraph{Dual of principal eigenvalue.} For~$(x,v)\in E\times\mathbb{R}^d$, the Lagrangian~$\mathcal{L}(x,v)$ is the Legendre dual~$\mathcal{L}(x,v)=\sup_{p\in\mathbb{R}^d}\ip{p}{v}-\mathcal{H}(x,p)$, where the Hamiltonian is the principal eigenvalue of ~$(V_{x,p}+A_x^\mathrm{fast})$. The Hamiltonian satisfies the variational formula~\eqref{SF:eq:variational_Hamiltonian} from Section~\ref{SF:sec:result:general-LDP}.\qed \paragraph{Optimizing over velocities.} For a path~$\gamma:[0,\infty)\to E$,~$\gamma=(\mu,w)$, the Lagrangian~$\mathcal{L}$ is finite only if $\partial_t\mu_a = \sum_b \partial_t (w_{ba}-w_{ab})$. If this is the case, then \begin{equation*} \mathcal{L}\left(\gamma,\partial_t\gamma\right) = \inf_{\pi \in \mathcal{P}(F)} \inf_{u \in \Phi(\partial_tw,\pi)} \left\{ \sum_{(a,b) \in \Gamma} \int_F S(u_{ab}(z)\,|\, \mu_a r(a,b,\mu,z)) \pi( \mathrm{d} z) + \mathcal{I}(\mu,\pi) \right\}, \end{equation*} where $\Phi(\partial_tw,\pi)$ is the set of measurable functions $u_{ab}(z)$ for $z \in F$ and $(a,b) \in \Gamma$ such that~$\int u_{ab}(z) \pi( \mathrm{d} z) = \partial_t w_{ab}$.\qed \subsection{Averaging principles} \label{SF:sec:averaging-principles} We discuss the consequences of the pathwise large-deviation theorems. \paragraph{Mean-field system.} We consider the coupled system~$(X^n,Z^n)$ introduced in Section~\ref{SF:sec:mean-field-fast-diffusion}. The pair~$(X^n,Z^n)$ corresponds to the mean-field interaction particles coupled to fast diffusions. The density-flux pair~$X^n=(\rho^n,w^n)$ of the particle-system is a stochastic process in~$D_E[0,\infty)$, where the state space is given by~$E=\mathcal{P}(\{1,\dots,q\})\times[0,\infty)^\Gamma$. \smallskip If the particles are not coupled to the fast diffusion process, then in the limit of large numbers, the evolution of the particle density~$\rho^n$ is characterzied as the solution to a nonlinear ODE, which may be regarded as the finite-dimensional analogue of the McKean-Vlasov equation. We formulate the result in terms of freezing the diffusion process to a value~$z\in F$ and the transition-rate matrix~$R(\rho,z)$ of a jump process with rates~$r(a,b,\rho,z)$, that is \begin{equation*} R_{ab}(\rho,z)=r(a,b,\rho,z)\;\; (a\neq b)\qquad\text{and}\qquad R_{aa}(\rho,z)= -\sum_{b\neq a} r(a,b,\rho,z). \end{equation*} We write~$\rho R$ for the vector with components~$(\rho R)_a=\sum_{b}\rho_bR_{ba}$. \begin{proposition}[Law of Large Number limit of mean-field interacting particles] Let~$X^n=(\rho^n,w^n)$ be the density-flux process from~$\eqref{SF:eq:def:density-flux}$ with jump rates given by~$r_n(a,b,\cdot,z)$ for some fized~$z\in F$. If the initial density~$\rho^n(0)$ converges in probability to a distribution~$\mu\in\mathcal{P}(\{1,\dots,q\})$, then~$\rho^n$ converges uniformly on compact time intervals to a solution of \begin{equation*} \partial_t\rho = \rho R(\rho,z),\quad \rho(0)=\mu, \end{equation*} where~$R(\rho,z)$ is the transition-rate matrix of a jump process with rates~$r(a,b,\rho,z)$. \end{proposition} Budhiraja, Dupuis, Fischer and Ramanan proof of this statement~\cite[Theorem~2.2]{BudhirajaDupuisFischerRamanan2015} based on a classical convergence Theorem by Kurtz~\cite{Kurtz1970}. Under a Lipschitz condition on the limiting rates, the limit is unique. \smallskip Under the influence of the fast diffusion, we prove the limiting evolution to be altered according to the averaging principle. \begin{theorem}[Averaging Principle]\label{SF:thm:mean-field-averaging} Let~$(X^n,Z^n)$ be the slow-fast system from Theorem~\ref{SF:thm:LDP-mean-field}, with~$X^n=(\rho^n,w^n)$ and initial condition~$\rho^n(0)\to \mu\in\mathcal{P}(\{1,\dots,q\}$ weakly as~$n\to\infty$. Let~$\pi_\nu\in\mathcal{P}(F)$ be the unique measure satisfying~$\mathcal{I}(\nu,\pi_\nu)=0$. Then~$\rho^n$ converges a.s. with respect to the Skorohod topology to a solution of \begin{equation}\label{SF:averaging-principles:mean-field:limit-evol} \partial_t\rho = \rho \widehat{R}(\rho),\quad \rho(0) = \mu. \end{equation} The transition-rate matrix~$\widehat{R}(\rho)$ is an averaged matrix, componentwise given by \begin{equation}\label{SF:eq:averaging-principle:mean-field:R-hat} \widehat{R}_{ab}(\rho) = \int_F R_{ab}(\rho,z)\,\pi_\rho( \mathrm{d} z). \end{equation} \end{theorem} If~$\widehat{R}$ is Lischitz continuous, then the averaged McKean-Vlasov equation~\eqref{SF:averaging-principles:mean-field:limit-evol} has a unique solution. In that case, the minimizer of the rate function is unique, and the pathwise large deviation principle of Theorem~\ref{SF:thm:LDP-mean-field} implies that~$\rho^n$ converges to the solution. In general, if the rate function has multiple minimizers, then the large deviation principle does not contain enough information to determine the limit. \begin{proof}[Proof of Theorem~\ref{SF:thm:mean-field-averaging}] We show that any density~$\rho$ of the minimizer~$x=(\rho,w)$ of the rate function~$J$ solves~\eqref{SF:averaging-principles:mean-field:limit-evol}. If~$J(\rho,w)=0$, then~$\mathcal{L}(x(t),\partial_t x(t))=0$ for a.e.~$t>0$, where the Lagrangian~$\mathcal{L}$ is given by \begin{equation*} \mathcal{L}\left(x,\partial_tx\right) = \inf_{\pi \in \mathcal{P}(F)} \inf_{u \in \Phi(\partial_tw,\pi)} \left\{ \sum_{(a,b) \in \Gamma} \int_F S(u_{ab}(z)\,|\, \rho_a r(a,b,\rho,z)) \pi( \mathrm{d} z) + \mathcal{I}(\rho,\pi) \right\}, \end{equation*} and by finiteness of the Lagrangian, \begin{equation}\label{SF:eq:proof:averaging-principle:mean-field:rho} \partial_t\rho_a = \sum_b \partial_t (w_{ba}-w_{ab}). \end{equation} In the formula for the Lagrangian, all terms inside the infimum are non-negative. Hence for any~$u\in\Phi(\partial_tw,\pi)$ and~$\pi\in\mathcal{P}(F)$, the expression is only zero if we have~$\mathcal{I}(\rho,\pi)=0$. Therefore~$\pi=\pi_\rho$, and \begin{equation*} 0=\mathcal{L}(x,\partial_tx) = \inf_{u\in\Phi(\partial_tw,\pi_\rho)}\sum_{ab} \int_F S\left(u_{ab}(z)\,|\rho_a r(a,b,\rho,z)\right)\,\pi_\rho( \mathrm{d} z). \end{equation*} Since~$S(r,s)=0$ if and only if~$r=s$, any optimizer~$u_{ab}(\cdot)$ satisfies \begin{equation}\label{SF:eq:proof:averaging-principle:mean-field:uab} u_{ab}(z)=\rho_ar(a,b,\rho,z)\qquad \pi_\rho\,\mathrm{a}.\mathrm{e}, \end{equation} and by definition of the set~$\Phi(\partial_tw,\pi_\rho)$, \begin{equation}\label{SF:eq:proof:averaging-principle:mean-field:wab} \partial_tw_{ab}=\int_F u_{ab}(z)\,\pi_\rho( \mathrm{d} z). \end{equation} Combining these equalities, we find \begin{align*} \partial_t \rho_a &\overset{\eqref{SF:eq:proof:averaging-principle:mean-field:rho}}{=} \sum_{b\neq a} \partial_t (w_{ba}-w_{ab})\\ &\overset{\eqref{SF:eq:proof:averaging-principle:mean-field:wab}}{=} \sum_{b\neq a} \int_F (u_{ba}-u_{ab})\,\pi_\rho( \mathrm{d} z)\\ &\overset{\eqref{SF:eq:proof:averaging-principle:mean-field:uab}}{=} \sum_{b\neq a} \left[\rho_b\int_F r(b,a,\rho,z)\pi_\rho( \mathrm{d} z) -\rho_a \int_F r(a,b,\rho,z)\pi_\rho( \mathrm{d} z)\right] \\ &\overset{\eqref{SF:eq:averaging-principle:mean-field:R-hat}}{=} \sum_{b\neq a}\rho_b \widehat{R}_{ba}(\rho) + \rho_a\widehat{R}_{aa}(\rho)\stackrel{\mathclap{\text{def}}}{=} (\rho\widehat{R}(\rho))_a, \end{align*} which finishes the proof. \end{proof} The conclusion of Theorem~\ref{SF:thm:mean-field-averaging} remains true when replacing the fast diffusion process by a fast jump process on a finite state space~$\{1,\dots,m\}$. Then the limiting averaged matrix is simply obtained from the equilibrium measure~$\pi=(\pi_1,\dots,\pi_m)$ of the fast jump process as \begin{equation*} \widehat{R}(\rho) = \sum_{i=1}^m R(\rho,i)\pi_i. \end{equation*} \section{Assumptions of general large-deviation theorem} \label{SF:sec:assumptions:general-LDP-theorem} Here we collect the assumptions underlying Theorems~\ref{SF:thm:LDP_general} and~\ref{SF:thm:rate-function}. We pose all assumptions in terms of the slow-fast generators~$A_n$ given by~\eqref{SF:eq:setting:generator-slow-fast-system}, that is \begin{equation*} A_n f(y,z) = A^\mathrm{slow}_{n,z} f(\cdot,z) (y) + r_n \cdot A^\mathrm{fast}_{n,y} f(y,\cdot)(z). \end{equation*} The assumptions cluster in three groups, where each group corresponds to one step in the large-deviation proof: \begin{enumerate}[label=(\roman*)] \item Convergence of nonlinear generators. \item Comparison principle of a limiting Hamilton-Jacobi equation. \item Action-integral form of the rate function. \end{enumerate} We make these steps precise when explaining the strategy of proof in Section~\ref{SF:sec:proof-general-LDP-Theorem:strategy-of-proof}. Below, Assumptions~\ref{SF:assumption:convergence-slow-nonlinear-generators} and~\ref{SF:assumption:convergence-fast-nonlinear-generators} correspond to the convergence of nonlinear generators, Assumptions~\ref{SF:assumption:principal-eigenvalue-problem},~\ref{SF:assumption:regularity-V} and~\ref{SF:assumption:regularity-I} are used to prove the comparison principle, and finally Assumption~\ref{SF:assumption:Hamiltonian_vector_field} is made in order to obtain the action-integral form of the rate function. \smallskip Recall the setting from Condition~\ref{SF:condition:compact_setting:state-spaces}: the slow-fast process~$(X^n,Z^n$) takes values in the product space~$E_n\times F$. The spaces~$E_n$ are continuously embedded into a Polish space~$E\subseteq{R}^d$ with a map~$\eta_n:E_n\to E$, and the space~$F$ are compact Polish spaces. \smallskip We first state the two assumptions concerning the convergence of non-linear transforms~$H_n$ of the generator~$A_n$, defined by~$H_nf=(1/n)e^{-nf}A_ne^{nf}$. We assume the slow and fast parts to converge independently. \begin{assumption}[Convergence of slow non-linear generators] \label{SF:assumption:convergence-slow-nonlinear-generators} Let $D_0$ be a linear space $C_c^\infty(E) \subseteq D_0 \subseteq C_b^1(E)$ satisfying the following: \begin{enumerate}[label=(\roman*)] \item For any $n$, $z \in F$ and $f \in D_0$, $z \in F$ we have $e^{r_n f} \in \mathcal{D}(A_{n,z}^{slow})$ and \begin{equation*} \sup_{n}\sup_{x \in E_n,z \in F} \left|\frac{1}{r_n} e^{-r_nf(x,z)} A_{n,z}^\mathrm{slow} e^{r_nf(\cdot,z)(x)} \right| < \infty; \end{equation*} \item There exist continuous functions $V_{x,p} : F \to \mathbb{R}$, where $x \in E$ and $p \in \mathbb{R}^d$, such that for any $f \in D_0$ and all compact sets $K \subseteq E$ \begin{align*} \sup_{ x \in \eta_n^{-1}(K), z \in F} \left| \frac{1}{r_n} e^{-r_nf(x)} \left(A_{n,z}^\mathrm{slow} e^{r_nf(\cdot)}\right)(x) - V_{\eta_n(x),\nabla f(\eta_n(x))}(z) \right| \to 0. \tag*\qed \end{align*} \end{enumerate} \end{assumption} We refer to the function~$V_{x,p}(z)$ as the \emph{slow Hamiltonian}. \begin{assumption}[Convergence of fast non-linear generators] \label{SF:assumption:convergence-fast-nonlinear-generators} For every~$x\in E$, there exists an operator~$A_x^\mathrm{fast}$ with the following properties. For any~$g\in \mathcal{D}(A^\mathrm{fast})$,~$x_n \in E_n$ and~$g_n \in\mathcal{D}(A^\mathrm{fast})$ such that~$\eta_n(x_n)\to x$ and~$g_n\to g$ uniformly on~$F$, we have \begin{equation*} \|A^\mathrm{fast}_xg-A^\mathrm{fast}_{n,\eta_n(x_n)}g_n\|_F\to 0. \end{equation*} Furthermore, for any~$\phi\in \mathcal{D}(A^\mathrm{fast})$, \begin{align*} \sup_{n}\sup_{y\in E_n}\|e^{-\phi(z)} \left(A^\mathrm{fast}_{n,y} e^{-\phi}\right)(z)\|_F < \infty. \tag*\qed \end{align*} \end{assumption} With the above two convergence assumptions, we will obtain a limit operator~$H$ defined in terms of a graph~$H\subseteq C_b(E)\times C_b(E\times F)$. The precise definition of~$H$ is given in Definition~\ref{SF:def:multi-valued-limit:general}. The next three assumptions are imposed in order to prove the comparison principle of the Hamilton-Jacobi equation with this Hamiltonian~$H$. \smallskip For the first assumption, consider the Hamiltonian~$\mathcal{H}(x,p)$ defined by~\eqref{SF:eq:variational_Hamiltonian}; given the slow Hamiltonian~$V_{x,p}$ and the limit generator~$A^\mathrm{fast}$, \begin{equation}\label{SF:eq:sec-assumption:H} \mathcal{H}(x,p) = \sup_{\pi \in \mathcal{P}(F)} \left\{\int V_{x,p}(z) \, \pi( \mathrm{d} z) - \mathcal{I}(x,\pi) \right\}, \end{equation} where~$\mathcal{I}$ is the Donsker-Varadhan rate functional~\eqref{SF:eq:main-results:DV-functional}. \begin{assumption}[Approximative solution to a principal-eigenvalue problem] \label{SF:assumption:principal-eigenvalue-problem} Let~$(x,p)\in E\times\mathbb{R}^d$. The limit~$V_{x,p}$ from Assumption~\ref{SF:assumption:convergence-slow-nonlinear-generators} and the operators~$A^\mathrm{fast}_x$ from Assumption~\ref{SF:assumption:convergence-fast-nonlinear-generators} satisfy the following. \begin{enumerate}[label=($\mathcal{E}$\arabic*)] \item \label{SF:item:assumption:PI:domain} For any $\Phi$ such that $e^\Phi\in\mathcal{D}(A^\mathrm{fast})$, we have $e^{(1-\varepsilon)\Phi} \in \mathcal{D}(A^\mathrm{fast})$ for any~$0<\varepsilon<1$. \item \label{SF:item:assumption:PI:solvePI} For every $\delta > 0$ there exists a strictly positive function $u_\delta \in \mathcal{D}(A^\mathrm{fast})$ on~$F$ satisfying \begin{align*} \sup_{z \in F} \left| \left( V_{x,p}(z) + A^\mathrm{fast}_x \right) u_\delta(z) - \mathcal{H}(x,p) u_\delta(z) \right| \leq \delta. \tag*\qed \end{align*} \end{enumerate} \end{assumption} The second part of Assumption~\ref{SF:assumption:principal-eigenvalue-problem} is satisfied if the principal-eigenvalue problem for the operator~$V_{x,p}+A_x^\mathrm{fast}$ is well-posed, where~$V_{x,p}$ acts via multiplication. By principal-eigenvalue problem, we mean the existence of a strictly positive function~$u$ in the domain of~$A_x^\mathrm{fast}$ and an eigenvalue~$\lambda\in\mathbb{R}$ such that $(V_{x,p}+A_x^\mathrm{fast})u=\lambda u$ holds pointwise on~$F$. If the principal-eigenvalue problem is well-posed, then~$\lambda=\mathcal{H}(x,p)$ by a result of Donsker and Varadhan~\cite{DonskerVaradhan75}. \smallskip We impose the next two assumptions on~$V$ and~$\mathcal{I}$ in order to verify the comparison principle for Hamilton-Jacobi equations involving the above Hamiltonian~$\mathcal{H}(x,p)$. The assumptions are derived from~\cite{KraaijSchlottke2019} (Chapter~6), where we prove the comparison principle for Hamiltonians of the type~\eqref{SF:eq:sec-assumption:H}. \begin{assumption}[Regularity of the slow Hamiltonian]\label{SF:assumption:regularity-V} The slow Hamiltonian from Assumption~\ref{SF:assumption:convergence-slow-nonlinear-generators}, that is the map~$V:E\times\mathbb{R}^d\times F\to\mathbb{R}$, satisfies: \begin{enumerate}[label=($V$\arabic*)] \item \label{SF:item:assumption:slow_regularity:continuity} For every $(x,p)$ we have $V_{x,p} \in C(F)$, and the map $(x,p) \mapsto V_{x,p}$ is continuous on $C(F)$ for the supremum norm. \item \label{SF:item:assumption:slow_regularity:convexity} For any $x \in E$ and $z \in F$, the map $p \mapsto V_{x,p}(z)$ is convex. Furthermore, we have $V_{x,0}(z) = 0$ for all $x,z$. \item \label{SF:item:assumption:slow_regularity:compact_containment} There exists a continuous containment function $\Upsilon : E \to [0,\infty)$ in the sense of Definition~\ref{def:results:compact-containment}. \item \label{SF:item:assumption:slow_regularity:continuity_estimate} The function $\Lambda(x,p,\nu) := \int V_{x,p}(z) \, \nu( \mathrm{d} z)$ on~$E\times\mathbb{R}^d\times\mathcal{P}(F)$ satisfies the continuity estimate~\cite[Definition~4.14]{KraaijSchlottke2019}. A definition of the continuity estimate is given in~\ref{def:results:continuity_estimate}. \item \label{SF:item:assumption:slow_regularity:controlled_growth} For every compact set $K \subseteq E$, there exist constants $M, C_1, C_2 \geq 0$ such that for all $x \in K$, $p \in \mathbb{R}^d$ and all $z_1,z_2\in F$, \begin{align*} V_{x,p}(z_1) \leq \max\left\{M,C_1 V_{x,p}(z_2) + C_2\right\}. \tag*\qed \end{align*} \end{enumerate} \end{assumption} The conditions~\ref{SF:item:assumption:slow_regularity:continuity},~\ref{SF:item:assumption:slow_regularity:convexity} follow from the convergence in Assumption~\ref{SF:assumption:convergence-slow-nonlinear-generators}. We state them nevertheless to clearify the connection to~\cite{KraaijSchlottke2019}. \begin{assumption}[Regularity of the Donsker-Varadhan functional]\label{SF:assumption:regularity-I} The functional $\mathcal{I}:E\times\mathcal{P}(F) \to [0,\infty]$ from~\eqref{SF:eq:main-results:DV-functional} satisfies the following. \begin{enumerate}[label=($\mathcal{I}$\arabic*)] \item \label{SF:item:assumption:I:lsc} The map $(x,\nu) \mapsto \mathcal{I}(x,\nu)$ is lower semi-continuous on $E \times \mathcal{P}(F)$. \item \label{SF:item:assumption:I:zero-measure} For any $x\in E$, there exists a point $\nu_x\in\mathcal{P}(F)$ such that $\mathcal{I}(x,\nu_x) = 0$. \item \label{SF:item:assumption:I:compact-sublevelsets} For any $x \in E$, compact set $K \subseteq E$ and $C \geq 0$ the set $\left\{\nu \in \mathcal{P}(F) \, \middle| \mathcal{I}(x,\nu) \leq C\right\}$ is compact and $\cup_{x\in K}\left\{\nu \in \mathcal{P}(F) \, \middle| \, \mathcal{I}(x,\nu) \leq C\right\}$ is relatively compact. \item \label{SF:item:assumption:I:finiteness} For any converging sequence $x_n \to x$ in $E$ and sequence $\nu_n \in \mathcal{P}(F)$, if there is an $M > 0$ such that $\mathcal{I}(x_n,\nu_n) \leq M < \infty$ for all $n \in \mathbb{N}$, then there exists a neighborhood $U_x$ of $x$ and a constant $M' > 0$ such that for any $y \in U_x$ and $n \in \mathbb{N}$, \begin{equation*} \mathcal{I}(y,\nu_n) \leq M' < \infty. \end{equation*} \item \label{SF:item:assumption:I:equi-cont} For every compact set $K \subseteq E$ and each $M \geq 0$ the collection of functions $\{\mathcal{I}(\cdot,\nu)\}_{\nu \in \mathcal{P}(F)_M}$ with \begin{equation*} \mathcal{P}(F)_{M} := \left\{\nu \in \mathcal{P}(F) \, \middle| \, \forall \, x \in K: \, \mathcal{I}(x,\nu) \leq M \right\} \end{equation*} is equicontinuous. That is: for all $\varepsilon > 0$, there is a $\delta > 0$ such that for all $\nu \in \mathcal{P}(F)_M$ and $x,y \in K$ satisfying $d(x,y) \leq \delta$, we have the estimate~$|\mathcal{I}(x,\nu) - \mathcal{I}(y,\nu)| \leq \varepsilon$.\qed \end{enumerate} \end{assumption} Condition~\ref{SF:item:assumption:I:lsc} follows if the map~$x\mapsto A_x^\mathrm{fast}\phi$ is continuous as a function from~$E$ to~$C(F)$ equiped with the supremum norm. Conditions~\ref{SF:item:assumption:I:zero-measure} and~\ref{SF:item:assumption:I:compact-sublevelsets} are always satisfied by the compactness assumption on~$F$. Again, we state these conditions to make the connection to~\cite{KraaijSchlottke2019} as clear as possible. \smallskip Assumptions~\ref{SF:assumption:convergence-slow-nonlinear-generators},~\ref{SF:assumption:convergence-fast-nonlinear-generators},~\ref{SF:assumption:principal-eigenvalue-problem},~\ref{SF:assumption:regularity-V} and~\ref{SF:assumption:regularity-I} suffice for the proof of Theorem~\ref{SF:thm:LDP_general}, which establishes pathwise large deviations. We need one additional assumption to prove the action-integral representation of the rate function. To that end, we denote for a convex function $\Phi : \mathbb{R}^d \rightarrow (-\infty,\infty]$ its subdifferential by \begin{equation*} \partial_p \Phi(p_0) := \left\{ \xi \in \mathbb{R}^d \,:\, \Phi(p) \geq \Phi(p_0) + \xi \cdot (p-p_0) \quad (\forall p \in \mathbb{R}^d) \right\}. \end{equation*} The Bouligand tangent cone to $E$ in $\mathbb{R}^d$ at $x$ is \begin{equation*} T_E(x) := \left\{z \in \mathbb{R}^d \, \middle| \, \liminf_{\lambda \downarrow 0} \frac{d(y + \lambda z, E)}{\lambda} = 0\right\}. \end{equation*} \begin{assumption}[] \label{SF:assumption:Hamiltonian_vector_field} The slow Hamiltonian $V : E \times \mathbb{R}^d \times F \rightarrow \mathbb{R}$ from Assumption~\ref{SF:assumption:convergence-slow-nonlinear-generators} satisfies $\partial_p V_{x,p}(z) \subseteq T_E(x)$ for all $p$, $x$ and $z$.\qed \end{assumption} In~\cite{KraaijSchlottke2019}, this assumption is made on the full Hamiltonian~$\mathcal{H}(x,p)$ instead of the slow Hamiltonian~$V_{x,p}(z)$. We will show this property to bootstrap from the slow to the full Hamiltonian. \section{Proof of large deviations of the slow process} \label{SF:sec:proof-general-LDP-Theorem} \subsection{Strategy of the proof} \label{SF:sec:proof-general-LDP-Theorem:strategy-of-proof} We outline the large-deviation proof for the slow component of a slow-fast system from Theorem~\ref{SF:thm:LDP_general}. For the generator~$A_n$ of a slow-fast system~$(Y^n,Z^n)$, define the operator~$H_n$ on~$\mathcal{D}(H_n) := \{f\in C_b(E_n\times F)\,:\,e^{r_nf}\in \mathcal{D}(A_n)\}$ by \begin{equation}\label{SF:eq:nonlinear-generator-slow-fast} H_n f(y,z):= \frac{1}{r_n}e^{-r_nf(y,z)} \left(A_n e^{r_nf(\cdot)}\right)(y,z) \end{equation} We call this operator the \emph{nonlinear generator} of~$(X^n,Z^n)$. To prove large deviations, we exploit the semigroup-convergence method built by Jin Feng and Thomas Kurtz~\cite{FengKurtz2006}. In a nutshell, the large-deviation proof boils down to two steps: \begin{enumerate}[label=(\roman*)] \item Convergence of nonlinear generators to a limit operator. \item Verifying the comparison principle for the limit operator. \end{enumerate} The definition of the comparison principle is given in~\ref{definition:viscosity_solutions}. Here, we first give precise version of the above steps by Theorem~\ref{SF:thm:Richard-abstract-LDP} below, which is Kraaij's result from~\cite{Kraaij2019ExpResolv} taylored to our setting. After that, we give the proof of Theorem~\ref{SF:thm:LDP_general}. We use the following convergence concepts. \begin{definition}[LIM-convergence] \label{SF:def:LIM-convergence} Let $f_n \in C_b(E_n \times F)$ and $f \in C_b(E \times F)$. We say that $\LIM f_n = f$ if \begin{enumerate}[label=(\roman*)] \item $\sup_n \vn{f_n} < \infty$, \item for all compact sets $K \subseteq E$, \begin{align*} \lim_{n \rightarrow \infty} \sup_{(y,z) \in \eta_n^{-1}(K) \times F} \left|f_n(y,z) - f(\eta_n(y),z) \right| = 0. \tag*\qed \end{align*} \end{enumerate} \end{definition} \begin{definition}[Extended-LIM]\label{SF:def:extended-LIM} Let $B_n \subseteq C_b(E_n \times F) \times C_b(E_n\times F)$. The set $\mathrm{ex}-\LIM B_n$ is defined as \begin{multline*} \mathrm{ex}-\LIM B_n \\ := \left\{(f,g) \in C_b(E \times F)^2 \, \middle| \, \exists \, (f_n,g_n) \in B_n: \, \LIM f_n = f, \LIM g_n = g \right\}. \tag*\qed \end{multline*} \end{definition} \begin{definition}[Exponential compact containment condition] \label{SF:def:exp-comp-containment} Consider the context of Conditions~\ref{SF:condition:compact_setting:state-spaces} and~\ref{SF:condition:compact_setting:well-posedness-martingale-problem}. The sequence of processes $(Y^n,Z^n)$ satisfies the \emph{exponential compact containment condition} at speed $r_n$ if for each compact set $K \subseteq E$, $T >0$ and $a > 0$ there is a compact set $\widehat{K} = \widehat{K}(K,T,a) \subseteq E$ such that \begin{equation*} \limsup_{n \rightarrow \infty} \sup_{(y,z) \in \eta_n^{-1}(K) \times F} \frac{1}{r_n} \log P_{y,z}\left[Y_n(t) \notin \eta_n^{-1}(\widehat{K}) \text{ for some } t \in [0,T] \right] \leq - a. \end{equation*} \qed \end{definition} The following simplified version of~\cite[Theorem~7.10]{Kraaij2019ExpResolv} is sufficient for our purposes. \begin{theorem}[{Adaptation of~\cite[Theorem~7.10]{Kraaij2019ExpResolv} to our context}] \label{SF:thm:Richard-abstract-LDP} Consider a sequence of slow-fast processes~$(Y^n,Z^n)$ in the setting of Conditions~\ref{SF:condition:compact_setting:state-spaces} and~\ref{SF:condition:compact_setting:well-posedness-martingale-problem}, and let $X_n := \eta_n(Y_n)$. Suppose the following conditions hold true: \begin{enumerate}[label=(\roman*)] \item The exponential compact containment condition (Definition~\ref{SF:def:exp-comp-containment}) is satisfied. \item \label{item:LDP_abstract_convergenceHn} There is an operator $H \subseteq C_b(E) \times C_b(E \times F)$ such that $H \subseteq \mathrm{ex}-\LIM H_n$. \item \label{item:LDP_abstract_comparison} For all $h \in C_b(E)$ and $\lambda > 0$ the comparison principle holds for $f - \lambda Hf = h$. \end{enumerate} Suppose furthermore the large deviation principle to hold for $X_n(0) = \eta_n(Y_n(0))$ with speed $r_n$ and good rate function $J_0$. \smallskip Then the processes $X_n = \eta_n(Y_n)$ satisfy a large deviation principle on $D_E[0,\infty)$ with speed $r_n$ and a good rate function~$J$ given by~\eqref{SF:eq:Richard-general-LDP-thm-rate-function}.\qed \end{theorem} The rate function~$J$ is implicitly characterized by means of a nonlinear semigroup~$V(t):C_b(E)\to C_b(E)$, as \begin{equation} \label{SF:eq:Richard-general-LDP-thm-rate-function} J(\gamma) = J_0(\gamma(0)) + \sup_{k \geq 1} \sup_{\substack{0 = t_0 < t_1 < \dots, t_k \\ t_i \in \Delta_\gamma^c}} \sum_{i=1}^{k} J_{t_i - t_{i-1}}(\gamma(t_i) \, | \, \gamma(t_{i-1})), \end{equation} where $\Delta_\gamma^c$ is the set of continuity points of $\gamma$ and the conditional rate functions~$J_t$ are given by \begin{equation*} J_t(y \, | \, x) = \sup_{f \in C_b(E)} \left\{f(y) - V(t)f(x) \right\}. \end{equation*} The semigroup~$V(t)$ is the limit of nonlinear semigroups~$V_n(t)$ of~$(Y^n,Z^n)$. We do not need the precise statement about the convergence~$V_n\to V$ here. For details, we refer to~\cite{Kraaij2019ExpResolv}. \subsection{Proof of Theorem~\ref{SF:thm:LDP_general}} The proof of Theorem~\ref{SF:thm:LDP_general} hinges on the verification of the conditions of Theorem~\ref{SF:thm:Richard-abstract-LDP} above. In the setting of Theorem~\ref{SF:thm:LDP_general}, we consider a sequence of slow-fast systems~$(Y^n,Z^n)$ satisfying Condition~\ref{SF:condition:compact_setting:well-posedness-martingale-problem} (the well-posedness condition on the martingale problem). Their generators~$A_n$ are given by~\eqref{SF:eq:setting:generator-slow-fast-system}, that is \begin{equation*} A_n f(y,z) = A^\mathrm{slow}_{n,z} f(\cdot,z) (y) + r_n \cdot A^\mathrm{fast}_{n,y} f(y,\cdot)(z), \end{equation*} Applying the program outlined by Theorem~\ref{SF:thm:Richard-abstract-LDP} requires to establish a limit operator~$H$ of the nonlinear generators~$H_n$ defined above in~\eqref{SF:eq:nonlinear-generator-slow-fast}. The following operator~$H$ defined in terms of a graph~$H\subseteq C_b(E)\times C_b(E\times F)$ serves us as the limit. \begin{definition}[Multi-valued limit operator]\label{SF:def:multi-valued-limit:general} For $f \in C_{cc}^\infty(E)$, $x \in E$ and a function $\phi\in C_b(F)$ such that $e^\phi \in \mathcal{D}(A^\mathrm{fast}_x)$, set \begin{equation*} H_{f,\phi}(x,z) := V_{x,\nabla f(x)}(z) + e^{-\phi(z)} A^\mathrm{fast}_x e^{\phi}(z), \end{equation*} and let~$H$ be the graph \begin{equation*} H := \left\{(f,H_{f,\phi}) \, \middle| \, f \in C_{cc}^\infty(E), \phi: e^{\phi} \in \mathcal{D}(A^\mathrm{fast}) \right\}. \end{equation*} The operator $H \subseteq C_b(E) \times C_b(E \times F)$ with $\mathcal{D}(H) = C_{cc}^\infty(E)$ is multi-valued. \qed \end{definition} We prove the following three Lemma's in the subsequent sections under the Assumptions of Theorem~\ref{SF:thm:LDP_general}. \begin{lemma}[Exponential compact containment]\label{SF:lemma:proof-general-LDP:exp-comp-cont} The sequence of slow-fast systems~$(Y^n,Z^n)$ satisfies the exponential compact containment condition. \end{lemma} \begin{lemma}[Convergence of nonlinear generators]\label{SF:lemma:proof-general-LDP:conv-to-H} Let~$H$ be the operator from Definition~\ref{SF:def:multi-valued-limit:general}. The nonlinear generators~$H_n$ from~\eqref{SF:eq:nonlinear-generator-slow-fast} satisfy~$H\subseteq\mathrm{ex}-\LIM H_n$ in the sense of Definition~\ref{SF:def:extended-LIM}. \end{lemma} \begin{lemma}[Comparison principle]\label{SF:lemma:proof-general-LDP:CP-for-H} Let~$H$ be operator from Definition~\ref{SF:def:multi-valued-limit:general}. Then for any $h \in C_b(E)$ and $\lambda > 0$, the comparison principle holds for $f - \lambda Hf = h$. \end{lemma} \begin{proof}[Proof of Theorem~\ref{SF:thm:LDP_general}] By virtue of the above three Lemma's, the conditions of the general large-deviation result from Theorem~\ref{SF:thm:Richard-abstract-LDP} above are satisfied. \end{proof} While the verification of exponential compact containment and convergence of nonlinear operators are standard, the proof of the comparison principle takes up the bulk of the argument. We prove Lemma's~\ref{SF:lemma:proof-general-LDP:exp-comp-cont} and~\ref{SF:lemma:proof-general-LDP:conv-to-H} here, and prove Lemma~\ref{SF:lemma:proof-general-LDP:CP-for-H} in Section~\ref{SF:sec:proof-of-CP:general} below. \begin{proof}[Proof of Lemma~\ref{SF:lemma:proof-general-LDP:conv-to-H}] We have to show that for all $(f,g) \in H$ there are functions $f_n \in \mathcal{D}(H_n)$ satisfying $\LIM f_n = f$ and $\LIM H_n f_n = g$, with the~$\LIM$ convergence from Definition~\ref{SF:def:LIM-convergence}. Recall the slow-fast generator~$A_n$, \begin{equation*} A_n f(y,z) = A^\mathrm{slow}_{n,z} f(\cdot,z) (y) + r_n \cdot A^\mathrm{fast}_{n,y} f(y,\cdot)(z), \end{equation*} and the nonlinear generators~$H_nf=(1/r_n)e^{-r_nf}A_ne^{r_nf}$, which amounts to \begin{equation*} H_n f(y,z) = \frac{1}{n}e^{-nf(y,z)}A^\mathrm{slow}_{n,z}\left( e^{nf(\cdot,z)}\right)(y) + r_n\cdot \frac{1}{n} e^{-nf(x,z)} \left(A^\mathrm{fast}_{n,y}e^{nf(x,\cdot)}\right)(z). \end{equation*} Now let~$(f,H_{f,\phi})\in H$ be arbitrary. Set~$f_n(y,z) := f(\eta_n(y)) + r_n^{-1} \phi(z)$. Then~$f_n\in\mathcal{D}(H_n)$. We are left with proving $\LIM f_n = f$ and $\LIM H_n f_n = H_{f,\phi}$. \smallskip Since both $f$ and $\phi$ are bounded, $\vn{f_n - f} = r_n^{-1}\vn{\phi} \rightarrow 0$, and $\LIM f_n = f$ follows. The images $H_n f_n$ are given by % \begin{align*} H_n f_n(y,z) = \frac{1}{r_n} e^{-r_nf(\eta_n(y))} A_{n,z}^\mathrm{slow} e^{r_nf(\eta_n(y))} + e^{-\phi(z)} \left(A^{\mathrm{fast}}_{\eta_n(y)} e^{\phi}\right)(z). \end{align*} The convergence assumptions on the slow generators and fast generators (Assumptions~\ref{SF:assumption:convergence-slow-nonlinear-generators} and~\ref{SF:assumption:convergence-fast-nonlinear-generators}) imply $\LIM H_nf_n=H_{f,\phi}$. \end{proof} \begin{proof}[Proof of Lemma~\ref{SF:lemma:proof-general-LDP:exp-comp-cont}] By~\ref{SF:item:assumption:slow_regularity:compact_containment} of Assumption~\ref{SF:assumption:regularity-V} on the slow Hamiltonians~$V$, there are a compact containment function~$\Upsilon$ and a constant~$c_\Upsilon>0$ satisfying \begin{equation*} \sup_{x,z} V_{x,\nabla \Upsilon(x)}(z) \leq c_\Upsilon. \end{equation*} Choose $\beta > 0$ such that $T\cdot c_\Upsilon + 1 - \beta \leq -a$. By continuity of~$\Upsilon$ is, there is a constant $c>0$ such that \begin{equation*} K \subseteq \left\{x \, \middle| \, \Upsilon(x) \leq c \right\} \end{equation*} Next, let $G := \left\{x \, \middle| \, \Upsilon(x) < c + \beta \right\}$, which is an open set. Let $\widehat{K}$ be the closure of~$G$. Then~$\widehat{K}$ is compact since~$\Upsilon$ is a compact containment function. \smallskip Let $f(x) := \iota \circ \Upsilon $, where $\iota$ is some smooth increasing function satisfying \begin{equation*} \iota(r) = \begin{cases} r & \text{if } r \leq \beta +c, \\ \beta+ c + 1 & \text{if } r \geq \beta + c + 2. \end{cases} \end{equation*} Then $\iota \circ \Upsilon = \Upsilon$ on $\widehat{K}$, and~$f$ is constant outside of a compact set. Set $f_n = f \circ \eta_n$, $g_n := H_n f_n$ and $g := \LIM g_n$. The function~$g$ exists due to Assumption~\ref{SF:assumption:convergence-slow-nonlinear-generators} on the slow generators. Then $g(x,z) = V_{x,\nabla \Upsilon(x)}(z)$ if $x \in \widehat{K}$. Therefore, we have $\sup_{x \in \widehat{K}, z \in F} g(x,z) \leq c_\Upsilon$. Let $\tau$ be the stopping time $\tau := \inf \left\{t \geq 0 \, \middle| \, Y_n(t) \notin \eta_n^{-1}(G) \right\}$ and let \begin{equation*} M_n(t) := \exp \left\{r_n \left( f_n(Y_n(t)) - f_n(Y_n(t)) - \int_0^t g_n(Y_n(t),Z_n(t)) \mathrm{d} s \right) \right\}. \end{equation*} By construction $M_n$ is a martingale. By the optional stopping theorem, $t \mapsto M_n(t \wedge \tau)$ is a martingale as well. We obtain \begin{align*} & \mathbb{P}_{y,z}\left[Y_n(t) \notin \widehat{K} \text{ for some } t \in [0,T]\right] \\ & \leq \mathbb{P}_{y,z}\left[Y_n(t) \notin \eta_n^{-1}(G) \times F \text{ for some } t \in [0,T]\right] \\ & = \mathbb{E}_{y,z}\left[\mathbbm{1}_{\{Y_n(t) \notin \eta_n^{-1}(G) \text{ for some } t \in [0,T]\}} M_n(t \wedge \tau) M_n(t\wedge \tau)^{-1} \right] \\ & \leq \exp\left\{- r_n \left(\inf_{y_1 \in G^c} \Upsilon(\eta_n(y_1)) - \Upsilon(\eta_n(y)) \right. \right. \\ & \hspace{4cm} \left. \left. - T \sup_{y_2 \in \eta_n^{-1}(G), z_2 \in F} g_n(y_2,z_2) \right) \right\} \\ & \hspace{2.5cm} \times \mathbb{E}_{y,z}\left[\mathbbm{1}_{\{Y_n(t) \notin \eta_n^{-1}(G) \text{ for some } t \in [0,T]\}} M_n(t \wedge \tau) \right] \end{align*} Since $\LIM f_n = f$ and $\LIM g_n = g$, the term in the exponential is bounded by $ r_n\left(c_\Upsilon T - \beta \right) \leq -r_n a$ for sufficiently large $n$. The final expectation is bounded by $1$ due to the martingale property of $M_n(t \wedge \tau)$. We conclude that \begin{align*} \limsup_n \sup_{y \in \eta_n^{-1}(K), z \in F} \frac{1}{r_n} \log \mathbb{P}_{y,z}\left[Y_n(t) \notin \eta^{-1}(\widehat{K}) \text{ for some } t \in [0,T]\right] \leq -a, \end{align*} which finishes the proof. \end{proof} \subsection{Proof of the comparison principle} \label{SF:sec:proof-of-CP:general} In this section, we prove Lemma~\ref{SF:lemma:proof-general-LDP:CP-for-H}; the comparison principle for the Hamilton-Jacobi equation $f - \lambda Hf = h$ for the multi-valued limit operator~$H$ from Definition~\ref{SF:def:multi-valued-limit:general} introduce above. We recall the definition of viscosity solutions and the comparison principle in the appendix. \smallskip A key role is played by the principal eigenvalue~$\mathcal{H}(x,p)$ from~\eqref{SF:eq:sec-assumption:H}, \begin{equation*} \mathcal{H}(x,p) = \sup_{\pi \in \mathcal{P}(F)} \left\{\int V_{x,p}(z) \, \pi( \mathrm{d} z) - \mathcal{I}(x,\pi) \right\},\quad (x,p)\in E\times\mathbb{R}^d, \end{equation*} where the maps~$V$ and~$\mathcal{I}$ satisfy Assumptions~\ref{SF:assumption:regularity-V} and~\ref{SF:assumption:regularity-I}. We associate the following differential operator~$\mathbf{H}$ to this Hamiltonian. \begin{definition}[Principal-eigenvalue Hamiltonian]\label{SF:def:principal-eigenvalue-Hamiltonian} The operator~$\mathbf{H}$ acting on the domain~$\mathcal{D}(\mathbf{H}) = C_{cc}^\infty(E)$ is given by $\mathbf{H} f(x) := \mathcal{H}(x, \nabla f(x))$.\qed \end{definition} The prove of Lemma~\ref{SF:lemma:proof-general-LDP:CP-for-H} hinges on being able to reduce the comparison principle of~$H$ to the comparison principle of~$\mathbf{H}$. To that end, we introduce four auxiliary operators and establish the diagram shown in Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP}. \begin{figure}[h!] \begin{center} \begin{tikzpicture} \matrix (m) [matrix of math nodes,row sep=1em,column sep=4em,minimum width=2em] { { } & H_1 &[7mm] H_\dagger &[5mm] { } \\ H & { } & { } & \mathbf{H} \\ { } & H_2 & H_\ddagger & { } \\}; \path[-stealth] (m-2-1) edge node [above] {sub} (m-1-2) (m-2-1) edge node [below] {super \qquad { }} (m-3-2) (m-1-2) edge node [above] {sub \qquad { }} (m-1-3) (m-3-2) edge node [below] {super \qquad { }} (m-3-3) (m-2-4) edge node [above] {\qquad sub} (m-1-3) (m-2-4) edge node [below] {\qquad super} (m-3-3); \begin{pgfonlayer}{background} \node at (m-2-3) [rectangle,draw=blue!50,fill=blue!20,rounded corners, minimum width=1cm, minimum height=2.5cm] {comparison}; \end{pgfonlayer} \end{tikzpicture} \end{center} \caption{An arrow connecting an operator $A$ with operator $B$ with subscript 'sub' means that viscosity subsolutions of $f - \lambda A f = h$ are also viscosity subsolutions of $f - \lambda B f = h$. Similarly for arrows with a subscript 'super'. The box around the operators $H_\dagger$ and $H_\ddagger$ indicates that the comparison principle holds for subsolutions of $f - \lambda H_\dagger f = h$ and supersolutions of $f - \lambda H_\ddagger f = h$.} \label{SF:fig:CP-diagram-in-proof-of-CP} \end{figure} \smallskip The theoretical treatment of the Hamitlon-Jacobi equation of~$\mathbf{H}$ is carried out in~\cite{KraaijSchlottke2019}. In there, the comparison principle for the Hamilton-Jacobi equation associated with~$\mathbf{H}$ is proven~\cite[Theorem~3.4]{KraaijSchlottke2019} under a generalization of Assumptions~\ref{SF:assumption:regularity-V} and~\ref{SF:assumption:regularity-I}. The proof establishes the top-right and bottom-right arrows connecting~$\mathbf{H}$ with the auxiliary operators~$H_\dagger,H_\ddagger$. Here, we make the connection the Hamilton-Jacobi equation with the limit operator~$H$ by establishing the remaining arrows in Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP}. \begin{proof}[Proof of Lemma~\ref{SF:lemma:proof-general-LDP:CP-for-H}] Fix~$h\in C_b(E)$ and~$\lambda>0$. Let~$u_1$ be a viscosity subsolution and~$u_2$ be a viscosity supersolution to~$(1-\lambda H)f=h$. By Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP}, the function~$u_1$ is a viscosity subsolution to~$(1-\lambda H_\dagger)f=h$ and~$u_2$ is a viscosity supersolution to~$(1-\lambda H_\ddagger)f=h$. Hence by~\cite[Theorem~3.4]{KraaijSchlottke2019},~$u_1\leq u_2$, which finishes the proof. \end{proof} The rest of this section is devoted to proving Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP}. \paragraph{Definition of auxiliary operators.} We introduce the auxiliary operators $H_\dagger,H_\ddagger$ and $H_1,H_2$ appearing in Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP}. The new Hamiltonians serve as natural upper and lower bounds for~$\mathbf{H}$ and~$H$, respectively. These new Hamiltonians are defined in terms of the containment function~$\Upsilon$ from Assumption~\ref{SF:assumption:regularity-V}, which allows us to restrict the analysis to compact sets. The definitions use the constant $C_\Upsilon := \sup_{x,z} V_{x,\nabla \Upsilon(x)}(z)$. Denote by~$C_l^\infty(E)$ the set of smooth functions on~$E$ that have a lower bound and by~$C_u^\infty(E)$ the set of smooth functions on~$E$ that have an upper bound. \begin{definition}[$H_\dagger$ and~$H_\ddagger$] For $f \in C_l^\infty(E)$ and $\varepsilon \in (0,1)$, set \begin{equation*} f^\varepsilon_\dagger := (1-\varepsilon) f + \varepsilon \Upsilon \quad\text{and}\quad H_{\dagger,f}^\varepsilon(x) := (1-\varepsilon) \mathbf{H} f(x) + \varepsilon C_\Upsilon. \end{equation*} Then~$H_\dagger$ is the the graph defined by \begin{equation*} H_\dagger := \left\{(f^\varepsilon_\dagger,H_{\dagger,f}^\varepsilon) \, \middle| \, f \in C_l^\infty(E), \varepsilon \in (0,1) \right\}. \end{equation*} For $f \in C_u^\infty(E)$ and $\varepsilon \in (0,1)$, set \begin{equation*} f^\varepsilon_\ddagger := (1+\varepsilon) f - \varepsilon \Upsilon \quad\text{and}\quad H_{\ddagger,f}^\varepsilon(x) := (1+\varepsilon) \mathbf{H} f(x) - \varepsilon C_\Upsilon. \end{equation*} Then~$H_\ddagger$ is the graph defined by \begin{align*} H_\ddagger := \left\{(f^\varepsilon_\ddagger,H_{\ddagger,f}^\varepsilon) \, \middle| \, f \in C_u^\infty(E), \varepsilon \in (0,1) \right\}. \tag*\qed \end{align*} \end{definition} \begin{definition}[$H_1$ and~$H_2$] For $f \in C_l^\infty(E)$ , $\varepsilon \in (0,1)$ and $\phi$ such that $e^\phi \in \mathcal{D}(A^\mathrm{fast})$, set \begin{gather*} f^\varepsilon_1 := (1-\varepsilon) f + \varepsilon \Upsilon, \\ H^\varepsilon_{1,f,\phi}(x,z) := (1-\varepsilon) \left( V_{x,\nabla f(x)}(z) + e^{-\phi(z)} A^\mathrm{fast}_x e^{\phi}(z)\right) + \varepsilon C_\Upsilon. \end{gather*} Then~$H_1$ is the graph defined by \begin{equation*} H_1 := \left\{(f^\varepsilon_1,H^\varepsilon_{1,f,\phi}) \, \middle| \, f \in C_l^\infty(E), \varepsilon \in (0,1), \phi: \, e^\phi \in \mathcal{D}(A^\mathrm{fast}) \right\}. \end{equation*} For $f \in C_u^\infty(E)$, $\varepsilon \in (0,1)$ and $\phi$ such that $e^\phi \in \mathcal{D}(A^\mathrm{fast})$, set \begin{gather*} f^\varepsilon_2 := (1+\varepsilon) f - \varepsilon \Upsilon, \\ H^\varepsilon_{2,f,\phi}(x,z) := (1+\varepsilon) \left( V_{x,\nabla f(x)}(z) + e^{-\phi(z)} A^\mathrm{fast}_x e^{\phi}(z) \right) - \varepsilon C_\Upsilon. \end{gather*} Then~$H_2$ is the graph defined by \begin{align*} H_2 := \left\{(f^\varepsilon_2,H^\varepsilon_{2,f,\phi}) \, \middle| \, f \in C_u^\infty(E), \varepsilon \in (0,1), \phi: \, e^\phi \in \mathcal{D}(A^\mathrm{fast}) \right\}. \tag*\qed \end{align*} \end{definition} \paragraph{Arrows based on the solution of an eigenvalue problem.} \begin{lemma}\label{SF:lemma:viscosity_solutions_arrows_based_on_eigenvalue} Fix $\lambda > 0$ and $h \in C_b(E)$. \begin{enumerate}[(a)] \item Every subsolution to $f - \lambda H_1 f = h$ is also a subsolution to $f - \lambda H_\dagger f = h$. \item Every supersolution to $f - \lambda H_2 f = h$ is also a supersolution to $f - \lambda H_\ddagger f = h$. \end{enumerate} \end{lemma} For the proof of this lemma, we need an auxiliary lemma. \begin{lemma} \label{SF:lemma:strong_viscosity_solutions} Fix $\lambda > 0$ and $h \in C_b(E)$. \begin{enumerate}[(a)] \item Let $u$ be a subsolution to $f - \lambda H_1 f = h$, then for all $(f,g) \in H_1$ and $x_0 \in E$ such that \begin{equation*} u_1(x_0) - f(x_0) = \sup_x u_1(x) - f(x) \end{equation*} we have \begin{equation*} u_1(x_0) - \lambda g(x_0,z) \leq h(x_0). \end{equation*} \item Let $u_2$ be a supersolution to $f - \lambda H_2 f = h$, then for all $(f,g) \in H_2$ and $x_0 \in E$ such that \begin{equation*} u_2(x_0) - f(x_0) = \inf_x u_2(x) - f(x) \end{equation*} we have \begin{equation*} u_2(x_0) - \lambda g(x_0,z) \geq h(x_0). \end{equation*} \end{enumerate} \end{lemma} The following proof is inspired on \cite[Lemma 9.9]{FengKurtz2006}. \begin{proof}[Proof of Lemma~\ref{SF:lemma:strong_viscosity_solutions}] We only prove (a). Let $u$ be a viscosity subsolution to $f - \lambda H_1 f = h$ and consider $(f,g) \in H_1$. By definition $f$ has compact sublevel-sets. Thus, instead of working with a sequence $x_n$ along which a maximum is attained, we can work with a single point $x_0$. This gives us the existence of a point $(x_0,z) \in E \times F$ satisfying \begin{gather*} u(x_0) - f(x_0) = \sup_x u_1(x) - f(x), \\ u(x_0) - \lambda g(x_0,z) \leq h(x_0), \end{gather*} rather than having the second inequality for all $x_0$ satisfying $u(x_0) - f(x_0) = \sup_x u(x) - f(x)$. Now let $x_0$ be such that $u(x_0) - f(x_0) = \sup_x u(x) - f(x)$. Pick a function $\hat{f} \in C_{cc}^\infty(E)$ satisfying $\hat{f}(x_0) = 0$ and $\hat{f}(x) > 0$ for $x \neq x_0$. Define the function $f_0 = f+ \hat{f}$, and let $g_0$ be the corresponding image, $(f_0,g_0) \in H_1$. Since $\nabla f_0(x_0) = \nabla f(x_0)$ and $g(x_0,z)$ and $g_0(x_0,z)$ only depend on $f$ and $f_0$ via their derivatives at $x_0$, we obtain $g_0(x_0,z) = g(x_0,z)$. By construction $x_0$ is the unique point satisfying $u(x_0) - f_0(x_0) = \sup_x u(x) - f_0(x)$. By the sub-solution property, we find \begin{equation*} u(x_0) - \lambda g(x_0,z) = u(x_0) - \lambda g_0(x_0,z) \leq h_0(x_0), \end{equation*} establishing the claim. \end{proof} \begin{proof}[Proof of Lemma~\ref{SF:lemma:viscosity_solutions_arrows_based_on_eigenvalue}] We only prove the subsolution statement. To that end, fix $\lambda > 0$ and $h \in C_b(E)$, and let $u$ be a subsolution of $f - \lambda H_1 f = h$. We prove it is also a subsolution of $f - \lambda H_\dagger f = h$. Let $f^\varepsilon_1 \in \mathcal{D}(H_1)$ and let $x_0$ be such that \begin{equation*} u(x_0) - f^\varepsilon_1(x_0) = \sup_x u(x) - f_1^\varepsilon(x). \end{equation*} For each $\delta > 0$ we find by Assumption~\ref{SF:assumption:principal-eigenvalue-problem} a function $e^{\phi_\delta} \in \mathcal{D}(A^\mathrm{fast})$ such that \begin{equation*} \mathcal{H}(x,p) \geq V_{x_0,\nabla f(x_0)}(z) - e^{-\phi_\delta(z)}\left(A_{x_0}^\mathrm{fast} e^{\phi_\delta}\right)(z) - \delta \end{equation*} for all $z \in F$. Since \begin{equation*} \left(f^\varepsilon_1, (1-\varepsilon) \left( V_{x,\nabla f(x)}(z) + e^{-\phi(z)} A^\mathrm{fast}_x e^{\phi(z)}\right) + \varepsilon C_\Upsilon \right) \in H_1, \end{equation*} we find by the subsolution property of $u$ and Lemma~\ref{SF:lemma:strong_viscosity_solutions} that for all $z$ \begin{align*} h(x_0) & \geq u(x_0) - \lambda \left((1-\varepsilon) \left( V_{x_0,\nabla f(x_0)}(z) + e^{-\phi(z)} A^\mathrm{fast}_{x_0} e^{\phi(z)}\right) + \varepsilon C_\Upsilon\right) \\ & \geq u(x_0) - \lambda \left((1-\varepsilon) \mathcal{H}(x_0,\nabla f(x_0)) + \varepsilon C_\Upsilon\right) - \lambda(1-\varepsilon)\delta. \end{align*} Sending $\delta \rightarrow 0$ establishes that $u$ is a subsolution for $f - \lambda H_\dagger f = h$. \end{proof} \paragraph{Arrows based on compact containment.} \begin{lemma} \label{SF:lemma:viscosity_solutions_compactify1} Fix $\lambda > 0$ and $h \in C_b(E)$. \begin{enumerate}[(a)] \item Every subsolution to $f - \lambda H f = h$ is also a subsolution to $f - \lambda H_1 f = h$. \item Every supersolution to $f - \lambda H f = h$ is also a supersolution to $f - \lambda H_2 f = h$. \end{enumerate} \end{lemma} \begin{lemma} \label{SF:lemma:viscosity_solutions_compactify2} Fix $\lambda > 0$ and $h \in C_b(E)$. \begin{enumerate}[(a)] \item Every subsolution to $f - \lambda \mathbf{H} f = h$ is also a subsolution to $f - \lambda H_\dagger f = h$. \item Every supersolution to $f - \lambda \mathbf{H} f = h$ is also a supersolution to $f - \lambda H_\ddagger f = h$. \end{enumerate} \end{lemma} Lemma~\ref{SF:lemma:viscosity_solutions_compactify2} has been proven in~\cite[Lemma~6.3]{KraaijSchlottke2019}. \begin{proof}[Proof of Lemma~\ref{SF:lemma:viscosity_solutions_compactify1}] The proof is similar to the proof of~\cite[Lemma~6.3~(a)]{KraaijSchlottke2019}. We only prove~(a). \smallskip Fix $\lambda > 0$ and $h \in C_b(E)$. Let $u$ be a subsolution to $f - \lambda H f = h$. We prove it is also a subsolution to $f - \lambda H_1 f = h$. Fix $\varepsilon \in (0,1)$, $\phi$ such that $e^\phi \in \mathcal{D}(A^\mathrm{fast})$, and $f \in C_{l}^\infty(E)$, so that $(f^\varepsilon_1,H^\varepsilon_{1,f,\phi}) \in H_1$. We will prove that there are $(x_n,z_n)$ such that \begin{gather} \lim_n u(x_n) - f^\varepsilon_1(x_n) = \sup_x u(x) - f^\varepsilon_1(x),\label{SF:eqn:proof_lemma_conditions_for_subsolution_first} \\ \limsup_n u(x_n) - \lambda H^\varepsilon_{1,f,\phi}(x_n,z_n) - h(x_n) \leq 0. \label{SF:eqn:proof_lemma_conditions_for_subsolution_second} \end{gather} As $u -(1-\varepsilon)f$ is bounded from above and $\varepsilon \Upsilon$ has compact sublevel-sets, the sequence $x_n$ along which the first limit is attained can be assumed to lie in the compact set $K := \left\{x \, | \, \Upsilon(x) \leq \inf_x \varepsilon^{-1} \left(u(x) - (1-\varepsilon)f(x) \right)\right\}$. We use the constant~$M := \inf_x \varepsilon^{-1} \left(u(x) - (1-\varepsilon)f(x) \right)$. Let $\gamma : \mathbb{R} \rightarrow \mathbb{R}$ be a smooth increasing function such that \begin{equation*} \gamma(r) = \begin{cases} r & \text{if } r \leq M, \\ M + 1 & \text{if } r \geq M+2. \end{cases} \end{equation*} Denote by $f_\varepsilon$ the function on $E$ defined by \begin{equation*} f_\varepsilon(x) := \gamma\left((1-\varepsilon)f(x) + \varepsilon \Upsilon(x) \right). \end{equation*} By construction $f_\varepsilon$ is smooth and constant outside of a compact set and thus lies in $\mathcal{D}(H) = C_{cc}^\infty(E)$. As $e^\phi \in \mathcal{D}(A^\mathrm{fast})$ we have by Assumption~\ref{SF:assumption:principal-eigenvalue-problem} that also $e^{(1-\varepsilon)\phi} \in \mathcal{D}(A^\mathrm{fast})$. We conclude that $(f_\varepsilon, H_{f,(1-\varepsilon)\phi}) \in H$. As $u$ is a viscosity subsolution for $f - \lambda Hf = h$ there exist $x_n \in K \subseteq E$ (by our choice of $K$) and $z_n \in F$ with \begin{gather} \lim_n u(x_n) - f_\varepsilon(x_n) = \sup_x u(x) - f_\varepsilon(x), \label{SF:eqn:visc_subsol_sup} \\ \limsup_n u(x_n) - \lambda H_{f,(1-\varepsilon)\phi}(x_n,z_n) - h(x_n) \leq 0. \label{SF:eqn:visc_subsol_upperbound} \end{gather} As $f_\varepsilon$ equals $f$ on $K$, we have from \eqref{SF:eqn:visc_subsol_sup} that also \begin{equation*} \lim_n u(x_n) - f(x_n) = \sup_x u(x) - f(x), \end{equation*} establishing \eqref{SF:eqn:proof_lemma_conditions_for_subsolution_first}. Convexity of $p \mapsto V_{x,p}$ and $\psi \mapsto e^{-\psi(z)}\left(A_x^\mathrm{fast} e^\psi\right)(z)$ yields for arbitrary $(x,z)$ the elementary estimate \begin{align*} H_{f,(1-\varepsilon)\phi}(x,z) = & V_{x,\nabla f_\varepsilon}(z) + e^{-(1-\varepsilon)\phi(z)} \left(A^\mathrm{fast}_x e^{(1-\varepsilon)\phi}\right)(z) \\ & \leq (1-\varepsilon) V_{x,\nabla f(x)}(z) + \varepsilon V_{x,\nabla \Upsilon(x)} + (1-\varepsilon)e^{-\phi(z)} \left(A^\mathrm{fast}_x e^{\phi}\right)(z) \\ & = H^\varepsilon_{1,f,\phi}(x,z). \end{align*} Combining this inequality with \eqref{SF:eqn:visc_subsol_upperbound} yields \begin{multline*} \limsup_n u(x_n) - \lambda H^\varepsilon_{1,f,\phi}(x,z) - h(x_n) \\ \leq \limsup_n u(x_n) - \lambda H_{f,(1-\varepsilon)\phi}(x_n,z_n) - h(x_n) \leq 0, \end{multline*} establishing \eqref{SF:eqn:proof_lemma_conditions_for_subsolution_second}. This concludes the proof. \end{proof} \section{Proof of action-integral representation}\label{SF:sec:proof-action-integral-form-RF} \subsection{Structure of proof} In this section, we outline the structure of proof of Theorem~\ref{SF:thm:rate-function}. To that end, recall the Hamiltonian~$\mathcal{H}:E\times\mathbb{R}^d\to\mathbb{R}$ from~\eqref{SF:eq:variational_Hamiltonian}, \begin{equation*} \mathcal{H}(x,p) = \sup_{\nu \in \mathcal{P}(F)} \left\{\int V_{x,p}(z) \, \nu( \mathrm{d} z) - \mathcal{I}(x,\nu) \right\}, \end{equation*} and the Lagrangian~$\mathcal{L}(x,v)$ defined as the Legendre dual, \begin{equation}\label{SF:prof-RF:Lagrangian} \mathcal{L}(x,v)=\sup_{p\in\mathbb{R}^d}\left[\ip{p}{v}-\mathcal{H}(x,p)\right]. \end{equation} Theorem~\ref{SF:thm:rate-function} consists of two claims: \begin{enumerate}[label=(\Roman*)] \item \label{SF:item:proof-action:I} The rate function~$J$ obtained in Theorem~\ref{SF:thm:LDP_general} satisfies the action-integral representation~\eqref{SF:eq:action-integral-rate-function} with the Lagrangian~\eqref{SF:prof-RF:Lagrangian}. \item \label{SF:item:proof-action:Lagr} The Lagrangian satisfies the formula~\eqref{SF:eq:results-Lagr-opt-proc}. \end{enumerate} We prove the statement~\ref{SF:item:proof-action:Lagr} in Section~\ref{SF:sec:proof-alternative-form-of-L}. To outline the proof of~\ref{SF:item:proof-action:I}, recall that the rate function~$J$ obtained in Theorem~\ref{SF:thm:LDP_general} given by~\eqref{SF:eq:Richard-general-LDP-thm-rate-function} is characterized in terms of a semigroup~$V(t)$, as \begin{equation*} J(\gamma) = J_0(\gamma(0)) + \sup_{k \geq 1} \sup_{\{t_i\}} \sum_{i=1}^{k} J_{t_i - t_{i-1}}(\gamma(t_i) \, | \, \gamma(t_{i-1})), \end{equation*} where the conditional rate functions~$J_t$ are defined by \begin{equation*} J_t(y \, | \, x) = \sup_{f \in C_b(E)} \left\{f(y) - V(t)f(x) \right\}. \end{equation*} We describe the semigroup~$V(t):C_b(E)\to C_b(E)$ further below. Our proof is based on the following definitions. First, we define the variational semigroup~$\mathbf{V}(t)$ arising from an optimal control problem with cost function~$\mathcal{L}$. \begin{definition}[Variational semigroup~$\mathbf{V}(t)$] For~$f\in C_b(E)$ and~$t\geq 0$, define \begin{align*} \mathbf{V}(t) f(x) := \sup_{\substack{\gamma \in \mathcal{A}\mathcal{C}\\ \gamma(0) = x}} h(\gamma(t)) - \int_0^t \mathcal{L}(\gamma(s),\dot{\gamma}(s)), \end{align*} where the supremum is over absolutely continuous maps~$\gamma:[0,\infty)\to E$.\qed \end{definition} Secondly, we will exploit the fact that the semigroups~$V(t)$ and~$\mathbf{V}(t)$ are determined by means of the existence of unique viscosity solutions to the equations~$(1-\lambda H)f=h$ and~$(1-\lambda\mathbf{H})f=h$, respectively. To do so, we introduce the following resolvents. \begin{definition}[Resolvent~$R(\lambda)$] Let~$H$ be the multi-valued operator from Definition~\ref{SF:def:multi-valued-limit:general},~$\lambda>0$ and~$h\in C_b(E)$. Define~$R(\lambda):C_b(E)\to C_b(E)$ by setting~$R(\lambda)h := u$, the unique viscosity solution to~$(1-\lambda H)u=h$.\qed \end{definition} \begin{definition}[Resolvent~$\mathbf{R}(\lambda)$] For~$\lambda>0$ and~$h\in C_b(E)$, define the resolvent~$\mathbf{R}(\lambda)h:E\to\mathbb{R}$ by \begin{equation} \mathbf{R}(\lambda) h(x):= \sup_{\substack{\gamma \in \mathcal{A}\mathcal{C}\\ \gamma(0) = x}} \int_0^\infty \lambda^{-1} e^{-\lambda^{-1}t} \left[h(\gamma(t)) - \int_0^t \mathcal{L}(\gamma(s),\dot{\gamma}(s))\right] \, \mathrm{d} t, \end{equation} where the supremum is over absolutely-continuous maps~$\gamma:[0,\infty)\to E$.\qed \end{definition} The semigroup~$V(t)$ is determined via~$R$ as (e.g.\cite[Prop.~6.6]{Kraaij2019ExpResolv}) \begin{equation*} V(t)f(x) = \lim_{m\to\infty}\left[R\left(t/m\right)\right]^{m}f. \end{equation*} The statement~\ref{SF:item:proof-action:I} is a direct consequence of the following Lemmas. \begin{lemma}\label{SF:lemma:R-equals-mathbf-R} Let Assumptions~\ref{SF:assumption:regularity-V},~\ref{SF:assumption:regularity-I} and~\ref{SF:assumption:Hamiltonian_vector_field} be satisfied. Then for all~$\lambda>0$, we have~$R(\lambda)=\mathbf{R}(\lambda)$. \end{lemma} \begin{lemma}\label{SF:lemma:V-equals-mathbf-V} Let Assumptions~\ref{SF:assumption:regularity-V},~\ref{SF:assumption:regularity-I} and~\ref{SF:assumption:Hamiltonian_vector_field} be satisfied. If~$R(\lambda)=\mathbf{R}(\lambda)$ for all~$\lambda>0$, then~$V(t)=\mathbf{V}(t)$. \end{lemma} \begin{lemma}\label{SF:lemma:equal-semigroup-implies-RF} If~$V(t)=\mathbf{V}(t)$, then~\ref{SF:item:proof-action:I} holds true. \end{lemma} Lemma~\ref{SF:lemma:equal-semigroup-implies-RF} can be proven as shown in~\cite[Theorem~8.14]{FengKurtz2006}, using convexity of~$v\mapsto \mathcal{L}(x,v)$. We show Lemmas~\ref{SF:lemma:R-equals-mathbf-R} and~\ref{SF:lemma:V-equals-mathbf-V} in Section~\ref{SF:thm:proof-of-RF-action}. \subsection{Proof of Theorem~\ref{SF:thm:rate-function}} \label{SF:thm:proof-of-RF-action} For the proof of Lemma~\ref{SF:lemma:R-equals-mathbf-R}, we argue with the diagram in~Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP} that we established in the proof of the comparison principle. We recall it here below. \begin{figure}[h!] \begin{center} \begin{tikzpicture} \matrix (m) [matrix of math nodes,row sep=1em,column sep=4em,minimum width=2em] { { } & H_1 &[7mm] H_\dagger &[5mm] { } \\ H & { } & { } & \mathbf{H} \\ { } & H_2 & H_\ddagger & { } \\}; \path[-stealth] (m-2-1) edge node [above] {sub} (m-1-2) (m-2-1) edge node [below] {super \qquad { }} (m-3-2) (m-1-2) edge node [above] {sub \qquad { }} (m-1-3) (m-3-2) edge node [below] {super \qquad { }} (m-3-3) (m-2-4) edge node [above] {\qquad sub} (m-1-3) (m-2-4) edge node [below] {\qquad super} (m-3-3); \begin{pgfonlayer}{background} \node at (m-2-3) [rectangle,draw=blue!50,fill=blue!20,rounded corners, minimum width=1cm, minimum height=2.5cm] {comparison}; \end{pgfonlayer} \end{tikzpicture} \end{center} \end{figure} \smallskip \begin{proof}[Proof of Lemma~\ref{SF:lemma:R-equals-mathbf-R}] Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP} shows that if~$u$ is a viscosity solution to~$(1-\tau H)f=h$ and~$v$ is a viscosity solution to~$(1-\tau\mathbf{H})f=h$, then~$u=v$. \smallskip Let~$\lambda>0$ and~$h\in C_b(E)$. Then by definition,~$R(\lambda)h$ is the viscosity solution to~$(1-\lambda H)f=h$. We prove that the function~$\mathbf{R}(\lambda)h$ is the viscosity solution to~$(1-\lambda\mathbf{H})f=h$. Then by virtue of Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP}, we obtain~$R(\lambda)h=\mathbf{R}(\lambda)h$. Since~$\lambda$ and~$h$ are arbitrary, this establishes Lemma~\ref{SF:lemma:R-equals-mathbf-R}. \smallskip The fact that~$\mathbf{R}(\lambda)h$ is a viscosity solution is established in~\cite[Theorem~3.7]{KraaijSchlottke2019}, under Assumptions~3.12,~3.13 and~3.16 therein. Here, our Assumption~\ref{SF:assumption:regularity-V} corresponds exactly to \cite[Assumption~3.12]{KraaijSchlottke2019}, and our Assumption~\ref{SF:assumption:regularity-I} to~\cite[Assumption~3.13]{KraaijSchlottke2019}. We are left with showing that~\cite[Assumption 3.16]{KraaijSchlottke2019}, follows from our Assumption~\ref{SF:assumption:Hamiltonian_vector_field}. \smallskip To that end, for a convex function $\Phi$ $\Phi : \mathbb{R}^d \rightarrow (-\infty,\infty]$, define the subdifferential set by \begin{equation*} \partial_p \Phi(p_0) := \left\{ \xi \in \mathbb{R}^d \,:\, \Phi(p) \geq \Phi(p_0) + \xi \cdot (p-p_0) \quad (\forall p \in \mathbb{R}^d) \right\}. \end{equation*} Fix $x \in E$ and $p_0 \in \mathbb{R}^d$. We aim to prove that $\partial_p \mathcal{H}(x,p_0) \subseteq T_E(x)$. Since the map $p \mapsto \mathcal{H}(x,p)$ is proper and convex as a supremum over convex functions, the subdifferential $\partial_p \mathcal{H}(x,p_0)$ is non-empty. \smallskip Let $\Omega$ be the set that of measures~$\pi$ that optimize \begin{equation} \label{SF:eqn:Hamiltonian_in_subdifferential_proof} \mathcal{H}(x,p_0) = \sup_\pi \left\{\int V_{x,p_0}(z) \pi( \mathrm{d} z) - \mathcal{I}(x,\pi) \right\} \end{equation} We first aim to relate $\partial_p \mathcal{H}(x,p_0)$ to $\bigcup_{\pi^* \in \Omega}\partial_p \int V_{x,p_0}(z) \pi^*( \mathrm{d} z)$. Afterwards, we show that for all $\pi$ we have $\partial_p \int V_{x,p_0}(z) \pi( \mathrm{d} z) \subseteq T_E(x)$. \smallskip For each fixed $p$ we can restrict our supremum in~\eqref{SF:eqn:Hamiltonian_in_subdifferential_proof} to the compact set of measures $\pi$ such that $\mathcal{I}(x,\pi) \leq 2\vn{V_{x,p}(\cdot)}$. For various $p$, this set might change and we might end up with a non-compact set. However, to study the subdifferential at $p_0$ we can instead at the map $p \mapsto \mathcal{H}(x,p)$ with its domain restricted to $[p_0-1,p_0 + 1]$ which leaves the subdifferential set unchanged. \smallskip Set $C_V := \sup_{p \in [p_0-1,p_0+1]} \sup_z \vn{v_{\cdot,p}(z)}_\infty < \infty$, and let~$\Xi$ to be the closure of \begin{equation} \{\pi \in \mathcal{P}(F) \, \| \, \mathcal{I}(x,\pi) \leq 2C_V\}. \end{equation} By Assumption~\ref{SF:assumption:regularity-I}, the set $\Xi$ is compact. Therefore, for all $p \in [p_0-1,p_0+1]$, we can restrict the supremum in~\eqref{SF:eqn:Hamiltonian_in_subdifferential_proof} to the compact set $\Xi$. \smallskip Using the definition of $\Omega$ as the set of optimizers and that $\mathcal{I}$ is lower semicontinuous by Assumption~\ref{SF:assumption:regularity-I}, it follows by \cite[Theorem 4.4.2]{HiriartLemarechal2012} that \begin{equation*} \partial_p \mathcal{H}(x,p_0) = ch \left(\bigcup_{\pi^* \in \Omega} \partial_p \left(\int V_{x,p_0}(z) \pi^*( \mathrm{d} z) - \mathcal{I}(x,\pi^*) \right)\right). \end{equation*} Here $ch$ denotes the convex hull. Since $\mathcal{I}(x,\pi^*)$ does not depend on $p$, \begin{equation*} \partial_p \mathcal{H}(x,p_0) = ch \left(\bigcup_{\pi^* \in \Omega} \partial_p \left(\int V_{x,p_0}(z) \pi^*( \mathrm{d} z)\right)\right). \end{equation*} Since $\partial_p V_{x,p}(z) \subseteq T_E(x)$ for all $p$ and $z$, we find by~\cite[Theorem 3]{Papageorgiou1997} applied with $\varepsilon = 0$ that $\partial_p \mathcal{H}(x,p_0) \subseteq T_E(x)$. This establishes~\cite[Assumption 3.16]{KraaijSchlottke2019}. \end{proof} \begin{proof}[Proof of Lemma~\ref{SF:lemma:V-equals-mathbf-V}] By~\cite[Theorem 7.10]{Kraaij2019ExpResolv} and \cite[Theorem 6.1]{Kraaij2019GenConv}, there is some sequentially strictly dense set $D \subseteq C_b(E)$ such that for $f \in D$ \begin{equation} \label{SF:eqn:convergence_R_to_V} \lim_{m \rightarrow \infty} \vn{R\left(\frac{t}{m}\right)^m f - V(t)f} = 0. \end{equation} Similarly, we find by \cite[Lemma 8.18]{FengKurtz2006} that for all $f \in C_b(E)$ and $x \in E$ \begin{equation} \label{SF:eqn:convergence_bfR_to_bfV} \lim_{m \rightarrow \infty} \mathbf{R}\left(\frac{t}{m}\right)^m f(x) = \mathbf{V}(t)f(x). \end{equation} Combining~\eqref{SF:eqn:convergence_R_to_V} and~\eqref{SF:eqn:convergence_bfR_to_bfV} we conclude that $V(t)f = \mathbf{V}(t)f$ for all $t$ and $f \in D$. Since Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP} implies $R(\lambda)h$ = $\mathbf{R}(\lambda)h$ for $h \in C_b(E)$, we conclude from~\eqref{SF:eqn:convergence_R_to_V} and~\eqref{SF:eqn:convergence_bfR_to_bfV} that $V(t)f = \mathbf{V}(t)f$ for all $t$ and $f \in D$. \smallskip Since $D$ is sequentially strictly dense by assumption, the equality for all $f \in C_b(E)$ follows if $V(t)$ and $\mathbf{V}(t)$ are sequentially continuous. The semigroup~$V(t)$ is seequentially continuous by~\cite[Theorem 7.10]{Kraaij2019ExpResolv} and \cite[Theorem~6.1]{Kraaij2019GenConv}, and~$\mathbf{V}(t)$ is sequentially continuous by~\cite[Lemma 8.22]{FengKurtz2006}. We conclude that $V(t)f = \mathbf{V}(t)f$ for all $f \in C_b(E)$ and $t \geq 0$. \end{proof} \subsection{Proof of alternative form of Lagrangian} \label{SF:sec:proof-alternative-form-of-L} We prove that the Lagrangian~$\mathcal{L}(x,v)$ defined in~\eqref{SF:prof-RF:Lagrangian} as the Legendre dual of~$\mathcal{H}(x,p)$ satisfies~\eqref{SF:eq:results-Lagr-opt-proc}. Recall that the Hamiltonian is \begin{equation*} \mathcal{H}(x,p)=\sup_{\pi\in\mathcal{P}(F)}\left[\int_F V_{x,p}(z)-\mathcal{I}(x,\pi)\right]. \end{equation*} For the proof, we write for~$\pi\in\mathcal{P}(F)$ \begin{equation*} \mathcal{H}_\pi(x,p) := \int_F V_{x,p}(z) \pi( \mathrm{d} z)\quad\text{and}\quad \mathcal{L}_\pi(x,v) := \sup_p \ip{p}{v} - \int_F V_{x,p}(z) \pi( \mathrm{d} z). \end{equation*} Furtheremore, let $\Phi(v,\pi)$ be the set of measurable functions $w \in L^1(F;\mathbb{R}^d,\pi)$ such that \begin{equation*} \int w(z) \pi( \mathrm{d} z) = v. \end{equation*} \begin{proposition}\label{SF:proposition:representation_of_Lagrangian} Suppose that Assumptions~\ref{SF:assumption:regularity-V} and~\ref{SF:assumption:regularity-I} are satisfied. Then \begin{equation*} \mathcal{L}(x,v) = \inf_\pi \inf_{w \in \Phi(v,\pi)} \left\{\int \mathcal{L}_z(x,w(z)) \pi( \mathrm{d} z) + \mathcal{I}(x,\pi) \right\}. \end{equation*} \end{proposition} This rewrite is a consequence of results in convex analysis and follows under much weaker assumptions, namely convexity of $\pi \mapsto \mathcal{I}(x,\pi)$ and $p \mapsto V_{x,p}(z)$, which is satisfied in our setting. The proof below only uses results from convex analysis in~\cite{Papageorgiou1997,HiriartLemarechal2012,Rockafellar1970}. These results have been stated for~$\mathbb{R}^d$, which is also the setting to which we restrict ourselves in this chapter. We believe, however, that the result should extend to a more general setting, but we were unable to find their generalizations in the literature on convex analysis. \begin{lemma} \label{SF:lemma:constant_momentum} Fix~$\pi\in\mathcal{P}(F)$ and suppose that $v \in \text{rel. int. dom } \mathcal{L}_\pi(x,\cdot)$. Then: \begin{enumerate}[(a)] \item There is a $p^* \in \mathbb{R}^d$ such that $v \in \partial_p \mathcal{H}_\pi(x,p^*)$, \item There is a $w^* \in \Phi(v,\pi)$ such that $w^*(z) \in \partial_p V_{x,p^*}(z)$ $\pi$ almost surely. \item \label{SF:item:equality_of_Lagrangians_in_relint} We have \begin{multline*} \sup_{p} \ip{p}{v} - \int V_{x,p}(z) \pi( \mathrm{d} z) \\ = \inf_{\substack{w(z) \\ \int w \mathrm{d} \pi = v}} \sup_{p(z)} \int \ip{p(z)}{w(z)} - V_{x,p(z)}(z) \pi( \mathrm{d} z). \end{multline*} \end{enumerate} \end{lemma} For the proof of this lemma, we use the notion of the relative interior of a convex set. If $A \subseteq \mathbb{R}^d$ is a convex set, then $\text{rel. int. } A$ is the interior of $A$ inside the smallest affine hyperplane in $\mathbb{R}^d$ that contains $A$. For a convex functional $\Phi : E \rightarrow (-\infty,\infty]$ the domain of $\Phi$, denoted by $\text{dom } \Phi$, is the set of points $x \in E$ where $\Phi(x) < \infty$. \begin{proof}[Proof of Lemma~\ref{SF:lemma:constant_momentum}] The Legendre transform of $\mathcal{H}_\pi$ equals $\mathcal{L}_\pi$. Since we have $v \in \text{rel. int. dom } \mathcal{L}_\pi(x,\cdot)$, we have by~\cite[Theorem 23.4]{Rockafellar1970} or~\cite[Theorem E.1.4.2]{HiriartLemarechal2012} that $\partial_v \mathcal{L}_\pi(x,v)$ is non-empty. Let $p^* \in \partial_v \mathcal{L}_\pi(x,v)$. Then by~\cite[Theorem 23.5]{Rockafellar1970} or~\cite[Proposition E.1.4.3]{HiriartLemarechal2012}, we obtain that $v \in \partial_p H_\pi(x,p^*)$. \smallskip By~\cite[Theorem~3]{Papageorgiou1997} applied for $\varepsilon = 0$, we find a $\pi$-integrable function~$w^*$ such that $\int w^*(z) \pi( \mathrm{d} z) = v$ and $w(z) \in \partial_p V_{x,p^*}(z)$ $\pi$ almost surely. We proceed with the proof of \ref{SF:item:equality_of_Lagrangians_in_relint}. To that end, note that \begin{multline*} \sup_{p} \ip{p}{v} - \int V_{x,p}(z) \pi( \mathrm{d} z) \\ \leq \inf_{\substack{w(z) \\ \int w \mathrm{d} \pi = v}} \sup_{p(z)} \int \ip{p(z)}{w(z)} - V_{x,p(z)}(z) \pi( \mathrm{d} z). \end{multline*} For the other inequality, note that \begin{align*} & \inf_{\substack{w(z) \\ \int w \mathrm{d} \pi = v}} \sup_{p(z)} \int \ip{p(z)}{w(z)} - V_{x,p(z)}(z) \pi( \mathrm{d} z) \\ & \quad \leq \sup_{p(z)} \int \ip{p(z)}{w^*(z)} - V_{x,p(z)}(z) \pi( \mathrm{d} z) \\ & \quad = \int \ip{p^*}{w^*(z)} - V_{x,p^*}(z) \pi( \mathrm{d} z) \\ & \quad = \ip{p^*}{v} - \int V_{x,p^*}(z) \pi( \mathrm{d} z) \\ & \quad \leq \sup_p \ip{p}{v} - \int V_{x,p}(z) \pi( \mathrm{d} z) \end{align*} where we used in the third line that $w(z) \in \partial_p V_{x,p^*}(z)$ $\pi$ almost surely by~\cite[Theorem 23.5]{Rockafellar1970} or~\cite[Propposition E.1.4.3]{HiriartLemarechal2012}. \end{proof} \begin{proof}[Proof of Proposition~\ref{SF:proposition:representation_of_Lagrangian}] We have \begin{align} \mathcal{L}(x,v) & = \sup_p \ip{p}{v} - \mathcal{H}(x,p) \notag \\ & = \sup_p \inf_{\pi \in \mathcal{P}(F)} \ip{p}{v} - \int V_{x,p}(z) \pi( \mathrm{d} z) + I_x(\pi) \notag \\ & = \inf_{\pi \in \mathcal{P}(F)} \sup_p \ip{p}{v} - \int V_{x,p}(z) \pi( \mathrm{d} z) + I_x(\pi) \label{SF:eqn:sion_lagrangian} \end{align} by Sion's minimax lemma, since the map $\pi \mapsto \mathcal{I}(x,\pi)$ is convex. Fix $\pi \in \mathcal{P}(F)$, and write \begin{align*} \widehat{\mathcal{L}}_\pi(x,v) = \inf_{w: \int w(z) \pi( \mathrm{d} z) = v} \int \mathcal{L}_z(x,w(z)) \pi( \mathrm{d} z). \end{align*} By \eqref{SF:eqn:sion_lagrangian}, our proposition follows if for all $(x,v)$ and $\pi$ we have \begin{equation} \label{SF:eqn:equality_Lagrangians_pi} \mathcal{L}_\pi(x,v) = \widehat{\mathcal{L}}_\pi(x,v). \end{equation} Fix $(x,v)$ and $\pi$. \smallskip \textit{Step 1:} We establish $\mathcal{L}_\pi(x,v) \leq \widehat{\mathcal{L}}_\pi(x,v)$. For any integrable function $z \mapsto w(z)$ such that $\int w(z) \pi( \mathrm{d} z) = v$, we have \begin{equation*} \mathcal{L}_\pi(x,v) = \sup_p \int \ip{p}{w(z)} - V_{x,p}(z) \pi( \mathrm{d} z), \end{equation*} implying that \begin{equation*} \mathcal{L}_\pi(x,v) = \inf_{w: \int w(z) \pi( \mathrm{d} z) = v} \sup_p \int \ip{p}{w(z)} - V_{x,p}(z) \pi( \mathrm{d} z) \leq \widehat{\mathcal{L}}_\pi(x,v) \end{equation*} by taking the supremum over $p$ inside the integral. We conclude that $\mathcal{L}_\pi(x,v) \leq \widehat{\mathcal{L}}_\pi(x,v)$. \smallskip \textit{Step 2:} We now establish that if $v \in \text{rel. int. dom } \mathcal{L}(x,\cdot)$ then $\mathcal{L}_\pi(x,v) = \widehat{\mathcal{L}}_\pi(x,v)$. Indeed, by Lemma \ref{SF:lemma:constant_momentum} there is a measurable function $z \mapsto w(z)$ such that $\int w(z) \pi( \mathrm{d} z) = v$ and \begin{align*} \widehat{\mathcal{L}}_\pi(x,v) & = \inf_{\substack{w(z) \\ \int w \mathrm{d} \pi = v}} \sup_{p(z)} \int \ip{p(z)}{w(z)} - V_{x,p(z)}(z) \pi( \mathrm{d} z) \\ & = \sup_{p} \ip{p}{v} - \int V_{x,p(z)}(z) \pi( \mathrm{d} z) \\ & = \mathcal{L}_\pi(x,v). \end{align*} \textit{Step 3:} We now establish $\mathcal{L}_\pi(x,v) = \widehat{\mathcal{L}}_\pi(x,v)$. By step 1, we have \begin{equation*} \text{rel. int. dom } \widehat{\mathcal{L}}_\pi(x,\cdot) \subseteq \text{rel. int. dom } \mathcal{L}_\pi(x,\cdot), \end{equation*} since the Lagrangians are ordered point-wise. By step 2, \begin{equation*} \text{if}\;v \in \text{rel. int. dom } \mathcal{L}_\pi(x,\cdot),\quad\text{then}\quad v \in \text{dom } \mathcal{L}_\pi(x,\cdot) \end{equation*} We conclude that \begin{equation*} \text{rel. int. dom } \widehat{\mathcal{L}}_\pi(x,\cdot) = \text{rel. int. dom } \mathcal{L}_\pi(x,\cdot), \end{equation*} and $\mathcal{L}_\pi(x,\cdot) = \widehat{\mathcal{L}}_\pi(x,\cdot)$ holds on this set. We conclude that $\mathcal{L}_\pi(x,v) = \widehat{\mathcal{L}}_\pi(x,v)$ by \cite[Corollary 7.3.4]{Rockafellar1970} (this can also be derived from \cite[Proposition B.1.2.6]{HiriartLemarechal2012}). \end{proof} \section{Proof of mean-field large deviations} \label{SF:sec:proof-mean-field} In this section, we prove Theorem~\ref{SF:thm:LDP-mean-field} by verifying the assumptions of our general large-deviation result (Theorem~\ref{SF:thm:LDP_general}) and the action-integral representation (Theorem~\ref{SF:thm:rate-function}), that is means Assumptions~\ref{SF:assumption:convergence-slow-nonlinear-generators},~\ref{SF:assumption:convergence-fast-nonlinear-generators},~\ref{SF:assumption:principal-eigenvalue-problem},~\ref{SF:assumption:regularity-V},~\ref{SF:assumption:regularity-I} and~\ref{SF:assumption:Hamiltonian_vector_field}. \smallskip We recall the setting: The slow-fast process~$(X^n,Z^n)$ takes values in~$E_n\times F$, where we embed~$E_n$ by identity into~$E=\mathcal{P}(\{1,\dots,q\})\times[0,\infty)^\Gamma$, and regard~$(X^n,Z^n)$ as a process on~$E\times F$. The set~$F$ is a finite-dimensional torus~$\mathbb{T}^,$. The generator of the slow-fast system is \begin{equation*} A_n f(x,z) := A_{n,z}^\mathrm{slow}f(\cdot,z)(x) + n\cdot A_{n,x}^\mathrm{fast}f(x,\cdot)(z), \end{equation*} with slow and fast generators given by \begin{align*} A_{n,z}^\mathrm{slow} g(x) &:= \sum_{ab,a\neq b} n\cdot \mu(a)\cdot r_n(a,b,\mu,z)\left[g(x_{a\to b})-g(x)\right],\\ A_{n,x}^\mathrm{fast} h(z) &:= \sum_i b_n^i(x,z)\partial_i h(z) + \sum_{ij}a_n^{ij}(x,z)\partial_i\partial_j h(z). \end{align*} \begin{proof}[Verification of Assumption~\ref{SF:assumption:convergence-slow-nonlinear-generators}] We have to find the slow Hamiltonian~$V_{x,p}(z)$ such that \begin{equation*} \frac{1}{n}e^{-nf}A_{n,z}^\mathrm{slow}e^{nf}\xrightarrow{n\to\infty} V_{x,\nabla f(x)}(z) \end{equation*} as specified in Assumption~\ref{SF:assumption:convergence-slow-nonlinear-generators}. We have \begin{align*} \frac{1}{n}e^{-nf(x)}A_{n,z}^\mathrm{slow}e^{nf(x)}&= \sum_{ab,a\neq b}\mu(a) r_n(a,b,\mu,z) \left[\exp\{n(f(x_{a\to b}^n)-f(x))\}-1\right]. \end{align*} Suppose that~$x_n=(\mu_n,w_n)\to x$. Then by Taylor expansion, \begin{equation*} n(f(x_{a\to b}^n)-f(x_n)) \xrightarrow{n\to\infty} \ip{\nabla f(x)}{e_{b}-e_a+e_{ab}}, \end{equation*} for all~$f\in C^2(E)$, uniformly on compacts~$K\subseteq E$. By the convergence assumption on~$r_n$, we obtain the claimed convergence with~$D_0=C_b^2(E)$ and \begin{equation*} V_{x,p}(z) = \sum_{ab,a\neq b}\mu(a)r(a,b,\mu,z)\left[e^{p_b-p_a+p_{ab}}-1\right]. \end{equation*} \end{proof} \begin{proof}[Verification of Assumption~\ref{SF:assumption:convergence-fast-nonlinear-generators}] Let~$x_n\to x$ in~$E$ and~$h_n\to h$ in~$C(F)$. By the convergence assumptions on the coefficients~$b_n^i$ and~$a_n^{ij}$, we obtain \begin{equation*} A_{n,x_n}^\mathrm{fast}h_n(z) \to \sum_ib^i(x,z)\partial_ih(z)+\sum_{ij}a^{ij}(x,z)\partial_i\partial_j h(z) =:A_x^\mathrm{fast}h(z) \end{equation*} uniformly over~$z \in F$. \end{proof} \begin{proof}[Verification of Assumption~\ref{SF:assumption:principal-eigenvalue-problem}] Part~\ref{SF:item:assumption:PI:domain} follows since~$F$ is compact. Let~$x\in E$ and~$p\in\mathbb{R}^d$. We find a strictly positive eigenfunction~$u:F\to(0,\infty)$ and an eigenvalue~$\mathbb{R}$ such that \begin{equation}\label{SF:eq:proof-mean-field-eigenvalue-problem} (V_{x,p} + A_x^\mathrm{fast})u=\lambda u. \end{equation} Then as remarked below Assumption~\ref{SF:assumption:principal-eigenvalue-problem}, part~\ref{SF:item:assumption:PI:solvePI} follows. Equation~\eqref{SF:eq:proof-mean-field-eigenvalue-problem} is a principal-eigenvalue problem for an uniformly elliptic operator. Uniform ellipticity follows by Condition~\ref{SF:condition:mean-field:reg-coefficients} on the diffusion coefficients and the uniform convergence in Assumption~\ref{SF:mean-field:conv-coeff}. Hence there exists a unique eigenfunction~$u$ with a real eigenvalue~$\lambda$ (e.g. Sweers~\cite{Sweers92}). By~\cite{DonskerVaradhan75}, this principal eigenvalue satisfies the variational representation \begin{equation*} \lambda = \sup_{\pi\in\mathcal{P}(F)}\left[\int_F V_{x,p}(z)\, \mathrm{d}\pi(z) - \mathcal{I}(x,\pi)\right], \end{equation*} with the functional \begin{equation*} \mathcal{I}(x,\pi)=-\inf_{\phi>0}\int_F\frac{A_x^\mathrm{fast}\phi(z)}{\phi(z)}\, \mathrm{d}\pi(z). \end{equation*} Hence Assumption~\ref{SF:assumption:principal-eigenvalue-problem} holds with the Hamtilonian~\eqref{SF:eq:sec-assumption:H} as claimed. \end{proof} \begin{proof}[Verification of Assumptions~\ref{SF:assumption:regularity-V} and~\ref{SF:assumption:regularity-I}] The verification can be found in Proposition~\ref{prop:mean-field-coupled-to-diffusion} of Chapter~\ref{chapter:CP-for-two-scale-H}. The proofs are also found in~\cite[Proposition~8.2 and~8.4]{KraaijSchlottke2019}. Our example at hand is considered in Remark~8.5 in there. \end{proof} \begin{proof}[Verification of Assumption~\ref{SF:assumption:Hamiltonian_vector_field}] This follows via computation. For instance, consider~$E=\mathcal{P}(\{a,b\})$ (ignoring the flux for the moment), and identify~$E$ with the simplex in~$\mathbb{R}^2$. Fix the external variable~$z$. We have to show~$\partial_pV_{x,p}(z)\subseteq T_E(x)$. Recall that~$T_E(x)$ is the tangent cone at~$x$, that means the vectors at~$x$ pointing inside of~$E$. We compute the vector~$\nabla_p V_{x,p}(z)\in\mathbb{R}^2$, \begin{equation*} \nabla_pV_{x,p}(z) = \begin{pmatrix} \mu_a r(a,b,\mu,z) (-1) e^{p_b-p_a} + \mu_b r(b,a,\mu,z) e^{p_a-p_b}\\ \mu_a r(a,b,\mu,z) e^{p_b-p_a} + \mu_b r(b,a,\mu,z) (-1)e^{p_a-p_b} \end{pmatrix}. \end{equation*} For~$\mu=(\mu_a,\mu_b)\in E$ with~$\mu_a,\mu_b > 0$, the tangent cone~$T_E(x)$ is spanned by~$(1,-1)^T$. Since~$\nabla_pV_{x,p}(z)$ is orthogonal to~$(1,1)^T$, we indeed find~$\partial_pV_{x,p}(z)\subseteq T_E(x)$ in that case. For~$\mu=(1,0)$, the tangent cone is~$T_E(1,0)=\{\lambda(-1,1)^T\,:\,\lambda \geq 0\}$. We have \begin{equation*} \nabla_pV_{\mu,p}(z) = \begin{pmatrix} r(a,b,\mu,z) (-1) e^{p_b-p_a}\\ r(a,b,\mu,z) e^{p_b-p_a} \end{pmatrix}, \end{equation*} which is parallel to~$(-1,1)^T$, and therefore~$\partial_pV_{\mu,p}(z)\subseteq T_E(x)$. The argument is similar for~$\mu=(0,1)$. The general case (including the fluxes) follows from writing out the definitions. \end{proof} \chapter{Comparison Principle for Two-Scale Hamiltonians} \label{chapter:CP-for-two-scale-H} \chaptermark{CP for Two-Scale Hamiltonians} \section{Introduction and aim} \label{section:introduction} The main purpose of this chapter is to establish well-posedness for first-order nonlinear partial differential equations of Hamilton-Jacobi-Bellman type on subsets $E$ of $\mathbb{R}^d$, \begin{equation}\label{eq:intro:HJ-general} u(x)-\lambda \,\mathcal{H}\left[u(x),\nabla u(x)\right] = h(x),\quad x \in E\subseteq \mathbb{R}^d.\tag{\text{HJB}} \end{equation} In there, $\lambda > 0$ is a scalar and $h$ is a continuous and bounded function on~$E$. The Hamiltonian $\mathcal{H}:E\times \mathbb{R}^d\to \mathbb{R}$ is given by \begin{equation}\label{eq:intro:variational_hamiltonian} \mathcal{H}(x,p) = \sup_{\theta \in \Theta}\left[\Lambda(x,p,\theta) - \mathcal{I}(x,\theta)\right], \end{equation} where $\theta \in \Theta$ plays the role of a control variable. For fixed $\theta$, the function $\Lambda$ can frequently be interpreted as an Hamiltonian itself. We call it the \emph{internal} Hamiltonian. The function $\mathcal{I}$ can be interpreted as the cost of applying the control $\theta$. This type of Hamiltonians typically arises in two-scale problems such as discussed in the previous chapter. \smallskip We will establish existence of viscosity solutions (e.g.~\cite{CIL92}) in the sense of Definition~\ref{definition:viscosity_solutions} via a resolvent defined in terms of a standard discounted control procedure. However, the main problem we overcome in this chapter is to verify a \emph{comparison principle} in order to establish uniqueness of viscosity solutions. The comparison principle for Hamilton-Jacobi equations is a well-studied problem in the literature. The standard assumption that allows one to obtain the comparison principle in the context of optimal control problems (e.g.~\cite{BardiDolcetta1997}) is that either there is a modulus of continuity $\omega$ such that \begin{equation}\label{eq:intro:standard-reg-estimate-on-H} |\mathcal{H}(x,p)-\mathcal{H}(y,p)| \leq \omega\left(|x-y|(1+|p|)\right), \end{equation} or that $\mathcal{H}$ is uniformly coercive: \begin{equation} \label{eqn:uniformly_coercive} \lim_{|p| \rightarrow \infty} \inf_x \mathcal{H}(x,p) = \infty. \end{equation} The estimate~\eqref{eq:intro:standard-reg-estimate-on-H} can be translated into conditions for~$\Lambda$ and $\mathcal{I}$, which include (e.g. \cite[Chapter~III]{BardiDolcetta1997}) \begin{itemize} \item $|\Lambda(x,p,\theta)-\Lambda(y,p,\theta)|\leq \omega_\Lambda(|x-y|(1+|p|))$, uniformly in $\theta$, and \item $\mathcal{I}$ is bounded, continuous and $|\mathcal{I}(x,\theta) - \mathcal{I}(y,\theta)| \leq \omega_\mathcal{I}(|x-y|)$. \end{itemize} However, such type of estimates are not satisfied for the examples that we are interested in. We make these examples of~\eqref{eq:intro:HJ-general} more precise in Section~\ref{section:intro:motivation}. There we also explain why the standard assumptions are not satisfied and where the challenge of solving~\eqref{eq:intro:HJ-general} is pointed out in the literature. Here, we focus on the motivation for our assumptions. They mainly build up on two observations: \begin{enumerate}[label=(\roman*)] \item Fix a control variable $\theta_0\in\Theta$ and consider the Hamiltonian $H(x,p):= \Lambda(x,p,\theta_0)$. In all our examples, the comparison principle is satisfied for sub- and supersolutions of~$u(x)-\lambda H(x,\nabla u(x))=h(x)$. \item In all our examples, the cost function $\mathcal{I}(x,\theta)$ satisfies an estimate of the type $|\mathcal{I}(x,\theta) - \mathcal{I}(y,\theta)| \leq \omega_{\mathcal{I},C}(|x-y|)$ on sublevel sets $\{\mathcal{I} \leq C\}$. \end{enumerate} Our main idea is to take advantage of viscosity sub- and supersolution inequalities in order to work on sublevel sets of the cost function $\mathcal{I}$. To do so, we assume that $H(x,p)=\Lambda(x,p,\theta_0)$ satisfies a \emph{continuity estimate} uniformly for $\theta_0$ varying in a compact set. This continuity estimate captures the key information that allows to prove the comparison principle for~$H$. In the end, this is what we call the bootstrap principle: given sufficient regularity of $\mathcal{I}$, one can bootstrap the comparison principle for the internal Hamiltonian $\Lambda$ to obtain a comparison principle for the full Hamiltonian $\mathcal{H}$. In examples, this approach proves to be a crucial improvement over known results. \smallskip In summary, the novelties we present in this chapter are: \begin{enumerate}[$\bullet$] \item Motivated by examples violating the standard regularity estimate~\eqref{eq:intro:standard-reg-estimate-on-H} on Hamiltonians, we find different conditions under which the comparison principle for~\eqref{eq:intro:HJ-general} is satisfied for variational Hamiltonians $\mathcal{H}$ of the type~\eqref{eq:intro:variational_hamiltonian}. The result is formulated in Theorem~\ref{theorem:comparison_principle_variational}. The main bootstrapping argument is explained in simplified form in Section~\ref{section:bootstrap-argument-in-nutshell} and carried out in Section~\ref{section:comparison_principle}. \item A proof of the comparison principle that covers a class of non-coercive Hamiltonians which typically arises in mean-field interacting particle systems that are coupled to external variables. This example has not been treated before, and we make it explicit in Proposition~\ref{prop:mean-field-coupled-to-diffusion} of Section~\ref{section:examples-H}. \item A proof of existence of a viscosity solution based on solving subdifferential inclusions in the non-compact setting. The proof relies on continuity of $\mathcal{H}$ and finding a priori estimates on the range of solutions to associated differential inclusions. The result is formulated in Theorem~\ref{theorem:existence_of_viscosity_solution}, and the structure of the proof is explained in Section~\ref{section:strategy_existence_viscosity_solution}. \end{enumerate} With these results established, we can study large deviation problems with two time-scales from a Hamilton-Jacobi point-of-view in more generality. This is the subject of Chapter~5, where we exploit the semigroup approach to large deviations. We remark that in~\cite[Lemmas~9.3,~9.19,~9.25]{FengKurtz2006}, a different technique is introduced, based on introducing an extra parameter~$\lambda$. We give further comments on that in the discussion section in Chapter~\ref{chapter:discussion}. \paragraph{Overview of this chapter.} In Section~\ref{section:intro:motivation}, we discuss Hamiltonians violating the standard regularity assumptions. The main results are formulated in Section \ref{section:results}. We proceed with a discussion of the strategy of the proofs in Section \ref{section:strategy}. In Section \ref{section:regularity-of-H-and-L} we establish regularity properties of $\mathcal{H}$ used in the later proof sections. In Section \ref{section:comparison_principle} we establish the comparison principle. In Section \ref{section:construction-of-viscosity-solutions} we establish that a resolvent operator $R(\lambda)$ in terms of an exponentially discounted control problem gives rise to viscosity solutions of the Hamilton-Jacobi-Bellman equation~\eqref{eq:intro:HJ-general}. Finally, in Section~\ref{section:verification-for-examples-of-Hamiltonians} we verify the assumptions for examples. \section{Examples violating the standard assumptions} \label{section:intro:motivation} Hamiltonians of the type~\eqref{eq:intro:variational_hamiltonian} arise in a range of fields. In this section, we mention two examples of Hamiltonians arising in the context of stochastic systems with two time scales. We explain why they violate the standard regularity estimates. These examples illustrate the need for an alternative set of assumptions allowing to treat these cases. These Hamiltonians frequently arise in the study of systems with multiple time-scales, e.g. geophysical flows, planetary motion, finance, weather-climate interaction models, molecular dynamics and models in statistical physics---we provide more background in Chapter~5. In such systems, one can often recognize a slow and a fast component. Typically, one is interested in the behaviour of the slow component in the limit in which the separation of time scales goes to infinity. As the fast system equilibrates before the slow system has made a significant difference, the limit of such systems can be described by a ordinary or partial differential equation involving only the average behaviour of the fast component. \smallskip However, in applications an infinite separation of time scales is never really achieved. Thus, the slow process still shows fluctuations around its limiting behaviour while the fast process fluctuates around its average. The effective fluctuations arise from the combination of both sources. In this two-scale context, when analysing the fluctuations by means of large-deviation techniques, one obtains Hamiltonians of the type~\eqref{eq:intro:variational_hamiltonian}. We refer to~\cite{KumarPopovic2017} for derivations in this context, and to~\cite{BouchetGrafkeTangarifeVandenEijnden2016} for an extensive explanation in which the authors study ODE's coupled to fast diffusion. In these examples, the internal Hamiltonians~$\Lambda$ capture the fluctuations of the slow component, while the cost function~$\mathcal{I}$ arises from fluctuations of averages of the fast component. The full Hamiltonian~$\mathcal{H}$ takes both contributions into account. \smallskip \textit{Example 1}. In~\cite{BudhirajaDupuisGanguly2018}, the authors study large deviations of a diffusion processes with vanishing noise on $E = \mathbb{R}^d$ coupled to a fast jump process on a finite discrete set $\{1,\dots,J\}$. They identified the challenge of proving comparison principles for Hamiltonians arising in such two-scale systems, where the Hamiltonians can be casted in the form~\eqref{eq:intro:variational_hamiltonian}. We consider this general setting in Proposition~\ref{prop:diffusion-coupled-to-jumps} in Section~\ref{section:examples-H}. We illustrate the issues arising in a simpler but more concrete form. With $d=1$ and $J=2$, when approaching this problem from the Hamilton-Jacobi perspective, a key step (e.g.~\cite{KumarPopovic2017}) is to solve~\eqref{eq:intro:HJ-general} with $\mathcal{H}$ consisting of the following ingredients: \begin{enumerate}[label=(\roman*)] \item The internal state space is $E=\mathbb{R}^d$. \item The set of control variables is $\Theta=\mathcal{P}(\{1,2\})$. \item The internal Hamiltonian~$\Lambda$ is given by \begin{equation*} \Lambda(x,p,\theta) = \frac{1}{2}a(x,1)|p|^2 \theta_1 + \frac{1}{2} a(x,2)|p|^2 \theta_2, \end{equation*} where $a(x,i) > 0$ and $\theta_i = \theta(\{i\})$. \item The cost function~$\mathcal{I}$ is given by \begin{equation*} \mathcal{I}(x,\theta) = \sup_{w\in\mathbb{R}^2} \left[r_{12}(x)\theta_1 \left(1-e^{w_2-w_1}\right) + r_{21}(x)\theta_2 (1-e^{w_1-w_2})\right], \end{equation*} where $r_{ij}(x) \geq 0$. \end{enumerate} In this example, the cost function is unbounded if $r_{ij}(x)$ is unbounded. For instance, consider $\theta_1 = 1$ and $\theta_2 = 0$. Then by choosing $w=(1,0)$ in the supremum, \begin{equation*} \mathcal{I}(x,\theta) \geq C \, r_{12}(x), \end{equation*} and thus $\mathcal{I}(x,\theta)$ diverges as $|x|\to\infty$. \smallskip We now turn to another notable problem with two time-scales that motivates our considerations: a system of mean-field interacting particles coupled to fast external variables. \smallskip \textit{Example 2}. In~\cite{BertiniChetriteFaggionatoGabrielli2018}, the authors prove large-deviation principles of mean-field interacting particles that are coupled to fast time-periodic variables. In this setting, the associated Hamilton-Jacobi equations are solved in~\cite{Kr17}. However, when considering a coupling to general fast random variables such as diffusions, then solving the corresponding Hamilton-Jacobi equations remained an open challenge. In full generality, we formulate this case in Proposition~\ref{prop:mean-field-coupled-to-diffusion}. For a corresponding large-deviation analysis, we refer to Chapter~\ref{chapter:LDP-in-slow-fast-systems} (based on~\cite{KraaijSchlottke2020}). Here we illustrate the difficulties that arise by considering the Hamiltonian in a simplified setting: \begin{enumerate}[label=(\roman*)] \item The internal state space is $E=\mathcal{P}(\{a,b\}) \times [0,\infty)\times[0,\infty)$, embedded in~$\mathbb{R}^4$ by identifying~$\mathcal{P}(\{a,b\})$ with the simplex in~$\mathbb{R}^2$. We denote the variables as $x = (\mu,w)$, with $\mu\in\mathcal{P}(\{a,b\})$ and $w\in[0,\infty)^2$. \item The set of control variables is $\Theta=\mathcal{P}(\mathbb{T})$, that is the probability measures on the torus~$\mathbb{T}$. \item The internal Hamiltonian~$\Lambda$ is given by \begin{multline*} \Lambda(x,p,\theta) = \mu_a r_{ab}(\mu,\theta)\left[\exp\left\{p_b-p_a + p_{ab}\right\}-1\right] \\ + \mu_b r_{ba}(\mu,\theta)\left[\exp\left\{p_a-p_b + p_{ba}\right\}-1\right], \end{multline*} with $p = (p_a,p_b,p_{ab},p_{ba}) \in \mathbb{R}^4$ and $\mu_i := \mu(\{i\})$. The rates $r_{ij}$ are non-negative. \item The cost function~$\mathcal{I}:\Theta\to[0,\infty]$ is independent of $x$ and is given by \begin{equation*} \mathcal{I}(\theta) = \sup_{\substack{u\in C^\infty(\mathbb{T})\\ u > 0}} \int_\mathbb{T} \left(-\frac{u''(y)}{u(y)}\right)\, \mathrm{d}\theta(y) \end{equation*} \end{enumerate} In this example, the internal Hamiltonian~$\Lambda$ is not uniformly coercive. For instance, take momenta $p$ such that $p_b-p_a+p_{ab}$ is constant. Then if $|p|\to\infty$, we do not necessarily have that $\Lambda(x,p,\theta)\to\infty$. A similar effect occurs when choosing $p_a \rightarrow \infty$ and $\mu_a = 0$. Regarding the cost function, for any singular measure $\delta_z$ with a point $z\in S$ we have $\mathcal{I}(\delta_z) = \infty$. This similarly holds for finite convex combinations of Dirac measures. Since this linear span is dense in $\mathcal{P}(\mathbb{T})$, this implies that $\mathcal{I}$ can not be continuous. \section{Main results} \label{section:results} In this section, we start with preliminaries in Section~\ref{section:preliminaries} which includes the definition of viscosity solutions and that of the comparison principle. \smallskip We proceed in Section~\ref{section:results:HJ-of-Perron-Frobenius-type} with the main results: a comparison principle for the Hamilton-Jacobi-Bellman equation~\eqref{eq:intro:HJ-general} based on variational Hamiltonians of the form~\eqref{eq:intro:variational_hamiltonian}, and the existence of viscosity solutions. \smallskip In Section \ref{section:assumptions} we collect all the assumptions that are needed for all main results in one place and discuss the applicability of our results. In Section~\ref{section:examples-H}, we verify the assumptions for the examples that motivate the Hamilton-Jacobi equations we discuss in this chapter. \subsection{Preliminaries} \label{section:preliminaries} For a Polish space $\mathcal{X}$, we denote by $C(\mathcal{X})$ and $C_b(\mathcal{X})$ the spaces of continuous and bounded continuous functions respectively. If $\mathcal{X} \subseteq \mathbb{R}^d$ then we denote by $C_c^\infty(\mathcal{X})$ the space of smooth functions that vanish outside a compact set. We denote by $C_{cc}^\infty(\mathcal{X})$ the set of smooth functions that are constant outside of a compact set, and by $\mathcal{P}(\mathcal{X})$ the space of probability measures on $\mathcal{X}$. We equip $\mathcal{P}(\mathcal{X})$ with the weak topology, that is, the one induced by convergence of integrals against bounded continuous functions. \smallskip Throughout this chapter, $E$ will be the set on which we base our Hamilton-Jacobi equations. We assume that $E$ is a subset of $\mathbb{R}^d$ that is a Polish space which is contained in the $\mathbb{R}^d$ closure of its $\mathbb{R}^d$ interior. This ensures that gradients of functions are determined by their values on $E$. Note that we do not assume that $E$ is open. We assume that the space of controls $\Theta$ is Polish. \smallskip We next introduce viscosity solutions for the Hamilton-Jacobi equation with Hamiltonians like $\mathcal{H}(x,p)$ of our introduction. \begin{definition}[Viscosity solutions and comparison principle] \label{definition:viscosity_solutions} Let $A : C_b(E) \to C_b(E)$ be an operator with domain $\mathcal{D}(A)$, $\lambda > 0$ and $h \in C_b(E)$. Consider the Hamilton-Jacobi equation \begin{equation} f - \lambda A f = h. \label{eqn:differential_equation} \end{equation} We say that $u$ is a \textit{(viscosity) subsolution} of equation \eqref{eqn:differential_equation} if $u$ is bounded, upper semi-continuous and if, for every $f \in \mathcal{D}(A)$ there exists a sequence $x_n \in E$ such that \begin{gather*} \lim_{n \uparrow \infty} u(x_n) - f(x_n) = \sup_x u(x) - f(x), \\ \lim_{n \uparrow \infty} u(x_n) - \lambda A f(x_n) - h(x_n) \leq 0. \end{gather*} We say that $v$ is a \textit{(viscosity) supersolution} of equation \eqref{eqn:differential_equation} if $v$ is bounded, lower semi-continuous and if, for every $f \in \mathcal{D}(H)$ there exists a sequence $x_n \in E$ such that \begin{gather*} \lim_{n \uparrow \infty} v(x_n) - f(x_n) = \inf_x v(x) - f(x), \\ \lim_{n \uparrow \infty} v(x_n) - \lambda Af(x_n) - h(x_n) \geq 0. \end{gather*} We say that $u$ is a \textit{(viscosity) solution} of equation \eqref{eqn:differential_equation} if it is both a subsolution and a supersolution to \eqref{eqn:differential_equation}. We say that \eqref{eqn:differential_equation} satisfies the \textit{comparison principle} if for every subsolution $u$ and supersolution $v$ to \eqref{eqn:differential_equation}, we have $u \leq v$. \end{definition} \begin{remark} \label{remark:existence of optimizers} Consider the definition of subsolutions. Suppose that the testfunction $f \in \mathcal{D}(A)$ has compact sublevel sets, then instead of working with a sequence $x_n$, there exists $x_0 \in E$ such that \begin{gather*} u(x_0) - f(x_0) = \sup_x u(x) - f(x), \\ u(x_0) - \lambda A f(x_0) - h(x_0) \leq 0. \end{gather*} A similar simplification holds in the case of supersolutions. For an explanatory text on the notion of viscosity solutions and fields of applications, we refer to~\cite{CIL92}. \end{remark} \subsection{Hamilton-Jacobi-Bellman Equations} \label{section:results:HJ-of-Perron-Frobenius-type} In this Section, we state our main results, which are the comparison principle (Theorem~\ref{theorem:comparison_principle_variational}) and the existence of solutions (Theorem \ref{theorem:existence_of_viscosity_solution}). We consider the variational Hamiltonian $\mathcal{H} : E \times \mathbb{R}^d \rightarrow \mathbb{R}$ given by \begin{equation}\label{eq:results:variational_hamiltonian} \mathcal{H}(x,p) = \sup_{\theta \in \Theta}\left[\Lambda(x,p,\theta) - \mathcal{I}(x,\theta)\right]. \end{equation} The precise assumptions on the maps $\Lambda$ and $\mathcal{I}$ are formulated in Section~\ref{section:assumptions}. Define the operator $\mathbf{H} f(x) := \mathcal{H}(x,\nabla f(x))$ with domain $\mathcal{D}(\mathbf{H}) = C_{cc}^\infty(E)$. Our first main result is that this operator $\mathbf{H}$ constructed out of $\mathcal{H}$ satisfies the comparison principle. \begin{theorem}[Comparison principle]\label{theorem:comparison_principle_variational} Suppose that the maps~$\Lambda$ and~$\mathcal{I}$ satisfy Assumptions~\ref{assumption:results:regularity_of_V} and~\ref{assumption:results:regularity_I}, respectively. Then for any $h \in C_b(E)$ and $\lambda > 0$, the comparison principle holds for \begin{equation}\label{eq:results:HJ-eq} f - \lambda \, \mathbf{H} f = h. \end{equation} \end{theorem} \begin{remark}[Uniqueness] If $u$ and $v$ are two viscosity solutions of~\ref{eq:results:HJ-eq}, then we have $u\leq v$ and $v\leq u$ by the comparison principle, giving uniqueness. \end{remark} \begin{remark}[Domain] The comparison principle holds with any domain that satisfies $C_{cc}^\infty(E)\subseteq \mathcal{D}(\mathbf{H})\subseteq C^1_b(E)$. We state it with $C^\infty_{cc}(E)$ to connect it with the existence result of Theorem~\ref{theorem:existence_of_viscosity_solution}, where we need to work with test functions whose gradients have compact support. \end{remark} We turn to the existence of a viscosity solution for~\eqref{eq:results:HJ-eq}. As mentioned in the introduction, the viscosity solution is given in terms of an optimization problem with discounted cost. The Legendre dual $\mathcal{L} : E \times \mathbb{R}^d \rightarrow [0,\infty]$ of $\mathcal{H}$, given by \begin{equation*} \mathcal{L}(x,v) := \sup_{p\in\mathbb{R}^d} \left[\ip{p}{v} - \mathcal{H}(x,p)\right], \end{equation*} plays the role of a running cost. In the following Theorem, $\mathcal{A}\mathcal{C}$ is the collection of absolutely continuous paths in $E$. For each $\lambda > 0$, let $R(\lambda)$ be the operator \begin{equation}\label{HJB:eq:resolvent} R(\lambda) h(x) = \sup_{\substack{\gamma \in \mathcal{A}\mathcal{C}\\ \gamma(0) = x}} \int_0^\infty \lambda^{-1} e^{-\lambda^{-1}t} \left[h(\gamma(t)) - \int_0^t \mathcal{L}(\gamma(s),\dot{\gamma}(s))\right] \, \mathrm{d} t. \end{equation} \begin{theorem}[Existence of viscosity solution] \label{theorem:existence_of_viscosity_solution} Suppose that~$\Lambda$ and $\mathcal{I}$ satisfy Assumptions~\ref{assumption:results:regularity_of_V} and~\ref{assumption:results:regularity_I}, respectively, and that $\mathcal{H}$ satisfies Assumption~\ref{assumption:Hamiltonian_vector_field}. Then the function~$R(\lambda)h$ is the unique viscosity solution to~\eqref{eq:results:HJ-eq}. \end{theorem} \begin{comment} \begin{remark}[Assumption~\ref{assumption:Hamiltonian_vector_field}] a \end{remark} \begin{remark} For fixed $x\in E$, the functional $\theta\mapsto \mathcal{I}(x,\theta)$... \end{remark} \end{comment} \subsection{Assumptions} \label{section:assumptions} In this section, we formulate and comment on the assumptions imposed on the Hamiltonians defined in the previous sections. We first motivate the assumptions that are required for proving the comparison principle, Theorem~\ref{theorem:comparison_principle_variational}. \smallskip Usually, proofs of the comparison principle for a subsolution $u$ and a supersolution $v$ for the equation $f - \lambda \mathbf{H} f = h$ are reduced to establishing an estimate of the type \begin{equation*} \liminf_{\varepsilon \downarrow 0} \liminf_{\alpha \rightarrow \infty}\mathcal{H}(x_{\alpha,\varepsilon},\alpha(x_{\alpha,\varepsilon}-y_{\alpha,\varepsilon})) - \mathcal{H}(y_{\alpha,\varepsilon},\alpha (x_{\alpha,\varepsilon}-y_{\alpha,\varepsilon})) \leq 0 \end{equation*} where $(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon})$ are elements of $E$ such that \begin{multline} \label{eqn:heuristic:doubling_variable} u(x_{\alpha,\varepsilon}) - v(x_{\alpha,\varepsilon}) - \frac{\alpha}{2} |x_{\alpha,\varepsilon}-y_{\alpha,\varepsilon}|^2 - \frac{\varepsilon}{2} (|x_{\alpha,\varepsilon}|^2 + |y_{\alpha,\varepsilon}|^2) \\ = \sup_{x,y \in E} u(x) - v(y) - \frac{\alpha}{2} |x-y|^2 - \frac{\varepsilon}{2} (|x|^2 + |y|^2). \end{multline} Equation~\eqref{eqn:heuristic:doubling_variable}, together with the sub- and supersolution property of $u$ and $v$ respectively, has the following consequences: \begin{enumerate}[(1)] \item \label{item:relative_compact} For all $\varepsilon >0 $, the set $\{x_{\alpha,\varepsilon}, y_{\alpha,\varepsilon} \, | \, \alpha > 0\}$ is relatively compact in $E$; \item \label{item:distance} For all $\varepsilon >0 $, we have $|x_{\alpha,\varepsilon} - y_{\alpha,\varepsilon}| + \alpha |x_{\alpha,\varepsilon} - y_{\alpha,\varepsilon}|^2 \rightarrow 0$ as $\alpha \rightarrow \infty$; \item \label{item:coercivity} For all $\varepsilon > 0$, we have \[ \inf_{\alpha} \mathcal{H}(x_{\alpha,\varepsilon}, \alpha(x_{\alpha,\varepsilon} - y_{\alpha,\varepsilon})) > - \infty \quad\text{and}\quad \sup_{\alpha} \mathcal{H}(y_{\alpha,\varepsilon}, \alpha(x_{\alpha,\varepsilon} - y_{\alpha,\varepsilon})) < \infty. \] \end{enumerate} In our bootstrap procedure, we aim to lift the comparison principle that holds for the Hamilton-Jacobi equation in terms of $\Lambda$ to that for $\mathbf{H}$. Thus, we need to establish an estimate of the type \eqref{eqn:heuristic:doubling_variable} under assumptions of the type \ref{item:relative_compact}, \ref{item:distance} and \ref{item:coercivity} where in addition, we have to vary our control variable~$\theta$. It turns out that it suffices to vary $\theta$ in a compact set in $\Theta$ that depends on $\varepsilon$. In addition, to make sure that we can bootstrap, we have to relax the $\sup$ and $\inf$ in \ref{item:coercivity} to a $\limsup$ and $\liminf$. \smallskip To establish the comparison principle, the quadratic distance is not special, except for being symmetric and well suited for quadratic Hamiltonians. We will work with a general non-negative function~$\Psi$ to penalize the distance between~$x$ and~$y$, and use a function~$\Upsilon$ to penalize points~$x$ and~$y$ far away from the `origin'. \begin{definition}[Penalization function]\label{def:results:good_penalization_function} We say that $\Psi : E^2 \rightarrow [0,\infty)$ is a \textit{ penalization function} if $\Psi \in C^1(E^2)$ and if $x = y$ if and only if $\Psi(x,y) = 0$. \end{definition} \begin{definition}[Containment function]\label{def:results:compact-containment} We say that a function $\Upsilon : E \rightarrow [0,\infty]$ is a \textit{containment function} for $\Lambda$ if there is a constant $c_\Upsilon$ such that \begin{itemize} \item For every $c \geq 0$, the set $\{x \, | \, \Upsilon(x) \leq c\}$ is compact; \item We have $\sup_\theta\sup_x \Lambda\left(x,\nabla \Upsilon(x),\theta\right) \leq c_\Upsilon$. \end{itemize} \end{definition} \begin{definition}[Continuity estimate] \label{def:results:continuity_estimate} Let $\Psi$ be a penalization function and let $\mathcal{G}: E \times \mathbb{R}^d\times\Theta : (x,p,\theta)\mapsto \mathcal{G}(x,p,\theta)$ be a function. Suppose that for $\varepsilon > 0$ and $\alpha > 0$, we have a collection of variables $(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha})$ in $E^2$ and variables $\theta_{\varepsilon,\alpha}$ in $\Theta$. We say that this collection is \textit{fundamental} for $\mathcal{G}$ with respect to $\Psi$ if: \begin{enumerate}[label = (C\arabic*)] \item \label{item:def:continuity_estimate:1} For each $\varepsilon$, there are compact sets $K_\varepsilon \subseteq E$ and $\widehat{K}_\varepsilon\subseteq\Theta$ such that for all $\alpha$ we have $x_{\varepsilon,\alpha},y_{\varepsilon,\alpha} \in K_\varepsilon$ and $\theta_{\varepsilon,\alpha}\in\widehat{K}_\varepsilon$. \item \label{item:def:continuity_estimate:2} For each $\varepsilon > 0$, we have limit points $x_{\varepsilon} \in K_\varepsilon$ and $y_{\varepsilon} \in K_\varepsilon$ of $x_{\alpha,\varepsilon}$ and $y_{\alpha,\varepsilon}$ as $\alpha\rightarrow \infty$. For these limit points we have \begin{equation*} \lim_{\alpha \rightarrow \infty} \alpha \Psi(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon}) = 0, \qquad \Psi(x_{\varepsilon},y_{\varepsilon}) = 0. \end{equation*} \item \label{item:def:continuity_estimate:3} We have \begin{align} & \limsup_{\varepsilon \rightarrow 0} \limsup_{\alpha \rightarrow \infty} \mathcal{G}\left(y_{\alpha,\varepsilon}, - \alpha (\nabla \Psi(x_{\alpha,\varepsilon},\cdot))(y_{\alpha,\varepsilon}),\theta_{\varepsilon,\alpha}\right) < \infty, \label{eqn:control_on_Gbasic_sup} \\ & \liminf_{\varepsilon \rightarrow 0} \liminf_{\alpha \rightarrow \infty} \mathcal{G}\left(x_{\alpha,\varepsilon}, \alpha (\nabla \Psi(\cdot,y_{\alpha,\varepsilon}))(x_{\alpha,\varepsilon}),\theta_{\varepsilon,\alpha}\right) > - \infty. \label{eqn:control_on_Gbasic_inf} \end{align} \label{itemize:funamental_inequality_control_upper_bound} In other words, the operator $\mathcal{G}$ evaluated in the proper momenta is eventually bounded from above and from below. \end{enumerate} We say that $\mathcal{G}$ satisfies the \textit{continuity estimate} if for every fundamental collection of variables we have % \begin{multline}\label{equation:Xi_negative_liminf} \liminf_{\varepsilon \rightarrow 0} \liminf_{\alpha \rightarrow \infty} \mathcal{G}\left(x_{\alpha,\varepsilon}, \alpha (\nabla \Psi(\cdot,y_{\alpha,\varepsilon}))(x_{\alpha,\varepsilon}),\theta_{\varepsilon,\alpha}\right) \\ - \mathcal{G}\left(y_{\alpha,\varepsilon}, - \alpha (\nabla \Psi(x_{\alpha,\varepsilon},\cdot))(y_{\alpha,\varepsilon}),\theta_{\varepsilon,\alpha}\right) \leq 0. \end{multline} \end{definition} The continuity estimate is a sensible notion because it is satisfied in a wide range of examples. Indeed, all our examples satisfy the continuity estimate., and in Section \ref{section:verification_of_continuity_estimate}, we verify the continuity estimate in three different contexts. In the appendix of~\cite{KraaijSchlottke2019}, we state a slightly more general continuity estimate on the basis of multiple penalization functions. For the first reading of the proofs below, the use of this more general setting would be distracting. We want to mention, however, that all arguments below can be carried out on the basis of this more elaborate continuity estimate. Following~\cite{Kr17} a continuity estimate of this more elaborate type can be established in the context of Markov jump processes and their fluxes. \smallskip Our first assumption essentially states that we can solve the comparison principle for the Hamilton-Jacobi equation for $\Lambda$ uniformly over compact sets in $\Theta$. In addition to this assumption, we assume \ref{item:assumption:slow_regularity:controlled_growth} which states the function $\Lambda$ grows roughly equally fast in $p$ for different control variables. \begin{assumption}\label{assumption:results:regularity_of_V} The function $\Lambda:E\times\mathbb{R}^d\times\Theta\to\mathbb{R}$ in the Hamiltonian~\eqref{eq:results:variational_hamiltonian} satisfies the following. \begin{enumerate}[label=($\Lambda$\arabic*)] \item \label{item:assumption:slow_regularity:continuity} The map $\Lambda : E\times\mathbb{R}^d\times\Theta\to\mathbb{R}$ is continuous and for any $(x,p)$, we have boundedness: $\|\Lambda(x,p,\cdot)\|_{\Theta}:= \sup_{\theta\in\Theta}|\Lambda(x,p,\theta)| < \infty$. \item \label{item:assumption:slow_regularity:convexity} For any $x\in E$ and $\theta\in\Theta$, the map $p\mapsto \Lambda(x,p,\theta)$ is convex. For $p_0=0$, we have $\Lambda(x,p_0,\theta) = 0$ for all $x\in E$ and all $\theta \in \Theta$. \item \label{item:assumption:slow_regularity:compact_containment} There exists a containment function $\Upsilon : E \to [0,\infty)$ in the sense of Definition~\ref{def:results:compact-containment}. \item \label{item:assumption:slow_regularity:continuity_estimate} The function $\Lambda$ satisfies the continuity estimate. % \item \label{item:assumption:slow_regularity:controlled_growth} For every compact set $K \subseteq E$, there exist constants $M, C_1, C_2 \geq 0$ such that for all $x \in K$, $p \in \mathbb{R}^d$ and all $\theta_1,\theta_2\in\Theta$, we have \begin{equation*} \Lambda(x,p,\theta_1) \leq \max\left\{M,C_1 \Lambda(x,p,\theta_2) + C_2\right\}. \end{equation*} \end{enumerate} \end{assumption} Our next assumption is on the regularity of the cost functional $\mathcal{I}$. They are satisfied for continuous and bounded $\mathcal{I}$ and $\Theta$ a compact space. \begin{assumption}\label{assumption:results:regularity_I} The functional $\mathcal{I}:E\times\Theta \to [0,\infty]$ in~\eqref{eq:results:variational_hamiltonian} satisfies the following. \begin{enumerate}[label=($\mathcal{I}$\arabic*)] \item \label{item:assumption:I:lsc} The map $(x,\theta) \mapsto \mathcal{I}(x,\theta)$ is lower semi-continuous on $E \times \Theta$. \item \label{item:assumption:I:zero-measure} For any $x\in E$, there exists a point $\theta_x\in\Theta$ such that $\mathcal{I}(x,\theta_x) = 0$. \item \label{item:assumption:I:compact-sublevelsets} For any $x \in E$, compact set $K \subseteq E$ and $C \geq 0$ the set $\left\{\theta \in \Theta \, \middle| \mathcal{I}(x,\theta) \leq C\right\}$ is compact and $\cup_{x\in K}\left\{\theta\in\Theta \, \middle| \, \mathcal{I}(x,\theta) \leq C\right\}$ is relatively compact. \item \label{item:assumption:I:finiteness} For any converging sequence $x_n \to x$ in $E$ and sequence $\theta_n \in \Theta$, if there is an $M > 0$ such that $\mathcal{I}(x_n,\theta_n) \leq M < \infty$ for all $n \in \mathbb{N}$, then there exists a neighborhood $U_x$ of $x$ and a constant $M' > 0$ such that for any $y \in U_x$ and $n \in \mathbb{N}$, \begin{equation*} \mathcal{I}(y,\theta_n) \leq M' < \infty. \end{equation*} \item \label{item:assumption:I:equi-cont} For every compact set $K \subseteq E$ and each $M \geq 0$ the collection of functions $\{\mathcal{I}(\cdot,\theta)\}_{\theta \in \Theta_M}$ with \begin{equation*} \Theta_{M} := \left\{\theta\in\Theta \, \middle| \, \forall \, x \in K: \, \mathcal{I}(x,\theta) \leq M \right\} \end{equation*} is equicontinuous. That is: for all $\varepsilon > 0$, there is a $\delta > 0$ such that for all $\theta \in \Theta_M$ and $x,y \in K$ such that $d(x,y) \leq \delta$ we have $|\mathcal{I}(x,\theta) - \mathcal{I}(y,\theta)| \leq \varepsilon$. \end{enumerate} \end{assumption} \begin{remark}[Gamma-convergence] The assumptions on $\mathcal{I}$ imply that for any sequence $x_n\to x$ in $E$, the functionals defined by $\mathcal{I}_n(\theta):=\mathcal{I}(x_n,\theta)$ $\Gamma$-converge to $\mathcal{I}_\infty$ defined by $\mathcal{I}_\infty(\theta) := \mathcal{I}(x,\theta)$. We give a proof in Proposition \ref{prop:Gamma-convergence-of-I} below. \end{remark} We turn to Theorem \ref{theorem:existence_of_viscosity_solution}. A key ingredient in establishing the existence of a viscosity solution to Hamilton-Jacobi equations is the existence of `optimally' controlled paths. The optimal controls can, for continuously differentiable Hamiltonians, be found from the Hamiltonian flow. In our context, $\mathcal{H}$ is not continuously differentiable. We will show in Proposition \ref{prop:reg-of-H-and-L:reg-H}, however, that $\mathcal{H}$ is convex in $p$. We can therefore define the subdifferential set \begin{multline} \label{eqn:subdifferential_H} \partial_p \mathcal{H}(x_0,p_0) \\ := \left\{ \xi \in \mathbb{R}^d \,:\, \mathcal{H}(x_0,p) \geq \mathcal{H}(x_0,p_0) + \xi \cdot (p-p_0) \quad (\forall p \in \mathbb{R}^d) \right\}. \end{multline} Instead using solutions arising from the differential equation arising from the gradient of $\mathcal{H}$, we will use solutions to differential inclusions arising from $\partial_p \mathcal{H}$. As our set $E$ is not necessarily equal to $\mathbb{R}^d$, but could be, e.g. a domain with corners like $[0,\infty)^d$, we need some conditions to make sure that the solutions to our differential inclusions remain within $E$. Assumption \ref{assumption:Hamiltonian_vector_field} below will make sure that the Hamiltonian vector field points `inside' $E$. \begin{definition} \label{definition:tangent_cone} The tangent cone (sometimes also called \textit{Bouligand cotingent cone}) to $E$ in $\mathbb{R}^d$ at $x$ is \begin{equation*} T_E(x) := \left\{z \in \mathbb{R}^d \, \middle| \, \liminf_{\lambda \downarrow 0} \frac{d(y + \lambda z, E)}{\lambda} = 0\right\}. \end{equation*} \end{definition} \begin{assumption} \label{assumption:Hamiltonian_vector_field} The map $\mathcal{H} : E \times \mathbb{R}^d \rightarrow \mathbb{R}$ defined in~\eqref{eq:results:variational_hamiltonian} is such that $\partial_p \mathcal{H}(x,p) \subseteq T_E(x)$ for all $p$. \end{assumption} Assumption \ref{assumption:Hamiltonian_vector_field} is intuitively implied by the comparison principle for $\mathbf{H}$. We therefore expect Assumption \ref{assumption:Hamiltonian_vector_field} to be satisfied in any situation in which Theorem \ref{theorem:comparison_principle_variational} holds. We argue in a simple case why this is to be expected. The main reason is that the comparison principle for $\mathbf{H}$ builds upon the \emph{maximum principle}. \smallskip Let $E = [0,1]$ and $f,g \in C^1_b(E)$. Suppose that $f(0) - g(0) = \sup_x f(x) - g(x)$. As $0$ is a boundary point, we conclude that $f'(0) \leq g'(0)$. If the maximum principle holds, we must have \begin{equation*} \mathcal{H}(0,f'(0)) = Hf(0) \leq Hg(0) = \mathcal{H}(0,g'(0)). \end{equation*} Hence the map $p \mapsto \mathcal{H}(0,p)$ is increasing, which just means \begin{equation*} \partial_p \mathcal{H}(x,p)) \subseteq [0,\infty) = T_{[0,1]}(0). \end{equation*} \subsection{Examples of Hamiltonians} \label{section:examples-H} The purpose of this section is to demonstrate via different examples that the method introduced is versatile enough to capture a variety of interesting examples. Propositions~\ref{prop:diffusion-coupled-to-jumps} and~\ref{prop:diffusion-coupled-to-diffusion} correspond to the Hamiltonian that one encounters in two-scale systems as studied in~\cite{BudhirajaDupuisGanguly2018,KumarPopovic2017}. The example of Proposition~\ref{prop:mean-field-coupled-to-diffusion} arises in models of mean-field interacting particles that are coupled to fast external variables, whose Hamiltonians can not be treated with standard methods. Recall the form of the Hamiltonian, \begin{equation}\label{eq:results:H-example-section} \mathcal{H}(x,p) = \sup_{\theta \in \Theta}\left[\Lambda(x,p,\theta) - \mathcal{I}(x,\theta)\right], \end{equation} Each definition below corresponds to a specification of the elements involved in~\eqref{eq:results:H-example-section}. All propositions are proven in Section~\ref{section:verification-for-examples-of-Hamiltonians}, by verifying the general Assumptions~\ref{assumption:results:regularity_of_V} and~\ref{assumption:results:regularity_I} on the functions~$\Lambda$ and~$\mathcal{I}$. Let us start with Hamiltonians arising from a diffusion process coupled to a fast jump process. \begin{proposition}[Diffusion coupled to jumps]\label{prop:diffusion-coupled-to-jumps} Let $E=\mathbb{R}^d$ and $F=\{1,\dots,J\}$ be a finite set. Suppose the following. \begin{enumerate}[label=(\roman*)] \item The set of control variables is $\Theta:=\mathcal{P}(\{1,\dots,J\})$, that is probability measures over the finite set $F$. \item The function $\Lambda$ is given by \begin{equation*} \Lambda(x,p,\theta) := \sum_{i\in F}\left[\ip{a(x,i)p}{p}+\ip{b(x,i)}{p}\right]\theta_i, \end{equation*} where $a:E\times F\to\mathbb{R}^{d\times d}$ and $b:E\times F\to\mathbb{R}^d$, and $\theta_i:=\theta(\{i\})$. \item The cost function $\mathcal{I}:E\times\Theta\to[0,\infty)$ is given by \begin{equation*} \mathcal{I}(x,\theta) := \sup_{w\in\mathbb{R}^J}\sum_{ij}r(i,j,x)\theta_i \left[1-e^{w_j-w_i}\right], \end{equation*} with non-negative rates $r:F^2\times E\to[0,\infty)$. \end{enumerate} Suppose that the cost function~$\mathcal{I}$ satisfies the assumptions of Proposition~\ref{prop:verify:DV-for-Jumps} and the function~$\Lambda$ satisfies the assumptions of Proposition~\ref{prop:verify-ex:Lambda_quadratic}. Then Theorems~\ref{theorem:comparison_principle_variational} and~\ref{theorem:existence_of_viscosity_solution} apply to the Hamiltonian~\eqref{eq:results:H-example-section}. \end{proposition} Under irreducibility conditions on the rates, as assumed below in Proposition~\ref{prop:verify:DV-for-Jumps}, by~\cite{DonskerVaradhan75} the Hamiltonian~$\mathcal{H}(x,p)$ is the principal eigenvalue of the matrix $A_{x,p} \in \mathrm{Mat}_{J \times J}(\mathbb{R})$ given by \[ A_{x,p} = \mathrm{diag}\left[\ip{a(x,1)p}{p}+\ip{b(x,1)}{p}, \dots, \ip{a(x,J)p}{p}+\ip{b(x,J)}{p}\right] + R_x, \] where $x,p \in \mathbb{R}^d$ and $R_x$ is the matrix with~$(R_x)_{ii} = -\sum_{j \neq i} r_{ij}(x)$ on the diagonal and $(R_x)_{ij} = r_{ij}(x)$ for $i \neq j$. \smallskip The next Hamiltonian arises from a diffusion process coupled to a diffusion. \begin{proposition}[Diffusion coupled to diffusion]\label{prop:diffusion-coupled-to-diffusion} Let $E=\mathbb{R}^d$ and $F$ be a smooth compact Riemannian manifold without boundary. Suppose the following. \begin{enumerate}[label=(\roman*)] \item The set of control variables $\Theta$ equals the space $\mathcal{P}(F)$. \item The function $\Lambda$ is given by \begin{equation*} \Lambda(x,p,\theta) := \int_F\left[\ip{a(x,z)p}{p}+\ip{b(x,z)}{p}\right]\,d\theta(z), \end{equation*} with $a:E\times F\to\mathbb{R}^{d\times d}$ and $b:E\times F\to\mathbb{R}^d$. \item The cost function $\mathcal{I}:E\times\Theta\to[0,\infty]$ is given by \begin{equation*} \mathcal{I}(x,\theta) := \sup_{\substack{u\in \mathcal{D}(L_x)\\u>0}}\left[ -\int_F \frac{L_xu}{u}\,d\theta\right], \end{equation*} where $L_x$ is a second-order elliptic operator locally of the form \begin{equation*} L_x = \frac{1}{2}\nabla\cdot\left(a_x \nabla\right) + b_x\cdot \nabla, \end{equation*} on the domain $\mathcal{D}(L_x):=C^2(F)$, with positive-definite matrix $a_x$ and co-vectors $b_x$. \end{enumerate} Suppose that the cost function~$\mathcal{I}$ satisfies the assumptions of Proposition~\ref{prop:verify:DV-functional-of-drift-diffusion} and the function~$\Lambda$ satisfies the assumptions of Proposition~\ref{prop:verify-ex:Lambda_quadratic}. Then Theorems~\ref{theorem:comparison_principle_variational} and~\ref{theorem:existence_of_viscosity_solution} apply to the Hamiltonian~\eqref{eq:results:H-example-section}. \end{proposition} In the context of weakly interacting jump processes on a collection of states $\{1,\dots,q\}$ the dynamics of the empirical measures takes place on $\mathcal{P}(\{1,\dots,q\})$. Transitions occur over the bonds $(a,b) \in E^2$ with $a \neq b$. We denote the set of bonds with $\Gamma$. \begin{definition}[Proper kernel] \label{definition:proper_kernel} Let $v : \Gamma \times \mathcal{P}(\{1,\dots,q\}) \times \Theta \rightarrow \mathbb{R}^+$. We say that $v$ is a \textit{proper kernel} if $v$ is continuous and if for each $(a,b) \in \Gamma$, the map $(\mu,\theta) \mapsto v(a,b,\mu,\theta)$ is either identically equal to zero or satisfies the following two properties: \begin{enumerate}[(a)] \item $v(a,b,\mu,\theta) = 0$ if $\mu(a) = 0$ and $v(a,b,\mu,\theta) > 0$ for all $\mu$ with $\mu(a) > 0$. \item There exists a decomposition $v(a,b,\mu,\theta) = v_{\dagger}(a,b,\mu(a)) v_{\ddagger}(a,b,\mu,\theta)$ such that $v_{\dagger}$ is increasing in the third coordinate and such that $v_{\ddagger}(a,b,\cdot,\cdot)$ is continuous and satisfies $v_{\ddagger}(a,b,\mu,\theta) > 0$. \end{enumerate} \end{definition} A typical example of a proper kernel is given by \begin{equation*} v(a,b,\mu,\theta) = \mu(a) r(a,b,\theta) e^{ \partial_a V(\mu) - \partial_b V(\mu)}, \end{equation*} with $r > 0$ continuous and $V \in C^1_b(\mathcal{P}(\{1,\dots,q\})$. \begin{proposition}[Mean-field coupled to diffusion]\label{prop:mean-field-coupled-to-diffusion} Let the space $E$ be given by the embedding of $E:=\mathcal{P}(\{1,\dots,J\})\times[0,\infty)^\Gamma\subseteq \mathbb{R}^d$ and $F$ be a smooth compact Riemannian manifold without boundary. Suppose the following. \begin{enumerate}[label=(\roman*)] \item The set of control variables $\Theta$ equals $\mathcal{P}(F)$. \item The function $\Lambda$ is given by \begin{equation*} \Lambda((\mu,w),p,\theta) = \sum_{(a,b) \in \Gamma} v(a,b,\mu,\theta)\left[\exp\left\{p_b - p _a + p_{(a,b)} \right\} - 1 \right] \end{equation*} with a proper kernel $v$ in the sense of Definition~\ref{definition:proper_kernel}. \item The cost function $\mathcal{I}:E\times\Theta\to[0,\infty]$ is given by \begin{equation*} \mathcal{I}(x,\theta) := \sup_{\substack{u\in \mathcal{D}(L_x)\\u>0}}\left[ -\int_F \frac{L_xu}{u}\,d\theta\right], \end{equation*} where $L_x$ is a second-order elliptic operator locally of the form \begin{equation*} L_x = \frac{1}{2}\nabla\cdot\left(a_x \nabla\right) + b_x\cdot \nabla, \end{equation*} on the domain $\mathcal{D}(L_x):=C^2(F)$, with positive-definite matrix $a_x$ and co-vectors $b_x$. \end{enumerate} Suppose that the cost function~$\mathcal{I}$ satisfies the assumptions of Proposition~\ref{prop:verify:DV-functional-of-drift-diffusion} and the function~$\Lambda$ satisfies the assumptions of Proposition~\ref{prop:verify-ex:Lambda_exponential}. Then Theorems~\ref{theorem:comparison_principle_variational} and~\ref{theorem:existence_of_viscosity_solution} apply to the Hamiltonian~\eqref{eq:results:H-example-section}. \end{proposition} An analogous proposition can be formulated for mean-field particles coupled to jumps as in Proposition~\ref{prop:diffusion-coupled-to-jumps}. \section{Strategy of the proofs} \label{section:strategy} We comment on the overall strategy of proofs. In Section~\ref{section:bootstrap-argument-in-nutshell}, we explain informally without the details how the bootstrap argument works in a simple setting in which $E$ is taken to be compact. This allows us to focus on the bootstrapping argument without having to bother with the reduction to compact sets. We proceed with a discussion on the existence of a viscosity solution in Section~\ref{section:strategy_existence_viscosity_solution}. \subsection{The bootstrap argument in a nutshell} \label{section:bootstrap-argument-in-nutshell} In this section, we explain informally the main bootstrapping idea behind proving the comparison principle with Hamiltonians of the type~\eqref{eq:results:variational_hamiltonian} for \begin{equation*} u(x)-\mathcal{H}(x,\nabla u(x)) = 0, \end{equation*} assuming compactness of $E$ and $\Psi(x,y) = \frac{1}{2}|x-y|^2$. In what follows, $u_1$ is a subsolution and $u_2$ is a supersolution. Recall that for smooth functions $f$, if $(u_1-f)$ is maximal at a point $x$, then \begin{equation*} u_1(x) -\mathcal{H}(x,\nabla f(x)) \leq 0. \end{equation*} Similarly for the supersolution $u_2$: If $(f-u_2)$ is maximal at a point $y$, then \begin{equation*} u_2(y)-\mathcal{H}(y,\nabla f(y)) \geq 0. \end{equation*} We sketch how to prove $u_1\leq u_2$ in several steps. \begin{enumerate}[label=(\roman*)] \item By the classical doubling of variables procedure (e.g. \cite{CIL92}), choosing for each $\alpha > 0$ points $x_{\alpha},y_\alpha$ such that \begin{equation*} u_1(x_\alpha) - u_2(y_\alpha) - \alpha \Psi(x_\alpha,y_\alpha) = \sup_{x,y \in E} u_1(x) - u_2(y) - \alpha \Psi(x,y), \end{equation*} then by the properties of $\Psi$, we have \begin{equation} \label{eqn:informal_control_Psi} \alpha \Psi(x_\alpha,y_\alpha) \rightarrow 0 \end{equation} and the difference $\sup_x u_1(x) - u_2(x)$ can be approximated as \begin{equation*} \sup(u_1-u_2) \leq \liminf_{\alpha \rightarrow \infty} u_1(x_\alpha) - u_2(y_\alpha). \end{equation*} Set $p_\alpha := \alpha(x_\alpha - y_\alpha)$. Using the subsolution inequality $u_1(x_\alpha)\leq \mathcal{H}(x_\alpha,p_\alpha)$ and the supersolution inequality $u_2(y_\alpha) \geq \mathcal{H}(y_\alpha,p_\alpha)$, one arrives at the estimate \begin{equation*} \sup(u_1-u_2) \leq \liminf_{\alpha \rightarrow \infty} \mathcal{H}(x_\alpha,p_\alpha)-\mathcal{H}(y_\alpha,p_\alpha). \end{equation*} \item Recall that the Hamiltonian is given by \begin{equation*} \mathcal{H}(x,p) = \sup_{\theta\in\Theta}\left[\Lambda(x,p,\theta) - \mathcal{I}(x,\theta)\right]. \end{equation*} Taking the optimizer $\theta_\alpha$ for $\mathcal{H}(x_\alpha,p_\alpha)$ and estimating the Hamiltonian at $y_\alpha$ with this optimizer, we obtain \begin{multline*} \sup(u_1-u_2) \leq \\ \liminf_{\alpha \rightarrow \infty} \left[\Lambda(x_\alpha,p_\alpha,\theta_\alpha) - \Lambda(y_\alpha,p_\alpha,\theta_\alpha)\right] + \left[ \mathcal{I}(y_\alpha,\theta_\alpha)- \mathcal{I}(x_\alpha,\theta_\alpha)\right]. \end{multline*} \item \label{item:informal_continuity_estimate} We assume the \emph{continuity estimate} on $\Lambda$. That means that if we have \begin{align} & \alpha \Psi(x_\alpha,y_\alpha) \rightarrow 0 \label{eqn:informal_control_cont_estimate1} \\ & \liminf_{\alpha\to\infty}\Lambda(x_\alpha,p_\alpha,\theta_\alpha) > -\infty, \label{eqn:informal_control_cont_estimate2} \\ & \limsup_{\alpha\to\infty}\Lambda(y_\alpha,p_\alpha,\theta_\alpha) < \infty, \label{eqn:informal_control_cont_estimate3} \end{align} and that $\theta_{\alpha}$ are in a compact set, then the difference of $\Lambda$'s is controlled as \begin{equation*} \liminf_{\alpha\to\infty}\left[\Lambda(x_\alpha,p_\alpha,\theta_\alpha) - \Lambda(y_\alpha,p_\alpha,\theta_\alpha)\right] \leq 0. \end{equation*} We postpone the verification that $\theta_{\alpha}$ are in a compact set to the next step \ref{item:informal_boundedness_I} below. Part~\eqref{eqn:informal_control_cont_estimate1} is just what we already know~\eqref{eqn:informal_control_Psi}. We show how the other two bounds follow from the sub- and supersolution inequalities. By the subsolution inequality, \begin{equation*} u_1(x_\alpha) \leq \mathcal{H}(x_\alpha,p_\alpha) = \Lambda(x_\alpha,p_\alpha,\theta_\alpha) - \mathcal{I}(x_\alpha,\theta_\alpha) \leq \Lambda(x_\alpha,p_\alpha,\theta_\alpha), \end{equation*} and~\eqref{eqn:informal_control_cont_estimate2} follows since $u_1$ is bounded. Letting $\theta_\alpha^0$ be the control variable such that $\mathcal{I}(y_\alpha,\theta_\alpha^0) = 0$, we obtain from the supersolution inequality that \begin{equation} \label{eqn:informal_supersolution_bound} u_2(y_\alpha) \geq \mathcal{H}(y_\alpha,p_\alpha) \geq \Lambda(y_\alpha,p_\alpha,\theta_\alpha^0), \end{equation} and therefore $\Lambda(y_\alpha,p_\alpha,\theta_\alpha^0)$ is bounded above. Assuming that \begin{equation*} \Lambda(y_\alpha,p_\alpha,\theta_\alpha) \leq C_1 \Lambda(y_\alpha,p_\alpha,\theta_\alpha^0) + C_2, \end{equation*} the bound~\eqref{eqn:informal_control_cont_estimate3} follows. In summary, if indeed $\theta_{\alpha}$ are in a compact set, taking the $\liminf_{\alpha\to\infty}$ in the last estimate on $(u_1-u_2)$, we obtain \begin{equation*} \sup(u_1-u_2) \leq 0 + \liminf_{\alpha\to\infty}\left[\mathcal{I}(y_\alpha,\theta_\alpha)- \mathcal{I}(x_\alpha,\theta_\alpha)\right]. \end{equation*} \item \label{item:informal_boundedness_I} We assume that if the cost functions are uniformly bounded, \begin{equation} \label{eqn:informal_bounds_on_I} \mathcal{I}(x_\alpha,\theta_\alpha) \leq M \quad \text{and} \quad \mathcal{I}(y_\alpha,\theta_\alpha) \leq M, \end{equation} then (1) the control variables $\theta_\alpha$ are in a compact set, implying that we can carry out the argument of step~\ref{item:informal_continuity_estimate} above, and (2) the cost functions are continuous as a function of the internal variables $x$, giving \begin{equation*} \limsup_{\alpha\to\infty}\left[\mathcal{I}(y_\alpha,\theta_\alpha)- \mathcal{I}(x_\alpha,\theta_\alpha)\right] = 0. \end{equation*} The required bounds on $\mathcal{I}$ in~\eqref{eqn:informal_bounds_on_I} follow as well from the sub- and supersolution inequalities. From the subsolution inequality, we have \begin{equation*} u_1(x_\alpha) \leq \mathcal{H}(x_\alpha,p_\alpha) = \Lambda(x_\alpha,p_\alpha,\theta_\alpha) - \mathcal{I}(x_\alpha,\theta_\alpha). \end{equation*} Thus the bound on $\mathcal{I}(x_\alpha,\theta_\alpha)$ follows if we establish an upper bound on $\Lambda(x_\alpha,p_\alpha,\theta_\alpha)$. Note that \begin{equation*} \Lambda(x_\alpha,p_\alpha,\theta_\alpha) \leq C_1 \Lambda(x_\alpha,p_\alpha,\theta_\alpha^0) + C_2 \end{equation*} and \begin{equation*} \Lambda(x_\alpha,p_\alpha,\theta_\alpha^0) = \Lambda(y_\alpha,p_\alpha,\theta_\alpha^0) + \left[\Lambda(x_\alpha,p_\alpha,\theta_\alpha^0)-\Lambda(y_\alpha,p_\alpha,\theta_\alpha^0)\right]. \end{equation*} We have an upper bound for the first term on the right-hand side by \eqref{eqn:informal_supersolution_bound}. The second term is bounded above by the continuity estimate, which can be carried out as we know that the $\theta_{\alpha}^0$ are in a compact set because they satisfy $\mathcal{I}(y_\alpha,\theta_{\alpha}^0) = 0$. Since $y_\alpha$ is close to $x_\alpha$ and $\mathcal{I}$ is continuous as a function of $x$ when bounded, the bound on $\mathcal{I}(x_\alpha,\theta_\alpha)$ carries over to $\mathcal{I}(y_\alpha,\theta_\alpha)$. \end{enumerate} In summary, by using the information contained in the sub- and supersolution inequalities, the continuity estimate of the functions $\Lambda$ bootstraps to a continuity estimate of $\mathcal{H}$, giving the comparison principle. \subsection{Proof of the existence of a viscosity solution}\label{section:strategy_existence_viscosity_solution} For the existence of a viscosity solution to $f - \lambda \mathbf{H} f = h$, we will use the results of Chapter 8 of \cite{FengKurtz2006}. We will briefly discuss the method to obtain this result. To establish that $R(\lambda)h$ given by~\eqref{HJB:eq:resolvent} yields a viscosity solution to $f - \lambda \mathbf{H} f = h$, we follow a general strategy, first used in \cite{FengKurtz2006} and summarized in a more general context in~\cite[Proposition~3.4]{Kraaij2019GenConv}. For this strategy, we need to check three properties (see also~Section~\ref{BG:sec:semigroup-flow-HJ-eq} of Chapter~2): \begin{enumerate}[(a)] \item For all $(f,g) \in \mathbf{H}$, we have $f = R(\lambda)(f - \lambda g)$ ; \item The operator $R(\lambda)$ is a pseudo-resolvent: for all $h \in C_b(E)$ and $0 < \alpha < \beta$ we have \begin{equation*} R(\beta)h = R(\alpha) \left(R(\beta)h - \alpha \frac{R(\beta)h - h}{\beta} \right). \end{equation*} \item The operator $R(\lambda)$ is contractive. \end{enumerate} In other words: if $R(\lambda)$ serves as a classical left-inverse to $\mathbbm{1} - \lambda \mathbf{H}$ and is also a pseudo-resolvent, then it is a viscosity right-inverse of $(\mathbbm{1}- \lambda \mathbf{H})$. Establishing (c) is a matter of writing out the definition. The proof of (a) and (b) stems from two main properties of exponential random variable. Let~$\tau_\lambda$ be the measure on~$\mathbb{R}^+$ corresponding to the exponential random variable with mean~$\lambda^{-1}$. \begin{itemize} \item (a) is related to integration by parts: for bounded measurable functions $z$ on $\mathbb{R}^+$, we have \begin{equation*} \lambda \int_0^\infty z(t) \, \tau_\lambda( \mathrm{d} t) = \int_0^\infty \int_0^t z(s) \, \mathrm{d} s \, \tau_\lambda( \mathrm{d} t). \end{equation*} \item (b) is related to a more involved integral property of exponential random variables. For $0 < \alpha < \beta$, we have \begin{multline*} \int_0^\infty z(s) \tau_\beta( \mathrm{d} s) \\ = \frac{\alpha}{\beta} \int_0^\infty z(s) \tau_\alpha( \mathrm{d} s) + \left(1 - \frac{\alpha}{\beta}\right) \int_0^\infty \int_0^\infty z(s+u) \, \tau_\beta( \mathrm{d} u) \, \tau_\alpha( \mathrm{d} s). \end{multline*} \end{itemize} Establishing (a) and (b) can then be reduced by a careful analysis of optimizers in the definition of $R(\lambda)$, and concatenation or splittings thereof. This was carried out in Chapter 8 of \cite{FengKurtz2006} on the basis of three assumptions, namely \cite[Assumptions 8.9, 8.10 and 8.11]{FengKurtz2006}. We verify these in Section~\ref{section:construction-of-viscosity-solutions}. \section{Regularity of the Hamiltonian} \label{section:regularity-of-H-and-L} In this section, we establish continuity, convexity and the existence of a containment function for the Hamiltonian $\mathcal{H}$ of \ref{eq:results:variational_hamiltonian}. We repeat its definition for convenience: \begin{equation} \label{eqn:regularity_section_H_variational_rep} \mathcal{H}(x,p) = \sup_{\theta \in \Theta}\left[\Lambda(x,p,\theta) - \mathcal{I}(x,\theta)\right]. \end{equation} \begin{proposition}[Regularity of the Hamiltonian]\label{prop:reg-of-H-and-L:reg-H} Let $\mathcal{H} : E \times \mathbb{R}^d\to \mathbb{R}$ be the Hamiltonian as in \eqref{eqn:regularity_section_H_variational_rep}, and suppose that Assumptions~\ref{assumption:results:regularity_of_V} and~\ref{assumption:results:regularity_I} are satisfied. Then: \begin{enumerate}[label=(\roman*)] \item \label{item:prop:reg-of-H-and-L:convex} For any $x \in E$, the map $p \mapsto \mathcal{H}(x,p)$ is convex and $\mathcal{H}(x,0) = 0$. \item \label{item:prop:reg-of-H-and-L:compact-contain} With the containment function $\Upsilon : E \to \mathbb{R}$ of~\ref{item:assumption:slow_regularity:compact_containment}, we have \[ \sup_{x \in E}\mathcal{H}(x,\nabla\Upsilon(x)) \leq C_\Upsilon < \infty. \] \end{enumerate} \end{proposition} \begin{proof}[Proof] The map $p \mapsto \mathcal{H}(x,p)$ is convex as it is the supremum over convex functions. \smallskip For proving $\mathcal{H}(x,0) = 0$, let $x \in E$. Then by~\ref{item:assumption:slow_regularity:convexity} of Assumption~\ref{assumption:results:regularity_of_V}, we have $\Lambda(x,0,\theta) = 0$, and therefore % \[ \mathcal{H}(x,0) = - \inf_{\theta\in\Theta} \mathcal{I}(x,\theta) = 0, \] % since $\mathcal{I} \geq 0$ and $\mathcal{I}(x,\theta_x)=0$ for some $\theta_x$ by~\ref{item:assumption:I:zero-measure} of Assumption~\ref{assumption:results:regularity_I}. Regarding~\ref{item:prop:reg-of-H-and-L:compact-contain}, we note that by~\ref{item:assumption:slow_regularity:compact_containment}, \begin{align*} \mathcal{H}(x,\nabla \Upsilon(x)) \leq \sup_\theta \Lambda(x,\nabla \Upsilon(x),\theta) \leq \sup_{\theta\in\Theta}\sup_{x \in E} \Lambda(x,\nabla \Upsilon(x),\theta) \leq C_\Upsilon. \end{align*} \end{proof} To prove that $\mathcal{H}$ is continuous, we use Assumption \ref{assumption:results:regularity_I}. What we truly need, however, is that $\mathcal{I}$ Gamma converges as a function of $x$. We establish this result first. \begin{proposition}[Gamma convergence of the cost functions]\label{prop:Gamma-convergence-of-I} Let a cost function $\mathcal{I}:E\times\Theta\to[0,\infty]$ satisfy Assumption~\ref{assumption:results:regularity_I}. Then if $x_n\to x$ in $E$, the functionals $\mathcal{I}_n$ defined by \begin{equation*} \mathcal{I}_n(\theta) := \mathcal{I}(x_n,\theta) \end{equation*} converge in the $\Gamma$-sense to $\mathcal{I}_\infty(\theta) := \mathcal{I}(x,\theta)$. That is: \begin{enumerate} \item If $x_n \rightarrow x$ and $\theta_n \rightarrow \theta$, then $\liminf_{n\to\infty} \mathcal{I}(x_n,\theta_n) \geq \mathcal{I}(x,\theta)$, \item For $x_n \rightarrow x$ and all $\theta \in \Theta$ there are $\theta_n \in \Theta$ such that \[ \theta_n \rightarrow \theta\quad\text{and}\quad \limsup_{n\to\infty} \mathcal{I}(x_n,\theta_n) \leq \mathcal{I}(x,\theta). \] \end{enumerate} \end{proposition} \begin{proof}[Proof] Let $x_n\to x$. If $\theta_n\to \theta$, then by lower semicontinuity~\ref{item:assumption:I:lsc}, \begin{equation*} \liminf_{n\to\infty}\mathcal{I}(x_n,\theta_n) \geq \mathcal{I}(x,\theta). \end{equation*} For the $\text{lim-sup}$ bound, let $\theta\in\Theta$. If $\mathcal{I}(x,\theta)=\infty$, there is nothing to prove. Thus suppose that $\mathcal{I}(x,\theta)$ is finite. Then by~\ref{item:assumption:I:finiteness}, there is a neighborhood $U_x$ of $x$ and a constant $M < \infty$ such that for any $y\in U_x$, \begin{equation*} \mathcal{I}(y,\theta) \leq M. \end{equation*} Since $x_n\to x$, the $x_n$ are eventually contained in $U_x$. Taking the constant sequence $\theta_n:=\theta$, we thus get that $\mathcal{I}(x_n,\theta_n) \leq M$ for all $n$ large enough. By~\ref{item:assumption:I:equi-cont}, \begin{equation*} \lim_{n\to\infty}|\mathcal{I}(x_n,\theta_n)-\mathcal{I}(x,\theta)| \leq 0, \end{equation*} and the $\text{lim-sup}$ bound follows. \end{proof} \begin{proposition}[Continuity of the Hamiltonian]\label{prop:reg-of-H-and-L:continuity} Let $\mathcal{H} : E \times \mathbb{R}^d\to \mathbb{R}$ be the Hamiltonian defined in~\eqref{eq:results:variational_hamiltonian}, and suppose that Assumptions~\ref{assumption:results:regularity_of_V} and~\ref{assumption:results:regularity_I} are satisfied. Then the map $(x,p) \mapsto \mathcal{H}(x,p)$ is continuous and the Lagrangian $(x,v) \mapsto \mathcal{L}(x,v) := \sup_{p} \ip{p}{v} - \mathcal{H}(x,p)$ is lower semi-continuous. \end{proposition} Before we start with the proof, we give a remark on the generality of its statement and on the assumption that $\Theta$ is Polish. \begin{remark} The proof of upper semi-continuity of $\mathcal{H}$ works in general, using continuity properties of $\Lambda$, lower semi-continuity of $(x,\theta) \mapsto I(x,\theta)$ and the compact sublevel sets of $\mathcal{I}(x,\cdot)$. To establish lower semi-continuity,we need the that the functionals $\mathcal{I}$ Gamma converge as a function of $x$. This was established in Proposition \ref{prop:Gamma-convergence-of-I}. \end{remark} \begin{remark} In the lemma we use a sequential characterization of upper hemi-continuity. This is inspired by the natural formulation of Gamma convergence in terms of sequences. An extension of our results to spaces $\Theta$ beyond the Polish context should take care of this issue. Without introducing the complicated matter, an extension is possible to Hausdorff $\Theta$ that are k-spaces in which all compact sets are metrizable. \end{remark} We will use the following technical result to establish upper semi-continuity of $\mathcal{H}$. \begin{lemma}[Lemma 17.30 in \cite{AlBo06}] \label{lemma:upper_semi_continuity_abstract} Let $\mathcal{X}$ and $\mathcal{Y}$ be two Polish spaces. Let $\phi : \mathcal{X} \rightarrow \mathcal{K}(\mathcal{Y})$, where $\mathcal{K}(\mathcal{Y})$ is the space of non-empty compact subsets of $\mathcal{Y}$. Suppose that $\phi$ is upper hemi-continuous, that is if $x_n \rightarrow x$ and $y_n \rightarrow y$ and $y_n \in \phi(x_n)$, then $y \in \phi(x)$. Let $f : \text{Graph} (\phi) \rightarrow \mathbb{R}$ be upper semi-continuous. Then the map defined by~$m(x) := \sup_{y \in \phi(x)} f(x,y)$ is upper semi-continuous. \end{lemma} \begin{proof}[Proof of Proposition~\ref{prop:reg-of-H-and-L:continuity}] We start by establishing upper semi-continuity of $\mathcal{H}$. We argue on the basis of Lemma \ref{lemma:upper_semi_continuity_abstract}. Recall the representation of $\mathcal{H}$ of \eqref{eqn:regularity_section_H_variational_rep}. Set $\mathcal{X} = E\times\mathbb{R}^d$ for the $(x,p)$ variables, $\mathcal{Y} = \Theta$, and $f(x,p,\theta) = \Lambda(x,p,\theta) - \mathcal{I}(x,\theta)$ and note that this function is upper semi-continuous by Assumption~\ref{assumption:results:regularity_I}~\ref{item:assumption:I:lsc} and by Assumption \ref{assumption:results:regularity_of_V}~\ref{item:assumption:slow_regularity:continuity}. \smallskip By Assumption \ref{assumption:results:regularity_I}~\ref{item:assumption:I:zero-measure}, we have $\mathcal{H}(x,p) \geq \Lambda(x,p,\theta_x)$. Thus, it suffices to restrict the supremum over $\theta \in \Theta$ to $\theta \in \phi(x,p)$ where \begin{equation*} \phi(x,p) := \left\{\theta \in \Theta \, \middle| \, \mathcal{I}(x,\theta) \leq 2 \vn{\Lambda(x,p,\cdot)}_\Theta \right\}, \end{equation*} in the sense that we have \begin{equation*} \mathcal{H}(x,p) = \sup_{\theta\in \phi(x,p)}\left[\Lambda(x,p,\theta)-\mathcal{I}(x,\theta)\right]. \end{equation*} $\phi(x,p)$ is non-empty as $\theta_x \in \phi(x,p)$ and it is compact due to Assumption \ref{assumption:results:regularity_I}~\ref{item:assumption:I:compact-sublevelsets}. We are left to show that $\phi$ is upper hemi-continuous. \smallskip Thus, let $(x_n,p_n,\theta_n) \rightarrow (x,p,\theta)$ with $\theta_n \in \phi(x_n,p_n)$. We establish that $\theta \in \phi(x,p)$. By \ref{item:assumption:I:lsc} and the definition of $\phi$ we find \begin{equation*} \mathcal{I}(x,\theta) \leq \liminf_n \mathcal{I}(x_n,\theta_n) \leq \liminf_n 2\vn{\Lambda(x_n,p_n,\cdot}_\Theta = 2 \vn{\Lambda(x,p,\cdot)}_\Theta \end{equation*} which implies indeed that $\theta \in \phi(x,p)$. Thus, upper semi-continuity follows by an application of Lemma \ref{lemma:upper_semi_continuity_abstract}. \smallskip We proceed with proving lower semi-continuity of $\mathcal{H}$. Suppose that $(x_n,p_n) \rightarrow (x,p)$, we prove that $\liminf_n \mathcal{H}(x_n,p_n) \geq \mathcal{H}(x,p)$. Let $\theta$ be the measure such that $\mathcal{H}(x,p) = \Lambda(x,p,\theta) - \mathcal{I}(x,\theta)$. We have \begin{itemize} \item By Proposition \ref{prop:Gamma-convergence-of-I} there are $\theta_n$ such that $\theta_n \rightarrow \theta$ and $\limsup_n \mathcal{I}(x_n,\theta_n) \leq \mathcal{I}(x,\theta)$. \item $\Lambda(x_n,p_n,\theta_n)$ converges to $\Lambda(x,p,\theta)$ by Assumption \ref{item:assumption:slow_regularity:continuity}. \end{itemize} Therefore, \begin{align*} \liminf_{n\to\infty}\mathcal{H}(x_n,p_n)&\geq \liminf_{n\to\infty} \left[\Lambda(x_n,p_n,\theta_n)-\mathcal{I}(x_n,\theta_n)\right]\\ &\geq \liminf_{n\to\infty}\Lambda(x_n,p_n,\theta_n)-\limsup_{n\to\infty}\mathcal{I}(x_n,\theta_n)\\ &\geq \Lambda(x,p,\theta)-\mathcal{I}(x,\theta) = \mathcal{H}(x,p), \end{align*} establishing that $\mathcal{H}$ is lower semi-continuous. \smallskip The Lagrangian $\mathcal{L}$ is obtained as the supremum over continuous functions. This implies $\mathcal{L}$ is lower semi-continuous. \end{proof} \section{The comparison principle} \label{section:comparison_principle} In this section, we establish the comparison principle for $f - \lambda \mathbf{H} f = h$ in the context of Theorem \ref{theorem:comparison_principle_variational}, using the general strategy of Section \ref{section:bootstrap-argument-in-nutshell}. Before being able to use this strategy, we need to restrict our analysis to compact sets in $E$. We will use a classical penalization technique that we will write down in operator form. \smallskip We thus introduce two new operators $H_\dagger$ and $H_\ddagger$, which are defined in terms of $\mathcal{H}$ and the containment function $\Upsilon$ from Assumption \ref{assumption:results:regularity_of_V} \ref{item:assumption:slow_regularity:compact_containment}. We will then show that the comparison principle holds for a pair of Hamilton-Jacobi equations in terms of $H_\dagger$ and $H_\ddagger$. This procedure allows us to clearly separate the reduction to compact sets on one hand, and the proof of the comparison principle on the basis of the bootstrap procedure on the other. Schematically, we will establish the following diagram: \begin{center} \begin{tikzpicture} \matrix (m) [matrix of math nodes,row sep=1em,column sep=4em,minimum width=2em] { { } &[7mm] H_\dagger \\ \mathbf{H} & { } \\ { } & H_\ddagger \\}; \path[-stealth] (m-2-1) edge node [above] {sub \qquad { }} (m-1-2) (m-2-1) edge node [below] {super \qquad { }} (m-3-2); \begin{pgfonlayer}{background} \node at (m-2-2) [rectangle,draw=blue!50,fill=blue!20,rounded corners, minimum width=1cm, minimum height=2.5cm] {comparison}; \end{pgfonlayer} \end{tikzpicture} \end{center} In this diagram, an arrow connecting an operator $A$ with operator $B$ with subscript 'sub' means that viscosity subsolutions of $f - \lambda A f = h$ are also viscosity subsolutions of $f - \lambda B f = h$. Similarly for arrows with a subscript 'super'. \smallskip We introduce the operators $H_\dagger$ and $H_\ddagger$ in Section~\ref{subsection:definition_of_Hamiltonians}. The arrows will be established in Section \ref{subsection:implications_from_compact_containment}. Finally, we will establish the comparison principle for $H_\dagger$ and $H_\ddagger$ in Section~\ref{subsection:proof_of_comparison_principle}, which by the arrows implies the comparison principle for $\mathbf{H}$. \begin{proof}[Proof of Theorem~\ref{theorem:comparison_principle_variational}] Fix $h_1,h_2 \in C_b(E)$ and $\lambda > 0$. \smallskip Let $u_1,u_2$ be a viscosity sub- and supersolution to $f - \lambda \mathbf{H} f = h_1$ and $f - \lambda \mathbf{H} f = h_2$ respectively. By Lemma \ref{lemma:viscosity_solutions_compactify2} proven in Section~\ref{subsection:implications_from_compact_containment}, $u_1$ and $u_2$ are a sub- and supersolution to $f - \lambda H_\dagger f = h_1$ and $f - \lambda H_\ddagger f = h_2$ respectively. Thus $\sup_E u_1 - u_2 \leq \sup_E h_1 - h_2$ by Proposition~\ref{prop:CP} of Section~\ref{subsection:proof_of_comparison_principle}. Specialising to $h_1=h_2$ gives Theorem~\ref{theorem:comparison_principle_variational}. \end{proof} \subsection{Definition of auxiliary operators} \label{subsection:definition_of_Hamiltonians} In this section, we repeat the definition of $\mathbf{H}$, and introduce the operators $H_\dagger$ and $H_\ddagger$. \begin{definition} \label{definition_effectiveH} The operator $\mathbf{H} \subseteq C_b^1(E) \times C_b(E)$ has domain $\mathcal{D}(\mathbf{H}) = C_{cc}^\infty(E)$ and satisfies $\mathbf{H} f(x) = \mathcal{H}(x, \mathrm{d} f(x))$, where $\mathcal{H}$ is the map \begin{equation*} \mathcal{H}(x,p) = \sup_{\theta \in \Theta}\left[\Lambda(x,p,\theta) - \mathcal{I}(x,\theta)\right]. \end{equation*} \end{definition} We proceed by introducing $H_\dagger$ and $H_\ddagger$. These new Hamiltonians will serve as natural upper and lower bound for $\mathbf{H}$. They are defined in terms of the containment function $\Upsilon$, and essentially allow us to restrict our analysis to compact sets. \smallskip For the following definition, recall Assumption~\ref{item:assumption:slow_regularity:compact_containment} and the constant $C_\Upsilon := \sup_{\theta}\sup_x \Lambda(x,\nabla \Upsilon(x),\theta)$ therein. Denote by $C_\ell^\infty(E)$ the set of smooth functions on $E$ that have a lower bound and by $C_u^\infty(E)$ the set of smooth functions on $E$ that have an upper bound. \begin{definition}[The operators $H_\dagger$ and $H_\ddagger$] For $f \in C_\ell^\infty(E)$ and $\varepsilon \in (0,1)$ set \begin{gather*} f^\varepsilon_\dagger := (1-\varepsilon) f + \varepsilon \Upsilon \\ H_{\dagger,f}^\varepsilon(x) := (1-\varepsilon) \mathcal{H}(x,\nabla f(x)) + \varepsilon C_\Upsilon. \end{gather*} and set \begin{equation*} H_\dagger := \left\{(f^\varepsilon_\dagger,H_{\dagger,f}^\varepsilon) \, \middle| \, f \in C_\ell^\infty(E), \varepsilon \in (0,1) \right\}. \end{equation*} For $f \in C_u^\infty(E)$ and $\varepsilon \in (0,1)$ set \begin{gather*} f^\varepsilon_\ddagger := (1+\varepsilon) f - \varepsilon \Upsilon \\ H_{\ddagger,f}^\varepsilon(x) := (1+\varepsilon) \mathcal{H}(x,\nabla f(x)) - \varepsilon C_\Upsilon. \end{gather*} and set \begin{equation*} H_\ddagger := \left\{(f^\varepsilon_\ddagger,H_{\ddagger,f}^\varepsilon) \, \middle| \, f \in C_u^\infty(E), \varepsilon \in (0,1) \right\}. \end{equation*} \end{definition} \subsection{Implications based on compact containment} \label{subsection:implications_from_compact_containment} The operator $\mathbf{H}$ is related to $H_\dagger, H_\ddagger$ by the following Lemma. \begin{lemma}\label{lemma:viscosity_solutions_compactify2} Fix $\lambda > 0$ and $h \in C_b(E)$. \begin{enumerate}[(a)] \item Every subsolution to $f - \lambda \mathbf{H} f = h$ is also a subsolution to $f - \lambda H_\dagger f = h$. \item Every supersolution to $f - \lambda \mathbf{H} f = h$ is also a supersolution to~$f-\lambda H_\ddagger f=~h$. \end{enumerate} \end{lemma} We only prove (a) of Lemma~\ref{lemma:viscosity_solutions_compactify2}, as (b) can be carried out analogously. \begin{proof}[Proof] Fix $\lambda > 0$ and $h \in C_b(E)$. Let $u$ be a subsolution to $f - \lambda \mathbf{H}f = h$. We prove it is also a subsolution to $f - \lambda H_\dagger f = h$. \smallskip Fix $\varepsilon > 0 $ and $f\in C_\ell^\infty(E)$ such that $(f^\varepsilon_\dagger,H^\varepsilon_{\dagger,f,\phi}) \in H_\dagger$. We will prove that there are $x_n\in E$ such that \begin{gather} \lim_{n\to\infty}\left(u-f_\dagger^\varepsilon\right)(x_n) = \sup_{x\in E}\left(u-f_\dagger^\varepsilon\right),\label{eqn:proof_lemma_conditions_for_subsolution_first}\\ \limsup_{n\to\infty} \left[u(x_n)-\lambda H_{\dagger,f}^\varepsilon(x_n) - h(x_n)\right]\leq 0.\label{eqn:proof_lemma_conditions_for_subsolution_second} \end{gather} As the function $\left[u -(1-\varepsilon)f\right]$ is bounded from above and $\varepsilon \Upsilon$ has compact sublevel-sets, the sequence $x_n$ along which the first limit is attained can be assumed to lie in the compact set \begin{equation*} K := \left\{x \, | \, \Upsilon(x) \leq \varepsilon^{-1} \sup_x \left(u(x) - (1-\varepsilon)f(x) \right)\right\}. \end{equation*} Set $M = \varepsilon^{-1} \sup_x \left(u(x) - (1-\varepsilon)f(x) \right)$. Let $\gamma : \mathbb{R} \rightarrow \mathbb{R}$ be a smooth increasing function such that \begin{equation*} \gamma(r) = \begin{cases} r & \text{if } r \leq M, \\ M + 1 & \text{if } r \geq M+2. \end{cases} \end{equation*} Denote by $f_\varepsilon$ the function on $E$ defined by \begin{equation*} f_\varepsilon(x) := \gamma\left((1-\varepsilon)f(x) + \varepsilon \Upsilon(x) \right). \end{equation*} By construction $f_\varepsilon$ is smooth and constant outside of a compact set and thus lies in $\mathcal{D}(H) = C_{cc}^\infty(E)$. As $u$ is a viscosity subsolution for $f - \lambda Hf = h$ there exists a sequence $x_n \in K \subseteq E$ (by our choice of $K$) with \begin{gather} \lim_n \left(u-f_\varepsilon\right)(x_n) = \sup_x \left(u-f_\varepsilon\right)(x), \label{eqn:visc_subsol_sup} \\ \limsup_n \left[u(x_n) - \lambda \mathbf{H} f_\varepsilon(x_n) - h(x_n)\right] \leq 0. \label{eqn:visc_subsol_upperbound} \end{gather} As $f_\varepsilon$ equals $f_\dagger^\varepsilon$ on $K$, we have from \eqref{eqn:visc_subsol_sup} that also \begin{equation*} \lim_n \left(u-f_\dagger^\varepsilon\right)(x_n) = \sup_{x\in E}\left(u-f_\dagger^\varepsilon\right), \end{equation*} establishing~\eqref{eqn:proof_lemma_conditions_for_subsolution_first}. Convexity of $p \mapsto \mathcal{H}(x,p)$ yields for arbitrary points $x\in K$ the estimate \begin{align*} \mathbf{H} f_\varepsilon(x) &= \mathcal{H}(x,\nabla f_\varepsilon(x)) \\ & \leq (1-\varepsilon) \mathcal{H}(x,\nabla f(x)) + \varepsilon \mathcal{H}(x,\nabla \Upsilon(x)) \\ &\leq (1-\varepsilon) \mathcal{H}(x,\nabla f(x)) + \varepsilon C_\Upsilon = H^\varepsilon_{\dagger,f}(x). \end{align*} Combining this inequality with \eqref{eqn:visc_subsol_upperbound} yields \begin{multline*} \limsup_n \left[u(x_n) - \lambda H^\varepsilon_{\dagger,f}(x_n) - h(x_n)\right] \\ \leq \limsup_n \left[u(x_n) - \lambda \mathbf{H} f_\varepsilon(x_n) - h(x_n)\right] \leq 0, \end{multline*} establishing \eqref{eqn:proof_lemma_conditions_for_subsolution_second}. This concludes the proof. \end{proof} \subsection{The comparison principle} \label{subsection:proof_of_comparison_principle} In this section, we prove the comparison principle for the operators $H_\dagger$ and $H_\ddagger$. \begin{proposition}\label{prop:CP} Fix $\lambda > 0$ and $h_1,h_2 \in C_b(E)$. Let $u_1$ be a viscosity subsolution to $f - \lambda H_\dagger f = h_1$ and let $u_2$ be a viscosity supersolution to $f - \lambda H_\ddagger f = h_2$. Then we have $\sup_x u_1(x) - u_2(x) \leq \sup_x h_1(x) - h_2(x)$. \end{proposition} The proof uses an estimate that was proven in the proof of Proposition~A.11 of \cite{CoKr17} for one penalization function $\Psi$, or in the context of the more general continuity estimate of the Appendix of~\cite{KraaijSchlottke2019}, in the proof of Proposition~4.5 of \cite{Kr17} for two penalization functions $\{\Psi_1,\Psi_2\}$. In both contexts we use the containment function $\Upsilon$ of Assumption~\ref{assumption:results:regularity_of_V}, \ref{item:assumption:slow_regularity:compact_containment}. We start with a key result that allows us to find optimizing points that generalize the argument of Section \ref{section:bootstrap-argument-in-nutshell} to the non compact setting. \smallskip The result is a copy of Lemma A.11 of \cite{CoKr17}, which is in turn a variant of Lemma 9.2 in \cite{FengKurtz2006} and Proposition 3.7 in \cite{CIL92}. We have included it for completeness. \begin{lemma}\label{lemma:doubling_lemma} Let $u$ be bounded and upper semi-continuous, let $v$ be bounded and lower semi-continuous, let $\Psi : E^2 \rightarrow \mathbb{R}^+$ be penalization functions and let $\Upsilon$ be a containment function. \smallskip Fix $\varepsilon > 0$. For every $\alpha >0$ there exist $x_{\alpha,\varepsilon},y_{\alpha,\varepsilon} \in E$ such that \begin{multline} \label{eqn:existence_optimizers} \frac{u(x_{\alpha,\varepsilon})}{1-\varepsilon} - \frac{v(y_{\alpha,\varepsilon})}{1+\varepsilon} - \alpha \Psi(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon}) - \frac{\varepsilon}{1-\varepsilon}\Upsilon(x_{\alpha,\varepsilon}) -\frac{\varepsilon}{1+\varepsilon}\Upsilon(y_{\alpha,\varepsilon}) \\ = \sup_{x,y \in E} \left\{\frac{u(x)}{1-\varepsilon} - \frac{v(y)}{1+\varepsilon} - \alpha \Psi(x,y) - \frac{\varepsilon}{1-\varepsilon}\Upsilon(x) - \frac{\varepsilon}{1+\varepsilon}\Upsilon(y)\right\}. \end{multline} Additionally, for every $\varepsilon > 0$ we have that \begin{enumerate}[(a)] \item The set $\{x_{\alpha,\varepsilon}, y_{\alpha,\varepsilon} \, | \, \alpha > 0\}$ is relatively compact in $E$. % \item All limit points of $\{(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon})\}_{\alpha > 0}$ as $\alpha \rightarrow \infty$ are of the form $(z,z)$ and for these limit points we have $u(z) - v(z) = \sup_{x \in E} \left\{u(x) - v(x) \right\}$. % \item We have % \[ \lim_{\alpha \rightarrow \infty} \alpha \Psi(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon}) = 0. \] % \end{enumerate} \end{lemma} \begin{proof}[Proof of Proposition~\ref{prop:CP}] Fix $\lambda >0$ and $h_1,h_2 \in C_b(E)$. Let $u_1$ be a viscosity subsolution and $u_2$ be a viscosity supersolution of $f - \lambda H_\dagger f = h_1$ and $f - \lambda H_\ddagger f = h_2$ respectively. We prove Theorem~\ref{prop:CP} in two steps. \smallskip \underline{\emph{Step 1}}: We prove that for $\varepsilon > 0 $ and $\alpha > 0$, there exist points $x_{\varepsilon,\alpha},y_{\varepsilon,\alpha} \in E$ and momenta $p_{\varepsilon,\alpha}^1,p_{\varepsilon,\alpha}^2 \in \mathbb{R}^d$ such that \begin{multline} \label{eqn:estimate_step_1} \sup_E(u_1-u_2) \leq \lambda \liminf_{\varepsilon\to 0}\liminf_{\alpha \to \infty} \left[\mathcal{H}(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha}) - \mathcal{H}(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha})\right] \\ + \sup_{E}(h_1 - h_2). \end{multline} This step is solely based on the sub- and supersolution properties of $u_1,u_2$, the continuous differentiability of the penalization function $\Psi(x,y)$, the containment function $\Upsilon$, and convexity of $p \mapsto \mathcal{H}(x,p)$. \smallskip \underline{\emph{Step 2}}: Using Assumptions~\ref{assumption:results:regularity_of_V} and~\ref{assumption:results:regularity_I}, we prove that \begin{equation*} \liminf_{\varepsilon\to 0}\liminf_{\alpha \to \infty} \left[\mathcal{H}(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha}) - \mathcal{H}(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha})\right] \leq 0. \end{equation*} \smallskip \underline{\emph{Proof of Step 1}}: For any $\varepsilon > 0$ and any $\alpha > 0$, define the map $\Phi_{\varepsilon,\alpha}: E \times E \to \mathbb{R}$ by \begin{equation*} \Phi_{\varepsilon,\alpha}(x,y) := \frac{u_1(x)}{1-\varepsilon} - \frac{u_2(y)}{1+\varepsilon} - \alpha \Psi(x,y) - \frac{\varepsilon}{1-\varepsilon} \Upsilon(x) - \frac{\varepsilon}{1+\varepsilon}\Upsilon(y). \end{equation*} Let $\varepsilon > 0$. By Lemma \ref{lemma:doubling_lemma}, there is a compact set $K_\varepsilon \subseteq E$ and there exist points $x_{\varepsilon,\alpha},y_{\varepsilon,\alpha} \in K_\varepsilon$ such that \begin{equation} \label{eqn:comparison_optimizers} \Phi_{\varepsilon,\alpha}(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha}) = \sup_{x,y \in E} \Phi_{\varepsilon,\alpha}(x,y), \end{equation} and \begin{equation}\label{eq:proof-CP:Psi-xy-converge} \lim_{\alpha \to \infty} \alpha \Psi(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha}) = 0. \end{equation} As in the proof of Proposition~A.11 of~\cite{Kr17}, it follows that \begin{equation}\label{eq:proof-CP:general-bound-u1u2} \sup_E (u_1 - u_2) \leq \liminf_{\varepsilon \to 0} \liminf_{\alpha \to \infty} \left[ \frac{u_1(x_{\varepsilon,\alpha})}{1-\varepsilon} - \frac{u_2(y_{\varepsilon,\alpha})}{1+\varepsilon}\right]. \end{equation} At this point, we want to use the sub- and supersolution properties of $u_1$ and $u_2$. Define the test functions $\varphi^{\varepsilon,\alpha}_1 \in \mathcal{D}(H_\dagger), \varphi^{\varepsilon,\alpha}_2 \in \mathcal{D}(H_\ddagger)$ by \begin{multline*} \varphi^{\varepsilon,\alpha}_1(x):=(1-\varepsilon) \bigg[\frac{u_2(y_{\varepsilon,\alpha})}{1+\varepsilon} + \alpha \Psi(x,y_{\varepsilon,\alpha}) + \frac{\varepsilon}{1-\varepsilon}\Upsilon(x) + \frac{\varepsilon}{1+\varepsilon}\Upsilon(y_{\varepsilon,\alpha})\\ + (1-\varepsilon)(x-x_{\varepsilon,\alpha})^2\bigg] \end{multline*} and \begin{multline*} \varphi^{\varepsilon,\alpha}_2(y):= (1+\varepsilon)\bigg[\frac{u_1(x_{\varepsilon,\alpha})}{1-\varepsilon} - \alpha \Psi(x_{\varepsilon,\alpha},y) - \frac{\varepsilon}{1-\varepsilon}\Upsilon(x_{\varepsilon,\alpha}) - \frac{\varepsilon}{1+\varepsilon}\Upsilon(y)\\-(1+\varepsilon) (y-y_{\varepsilon,\alpha})^2\bigg]. \end{multline*} Using \eqref{eqn:comparison_optimizers}, we find that $u_1 - \varphi^{\varepsilon,\alpha}_1$ attains its supremum at $x = x_{\varepsilon,\alpha}$, and thus \begin{equation*} \sup_E (u_1-\varphi^{\varepsilon,\alpha}_1) = (u_1-\varphi^{\varepsilon,\alpha}_1)(x_{\varepsilon,\alpha}). \end{equation*} Denote $p_{\varepsilon,\alpha}^1 := \alpha \nabla_x \Psi(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha})$. By our addition of the penalization $(x-x_{\varepsilon,\alpha})^2$ to the test function, the point $x_{\varepsilon,\alpha}$ is in fact the unique optimizer, and we obtain from the subsolution inequality that \begin{equation}\label{eq:proof-CP:subsol-ineq} u_1(x_{\varepsilon,\alpha}) - \lambda \left[ (1-\varepsilon) \mathcal{H}\left(x_{\varepsilon,\alpha}, p_{\varepsilon,\alpha}^1 \right) + \varepsilon C_\Upsilon\right] \leq h_1(x_{\varepsilon,\alpha}). \end{equation} With a similar argument for $u_2$ and $\varphi^{\varepsilon,\alpha}_2$, we obtain by the supersolution inequality that \begin{equation}\label{eq:proof-CP:supersol-ineq} u_2(y_{\varepsilon,\alpha}) - \lambda \left[(1+\varepsilon)\mathcal{H}\left(y_{\varepsilon,\alpha}, p_{\varepsilon,\alpha}^2 \right) - \varepsilon C_\Upsilon\right] \geq h_2(y_{\varepsilon,\alpha}), \end{equation} where $p_{\varepsilon,\alpha}^2 := -\alpha \nabla_y \Psi(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha})$. With that, estimating further in~\eqref{eq:proof-CP:general-bound-u1u2} leads to \begin{multline*} \sup_E(u_1-u_2) \leq \liminf_{\varepsilon\to 0}\liminf_{\alpha \to \infty} \bigg[\frac{h_1(x_{\varepsilon,\alpha})}{1-\varepsilon} - \frac{h_2(y_{\varepsilon,\alpha})}{1+\varepsilon} + \frac{\varepsilon}{1-\varepsilon} C_\Upsilon \\ + \frac{\varepsilon}{1+\varepsilon} C_\Upsilon + \lambda \left[\mathcal{H}(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha}) - \mathcal{H}(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha})\right]\bigg]. \end{multline*} Thus, \eqref{eqn:estimate_step_1} in Step 1 follows. \smallskip \underline{\emph{Proof of Step 2}}: Recall that $\mathcal{H}(x,p)$ is given by \begin{equation*} \mathcal{H}(x,p) = \sup_{\theta \in \Theta}\left[\Lambda(x,p,\theta) - \mathcal{I}(x,\theta)\right]. \end{equation*} Since $\Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\cdot) : \Theta \to \mathbb{R}$ is bounded and continuous by \ref{item:assumption:slow_regularity:continuity} and the map $\mathcal{I}(x_{\varepsilon,\alpha},\cdot) : \Theta \to [0,\infty]$ has compact sub-level sets in $\Theta$ by~\ref{item:assumption:I:compact-sublevelsets}, there exists an optimizer $\theta_{\varepsilon,\alpha} \in\Theta$ such that \begin{equation} \label{eqn:choice_of_optimal_measure} \mathcal{H}(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha}) = \Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) - \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}). \end{equation} Choosing the same point in the supremum of the second term $\mathcal{H}(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha})$, we obtain for all $\varepsilon > 0$ and $\alpha > 0$ the estimate \begin{multline} \label{eqn:basic_decomposition_Hamitlonian_difference} \mathcal{H}(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha})- \mathcal{H}(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha}) \leq \Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha})- \Lambda(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha})\\ +\mathcal{I}(y_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha})- \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}). \end{multline} We will establish an upper bound for this difference using the continuity estimate \ref{item:assumption:slow_regularity:continuity_estimate} and equi-continuity \ref{item:assumption:I:equi-cont}. \smallskip To apply the continuity estimate \ref{item:assumption:slow_regularity:continuity_estimate}, we need to verify \eqref{eqn:control_on_Gbasic_sup} and \eqref{eqn:control_on_Gbasic_inf} (see \eqref{eq:proof-CP:Vx-unif-bound-below} and \eqref{eq:proof-CP:Vy-unif-bound-above} below) for the variables $\theta_{\varepsilon,\alpha}$. In addition, we need to establish that $\theta_{\varepsilon,\theta}$ are contained in a compact set. \smallskip To apply \ref{item:assumption:I:equi-cont}, we need to control the size of $\mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha})$ and $\mathcal{I}(y_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha})$ along subsequences, which by Assumption \ref{item:assumption:I:compact-sublevelsets} implies the above requirement that along these subsequences $\theta_{\varepsilon,\theta}$ are contained in a compact set. To obtain control on the size of $\mathcal{I}$, we employ an auxiliary argument based on the continuity estimate for the measures $\theta_{\varepsilon,\alpha}^0$, obtained by \ref{item:assumption:I:zero-measure}, satisfying \begin{equation}\label{eqn:choice_of_zero_measure} \mathcal{I}(y_{\alpha,\varepsilon},\theta_{\varepsilon,\alpha}^0) = 0. \end{equation} The application of the continuity estimate for $\theta_{\varepsilon,\alpha}^0$ only requires to check \eqref{eqn:control_on_Gbasic_sup} and \eqref{eqn:control_on_Gbasic_inf} as the measures $\theta_{\varepsilon,\alpha}^0$ are contained in a compact set by \eqref{eqn:choice_of_zero_measure} and~\ref{item:assumption:I:compact-sublevelsets}. Thus, we will first establish \begin{align} & \liminf_{\varepsilon \to 0}\liminf_{\alpha \to \infty} \Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) > - \infty,\label{eq:proof-CP:Vx-unif-bound-below} \\ & \liminf_{\varepsilon \to 0}\liminf_{\alpha \to \infty} \Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0) > - \infty, \label{eq:proof-CP:Vx-unif-bound-below_zero_measure} \\ & \limsup_{\varepsilon\to 0}\limsup_{\alpha \to \infty}\Lambda(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) < \infty, \label{eq:proof-CP:Vy-unif-bound-above} \\ & \limsup_{\varepsilon\to 0}\limsup_{\alpha \to \infty}\Lambda(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0) < \infty. \label{eq:proof-CP:Vy-unif-bound-above_zero_measure} \end{align} Note that by \ref{item:assumption:slow_regularity:controlled_growth} the bounds in \eqref{eq:proof-CP:Vx-unif-bound-below} and \eqref{eq:proof-CP:Vx-unif-bound-below_zero_measure} are equivalent. Similarly \eqref{eq:proof-CP:Vy-unif-bound-above} and \eqref{eq:proof-CP:Vy-unif-bound-above_zero_measure} are equivalent. \smallskip By the subsolution inequality~\eqref{eq:proof-CP:subsol-ineq}, \begin{align}\label{eq:proof-CP:estimate-via-subsol} \frac{1}{\lambda} \inf_E\left(u_1 - h\right) & \leq (1-\varepsilon) \mathcal{H}(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha}) + \varepsilon C_{\Upsilon} \\ &\leq (1-\varepsilon) \Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) + \varepsilon C_\Upsilon,\notag \end{align} and the lower bounds~\eqref{eq:proof-CP:Vx-unif-bound-below} and \eqref{eq:proof-CP:Vx-unif-bound-below_zero_measure} follow. \smallskip By the supersolution inequality~\eqref{eq:proof-CP:supersol-ineq}, we can estimate \begin{align*} (1+\varepsilon) \Lambda(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0) &= (1+\varepsilon) \left[\Lambda(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0) - \mathcal{I}(y_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0)\right] \\ &\leq \left((1+\varepsilon) \mathcal{H}\left(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha}\right) - \varepsilon C_\Upsilon\right) + \varepsilon C_\Upsilon \\ &\leq \frac{1}{\lambda} \sup_E (u_2-h) + \varepsilon C_{\Upsilon} < \infty, \end{align*} and the upper bounds~\eqref{eq:proof-CP:Vy-unif-bound-above} and \eqref{eq:proof-CP:Vy-unif-bound-above_zero_measure} follow. \smallskip Since the $\theta_{\varepsilon,\alpha}^0$ are contained in a compact set by~\ref{item:assumption:I:compact-sublevelsets}, we conclude by the continuity estimate~\ref{item:assumption:slow_regularity:continuity_estimate} that \begin{equation*} \liminf_{\varepsilon\to 0}\liminf_{\alpha\to\infty}\left[\Lambda\left(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0\right)-\Lambda\left(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0\right)\right]\leq 0. \end{equation*} Without loss of generality, we can choose for all small $\varepsilon$ subsequences $(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha})$ (denoted the same) such that also \begin{equation} \liminf_{\varepsilon\to 0}\limsup_{\alpha \to \infty} \left[\Lambda\left(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0\right)-\Lambda\left(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0\right)\right] \leq 0.\label{eqn:proof_comparison_application_continuity_estimate_zero_measures_strenghtened} \end{equation} We proceed to establish that along this collection of subsequences we have $\limsup_{\alpha \rightarrow \infty} \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) < \infty$. We return to the first inequality of \eqref{eq:proof-CP:estimate-via-subsol}, combined with \eqref{eqn:choice_of_optimal_measure}, to obtain \begin{align*} \frac{1}{\lambda} \inf_E\left(u_1 - h\right) & \leq (1-\varepsilon) \mathcal{H}(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha}) + \varepsilon C_{\Upsilon} \\ & = (1-\varepsilon) \left[\Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) - \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) \right] + \varepsilon C_{\Upsilon}. \end{align*} We conclude that $\limsup_{\alpha \rightarrow \infty} \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) < \infty$ is implied by \begin{equation*} \limsup_{\alpha \rightarrow \infty} \Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) < \infty \end{equation*} which by \ref{item:assumption:slow_regularity:controlled_growth} is equivalent to \begin{equation*} \limsup_{\alpha \rightarrow \infty} \Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0) < \infty. \end{equation*} This, however, yields what we want by \eqref{eq:proof-CP:Vy-unif-bound-above_zero_measure} and \eqref{eqn:proof_comparison_application_continuity_estimate_zero_measures_strenghtened}: \begin{multline*} \limsup_{\alpha \rightarrow \infty}\Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0) \leq \limsup_{\alpha \rightarrow \infty} \Lambda(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0) \\ \qquad + \limsup_{\alpha \rightarrow \infty} \left[\Lambda\left(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0\right)-\Lambda\left(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0\right)\right] < \infty. \end{multline*} We thus obtain \begin{equation*} \limsup_{\alpha \rightarrow \infty} \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) < \infty. \end{equation*} Therefore, by~\ref{item:assumption:I:compact-sublevelsets}, for each $\varepsilon > 0$ the $\theta_{\varepsilon,\alpha}$ are contained in a compact set. With the bounds~\eqref{eq:proof-CP:Vx-unif-bound-below} and~\eqref{eq:proof-CP:Vy-unif-bound-above}, we conclude by the continuity estimate~\ref{item:assumption:slow_regularity:continuity_estimate} that \begin{equation}\label{eq:proof-CP:final-bound-by-cont-estimate} \liminf_{\varepsilon\to 0}\liminf_{\alpha \to \infty} \left[\Lambda\left(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}\right)-\Lambda\left(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}\right)\right] \leq 0. \end{equation} By~\eqref{eq:proof-CP:Psi-xy-converge}, we have along a subsequence $(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha}) \to (z_\varepsilon,z_\varepsilon) \in K_\varepsilon \times K_\varepsilon$ as $\alpha \to \infty$. Therefore by~\ref{item:assumption:I:finiteness} there exists a subsequence of $(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha})$ (denoted the same) and a constant $M_\varepsilon' < \infty$ such that for all $\alpha > 0$ large enough, \begin{equation*} \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) \leq M_\varepsilon' \quad \text{ and } \quad \mathcal{I}(y_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) \leq M_\varepsilon'. \end{equation*} Hence by~\ref{item:assumption:I:equi-cont}, for any $\varepsilon > 0$, \begin{equation}\label{eq:proof-CP:Iy-Ix-leq-0} \limsup_{\alpha \to \infty}|\mathcal{I}(y_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) - \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha})| = 0. \end{equation} Then combining~\eqref{eq:proof-CP:final-bound-by-cont-estimate} with~\eqref{eq:proof-CP:Iy-Ix-leq-0} gives an estimate on \eqref{eqn:basic_decomposition_Hamitlonian_difference} which completes Step 2. \end{proof} \section{Construction of viscosity solutions} \label{section:construction-of-viscosity-solutions} In this Section, we will show that $R(\lambda)h$, for $h \in C_b(E), \lambda > 0$ of Theorem \ref{theorem:existence_of_viscosity_solution} is indeed a viscosity solution to $f - \lambda \mathbf{H} f = h$. To do so, we will use the methods of Chapter 8 of \cite{FengKurtz2006} which are based on the strategy laid out in Section \ref{section:strategy_existence_viscosity_solution}. \smallskip In particular, we will verify \cite[Conditions 8.9, 8.10 and 8.11]{FengKurtz2006} which imply by~\cite[Theorem 8.27]{FengKurtz2006} and the comparison principle for $f - \lambda \mathbf{H} f = h$ that $R(\lambda)h$ is a viscosity solution to $f - \lambda \mathbf{H} f = h$. \begin{proof}[Verification of Conditions 8.9, 8.10 and 8.11] In the notation of \cite{FengKurtz2006}, we use $U = \mathbb{R}^d$, $\Gamma = E \times U$, one operator $\mathbf{H} = \mathbf{H}_\dagger = \mathbf{H}_\ddagger$ and $Af(x,u) = \ip{\nabla f(x)}{u}$ for $f \in \mathcal{D}(\mathbf{H}) = C_{cc}^\infty(E)$. \smallskip Regarding Condition~8.9, by continuity and convexity of $\mathcal{H}$ obtained in Propositions \ref{prop:reg-of-H-and-L:reg-H} and \ref{prop:reg-of-H-and-L:continuity}, parts 8.9.1, 8.9.2, 8.9.3 and 8.9.5 can be proven e.g. as in the proof of \cite[Lemma 10.21]{FengKurtz2006} for $\psi = 1$. Part 8.9.4 is a consequence of the existence of a containment function, and follows as shown in the proof of~\cite[Theorem~A.17]{CoKr17}. Since we use the argument further below, we briefly recall it here. We need to show that for any compact set $K \subseteq E$, any finite time $T > 0$ and finite bound $M \geq 0$, there exists a compact set $K' = K'(K,T,M) \subseteq E$ such that for any absolutely continuous path $\gamma :[0,T] \to E$ with $\gamma(0) \in K$, if % \begin{equation} \label{eqn:control_on_L} \int_0^T \mathcal{L}(\gamma(t),\dot{\gamma}(t)) \, dt \leq M, \end{equation} % then $\gamma(t) \in K'$ for any $0\leq t \leq T$. \smallskip For $K\subseteq E$, $T>0$, $M\geq 0$ and $\gamma$ as above, this follows by noting that % \begin{align} \label{eq:action_integral_representation:Lyapunov_bound} \Upsilon(\gamma(\tau)) &= \Upsilon(\gamma(0)) + \int_0^\tau \nabla\Upsilon(\gamma(t)) \dot{\gamma}(t) \, dt \notag \\ &\leq \Upsilon(\gamma(0)) + \int_0^\tau \left[ \mathcal{L}(\gamma(t),\dot{\gamma}(t))) + \mathcal{H}(x(t),\nabla \Upsilon(\gamma(t))) \right] \, dt \notag \\ &\leq \sup_K \Upsilon + M + T \sup_{x \in E} \mathcal{H}(x,\nabla \Upsilon(x)) =: C < \infty, \end{align} % for any $0 \leq \tau \leq T$, so that the compact set $K' := \{z \in E \,:\, \Upsilon(z) \leq C\}$ satisfies the claim. \smallskip We proceed with the verification of Conditions~8.10 and 8.11 of~\cite{FengKurtz2006}. By Proposition~\ref{prop:reg-of-H-and-L:reg-H}, we have $\mathcal{H}(x,0) = 0$ and hence $\mathbf{H} 1 = 0$. Thus, Condition 8.10 is implied by Condition 8.11 (see Remark 8.12 (e) in~\cite{FengKurtz2006}). \smallskip We establish that Condition 8.11 is satisfied: for any function $f\in \mathcal{D}(\mathbf{H}) = C_{cc}^\infty(E)$ and $x_0 \in E$, there exists an absolutely continuous path $x:[0,\infty) \to E$ such that $x(0) = x_0$ and for any $t \geq 0$, \begin{equation} \label{eq:action_integral_representation:solution_control_problem} \int_0^t \mathcal{H}(x(s),\nabla f(x(s)) \, ds = \int_0^t \left[ \dot{x}(s) \cdot \nabla f(x(s)) - \mathcal{L}(x(s),\dot{x}(s)) \right] \, ds. \end{equation} To do so, we solve the differential inclusion \begin{equation} \label{eq:action_integral_representation:subdifferential_eq} \dot{x}(t) \in \partial_p \mathcal{H}(x(t),\nabla f(x(t))), \qquad x(0) = x_0, \end{equation} where the subdifferential of $\mathcal{H}$ was defined in \eqref{eqn:subdifferential_H} on page \pageref{eqn:subdifferential_H}. \smallskip Since the addition of a constant to $f$ does not change the gradient, we may assume without loss of generality that $f$ has compact support. A general method to establish existence of differential inclusions~$\dot{x} \in F(x)$ is given by Lemma 5.1 of Deimling~\cite{De92}. We use this result for $F(x) := \partial_p \mathcal{H}(x,\nabla f(x))$. To apply this lemma, we need to verify that: % \begin{enumerate}[(F1)] \item $F$ is upper hemi-continuous and $F(x)$ is non-empty, closed, and convex for all $x \in E$. \item $\|F(x)\| \leq c(1 + |x|)$ on $E$, for some $c > 0$. \item $F(x) \cap T_E(x) \neq \emptyset$ for all $x \in E$. (The Definition~\ref{definition:tangent_cone} of~$T_E(x)$ is given on page~\pageref{eqn:subdifferential_H} of this thesis). \end{enumerate} % While part (F1) follows from the properties of a subdifferential set and (F3) is a consequence of Assumption \ref{assumption:Hamiltonian_vector_field}, part (F2) is in general not satisfied. To circumvent this problem, we use properties of $\mathcal{H}$ to establish a-priori bounds on the range of solutions. \smallskip \emph{Step 1:} Let $T > 0$, and assume that $x(t)$ solves \eqref{eq:action_integral_representation:subdifferential_eq}. We establish that there is some $M$ such that~\eqref{eqn:control_on_L} is satisfied. By~\eqref{eq:action_integral_representation:subdifferential_eq} we obtain for all $p \in \mathbb{R}^d$, % \[ \mathcal{H}(x(t),p) \geq \mathcal{H}(x(t),\nabla f(x(t))) + \dot{x}(t) \cdot (p - \nabla f(x(t))), \] % and as a consequence % \[ \dot{x}(t) \nabla f(x(t)) - \mathcal{H}(x(t),\nabla f(x(t))) \geq \mathcal{L}(x(t),\dot{x}(t)). \] % Since $f$ has compact support and $\mathcal{H}(y,0) = 0$ for any $y \in E$, we estimate % \begin{align*} \int_0^T \mathcal{L}(x(t),\dot{x}(t)) \, ds &\leq \int_0^T \dot{x}(t) \nabla f(x(t)) \, dt - T\inf_{y \in \mathrm{supp}(f)} \mathcal{H}(y,\nabla f(y)). \end{align*} % By continuity of $\mathcal{H}$ the field $F$ is bounded on compact sets, so the first term can be bounded by % \[ \int_0^T \dot{x}(t) \nabla f(x(t)) \, dt \leq T \sup_{y \in \mathrm{supp}(f)}\|F(y)\| \sup_{z \in \mathrm{supp}(f)}|\nabla f(z)|. \] % Therefore, for any $T>0$, we obtain that the integral over the Lagrangian is bounded from above by $M = M(T)$, with % \[ M := T \sup_{y \in \mathrm{supp}(f)}\|F(y)\| \sup_{z \in \mathrm{supp}(f)}|\nabla f(z)| - \inf_{y \in \mathrm{supp}(f)} \mathcal{H}(y,\nabla f(y)). \] From the first part of the, see the argument concluding after \eqref{eq:action_integral_representation:Lyapunov_bound}, we find that the solution $x(t)$ remains in the compact set \begin{equation} \label{eqn:containment_set_existence} K' := \left\{ z \in E \, \middle| \, \Upsilon(z) \leq C \right\}, \quad C := \Upsilon(x_0) + M + T \sup_x \mathcal{H}(x,\nabla \Upsilon(x)), \end{equation} for all $t \in [0,T]$. \smallskip \emph{Step 2}: We prove that there exists a solution $x(t)$ of \eqref{eq:action_integral_representation:subdifferential_eq} on $[0,T]$. % Using $F$, we define a new multi-valued vector-field $F'(z)$ that equals $F(z) = \partial_p \mathcal{H}(z,\nabla f(z))$ inside $K'$, but equals $\{0\}$ outside a neighborhood of $K$. This can e.g. be achieved by multiplying with a smooth cut-off function $g_{K'} : E \to [0,1]$ that is equal to one on $K'$ and zero outside of a neighborhood of $K'$. \smallskip The field $F'$ satisfies (F1), (F2) and (F3) from above, and hence there exists an absolutely continuous path $y : [0,\infty) \to E$ such that $y(0) = x_0$ and for almost every $t \geq 0$, % \[ \dot{y}(t) \in F'(y(t)). \] % By the estimate established in step 1 and the fact that $\Upsilon(\gamma(t)) \leq C$ for any $0 \leq t \leq T$, it follows from the argument as shown above in \eqref{eq:action_integral_representation:Lyapunov_bound} that the solution $y$ stays in $K'$ up to time $T$. Since on $K'$, we have $F' = F$, this implies that setting $x = y|_{[0,T]}$, we obtain a solution $x(t)$ of \eqref{eq:action_integral_representation:subdifferential_eq} on the time interval $[0,T]$. \end{proof} \section{Verification for examples of Hamiltonians} \label{section:verification-for-examples-of-Hamiltonians} In this section, we verify the conditions on $\Lambda$ and $\mathcal{I}$ for the example Hamiltonians of Section~\ref{section:examples-H}. Since the conditions on the functions~$\Lambda$ and~$\mathcal{I}$ are independent of each other, we verify these conditions separately. In Section \ref{section:verify-ex:cost-functions}, we consider Assumption \ref{assumption:results:regularity_I} for $\mathcal{I}$. In Sections \ref{section:verify-ex:functions-Lambda}, we consider Assumption \ref{assumption:results:regularity_of_V} for $\Lambda$. The continuity estimates will be verified separately in Section \ref{section:verification_of_continuity_estimate}. \subsection{Verifying assumptions for cost functions $\mathcal{I}$} \label{section:verify-ex:cost-functions} We verify Assumption~\ref{assumption:results:regularity_I} for two types of cost functions $\mathcal{I}(x,\theta)$, corresponding to the examples of Section~\ref{section:examples-H}. \smallskip We start by considering the case in which the cost function is the large-deviation rate function for the occupation-time measures of jump process taking values in a finite set $\{1,\dots,J\}$ (e.g.~\cite{donsker1975asymptoticI,denHollander2000}). We follow this example in Proposition~\ref{prop:verify:DV-functional-of-drift-diffusion} in which the cost function stems from occupation-time large deviations of a drift-diffusion process on a compact manifold, see e.g. \cite{DonskerVaradhan75,Pi07}. We expect these results to extend also to non-compact spaces, but we feel this is better suited for a separate work. \begin{proposition}[Donsker-Varadhan functional for jump processes] \label{prop:verify:DV-for-Jumps} Consider a finite set $F = \{1,\dots,J\}$ and let $\Theta := \mathcal{P}(\{1,\dots,J\})$ be the set of probability measures on $F$. For $x\in E$, let $L_x : C_b(F) \rightarrow C_b(F)$ be the operator given by \begin{equation*} L_x f(i) := \sum_{j=1}^Jr(i,j,x)\left[f(j)-f(i)\right],\quad f :\{1,\dots,J\}\to\mathbb{R}. \end{equation*} Suppose that the rates $r:\{1,\dots,J\}^2\times E \rightarrow \mathbb{R}^+$ are continuous as a function on $E$ and moreover satisfy the following: \begin{enumerate}[label=(\roman*)] \item For any $x\in E$, the matrix $R(x)$ with entries $R(x)_{ij} := r(i,j,x)$ for $i\neq j$ and $R(x)_{ii} = -\sum_{j\neq i}r(i,j,x)$ is irreducible. \item For each pair $(i,j)$, we either have $r(i,j,\cdot)\equiv 0$ or for each compact set $K\subseteq E$, it holds that \begin{equation*} r_{K}(i,j) := \inf_{x\in K}r(i,j,x) > 0. \end{equation*} \end{enumerate} Then the Donsker-Varadhan functional $\mathcal{I}:E\times\Theta \rightarrow \mathbb{R}^+$ defined by \begin{equation*} \mathcal{I}(x,\theta) := \sup_{w\in\mathbb{R}^J}\sum_{ij}r(i,j,x)\theta_i \left[1-e^{w_j-w_i}\right] \end{equation*} satisfies Assumption~\ref{assumption:results:regularity_I}. \end{proposition} \begin{proof}[Proof] \underline{\ref{item:assumption:I:lsc}}: For a fixed vector $w\in\mathbb{R}^J$, the map \begin{equation*} (x,\theta)\mapsto \sum_{ij}r(i,j,x)\theta_i \left[1-e^{w_j-w_i}\right] \end{equation*} is continuous on $E\times\Theta$. Hence $\mathcal{I}(x,\theta)$ is lower semicontinuous as the supremum over continuous functions. \smallskip \underline{\ref{item:assumption:I:zero-measure}}: Let $x\in E$. First note that for all $\theta$, the choice $w = 0$ implies that $\mathcal{I}(x,\theta) \geq 0$. By the irreducibility assumption on the rates $r(i,j,x)$, there exists a unique measure $\theta_x\in\Theta$ such that for any $f:\{1,\dots,J\}\to\mathbb{R}$, \begin{equation} \label{eqn:example_jump_DV_stationarity} \sum_i L_x f(i) \theta_x(i)=0. \end{equation} We establish $\mathcal{I}(x,\theta_x) = 0$. Let $w \in \mathbb{R}^J$. By the elementary estimate \begin{equation*} \left(1-e^{b - a}\right)\leq -(b-a) \quad \text{ for all } \; a,b > 0, \end{equation*} we obtain \begin{align*} \sum_{ij}r(i,j,x) \theta_x(i) \left(1-e^{w_j - w_i}\right) &\leq -\sum_{ij}r(i,j,x) \theta_x(i) \left(w_j - w_i \right)\\ &= -\sum_i (L_x w)(i) \theta_x(i) \overset{\eqref{eqn:example_jump_DV_stationarity}}{=} 0 \end{align*} Since $\mathcal{I} \geq 0$, this implies $\mathcal{I}(x,\theta_x) = 0$. \smallskip \underline{\ref{item:assumption:I:compact-sublevelsets}}: Any closed subset of $\Theta$ is compact. \smallskip \underline{\ref{item:assumption:I:finiteness}}: Let $x_n\to x$ in $E$. It follows that the sequence is contained in some compact set $K \subseteq E$ that contains the $x_n$ and $x$ in its interior. For any $y\in K$, \begin{equation*} \mathcal{I}(y,\theta) \leq \sum_{ij, i \neq j} r(i,j,y) \theta_i \leq \sum_{ij, i\neq j} r(i,j,y) \leq \sum_{ij, i \neq j} \bar{r}_{ij}, \quad \bar{r}_{ij} := \sup_{y \in K} r(i,j,y). \end{equation*} Hence $\mathcal{I}$ is uniformly bounded on $K\times\Theta$, and~\ref{item:assumption:I:finiteness} follows with $U_x$ the interior of $K$. \smallskip \underline{\ref{item:assumption:I:equi-cont}}: Let $d$ be some metric that metrizes the topology of $E$. We will prove that for any compact set $K\subseteq E$ and $\varepsilon > 0$ there is some $\delta > 0$ such that for all $x,y \in K$ with $d(x,y) \leq \delta$ and for all $\theta \in \mathcal{P}(F)$, we have \begin{equation} \label{eqn:proof_equi_cont_I} |\mathcal{I}(x,\theta) - \mathcal{I}(y,\theta)| \leq \varepsilon. \end{equation} Let $x,y \in K$. By continuity of the rates the $\mathcal{I}(x,\cdot)$ are uniformly bounded for $x \in K$: \begin{equation*} 0 \leq \mathcal{I}(x,\theta) \leq \sum_{ij, i \neq j} r(i,j,x) \theta_i \leq \sum_{ij, i\neq j} r(i,j,x) \leq \sum_{ij, i \neq j} \bar{r}_{ij}, \quad \bar{r}_{ij} := \sup_{x \in K} r(i,j,x). \end{equation*} For any $n \in \mathbb{N}$, there exists $w^n \in \mathbb{R}^J$ such that \begin{equation*} 0 \leq \mathcal{I}(x,\theta) \leq \sum_{ij, i \neq j} r_{ij}(x) \theta_i (1 - e^{w^n_j - w^n_i}) + \frac{1}{n}. \end{equation*} By reorganizing, we find for all bonds $(a,b)$ the bound \begin{equation*} \theta_a e^{w^n_b - w^n_a} \leq \frac{1}{r_{K,a,b}} \left[ \sum_{ij, i \neq j, a \neq i, b \neq j} r(i,j,x)\theta_i + \frac{1}{n} \right] \leq \frac{1}{r_{K,a,b}} \left[ \sum_{ij, i \neq j} \bar{r}_{ij} + \frac{1}{n} \right]. \end{equation*} Thereby, evaluating in $\mathcal{I}(y,\theta)$ the same vector $w^n$ to estimate the supremum, \begin{align*} & \mathcal{I}(x,\theta) - \mathcal{I}(y,\theta) \\ &\leq \frac{1}{n} + \sum_{ab, a\neq b} r(a,b,x) \theta_a (1 - e^{w^n_b - w^n_a}) - \sum_{ab, a\neq b} r(a,b,y) \theta_a (1 - e^{w^n_b - w^n_a}) \\ &\leq \frac{1}{n} + \sum_{ab, a\neq b} |r(a,b,x) - r(a,b,y)| \theta_a + \sum_{ab, a\neq b} |r(a,b,y) - r(a,b,x)| \theta_a e^{w^n_b - w^n_a} \\ &\leq \frac{1}{n} + \sum_{ab, a\neq b}|r(a,b,x) - r(a,b,y)| \left( 1 + \frac{1}{r_{K,a,b}} \left[\sum_{ij, i \neq j} \bar{r}_{ij} + 1 \right] \right) \end{align*} We take $n \to \infty$ and use that the rates $x \mapsto r(a,b,x)$ are continuous, and hence uniformly continuous on compact sets, to obtain \eqref{eqn:proof_equi_cont_I}. \end{proof} \begin{proposition}[Donsker-Varadhan functional for drift-diffusions] \label{prop:verify:DV-functional-of-drift-diffusion} Let $F$ be a smooth compact Riemannian manifold without boundary and set $\Theta:=\mathcal{P}(F)$, the set of probability measures on $F$. For $x\in E$, let $L_x : C^2(F) \subseteq C_b(F) \rightarrow C_b(F)$ be the second-order elliptic operator that in local coordinates is given by \begin{equation*} L_x = \frac{1}{2}\nabla\cdot\left(a_x \nabla\right) + b_x\cdot \nabla, \end{equation*} where $a_x$ is a positive definite matrix and $b_x$ is a vector field having smooth entries $a_x^{ij}$ and $b_x^i$ on $F$. Suppose that for all $i,j$ the maps \begin{equation} \label{eqn:examples_DV_diffusion_continuous_coefficients} x \mapsto a_x^{i,j}(\cdot), \qquad x \mapsto b_x^i(\cdot) \end{equation} are continuous as functions from $E$ to $C_b(F)$, where we equip $C_b(F)$ with the supremum norm. Then the functional $\mathcal{I}:E\times\Theta\to[0,\infty]$ defined by \begin{equation*} \mathcal{I}(x,\theta) := \sup_{\substack{u\in \mathcal{D}(L_x)\\u>0}}\left[ -\int_F \frac{L_xu}{u}\,d\theta\right] \end{equation*} satisfies Assumption~\ref{assumption:results:regularity_I}. \end{proposition} \begin{proof}[Proof] \underline{\ref{item:assumption:I:lsc}}: For any fixed function $u\in\mathcal{D}(L_x)$ that is strictly positive on $F$, the function $(-L_xu/u)$ is continuous on $F$. For any fixed $u$ it follows by~\eqref{eqn:examples_DV_diffusion_continuous_coefficients} and compactness of $F$ that \begin{equation*} (x,\theta)\mapsto -\int_F \frac{L_xu}{u}\,d\theta \end{equation*} is continuous on $E\times\Theta$. As a consequence $\mathcal{I}(x,\theta)$ is lower semicontinuous as the supremum over continuous functions. \smallskip \underline{\ref{item:assumption:I:zero-measure}}: Let $x\in E$. The stationary measure $\theta_x\in\Theta$ satisfying \begin{equation}\label{eq:proof:verify-I-diffusion:I2} \int_F L_xg(z)\,d\theta_x(z) = 0\quad \text{for all}\;g\in \mathcal{D}(L_x) \end{equation} is the minimizer of $\mathcal{I}(x,\cdot)$, that is $\mathcal{I}(x,\theta_x) = 0$. This follows by considering the Hille-Yosida approximation $L_x^\varepsilon$ of $L_x$ and using the same argument (using $w = \log u$) as in Proposition~\ref{prop:verify:DV-for-Jumps} for these approximations. For any $u>0$ and for any~$\varepsilon>0$, \begin{align*} -\int_F \frac{L_xu}{u}\,d\theta & = -\int_F \frac{L^\varepsilon_xu}{u}\,d\theta + \int_F \frac{(L^\varepsilon_x-L_x)u}{u}\,d\theta\\ &\leq -\int_F \frac{L^\varepsilon_xu}{u}\,d\theta + \frac{1}{\inf_F u} \|(L_x^\varepsilon-L_x)u\|_F\\ &\leq -\int_F L^\varepsilon_x \log(u)\,d\theta + o(1)_{\varepsilon\to 0}. \end{align*} Sending $\varepsilon\to 0$ and then using~\eqref{eq:proof:verify-I-diffusion:I2} gives~\ref{item:assumption:I:zero-measure}. \smallskip \underline{\ref{item:assumption:I:compact-sublevelsets}}: Since $\Theta = \mathcal{P}(F)$ is compact, any closed subset of $\Theta$ is compact. Hence any union of sub-level sets of $\mathcal{I}(x,\cdot)$ is relatively compact in~$\Theta$. \smallskip \underline{\ref{item:assumption:I:finiteness}}: Let $x_n\to x$ in $E$ and $\theta_n$ be a sequence in $\Theta$, and suppose that $\mathcal{I}(x_n,\theta_n)\leq M$ for some constant $M$ independent of $n$. Let $ \mathrm{d} z$ be the Riemannian measure on $F$. By Pinsky's results in~\cite{pinsky1985evaluating,Pi07}, if $\mathcal{I}(y,\theta) < \infty$, then the density $\frac{ \mathrm{d} \theta}{ \mathrm{d} z}$ exists. In addition, there are constants $c_1,c_2,c_3,c_4$ depending only on $a_{y},b_{y}$, and not on $\theta$, such that \begin{equation} \label{eqn:Pinksy_bootstrap} c_1(y)\int_F|\nabla g_\theta |^2\,dz - c_2(y) \leq \mathcal{I}(y,\theta) \leq c_3(y) \int_F|\nabla g_\theta |^2\,dz + c_4(y), \end{equation} where $g_\theta = ( \mathrm{d} \theta/ \mathrm{d} z)^{1/2}$. In particular, as can be seen by the derivation of~\cite[Eq.~(2.18),~(2.19)]{pinsky1985evaluating}, the constants depend continuously on $y\in E$ by our continuity assumptions on $a_y$ and $b_y$. Applying this to our sequences $x_n$ and $\theta_n$, we have \begin{equation*} \int_F |\nabla g_{\theta_n}|^2\,dz \leq M', \end{equation*} for a constant $M'$. This implies again by \eqref{eqn:Pinksy_bootstrap} that for any $y$ in some neighborhood of $x$ that \begin{equation*} \mathcal{I}(y,\theta_{x_n}) \leq C <\infty, \end{equation*} with a constant independent of $n$. \smallskip \underline{\ref{item:assumption:I:equi-cont}}: Since the coefficients $a_x$ and $b_x$ of the operator $L_x$ depend continuously on $x$, assumption~\ref{item:assumption:I:equi-cont} follows from Theorem~2 of~\cite{Pi07}. \end{proof} \subsection{Verifying assumptions for functions $\Lambda$} \label{section:verify-ex:functions-Lambda} We verify Assumption~\ref{assumption:results:regularity_of_V} for three types of functions~$\Lambda$ corresponding to the examples of Section \ref{section:examples-H}. We start with $\Lambda$'s that are given as integrals over quadratic polynomials in $p$. \begin{proposition}[Quadratic function $\Lambda$]\label{prop:verify-ex:Lambda_quadratic} Let $E=\mathbb{R}^d$ and $\Theta=\mathcal{P}(F)$ for some compact Polish space $F$. Suppose that the function $\Lambda :E\times\mathbb{R}^d\times\Theta\to\mathbb{R}$ is given by \begin{equation*} \Lambda(x,p,\theta) = \int_F\ip{a(x,z)p}{p}\,d\theta(z) + \int_F\ip{b(x,z)}{p}\,d\theta(z), \end{equation*} where $a:E\times F\to\mathbb{R}^{d\times d}$ and $b:E\times F\to\mathbb{R}^d$ are continuous. Suppose that for every compact set $K \subseteq \mathbb{R}^d$, \begin{align*} a_{K,min} & := \inf_{x \in K, z \in F, |p|=1} \ip{a(x,z)p}{p} > 0, \\ a_{K,max} & := \sup_{x \in K, z \in F, |p| = 1} \ip{a(x,z)p}{p} < \infty, \\ b_{K,max} & := \sup_{x \in K, z \in F, |p|=1} |\ip{b(x,z)}{p}| < \infty. \end{align*} Furthermore, there exists a constant $L>0$ such that for all $x,y\in E$ and $z\in F$, \begin{equation*} \|a(x,z)-a(y,z)\| \leq L|x-y|, \end{equation*} and suppose that the functions $b$ are one-sided Lipschitz continuous. Then Assumption~\ref{assumption:results:regularity_of_V} holds. \end{proposition} \begin{proof}[Proof] \underline{\ref{item:assumption:slow_regularity:continuity}}: Let $(x,p)\in E\times\mathbb{R}^d$. By the boundedness assumptions on $a$ and $b$, \begin{equation*} \sup_\theta |\Lambda(x,p,\theta)| \leq a_{\{x\},\text{max}} + b_{\{x\},\text{max}} < \infty, \end{equation*} and hence the function $\theta\mapsto |\Lambda(x,p,\theta)|$ is bounded on $\mathcal{P}(F)$. Continuity of $\Lambda$ is a consequence of the fact that \begin{equation*} \Lambda(x,p,\theta) = \int_F V(x,p,z)\, \mathrm{d}\theta(z) \end{equation*} is the pairing of a continuous bounded function $V(x,p,\cdot)$ with~$\theta\in\mathcal{P}(F)$. \smallskip \underline{\ref{item:assumption:slow_regularity:convexity}}: Let $x\in E$ and $\theta \in \mathcal{P}(F)$. Convexity of $p\mapsto \Lambda(x,p,\theta)$ follows since $a(x,z)$ is positive definite by assumption. If $p_0 = 0$, then evidently $\Lambda(x,p_0,\theta) = 0$. \smallskip \underline{\ref{item:assumption:slow_regularity:compact_containment}}: We show that the map $\Upsilon : E\to\mathbb{R}$ defined by \begin{equation*} \Upsilon(x) := \frac{1}{2}\log\left(1 + |x|^2\right) \end{equation*} is a containment function for $\Lambda$. For any $x\in E$ and $\theta\in\mathcal{P}(F)$, we have \begin{align*} \Lambda(x,\nabla\Upsilon(x),\theta) &= \int_F \ip{a(x,z)\nabla\Upsilon(x)}{\nabla\Upsilon(x)}\,d\theta(z) + \int_F\ip{b(x,z)}{\nabla\Upsilon(x)}\,d\theta(z)\\ &\leq a_{\{x\},\text{max}} |\nabla\Upsilon(x)|^2 + b_{\{x\},\text{max}}|\nabla\Upsilon(x)|\\ &\leq C (1+|x|) \frac{x^2}{(1+x^2)^2} + C(1+|x|) \frac{x}{(1+x^2)}, \end{align*} and the boundedness condition follows with the constant \begin{equation*} C_\Upsilon := C \,\sup_x (1+|x|) \left[\frac{x^2}{(1+x^2)^2} + \frac{x}{(1+x^2)} \right] <\infty. \end{equation*} \smallskip \underline{\ref{item:assumption:slow_regularity:continuity_estimate}}: By the assumption on $a(x,z)$, the function $\Lambda$ is uniformly coercive in the sense that for any compact set $K\subseteq E$, \begin{equation*} \inf_{x\in K, \theta\in\Theta}\Lambda(x,p,\theta) \to \infty \quad \text{ as }\; |p|\to \infty, \end{equation*} and the continuity estimate follows by Proposition~\ref{proposition:continuity_estimate_coercivity}. \smallskip \underline{\ref{item:assumption:slow_regularity:controlled_growth}}: Let $K\subseteq E$ be compact. We have to show that there exist constants $M, C_1, C_2 \geq 0$ such that for all $x \in K$, $p \in \mathbb{R}^d$ and all $\theta_1,\theta_2 \in \mathcal{P}(F)$, we have \begin{equation} \label{eqn:growth_bound_general} \Lambda(x,p,\theta_1) \leq \max \left\{M, C_1 \Lambda(x,p,\theta_2) + C_2 \right\}. \end{equation} Fix $\theta_1,\theta_2 \in \mathcal{P}(F)$. We have for $x \in K$ \begin{equation*} \int \ip{a(x,z)p}{p} d\theta_1(z) \leq \frac{a_{K,max}}{a_{K,min}} \int \ip{a(x,z)p}{p} d\theta_2(z) \end{equation*} In addition, as $a_{K,min} > 0$ and $b_{K,max} < \infty$ we have for any $C > 0$ and sufficiently large $|p|$ that \begin{equation*} \int \ip{b(x,z)}{p} \,d\theta_1(z) - (C+1)\int \ip{b(x,z)}{p} \,d\theta_2(z) \leq C \int \ip{a(x,z)p}{p} \,d\theta_2(z) \end{equation*} Thus, for sufficiently large $|p|$ (depending on $C$) we have \begin{equation*} \Lambda(x,p,\theta_1) \leq (1+C) \Lambda(x,p,\theta_2). \end{equation*} Fix a $C =: C_1$ and denote the set of `large' $p$ by $S$. The map $(x,p,\theta) \mapsto \Lambda(x,p,\theta)$ is bounded on $K \times \times S^c\times \Theta$. Thus, we can find a constant $C_2$ such that \eqref{eqn:growth_bound_general} holds. \end{proof} We proceed with an example in which $\Lambda$ depends on $p$ through exponential functions. Let $q \in \mathbb{N}$ be an integer and \begin{equation*} \Gamma := \left\{(a,b)\,:\,a,b\in\{1,\dots,q\}, \,a\neq b\right\} \end{equation*} be the set of oriented edges in $\{1,\dots,q\}$. \begin{proposition}[Exponential function $\Lambda$]\label{prop:verify-ex:Lambda_exponential} Let $E\subseteq \mathbb{R}^d$ be the embedding of $E = \mathcal{P}(\{1,\dots,q\}) \times (\mathbb{R}^+)^{|\Gamma|}$ and $\Theta$ be a topological space. Suppose that $\Lambda$ is given by \begin{equation*} \Lambda((\mu,w),p,\theta) = \sum_{(a,b) \in \Gamma} v(a,b,\mu,\theta)\left[\exp\left\{p_b - p _a + p_{(a,b)} \right\} - 1 \right] \end{equation*} where $v$ is a proper kernel in the sense of Definition~\ref{definition:proper_kernel}. Suppose in addition that there is a constant $C > 0$ such that for all $(a,b) \in \Gamma$ such that $v(a,b, \cdot,\cdot) \neq 0$ we have \begin{equation}\label{eq:prop-verify-Lambda-exp:boundedness-kernel} \sup_{\mu} \sup_{\theta_1,\theta_2} \frac{v(a,b,\mu,\theta_1)}{v(a,b,\mu,\theta_2)} \leq C. \end{equation} Then $\Lambda$ satisfies Assumption~\ref{assumption:results:regularity_of_V}. \end{proposition} Similar to previous proposition, the assumptions on~$\Lambda$ are satisfied if~$\Theta = \mathcal{P}(F)$ for some Polish space $F$, and if~$v(a,b,\mu,\theta) = \mu(a) \int r(a,b,\mu,z) \theta( \mathrm{d} z)$ and there are constants~$0 < r_{min} \leq r_{max} < \infty$ such that for all~$(a,b) \in \Gamma$ such that~$\sup_{\mu,z} r(a,b,\mu,z) > 0$, we have \begin{equation*} r_{min} \leq \inf_{z} \inf_{\mu} r(a,b,\mu,z) \leq \sup_{z} \sup_{\mu} r(a,b,\mu,z) \leq r_{max}. \end{equation*} Regarding~\eqref{eq:prop-verify-Lambda-exp:boundedness-kernel}, for $(a,b) \in \Gamma$ for which $v(a,b,\cdot,\cdot)$ is non-trivial, we have \begin{equation*} \frac{v(a,b,\mu,\theta_1)}{v(a,b,\mu,\theta_2)} = \frac{\int r(a,b,\mu,z) \theta_1( \mathrm{d} z)}{\int r(a,b,\mu,z) \theta_2( \mathrm{d} z)} \leq \frac{r_{max}}{r_{min}}. \end{equation*} \begin{proof}[Proof of Proposition~\ref{prop:verify-ex:Lambda_exponential}] \underline{\ref{item:assumption:slow_regularity:continuity}}: The function $\Lambda$ is continuous as the sum of continuous functions. Boundedness of $\Lambda$ as a function of $\theta$ follows from the boundedness assumption~\eqref{eq:prop-verify-Lambda-exp:boundedness-kernel}. \smallskip \underline{\ref{item:assumption:slow_regularity:convexity}}: Convexity of $\Lambda$ as a function of $p$ follows from the fact that $\Lambda$ is a finite sum of convex functions, and $\Lambda(x,0,\theta)=0$ is evident. \smallskip \underline{\ref{item:assumption:slow_regularity:compact_containment}}: The function $\Upsilon : E\to\mathbb{R}$ defined by \begin{equation*} \Upsilon(\mu,w) := \sum_{(a,b)\in\Gamma}\log\left[1 + w_{(a,b)}\right] \end{equation*} is a containment function for $\Lambda$ (an explicit verification is given in~\cite{Kr17}). \smallskip \underline{\ref{item:assumption:slow_regularity:continuity_estimate}}: The continuity estimate is the content of Proposition~\ref{proposition:continuity_estimate_directional_extended} below. \smallskip \underline{\ref{item:assumption:slow_regularity:controlled_growth}}: Note that \begin{align*} \Lambda((\mu,w),\theta_1,p) & \leq \sum_{(a,b)\in \Gamma} v(a,b,\mu,\theta_1) e^{p_{a,b} + p_b - p_a} \\ & \leq C \sum_{(a,b)\in \Gamma} v(a,b,\mu,\theta_2) e^{p_{a,b} + p_b - p_a} \\ & \leq C \sum_{(a,b)\in \Gamma} v(a,b,\mu,\theta_2) \left[e^{p_{a,b} + p_b - p_a} - 1 \right] + C_2 . \end{align*} Thus the estimate holds with $M = 0$, $C_1 = C$ and $C_2 = \sup_{\mu,\theta} \sum_{a,b} v(a,b,\mu,\theta)$. \end{proof} \subsection{Verifying the continuity estimate} \label{section:verification_of_continuity_estimate} With the exception of the verification of the continuity estimate in Assumption \ref{assumption:results:regularity_of_V} the verification in Section \ref{section:verify-ex:functions-Lambda} is straightforward. On the other hand, the continuity estimate is an extension of the comparison principle, and is therefore more complex. We verify the continuity estimate in three contexts, which we hope illustrates that the continuity estimate follows from essentially the same arguments as the standard comparison principle. We will do this for: \begin{itemize} \item Coercive Hamiltonians \item One-sided Lipschitz Hamiltonians \item Hamiltonians arising from large deviations of empirical measures. \end{itemize} This list is not meant to be an exhaustive list, but to illustrate that the continuity estimate is a sensible extension of the comparison principle, which is satisfied in a wide range of contexts. In what follows, $E\subseteq \mathbb{R}^d$ is a Polish subset and $\Theta$ a topological space. \begin{proposition}[Coercive $\Lambda$] \label{proposition:continuity_estimate_coercivity} Let $\Lambda : E \times \mathbb{R}^d \times \Theta \rightarrow \mathbb{R}$ be continuous and uniformly coercive: that is, for any compact $K \subseteq E$ we have \begin{equation*} \inf_{x \in K, \theta\in\Theta} \Lambda(x,p,\theta) \to \infty \quad \mathrm{as} \; |p| \to \infty. \end{equation*} Then the continuity estimate holds for $\Lambda$ with respect to any penalization function $\Psi$. \end{proposition} \begin{proof} Let $\Psi(x,y) = \tfrac{1}{2}(x-y)^2$. Let $(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon},\theta_{\varepsilon,\alpha})$ be fundamental for $\Lambda$ with respect to $\Psi$. Set $p_{\alpha,\varepsilon} = \alpha(x_{\varepsilon,\alpha} - y_{\varepsilon,\alpha})$. By the upper bound~\eqref{eqn:control_on_Gbasic_sup}, we find that for sufficiently small $\varepsilon > 0$ there is some $\alpha(\varepsilon)$ such that \begin{equation*} \sup_{\alpha \geq \alpha(\varepsilon)} \Lambda\left(y_{\varepsilon,\alpha}, p_{\varepsilon,\alpha}, \theta_{\varepsilon,\alpha}\right) < \infty. \end{equation*} As the variables $y_{\alpha,\varepsilon}$ are contained in a compact set by property (C1) of fundamental collections of variables, the uniform coercivity implies that the momenta $p_{\varepsilon,\alpha}$ for $\alpha \geq \alpha(\varepsilon)$ remain in a bounded set. Thus, we can extract a subsequence $\alpha'$ such that $(x_{\varepsilon,\alpha'},y_{\varepsilon,\alpha'},p_{\varepsilon,\alpha'},\theta_{\varepsilon,\alpha'})$ converges to $(x,y,p,\theta)$ with $x = y$ due to property (C2) of fundamental collections of variables. By continuity of $\Lambda$ we find \begin{align*} & \liminf_{\alpha \rightarrow \infty} \Lambda\left(x_{\varepsilon,\alpha}, p_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}\right) - \Lambda\left(y_{\alpha,\varepsilon},p_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}\right) \\ & \leq \lim_{\alpha'\rightarrow \infty} \Lambda\left(x_{\varepsilon,\alpha'}, p_{\varepsilon,\alpha'},\theta_{\varepsilon,\alpha'}\right) - \Lambda\left(y_{\varepsilon,\alpha'},p_{\varepsilon,\alpha'},\theta_{\varepsilon,\alpha'}\right) = 0 \end{align*} establishing the continuity estimate. \end{proof} \begin{proposition}[One-sided Lipschitz $\Lambda$] \label{proposition:continuity_estimate_lipschitz} Let $\Lambda : E \times \mathbb{R}^d \times \Theta\rightarrow \mathbb{R}$ satisfy \begin{equation} \label{eqn:one_sided_Lipschitz_G} \Lambda(x,\alpha(x-y),\theta) - \Lambda(y,\alpha(x-y),\theta) \leq c(\theta) \omega( \alpha (x-y)^2) \end{equation} for some collection of constants $c(\theta)$ satisfying $\sup_\theta c(\theta) < \infty$ and a function $\omega : \mathbb{R}^+ \rightarrow \mathbb{R}^+$ satisfying $\lim_{\delta \downarrow 0} \omega(\delta) = 0$. Then the continuity estimate holds for $\Lambda$ with respect to $\Psi(x,y) = \tfrac{1}{2}(x-y)^2$. \end{proposition} \begin{proof} [Proof] Let $\Psi(x,y) = \tfrac{1}{2}(x-y)^2$. Let $(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon},\theta_{\varepsilon,\alpha})$ be fundamental for $\Lambda$ with respect to $\Psi$. Set $p_{\alpha,\varepsilon} = \alpha(x_{\varepsilon,\alpha} - y_{\varepsilon,\alpha})$. We find \begin{align*} & \liminf_{\alpha \rightarrow \infty} \Lambda\left(x_{\varepsilon,\alpha}, p_{\varepsilon,\alpha}, \theta_{\varepsilon,\alpha}\right) - \Lambda\left(y_{\alpha,\varepsilon},p_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}\right) \\ & \leq \liminf_{\alpha\rightarrow \infty} c(\theta) \omega( \alpha (x-y)^2) \end{align*} which equals $0$ as $\sup_\theta c(\theta) < \infty$, $\lim_{\delta \downarrow 0} \omega(\delta) = 0$ and property (C1) of a fundamental collection of variables. \end{proof} For the empirical measure of a collection of independent processes one obtains maps $\Lambda$ that are neither uniformly coercive nor Lipschitz. Also in this context one can establish the continuity estimate. We treat a simple 1d case and then state a more general version for which we refer to \cite{Kr17}. \begin{proposition} \label{proposition:continuity_estimate_directional} Suppose that $E = [-1,1]$ and that $\Lambda(x,p,\theta)$ is given by \begin{equation*} \Lambda(x,p,\theta) = \frac{1-x}{2} c_+(\theta) \left[e^{2p} -1\right] + \frac{1+x}{2} c_-(\theta) \left[e^{-2p} -1\right] \end{equation*} with $c_-,c_+$ non-negative functions of $\theta$. Then the continuity estimate holds for $\Lambda$ with respect to $\Psi(x,y) = \tfrac{1}{2}(x-y)^2$. \end{proposition} \begin{proof}[Proof] Let $\Psi(x,y) = \tfrac{1}{2}(x-y)^2$. Let $(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon},\theta_{\varepsilon,\alpha})$ be fundamental for $\Lambda$ with respect to $\Psi$. Set $p_{\alpha,\varepsilon} = \alpha(x_{\varepsilon,\alpha} - y_{\varepsilon,\alpha})$. We have \begin{align*} & \Lambda\left(x_{\varepsilon,\alpha}, p_{\varepsilon,\alpha}, \theta_{\varepsilon,\alpha}\right) - \Lambda\left(y_{\alpha,\varepsilon},p_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}\right) \\ & = \frac{y_{\varepsilon,\alpha}-x_{\varepsilon,\alpha}}{2} c_+(\theta_{\varepsilon,\alpha}) \left[e^{2p_{\varepsilon,\alpha}} -1\right] + \frac{x_{\varepsilon,\alpha}-y_{\varepsilon,\alpha}}{2} c_-(\theta_{\varepsilon,\alpha}) \left[e^{-2p_{\varepsilon,\alpha}} -1\right] \end{align*} Now note that $y_{\varepsilon,\alpha}-x_{\varepsilon,\alpha}$ is positive if and only if $e^{2p_{\varepsilon,\alpha}} -1$ is negative so that the first term is bounded above by $0$. With a similar argument the second term is bounded above by $0$. Thus the continuity estimate is satisfied. \end{proof} \begin{proposition} \label{proposition:continuity_estimate_directional_extended} Suppose $E = \mathcal{P}(\{1,\dots,q\} \times (\mathbb{R}^+)^\Gamma$ and suppose that $\Lambda$ is given by \begin{equation*} \Lambda((\mu,w),\theta,p) = \sum_{(a,b) \in \Gamma} v(a,b,\mu,\theta)\left[\exp\left\{p_b - p _a + p_{(a,b)} \right\} - 1 \right] \end{equation*} where $v$ is a proper kernel. Then the continuity estimate holds for $\Lambda$ with respect to penalization functions \begin{align*} \Psi_1(\mu,\hat{\mu}) & := \frac{1}{2} \sum_{a} ((\hat{\mu}(a) - \mu(a))^+)^2, \\ \Psi_2(w,\hat{w}) & := \frac{1}{2} \sum_{(a,b) \in \Gamma} (w_{(a,b)} - \hat{w}_{(a,b)})^2. \end{align*} Here we denote $r^+ = r \vee 0$ for $r \in \mathbb{R}$. \end{proposition} In this context, one can use coercivity like in Proposition \ref{proposition:continuity_estimate_coercivity} in combination with directional properties used in the proof of Proposition \ref{proposition:continuity_estimate_directional} above. The proof of this proposition can be carried out exactly as the proof of~\cite[Theorem~3.8]{Kr17}. Namely at any point, a converging subsequence is constructed, and the variables~$\alpha$ need to be chosen such that we also get convergence of the measures~$\theta_{\varepsilon,\alpha}$ in~$\mathcal{P}(F)$. \chapter{Gradient Flow to Non-Gradient-Flow} \label{chapter:GF-to-NGF} \section{Introduction} \subsection{Diffusion in an asymmetric potential landscape} Our main interest in this chapter is the family of Fokker-Planck equations in one dimension defined by \begin{equation}\label{GF_NGF:eq:intro:upscaled-FP} \partial_t \rho_\varepsilon = \tau_\varepsilon\left[ \varepsilon\, \Delta \rho_\varepsilon + \mathrm{div} \left( \rho_\varepsilon \nabla V\right)\right], \quad t\geq 0,\, x\in\mathbb{R}. \end{equation} Here, we take an asymmetric double-well potential~$V:\mathbb{R}\to\mathbb{R}$ as depicted in Figure~\ref{GF_NGF:fig:asymmetric-doublewell-potential}. \begin{figure}[h!] \labellist \pinlabel $x$ at 1600 200 \pinlabel $x_a$ at 230 200 \pinlabel $x_0$ at 700 200 \pinlabel $x_b$ at 1300 330 \pinlabel $V(x)$ at 1400 1000 \endlabellist \centering \includegraphics[scale=.1]{Asymmetric_DoubleWell_WAxes_a25_bm15_xrange_m5p5_5p8} \caption{The typical asymmetric potential $V(x)$.} \label{GF_NGF:fig:asymmetric-doublewell-potential} \end{figure} \smallskip A typical solution~$\rho_\varepsilon(t,x)$ is displayed in Figure~\ref{GF_NGF:fig:intro:evolution-FP}, showing a mass transition from left to right. There are two parameters~$\varepsilon>0$ and~$\tau_\varepsilon>0$ appearing in the Fokker-Planck equation. The parameter~$\varepsilon$ controls how fast mass can transition in between the potential's wells. In general, smaller values of~$\varepsilon$ correspond to larger transition times of mass flowing from left to right. The time-scale parameter~$\tau_\varepsilon$ is chosen such that transitions from the local minimum~$x_a$ to the global minimum~$x_b$ happen at rate of order one. Below, we make our choice of~$\tau_\varepsilon$ precise. \begin{figure}[h!] \labellist \pinlabel $x_a$ at 130 0 \pinlabel $x_b$ at 240 0 \pinlabel $x_a$ at 460 0 \pinlabel $x_b$ at 570 0 \pinlabel $x_a$ at 790 0 \pinlabel $x_b$ at 900 0 \pinlabel $x_a$ at 1120 0 \pinlabel $x_b$ at 1230 0 \pinlabel $t=t_1$ at 420 240 \pinlabel $t=t_2$ at 750 240 \pinlabel $t=T$ at 1100 240 \pinlabel {\color{dark_blue}{$\rho_\varepsilon(0,x)$}} at 30 200 \endlabellist \centering \includegraphics[scale=.25]{WorkOn_Evolution_upscaled_FokkerPlanck} \caption{The time-evolution of a solution~$\rho_\varepsilon(t,x)$ to~\eqref{GF_NGF:eq:intro:upscaled-FP} whose initial distribution is supported solely on the left. Time is increasing from left to right. At final time, the solution os close to the equilibrium distribution, which is given by~$\exp\{-V(x)/\varepsilon\}$ up to normalization. The smaller the value of~$\varepsilon$, the sharper the equilibrium distribution concentrates around the global minimum~$x_b$.} \label{GF_NGF:fig:intro:evolution-FP} \end{figure} \smallskip We regard the PDE~\eqref{GF_NGF:eq:intro:upscaled-FP} as derived from a stochastic model for metastability introduced by Kramers to study chemical reactions~\cite{Kramers1940}. The stochastic model he considered is the diffusion process $Y^\varepsilon_t = Y^\varepsilon(t)$ in $\mathbb{R}$ solving \begin{equation*} \mathrm{d} Y^\varepsilon_t = -\nabla V(Y^\varepsilon_t)\, \mathrm{d} t + \sqrt{2\varepsilon}\; \mathrm{d} B_t, \end{equation*} where~$B_t$ denotes the standard Brownian motion. For example, consider a particle initiall starting in the left minimum~$x_a$ and propagating from left to right. This propagation may model an reaction-event in which a molecule's state changes from a low-energy state~$x_a$ via a high-energy state~$x_0$ to another low-energy state~$x_b$. Then the assumption of asymmetry of the potential~$V$ corresponds to modeling a reaction resulting in a molecule's state whose final energy is lower than its initial energy. The energy barrier that the particle has to overcome,~$V(x_0)-V(x_a)$, corresponds to the minimal \emph{activation energy} for the reaction to occur. Kramers discussed various examples of reactions that may be modeled this way~\cite[Paragraph~6]{Kramers1940}. His interest lied in deriving formulas for the average reaction rates from the average transition time of a particle from~$x_a$ to~$x_b$. In the stochastic model, as~$\varepsilon$ decreases, a transition from~$x_a$ to~$x_b$ becomes more unlikely, and hence the average-time for a transition~$x_a\to x_b$ to occur increases. Kramers derived an asymptotic expression for this average-time, \begin{equation*} \mathbb{E}_{x_a}\left[T(x_a \to x_b)\right] = \left[1 + o(1)_{\varepsilon\to 0}\right] \frac{2\pi}{\sqrt{V''(x_a) |V''(x_0)|}} \exp\{\varepsilon^{-1}(V(x_0) - V(x_a))\}, \end{equation*} which is also known as the \emph{Kramers formula}. It shows that the average transition time scales exponentially with respect to the energy barrier~$V(x_0)-V(x_a)$ and the inverse of the diffusion coefficient,~$\varepsilon^{-1}$. For further details and background on this model, we refer to the monographs on metastability of Bovier and den Hollander~\cite{BovierDenHollander2016}, and of Berglund and Gentz~\cite{BerglundGentz2005}. \smallskip Motivated by Kramers' formula, we define the time-scale parameter~$\tau_\varepsilon$ by \begin{equation}\label{GF_NGF:intro:eq:def-time-scale-parameter} \tau_\varepsilon := \frac{2\pi}{\sqrt{V''(x_a) |V''(x_0)|}} \exp^{\varepsilon^{-1}(V(x_0) - V(x_a))}, \end{equation} in order to be at a time-scale at which jumps from left to right happen at rate of order one. One way to motivate the PDE~\eqref{GF_NGF:eq:intro:upscaled-FP} from the small-diffusion process is to speed up the process~$Y(t)$ by exactly that time-scale parameter: consider the upscaled process $X^\varepsilon(t):= Y^\varepsilon(\tau_\varepsilon t)$. Then by Itô calculus,~$X^\varepsilon$ satisfies the SDE \begin{equation}\label{GF_NGF:eq:intro:upscaled-diffusion-process} \mathrm{d} X^\varepsilon_t = - \tau_\varepsilon V'(X^\varepsilon_t)\, \mathrm{d} t + \sqrt{\tau_\varepsilon} \sqrt{2\varepsilon} \; \mathrm{d} B_t, \end{equation} and the equation~\eqref{GF_NGF:eq:intro:upscaled-FP} is the Fokker-Planck equation for the transition probabilities $\rho_\varepsilon(t, \mathrm{d} x) = \mathbb{P}\left[X^\varepsilon_t \in \mathrm{d} x\right]$. \smallskip We are interested in the limit~$\varepsilon\to 0$ in the diffusion system~\eqref{GF_NGF:eq:intro:upscaled-FP}. In the limit, we expect the solution $\rho_\varepsilon$ to concentrate at the minima $x_a$ and $x_b$. This is because for small values of~$\varepsilon$, the particle spends most of its time around the minima of the potential. Furthermore, transitions from left to right occur frequently than from right to left due to the lower energy barrier. Since the transition frequency scales exponentially with~$\varepsilon$ and the potential barrier, in the limit~$\varepsilon\to 0$, we expect transitions to occur only from left to right. By our choice of the time-scale~$\tau_\varepsilon$, the limiting dynamics is characterized by mass being transfered at rate one from the local minimum~$x_a$ to the global minimum~$x_b$. In summary, $\rho_\varepsilon \to \rho_0 = z \delta_{x_a} + (1-z) \delta_{x_b}$, with a density~$z=z(t)$ decaying at rate one according to~$\partial_t z = - z$. The time evolution of the limiting density is depicted in Figure~\ref{GF_NGF:fig:intro:limit-evolution-FP}. \begin{figure}[h!] \labellist \pinlabel $x_a$ at 130 0 \pinlabel $x_b$ at 240 0 \pinlabel $x_a$ at 460 0 \pinlabel $x_b$ at 570 0 \pinlabel $x_a$ at 790 0 \pinlabel $x_b$ at 900 0 \pinlabel $x_a$ at 1120 0 \pinlabel $x_b$ at 1230 0 \pinlabel $t=t_1$ at 420 240 \pinlabel $t=t_2$ at 750 240 \pinlabel $t=T$ at 1080 240 \pinlabel {\color{red_one}{$\rho_0(0,x)$}} at 30 200 \endlabellist \centering \includegraphics[scale=.25]{Evolution_limit_upscaled_FokkerPlanck} \caption{The time evolution of~$\rho_0$, defined as the~$\varepsilon\to 0$ limit of the solution~$\rho_\varepsilon(t,x)$ to~\eqref{GF_NGF:eq:intro:upscaled-FP}. The initial distribution is supported solely on the left. As time progresses, mass is flowing only from left to right, with rate one.} \label{GF_NGF:fig:intro:limit-evolution-FP} \end{figure} \subsection{From diffusion to reaction---a singular limit} There has been recent interest in studying the limit~$\varepsilon\to 0$ for the case of \emph{symmetric} double-well potentials, that is potentials~$V$ satisfying~$V(x_a)=V(x_b)$. Peletier, Savaré and Veneroni have proved the concentration of solutions~$\rho_\varepsilon$ on the two potential-minima as~$\varepsilon$ tends to zero. The limiting densities are coupled by ODE's and correspond to a reaction-system~\cite{PeletieSavareVeneroni2010}. These results give a rigorous mathematical meaning to Kramers' program of approximating reactions by upscaling diffusions. The authors also included an additional spatial variable undergoing diffusive motion that we will not consider here. \smallskip A question left unanswered in~\cite{PeletieSavareVeneroni2010} rests on the fact that the Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP} is the gradient flow of the entropy with respect to the Wasserstein metric---we give the precise definitions of gradient flows further below in Section~\ref{GF_NGF:sec:GF}. It is then natural to ask whether a convergence result such as established in~\cite{PeletieSavareVeneroni2010} can be achieved when working only with the gradient-flow structure rather than with the specific equation itself. Indeed, motivated by that question, Arnrich, Mielke, Peletier, Savaré and Veneroni soon after proved in~\cite{ArnrichMielkePeletierSavareVeneroni2012} the convergence of the corresponding Wasserstein gradient flow to a limit gradient flow. Their result comprises the convergence of the upscaled diffusion to the limiting reaction system as a special case. The proof is no longer based on the linearity of the problem, but exploits information derived solely from boundedness of the players involved in the Wasserstein gradient flow: the entropy, the Fisher information, and the Wasserstein metric. \smallskip A convergence result of a variational structure, such as the Wasserstein gradient-flow, is interesting for multiple reasons. First, as Adams, Dirr, Peletier and Zimmer demonstrated~\cite{AdamsDirrPeletierZimmer2011}, the Wasserstein gradient flow is special since it arises naturally from a micro-macro limit using the theory of large deviations. That constitutes a probabilistic argument for working with the Wasserstein gradient flow rather than with other gradient-flow structures. Secondly, since many evolution equations are of Wasserstein gradient-flow type (e.g.~\cite{AmbrosioGigliSavare2008,BlanchetCalvezCarrillo2008,CarrilloDiFrancescoFigalliLaurentSlepcev2011,CarrilloYoungPilTse2019,CarlenGangbo2004,Gigli2010,GianazzaSavareToscani2009,MatthesMcCannSavare2009,Savare2007,Lisini2009}), arguments based on this variational structure have the potential to be applicable to other but similar systems as well. \smallskip The abovementioned studies concentrated on \emph{symmetric} potentials. Our work presented in this chapter contributes to these studies by tackling the case of \emph{asymmetric} double-well potentials~$V$ such as shown above in Figure~\ref{GF_NGF:fig:asymmetric-doublewell-potential}. In the spirit of~\cite{PeletieSavareVeneroni2010,ArnrichMielkePeletierSavareVeneroni2012}, we establish a Gamma-convergence result for variational structures associated to the family of equations~\eqref{GF_NGF:eq:intro:upscaled-FP} in the limit~$\varepsilon\to 0$. \smallskip On the level of a gradient-flow structure of~\eqref{GF_NGF:eq:intro:upscaled-FP}, the \emph{asymmetry} of the potential landscape comes with a couple of challenges that we need to address. We will describe gradient flows and their related convergence concepts in more detail in Section~\ref{GF_NGF:sec:GF}. When taking the limit~$\varepsilon\to 0$, for two reasons we do in fact not expect the Wasserstein gradient flow to converge as in~\cite{ArnrichMielkePeletierSavareVeneroni2012}: first, the \emph{energies diverge in the limit}, and secondly, taking the limit means \emph{passing from reversible to irreversible}. Let us comment further on these two reasons. \smallskip First, various convergence concepts for gradient structures have in common that they require control of energies. In the Wasserstein gradient-flow structure of~\eqref{GF_NGF:eq:intro:upscaled-FP}, the energy is given by the relative entropy with respect to the equilibrium distribution. Due to the asymmetry of the potential, these relative entropies diverge in the limit~$\varepsilon\to 0$ (Section~\ref{GF_NGF:sec:why-GF-not-converge}). This is the main reason for which we can not follow the line of argument in~\cite{ArnrichMielkePeletierSavareVeneroni2012}, which exploits boundedness of entropies. \smallskip Secondly, Mielke, Peletier and Renger identified that under quite general conditions, gradient-flow structures arising from density large deviations are linked one-to-one to time-reversible stochastic processes~\cite{MielkePeletierRenger2014}. From their result, we infer a general rule of thumb: when passing from reversible stochastic processes to an irreversible stochastic process, then we do not expect the limit of the corresponding gradient-flow structures to be of gradient-flow type anymore. In our problem at hand, in the pre-limit regime the Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP} corresponds to a reversible drift-diffusion process. When taking the limit~$\varepsilon\to 0$, we obtain a jump process with jumps only from left to right, which is an irreversible dynamics. This is why we do not expect the limit of the Wasserstein gradient flow to be a gradient flow anymore. We confirm this reasoning in our context by proving that the limiting \emph{variational structure} we obtain in Theorem~\ref{GF_NGF:thm:intro-main-result} is indeed not a gradient flow (Section~\ref{GF_NGF:sec:why-limit-is-not-GF}), even though the limiting equation can be given a gradient-flow structure. \subsection{Flux-density functionals} For the two abovementioned reasons, we can not take the limit of the Wasserstein gradient-flow structure. Therefore, we propose to work instead with a higher-level variational structure. While the Wasserstein gradient-flow structure can be motivated from \emph{density} large deviations, we take our motivation from so-called \emph{flux-density} large deviations~\cite{BertiniDeSoleGabrielliJonaLasinioLandim2015}. We will introduce the rigorous terms in Section~\ref{GF_NGF:sec:flux-density-functionals}. Here, we give a brief description of the flux-density functionals and its central ingredients in order to formulate our main result. \smallskip We define variational structures by functionals that act on time-dependent measures, where the minimizers of these functionals correspond to the dynamics of a Fokker-Planck equation. The Wasserstein gradient-flow of~\eqref{GF_NGF:eq:intro:upscaled-FP} is described by a map~$\mathcal{A}_\varepsilon$ acting on time-dependent probability measures~$\rho$ such that~$\mathcal{A}_\varepsilon(\rho)\geq 0$ for all~$\rho$. The solution~$\rho_\varepsilon$ to the dynamics of~\eqref{GF_NGF:eq:intro:upscaled-FP} minimizes the functional, that means~$\mathcal{A}_\varepsilon(\rho_\varepsilon)=0$. We describe this functional and its relation to gradient flows in more detail in Section~\ref{GF_NGF:sec:GF}. \smallskip For defining the flux-density funtionals, we reformulate the upscaled Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP} as an upscaled continuity equation, \begin{equation}\label{GF_NGF:eq:upscaled-CE} \partial_t\rho_\varepsilon + \mathrm{div} \,j_\varepsilon = 0,\quad t\geq 0,\, x\in\mathbb{R}, \end{equation} where the function~$j_\varepsilon$ is the so-called~\emph{flux} defined by \begin{equation}\label{GF_NGF:eq:intro:def-flux} j_\varepsilon(t,x) := -\tau_\varepsilon\left[\varepsilon\, \nabla \rho_\varepsilon + \rho_\varepsilon\nabla V\right]. \end{equation} In general, for a density~$\rho$, we write~$J_\varepsilon^\rho := -\tau_\varepsilon\left[\varepsilon\, \nabla \rho + \rho\nabla V\right]$. We denote the set of pairs~$(\rho,j)$ satisfying the continuity equation distributionally as \begin{equation*} \mathrm{CE}([0,T];\mathbb{R}) := \{(\rho,j)\,:\, \partial_t\rho + \mathrm{div}\, j = 0\;\text{in}\;\mathcal{D}'((0,T)\times\mathbb{R})\}. \end{equation*} The precise conditions on~$(\rho,j)$ are stated in Definition~\ref{GF_NGF:def:continuity-equation}. \paragraph{Pre-limit functional} For~$\varepsilon>0$, the map~$\mathcal{I}_\varepsilon:\mathrm{CE}([0,T];\mathbb{R})\to[0,\infty]$ is defined by \begin{equation}\label{GF_NGF:eq:level-2p5-rate-function} \mathcal{I}_\varepsilon(\rho,j) := \frac{1}{4} \int_0^T\int_\mathbb{R} \frac{1}{\varepsilon\, \tau_\varepsilon} \frac{1}{\rho(t,x)} \big|j(t,x) -J_\varepsilon^\rho(t,x)\big|^2\,dxdt. \end{equation} This formal expression assumes that the measure~$\rho(t, \mathrm{d} x)$ is absolutely continuous with respect to the Lebesgue measure on~$\mathbb{R}$ and strictly positive. In Definition~\ref{GF_NGF:def:pre-limit-RF}, we give the mathematically rigorous expression of~$\mathcal{I}_\varepsilon$, which is a dual formulation of~\eqref{GF_NGF:eq:level-2p5-rate-function}. \smallskip The map~$\mathcal{I}_\varepsilon$ is a functional whose minimizer corresponds to the solution of the upscaled continuity equation~\eqref{GF_NGF:eq:upscaled-CE}, and hence the upscaled Fokker Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP}. The formula for~$\mathcal{I}_\varepsilon$ is motivated from large-deviation theory of flux-density pairs~\cite[Eq.~(1.3)]{BertiniDeSoleGabrielliJonaLasinioLandim2015}. \smallskip The flux-density functional leads by contraction to the Wasserstein gradient flow, and in that sense comprises the Wasserstein gradient-flow, \begin{equation*} \frac{1}{2} \mathcal{A}_\varepsilon(\rho) = \inf_{\substack{j\\(\rho,j)\in\mathrm{CE}}}\mathcal{I}_\varepsilon(\rho,j), \end{equation*} where the infimum is over fluxes~$j$ such that~$j\ll\rho$. Other examples of such contraction principles from flux-density functionals to density functionals can be found for example in~\cite{Feng1994,Leonard1995,BertiniFaggionatoGabrielli2015}. \smallskip \subsection{Main result---$\Gamma$-convergence of flux-density functionals} In the spirit of~$\Gamma$-convergence of functionals, we would like to obtain a limit of the functionals~$\mathcal{I}_\varepsilon$ as~$\varepsilon\to 0$. Thus the main questions that we ask in this chapter are: \begin{enumerate}[label=(\roman*)] \item \emph{Compactness:} For a family of pairs~$(\rho_\varepsilon',j_\varepsilon')$ depending on~$\varepsilon$, does boundedness of~$\mathcal{I}_\varepsilon(\rho_\varepsilon',j_\varepsilon')$ imply the existence of a subsequence of~$(\rho_\varepsilon',j_\varepsilon')$ that converges in a certain topology~$\mathcal{T}$ on the set~$\mathrm{CE}([0,T];\mathbb{R})$ as~$\varepsilon\to 0$ ? \item \emph{Convergence along sequences:} Is there a limit functional~$\mathcal{I}_0$ satisfying \begin{equation*} (\rho_\varepsilon',j_\varepsilon')\xrightarrow{\mathcal{T}}(\rho,j)\quad\Rightarrow\quad \mathcal{I}_\varepsilon(\rho_\varepsilon',j_\varepsilon') \xrightarrow{\varepsilon\to 0} \mathcal{I}_0(\rho,j)\,? \end{equation*} \end{enumerate} We answer the first question in Theorem~\ref{GF_NGF:thm:compactness}, which establishes that sequences $(\rho_\varepsilon',j_\varepsilon')$ such that~$\mathcal{I}_\varepsilon(\rho_\varepsilon',j_\varepsilon')$ remains bounded are compact with respect to a certain topology. In Theorem~\ref{GF_NGF:thm:compactness}, we make the additional assumption that the densities~$\rho_\varepsilon'$ have uniformly bounded Radon-Nikodym derivatives with respect to a stationary measure we specify in Definition~\ref{GF_NGF:def:transformed-stationary-measure}. \smallskip The second question is answered by Theorems~\ref{GF_NGF:thm:lower-bound} (liminf bound) and Theorem~\ref{GF_NGF:thm:upper-bound} (limsup bound), which together establish a limit of~$\mathcal{I}_\varepsilon$ in the sense of~$\Gamma$-convergence. Here, we give a short version that combines these theorems into one statement. We will consider convergence in~$\mathrm{CE}([0,T];\mathbb{R})$ in the distributional sense, meaning convergence against any smooth and compactly supported test function (Definition~\ref{GF_NGF:def:converge-in-CE}). Furthermore, we introduce a variable transformation in Definition~\ref{GF_NGF:def:coordinate-transformation} akin to our problem at hand, and we give the reason for including the transformation when defining~$y_\varepsilon$. In brief, the purpose of this transformation is to map, in the limit~$\varepsilon\to 0$, the region around the left-minimum~$x_a$ to one point and the region around~$x_b$ to another point. The effect of this transformation for finite~$\varepsilon$ is shown much further below in Figure~\ref{GF_NGF:fig:coordinate-transformation}. \begin{theorem} [Main result] \label{GF_NGF:thm:intro-main-result} There is a functional~$\mathcal{I}_0$ such that under the assumptions of Theorems~\ref{GF_NGF:thm:lower-bound} and~\ref{GF_NGF:thm:upper-bound}, we have~$\lim_{\varepsilon\to 0}\mathcal{I}_\varepsilon = \mathcal{I}_0$ in the following sense of~$\Gamma$-convergence: for any~$(\rho,j)\in \mathrm{CE}([0,T];\mathbb{R})$ such that~$\mathcal{I}_0(\rho,j)$ is finite, there are~$(\rho_\varepsilon,j_\varepsilon)\in \mathrm{CE}([0,T];\mathbb{R})$ such that \begin{equation*} (\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) \xrightarrow{\varepsilon\to 0} (\rho,j)\quad\text{and}\quad \mathcal{I}_\varepsilon(\rho_\varepsilon,j_\varepsilon) \xrightarrow{\varepsilon\to 0}\mathcal{I}_0(\rho,j). \end{equation*} \end{theorem} This Theorem is a first step into proving commutativity of the diagram shown in Figure~\ref{GF_NGF:fig:commuting-diagram}. \vspace{.3cm} \begin{figure}[h!] \labellist \pinlabel \Large \color{black}{$\mathcal{I}_\varepsilon$} at 1300 1100 \pinlabel \color{dark_blue}{$\text{reversible}$} at -650 1100 \pinlabel \color{black}{$\text{Stochastic}$} at -100 1150 \pinlabel \color{black}{$\text{Process}$} at -100 1050 \pinlabel \color{black}{$(\varepsilon,n)$} at 225 1050 \pinlabel \Large \color{red_one}{$\mathcal{I}_0$} at 1300 120 \pinlabel \color{dark_blue}{$\text{Gradient Flow}$} at 1900 1100 \pinlabel \color{red_one}{$\text{irreversible}$} at -650 150 \pinlabel \color{black}{$\text{Stochastic}$} at -100 200 \pinlabel \color{black}{$\text{Process}$} at -100 100 \pinlabel \color{black}{$(0,n)$} at 225 100 \pinlabel \color{red_one}{$\text{Non-Gradient-Flow}$} at 2000 150 \pinlabel \color{black}{$\text{Large deviations}$} at 750 1170 \pinlabel \color{black}{$n\to\infty$} at 750 1050 \pinlabel \color{black}{$\text{Large deviations}$} at 750 170 \pinlabel \color{black}{$n\to\infty$} at 750 50 \pinlabel \color{black}{$\varepsilon$} at -100 760 \pinlabel \Large \color{black}{$\downarrow$} at -100 620 \pinlabel \color{black}{$0$} at -100 480 \pinlabel \color{black}{$\varepsilon$} at 1400 760 \pinlabel \Large \color{black}{$\downarrow$} at 1400 620 \pinlabel \color{black}{$0$} at 1400 480 \endlabellist \centering \includegraphics[scale=.1]{CommutingDiagram} \caption{The top row corresponds to the empirical flux-density pairs~\eqref{GF_NGF:eq:empirical-flux-density-pairs} stemming from i.i.d.~copies of the reversible diffusion process~$X^\varepsilon_i(t)$ from~\eqref{GF_NGF:eq:intro:upscaled-diffusion-process}, whose Fokker-Planck equation is~\eqref{GF_NGF:eq:intro:upscaled-FP}. The bottom row corresponds similarly to a jump process defined on two states~$\{-,+\}$, with jumps only from~$-$ to~$+$. The bottom arrow is a rigorous large-deviation principle, and we prove the right arrow by Theorem~\ref{GF_NGF:thm:intro-main-result}. Whether the left and top arrows correspond to theorems is still an open question.} \label{GF_NGF:fig:commuting-diagram} \end{figure} In there, the stochastic process depending on~$(\varepsilon,n)$ is the so-called empirical flux-density pair~$(\rho_{\varepsilon,n},j_{\varepsilon,n})$ formally defined by \begin{equation}\label{GF_NGF:eq:empirical-flux-density-pairs} \rho_{\varepsilon,n} = \frac{1}{n}\sum_{i=1}^n \delta_{X_i^\varepsilon(t)}\quad\text{and}\quad j_{\varepsilon,n}\approx\frac{1}{n}\sum_{i=1}^n\delta_{X_i^\varepsilon(t)} \partial_t X_i^\varepsilon(t), \end{equation} where~$X_i^\varepsilon(t)$ are independent copies of the upscaled diffusion process satisfying~\eqref{GF_NGF:eq:intro:upscaled-diffusion-process}. For every fixed~$\varepsilon>0$, this process is time-reversible. In the limit~$\varepsilon\to 0$, we expect to obtain a jump process on two states~$\{-,+\}$ with jumps only from left to right. This limit process is no longer reversible. \subsection{The limiting flux-density functional} \label{GF_NGF:sec:intro:limiting-flux-density-functional} We introduce the limiting functional~$\mathcal{I}_0$ from our main result, Theorem~\ref{GF_NGF:thm:intro-main-result} above, and then give a heuristic argument for why this functional is to be expected. The rate function is given in terms of the function \begin{equation}\label{GF_NGF:eq:S-fct} S(a,b):= \begin{cases} a\log(a/b) -(a-b), & a,b>0,\\ b, & a=0,b>0,\\ +\infty, & \text{otherwise}. \end{cases} \end{equation} \paragraph{Limit functional} The map~$\mathcal{I}_0:\mathrm{CE}([0,T];\mathbb{R})\to[0,\infty]$ is defined by \begin{equation*} \mathcal{I}_0(\rho,j) := \int_0^T S(j(t)|z(t))\,dt, \end{equation*} whenever~$\rho(t, \mathrm{d} x) = z(t)\delta_{-1/2}( \mathrm{d} x) + (1-z(t))\delta_{+1/2}( \mathrm{d} x)$ and the flux is piecewise constant and given by~$j(t,x) = j(t)\mathbf{1}_{(-1/2,+1/2)}(x)$. Otherwise, we set $\mathcal{I}_0(\rho,j) = +\infty$. \smallskip The limiting functional~$\mathcal{I}_0$ is finite only for measures~$\rho$ that are concentrated on the points~$\{\pm 1/2\}$. By continuity equation, the flux is given by $j(t)=-\partial_t z(t)$. If~$\mathcal{I}_0$ vanishes, then~$S(j(t)|z(t))=0$, which in turn implies that~$j(t)=z(t)$. Hence the minimizer~$\rho$ of the functional~$\mathcal{I}_0$ with density~$z$ satisfies the evolution equation~$\partial_tz=-z$. The evolution of such a~$\rho$ is depicted in Figure~\ref{GF_NGF:fig:intro:limit-evolution-FP}. The fact that the limit concentrates on~$\{\pm 1/2\}$ rather than~$\{x_a,x_b\}$ is a consequence of the coordinate transformation~$y_\varepsilon$ from Definition~\ref{GF_NGF:def:coordinate-transformation}. The choice of the left-point is arbitrary, but fixes the right point. We choose~$y_\varepsilon$ such that in the limit, the distance between the points is equal to one. \smallskip Just like the pre-limit functional, the functional~$\mathcal{I}_0$ is as well motivated from large-deviation theory. More precisely, it is the large-deviation rate function of flux-density pairs of independent jump processes on a set of two points~$\{-,+\}$, with jump rates~$r_{-+}=1$ and~$r_{+-}=0$. We prove these type of large-deviation results from a Hamilton-Jacobi point-of-view in more generality in Chapter~5. Renger gives a proof based on Girsanov-transformation arguments~\cite{Renger2017}, and Kraaij provides a proof based on Hamilon-Jacobi theory~\cite{Kr17}. Heuristically, we expect the limit of the Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP} to be characterized by exactly that dynamics: transition of mass occurs from left to right at rate one, while transitions from right to left do not occur at all. \subsection{Overview} The rest of this chapter is structured as follows. In Section~\ref{GF_NGF:sec:GF}, we introduce gradient-flow structures and their relation to large-deviation theory. This part provides the background to convergence to equilibirum in the Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP} emphasising the role of entropy, and the Wasserstein gradient flow formulation. In Section~\ref{GF_NGF:sec:flux-density-functionals}, we start from the action formulation (Definition~\ref{GF_NGF:def:wassterstein-GF}) to demonstrate in Section~\ref{GF_NGF:sec:why-GF-not-converge} that the Wasserstein functional does not converge for our problem at hand, as opposed to~\cite{ArnrichMielkePeletierSavareVeneroni2012}. After that, we define the flux-density functionals~$\mathcal{I}_\varepsilon$ and~$\mathcal{I}_0$. In Section~\ref{GF_NGF:sec:proof-of-gamma-convergence}, we prove the main Theorem by splitting it in three statements: compactness (Theorem~\ref{GF_NGF:thm:compactness}), the lower bound (Theorem~\ref{GF_NGF:thm:lower-bound}) and the upper bound (Theorem~\ref{GF_NGF:thm:upper-bound}). For the proof of the lower bound, we work under the assumption of uniformly bounded densities. \section{Gradient flows} \label{GF_NGF:sec:GF} Gradient flows are an example of variational structures that appear naturally in partial differential equations modelling dissipative phenomena. We refer to Peletier's lectures on variational modelling~\cite{Peletier2014} for background and physical motivations on gradient flows . Here in this section, we do not cover novel results, but provide the background to gradient-flow structures that underlie the type of Fokker-Planck equations we consider in this chapter. \smallskip By Fokker-Planck equations, we generally refer to a class of partial differential equations that describe the time evolution of distributions of stochastic processes. We illustrate gradient flows without the parameters present in~\eqref{GF_NGF:eq:intro:upscaled-FP}, that is we consider~$\rho=\rho(t,x)$ solving an equation of the type \begin{equation}\label{GF_NGF:eq:Fokker-Planck-intro} \partial_t \rho = \Delta \rho + \mathrm{div}\left(\rho \nabla V\right),\quad t\geq 0, \, x\in\mathbb{R}, \end{equation} which is a basic model for the probability distribution of a particle diffusing in one dimension in a confining potential landscape~$V(x)$. The asymmetric double-well potential as depicted in Figure~\ref{GF_NGF:fig:asymmetric-doublewell-potential} is an example of a confining potential: the particle is trapped by the potential, which effectively forces the particle to diffuse closely around the minima of~$V$. \smallskip We think of the solution~$\rho(t,x)$ to~\eqref{GF_NGF:eq:Fokker-Planck-intro} as the probability of observing the particle at time~$t$ being in state~$x$. As illustrated above by Kramers problem, the particle's state~$x$ can represent the value of a system's parameter that is fluctuating in time according to Brownian motion, and does not necessarily correspond to the position of a physical particle diffusing in a viscous fluid. The function~$V(x)$ then usually corresponds to an effective energy landscape. For a background on Fokker-Planck equations and their derivations from a phenomenological point of view, we refer to Risken's monograph on this type of equations~\cite{Risken1996}. \smallskip We first discuss in Section~\ref{GF_NGF:sec:GF:conv-to-equil} convergence to equilibrium in~\eqref{GF_NGF:eq:Fokker-Planck-intro}. The main point is to illustrate at the same time both the phenomenon of entropy-dissipation and the dynamics of~\eqref{GF_NGF:eq:Fokker-Planck-intro}. Then in Section~\ref{GF_NGF:sec:GF:diss-mech}, we recall the so-called JKO-scheme that Jordan, Kinderlehrer and Otto identified in~\cite{JordanKinderlehrerOtto1998}, to illuminate the fact that~\eqref{GF_NGF:eq:Fokker-Planck-intro} is the a solution to the gradient-flow of the entropy with respect to the Wasserstein distance. In Section~\ref{GF_NGF:sec:GF:var-struct}, we choose the formulation of gradient flows that we will use in later sections, by means of certain functionals~$\mathcal{I}$. The minimizers of those functionals are called \emph{curves of maximal slope} that correspond to gradient solutions in the classical case. This way of formulating a gradient flow in metric spaces goes back to Ennio De Giorgi and collaborators~\cite{DeGiorgiMarinoTosques1980}. The Wasserstein gradient-flow of~\eqref{GF_NGF:eq:Fokker-Planck-intro} is one example of such a structure: the gradient-flow dynamics is characterized as the minimizer of a functional that involves the entropy, Fisher information and Wasserstein distance. This variational formulation via a functional is the starting point for the~$\Gamma$-convergence results in~\cite{ArnrichMielkePeletierSavareVeneroni2012}, which is why we recall it in Section~\ref{GF_NGF:sec:GF:var-struct}. We use this formulation to showcase where exactly the line of argument in~\cite{ArnrichMielkePeletierSavareVeneroni2012} is limited to symmetric potentials~$V$. \smallskip The presentation draws from different sources: the overview of Markowich and Villani on convergence to equilibrium~\cite{MarkowichVillani2000}, the monograph on gradient flows~\cite{AmbrosioGigliSavare2008} written by Ambrosio, Gigli and Savaré, and the program of deriving gradient flows from large deviations put forward by Adams, Dirr, Mielke, Peletier, Renger and Zimmer~\cite{AdamsDirrPeletierZimmer2011,MielkePeletierRenger2014}. \subsection{Convergence to equilibrium via dissipation of entropy} \label{GF_NGF:sec:GF:conv-to-equil} Boltzmann discovered the celebrated~$\mathrm{H}$-Theorem: according to Boltzmann's equation, an ideal gas of particles evolves in time in such a way that its so-called entropy is monotonically decreasing. As a consequence, after enough time has passed, we find the gas in a state minimizing the entropy. In this state, the distribution of particle's velocities~$v$ is stable, known as the Maxwell-Boltzmann distribution. More generally, we usually refer to a state minimizing the entropy as equilibrium. If Boltzmann's~$\mathrm{H}$-Theorem applies to a system of particles, an initial distribution of particles will eventually converge to equilibrium. \smallskip We can also observe such a convergence phenomenon for the solutions to the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro}. Its equilibrium state, defined by satisfying~$\partial_t\gamma=0$, is given by~$\gamma = e^{-V}$, and we will refer to it as the \emph{Boltzmann distribution} or simply \emph{equilibrium}. We will assume that~$\gamma$ has mass one (otherwise, we add a constant to the potential~$V$). For measuring how far a solution~$\rho$ of~\eqref{GF_NGF:eq:Fokker-Planck-intro} is away from equilibirum, it is natural to introduce the density~$u(t,x)$ by~$\rho(t, \mathrm{d} x)=u(t,x)\gamma( \mathrm{d} x)$. Then the solution~$\rho$ is in equilibrium if and only if~$u\equiv 1$. The density~$u$ evolves in time according to \begin{equation*} \partial_t u = \Delta u - \nabla u \nabla V, \end{equation*} which we can infer from~\eqref{GF_NGF:eq:Fokker-Planck-intro}. For fixed time~$t>0$, the \emph{relative entropy} of~$\rho$ with respect to equilibrium is defined as \begin{equation}\label{GF_NGF:eq:intro:def-entropy} \mathrm{Ent}(\rho(t,\cdot)|\gamma) := \int_\mathbb{R} u(t,x)\log u(t,x) \, \mathrm{d} \gamma(x). \end{equation} In notation, we shall suppress the dependence on time. If the equilibrium distribution~$\gamma$ is clear from the context, we call~$\mathrm{Ent}$ simply the~\emph{entropy}. Here, we will point out the special role that the entropy plays in the study of the convergence to equilibrium. For further details, we refer to Markowich's and Villani's overview~\cite{MarkowichVillani2000}, where the authors connect convergence to equilibrium with various functional inequalities. \smallskip The entropy vanishes if~$u\equiv 1$, and therefore vanishes if~$\rho$ is in equilibrium. By the estimate~$x\log x \geq x-1$, the entropy is non-negative: \begin{equation*} \mathrm{Ent}(\rho|\gamma)\stackrel{\mathclap{\text{def}}}{=} \int_\mathbb{R}\frac{ \mathrm{d}\rho}{ \mathrm{d}\gamma} \log\left(\frac{ \mathrm{d}\rho}{ \mathrm{d}\gamma}\right)\, \mathrm{d}\gamma \geq \int_\mathbb{R}\left(\frac{ \mathrm{d}\rho}{ \mathrm{d}\gamma}-1\right)\, \mathrm{d}\gamma = 0. \end{equation*} Hence the equilibrium distribution~$\gamma$ indeed minimizes the entropy. For a solution~$\rho(t, \mathrm{d} x)$ of the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro}, let us see how the entropy evolves in time. A calculation involving integration by parts yields \begin{equation}\label{GF_NGF:eq:intro:diss-ent-is-fisher} \frac{ \mathrm{d}}{ \mathrm{d} t}\mathrm{Ent}(\rho|\gamma) = - \mathrm{I}(\rho|\gamma),\quad \text{where}\quad\mathrm{I}(\rho|\gamma):=\int_\mathbb{R} |\nabla (\log u)|^2\, \mathrm{d}\rho. \end{equation} The functional~$\mathrm{I}$ is non-negative and zero only if~$u$ is constant. Hence the entropy decreases in time unless~$\rho$ is in equilibrium. The functional~$\mathrm{I}$ is known as the Fisher information. In Chapter~4, we encounter the Fisher information as the exponential convergence rate of the empirical measure associated to~\eqref{GF_NGF:eq:Fokker-Planck-intro}. \smallskip Under suitable assumptions on the potential~$V$, we can be more precise about how fast the entropy decays. We say that the distribution~$\gamma=e^{-V}$ satisfies the logarithmic Sobolev inequality with a constant~$\lambda>0$ if \begin{equation}\label{GF_NGF:eq:intro:log-sobolev} \mathrm{Ent}(\rho|\gamma) \leq \frac{1}{2\lambda} \mathrm{I}(\rho|\gamma). \end{equation} If that inequality is satisfied, then \begin{equation*} \frac{ \mathrm{d}}{ \mathrm{d} t} \mathrm{Ent}(\rho|\gamma) \overset{\eqref{GF_NGF:eq:intro:diss-ent-is-fisher}}{=} -\mathrm{I}(\rho|\gamma) \overset{\eqref{GF_NGF:eq:intro:log-sobolev}}{\leq} -2\lambda \mathrm{Ent}(\rho|\gamma). \end{equation*} Hence by Gr\"{o}nwall's inequality, the entropy decays exponentially fast: \begin{equation}\label{GF_NGF:eq:intro:ent-decays-exp} \mathrm{Ent}(\rho(t,\cdot)|\gamma) \leq \mathrm{Ent}(\rho(0,\cdot)|\gamma) e^{-2\lambda t}. \end{equation} According to the estimate~\eqref{GF_NGF:eq:intro:ent-decays-exp}, the entropy is being dissipated under the time evolution of~\eqref{GF_NGF:eq:Fokker-Planck-intro} under two conditions. First, the initial distribution~$\rho(0,\cdot)$ must be non-singular with respect to equilibrium in the sense that the relative entropy is finite. Secondly, the logarithmic Sobolev inequality must be satisfied. The latter is satisfied for confining potentials (for instance~\cite[Theorem~1]{MarkowichVillani2000} and the discussion thereafter). Otto and Villani give geometric derivations of Talagrand- and logarithmic Sobolev inequalities in~\cite{OttoVillani2000}. \smallskip The above analysis demonstrates that for solutions~$\rho$ of the Fokker-Planck equation, the dissipation of entropy happens exponentially fast under fairly general conditions on the potential~$V$, and that the amount of dissipation is quantified by the Fisher information~\eqref{GF_NGF:eq:intro:diss-ent-is-fisher}. Jordan, Kinderlehrer and Otto revealed in~\cite{JordanKinderlehrerOtto1998} an exciting and deeper geometric connection between the entropy and the Fokker-Planck equation: the solution~$\rho$ flows in the direction of the Wasserstein gradient of the entropy. Their analysis leads to a variational structure that we will call a \emph{Wasserstein gradient flow}, and we shall discuss their insights next. \subsection{Gradient flow---a dissipation mechanism} \label{GF_NGF:sec:GF:diss-mech} As we saw above, solutions to the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro} evolve such that entropy decays exponentially fast. Here, we shall discuss the dissipation mechanism that Jordan, Kinderlehrer and Otto identified in~\cite{JordanKinderlehrerOtto1998}, in which the entropy plays the role of the energy being dissipated. Before we describe this dissipation mechanism for the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro}, we illustrate the central ingredients of a dissipation mechanism in a simpler context. \smallskip In the one-dimensional Euclidian setting, a gradient-flow is an equation of the type \begin{equation}\label{GF_NGF:eq:intro:basic-GF-in-R} \partial_t x = -\nabla\mathrm{E}(x),\qquad x(0)=x_0, \end{equation} where~$x:[0,T]\to\mathbb{R}$ is a sufficiently regular path,~$\mathrm{E}:\mathbb{R}\to\mathbb{R}$ is a confining potential that we refer to as an \emph{energy} and~$\nabla \mathrm{E}$ is the gradient of~$\mathrm{E}$, here the derivative. By confining we mean that~$E(x)\to\infty$ as~$|x|\to\infty$,~$\mathrm{E}\in C^2(\mathbb{R})$ and that its second derivative is uniformly bounded from below. We will write~$x(t)=x_t$ for the evaluation of the path~$x$ at time~$t$. \smallskip By definition of the gradient in 1d, in each time step the solution~$x$ to~\eqref{GF_NGF:eq:intro:basic-GF-in-R} follows the direction that dissipates as much energy as possible. As a result, as time tends to infinity, the solution converges to a local minimum of~$\mathrm{E}$. One way to understand this evolution is to start from a time-discretization. For an infinitesimal time-step~$\tau>0$, the backward Euler approximation to~\eqref{GF_NGF:eq:intro:basic-GF-in-R} is \begin{equation*} \frac{x(t+\tau)-x(t)}{\tau} + \nabla \mathrm{E}(x(t+\tau)) \approx 0, \end{equation*} which motivates the implicit Euler scheme: define the set of points~$\{x_k^\tau\}_{k=0,1,\dots}$ iteratively by~$x_0^\tau := x_0$ and \begin{equation}\label{GF_NGF:eq:intro:min-movement-1d-R} x_k^\tau := \mathrm{argmin}_{\substack{x}\in\mathbb{R}}\left[\frac{d(x,x_{k-1}^\tau)^2}{2\tau} + \mathrm{E}(x)\right],\qquad d(x,y) := |x-y|. \end{equation} The map~$d$ is just the standard Euclidian metric. We have the following convergence statement of this time-discretization: if both~$\tau\to 0$ and~$k\to\infty$ such that~$k\tau \to t$, then $x_k^\tau \to x(t)$, where~$x$ solves~\eqref{GF_NGF:eq:intro:basic-GF-in-R}. \smallskip In the formulation~\eqref{GF_NGF:eq:intro:min-movement-1d-R}, we can recognize a couple of aspects. First, in each time-step the solution~$x$ minimizes not merely the potential, but rather the combination of both the metric~$\mathrm{d}$ and the potential~$\mathrm{E}$. Secondly, we can also interpret the precise role of the metric. To that end, consider the step~$k\to k+1$ for a fixed and small value of~$\tau$. In the minimization procedure~\eqref{GF_NGF:eq:intro:min-movement-1d-R}, points far away from the starting point~$x_{k}^\tau$ are heavily punished since the metric is upscaled by~$\tau^{-1}$, whereas points close to~$x_k^\tau$ that decrease the value of~$\mathrm{E}$ are favored. In combination, roughly speaking, the faster the metric grows (the map $y\mapsto d(y,x_k^\tau)$), the less the energy will decrease in the step~$k\to k+1$. In this way, the metric determines how much energy is dissipated in each time step. \smallskip We therefore call~\eqref{GF_NGF:eq:intro:min-movement-1d-R} a \emph{dissipation meachanism} underlying the gradient flow equation~\eqref{GF_NGF:eq:intro:basic-GF-in-R}. In geometric terms, the potential and metric together determine the direction of movement while the metric controls the amount of dissipated energy per step. Let us summarize the players of the dissipation mechanism that leads to the gradient flow~\eqref{GF_NGF:eq:intro:basic-GF-in-R}: \begin{enumerate}[label=(\roman*)] \item A state space~$\mathrm{M}$; here~$\mathrm{M}=\mathbb{R}$. \item A map~$\mathrm{E}:\mathrm{M}\to\mathbb{R}$; here~$\mathrm{E}$ is a confining potential, which we call energy. \item A metric~$d:\mathrm{M}\times \mathrm{M}\to[0,\infty]$; here~$d$ is the standard Euclidian metric. \end{enumerate} Jordan, Kinderlehrer and Otto made the remarkable discovery~\cite{JordanKinderlehrerOtto1998} that the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro} admits a dissipation mechanism in which the Boltzmann entropy serves as the energy. They identified the corresponding distance as a transport cost that arises in the theory of optimal transport. The scheme they developed is made from the following three ingredients: \begin{enumerate}[label=(\roman*)] \item $\mathrm{M}:=\mathcal{P}_2(\mathbb{R})$, the set of probability measures with finite second moments. \item $\mathrm{E}:=\mathrm{Ent}(\cdot|\gamma):\mathrm{M}\to\mathbb{R}\cup\{+\infty\}$, the entropy defined as in~\eqref{GF_NGF:eq:intro:def-entropy} by \begin{equation}\label{GF_NGF:eq:JKO-scheme-relative-entropy} \mathrm{Ent}(\mu|\gamma) := \int_\mathbb{R} u\log u \, \mathrm{d} \gamma,\quad \text{with}\; u(x) := \frac{ \mathrm{d}\mu}{ \mathrm{d}\gamma}(x). \end{equation} If~$\mu$ is not absolutely continuous with respect to~$\gamma$, then~$\mathrm{Ent}(\mu|\gamma):=+\infty$. \item $d:=\mathcal{W}$, the Wasserstein metric defined by \begin{equation*} \mathcal{W}(\mu,\nu) := \inf_{m\in \Pi(\mu,\nu)}\int_{\mathbb{R}\times\mathbb{R}}|x-y|^2\,m( \mathrm{d} x \mathrm{d} y), \end{equation*} where~$\Pi(\mu,\nu)$ is the set of probability measures on~$\mathbb{R}\times\mathbb{R}$ whose first marginal equals~$\mu$ and whose second marginal equals~$\nu$. \end{enumerate} \smallskip The Wasserstein metric can be interpreted as the minimal cost required to transport a pile of sand distributed as~$\mu$ to a pile of sand distributed as~$\nu$, where the cost of transporting a sand grain from~$x$ to~$y$ is given by~$|x-y|^2$. For a thorough historical and mathematical overview of the topic of optimal transport we refer to Villani's monograph~\cite{Villani2008}. \smallskip The main result discovered by Jordan, Kinderlehrer and Otto is the following dissipation mechanism (\cite[Theorem~5.1]{JordanKinderlehrerOtto1998}). For an initial condition~$\rho_0\in \mathcal{P}_2(\mathbb{R})$ and fixed time-step~$\tau>0$, define~$\{\rho_k^\tau\}_{k=0,1,\dots}$ iteratively by \begin{equation}\label{GF_NGF:eq:intro:diss-mech-for-FP} \rho_k^\tau := \text{argmin}_{\mu\in \mathcal{P}_2(\mathbb{R})}\left[\frac{\mathcal{W}(\mu,\rho_{k-1}^\tau)^2}{2\tau}+\mathrm{Ent}(\mu|\gamma)\right]. \end{equation} Define the piecewise-constant path~$\rho^\tau$ by~$\rho^\tau(t):=\rho_k^\tau$ for~$t\in[k\tau,(k+1)\tau)$. Then we have~$\rho^\tau\to \rho$ strongly in~$L^1((0,T)\times\mathbb{R})$ as~$\tau\to 0$, where~$\rho$ is the solution to~\eqref{GF_NGF:eq:Fokker-Planck-intro} with initial condition~$\rho(0, \mathrm{d} x)=\rho_0( \mathrm{d} x)$. \smallskip This time-discretization scheme, also refered to as the JKO-scheme, is one way of making sense of the one-dimensional gradient flow~\eqref{GF_NGF:eq:intro:basic-GF-in-R} in infinite dimensions (with $\mathrm{M}=\mathcal{P}_2(\mathbb{R})$ instead of~$\mathrm{M}=\mathbb{R}$). On top of the fact that the entropy decays exponentially fast, the JKO-scheme reveals that solutions to the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro} flow along the \emph{steepest descent} of the entropy. The Wasserstein metric determines the amount of dissipated entropy per time-stepm just as the Euclidian metric determines the amount of dissipated energy in~\eqref{GF_NGF:eq:intro:min-movement-1d-R}. We say the solution~$\rho$ to the scheme~\eqref{GF_NGF:eq:intro:diss-mech-for-FP} is the solution to the \emph{Wasserstein gradient-flow}. Soon after, Otto further attached a precise geometrical meaning to a Wasserstein gradient-flow~\cite{Otto2001}. \smallskip Ambrosio, Gigli and Savaré generalize the formulation of gradient flows via a dissipation mechanism, such as~\eqref{GF_NGF:eq:intro:diss-mech-for-FP}, to arbitrary metric spaces~\cite[Chapter~2]{AmbrosioGigliSavare2008}. This generalization of~\eqref{GF_NGF:eq:intro:diss-mech-for-FP} is called a \emph{minimizing movement scheme}, \cite[Definition~2.0.6]{AmbrosioGigliSavare2008}. The main assumptions on the energy functional in order to obtain solutions to a minimizing movement scheme are suitable coercivity, lower-semicontinuity and compactness prtoperties. For the precise set of assumptions, we refer in particular to~\cite[Section~2.2]{AmbrosioGigliSavare2008}. \subsection{Gradient flow---a variational structure} \label{GF_NGF:sec:GF:var-struct} In the previous section, we discussed the minimizing movement scheme or JKO-scheme~\eqref{GF_NGF:eq:intro:diss-mech-for-FP}, a dissipation mechanism build up from a triple~$(\mathrm{M},\mathrm{E},d)$. The JKO-scheme represents one way of regarding the solution~$\rho$ to~\eqref{GF_NGF:eq:Fokker-Planck-intro} as a solution to a \emph{gradient flow}, since the limiting solution obtained from~\eqref{GF_NGF:eq:intro:diss-mech-for-FP} flows along the steepest descent of~$\mathrm{E}$. \smallskip While this formulation of a gradient flow in terms of discrete time steps is conceptually enlightening, it is not well suited for passing to limits in gradient flows. For instance, given a family of triples~$(\mathrm{M},\mathrm{E}_\varepsilon,d_\varepsilon)$, under which convergence conditions on the energies~$\mathrm{E}_\varepsilon$ and metrics~$d_\varepsilon$ will solutions to the~$(\mathrm{M},\mathrm{E}_\varepsilon,d_\varepsilon)$-scheme converge to solutions of a limiting scheme $(\mathrm{M},\mathrm{E}_0,d_0)$? To answer questions of that type for gradient flows and to simplify the treatment of convergence of gradient flows, we introduce in this section a different but formally equivalent formulation of a gradient-flow. This formulation is known as the \emph{energy-dissipation principle}, and defines a gradient flow in terms of a functional. As in the previous section, we first illustrate the formulation on the example of the real-valued gradient flow~\eqref{GF_NGF:eq:intro:basic-GF-in-R}. Then we turn to the Wasserstein gradient flow of the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro}. \subsubsection{Example illustrating the energy-dissipation principle} Recall that~\eqref{GF_NGF:eq:intro:basic-GF-in-R} is the equation~$\partial_t x = -\nabla\mathrm{E}(x)$ on~$\mathbb{R}$. For any~$a,b\in\mathbb{R}$, if~$2ab\leq -a^2-b^2$, then $a=-b$. Hence a path~$x$ solves~\eqref{GF_NGF:eq:intro:basic-GF-in-R} if and only if \begin{equation}\label{GF_NGF:eq:GF:Young-bound-GF-on-R} \partial_tx \cdot \nabla E(x) \leq -\frac{1}{2}|\partial_t x|^2 - \frac{1}{2}|\nabla E(x)|^2. \end{equation} By the chain rule,~$\partial_t\mathrm{E}(x)=\nabla\mathrm{E}(x)\partial_t x$. Hence performing integration in time, the solution~$x$ to~\eqref{GF_NGF:eq:intro:basic-GF-in-R} satisfies the inequality \begin{equation*} E(x_T) + D(x;0,T) \leq \mathrm{E}(x_0),\quad \end{equation*} where we introduced the \emph{dissipation} \begin{equation}\label{GF_NGF:eq:GF:dissipation-euclidian-example} D(x;0,T):=\int_0^T\left[\frac{1}{2} |\partial_t x|^2+ \frac{1}{2}|\nabla E(x)|^2\right] \mathrm{d} t. \end{equation} For an absolutely continuous path~$y:[0,T]\to\mathbb{R}$, \begin{equation*} \mathcal{I}(y) := \mathrm{E}(y_T)-\mathrm{E}(y_0) + D(y;0,T). \end{equation*} The map~$y\mapsto\mathcal{I}(y)$ carries two important features. First, it is non-negative for \emph{any} path~$y$. This follows from the chain rule and the estimate~$2ab \geq -a^2-b^2$, \begin{equation*} E(y_T)-E(y_0) = \int_0^T\partial_t y\cdot \nabla E(y)\, \mathrm{d} t \geq \int_0^T\left[-\frac{1}{2}|\partial_t y|^2 - \frac{1}{2}|\nabla E(y)|^2\right] \mathrm{d} t. \end{equation*} Secondly,~$\mathcal{I}(y)$ vanishes if and only if~$y=x$ is a solution to the gradient flow~$\partial_tx=-\nabla\mathrm{E}(x)$, which follows from the bound~\eqref{GF_NGF:eq:GF:Young-bound-GF-on-R} for~$y$. \smallskip Since~$\mathcal{I}$ is non-negative and zero only for the solution, we can reformulate the solution of a gradient-flow as \begin{equation*} \partial_tx=-\nabla\mathrm{E}(x) \quad\Leftrightarrow\quad \mathrm{E}(x_T)+D(x)\leq E(x_0)\quad\Leftrightarrow\quad \mathcal{I}(x) = 0. \end{equation*} The map~$\mathcal{I}$ is an example of a gradient-flow structure. The reformulation in terms of a dissipation~$\mathrm{D}(\cdot)$ by integrating the infinitesimal gradient-flow in time is an example of Ennio De Giorgi's \emph{Energy-Dissipation-Principle}. This connection between solutions to gradient flows is also refered to as the \emph{Energy-Dissipation Theorem}, which holds in much more generality than presented here. \subsubsection{Energy-Dissipation Principle} Motivated by the previous example, we will consider the following formulation of a gradient flow, which corresponds to~\cite[Definition~1.1]{ArnrichMielkePeletierSavareVeneroni2012}. \begin{definition}[Gradient flow]\label{GF_NGF:def:GF} Let~$\mathrm{M}$ be a metric space,~$\mathrm{E}:\mathrm{M}\to\mathbb{R}\cup\{+\infty\}$ be a function and~$\mathrm{D}(\cdot;t_1,t_2):C([0,T];\mathrm{M})\to\mathbb{R}\cup\{+\infty\}$ be a functional defined for all~$0\leq t_1<t_2\leq T$. We call the triple~$(\mathrm{M},\mathrm{E},\mathrm{D})$ a \emph{gradient-flow structure} if for any~$\mu\in C([0,T];\mathrm{M})$ and all~$t_1<t_2$, the inequality \begin{equation}\label{GF_NGF:eq:def:GF} \mathrm{E}(\mu_{t_2}) + D(\mu;t_1,t_2) \geq E(\mu_{t_1}) \end{equation} is satisfied.\qed \end{definition} We call~$\mathrm{E}$ the \emph{energy} and~$\mathrm{D}$ the \emph{dissipation}. \begin{definition}[Solution to gradient flow]\label{GF_NGF:def:sol-to-GF} We call a curve~$\mu \in C([0,T];\mathrm{M})$ a solution to the gradient-flow structure~$(\mathrm{M},\mathrm{E},\mathrm{D})$ if~$\mathrm{E}(\mu_0)<\infty$ and \begin{equation}\label{GF_NGF:eq:def:GF-solution} \mathrm{E}(\mu_t) + \mathrm{D}(\mu;0,t) = \mathrm{E}(\mu_0)\qquad \text{for all } t\in [0,T]. \end{equation} \qed \end{definition} A solution to the gradient flow is defined by maximizing the dissipation of energy; hence the equality~\eqref{GF_NGF:eq:def:GF-solution}, which in the classical case corresponds by~\eqref{GF_NGF:eq:GF:Young-bound-GF-on-R} to curves of maximal slope. This equality is the \emph{Energy-Dissipation Principle}. \smallskip There are various ways in which the dissipation~$\mathrm{D}$ may depend on the energy~$\mathrm{E}$. In the definition of a gradient flow, the inequality~\eqref{GF_NGF:eq:def:GF} plays the role of replacing the chain rule. In the Euclidian example from above, this inequality holds true as a consequence of two aspects: the dissipation is related to the energy by~\eqref{GF_NGF:eq:GF:dissipation-euclidian-example} and the chain rule applies in~$\mathbb{R}$. On the other hand, the gradient flow~$\partial_tx=-\nabla\mathrm{E}(x)$ is recovered from~\eqref{GF_NGF:eq:def:GF-solution} via the fact that~$2ab\leq -a^2-b^2$ implies $a=-b$. In general, the formulation of a gradient-flow solution via Definition~\ref{GF_NGF:def:sol-to-GF} is equivalent if the dissipation is given via so-called dissipation potentials~$\mathcal{R}$-$\mathcal{R}^\ast$ (~\cite[Theorem~3.3.1]{Mielke2016}). \smallskip The Wasserstein gradient flow of~\eqref{GF_NGF:eq:Fokker-Planck-intro} however can be well-motivated from the quadratic structure as in~\eqref{GF_NGF:eq:GF:dissipation-euclidian-example}. We give an example based on generalizing the modulus of the gradient~$|\nabla\mathrm{E}|$ and the velocity~$|\partial_tx|$. To that end, let~$(\mathrm{M},\mathrm{E},\mathrm{D})$ be a triple as in Definition~\ref{GF_NGF:def:GF}. The local slope of the functional~$\mathrm{E}:\mathrm{M}\to\mathbb{R}\cup\{+\infty\}$ is defined by (\cite[Definition~1.2.4]{AmbrosioGigliSavare2008}) \begin{equation*} |\partial\mathrm{E}|(\mu) := \limsup_{\nu\to\mu}\frac{(\mathrm{E}(\mu)-\mathrm{E}(\nu))_+}{d(\mu,\nu)}. \end{equation*} For an absolutely-continuous curve $\mu:[0,T]\to\mathrm{M}$, define its metric velocity as (\cite[Eq.~(1.1.3)]{AmbrosioGigliSavare2008}) \begin{equation*} |\partial_t\mu|(t) := \lim_{\Delta t\to 0}\frac{d(\mu(t),\mu(t+\Delta t))}{\Delta t}. \end{equation*} We consider the dissipation to be given by \begin{equation}\label{GF_NGF:eq:intro:def-of-dissipation} \mathrm{D}(\mu,t_1,t_2) := \int_{t_1}^{t_2}\left[\frac{1}{2}|\partial_t\mu|(t)^2 + \frac{1}{2}|\partial\mathrm{E}|(\mu_t)^2\right]\, \mathrm{d} t. \end{equation} Assume that~$|\partial\mathrm{E}|$ is a \emph{strong upper gradient} (\cite[Definition~1.2.1]{AmbrosioGigliSavare2008}), meaning \begin{equation*} |\mathrm{E}(\gamma_{t_2})-\mathrm{E}(\gamma_{t_1})| \leq \int_{t_1}^{t_2} |\partial_t \gamma|(t)\cdot |\partial\mathrm{E}|(\gamma_t)\, \mathrm{d} t \end{equation*} holds for every absolutely-continuous curve~$\gamma:[0,T]\to\mathrm{M}$. Then by Young's inequality, \begin{equation*} \mathrm{E}(\gamma_{t_1})-\mathrm{E}(\gamma_{t_2}) \leq \int_{t_1}^{t_2} \left[\frac{1}{2}|\partial_t \gamma|(t)^2 + \frac{1}{2}|\partial\mathrm{E}|(\gamma_t)^2\right]\, \mathrm{d} t \overset{\eqref{GF_NGF:eq:intro:def-of-dissipation}}{=} \mathrm{D}(\gamma,t_1,t_2). \end{equation*} Hence if the local slope of the energy functional~$\mathrm{E}$ is a strong upper gradient, then the triple~$(\mathrm{M},\mathrm{E},\mathrm{D})$ is indeed a gradient-flow structure in the sense of Definition~\ref{GF_NGF:def:GF}. \subsubsection{Wasserstein gradient flow} As the JKO-scheme suggests, we choose the state space~$\mathrm{M}=\mathcal{P}_2(\mathbb{R})$ equiped with the Wasserstein metric and $\mathrm{E}(\mu):=\mathrm{Ent}(\mu|\gamma)$, the relative entropy as defined in~\eqref{GF_NGF:eq:JKO-scheme-relative-entropy} with the equilbirum distribution~$\gamma=e^{-V}$. We take the dissipation~$\mathrm{D}$ defined by~\eqref{GF_NGF:eq:intro:def-of-dissipation}. To complete the description, we give the characterization of the relative entropy's local slope and the Wasserstein velocity~$|\partial_t\mu|(t)$. \smallskip The local slope of the relative entropy is the relative Fisher information \cite[Theorem~10.4.7]{AmbrosioGigliSavare2008} given by \begin{equation*} \mathrm{I}(\mu|\gamma) = \int_\mathbb{R}|\nabla \log u|^2\, \mathrm{d}\mu,\qquad u(x) := \frac{ \mathrm{d}\mu}{ \mathrm{d}\gamma}(x). \end{equation*} The Wasserstein velocity is characterized by a particular velocity field~$v(t,x)$ satisfying~$\partial_t\mu_t+\mathrm{div}(v_t\mu_t)=0$ in the sense of distributions, as (\cite[Proposition~8.4.5]{AmbrosioGigliSavare2008}) \begin{equation*} |\partial_t \mu|(t)^2 = \int_\mathbb{R}|v(t,x)|^2\,\mu(t, \mathrm{d} x). \end{equation*} This characterization is closely related to the dynamical formulation of the Wasserstein distance discovered by Benamou and Brenier~\cite{BenamouBrenier2000}, \begin{equation*} \mathcal{W}(\mu_0,\mu_1)^2 = \inf_{\mu_t}\left\{\int_0^1\int_\mathbb{R}|v(t,x)|^2\,\mu_t( \mathrm{d} x)dt\,:\,\partial_t\mu_t+\mathrm{div}(v_t\mu_t)=0\right\}\, \end{equation*} where~$v(t,x)=v_t(x)$. With these remarks, we find the dissipation~$\mathrm{D}$ \begin{equation}\label{GF_NGF:eq:wasserstein-dissipation} \mathrm{D}(\mu;t_{1},t_{2}) = \int_{t_1}^{t_2}\left[\frac{1}{2}\int_\mathbb{R}|v(t,x)|^2\mu(t, \mathrm{d} x) + \frac{1}{2}\mathrm{I}(\mu_t|\gamma)\right]\, \mathrm{d} t. \end{equation} \begin{definition}[Wasserstein gradient flow]\label{GF_NGF:def:wassterstein-GF} Let~$\mathrm{M}:=\mathcal{P}_2(\mathbb{R})$, the set of probability measures on~$\mathbb{R}$ with finite second moments. Let~$\mathcal{A}:C([0,T];\mathrm{M})\to[0,\infty]$ be the map given by \begin{equation}\label{GF_NGF:non-eps-Wasserstein-action} \mathcal{A}(\rho) := \mathrm{Ent}(\rho_T|\gamma)-\mathrm{Ent}(\rho_0|\gamma) + \mathrm{D}(\rho;0,T), \end{equation} with the relative entropy~\eqref{GF_NGF:eq:JKO-scheme-relative-entropy} and the dissipation~\eqref{GF_NGF:eq:wasserstein-dissipation}. We call~$\mathcal{A}$ the \emph{Wasserstein action functional} corresponding to the \emph{Wasserstein gradient-flow structure} given by~$(\mathcal{P}_2(\mathbb{R}),\mathrm{Ent},\mathcal{W})$. The curve~$\rho$ satisfying~$\mathcal{A}(\rho)=0$ is called the solution to the Wasserstein gradient flow.\qed \end{definition} The minimizer of~$\mathcal{A}$ is also the solution to the JKO-scheme~\cite[Theorem~11.2.1]{AmbrosioGigliSavare2008}, and hence the solution to the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro}. The solution~$\rho$ satisfies the energy-dissipation equality (e.g.~\cite[Eq.~(11.2.4)]{AmbrosioGigliSavare2008}) \begin{equation*} \mathrm{Ent}(\rho_T|\gamma)+\int_0^T\mathrm{I}(\rho_t|\gamma)\, \mathrm{d} t=\mathrm{Ent}(\rho_0|\gamma), \end{equation*} which is also obtained by integrating~\eqref{GF_NGF:eq:intro:diss-ent-is-fisher} in time. \subsubsection{The $\mathcal{R}$-$\mathcal{R}^\ast$ formulation} The quadratic structure of the dissipation~\eqref{GF_NGF:eq:intro:def-of-dissipation} is an example of a more general structure of grandient flows. We introduce this more general structure here. In the~$\mathcal{R}$-$\mathcal{R}^\ast$ formulation, generalized gradient-flow structures in a smooth setting arise from a combination of the following three ingredients: \begin{enumerate}[label=(\roman*)] \item A \emph{state space}~$\mathrm{M}$, which is a set with a sufficiently rich differentiable structure that gives gradients a meaning, such as Riemannian manifolds. \item A function~$\mathrm{E}:\mathrm{M}\to\mathbb{R}$, the \emph{energy}. \item A function~$\mathcal{R}:T\mathrm{M}\to[0,\infty]$, which we call \emph{dissipation potential}., such that for each state~$x\in \mathrm{M}$: \begin{enumerate}[label=($\mathcal{R}$\arabic*)] \item $\mathcal{R}(x,\cdot):T_x\mathrm{M}\to[0,\infty]$ is convex and lower semicontinuous. \item $\mathcal{R}(x,0) = \min_{v\in T_x\mathrm{M}}\mathcal{R}(x,v) = 0$. \end{enumerate} \end{enumerate} We denote by~$\mathcal{R}^\ast:T^\ast \mathrm{M}\to[0,\infty]$ the Legendre transform of~$\mathcal{R}$ defined by \begin{equation*} \mathcal{R}^\ast(x,\xi) := \sup_{v\in T_q\mathrm{M}}\left[\ip{\xi}{v} - \mathcal{R}(x,v)\right], \end{equation*} For an energy~$\mathrm{E}:\mathrm{M}\to\mathbb{R}$, we denote by~$\mathrm{d}\mathrm{E}$ its differential, that is the map \begin{equation*} \mathrm{d}\mathrm{E}:\mathrm{M}\to T^\ast \mathrm{M}, \quad x\mapsto \mathrm{d}\mathrm{E}_x \in T_x^\ast \mathrm{M}. \end{equation*} A functional~$\mathcal{I}$ acting on trajectories~$C([0,T];\mathrm{M})$ is of \emph{gradient-flow structure} if \begin{equation}\label{GF_NGF:eq:action-of-R-R_star-functional} \mathcal{I}(x) = \mathrm{E}(x_T)-\mathrm{E}(x_0) + \int_0^T \left[\mathcal{R}\left(x_t,\partial_t{x}_t\right)+\mathcal{R}^\ast\left(x_t,-\mathrm{d}\mathrm{E}(x_t)\right)\right]dt. \end{equation} The dissipation~\eqref{GF_NGF:eq:GF:dissipation-euclidian-example} from above corresponds to the flat space~$\mathbb{R}$, where~$ \mathrm{d}\mathrm{E}$ gets identified with~$\nabla\mathrm{E}$, and with the quadratic dissipation potentials \begin{equation*} \mathcal{R}(x,v) = \frac{1}{2}v^2\quad\text{and}\quad \mathcal{R}^\ast(x,\xi) = \frac{1}{2}\xi^2. \end{equation*} Typical examples where the~$\mathcal{R}$-$\mathcal{R}^\ast$ dissipation occurs are large-deviation rate functions of jump processes. The limit problem of this chapter is an example: if the potential~$V$ in~\eqref{GF_NGF:eq:intro:upscaled-FP} is symmetric, then our limit variational structure admits an~$\mathcal{R}$-$\mathcal{R}^\ast$ formulation with a $\cosh$-type dissipation potential~$\mathcal{R}$; however, we show there is no such formulation for \emph{asymmetric} potentials (Section~\ref{GF_NGF:sec:why-limit-is-not-GF}). In infinite-dimensional settings such as in our pre-limit problem, a careful definition of the tangent and cotangent spaces~\cite[Section~12.4]{AmbrosioGigliSavare2008} is required to make the above display~\eqref{GF_NGF:eq:action-of-R-R_star-functional} rigorous. \subsection{Taking limits of gradient-flow structures} There are many variants of taking limits of gradient flows. Mielke provides several different definitions of types of convergences in~\cite{Mielke2016}. The natural concept of a gradient-flow convergence is to demand both the energies and dissipations to converge separately. Sandier and Serfaty introduced this concept in~\cite{SandierSerfaty2004}, which since then has found applications in a variety of other problems. This convergence concept is also applied in~\cite{ArnrichMielkePeletierSavareVeneroni2012}, and we introduce it next. For~$\rho_n, \rho\in C([0,T],\mathrm{M})$, we say~$\rho_n\to\rho$ if the convergence is uniform in time. \begin{definition}[EDP convergence]\label{GF_NGF:def:EDP-convergence} Let~$(\mathrm{M},\mathrm{E}_\varepsilon,\mathrm{D}_\varepsilon)$ be a family of gradient-flow structures in the sense of Definition~\ref{GF_NGF:def:GF}. We say that~$(\mathrm{M},\mathrm{E}_\varepsilon,\mathrm{D}_\varepsilon)$ converges in the \emph{EDP sense} to a gradient-flow structure~$(\mathrm{M},\mathrm{E}_0,\mathrm{D}_0)$ if: \begin{enumerate}[label=(\roman*)] \item $\mathrm{E}_\varepsilon\xrightarrow{\Gamma}\mathrm{E}_0$ in~$\mathrm{M}$; \item For each~$t\in[0,T]$, $\mathrm{D}_\varepsilon\xrightarrow{\Gamma}\mathrm{D}_0$ in~$C([0,T];\mathrm{M})$.\qed \end{enumerate} \end{definition} EDP convergence implies convergence of solutions (e.g.~\cite[Lemma~2.8]{MielkeMontefuscoPeletier2020}). \begin{proposition}\label{GF_NGF:prop:simple-EDP-convergence} Assume that a family of gradient-flow structures~$(\mathrm{M},\mathrm{E}_\varepsilon,\mathrm{D}_\varepsilon)$ converges in the EDP sense to a gradient-flow structure~$(\mathrm{M},\mathrm{E}_0,\mathrm{D}_0)$. Let~$\rho_\varepsilon$ be the solutions of~$(\mathrm{M},\mathrm{E}_\varepsilon,\mathrm{D}_\varepsilon)$. Suppose that \begin{equation*} \rho_\varepsilon\to\rho_0 \;\text{in}\; C([0,T];\mathrm{M})\quad\text{and}\quad \mathrm{E}_\varepsilon(\rho_\varepsilon(0)) \to \mathrm{E}_0(\rho_0(0)). \end{equation*} Then~$\rho_0$ is a solution of~$(\mathrm{M},\mathrm{E}_0,\mathrm{D}_0)$. \end{proposition} \begin{proof} By the assumption of~$\Gamma$-convergences, exploiting~$\rho_\varepsilon\to \rho$ gives \begin{multline*} \mathrm{E}_0(\rho_0(T))-\mathrm{E}_0(\rho_0(0)) + \mathrm{D}_0(\rho_0;0,T) \\\leq \liminf_{\varepsilon\to 0}\left[ \mathrm{E}_\varepsilon(\rho_\varepsilon(T))-\mathrm{E}_\varepsilon(\rho_\varepsilon(0)) + \mathrm{D}_\varepsilon(\rho_\varepsilon;0,T)\right] = 0. \end{multline*} The other inequality is satisfied by Definition~\ref{GF_NGF:def:GF}, and hence~$\rho_0$ is a solution in the sense of Definition~\ref{GF_NGF:def:sol-to-GF}. \end{proof} EDP convergence is therefore a suitable limit concept in problems where the energies remain bounded in the limit~$\varepsilon\to 0$. In~\cite{ArnrichMielkePeletierSavareVeneroni2012}, the authors proof boundedness of the entropies for the case of a symmetric potential~$V$. As a consequence of their~$\Gamma$-convergence result, one obtains by Proposition~\ref{GF_NGF:prop:simple-EDP-convergence} convergence of solutions for free. For the asymmetric case we consider in this chapter, boundedness of the entropies is no longer satisfied (Section~\ref{GF_NGF:sec:why-GF-not-converge}). \section{Flux-density functionals} \label{GF_NGF:sec:flux-density-functionals} The main point of this section is to give the rigorous definitions of the flux-density functionals (Definitions~\ref{GF_NGF:def:pre-limit-RF} and~\ref{GF_NGF:def:limit-RF}). We first demonstrate why the Wasserstein gradient-flow functionals do not converge as in~\cite{ArnrichMielkePeletierSavareVeneroni2012}, which motivates our choice of working with flux-density functionals in the first place. \subsection{Why the gradient-flow structure does not converge} \label{GF_NGF:sec:why-GF-not-converge} By Definition~\ref{GF_NGF:def:wassterstein-GF}, the action functional defining the Wasserstein gradient-flow structure of the Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP} is \begin{equation}\label{GF_NGF:epsilon-Wasserstein-GF-action} \mathcal{A}_\varepsilon(\rho) = \mathrm{Ent}(\rho(T)|\gamma_\varepsilon) -\mathrm{Ent}(\rho(0)|\gamma_\varepsilon) + \mathrm{D}_\varepsilon(\rho;0,T), \end{equation} where the time-scale parameter~$\tau_\varepsilon$ enters the dissipation~$\mathrm{D}_\varepsilon$ as in~\cite{ArnrichMielkePeletierSavareVeneroni2012}; the dissipation part is not important for our argument however. The equilibrium distribution~$\gamma_\varepsilon$ has mass one and is given by \begin{equation*} \gamma_\varepsilon( \mathrm{d} x) = \mathcal{N}_\varepsilon^{-1}e^{-V(x)/\varepsilon}\, \mathrm{d} x,\quad \mathcal{N}_\varepsilon := \int_\mathbb{R} e^{-V(x)/\varepsilon}\, \mathrm{d} x. \end{equation*} In the limit~$\varepsilon\to 0$, the equilibrium distribution concentrates solely on the global minimum~$x_b$ of the potential~$V$, that is~$\gamma_\varepsilon$ converges weakly to $\delta_{x_b}$. For proving EDP convergence (Definition~\ref{GF_NGF:def:EDP-convergence}), we have to verify that the energies and dissipations converge independently from one another. \begin{proposition}[Diverging entropies]\label{GF_NGF:prop:diverging-entropies} Let~$\gamma_\varepsilon$ be the equilibrium distribution to the Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP} and let~$\mu_\varepsilon\in\mathcal{P}(\mathbb{R})$ be a family of probability measures converging weakly to~$\mu_0$. Suppose that~$\mu_0\neq \delta_{x_b}$. Then \begin{equation*} \mathrm{Ent}(\mu_\varepsilon|\gamma_\varepsilon) \to +\infty. \end{equation*} \end{proposition} \begin{proof} This follows from the fact that~$\gamma_\varepsilon\xrightharpoonup{\ast} \delta_{x_b}$ and~$\mathrm{Ent}(\mu_0|\delta_{x_b})=+\infty$. \end{proof} Let us demonstrate why this excludes the possibility of proving EDP convergence of the Wasserstein gradient flow of~\eqref{GF_NGF:eq:intro:upscaled-FP}. A EDP convergence requires the entropies of the initial conditions to converge to some \emph{finite} limiting energy functional~$\mathrm{E}_0$, \begin{equation*} \mathrm{Ent}(\rho_\varepsilon(0)|\gamma_\varepsilon) \to \mathrm{E}_0(\rho_0(0)). \end{equation*} By Proposition~\ref{GF_NGF:prop:diverging-entropies}, any initial condition that is not concentrating on~$\{x_b\}$ leads to diverging relative entropies. Therefore, if we insist on finite entropies in the limit, the only initial conditions we could consider are those converging to equilibrium in the limit~$\varepsilon\to 0$, meaning only the initial condition~$\delta_{x_b}$. Since this excludes any dynamics in the limit~$\varepsilon\to 0$, we do not work with~$\mathcal{A}_\varepsilon$. \smallskip While we can not use the Wasserstein action~\eqref{GF_NGF:epsilon-Wasserstein-GF-action}, the density-flux functional~$\mathcal{I}_\varepsilon$ from~\eqref{GF_NGF:eq:level-2p5-rate-function} provides a natural way to cope with this divergence of entropies by including them into the dissipation. We sketch this observation. To that end, consider the density-flux functional without the $\varepsilon$-dependent parameters, \begin{equation*} \mathcal{I}(\rho,j) =\frac{1}{4}\int\frac{1}{\rho}|j-j^\rho|^2\, \mathrm{d} x \mathrm{d} t, \end{equation*} where~$\partial_t\rho +\mathrm{div}\,j=0$ and~$J^\rho=-\nabla\rho + \rho\nabla V$. Expanding the square leads to \begin{equation*} \mathcal{I}(\rho,j) = \frac{1}{4}\left[\int \left(\frac{ \mathrm{d} j}{ \mathrm{d}\rho}\right)^2\, \mathrm{d}\rho +\int \left(\frac{ \mathrm{d} J^\rho}{ \mathrm{d}\rho}\right)^2\, \mathrm{d}\rho - 2 \int \frac{ \mathrm{d} j}{ \mathrm{d}\rho}\frac{ \mathrm{d} J^\rho}{ \mathrm{d}\rho}\, \mathrm{d}\rho\right]. \end{equation*} Using~$J^\rho = -\rho \nabla \log (\rho/e^{-V})=-\rho\nabla (\log u)$, and hence~$ \mathrm{d} J^\rho/ \mathrm{d}\rho = -\nabla\log(u)$, we find the second term to be the Fisher information in the dissipation~$\mathrm{D}$ from~\eqref{GF_NGF:eq:wasserstein-dissipation}. For the cross term, integrating by parts and using~$\partial_t\rho + \mathrm{div}\,j=0$, \begin{align*} -\int \frac{ \mathrm{d} j}{ \mathrm{d}\rho}\frac{ \mathrm{d} J^\rho}{ \mathrm{d}\rho}\, \mathrm{d}\rho &= \int(\nabla\log u)\, \mathrm{d} j\\ &= - \int \log (u) \,\mathrm{div}\,j \, \mathrm{d} x \mathrm{d} t\\ &= \int \log(u) \,\partial_t\rho = \int \partial_t u \log(u)\, \mathrm{d}\gamma \mathrm{d} t \\ &= \int_0^T \partial_t \left(\int_\mathbb{R} u\log u\, \mathrm{d} x\right) \, \mathrm{d} t + 0, \end{align*} which leads to the entropy terms. Hence taking the infimum over fluxes~$j$ satisfying the continuity equation and such that~$j\ll \rho$, and using the Benamou-Brenier characterization of the Wasserstein distance, we find back the Wasserstein functional~\eqref{GF_NGF:non-eps-Wasserstein-action}, \begin{equation*} \inf_j \mathcal{I}(\rho,j) = \frac{1}{2}\mathcal{A}(\rho). \end{equation*} \subsection{Stationary measure and coordinate transformation} \label{GF_NGF:sec:cooridnate-transformation} We introduce in Definition~\ref{GF_NGF:def:left-normalized-stationary-measure} stationary measures that are not normalized to mass one on~$\mathbb{R}$. Rather, they are normalized to mass one when integrating from~$-\infty$ to the local maximum~$x_0$ of~$V$. We call these measures \emph{left-normalized stationary measures}. The normalization is chosen in order to capture the transitions from left to right, which are or order one. We use the superscript~$\ell$ to distinguish objects that are derived from this choice of normalization. \begin{definition}[Left-normalized stationary measure]\label{GF_NGF:def:left-normalized-stationary-measure} For a potential $V$ as in Figure~\ref{GF_NGF:fig:asymmetric-doublewell-potential}, define the left-normalized stationary measure $\gamma_\varepsilon^\ell \in \mathcal{M}(\mathbb{R})$ by \begin{equation*} \gamma_\varepsilon^\ell(A) := Z_\varepsilon^{-1} \int_A e^{-V(x)/\varepsilon}\,dx, \quad Z_\varepsilon^{-1} := \int_{-\infty}^{x_0} e^{-V(x)/\varepsilon}\, dx. \end{equation*} \end{definition} With this left-normalization, these measures concentrate in the limit~$\varepsilon\to 0$ on the potential wells, that is the set $\{V\leq 0\}$. \begin{proposition}[Concentration of measure] \label{prop:GF_NGF:left-normalized-stationary-measure} For any~$\delta > 0$, \begin{equation*} \lim_{\varepsilon\to 0}\gamma_\varepsilon^\ell(\{V>\delta\}) = 0. \end{equation*} \end{proposition} \begin{proof}[Proof of Proposition~\ref{prop:GF_NGF:left-normalized-stationary-measure}] Let~$\delta > 0$. For any finite $M > \delta$, we find \begin{align*} \gamma_\varepsilon^\ell\left(\left\{M > V \geq \delta\right\}\right) &= Z_\varepsilon^{-1} \int_{\left\{M > V \geq \delta\right\}} e^{-V(x)/\varepsilon}\,dx \\ &\leq Z_\varepsilon^{-1}\, e^{-\delta/\varepsilon}\, \mathcal{L}\left(\left\{M > V \geq \delta\right\}\right) \xrightarrow{\varepsilon\to 0}0, \end{align*} since $V(x_a) = 0$ and $Z_\varepsilon=[1+o(1)] \sqrt{2\pi\varepsilon/V''(x_a)} e^{-V(x_a)/\varepsilon}$, which follows from Laplace's method (Lemma~\ref{lemma:watson}). \smallskip Since $V(x) \to \infty$ as $|x| \to \infty$, there is a sequence $M_n \to \infty$ such that the sets $A_n := \left\{V \geq M_n\right\}$ are decreasing in $n$ in the sense that $A_{n+1}\subseteq A_n$. By finiteness of the measure~$\gamma_\varepsilon^\ell$, this implies % \begin{equation*} \lim_{n \to\infty} \gamma_\varepsilon^\ell(A_n) = \gamma_\varepsilon^\ell\left(\cap_{n} A_n \right) = 0. \end{equation*} Let $\kappa > 0$. Since \begin{equation*} \gamma_\varepsilon^\ell\left(\left\{V \geq \delta\right\}\right) = \gamma_\varepsilon^\ell\left(\left\{V\geq M_n\right\}\right) + \gamma_\varepsilon^\ell\left(\left\{M_n > V \geq \delta\right\}\right), \end{equation*} when choosing $n$ large enough such that $\gamma_\varepsilon^\ell(A_n) < \kappa/2$, then for all $\varepsilon$ small enough such that $\gamma_\varepsilon^\ell\left(\left\{M_n > V \geq \delta\right\}\right) < \kappa/2$, we obtain the estimate \[ \gamma_\varepsilon^\ell\left(\left\{V \geq \delta\right\}\right) < \kappa. \] Since~$\kappa$ is arbitrary, the claim follows. \end{proof} With these stationary measures at hand, we now motivate the coordinate transformation~$y_\varepsilon$. To that end, we start from the flux-density rate function (\cite[Eq.~(1.3)]{BertiniDeSoleGabrielliJonaLasinioLandim2015}) specialized to the Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP}, \begin{equation*} \mathcal{I}_\varepsilon(\rho,j) := \frac{1}{4} \int_0^T\int_\mathbb{R} \frac{1}{\varepsilon \tau_\varepsilon} \frac{1}{\rho(t,x)} \big|j(t,x) -j_\varepsilon^\rho(t,x)\big|^2\, \mathrm{d} x \mathrm{d} t, \end{equation*} where $j_\varepsilon^\rho(t,x) := -\tau_\varepsilon\left[\varepsilon \nabla \rho + \rho \nabla V\right]$. This formula suggests that we should consider measures~$\rho(t, \mathrm{d} x)$ that have a Lebesgue density. Then~$\rho$ also has a density with respect to the left-normalized stationary measure, and we write $\rho(t, \mathrm{d} x) = u_\varepsilon^\ell(t,x)\gamma_\varepsilon^\ell( \mathrm{d} x) = u_\varepsilon^\ell(t,x)g_\varepsilon^\ell(x) \mathrm{d} x$ with $g_\varepsilon^\ell(x)=Z_\varepsilon^{-1}e^{-V(x)/\varepsilon}$. With that, the flux-density rate function can be written as \begin{equation*} \mathcal{I}_\varepsilon(\rho,j) = \frac{1}{4} \int_0^T\int_\mathbb{R} \frac{1}{\varepsilon\tau_\varepsilon} \frac{1}{g_\varepsilon^\ell(x) u_\varepsilon^\ell(t,x)}\big| j(t,x) + \varepsilon\,\tau_\varepsilon\, g_\varepsilon^\ell(x) \partial_x u_\varepsilon^\ell(t,x)\big|^2\, \mathrm{d} x \mathrm{d} t. \end{equation*} The transformation is chosen such that the parameters~$\varepsilon$ and~$\tau_\varepsilon$ are shifted to the densities and do not appear explicitly in the flux-density functional. This suggests to introduce the coordinate transformation~$y_\varepsilon$ on~$\mathbb{R}$ satisfying \begin{equation*} \mathrm{d} y_\varepsilon(x) = \frac{1}{\varepsilon\, \tau_\varepsilon\, g_\varepsilon^\ell(x)} \, \mathrm{d} x. \end{equation*} Then with $\hat{u}_\varepsilon^\ell(t,y_\varepsilon(x)) := u_\varepsilon^\ell(t,x)$ and $\hat{\jmath}_\varepsilon(t,y_\varepsilon(x)) := j(t,x)$, we obtain \begin{equation*} \mathcal{I}_\varepsilon(\rho,j) = \frac{1}{4}\int_0^T\int_\mathbb{R} \frac{1}{\hat{u}_\varepsilon^\ell(t,y)}\big|\hat{\jmath}_\varepsilon(t,y) + \partial_y \hat{u}_\varepsilon^\ell(t,y)\big|^2\, \mathrm{d} y \mathrm{d} t. \end{equation*} Written in this form, all the parameters are absorbed into the density~$\hat{u}_\varepsilon^\ell$. The coordinate transformation~$y_\varepsilon$ is the almost the same as in~\cite{ArnrichMielkePeletierSavareVeneroni2012}; the only difference is that we use the left-normalized stationary measure, whereas in the symmetric case, one can use the stationary measure normalized to one. \begin{definition}[Coordinate transformation $y_\varepsilon$]\label{GF_NGF:def:coordinate-transformation} For a potential~$V$ as in Figure~\ref{GF_NGF:fig:asymmetric-doublewell-potential}, the left-normalized stationary measure $ \mathrm{d}\gamma_\varepsilon^\ell = g_\varepsilon^\ell(z)dz$ of Definition~\ref{GF_NGF:def:left-normalized-stationary-measure} and the time-scale $\tau_\varepsilon$ defined by~\eqref{GF_NGF:intro:eq:def-time-scale-parameter}, define the map $y_\varepsilon : \mathbb{R} \to \mathbb{R}$ by \begin{align*} y_\varepsilon(x) := \frac{1}{\varepsilon\, \tau_\varepsilon} \int_{x_0}^x \frac{1}{g_\varepsilon^\ell(z)}\, \mathrm{d} z. \tag*\qed \end{align*} \end{definition} \begin{figure}[h!] \labellist \pinlabel $V(x)$ at 1700 1250 \pinlabel $x_0$ at 800 600 \pinlabel $x_a$ at 400 780 \pinlabel $x_b$ at 1350 750 \pinlabel $x$ at 1600 750 \pinlabel $-\frac{1}{2}$ at 400 -60 \pinlabel $0$ at 800 -60 \pinlabel $+\frac{1}{2}$ at 1150 -60 \pinlabel $y_\varepsilon(x)$ at 1750 -50 \endlabellist \centering \includegraphics[scale=.1]{Coordinate_Transformation} \caption{The effect of the coordinate transformation $y_\varepsilon$ of Defintion~\ref{GF_NGF:def:coordinate-transformation}. Points to the left of~$x_0$ s.t.~$V(x)<V(x_0)$ are mapped to~$-1/2$, and similarly, points to the right of~$x_0$ are mapped to~$+1/2$. The smaller the value of~$\varepsilon$, the sharper is the concentration effect. As~$\varepsilon\to 0$, points far to the left of~$x_a$ and far to the right of~$x_b$ are mapped to~$\mp\infty$, respectively.} \label{GF_NGF:fig:coordinate-transformation} \end{figure} This coordinate transformation indeed maps the minima of the potential~$V$ to~$\pm 1$, as the following Proposition shows. \begin{proposition}[Coordinate transformation]\label{GF_NGF:prop:coordinate-transformation} The map $y_\varepsilon:\mathbb{R}\to \mathbb{R}$ of Definition~\ref{GF_NGF:def:coordinate-transformation} satisfies the following: \begin{enumerate}[label=(\roman*)] \item The map $y_\varepsilon$ is strictly increasing and bijective. \item For any $x<x_0$ such that $V(x) < V(x_0)$, we have $y_\varepsilon(x) \to -\frac{1}{2}$ as $\varepsilon \to 0$. \item For any $x>x_0$ such that $V(x) < V(x_0)$, we have $y_\varepsilon(x) \to +\frac{1}{2}$ as $\varepsilon \to 0$. \end{enumerate} \end{proposition} \begin{proof}[Proof of Proposition~\ref{GF_NGF:prop:coordinate-transformation}] Since $y_\varepsilon'(x) > 0$ for any $x \in \mathbb{R}$ and $y_\varepsilon(x) \to \pm \infty$ as $x \to \pm\infty$, the map $y_\varepsilon$ is strictly increasing and bijective. For $x < x_0$ satisfying $V(x) < V(x_0)$, we obtain \begin{align*} y_\varepsilon(x) &= \frac{1}{\varepsilon \tau_\varepsilon} \cdot Z_\varepsilon \cdot \int_{x_0}^x e^{V(z)/\varepsilon}\, dz \\ &=[1+o(1)] \frac{1}{\varepsilon \tau_\varepsilon} \cdot e^{-V(x_a)/\varepsilon} \sqrt{\frac{2\pi\varepsilon}{V''(x_a)}} \cdot \frac{1}{2}e^{V(x_0)/\varepsilon} \sqrt{\frac{2\pi\varepsilon}{|V''(x_0)|}} (-1) = -\frac{1}{2}, \end{align*} by applying Lemma~\ref{lemma:watson} to $Z_\varepsilon = \int_{-\infty}^{x_0} e^{-V(z)/\varepsilon}\,dz$ and the integral. The factor~$\frac{1}{2}$ stems from the fact that the exponential $e^{V/\varepsilon}$ achieves its maximum at the boundary of the interval~$[x,x_0]$. The argument for the case~$x>x_0$ is similar. \end{proof} \begin{definition}[Transformed left-normalized stationary measure]\label{GF_NGF:def:transformed-stationary-measure} For the measure~$\gamma_\varepsilon^\ell\in \mathcal{M}(\mathbb{R})$ from Definition~\ref{GF_NGF:def:left-normalized-stationary-measure} and the coordinate transformation~$y_\varepsilon$ from Definition~\ref{GF_NGF:def:coordinate-transformation}, we let~$\hat{\gamma}_\varepsilon^\ell\in\mathcal{M}(\mathbb{R})$ be the push-forward measure \begin{equation*} \hat{\gamma}_\varepsilon^\ell(A) := (y_\varepsilon)_\#\gamma_\varepsilon^\ell(A) = \gamma_\varepsilon^\ell\left(y_\varepsilon^{-1}(A)\right). \end{equation*} \end{definition} \begin{proposition}[Concentration of measure]\label{prop:GF_NGF:transformed-stationary-measure} For any~$\kappa>0$ small, let~$ U_\kappa$ be the neighborhood $U_\kappa := B_\kappa(-1/2) \cup B_\kappa(+1/2)$ of~$\{\pm1/2\}$. Then \begin{equation*} \lim_{\varepsilon\to 0} \hat{\gamma}_\varepsilon^\ell(\mathbb{R}\setminus U_\kappa) = 0. \end{equation*} \end{proposition} \begin{proof}[Proof of Proposition~\ref{prop:GF_NGF:transformed-stationary-measure}] Let~$\kappa>0$ and fix~$\delta>0$. By Proposition~\ref{GF_NGF:prop:coordinate-transformation}, if~$\varepsilon>0$ is small enough, then~$\{V<\delta\} \subseteq y_\varepsilon^{-1}(U_\kappa)$. Therefore~$\mathbb{R}\setminus y_\varepsilon^{-1}(U_\kappa) \subseteq \{V>\delta\}$, and we find that \begin{equation*} \hat{\gamma}_\varepsilon^\ell(\mathbb{R}\setminus U_\kappa) \leq \gamma_\varepsilon^\ell(\{V>\delta\}). \end{equation*} By Proposition~\ref{prop:GF_NGF:left-normalized-stationary-measure}, the right-hand side vanishes in the limit~$\varepsilon\to 0$. \end{proof} \subsection{Definition of flux-density functionals} The flux-density functionals are defined on pairs of measures~$(\rho,j)$ satisfying the continuity equation $\partial_t\rho + \mathrm{div} j = 0$ in the following sense. \begin{definition}[Continuity Equation]\label{GF_NGF:def:continuity-equation} Fix~$T>0$ and let~$E:=(0,T)\times\mathbb{R}$. We say that a pair~$(\rho(t,(\cdot),j(t,\cdot))$ of time-dependent Borel measures on~$\mathbb{R}$ satisfies the continuity equation if: \begin{enumerate}[label=(\roman*)] \item For each~$t\in(0,T)$, $\rho(t,\cdot)$ is a probability measure on~$\mathbb{R}$. The map~$t\mapsto \rho(t,\cdot)\in\mathcal{P}(\mathbb{R})$ is measurable with respect to the weak topology on~$\mathcal{P}(\mathbb{R})$. \item For each~$t\in(0,T)$, $j(t,\cdot)$ is a finite Borel measure on~$\mathbb{R}$. The map~$t\mapsto j(t,\cdot)\in \mathcal{M}(\mathbb{R})$ is measurable with respect to the weak topology on~$\mathcal{M}(\mathbb{R})$. \item The pair solves $\partial_t\rho + \mathrm{div}\, j = 0$ in~$\mathcal{D}'(E)$; that means for any test function $\varphi\in C_c^\infty(E)$, we have \begin{equation} \int_0^T\int_\mathbb{R} \left[\rho(t,dy)\, \partial_t \varphi(t,y) + j(t,dy)\, \partial_y \varphi(t,y) \right]\,dt = 0. \end{equation} \end{enumerate} We denote by~$\mathrm{CE}(0,T;\mathbb{R})$ the set of all pairs~$(\rho,j)$ satisfying the continuity equation.\qed \end{definition} As discussed in the previous section, with the coordinate transformation~$y_\varepsilon$, the flux-density rate function takes the form \begin{equation*} \mathcal{I}_\varepsilon(\rho,j) = \frac{1}{4}\int_0^T\int_\mathbb{R} \frac{1}{\hat{u}_\varepsilon^\ell(t,y)}\big|\hat{\jmath}_\varepsilon(t,y) + \partial_y \hat{u}_\varepsilon^\ell(t,y)\big|^2\,dydt. \end{equation*} We take the dual formulation for integrals over convex functions (Lemma~\ref{GF_NGF:lemma:appendix:dual-of-convex-functions}), which generalizes \begin{equation*} \frac{1}{2}\frac{x^2}{y} = \sup_{\substack{b \in \mathbb{R}}} \left[(-b^2/2)y + bx\right],\quad x\in\mathbb{R},\,y>0. \end{equation*} Shifting derivatives to test functions, we arrive at the following Definition. \begin{definition}[Prel-limit Rate Function]\label{GF_NGF:def:pre-limit-RF} For~$E:=(0,T)\times\mathbb{R}$ and~$\varepsilon>0$, define the map $\widehat{\mathcal{I}}_\varepsilon:\mathrm{CE}(0,T;\mathbb{R})\to[0,\infty]$ by \begin{equation}\label{def:GF-NGF:pre-limitRF} \widehat{\mathcal{I}}_\varepsilon\left(\hat{\rho},\hat{\jmath}\right) := \frac{1}{2} \sup_{b\in C_c^\infty(E)}\int_E \left[\hat{u}_\varepsilon^\ell\left(-\partial_y b - \frac{1}{2}b^2\right) + \hat{\jmath}\cdot b\right]\,dydt, \end{equation} if~$\hat{\rho}(t,dy)=\hat{u}_\varepsilon^\ell(t,y) \hat{\gamma}_\varepsilon^\ell(dy)$, that is if~$\hat{\rho}(t,\cdot)$ is absolutely continuous with respect to~$\hat{\gamma}_\varepsilon^\ell$, the left-normalized stationary measure from Definition~\ref{GF_NGF:def:transformed-stationary-measure}. Otherwise, we set~$\widehat{\mathcal{I}}_\varepsilon\left(\hat{\rho},\hat{\jmath}\right)$ equal to~$+\infty$.\qed \end{definition} \begin{definition}[Limit Rate Function]\label{GF_NGF:def:limit-RF} With the funciton~$S$ from~\eqref{GF_NGF:eq:S-fct}, define~$\widehat{\mathcal{I}}_0:\mathrm{CE}(0,T;\mathbb{R})\to[0,\infty]$ by \begin{equation} \widehat{\mathcal{I}}_0\left(\hat{\rho},\hat{\jmath}\right) := \int_0^T S\left(\hat{\jmath}(t),\hat{z}(t)\right)\,dt, \end{equation} if~$\hat{\rho}(t,dy) = \hat{z}(t)\delta_{-\frac{1}{2}}(dy) + (1-\hat{z}(t))\delta_{+\frac{1}{2}}(dy)$ and $\hat{\jmath} = \hat{\jmath}(t)\mathbf{1}_{\left(-\frac{1}{2},+\frac{1}{2}\right)}(y)dtdy$, with coefficient~$\hat{z} \in H^1([0,T])$ and~$\hat{\jmath}(t)>0$. Otherwise, we set~$\widehat{\mathcal{I}}_0\left(\hat{\rho},\hat{\jmath}\right)$ equal to~$+\infty$.\qed \end{definition} In fact, we have~$\hat{\jmath}(t)=-\partial_t\hat{z}(t)$, which follows from the continuity equation~$\partial_t\hat{\rho}+\partial_y\hat{\jmath}=0$ and the special form of~$\hat{\rho}$ (see Theorem~\ref{GF_NGF:thm:compactness},~\ref{item:compact:j-is-nice}). That means the rate function is finite only if~$\hat{z}(t)$ is decreasing, meaning that mass is flowing only from left to right. We will show furthermore that finiteness of~$\mathcal{I}_0$ implies~$z\in W^{1,1}([0,T])$. \subsection{Why the limit is not a gradient flow} \label{GF_NGF:sec:why-limit-is-not-GF} We give a formal argument. Suppose that~$\mathcal{I}_0$ is a generalized gradient-flow given by~\eqref{GF_NGF:eq:action-of-R-R_star-functional}, with an energy~$\mathrm{E}$ and dissipation potentials~$\mathcal{R}$,~$\mathcal{R}^\ast$. Then locally, we obtain \begin{equation*} S(j,z) = \mathrm{d} \mathrm{E}(\rho) \cdot j + \mathcal{R}(\rho,j) + \mathcal{R}^\ast(\rho,- \mathrm{d}\mathrm{E}(\rho)). \end{equation*} Taking the derivative with respect to~$j$, \begin{equation*} \partial_j S(j,z) = \mathrm{d}\mathrm{E}(\rho) + \partial_j \mathcal{R}(\rho,j). \end{equation*} Since~$\mathcal{R}(\rho,0)=0$ is minimal by definition, \begin{equation*} \partial_j S(0,z) = \mathrm{d} \mathrm{E}(\rho) + 0. \end{equation*} But~$\partial_jS(j,z) = \log(j/z)$ diverges to~$-\infty$ as~$j\to 0$. \smallskip Informally, the limit structure is not an \emph{entropy} gradient flow because there is no decay in entropy. As we saw in Section~\ref{GF_NGF:sec:why-GF-not-converge}, the entropies diverge in the limit~$\varepsilon\to 0$. In the limit, the mass of the stationary measure is concentrated on one point, while the dynamics has mass on both points. Hence for any finite time, the relative entropy equals~$+\infty$ and is not decaying. \section{Proof of Gamma-convergence} \label{GF_NGF:sec:proof-of-gamma-convergence} In~$\mathrm{CE}(0,T;\mathbb{R})$, we consider convergence in distribution. \begin{definition}[Convergence of solutions to continuity equation]\label{GF_NGF:def:converge-in-CE} We say that a sequence~$(\hat{\rho}_n,\hat{\jmath}_n)$ in~$\mathrm{CE}(0,T;\mathbb{R})$ converges to~$(\hat{\rho},\hat{\jmath})$ if and only if for any test function~$\varphi\in C_c^\infty((0,T)\times\mathbb{R})$, we have \begin{equation*} \int_{0}^T\int_\mathbb{R} \left[\hat{\rho}_n \partial_t\varphi + \hat{\jmath}_n \,\mathrm{div}\,\varphi\right]\,dydt \xrightarrow{n\to\infty} \int_{0}^T\int_\mathbb{R} \left[\hat{\rho} \partial_t\varphi + \hat{\jmath}\, \mathrm{div}\,\varphi\right]\,dydt. \end{equation*} \end{definition} \begin{theorem}[Lower Bound]\label{GF_NGF:thm:lower-bound} For any sequence~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\in\mathrm{CE}(0,T;\mathbb{R})$ such that \begin{equation*} (\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\to(\hat{\rho}_0,\hat{\jmath}_0)\in\mathrm{CE}(0,T;\mathbb{R})\quad\text{and}\quad \sup_{(t,y)\in E}|\hat{u}_\varepsilon^\ell(t,y)| \leq C, \end{equation*} where~$\hat{\rho}_\varepsilon=\hat{u}_\varepsilon^\ell\hat{\gamma}_\varepsilon^\ell$, we have \begin{equation*} \liminf_{\varepsilon\to 0}\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) \geq \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0). \end{equation*} \end{theorem} \begin{theorem}[Upper bound]\label{GF_NGF:thm:upper-bound} For any~$(\hat{\rho}_0,\hat{\jmath}_0)\in\mathrm{CE}(0,T;\mathbb{R})$ such that the rate function is finite, $\widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0)<\infty$, there exist~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\in\mathrm{CE}(0,T;\mathbb{R})$ such that \[ (\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\xrightarrow{\varepsilon\to 0}(\hat{\rho}_0,\hat{\jmath}_0)\quad\text{and}\quad \limsup_{\varepsilon\to 0}\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) \leq \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0). \] \end{theorem} \subsection{Proof of compactness} Recall we denote by~$\mathrm{CE}(0,T;\mathbb{R})$ the set of solutions to the continuity equation in the sense of Definition~\ref{GF_NGF:def:continuity-equation}, and by~$\widehat{\mathcal{I}}_\varepsilon:\mathrm{CE}(0,T;\mathbb{R})\to[0,\infty]$ the rate function from Definition~\ref{GF_NGF:def:pre-limit-RF}. The measures~$\hat{\gamma}_\varepsilon^\ell$ are the transformed left-normalized stationary measures introduced in Definition~\ref{GF_NGF:def:transformed-stationary-measure}. \begin{theorem}[Sequential Compactness]\label{GF_NGF:thm:compactness} For $\varepsilon>0$, let $(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\in \mathrm{CE}(0,T;\mathbb{R})$ be pairs such that~$\hat{\rho}_\varepsilon(t,\cdot)$ is absolutely continuous w.r.t.~$\hat{\gamma}_\varepsilon^\ell$, with Radon-Nikodym derivative $\hat{u}_\varepsilon^\ell(t,\cdot)$. Let~$E:=(0,T)\times\mathbb{R}$. Suppose that there exists a constant~$C>0$ such that for all~$\varepsilon>0$, \begin{equation*} \widehat{\mathcal{I}}_\varepsilon\left(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon\right) \leq C \quad\text{and}\quad \sup_{(t,y)\in E}|\hat{u}_\varepsilon^\ell(t,y)| \leq C. \end{equation*} Then there exists a pair~$(\hat{\rho}_0,\hat{\jmath}_0)\in\mathrm{CE}(0,T;\mathbb{R})$ and a limiting function~$\hat{u}_0^\ell$ such that: \begin{enumerate}[label=(\roman*)] \item \label{item:compact:u-converge}$\hat{u}_0^\ell \in L^\infty(E)$ and along a subsequence~$\hat{u}_\varepsilon^\ell\xrightharpoonup{\ast}\hat{u}_0^\ell$ in~$\sigma(L^\infty(E),L^1(E))$. \item \label{item:compact:rho-converge}The densities converge weakly: $\hat{\rho}_\varepsilon\xrightharpoonup{\ast}\hat{\rho}_0$ w.r.t.~$\sigma(\mathcal{M}(E),C_b(E))$, where for every $t\in[0,T]$, the measure $\hat{\rho}_0(t,\cdot) \in \mathcal{P}(\mathbb{R})$ is absolutely continuous with respect to $\hat{\gamma}_0 := \delta_{-1/2}+\delta_{+1/2}$. \item \label{item:compact:j-converge} Along a subsequence: $\hat{\jmath}_\varepsilon\xrightharpoonup{\ast}\hat{\jmath}_0$ in~$\sigma(Y^\ast,Y)$, where $Y:=L^2\left(0,T;X\right)$ with the Banach space~$X$ obtained by taking the closure of~$C_c^\infty(\mathbb{R})$ under the norm \[ \|f\|_X := \|f\|_{L^2(\mathbb{R})} + \|\partial_y f\|_{L^1(\mathbb{R})}. \] \end{enumerate} Moreover, the limiting objects~$\hat{u}_0^\ell, \hat{\rho}_0$ and~$\hat{\jmath}_0$ satisfy the following regularity properties: \begin{enumerate}[label=(\roman*)] \setcounter{enumi}{3} \item \label{item:compact:rho-is-nice} The density $\hat{z}_0(t)$ such that~$\hat{\rho}_0(t,dy)=\hat{z}_0(t)\delta_{-1/2}(dy) + (1-\hat{z}_0(t))\delta_{+1/2}(dy)$ satisfies~$\hat{z}_0 \in H^1([0,T])$. \item \label{item:compact:j-is-nice} The limiting flux~$\hat{\jmath}_0$ is unique and is given by \begin{equation*} \hat{\jmath}_0(dt\,dy) = -\partial_t \hat{z}_0(t) \mathbf{1}_{(-1/2,+1/2)}(y)\,dtdy. \end{equation*} \item \label{item:compact:u-is-nice} The limiting function~$\hat{u}_0^\ell$ satisfies for a.e.~$t\in(0,T)$ \begin{equation*} \partial_y\hat{u}_0^\ell \in L^2\left((0,T)\times\mathbb{R}\right),\quad \hat{u}_0^\ell(t,-1/2) = \hat{z}_0(t) \quad\text{and}\quad \hat{u}_0^\ell(t,+1/2) = 0. \end{equation*} \end{enumerate} \end{theorem} \begin{proof}[Proof of Theorem~\ref{GF_NGF:thm:compactness}] If both~\ref{item:compact:rho-converge} and~\ref{item:compact:j-converge} hold, then a limiting pair~$(\hat{\rho}_0,\hat{\jmath}_0)$ satisfies the continuity equation: for any~$\varphi\in C_c^\infty(E)$, $\partial_t\varphi\in C_c^\infty(E)$ and~$\partial_y\varphi \in Y$, so that \[ \int_E \partial_t\varphi\, \hat{\rho}_\varepsilon \xrightarrow{\varepsilon\to 0}\int_E \partial_t \varphi\,\hat{\rho}_0\quad\text{and}\quad \int_E \partial_y\varphi(t,y)\,\hat{\jmath}_\varepsilon \xrightarrow{\varepsilon\to 0} \int_E \partial_y\varphi(t,y)\,\hat{\jmath}_0, \] Hence $\partial_t\hat{\rho}_0+\partial_y\hat{\jmath}_0=0$ in~$\mathcal{D}'$ is inherited from $\partial_t\hat{\rho}_\varepsilon+\partial_y\hat{\jmath}_\varepsilon=0$ in~$\mathcal{D}'$. \smallskip For proving~\ref{item:compact:u-converge} and~\ref{item:compact:rho-converge}, we only exploit the uniform boundedness assumption on the densities~$\hat{u}_\varepsilon^\ell$. The remaining properties follow from the boundedness assumption on the rate function. \smallskip \underline{\ref{item:compact:u-converge}}: The family of functions $\{\hat{u}_\varepsilon^\ell\}_{\varepsilon>0}$ is bounded in~$L^\infty(E)$, the topological dual of $L^1(E)$. Hence by the Banach-Alaoglu Theorem, there is a subsequence converging in~$\sigma(L^\infty(E),L^1(E))$. \smallskip \underline{\ref{item:compact:rho-converge}}: For any Borel subset $I\times A \subseteq E$, \begin{align*} |\hat{\rho}_\varepsilon(I\times A)| = \left|\int_I\int_A \hat{u}_\varepsilon^\ell(t,y)\hat{\gamma}_\varepsilon^\ell(dy)dt\right|&\leq T \cdot \|\hat{u}_\varepsilon^\ell\|_{L^\infty(E)}\cdot \hat{\gamma}_\varepsilon^\ell(A)\\ &\leq T\cdot C \cdot \hat{\gamma}_\varepsilon^\ell(A). \end{align*} For~$\kappa>0$, let $U_\kappa := B_\kappa(-1/2)\cup B_\kappa(+1/2)$. Then $\hat{\gamma}_\varepsilon^\ell(U_\kappa)\to 0$ as~$\varepsilon\to 0$ (Proposition~\ref{prop:GF_NGF:transformed-stationary-measure}). Since~$\kappa>0$ is arbitrary, this means that~$\hat{\rho}_\varepsilon$ converges weakly to a measure~$\hat{\rho}_0$ that is supported on the set~$(0,T)\times \{-\frac{1}{2},+\frac{1}{2}\}$. \smallskip \underline{\ref{item:compact:j-converge}}: By the uniform-boundedness assumption of the rate function, \[ \sup_{b\in C_c^\infty(E)}\int_0^T\int_\mathbb{R} \left[\hat{u}_\varepsilon^\ell \left(-\partial_y b - \frac{1}{2}b^2\right) + \hat{\jmath}_\varepsilon \cdot b\right]\,dtdy \leq C < \infty. \] Therefore, for any~$b\in C_c^\infty(E)$, \begin{align*} \left|\int_0^T\int_\mathbb{R} \hat{\jmath}_\varepsilon\cdot b(t,y)\,dydt\right| &\leq C + \|\hat{u}_\varepsilon^\ell\|_{\infty} \int_0^T\int_\mathbb{R} \left(|\partial_y b| + \frac{1}{2}b^2\right)\,dydt\\ &\leq C'\left[1+\int_0^T\left(\|b(t,\cdot)\|_{L^2(\mathbb{R})}^2 + \|\partial_yb(t,\cdot)\|_{L^1(\mathbb{R})}\right)\,dt\right], \end{align*} where $C'=\max(C,\|\hat{u}_\varepsilon^\ell\|)$. We henceforth abbreviate integrals $\int_0^T\int_\mathbb{R} \hat{\jmath}_\varepsilon b\,dtdy$ simply by $\langle \hat{\jmath}_\varepsilon,b\rangle$. Rescaling in the above estimate as~$b\to \lambda b$, we obtain that for any~$\lambda>0$ and~$b\in C_c^\infty(E)$, \begin{align*} \left|\langle \hat{\jmath}_\varepsilon, b \rangle\right| \leq C'\left[\frac{1}{\lambda} + \lambda \int_0^T\|b(t,\cdot)\|_2^2\,dt + \int_0^T\|\partial_y b(t,\cdot)\|_1 \,dt\right]. \end{align*} Optimizing the right-hand side in~$\lambda$ gives \[ \lambda_{\mathrm{op}} = \left(\int_0^T\|b(t,\cdot)\|_2^2\,dt\right)^{-1/2}. \] With that optimal~$\lambda=\lambda_\mathrm{op}$, we found the estimate \begin{align*} \left|\langle \hat{\jmath}_\varepsilon, b \rangle\right| \leq C'\left[\left(\int_0^T\|b(t,\cdot)\|_2^2\,dt\right)^{1/2} + \int_0^T\|\partial_y b(t,\cdot)\|_1 \,dt\right]. \end{align*} With the elementary estimate $(a+b)^2 \leq 2a^2+2b^2$, we arrive at \begin{align*} \left|\langle \hat{\jmath}_\varepsilon, b \rangle\right|^2 &\leq 2C'^2\left[\int_0^T\|b(t,\cdot)\|_2^2\,dt + \left(\int_0^T\|\partial_y b(t,\cdot)\|_1 \,dt\right)^2\right] \\ &\leq 2C'^2\left[\int_0^T\|b(t,\cdot)\|_2^2\,dt + \int_0^T\|\partial_y b(t,\cdot)\|_1^2 \,dt\right], \end{align*} where the second estimate is a consequence of Jensen's inequality. Therefore, for some constant~$C>0$ and for all~$b\in C_c^\infty(E)$, \begin{align*} \left|\langle \hat{\jmath}_\varepsilon, b \rangle\right| \leq C \|b\|_{Y}. \end{align*} Hence~$\hat{\jmath}_\varepsilon$ is bounded in~$Y^\ast$, and by the Banach-Alaoglu Theorem, there exists a converging subsequence of~$\hat{\jmath}_\varepsilon$ in the~$\sigma(Y^\ast,Y)$ topology. \smallskip \underline{\ref{item:compact:rho-is-nice}}: The density~$\hat{z}_0(t)$ is measurable as the limit of measurable functions, since \[ \hat{z}_0(t) = \lim_{\varepsilon\to 0} \hat{\rho}_\varepsilon(t,U_-) \] for $U_-$ a small neighborhood of~$- 1/2$. We now prove the claimed regularity. For a test function~$b\in C_c^\infty(E)$, we write $B(t,y) := \int_{-\frac{1}{2}}^y b(t,z)\,dz$, so that in particular $\partial_y B = b$. Since the pair~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ satisfies the continuity equation, we obtain for any~$b$ such that~$B$ is compactly supported that \[ \int_0^T\int_\mathbb{R} \partial_y B\,\hat{\jmath}_\varepsilon = - \int_0^T\int_\mathbb{R} \partial_t B \,\hat{\rho}_\varepsilon. \] From the boundedness of the rate function, we find for such~$b$ the estimate \begin{align*} C\geq \widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) &\geq \frac{1}{2}\int_0^T \int_\mathbb{R} \left[ \hat{u}_\varepsilon^\ell\left( - \partial_y b - \frac{1}{2}b^2\right) + \hat{\jmath}_\varepsilon \partial_y B \right]\,dydt \\ &= \frac{1}{2} \int_0^T \int_\mathbb{R} \left[ \hat{u}_\varepsilon^\ell\left( - \partial_y b - \frac{1}{2}b^2\right) - \hat{\rho}_\varepsilon \partial_t B \right]\,dydt. \end{align*} We specialize further to functions~$b$ such that~$B(t,y)=\varphi(t)\psi(y)$, where the function~$\varphi \in C_c^\infty(0,T)$ is arbitrary and~$\psi$ is a fixed function that has compact support and satisfies $\psi(-1/2)=0$ and $\psi(1/2)=1$. Writing~$\hat{z}_+:=1-\hat{z}_0$, \begin{align*} \left|\int_0^T \varphi'(t) \hat{z}_+(t)\,dt\right| &= \left|\int_0^T\int_\mathbb{R} \partial_t B(t,y)\, \hat{\rho}_0(dtdy) \right| \\ &\leq C + \left|\int_0^T\int_\mathbb{R} \hat{u}_0^\ell \left(\varphi(t) \psi''(y) + \frac{1}{2}\varphi(t)^2 |\psi'(y)|^2\right)\,dydt\right| \\ &\leq C + \|\hat{u}_0^\ell\|_\infty \left(\|\psi''\|_\infty \|\varphi\|_{L^1}+\frac{1}{2} \|\psi'\|_2^2 \|\varphi\|_{L^2}^2 \right) \\ &\leq C\left(1 + \|\varphi\|_{L^1} + \|\varphi\|_{L^2}^2\right). \end{align*} Rescaling as~$\varphi\to\lambda\varphi$ and optimizing the resulting estimate in~$\lambda$ in the same fashion as in the proof of~\ref{item:compact:j-converge} above, we arrive at \begin{align*} \left|\int_0^T\varphi'(t)\hat{z}_+(t)\,dt\right| \leq C\left(\|\varphi\|_{L^2} + \|\varphi\|_{L^1}\right) \leq C' \|\varphi\|_{L^2}, \end{align*} where the second estimate uses $\|\varphi\|_{L^1} \leq \sqrt{T}\|\varphi\|_{L^2}$. Since this bound holds for any~$\varphi\in C_c^\infty(0,T)$, we obtain that~$\hat{z}_+\in H^1(0,T)$, and hence also~$\hat{z}_0 \in H^1(0,T)$. \smallskip \underline{\ref{item:compact:j-is-nice}}: Let~$\hat{\jmath}_0$ be such that~$\hat{\jmath}_\varepsilon\xrightharpoonup{\ast}\hat{\jmath}_0$ in~$\sigma(Y^\ast,Y)$. First, we show that~$\hat{\jmath}_0$ is piecewise constant in the sense that \[ \hat{\jmath}_0(dt\,dy) = \left[j^-(t)\mathbf{1}_{(-\infty,-\frac{1}{2})}(y) + j(t)\mathbf{1}_{(-\frac{1}{2},+\frac{1}{2})}(y) + j^+(t)\mathbf{1}_{(+\frac{1}{2},+\infty)}(y)\right]\,dtdy, \] where~$j^-,j,j^+$ are measurable functions. Secondly, we verify that \[ j^-\equiv 0,\quad j\equiv -\partial_t \hat{z}_0,\quad j^+\equiv 0. \] Combining the two statements proves the claim. \smallskip The limiting density is of the form $\hat{\rho}_0(t,dy) = \hat{z}_-(t)\delta_{-\frac{1}{2}}(dy) + \hat{z}_+(t)\delta_{+\frac{1}{2}}(dy)$. Specializing the continuity equation $\partial_t\hat{\rho}_0 + \partial_y\hat{\jmath}_0=0$ to test functions of the form $b(t,y) = \varphi(t)\psi(y)$, where~$\varphi\in C_c^\infty(0,T)$ and~$\psi\in C_c^\infty((-\infty,-1/2))$, we find \begin{align*} \int_0^T\left[\int_\mathbb{R}\partial_y\psi(y)\hat{\jmath}_0(t,dy)\right]\varphi(t)\,dt = 0 \end{align*} Therefore $\partial_y\hat{\jmath}_0 = 0$ in $(0,T)\times(-\infty,-1/2)$, since~$\varphi,\psi$ are arbitrary. Repeating the arument on $(-1/2,+1/2)$ and $(+1/2,\infty)$, we find that~$\hat{\jmath}_0$ is piecewise constant as claimed. We are left with verifying that the flux vanishes outside the interval~$(-1/2,+1/2)$ and in the interval is given by~$\partial_t\hat{z}_+=-\partial_t\hat{z}_0$. \smallskip By boundedness of the rate function, for any~$b\in C_c^\infty(E)$, \begin{align*} C \geq \int_0^T\int_\mathbb{R} \left[\hat{u}_\varepsilon^\ell\left(-\partial_y b - \frac{1}{2}b^2\right)+\hat{\jmath}_\varepsilon b\right]\,dydt. \end{align*} The densities~$\hat{u}_\varepsilon^\ell$ converge along a subsequence in~$\sigma(L^\infty(E),L^1(E))$, the fluxes~$\hat{\jmath}_\varepsilon$ converge in~$\sigma(Y^\ast,Y)$, and any test function~$b$ together with its derivatives is both in $L^1(E)$ and~$Y$. Therefore we can pass to the limit to obtain \begin{align*} C \geq \int_0^T\int_\mathbb{R} \left[\hat{u}_0^\ell\left(-\partial_y b - \frac{1}{2}b^2\right)+\hat{\jmath}_0 b\right]\,dydt. \end{align*} Specializing to a sequence of functions~$b_n=\varphi(t)\psi_n(y)$ with functions~$\psi_n$ that are supported in~$(-\infty,-1)$ and satisfy \[ \|\psi_n\|_{L^1} \xrightarrow{n\to\infty}\infty,\quad\|\partial_y\psi_n\|_{L^1}\leq C\quad\text{and}\quad \|\psi_n^2\|_{L^1} \xrightarrow{n\to\infty}0, \] we find that \begin{align*} \left|\int_0^T \varphi(t)j^-(t)\,dt\right|\cdot\left| \int_\mathbb{R}\psi_n \,dy\right| &= \left|\int_0^T\int_{-\infty}^{-1}b_n \hat{\jmath}_0\,dydt\right|\\ &\leq C \left[1 + T\|\varphi\|_\infty\left( \|\hat{u}_\varepsilon^\ell\|_\infty \|\partial_y\psi_n\|_{L^1} + \|\hat{u}_\varepsilon^\ell\|_\infty \|\psi_n^2\|_{L^1}\right)\right]\\ &\leq C'. \end{align*} Since~$\|\psi_n\|_{L^1}\to\infty$ and since~$\varphi$ is arbitrary, this implies~$j^-\equiv 0$. Examples of~$\psi_n$ are smoothend versions of the step functions~$n^{-2/3}\mathbf{1}_{(-n,-1)}$. The argument for the region~$(+1/2,+\infty)$ is similar. Therefore, \[ \hat{\jmath}_0(dt,dy) = j(t)\mathbf{1}_{\left(-\frac{1}{2},+\frac{1}{2}\right)}(y)\,dtdy. \] Testing the continuity equation $\partial_t\hat{\rho}_0+\partial_y\hat{\jmath}_0=0$ with functions~$b(t,y)=\varphi(t)\psi(y)$ such that~$\psi(-1/2)=0$ and~$\psi(+1/2)=1$, we find \begin{align*} \int_0^T\hat{z}_+(t) \partial_t\varphi(t)\,dt + \int_0^Tj(t)\varphi(t)\,dt = 0. \end{align*} Since~$\hat{z}_+$ is in~$H^1$, integration by parts and arbitraryness of the test function~$\varphi$ imply that the flux is given by~$j(t)=\partial_t\hat{z}_+(t)$. \smallskip \underline{\ref{item:compact:u-is-nice}}: As shown above, we have for any~$b\in C_c^\infty(E)$ the bound \[ C\geq \int_E \left[\hat{u}_0^\ell\left(-\partial_y b - \frac{1}{2}b^2\right) + \hat{\jmath}_0 b\right]\,dydt. \] Using that $\hat{\jmath}_0\in L^2(E)$, we find \begin{align*} \left|\int_E \hat{u}_0^\ell \, \partial_y b\,dydt\right| &\leq C + \frac{1}{2} \|\hat{u}_0^\ell\|_\infty \|b\|_{L^2(E)}^2 + \|\hat{\jmath}_0\|_{L^2(E)} \|b\|_{L^2(E)} \\ &\leq C'\|b\|_{L^2(E)}, \end{align*} where the second estimate follows after rescaling $b\to\lambda b$ and optimizing in~$\lambda$. This shows boundedness of the map \[ b\mapsto \langle\hat{u}_0^\ell,\partial_y b\rangle_{L^2(E)}. \] Since~$L^2(E)$ is self-dual, the fact that~$\partial_y \hat{u}_0^\ell\in L^2(E)$ follows by the Banach-Alaoglu Theorem. \smallskip We now show $\hat{u}_0^\ell(t,-1/2) = \hat{z}_0(t)$ for a.e.~$t\in(0,T)$. The density~$\hat{z}_0(t)$ satisfies \[ \hat{z}_0(t) = \lim_{\varepsilon\to 0}\hat{\rho}_\varepsilon(t,U_\kappa), \] where~$U_\kappa$ is a small ball of radius~$\kappa$ around~$\{-1/2\}$. In~$U_\kappa$, the densities~$\hat{u}_\varepsilon^\ell$ and~$\hat{u}_0^\ell$ are close in the sense that \[ \int_{U_\kappa}\hat{u}_\varepsilon^\ell\,\hat{\gamma}_\varepsilon^\ell = \int_{U_\kappa}\hat{u}_0^\ell\,\hat{\gamma}_\varepsilon^\ell + \int_{U_\kappa}(\hat{u}_\varepsilon^\ell-\hat{u}_0^\ell)\,\hat{\gamma}_\varepsilon^\ell = \int_{U_\kappa}\hat{u}_0^\ell\,\hat{\gamma}_\varepsilon^\ell + o(1)_{\varepsilon\to 0}, \] since~$\hat{\gamma}_\varepsilon^\ell$ is left-normalized and concentrates on~$U_\kappa$ in the sense that \[ \hat{\gamma}_\varepsilon^\ell(U_\kappa) = \frac{1}{Z_\varepsilon^\ell}\int_{U_\kappa} e^{-V(y )/\varepsilon}\,dy \xrightarrow{\varepsilon\to 0}1, \] and since~$\hat{u}_\varepsilon^\ell\xrightharpoonup{\ast} \hat{u}_0^\ell$ in~$\sigma(L^\infty(E),L^1(E))$. With~$\hat{\rho}_\varepsilon(t,dy) = \hat{u}_\varepsilon^\ell(t,y)\hat{\gamma}_\varepsilon^\ell(dy)$, we therefore find \begin{align*} o(1)_{\varepsilon\to 0} + \left(\inf_{U_\kappa}\hat{u}_0^\ell(t,\cdot)\right)\hat{\gamma}_\varepsilon^\ell(U_\kappa) \leq \hat{\rho}_\varepsilon(t,U_\kappa) \leq \left(\sup_{U_\kappa}\hat{u}_0^\ell(t,\cdot)\right)\hat{\gamma}_\varepsilon^\ell(U_\kappa) + o(1)_{\varepsilon\to 0}. \end{align*} First passing to the limit~$\varepsilon\to 0$ and then taking~$\kappa\to 0$ gives \begin{align*} \lim_{\kappa\to 0}\inf_{U_\kappa}\hat{u}_0^\ell(t,\cdot) \leq \hat{z}_0(t) \leq \lim_{\kappa \to 0}\sup_{U_\kappa}\hat{u}_0^\ell(t,\cdot). \end{align*} Hence~$\hat{z}_0(t)$ is bounded from below by the lower-semicontinuous regularization of~$\hat{u}_0^\ell(t,y)$ at~$y=-1/2$, and from above by the upper-semicontinuous regularization. Since~$\hat{u}_0^\ell(t,\cdot)\in H^1(\mathbb{R})$ for almost every~$t\in(0,T)$, the function~$\hat{u}_0^\ell(t,\cdot)$ is continuous, implying that \[ \hat{u}_0^\ell(t,-1/2) = \lim_{\kappa \to 0}\sup_{U_\kappa}\hat{u}_0^\ell(t,\cdot) = \lim_{\kappa\to 0}\inf_{U_\kappa}\hat{u}_0^\ell(t,\cdot). \] Hence~$\hat{u}_0^\ell(t,-1/2)=\hat{z}_0(t)$ for a.e.~$t\in(0,T)$. \smallskip The fact that~$\hat{u}_0^\ell(t,+1/2)=0$ follows from observing that in the limit~$\varepsilon\to 0$, the left-normalized measure~$\hat{\gamma}_\varepsilon^\ell$ blows up in a neighborhood~$U_\kappa^+$ of~$\{+\frac{1}{2}\}$ while \[ 1\geq \hat{\rho}_\varepsilon(t,U_\kappa^+) = \int_{U_\kappa^+}\hat{u}_\varepsilon^\ell(t,y)\,\hat{\gamma}_\varepsilon^\ell(dy) \] remains bounded. Hence continuity of~$\hat{u}_0^\ell(t,\cdot)$ enforces~$\hat{u}_0^\ell(t,+1/2)=0$. \end{proof} \subsection{Proof of lower bound} \begin{proof}[Proof of Theorem~\ref{GF_NGF:thm:lower-bound}] The limiting measure~$\hat{\rho}_0$ is supported on the set $(0,T)\times\{-1/2,+1/2\}$, that is~$\hat{\rho}_0=\hat{z}_0(t)\delta_{-1/2}+(1-\hat{z}_0(t))\delta_{+1/2}$, and the limiting flux~$\hat{\jmath}_0$ is piecewise constant, given as in~\ref{item:compact:j-is-nice} of Theorem~\ref{GF_NGF:thm:compactness}. By definition of~$\widehat{\mathcal{I}}_\varepsilon$, for any~$b\in C_c^\infty(E)$, \begin{align*} C\geq \widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) &\geq \frac{1}{2}\int_0^T\int_\mathbb{R} \left[\hat{u}_\varepsilon^\ell\left(-\partial_y b - \frac{1}{2}b^2\right)+\hat{\jmath}_\varepsilon b\right]\,dydt. \end{align*} As in the proof of Theorem~\ref{GF_NGF:thm:compactness}, we can pass to the limit since~$\hat{u}_\varepsilon^\ell$ and~$\hat{\jmath}_\varepsilon$ converge: $\hat{u}_\varepsilon^\ell\xrightarrow{\ast}\hat{u}_0^\ell$ in $\sigma(L^\infty(E),L^1(E))$ and~$\hat{\jmath}_\varepsilon\xrightarrow{\varepsilon\to 0}\hat{\jmath}_0$ in $\sigma(Y^\ast,Y)$, where the limiting flux is given by~$\hat{\jmath}_0(dt,dy)=\hat{\jmath}_0(t)\mathbf{1}_{(-1/2,+1/2)}(y)\,dtdy$ with~$\hat{\jmath}_0(t)=-\partial_t\hat{z}_0(t)$. This leads to \begin{align*} \liminf_{\varepsilon\to 0}\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) &\geq \frac{1}{2}\int_0^T\int_\mathbb{R} \left[\hat{u}_0^\ell\left(-\partial_y b - \frac{1}{2}b^2\right)+\hat{\jmath}_0 b\right]\,dydt\\ &= \frac{1}{2}\int_0^T\int_\mathbb{R}\left[\hat{u}_0^\ell\left(-\frac{1}{2}b^2\right)+b\left(\hat{\jmath}_0 + \partial_y\hat{u}_0^\ell\right)\right]\,dydt, \end{align*} using that~$\partial_y \hat{u}_0^\ell \in L^2(E)$ by~Theorem~\ref{GF_NGF:thm:compactness} and integration by parts. Taken the supremum over smooth functions~$b$ that have compact support in $E_0:=(0,T)\times(-1/2,+1/2)$, we find that \begin{align*} \liminf_{\varepsilon\to 0}\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) &\geq \frac{1}{2}\sup_{b\in C_c^\infty(E_0)}\int_0^T\int_{-1/2}^{+1/2} \left[\hat{u}_0^\ell\left(- \frac{1}{2}b^2\right)+ b\left(\hat{\jmath}_0(t)+\partial_y\hat{u}_0^\ell\right)\right]\,dydt\\ &\overset{\ref{GF_NGF:lemma:appendix:dual-of-convex-functions}}{=} \frac{1}{4} \int_0^T\int_{-1/2}^{+1/2}\frac{1}{\hat{u}_0^\ell}\left|\hat{\jmath}_0(t)+\partial_y\hat{u}_0^\ell\right|^2\,dydt, \end{align*} the last equality following from Lemma~\ref{GF_NGF:lemma:appendix:dual-of-convex-functions}. For fixed~$t>0$, we have \begin{equation*} \int_{-1/2}^{+1/2}\frac{1}{\hat{u}_0^\ell}\big|\hat{\jmath}_0(t) + \partial_y\hat{u}_0^\ell\big|^2\,dy \geq \inf_{\substack{\hat{u}=\hat{u}(y)\\ \hat{u}(\pm 1/2) = \hat{u}_0^\ell(t,\pm 1/2)}} \int_{-1/2}^{+1/2}\frac{1}{\hat{u}(y)}\big|\hat{\jmath}_0(t) + \partial_y \hat{u}\big|^2\,dy. \end{equation*} By Theorem~\ref{GF_NGF:thm:compactness}, the boundary conditions are given by~$\hat{u}_0^\ell(t,+1/2)=0$ and $\hat{u}_0^\ell(t,-1/2)=\hat{z}_0(t)$. With the function $S(a,b):=a\log(a/b) - (a-b)$ from~\eqref{GF_NGF:eq:S-fct}, the infimum is \begin{equation*} \inf_{\substack{\hat{u}(- 1/2) = \hat{z}_0(t)\\\hat{u}(t,+1/2)= 0}} \int_{-1/2}^{+1/2}\frac{1}{\hat{u}(y)}\big|\hat{\jmath}_0(t) + \partial_y \hat{u}\big|^2\,dy = 4 \, S\left(\hat{\jmath}_0(t), \hat{z}_0(t)\right), \end{equation*} which we prove in Lemma~\ref{lemma:GF_NGF:variational-problem}. Therefore, \begin{align*} \liminf_{\varepsilon\to 0}\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) &\geq \frac{1}{4} \int_0^T\int_{-1/2}^{+1/2}\frac{1}{\hat{u}_0^\ell}\left|\hat{\jmath}_0(t)+\partial_y\hat{u}_0^\ell\right|^2\,dydt\\ &\geq \frac{1}{4}\int_0^T\inf_{\substack{\hat{u}(- 1/2) = \hat{z}_0(t)\\\hat{u}(+1/2)= 0}} \int_{-1/2}^{+1/2}\frac{1}{\hat{u}(y)}\big|\hat{\jmath}_0(t) + \partial_y \hat{u}\big|^2\,dy\,dt\\ &= \int_0^T S\left(\hat{\jmath}_0(t), \hat{z}_0(t)\right)\,dt = \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0), \end{align*} which finishes the proof of the lower bound. \end{proof} \subsection{Proof of upper bound} We first comment on the idea of proof of Theorem~\ref{GF_NGF:thm:upper-bound}. To that end, let \[ E:= (0,T)\times\mathbb{R}\quad\text{and}\quad E_0:=(0,T)\times(-1/2,+1/2). \] If the limiting rate function is finite, then by definition the pair~$(\hat{\rho}_0,\hat{\jmath}_0)$ is given by \begin{align}\label{eq:GF_NGF:limsup:rho_0} \hat{\rho}_0(t,dy) &= \hat{z}_0(t)\delta_{-1/2}(dy) + (1-\hat{z}_0(t))\delta_{+1/2}(dy),\\ \label{eq:GF_NGF:limsup:j_0} \hat{\jmath}_0(t,dy) &= \hat{\jmath}_0(t) \mathbf{1}_{(-1/2,+1/2)}(y)\,dy, \end{align} with~$\hat{z}_0\in H^1(0,T)$ and~$\hat{\jmath}_0(t)=-\partial_t\hat{z}_0(t) \geq 0$. We will first work under the following regularity assumption. \begin{assumption}\label{assump:GF_NGF:z0-is-ct-and-pos} The density~$\hat{z}_0:[0,T]\to[0,1]$ satisfies \begin{equation} \partial_t\hat{z}_0\in C([0,T]),\; \inf_{t\in(0,T)}|\partial_t \hat{z}_0(t)|>0 \quad\text{and}\quad \sup_{t\in(0,T)}|\partial_{tt}\hat{z}_0(t)|<\infty. \end{equation} \end{assumption} The proof of Theorem~\ref{GF_NGF:thm:upper-bound} consists of the following four steps. \begin{enumerate} \item We show that the limiting rate function satisfies \begin{equation}\label{eq:GF_NGF:limit-RF-via-density} \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0) = \frac{1}{4} \int_{E_0} \hat{b}_0^2\,\hat{u}_0\,dydt, \end{equation} where~$\hat{u}_0:E_0\to[0,\infty)$ is the function given by \begin{equation}\label{eq:GF_NGF:limit-density-u0} \hat{u}_0(t,y) = -\left(\hat{\jmath}_0-\hat{z}_0\right)\left(y+\hat{y}_t\right)\left(y-\frac{1}{2}\right),\quad \hat{y}_t := \frac{1}{2} \frac{\hat{\jmath}_0+\hat{z}_0}{\hat{\jmath}_0-\hat{z}_0}, \end{equation} and~$\hat{b}_0:E_0\to\mathbb{R}$ is defined by \begin{equation}\label{eq:GF_NGF:limit-function-b0} \hat{b}_0(t,y) := \frac{\hat{\jmath}_0(t)+\partial_y\hat{u}_0(t,y)}{\hat{u}_0(t,y)} = \frac{2}{\hat{y}_t + y}. \end{equation} The second-order polynomial~$\hat{u}_0(t,\cdot)$ is either concave ($\hat{\jmath}_0>\hat{z}_0$), linear ($\hat{\jmath}_0=\hat{z}_0$) or convex ($\hat{\jmath}_0<\hat{z}_0$). These three cases are sketched in Figure~\ref{fig:u_concance_linear_convex}. \begin{figure}[h!] \labellist \pinlabel $y$ at 950 0 \pinlabel $\hat{z}_0(t)$ at 900 500 \pinlabel $\hat{u}_0(t,y)$ at 550 750 \endlabellist \centering \includegraphics[scale=.18]{Limit_u0_concave_linear_convex} \caption{The polynomial $y\mapsto \hat{u}_0(t,y)$ on~$[-1/2,+1/2]$ for the three cases~$\hat{\jmath}_0(t)>\hat{z}_0(t)$ (yellow), $\hat{\jmath}_0(t)=\hat{z}_0(t)$ (red) and~$\hat{\jmath}_0(t)<\hat{z}_0(t)$ (blue). In particular, the function always satisfies $\hat{u}_0(t,-1/2) = \hat{z}_0(t)$ and~$\hat{u}_0(t,+1/2)=0$.} \label{fig:u_concance_linear_convex} \end{figure} \item We define the function~$\hat{u}_\varepsilon^\ell:E\to[0,\infty)$ as the weak solution to the auxiliary PDE \begin{equation}\label{eq:GF_NGF:steps-auxiliary-PDE} \hat{g}_\varepsilon^\ell \partial_t \hat{u}_\varepsilon^\ell = \partial_{yy}\hat{u}_\varepsilon^\ell - \partial_y(\hat{b}_0\mathbf{1}_{E_0} \hat{u}_\varepsilon^\ell), \end{equation} where~$\hat{g}_\varepsilon^\ell:\mathbb{R}\to(0,\infty)$ denotes the Lebesgue density of the left-stationary measure~$\hat{\gamma}_\varepsilon^\ell$ from Definition~\ref{GF_NGF:def:transformed-stationary-measure}, that is~$\hat{\gamma}_\varepsilon^\ell(dy) = \hat{g}_\varepsilon^\ell(y)dy$. With that, we define the pair~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ by setting \begin{align*} \hat{\rho}_\varepsilon(t,dy) := \hat{u}_\varepsilon^\ell(t,y)\hat{\gamma}_\varepsilon^\ell(dy)\quad\text{and}\quad \hat{\jmath}_\varepsilon := -\partial_y\hat{u}_\varepsilon^\ell + \hat{b}_0\mathbf{1}_{E_0} \hat{u}_\varepsilon^\ell. \end{align*} We choose the initial condition~$\hat{u}_\varepsilon^\ell(0,\cdot)$ such that the measure \begin{align*} \hat{\rho}_\varepsilon(0,dy):=\hat{u}_\varepsilon^\ell(0,y)\hat{\gamma}_\varepsilon^\ell(dy) \end{align*} has mass one and converges weakly to~$\hat{\rho}_0(0,dy)$. \item We show that the solution~$\hat{u}_\varepsilon^\ell$ to the auxiliary PDE~\eqref{eq:GF_NGF:steps-auxiliary-PDE} is such that \begin{equation}\label{eq:GF_NGF:u_eps-converges-to-u-in-E0} \hat{u}_\varepsilon^\ell\mathbf{1}_{E_0} \xrightarrow{\varepsilon\to 0} \hat{u}_0 \quad\text{weakly in}\;L^2(E_0), \end{equation} and that the pair~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ converges to~$(\hat{\rho}_0,\hat{\jmath}_0)$ in the sense of Definition~\ref{GF_NGF:def:converge-in-CE}. \item We verify that with the choice of~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ as above, the rate function is given by \begin{equation}\label{eq:GF_NGF:RF-via-density} \widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) = \frac{1}{4}\int_{E_0}\hat{b}_0^2 \hat{u}_\varepsilon^\ell\,dydt. \end{equation} \end{enumerate} With these steps accomplished, the limsup-bound follows as \begin{align*} \lim_{\varepsilon\to 0}\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) &\overset{\eqref{eq:GF_NGF:RF-via-density}}{=} \lim_{\varepsilon\to 0} \frac{1}{4}\int_{E_0}\hat{b}_0^2 \hat{u}_\varepsilon^\ell\,dydt \\ &\overset{\eqref{eq:GF_NGF:u_eps-converges-to-u-in-E0}}{=} \frac{1}{4}\int_{E_0}\hat{b}_0^2\hat{u}_0\,dydt \\ &\overset{\eqref{eq:GF_NGF:limit-RF-via-density}}{=} \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0). \end{align*} We now formulate the Lemmas we need in order to rigorously carry out the abovementioned steps. After that, we give the proof of Theorem~\ref{GF_NGF:thm:upper-bound} and then prove the Lemmas. \begin{lemma}\label{GF_NGF:lemma:upperbound:energy-dense-set-of-densities} The set of densities~$\{\hat{z}\}$ satisfying Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos} is energy-dense; that means if~$\widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0)$ is finite, then there are denities~$\hat{z}_0^\delta$ satisfying Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos} such that the pair~$(\hat{\rho}_0^\delta,\hat{\jmath}_0^\delta)$ defined via~$\hat{z}_0^\delta$ as in~\eqref{eq:GF_NGF:limsup:rho_0} and~\eqref{eq:GF_NGF:limsup:j_0} satisfies \begin{equation*} \lim_{\delta\to 0}(\hat{\rho}_0^\delta,\hat{\jmath}_0^\delta) = (\hat{\rho}_0,\hat{\jmath}_0) \quad\text{and}\quad \lim_{\delta\to 0}\widehat{\mathcal{I}}_0(\hat{\rho}_0^\delta,\hat{\jmath}_0^\delta) = \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0). \end{equation*} \end{lemma} \begin{lemma}[Limiting Rate Function]\label{lemma:GF_NGF:limsup:limiting-RF} The rate function~$\widehat{\mathcal{I}}_0$ is given by~\eqref{eq:GF_NGF:limit-RF-via-density}. \end{lemma} In the next Lemmas,~$\hat{\gamma}_\varepsilon^\ell(dy) = \hat{g}_\varepsilon^\ell(y)dy$ is the transformed left-normalized stationary measure from Definition~\ref{GF_NGF:def:transformed-stationary-measure}. \begin{lemma}[Auxiliary PDE]\label{lemma:GF_NGF:limsup:auxiliary-PDE} For any~$\varepsilon>0$ and any initial condition~$\hat{u}_\varepsilon^\ell(0,\cdot)\in C(\mathbb{R};[0,\infty))$, under Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos} there exists a weak solution~$\hat{u}_\varepsilon^\ell$ to the PDE~\eqref{eq:GF_NGF:steps-auxiliary-PDE}; that means there exists a function~$\hat{u}_\varepsilon^\ell:E\to[0,\infty)$ satisfying \begin{equation*} \hat{u}_\varepsilon^\ell \in L^2(0,T;H^1(\mathbb{R}))\cap C(0,T;L^2(\mathbb{R})) \quad\text{and}\quad \partial_t \hat{u}_\varepsilon^\ell \in L^2(0,T;H^{-1}(\mathbb{R})) \end{equation*} such that for any~$\varphi\in H^1(\mathbb{R})$, \begin{equation} \int_E \varphi \, \hat{g}_\varepsilon^\ell \partial_t\hat{u}_\varepsilon^\ell\,dydt = -\int_E \partial_y \hat{u}_\varepsilon^\ell \, \partial_{y}\varphi \,dydt + \int_E \hat{b}_0\mathbf{1}_{E_0}\hat{u}_\varepsilon^\ell \, \partial_y \varphi\,dydt. \end{equation} \end{lemma} \begin{lemma}[Uniform Energy Estimates]\label{lemma:GF_NGF:unif-energy-est} For~$\varepsilon>0$, let~$\hat{u}_\varepsilon^\ell$ be the solution to the auxiliary PDE~\eqref{eq:GF_NGF:steps-auxiliary-PDE} under Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos} and with initial condition~$\hat{u}_\varepsilon^\ell(0,\cdot)$ such that $\hat{\rho}_\varepsilon(0,dy) = \hat{u}_\varepsilon^\ell(0,y)\hat{\gamma}_\varepsilon^\ell(dy)$ has mass one and~$\|\hat{u}_\varepsilon^\ell(0,\cdot)\|_{L^\infty(\mathbb{R})}$ is uniformly bounded in~$\varepsilon>0$. Let~$B:E\to[0,\infty)$ be the function defined by~$B(t,y) := \int_{-1/2}^{y}\hat{b}_0(t,z)\mathbf{1}_{E_0}(t,z)\,dz$, and define~$\hat{v}_\varepsilon^\ell := e^{-B}\hat{u}_\varepsilon^\ell$ and~$\Omega := (-17,+17)$. Then there exists a constant~$C>0$ such that for every~$\varepsilon>0$, \begin{align} &\int_0^T\int_\mathbb{R} e^{B} |\partial_y\hat{v}_\varepsilon^\ell|^2\,dydt + \sup_{t\in(0,T)}\int_\mathbb{R} e^{B}\hat{g}_\varepsilon^\ell \hat{v}_\varepsilon^\ell(t)^2\,dy \leq C,\label{eq:GF_NGF:limsup:energy-bound-v_eps}\\ & \int_0^T\|\hat{u}_\varepsilon^\ell(t,\cdot)\|_{H^1(\Omega)}^2\,dt \leq C.\label{eq:GF_NGF:limsup:u_eps-bounded-in-H1-Omega} \end{align} \end{lemma} The size of~$\Omega$ can be chosen arbitrary, as long as it is finite and contains the inverval~$[-1/2,+1/2]$ in its interior. \begin{lemma}[Limiting density]\label{lemma:GF_NGF:limsup:limit-density} Let~$(\hat{\rho}_0,\hat{\jmath}_0)$ be a pair given by~\eqref{eq:GF_NGF:limsup:rho_0} and~\eqref{eq:GF_NGF:limsup:j_0}. Let~$\hat{u}_\varepsilon^\ell$ be the solution to the PDE~\eqref{eq:GF_NGF:steps-auxiliary-PDE} with initial condition~$\hat{u}_\varepsilon(0,\cdot)\in C^\infty(\mathbb{R})$ such that $\hat{u}_\varepsilon^\ell(0,y)\hat{\gamma}_\varepsilon^\ell(dy)\xrightharpoonup{\ast} \hat{\rho}_0(0,dy)$ as~$\varepsilon\to 0$. Define \begin{equation}\label{eq:GF_NGF:limsup:rho_eps-and-j_eps} \hat{\rho}_\varepsilon(t,dy) := \hat{u}_\varepsilon^\ell(t,y)\hat{\gamma}_\varepsilon^\ell(dy)\quad\text{and}\quad \hat{\jmath}_\varepsilon := -\partial_y\hat{u}_\varepsilon^\ell + \hat{b}_0\mathbf{1}_{E_0} \hat{u}_\varepsilon^\ell, \end{equation} and let~$\Omega:=(-17,+17)$. Then we can choose a subsequence of~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ (denoted the same) such that: \begin{enumerate}[label=(\roman*)] \item \label{item:GF_NGF:lemma-limit-density:i}$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\in \mathrm{CE}(0,T;\mathbb{R})$ and~$\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ is given by~\eqref{eq:GF_NGF:RF-via-density}. \item \label{item:GF_NGF:lemma-limit-density:rho-j-converge} The pair~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ converges to~$(\hat{\rho}_0,\hat{\jmath}_0)$ in the sense of Definition~\ref{GF_NGF:def:converge-in-CE}. \item \label{item:GF_NGF:lemma-limit-density:ii} There exists a function~$\hat{u}_0^\ell\in L^2(0,T;H^1(\Omega))$ such that $\hat{u}_\varepsilon^\ell$ converges to $\hat{u}_0^\ell$ weakly in~$L^2(0,T;L^2(\Omega))$, and~$\hat{u}_0^\ell \mathbf{1}_{E_0}=\hat{u}_0$. \end{enumerate} \end{lemma} \begin{proof}[Proof of Theorem~\ref{GF_NGF:thm:upper-bound}] Let~$(\hat{\rho}_0,\hat{\jmath}_0)$ be given by~\eqref{eq:GF_NGF:limsup:rho_0} and~\eqref{eq:GF_NGF:limsup:j_0}. By Lemma~\ref{GF_NGF:lemma:upperbound:energy-dense-set-of-densities}, we can suppose without loss of generality that~$\hat{z}_0$ satisfies Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos}. \smallskip By Lemma~\ref{lemma:GF_NGF:limsup:auxiliary-PDE}, we can define the function~$\hat{u}_\varepsilon^\ell:E\to[0,\infty)$ as the weak solution to the PDE~\eqref{eq:GF_NGF:steps-auxiliary-PDE}. We take the initial condition~$\hat{u}_\varepsilon^\ell(0,\cdot)\in C(\mathbb{R})$ to be such that~$\hat{\rho}_\varepsilon(0,dy)\xrightharpoonup{\ast}\hat{\rho}_0(0,dy)$ as~$\varepsilon\to 0$ and define the measures $(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ by~\eqref{eq:GF_NGF:limsup:rho_eps-and-j_eps}. \smallskip By~\ref{item:GF_NGF:lemma-limit-density:rho-j-converge} of Lemma~\ref{lemma:GF_NGF:limsup:limit-density}, $\lim_{\varepsilon\to 0}(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)=(\hat{\rho}_0,\hat{\jmath}_0)$ in the sense of Definition~\ref{GF_NGF:def:converge-in-CE}. We are left with verifying the limsup bound. By~\ref{item:GF_NGF:lemma-limit-density:i} of Lemma~\ref{lemma:GF_NGF:limsup:limit-density}, \begin{equation*} \widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) = \frac{1}{4}\int_{E_0}\hat{b}_0^2 \hat{u}_\varepsilon^\ell\,dydt. \end{equation*} As a consequence of Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos}, the function~$\hat{b}_0^2$ is in~$L^2(E_0)$, and by~\ref{item:GF_NGF:lemma-limit-density:ii} of Lemma~\ref{lemma:GF_NGF:limsup:limit-density}, the function~$\hat{u}_\varepsilon^\ell$ converges to~$\hat{u}_0$ weakly in~$L^2(E_0)$. Therefore \begin{equation*} \lim_{\varepsilon\to 0} \frac{1}{4}\int_{E_0}\hat{b}_0^2 \hat{u}_\varepsilon^\ell\,dydt = \frac{1}{4}\int_{E_0}\hat{b}_0^2 \hat{u}_0\,dydt, \end{equation*} and by Lemma~\ref{lemma:GF_NGF:limsup:limiting-RF}, \begin{equation*} \frac{1}{4}\int_{E_0}\hat{b}_0^2 \hat{u}_0\,dydt = \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0). \end{equation*} Thus $\lim_{\varepsilon\to 0}\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) = \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0)$, which proves the limsup bound. \end{proof} \subsubsection{Proofs of the Lemmas} \begin{proof}[Proof of Lemma~\ref{GF_NGF:lemma:upperbound:energy-dense-set-of-densities}] One can follow the same line of argument of~\cite[Theorem~6.1]{ArnrichMielkePeletierSavareVeneroni2012}. \end{proof} \begin{proof}[Proof of Lemma~\ref{lemma:GF_NGF:limsup:limiting-RF}] By definition, for a pair~$(\hat{\rho}_0,\hat{\jmath}_0)$ satisfying~\eqref{eq:GF_NGF:limsup:rho_0} and~\eqref{eq:GF_NGF:limsup:j_0}, \begin{equation*} \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0) = \int_0^T S(\hat{\jmath}_0(t)|\hat{z}_0(t))\,dt, \end{equation*} We show in~\ref{item:GF_NGF:lemma:var-probl:i} of Lemma~\ref{lemma:GF_NGF:variational-problem} that the function~$S$ arises as the solution to the following variational problem: \begin{equation*} S(\hat{\jmath}_0(t)|\hat{z}_0(t)) = \frac{1}{4} \inf_u \int_{-1/2}^{+1/2} \frac{1}{u(y)}\big|\hat{\jmath}_0(t) + \partial_y u(y)\big|^2\,dy, \end{equation*} where the infimum is taken over smooth functions~$u$ satisfying the boundary conditions $u(-1/2)=\hat{z}_0(t)$ and~$u(+1/2)=0$. By~\ref{item:GF_NGF:lemma:var-probl:ii} of Lemma~\ref{lemma:GF_NGF:variational-problem}, the optimizer of this variational problem is the polynomial $y\mapsto \hat{u}(t,y)$ given above in~\eqref{eq:GF_NGF:limit-density-u0}. Hence we find that \begin{align*} \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0) &\overset{\mathrm{def}}{=} \int_0^T S(\hat{\jmath}_0(t)|\hat{z}_0(t))\,dt\\ &= \frac{1}{4} \int_0^T\int_{-1/2}^{+1/2} \frac{1}{\hat{u}_0(t,y)}\left|\hat{\jmath}_0(t) + \partial_y \hat{u}_0(t,y)\right|^2\,dydt \overset{\mathrm{def}}{=} \frac{1}{4}\int_{E_0}\hat{b}_0^2 \hat{u}_0\,dydt, \end{align*} where the last equality follows from the Definition of~$\hat{b}_0$ in~\eqref{eq:GF_NGF:limit-function-b0}. \end{proof} \begin{proof}[Proof of Lemma~\ref{lemma:GF_NGF:limsup:auxiliary-PDE}] This follows from the fact that~$\hat{b}_0$ is bounded. \end{proof} \begin{proof}[Proof of Lemma~\ref{lemma:GF_NGF:unif-energy-est}] We first prove the estimate~\eqref{eq:GF_NGF:limsup:energy-bound-v_eps}. As a consequence of Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos}, the function~$B$ is bounded. We find by calculation that the function $\hat{v}_\varepsilon^\ell = e^{-B}\hat{u}_\varepsilon^\ell$ is the weak solution to \begin{equation}\label{eq:GF_NGF:limsup:eq-for-v_eps} \hat{g}_\varepsilon^\ell \partial_t \left(e^{B}\hat{v}_\varepsilon^\ell\right) = \partial_y\left(e^{B}\partial_y \hat{v}_\varepsilon^\ell\right). \end{equation} Multiplying~\eqref{eq:GF_NGF:limsup:eq-for-v_eps} with $\hat{v}_\varepsilon^\ell$ and integrating over~$\mathbb{R}$, (that is specialising the test function to the weak solution~$\hat{v}_\varepsilon^\ell$), we find \begin{equation*} \frac{1}{2}\frac{d}{dt}\left(\int_{\mathbb{R}}\hat{g}_\varepsilon^\ell e^B \frac{1}{2}(\hat{v}_\varepsilon^\ell)^2\,dy\right) + \frac{1}{2}\int_\mathbb{R}\hat{g}_\varepsilon^\ell (\hat{v}_\varepsilon^\ell)^2 \,\partial_t e^{B}\,dy= -\int_\mathbb{R} e^{B}|\partial_y\hat{v}_\varepsilon^\ell|^2\,dy. \end{equation*} Integrating over the time inverval~$(0,t)$ for~$t\in (0,T)$, \begin{multline}\label{eq:GF_NGF:proof-lemma-energy-dens:after-mult-v} \frac{1}{2}\int_\mathbb{R} e^B \hat{g}_\varepsilon^\ell \frac{1}{2} \hat{v}_\varepsilon^\ell(t,y)^2\,dy + \frac{1}{2} \int_0^t\int_\mathbb{R} \left(\partial_t e^B\right) \hat{g}_\varepsilon^\ell (\hat{v}_\varepsilon^\ell)^2\,dydt' + \int_0^t\int_\mathbb{R} e^B |\partial_y\hat{v}_\varepsilon^\ell|^2\,dydt \\ = \frac{1}{2}\int_\mathbb{R} e^{B(0,y)} \hat{g}_\varepsilon^\ell \frac{1}{2}\hat{v}_\varepsilon^\ell(0,y)^2\,dy \end{multline} Applying the estimate $ac\geq -(1/2)a^2-(1/2)c^2$ to the second term with \begin{equation*} a = \sqrt{\hat{g}_\varepsilon^\ell} \hat{v}_\varepsilon^\ell e^{B/2} \partial_t B \quad \text{and}\quad c = \sqrt{\hat{g}_\varepsilon^\ell} \hat{v}_\varepsilon^\ell e^{B/2} \end{equation*} leads to the estimate \begin{multline*} \int_0^t\int_\mathbb{R} \left(\partial_t e^B\right) \hat{g}_\varepsilon^\ell (\hat{v}_\varepsilon^\ell)^2\,dydt \\ \geq -\frac{1}{2}\int_0^t\int_\mathbb{R} \left(\partial_t B\right)^2 e^B \hat{g}_\varepsilon^\ell (\hat{v}_\varepsilon^\ell)^2\,dydt'- \frac{1}{2} \int_0^t\int_\mathbb{R}e^{B}\hat{g}_\varepsilon^\ell (\hat{v}_\varepsilon^\ell)^2\,dydt' \\ \geq (-t)\left[\frac{1}{2}\sup_{E}|\partial_t B|^2 + \frac{1}{2} \right] \sup_{t'\in(0,T)} \int_\mathbb{R} e^{B(t',y)}\hat{g}_\varepsilon^\ell(y) \hat{v}_\varepsilon^\ell(t',y)^2\,dy. \end{multline*} With the abbreviations \begin{equation*} C := \frac{1}{2}\sup_{E}|\partial_t B|^2 + \frac{1}{2} \quad\text{and}\quad C' := \frac{1}{2}\int_\mathbb{R}e^{B(0,y)} \hat{g}_\varepsilon^\ell \frac{1}{2}\hat{v}_\varepsilon^\ell(0,y)^2\,dy, \end{equation*} we find via the above estimate and by~\eqref{eq:GF_NGF:proof-lemma-energy-dens:after-mult-v} that \begin{equation*} (1-C\cdot t) \sup_{t'\in(0,T)} \int_\mathbb{R} e^{B(t',y)}\hat{g}_\varepsilon^\ell(y) \hat{v}_\varepsilon^\ell(t',y)^2\,dy + \int_0^t\int_\mathbb{R} e^{B}|\partial_y\hat{v}_\varepsilon^\ell|^2\,dydt \leq C'. \end{equation*} Now iterating this estimate,~\eqref{eq:GF_NGF:limsup:energy-bound-v_eps} follows. \smallskip We now prove~\eqref{eq:GF_NGF:limsup:u_eps-bounded-in-H1-Omega}, that is boundedness of~$\hat{u}_\varepsilon^\ell$ in~$L^2(0,T;H^1(\Omega))$. Since both~$B$ and~$\partial_y B$ are bounded functions as a consequence of Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos}, proving boundedness of~$\hat{v}_\varepsilon^\ell=e^{-B}\hat{u}_\varepsilon^\ell$ in~$L^2(0,T;H^1(\Omega))$ is sufficient for proving~\eqref{eq:GF_NGF:limsup:u_eps-bounded-in-H1-Omega}. To prove boundedness of~$\hat{v}_\varepsilon^\ell$ in~$L^2(0,T;H^1(\Omega))$, we will establish the following estimates: \begin{enumerate}[label=(\arabic*)] \item There exists a constant~$C_1>0$ such that for all~$\varepsilon>0$, \begin{equation}\label{eq:GF_NGF:limsup:seminorm-bounded} p(\hat{v}_\varepsilon^\ell)\leq C_1, \end{equation} where $p$ is the seminorm~$p(f):= \left(\int_0^T|f(t,+1/2)|^2\,dt\right)^{-1/2}$. \item There exists a constant~$C_2>0$ such that for all~$\varepsilon>0$, \begin{equation}\label{eq:GF_NGF:limsup:poincare} \int_0^T\|\hat{v}_\varepsilon^\ell(t,\cdot)\|_{L^2(\Omega)}^2\,dt \leq C_2 \left[\int_0^T\|\partial_y\hat{v}_\varepsilon^\ell(t,\cdot)\|_{L^2(\Omega)}^2\,dt + p(\hat{v}_\varepsilon^\ell)\right]. \end{equation} \end{enumerate} With these estimates established, boundedness of~$\hat{v}_\varepsilon^\ell$ and hence~\ref{eq:GF_NGF:limsup:u_eps-bounded-in-H1-Omega} follow as \begin{align*} \int_0^T\|\hat{v}\|_{L^2(\Omega)}^2\,dt + \int_0^T\|\partial_y \hat{v}_\varepsilon^\ell\|_{L^2(\Omega)}^2\,dt &\overset{\eqref{eq:GF_NGF:limsup:poincare}}{\leq}(1+C_2)\int_0^T \|\partial_y \hat{v}_\varepsilon^\ell\|_{L^2(\Omega)}^2\,dt + C_2p(\hat{v}_\varepsilon^\ell)\\ &\overset{\eqref{eq:GF_NGF:limsup:seminorm-bounded}}{\leq} (1+C_2)\int_0^T \|\partial_y \hat{v}_\varepsilon^\ell\|_{L^2(\Omega)}^2\,dt + C_2 C_1\\ &\overset{\eqref{eq:GF_NGF:limsup:energy-bound-v_eps}}{\leq} (1+C_2) \cdot \sup_E (e^{-B}) \cdot C + C_2 C_1 < \infty. \end{align*} The estimate~\eqref{eq:GF_NGF:limsup:poincare} is the Poincaré inequality~\cite[Eq.~1.35]{Temam2012}, which holds since~$p$ is a seminorm that is a norm when restricted to constant functions, that is \begin{equation*} (p(c)=0,c\in\mathbb{R}) \Rightarrow c= 0. \end{equation*} For verifying~\eqref{eq:GF_NGF:limsup:seminorm-bounded}, we prove that \begin{equation*} \lim_{\varepsilon\to 0}p(\hat{v}_\varepsilon^\ell) = 0. \end{equation*} Since there exists a constant~$C>0$ such that for all~$\varepsilon>0$, \begin{equation*} \int_0^T\int_{\Omega} |\partial_y\hat{v}_\varepsilon^\ell|^2\,dydt \leq \sup_E(e^{-B}) \int_0^T\int_\mathbb{R}|\partial_y\hat{v}_\varepsilon^\ell|^2\,dydt \overset{\eqref{eq:GF_NGF:limsup:energy-bound-v_eps}}{\leq} C, \end{equation*} there are a function~$\alpha_\varepsilon\in L^2(0,T)$ and a constant~$C'>0$ such that for all~$\varepsilon>0$, \begin{equation*} \|\alpha_\varepsilon\|_{L^2(0,T)}^2\leq C'\quad\text{and}\quad \hat{v}_\varepsilon^\ell(t,y) \geq \hat{v}_\varepsilon^\ell(t,1/2) - \alpha_\varepsilon(t)|y-(1/2)|^{1/2}. \end{equation*} Let~$\delta>0$ be arbitrary and set~$U_\delta:=(\frac{1}{2}-\delta,\frac{1}{2}+\delta)$. Then since~$\hat{u}_\varepsilon^\ell(t,y)\hat{\gamma}_\varepsilon^\ell(dy)$ has mass one for every~$t>0$ and~$\hat{\gamma}_\varepsilon^\ell(dy)=\hat{g}_\varepsilon^\ell(y)dy$, \begin{align*} T &= \int_0^T\int_\mathbb{R} e^B e^{-B}\hat{u}_\varepsilon^\ell \hat{g}_\varepsilon^\ell\,dydt \\ &\geq \inf_E(e^B)\int_0^T\int_{U_\delta}\left(\hat{v}_\varepsilon^\ell(t,1/2) - \alpha_\varepsilon(t)|y-(1/2)|^{1/2}\right)\hat{g}_\varepsilon^\ell\,dydt\\ &\geq \inf_E(e^B)\int_0^T\int_{U_\delta}\hat{v}_\varepsilon^\ell(t,1/2)\hat{g}_\varepsilon^\ell\,dydt - \inf_E(e^B)\delta^{1/2}\int_0^T\int_{U_\delta} \alpha_\varepsilon(t)\hat{g}_\varepsilon^\ell\,dydt. \end{align*} By re-organizing, we deduce the estimate \begin{align*} \int_0^T\hat{v}_\varepsilon^\ell(t,1/2)\,dt \int_{U_\delta}\hat{g}_\varepsilon^\ell\,dy\leq C \left( 1 + \delta^{1/2} \int_{U_\delta}\hat{g}_\varepsilon^\ell\,dy\right), \end{align*} where~$C = \max(T \cdot (\inf_E e^B)^{-1}, C' T^{1/2})$, and therefore arrive at \begin{equation*} \int_0^T\hat{v}_\varepsilon^\ell(t,1/2)\,dt \leq C\delta^{1/2} + C \left(\int_{U_\delta}\hat{g}_\varepsilon^\ell\,dy\right)^{-1}. \end{equation*} For any~$\delta>0$, we have~$\int_{U_\delta}\hat{g}_\varepsilon^\ell\,dy\to+\infty$ as $\varepsilon\to 0$, so that \begin{equation*} \limsup_{\varepsilon\to 0}\int_0^T\hat{v}_\varepsilon^\ell(t,1/2)\,dt \leq C \delta^{1/2}. \end{equation*} Since~$\delta>0$ is arbitrary, this implies~$p(\hat{v}_\varepsilon^\ell)\to 0$ as~$\varepsilon\to 0$. \end{proof} \begin{proof}[Proof of Lemma~\ref{lemma:GF_NGF:limsup:limit-density}] \ref{item:GF_NGF:lemma-limit-density:i}: The fact that~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\in\mathrm{CE}(0,T;\mathbb{R})$ follows directly from~\ref{eq:GF_NGF:limsup:rho_eps-and-j_eps} and the definition of~$\hat{u}_\varepsilon^\ell$. The rate function is given by \begin{align*} \widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) &\overset{\mathrm{def}}{=} \frac{1}{2} \sup_{b\in C_c^\infty(E)}\int_E \left[\hat{u}_\varepsilon^\ell\left(-\partial_y b - \frac{1}{2}b^2\right) + \hat{\jmath}_\varepsilon\cdot b\right]\,dydt \\ &= \frac{1}{4}\int_E \frac{1}{\hat{u}_\varepsilon^\ell(t,y)}\big|\hat{\jmath}_\varepsilon(t,y) + \partial_y \hat{u}_\varepsilon^\ell(t,y)\big|^2\,dydt, \end{align*} where the last equality follows from Lemma~\ref{GF_NGF:lemma:appendix:dual-of-convex-functions}. The form of the rate function~\eqref{eq:GF_NGF:RF-via-density} is an immediate consequence of the definition of~$\hat{\jmath}_\varepsilon$ in~\eqref{eq:GF_NGF:limsup:rho_eps-and-j_eps}. \smallskip We prove~\ref{item:GF_NGF:lemma-limit-density:rho-j-converge} and~\ref{item:GF_NGF:lemma-limit-density:ii} via the following steps: \begin{enumerate}[label=(\arabic*)] \item \label{item:GF_NGF:proof:rho-j-conv:1} We show that there is a pair~$(\hat{\rho}_0^\ell,\hat{\jmath}_0^\ell)\in\mathrm{CE}(0,T;\mathbb{R})$ of the form \begin{align*} \hat{\rho}_0^\ell(t,dy) &= \hat{z}_0^\ell(t)\delta_{-1/2}(dy) + (1-\hat{z}_0^\ell(t))\delta_{+1/2}(dy),\\ \hat{\jmath}_0^\ell(t,y)&= -\partial_t\hat{z}_0^\ell(t)\mathbf{1}_{(-1/2,+1/2)}(y), \end{align*} such that~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\to(\hat{\rho}_0^\ell,\hat{\jmath}_0^\ell)$ as~$\varepsilon\to 0$. We use the superscript~$\ell$ to distinguish this limit~$(\hat{\rho}_0^\ell,\hat{\jmath}_0^\ell)$ from~$(\hat{\rho}_0,\hat{\jmath}_0)$. \item \label{item:GF_NGF:proof:rho-j-conv:2} We show that the density~$\hat{u}_\varepsilon^\ell$ converges to a function~$\hat{u}_0^\ell$ in $L^2(0,T;H^1(\Omega))$ that satisfies for a.e. $t\in(0,T)$ the ODE \begin{align*} \begin{cases} \displaystyle-\partial_y\hat{u}_0^\ell(t,y) + \hat{b}_0(t,y) \hat{u}_0^\ell(t,y) = -\partial_t\hat{z}_0^\ell(t) \quad \text{in}\; \left(-\frac{1}{2},+\frac{1}{2}\right),\\ \displaystyle\hat{u}_0^\ell(t,-1/2) = \hat{z}_0^\ell(t),\\ \displaystyle\hat{u}_0^\ell(t,+1/2) = 0. \end{cases} \end{align*} \item \label{item:GF_NGF:proof:rho-j-conv:3} We show that the ODE enforces both~$\hat{z}_0^\ell(t) = \hat{z}_0(t)$ for a.e.~$t\in(0,T)$ and~$\hat{u}_0^\ell\mathbf{1}_{E_0}=\hat{u}_0$ in~$L^2(E_0)$. \end{enumerate} Then the convergence statement~\ref{item:GF_NGF:lemma-limit-density:rho-j-converge} follows as \begin{equation*} \lim_{\varepsilon\to 0}\left(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon\right)\overset{\ref{item:GF_NGF:proof:rho-j-conv:1}}{=} (\hat{\rho}_0^\ell,\hat{\jmath}_0^\ell) \overset{\ref{item:GF_NGF:proof:rho-j-conv:3}}{=}\left(\hat{\rho}_0,\hat{\jmath}_0\right), \end{equation*} and likewise~\ref{item:GF_NGF:lemma-limit-density:ii} as \begin{equation*} \lim_{\varepsilon\to 0}\hat{u}_\varepsilon^\ell\mathbf{1}_{E_0} \overset{\ref{item:GF_NGF:proof:rho-j-conv:2}}{=} \hat{u}_0^\ell \overset{\ref{item:GF_NGF:proof:rho-j-conv:3}}{=} \hat{u}_0. \end{equation*} We are left with verifying~\ref{item:GF_NGF:proof:rho-j-conv:1},~\ref{item:GF_NGF:proof:rho-j-conv:2} and~\ref{item:GF_NGF:proof:rho-j-conv:3}. \smallskip \ref{item:GF_NGF:proof:rho-j-conv:1}: For any test function~$\varphi\in C_b(E)$, \begin{align*} \left|\int_E \varphi \hat{\rho}_\varepsilon\right|^2 &\overset{\mathrm{def}}{=} \left|\int_E\varphi\, e^{B}\hat{g}_\varepsilon^\ell \hat{v}_\varepsilon^\ell\,dydt\right|^2\\ &\overset{\mathrm{CS}}{\leq} \left(\int_E|e^{B}\hat{g}_\varepsilon^\ell \hat{v}_\varepsilon^\ell(t)^2|\,dydt\right) \left(\int_E |\varphi e^{B}\hat{g}_\varepsilon^\ell| \,dydt\right)\\ &\leq C \left(\sup_t \int_\mathbb{R} e^{B(t)} \hat{g}_\varepsilon^\ell \hat{v}_\varepsilon^\ell(t)^2\,dy\right) \int_{\text{supp}(\varphi)}\hat{g}_\varepsilon^\ell(y)\,dy\\ &\overset{\eqref{eq:GF_NGF:limsup:energy-bound-v_eps}}{\leq} C' \int_{\text{supp}(\varphi)}\hat{g}_\varepsilon^\ell(y)\,dy. \end{align*} Hence for any testfunction with support outside of~$\{\pm 1/2\}$, \begin{equation*} \int_E \varphi \hat{\rho}_\varepsilon \xrightarrow{\varepsilon\to 0} 0. \end{equation*} Therefore in the limit~$\varepsilon\to 0$, the family of measures~$\hat{\rho}_\varepsilon$ converges weakly to a measure~$\hat{\rho}_0^\ell$ that is concentrated on~$[0,T]\times\{\pm 1/2\}$. \smallskip The flux~$\hat{\jmath}_\varepsilon$ is given by~$\hat{\jmath}_\varepsilon = e^{-B}\partial_y\hat{v}_\varepsilon^\ell$. Since the function~$B$ is bounded, we find by virtue of the estimate~\eqref{eq:GF_NGF:limsup:energy-bound-v_eps} that~$\hat{\jmath}_\varepsilon$ is bounded in~$L^2(E)$, because \begin{equation*} \int_E |\hat{\jmath}_\varepsilon|^2\,dydt \leq C \int_E e^B |\partial_y\hat{v}_\varepsilon^\ell|^2\,dydt \overset{\eqref{eq:GF_NGF:limsup:energy-bound-v_eps}}{\leq} C'. \end{equation*} Hence the flux converges weakly in~$L^2(E)$ along a subsequence (denoted the same) to some~$\hat{\jmath}_0^\ell \in L^2(E)$. This finishes the proof of~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\to(\hat{\rho}_0^\ell,\hat{\jmath}_0^\ell)$, since weak $L^2$ convergence is stronger than convergence in distribution in the sense of Definition~\ref{GF_NGF:def:converge-in-CE}. \smallskip Combining the above convergence statements of~$\hat{\rho}_\varepsilon$ and~$\hat{\jmath}_\varepsilon$, we find for any test function~$\varphi\in C^\infty_c(E)$, \begin{equation*} 0 \overset{\mathrm{CE}}{=} \int_E \partial_t \varphi \, \hat{\rho}_\varepsilon + \int_E \partial_y\varphi \, \hat{\jmath}_\varepsilon \xrightarrow{\varepsilon\to 0} \int_E \partial_t \varphi \, \hat{\rho}_0^\ell + \int_E \partial_y\varphi \,\hat{\jmath}_0^\ell. \end{equation*} Since~$\hat{\rho}_0^\ell$ is concentrated on~$[0,T]\times\{\pm1/2\}$, the limiting flux is piecewise constant with jumps only at~$\{\pm1/2\}$, and due to the fact that~$\hat{\jmath}_0^\ell$ is in~$L^2(E)$, this limiting flux must vanish outside of~$(-1/2,+1/2)$. Therefore, the continuity equation~$0=\partial_t\hat{\rho}_0^\ell + \partial_y\hat{\jmath}_0^\ell$ in the distributional sense implies that the flux is given by \begin{equation*} \hat{\jmath}_0^\ell(t,y)= -\partial_t\hat{z}_0^\ell(t)\mathbf{1}_{(-1/2,+1/2)}(y). \end{equation*} \smallskip \ref{item:GF_NGF:proof:rho-j-conv:2}: By definition, the flux~$\hat{\jmath}_\varepsilon$ is given by \begin{equation*} \hat{\jmath}_\varepsilon = -e^{B}\partial_y\hat{v}_\varepsilon^\ell = -\partial_y\hat{u}_\varepsilon^\ell + \hat{b}_0\mathbf{1}_{E_0}\hat{u}_\varepsilon^\ell. \end{equation*} By the estimate~\eqref{eq:GF_NGF:limsup:u_eps-bounded-in-H1-Omega} from Lemma~\ref{lemma:GF_NGF:unif-energy-est}, the function~$\hat{u}_\varepsilon^\ell$ converges to some function~$\hat{u}_0^\ell$ weakly in~$L^2(0,T;L^2(\Omega))$, and as shown above, the flux~$\hat{\jmath}_\varepsilon$ is bounded in~$L^2(E)$. Hence for any test function~$\varphi\in C^\infty_c((0,T)\times\Omega)$, \begin{equation*} 0=\lim_{\varepsilon\to 0}\int_{(0,T)\times \Omega}\left[\varphi\hat{\jmath}_\varepsilon -\hat{u}_\varepsilon^\ell\partial_y\varphi -\hat{b}_0\mathbf{1}_{E_0}\hat{u}_\varepsilon^\ell\right]= \int_{(0,T)\times \Omega}\left[\varphi\hat{\jmath}_0^\ell -\hat{u}_0^\ell\partial_y\varphi -\hat{b}_0\mathbf{1}_{E_0}\hat{u}_0^\ell\right]. \end{equation*} Therefore~$\hat{\jmath}_0^\ell = -\partial_y\hat{u}_0^\ell + \hat{b}_0\mathbf{1}_{E_0}\hat{u}_0^\ell$ weakly in~$L^2((0,T)\times\Omega)$. Since we also found above that~$\hat{\jmath}_0^\ell(t,y) = -\partial_t \hat{z}_0^\ell(t)\mathbf{1}_{(-1/2,+1/2)}(y)$, this means that in~$E_0$, the function~$\hat{u}_0^\ell$ is the weak solution to the ODE \begin{equation*} -\partial_y\hat{u}_0^\ell(t,y) + \hat{b}_0(t,y)\hat{u}_0^\ell(t,y) = -\partial_t\hat{z}_0^\ell(t). \end{equation*} We are left with verifying the boundary conditions. We will prove that for any test function~$\psi\in C_c^\infty(0,T)$, \begin{align*} 0&=\int_0^T\left(\hat{z}_0^\ell(t)-\hat{u}_0^\ell(t,-1/2)\right)\psi (t)\,dt,\\ 0&= \int_0^T\hat{u}_0^\ell(t,+1/2)\psi(t)\,dt. \end{align*} For~$\delta>0$, let~$U_\delta$ be a small neighborhood around~$(-1/2)$ of length~$2\delta$. Since~$\hat{u}_\varepsilon^\ell$ is uniformly bounded in~$L^2(0,T;H^1(\Omega))$ by~\eqref{eq:GF_NGF:limsup:u_eps-bounded-in-H1-Omega} of Lemma~\ref{lemma:GF_NGF:unif-energy-est}, there is a $C(t)$ such that \begin{equation*} \hat{u}_\varepsilon^\ell(t,y)\leq \hat{u}_\varepsilon^\ell(t,-1/2) + C(t)\,|y+(1/2)|^{1/2}. \end{equation*} With that, we can estimate \begin{multline*} \int_0^T\psi(t)\hat{\rho}_\varepsilon(t,U_\delta)\,dt = \int_0^T\int_{U_\delta} \psi(t)\hat{u}_\varepsilon^\ell(t,y)\hat{g}_\varepsilon^\ell(y)\,dydt\\ \leq \int_0^T\psi(t)\hat{u}_\varepsilon^\ell(t,-1/2)\,dt \int_{U_\delta}\hat{g}_\varepsilon^\ell(y)\,dy + C \|\psi\|_{L^\infty} \int_{U_\delta} |y+(1/2)|^{1/2}\hat{g}_\varepsilon^\ell(y)\,dy\\ \leq \int_0^T\psi(t)\hat{u}_\varepsilon^\ell(t,-1/2)\,dt \int_{U_\delta}\hat{g}_\varepsilon^\ell(y)\,dy + C \|\psi\|_{L^\infty} \delta^{1/2} \int_{U_\delta}\hat{g}_\varepsilon^\ell(y)\,dy. \end{multline*} For each~$\delta>0$,~$\int_{U_\delta}\hat{g}_\varepsilon^\ell(y)dy$ converges to one as~$\varepsilon\to 0$, and \begin{equation*} \lim_{\varepsilon\to 0}\int_0^T\psi(t)\hat{\rho}_\varepsilon(t,U_\delta)\,dt = \int_0^T\psi(t)\hat{z}_0^\ell(t)\,dt. \end{equation*} Therefore, \begin{equation*} \int_0^T\psi(t)\hat{z}_0^\ell(t)\,dt \leq \liminf_{\varepsilon\to 0}\int_0^T\psi(t)\hat{u}_\varepsilon^\ell(t,-1/2)\,dt + C'\delta^{1/2}. \end{equation*} Noting that~$\delta>0$ is arbitrary and repeating the argument for the reversed inequality, we find that \begin{equation*} \int_0^T\psi(t)\hat{z}_0^\ell(t)\,dt = \lim_{\varepsilon\to 0}\int_0^T\psi(t)\hat{u}_\varepsilon^\ell(t,-1/2)\,dt, \end{equation*} and the first boundary conditions follows since~$\hat{u}_\varepsilon^\ell$ converges in~$L^2(\Omega)$ and~$\hat{u}_0^\ell(t,\cdot)$ is continuous. The argument for the second boundary condition is similar, using that~$\hat{g}_\varepsilon^\ell(+1/2)\to\infty$ as~$\varepsilon\to 0$. \smallskip \ref{item:GF_NGF:proof:rho-j-conv:3}: With $B(t,y) = \int_{-1/2}^yb(t,z)\,dz$, the solution in~$E_0$ satisfying the boundary condition~$\hat{u}_0^\ell(t,-1/2)=\hat{z}_0^\ell(t)$ is given by \begin{equation*} \hat{u}_0^\ell(t,y) = e^{B(t,y)}\left[\hat{z}_0^\ell(t) + \partial_t\hat{z}_0^\ell(t) \int_{-1/2}^ye^{-B(t,z)}\,dz\right]. \end{equation*} A calculation yields that \begin{equation*} \int_{-1/2}^{+1/2}e^{-B(t,z)}\,dz = -\frac{\hat{z}_0(t)}{\partial_t\hat{z}_0(t)} > 0. \end{equation*} The boundary condition~$\hat{u}_0^\ell(t,+1/2)=0$ therefore enforces \begin{equation}\label{GF_NGF:eq:upper-bound:proof-lemma-limiting-density} \partial_t \log\hat{z}_0^\ell(t) = \partial_t\log\hat{z}_0(t). \end{equation} The convergence assumption on the initial condition~$\hat{\rho}_\varepsilon(0,dy)$ implies~$\hat{z}_0^\ell(0)=\hat{z}_0(0)$. Hence by \eqref{GF_NGF:eq:upper-bound:proof-lemma-limiting-density}, we obtain~$\hat{z}_0^\ell = \hat{z}_0$. Now the fact that~$\hat{u}_0^\ell$ equals~$\hat{u}_0$ on~$E_0$ follows from an explicit calculation. Alternatively, we note that~$\hat{z}_0^\ell = \hat{z}_0$ and~$\partial_t\hat{z}_0^\ell=\partial_t\hat{z}_0$ implies that~$\hat{u}_0$ is a solution to the ODE, and the result follows from uniqueness of solutions. \end{proof} \section{Appendix---useful lemmas} \begin{lemma}[Laplace's method]\label{lemma:watson} Let $f : [a,b] \to \mathbb{R}$ be twice differentiable. Suppose that for some $x_i \in (a,b)$, we have $f(x_i) = \inf_{[a,b]} f$. Then \begin{equation*} \int_a^b e^{-nf(x)}dx = \left[ 1 + o(1)\right] \sqrt{\frac{2\pi}{n f''(x_i)}} e^{-n f(x_i)}, \quad n \to \infty. \end{equation*} If $x_i = a$ or $x_i=b$, then \begin{equation*} \int_a^b e^{-nf(x)}dx = \left[ 1 + o(1)\right] \frac{1}{2} \sqrt{\frac{2\pi}{n f''(x_i)}} e^{-n f(x_i)}, \quad n \to \infty. \end{equation*} \end{lemma} \begin{lemma}[Dual of convex functions]\label{GF_NGF:lemma:appendix:dual-of-convex-functions} For $X=[0,T]\times \mathbb{R}^d$ and $f,g: X \to \mathbb{R}$ measurable with $g > 0$, any nonnegative Borel measure $\mu$ satisfies \begin{equation*} \int_X \frac{1}{2} \frac{|f(x)|^2}{g(x)} \, \mathrm{d} \mu(x) = \sup_{\substack{b \in C_c^\infty(X)}} \int_X \left[\left(-\frac{b(x)^2}{2}\right)g(x) + b(x)f(x)\right]\, \mathrm{d}\mu(x), \end{equation*} with the integral diverging when the supremum is infinity. \end{lemma} A proof is given for instance in~\cite[Lemma~3.4]{ArnrichMielkePeletierSavareVeneroni2012}. The representation in there can be further simplified by setting $a=-b^2/2$. \begin{lemma}[Variational Problem]\label{lemma:GF_NGF:variational-problem} Define the function~$S$ by~\eqref{GF_NGF:eq:S-fct}. Then: \begin{enumerate}[label=(\roman*)] \item \label{item:GF_NGF:lemma:var-probl:i} We have \begin{equation}\label{eq:GF_NGF:lemma:var-probl} S(j,z) = \frac{1}{4} \inf_u \int_{-1/2}^{+1/2} \frac{1}{u(y)}\big|j + \partial_y u(y)\big|^2\,dy, \end{equation} where the infimum is taken over smooth functions~$u:[-1/2,+1/2]\to[0,\infty)$ satisfying the boundary conditions $u(-1/2)=z$ and~$u(+1/2)=0$. \item \label{item:GF_NGF:lemma:var-probl:ii} The optimizer in~\eqref{eq:GF_NGF:lemma:var-probl} is the polynomial \begin{equation}\label{eq:GF_NGF:lemma-var-probl:optimal-u} u(y) = -(j-z)(y-y_0)\left(y-\frac{1}{2}\right), \quad y_0 = \frac{1}{2}\frac{z+j}{z-j}. \end{equation} \end{enumerate} \end{lemma} The proof is best carried out by exploiting the fact that the energy is conserved, since the function in the variational problem does not depend explicitly on~$y$. \chapter{Discussion and Future Questions} \label{chapter:discussion} Here we summarize the main results presented in each chapter and discuss interesting future questions related to them. \subsubsection{Chapter~\ref{chapter:LDP-for-switching-processes}: Large Deviations of Switching Processes.} \paragraph{Summary.} We consider a class of switching processes~$(X^\varepsilon,I^\varepsilon)$ in a periodic setting and prove pathwise large deviation principles of their spatial components~$X^\varepsilon$ in the limit~$\varepsilon\to 0$. The switching processes are motivated by stochastic models describing the spatial position of molecular motors walking on filaments within a cell, where the parameter~$\varepsilon>0$ corresponds to the ratio of microscopic to macroscopic scales. Our results embed existing results about molecular motors in a large-deviation context. The proofs of large deviation principle for the various models of molecular motors are examples of a general strategy outlined by Theorems~\ref{thm:results:LDP_switching_MP} and~\ref{thm:results:action_integral_representation}. In particular, the large-deviation proofs are independent of the specific choices involved in the models. Our method of proof exploits the connection of large deviations to Hamilton-Jacobi equations~\cite{FengKurtz2006}. Based on this connection, we find a strategy of proof consisting of two steps: first, identifying a multivalued limit operator, and second, solving a principal-eigenvalue problem. \smallskip In the models, the periodic setting reflects the periodic stucture of the filaments. As a consequence of this periodicity, the motor cannot advance without coupling to the chemically active environment, but switching mechanism between different configurations can generate motion. We derive an exact formula for the motor's large-scale velocity,~$v=\partial_p\mathcal{H}(0)$. This formula, based on the principal eigenvalue~$\mathcal{H}(p)$ of a cell problem, coincides with the findings of Perthame and Souganidis~\cite{PerthameSouganidis09a}. We work with variational representations of the principal eigenvalues to derive from the large deviation principles the following fact: a non-zero velocity~$v$ can only be achieved if detailed balance is broken (Theorem~\ref{thm:results:detailed_balance_limit_I}). \paragraph{Discussion and future questions.} Our more concrete conclusions based on working with the Hamiltonians~$\mathcal{H}(p)$ are limited to detailed balance. It would be interesting to investigate the Hamiltonians for systems not satisfying detailed balance. Hastings, Kinderlehrer and Mcleod for instance showed that transport occurs if potentials and rates collaborate in a suitable way~\cite[Theorem~2.1]{HastingsKinderlehrerMcleod08}. These conditions should consequently imply a non-trivial velocity~$v$. Another interesting question is the behaviour of the motor under load- or external forces. We showed under detailed balance that with a constant external force~$F$, the Hamiltonians are symmetric around~$-F$, which means that a positive (negative) force leads to a positive (negative) velocity. In general, does the velocity depend monotonically on external forces? Is there a stalling force~$F$ with which the motor's velocity vanishes? We could not find suitable symmetries of~$\mathcal{H}(p)$ for answering these questions. \smallskip Another open question is related to the coupled Fokker-Planck equations of the molecular-motor models. Chipot, Kinderlehrer and Kowalczyk considered a variational formulation for molecular motors~\cite{ChipotKinderlehrerKowalczyk2003}, similar in spirit to the JKO-scheme of Jordan, Kinderlehrer and Otto for the diffusion equation~\cite{JordanKinderlehrerOtto1998}. It would be interesting to know whether we can derive such variational formulations from large deviations of empirical densities, in the same manner as Adams, Dirr, Peletier and Zimmer derived Wasserstein gradient flows~\cite{AdamsDirrPeletierZimmer2011}. We do not expect a gradient-flow structure for molecular motors, since molecular motors are modelled by irreversible processes, and reversible processes lead to gradient flows as shown by Mielke, Peletier and Renger~\cite{MielkePeletierRenger2014}. However, once one knows how to derive a meaningful variational formulation in this example, one might be able to obtain variational formulations for similar irreversible processes as well. \subsubsection{Chapter~\ref{chapter:LDP-of-empirical-measures}: Large Deviations of Empirical Measures.} \paragraph{Summary.} The zig-zag process is an irreversible piecewise-deterministic Markov process designed to have a specific Gibbs-type stationary measure. We prove that its empirical measure satisfies a large deviation principle. Classical results in large deviation theory are not applicable due to the finite-speed and non-diffusive character of the zig-zag process. Therefore we derive suitable conditions based on the semigroup approach to large deviations~\cite{FengKurtz2006}. Our main contribution lies in proving that the Lyapunov functions in~\ref{item:thm_LDP_non_compact:Lyapunov} and the mixing property~\ref{item:thm_LDP_non_compact:mixing} suffice for a proof of large deviations in a non-compact state space. \smallskip We cannot characterize the rate functions by the Donsker-Varadhan formula for reversible diffusions, due to the inherent irreversibility of the zig-zag process. We derive an explicit formula of the rate function for the compact case. Based on this characterization, we conclude that the optimal rate of convergence is achieved by setting the refreshment rate~$\gamma$ (in Eq.~\eqref{eq:switching-intensity-condition-2}) to zero. \paragraph{Discussion and future questions.} Our conclusions about the zig-zag process are limited to one dimension. It would be very interesting to know whether our results also hold in higher dimensions. While the Lyapunov functions that we found for the zig-zag process are suitable for arbitrary dimensions, we were not able to verify the mixing property~\ref{item:thm_LDP_non_compact:mixing}. \smallskip Another open question is whether we can also explicitly characterize the rate functions in higher dimensions---for the zig-zag process as well as for other PDMPs such as the bouncy particle sampler~\cite{BouchardCoteVollmerDoucet2017}. The idea of using large-deviation rate functions to compare the performance of MCMC algorithms was introduced in~\cite{plattner2011infinite, dupuis2012infinite}. Rey-Bellet and Spiliopoulos showed that adding irreversible drifts to a diffusion process increases the rate functions~\cite[Theorem~2.2]{rey2015irreversible} and decreases the asymptotic variance~\cite[Theorem~2.7]{rey2015irreversible}. Explicit characterizations of the rate functions would be useful to address similar performance questions for PDMPs. Further natural steps are to compare samplers based on drift-diffusion processes and PDMPs, and to investigate how the rate functions scale with the dimension. An answer to the latter question would give interesting insights into how the various algorithms deal with the curse of dimensionality. \smallskip Nicolás García Trillos and Daniel Sanz-Alonso recently demonstrated that samplers based on drift-diffusion processes converge faster to equilibrium when choosing a suitable non-Euclidean metric for the space of position variables~\cite[Theorem~4.1, Proposition~4.3]{TrillosSanz-Alonso2018}. The authors call these processes geometry-informed Langevin diffusions, and their conclusions are based on an analysis of the spectral gap. Their results raise the question of whether a similar effect can be observed from a large-deviation point of view and for geometry-informed PDMPs. For instance, in between jumps of the velocity variables, the zig-zag and bouncy-particle samplers move in straight lines. It would be interesting to explore whether these samplers can benefit from modifying the piecewise-deterministic dynamics to follow geodesics with respect to a non-Euclidean metric. \subsubsection{Chapter~\ref{chapter:LDP-in-slow-fast-systems}: Large Deviations in Stochastic Slow-Fast Systems.} \paragraph{Summary.} We consider two-component stochastic processes whose individual components run at different time scales. Our main results are a proof of large deviation principles in the limit of an infinite time-scale separation and an interpretation of the Lagrangian rate functions we obtain. The analytical challenge in the proof (the comparison principle for an associated Hamilton-Jacobi equation) is solved in Chapter~\ref{chapter:CP-for-two-scale-H}. The results apply in particular to irreversible diffusions as fast processes. Our main example are mean-field interacting particles coupled to fast diffusion processes, for which we deduce an averaging principle from the large deviation principle. A key ingredient for this argument is a suitable formula for the Lagrangians. \paragraph{Discussion and future questions.} We assumed the fast variables to live in a compact space to focus only on the effects coming from the scale separation. It would be worthwhile to extend the analysis to the non-compact setting in order to cover for instance a fast Ornstein–Uhlenbeck process. Another interesting question we left unanswered is whether one can treat \emph{degenerate} diffusions as in~\cite{BudhirajaDupuisGanguly2018} with our methods---we always worked under uniform ellipticity assumptions. In all these examples, the key problem one has to solve is the comparison principle. We further comment on that in the discussion below. \subsubsection{Chapter~\ref{chapter:CP-for-two-scale-H}: Comparison Principle for Two-Scale Hamiltonians.} \paragraph{Summary.} We prove existence and uniqueness of solutions of a Hamilton-Jacobi equation, where the Hamiltonian is given by an optimization over control variables. The Hamiltonians appearing in large-deviation problems for slow-fast systems (Chapter~\ref{chapter:LDP-in-slow-fast-systems}) are of this type. We propose a bootstrap procedure to solve the comparison principle, for which we have to assume sufficient regularity of the cost functions. The method applies to non-coercive Hamiltonians arising in mean-field models. Furthermore, it addresses a problem pointed out in~\cite{BudhirajaDupuisGanguly2018}, which is that classical comparison results are not readily applicable due to the poor regularity properties of this type of two-scale Hamiltonians. \paragraph{Discussion and future questions.} There are various examples that we cannot treat with our method, but which are important to address. Let us mention two examples. First, if the internal Hamiltonians correspond to degenerate diffusions---we use uniform ellipticity in the proof of Proposition~\ref{prop:verify-ex:Lambda_quadratic}. Under Lipschitz conditions on the diffusion coeffcients, the comparison principle for degenerate diffusions is proven in~\cite[Lemma~9.25]{FengKurtz2006} by means of an auxiliary variable~$\lambda$. It would be interesting to investigate whether one can combine this method of proof to include the case of degenerate diffusions in two-scale Hamiltonians. \smallskip Second, we considered Hamiltonians arising from a scale separation in a weakly-coupled regime. That is reflected in the fact that the cost functionals do not depend on~$p$. But there are interesting problems leading to such as setting. For instance, in the molecular-motor models, we only discussed potentials and rates $\{\psi_i, r_{ij}\}$ depending on the up-scaled variables, in the sense that~$\psi_i=\psi_i(x/\varepsilon)$ and~$r_{ij}=r_{ij}(x/\varepsilon)$. That assumption leads to a simplification, since then the well-posedness of the principal-eigenvalue problem is sufficient for proving the comparison principle---this is basically the content of~\ref{MM:item:T1} and~\ref{MM:item:T2} of Theorem~\ref{thm:results:LDP_switching_MP}, which state that finding an eigenvalue~$\mathcal{H}(p)$ and an eigenfunction~$\varphi_p$ are sufficient. When we consider instead potentials~$\psi_i=\psi_i(x,x/\varepsilon)$ and rates~$r_{ij}=r_{ij}(x,x/\varepsilon)$, the eigenvalue Hamiltonians are---similar to~\eqref{eq:results:LDP_MM:DV_var_rep_H(p)} of Section~\ref{subsection:detailed_balance}---of the form \begin{equation*} \mathcal{H}(x,p)=\sup_{\mu\in\mathcal{P}(E')}\left[\int_{E'}V_{x,p}(z)\, \mathrm{d}\mu(z) - \mathcal{I}_{x,p}(\mu)\right]. \end{equation*} In there, the maps~$V_{x,p}$ and~$\mathcal{I}_{x,p}$ are obtained from~\eqref{MM:eq:function-V-in-Hamiltonian} and~\eqref{eq:results:LDP_MM:DV_functional} by replacing the potentials and rates. It is unknown whether the comparison principle is satisfied for the Hamilton-Jacobi equation with these Hamiltonians. The Hamiltonians we obtain in slow-fast systems in Chapter~\ref{chapter:LDP-in-slow-fast-systems} are simpler in the sense that the Donsker-Varadhan functionals~$\mathcal{I}_{x,p}(\mu)$ in there are indepedent of the momentum variable~$p$. It would be interesting to explore whether the method developed in Chapter~\ref{chapter:CP-for-two-scale-H} can be extended to include this type of Hamiltonians. \subsubsection{Chapter~\ref{chapter:GF-to-NGF}: Gradient Flow to Non-Gradient-Flow.} \paragraph{Summary.} We study a family of Fokker-Planck equations corresponding to a particle diffusing in an asymmetric double-well potential. The associated gradient-flow structures do not converge in a certain limit due to the relative entropies diverging, which originates from the asymmetry of the potential. We propose to work instead with a different variational formulation based on functionals that include fluxes, and show~$\Gamma$-convergence of these functionals. Our motivation is taken from the fact that reversible processes give us gradient flows via large deviation theory. Therefore the convergence of gradient-flow structures appears in many contexts, and it is natural to ask which convergence concepts are suitable for treating cases in which the underlying processes become irreversible. \paragraph{Discussion and future questions.} It would be exciting to investigate other cases of gradient-flow structures that are not converging due to the relative entropies diverging. On the level of the functionals, one may regard the inclusion of fluxes as "absorbing" or "including" the relative entropies into the dissipation functional. While we use a special coordinate transformation that is akin to the problem we study, a natural question is whether the techniques we employed in our case also apply to~$\Gamma$-convergence problems for other density-flux functionals. \qed \chapter*{Abstract} Time-irreversible stochastic processes are frequently used in natural sciences to explain non-equilibrium phenomena and to design efficient stochastic algorithms. Our main goal in this thesis is to analyse their dynamics by means of large deviation theory. \smallskip We focus on processes that become deterministic in a certain limit, and characterize their fluctuations around that deterministic limit by Lagrangian rate functions. Our main techniques for establishing these characterizations rely on the connection between large deviations and Hamilton-Jacobi equations. We sketch this connection with examples in the introductory parts of this thesis. \smallskip The second part of the thesis is devoted to irreversible processes that are motivated from molecular motors, Markov chain Monte Carlo (MCMC) methods and stochastic slow-fast systems. We characterize the asymptotic dynamics of molecular motors by Hamiltonians defined in terms of principal-eigenvalue problems. From our results about the zig-zag sampler used in MCMCs, we learn that maximal irreversibility corresponds to an optimal rate of convergence. In stochastic slow-fast systems, our main theoretical contributions are techniques to work with the variational formulas of Hamiltonians that one encounters in mean-field systems coupled to fast diffusions. \smallskip In the final part of the thesis, we study a family of Fokker-Planck equations whose solutions become singular in a certain limit. The associated gradient-flow structures do not converge since the relative entropies diverge in the limit. To remedy this, we propose to work with a different variational formulation that takes fluxes into account, which is motivated by density-flux large deviations. \smallskip \paragraph{Keywords.} Large deviations, partial differential equations, viscosity solutions, comparison principle, variational techniques,~$\Gamma$-convergence, gradient flows. \chapter{Acknowledgments} First I want to thank you, Mark. This thesis would not have been possible without your support and guidance. I am grateful that you gave me the opportunity to become a mathematician; that you patiently taught me how to approach mathematical questions, how to write papers, how to present science; also that erasers are personal belongings rather than public goods. I enjoyed in particular working with you in the office; I always learned a lemma, a theorem, and your humor made the discussions enjoyable. I missed that during times of corona. I also appreciate that you nudged me to organize CASA Days and the Wednesday Morning Sessions---this gentle kick making me become active is exactly what I needed. \smallskip I thank the committee members for accepting the invitation, and for their many comments, remarks and suggestions after reading the first manuscript, which motivated me to read up on many other works. Thank you for your interest in my thesis and in our work. \smallskip Frank, Francesca and Federico, I greatly enjoyed the frequent and inspiring meetings we had in Delft and Eindhoven. I learned to appreciate stochastic processes, martingales and Brownian motion during our discussions, and liked the atmosphere that you created in our meetings. \smallskip I am also grateful to my collaborators. Richard, you always made me feel welcome in Delft by chatting about life and mathematics. Thank you for offering me numerous cups of coffee; I liked our discussions about comparison principles,~$f=h$, and many more topics. Joris and Pierre, thank you for introducing me to the world of MCMCs. I learned a lot from your style of writing and from our frequent attempts to show that the zig-zag process is a nice process. Mario, thank you for our discussions in Eindhoven and Bonn. \smallskip Jin, thank you for answering all my questions via many emails and for our discussions at the Leiden conference; they were crucial for making progress. \smallskip The four years at CASA have been a lot of fun. Diane, Enna and Jolijn, you were a great support during my stay at CASA. I want to thank my office mates I had over the years; Saeed, Upanshu, Koondi, Jasper, Anastasiia and Alberto. Thank you Anastasiia and Jasper for the fun times during the ODE course and discussions on the whiteboard, and for saving my plants (before and during corona). Arthur (Zigge-zagge); thanks for all the amusing and entertaining talks. Anastasiia, Harshit, Xingang, it was fun to get our chip-predictions right (Brownian motion). Jim, I really enjoyed being part of your measure-theory course, discussing exams and homeworks with you, and going for pizza to celebrate the end of a course; thank you for this time, I learned a lot from you about measure theory. Georg, thank you for discussing compact operators and principal eigenvalues with me; it was also great preparing the workshop on quantum computing with you. Thanks Oliver for frequently dropping by at our office to chat about math. Thank you Jan-Cees for the interesting projects during the ODE course. Alberto, Carlo, Oxana, thank you for your suggestions during the Wednesday Morning Sessions we had so far. Finally, I also want to thank all others who make CASA a welcoming place. \smallskip I am also glad to be part of the random people in Delft; Andrea, Bart, Federico, Francesca, Mario, Martina, Richard, Rik, Sebastiano, Simone, I always enjoyed being at TU Delft and chatting with you over coffee! \smallskip Special thanks goes to the Nederlandse Spoorwegen and Julia's. Thanks to your trains and coffees during these four years, I could live in (and in between) Eindhoven, Delft and Leiden. \smallskip Ich m{\"o}chte besonders meiner Familie danken, die mich in den vergangenen Jahren begleitet hat und zu meiner Verteidigung anreist: Mama, Papa, Joana, Nielsson, Oma, Max und Olha. Mama, danke dass du dich so sehr daf{\"u}r eingesetzt hast, mich auf ein Gymnasium zu bringen; ohne all deine Bem{\"u}hungen und Unterst{\"u}tzung h{\"a}tte ich niemals anfangen k{\"o}nnen diese Arbeit zu schreiben. Papa, danke dass du mir kurz nach meiner Geburt den kleinen Fermat vorgelesen hast, in der Hoffnung ich h{\"a}tte einen Geistesblitz. Zwar blieb dieser bis heute aus, aber der Funke ist {\"u}bergesprungen weil du meine Freude an der Physik und Mathematik immer unterst{\"u}tzt und befeuert hast. \smallskip Mia, thank you so much for supporting me during the whole time of my PhD. You were there for me. You discussed math with me, we prepared exams and homeworks for measure theory together, you encouraged me during the process of writing the thesis when I needed you; thank you for all of that! I am happy about all the memories we share from the last years, and when looking ahead with you. Thank you for coming into my life, it is wonderful with you! \chapter{Curriculum Vitae} \pagestyle{empty} Mikola Christoph Schlottke was born on 29-06-1991 in Erlangen, Germany. After finishing high school in 2010 at the Friedrich-Alexander-Gymnasium in Neustadt an der Aisch, he did a Voluntary Year of Social Service at the Bavarian Red Cross as a paramedic. He then started his studies of Physics at the University of Potsdam in Germany, which he completed in 2014 with distinction and a thesis on the tunnel effect under the supervision of prof.dr. Markus Klein. He continued to study Theoretical Physics at the University of Amsterdam, where he graduated in 2016 with a thesis on the Atiyah-Singer-Index Theorem under the supervision of dr. H.B. Posthuma. \smallskip In October 2016, he started a PhD project at the Eindhoven University of Technology under the supervision of prof.dr. Mark A. Peletier. The results obtained during this project are presented in this dissertation. The PhD project was part of the TOP-1 project \emph{Large deviations and gradient flows: beyond equilibrium}, which included regular meetings with prof.dr. F.H.J. Redig, dr. Francesca Collet and dr. Federico Sau, and was funded by the NWO grant 613.001.552. \chapter{Introduction} \epigraph{\emph{There are three rules for writing the novel. Unfortunately, no one knows what they are.}}{W. Somerset Maugham.} \section{Irreversible stochastic processes} Many phenomena in natural sciences such as biology, chemistry and physics, are modelled by stochastic processes. In this thesis, we encounter for instance stochastic models of molecular motors~\cite{JulicherAjdariProst1997,KolomeiskyFisher07,Kolomeisky13}. Various other examples may be found in the monograph of Risken on Fokker-Planck equations~\cite[Chapters~1,~3~and~12]{Risken1996}. The stochasticity is usually introduced in order to model the effect of noise in the dynamical systems. Our general objective in the works presented in this thesis is to analyse the dynamics of several examples of stochastic processes. \smallskip Frequently, the dynamics simplifies in a certain limit where it becomes predictable. An example of such a simplification is the transition from microscopic to macroscopic scales. To illustrate this transition, imagine we would see the world only through a strong microscope. Then a familiar phenomenon such as a glas of water would all of a sudden appear complicated. Peering into the glas with our microscope, we observe the particles erratically moving back and forth, bouncing off and chasing each other in an unpredictable way. However, the moment we lay aside the microscope, this microscopic chaos disappears from our view; on the macroscopic scale, the density of particles does not evolve randomly, but becomes predictable. When describing the particle density as a stochastic process, we should find that this stochastic process becomes deterministic in the limit of infinitely many particles. \smallskip There is a vast activity in probability theory and analysis to investigate mathematical theories of both microscopic and macroscopic dynamics. In particular, the focus lies on deriving a relationship between the dynamics at micro- and macroscales. Liggett~\cite{Liggett2004} as well as Kipnis and Landim~\cite{KipnisLandim1998} review and summarize works on interacting particle systems. Typically, the stochastic dynamics on the microscale incorporates basic features such as repulsion or attraction between particles~(for instance, the exclusion or the inclusion processes). A common characteristic of the stochastic models is that in the limit of infinitely many particles, the particle density evolves deterministically according to a partial differential equation, such as the diffusion equation. \smallskip Phenomena on the macroscopic scale such as first-order phase transitions originate from their underlying microscopic dynamics and may be explained using such micro-macro connections. More background and examples on this matter may be found in the books of Berglund and Gentz about noise-induced phenomena~\cite{BerglundGentz2005} and of Bovier and den Hollander on metastability~\cite{BovierDenHollander2016}. We remark that the randomness in the microscopic stochastic models is often rather put in by hand than derived from first principles. This point of view builds up on two aspects coming together. First, the modelled system is chaotic in the sense of being highly sensitive towards the initial condition. Second, we have only partial knowledge about the initial condition. The system's behaviour appears to be random if both aspects, chaos and ignorance, come together. In this sense, the stochastic system may be seen as the approximation of a chaotic deterministic system. We refer to Bricmont~\cite{Bricmont1996} for more background on chaos. \smallskip In this thesis, we analyse irreversible stochastic processes by means of large deviation theory. Our central goals are to derive their limiting dynamics, and to characterize their fluctuations around this limiting dynamics by means of Lagrangian rate functions. As we shall further discuss at the end of Section~\ref{intro:sec:large-deviatoin-theory}, we are motivated by the fact that while reversible processes lead via large deviation theory to gradient flows, it is an open question of which variational formulations can, in principle, be derived for irreversible processes. \smallskip In Section~\ref{intro:sec:large-deviatoin-theory}, we introduce our main tool for the analysis of irreversible processes, large deviation theory. Then we give examples that clarify the concepts of pathwise large deviation principles and Lagrangian rate functions. In Section~\ref{intro:sec:overview-of-the-thesis}, we give a more detailed overview of the thesis. In Chapter~2, we provide an introduction to our main method for proving large deviation principles, the Feng-Kurtz method~\cite{FengKurtz2006}. In Chapter~3, we consider stochastic models of walking molecular motors. In Chapter~4, we analyse a Markov chain Monte Carlo method based on the irreversible zig-zag sampler. In Chapters~5 and~6, our interest lies in deriving---by means of large deviation principles---limiting evolution equations of mean-field interacting particles that are coupled to fast external processes. In Chapter~7, we consider a limit problem of variational structures of certain PDEs. Finally, we discuss our results in Chapter~\ref{chapter:discussion}. \section{Large deviation theory} \label{intro:sec:large-deviatoin-theory} The first unified treatment of large deviation theory in the sense of an abstract framework is attributed to Srinivasa Varadhan, who laid the ground for decades of active mathematical research by his landmark paper~\cite{Varadhan1966}. Varadhan was honored in 2007 with the Abel Prize "for his fundamental contributions to probability theory and in particular for creating a unified theory of large deviations". Numerous works have enriched the scope of large deviation theory by connecting it to other mathematical fields and applications in natural sciences. The most commonly used techniques for studying large deviations are summarized in a number of different books and papers; we only give an incomplete list here. Varadhan relates among other things function space integrals with large deviations in his lectures~\cite{Varadhan1984}. Freidlin and Wentzell were the first to explore pathwise large deviations of stochastic processes~\cite{FreidlinWentzell1998}. Ellis shows the relation of large deviations and statistical mechanics~\cite{Ellis1985}. Deuschel and Strook introduced the term \emph{exponential tightness}~\cite{DeuschelStroock1989}. Numerous abstract techniques that are frequently used in large deviation theory are presented by Dembo and Zeitouni~\cite{DemboZeitouni1998}. A concise overview of large deviations with many examples may be found in the lectures of den Hollander~\cite{denHollander2000}. Bovier and den Hollander also give a brief overview in their book on metastability~\cite[Chapter~6]{BovierDenHollander2016}. Recent monographs focusing on stochastic processes are the semigroup approach of Feng and Kurtz~\cite{FengKurtz2006}, and the weak-convergence approach initiated by Dupuis and Ellis~\cite{DupuisEllis1997}, which Budhiraja and Dupuis extend in~\cite{BudhirajaDupuis2019}. \smallskip In this section, we first exemplify the general definition of a large deviation principle. The first example is a simple observation of \emph{exponential decay} of probabilities. With the second example, we illustrate a \emph{concentration effect} that occurs \emph{exponentially}, and furthermore motivate the notion of \emph{large deviations}. The examples provide a useful mental image for interpreting the general definition. For further reading and examples suitable for familiarization, we refer to Richard Ellis' beautiful note on Boltzmann's discoveries~\cite[Section~3]{Ellis1999}, where he illustrates how relative entropies arise naturally from Stirling's formula. Further illustrating examples may also be found in Ellis' lectures on large deviations~\cite{Ellis1995}, and in particular in Hugo Touchette's review~\cite[Section~2]{Touchette2009}. We also refer to Terence Tao's note~\cite{Tao2015_275A} for a short introduction to the mathematical notions from probability theory we use below. \smallskip After having introduced the concept of a large deviation principle, we will specialize further to the setting of this thesis: pathwise large deviations for stochastic processes. We illustrate by means of a classical example some interesting aspects of a pathwise large deviation principle, with a focus on the so-called \emph{action-integral representation} of the rate function. \newpage \begin{example*} If we toss a fair coin~$n$ times, the probability of observing "only heads" is \begin{equation*} \mathbb{P}\left(\text{only heads}\right) = \left(\frac{1}{2}\right)^n = e^{-n \log 2}. \end{equation*} Let us point out the following observations: \begin{enumerate}[$\bullet$] \item If $n$ is large, the event "only heads" is \emph{unlikely} or \emph{improbable}. \item As we let $n$ grow, the event "only heads" becomes \emph{increasingly} unlikely. \item The probability of observing "only heads" is \emph{exponentially small} with respect to~$n$. The event "only heads" decays exponentially with rate~$\log 2$. \end{enumerate} \end{example*} \begin{example*}\label{ex:Gaussian-rv} Let~$X_1,X_2,\dots$ be a sequence of~i.i.d. real-valued random variables. Suppose each~$X_i$ is normally distributed with mean~$\mu\in\mathbb{R}$ and variance one, \begin{equation*} \mathbb{P}\left(X_i \in A\right) = \int_A \rho(x)\, \mathrm{d} x,\quad \rho(x)= \frac{1}{\sqrt{2\pi}}e^{-(x-\mu)^2/2}. \end{equation*} Let us focus on the behaviour of their partial sums $S_n:=\sum_{i=1}^nX_i$ for large~$n$. The probability distribution~$\rho_n$ of the averages~$\frac{1}{n}S_n$ is depicted in~Figure~\ref{fig:gaussians_concentrating}. \begin{figure}[!htbp] \centering {\labellist \pinlabel $x$ at 1050 50 \pinlabel $\rho_n(x)=\sqrt{\frac{n}{2\pi}}\,e^{-n(x-\mu)^2/2}$ at 100 400 \pinlabel $\mu$ at 525 -25 \pinlabel {\color{dark_green}{$n=250$}} at 670 430 \pinlabel {\color{red_one}{$n=50$}} at 670 220 \pinlabel {\color{dark_blue}{$n=10$}} at 750 100 \endlabellist \centering \includegraphics[scale=.2]{normal_distr_n_10_50_250} } \caption{ The probability distribution~$\rho_n(x)$ of the averages~$\frac{1}{n}S_n$. As~$n$ increases, the probability distribution concentrates around the mean~$\mu$. } \label{fig:gaussians_concentrating} \end{figure} We observe a concentration effect of the distribution around the mean as~$n$ increases. That means for large~$n$, we are likely to observe~$\frac{1}{n}S_n\approx \mu$. To summarize this concentration effect, let~$\varepsilon>0$, and write~$B_\varepsilon(\mu):=(\mu-\varepsilon,\mu+\varepsilon)$ for the small interval around~$\mu$. In accordance with the weak law of large numbers, we have \begin{equation} \label{intro:ex2:LLN} \mathbb{P}\left(\frac{1}{n}S_n\in B_\varepsilon(\mu)\right) \xrightarrow{n\to\infty} 1. \end{equation} A natural question is: how fast does the distribution of the averages concentrate around the mean as~$n$ tends to infinity? Let us show that there is a rate with which it concentrates \emph{exponentially}. We abbreviate the quadratic function in the exponent of~$\rho_n$ by~$\mathcal{I}(x):=(x-\mu)^2/2$. For~$\varepsilon>0$, we want to estimate~$\mathbb{P}\left((1/n)S_n \notin B_\varepsilon(\mu)\right)$. Using the formula of the probability density~$\rho_n$ and exploiting its symmetry, we find \begin{align}\label{intro:eq:Ex2:log-of-prob} \frac{1}{n}\log \mathbb{P}\left(\frac{1}{n}S_n\notin B_\varepsilon(\mu)\right) = \frac{1}{n}\log\left(2\, \sqrt{\frac{n}{2\pi}}\right) + \frac{1}{n}\log \int_{\mu+\varepsilon}^{\infty} e^{-n \,\mathcal{I}(x)}\, \mathrm{d} x. \end{align} As~$n\to\infty$, the first term vanishes. In the second term, the lowest value of the exponent dominates the integral. The precise statement is the Laplace principle; for a set~$A$ and a function~$g$ bounded from below, \begin{equation*} \frac{1}{n}\log\int_A e^{-n\,g(x)}\, \mathrm{d} x \xrightarrow{n\to\infty}\sup_{x\in A} \left(-g(x)\right) = -\inf_{x\in A}g(x). \end{equation*} With these remarks, we find \begin{align*} \lim_{n\to\infty}\frac{1}{n}\log \mathbb{P}\left(\frac{1}{n}S_n\notin B_\varepsilon(\mu)\right) = - \inf_{x\in(\mu+\varepsilon,\infty)}\mathcal{I}(x) = -\frac{\varepsilon^2}{2}. \end{align*} Hence for any~$\delta>0$ (smaller than~$\varepsilon^2/2$), we find for all~$n$ large enough that \begin{equation*} \mathbb{P}\left(\frac{1}{n}S_n\notin B_\varepsilon(\mu)\right) \leq \exp\left\{-n \left[\frac{1}{2}\varepsilon^2 - \delta\right]\right\}. \end{equation*} In this sense the concentration effect~\eqref{intro:ex2:LLN} occurs exponentially. With similar reasoning, we find for any closed~$A\subseteq \mathbb{R}$ not containing~$\mu$, \begin{equation}\label{intro:eq:ex2-log-P-converges} \frac{1}{n}\log\mathbb{P}\left(\frac{1}{n}S_n\in A\right) \xrightarrow{n\to\infty} - \inf_{x\in A}\mathcal{I}(x). \end{equation} Therefore, with~$\mathrm{r}(A):=\inf_A\mathcal{I}(\cdot)$, we find for~$\delta>0$ that for~$n$ sufficiently large, \begin{equation*} \mathbb{P}\left(\frac{1}{n}S_n\in A\right)\leq e^{-n \left(\mathrm{r}(A)-\delta\right)}. \end{equation*} Let us summarize: in regions~$A$ away from the mean, the probability mass is exponentially small with respect to~$n$, and the exponential decay rate~$r(A)$ is the minimum of the quadratic function~$\mathcal{I}(\cdot)$ evaluated over~$A$. \smallskip We close this example by pointing out in what sense the above considerations are related to large deviations. The random variable~$\sqrt{n}\left((1/n)S_n-\mu\right)$ is normally distributed around zero with variance one. This means that observations of the type~$S_n \approx n\mu + \sqrt{n}\,x$ are normally distributed for large~$n$. This is a deviation from what we expect by~$\sqrt{n}\,x$, and in that sense, fluctuations of order~$\sqrt{n}$ are "normal" (the generalization of this statement is the central limit theorem). For any~$\varepsilon$, the event~$\frac{1}{n}S_n\notin B_\varepsilon(\mu)$ corresponds to observing events of the type~$S_n\approx n\mu + n\,\varepsilon$. This is a deviation of order~$n$, which is no longer captured by the central limit theorem. Therefore, these type of events are called large deviations. The generalization of these observations beyond this example ($X_i$ that are not normally distributed) is known as Cramér's theorem~\cite{Cramer1938,CramerTouchette2018}, and we refer to~\cite[Chapter~I and Theorem~I.4]{denHollander2000} for more details.\qed \end{example*} \subsubsection{Precise formulation of a large deviation principle.} We typically consider sequences of probability measures~$\mathrm{P}_n$ on a state space~$\mathcal{X}$, concentrating at a single element~$x\in\mathcal{X}$. Above in Example~2, the measures~$\mathrm{P}_n$ correspond to the distribution of the averages~$\frac{1}{n}S_n$ with state space~$\mathcal{X}=\mathbb{R}$, that means~$\mathrm{P}_n=\mathbb{P}((1/n)S_n\in \cdot)$. The single element is the mean value~$x=\mu$, and the concentration effect can be formulated as a weak law of large numbers; denoting by~$B_\varepsilon(x)$ the ball of radius~$\varepsilon>0$ around~$x$, \begin{equation*} \mathrm{P}_n\left(B_\varepsilon(x)\right)\xrightarrow{n\to\infty} 1, \end{equation*} and for any Borel set~$A\subseteq\mathcal{X} $ whose closure does not contain~$x$, \begin{equation*} \mathrm{P}_n(A) \xrightarrow{n\to\infty} 0. \end{equation*} Frequently, we can observe an exponential decay of these probabilities; at least intuitively, we find a rate~$\mathrm{r}(A)$ depending in the set~$A$ with which for large~$n$, \begin{equation*} \mathrm{P}_n(A) \approx e^{-n \cdot \mathrm{r}(A)}. \end{equation*} One attempt of making this rigorous would be to say: a sequence of probability measures~$\mathrm{P}_n$ satisfies a large deviation principle if there is a rate~$\mathrm{r}:\mathcal{B}(\mathcal{X})\to[0,\infty)$ with which for any Borel subset~$A\subseteq\mathcal{X}$, \begin{equation}\label{eq:intro:LDP:log-conv-to-r-A} \frac{1}{n}\log\mathrm{P}_n(A) \xrightarrow{n\to\infty} -\mathrm{r}(A). \end{equation} Furthermore, the example from above suggests that this rate can be characterized by a so-called rate function~$\mathcal{I}:\mathcal{X}\to[0,\infty]$ as \begin{equation}\label{eq:intro:LDP:rate-inf-RF} \mathrm{r}(A) = \inf_{x\in A} \mathcal{I}(x). \end{equation} Varadhan's definition is a suitable more general form of~\eqref{eq:intro:LDP:log-conv-to-r-A}. We first give his definition here. A complete separable metric space~$\mathcal{X}$ is called a \emph{Polish space}. We call a map~$\mathcal{I}:\mathcal{X}\to[0,\infty]$ a \emph{rate function} if the sublevel sets~$\{x\in\mathcal{X}\,:\,\mathcal{I}(x)\leq C\}$ are compact for all~$C\geq 0$. In the literature, such rate functions are called good rate functions---since all rate functions we encounter in this thesis are good, we adopt the convention of~\cite{BudhirajaDupuis2019} and omit the adjective "good". For a Borel subset~$A\subseteq\mathcal{X}$, we let~$\mathrm{int}(A)$ be its interior and~$\mathrm{clos}(A)$ be its closure. \begin{definition}[Large Deviation Principle]\label{def:LDP} For~$n = 1,2,\dots,$ let~$\mathrm{P}_n$ be a probability measure on a Polish space~$\mathcal{X}$. We say the family of measures $\{\mathrm{P}_n\}_{n\in \mathbb{N}}$ satisfies a \emph{large deviation principle} with rate function $\mathcal{I}:\mathcal{X} \to [0,\infty]$ if for any Borel subset~$A\subseteq \mathcal{X}$, \begin{align*} -\inf_{x\in \mathrm{int}(A)}\mathcal{I}(x) &\leq \liminf_{n\to\infty}\frac{1}{n}\log\mathrm{P}_n(A)\\ &\leq\limsup_{n\to\infty}\frac{1}{n}\log\mathrm{P}_n(A) \leq -\inf_{x\in\mathrm{clos}(A)}\mathcal{I}(x). \tag*\qed \end{align*} \end{definition} Let~$X^n$ be a random variable with law~$\mathrm{P}_n\in\mathcal{P}(\mathcal{X})$. We say that the sequence of random variables~$\{X^n\}_{n\in\mathbb{N}}$ satisfies a large deviation principle if the sequence of their laws~$\{\mathrm{P}_n\}_{n\in\mathbb{N}}$ does. In this case, we write~$\mathrm{P}_n=\mathbb{P}\left(X^n\in\cdot\right)$ for the law. Furthermore, we abbreviate the statement that~$\{X^n\}_{n\in\mathbb{N}}$ satisfies a large deviation prinicple with rate function~$\mathcal{I}:\mathcal{X}\to[0,\infty]$ as follows: \begin{equation}\label{intro:LDP-written-in-local-form} \mathbb{P}\left(X^n\approx x\right) \sim e^{-n\,\mathcal{I}(x)},\quad n\to\infty. \end{equation} We alert the reader that the tilde has no mathematical precise meaning. Equation~\eqref{intro:LDP-written-in-local-form} should rather be read as a total statement summarizing all the essential information; the probability that~\emph{$X^n$ is close to~$x$} (~$X^n\approx x$) decays \emph{exponentially} as~$n$ tends to infinity (~$\sim e^{-n\,\mathcal{I}(x)}$). The notation is motivated by the fact that \begin{equation*} \lim_{\varepsilon\to 0} \limsup_{n\to\infty}\frac{1}{n}\log \mathbb{P}\left(X^n\in B_\varepsilon(x)\right) = -\mathcal{I}(x). \end{equation*} Let us mention how a large deviation principle really corresponds to the exponential decay of probabilities. If the rate function is continuous, then we recover~\eqref{eq:intro:LDP:log-conv-to-r-A} for Borel subsets~$A\subseteq\mathcal{X}$ satisfying~$\mathrm{clos}(\mathrm{int}(A))=\mathrm{clos}(A)$~\cite[Corollary~1]{Ellis1999}, and in particular for any~$\varepsilon>0$, if~$n$ is large enough, \begin{equation*} e^{-n(\mathrm{r}(A)+\varepsilon)} \leq \mathrm{P}_n(A) \leq e^{-n(\mathrm{r}(A)-\varepsilon)}. \end{equation*} In general, if a non-trivial rate function has a unique minimizer~$x$, then for a Borel set~$A$ whose closure does not contain~$x$, we have~$\mathrm{r}(\mathrm{clos}(A))>0$, and the limsup bound implies exponential decay of~$\mathrm{P}_n(A)$~\cite[Corollary~2]{Ellis1999}. \smallskip We may motivate Varadhan's definition of a large deviation principle in terms of the liminf- and limsup bounds by analogy to weak convergence of probability measures. To that end, consider~$\mathrm{P}_n$ and~$\mathrm{P}\in\mathcal{P}(\mathcal{X})$. The measures~$\mathrm{P}_n$ are said to converge weakly to~$\mathrm{P}$ if for any Borel set~$A\subseteq\mathcal{X}$, \begin{equation}\label{eq:intro:LDP:liminf-limsup-weak-convergence} \mathrm{P}(\mathrm{int}(A))\leq \liminf_{n\to\infty}\mathrm{P}_n(A) \leq \limsup_{n\to\infty}\mathrm{P}_n(A) \leq \mathrm{P}(\mathrm{clos}(A)). \end{equation} Demanding "pointwise" convergence~$\mathrm{P}_n(A)\to \mathrm{P}(A)$ for all~$A$ would exclude examples such as~$\mathrm{P}_n = \delta_{1/n}$ and~$\mathrm{P}=\delta_0$ with~$\mathcal{X}=\mathbb{R}$. Also in Example~2 from above with~$\mathrm{P}_n$ the law of~$(1/n)S_n$ and~$\mathrm{P}=\delta_\mu$, the singleton set~$A=\{\mu\}$ violates this strong convergence condition. The notion of weak convergence applies to many interesting examples while still providing useful information. By the Portmanteau Theorem~\cite[Theorem~2.1]{Billingsley1999}, weak convergence is equivalent to the convergence of expectations;~$\int f\, \mathrm{d}\mathrm{P}_n\to\int f\, \mathrm{d}\mathrm{P}$ for any function~$f\in C_b(\mathcal{X})$. An equivalent formulation is to demand the liminf-bound for all open sets and the limsup-bound for all closed sets~\cite[Theorem~2.1]{Billingsley1999}. \smallskip Next, we motivate the fact that the exponential decay rates~$\mathrm{r}(A)$ are characterized by minimizing a rate function~$\mathcal{I}(\cdot)$ over the region~$A$. For two real-valued positive sequences $a_n,b_n$, suppose $a_n>b_n$ for all $n$ sufficiently large. Then \begin{equation*} \left|\frac{1}{n}\log\left(a_n+b_n\right) - \frac{1}{n}\log (a_n)\right| = \frac{1}{n}\log\left(1 + b_n/a_n\right) \leq \frac{1}{n}\log 2\xrightarrow{n\to\infty} 0. \end{equation*} Hence the maximal value~$a_n=\max(a_n,b_n)$ dominates the sum on the logarithmic scale. This fact is known as the so-called \emph{the-winner-takes-it-all} principle. Now suppose a set~$A$ satisfies~\eqref{eq:intro:LDP:log-conv-to-r-A} with some rate~$\mathrm{r}(A)>0$, and suppose we can decompose~$A=A_1\cup A_2$ into disjoint sets~$A_1,A_2$ satisfying~\eqref{eq:intro:LDP:log-conv-to-r-A} as well. Then using additivity,~$\mathrm{P}_n(A_1\cup A_2)=\mathrm{P}_n(A_1)+\mathrm{P}_n(A_2)$, we find by the winner-takes-it-all principle \begin{equation*} \frac{1}{n}\log\mathrm{P}_n(A_1\cup A_2) \xrightarrow{n\to\infty} -\min\left\{\mathrm{r}(A_1),\mathrm{r}(A_2)\right\}. \end{equation*} Therefore, we may expect the exponential rates to be given by~\eqref{eq:intro:LDP:rate-inf-RF}. Similar to the definition of weak convergence~\eqref{eq:intro:LDP:liminf-limsup-weak-convergence}, passing to the interior and closure in Definition~\ref{def:LDP} is necessary in order for the limits to hold for any Borel set~$A$. \smallskip A large deviation principle is a type of concentration inequality, and therefore implies a strong type of convergence of random variables. The minimizers of the rate function are the elements corresponding to the strong law of large numbers, as demonstrated by the following theorem. For a rate function~$\mathcal{I}:\mathcal{X}\to[0,\infty]$, we denote by $\{\mathcal{I} = 0 \}$ the set of its global minimizers. \begin{theorem} \label{thm:math-formulation-LDP:LDP-implies-as} For $n=1,2\dots$, let $X^n$ be a random variable taking values in a Polish space~$(\mathcal{X},d)$. Suppose that~$\{X^n\}_{n \in \mathbb{N}}$ satisfies a large deviation principle with rate function $\mathcal{I}$. Then $d(X^n,\{\mathcal{I} = 0\}) \to 0$ almost surely as $n \to \infty$. \end{theorem} This theorem can be proven via the limsup-bound of the large deviation principle, and applying the Borel-Cantelli Lemma. In many examples, we can verify uniqueness of the minimizer~$x_0$ of a rate function. Then by Theorem~\ref{thm:math-formulation-LDP:LDP-implies-as}, a large deviation principle implies~$X^n\to x_0$ almost surely. We point out that the rate function in Theorem~\ref{thm:math-formulation-LDP:LDP-implies-as} is assumed to have compact sub-level sets. \smallskip Next to the law of large numbers, the central limit theorem can as well be understood from a large deviation principle. Specialising to $E=\mathbb{R}$, a formal Taylor expansion around a minimizer $x_0$ of the rate function yields for $x\approx x_0$, \begin{equation*} \mathbb{P}\left(X^n\approx x\right) \sim e^{-n\left[\mathcal{I}(x_0) + (x-x_0)\mathcal{I}'(x_0) + \frac{1}{2}(x-x_0)^2\mathcal{I}''(x_0)\right]} = e^{-n \mathcal{I}''(x_0)(x-x_0)^2/2}. \end{equation*} In that sense, fluctuations around minimizers of the rate function are normally distributed. The curvature of the rate function is inverse proportional to the variance: if the rate function is rapidly growing near the minimizer, then the variance is small, and vice versa. Bryc makes this connection precise in~\cite{Bryc1993}. \subsubsection{Pathwise large deviations in stochastic systems.} In this thesis, we will mostly focus our attention on stochastic processes~$X^n$ that become deterministic in the limit of a parameter~$n$ tending to infinity. In particular, we are interested in situations in which this transition to a deterministic limit occurs exponentially in the sense of a large deviation principle. In this context, we speak of \emph{pathwise} large deviations, because we make statements about the paths of~$X^n$. Here, we illustrate with a classical example what makes a pathwise large deviation principle interesting. In the example, we will point out the following two central features. First, the \emph{typical behaviour}: the expected trajectory of~$X^n$, corresponding to the law of large numbers limit, is recovered from the minimizer of the rate function. Second, the \emph{least-action principle}: if the stochastic process realizes an event far away from this expected trajectory, the most likely way in which this event occurs can be determined by minimizing the rate function. \begin{example*} Let $E=\mathbb{R}$,~$x_0\in E$. For $n\in\mathbb{N}$, consider the process~$X^n$ solving \[ \mathrm{d} X^n_t = \frac{1}{\sqrt{n}}\, \mathrm{d} B_t,\quad X^n(0) =x_0, \] where~$B_t$ is the standard Brownian motion. For large~$n$, the process~$X^n$ corresponds to a small-diffusion regime. The transition probabilities $P_n(t,x, \mathrm{d} y)$ of~$X^n$ are normal distributions, \[ \mathbb{P}\left(X^n(t)\in \mathrm{d} y\,|\,X^n(0)=x\right) \stackrel{\mathclap{\text{def}}}{=} P_n(t,x, \mathrm{d} y) = \sqrt{\frac{n}{2\pi t}}\,e^{-n(y-x)^2/2t}\, \mathrm{d} y. \] We fix a time interval~$[0,T]$. Let~$\mathcal{X}=C_\mathbb{R}[0,T]$ be the set of continuous maps~$x:[0,T]\to\mathbb{R}$, equipped with the uniform norm. We consider the~$X^n$ as random variables in~$\mathcal{X}$, and are interested in the behaviour of~$X^n$ in the limit~$n\to\infty$. \smallskip For large values of $n$, typical realizations of~$X^n$ are shown in Figure~\ref{fig:small-diffusion-10-realizations}. \begin{figure}[!htbp] \centering {\labellist \pinlabel $t$ at 1150 50 \pinlabel $x_0$ at -40 250 \pinlabel $0$ at -40 50 \pinlabel $X^n_t(\omega)$ at 100 500 \endlabellist \centering \includegraphics[scale=.2]{small_diff_10_realiz_ThickLines} } \caption{ Ten realizations~$X^n(\omega)$ of the stochastic process~$X^n$ with deterministic initial condition~$X^n_0=x_0$. } \label{fig:small-diffusion-10-realizations} \end{figure} Judging by eye, most realizations are close to the constant path $\overline{x}\equiv x_0$ determined by the initial starting point~$x_0$. Indeed, for any~$t\in[0,T$], the one-dimensional time marginals~$X^n(t)$ are converging to~$x_0$, as can be seen from the transition probabilities. In fact, the probability of observing realizations of~$X^n$ that deviate from the constant path~$\overline{x}(t) := x_0$ vanishes exponentially fast as~$n\to\infty$: the path measures~$\mathrm{P}_n := \mathbb{P}\left(X^n\in \cdot\right)\in\mathcal{P}(\mathcal{X})$ satisfy a large deviation principle with rate function ~$\mathcal{I}:\mathcal{X}\to[0,\infty]$ given by \begin{equation}\label{intro:eq:RF-Schilders-Theorem} \mathcal{I}(x) = \int_0^T \frac{1}{2}|\partial_t x(t)|^2\, \mathrm{d} t. \end{equation} This fact is known as Schilder's theorem (e.g.~\cite[Theorem~5.2.3]{DemboZeitouni1998}), which is a special case of the Freidlin-Wentzell theorem (e.g.~\cite[Theorem~5.6.3]{DemboZeitouni1998}). If a trajectory~$x$ is not absolutely continuous or~$x(0)\neq x_0$, then~$\mathcal{I}(x)=\infty$. As we discussed below the definition of a large deviation principle, an informal but useful interpretation is to say that for a path~$x$ satisfying $x(0)=x_0$, we have \begin{equation}\label{intro:eq:LDP-Schilders-Theorem} \mathbb{P}\left(X^n \approx x\right) \sim e^{-n \,\mathcal{I}(x)}, \quad \text{as}\;n\to\infty. \end{equation} Alternatively, let~$B_\varepsilon(x)$ be the ball of radius~$\varepsilon$ around~$x$ with respect to the uniform norm in~$\mathcal{X}$. Then with~$\mathcal{I}(B_\varepsilon(x)):=\inf_{B_\varepsilon(x)}\mathcal{I}$, \begin{equation*} \mathbb{P}\left(X^n\in B_\varepsilon(x)\right)\sim \exp\{-n\, \mathcal{I}(B_\varepsilon(x))\},\quad \text{as}\;n\to\infty. \end{equation*} In terms of the topology on~$\mathcal{X}$, this means the probability of~$X^n$ being inside an~$\varepsilon$-tube around~$x$ decays exponentially with respect to~$n$. \smallskip Let us point out two interesting conclusions from the large deviation principle~\eqref{intro:eq:LDP-Schilders-Theorem}. First, suppose that~$\mathcal{I}(x)>0$. Then the probability of~$X^n$ being close to~$x$ with respect to the uniform norm decays exponentially with increasing~$n$. Since~$\mathcal{I}(x)>0$ whenever~$x$ has a non-zero velocity, we conclude that realizations of~$X^n$ are with high probability close to the minimizer~$\overline{x}$ of the rate function~\eqref{intro:eq:RF-Schilders-Theorem}. The minimizer is unique and given by the constant path~$\overline{x} \equiv x_0$. This identifies~$\overline{x}$ as the law of large number limit of~$X^n$, by Theorem~\ref{thm:math-formulation-LDP:LDP-implies-as} from above. \smallskip Second, we illustrate the least-action principle. Consider a closed subset of trajectories~$A\subseteq\mathcal{X}$ not containing~$\overline{x}$. This set represents an atypical event. Suppose~$x$ is the unique trajectory minimizing the rate function evaluated over~$A$, \begin{equation*} \mathcal{I}(x) = \min_{y\in A} \mathcal{I}(y). \end{equation*} Then if the event~$A$ occurs, it will most likely be realized as~$X^n\approx x$. More precisely, for any~$\varepsilon>0$, we have by~\cite[Theorem~1.4]{BudhirajaDupuis2019} that \begin{equation*} \mathbb{P}\left(X^n\in B_\varepsilon(x)\,|\,X^n\in A\right) \xrightarrow{n\to\infty} 1. \end{equation*} For instance, fix~$C>0$ and consider~$A=\{x\in\mathcal{X}\,:\,x(0)=x_0,\,x(T)\geq x_0+C\}$. This event corresponds to~$X^n$ exceeding the threshold~$x_0+C$ at final time~$T$. To determine the most likely way in which this rare event occurs, we have to solve the corresponding minimization problem with rate function~\eqref{intro:eq:RF-Schilders-Theorem}, \begin{equation*} \mathcal{I}(x) = \min_{y\in A} \int_0^T \frac{1}{2}|\partial_t y(t)|^2\, \mathrm{d} t. \end{equation*} Solving the Euler-Lagrange equation with the boundary conditions~$y(0)=x_0$ and~$y(T) = \lambda$ (any~$\lambda\geq C$), we find that the minimizing trajectory~$x$ is the path with constant velocity~$C/T$, that is~$x(t) = x_0 + t\,C/T$. \qed \end{example*} The example illustrates in what sense a large deviation principle for stochastic processes contains more information than the law of large numbers. We have an exponential estimate on the probabilities of deviating from the law of large number limit, and the rate function contains information about the rare-event behaviour. In the example, the Brownian motion exceeds the threshold $x_0+C$ most likely by following the path with a constant slope. Determining the rare-event behaviour for more involved examples is an interesting topic, but we will not study it in this thesis. For more background on the least-action principle, we refer to the following papers and the references therein. Weinan, Ren and Vanden-Eijnden use Freidlin-Wentzell theory to study rare events in a couple of perturbed dynamical systems, including for instance the one-dimensional Ginzburg-Landau model~\cite{WeinanRenVanden-Eijnden2004}, and introduced the string method~\cite{WeinanRenVanden-Eijnden2002}. Metzner, Sch{\"u}tte and Vanden-Eijnden provide an overview of illustrating examples~\cite{MetznerSchutteVanden-Eijnden2006}, and Grafke and Vanden-Eijnden explore numerical methods for various rare-event algorithms~\cite{GrafkeVanden-Eijnden2019}. \smallskip The form of the rate function~\eqref{intro:eq:RF-Schilders-Theorem} is a special case of a more general principle. For many examples, we can derive rate functions of the form \begin{equation}\label{intro:eq:RF-action-integral} \mathcal{I}(x) = \int_0^T \mathcal{L}(x(t),\partial_t x(t))\, \mathrm{d} t. \end{equation} The map~$\mathcal{L}:\mathbb{R}\times\mathbb{R}\to[0,\infty]$ appearing in the rate function is called the \emph{Lagrangian}. In the above example,~$\mathcal{L}(x,v) = v^2/2$ is independent of~$x$. We call~\eqref{intro:eq:RF-action-integral} an \emph{action-integral representation} or~\emph{Lagrangian rate function}, which is motivated from the least-action principle that we discussed above. If a process~$X^n$ satisfies a large deviation principle with a Lagrangian rate function, then its limiting dynamics~$\overline{x}=\overline{x}(t)$ can be determined by solving~$\mathcal{L}(\overline{x}(t),\partial_t\overline{x}(t))=0$. \smallskip For more involved stochastic processes, it is often difficult to derive an exact characterization of their limiting dynamics in the first place. In these situations, deriving the Lagrangian provides one way of finding a good characterization. This is what we do in the first part of this thesis, where we are interested in two main aspects: deriving Lagrangians and extracting useful information from them. A common feature making the stochastic processes that we study interesting is their irreversibility with respect to time. We close this chapter by pointing out our motivation for considering irreversible processes. \subsubsection{The role of irreversibility---an open question.} Jordan, Kinderlehrer and Otto demonstrated that the solution of the diffusion equation is the steepest descent of the relative entropy~\cite[Theorem~5.1]{JordanKinderlehrerOtto1998}. Their variational formulation is motivated by the backward Euler approximation scheme, and represents an example of a \emph{gradient flow}---we introduce these concepts in more detail in Section~\ref{GF_NGF:sec:GF} of Chapter~\ref{chapter:GF-to-NGF}. A special role in the gradient flow is played by the Wasserstein distance between probability measures, which serves as the metric in the gradient flow. Therefore, this variational formulation is called the Wasserstein gradient flow. Such a variational structure involving the Wasserstein distance can be recognized in many other PDEs, e.g.~\cite{AmbrosioGigliSavare2008,BlanchetCalvezCarrillo2008,CarrilloDiFrancescoFigalliLaurentSlepcev2011,CarrilloYoungPilTse2019,CarlenGangbo2004,Gigli2010,GianazzaSavareToscani2009,MatthesMcCannSavare2009,Savare2007,Lisini2009}. Many of these PDEs arise from stochastic particle systems, but it is a priori not clear how to find a corresponding gradient flow. Therefore, it is helpful to know how to derive the corresponding Wasserstein gradient flows from the microscopic dynamics. A recent example of such a derivation is the study of Gavish, Nyquist and Peletier~\cite{GavishNyquistPeletier2019} about hard-rod systems. \smallskip Adams, Dirr, Peletier and Zimmer derived the Wasserstein gradient flow for the diffusion equation by means of large deviation theory~\cite[Theorem~3]{AdamsDirrPeletierZimmer2011}, by considering the empirical density of independent Brownian motions and sending the number of particles to infinity. Soon after, Mielke, Peletier and Renger revealed that the gradient flow is a consequence of microscopic \emph{reversibility} of the Brownian motions~\cite{MielkePeletierRenger2014}. The argument exploits an action-integral form of the rate function. Let us briefly state in what sense. For~$n$ independent Brownian motions~$\{B^i\}_{i=1,\dots,n}$, the empirical particle density defined by~$\rho^n = \frac{1}{n}\sum_{i=1}^n \delta_{B^i}$ is a measure-valued process that converges in the narrow topology to the solution of the diffusion equation as~$n\to\infty$. That means~$\rho^n\rightharpoonup\rho$, where~$\partial_t\rho = \Delta \rho$. The sequence also satisfies a large deviation principle in~$\mathcal{X}=C_{\mathcal{P}(\mathbb{R})}[0,\infty)$ with a rate function given by \begin{equation}\label{intro:eq:action-RF-measure-valued-process} \mathcal{I}(\mu) = \int_0^\infty\mathcal{L}(\mu(t),\partial_t\mu(t))\, \mathrm{d} t. \end{equation} The rate function satisfies~$\mathcal{I}(\rho)=0$. We ignore here the initial conditions and do not go into details, but refer to~\cite[Theorem~13.3]{FengKurtz2006} for the precise statement. Mielke, Peletier and Renger show in~\cite[Section~4.2]{MielkePeletierRenger2014} how to decompose the Lagrangian in~\eqref{intro:eq:action-RF-measure-valued-process} in such a way that one can recognize the Wasserstein gradient-flow structure in the rate function~\eqref{intro:eq:action-RF-measure-valued-process}. \smallskip The argument that connects the rate function to a gradient flow is based on reversibility. This argument extends from the abovementioned example to a wider class of reversible Markov processes, which by large deviations give rise to so-called \emph{generalized gradient flows}~\cite{MielkePeletierRenger2014} (see also Section~\ref{GF_NGF:sec:GF} of Chapter~\ref{chapter:GF-to-NGF}). Triggered by this connection between variational structures of PDEs and large deviations, a natural question we can ask is: \emph{which variational structures can we derive from irreversible processes?} While this question is still open, we remark that the starting point for this connection in the reversible case is a Lagrangian rate function. The main questions we ask in the first part of this thesis are thus: \emph{how can we prove large deviation principles for irreversible dynamics and obtain action-integral representations of the rate functions?} \emph{How can we establish useful characterizations of the Lagrangians?} We hope that the techniques we develop by answering such questions can contribute to extending the abovementioned connection to a suitable class of irreversible processes. The study of irreversible processes is also of independent interest, since various non-equilibrium phenomena are modelled by irreversible processes; we refer to the note of Harris and Touchette~\cite[Section~1.2]{TouchetteHarris2011} for more. A broader overview on irreversibility may be found in Bricmont's note~\cite[Section~3]{Bricmont1996}. \smallskip Since we will come back to reversibility, let us close this section by formulating this property here. For a state space~$E$ and a trajectory~$\gamma\in\mathcal{X}=C_E[0,T]$, let~$\mathrm{rev}(\gamma)$ be the trajectory defined by \begin{equation*} \mathrm{rev}(\gamma)(t):= \gamma(T-t),\quad t\in [0,T]. \end{equation*} That means~$\mathrm{rev}(\gamma)$ is the time-reversed trajectory of~$\gamma$. For a Borel set of trajectories~$A\subseteq \mathcal{X}$, let~$\mathrm{rev}(A) := \{\mathrm{rev}(\gamma)\,:\,\gamma\in A\}$. For~$\mu\in\mathcal{P}(E)$, we write~$\mathbb{P}_\mu$ for the path distribution of a process~$X$ with initial distribution~$X(0)\sim \mu$. A measure~$\pi\in\mathcal{P}(E)$ is \emph{stationary} if~$\mathbb{E}_\pi f(X(t))$ is constant in time for any observable~$f=f(x)$. \begin{definition}[Reversibility]\label{intro:def:reversibility} Let~$X$ be a Markov process with path distributions~$\mathbb{P}_\mu$ and stationary measure~$\pi\in\mathcal{P}(E)$. We say~$X$ is \emph{reversible} with respect to~$\pi$ if for any Borel subset~$A\subseteq\mathcal{X}$, \begin{align} \mathbb{P}_\pi\left(X\in A\right) = \mathbb{P}_\pi\left(X\in \mathrm{rev}(A)\right). \tag*\qed \end{align} \end{definition} For illustration, an example of a reversible process is a jump process on~$\{1,2,3\}$ with uniform nearest-neighbor jump rates; its stationary measure is the uniform measure. A counterexample is a jump process on~$\{1,2,3\}$ with jumps only clockwise,~$r(1\to 2)=r(2\to 3)=r(3\to 1)>0$, and all other jump rates equal to zero. The stationary measure is also the uniform measure, but for the set~$A_\circlearrowright$ containing all trajectories only going clockwise,~$\mathrm{rev}(A_\circlearrowright)=A_\circlearrowleft$, and therefore \begin{equation*} \mathbb{P}_\pi\left(X\in A_\circlearrowright\right) = 1\quad \text{and}\quad \mathbb{P}_\pi\left(X\in \mathrm{rev}(A_\circlearrowright)\right) = 0. \end{equation*} The notion of reversibility of Definition~\ref{intro:def:reversibility} is sometimes also refered to as \emph{microscopic reversibility} or \emph{time reversibility}. For Markov processes, there are several useful equivalent characterizations of reversibility that we will work with. For instance, reversibility is equivalent to symmetry of the infinitesimal generator or the semigroup, in the sense made precise in~\cite[Proposition~5.3]{Liggett2004}. \section{Overview of the thesis} \label{intro:sec:overview-of-the-thesis} Here we outline the content of the subsequent chapters. We further detail the relation of our results to the literature in the introductory parts of the chapters. \paragraph{Chapter~\ref{chapter:LDP-via-HJ}: Large Deviations via Hamilton-Jacobi Equations.} In this chapter we demonstrate how to prove pathwise large deviation principles by exploiting the connection to Hamilton-Jacobi equations~\cite{FengKurtz2006}. The gist of this connection is that solving certain PDEs of Hamilton-Jacobi type allows us to prove an action-integral representation of the rate function involving the so-called Lagrangian. The crucial insight we take from this chapter is an algorithm that allows us to rigorously derive the Lagrangian starting from microscopic dynamics. \smallskip While the results in this chapter are not novel, some proofs simplify because we choose to illustrate all concepts in a simpler setting. The extension to theorems including the general settings are presented in the monograph of Jin Feng and Thomas Kurtz~\cite{FengKurtz2006}. We close the chapter by outlining the relation of our presentation to such general settings. \paragraph{Chapter~\ref{chapter:LDP-for-switching-processes}: Large Deviations of Switching Processes.} This chapter is based on a joint work with Mark Peletier~\cite{PeletierSchlottke2019}. Our work is inspired by a series of papers by Mirrahimi, Perthame and Souganidis about PDEs describing molecular motors~\cite{PerthameSouganidis09a, PerthameSouganidis2009Asymmetric, Mirrahimi2013}. We consider a general class of switching Markov processes that comprise the PDE models as a special case, and prove pathwise large deviation principles. The large-deviation theorems extend and generalize the results of~\cite{PerthameSouganidis09a, PerthameSouganidis2009Asymmetric, Mirrahimi2013}. The main tool we work with is the connection of large deviations to Hamilton-Jacobi equations. In particular, this connection allows us to study within the same framework multiple limit regimes as well as continuous and discrete models of molecular motors. \smallskip As an application, we show how macroscopic transport properties of molecular motors can be deduced from associated principal-eigenvalue problems. We work with variational formulas of principal eigenvalues to demonstrate that breaking detailed balance is necessary for obtaining transport. In Section~\ref{subsec:model-of-molecular-motor} we discuss an example of a continuous molecular-motor model that illustrates our more general results. \paragraph{Chapter~\ref{chapter:LDP-of-empirical-measures}: Large Deviations of Empirical Measures.} This chapter is based on a joint work with Joris Bierkens and Pierre Nyquist~\cite{BierkensNyquistSchlottke2019}. Joris Bierkens and Gareth Roberts discovered the zig-zag process as a scaling limit of the Lifted Metropolis-Hastings~\cite{BierkensRoberts2017}. The zig-zag process is an example of a piecewise deterministic Markov process in position and velocity space. The process can be designed to have an arbitrary Gibbs-type marginal probability density for its position coordinate, which makes it suitable for Monte Carlo simulation of continuous probability distributions. An important question in assessing the efficiency of this method is how fast the empirical measure converges to the stationary distribution of the process. We provide a partial answer to this question by characterizing the large deviations of the empirical measure from the stationary distribution. Based on the Feng-Kurtz approach to large deviations~\cite{FengKurtz2006}, we develop an abstract framework aimed at encompassing piecewise deterministic Markov processes in position-velocity space. We derive explicit conditions for the zig-zag process to allow the Donsker-Varadhan variational formulation of the rate function, both for a compact setting (the torus) and one-dimensional Euclidean space. \smallskip For reversible processes, Donsker and Varadhan offer an exact formula of the rate function involving the stationary measure. There is no generic formula for irreversible processes, which makes it generally harder to draw conclusions from the rate function. For the zig-zag process however, we derive an explicit expression for the Donsker-Varadhan functional for the case of a compact state space. We use this form of the rate function to address a key question concerning the optimal choice of the switching rate of the zig-zag process. We show that maximal irreversibility corresponds to the fastest possible convergence to the stationary distribution. \paragraph{Chapter~\ref{chapter:LDP-in-slow-fast-systems}: Large Deviations in Stochastic Slow-Fast Systems.} This chapter is based on a work in progress with Richard Kraaij. We give conditions for proving pathwise large deviations in stochastic slow-fast systems in the limit of time-scale separation tending to infinity. The conditions are imposed in order to solve the corresponding Hamilton-Jacobi equations. In the limit regime we consider, the convergence of the slow variable to its deterministic limit and the convergence of the fast variable to equilibrium are competing at the same scale. We cast the rate functions in action-integral form and interpret the Lagrangians in two ways: in terms of a double-optimization problem of the slow variable's velocity and the fast variable's distribution, and in terms of a principal-eigenvalue problem associated to the slow-fast system. \smallskip As an application, we provide a large-deviation theorem for the empirical density-flux pair of mean-field interacting particles coupled to fast diffusion. This system cannot be treated with classical methods. We further show how the Lagrangian can be used to derive an averaging principle from the large deviation principle. \paragraph{Chapter~\ref{chapter:CP-for-two-scale-H}: Comparison Principle for Two-Scale Hamiltonians.} This chapter is based on a joint work with Richard Kraaij~\cite{KraaijSchlottke2019}. We study the well-posedness of Hamilton-Jacobi-Bellman equations on subsets of~$\mathbb{R}^d$. The Hamiltonian consists of two parts: an internal Hamiltonian depending on an external control variable and a cost function penalizing the control. We show under suitable assumptions that if a comparison principle holds for the Hamilton-Jacobi equation involving only the internal Hamiltonian, then the comparison principle holds for the Hamilton-Jacobi-Bellman equation involving the full Hamiltonian. In addition to establishing uniqueness, we give sufficient conditions for existence of solutions. Our key features are that the internal Hamiltonian is allowed to be non-Lipschitz and non-coercive in the momentum variable, and that we allow for discontinuous cost functions. To compensate for the greater generality of our approach, we assume sufficient regularity of the cost function on its sub-level sets and that the internal Hamiltonian satisfies a comparison principle uniformly in the control variable on compact sets. As an application, we show our established result to cover interesting examples that were posed as open problems in the literature as well as mean-field Hamiltonians that cannot be treated with standard methods. \paragraph{Chapter~\ref{chapter:GF-to-NGF}: Gradient Flow to Non-Gradient-Flow.} This chapter is based on a work in progress with Mario Maurelli and Mark Peletier. We study a singular limit problem arising in modelling chemical reactions. At finite~$\varepsilon>0$, the model is a Fokker-Planck equation corresponding to a particle diffusing in a double-well potential. In the limit~$\varepsilon=0$, the solution concentrates at the two potential wells. Arnrich, Mielke, Peletier, Savaré and Veneroni~\cite{ArnrichMielkePeletierSavareVeneroni2012} considered a \emph{symmetric} double-well potential and proved Gamma convergence of the associated Wasserstein gradient-flow structures. We take the double-well potential to be \emph{asymmetric}. In that case, the Wasserstein gradient flows do no longer converge. This is because the relative entropies diverge in the limit. To obtain a meaningful limit of a variational structure associated to the family of equations, we consider density-flux functionals rather than density functionals. The Wasserstein gradient flow is obtained from the density-flux functional by contraction. \paragraph{Chapter~\ref{chapter:discussion}: Discussion and Future Questions.} In this final chapter, we first summarize the results presented in this thesis. Then we discuss their limitations and point out questions that we could not answer so far. \chapter{Introduction to Large Deviations via Hamilton-Jacobi Equations} \label{chapter:LDP-via-HJ} \chaptermark{LDP via Hamilton-Jacobi Equations} \section{A general strategy of proof} \label{BG:sec:math-gem} This chapter is an introduction to a connection between two mathematical subjects: pathwise large deviations of stochastic processes on the one hand, and Hamilton-Jacobi equations on the other hand. Jin Feng and Thomas Kurtz show in their monograph~\cite{FengKurtz2006} how to rigorously connect these subjects by means of mathematical theorems. The scope of the approach is demonstrated by the examples given in~\cite[Section~I.1.4]{FengKurtz2006}. \smallskip When I first tried to work with the theory, I had difficulties to get started. This was mainly because the general conditions are involved, which can make it difficult for a newcomer to grasp the essence. I write this chapter with the intention to facilitate for other newcomers the process of getting started. To do so, I sacrifice generality for clarity, and answer three straightforward questions I initially struggled to answer for myself, and to which I could not find straight answers in the literature. Before we get to the questions, let us first have a look at the gist of the connection. \subsubsection{The connection in a nutshell.} For $E:=\mathbb{R}^d$ and a finite~$T>0$, let~$\mathcal{X}:= C_E[0,T]$ be the set of~$E$-valued continuous trajectories~$x:[0,T]\to E$, equipped with the supremum norm. Consider a sequence of Markov processes~$\{X^n\}_{n=1,2\dots}$, where each~$X^n$ is regarded as a random variable in~$\mathcal{X}$, with deterministic initial conditions~$X^n(0)=x_0$. \smallskip We will typically consider~$X^n$ that become deterministic in the limit~$n\to\infty$: frequently we expect by the law of large numbers that there exists a trajectory~$\overline{x}\in\mathcal{X}$ such that~$X^n\to \overline{x}$ almost surely as~$n\to\infty$. Then for any closed set of trajectories~$A\subseteq \mathcal{X}$ not containing~$\overline{x}$, we have~$\mathbb{P}\left(X^n\in A\right)\to 0$ as~$n\to\infty$. We say~$X^n$ satisfies a \emph{pathwise large deviation principle} if these probabilities are exponentially small with respect to~$n$ in the sense of Definition~\ref{def:LDP}. Our goal is both to prove a large deviation principle and to find a useful formula of the rate function. \smallskip Let us state the connection to Hamilton-Jacobi equations. We denote the transition probabilities of~$X^n$ by~$P_n(t,x, \mathrm{d} y)$. Define for a bounded measurable function~$f\in B(E)$ and~$t\geq 0$ the function~$V_n(t)f$ by \begin{equation}\label{eq:BG:def-nonlinear-semigroup-Vn} V_n(t) f(x) := \frac{1}{n}\log\int_{E}e^{n f(y)}\,P_n(t,x, \mathrm{d} y). \end{equation} For each~$n=1,2,\dots$, the family~$\{V_n(t)\}_{t\geq 0}$ forms a one-parameter semigroup of maps acting on~$B(E)$. Further below, we prove that the convergence of these semigroups~$V_n$ to a limiting semigroup~$\{V(t)\}_{t\geq 0}$ implies a pathwise large deviation principle of~$X^n$. This limiting semigroup can be regarded as the \emph{semigroup flow} of a Hamilton-Jacobi equation; there is a map~$\mathcal{H}:E\times\mathbb{R}^d\to\mathbb{R}$ called the \emph{Hamiltonian} with which the function~$u(t,x) := V(t)f(x)$ is the solution to \begin{equation*} \begin{cases} \partial_t u(t,x) = \mathcal{H}(x,\nabla_x u(t,x)),\\ u(0,x) = f(x). \end{cases} \end{equation*} In which precise sense~$u$ solves this equation is not important here. The Hamiltonian fully characterizes the large-deviation fluctuations via its Legendre dual defined as the map~$\mathcal{L}(x,v) := \sup_{p}[p\cdot v-\mathcal{H}(x,p)]$, which we call the \emph{Lagrangian}. Indeed, frequently the large-deviation rate function~$\mathcal{I}:\mathcal{X}\to[0,\infty]$ satisfies \begin{equation}\label{BG:eq:intro-RF-action-integral} \mathcal{I}(x) = \int_0^T\mathcal{L}(x(t),\partial_t x(t))\, \mathrm{d} t. \end{equation} This is a useful formula which allows us to determine the law of large number limit for complicated processes~$X^n$, namely as the path~$\overline{x}$ satisfying~$\mathcal{I}(\overline{x})=0$, which solves the equation~$\mathcal{L}(\overline{x}(t),\partial_t\overline{x}(t))=0$. We call~\eqref{BG:eq:intro-RF-action-integral} an \emph{action-integral representation}. \smallskip The Hamiltonian can be derived by taking the limit of the so-called \emph{nonlinear generators}~$H_n$ of the semigroups~$V_n(t)$, which are formally determined by~$H_n := \frac{ \mathrm{d}}{ \mathrm{d} t}|_{t=0}V_n(t)$. These nonlinear generators converge in a suitable sense to a limiting operator~$H$ acting on functions as~$Hf(x)=\mathcal{H}(x,\nabla f(x))$, where~$\mathcal{H}$ is the Hamiltonian from above. This derivation will provide us with a recipe for three aspects at once: finding the Hamiltonian, giving a rigorous proof of large deviations, and proving the action-integral formula~\eqref{BG:eq:intro-RF-action-integral}. The goal of this chapter is to prove a rigorous version of this recipe in a simplified setting.\qed \subsubsection{Three questions that we answer in this chapter.} Our first question is: \begin{enumerate}[label=(\arabic*)] \item \emph{Why is verifying the convergence of the nonlinear semigroups~$V_n(t)$ to a limiting semigroup~$V(t)$ sufficient for proving pathwise large deviation principles?} \end{enumerate} We answer this question in Section~\ref{BG:sec:LDP-from-convergence-of-semigroups} by means of Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}---the additional assumption of exponential tightness appearing therein is not important for now. \smallskip In practice, verifying convergence of the nonlinear semigroups~$V_n(t)$ from scratch is hard. In that sense, the result formulated in Theorem~\ref{thm:LDP-via-semigroup-convergence:compact} really only serves as a stepping stone to obtain useful and applicable results. The bulk of the general functional analytical work in~\cite{FengKurtz2006} lies in detecting useful conditions to verify the convergence of nonlinear semigroups from the convergence of their \emph{generators}. Let us briefly sketch the idea. For a bird's-eye view on semigroups, we refer to Chapters~I and~VII of Engel's and Nagel's monograph~\cite{EngelNagel1999}. \begin{example}\label{ex:semigroups-are-exponentials} Let $T:[0,\infty)\to\mathbb{C}$ be a continuous map forming a semigroup, that means~$T(t+s)=T(t)T(s)$ and~$T(0)=1$. Cauchy and Abel proved the existence of a unique scalar $g\in \mathbb{C}$ with which the semigroup is given by $T(t)=e^{tg}$ (\cite[Theorem~1.4]{EngelNagel1999}). We call $g$ the \emph{generator} of the semigroup~$T(t)$. Let us point out two aspects about this result: \begin{enumerate}[$\bullet$] \item The whole semigroup~$T$ is uniquely identified by its generator~$g$. \item While the map $T$ is only assumed to be continuous, its semigroup property $T(t+s)=T(t)T(s)$ actually enforces differentiability. Its generator is uniquely determined by $g = \frac{d}{dt}T(0)$. \end{enumerate} Based on this result, we can prove the following recipe for convergence of a sequence of semigroups $\{T_n\}_{n\in\mathbb{N}}$. First, identify their generators by computing $g_n = \frac{d}{dt}T_n(0)$. Second, identify the limit $g:=\lim_n g_n$. Then this limit generates a semigroup by $T(t) := e^{tg}$, and the semigroups~$T_n$ converge to~$T$ uniformly over compact time intervals. \qed \end{example} In the spirit of this example, the natural question we can ask is whether there exists a similar recipe for proving convergence of the semigroups~$V_n(t)$. That means first identifying generators~$H_n$ by making sense of $H_n = \frac{d}{dt}V_n(0)$, and then secondly identifying a suitable limit $H:=\lim_n H_n$. In the above example the semigroups are complex scalars, and the fact that the limit~$g$ is a complex scalar is sufficient to generate a semigroup by means of the formula~$T(t):=e^{tg}$. Since the semigroups~$V_n(t)$ are nonlinear maps defined on~$B(E)$, the conditions on a limit~$H$ are more involved. \smallskip Therefore, our second question is: \begin{enumerate}[label=(\arabic*)] \setcounter{enumi}{1} \item \emph{How does the recipe from Example~\ref{ex:semigroups-are-exponentials} for verifying convergence of semigroups carry over to the nonlinear semigroups~$V_n(t)$?} \end{enumerate} The answer we give in Section~\ref{BG:sec:LDP-from-convergence-of-semigroups} identifies the generators~$H_n$ as certain nonlinear operators and establishes conditions on a limit operator~$H$ to generate a nonlinear semigroup~$V(t)$. We find that the convergence of generators~$H_n\to H$ indeed implies the desired convergence of semigroups~$V_n\to V$. The conditions on the limit operator~$H$ are imposed in order to make sense of the formula~$V(t)=e^{tH}$. In Theorem~\ref{thm:LDP-classical-sol} in Section~\ref{subsec:LDP-via-classical-sol}, we first see how this program leads to the problem of solving PDEs of the form \begin{equation*} (1-\tau H) f = h, \end{equation*} where~$\tau>0$ and the function~$h=h(x)$ are given. In a running example, by which we illustrate intermediate results, this PDE is \[ f(x) - \tau \frac{1}{2}|\nabla f(x)|^2 = h(x),\quad x\in\mathbb{R}. \] We show in Section~\ref{subsec:LDP-via-visc-sol} why the notion of viscosity solutions provides the right tools to solve these type of PDEs. The recipe we obtain for proving pathwise large deviation principles is summarized in Theorem~\ref{thm:LDP-visc-sol}, and we apply this theorem to the running example. The drawback of this theorem is that the rate function is still intricate. Therefore, our third question is: \begin{enumerate}[label=(\arabic*)] \setcounter{enumi}{2} \item \emph{How can we prove an action-integral representation~\eqref{BG:eq:intro-RF-action-integral} of the rate function?} \end{enumerate} We provide an answer in Section~\ref{BG:sec:semigroup-flow-HJ-eq}. The required Hamiltonian~$\mathcal{H}$ is identified from the limit operator~$H$, by recognizing the latter to act on functions by \begin{equation*} Hf(x) = \mathcal{H}(x,\nabla f(x)). \end{equation*} Let us summarize where we stand after we will have answered the above three questions. We find an algorithm that provides us with a convenient method for guessing the form of a rate function. For a sequence of~$\mathbb{R}^d$-valued Markov processes~$X^n$, the algorithm can be divided into five steps. First, start from the generators~$L_n$ of~$X^n$. Second, compute the nonlinear generators defined by acting on functions as~$H_n f := \frac{1}{n}e^{-nf}L_n e^{nf}$. Third, identify the limit operator~$Hf=\lim_n H_nf$. Fourth, identify the Hamiltonian~$\mathcal{H}:\mathbb{R}^d\times\mathbb{R}^d\to\mathbb{R}$ as the map satisfying~$Hf(x)=\mathcal{H}(x,\nabla f(x))$ for all~$f$ in the domain of~$H$. Finally, define the Lagrangian as the Legendre-Fenchel dual~$\mathcal{L}(x,v):=\sup_{p\in\mathbb{R}^d}\left[p\cdot v - \mathcal{H}(x,p)\right]$. Now details aside, the rate function satisfies~\eqref{intro:eq:RF-action-integral} with this Lagrangian. In Section~\ref{BG:sec:setting}, we briefly summarize some aspects about Markov processes that we will work with in the subsequent sections. Each subsequent section is devoted to answer one of the three questions posed above. Section~\ref{BG:sec:LDP-from-convergence-of-semigroups} answers the first question about semigroup convergence, Section~\ref{sec:LDP-via-generators} the second question about deriving semigroup convergence from generator convergence, and Section~\ref{BG:sec:semigroup-flow-HJ-eq} the third question about the action-integral representation. \section{Setting: Markov process in compact state space} \label{BG:sec:setting} We denote by~$E$ a Polish space, that is a complete separable metric space. We will assume~$E$ to be compact. For~$T>0$, let~$\mathcal{X}:=C_E[0,T]$ be the set of continuous maps~$\gamma:[0,T]\to E$, equipped with the supremum norm. We consider a set of transition probabilities $\{P(t,x, \mathrm{d} y)\}_{t\geq 0}$ such that: \begin{enumerate}[label=(\roman*)] \item For any~$x\in E$,~$P(t,x,\cdot)$ is a probability measure on~$E$, and~$P(0,x,\cdot)=\delta_x$. \item For any Borel subset $A\subseteq E$, the map $x\mapsto P(t,x,A)$ is measurable on~$E$, and for any $s\leq t$, we have~$P(s+t,x,A) = \int_E P(s,y,A) \, P(t,x, \mathrm{d} y)$. \end{enumerate} By Theorem~1.1 in Chapter~IV of~\cite{EthierKurtz1986}, such a collection of transition probabilities gives rise to a corresponding Markov process~$X(t)|_{t\geq 0}$; for~$t\in[0,T]$, we have a random variable~$X(t)$ in~$E$, and~$X$ is a random variable in~$\mathcal{X}$. The Markov process is identified with the path distributions~$\{\mathbb{P}_x\}_{x\in E}$, where each~$\mathbb{P}_x$ is a probability measure on~$\mathcal{X}$ describing the law of the process when starting at~$x$. \smallskip If we think of the process as describing a particle that moves in~$E$, then the value~$P(t,x,A)$ corresponds to the probability that starting from~$x$, the particle propagates in time~$t$ into the region~$A$. It is the conditional probability \[ P(t,x,A) = \mathbb{P}\left(X(t)\in A\,|\,X(0)=x\right) = \mathbb{P}_x\left(X(t)\in A\right). \] Let~$B(E)$ be the set of bounded and measurable functions on~$E$. We call the family of maps~$\{S(t)\}_{t\geq 0}$, with $S(t):B(E)\to B(E)$ given by \begin{equation}\label{BG:eq:def:Markov-semigroup} S(t)f(x) := \int_E f(y)\,P(t,x, \mathrm{d} y), \end{equation} the \emph{semigroup} associated to the Markov process $X$. Its semigroup property, that is~$S(t+s)=S(t)S(s)$, is inherited from the transition probabilities. \section{Large deviations via convergence of semigroups} \label{BG:sec:LDP-from-convergence-of-semigroups} The main point of this section is to answer our first key question: why is the convergence of nonlinear semigroups sufficient for proving pathwise large deviation principles? We answer it by proving Theorem~\ref{thm:LDP-via-semigroup-convergence:compact} below, which is a simplification of~\cite[Theorem~5.15, Corollary~5.17]{FengKurtz2006}. \begin{definition}[Nonlinear Semigroup associated to Markov process]\label{def:nonlinear-semigroups} Let $E$ be a Polish space. For a Markov process~$X^n$ with transition probabilities $P_n(t,x, \mathrm{d} y)$, define the map $V_n(t):B(E)\to B(E)$ by~\eqref{eq:BG:def-nonlinear-semigroup-Vn}; that is for~$f\in B(E)$, \begin{equation}\label{eq:def:nonlinear-semigroup} V_n(t)f(x) := \frac{1}{n}\log\int_E e^{nf(y)}\,P_n(t,x, \mathrm{d} y). \end{equation} We call the family~$\{V_n(t)\}_{t\geq 0}$ the \emph{nonlinear semigroup} associated to the process~$X^n$.\qed \end{definition} We will see further below how Bryc's formula leads us directly to consider these nonlinear semigroups. The family $\{V_n(t)\}_{t \geq 0}$ inherits its semigroup property from the semigroup $\{S_n(t)\}_{t\geq 0}$ of the Markov process~$X^n$, since \begin{align*} V_n(t+s)f(y) &\stackrel{\mathclap{\text{def}}}{=} \frac{1}{n}\log S_n(t+s) e^{nf}(y)\\ &= \frac{1}{n}\log S_n(t)\left[S_n(s)e^{nf}\right](y)\\ &= \frac{1}{n}\log S_n(t)\left[e^{n V_n(s)f}\right](y) \stackrel{\mathclap{\text{def}}}{=} V_n(t) \left[V_n(s) f\right](y). \end{align*} For the theorem, we also need the following condition. \begin{definition}[Exponential tightness] Let $\{\mathrm{P}^n\}_{n\in\mathbb{N}}$ be a sequence of probability measures on a Polish space~$\mathcal{X}$. The sequence $\{\mathrm{P}^n\}_{n\in\mathbb{N}}$ is \emph{exponentially tight} if for any $\ell > 0$, there exists a compact set $K_\ell \subseteq E$ such that \begin{align*} \limsup_{n\to\infty} \frac{1}{n} \log \mathrm{P}^n\left(\mathcal{X}\setminus K_\ell\right) \leq -\ell. \tag*\qed \end{align*} \end{definition} Exponential tightness means the mass of the probability measures $\mathrm{P}^n$ concentrates exponentially fast on compact sets: given an arbitrary rate $\ell > 0$, for any $\varepsilon > 0$ there exists a compact set $K_{\ell,\varepsilon}\subseteq \mathcal{X}$ such that for $n$ large enough, \[ \mathrm{P}^n\left(\mathcal{X}\setminus K_{\ell,\varepsilon}\right)\leq e^{-n(\ell-\varepsilon)}. \] We comment further below on the role of exponential tightness. Let us first formulate the theorem. For a function~$g\in B(E)$, we write~$\|g\|_E:=\sup_E |g|$. \begin{theorem}[Large deviations via convergence of nonlinear semigroups] \label{thm:LDP-via-semigroup-convergence:compact} For~$n=1,2,\dots$, let~$X^n$ be a Markov process in~$\mathcal{X}=C_E[0,T]$ with path distribution denoted by~$\mathrm{P}^n := \mathbb{P}(X^n\in \cdot)\in\mathcal{P}(\mathcal{X})$, and with the corresponding nonlinear semigroup~$V_n$ from Definition~\ref{def:nonlinear-semigroups}. Assume the following: \begin{enumerate}[label=(\roman*)] \item The sequence $\{\mathrm{P}^n\}_{n\in\mathbb{N}}$ is exponentially tight in $\mathcal{X}$. \item\label{BG:item:LDP-via-semigroup:conv-Vn} There are maps $V(t):C(E)\to C(E)$, $t\geq 0$, such that for any sequence of functions $f_n\in B(E)$ and $f\in C(E)$, \begin{equation*} \text{if}\quad \|f-f_n\|_E\xrightarrow{n\to\infty}0,\qquad\text{then}\quad \|V(t)f-V_n(t)f_n\|_E\xrightarrow{n\to\infty}0. \end{equation*} \end{enumerate} Suppose furthermore that the initial conditions~$\{X^n(0)\}_{n\in\mathbb{N}}$ satisfy a large deviation principle in~$E$ with rate function $\mathcal{I}_0:E\to[0,\infty]$. Then the sequence $\{X^n\}_{n\in \mathbb{N}}$ satisfies a large deviation principle in $\mathcal{X}$ with rate function $\mathcal{I}:\mathcal{X}\to[0,\infty]$ given by~\eqref{eq:RF-with-semigroup-approach} below. \end{theorem} For any~$n\in\mathbb{N}$, the sequence~$X^n$ with initial conditions~$X^n(0)\sim \nu_n$ has a path distribution~$\mathrm{P}^n = \mathbb{P}_{\nu_n}(X^n\in \cdot)\in\mathcal{P}(\mathcal{X})$. The theorem gives two conditions under which a large deviation principle for the initial condition bootstraps to these path distributions. The rate function in Theorem~\ref{thm:LDP-via-semigroup-convergence:compact} is determined by the limit~$V(t)$, \begin{equation}\label{eq:RF-with-semigroup-approach} \mathcal{I}(x) = \mathcal{I}_0(x(0)) + \sup_{k\in\mathbb{N}}\sup_{(t_1,\dots,t_k)} \sum_{i=1}^k \mathcal{I}_{t_i-t_{i-1}}(x(t_i)|x(t_{i-1})), \end{equation} where $\mathcal{I}_t(z|y)$ given by \begin{equation}\label{BG:eq:RF-1d-marginals} \mathcal{I}_t(z|y) = \sup_{f\in C(E)}\left[f(z)-V(t)f(y)\right]. \end{equation} We will encounter the functions~$\mathcal{I}_t(\cdot|y)$ as the rate functions for the one-dimensional marginals. Before we give an overview of the proof of Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}, a remark on exponential tightness. This property is always expected: if a sequence of probability measures on a Polish space satisfies the large-deviation upper bound, then the sequence is exponentially tight~\cite[Exercise~4.1.10]{DemboZeitouni1998}. In general, the role of exponential tightness is to bootstrap the large-deviation upper bound from compact to closed sets~\cite[Lemma~1.2.18]{DemboZeitouni1998}. \smallskip In our context, it allows us to deduce pathwise large deviations from large deviations of the finite-dimensional marginals. If for each tuple $0\leq t_1<t_2<\dots<t_k$, the marginals $\left\{(X^n(t_1),\dots,X^n(t_k))\right\}_{n\in\mathbb{N}}$ satisfy large deviations in $E^k$ with rate function $\mathcal{I}_{t_1\dots t_k}:E^k\to[0,\infty]$, then the sequence of processes $\{X^n\}_{n\in\mathbb{N}}$ satisfies a large deviation principle in $\mathcal{X}$ with rate function $\mathcal{I}:\mathcal{X}\to[0,\infty]$ given by \begin{equation}\label{eq:RF-sup-over-finite-dim-distr} \mathcal{I}(x) := \sup_{k\in\mathbb{N}}\sup_{(t_1,\dots,t_k)}\mathcal{I}_{t_1\dots t_k}\left(x_1(t_1),\dots,x_k(t_k)\right), \end{equation} where the supremum is taken over all finite tuples $t_1<t_2<\dots<t_k$. A proof of this fact can be found in~\cite[Theorem~4.28]{FengKurtz2006}. The rate function~\eqref{eq:RF-sup-over-finite-dim-distr} is an example of bootstrapping large deviations from lower to higher-dimensional spaces, known as the Dawson-G\"artner Theorem~\cite[Theorem~4.6.1]{DemboZeitouni1998}. We postpone the problem of how to obtain exponential tightness to Section~\ref{sec:LDP-via-generators}. \begin{proof}[Overview of the proof of Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}] The pathwise large deviation principle follows from the large deviation principles of finite-dimensional distributions by exponential tightness~\cite[Theorem~4.28]{FengKurtz2006}. We first prove in Section~\ref{BG:sec:LDP-1d} the large deviation principle for the one-dimensional time marginals~$X^n(t)$. Then we see how the argument iterates to finite-dimensional distributions in Proposition~\ref{prop:LDP-multidim-compact:semigroup}. That gives the pathwise large deviation principle of~$\{X^n\}_{n\in\mathbb{N}}$ with rate function given by the formula~\eqref{eq:RF-sup-over-finite-dim-distr}. Finally, we prove in Proposition~\ref{prop:LDP-semigroups:conditional-RF} the formula~\eqref{eq:RF-with-semigroup-approach} of the rate function. \end{proof} \subsection{Varadhan's Lemma and Bryc's Formula} The main point of this section is to formulate the equivalence of large deviations and asymptotic evaluation of integrals of continuous functions, since this equivalence will be our starting point for proving large deviations of finite-dimensional distributions. For the following theorems, we consider a sequence of probability measures~$\mathrm{Q}_n$ on a compact Polish space~$\mathcal{S}$. \begin{theorem}[Varadhan's Lemma]\label{thm:Varadhans-lemma} Suppose that the sequence $\{\mathrm{Q}_n\}_{n\in\mathbb{N}}$ satisfies a large deviation principle with rate function~$\mathcal{I}:\mathcal{S}\to[0,\infty]$. Then for any bounded and continuous function $f:\mathcal{S}\to\mathbb{R}$, \begin{equation*} \lim_{n\to\infty}\frac{1}{n}\log\int_\mathcal{S} e^{nf(x)}\,\mathrm{Q}_n\left( \mathrm{d} x\right) = \sup_{x\in \mathcal{S}} \left[f(x)-\mathcal{I}(x)\right]. \end{equation*} \end{theorem} \begin{theorem}[Bryc's Formula]\label{thm:Brycs-formula} Suppose that for any~$f\in C(\mathcal{S})$, the limit \begin{equation}\label{BG:eq:rate-transform} \Lambda(f) := \lim_{n\to\infty}\frac{1}{n}\log\int_\mathcal{S} e^{nf(x)}\,\mathrm{Q}_n\left( \mathrm{d} x\right). \end{equation} exists. Then the sequence~$\{\mathrm{Q}_n\}_{n\in\mathbb{N}}$ satisfies a large deviation principle with rate function~$\mathcal{I}:\mathcal{S}\to[0,\infty]$ given by \begin{equation}\label{BG:eq:Brycs-formula} \mathcal{I}(x) = \sup_{f\in C(\mathcal{S})}\left[f(x)-\Lambda(f)\right]. \end{equation} \end{theorem} Varadhan's Lemma is a generalization of winner-takes-it-all principle. For a continuous function $g:[a,b]\to\mathbb{R}$ on a closed interval $[a,b]$, we have \[ \frac{1}{n}\log \int_a^b e^{ng(x)}\, \mathrm{d} x \xrightarrow{n\to\infty} \sup_{x\in[a,b]} g(x) =:\overline{g}. \] This follows from the fact that~$(g-\overline{g})\leq 0$ on $[a,b]$ and \[ \frac{1}{n}\log \int_a^b e^{ng(x)}\, \mathrm{d} x = \overline{g}+\frac{1}{n}\log\int_a^be^{n(g(x)-\overline{g})}\, \mathrm{d} x. \] Consider a sequence of probability measures $\mathrm{Q}_n\in\mathcal{P}(\mathbb{R})$ satisfying large deviations. At least intuitively, this means an approximation of the type \[ \mathrm{Q}_n\left( \mathrm{d} x\right) \approx e^{-n\mathcal{I}(x)}\, \mathrm{d} x \] is valid for large~$n$. Then for a bounded and continuous function $f$ on $\mathbb{R}$, \[ \int_\mathbb{R} e^{nf(x)}\,\mathrm{Q}_n\left( \mathrm{d} x\right) \approx \int_\mathbb{R} e^{nf(x)} e^{-n\mathcal{I}(x)}\, \mathrm{d} x,\quad n\to\infty \] Hence on the logarithmic scale, we expect the dominant contribution to come from the maximal value of $g:=f-\mathcal{I}$. Varadhan's Lemma states both the existence of the limit and that it equals to what we expect from the winner-takes-it-all principle. Proofs closely following the above sketch are given for instance by Budhiraja and Dupuis~\cite[Theorem~1.5]{BudhirajaDupuis2019} and Frank den Hollander~\cite[Theorem~III.13]{denHollander2000}. A proof based on the exponential Chebyshev inequality is given by Feng and Kurtz in~\cite[Proposition~3.8]{FengKurtz2006}. Dembo and Zeitouni prove it in regular topological spaces under an additional tail bound~\cite[Theorem~4.3.1]{DemboZeitouni1998}. \smallskip Bryc proved the inverse to Varadhan's Lemma in~\cite{Bryc1990}. The point of Bryc's formula is: if we can compute the rate transforms, then we obtain a rate function. Bryc's formula focuses on the existence of the limit~$\Lambda(f)$ and does not require to identify a rate function beforehand. We refer to the map~$\Lambda:C(\mathcal{S})\to\mathbb{R}$ as the \emph{rate transform} associated to $\{\mathrm{Q}_n\}_{n\in\mathbb{N}}$. By Varadhan's Lemma, we have \begin{equation*} \Lambda(f) = \sup_{x\in \mathcal{S}}\left[f(x)-\mathcal{I}(x)\right]. \end{equation*} \subsection{Large deviations of one-dimensional marginals} \label{BG:sec:LDP-1d} Here we show how Bryc's formula directly leads to a proof of large deviations of the one-dimensional time marginales. To recall the setting of Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}, we consider a sequence of Markov processes~$X^n$ with paths in~$\mathcal{X}=C_E[0,T]$, where~$E$ is a compact Polish space. For any~$t\in[0,T]$, the time marginal~$X^n(t)$ is a random variable in~$E$. We denote its distribution by~$\mathbb{P}^n_t\in\mathcal{P}(E)$. \smallskip Fix~$t\in[0,T]$. By Bryc's Formula, the sequence $\{X^n(t)\}_{n \in \mathbb{N}}$ satisfies a large deviation principle if for any $f\in C(E)$, the sequence \begin{equation*} \Lambda^n_t(f) := \frac{1}{n}\log \int_E e^{nf(y)}\,\mathbb{P}_t^n\left( \mathrm{d} y\right) \end{equation*} converges as $n$ tends to infinity. First, let us suppose that the initial condition is deterministic, that means $X^n(0) \sim \mathbb{P}^n_0 := \delta_{x_0}$ for some fixed~$x_0\in E$. \smallskip Let~$S_n$ be the semigroup corresponding to~$X^n$. For every $f\in B(E)$, we have by conditioning (e.g.~\cite[Proposition~4.1.6]{EthierKurtz1986} or~\cite[Definition~1.6]{Liggett2004}) \begin{equation}\label{BG:eq:setting:1d-distr-by-conditioning} \int_E f(y)\,\mathbb{P}_t^n\left( \mathrm{d} y\right) = \int_E S_n(t)f(x)\,\mathbb{P}_0^n\left( \mathrm{d} x\right). \end{equation} Therefore \begin{equation}\label{BG:eq:Vn-condition-to-P0} \int_E e^{n f(y)}\,\mathbb{P}^n_t\left( \mathrm{d} y\right) \overset{\eqref{BG:eq:setting:1d-distr-by-conditioning}}{=} \int_E S_n(t) e^{nf(x)}\,\mathbb{P}^n_0( \mathrm{d} x) \stackrel{\mathclap{\text{def}}}{=} \int_E e^{n V_n(t)f(x)}\,\mathbb{P}^n_0\left( \mathrm{d} x\right). \end{equation} Hence using~$\mathbb{P}^n_0=\delta_{x_0}$, we find \begin{align*} \Lambda_t^n(f)&\stackrel{\mathclap{\text{def}}}{=} \frac{1}{n}\log \int_E e^{nf(y)}\,\mathbb{P}_t^n\left( \mathrm{d} y\right) \overset{\eqref{BG:eq:Vn-condition-to-P0}}{=} \frac{1}{n}\log \int_E e^{nV_n(t)f(x)}\,\mathbb{P}_0^n( \mathrm{d} x) \\ &=\frac{1}{n}\log e^{nV_n(t)f(x_0)}= V_n(t)f(x_0). \end{align*} This is how the semigroups~$V_n(t)$ arise directly from Bryc's formula. Recall that we assume the convergence~$V_n(t)\to V(t)$ as~$n\to\infty$. Hence with the special initial condition~$\mathbb{P}_0^n=\delta_{x_0}$, the rate transform~$\Lambda(f)$ from~\eqref{BG:eq:rate-transform} is \begin{equation*} \Lambda(f) = V(t)f(x_0). \end{equation*} By Bryc's formula~\eqref{BG:eq:Brycs-formula}, the rate function $\mathcal{I}_t(\cdot|x_0) : E \to [0,\infty]$ takes the form \begin{equation*} \mathcal{I}_t(x|x_0) = \sup_{f\in C(E)} \left[f(x) - V(t)f(x_0)\right]. \end{equation*} This is the conditional rate function introduced in~\eqref{BG:eq:RF-1d-marginals}. We just proved that the conditional probability measures \begin{equation*} A\mapsto P_n(t,x_0,A) = \mathbb{P}\left(X^n(t)\in A\,|\,X^n(0)=x_0\right) \end{equation*} satisfy a large deviation principle with rate function~$\mathcal{I}_t(\cdot|x_0)$. \smallskip Both the fact that we only need convergence of $V_n(t)f$ at the point $x_0$ and that the limit $\Lambda(f)$ depends on $x_0$ are an artefact of the special form of the initial distribution, $X^n(0) \sim \delta_{x_0}$. \begin{proposition}\label{prop:LDP-1d-compact:semigroup} Let~$t\in[0,T]$. Under the conditions of Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}, the sequence of one-dimensional time marginals $\{X^n(t)\}_{n\in\mathbb{N}}$ satisfies a large deviation principle in~$E$ with rate function $\mathcal{I}_t:E\to[0,\infty]$ given by \begin{equation*} \mathcal{I}_t(x) = \sup_{f\in C(E)}\left\{f(x)-\Lambda_0\left[V(t)f\right]\right\}, \end{equation*} where $\Lambda_0$ is the rate transform~\eqref{BG:eq:rate-transform} associated to the initial conditions~$\{X^n(0)\}$. \end{proposition} \begin{proof}[Proof of Proposition~\ref{prop:LDP-1d-compact:semigroup}] Let~$\mathbb{P}_t^n\in\mathcal{P}(E)$ be the distribution of~$X^n(t)$. If for any function~$f\in C(E)$ the rate transform \begin{equation*} \Lambda_t(f) := \lim_{n\to\infty}\frac{1}{n}\log\int_E e^{n f(y)}\,\mathbb{P}^n_t\left( \mathrm{d} y\right) \end{equation*} exists, then by Bryc's formula,~$\{X^n(t)\}$ satisfies a large deviation principle with rate function~$\mathcal{I}_t:E\to[0,\infty]$ given by \begin{equation*} \mathcal{I}_t(x) = \sup_{f\in C(E)}\left[f(x)-\Lambda_t(f)\right]. \end{equation*} Since the initial conditions~$\{X^n(0)\}$ satisfy large deviations, the rate transform \begin{equation*} \Lambda_0(g):= \lim_{n\to\infty} \frac{1}{n}\log\int_E e^{ng(y)}\,\mathbb{P}^n_0\left( \mathrm{d} y\right),\quad g\in C(E), \end{equation*} exists by Varadhan's Lemma. Hence we can prove the Proposition by showing that~$\Lambda_t(f)$ is equal to~$\Lambda_0\left[V(t)f\right]$. Let~$f\in C(E)$. Then \begin{align*} \int_E e^{n f(y)}\,\mathbb{P}^n_t\left( \mathrm{d} y\right) \overset{\eqref{BG:eq:Vn-condition-to-P0}}{=} \int_Ee^{n V_n(t)f(x)}\,\mathbb{P}^n_0\left( \mathrm{d} x\right). \end{align*} The functions~$h_n:=V_n(t)f\in B(E)$ converge by assumption uniformly to the function~$h:=V(t)f\in C(E)$. The map $g\mapsto \Lambda_0^n(g) := \frac{1}{n}\log\int_E e^{ng(x)}\,\mathbb{P}_0^n\left( \mathrm{d} x\right)$ is well-defined on~$B(E)$ and satisfies the bounds \begin{equation*} -\|h-h_n\|_E + \Lambda_0^n(h) \leq \Lambda_0^n(h_n) \leq \Lambda_0^n(h) + \|h-h_n\|_E. \end{equation*} Now the equality $\Lambda_t(f) = \Lambda_0\left[V(t)f\right]$ follows by taking the limit~$n\to\infty$. This last step requires the limit $V(t)f$ to be a continuous function on~$E$, since Varadhan's Lemma a priori only guarantees the rate transform~$\Lambda_0$ on continuous functions. \end{proof} \begin{running_example*}[Small diffusion] We illustrate the above result for the process $ \mathrm{d} X^n_t=n^{-1/2} \mathrm{d} B_t$ on~$E=\mathbb{R}$, ignoring for the moment the fact that~$\mathbb{R}$ is not compact. The transition probabilities~$P_n(t,x, \mathrm{d} y)$ are explictly known, \begin{equation*} P_n(t,x, \mathrm{d} y) = \sqrt{\frac{n}{2\pi t}} \exp\{-n(y-x)^2/2t\}\, \mathrm{d} y. \end{equation*} Hence the nonlinear semigroups are \[ V_n(t)f(x) = \frac{1}{n}\log\left(\int_\mathbb{R}\exp\left\{n\left[f(y)-\frac{1}{2t}(y-x)^2\right]\right\}\, \mathrm{d} y\right) + \frac{1}{n}\log\left(\sqrt{\frac{n}{2\pi t}}\,\right). \] The second term vanishes in the limit $n\to\infty$. In the integral term, the highest value dominates in the limit, which gives \[ V(t)f(x) \stackrel{\mathclap{\text{def}}}{=} \lim_{n\to\infty} V_n(t)f(x) = \sup_{z\in\mathbb{R}}\left[f(z)-\frac{1}{2t}(z-x)^2\right]. \] This expression is the well-known Hopf-Lax formula. Thus~$X^n(t)$ conditioned to~$X^n(0)=x$ satisfies a large deviation principle with rate function \begin{align*} \mathcal{I}_t(y|x) &= \sup_{f\in C_b(\mathbb{R})}\left[f(y) - V(t)f(x)\right] \end{align*} Inserting~$V(t)$ and evaluating, we find by proving two inequalities that \begin{align*} \mathcal{I}_t(y|x) &= \sup_{f\in C_b(\mathbb{R})}\inf_{z\in\mathbb{R}}\left[f(y)-f(z)+\frac{1}{2t}(z-x)^2\right] = \frac{1}{2t}(y-x)^2. \end{align*} This confirms what we can readily see from the transition probabilites. \end{running_example*} \subsection{Large deviations of finite-dimensional marginals} We first consider two-dimensional time marginals $\{(X^n(t_1),X^n(t_2))\}$ for some fixed $t_2>t_1\geq 0$. To that end, denote the distribution of~$(X^n(t_1),X^n(t_2))$ by~$\mathbb{P}^n_{t_1t_2}\in\mathcal{P}(E\times E)$. We copy the strategy of one-dimensional marginals based on Bryc's formula: for proving large deviations of~$\{(X^n(t_1),X^n(t_2))\}_{n\in\mathbb{N}}$, it is sufficient to prove for any $f\in C(E\times E)$ the existence of the following limit: \begin{equation*} \Lambda_{t_1t_2}\left(f\right) := \lim_{n\to\infty}\frac{1}{n}\log\int_{E\times E}e^{n f(x,y)}\,\mathbb{P}^n_{t_1t_2}\left( \mathrm{d} x \mathrm{d} y\right). \end{equation*} We would like to use conditioning in order to reduce this convergence problem to convergence of the nonlinear semigroups~$V_n(t)$, as in the proof regarding one-dimensional marginals. To that end, we would like to consider only functions of the form $f_{12}(y,z) = f_1(y)+f_2(z)$, with~$f_1,f_2\in C(E)$. The fact that proving convergence for functions of this form is sufficient is the content of the following Lemma. It can be seen as strengthening Bryc's formula for Cartesian products. To shorten the presentation, we just indicate below where to find the proof. \begin{lemma}[Considering sums is sufficient]\label{lemma:LDP-multidim-distr:sums-are-good} Let~$\mathcal{S}_1,\mathcal{S}_2$ be a compact Polish spaces and $\{\mathrm{P}_n\}_{n\in\mathbb{N}}$ be a sequence of probability measures on~$\mathcal{S}_1\times \mathcal{S}_2$. For~$f_1\in C(\mathcal{S}_1)$ and $f_2\in C(\mathcal{S}_2)$, we write~$f_{12}\in C\left(\mathcal{S}_1\times \mathcal{S}_2\right)$ for the function~$f_{12}(y,z):=f_1(y)+f_2(z)$. Suppose that for any~$f_1,f_2$, the rate transform \[ \Lambda(f_{12}) := \lim_{n\to\infty}\frac{1}{n}\log\int_{\mathcal{S}_1\times\mathcal{S}_2}e^{nf_1(y) + nf_2(z)}\,\mathrm{P}_n\left( \mathrm{d} y \mathrm{d} z\right) \] exists. Then the family $\left\{\mathrm{P}_n\right\}_{n\in\mathbb{N}}$ satisfies a large deviation principle with rate function $\mathcal{I}:\mathcal{S}_1\times \mathcal{S}_2\to[0,\infty]$ given by \[ \mathcal{I}(y,z) = \sup_{\substack{f_1\in C(\mathcal{S}_1)\\ f_2\in C(\mathcal{S}_2)}}\left[f_1(y) + f_2(z) - \Lambda(f_{12})\right]. \] \end{lemma} \begin{proof}[Sketch of proof of Lemma~\ref{lemma:LDP-multidim-distr:sums-are-good}] If two subsets of functions $D_1\subseteq C(\mathcal{S}_1)$ and~$D_2\subseteq C(\mathcal{S}_2)$ are bounded above and isolates points, then the set of functions on $\mathcal{S}_1\times \mathcal{S}_2$ defined by $D_{12}:=\{f_1+f_2\,|f_1\in D_1,f_2\in D_2\}$ is bounded above and isolates points~\cite[Lemma~3.22]{FengKurtz2006}. Hence by Proposition~3.20 of~\cite{FengKurtz2006}, the set $F_{12}:=\{f_1+f_2\,:\,f_1\in C(\mathcal{S}_1),\,f_2\in C(\mathcal{S}_2)\}\subseteq C(\mathcal{S}_1\times\mathcal{S}_2)$ contains a set that is bounded above and isolates points. Therefore~$F_{12}$ is rate-function determining in the sense of Definition~3.15 of~\cite{FengKurtz2006}. \end{proof} \begin{proposition}\label{prop:LDP-multidim-compact:semigroup} Let~$0<t_1<t_2\leq T$. Under the conditions of Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}, the sequence of two-dimensional time marginals $\{\left(X^n(t_1),X^n(t_2)\right)\}_{n\in\mathbb{N}}$ satisfies a large deviation principle with rate function $\mathcal{I}_{t_1t_2}:E\times E\to[0,\infty]$ given by \begin{equation*} \mathcal{I}_{t_1t_2}(y,z) = \sup_{f_1,f_2\in C(E)}\left\{f_1(y)+f_2(z)-\Lambda_0\left[V(t_1)\left(f_1 + V(t_2-t_1)f_2\right)\right]\right\}. \end{equation*} \end{proposition} \begin{proof}[Proof of Proposition~\ref{prop:LDP-multidim-compact:semigroup}] Let~$\mathbb{P}_{t_1t_2}^n$ be the distribution of~$(X^n(t_1),X^n(t_2))$. We know by Lemma~\ref{lemma:LDP-multidim-distr:sums-are-good}, if for any function of the form~$f_{12}(y,z) := f_1(y) + f_2(z)$ with functions~$f_1,f_2\in C(E)$ the rate transform \begin{equation*} \Lambda_{t_1t_2}\left(f_{12}\right) := \lim_{n\to\infty}\frac{1}{n}\log\int_{E\times E}e^{nf_{12}(y,z)}\,\mathbb{P}^n_{t_1t_2}\left( \mathrm{d} y \mathrm{d} z\right) \end{equation*} exists, then the large deviation principle holds with rate function \begin{equation*} \mathcal{I}_{t_1t_2}(y,z) = \sup_{f_1, f_2 \in C(E)}\left\{f_1(y) + f_2(z) - \Lambda_{t_1t_2}\left[f_{12}\right]\right\}. \end{equation*} The initial conditions~$\{X^n(0)\}$ satisfy a large deviation principle by assumption. Hence by Varadhan's Lemma, for any~$g\in C(E)$ the rate transform \begin{equation*} \Lambda_0(g):= \lim_{n\to\infty} \frac{1}{n}\log\int_E e^{ng(y)}\,\mathbb{P}^n_0\left( \mathrm{d} y\right) \end{equation*} exists. We have~$V(t_1)(f_1+V(t_2-t_1)f_2)\in C(E)$ since~$V(t)$ is a map from~$C(E)$ to~$C(E)$. Therefore, the proposition follows if we prove \begin{equation*} \Lambda_{t_1t_2}\left[f_{12}\right]=\Lambda_0\left[V(t_1)\left(f_1+V(t_2-t_1)f_2\right)\right]. \end{equation*} As in the proof of one-dimensional distributions, we condition to earlier times (\cite[Proposition~4.1.6]{EthierKurtz1986}), and find \begin{align*} \int_{E\times E}e^{n (f_1(y)+f_2(z))}\,\mathbb{P}_{t_1t_2}^n\left( \mathrm{d} y \mathrm{d} z\right) &= \int_E e^{n (f_1(y) + V_n(t_2-t_1)f_2(y))}\,\mathbb{P}_{t_1}^n( \mathrm{d} y)\\ &= \int_E e^{n V_n(t_1)\left[f_1 + V_n(t_2-t_1)f_2\right](x)}\,\mathbb{P}_0^n\left( \mathrm{d} x\right). \end{align*} By the convergence assumption on the nonlinear semigroups $V_n(t)$, \begin{equation*} f_1 + V_n(t_2-t_1)f_2 \xrightarrow{n\to\infty} f_1 + V(t_2-t_1)f_2 \end{equation*} uniformly on $E$. Hence again by the convergence assumption, \begin{equation*} h_n:= V_n(t_1)\left[f_1 + V_n(t_2-t_1)f_2\right] \xrightarrow{n\to\infty} h:=V(t_1)\left[f_1 + V(t_2-t_1)f_2\right]. \end{equation*} The map $g\mapsto \Lambda_0^n(g) := \frac{1}{n}\log\int_E e^{ng(x)}\,\mathbb{P}_0^n\left( \mathrm{d} x\right)$ is well-defined on~$B(E)$ and satisfies the bounds \begin{equation*} -\|h-h_n\|_E + \Lambda_0^n(h) \leq \Lambda_0^n(h_n) \leq \Lambda_0^n(h) + \|h-h_n\|_E, \end{equation*} and the desired equality follows by taking the limit~$n\to\infty$. \end{proof} The convergence condition on the nonlinear semigroups $V_n(t)$ is sufficient for iterating to finite-dimensional marginals $\left(X^n(t_1),\dots,X^n(t_k)\right)$. The rate function is then given by \begin{equation} \label{eq:LDP-semigroup-multidim:RF-multidim} \mathcal{I}_{t_1\dots t_k}(x_1,\dots,x_k) = \sup_{f_1\dots f_k \in C(E)}\left\{\sum_i f_i(x_i)-\Lambda_{t_1\dots t_k}\left[f_1,\dots,f_k\right]\right\}, \end{equation} where the rate transform $\Lambda_{t_1\dots t_k}$ includes concatinations of the limiting map~$V(t)$, \[ \Lambda_{t_1\dots t_k}\left[f_1,\dots,f_k\right] = \Lambda_0\left[V(t_1)\left(f_1 + V(t_2-t_1)(f_2+\dots+V(t_k-t_{k-1})f_k)\dots))\right)\right]. \] \subsection{Conditional structure of the rate function} In this section, we show how to cast the rate function for finite-dimensional distributions from~\eqref{eq:LDP-semigroup-multidim:RF-multidim} into the more convenient form~\eqref{eq:prop:condtional-RF-finite-dim-marginals} given below. \begin{proposition}[]\label{prop:LDP-semigroups:conditional-RF} For $t_k>t_{k-1}>\dots>t_1> = 0$, consider the rate function $\mathcal{I}_{t_1\dots t_k}:E^k\to[0,\infty]$ of finite-dimensional time-marginals $\left\{X^n(t_1),\dots,X^n(t_k)\right\}_{n\in\mathbb{N}}$ given by~\eqref{eq:LDP-semigroup-multidim:RF-multidim}. Then \begin{equation}\label{eq:prop:condtional-RF-finite-dim-marginals} \mathcal{I}_{t_1\dots t_k}(x_1,\dots,x_k) = \mathcal{I}_{t_1}(x_1) + \mathcal{I}_{t_2-t_1}(x_2|x_1) + \dots + \mathcal{I}_{t_k-t_{k-1}}(x_{k}|x_{k-1}), \end{equation} where $\mathcal{I}_{t}$ is the rate function for $X^n(t_1)$ and the conditional rate functions $\mathcal{I}_{t}(z|y)$ are \begin{equation}\label{eq:LDP-semigroups:conditional-RF} \mathcal{I}_t(z|y) = \sup_{f\in C(E)}\left[f(z)-V(t)f(y)\right]. \end{equation} \end{proposition} \begin{proof}[Proof of Proposition~\ref{prop:LDP-semigroups:conditional-RF}] We consider the case $k=2$. Then \[ \mathcal{I}_{t_1t_2}(x_1,x_2) = \sup_{f_1,f_2 \in C(E)}\left\{\,f_1(x_1)+f_2(x_2)-\Lambda_0\left[V(t_1)\left(f_1+V(t_2-t_1)f_2\right)\right]\,\right\}. \] Concatinating the supremum and adding zero, we obtain \begin{multline*} \mathcal{I}_{t_1t_2}(x_1,x_2) = \sup_{f_2\in C(E)}\bigg[ f_2(x_2) - V(t_2-t_1)f_2(x_1) \\ +\sup_{f_1\in C(E)}f_1(x_1) + V(t_2-t_1)f_2(x_1) - \Lambda_0\left[V(t_1)\left(f_1+V(t_2-t_1)f_2\right)\right] \bigg]. \end{multline*} Since $V(t):C(E)\to C(E)$, we may shift in the second supremum to functions of the form $f_1 = g_1 - V(t_2-t_1)f_2$, with $g_1\in C(E)$, to obtain \begin{align*} \mathcal{I}_{t_1t_2}(x_1,x_2) &= \sup_{f_2}\left[ f_2(x_2) - V(t_2-t_1)f_2(x_1)\right] + \sup_{g_1}\left[g_1(x_1)-\Lambda_0\left[V(t_1)g_1\right]\right]\\ &\stackrel{\mathclap{\text{def}}}{=} \mathcal{I}_{t_2-t_1}\left(x_2|x_1\right) + \mathcal{I}_{t_1}(x_1). \end{align*} This finishes the proof for $k=2$. Similarly, we obtain for $k=3$ \begin{align*} \mathcal{I}_{t_1t_2t_3}(x_1,x_2,x_3) &= \mathcal{I}_{t_3-t_2}(x_3|x_2) + \mathcal{I}_{t_1t_2}(x_1,x_2). \end{align*} The general case follows by induction. \end{proof} Proposition~\ref{prop:LDP-semigroups:conditional-RF} represents the fact that for a Markov process $X^n$, the time marginals such as~$X^n(t_1)$ and~$X^n(t_2)$ for~$t_1<t_2$ are in general not independent, but correlated. From the large deviation principles \[ \mathbb{P}\left[X^n(t_1)\approx x_1\right]\sim e^{-n \mathcal{I}_{t_1}(x_1)}\quad\text{and}\quad \mathbb{P}\left[X^n(t_2)\approx x_2\right]\sim e^{-n \mathcal{I}_{t_2}(x_2)}, \] we can not conclude the large deviation principle of the pair~$(X^n(t_1),X^n(t_2)$ as \[ \mathbb{P}\left[X^n(t_1)\approx x_1,X^n(t_2)\approx x_2\right] \overset{?}{\sim} e^{-n \left[\mathcal{I}_{t_1}(x_1)+\mathcal{I}_{t_2}(x_2)\right]}. \] Rather, the rate functions reflect the fact that the event $X^n(t_1)\approx x_1$ takes place before the event $X^n(t_2)\approx x_2$. This condition appears in the rate function~$\mathcal{I}_{t_1t_2}$ of the joint event: \[ \mathbb{P}\left[X^n(t_1)\approx x_1,X^n(t_2)\approx x_2\right]\sim e^{-n\left[\mathcal{I}_{t_1}(x_1) + \mathcal{I}_{t_2-t_1}(x_2|x_1)\right]}. \] \begin{running_example*}[Small diffusion] Let $E=\mathbb{R}$ and $ \mathrm{d} X^n_t = n^{-1/2} \mathrm{d} B_t$, and suppose $X^n(0)=x_0$. Again we ignore that~$\mathbb{R}$ is not compact. We find \begin{equation*} \mathbb{P}\left[X^n(t_1)\approx x_1,X^n(t_2)\approx x_2\right] \sim e^{-n \left[\mathcal{I}_{t_1}(x_1) + \mathcal{I}_{t_2-t_1}(x_2|x_1)\right]}, \end{equation*} where we already computed $\mathcal{I}_t(x_2|x_1) = (x_2-x_1)^2/2t$. Since the process starts at~$x_0$, we have $\mathcal{I}_{t_1}(x_1)=(x_1-x_0)^2/2t$. For a partition~$0=t_0<t_1<\dots t_k= T$ of the time interval~$[0,T]$, \begin{equation*} \mathbb{P}\left[X^n(t_1)\approx x_1,\dots,X^n(t_k)\approx x_k\right]\sim \exp\{-n \cdot \mathcal{I}_{t_1\dots t_k}(x_1,\dots,x_k)\}, \quad n\to\infty. \end{equation*} Suppose~$t_i-t_{i-1}\approx \Delta t>0$ is small. Then massaging the rate function a bit, \begin{align*} \mathcal{I}_{t_1\dots t_k}(x_1,\dots,x_k) &\overset{\eqref{eq:prop:condtional-RF-finite-dim-marginals}}{=} \mathcal{I}_{t_1}(x_1) + \mathcal{I}_{t_2-t_1}(x_2|x_1) + \dots + \mathcal{I}_{t_k-t_{k-1}}(x_{k}|x_{k-1})\\ &= \frac{1}{2}\frac{(x_1-x_0)^2}{(t_1-t_0)} + \frac{1}{2} \frac{(x_2-x_1)^2}{(t_2-t_1)} + \dots + \frac{1}{2} \frac{(x_k-x_{k-1})^2}{(t_k-t_{k-1})}\\ &\approx \frac{1}{2} \sum_{i=1}^k \left(\frac{x_{i}-x_{i-1}}{t_i-t_{i-1}}\right)^2 \Delta t. \end{align*} Hence with a fine partition and regarding the points~$x_i$ as corresponding to a path~$x:[0,T]\to E$ via~$x_i=x(t_i)$, we expect \begin{equation} \mathcal{I}_{t_1\dots t_k}(x_1,\dots,x_k) \overset{k\gg 1}{\approx} \int_0^T \frac{1}{2} (\partial_t x(t))^2\, \mathrm{d} t. \end{equation} The rigorous version of this derivation is Schilder's Theorem, and we will prove the corresponding rigorous statement further below. This small calculation is based on the explicit formula for the conditional rate functions. In general, we will be able to obtain something like \begin{equation*} \mathcal{I}_{t_1\dots t_k}(x_1,\dots,x_k) \overset{k\gg 1}{\approx} \int_0^T \mathcal{L}(\partial_t x(t))\, \mathrm{d} t,\quad \mathcal{L}(\cdot)\;\text{convex}. \end{equation*} We provide more details in Section~\ref{BG:sec:semigroup-flow-HJ-eq} below. \end{running_example*} \section{Large deviations via convergence of generators} \label{sec:LDP-via-generators} In the previous section, we introduced in Definition~\ref{def:nonlinear-semigroups} the nonlinear semigroups $V_n(t)$ associated to a Markov process $X^n$ with paths in~$\mathcal{X}=C_E[0,T]$. We summarized the main preliminary result in Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}, which identifies two conditions for proving pathwise large deviation principles: \begin{enumerate}[label=(\roman*)] \item The sequence~$\{X^n\}_{n\in\mathbb{N}}$ is exponentially tight. \item The semigroups $V_n(t)|_{t\geq 0}$ converge to a semigroup $V(t)|_{t\geq 0}$. \end{enumerate} We say that Theorem~\ref{thm:LDP-via-semigroup-convergence:compact} is preliminary for a couple of reasons: \begin{enumerate}[$\bullet$] \item Verifying exponential tightness is a nasty and unfortunate task that we would like to avoid carrying out on a case-by-case analysis. \item Typically, the nonlinear semigroups $V_n(t)$ are not computable, and it is hard to even \emph{identify} a possible limit candidate $V(t)$ in the first place, yet proving convergence. \item The formula~\eqref{eq:RF-with-semigroup-approach} for the rate function is complicated. Even a simple question like "what is its minimizer?" is hard to answer. \end{enumerate} In this section, we answer the second key question from Section~\ref{BG:sec:math-gem}: how can we verify the convergence of semigroups from convergence of generators? To that end, let us turn to the recipe of semigroup convergence as outlined in Example~\ref{ex:semigroups-are-exponentials} above: we want to identify the generator~$H_n=(d/dt)V_n(0)$ and then identify a suitable limit~$H=\lim_n H_n$. Finally, we hope to conclude the semigroup convergence~$V_n\to V$. We start with deriving~$H_n$. \smallskip For a Markov process with semigroup~$S(t)$, the generator~$L$ is a linear operator characterizing the infinitesimal time evolution by \begin{equation*} S(t+\Delta t)f(x) = \mathbb{E}\left[f(X(t+\Delta t))|X(t)=x\right] = f(x) + Lf(x) \Delta t + \mathcal{O}(\Delta t^2). \end{equation*} \begin{definition}[Infinitesimal generator] \label{BG:def:infinitesimal-generator} Consider a strongly continuous contraction semigroup $S(t):C(E)\to C(E)$. Its corresponding \emph{infinitesimal generator} $L$ is a linear operator $L:\mathcal{D}(L)\subseteq C(E)\to C(E)$, where for any~$f\in C(E)$, if there is some~$g\in C(E)$ such that uniformly on~$E$, \[ g = \lim_{t\to 0}\frac{1}{t}\left(S(t)f-f\right), \] then $f\in \mathcal{D}(L)$ and $Lf:= g$. \qed \end{definition} We consider a Markov process~$X^n\in C_E[0,T]$ with corresponding transition probabilities~$P_n(t,x, \mathrm{d} y)$ and linear semigroup $S_n(t)f(x) := \int_Ef(y)P_n(t,x, \mathrm{d} y)$. Let~$L_n$ be its infinitesimal generator. For any function~$f\in\mathcal{D}(L)$, \begin{equation*} L_n f = \frac{ \mathrm{d}}{ \mathrm{d} t}\bigg|_0 S_n(t)f. \end{equation*} The nonlinear semigroups $V_n(t)$ from Definition~\ref{def:nonlinear-semigroups} are given by \begin{equation*} V_n(t)f(x) = \frac{1}{n}\log S_n(t)e^{nf(\cdot)}|_x. \end{equation*} Taking the time derivative and evaluating at zero, the chainrule formally yields \begin{align*} \frac{ \mathrm{d}}{ \mathrm{d} t}\bigg|_{t=0} V_n(t)f(x) &= \frac{1}{n}\frac{1}{S_n(0)e^{nf(\cdot)}|_x}\frac{ \mathrm{d}}{ \mathrm{d} t}\bigg|_{t=0}S_n(t)e^{nf(\cdot)}|_x\\ &= \frac{1}{n}e^{-nf(x)}L_n e^{nf(x)}. \end{align*} This suggests the operators~$H_nf := n^{-1}e^{-nf}L_n e^{nf}$ are the generators of~$V_n(t)$. \begin{running_example*} Let~$E=\mathbb{R}$ and~$ \mathrm{d} X^n_t = n^{-1/2} \mathrm{d} B_t$. The linear generator is~$L_nf=(2n)^{-1}\Delta f$ with domain~$\mathcal{D}(L_n)=C_b^2(\mathbb{R})$. We find \begin{equation*} H_nf \stackrel{\mathclap{\text{def}}}{=} \frac{1}{n}e^{-nf}L_n e^{nf} = \frac{1}{2}\frac{1}{n}\Delta f + \frac{1}{2}|\nabla f|^2, \end{equation*} writing $\nabla f = f'$ and $\Delta f = f''$. \qed \end{running_example*} \begin{definition}[Nonlinear generators]\label{def:nonlinear-generators} Let~$E$ be a compact Polish space and let a linear operator~$L_n:\mathcal{D}(L_n)\subseteq C(E)\to C(E)$ be the generator of an $E$-valued Markov process. The corresponding \emph{nonlinear generator} $H_n$ is defined as the map \begin{equation}\label{BG:eq:nonlinear-generators} H_nf (x):= \frac{1}{n}e^{-nf(x)}L_ne^{nf(\cdot)}(x), \end{equation} defined on the domain $\mathcal{D}(H_n):=\{f\,|\,e^{nf}\in\mathcal{D}(L_n)\}$. \qed \end{definition} Here, the operators~$H_n$ have to be understood as \emph{formal} generators of~$V_n(t)$. We only took the above calculation as a motivation, but do not claim the nonlinear generator to be a generator in the mathematically precise sense as for instance in the Hille-Yosida Theorem. Also in~\cite{FengKurtz2006} it is never claimed that we can make precise sense of $\frac{d}{dt}V_n(0)=H_n$. The formal calculations merely suggest that the limiting behaviour of~$H_n$ is closely related to the limiting behaviour of~$V_n(t)$. Jump processes form an important exception, where we will indeed find the relation~$\frac{d}{dt}V_n(0)=H_n$. \smallskip Equipped with Definition~\ref{def:nonlinear-generators}, we can tackle the task of deriving semigroup convergence from generator convergence. In Section~\ref{subsec:LDP-via-classical-sol}, we find conditions under which convergence of the nonlinear generators~$H_n$ to a limiting operator~$H$ implies large deviations (Theorem~\ref{thm:LDP-classical-sol}). The main ingredient of the proof of Theorem~\ref{thm:LDP-classical-sol} is a convergence statement that translates the Trotter-Kato approximation theorem for linear semigroups to the nonlinear setting. We call this convergence statement the Feng-Kurtz approximation theorem. In addition, we have to pose conditions on the limit~$H$ in order to construct a semigroup~$V(t)$ from it. Below the proof of Theorem~\ref{thm:LDP-classical-sol}, we illustrate with the running example which condition is hard to verify. \smallskip In Section~\ref{subsec:LDP-via-visc-sol}, we motivate the consideration of viscosity solutions. With this type of weak solutions, the conditions on the limit~$H$ are verifiable. The summarize this main result in Theorem~\ref{thm:LDP-visc-sol}, and we verify its conditions for the running example. \subsection{Using classical solutions}\label{subsec:LDP-via-classical-sol} The main point of this section is to show under which conditions convergence of generators implies the large deviation principle (Theorem~\ref{thm:LDP-classical-sol}). In the following definitions, nonlinear operators~$H$ acting on Banach spaces~$B$ are regarded as subsets of~$B\times B$. We denote by~$\overline{H}$ the closure of~$H$ with respect to the graph norm. For a Polish space~$E$, we will consider the Banach space~$B(E)$ of measurable bounded functions on~$E$, equipped with the supremum norm denoted by~$\|\cdot\|$. The following two properties are posing solvability conditions on an equation of the type~$(1-\tau H)f=h$ for a nonlinear operator~$H$, where~$\tau>0$ and~$h(x)$ are given and a solution~$f(x)$ in the domain of~$H$ is sought. We say~$f$ is a \emph{classical solution} if~$f\in\mathcal{D}(H)$ and~$(1-\tau H)f=h$. \begin{definition}[Dissipative operator] For a Polish space~$E$, a nonlinear operator $H\subseteq B(E)\times B(E)$ with domain $\mathcal{D}(H)$ is called \emph{dissipative} if for all $\tau>0$ and any $f_1,f_2\in\mathcal{D}(H)$, the following estimate is satisfied: \begin{align*} \|f_1-f_2\| \leq \|(f_1-\tau Hf_1) - (f_2-\tau Hf_2)\|. \tag*\qed \end{align*} \end{definition} Dissipativity corresponds to uniqueness of classical solutions. For $\tau>0$ and $h\in B(E)$, suppose two functions~$f_1,f_2\in\mathcal{D}(H)$ satisfy $(1-\tau H)f_1=h$ and $(1-\tau H)f_2=h$. If $H$ is a dissipative operator, then $\|f_1-f_2\| \leq 0$. \begin{definition}[Range condition]\label{def:range-condition} Let $E$ be a Polish space and let $H$ be a nonlinear operator $H\subseteq B(E)\times B(E)$ with domain $\mathcal{D}(H)$. We say that $H$ satisfies the \emph{range condition} if there exists a $\tau_0>0$ such that for all $0<\tau <\tau_0$, we have \begin{align*} \mathcal{D}(H) \subseteq \overline{\text{range}\left(1-\tau H\right)}. \tag*\qed \end{align*} \end{definition} The range condition corresponds to the existence of classical solutions. For dissipative operators, we have $\overline{\text{range}(1-\tau H)}=\text{range}(1-\tau \overline{H})$. If a dissipative operator $H$ satisfies the range condition, then for any $h\in\mathcal{D}(H)$ and $\tau>0$ sufficiently small, there exists a function $f\in\mathcal{D}(\overline{H})$ such that $(1-\tau \overline{H})f=h$. \begin{theorem}[{Crandall-Liggett,~\cite{CrandallLiggett1971}}] Let $E$ be a Polish space and let $H$ be a nonlinear operator $H\subseteq B(E)\times B(E)$ with domain $\mathcal{D}(H)$. Suppose that $H$ is dissipative and satisfies the range condition. Then for each $f\in \overline{\mathcal{D}(H)}$, the map \[ V(t)f := \lim_{k\to\infty}\left(1-\frac{t}{k}\overline{H}\right)^{-k}f \] exists and $\{V(t)\}_{t\geq 0}$ defines a contraction semigroup $V(t):\overline{\mathcal{D}(H)}\to \overline{\mathcal{D}(H)}$. \end{theorem} In Example~\ref{ex:semigroups-are-exponentials}, we considered semigroups taking values in~$\mathbb{C}$. In that context, given a generator~$g\in\mathbb{C}$, we can use different equivalent formulas of the exponential map to associate a continuous semigroup $T(t)=e^{tg}$ to it: \begin{equation*} T(t) := \sum_{k=0}^\infty \frac{1}{k!}(tg)^k\quad \text{or}\quad T(t) := \lim_{k\to\infty}\left(1-\frac{t}{k}\,g\right)^{-k}. \end{equation*} The first formula can be used in the context of linear semigroups whose generators are bounded operators (Hille-Yosida Theorem). The Crandall-Liggett Theorem is based on the second formula. For an operator~$H$ and~$\tau>0$, it uses the resolvent~$R(\tau) := \left(1-\tau H\right)^{-1}$ defined by finding a unique solution~$f$ to~$(1-\tau H)f=h$ for each given~$\tau>0$ and~$h\in C(E)$. Then~$V(t)=\lim_k R(t/k)^k$ serves as the rigorous version of~$V(t)=e^{tH}$. \smallskip If $E$ is compact and we work with $\mathcal{D}(H)\subseteq C(E)$ dense, then the associated semigroup consists of maps $V(t):C(E)\to C(E)$. The following Theorem is a simplification of Proposition~5.5 in~\cite{FengKurtz2006}. \begin{theorem}[Feng-Kurtz approximation]\label{thm:feng-kurtz-approx} Let~$E$ be a compact Polish space and let $G_n:B(E)\to B(E)$ and $H:\mathcal{D}(H)\subseteq C(E)\to C(E)$ be two dissipative operators that both satisfy the range condition with the same~$\tau_0$. Let~$V_n(t)$ and~$V(t)$ be the corresponding generated semigroups in the Crandall-Liggett sense. Suppose the following: \begin{enumerate}[label=(\roman*)] \item For each~$f\in\mathcal{D}(H)$, there exist~$f_n \in B(E)$ such that \[ \|f-f_n\|_E\xrightarrow{n\to\infty}0\quad\text{and}\quad \|Hf-G_nf_n\|_E\xrightarrow{n\to\infty}0. \] \end{enumerate} Then for any~$f\in\overline{\mathcal{D}(H)}$ and $f_n\in B(E)$ such that $\|f-f_n\|_E\to 0$, we have \begin{align*} \|V(t)f-V_n(t)f_n\|_E \xrightarrow{n\to\infty}0. \tag*\qed \end{align*} \end{theorem} We will apply the Feng-Kurtz approximation to operators~$G_n$ that are Hille-Yosida approximations of Markov generators. These Hille-Yosida approximations are generators of jump processes and satisfy the conditions of the Feng-Kurtz approximation theorem. A detailed discussion on their construction is given in~\cite[Section~IV.2]{EthierKurtz1986}. The fact that they are dissipative and satisfy the range condition is proven in~\cite[Lemma~5.7]{FengKurtz2006}. We now use Lemmas of~\cite[Chapter~5]{FengKurtz2006} to prove the following simplification of~\cite[Corollary~5.19]{FengKurtz2006}. \begin{theorem}[Large deviations via classical solutions]\label{thm:LDP-classical-sol} Let $E$ be a compact Polish space and for $n=1,2,\dots$, let $L_n:\mathcal{D}(L_n)\subseteq C(E)\to C(E)$ be the generator of an $E$-valued Markov process $X^n_t|_{t\geq 0}$ with continuous sample paths in~$\mathcal{X}=C_E[0,T]$. Let $H_n$ be the nonlinear generators~\eqref{BG:eq:nonlinear-generators}. Suppose the following: \begin{enumerate}[label=(\roman*)] \item \label{item:LDP-classical-sol:H-to-Hn}There exists a densely defined operator $H:\mathcal{D}(H)\subseteq C(E)\to C(E)$ such that for any $f\in \mathcal{D}(H)$, there are $f_n\in\mathcal{D}(H_n)$ satisfying \[ \|f-f_n\|_E\xrightarrow{n\to\infty}0 \quad \text{and}\quad \|Hf-H_nf_n\|_E \xrightarrow{n\to\infty}0. \] \item \label{item:LDP-classical-sol:range} The operator $H$ satisfies the range condition (Definition~\ref{def:range-condition}). \end{enumerate} Suppose furthermore that $X^n(0)$ satisfies the large deviation principle in~$E$ with rate function $\mathcal{I}_0:E\to[0,\infty]$. Then~$H$ satisfies the conditions of the Crandall-Liggett Theorem and hence generates a semigroup~$V(t)$, and the sequence $\{X^n\}_{n\in\mathbb{N}}$ satisfies the large deviation principle in $\mathcal{X}$ with a rate function $\mathcal{I}:\mathcal{X}\to[0,\infty]$ given by~\eqref{eq:RF-with-semigroup-approach}. \end{theorem} \begin{proof}[Sketch of proof of Theorem~\ref{thm:LDP-classical-sol}] We verify the conditions of Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}, according to which a large deviation principle of~$\{X^n\}$ follows from two conditions: exponential tightness and convergence of the nonlinear semigroups $V_n(t)$ to some limiting semigroup~$V(t):C(E)\to C(E)$. \smallskip Under the above convergence condition on the nonlinear generators~$H_n$, exponential tightness of~$\{X^n\}_{n\in\mathbb{N}}$ follows by~\cite[Corollary~4.17]{FengKurtz2006}. We do not give the details here, but comment briefly on why: (a) the exponential compact containment condition is always satisfied for compact spaces, (b) we can take $F=C(E)$ since $\mathcal{D}(H)$ is dense in~$C(E)$, and (c) exploits the fact that by the convergence condition $H_n\to H$, the sequences $H_nf_n$ are uniformly bounded. \smallskip We are left with showing that 1) we can define~$V(t)$ in terms of the limit operator~$H$ by means of the Crandall-Liggett Theorem and 2) that we obtain the semigroup-convergence $V_n(t)\to V(t)$ as specified in Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}. \smallskip 1) By assumption, the operator~$H$ satisfies the range condition, and we only need to verify dissipativity. To that end, we henceforth only work with the full generator of~$X^n$, the graph in~$B(E)\times B(E)$ defined as (see \cite[Section~1.1.5]{EthierKurtz1986}) \begin{equation*} \left\{\left(f,g\right)\in B(E)\times B(E)\,:\,\;\forall \,t,\, S_n(t)f-f=\int_0^tS_n(s)g\, \mathrm{d} s\right\}. \end{equation*} We will denote them as well by $L_n$, and their associated nonlinear generators as well by~$H_n$. The reason for considering the full generator is that by Proposition~5.1 in~\cite{EthierKurtz1986}, it is a linear dissipative operator with resolvent \begin{equation*} \left(\lambda - L_n\right)^{-1}h = \int_0^\infty e^{-\lambda t}S_n(t)h\, \mathrm{d} t. \end{equation*} Consider for $\varepsilon_n:=\exp\{-n^2\}$ the Hille-Yosida approximations $L_n^{\varepsilon_n}$ defined by \[ L_n^{\varepsilon_n} := L_n\left(1-\varepsilon_n L_n\right)^{-1}. \] The map~$L_n^{\varepsilon_n}:B(E)\to B(E)$ defines a bounded, linear and dissipative operator (\cite[Lemma~1.2.4]{EthierKurtz1986}) that generates a Markov jump process on~$E$. Define the associated nonlinear generators $H_n^{\varepsilon_n}:B(E)\to B(E)$ by \[ H_n^{\varepsilon_n}f:= \frac{1}{n}e^{-nf}L_n^{\varepsilon_n}e^{nf}. \] Then~$H_n^{\varepsilon_n}$ is dissipative~\cite[Lemma~5.7]{FengKurtz2006}. We prove below that our Assumption~\ref{item:LDP-classical-sol:H-to-Hn} on the convergence $H_n\to H$ implies that $H_n^{\varepsilon_n}\to H$ in the same sense. That establishes dissipativity of~$H$ as the limit of the dissipative operators~$H_n^{\varepsilon_n}$; for any $f_1,f_2\in \mathcal{D}(H)$, let $f_1^n,f_2^n\in B(E)$ be such that $f_1^n\to f_1$ and $f_2^n\to f_2$ uniformly on~$E$. Then using dissipativity of $H_n^{\varepsilon_n}$ and that the corresponding images converge uniformly, we find that \begin{align*} \|f_1-f_2\|_E &\leq \|f_1^n-f_2^n\|_E + o(1)_{n\to\infty}\\ &\leq \|\left(f_1^n-\tau H_n^{\varepsilon_n}f_1^n\right)-\left(f_2^n-\tau H_n^{\varepsilon_n}f_2^n\right)\|_E +o(1)_{n\to\infty}\\ &\leq \|\left(f_1-\tau Hf_1\right) - \left(f_2-\tau Hf_2\right)\|_E + o(1)_{n\to\infty}. \end{align*} Now taking the limit~$n\to\infty$ shows that~$H$ is dissipative. \smallskip We are left with verifying $H_n^{\varepsilon_n}\to H$. For~$f\in \mathcal{D}(H)$, let~$f_n\in\mathcal{D}(H_n)$ be such that $f_n\to f$ and $H_nf_n\to Hf$, both uniformly on~$E$. Then since~$H_nf_n$ is bounded, $n\varepsilon_nH_nf_n\to 0$ as~$n\to\infty$. Hence $e^{nf_n}(1-n\varepsilon_n \, H_nf_n) > 0$ eventually. We show that the functions~$f_n^{\varepsilon_n}$ defined by \[ e^{nf_n^{\varepsilon_n}} := e^{nf_n}\left(1-n\varepsilon_n H_n f_n\right) =\left(1-\varepsilon_n L_n\right) e^{nf_n} \] satisfy $f_n^{\varepsilon_n}\to f$ and $H_n^{\varepsilon_n}f_n^{\varepsilon_n}\to Hf$. The first convergence follows from the fact that~$f_n\to f$ and~$e^{n(f_n^{\varepsilon_n}-f_n)}\to 1$. We find by the definition of the Hille-Yosida approximants~$L_n^{\varepsilon_n}$ that \begin{align*} H_n^{\varepsilon_n}f_n^{\varepsilon_n} &= \frac{1}{n} e^{-nf_n^{\varepsilon_n}} L_n^{\varepsilon_n} (1-\varepsilon_nL_n) e^{nf_n}\\ &= e^{-nf_n^{\varepsilon_n}} \frac{1}{n}L_n e^{nf_n} = e^{n(f_n-f_n^{\varepsilon_n})} H_nf_n. \end{align*} Hence $H_n^{\varepsilon_n}f_n^{\varepsilon_n}\to Hf$ is implied by $H_nf_n\to Hf$. That finishes the proof of~1): the operator~$H$ is dissipative and satisfies the range condition, and hence generates a semigroup~$V(t)$. \smallskip 2) Since the operators $H_n^{\varepsilon_n}$ defined above are dissipative and satisfy the range condition (\cite[Lemma~5.7]{FengKurtz2006}), they generate a semigroup~$V_n^{\varepsilon_n}(t)$ acting on~$B(E)$. We showed above the convergence $H_n^{\varepsilon_n}\to H$. Hence by the Feng-Kurtz approximation (Theorem~\ref{thm:feng-kurtz-approx}) applied to $G_n=H_n^{\varepsilon_n}$, we obtain $V_n^{\varepsilon_n}(t)\to V(t)$: for any function $f\in C(E)$ and functions $f_n\in B(E)$ such that $\|f-f_n\|_E\to 0$, \[ \|V(t)f-V_n^{\varepsilon_n}(t)f_n\|_E \xrightarrow{n\to\infty}0. \] Furthermore, the semigroup~$V_n^{\varepsilon_n}(t)$ approximates~$V_n(t)$, in the sense that for any function $f_n\in\mathcal{D}(H_n)$, \begin{equation}\label{eq:Vn-close-to-Vn_varep} \|V_n^{\varepsilon_n}(t)f_n-V_n(t)f_n\| \leq \sqrt{2\varepsilon_n t}\, e^{2n\|f_n\|}\|H_nf_n\|, \end{equation} which is proven in~\cite[Lemma~5.11]{FengKurtz2006}. The choice $\varepsilon_n=\exp\{-n^2\}$ implies that the difference vanishes in the limit $n\to\infty$. With that, \begin{align*} \|V(t)f-V_n(t)f_n\| &\leq \|V(t)f-V_n^{\varepsilon_n}(t)f_n\| + \|V_n^{\varepsilon_n}(t)f_n-V_n(t)f_n\| \to 0, \end{align*} which finishes the proof. \end{proof} \begin{running_example*} We illustrate on the small-diffusion process which condition of Theorem~\ref{thm:LDP-classical-sol} is difficult to verify in practice. We consider the small-diffusion process on the flat torus~$E=\mathbb{T}=\mathbb{R}/\mathbb{Z}$; that means the infinitesimal generator is the map $L_n:C^2(\mathbb{T})\to C(\mathbb{T})$ given by \[ L_nf(x) = \frac{1}{2} \frac{1}{n} \Delta f(x). \] Therefore, the nonlinear generators~$H_n:C^2(\mathbb{T})\to C(\mathbb{T})$ read \[ H_nf(x) = \frac{1}{n} e^{-nf(x)}L_n e^{nf(x)} = \frac{1}{2}\frac{1}{n}\Delta f(x) + \frac{1}{2}|\nabla f(x)|^2. \] They converge to~$Hf(x) := \frac{1}{2}|\nabla f(x)|^2$. Indeed, if we take for instance the domain~$\mathcal{D}(H) := C^2(\mathbb{T})$, then for any~$f\in\mathcal{D}(H)$, the constant sequence~$f_n:=f$ satisfies \[ \|Hf-H_n f_n\|_\mathbb{T} =\frac{1}{2}\frac{1}{n} \|\Delta f\|_\mathbb{T} \to 0, \] with $\|\cdot\|_\mathbb{T}$ the supremum norm. We are only left with verifying the range condition for~$H$ in order to apply Theorem~\ref{thm:LDP-classical-sol}. The definition translates to the following PDE-problem: for a $C^2$ function $h:\mathbb{T}\to\mathbb{R}$ and for $\tau > 0$, find $u:\mathbb{T}\to\mathbb{R}$ in the domain of $H$ such that for any $x\in\mathbb{T}$, we have \[ u(x) - \tau \frac{1}{2}|\nabla u(x)|^2 = h(x). \] There is no general theory available providing the existence of such a solution. The problem lies in the differentiability that solutions have to satisfy. \qed \end{running_example*} Using viscosity solutions makes the semigroup approach to large deviations applicable. In the words of Jin Feng and Thomas Kurtz~\cite[Preface]{FengKurtz2006}: \smallskip \emph{"This work began as a research paper intended to show how the convergence of nonlinear semigroups associated with a sequence of Markov processes implied the large deviation principle for the sequence. We expected the result to be of little utility for specific applications, since classical convergence results for nonlinear semigroups involve hypotheses that are very difficult to verify, at least using classical methods. We should have recognized at the beginning that the modern theory of viscosity solutions provides the tools needed to overcome the classical difficulties."} \smallskip We sketch in the next section how the approach using viscosity solutions works out in the compact setting. \subsection{Using viscosity solutions} \label{subsec:LDP-via-visc-sol} In the previous section, we discussed how to verify the convergence of nonlinear semigroups $V_n$ from the convergence of associated formal nonlinear generators~$H_n$. The Feng-Kurtz approximation (Theorem~\ref{thm:feng-kurtz-approx}) was the key to obtain semigroup convergence from generator convergence. The example above illustrates that while finding a candidate limit~$H$ of the~$H_n$ is often straightforward, verifying the range condition for~$H$ is hard. We required the range condition to generate a semigroup by the Crandall-Liggett theorem. Here, we discuss why viscosity solutions are well suited for generating the desired limiting semigroup. \smallskip The basic idea is to use weak solutions~$u$ of~$(1-\tau H)u=h$ that are not required to be in the domain of~$H$. Then we define an auxiliary operator~$\widehat{H}$ by adding the weak solutions to the domain of~$H$ and the corresponding ranges to the image of~$H$. If the requirement on a solution is weak enough, we can find enough solutions until the domain~$\mathcal{D}(\widehat{H})$ is dense in~$C(E)$, such that the operator~$\widehat{H}$ automatically satisfies the range condition. However, we also want~$\widehat{H}$ to be a dissipative operator in order to use the Crandall-Liggett Theorem. The limit operators~$H$ that we start from are dissipative, which follows from the convergence~$H_n\to H$ (see the proof of Theorem~\ref{thm:LDP-classical-sol}). Therefore, we are searching for weak solutions such that we keep dissipativity while enlargening~$H$. \smallskip We now motivate why viscosity solutions are suited for that purpose. A generator~$L$ of a Markov process satisfies the positive maximum principle; for a function~$f$ in the domain of~$L$, if $x$ is a local maximum of~$f$, then $Lf(x)\leq 0$. This propery carries over to their nonlinear generators~$Hf=e^{-f}Le^f$, where we obtain that if $(f_1-f_2)(x)=\sup(f_1-f_2)$, then $Hf_1(x)- Hf_2(x)\leq 0$. In general, operators satisfying the positive maximum principle are dissipative. \smallskip Hence adding weak solutions such that the extended operator~$\widehat{H}$ still satisfies the positive maximum principle suffices for our purposes. Now given a "weak solution" $u$ to the equation $(1-\tau H)u=h$, consider the extended operator $\widehat{H} := H\cup \left(u,(u-h)/\tau\right)$; that is we added the weak solution and its corresponding image "$Hu$"$=(u-h)/\tau$ to the graph of~$H$. Let us see how the newly added elements affect the maximum principle. If $u$ is a weak solution and $(u-f)(x)=\sup(u-f)$, with~$f\in\mathcal{D}(H)$ such that~$\widehat{H}f=Hf$, then \begin{align*} (\widehat{H}u-\widehat{H}f)(x) &= \frac{1}{\tau}(u-h)(x) - Hf(x)\\ &= \frac{1}{\tau} \left[u(x)-\tau Hf(x)-h(x)\right] \stackrel{!}{\leq}0. \end{align*} When considering $(f-u)$, then $(f-u)(x)=\sup(f-u)$ should imply \begin{align*} (\widehat{H}f-\widehat{H}u)(x) &= Hf(x) -\frac{1}{\tau}(u-h)(x)\\ &= -\frac{1}{\tau} \left[u(x)-\tau Hf(x)-h(x)\right] \stackrel{!}{\leq}0. \end{align*} This motivates the following definition. \begin{definition}[Viscosity solutions]\label{def:viscosity-sol:beginner-guide} For a compact Polish space~$E$, let~$\tau > 0$ and~$h\in C(E)$. For an operator $H:\mathcal{D}(H)\subseteq C(E)\to C(E)$ with domain~$\mathcal{D}(H)$, consider the equation~$(1-\tau H)u=h$. \begin{enumerate}[label=(\roman*)] \item We say that a function~$u_1:E\to\mathbb{R}$ is a \emph{viscosity subsolution} if it is bounded, upper semicontinuous and for any function~$f\in\mathcal{D}(H)$, if a point~$x\in E$ is such that $(u_1-f)(x)=\sup_E(u_1-f)$, then \[ u_1(x)-\tau Hf(x)-h(x)\leq 0. \] \item We call a function~$u_2:E\to\mathbb{R}$ a \emph{viscosity supersolution} if it is bounded, lower semicontinuous and for any function~$f\in\mathcal{D}(H)$, if a point~$x\in E$ is such that $(f-u_2)(x)=\sup_E(f-u_2)$, then \[ u_2(x)-\tau Hf(x)-h(x)\geq 0. \] \item A function $u:E\to\mathbb{R}$ is a \emph{viscosity solution} if it is both a viscosity subsolution and a viscosity supersolution. \qed \end{enumerate} \end{definition} A viscosity solution in the sense of Definition~\ref{def:viscosity-sol:beginner-guide} is both upper- and lower semicontinuous, and hence continuous. \begin{definition}[Comparison principle] We say that $(1-\tau H)u=h$ as in Definition~\ref{def:viscosity-sol:beginner-guide} satisfies the \emph{comparison principle} if for any viscosity subsolution~$u_1$ and viscosity supersolution~$u_2$, the inequality $u_1\leq u_2$ holds on~$E$.\qed \end{definition} If the comparison principle holds, then any two viscosity solutions~$u,v$ are equal: since $u$ is a viscosity subsolution and~$v$ a viscosity supersolution,~$u\leq v$. Reversing the roles, we find $v\leq u$. Hence~$u=v$, and thus the comparison principle implies uniqueness of viscosity solutions. \smallskip We now formulate the viscosity-analogue of Theorem~\ref{thm:LDP-classical-sol}. For that purpose, we define for an operator $H:\mathcal{D}(H)\subseteq C(E)\to C(E)$ its extension~$\widehat{H}$ as follows. If for any~$\tau > 0$ and $h\in C(E)$ there exists a unique viscosity solution~$u$ of the equation~$(1-\tau H)u=h$, then we denote it by $R(\tau)h:=u$. The map~$R(\tau)$ is called the resolvent. We denote by~$\widehat{H}\subseteq C(E)\times C(E)$ the operator defined as the graph \[ \widehat{H} := \bigcup_{\tau > 0}\left\{\left(R(\tau)h,\frac{1}{\tau}(R(\tau)h-h)\right)\,:\,h \in C(E)\right\}. \] \begin{theorem}[Theorem~6.14 in~\cite{FengKurtz2006}, Large Deviations via Viscosity Solutions]\label{thm:LDP-visc-sol} Let~$E$ be a compact Polish space and~$\{X^n\}$ be a sequence of Markov processes in~$\mathcal{X}=C_E[0,T]$, with generators~$L_n$ and associated nonlinear generators~$H_n$ from Definition~\ref{def:nonlinear-generators}. Assume the following: \begin{enumerate}[label=(\roman*)] \item There is a densely defined operator $H:\mathcal{D}(H)\subseteq C(E) \to C(E)$ such that $H_n$ converges to~$H$; for every~$f\in\mathcal{D}(H)$, there are functions~$f_n\in\mathcal{D}(H_n)$ such that \[ \|f-f_n\|_E\xrightarrow{n\to\infty}0 \quad \text{and}\quad \|Hf-H_nf_n\|_E \xrightarrow{n\to\infty}0. \] \item For~$\tau>0$ and~$h\in C(E)$, the comparison principle holds for~$(1-\tau H)u=h$. \end{enumerate} Suppose furthermore that the initial conditions~$X^n(0)$ satisfy a large deviation principle with rate function~$\mathcal{I}_0$. Then the sequence~$\{X^n\}$ satsifies a large deviation principle in~$\mathcal{X}$ with a rate function~$\mathcal{I}$ given by~\eqref{eq:RF-with-semigroup-approach}, where the semigroup~$V(t)$ is generated by the operator~$\widehat{H}$: for every~$f\in C(E)$, we have~$V(t)f = \lim_{k\to\infty}[R(t/k)]^k f$. \end{theorem} \begin{proof}[Sketch of proof of Theorem~\ref{thm:LDP-visc-sol}] Just as in the previous section, we want to verify exponential tightness and convergence of the nonlinear semigroups~$V_n(t)$ to some limit~$V(t)$. Then the large-deviation statement follows from Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}. Exponential tightness follows from the convergence condition~$H_n\to H$, just as we indicated in the proof of Theorem~\ref{thm:LDP-classical-sol} in the previous section. \smallskip We are left with showing that the operator~$\widehat{H}$ satisfies the conditions of the Crandall-Liggett Theorem (dissipativity and the range condition) with dense domain, so that it generates a semigroup~$V(t)$ acting on~$C(E)$, and that we have convergence~$V_n(t)\to V(t)$ as in Theorem~\ref{thm:LDP-via-semigroup-convergence:compact}. The argument is based on the same techinque as in Theorem~\ref{thm:LDP-classical-sol}: we use the Hille-Yosida approximations~$L_n^{\varepsilon_n}$ of~$L_n$ and their corresponding nonlinear generators~$H_n^{\varepsilon_n}$. \smallskip The operator~$\widehat{H}$ is defined via the existence of unique viscosity solutions. We first show that its domain is dense in~$C(E)$. To that end, fix~$\tau>0$ and a function~$h\in C(E)$. Since~$\text{range}(1-\tau H_n^{\varepsilon_n})=C(E)$ (\cite[Lemma~5.7]{FengKurtz2006}), there exists a classical solution~$f_n\in C(E)$ to~$(1-\tau H_n^{\varepsilon_n})f_n = h$. In particular,~$f_n$ is a viscosity solution. Define the functions~$u_1,u_2:E\to\mathbb{R}$ by \begin{align*} u_1(x)&:=\lim_{k\to\infty}\sup\left\{f_n(z)\,|\,n\geq k,\, d(x,z)\leq \frac{1}{k}\right\}\\ u_2(x)&:=\lim_{k\to\infty}\inf\left\{f_n(z)\,|\,n\geq k,\, d(x,z)\leq \frac{1}{k}\right\} \end{align*} It is shown in~\cite[Lemma~6.9]{FengKurtz2006} that~$u_1$ is a viscosity subsolution and~$u_2$ is a viscosity supersolution of~$(1-\tau H)u=h$. By construction, $u_1\geq u_2$. By assumption, the comparison principle holds, which gives~$u_1\leq u_2$. Hence the function $u:=u_1=u_2$ is the unique viscosity solution to~$(1-\tau H)u=h$. Define the resolvent map $R(\tau):C(E)\to C(E)$ by setting $R(\tau)h:=u$. Lemma~6.9 also establishes the estimate \[ \|u-f\|\leq \|h-(f-\tau Hf)\| \] for any~$f\in\mathcal{D}(H)$. Specializing to~$h$ in the domain of~$\mathcal{D}(H)$ and choosing in the estimate $f=h$, this implies \[ \|R(\tau)h-h\| \leq \tau \|Hh\| \xrightarrow{\tau \to 0} 0. \] That demonstrates $\mathcal{D}(H)\subseteq \overline{\mathcal{D}(\widehat{H})}$, and we conclude that~$\mathcal{D}(\widehat{H})$ is dense in~$C(E)$ since~$\mathcal{D}(H)$ is dense in~$C(E)$. \smallskip We showed in the proof of Theorem~\ref{thm:LDP-classical-sol} that the assumed convergence condition~$H_n\to H$ implies~$H_n^{\varepsilon_n}\to H$, and that the operator~$H$ is dissipative as the limit of the dissipative operators~$H_n^{\varepsilon_n}$. The fact that dissipativity transfers further to~$\widehat{H}$ is proven in~\cite[Theorem~6.13]{FengKurtz2006}, part~(c); the operators~$H_n$ appearing therein are the Hille-Yosida approximants~$H_n^{\varepsilon_n}$. The range condition on~$\widehat{H}$ is satisfied by construction. Now the fact that~$V(t)=\lim_k R(t/k)^k$ follows from the Feng-Kurtz approximation theorem. \end{proof} In summary, with introducing viscosity solutions, we weakened the requirement on a function being a solution. The existence of sub- and supersolutions is guaranteed as a consequence of the convergence $H_n\to H$. However, dissipativity of~$H$ is no longer sufficient for uniqueness of viscosity solutions. That is because viscosity solutions are in general not in the domain of~$H$, which breaks the argument shown below Definition~\ref{def:range-condition}. This contrasts the classical approach, where uniqueness of solutions is for free while existence of solutions remains open. We close this section by illustrating Theorem~\ref{thm:LDP-visc-sol}. \begin{running_example*} Consider the small-diffusion process $ \mathrm{d} X^n_t=n^{-1/2} \mathrm{d} B_t$ on the torus~$\mathbb{T}$. The linear generators are $L_nf = (2n)^{-1}\Delta f$, and \[ H_nf = \frac{1}{n}e^{-nf}L_n e^{nf} = \frac{1}{2}\frac{1}{n}\Delta f + \frac{1}{2}|\nabla f|^2. \] We already checked in the previous section that they converge to $Hf = \frac{1}{2}|\nabla f|^2$. Here, we can take for instance the domain~$\mathcal{D}(H)=C^{17}(\mathbb{T})$. \smallskip For applying Theorem~\ref{thm:LDP-visc-sol}, we must verify the comparison principle. To that end, fix~$\tau >0$ and~$h\in C(\mathbb{T})$, and let~$u_1$ be a vioscosity subsolution and~$u_2$ be a viscosity supersolution of $(1-\tau H)u=h$. We want to prove that $u_1\leq u_2$. For illustration, suppose first that they are classical sub- and supersolutions; they are in the domain of~$\mathcal{D}(H)$ and for any~$x\in \mathbb{T}$, \begin{align*} u_1(x)-\tau Hu_1(x) - h(x)\leq 0 \quad \text{and}\quad u_2(x)-\tau Hu_2(x)-h(x)\geq 0. \end{align*} Let $x_m$ be a point such that $(u_1-u_2)(x_m) = \sup_\mathbb{T}(u_1-u_2)$. Then we have $\nabla u_1(x_m)=\nabla u_2(x_m)$, and by the sub-and supersolution inequalities, we obtain \begin{align*} (u_1-u_2)(x) \leq (u_1-u_2)(x_m) &\leq Hu_1(x_m) - Hu_2(x_m) \\&= \frac{1}{2}\left(|\nabla u_1(x_m)|^2-|\nabla u_2(x_m)|^2\right) = 0. \end{align*} That shows uniqueness of classical solutions to~$(1-\tau H)u=h$. \smallskip For viscosity sub- and supersolutions, we can not rely on~$u_1,u_2$ being in the domain of~$H$. The classical trick is to use distance-like functions that are in the domain in order to approximate $\sup_\mathbb{T}(u_1-u_2)$. Here, we can take \[ \Psi(x,y) := \sin^2(\pi(x-y)). \] Then $\Psi(\cdot,y)$ and $\Psi(x,\cdot)$ are smooth on~$\mathbb{T}$, and hence in the domain~$\mathcal{D}(H)=C^{17}(\mathbb{T})$. For $\alpha>0$, define \[ \Phi_\alpha(x,y) := u_1(x)-u_2(y) - \alpha \Psi(x,y). \] By the semi-continuity properties of~$u_1,u_2$, for every~$\alpha>0$ there are~$x_\alpha,y_\alpha$ such that \[ \Phi_\alpha(x_\alpha,y_\alpha) = \sup_{x,y}\Phi_\alpha(x,y). \] The point is that since~$u_1,u_2$ are bounded, these maximizing points~$x_\alpha,y_\alpha$ will converge to each other as~$\alpha\to\infty$; indeed, observing that $\Phi_\alpha(x_\alpha,x_\alpha)\leq \Phi(x_\alpha,y_\alpha)$, we obtain \[ \Psi(x_\alpha,y_\alpha) \leq \frac{2}{\alpha}(u_2(x_\alpha)-u_2(y_\alpha)) \leq \frac{4}{\alpha}\|u_2\| \xrightarrow{\alpha\to\infty} 0. \] Since $\Psi(x,y)\geq 0$ and~$\Psi(x,y)=0$ if and only if $x=y$, we approximate the supremum of $(u_1-u_2)$ in the sense that $x_\alpha \approx y_\alpha$ and \begin{align*} \sup_{\mathbb{T}}(u_1-u_2) &= \sup_{x\in\mathbb{T}}\left(u_1(x)-u_2(x)-\alpha \Psi(x,x)\right)\\ &\leq \sup_{x,y}\Phi_\alpha(x,y) = \Phi_\alpha(x_\alpha,y_\alpha)\\ &\leq u_1(x_\alpha)-u_2(y_\alpha). \end{align*} Now we can use the sub- and supersolution inequalities. The test functions defined by \begin{align*} f_1^\alpha(x) := u_2(y_\alpha) + \alpha\Psi(x,y_\alpha)\quad\text{and}\quad f_2^\alpha(y):=u_1(x_\alpha) - \alpha\Psi(x_\alpha,y) \end{align*} are smooth, and hence are both in the domain of~$H$. By construction, \[ (u_1-f_1^\alpha)(x_\alpha) = \sup_\mathbb{T}(u_1-f_1^\alpha)\quad\text{and}\quad (f_2^\alpha-u_2)(y_\alpha) = \sup_{\mathbb{T}}(f_2^\alpha-u_2), \] so that with the sub- and supersolution inequalities, \begin{align*} u_1(x_\alpha)-\tau Hf_1^\alpha(x_\alpha)-h(x_\alpha)\leq 0\quad\text{and}\quad u_2(y_\alpha)-\tau Hf_2^\alpha(y_\alpha)-h(y_\alpha)\geq 0. \end{align*} With these, we can further estimate $u_1(x_\alpha)-u_2(y_\alpha)$ to arrive at \[ \sup_{\mathbb{T}}(u_1-u_2) \leq \tau \left[Hf_1^\alpha(x_\alpha)-Hf_2^\alpha(y_\alpha)\right] + h(x_\alpha)-h(y_\alpha). \] Since $Hf=(1/2) |\nabla f|^2$ depends only on the gradient and $\nabla f_1^\alpha(x_\alpha)=\nabla f_2^\alpha(y_\alpha)$, the difference of the Hamiltonians is zero. The function~$h$ is uniformly continuous on the compact space~$\mathbb{T}$. Then since $\Psi(x_\alpha,y_\alpha)\to 0$, we obtain finally \begin{align*} \sup_\mathbb{T}(u_1-u_2) \leq \liminf_{\alpha\to 0}|h(x_\alpha)-h(y_\alpha)| = 0, \end{align*} which finishes the verification of the comparison principle. \qed \end{running_example*} The running example also illustrates a principle that applies more generally. We can choose the domain of the limiting operator~$H$ as small as we want, provided that it contains sufficient functions to allow for verifying the comparison principle. In the example, merely using smooth functions was sufficient. As a rule of thumb, in compact spaces one wants to make sure that distance functions are in the domain of~$H$. \section{Action-integral representation of rate functions} \label{BG:sec:semigroup-flow-HJ-eq} Let us summarize where we stand after the previous section. We considered a sequence of Markov processes $X^n$ in~$\mathcal{X}=C_E[0,T]$ and established that the following two conditions imply a pathwise large deviation principle: \begin{enumerate}[label=(\roman*)] \item The nonlinear generators converge $H_n\to H$. \item The comparison principle holds for $(1-\tau H)u=h$. \end{enumerate} We illustrated on the example of small diffusion how one can verify these conditions in practice. The rate function is given via the limiting semigroup~$V(t)$ generated by~$H$, based on finding unique viscosity solutions of~$(1-\tau H)u=h$. \smallskip In this section, we focus on this rate function, which is given by \begin{equation}\label{eq:RF-with-semigroup-approach:last-sec} \mathcal{I}(x) = \mathcal{I}_0(x(0)) + \sup_{k\in\mathbb{N}}\sup_{(t_1,\dots,t_k)} \sum_{i=1}^k \mathcal{I}_{t_i-t_{i-1}}(x(t_i)|x(t_{i-1})), \end{equation} where the conditional rate functions~$\mathcal{I}_t(z|y)$ are \begin{equation}\label{BG:eq:RF-1d-marginals:last-sec} \mathcal{I}_t(z|y) = \sup_{f\in C(E)}\left[f(z)-V(t)f(y)\right]. \end{equation} We specialize henceforth to the state space~$E=\mathbb{T}$, the one-dimensional flat torus. Denote by~$\mathcal{A}\mathcal{C}_E[0,T]$ the set of absolutely continuous curves in~$E$. Our aim in this section is to find conditions under which the rate function~$\mathcal{I}:\mathcal{X}\to[0,\infty]$ is given by a Lagrangian~$\mathcal{L}:\mathbb{R}\to[0,\infty]$ via the formula \begin{equation} \label{BG:eq:action-integral-formula} \mathcal{I}(x) = \begin{cases} \mathcal{I}_0(x(0))+\int_0^T \mathcal{L}(\partial_t x(t))\, \mathrm{d} t, &\qquad x\in\mathcal{A}\mathcal{C}_E[0,T],\\ +\infty, &\qquad \text{otherwise}. \end{cases} \end{equation} We first indicate how to obtain~\eqref{BG:eq:action-integral-formula} from~\eqref{eq:RF-with-semigroup-approach:last-sec} via an informal calculation. Then we show how this can be obtained rigorously based on identifying the semigroup~$V(t)$ at least formally as a Hamilton-Jacobi semigroup~$V_\mathcal{H}(t)$---we give details below by Proposition~\ref{BG:prop:good-Lagrangians-give-action}. Finally, we show in what sense the required equality~$V(t)=V_\mathcal{H}(t)$ follows from solving a Hamilton-Jacobi equation. \subsubsection{Action-integral via an informal calcuation.} Here we consider the operator $Hf = \mathcal{H}(\nabla f)$ with the Hamiltonian $\mathcal{H}(p)=\frac{1}{2}p^2$. Let~$x\in\mathcal{A}\mathcal{C}_E[0,T]$. We want to show~\eqref{BG:eq:action-integral-formula} starting from~\eqref{eq:RF-with-semigroup-approach:last-sec}. To that end, we compute~$\mathcal{I}_{t_2-t_1}\left(z|y\right)$ for $y$ close to $z$ and $t=t_2-t_1>0$ small, having in mind that $y=x(t_1)$ and $z=x(t_2)$ are close to each other. With the formal expansions \[ e^{tH}\approx 1+tH\quad\text{and}\quad f(z)-f(y) \approx (z-y)\cdot\nabla f(y), \] and thinking of~$V(t)=e^{tH}$ (the generator of~$V(t)$ is~$H$), we obtain from~\eqref{BG:eq:RF-1d-marginals:last-sec} \begin{align*} \mathcal{I}_t(z|y) &\approx \sup_f \left[f(z)-f(y) - tHf(y)\right]\\ &\approx t \cdot \sup_f \left[\nabla f(y) \cdot \frac{z-y}{t} - \mathcal{H}(\nabla f(y))\right] = t\cdot \sup_p\left[p \cdot \frac{z-y}{t} - \mathcal{H}(p)\right]. \end{align*} Hence with $\mathcal{L}(v)=\sup_p\left[pv-\mathcal{H}(p)\right]$, which here is equal to $v^2/2$, we find \begin{align*} \mathcal{I}_{t_2-t_1}(z|y) &\approx (t_2-t_1)\mathcal{L}\left(\frac{z-y}{t_2-t_1}\right) = \int_{t_1}^{t_2} \mathcal{L}(\partial_s \gamma_{t_1t_2}(s))\, \mathrm{d} s, \end{align*} where $\gamma_{t_1t_2}:[t_1,t_2]\to\mathbb{R}$ is the linear path connecting $y$ and $z$. Now starting from~\eqref{eq:RF-with-semigroup-approach:last-sec}, the action-integral formula follows from summing up all the conditional rate functions, since the linear paths~$\gamma_{t_kt_{k+1}}$ approximate~$x$ in~$[t_k,t_{k+1}]$. \subsubsection{Action-integral via rewriting the semigroup.} Here we indicate how to make the above informal calculation rigorous. We start from an operator~$H$ acting on functions as~$Hf(x)=\mathcal{H}(\nabla f(x))$, with a convex Hamiltonian~$\mathcal{H}:\mathbb{R}\to\mathbb{R}$ satisfying~$\mathcal{H}(0)=0$. Define the Lagrangian~$\mathcal{L}$ as the Legendre dual~$\mathcal{L}(v):=\sup_{p\in\mathbb{R}}\left[pv-\mathcal{H}(p)\right]$, and the semigroup~$V_\mathcal{H}(t)$ by \begin{equation}\label{BG:eq:control-semigroup} V_\mathcal{H}(t)f(x) := \sup_{\substack{\gamma\\\gamma(0)=x}} \left[f(\gamma(t))-\int_0^t\mathcal{L}(\partial_s\gamma(s))\, \mathrm{d} s\right], \end{equation} where the supremum is taken over absolutely continuous paths $\gamma:[0,t]\to E$. Formally taking the time derivative, exchanging limit and supremum, we obtain \begin{align*} \frac{ \mathrm{d}}{ \mathrm{d} t}\bigg|_{t=0} V_\mathcal{H}(t)f(x)&= \sup_{\gamma(0)=x} \left[\nabla f(\gamma(0)) \cdot\partial_t\gamma(0) - \mathcal{L}(\partial_t\gamma(0))\right]\\ &= \sup_{v\in\mathbb{R}}\left[\nabla f(x)\cdot v - \mathcal{L}(v)\right] = \mathcal{H}(\nabla f(x)). \end{align*} That is why we indeed expect the the operator~$H$ to be the generator of~$V_\mathcal{H}(t)$. \begin{proposition} \label{BG:prop:good-Lagrangians-give-action} Suppose that~$V(t)=V_\mathcal{H}(t)$. Then the rate function~\eqref{eq:RF-with-semigroup-approach:last-sec} satisfies the action-integral form~\eqref{BG:eq:action-integral-formula}. \end{proposition} \begin{proof}[Sketch of proof of Proposition~\ref{BG:prop:good-Lagrangians-give-action}] We first show that the Lagrangian is superlinear, that means~$(\mathcal{L}(v)/|v|) \to \infty$ as~$|v|\to\infty$. Then for any~$t,M\geq0$, the sub-level sets $\{\gamma\in\mathcal{X}\,|\,\int_0^t\mathcal{L}\left(\partial_s\gamma(s)\right)\, \mathrm{d} s\leq M\}$ are compact in~$\mathcal{X}$---we do not prove this compactness statement here, but comment on it in Section~\ref{BG:sec:bibliographical-notes}. Regarding superlinearity, for any~$c>0$ we have \begin{align*} \frac{\mathcal{L}(v)}{|v|} &=\sup_{p\in\mathbb{R}}\left[p\cdot \frac{v}{|v|}-\frac{\mathcal{H}(p)}{|v|}\right]\\ &\geq \sup_{|p|=c}\left[p\cdot \frac{v}{|v|}-\frac{\mathcal{H}(p)}{|v|}\right] \geq c - \frac{1}{|v|}\sup_{|p|=c}\mathcal{H}(p). \end{align*} The convex Hamiltonian is continuous, and therefore~$\sup_{|p|=c}\mathcal{H}(p)$ is finite. Hence for arbitrary~$c>0$, we have~$\mathcal{L}(v)/|v| > c/2$ for all~$|v|$ large enough. \smallskip Let $x:[0,T]\to E$ be absolutely continuous and take two arbitrary~$t_1<t_2$. We show for $y:=x(t_1)$ and $z:=x(t_{2})$ that \begin{equation}\label{eq:action-int:two-point-RF-is-L} \mathcal{I}_{t_2-t_1}\left(z|y\right) = \inf_{\substack{\gamma(t_1)=y\\\gamma(t_2)=z}}\int_{t_1}^{t_2} \mathcal{L}\left(\partial_s\gamma\right)\, \mathrm{d} s, \end{equation} where the infimum is taken over absolutely continuous paths $\gamma:[t_1,t_2]\to E$. Once we have this equality established, we obtain for arbitrary~$k\in\mathbb{N}$ and points in time $t_1,\dots,t_k=T$ the esimate \begin{align*} \mathcal{I}_{t_1}(x_1|x_0) + \mathcal{I}_{t_2-t_1}(x_2|x_1) + \dots + \mathcal{I}_{t_{k}-t_{k-1}}(x_k|x_{k-1}) \leq \int_0^{T} \mathcal{L}(\partial_s x)\, \mathrm{d} s, \end{align*} since~$x$ satisfies the begin- and endpoint contraints. For the reverse inequality, we note that adding time points increases the two-point rate functions since we add a condition on the paths; for $t_1<t_2<t_3$, \begin{align*} \mathcal{I}_{t_3-t_1}(x_3|x_1) &= \inf_{\substack{\gamma(t_1)=x_1\\\gamma(t_3)=x_3}}\left[\int_{t_1}^{t_2} \mathcal{L}(\partial_t\gamma)\, \mathrm{d} t + \int_{t_2}^{t_3}\mathcal{L}(\partial_t\gamma)\, \mathrm{d} t\right] \\ &\leq \inf_{\substack{\gamma(t_1)=x_1\\\gamma(t_2)=x_2}}\left[\int_{t_1}^{t_2} \mathcal{L}(\partial_t\gamma)\, \mathrm{d} t\right] + \inf_{\substack{\gamma(t_2)=x_2\\\gamma(t_3)=x_3}}\left[ \int_{t_2}^{t_3}\mathcal{L}(\partial_t\gamma)\, \mathrm{d} t\right] \\ &= \mathcal{I}_{t_3-t_2}(x_3|x_2) + \mathcal{I}_{t_2-t_1}(x_2|x_1). \end{align*} The partitions of a time interval~$[0,T]$ give rise to a monotonically increasing sequence. In the limit, we obtain \begin{align*} \sup_k \sup_{t_i}\sum_{i=1}^k \mathcal{I}_{t_i-t_{i-1}}(x(t_i)|x(t_{i-1})) = \int_0^T \mathcal{L}\left(\partial_s x(s)\right)\, \mathrm{d} s. \end{align*} We do not show that here, but refer to~\cite[Definition~7.11,~Example~7.12]{Villani2008}. We now show how~\eqref{eq:action-int:two-point-RF-is-L} follows from the compact sub-level sets. Starting from the assumption~$V(t)=V_\mathcal{H}(t)$, we have \begin{align*} \mathcal{I}_t\left(z|y\right) &\stackrel{\mathclap{\text{def}}}{=} \sup_f\left[f(z)-V(t)f(y)\right] = \sup_f\left[f(z)-V_\mathcal{H}(t)f(y)\right]\\ &= \sup_{f}\inf_{\substack{\gamma(0)=y}}\left[f(z)-f(\gamma(t))+\int_0^t\mathcal{L}\left(\partial_s \gamma\right)\, \mathrm{d} s\right]. \end{align*} For any $f\in C(E)$, \[ \inf_{\gamma(0)=y}\left[f(z)-f(\gamma(t))+\int_0^t\mathcal{L}(\partial_s\gamma)\, \mathrm{d} s\right] \leq \inf_{\substack{\gamma(0)=y\\\gamma(t)=z}} \int_0^t\mathcal{L}(\partial_s\gamma)\, \mathrm{d} s, \] since $\{\gamma:\gamma(0)=y\}$ contains $\{\gamma:\gamma(0)=y,\gamma(t)=z\}$. Taking the supremum over all~$f$ shows the inequality "$\leq$". \smallskip For the reverse, let~$f\in C(E)$. There are curves $\gamma_m$ satisfying~$\gamma_m(0)=y$ and \begin{align*} \inf_{\gamma(0)=y}\left[f(z)-f(\gamma(t))+\int_0^t\mathcal{L}(\partial_s\gamma)\, \mathrm{d} s\right] + \frac{1}{m} \geq f(z)-f(\gamma_m(t))+\int_0^t\mathcal{L}(\partial_s\gamma_m)\, \mathrm{d} s. \end{align*} Since $f$ is bounded, this implies~$\limsup_{m\to\infty}\int_0^t\mathcal{L}(\partial_s\gamma_m)\, \mathrm{d} s < \infty$. By compactness of sublevel sets, we can pass to a converging subsequence (denoted as well by~$\gamma_m$). If $\gamma_m(t)\not\to z$, then~$\mathcal{I}_t(z|y)=\infty$, and the desired estimate holds. If $\gamma_m(t)\to z$, then by lower semicontinuity of $\gamma\mapsto\int_0^t\mathcal{L}(\partial_s\gamma)\, \mathrm{d} s$, \begin{align*} \inf_{\gamma(0)=y}\left[f(z)-f(\gamma(t))+\int_0^t\mathcal{L}(\partial_s\gamma)\, \mathrm{d} s\right]&\geq \liminf_{m\to\infty}f(z)-f(\gamma_m(t))+\int_0^t\mathcal{L}(\partial_s\gamma_m)\, \mathrm{d} s\\ &\geq \int_0^t\mathcal{L}(\partial_s\gamma)\, \mathrm{d} s \geq \inf_{\substack{\gamma(0)=y\\\gamma(t)=z}}\int_0^t\mathcal{L}(\partial_s\gamma)\, \mathrm{d} s, \end{align*} and the reverse inequality follows. \end{proof} \subsubsection{Rewriting the semigroup via solving the Hamilton-Jacobi equation.} We saw above that if~$V(t)=V_\mathcal{H}(t)$, then the action-integral form of the rate function follows. In this section we illustrate how to verify this equality. The semigroup~$V(t)$ is defined by the resolvent map $h\mapsto R(\tau)h:=u$, where~$u$ is the unique viscosity solution of~$(1-\tau H)u=h$; for~$f\in C(E)$, we have uniformly \[ V(t)f = \lim_{k\to\infty}[R(t/k)]^k f. \] For a Hamiltonian~$\mathcal{H}$ with corresponding Lagrangian~$\mathcal{L}$, define~$R_\mathcal{H}(\tau)$ by \begin{equation}\label{BG:HJ-resolvent} R_\mathcal{H}(\tau)h(x) := \sup_{\substack{\gamma\in\mathcal{A}\mathcal{C}_E[0,\infty)\\\gamma(0)=x}}\int_0^\infty \frac{1}{\tau}e^{-s/\tau} \left[h(\gamma(s)) - \tau \mathcal{L}\left(\partial_s \gamma(s)\right)\right]\, \mathrm{d} s. \end{equation} One can show, under suitable conditions on the Lagrangian, that also \begin{equation}\label{BG:eq:H-semigroup-from-resolvent} V_\mathcal{H}(t)f = \lim_{k\to\infty}[R_\mathcal{H}(t/k)]^k f. \end{equation} Therefore the desired equality~$V(t)=V_\mathcal{H}(t)$ follows if we prove~$R(\tau)=R_\mathcal{H}(\tau)$ for all~$\tau>0$. Let us first focus on establishing~$R(\tau)=R_\mathcal{H}(\tau)$, and defer the problem of obtaining~\eqref{BG:eq:H-semigroup-from-resolvent}. We will show that~$R_\mathcal{H}(\tau)$ gives viscosity solutions to~$(1-\tau H)u=h$. Then~$R_\mathcal{H}(\tau)=R(\tau)$ follows by definition of~$R(\tau)$. The following definition summarizes the key properties to look after. \begin{definition}\label{def:visc-sol-machine} For~$\tau>0$, let~$\mathrm{R}(\tau)$ be a map~$\mathrm{R}(\tau):C(E)\to C(E)$. We call the family~$\{\mathrm{R}(\tau)\}_{\tau >0}$ a \emph{contractive pseudo-resolvent} if: \begin{enumerate}[label=(\roman*)] \item \label{item:visc-machine:resolv-id} For any $0<\tau_1<\tau_2$, we have \[ \mathrm{R}(\tau_2) = \mathrm{R}(\tau_1)\left[\mathrm{R}(\tau_2)-\frac{\tau_1}{\tau_2}\left(\mathrm{R}(\tau_2)-\mathbf{1}\right)\right]. \] \item \label{item:visc-machine:contr} The map $\mathrm{R}(\tau)$ is contractive: for any two functions $h_1,h_2\in C(E)$, we have the estimate $\sup_E\left(\mathrm{R}(\tau)h_1-\mathrm{R}(\tau)h_2\right)\leq \sup_E \left(h_1-h_2\right)$. \end{enumerate} \end{definition} \begin{theorem}[]\label{thm:viscosity-sol-machine} Let~$\mathrm{R}(\tau)$ be a contractive pseudo-resolvent and suppose that for any~$f\in\mathcal{D}(H)$, we have~$f = \mathrm{R}(\tau) (\mathbf{1}-\tau H)f$ on~$E$. Then for any~$\tau>0$ and~$h\in C(E)$, the function~$\mathrm{R}(\tau)h$ is a viscosity solution of $(1-\tau H)u=h$. \end{theorem} For the proof Theorem~\ref{thm:viscosity-sol-machine}, we will use the following simplification of~\cite[Lemma~7.8]{FengKurtz2006} (the proof in there is incorrect---see~\cite[Lemma~3.5]{Kraaij2019GenConv}). \begin{lemma}\label{lemma:visc-sol-machine} Let~$f,g:E\to\mathbb{R}$ be two continuous functions on a compact Polish space~$E$. Suppose that for any~$\varepsilon>0$, the inequality $\sup_E f \leq \sup_E (f-\varepsilon g)$ holds true. Then there is a point~$x\in E$ such that both $f(x)=\sup_E f$ and $g(x)\leq 0$. Similarly, if $\inf_E f\geq \inf_E (f-\varepsilon g)$, then $f(x)=\inf_E f$ and $g(x)\geq 0$ for some point~$x\in E$. \end{lemma} \begin{proof}[Proof of Theorem~\ref{thm:viscosity-sol-machine}] Fix~$\tau>0$ and~$h\in C(E)$. Let~$f\in\mathcal{D}(H)$. For every~$\varepsilon>0$, we show below the estimate \begin{equation}\label{BG:eq:estimate-to-get-subsolution} \sup_E \left[\mathrm{R}(\tau)h-f\right] \leq \sup_E\left\{\mathrm{R}(\tau)h-f -\varepsilon\left[ \frac{1}{\tau}\left(\mathrm{R}(\tau)h-h\right)- Hf\right]\right\}. \end{equation} Then by Lemma~\ref{lemma:visc-sol-machine}, there is a point~$x\in E$ such that both \[ (\mathrm{R}(\tau)h-f)(x)=\sup_E \left(\mathrm{R}(\tau)h-f\right) \quad\text{and}\quad \left[ \frac{1}{\tau}\left(\mathrm{R}(\tau)h-h\right)- Hf\right](x)\leq 0, \] which establishes that~$\mathrm{R}(\tau)h$ is a viscosity subsolution. The argument for the supersolution case is similar. We now prove the estimate~\eqref{BG:eq:estimate-to-get-subsolution}. We use the resolvent identity~\ref{item:visc-machine:resolv-id} to rewrite $\mathrm{R}(\tau)h$, and the fact that~$f=\mathrm{R}(\varepsilon) (\mathbf{1}-\varepsilon H)f$, to find \begin{equation*} \mathrm{R}(\tau)h-f = \mathrm{R}(\varepsilon)\left[\mathrm{R}(\tau)h-\frac{\varepsilon}{\tau}\left(\mathrm{R}(\tau)h-h\right)\right]-\mathrm{R}(\varepsilon)\left(f-\varepsilon Hf\right). \end{equation*} Since~$\mathrm{R}(\tau)$ is contractive~\ref{item:visc-machine:contr}, \begin{align*} \sup_E\left[\mathrm{R}(\tau)h-f\right] \leq \sup_E \left\{\mathrm{R}(\tau)h-\frac{\varepsilon}{\tau}\left(\mathrm{R}(\tau)h-h\right)-\left(f-\varepsilon Hf\right)\right\}, \end{align*} which establishes the desired estimate. \end{proof} To summarize where we are, Theorem~\ref{thm:viscosity-sol-machine} tells us that if~$R_\mathcal{H}(\tau)$ is a contractive pseudo-resolvent satisfying~$f = R_\mathcal{H}(\tau) (\mathbf{1}-\tau H)f$ for all~$f\in\mathcal{D}(H)$, then we have proven our desired equality~$R(\tau)=R_\mathcal{H}(\tau)$. We finish this section by showing that reasonable Hamiltonians give indeed rise to pseudo-resolvents. In the following theorem, we consider an operator~$H:\mathcal{D}(H)\subseteq C^1(E)\to C(E)$ acting functions by~$Hf(x)=\mathcal{H}(\nabla f(x))$, with a dense domain~$\mathcal{D}(H)\subseteq C(E)$. We associate the Lagrangian~$\mathcal{L}(v)=\sup_p[pv-\mathcal{H}(p)]$. \begin{theorem}\label{BG:thm:resonable-H-gives-pseudo-resolvent} Suppose~$\mathcal{H}:\mathbb{R}\to\mathbb{R}$ is convex, continuously differentiable, and that~$\mathcal{H}(0)=0$. Then~$R_\mathcal{H}(\tau)$ defined by~\eqref{BG:HJ-resolvent} is a contractive pseudo-resolvent such that for all functions~$f\in\mathcal{D}(H)$,~$f = R_\mathcal{H}(\tau) (\mathbf{1}-\tau H)f$, and~\eqref{BG:eq:H-semigroup-from-resolvent} holds true. \end{theorem} \begin{proof}[Sketch of proof of Theorem~\ref{BG:thm:resonable-H-gives-pseudo-resolvent}] We first verify~$f=R_\mathcal{H}(1-\tau H)f$. For~$f\in\mathcal{D}(H)$, \begin{align*} R_\mathcal{H}(\tau)(f-\tau Hf)(x) \overset{\mathrm{def}}{=} \sup_{\gamma(0)=x}\int_0^\infty e^{-s/\tau}\left[\frac{1}{\tau}f(\gamma(s))- Hf(\gamma(s)) - \mathcal{L}(\partial_s\gamma(s)) \right] \mathrm{d} s. \end{align*} Since~$Hf=\mathcal{H}(\nabla f)$ and~$\mathcal{L}(v)+\mathcal{H}(p)\geq pv$ for any~$p,v\in\mathbb{R}$, we have \begin{align*} R_\mathcal{H}(\tau)(f-\tau Hf)(x) \leq \sup_{\gamma(0)=x}\int_0^\infty e^{-s/\tau}\left[\frac{1}{\tau}f(\gamma(s))-\nabla f(\gamma(s))\cdot \partial_s\gamma(s)\right] \mathrm{d} s. \end{align*} Using~$\nabla f(\gamma)\cdot\partial_s\gamma=(d/ds) f(\gamma)$ and integration by parts, we find the estimate \begin{equation*} R_\mathcal{H}(\tau)(f-\tau Hf)(x) \leq f(x). \end{equation*} For the reverse inequality, we find a path~$\gamma$ such that~$\gamma(0)=x$ and \begin{equation*} \int_0^\infty e^{-s/\tau}\left[\frac{1}{\tau}f(\gamma(s))- Hf(\gamma(s)) - \mathcal{L}(\partial_s\gamma(s)) \right] \mathrm{d} s \geq f(x). \end{equation*} We will in fact prove equality. Let~$\gamma$ be the path solving \begin{align}\label{BG:eq:proof-R-is-pseudores:eq-in-Young} \partial_t \gamma(t) = \partial_p\mathcal{H}(\nabla f(\gamma(t))),\qquad t\geq 0. \end{align} Such a path exists since the vector field~$F(x)=\partial_p\mathcal{H}(\nabla f(x))$ is continuous and bounded---continuity follows by~$\mathcal{H}\in C^1(\mathbb{R})$ and~$f\in C^1(\mathbb{T})$, and boundedness from compactness of~$E=\mathbb{T}$. The precise argument for the existence is given for instance in~\cite[Lemma~3.4]{Kraaij2016}, which is~based on~\cite{Crandall1972}. With this path~$\gamma$, \begin{equation}\label{BG:eq:exact-eq-in-Young-inequ} Hf(\gamma) + \mathcal{L}(\partial_s\gamma) = \nabla f(\gamma)\cdot\partial_s\gamma, \end{equation} and~\eqref{BG:eq:proof-R-is-pseudores:eq-in-Young} follows from~$\nabla f(\gamma)\cdot\partial_s\gamma=(d/ds)f(\gamma)$ and integration by parts. \smallskip Since~$\mathcal{H}(0)=0$, the Lagrangian is non-negative. With that, the properties of a contractive pseudo-resolvent are verified by writing out the definitions. For instance, for~$f\in C(E)$ and and any path~$\gamma$, \begin{equation*} \int_0^\infty\frac{1}{\tau}e^{-s/\tau}\left[f(\gamma(s))-\tau \mathcal{L}(\partial_s\gamma(s))\right]\, \mathrm{d} s \leq \|f\| \int_0^\infty \frac{1}{\tau}e^{-s/\tau}\, \mathrm{d} s = \|f\|. \end{equation*} Therefore~$\|R(\tau)f\|\leq \|f\|$. With a similar estimate, taking arbitrary~$h_1,h_2$, we find contractivity of~$R(\tau)$ in the sense of~\ref{item:visc-machine:contr}. The resolvent identity~\ref{item:visc-machine:resolv-id} follows from rearrangements involving integration by parts. \smallskip The argument for proving~\eqref{BG:eq:H-semigroup-from-resolvent} is given in~\cite[Lemma~8.18]{FengKurtz2006}. One exploits the fact that with a unit exponential random variable~$\Delta$, \begin{equation*} R_\mathcal{H}(\tau)h(x) = \sup_{\gamma(0)=x} \mathbb{E}\left[h(\gamma(\tau\Delta)) - \int_0^{\tau\Delta}\mathcal{L}(\partial_s\gamma(s))\, \mathrm{d} s\right]. \end{equation*} The path~$x^t$ in the proof of Lemma~8.18, cited from~Lemma~8.16, is the one satisfying \begin{equation*} V_\mathcal{H}(t)f(x) = f(x^t(t))-\int_0^t\mathcal{L}(\partial_sx^t(s))\, \mathrm{d} s. \end{equation*} The proof of~\cite[Lemma~8.16]{FengKurtz2006} carries over verbatim; the fact that for every~$x_0$, there exists a path~$\gamma$ satisfying~$\gamma(t_0)=x_0$ and \begin{equation}\label{BG:eq:zero-cost-flow-of-L} \int_{t_0}^\infty \mathcal{L}(\partial_t\gamma(t))\, \mathrm{d} t=0 \end{equation} follows in our case from~\eqref{BG:eq:exact-eq-in-Young-inequ} specialized to~$f\equiv 1$. \end{proof} \section{Bibliographical notes} \label{BG:sec:bibliographical-notes} Outlines of the idea of~\cite{FengKurtz2006} are also offered for instance in Feng's paper~\cite{Feng2006} and the introduction of Kraaij's PhD thesis~\cite{Kraaij2016PhDThesis}. The focus in~\cite{FengKurtz2006} lies on conditions for proving large deviation principles for particle systems that lead to Hamilton-Jacobi equations in the space of probability measures, which requires to solve various functional-analytic problems in non-locally compact spaces. Here we comment on some relations to our simplified treatment. \paragraph{Markov processes via solution to martingale problems.} We specified Markov processes from the existence of transition probabilities. Since these are generally unknown, Markov processes are in practice not obtained by writing down an explicit family of transition probabilities. A common strategy is to find a semigroup satisfying the conditions of~\cite[Proposition~1.3]{Liggett2004}, which by~\cite[Theorem~1.5]{Liggett2004} gives a Markov process defined by means of a family of path distributions. In general, the semigroup determines all finite-dimensional distributions~\cite[Proposition~4.1.6]{EthierKurtz1986}, which induces the path distribution of a stochastic process by the Daniell-Kolmogorov extension Theorem~\cite[Theorem~3.38]{BovierDenHollander2016}. However, frequently we only have an idea about the infinitesimal time evolution of the process. Hence we would like to construct the Markov process by specifying its generator. This point of view is explored for instance in~\cite[Chapter~4]{EthierKurtz1986} and~\cite[Sections~5.3]{BovierDenHollander2016}. The starting assumption in many theorems in~\cite{FengKurtz2006} is the well-posedness of the so-called martingale problem, which associated a path distribution~$\mathbb{P}_\nu$ to a generator~$A$ and an initial distribution~$\nu$. Overviews of the martingale approach can be found for instance in~\cite[Sections~4.3-4.5 and~8]{EthierKurtz1986},~\cite[Section~5.4]{BovierDenHollander2016} and~\cite[Section~1.5]{Liggett2004}. \paragraph{Large deviations via convergence of semigroups.} Theorem~\ref{thm:LDP-via-semigroup-convergence:compact} is a special case of~\cite[Theorem~5.15]{FengKurtz2006}. The proofs we outlined in Section~\ref{BG:sec:LDP-from-convergence-of-semigroups} carry over to non-compact Polish spaces. The only adaptions are: replace~$C(E)$ with~$C_b(E)$ (continuous and bounded), demand convergence of semigroups bounded and uniformly on compact sets (buc-convergence), and exploit exponential tightness of the initial conditions to conclude as in the proof of Proposition~\ref{prop:LDP-1d-compact:semigroup}. The idea behind the proof of Proposition~\ref{prop:LDP-semigroups:conditional-RF} has been communicated to me by Richard Kraaij. This proof carries over verbatim to the non-compact setting. Finally, a generalization of a collection of compact subsets that is required for non-locally compact spaces is given by~\cite[Definition~2.5]{FengKurtz2006}. \paragraph{Large deviations via convergence of generators.} In Section~\ref{subsec:LDP-via-classical-sol}, we indicated how Theorem~\ref{thm:LDP-classical-sol} (which is a simplification of~\cite[Corollary~5.19]{FengKurtz2006}) can be proven with Lemmas from~\cite[Section~5]{FengKurtz2006}. The extension to locally-compact state spaces such as~$\mathbb{R}^d$ can be executed by replacing the convergence conditions on the~$H_n$ with uniform convergence on compact subsets---this means specialising as shown in~\cite[Example~2.6]{FengKurtz2006}, which leads to the notion of buc-convergence. The convergence of corresponding semigroups carries over as shown in~\cite[Lemma~5.13~(b)]{FengKurtz2006}. \smallskip A notable difference is that in contrast to the compact case, exponential tightness is no longer a direct consequence of the convergence of~$H_n$. Instead, exponential tightness follows if in addition one can verify the exponential containment condition~\cite[Condition~2.8]{FengKurtz2006}. This condition corresponds to controlling the probability of the process escaping compact sets. There is a convenient way of verifying this condition from the limit operator~$H$; finding a so-called good containment function is sufficient. A detailed account on this is offered in the appendix of Collet's and Kraaij's paper~\cite{CoKr17}, in particular~Proposition~A.15 therein. In our running example on~$\mathbb{R}$, the function~$\Upsilon(x)=\log(1+x^2)$ is a good containment function. More general conditions based on Lyapunov function techniques are given in~\cite[Section~4]{FengKurtz2006}. \paragraph{Comparison principle in non-compact state space.} There is an extensive literature on comparison principles. The concept of viscosity solutions is outlined in the user's guide of Crandall, Ishii and Lions~\cite{CIL92}. Another introduction to techniques for verifying the comparison principle in~$\mathbb{R}^d$ can be found in Bardi's and Cappuzzo-Dolcetta's monograph~\cite[Chapter~2]{BardiDolcetta1997}. The proof of comparison principle follows the same idea as in the running example at the end of Section~\ref{subsec:LDP-via-visc-sol}; one only has to use a good containment function~$\Upsilon$ to reduce the analysis to compact sets. This point of view is further explained in Chapter~6 and in~\cite[Appendix~A]{CoKr17}. The analysis is more involved in infinite dimensions; see for instance the works of Tataru~\cite{Tataru1992,Tataru1994} and Feng~\cite{Feng2006} in linear spaces, and the recent paper by Feng, Mikami and Zimmer~\cite{FengMikamiZimmer2019} in the space of probability measures, where methods from~\cite[Chapter~13]{FengKurtz2006} are extended. \paragraph{Action-integral representation.} In Section~\ref{BG:sec:semigroup-flow-HJ-eq}, we worked with~$E=\mathbb{T}$ and proper convex Hamiltonians of the form~$\mathcal{H}=\mathcal{H}(p)$, which allowed us to exploit superlinearity of the Lagrangian defined as the Legendre dual. The information contained in the superlinearity is generalized by~\cite[Condition~8.9]{FengKurtz2006}; the compactness of sub-level sets we used in Proposition~\ref{BG:prop:good-Lagrangians-give-action}---for which I could not find a simple proof---is proven under the more general Condition~8.9 in~\cite[Proposition~8.13]{FengKurtz2006}. Furthermore, we assumed differentiability of the Hamiltonian in in Theorem~\ref{BG:thm:resonable-H-gives-pseudo-resolvent} in order to find a path~$\gamma$ satisfying~\eqref{BG:eq:exact-eq-in-Young-inequ}. We used this path to prove~$R_\mathcal{H}(\tau) (\mathbf{1}-\tau H)f\geq f$, and to find the zero-cost flow~\eqref{BG:eq:zero-cost-flow-of-L} required for proving~\eqref{BG:eq:H-semigroup-from-resolvent}. The condition of finding a path~$\gamma$ is generalized by~\cite[Condition~8.11]{FengKurtz2006}, and the existence of a zero-cost flow is generalized by~\cite[Condition~8.10]{FengKurtz2006}. The generalization of Proposition~\ref{BG:prop:good-Lagrangians-give-action} is given by~\cite[Theorem~8.14]{FengKurtz2006}, and the generalizations of verifying equality of semigroups from equality of resolvents are found in~\cite[Corollaries~8.28, 8.29]{FengKurtz2006}. \paragraph{Pseudo-resolvents.} Richard Kraaij proofs large deviation principles by generalizing the concept of pseudo-resolvents~\cite{Kraaij2019ExpResolv,Kraaij2019GenConv}. Instead of working with the Hille-Yosida approximants as in the proof of Theorem~\ref{thm:LDP-classical-sol}, Kraaij shows in~\cite{Kraaij2019ExpResolv} how to rigorously obtain the semigroup~$V_n(t)$ from the nonlinear generators~$H_n$ via resolvents~$R_n$. The resolvents are defined by finding viscosity solutions to~$(1-\tau H_n)u=h$ via a control problem involving the relative entropy as a cost---this step replaces the argument in~\cite{FengKurtz2006} of passing to Hille-Yosida approximants. The existence of viscosity solutions follows from generalizing the concept outlined in Theorem~\ref{thm:viscosity-sol-machine}. Our case is a simplified version of the strategy carried out in~\cite[Section~8.4]{FengKurtz2006}. In the generalizations, one proves the fact that the images~$R(\tau)h$ are continuous functions by exploiting the comparison principle, and passing to lower- and upper semicontinuous regularizations first. We avoided these details to clarify the idea. \chapter{Large Deviations of Switching Processes} \label{chapter:LDP-for-switching-processes} \section{Introduction---molecular motors} \label{section:intro} In this chapter we focus on switching Markov processes motivated by stochastic models of walking molecular motors. Broadly speaking, \emph{molecular motors} are proteins that are capable of binding on and moving on filaments in a living cell. Molecular motors such as kinesin and dynein drag vesicles along while moving, and thereby they transport them within the cell. The motors achieve their directed mechanical motion by converting chemical energy of surrounding ATP molecules. In that sense, molecular motors enable living cells to organise directed transport of vesicles. Jonathan Howard provides an overview of the phenomenon of molecular motors in~\cite{Howard2001}. \smallskip There are several mathematical models of molecular motors describing the motor's movement on a filament. J{\"u}licher, Ajardi and Prost review the most common approaches in the Physics literature, with a focus on the relation between models and numerous experimental results~\cite{JulicherAjdariProst1997}. Recent overviews of mathematical models are offered for instance by Anatoly Kolomeisky and Michael Fisher~\cite{Kolomeisky13,KolomeiskyFisher07}. \smallskip Mathematical models can help us to answer questions about the mechanism behind the transport phenomenon based on molecular motors. For instance, is there an underlying common working principle? How do transport properties such as the effective velocity, energy efficiency, stability with respect to perturbations, and response to external forces depend on physical characteristics such as the involved chemical reaction times or the structure of the polymeric filaments? \smallskip Peskin, Dwight and Elston show that the \emph{Brownian ratchet model} predicts a decrease of the motor's speed when increasing stiffness of the string connecting motor and cargo~\cite{PeskinElston2000}. On the other hand, the \emph{correlation ratchet model} introduced by Peskin, Ermentrout and Oster~\cite{PeskinErmentroutOster1995} predicts an increase of the speed when increasing stiffness~\cite{PeskinDwightElston2000}. Deville and Vanden-Eijnden consider models of multiple motors pulling the same cargo to investigate synchronization effects~\cite{DevilleVandenEijnden2008}. In the models, the gait of a motor regularizes when pulling a cargo, and multiple motors synchronize their actions when pulling together. The authors reveal a similar effect for Brownian ratchet models~\cite{DevilleVandenEijnden2007}. \smallskip We focus on correlation ratchet models for a single motor. In Section~\ref{subsec:model-of-molecular-motor} below, we describe a stochastic version of these models. What makes them interesting is the fact that they do not prescribe a directional movement by introducing a uniform bias. The models rather describe a working principle, and the movement can be derived thereof. Given a specific model, the challenge lies therefore in predicting the precise dynamics in the first place. \smallskip The models are specified by periodic potentials and reaction rates. Simply put, a potential describes the motor's interaction with the periodic filament when being in a certain chemical state, and the reaction rates describe how likely the motor's chemical state changes---we provide more details in Section~\ref{subsec:model-of-molecular-motor}. Many works investigate Fokker-Planck equations associated to the model. For instance, Hastings, Kinderlehrer and Mcleod study their stationary solution and find sufficient conditions for the occurence of transport in terms of distributions of minima of the potentials and a suitable choice of reaction rates~\cite[Theorem~2.1]{HastingsKinderlehrerMcleod08}, and~\cite[Theorems~3.1,~3.2]{HastingsKinderlehrerMcLeod2008}. Wang, Peskin and Elston provide numerical results for such models~\cite{WangPeskinElston2003}. Perthame, Souganidis and Mirrahimi use homogenization techniques to characterize transport in terms of a cell problem~\cite{PerthameSouganidis09a, PerthameSouganidis2009Asymmetric, Mirrahimi2013}. Our work relates closest to their results, and we comment further on their work in Section~\ref{MM:sec:larger-context-and-aim}. \smallskip We propose to analyse the underlying stochastic models by means of large deviation theory. While molecular motors are naturally stochastic on the microscale, they move with a nearly deterministic velocity on the macroscale. In the mathematical models, this stability is reflected in the fact that the large-deviation results do not depend on the microscopic details of the dynamics. \paragraph{Overview of this chapter.} We first illustrate in Section~\ref{subsec:model-of-molecular-motor} our general results on a specific example of a molecular-motor model. We sketch, without diving into details, how large deviation theory can be utilized to study stochastic models of molecular motors. The example also provides a picture to interpret the general results that follow. We continue with outlining in Section~\ref{MM:sec:larger-context-and-aim} why we choose to analyse switching Markov processes. Basically, we want to separate the general arguments of large devation theory from the specific arguments depending on the molecular-motor models. The main results are presented in Section~\ref{section:MM:results}. We specify switching Markov processes in a periodic setting in Section~\ref{section:switching-MP}, formulate a general large-deviation theorem for the spatial components in Section~\ref{subsection:results:LDP_switching_MP}, and provide an action-integral representation of the rate functions in Section~\ref{subsection:results:action_integral_rep}. Then we specialize the large deviation theorems to continuous and discrete models of molecular motors (Section~\ref{subsection:results:LDP_in_MM}). Finally, we give an exact formula for the macroscopic velocity in terms of Hamiltonians that are derived from the microscopic dynamics. The detailed-balance condition in molecular motors implies symmetry of the Hamiltonians and thereby of the large-deviation fluctuations. We show that as a consequence, breaking detailed balance is necessary for transport (Section~\ref{MM:subsec:det-bal-implies-symmetric-H}). While this particular conclusion is not new, it comes from a large-deviation perspective. We close with the proof sections and an outline on the literature on principal-eigenvalue problems. \section{Example---large deviations for molecular motors} \sectionmark{Large deviations for molecular motors} \label{subsec:model-of-molecular-motor} In this example, we consider a two-component Markov process~$(X^\varepsilon,I^\varepsilon)$ with values in $\mathbb{T} \times \{1,2\}$, where $\mathbb{T} = \mathbb{R} / \mathbb{Z}$ is the one-dimensional flat torus, $\varepsilon = 1/n$ a small parameter, and $n$ an integer. We fix the initial condition; that means for some~$(x_0,i_0) \in \mathbb{T} \times \{1,2\}$, we have~$\left(X^\varepsilon(0),I^\varepsilon(0)\right) =(x_0,i_0)$. Let~$\psi(\cdot,1)$ and~$\psi(\cdot,2)$ be smooth functions on the torus, and write $\psi'(\cdot,i)$ for the derivative of $\psi(\cdot,i) \in C^\infty(\mathbb{T})$. The evolution of $(X^\varepsilon, I^\varepsilon)$ is characterized by the stochastic differential equation \begin{equation}\label{eq:intro:example_SDE} \mathrm{d} X_t^\varepsilon = -\psi'\left(\frac{1}{\varepsilon}X_t^\varepsilon,I_t^\varepsilon\right)\, \mathrm{d} t + \sqrt{\varepsilon}\, \mathrm{d} B_t. \end{equation} where $B_t$ is a standard Brownian motion. The process~$I^\varepsilon_t$ is a continuous-time Markov chain on~$\{1,2\}$, which evolves with jump rates~$r_{ij}(\cdot)$ such that % \begin{equation} \mathbb{P} \left[I^\varepsilon_{t+\Delta t} = j\,|\,I^\varepsilon_t =i, X^\varepsilon_t =x \right] = \frac{1}{\varepsilon} r_{ij}\left(\frac{x}{\varepsilon}\right)\Delta t + \mathcal{O}(\Delta t^2), \quad \text{as}\;\Delta t \to 0. \label{eq:intro:example_evolution_jump_rates} \end{equation} % In summary, the \emph{spatial component}~$X^\varepsilon$ is a drift-diffusion process, the \emph{configurational component}~$I^\varepsilon$ is a jump process on~$\{1,2\}$, and the two are coupled through their respective rates. The drift-term in~\eqref{eq:intro:example_SDE} depends on the value of~$I^\varepsilon$, and thereby the role of~$I^\varepsilon$ is to determine the kind of dynamics that~$X^\varepsilon$ is following. Let~$\{T_k\}_{k=1,2\dots}$ be the jump times of~$I^\varepsilon$, and set~$T_0:=0$. Then~$I^\varepsilon(t)$ is constant in the time windows~$[T_k,T_{k+1})$ (denote its value by~$j_k$), in which the spatial component is a drift-diffusion process with drift term~$-\psi'(\cdot,j_k)$. For details about the construction of such switching diffusions, we refer to~\cite[Chapter~2]{yin2010hybrid}. Figure~\ref{MM:fig:evolution-and-tx-diagram} depicts a typical realization of~$(X^\varepsilon, I^\varepsilon)$, where the trajectory of the spatial component is lifted from the torus to~$\mathbb{R}$. \begin{figure}[h!] \labellist \pinlabel $t$ at 1800 90 \pinlabel $x$ at 760 90 \pinlabel $\psi(x,1)$ at -50 230 \pinlabel $\psi(x,2)$ at -50 500 \pinlabel \small $1.$ at 290 130 \pinlabel \small $2.$ at 310 360 \pinlabel \small $3.$ at 410 540 \pinlabel \small $4.$ at 490 520 \pinlabel \small $5.$ at 570 400 \pinlabel \small $6.$ at 570 290 \pinlabel \small $1.$ at 1300 80 \pinlabel \small $2.$ at 1190 150 \pinlabel \small $3.$ at 1260 200 \pinlabel \small $4.$ at 1100 430 \pinlabel \small $5.$ at 1510 285 \pinlabel \small $6.$ at 1330 670 \pinlabel {\color{red_one}{$X^{\varepsilon}(t)$}} at 1000 640 \endlabellist \centering \includegraphics[scale=.18]{Evolution_and_tx_diagram} \caption{A typical time evolution of $(X^\varepsilon_t, I^\varepsilon_t)$ satisfying~\eqref{eq:intro:example_SDE} and~\eqref{eq:intro:example_evolution_jump_rates}. In the left diagram, the black bullet represents a particle that moves according to~\eqref{eq:intro:example_SDE}. A red arrow corresponds to the value of the spatial component~$X^\varepsilon_t$, and a green arrow indicates a switch of the configurational component~$I^\varepsilon_t$, which changes the potential landscape in which the particle is diffusing. On the right diagram, the spatial component's evolution is shown in a $x$-$t$-diagram, where the red dots represent the values of~$X^\varepsilon_t$. The green bullets indicate a jump of the configurational component~$I^\varepsilon_t$. One forward power stroke consists of the following typical phases: 1. diffusive motion of~$X^\varepsilon$ near minimum; 2. configurational change of~$I^\varepsilon$; 3. flow of~$X^\varepsilon$ towards new minimum.} \label{MM:fig:evolution-and-tx-diagram} \end{figure} \smallskip Let us give one possible motivation for the specific $\varepsilon$-scaling. One can start from a process~$(X_t, I_t)$ satisfying \begin{align*} \mathrm{d} X_t&= -\psi'(X_t,I_t)\, \mathrm{d} t + \mathrm{d} B_t, \end{align*} where the jump process $I_t$ on $\{1,2\}$ evolves according to \begin{equation*} \text{Prob}\left[I_{t+\Delta t}=j\,|\,I_t=i, X_t=x\right]=r_{ij}(x)\Delta t+\mathcal{O}(\Delta t^2),\quad i\neq j, 1\leq i,j\leq 2. \end{equation*} The large-scale behaviour of $(X_t, I_t)$ is studied by considering the rescaled process~$(X^\varepsilon_t, I^\varepsilon_t)$ defined by~$X^\varepsilon_t := \varepsilon X_{t / \varepsilon}$ and~$I^\varepsilon_t := I_{t / \varepsilon}$. This rescaling corresponds to zooming out of the $x$-$t$ phase space, which is illustrated below in Figure~\ref{MM:fig:zooming-out}. It\^o calculus implies that the process $(X^\varepsilon_t, I^\varepsilon_t)$ satisfies~\eqref{eq:intro:example_SDE} and~\eqref{eq:intro:example_evolution_jump_rates}. \begin{figure}[h!] \labellist \pinlabel $t$ at 1000 50 \pinlabel $x$ at 50 800 \pinlabel $t$ at 2125 50 \pinlabel $x$ at 1170 800 \pinlabel $v=\partial_p\mathcal{H}(0)$ at 1850 280 \pinlabel $\varepsilon=1$ at 500 800 \pinlabel $\varepsilon\ll 1$ at 1600 800 \pinlabel {\color{red_one}{$X^{\varepsilon}(t)$}} at 400 600 \pinlabel {\color{red_one}{$X^\varepsilon(t)$}} at 1500 600 \endlabellist \centering \includegraphics[scale=.17]{Small_scale_and_large_scale} \caption{Two typical realizations of the spatial component~$X_t^\varepsilon$ of the two-component process~$(X_t^\varepsilon,I_t^\varepsilon)$ satisfying~\eqref{eq:intro:example_SDE} and~\eqref{eq:intro:example_evolution_jump_rates}. On the left, a realization is depiced for~$\varepsilon$ of order one, and on the right for small~$\varepsilon$. Both graphs depict the lifted trajectory on~$\mathbb{R}$.} \label{MM:fig:zooming-out} \end{figure} \smallskip We are interested in the behaviour of the spatial component~$X^\varepsilon$ as $\varepsilon \to 0$. The behaviour of~$X^\varepsilon$ for small~$\varepsilon$ is shown in Figure~\ref{MM:fig:zooming-out}. This figure suggests that for small~$\varepsilon$, the spatial component closely follows a path with a constant velocity. Indeed, when specifying our results of this chapter to the example at hand---the process $(X^\varepsilon, I^\varepsilon)$ defined by~\eqref{eq:intro:example_SDE} and~\eqref{eq:intro:example_evolution_jump_rates}---we find that the spatial component~$X^\varepsilon$ satisfies a pathwise large deviation principle in the limit~$\varepsilon\to 0$. \smallskip To describe this fact more precisely, let~$\mathcal{X}:=C_\mathbb{T}[0,\infty)$ the set of continuous trajectories in~$\mathbb{T}$, equipped with the Skorohod metric, that means the topology of uniform convergence on compact time intervals. The spatial component~$X^\varepsilon$ is a random variable in~$\mathcal{X}$, with a path distribution~$\mathbb{P}(X^\varepsilon\in\cdot)\in\mathcal{P}(\mathcal{X})$. We will show that there exists a rate function~$\mathcal{I}:\mathcal{X}\to[0,\infty]$ with which~$\{X^\varepsilon\}_{\varepsilon>0}$ satisfies a pathwise large deviation principle in the sense of Definition~\ref{def:LDP} from Chapter~1. The gist of this statement is that for any trajectory~$x\in\mathcal{X}$, we have at least intuitively \begin{equation}\label{MM:eq:intro:example-LDP} \mathbb{P}\left(X^\varepsilon\approx x\right) \sim e^{-\varepsilon^{-1} \, \mathcal{I}(x)},\quad\varepsilon\to 0. \end{equation} The rate function is given by means of a Lagrangian~$\mathcal{L}:\mathbb{R}\to[0,\infty)$, \begin{equation}\label{MM:eq:intro:example-LDP-RF} \mathcal{I}(x)=\mathcal{I}_0(x(0)) + \int_0^\infty\mathcal{L}(\partial_t x(t))\, \mathrm{d} t. \end{equation} In there,~$\mathcal{I}_0:\mathbb{T}\to[0,\infty]$ is the rate function of the initial conditions~$X^\varepsilon(0)$, which is given by~$\mathcal{I}_0(x_0)=0$ and~$+\infty$ otherwise---this is because we assume a deterministic initial condition~$X^\varepsilon(0)=x_0$. The Lagrangian is the Legendre dual of a Hamiltonian~$\mathcal{H}:\mathbb{R}\to\mathbb{R}$, that is~$\mathcal{L}(v)=\sup_p [pv-\mathcal{H}(p)]$, and the Hamiltonian is the principal eigenvalue of an associated cell problem described in Lemma~\ref{lemma:LDP_MM:contI:principal_eigenvalue}. We show in Sections~\ref{subsection:results:LDP_switching_MP} and~\ref{section:LDP_in_MM} further below how to obtain the associated cell problem and the principal eigenvalue. \smallskip Here, we focus on how this large-deviation result confirms the claim suggested by Figure~\ref{MM:fig:zooming-out}. The rate function~\eqref{MM:eq:intro:example-LDP-RF} has the following properties: \begin{enumerate}[(i)] \item $\mathcal{I} : \mathcal{X} \rightarrow [0,\infty]$ is nonnegative. \item $\mathcal{I}(x) = 0$ if and only if~$\partial_tx(t)=v$, with~$v=\partial_p\mathcal{H}(0)$. \end{enumerate} These two properties together characterize the unique minimizer of the rate function, and thereby in particular the typical behaviour of~$X^\varepsilon$ for small~$\varepsilon$. Whenever~$\mathcal{I}(x) > 0$ for a path~$x\in\mathcal{X}$, then by~\eqref{MM:eq:intro:example-LDP}, the probability that a realization of~$X^\varepsilon$ is close to~$x$ in the Skorohod metric is exponentially small in $\varepsilon$. More precisely, the large deviation principle implies almost-sure convergence of~$X^\varepsilon$ to the unique minimizer of the rate function (Theorem~\ref{thm:math-formulation-LDP:LDP-implies-as}). \smallskip Equipped with the large deviation principle, we can investigate which sets of potentials and rates~$\{\psi_1,\psi_2,r_{12},r_{21}\}$ induce transport, which means observing a non-zero macroscopic velocity~$v=\partial_p\mathcal{H}(0)$. We do not find general sufficient conditions for transport, but can draw some conclusions if the process~$(X^\varepsilon,I^\varepsilon)$ satisfies \emph{detailed balance}. Here, detailed balance is satisfied if~$r_{12}e^{-\psi_1} = C r_{21}e^{-\psi_2}$ for some constant~$C>0$. This condition implies time-reversibility of~$(X^\varepsilon,I^\varepsilon)$ in the sense of Definition~\ref{intro:def:reversibility}---we clarify this connection in Section~\ref{MM:subsec:det-bal-implies-symmetric-H}. There, we will also show that detailed balance implies symmetry of the Hamiltonian, that is~$\mathcal{H}(p)=\mathcal{H}(-p)$. In particular, we find~$v=0$ under detailed balance. \smallskip We close this section by describing how the stochastic process~$(X^\varepsilon, I^\varepsilon)$ models the movement of a molecular motor on a polymeric filament. The molecular motor consists of two chains whose heads can attach to the filament. A sequence of chemical reactions provides energy that triggers a forward power stroke of a motor head, thereby leading to a spatial displacement of the motor. The spatial component~$X^\varepsilon_t$ corresponds to the position of the molecular motor on the filament, while a change of the configurational component~$I^\varepsilon_t$ corresponds to the event of a chemical reaction. The information of how the motor moves forward is encoded in the potentials. The periodicity of the potential reflects the periodic structure of a filament. One can think of the minima of the potentials as corresponding to the head's binding spots on the filament. Finally, the noise term in~\eqref{eq:intro:example_SDE} models friction arising from collisions of the motor with molecules in the environment. Because of the highly viscous environment, it is common to consider a drift-diffusion process. A justification for this overdamped limit regime is offered for instance by Wang and Elston~\cite{WangElston2007}. When coarse-graining the continuous model to a Markov jump process on the binding spots, we obtain a discrete model. We discuss these jump models in Section~\ref{subsection:results:LDP_in_MM}. \section{Larger context and aim of this chapter} \label{MM:sec:larger-context-and-aim} One inspiration for the subject of this chapter is a series of papers by Perthame, Souganidis and Mirrahimi~\cite{PerthameSouganidis09a, PerthameSouganidis2009Asymmetric, Mirrahimi2013}. There, the authors start from the Fokker-Planck equations associated with $(X^\varepsilon, I^\varepsilon)$ from \eqref{eq:intro:example_SDE} and \eqref{eq:intro:example_evolution_jump_rates}: \begin{align} \begin{cases} \displaystyle \partial_t \rho_\varepsilon^1 = \;\varepsilon \frac{1}{2} \partial_{xx} \rho_\varepsilon^1 + \text{div}_x \left[\rho_\varepsilon^1\,\psi'_1\left(\frac{x}{\varepsilon}\right)\right] + \frac{1}{\varepsilon}r_{21}\left(\frac{x}{\varepsilon}\right)\rho_\varepsilon^2 - \frac{1}{\varepsilon}r_{12}\left(\frac{x}{\varepsilon}\right)\rho_\varepsilon^1,\\ \quad \\ \displaystyle \partial_t \rho_\varepsilon^2 = \; \varepsilon \frac{1}{2} \partial_{xx} \rho_\varepsilon^2 + \text{div}_x \left[\rho_\varepsilon^2\,\psi'_2\left(\frac{x}{\varepsilon}\right)\right] + \frac{1}{\varepsilon}r_{12}\left(\frac{x}{\varepsilon}\right)\rho_\varepsilon^1 - \frac{1}{\varepsilon}r_{21}\left(\frac{x}{\varepsilon}\right)\rho_\varepsilon^2. \end{cases} \label{eq:intro:FP_eq} \end{align} The functions $\{\psi^i,r_{ij}\}$ are taken to be $1$-periodic and smooth. The system of equations \eqref{eq:intro:FP_eq} describes the evolution of the partial probability densities given in terms of the process by~$\rho^i_\varepsilon(t, \mathrm{d} x) = \mathbb{P}\left(X^\varepsilon_t \in \mathrm{d} x, I^\varepsilon_t = i\right)$. \smallskip Perthame and Souganidis define in~\cite{PerthameSouganidis09a} a notion of asymmetry for a given set of functions $\{\psi^i,r_{ij}\}$. This notion is based on migration of density in the stationary Fokker-Planck system ($\partial_t\rho_\varepsilon^i = 0 $ in~\eqref{eq:intro:FP_eq}) on the spatial domain~$(0,1)$ with periodic boundaries. The authors consider~$\psi_2=0$ and find a condition under which the densities $\rho^1_\varepsilon$ and $\rho^2_\varepsilon$ converge to a delta mass supported at one end of the interval, which is refered to as the \emph{motor effect} or as \emph{transport}. In all three papers, Perthame, Souganidis and Mirrahimi address the question of what exactly characterizes the class of potentials and rates $\{\psi^i,r_{ij}\}$ that induce transport, and prove convergence statements for the Fokker-Planck system \eqref{eq:intro:FP_eq}. \smallskip In \cite{PerthameSouganidis09a}, the authors find a sufficient condition for transport in terms of an effective Hamiltonian $\mathcal{H}(p)$ and a total flux $F(p)$, where $p\in\mathbb{R}$. System $\eqref{eq:intro:FP_eq}$ exhibits the motor effect if and only if $\partial_p\mathcal{H} (0)\neq 0$, or equivalently if $F(0)\neq 0$. The effective Hamiltonian is the principal eigenvalue of an associated cell problem, obtained after an exponential change of variables. It is the same principal eigenvalue that appears in the example from above, and we explain in Section~\ref{section:LDP_in_MM} how to obtain it from a large-deviation perspective. Because they consider the stationary system, the information about how fast the density migrates cannot be determined, since that is a question about the dynamics. \smallskip More recently, in~\cite{Mirrahimi2013}, Mirrahimi and Souganidis analysed the system~\eqref{eq:intro:FP_eq} on~$\mathbb{R}^d$, again with~$\psi_2=0$. When taking the limit~$\varepsilon \rightarrow 0$, they find that the sum of partial probabilities converges to a moving delta mass with velocity $v = \partial_p\mathcal{H}(0)$. More precisely, they find~$\rho^1_\varepsilon(t,x)+\rho^2_\varepsilon(t,x)\rightarrow \delta(x-tv)I_0$ in the sense of measures, where $I_0$ is determined by the initial data. This is consistent with the previously found criterion for the motor effect \cite{PerthameSouganidis09a}, $\partial_p\mathcal{H}(0) \neq 0$. Theorem~\ref{thm:results:LDP_cont_MM_Limit_I} further below recovers this result with a stronger form of convergence. \smallskip We point out again that we do not provide any new sufficient conditions for obtaining transport, due to the larger generality of our considerations. We do prove under general conditions that detailed balance leads to a symmetric Hamiltonian (see Theorem~\ref{thm:results:detailed_balance_limit_I} below). This implies that detailed balance has to be broken in order for transport to occur. \smallskip The methods that Perthame, Souganidis and Mirrahimi apply in~\cite{PerthameSouganidis09a, PerthameSouganidis2009Asymmetric, Mirrahimi2013} are inspired by large deviation theory. However, in their papers, they do not explicitly prove large deviations, but prove convergence statements on the level of Fokker-Planck equations. When proving the associated large deviation principles, as we will do in this chapter, there is a clear distinction between the contributions that come from general large deviation theory on the one hand, and the model-specific contributions on the other hand. \smallskip Our aim is not only to prove the large-deviation results, but also to separate those parts of the argument which are general and come from large deviation theory, from those parts that are specific to the model at hand. We make this explicit by considering so-called Markov processes with random switching, a class of stochastic processes that we introduce in Section~\ref{section:switching-MP}. The process introduced above by \eqref{eq:intro:example_SDE} and \eqref{eq:intro:example_evolution_jump_rates} is an example of such a process, and in particular represents a motivating example for considering this class of processes. In Section~\ref{subsection:results:LDP_switching_MP}, we illustrate by means of example how the argument is then separated into large-deviation parts and model-specific parts. \section{Main Results} \label{section:MM:results} In this section, we give an overview of our results. We first define in Section~\ref{section:switching-MP} switching Markov processes. We formulate and explain sufficient conditions under which the spatial component of a switching Markov process satsfies a large deviation principle (Theorem~\ref{thm:results:LDP_switching_MP}). Since the rate functions are a priori of intricate form, we cast the rate functions in action-integral form (Theorem~\ref{thm:results:action_integral_representation}). In summary, by working with switching Markov processes we show which properties the large deviation principles for molecular motors depend on. \smallskip We specialize to models of molecular motors in Section~\ref{subsection:results:LDP_in_MM}, where we state large deviation principles for two limit regimes. The Hamiltonians in the action-integral rate functions are principal eigenvalues of certain cell problems. In Section~\ref{MM:subsec:det-bal-implies-symmetric-H}, we work with variational formulas of such principal eigenvalues in order to study the behaviour of molecular motors under the detailed-balance condition. The main challenge is to derive useful formulas for the Hamiltonians that allow us to draw concrete conclusions. We show symmetry of the Hamiltonians under detailed balance. In particular, this implies $v = \partial_p\mathcal{H}(0)=0$, which means transport can only occur if detailed balance is broken. This result about transport is expected and not new, but follows in our case from a more general symmetry of large deviations. \subsection{Switching Markov processes in a periodic setting} \label{section:switching-MP} We introduce switching Markov processes as certain two-component stochastic processes~$(X^\varepsilon, I^\varepsilon)$ taking values in a state space $E_\varepsilon$. The state space of~$I^\varepsilon$ is a finite set~$\{1,\dots,J\}$, while~$X^\varepsilon$ takes values in some compact Polish space~$E_\varepsilon^X$. We are interested in studying processes in a periodic setting. Therefore, we consider the flat $d$-dimensional torus $\mathbb{T}^d := \mathbb{R}^d / (\ell \cdot \mathbb{Z}^d)$, for some fixed length~$\ell\in\mathbb{N}$. We henceforth omit the dependence on~$\ell$. \begin{condition}[Setting] Fix~$J\in\mathbb{N}$ and let~$\varepsilon = 1/n > 0$ for an integer~$n$. The state space~$E_\varepsilon$ is a product space~$E_\varepsilon := E_\varepsilon^X \times \{1, \dots, J\}$, where~$E_\varepsilon^X$ be a compact Polish space satisfying the following. There are continuous maps $\iota_\varepsilon : E_\varepsilon^X \rightarrow \mathbb{T}^d$ such that for all $x \in \mathbb{T}^d$ there exist $x_\varepsilon \in E_\varepsilon^X$ with which $\iota_\varepsilon(x_\varepsilon) \rightarrow x$ as $\varepsilon \rightarrow 0$.\qed \label{condition:results:general_setting} \end{condition} This condition means that~$E_\varepsilon^X$ is asymptotically dense in the torus~$\mathbb{T}^d$. The typical example is a finite, discrete and periodic lattice with spacing~$\varepsilon$, so that in the limit of~$\varepsilon$ to zero one obtains the torus. Another example is simply~$E_\varepsilon^X\equiv \mathbb{T}^d$. When it is clear from the context, we omit $\iota_\varepsilon$ in the notation. \smallskip We now define switching Markov processes by specifying their generators from the following ingredients: \begin{enumerate}[(1)] \item For~$i\in\{1,\dots,J\}$, we have a map~$L_\varepsilon^{i}:\mathcal{D}(L_\varepsilon^{i}) \subseteq C(E_\varepsilon^X) \rightarrow C(E_\varepsilon^X)$ that is the generator of an~$E_\varepsilon^X$-valued Markov process. \item For~$i,j\in\{1,\dots,J\}$, we have a continuous map~$r_{ij}^\varepsilon:E_\varepsilon^X\to[0,\infty)$. \end{enumerate} With that, define the map~$L_\varepsilon:\mathcal{D}(L_\varepsilon) \subseteq C(E_\varepsilon) \rightarrow C(E_\varepsilon)$ by \begin{equation} L_\varepsilon f(x,i) := L_\varepsilon^{i} f(\cdot,i) (x) + \sum_{j = 1}^J r_{ij}^\varepsilon(x) \left[ f(x,j) - f(x,i) \right], \label{eq:intro:MP_with_switching_L_varepsilon} \end{equation} where the domain is~$\mathcal{D}(L_\varepsilon) = \{ f \in C(E_\varepsilon) \, : \, f(\cdot,i) \in \mathcal{D}(L_\varepsilon^{i}), i = 1, \dots, J \}$. Let~$\mathcal{X}_\varepsilon:=D_{E_\varepsilon}[0,\infty)$ be the set of trajectories in~$E_\varepsilon$ that are right-continuous and have left limits. We equip~$\mathcal{X}_\varepsilon$ with the Skorohod topology~\cite[Section~3.5]{EthierKurtz1986}. For an initial condition~$\mu\in\mathcal{P}(E_\varepsilon)$, we associate a two-component process $(X_t^\varepsilon, I_t^\varepsilon)$ with values in $E_\varepsilon$ to the generator~$L_\varepsilon$ by finding its path distribution~$\mathbb{P}_\mu\in\mathcal{P}(\mathcal{X}_\varepsilon)$. To do so, we assume well-posedness of the associated martingale-problem associated to the pair~$(L_\varepsilon,\mu)$. For the precise statement of the martingale problem, we refer to~\cite[Section~4.3]{EthierKurtz1986}. \begin{condition}[Well-posedness] Let~$\mu \in \mathcal{P}(E_\varepsilon)$. Then existence and uniqueness holds of the $\mathcal{X}_\varepsilon$-martingale problem for $(L_\varepsilon,\mu)$. Denote the solution to the martingale-problem solution of $L_\varepsilon$ by~$\mathbb{P}_\mu$. The map~$E_\varepsilon \ni z \mapsto \mathbb{P}_{\delta_z} \in \mathcal{P}(\mathcal{X}_\varepsilon)$ is Borel measurable with respect to the weak topology on $\mathcal{P}(\mathcal{X}_\varepsilon)$.\qed \label{condition:intro:sol_martinagle_problem} \end{condition} % Condition~\ref{condition:intro:sol_martinagle_problem} is the basic assumption on the processes in~\cite{FengKurtz2006}. A sufficient condition for the measurability is given in~\cite[Theorem~4.4.6]{EthierKurtz1986}. In this chapter, we consider switching Markov processes in the following sense. \begin{definition}[Switching Markov processes in a periodic setting] Let~$(X^\varepsilon,I^\varepsilon)$ be a two-component Markov proces taking values in~$E_\varepsilon = E^X_\varepsilon \times \{1,\dots,J\}$ satisfying Condition~\ref{condition:results:general_setting}. We call~$(X^\varepsilon,I^\varepsilon)$ a \emph{switching Markov process} if its generator~$L_\varepsilon$ is given by~\eqref{eq:intro:MP_with_switching_L_varepsilon} and satisfies Condition~\ref{condition:intro:sol_martinagle_problem}.\qed \label{def:intro:MP_with_switching} \end{definition} We do not give general conditions on a map~$L_\varepsilon$ that imply Condition~\ref{condition:intro:sol_martinagle_problem}. However, all the examples of stochastic processes modelling molecular motors will satisfy this condition. Further details about existence and regularity properties can be found in the book of Yin and Zhu about switching hybrid diffusions~\cite[Part~I]{yin2010hybrid}. \smallskip We close this section by mentioning that the process of the introductory example satisfying~\eqref{eq:intro:example_SDE} and~\eqref{eq:intro:example_evolution_jump_rates} is a switching Markov process. The state space is~$E_\varepsilon=\mathbb{T}\times\{1,2\}$, and its generator is of the form~\eqref{eq:intro:MP_with_switching_L_varepsilon}. The jump rates are given by~$r_{ij}^\varepsilon(x) = r_{ij}(x/\varepsilon) / \varepsilon$, and for~$i=1,2$, we have \begin{equation*} L_\varepsilon^{i}g(x) := -\psi'(x/\varepsilon,i)\,g'(x) + \varepsilon\,g''(x),\quad x\in\mathbb{T}. \end{equation*} This is the generator of a drift-diffusion process on $\mathbb{T}$ satisfying \begin{equation*} \mathrm{d} Y_t^\varepsilon = -\psi'\left((Y_t^\varepsilon/\varepsilon),i\right)\, \mathrm{d} t + \sqrt{2\varepsilon}\, \mathrm{d} B_t. \end{equation*} A scheme of how to obtain a process on the torus~$\mathbb{T}$ is presented for instance in~\cite[Chapter~3.2]{bensoussan2011asymptotic}. \subsection{Large deviation principle for switching Markov processes} \label{subsection:results:LDP_switching_MP} We consider switching Markov processes~$(X^\varepsilon,I^\varepsilon)$ in the sense of Definition~\ref{def:intro:MP_with_switching}, with generators of the form~\eqref{eq:intro:MP_with_switching_L_varepsilon}. The essence of this section is Theorem~\ref{thm:results:LDP_switching_MP}, which provides general conditions under which a pathwise large deviation principle of the spatial component~$X^\varepsilon$. We alert the reader here that we illustrate the concepts and notations by means of an example below Theorem~\ref{thm:results:LDP_switching_MP}. We state the conditions in terms of the nonlinear generators defined as follows. \begin{definition}[Nonlinear generators] \label{MM:def:nonlinear-generators-switching-MP} Let~$L_\varepsilon$ be the map defined by~\eqref{eq:intro:MP_with_switching_L_varepsilon}. The \emph{nonlinear generator} is the map~$H_\varepsilon : \mathcal{D}(H_\varepsilon) \subseteq C(E_\varepsilon) \rightarrow C(E_\varepsilon)$ defined by \begin{equation} H_\varepsilon f(x) := \varepsilon \, e^{-f(x)/\varepsilon} L_\varepsilon (e^{f(\cdot)/\varepsilon})(x), \label{eq:results:H_varepsilon} \end{equation} with the domain~$\mathcal{D}(H_\varepsilon) := \{f \in C(E_\varepsilon) \, : \, e^{f(\cdot)/\varepsilon} \in \mathcal{D}(L_\varepsilon)\}$.\qed \end{definition} We will require the nonlinear generators~$H_\varepsilon$ to converge in the limit~$\varepsilon\to 0$. To formulate this convergence condition, we need to introduce an additional state space~$E'$ for collecting up-scaled variables. The following diagram depicts the relation between the state spaces: \begin{equation*} \begin{tikzcd}[row sep = tiny] & \mathbb{T}^d \times E^\prime \arrow[dd, "\mathrm{proj}_1"] \\ E_\varepsilon \arrow[ur, "(\eta_\varepsilon {,} \eta_\varepsilon^\prime)"] \arrow[dr, "\eta_\varepsilon"'] & \\ & \mathbb{T}^d \end{tikzcd} \end{equation*} % In the diagram,~$\eta_\varepsilon : E_\varepsilon \to \mathbb{T}^d$ is the projection defined by~$\eta_\varepsilon (x,i) := \iota_\varepsilon(x)$, where~$\iota_\varepsilon:E_\varepsilon^X\to\mathbb{T}^d$ is the embedding. The map $\eta_\varepsilon^\prime : E_\varepsilon \to E^\prime$ is continuous. We assume that~$E_\varepsilon$ is asymptotically dense: \begin{enumerate}[(C1)] \item \label{MM:item:C1} For~$(x,z') \in \mathbb{T}^d \times E'$ there are $y_\varepsilon\in E_\varepsilon$ such that $\eta_\varepsilon(y_\varepsilon) \to x$ and $\eta_\varepsilon'(y_\varepsilon) \to z^\prime$ as $\varepsilon \to 0$. \end{enumerate} The limit operator of~$H_\varepsilon$ are generally multivalued, that means defined by a subset~$H\subseteq C(\mathbb{T}^d)\times C(\mathbb{T}^d\times E')$. We assume the following convergence condition: \begin{enumerate}[(C2)] \item \label{MM:item:C2} For any~$(f,g)\in H$, there are functions~$f_\varepsilon\in\mathcal{D}(H_\varepsilon)$ such that \[ \| f\circ\eta_\varepsilon - f_\varepsilon \|_{L^\infty(E_\varepsilon)} \rightarrow 0 \quad \text{ and } \quad \| g\circ (\eta_\varepsilon,\eta_\varepsilon') - H_\varepsilon f_\varepsilon \|_{L^\infty(E_\varepsilon)} \rightarrow 0. \] \end{enumerate} Frequently, for any~$f$ in the domain of~$H$, the corresponding image functions~$g$ are naturally parametrized by a set of functions on~$E'$. \begin{enumerate}[(C3)] \item \label{MM:item:C3} There are a set~$\mathcal{C}\subseteq C(E')$ and functions~$H_{f,\varphi}\in C(\mathbb{T}^d\times E')$ with which \begin{equation*} H = \left\{\left(f,H_{f,\varphi}\right)\,:\,f\in\mathcal{D}(H),\varphi\in\mathcal{C}\right\}. \end{equation*} \end{enumerate} Below the theorem, we illustrate by an example how to find the multivalued operator starting from the nonlinear generators. \begin{theorem}[Large deviation principle for switching processes] Let~$(X^\varepsilon,I^\varepsilon)$ be a switching Markov process in the sense of Definition~\ref{def:intro:MP_with_switching}, with nonlinear generators~$H_\varepsilon$ of Definition~\ref{MM:def:nonlinear-generators-switching-MP}. Suppose that there exists a compact metric space~$E^\prime$ satisfying~\ref{MM:item:C1} and a multivalued operator~$H\subseteq C(\mathbb{T}^d)\times C(\mathbb{T}^d\times E')$ with domain~$\mathcal{D}(H)$ satisfying~$C^\infty(\mathbb{T}^d) \subseteq \mathcal{D}(H) \subseteq C^1(\mathbb{T}^d)$ such that: \begin{enumerate}[(T1)] \item \label{MM:item:T1} The operator~$H$ satisfies~\ref{MM:item:C2} and~\ref{MM:item:C3} from above. For every $\varphi\in\mathcal{C}$ there is a map~$H_\varphi : \mathbb{R}^d \times E^\prime \to \mathbb{R}$ such that for all~$f \in \mathcal{D}(H)$, \begin{equation*} H_{f,\varphi}(x,z^\prime) = H_\varphi(\nabla f(x),z^\prime),\qquad (x,z') \in \mathbb{T}^d\times E'. \end{equation*} \item \label{MM:item:T2} For every $p \in \mathbb{R}^d$, there exists a function $\varphi_p \in \mathcal{C}$ and a constant $\mathcal{H}(p) \in \mathbb{R}$ such that~$H_{\varphi_p}(p,z^\prime)=\mathcal{H}(p)$ for all $z^\prime \in E^\prime$. \end{enumerate} Suppose furthermore that~$\{X^\varepsilon(0)\}_{\varepsilon>0}$ satisfies a large deviation principle in~$\mathbb{T}^d$ with rate function~$\mathcal{I}_0 : \mathbb{T}^d \rightarrow [0,\infty]$. % Then the family of processes $\{X^\varepsilon\}_{\varepsilon>0}$ satisfies a large deviation principle in $D_{\mathbb{T}^d}[0,\infty)$ with a rate function $\mathcal{I} :D_{\mathbb{T}^d}[0,\infty)\rightarrow[0,\infty]$. \label{thm:results:LDP_switching_MP} \end{theorem} The proof of Theorem~\ref{thm:results:LDP_switching_MP} is given in Section~\ref{section:LDP_switching_MP}. The formula for the rate function is not important here, which is why we give it only in the proofs. While Condition~\ref{MM:item:T1} corresponds to the convergence of nonlinear generators, Condition~\ref{MM:item:T2} usually corresponds to solving a principal-eigenvalue problem. The constant~$\mathcal{H}(p)$ is then uniquely determined as the principal eigenvalue of a certain cell problem. Further below, we give feasible conditions on the map $p\mapsto \mathcal{H}(p)$ under which the rate function admits an action-integral representation (Theorem~\ref{thm:results:action_integral_representation} in Section~\ref{subsection:results:action_integral_rep}). Here, we illustrate by an example how conditions~\ref{MM:item:T1} and~\ref{MM:item:T2} can be obtained starting from the nonlinear generators. Even though the example is not a switching Markov process, it shows the features arising from the mixed scales. \paragraph{Example illustrating the general case.} Let~$\mathbb{T}$ be the one-dimensional flat torus, $\psi(\cdot) \in C^\infty(\mathbb{T})$, and consider the process~$X_t^\varepsilon$ solving \begin{equation*} \mathrm{d} X_{t}^\varepsilon = -\psi'(X_t^\varepsilon / \varepsilon) \, \mathrm{d} t + \sqrt{\varepsilon} \, \mathrm{d} B_{t}, \end{equation*} where~$\varepsilon = 1/n$ with some integer $n$. Its generator is given by \begin{equation*} L_\varepsilon f(x) = -\psi'(x/\varepsilon) f'(x) + \varepsilon\, \frac{1}{2} f''(x),\quad f\in C^2(\mathbb{T}). \end{equation*} Therefore the nonlinear generators $H_\varepsilon$ are \begin{equation*} H_\varepsilon f(x)=-\psi'(x/\varepsilon) f'(x)+\frac{1}{2}|f'(x)|^2 + \varepsilon\,\frac{1}{2} f''(x). \end{equation*} The aim is to obtain a limit of $H_\varepsilon$ as $\varepsilon \to 0$. In order to determine the behaviour of $H_\varepsilon f$ for small $\varepsilon$, we have to deal with the problem that the drift-term $\psi'(x/\varepsilon)$ is fastly oscillating as $\varepsilon$ tends to zero. This is solved by considering functions that are of the form~$f_\varepsilon (x) = f(x) + \varepsilon\, \varphi(x/\varepsilon)$. Then we obtain \begin{multline*} H_\varepsilon f_\varepsilon (x)=-\psi'(x/\varepsilon) \cdot \left[f'(x) + \varphi'(x/\varepsilon)\right]+\frac{1}{2} | f'(x) + \varphi'(x/\varepsilon)|^2\\ +\frac{1}{2} \varphi''(x/\varepsilon)+\frac{\varepsilon}{2} f''(x). \end{multline*} We want these images to converge in the limit~$\varepsilon \to 0$. The~$\varepsilon \,\frac{1}{2} f''(x)$ term is of order~$\varepsilon$ and therefore not problematic. The remaining terms are in general oscillating in~$\varepsilon$. However, with the right choice of the function~$\varphi$, one can make this term to be independent of the~$(x/\varepsilon)$-variable, and thereby independent of~$\varepsilon$ altogether. In order to see how, we rewrite~$H_\varepsilon f_\varepsilon$ by introducing the fast spatial variable~$y=x/\varepsilon$, with which we find that \begin{multline} H_\varepsilon f_\varepsilon (x)=e^{-\varphi(y)}\left[ \frac{1}{2} |f'(x)|^2 - \psi'(y) f'(x)+ \left(f'(x) - \psi'(y)\right) \partial_y+ \frac{1}{2} \partial_{yy}\right]e^{\varphi(y)}\\ +\varepsilon\,\frac{1}{2} f''(x) \qquad\left(y=\frac x\varepsilon\right). \end{multline} Hence we aim to find a function $\varphi(\cdot)$ such that the term $e^{-\varphi} [ \cdots ] e^\varphi$ is constant as a function of the $x/\varepsilon$-variable, regarding the $x$-variable as a parameter. This term depends on $x$ only via the derivative of $f$. Hence if we can find such a function~$\varphi$, we can denote the constant by~$\mathcal{H}(\partial_x f(x))$. Then with that choice of the function~$\varphi$, the values of $H_\varepsilon f_\varepsilon$ are given by \begin{equation*} H_\varepsilon f_\varepsilon (x) = \mathcal{H}(\partial_x f(x)) + \mathcal{O}(\varepsilon), \end{equation*} and we find for small $\varepsilon$ that $H_\varepsilon f_\varepsilon(x) \approx \mathcal{H}(\partial_x f(x))$. Making this strategy rigorous can be realized in two steps via~\ref{MM:item:T1} showing convergence of nonlinear generators and~\ref{MM:item:T2} solving a principal-eigenvalue problem, as follows: \smallskip \ref{MM:item:T1}: The images $H_\varepsilon f_\varepsilon(x)$ are given by $H_{f,\varphi}(x,x/\varepsilon) + \varepsilon\, \frac{1}{2} f''(x)$, where % $$ H_{f,\varphi}(x,y) := -\psi'(y) \left[ f'(x) + \varphi'(y) \right] + \frac{1}{2} |f'(x) + \varphi'(y)|^2 + \frac{1}{2} \varphi''(y). $$ % By taking arbitrary $\varphi \in C^2(\mathbb{T})$, we collect all these possible limits of $H_\varepsilon f_\varepsilon$ and summarize them in a multivalued operator % $ H \subseteq C(\mathbb{T}) \times C(\mathbb{T} \times \mathbb{T}) $ % defined by % \begin{equation} H := \{ (f,H_{f,\varphi}) \, : \, f \in C^2(\mathbb{T}) \text{ and } \varphi \in C^2(\mathbb{T}) \}. \label{eq:results:example_H} \end{equation} The set of upscaled variables is~$E'=\mathbb{T}$, and~\ref{MM:item:C1} is satisfied with~$\eta_\varepsilon'(x)=x/\varepsilon$. The nonlinear generator~$H_\varepsilon$ converges to the limit operator~$H$ as demanded in~\ref{MM:item:C2}: for~$(f,H_{f,\varphi}) \in H$, the functions~$f_\varepsilon (x) = f(x) + \varepsilon\, \varphi(x/\varepsilon)$ satisfy \begin{equation*} \sup_{x \in \mathbb{T}} | f(x) - f_\varepsilon(x) | \xrightarrow{\varepsilon\to 0} 0 \quad\text{and}\quad \sup_{x \in \mathbb{T}} | H_{f,\varphi}(x,\eta^\prime_\varepsilon(x)) - H_\varepsilon f_\varepsilon (x) | \xrightarrow{\varepsilon\to 0} 0. \end{equation*} Condition~\ref{MM:item:C3} is satisfied by construction, with~$\mathcal{C}=C^2(\mathbb{T})$. Finally, the images of the limit operator $H$ are given by % \begin{align*} H_{f, \varphi}(x,y) &= e^{-\varphi(y)} \left[ V_{f'(x)}(y) + B_{f'(x)} \right] e^{\varphi(\cdot)}(y) =: H_{\varphi}(f'(x),y), \end{align*} % where~$V_p(y) := \frac{1}{2} p^2 - p \, \psi'(y)$ and~$B_p := (p - \psi'(y)) \partial_y + \frac{1}{2} \partial_{yy}$, for $p \in \mathbb{R}$. \smallskip \ref{MM:item:T2}: Fix~$p\in\mathbb{R}$. Finding a function $\varphi(\cdot)$ such that~$H_{\varphi}(p,y)$ becomes constant as a function of~$y$ is equivalent to finding a constant~$\mathcal{H}(p)$ such that on~$\mathbb{T}$, \begin{equation*} \left[ V_p + B_p \right] e^{\varphi} = \mathcal{H}(p) e^{\varphi}. \end{equation*} This is a principal-eigenvalue problem, where the constant~$\mathcal{H}(p)$ corresponds to the principal eigenvalue. We come back to principal eigenvalues when considering the results about molecular motor models in Section~\ref{subsection:results:LDP_in_MM} and their proofs in Section~\ref{section:LDP_in_MM}. In Section~\ref{appendix:prinipal_ev}, we further outline to what extend the principal-eigenvalue problems that we encounter in this chapter are solved in the literature.\qed \smallskip This example hints at a more general structure comprising all molecular-motor models that we consider in this chapter. The different models are specified by the choice of the $\varepsilon$-scaling, the state space $E^X_\varepsilon$, the spatial dynamics defined by the generators $L^{i}_\varepsilon$, and the reaction rates $r_{ij}^\varepsilon(\cdot)$. However, the proofs of large deviation principles are independent from these choices; they all follow Theorem~\ref{thm:results:LDP_switching_MP}. The model-specific contribution is only to determine in which setting~\ref{MM:item:T1} and~\ref{MM:item:T2} have to be verified. \subsection{Action-integral representation of the rate function} \label{subsection:results:action_integral_rep} In this section, our main goal is to give a feasible condition under which the rate function of Theorem~\ref{thm:results:LDP_switching_MP} is of action-integral form. We say that a rate function~$\mathcal{I}:D_{\mathbb{T}^d}[0,\infty)\to[0,\infty]$ is of action-integral form if there is a convex map~$\mathcal{L}:\mathbb{R}^d\to[0,\infty]$ with which \begin{equation*} \mathcal{I}(x) = \begin{cases} \mathcal{I}_0(x(0))+ \int_0^\infty\mathcal{L} \left(\partial_t x(t)\right) \, \mathrm{d} t &\quad \text{if } x\in \mathcal{A}\mathcal{C}([0,\infty); \mathbb{T}^d),\\ +\infty & \quad \text{otherwise}. \end{cases} \end{equation*} \begin{theorem} Consider the setting of Theorem~\ref{thm:results:LDP_switching_MP}. For~$p\in\mathbb{R}^d$, let~$\mathcal{H}(p)$ be the constant obtained in~\ref{MM:item:T2} of Theorem \ref{thm:results:LDP_switching_MP}. Suppose the following: \begin{itemize} \item[(T3)] The map $p \mapsto \mathcal{H}(p)$ is convex and $\mathcal{H}(0) = 0$. \end{itemize} Then the rate function of Theorem~\ref{thm:results:LDP_switching_MP} is of action-integral form with Lagrangian as the Legendre-Fenchel transform of $\mathcal{H}$, that is~$\mathcal{L}(v)=\sup_{p\in\mathbb{R}^d}\left[p\cdot v - \mathcal{H}(p)\right]$. \label{thm:results:action_integral_representation} \end{theorem} % We give the proof in Section~\ref{section:action_integral}. The argument is based on the general strategy of~\cite[Chapter~8]{FengKurtz2006}. The idea of how to obtain such representations is also outlined in Section~\ref{BG:sec:semigroup-flow-HJ-eq} of Chapter~2 in this thesis. \subsection{Large deviations for models of molecular motors} \label{subsection:results:LDP_in_MM} In this section we formulate large deviation theorems for stochastic processes motivated by molecular motors. The proofs are given in Section~\ref{section:LDP_in_MM}. All proofs are based on verifying the conditions of Theorems~\ref{thm:results:LDP_switching_MP} and~\ref{thm:results:action_integral_representation} above. We first define the continuous model---for a motivation, in particular of the $\varepsilon$-scaling, we refer to Section~\ref{subsec:model-of-molecular-motor}. \begin{definition}[Continuous model] The pair~$(X^\varepsilon, I^\varepsilon)$ is a switching Markov process in~$E_\varepsilon = \mathbb{T}^d \times \{1,\dots,J\}$ with generator~$L_\varepsilon$ defined by \begin{multline} L_\varepsilon f(x,i) := b^i(x/\varepsilon) \cdot \nabla_x f(\cdot,i) (x) + \frac{\varepsilon}{2} \Delta_x f(\cdot,i) (x)\\ + \sum_{j = 1}^J \frac{1}{\varepsilon} \gamma(\varepsilon) r_{ij}(x/\varepsilon) \left[ f(x,j) - f(x,i) \right], \label{eq:intro:L_varepsilon_cont_MM} \end{multline} where~$\gamma(\varepsilon)>0$,~$r_{ij}(\cdot) \in C^\infty(\mathbb{T}^d; [0,\infty))$, and~$b^i(\cdot) \in C^\infty(\mathbb{T}^d)$. This is an example of a switching Markov process with generators~$L_\varepsilon^{i}$ defined on the core~$C^2(\mathbb{T}^d)$ by \begin{equation*} L^{i}_\varepsilon g(x) := b^i(x/\varepsilon) \cdot \nabla g(x) + \varepsilon \,\frac{1}{2} \Delta g(x), \end{equation*} and rates~$r_{ij}^\varepsilon(x)=(\gamma(\varepsilon)/\varepsilon)r_{ij}(x/\varepsilon)$. The domain of~$L_\varepsilon$ is the set given by~$\mathcal{D}(L_\varepsilon) = \{ f(x,i)\,:\, f(\cdot,i) \in \mathcal{D}(L_\varepsilon^{i})\}$.\qed \label{def:intro:cont_MM} \end{definition} \begin{definition}\label{MM:def:irreducible-matrix} Let~$J\in\mathbb{N}$. We call a matrix~$A\in\mathbb{R}^{J\times J}$ \emph{irreducible} if there is no decomposition of~$\{1,\dots,J\}$ into two disjoint sets $\mathcal{J}_1$ and $\mathcal{J}_2$ such that $A_{ij} = 0$ whenever $i \in \mathcal{J}_1$ and $j \in \mathcal{J}_2$.\qed \end{definition} \begin{theorem}[Continuous model, limit I] Let $(X^\varepsilon_t, I^\varepsilon_t)$ be the Markov process of Definition \ref{def:intro:cont_MM} with~$\gamma\equiv 1$. Assume that the matrix~$R$ with entries $R_{ij} = \sup_{y \in \mathbb{T}^d}r_{ij}(y)$ is irreducible. Suppose furthermore that the family of initial conditions $X^\varepsilon(0)$ satisfies a large deviation principle in $\mathbb{T}^d$ with rate function $\mathcal{I}_0 :\mathbb{T}^d \rightarrow [0,\infty]$. Then the family of stochastic processes $\{X^\varepsilon\}_{\varepsilon > 0}$ satisfies a large deviation principle in $C_{\mathbb{T}^d}[0,\infty)$ with rate function of action-integral form. The Hamiltonian~$\mathcal{H}(p)$ is the principal eigenvalue of an associated cell problem described in~\eqref{eq:LDP_MM:contI:cell_problem} of Lemma~\ref{lemma:LDP_MM:contI:principal_eigenvalue}. % \label{thm:results:LDP_cont_MM_Limit_I} \end{theorem} The example of Section~\ref{subsec:model-of-molecular-motor} corresponds to~$d = 1$,~$J = 2$ and~$b^i=-\psi'(\cdot,i)$. The irreducibility condition is imposed to solve the principal-eigenvalue problem that we obtain, and is inspired by what Guido Sweers assumes to solve a coupled system of elliptic PDE's~\cite{Sweers92}. \smallskip The parameter~$\gamma(\varepsilon)$ models an additional time-scale separation of the components. For large~$\gamma$, the spatial component is effectively driven by potentials averaged over the stationary measure of the fast configurational component. The following theorem shows that if~$\gamma(\varepsilon)\to\infty$, then the large deviation principle is governed by an averaged Hamiltonian. \begin{theorem}[Continuous model, limit II] Let $(X^\varepsilon_t, I^\varepsilon_t)$ be the Markov process of Definition~\ref{def:intro:cont_MM}, with~$\gamma(\varepsilon) \rightarrow \infty$ as~$\varepsilon \rightarrow 0$. Assume that for every~$y\in\mathbb{T}^d$, the matrix~$R(y)$ with entries~$R(y)_{ij}=r_{ij}(y)$ is irreducible. Suppose furthermore that the family of random variables $\{X^\varepsilon(0)\}_{\varepsilon > 0}$ satisfies a large deviation principle in $\mathbb{T}^d$ with rate function $\mathcal{I}_0 :\mathbb{T}^d \rightarrow [0,\infty]$. Then~$\{X^\varepsilon\}_{\varepsilon > 0}$ satisfies a large deviation principle in $C_{\mathbb{T}^d}[0,\infty)$ with rate function of action-integral form. The Hamiltonian $\overline{\mathcal{H}}(p)$ is the principal eigenvalue of an associated averaged cell problem described in Lemma~\ref{lemma:LDP_MM:contII:principal_eigenvalue}. \label{thm:results:LDP_cont_MM_Limit_II} \end{theorem} In the discrete model, the spatial component is not a drift-diffusion process, but a jump process on a discrete periodic lattice. We consider only nearest-neighbor jumps. We use the integer $n$ as the scaling parameter. For~$\ell\in\mathbb{N}$, we denote by~$\mathbb{T}_{\ell, n}$ the discrete one-dimensional flat torus of length $\ell$, lattice spacing $1/n$ and with $n \cdot \ell$ points. As a set,~$\mathbb{T}_{\ell, n} \simeq \{0, 1/n, \dots, \ell-1/n\}$ with periodic boundary. \begin{definition}[Discrete model] The pair~$(X^n, I^n)$ be a switching Markov process in $E_n = \mathbb{T}_{\ell, n} \times \{1,\dots,J\}$ with generator~$L_n$ defined on~$\mathcal{D}(L_n) = C(E_n)$, \begin{multline}\label{eq:intro:L_N_discr_MM} L_nf(x,i) = n r_+^i(nx) \left[ f(x + 1/n, i) - f(x,i) \right] + n r_-^i(nx) \left[ f(x - 1/n, i) - f(x,i) \right] \\ + \sum_{j = 1}^J n \gamma(n) r_{ij}(nx) \left[ f(x,j) - f(x,i) \right], \end{multline} where~$r_{ij}(\cdot) : \mathbb{T}_{\ell, 1} \rightarrow [0,\infty)$,~$r_\pm^i : \mathbb{T}_{\ell, 1} \rightarrow (0,\infty)$, and~$\gamma(n)>0$. To connect with our definition of switching Markov processes, the generators $L_n^i$ are \begin{align*} L^i_n g(x):=n r_+^i(nx) \left[ g(x + 1/n) - g(x) \right]+n r_-^i(nx) \left[ g(x - 1/n) - g(x) \right].\tag*\qed \end{align*} \label{def:intro:discr_MM} \end{definition} The discrete lattice $\mathbb{T}_{\ell, n}$ covers the continuous torus $\mathbb{T}_\ell = \mathbb{R}/({\ell \cdot \mathbb{Z}})$ in the limit~$n\to\infty$. \begin{theorem}[Discrete model, limit I] Let $(X^n_t,I^n_t)$ be the Markov process from Definition \ref{def:intro:discr_MM}, with $\gamma\equiv 1$. Suppose that the matrix~$R$ with entries defined by~$R_{ij} = \sup_{k \in \mathbb{T}_{\ell, 1}}r_{ij}(k)$ is irreducible. Suppose furthermore that~$\{X^n(0)\}_{n\in\mathbb{N}}$ satisfies a large deviation principle in $\mathbb{T}_\ell$ with rate function $\mathcal{I}_0 : \mathbb{T}_\ell \rightarrow [0,\infty]$. Then~$\{X^n\}_{n \in \mathbb{N}}$ satisfies a large deviation principle in $D_{\mathbb{T}_\ell}[0,\infty)$ with rate function $\mathcal{I} : D_{\mathbb{T}_\ell}[0,\infty) \rightarrow [0,\infty]$ of action-integral form. The Hamiltonian~$\mathcal{H}(p)$ is the principal eigenvalue of a cell problem described in Lemma~\ref{lemma:LDP_MM:discrI:principal_ev}. \label{thm:results:LDP_discr_MM_Limit_I} \end{theorem} If~$\gamma(n)$ is large, the spatial component~$X^n_t$ is driven by the average jump rates that result from averaging over the stationary distribution of the configurational component~$I^n_t$. If~$\gamma(n)\to\infty$, large deviations are characterized by an averaged Hamiltonian. \begin{theorem}[Discrete model, limit II] Let $(X^n_t,I^n_t)$ be the Markov process from Definition \ref{def:intro:discr_MM}, with $\gamma(n) \rightarrow \infty$ as $n \rightarrow \infty$. In addition to the assumptions of Theorem \ref{thm:results:LDP_discr_MM_Limit_I}, suppose that for each $ k \in \mathbb{T}_{\ell,1} \simeq \{0,1, \dots, \ell-1\}$, there exists a stationary measure $\mu_k \in \mathcal{P}(\{1,\dots,J\})$ for the jump process on $\{1,\dots,J\}$ with frozen jump rates $r_{ij}(k)$. Suppose furthermore that~$\{X^n(0)\}_{n \in \mathbb{N}}$ satisfies a large deviation principle in $\mathbb{T}_\ell$ with rate function $\mathcal{I}_0 : \mathbb{T}_\ell \rightarrow [0,\infty]$. Then $\{X^n_t|_{t \geq 0}\}_{n \in \mathbb{N}}$ satisfies a large deviation principle in $D_{\mathbb{T}_\ell}[0,\infty)$ with rate function of action-integral form. The Hamiltonian is the principal eigenvalue of an averaged cell problem described in Lemma~\ref{lemma:LDP_MM:discrII:principal_ev}. \label{thm:results:LDP_discr_MM_Limit_II} \end{theorem} \subsection{Detailed balance implies symmetric Hamiltonians} \label{MM:subsec:det-bal-implies-symmetric-H} In this section we show how the large deviation principles can be used to analyse which sets of potentials and rates induce transport on macroscopic scales. To that end, we consider the generator defined in~\eqref{eq:intro:L_varepsilon_cont_MM}, with~$b^i(y)=-\nabla_y\psi_i(y)$. We say that the set of potentials and rates~$\{r_{ij},\psi_i\}$ satisfies \emph{detailed balance} if for all~$i,j\in\{1,\dots,J\}$ and~$y\in\mathbb{T}^d$, we have \begin{align}\label{MM:eq:detailed-balance} r_{ij}(y) e^{-2\psi_i(y)}=r_{ji}(y) e^{-2\psi_j(y)}. \end{align} Let us motivate detailed balance. The Fokker-Planck equations of~$(X^\varepsilon,I^\varepsilon)$ are \begin{equation*} \partial_t \rho_\varepsilon^i = \varepsilon\frac{1}{2}\Delta\rho_\varepsilon^i+\mathrm{div}_x\left[\rho_\varepsilon^i\nabla_y\psi_i(x/\varepsilon)\right] +\frac{1}{\varepsilon} \sum_{j=1}^Jr_{ji}(x/\varepsilon)\rho_\varepsilon^j,\qquad i=1,\dots,J, \end{equation*} with~$r_{ii}:=-\sum_{j\neq i}r_{ij}$. In general, the stationary measure~$\pi_\varepsilon\in\mathcal{P}(\mathbb{T}^d\times\{1,\dots,J\})$ satisfying~$\partial_t\pi_\varepsilon=0$ is not known explicitly. Define the total flux~$J$ by \begin{equation*} J = \sum_iJ_i\,,\qquad J_i(t,x):=-\varepsilon \frac{1}{2}\nabla_x \rho_\varepsilon^i(t,x) - \rho_\varepsilon^i(t,x) \nabla_y\psi_i(x/\varepsilon). \end{equation*} Since~$0=\partial_t\sum_i\pi_\varepsilon^i=-\mathrm{div}_x\sum_iJ_i$, the total flux is constant if the system is stationary. Detailed balance is achieved if in addition, 1) each~$J_i$ is constant and 2) the flux between any two configurations~$i$ and~$j$ is balanced. If~$J_i$ is constant, then the stationary component~$\pi_\varepsilon^i$ is a Boltzmann distribution, that means there are constants~$C_i$ such that~$\pi_\varepsilon^i( \mathrm{d} x)=C_ie^{-2\psi_i(x/\varepsilon)} \mathrm{d} x$. The constants are inessential and can be absorbed into the potentials (since constant shifts of the potentials do not affect the dynamics), with which we find the stationary measure \begin{equation*} \pi_\varepsilon( \mathrm{d} x \mathrm{d} i) = Z^{-1}\,e^{-2\psi_i(x/\varepsilon)}\, \mathrm{d} x \mathrm{d} i,\quad Z = \sum_i\int e^{-2\psi_i(x/\varepsilon)}\, \mathrm{d} x. \end{equation*} Regarding 2), we find from~$\partial_t\pi_\varepsilon=0$ by summing over~$i$ that \begin{equation*} 0=\sum_j \left(r_{ji}\pi_\varepsilon^j-r_{ij}\pi_\varepsilon^i\right). \end{equation*} The detailed-balance condition~\eqref{MM:eq:detailed-balance} requires that each term in the summation vanishes. This motivates the notion of \emph{detailed} balance---if the system is stationary, then the flow from~$i$ to~$j$ is equal to the flow from~$j$ to~$i$. \smallskip Detailed balance implies time-reversibility of the process~$(X^\varepsilon,I^\varepsilon)$ in the sense of Definition~\ref{intro:def:reversibility}. This follows from the fact that symmetry of the generator is equivalent to time-reversibility~\cite[Chapter~II, Proposition~5.3]{Liggett2004}. A calculation shows that the generator~$L_\varepsilon$ is symmetric with respect to the stationary measure~$\pi_\varepsilon$; for all~$f,g\in\mathcal{D}(L_\varepsilon)$, we have~$\langle L_\varepsilon f,g\rangle_{\pi_\varepsilon} = \langle f,L_\varepsilon g\rangle_{\pi_\varepsilon}$. \begin{theorem}[Detailed balance implies a symmetric Hamiltonian] Let~$(X^\varepsilon_t, I^\varepsilon_t)$ be the stochastic process of Definition~\ref{def:intro:cont_MM} with~$b^i=-\nabla_y\psi_i$, where the~$\psi_i$ are smooth potentials. Suppose that the assumptions of Theorem~\ref{thm:results:LDP_cont_MM_Limit_I} and the detailed-balance condition~\eqref{MM:eq:detailed-balance} are satisfied. Then the Hamiltonian satisfies~$\mathcal{H}(p) = \mathcal{H}(-p)$ for all~$p\in\mathbb{R}^d$. \label{thm:results:detailed_balance_limit_I} \end{theorem} % \begin{theorem}[Separation of time scales implies a symmetric Hamiltonian] Let the stochastic process~$(X^\varepsilon_t, I^\varepsilon_t)$ of Definition~\ref{def:intro:cont_MM} with~$b^i=-\nabla\psi^i$ satisfy the assumptions from Theorem \ref{thm:results:LDP_cont_MM_Limit_II}. Suppose in addition that the rates $r_{ij}(\cdot)$ are constant on $\mathbb{T}^d$. Then $\overline{\mathcal{H}}(p) = \overline{\mathcal{H}}(-p)$, where $\overline{\mathcal{H}}(p)$ is the Hamiltonian from Theorem \ref{thm:results:LDP_cont_MM_Limit_II}. \label{thm:results:symmetry_limit_II} \end{theorem} In both situations, the macroscopic velocity given by $v = \partial_p\mathcal{H}(0)$ vanishes due to the symmetry of the Hamiltonians. Theorem~\ref{thm:results:symmetry_limit_II} confirms the numerical results of Weng, Peskin and Elston~\cite[Section~4.3]{WangPeskinElston2003}. Since the proofs of Theorems~\ref{thm:results:detailed_balance_limit_I} and~\ref{thm:results:symmetry_limit_II} are solely based on a suitable formula for~$\mathcal{H}(p)$, we give them here---the formulas of~$\mathcal{H}(p)$ are proven in Section~\ref{subsection:detailed_balance}. Since the derivation of these formulas is similar, we only give the argument for the more involved case of Theorem~\ref{thm:results:detailed_balance_limit_I}. \begin{proof}[Proof of Theorem~\ref{thm:results:detailed_balance_limit_I}] We prove in Proposition~\ref{prop:results:detailed_balance_limit_I} that under the detailed-balance condition, the principal eigenvalue~$\mathcal{H}(p)$ is given by % $$ \mathcal{H}(p) = \sup_{\mu \in \mathbf{P}} \left[ K_p(\mu) - \mathcal{R}(\mu) \right], $$ % where $\mathbf{P} \subset \mathcal{P}(E^\prime)$ is a subset of probability measures on $E^\prime = \mathbb{T}^d \times \{1, \dots, J\}$ specified in Proposition~\ref{prop:results:detailed_balance_limit_I}, $\mathcal{R}(\mu)$ is the relative Fisher information specified in~\eqref{MM:eq:relative-Fisher-information}, and $K_p(\mu)$ is given by % \begin{multline*} K_p(\mu)= \inf_{\phi}\bigg\{ \sum_{i = 1}^J \int_{\mathbb{T}^d} \left( \frac{1}{2}|\nabla \phi_i(x) + p|^2 - \sum_{j = 1}^J r_{ij}(x) \right) \, \mathrm{d} \mu_i(x) \\+ \sum_{i, j = 1}^J \int_{\mathbb{T}^d} \pi_{ij}(x) \sqrt{\overline{\mu}_i(x) \overline{\mu}_j(x)} e^{\psi_j(x) + \psi_i(x)} \cosh{(\phi(x,j) - \phi(x,i))} \, \mathrm{d} x \bigg\}, \end{multline*} % where $\pi_{ij}(x) = r_{ij}(x) e^{-2\psi_i(x)}$, the infimum is taken over vectors of functions $\phi_i = \phi(\cdot,i) \in C^2(\mathbb{T}^d)$, and $ \mathrm{d} \mu_i(x) = \overline{\mu}_i(x) \mathrm{d} x$. \smallskip Let~$\mu \in \mathbf{P}$. We show that~$K_p(\mu) = K_{-p}(\mu)$, which implies~$\mathcal{H}(p) = \mathcal{H}(-p)$. Since~$\cosh(\cdot)$ is symmetric, the sum in which the $\cosh(\cdot)$ terms appear is invariant under transforming as $\phi \to (-\phi)$, in the sense that for % $$ C(\phi):= \sum_{i, j = 1}^J \int_{\mathbb{T}^d} \pi_{ij}(x) \sqrt{\overline{\mu}_i(x) \overline{\mu}_j(x)} e^{\psi_j(x) + \psi_i(x)} \cosh{(\phi(x,j) - \phi(x,i))} \, \mathrm{d} x, $$ % we have $C(\phi) = C(-\phi)$. Hence the bijective transformation $\phi \to (-\phi)$ implies the claimed symmetry~$K_p(\mu) = K_{-p}(\mu)$. \end{proof} % \begin{proof}[Sketch of proof of Theorem~\ref{thm:results:symmetry_limit_II}] Under the detailed-balance condition, one can prove that the principal eigenvalue $\overline{\mathcal{H}}(p)$ is given by % $$ \overline{\mathcal{H}}(p) = \sup_{\mu \in \mathbf{P}} \left[ K_p(\mu) - \mathcal{R}(\mu) \right],\quad K_p(\mu) = \inf_{\varphi} \frac{1}{2} \int_{\mathbb{T}^d} | \nabla \varphi + p|^2 \, \mathrm{d} \mu, $$ where $\mathbf{P} \subset \mathcal{P}(\mathbb{T}^d)$ is a subset of the probability measures on $\mathbb{T}^d$, \[ \mathbf{P} = \left\{ \mu \in \mathcal{P}(\mathbb{T}^d) \, : \, \mu \ll \mathrm{d} x, \, \mathrm{d} \mu = \overline{\mu} \mathrm{d} x, \, \text{ and } \nabla \left( \log \overline{\mu} \right) \in L^2_{\mu}(\mathbb{T}^d) \right\}. \] The map~$\mathcal{R}$ is the relative Fisher information; with the stationary measure~$\nu$ of the jump process on~$\{1,\dots,J\}$ with rates~$r_{ij}$, we have \begin{equation*} \mathcal{R}(\mu) = \frac{1}{8}\int_{\mathbb{T}^d}\left|\nabla\log\left(\frac{\overline{\mu}}{e^{-2\overline{\psi}}}\right)\right|^2\, \mathrm{d}\mu,\quad \overline{\psi}(x)=\sum_i \nu_i\,\psi_i(x). \end{equation*} We have~$K_p(\mu) = K_{-p}(\mu)$, since the bijective transformation $\varphi \to (-\varphi)$ leaves the infimum invariant. This implies~$\overline{\mathcal{H}}(p) = \overline{\mathcal{H}}(-p)$. \end{proof} With a similar analysis, we can study the behaviour of molecular motors under external forces. Let $(X^\varepsilon_t, I^\varepsilon_t)$ be the stochastic process from Theorem \ref{thm:results:LDP_cont_MM_Limit_I} in dimension $d = 1$ with drift~$b^i(y)=F - \psi'(y,i)$, where~$F$ is a constant modelling an external force and~$\psi \in C^\infty(\mathbb{T})$ is a smooth periodic potential. The process~$(X^\varepsilon_t, I^\varepsilon_t)$ is $\mathbb{T} \times \{1,\dots,J\}$-valued and satisfies % $$ \mathrm{d} X^\varepsilon_t = (F - \psi'((X^\varepsilon_t / \varepsilon), I^\varepsilon_t))\, \mathrm{d} t + \sqrt{\varepsilon} \, \mathrm{d} B_t, $$ where $I^\varepsilon_t$ a jump process on $\{1,\dots,J\}$ with jump rates~$\frac{1}{\varepsilon} r_{ij}\left(x/\varepsilon\right)$. In this case, the Hamiltonian is given by % \begin{multline*} \mathcal{H}(p) = \frac{1}{2} |p + F|^2 - \frac{1}{2} F^2 \\ + \inf_{\varphi} \sup_{(y,i)} \bigg[ \frac{1}{2} \varphi''(y,i) + (p + F - \psi'(y,i)) \varphi'(y,i) - \psi'(y,i) p \\+ \sum_{i = 1}^J r_{ij}(y) \left( e^{\varphi(y,j) - \varphi(y,i)} - 1 \right) \bigg]. \end{multline*} Using detailed balance, this Hamiltonian is symmetric around $(-F)$; one can deal with the variational terms similar as above. Since~$\mathcal{H}(0) = 0$ and~$\mathcal{H}(p)$ is strictly convex, this means that the model predicts a positive force-velocity feedback, since~$F > 0$ implies~$\partial_p\mathcal{H}(0) > 0$, and~$F < 0$ implies~$\partial_p\mathcal{H}(0) < 0$. Establishing a similar result for systems not satisfying detailed balance would be interesting. \section{Proof of large deviations of switching processes} \label{section:LDP_switching_MP} In this section, we prove~Theorem~\ref{thm:results:LDP_switching_MP} (large deviations of switching processes) and Theorem~\ref{thm:results:action_integral_representation} (action-integral representation of the rate function). To do so, we exploit the connection of pathwise large deviations to Hamilton-Jacobi equations~\cite{FengKurtz2006}. In Section~\ref{appendix:LDP_via_CP}, we adapt of~\cite[Theorem~7.18]{FengKurtz2006} to our compact setting. Then we prove Theorem~\ref{thm:results:LDP_switching_MP} in Section~\ref{MM:sec:proof-LDP-switching-MP}, and Theorem~\ref{thm:results:action_integral_representation} in Section~\ref{section:action_integral}. \subsection{Pathwise large deviations via comparison principle} \label{appendix:LDP_via_CP} In the following definitions,~$E$ and~$E^\prime$ are compact metric spaces. In the examples of our note, the space $E$ corresponds to $\mathbb{T}^d$, and $E^\prime$ to the space of upscaled variables. In this section,~$\text{BUSC}(E),\text{BLSC}(E)$ denote the sets of bounded and upper (lower) semicontinuous functions on~$E$, and $\text{BLSC}(E)$ for the bounded and lower semicontinuous functions on~$E$. We adapt~\cite[Definition~7.1]{FengKurtz2006} to the compact setting. % % \begin{definition}[Viscosity solutions] Let $H \subseteq C(E) \times C(E\times E^\prime)$ be a multivalued operator with domain~$\mathcal{D}(H) \subseteq C(E)$. Let~$h\in C(E)$ and~$\tau>0$. \begin{itemize} \item[i)] $u_1\in \text{BUSC}(E)$ is a viscosity subsolution of $(1 - \tau H) u = h$ if for all $(f,g)\in H$ there exists a point $(x,z^\prime)\in E\times E^\prime$ such that % \[ (u_1-f)(x)=\sup(u_1-f)\quad\text{and}\quad u_1(x)-\tau g(x,z^\prime)-h(x)\leq 0. \] % \item[ii)] $u_2\in \text{BLSC}(E)$ is a viscosity supersolution of $(1 - \tau H) u = h$ if for all $(f,g)\in H$ there exists a point $(x,z^\prime)\in E\times E^\prime$ such that % \[ (f-u_2)(x)=\sup(f-u_2)\quad\text{and}\quad u_2(x)-\tau g(x, z^\prime)-h(x)\geq 0. \] % \item[iii)] $u_1\in\text{BUSC}(E)$ is a strong viscosity subsolution of $(1 - \tau H) u = h$ if for all $(f,g) \in H$ and $x\in E$, whenever % \[ (u_1-f)(x)=\sup(u_1-f), \] % then there exists a $z^\prime\in E^\prime$ such that % \[ u_1(x)-\tau g(x,z^\prime)-h(x)\leq 0. \] % Similarly for strong supersolutions. \end{itemize} % A function $u\in C(E)$ is called a viscosity solution of $(1 - \tau H) u = h$ if it is both a viscosity sub- and supersolution. \label{def:appendix:viscosity_solutions_multivalued_op} \end{definition} % % \begin{definition}[Comparison Principle]\quad\\ We say that the \emph{comparison principle} holds for viscosity sub- and supersolutions of~$(1-\tau H)u=h$ if for any viscosity subsolution~$u_1$ and viscosity supersolution~$u_2$, we have~$u_1\leq u_2$ on~$E$. \label{def:appendix:CP_single_valued_operator} \end{definition} In the following adaptation of~\cite[Theorem 7.18]{FengKurtz2006}, the compact Polish spaces $E_n$, $E$ and $E^\prime$ are related with continuous embeddings $\eta_n$ and $\eta_n^\prime$ by $$ \begin{tikzcd}[row sep = tiny] & E \times E^\prime \arrow[dd, "\mathrm{proj}_1"] \\ E_n \arrow[ur, "(\eta_n {,} \eta_n^\prime)"] \arrow[dr, "\eta_n"'] & \\ & E \end{tikzcd} $$ % such that for any $x \in E$, there exist $x_n \in E_n$ such that $\eta_n(x_n) \to x$ as $n \to \infty$. % \begin{theorem} Let $L_n$ be the generator of an $E_n$-valued process $Y^n$, and let $H_n$ be the nonlinear generators defined by $H_n f = \frac{1}{n} e^{-nf} L_n e^{nf}$. Let the compact Polish spaces $E_n, E$ and $E'$ be related as in the above diagram. In addition, suppose: \begin{enumerate}[(i)] \item(Condition 7.9 of \cite{FengKurtz2006} on the state spaces) There exists an index set $Q$ and approximating state spaces $A_n^q \subseteq E_n$, $q \in Q$, such that the following holds: % \begin{enumerate}[(a)] \item For $q_1, q_2 \in Q$, there exists $q_3 \in Q$ such that $A_n^{q_1} \cup A_n^{q_2} \subseteq A_n^{q_3}$. \item For each $x \in E$, there exists $q \in Q$ and $y_n \in A^q_n$ such that $\eta_n(y_n) \to x$ as $n \to \infty$. \item For each $q \in Q$, there exist compact sets $K_1^q \subseteq E$ and $K_2^q \subseteq E \times E^\prime$ such that % \[ \sup_{y \in A^q_n} \inf_{x \in K_1^q} d_E(\eta_n(y), x) \xrightarrow{n\to\infty} 0, \] and \[ \sup_{y \in A^q_n} \inf_{(x,z) \in K_2^q} \left[ d_E(\eta_n(y),x)) + d_{E'}(\eta_n'(y),z) \right] \xrightarrow{n\to\infty} 0. \] % \item For each compact $K \subseteq E$, there exists $q \in Q$ such that % $ K \subseteq \liminf \eta_n(A_n^q). $ % \end{enumerate} % \item (Convergence Condition 7.11 of \cite{FengKurtz2006}) There exist $H_\dagger, H_{\ddagger} \subseteq C(E) \times C(E \times E^\prime)$ which are the limit of the $H_n$'s in the following sense: \begin{enumerate}[(a)] \item For each $(f,g) \in H_\dagger$, there exist $f_n \in \mathcal{D}(H_n)$ such that \[ \sup_n \left( \sup_{x \in E_n} |f_n (x)| + \sup_{x \in E_n} |H_n f_n (x)| \right) < \infty, \] and for each $q\in Q$,~$\lim_{n \to \infty} \sup_{y \in A_n^q}|f_n(y) - f(\eta_n(y))| = 0.$ % % Furthermore, for each $q \in Q$ and every sequence $y_n \in A_n^q$ such that $\eta_n (y_n) \to x \in E$ and $\eta'_n(y_n) \to z^\prime \in E^\prime$, we have~$\limsup_{n \to \infty} H_n f_n (y_n) \leq g(x,z^\prime)$. \item For each $(f,g) \in H_\ddagger$, there exist $f_n \in \mathcal{D}(H_n)$ (not necessarily the same as above in (a)) such that \[ \sup_n \left( \sup_{x \in E_n} |f_n (x)| + \sup_{x \in E_n} |H_n f_n (x)| \right) < \infty, \] and for each $q\in Q$,~$\lim_{n \to \infty} \sup_{y \in A_n^q}|f_n(y) - f(\eta_n(y))| = 0$. % Furthermore, for each $q \in Q$ and every sequence $y_n \in E_n$ such that $\eta_n (y_n) \to x \in E$ and $\eta'_n(y_n) \to z^\prime \in E^\prime$, we have~$\liminf_{n \to \infty} H_n f_n (y_n) \geq g(x,z^\prime)$. % \end{enumerate} \item (Comparison principle) For each $h \in C(E)$ and $\tau > 0$, the comparison principle holds for viscosity subsolutions of $(1 - \tau H_\dagger) u = h$ and viscosity supersolutions of $(1 - \tau H_\ddagger) u = h$. \end{enumerate} % Let $X^n_t := \eta_n (Y^n_t)$ be the corresponding $E$-valued process. If $\{X^n(0)\}_{n \in \mathbb{N}}$ satisfies a large deviation principle in $E$ with rate function $\mathcal{I}_0 : E \to [0,\infty]$, then % $\{X^n\}_{n \in \mathbb{N}}$ satisfies the large deviation principle with rate function $\mathcal{I} : C_E[0,\infty) \to [0,\infty]$ given as in~\eqref{eq:RF-with-semigroup-approach} and~\eqref{BG:eq:RF-1d-marginals} of Chapter~2. \label{thm:appendix:LDP_via_CP:Jin_LDP_thm} \end{theorem} The formula for the rate function involves a limiting semigroup~$V(t)$, which we discuss in Chapter~2. We do not repeat its formula here, since we will not work with it. \subsection{Proof of large deviation principle} \label{MM:sec:proof-LDP-switching-MP} Here we prove Theorem~\ref{thm:results:LDP_switching_MP} by verifying the conditions of Theorem~\ref{thm:appendix:LDP_via_CP:Jin_LDP_thm}, which are convergence of nonlinear generators (Proposition~\ref{prop:LDP_switching_MP:convergence_condition_sufficient}) and the comparison principle (Proposition~\ref{prop:LDP_switching_MP:comparison_principle}). The rest of this section below the proof of Theorem~\ref{thm:results:LDP_switching_MP} is devoted to proving the propositions. We point out that the main challenge is to prove the comparison principle using~\ref{MM:item:T1} and~\ref{MM:item:T2}. \begin{proposition} In the setting of Theorem~\ref{thm:results:LDP_switching_MP}, Condition~(i) of Theorem~\ref{thm:appendix:LDP_via_CP:Jin_LDP_thm} is satisfied. Let $H \subseteq C^1(\mathbb{T}^d) \times C(\mathbb{T}^d \times E^\prime)$ be a multivalued operator satisfying~\ref{MM:item:T1}. Then~$H$ satisfies the convergence condition (ii) of Theorem \ref{thm:appendix:LDP_via_CP:Jin_LDP_thm}. \label{prop:LDP_switching_MP:convergence_condition_sufficient} \end{proposition} % % \begin{proposition} In the setting of~Theorem \ref{thm:results:LDP_switching_MP}, let $H \subseteq C^1(\mathbb{T}^d) \times C(\mathbb{T}^d \times E^\prime)$ be a multivalued operator satisfying conditions~\ref{MM:item:T1} and~\ref{MM:item:T2}. Then for $\tau > 0$ and $h \in C(\mathbb{T}^d)$, the comparison principle holds for viscosity sub- and supersolutions of % $ (1 - \tau H) u =h. $ % \label{prop:LDP_switching_MP:comparison_principle} \end{proposition} % \begin{proof}[Proof of Theorem \ref{thm:results:LDP_switching_MP}] By Proposition~\ref{prop:LDP_switching_MP:convergence_condition_sufficient}, conditions (i) and (ii) of Theorem~\ref{thm:appendix:LDP_via_CP:Jin_LDP_thm} hold with the single operator $H = H_\dagger = H_\ddagger$. By Proposition~\ref{prop:LDP_switching_MP:comparison_principle}, the comparison principle is satisfied for $(1 - \tau H)u = h$, and hence condition (iii) of Theorem~\ref{thm:appendix:LDP_via_CP:Jin_LDP_thm} holds with a single operator $H = H_\dagger = H_\ddagger$. Therefore the conditions of Theorem~\ref{thm:appendix:LDP_via_CP:Jin_LDP_thm} are satisfied, and the large deviation principle follows. \end{proof} \begin{proof}[Proof of Proposition \ref{prop:LDP_switching_MP:convergence_condition_sufficient}] Recall that with $E_\varepsilon = E_\varepsilon^X \times \{1,\dots,J\}$ and $\iota_\varepsilon : E^X_\varepsilon \to \mathbb{T}^d$ from Condition~\ref{condition:results:general_setting}, the state spaces are related as in the following diagram, in which $\eta_\varepsilon : E_\varepsilon \to \mathbb{T}^d$ is defined by $\eta_\varepsilon(x,i) = \iota_\varepsilon(x)$ and $\eta_\varepsilon' : E_\varepsilon \to E'$ is a continuous map, % $$ \begin{tikzcd}[row sep = tiny] & \mathbb{T}^d \times E^\prime \arrow[dd, "\mathrm{proj}_1"] \\ E_\varepsilon \arrow[ur, "(\eta_\varepsilon {,} \eta_\varepsilon^\prime)"] \arrow[dr, "\eta_\varepsilon"'] & \\ & \mathbb{T}^d \end{tikzcd} $$ % In the notation of Theorem \ref{thm:appendix:LDP_via_CP:Jin_LDP_thm}, we have $E = \mathbb{T}^d$. For verifying the general condition (i) of Theorem \ref{thm:appendix:LDP_via_CP:Jin_LDP_thm} on the approximating state spaces $A_\varepsilon^q$, we take the singleton $Q = \{q\}$ and set $A_\varepsilon^q := E_\varepsilon$. Then part (a) holds, and parts (b) and~(d) are a consequence of Condition~\ref{condition:results:general_setting} on $E_\varepsilon$, which says that for any $x \in \mathbb{T}^d$, there exist $ x_\varepsilon \in E_\varepsilon^X$ such that $\iota_\varepsilon(x_\varepsilon) \to x$. Part (c) follows by taking the compact sets $K_1^q := \mathbb{T}^d$ and $K_2^q := \mathbb{T}^d \times E^\prime$. \smallskip We verify the convergence Condition (ii) of Theorem \ref{thm:appendix:LDP_via_CP:Jin_LDP_thm}. By~\ref{MM:item:T1}, part~\ref{MM:item:C2}, there exist $f_\varepsilon \in \mathcal{D}(H_\varepsilon)$ such that % $$ \| f\circ\eta_\varepsilon - f_\varepsilon \|_{L^\infty(E_\varepsilon)} \xrightarrow{\varepsilon\to 0} 0 \quad\text{and}\quad \| H_{f,\varphi}\circ (\eta_\varepsilon, \eta_\varepsilon') - H_\varepsilon f_\varepsilon \|_{L^\infty(E_\varepsilon)} \xrightarrow{\varepsilon\to 0} 0. $$ % With these $f_\varepsilon$, both conditions (a) and (b) are simultaneously satisfied for the operator $H = H_\dagger = H_\ddagger$, where condition~\ref{MM:item:C1} guarantees that for any point $(x,z') \in \mathbb{T}^d \times E'$ there exist $y_\varepsilon \in E_\varepsilon$ such that both $\eta_\varepsilon(y_\varepsilon) \to x$ and $\eta_\varepsilon'(y_\varepsilon) \to z'$. The boundedness % $$ \sup_{\varepsilon > 0} \left( \sup_{y \in E_\varepsilon}|f_\varepsilon(y)| + \sup_{y \in E_\varepsilon}|H_\varepsilon f_\varepsilon(y)|\right) < \infty $$ follows the uniform-convergence condition~\ref{MM:item:C2} and compactness of~$E_\varepsilon$. \end{proof} For proving Proposition \ref{prop:LDP_switching_MP:comparison_principle}, we use two operators~$H_1,H_2$ that are derived from a multivalued limit $H$. Define~$H_1,H_2$ by \begin{equation*} H_1f(x) := \inf_{\varphi} \sup_{z^\prime \in E^\prime} H_{f, \varphi}(x,z^\prime) \quad\text{and}\quad H_2f(x) := \sup_{\varphi} \inf_{z^\prime \in E^\prime} H_{f, \varphi}(x,z^\prime), \end{equation*} with equal domains~$\mathcal{D}(H_1) = \mathcal{D}(H_2) := \mathcal{D}(H)$. Since the images of~$H$ are of the form $H_{f,\varphi}(x,z^\prime) = H_{\varphi}(\nabla f(x),z^\prime)$, the operators $H_1$ and $H_2$ are as well of the form $H_1 f(x) = \mathcal{H}_1(\nabla f(x))$ and $H_2 f(x) = \mathcal{H}_2(\nabla f(x))$, with two maps $\mathcal{H}_1,\mathcal{H}_2 : \mathbb{R}^d \rightarrow \mathbb{R}$. % We prove Proposition \ref{prop:LDP_switching_MP:comparison_principle} with the following Lemmas. \begin{lemma}[Local operators admit strong solutions] Let % $ H \subseteq C^1(\mathbb{T}^d) \times C(\mathbb{T}^d\times E^\prime) $ % be a multivalued limit operator satisfying (T1) from Theorem \ref{thm:results:LDP_switching_MP}. Then for any $\tau > 0$ and $h \in C(\mathbb{T}^d)$, viscosity solutions of % $ (1 - \tau H) u =h $ % coincide with strong viscosity solutions in the sense of Definition \ref{def:appendix:viscosity_solutions_multivalued_op}. \label{lemma:LDP_switching_MP:local_op_strong_sol} \end{lemma} % \begin{lemma}[$H_1$ and $H_2$ are viscosity extensions] Let $H$ be a multivalued operator satisfying~\ref{MM:item:T1} and~\ref{MM:item:T2} of Theorem~\ref{thm:results:LDP_switching_MP}. For all $h \in C(\mathbb{T}^d)$ and $\tau > 0$, strong viscosity subsolutions $u_1$ of % $ (1 - \tau H) u =h $ % are strong viscosity subsolutions of % $ (1 - \tau H_1) u =h, $ % and strong viscosity supersolutions $u_2$ of % $ (1 - \tau H) u = h $ % are strong viscosity supersolutions of % $ (1 - \tau H_2) u =h. $ % \label{lemma:LDP_switching_MP:H_to_H1-H2} \end{lemma} % \begin{lemma}[$H_1$ and $H_2$ are ordered] Let $H$ be a multivalued operator satisfying~\ref{MM:item:T1} and~\ref{MM:item:T2} of Theorem~\ref{thm:results:LDP_switching_MP}. Then~$\mathcal{H}_1(p)\leq \mathcal{H}_2(p)$ for all~$p\in\mathbb{R}^d$.. \label{lemma:LDP_switching_MP:H1_leq_H2} \end{lemma} % \begin{proof}[Proof of Proposition \ref{prop:LDP_switching_MP:comparison_principle}] Let $u_1$ be a subsolution and $u_2$ be a supersolution of the equation $(1 - \tau H)u = h$. By Lemma~\ref{lemma:LDP_switching_MP:local_op_strong_sol}, $u_1$ is a strong subsolution and $u_2$ a strong supersolution of $(1 - \tau H) u = h$, respectively. By Lemma~\ref{lemma:LDP_switching_MP:H_to_H1-H2}, $u_1$ is a strong subsolution of $(1 - \tau H_1) u = h$, and $u_2$ is a strong supersolution of $H_2$. \smallskip With that, we establish below the inequality % \begin{equation} \max_{\mathbb{T}^d} (u_1 - u_2) \leq \tau \left[ \mathcal{H}_1(p_\delta) - \mathcal{H}_2(p_\delta) \right] + h(x_\delta) - h(x_\delta^\prime), \label{eq:LDP_switching_MP:CP_visc_ineq} \end{equation} % with some $x_\delta, x_\delta^\prime \in \mathbb{T}^d$ such that $\text{dist}(x_\delta,x_\delta^\prime) \rightarrow 0$ as $\delta \rightarrow 0$, and certain $p_\delta \in \mathbb{R}^d$. Then using that $h\in C(\mathbb{T}^d)$ is uniformly continuous since~$\mathbb{T}^d$ is compact, and that $\mathcal{H}_1(p_\delta) \leq \mathcal{H}_2(p_\delta)$ by Lemma~\ref{lemma:LDP_switching_MP:H1_leq_H2}, we can further estimate as % $$ \max_{\mathbb{T}^d} (u_1 - u_2) \leq h(x_\delta) - h(x_\delta^\prime) \leq \omega_h(\text{dist}(x_\delta,x_\delta^\prime)), $$ % where $\omega_h : [0,\infty) \rightarrow [0,\infty)$ is a modulus of continuity satisfying $\omega_h(r_\delta) \rightarrow 0$ for $r_\delta \rightarrow 0$. Then $(u_1 - u_2) \leq 0$ follows by taking the limit $\delta \rightarrow 0$. \smallskip We are left with proving \eqref{eq:LDP_switching_MP:CP_visc_ineq}. The line of argument is similar to the one outlined at the end of Section~\ref{subsec:LDP-via-visc-sol} of Chapter~2. Define $\Phi_\delta : \mathbb{T}^d \times \mathbb{T}^d \rightarrow \mathbb{R}$ by % $$ \Phi_\delta(x,x^\prime) := u_1(x) - u_2(x^\prime) - \frac{\Psi(x,x^\prime)}{2 \delta}, $$ % where % \begin{equation} \Psi(x,x^\prime) := \sum_{j=1}^d \sin^2\left( \pi(x_j - x_j^\prime) \right), \qquad \text{ for all } x,x^\prime \in \mathbb{T}^d. \label{eq:LDP_switching_MP:dist_function_E} \end{equation} % Then $\Psi \geq 0$, and $\Psi(x,x^\prime) = 0$ holds if and only if $x = x^\prime$, and % \begin{equation} \nabla_1 \left[ \Psi(\cdot,x^\prime)\right](x) = - \nabla_2 \left[ \Psi(x,\cdot) \right](x^\prime) \qquad \text{ for all } x,x^\prime \in \mathbb{T}^d. \label{eq:LDP_switching_MP:dist_function_asymm_deriv} \end{equation} % By boundedness and upper semicontinuity of $u_1$ and $(-u_2)$, and compactness of $\mathbb{T}^d \times \mathbb{T}^d$, for each $\delta > 0$ there exists a pair $(x_\delta,x_\delta^\prime) \in \mathbb{T}^d \times \mathbb{T}^d$ such that $$ \Phi_\delta(x_\delta,x_\delta^\prime) = \max_{x,x^\prime} \Phi_\delta(x,x^\prime). $$ % Using~$\Phi_\delta(x_\delta, x_\delta) \leq \Phi(x_\delta,x_\delta^\prime)$ and boundedness of~$u_2$, we obtain % $$ \Psi(x_\delta,x_\delta^\prime) \leq 2\delta \left( u_2(x_\delta) - u_2(x_\delta^\prime) \right) \leq 4 \delta \|u_2\|_{L^\infty(\mathbb{T}^d)} = \mathcal{O}(\delta), $$ % hence~$\Psi(x_\delta,x_\delta^\prime) \rightarrow 0$ as~$\delta \rightarrow 0$. \smallskip In order to use the sub- and supersolution properties of $u_1$ and $u_2$, introduce the smooth test functions $f^\delta_1$ and $f^\delta_2$ as % $$ f_1^\delta(x) := u_2(x_\delta^\prime) + \frac{\Psi(x,x_\delta^\prime)}{2\delta} \quad \text{ and } \quad f_2^\delta(x^\prime) := u_1(x_\delta) - \frac{\Psi(x_\delta,x^\prime)}{2\delta}, $$ % Then $f_1^\delta, f_2^\delta \in C^\infty(\mathbb{T}^d) \subseteq \mathcal{D}(H)$ are both in the domain of $H$, and hence in the domain of $H_1$ and $H_2$, respectively. Furthermore, $(u_1 - f_1)$ has a maximum at $x = x_\delta$, and $(f_2 - u_2)$ has a maximum at $x^\prime = x_\delta^\prime$, by definition of $(x_\delta,x_\delta^\prime)$ and $\Phi_\delta$. Since $u_1$ is a strong subsolution of $(1 - \tau H_1) u = h$, % $$ u_1(x_\delta) - \tau H_1 f_1^\delta(x_\delta) - h(x_\delta) \leq 0, $$ % and since $u_2$ is a strong supersolution of $(1 - \tau H_2) u = h$, % $$ u_2(x_\delta^\prime) - \tau H_2 f_2^\delta(x_\delta^\prime) - h(x_\delta^\prime) \geq 0. $$ % Thereby, we can estimate $\max (u_1 - u_2)$ as % \begin{align*} \max_{\mathbb{T}^d}(u_1 - u_2) &\leq \Phi_\delta(x_\delta,x_\delta^\prime) \\ &\leq u_1(x_\delta) - u_2(x_\delta^\prime) \\ &\leq \tau \left[ H_1 f_1^\delta(x_\delta)) - H_2 f_2^\delta(x_\delta^\prime)\right] + h(x_\delta) - h(x_\delta^\prime) \\ &= \tau \left[ \mathcal{H}_1 (\nabla f_1^\delta(x_\delta)) - \mathcal{H}_2 (\nabla f_2^\delta(x_\delta^\prime))\right] + h(x_\delta) - h(x_\delta^\prime). \end{align*} % By \eqref{eq:LDP_switching_MP:dist_function_asymm_deriv}, % $ \nabla f_1^\delta(x_\delta) = \nabla f_2^\delta(x_\delta^\prime) =: p_\delta \in \mathbb{R}^d, $ % which establishes \eqref{eq:LDP_switching_MP:CP_visc_ineq}, and thereby finishes the proof. \end{proof} % The rest of the section, we prove Lemmas \ref{lemma:LDP_switching_MP:local_op_strong_sol}, \ref{lemma:LDP_switching_MP:H_to_H1-H2} and \ref{lemma:LDP_switching_MP:H1_leq_H2}. Regarding Lemma \ref{lemma:LDP_switching_MP:local_op_strong_sol}, a proof for single valued operators is given in~\cite[Lemma 9.9]{FengKurtz2006}. \begin{proof}[Proof of Lemma \ref{lemma:LDP_switching_MP:local_op_strong_sol}] Let $\tau>0$, $h\in C(\mathbb{T}^d)$. We verify that subsolutions are strong subsolutions. For a subsolution $u_1\in\text{BUSC}(\mathbb{T}^d)$ of $(1-\tau H)u=h$ and $(f,H_{f,\varphi}) \in H$, let $x\in \mathbb{T}^d$ be such that~$(u_1-f)(x)=\sup(u_1-f)$. The function~$\tilde{f}(x^\prime)=\Psi(x^\prime,x)$ with $\Psi(x^\prime,x)$ from~\eqref{eq:LDP_switching_MP:dist_function_E} is smooth and therefore in the domain $\mathcal{D}(H)$. Then $x$ is the unique maximal point of $(u_1-(f+\tilde{f}))$, % \[ (u_1-(f+\tilde{f}))(x)=\sup_{\mathbb{T}^d}(u_1-(f+\tilde{f})). \] % Since~$u_1$ is a subsolution, there exists at least one element $(x,z^\prime)\in \mathbb{T}^d\times E^\prime$ such that the subsolution inequality with test function~$f+\tilde{f}$ holds. Since $x$ is the only point maximising $u_1-(f+\tilde{f})$, the viscosity-subsolution inequality with test function $(f+\tilde{f})$ holds for the point $x\in \mathbb{T}^d$ and some point $z^\prime\in E^\prime$: % \[ u_1(x)-\tau H_{f+\tilde{f},\varphi}(x,z^\prime)-h(x)\leq 0. \] Since~$\nabla\tilde{f}(x)=0$ and~$H$ depends only on gradients by~\ref{MM:item:T1}, we obtain % \[ H_{f+\tilde{f},\varphi}(x,z^\prime) = H_{\varphi}\left((\nabla f+\nabla \tilde{f})(x),z^\prime\right) = H_{\varphi}(\nabla f(x),z^\prime) = H_{f,\varphi}(x,z^\prime). \] Hence the same point~$(x,z')$ satisfies % \[ u_1(x)-\tau H_{f,\varphi}(x,z^\prime)-h(x)\leq 0. \] % Thus~$u_1$ is a strong subsolution. The argument is similar for the supersolution case, where one can use $(-\tilde{f})$. \smallskip Vice versa, when given a strong sub- or supersolution $u_1$ or $u_2$, for every $f\in\mathcal{D}(H)$, $(u_1-f)$ and $(f-u_2)$ attain their suprema at some $x_1,x_2\in \mathbb{T}^d$ due to the continuity assumptions on the domain of $H$, the half continuity properties of $u_1$ and $u_2$, and compactness of $\mathbb{T}^d$. By the strong solution properties, the sub- and supersolution inequalities follow. % \end{proof} % % \begin{proof}[Proof of Lemma \ref{lemma:LDP_switching_MP:H_to_H1-H2}] Let $u_1\in\text{BUSC}(\mathbb{T}^d)$ be a strong subsolution of~$(1-\tau H)u=h$, that is for any $(f,H_{f, \varphi})\in\tilde{H}$, if~$(u_1-f)(x)=\sup(u_1-f)$ for a point~$x\in \mathbb{T}^d$, then there exists~$z^\prime\in E^\prime$ such that % $$ u_1(x)-\tau H_{f, \varphi}(x,z^\prime)-h(x)\leq 0. $$ % Let $f\in\mathcal{D}(H_1)=\mathcal{D}(H)$ and $x\in \mathbb{T}^d$ be such that $(u_1-f)(x)=\sup(u_1-f)$. For any $\varphi$ there exists a point $z^\prime\in E^\prime$ such that the above subsolution inequality holds. Therefore for all~$x$, % $$ u_1(x)-h(x) \leq \tau\sup_{z^\prime\in E^\prime} H_{f, \varphi}(x,z^\prime). $$ % Since the point $x\in \mathbb{T}^d$ is independent of $\varphi$, we obtain % \[ u_1(x)-H_1f(x)-h(x)\overset{\text{def}}{=} u_1(x)-\tau\inf_{\varphi}\sup_{z^\prime \in E^\prime} H_{f, \varphi}(x,z^\prime)-h(x)\leq 0. \] % The argument is similar for supersolutions. \end{proof} % % \begin{proof}[Proof of Lemma \ref{lemma:LDP_switching_MP:H1_leq_H2}] By~\ref{MM:item:T2},~\ref{MM:item:C3}, for every $p\in\mathbb{R}^d$ there exists a $\varphi_p\in C(E^\prime)$ such that for all $z^\prime\in E^\prime$, % \[ H_{\varphi_p}(p,z^\prime)=\mathcal{H}(p). \] % Thus % \[ \sup_{z^\prime \in E^\prime} H_{\varphi_p}(p,z^\prime) = \mathcal{H}(p) = \inf_{z^\prime\in E^\prime}H_{\varphi_p}(p, z^\prime). \] Taking the infimum and supremum over~$\varphi$, we find % \begin{align*} \mathcal{H}_1(p) &= \inf_{\varphi}\sup_{z^\prime}H_{\varphi}(p,z^\prime)\\ &\leq \sup_{z^\prime}H_{\varphi_p}(p,z^\prime) = \mathcal{H}(p) =\inf_{z^\prime}H_{\varphi_p}(p,z^\prime)\\ &\leq \sup_{\varphi}\inf_{z^\prime}H_{\varphi}(p,z^\prime) = \mathcal{H}_2(p), \end{align*} which finishes the proof. \end{proof} \subsection{Proof of action-integral representation} \label{section:action_integral} In this section, we first prove Theorem~\ref{thm:results:action_integral_representation} by means of Proposition~\ref{prop:action_integral:bold_H} below. The rest of the section is then devoted to proving Proposition~\ref{prop:action_integral:bold_H}. % % \begin{proposition} Under the same assumptions of Theorems~\ref{thm:results:LDP_switching_MP} and~\ref{thm:results:action_integral_representation}, define the operator $\mathbf{H} : \mathcal{D}(\mathbf{H}) \subseteq C^1(\mathbb{T}^d) \to C(\mathbb{T}^d)$ on the domain $\mathcal{D}(\mathbf{H}) = \mathcal{D}(H)$ by setting $\mathbf{H} f(x) := \mathcal{H}(\nabla f(x))$. Then: % \begin{enumerate}[(i)] \item The Legendre-Fenchel transform $\mathcal{L}(v) := \sup_{p \in \mathbb{R}^d} (p\cdot v - \mathcal{H}(p))$ and the operator $\mathbf{H}$ satisfy Conditions 8.9, 8.10 and 8.11 of \cite{FengKurtz2006}. % \item For all $\tau > 0$ and $h \in C(\mathbb{T}^d)$, the comparison principle holds for % $ (1 - \tau \mathbf{H}) u = h. $ % \item For all $\tau > 0$ and $h \in C(\mathbb{T}^d)$, viscosity solutions of $(1 - \tau H) u = h$ are also viscosity solutions of $(1 - \tau \mathbf{H}) u = h$. % \end{enumerate} \label{prop:action_integral:bold_H} \end{proposition} % \begin{proof}[Proof of Theorem \ref{thm:results:action_integral_representation}] Let $V(t) : C(\mathbb{T}^d) \to C(\mathbb{T}^d)$ be the semigroup $$ V(t) = \lim_{m \to \infty} \left[ \left( 1 - \frac{t}{m} H \right)^{-1} \right]^m, $$ % where the resolvant $(1 - \tau H)^{-1}$ is defined by means of unique viscosity solutions to the equation $(1 - \tau H) u = h$, and the limit is made precise in Theorem 6.13, (d), of \cite{FengKurtz2006}. Furthermore, let $V_{\mathrm{NS}}(t) : C(\mathbb{T}^d) \to C(\mathbb{T}^d)$ be the Nisio semigroup with cost function $\mathcal{L}$, that is $V_{\mathrm{NS}}(t)$ is defined as % $$ V_{\text{NS}}(t) f(x) = \sup_{ \substack{ \gamma \in \mathrm{AC}_{\mathbb{T}^d}[0,\infty) \\ \gamma(0) = x}} \left[ f(\gamma(t)) - \int_0^t \mathcal{L}(\dot{\gamma}(s)) \, \mathrm{d} s \right], $$ % where $\mathrm{AC}_{\mathbb{T}^d}[0,\infty)$ denotes the set of absolutely continuous paths in the torus. In Definition 8.1 and Equation 8.10 in \cite{FengKurtz2006}, relaxed controls are considered in order to cover a general class of possible cost functions. Since the Legendre-Fenchel transform $\mathcal{L}(v)$ is convex, it follows that $V_{\mathrm{NS}}(t)$ equals the semigroup given in 8.10 of \cite{FengKurtz2006} by using that $\lambda_s = \delta_{\dot{x}(s)}$ is an admissible control, and by applying Jensen's inequality, an argument that is given for example in Theorem 10.22 in \cite{FengKurtz2006}. Below we prove that $V(t) = V_{\mathrm{NS}}(t)$; by Theorem 8.14 in \cite{FengKurtz2006}, if $V(t) = V_{\mathrm{NS}}(t)$ on $C(\mathbb{T}^d)$, then the rate function of our Theorem~\ref{thm:results:LDP_switching_MP} satisfies the control representation 8.18 of \cite{FengKurtz2006}. The action-integral representation follows by again applying Jensen's inequality. \smallskip It remains to prove that $V(t) = V_{\mathrm{NS}}(t)$. By (i) and (ii) of Proposition \ref{prop:action_integral:bold_H}, the Conditions of~\cite[Theorem 8.27]{FengKurtz2006} are satisfied, so that we have $V_{\mathrm{NS}}(t) = \mathbf{V}(t)$, where $\mathbf{V}(t)$ is generated by means of unique viscosity solutions to the equation $(1- \tau \mathbf{H}) u = h$ as shown in~\cite[Theorem 8.27]{FengKurtz2006}, that is % $$ \mathbf{V}(t) = \lim_{m \to \infty} \left[ \left( 1 - \frac{t}{m} \mathbf{H} \right)^{-1} \right]^m. $$ % Part (iii) of Proposition \ref{prop:action_integral:bold_H} implies by Corollary 8.29 of \cite{FengKurtz2006} that $V(t) = \mathbf{V}(t)$. \end{proof} \begin{proof}[Proof of (i) in Proposition \ref{prop:action_integral:bold_H}] % We first show that the following conditions imply Conditions 8.9, 8.10 and 8.11 of \cite{FengKurtz2006}, which are formulated in order to cover a more general and non-compact setting. % \begin{enumerate}[(i)] % \item The function $\mathcal{L}:\mathbb{R}^d\rightarrow[0,\infty]$ is lower semicontinuous and for every $C \geq 0$, the level set % $ \{v\in \mathbb{R}^d\,:\,\mathcal{L}(v)\leq C\} $ % is relatively compact in $\mathbb{R}^d$. % \item For all $f\in\mathcal{D}(H)$ there exists a right continuous, nondecreasing function $\psi_f:[0,\infty)\rightarrow[0,\infty)$ such that for all $(x_0,v)\in \mathbb{T}^d \times \mathbb{R}^d$, % \[ |\nabla f(x_0)\cdot v|\leq \psi_f(\mathcal{L}(v))\qquad \text{and} \qquad \lim_{r\rightarrow\infty}\frac{\psi_f(r)}{r}=0. \] % \item For each $x_0\in E$ and every $f\in\mathcal{D}(\mathbf{H})$, there exists an absolutely continuous path $x : [0,\infty) \to \mathbb{T}^d$ such that % \begin{equation} \int_0^t \mathcal{H}(\nabla f (x(s))) \, ds = \int_0^t \left[ \nabla f(x(s)) \cdot \dot{x}(s) - \mathcal{L}(\dot{x}(s)) \right] \, ds. \label{eq:action_integral:optimal_path_for_H} \end{equation} % \end{enumerate} % Then regarding Condition 8.9 of \cite{FengKurtz2006}, the operator $A f(x,v) := \nabla f(x) \cdot v$ on the domain $\mathcal{D}(A) = \mathcal{D}(H)$ satisfies (1). For (2), we can take $\Gamma = \mathbb{T}^d \times \mathbb{R}^d$, and for $x_0 \in \mathbb{T}^d$, take the pair $(x,\lambda)$ with $x(t) = x_0$ and $\lambda(dv \times dt) = \delta_{0} (dv) \times dt$. Part (3) is a consequence of the above Item~(i). Part (4) follows since $\mathbb{T}^d$ is compact. Part (5) is implied by the above Item~(ii). Condition~8.10 is implied by Condition~8.11 and the fact that $\mathbf{H}1 = 0$, see Remark 8.12 (e) in \cite{FengKurtz2006}. Finally, Condition~8.11 is implied by the above Item~(iii), with the control $\lambda(dv \times dt) = \delta_{\dot{x}(t)}(dv) \times dt$. \smallskip We turn to verifying (i), (ii) and (iii). Since $\mathcal{H}(0) = 0$, we have $\mathcal{L} \geq 0$. The Legendre-transform $\mathcal{L}$ is convex, and lower semicontinuous since the map $\mathcal{H}(p)$ is convex and finite-valued, hence in particular continuous. For $C \geq 0$, we prove that the set $\{v\in\mathbb{R}^d\,:\,\mathcal{L}(v)\leq C\}$ is bounded, and hence is relatively compact. For any $p \in \mathbb{R}^d$ and $v \in \mathbb{R}^d$, we have $p \cdot v\leq \mathcal{L}(v) + \mathcal{H}(p)$. Thereby, if $\mathcal{L}(v)\leq C$, then % $ |v| = \sup_{|p|=1} p \cdot v \leq \sup_{|p|=1} \left[ \mathcal{L}(v) + \mathcal{H}(p) \right] \leq C + C_1, $ % where $C_1$ exists due to continuity of $\mathcal{H}$. Then for $R := C + C_1$, % $ \{ v \, : \, \mathcal{L}(v) \leq C \} \subseteq \{ v \, : \, |v| \leq R\}, $ % thus $\{\mathcal{L}\leq C\}$ is a bounded subset in $\mathbb{R}^d$. % \smallskip Item~(ii) can be proven as in~\cite[Lemma 10.21]{FengKurtz2006}. We finish the proof by verifying (iii). This is shown for instance in~\cite[Lemma 3.2.3]{Kraaij2016} under the assumption of continuous differentiability of $\mathcal{H}(p)$, by solving a differential equation with a globally bounded vectorfield. Here, we verify (iii) under the milder assumption of convexity of $\mathcal{H}(p)$ by solving a suitable subdifferential equation. For $p_0 \in \mathbb{R}^d$, define the subdifferential $\partial \mathcal{H}(p_0)$ at $p_0$ as the set % $$ \partial \mathcal{H}(p_0) := \{\xi \in \mathbb{R}^d \; | \; \forall p \in \mathbb{R}^d\;: \mathcal{H}(p) \geq \mathcal{H}(p_0) + \langle \xi, p - p_0\rangle\}. $$ % We shall solve for any $f \in C^1(\mathbb{T}^d)$ the subdifferential equation~$\dot{x} \in \partial \mathcal{H}(\nabla f(x))$. This means we show that for any initial condition~$x_0\in \mathbb{T}^d$, there exists an absolutely continuous path $x:[0,\infty)\rightarrow \mathbb{T}^d$ satisfying both~$x(0)=x_0$ and~$\dot{x}(t) \in \partial \mathcal{H}(\nabla f(x(t)))$ almost everywhere on $[0,\infty)$. Then \eqref{eq:action_integral:optimal_path_for_H} follows by noting that % $ \mathcal{H}(\nabla f(y))\geq \nabla f(y)\cdot v-\mathcal{L}(v) $ % for all $y \in \mathbb{T}^d$ and $v \in \mathbb{R}^d$, by convex duality. In particular, % $ \mathcal{H}(\nabla f(x(s)))\geq \nabla f(x(s))\cdot \dot{x}(s)-\mathcal{L}(\dot{x}(s)), $ % and integrating gives one inequality in \eqref{eq:action_integral:optimal_path_for_H}. Regarding the other inequality, since $\dot{x}\in\partial \mathcal{H}(\nabla f(x))$, we know that for almost every $t \in [0,\infty)$ and for all $p\in\mathbb{R}^d$, we have % $ \mathcal{H}(p) \geq \mathcal{H}(\nabla f(x(t)))+\dot{x}(t)\cdot(p-\nabla f(x(t))). $ % Therefore, a.e. on $[0,\infty)$, \begin{align*} \mathcal{H}(\nabla f(x(t))) &\leq \nabla f(x(t))\cdot\dot{x}(t)-\sup_{p\in\mathbb{R}^d}\left[p\cdot \dot{x}(t)-\mathcal{H}(p)\right] \\&= \nabla f(x(t))\cdot\dot{x}(t)-\mathcal{L}(\dot{x}(t)), \end{align*} and integrating gives the other inequality. \smallskip For solving the subdifferential equation, define $F: \mathbb{R}^d \to 2^{ \mathbb{R}^d}$ by $F(x):=\partial \mathcal{H}(\nabla f(x))$, where the function $f \in C^1(\mathbb{T}^d)$ is regarded as a periodic function on $\mathbb{R}^d$. We apply Lemma 5.1 in \cite{De92} for solving $\dot{x}\in F(x)$. The conditions of Lemma 5.1 in the case of $\mathbb{R}^d$ are satisfied if the following holds: $\sup_{x \in \mathbb{R}^d} \|F(x)\|_{\text{sup}}$ is finite, for all $x\in \mathbb{R}^d$, the set $F(x)$ is non-empty, closed and convex, and the map $x\mapsto F(x)$ is upper semicontinuous. \smallskip For $\xi \in F(x)$, note that for all $p\in\mathbb{R}^d$ % $ \xi \cdot (p-\nabla f(x))\leq \mathcal{H}(p)-\mathcal{H}(\nabla f(x)) $. % Therefore, by shifting $p=p^\prime+\nabla f(x)$, we obtain for all $p^\prime\in\mathbb{R}^d$ that % $ \xi \cdot p^\prime\leq \mathcal{H}(p^\prime+\nabla f(x))-\mathcal{H}(\nabla f(x)) $. % By continuous differentiability and periodicity of~$f$, and continuity of~$\mathcal{H}$, the right-hand side is bounded in $x$, and we obtain % \begin{align*} \sup_{x \in \mathbb{R}^d} \sup_{\xi \in F(x)}|\xi| &= \sup_{x \in \mathbb{R}^d} \sup_{\xi \in F(x)} \sup_{|p^\prime| = 1} \xi \cdot p^\prime\\ &\leq \sup_{x \in \mathbb{R}^d} \sup_{\xi \in F(x)} \sup_{|p^\prime|=1}\left[\mathcal{H}(p^\prime+\nabla f(x))-\mathcal{H}(\nabla f(x))\right] < \infty. \end{align*} For any $x \in \mathbb{R}^d$, the set $F(x)$ is non-empty, since the subdifferential of a proper convex function $\mathcal{H}(\cdot)$ is nonempty at points where $\mathcal{H}(\cdot)$ is finite and continuous~\cite{rockafellar1966characterization}. Furthermore, $F(x)$ is convex and closed, which follows from the properties of a subdifferential set. \smallskip Regarding upper semicontinuity, recall the definition from \cite{De92}: the map $F:\mathbb{R}^d \to 2^{\mathbb{R}^d} \setminus \{\emptyset\}$ is upper semicontinuous if for all closed sets $A\subseteq\mathbb{R}^d$, the set $F^{-1}(A)\subseteq \mathbb{R}^d$ is closed, where % $ F^{-1}(A)=\{x\in \mathbb{R}^d\;|\;F(x)\cap A\neq\emptyset\}. $ % Let $A\subseteq\mathbb{R}^d$ be closed and $x_n\rightarrow x$ in $\mathbb{R}^d$, with $x_n\in F^{-1}(A)$. That means for all $n\in\mathbb{N}$ that the sets % $ \partial \mathcal{H}(\nabla f(x_n))\cap A $ % are non-empty, and consequently, there exists a sequence $\xi_n \in F(x_n)\cap A$. We proved above that the set $F(y)\cap A$ is uniformly bounded in $y \in \mathbb{R}^d$. Hence the sequence~$\xi_n$ is bounded, and passing to a subsequence if necessary, it converges to some~$\xi$. By definition of $F(x_n)$, for all $p\in\mathbb{R}^d$, % \begin{align*} \xi_n(p-\nabla f(x_n)) \leq \mathcal{H}(p)-\mathcal{H}(\nabla f(x_n)). \end{align*} % Passing to the limit, we obtain that for all $p \in \mathbb{R}^d$, % $$ \xi (p-\nabla f(x)) \leq \mathcal{H}(p)-\mathcal{H}(\nabla f(x)). $$ % This implies by definition that $\xi\in\partial \mathcal{H}(\nabla f(x))$. Since $\xi_n\in A$ and $A$ is closed, we have $\xi\in A$. Hence $x\in F^{-1}(A)$, and $F^{-1}(A)$ is indeed closed. \end{proof} % % \begin{proof}[Proof of (ii) in Proposition \ref{prop:action_integral:bold_H}] The comparison principle for the operator $\mathbf{H}$ follows from the fact that~$\mathbf{H}f=\mathcal{H}(\nabla f)$ depends on~$x$ only via gradients. Indeed, for subsolutions $u_1$ and supersolutions $u_2$ of $(1-\tau \mathbf{H})u =h $, we have % $ \max(u_1-u_2) \leq \tau [\mathcal{H} \left( \nabla f_1(x_\delta) \right) - \mathcal{H}\left(\nabla f_2(x_\delta^\prime)\right)] + h(x_\delta)-h(x_\delta^\prime), $ % with test functions $f_1,f_2\in\mathcal{D}(H)$ satisfying $ \nabla f_1(x_\delta) = \nabla f_2(x_\delta^\prime), $ % and~$\text{dist}(x_\delta,x_\delta^\prime)\rightarrow 0$ as~$\delta \to 0$. Therefore $\mathcal{H}\left(\nabla f_1(x_\delta)\right)-\mathcal{H}\left(\nabla f_2(x_\delta^\prime)\right) = 0$, and~$\max(u_1-u_2)\leq 0$ follows by taking the limit $\delta\rightarrow 0$. \end{proof} % \begin{proof}[Proof of (iii) in Proposition \ref{prop:action_integral:bold_H}] Let $u \in C(\mathbb{T}^d)$ be a viscosity solution of the equation~$(1 - \tau H) u = h$. By Lemmas~\ref{lemma:LDP_switching_MP:local_op_strong_sol} and~\ref{lemma:LDP_switching_MP:H_to_H1-H2}, $u$ is a strong viscosity subsolution of $(1 - \tau H_1) u = h$ and a strong viscosity supersolution of $(1- \tau H_2) u = h$. In the proof of Lemma~\ref{lemma:LDP_switching_MP:H1_leq_H2} we obtained $\mathcal{H}_1 \leq \mathcal{H} \leq \mathcal{H}_2$, which in particular implies the inequalities % $ - H_1 \geq -\mathbf{H} \geq -H_2. $ % With that, we find that $u$ is both a strong viscosity sub- and supersolution of $(1 - \tau \mathbf{H}) u = h$. \end{proof} \section{Proofs of large deviations for molecular motors} \sectionmark{LDP for molecular motors} \label{section:LDP_in_MM} In this section, we prove the theorems of Section \ref{subsection:results:LDP_in_MM} about the stochastic processes motivated by molecular-motor systems. The proofs regarding the continuous model (Theorems~\ref{thm:results:LDP_cont_MM_Limit_I} and~\ref{thm:results:LDP_cont_MM_Limit_II}) are collected in Section~\ref{subsection:cont_MM}, and regarding the discrete model (Theorems~\ref{thm:results:LDP_cont_MM_Limit_I} and~\ref{thm:results:LDP_cont_MM_Limit_II}) in Section~\ref{subsection:discr_MM}. In each proof we verify the conditions of the general theorems for switching Markov processes (Theorems~\ref{thm:results:LDP_switching_MP} and~\ref{thm:results:action_integral_representation}). Finally, we prove in Section~\ref{subsection:detailed_balance} the representation of Hamiltonians~$\mathcal{H}(p)$ that we use to prove symmetry under the detailed balance condition. \subsection{Proof for the continuous models} \label{subsection:cont_MM} In this section, we consider the stochastic process $(X^\varepsilon_t, I^\varepsilon_t)$ of Defintion~\ref{def:intro:cont_MM} and prove Theorems~\ref{thm:results:LDP_cont_MM_Limit_I} and \ref{thm:results:LDP_cont_MM_Limit_II}. The generator~$L_\varepsilon$ is given by \begin{multline*} L_\varepsilon f(x,i)= \varepsilon \frac{1}{2} \Delta_x f(\cdot,i) (x) +b^i(x/\varepsilon) \cdot \nabla_x f(\cdot,i) (x)\\ + \sum_{j = 1}^J \frac{1}{\varepsilon} \gamma(\varepsilon) r_{ij}(x/\varepsilon) \left[ f(x,j) - f(x,i) \right], \end{multline*} with state space $E_\varepsilon = \mathbb{T}^d \times \{1,\dots, J\} = \{(x,i)\}$, drifts $b^i \in C^\infty(\mathbb{T}^d)$, jump rates $r_{ij} \in C^\infty(\mathbb{T}^d;[0,\infty))$, and~$\gamma(\varepsilon)>0$. We frequently write $f(x,i) = f^i(x)$. The nonlinear generators defined by~$H_\varepsilon f = \varepsilon e^{-f / \varepsilon} L_\varepsilon e^{f(\cdot) / \varepsilon}$ are given by \begin{multline}\label{eq:LDP_MM:cont:H_varepsilon} H_\varepsilon f(x,i)= \frac{\varepsilon}{2} \Delta_x f^i(x)+\frac{1}{2}|\nabla_x f^i(x)|^2+b^i\left(x/\varepsilon\right)\nabla_x f^i(x) \\+ \gamma(\varepsilon) \sum_{j=1}^J r_{ij}\left(x/\varepsilon\right) \left[ e^{ \left(f(x,j)-f(x,i)\right) / \varepsilon}-1 \right]. \end{multline} \subsubsection{Proof of Theorem \ref{thm:results:LDP_cont_MM_Limit_I}} \label{subsubsection:LDP_cont_MM_Limit_I} \begin{proof}[Verification of~\ref{MM:item:T1} of Theorem \ref{thm:results:LDP_switching_MP}] With~$f_\varepsilon(x,i)=f(x)+\varepsilon\,\varphi\left(x/\varepsilon, i\right))$, we find \begin{multline*} H_\varepsilon f_\varepsilon(x,i) = \frac{\varepsilon}{2}\Delta f(x) + \frac{1}{2}\Delta_y\varphi^i\left(x/\varepsilon\right) + \frac{1}{2}\big|\nabla f(x)+\nabla_y\varphi^i\left(x/\varepsilon\right)\big|^2 \\+ b^i\left(x/\varepsilon\right)\left(\nabla f(x)+\nabla_y\varphi^i\left(x/\varepsilon\right)\right) \\ + \sum_{j = 1}^J r_{ij}\left(x/\varepsilon\right) \left[ e^{\varphi\left(x/\varepsilon, j\right)-\varphi\left(x/\varepsilon, i\right)}-1 \right], \end{multline*} % where $\nabla_y$ and $\Delta_y$ denote the gradient and Laplacian with respect to the variable $y = x/\varepsilon$. The only term of order $\varepsilon$ that remains is $\varepsilon\,\Delta f(x)/2$. This suggests to take the remainder terms as the definition of the multivalued operator $H$. In the notation of Theorem \ref{thm:results:LDP_switching_MP}, we choose $E^\prime = \mathbb{T}^d \times\{1,\dots,J\}$ as the state space of the macroscopic variables, and define \begin{align}\label{MM:eq:limit-H-proof-cont-MM-model} H:= \left\{ (f, H_{f,\varphi}) \, : \, f \in C^2(\mathbb{T}^d), \; H_{f, \varphi} \in C(\mathbb{T}^d \times E^\prime) \text{ and } \varphi \in C^2(E^\prime) \right\}. \end{align} In $H$, the image functions $H_{f,\varphi} : \mathbb{T}^d \times E^\prime \to \mathbb{R}$ are defined by % \begin{multline} H_{f,\varphi}(x,y,i) := \frac{1}{2}\Delta_y\varphi^i(y) + \frac{1}{2} \big|\nabla f(x)+\nabla_y\varphi^i(y) \big|^2 +b^i(y)(\nabla f(x) + \nabla_y\varphi^i(y)) \\+ \sum_{j = 1}^J r_{ij}(y)\left[e^{\varphi(y, j)-\varphi(y, i)}-1\right], \label{eq:LDP_MM:contI:limit_op_H} \end{multline} % where we write $\varphi = (\varphi^1, \dots, \varphi^J)$ via the identification $C^2(E^\prime) \simeq (C^2(\mathbb{T}^d))^J$. Define the maps $\eta_\varepsilon^\prime:E_\varepsilon \to E^\prime$ by $\eta_\varepsilon^\prime(x,i) := (x/\varepsilon,i)$, and recall that $\eta_\varepsilon(x,i) := x$ are projections $\eta_\varepsilon:E_\varepsilon\to \mathbb{T}^d$. \smallskip We now verify~\ref{MM:item:C1},~\ref{MM:item:C2} and~\ref{MM:item:C3} of~\ref{MM:item:T1}. For~\ref{MM:item:C1}, for any $(x,y,i) \in \mathbb{T}^d \times E^\prime$, we search for elements $(y_\varepsilon,i_\varepsilon) \in \mathbb{T}^d \times \{1,\dots,J\}$ such that both $\eta_\varepsilon(y_\varepsilon,i_\varepsilon) \to x$ and $\eta_\varepsilon^\prime(y_\varepsilon,i_\varepsilon) \to (y,i)$ as $\varepsilon \to 0$. The point $y_\varepsilon := x + \varepsilon(y - x)$ satisfies $y_\varepsilon \to x$ and $y_\varepsilon / \varepsilon = y$, since $x / \varepsilon = x$ in $\mathbb{T}^d$. Therefore,~\ref{MM:item:C1} holds with $y_\varepsilon = x + \varepsilon(y-x)$ and $i_\varepsilon = i$. Regarding~\ref{MM:item:C2}, let $(f, H_{f,\varphi}) \in H$. Then the function~$f_\varepsilon$ defined by $f_\varepsilon(x,i):=f(x)+\varepsilon\,\varphi\left(x/\varepsilon, i\right)$ satisfies % $$ \|f\circ\eta_\varepsilon-f_\varepsilon\|_{L^\infty(E_\varepsilon)} = \sup_{(x,i)\in E_\varepsilon}|f(x)-f_\varepsilon(x,i)| = \varepsilon\cdot \|\varphi \|_{L^\infty(E_\varepsilon)}\xrightarrow{\varepsilon\rightarrow 0}0, $$ and % \begin{align*} \|H_{f,\varphi}\circ\eta_\varepsilon^\prime-H_\varepsilon f_\varepsilon\|_{L^\infty(E_\varepsilon)} &= \sup_{(x,i)\in E_\varepsilon}|H_{f,\varphi}(x,x/\varepsilon,i)-H_\varepsilon f_\varepsilon(x,i)|\\ &= \frac{\varepsilon}{2}\;\sup_{(x,i)\in E_\varepsilon}|\;\Delta f(x)|\leq \varepsilon \frac{1}{2}\sup|\Delta f| \xrightarrow{\varepsilon\rightarrow 0}0. \end{align*} % Item~\ref{MM:item:C3}, the fact that the images $H_{f,\varphi}$ depend on $x$ only via the gradients of $f$, can be recognized in~\eqref{eq:LDP_MM:contI:limit_op_H}. \end{proof} % % \begin{proof}[Verification of (T2) of Theorem \ref{thm:results:LDP_switching_MP}] % Let $f$ be a function in $\mathcal{D}(H)=C^2(\mathbb{T}^d)$ and $x\in \mathbb{T}^d$. We establish the existence of a vector function $\varphi=(\varphi^1,\dots,\varphi^J)\in (C^2(\mathbb{T}^d))^J$ such that for all $(y,i) \in E^\prime = \mathbb{T}^d \times \{1,\dots,J\}$ and some constant $\mathcal{H}(\nabla f(x)) \in \mathbb{R}$, we have % $$ H_\varphi(\nabla f(x),y,i) = \mathcal{H}(\nabla f(x)). $$ For the flat torus $E = \mathbb{T}^d$, this means that for fixed $\nabla f(x)=p\in\mathbb{R}^d$, we search for a vector function $\varphi_p$ such that $\tilde{H}_{\varphi_p}(p,y,i) = \mathcal{H}(p)$ becomes independent of the variables $(y,i)\in E^\prime$. We can find this vector function by solving a principal eigenvalue problem. We prove Item~\ref{MM:item:T2} with the following Lemma. \begin{lemma} Let $E^\prime = \mathbb{T}^d \times \{1, \dots, J\}$ and $H$ be the limit operator~\eqref{MM:eq:limit-H-proof-cont-MM-model}. Then: \begin{enumerate}[(a)] \item For $f \in \mathcal{D}(H)$, the limiting images $H_{\varphi}(\nabla f(x),y,i)$ are of the form % \[ H_\varphi(\nabla f(x) , y, i) = e^{-\varphi(y,i)} \left[ (B_p + V_p + R)e^{\varphi} \right] (y,i), \] % with $ p = \nabla f(x) \in\mathbb{R}^d$, and operators $B_p, V_p, R : C^2(E^\prime) \rightarrow C(E^\prime)$ defined as % \begin{align*} (B_p h)(y,i) &:= \frac{1}{2} \Delta_y h(y,i) + \left( p +b^i(y)\right)\cdot \nabla_y h(y,i) \\ (V_p h)(y,i) &:= \left(\frac{1}{2} p^2 + p\cdot b^i(y)\right) h(y,i), \\ (R\,h)(y,i) &:= \sum_{j = 1}^J r_{ij}(y) \left[h(y,j) - h(y,i)\right]. \end{align*} % \item For any $p \in \mathbb{R}^d$, there exists an eigenfunction $g_p = (g_p^1,\dots, g_p^J) \in (C^2(\mathbb{T}^d))^J$ with strictly positive component functions, $g^i_p > 0 $ on $\mathbb{T}^d$ for $ i =1,\dots, J$, and an eigenvalue $\mathcal{H}(p) \in \mathbb{R}$ such that % \begin{equation} \left[B_p + V_p + R\right] g_p = \mathcal{H}(p)\,g_p. \label{eq:LDP_MM:contI:cell_problem} \end{equation} \end{enumerate} \label{lemma:LDP_MM:contI:principal_eigenvalue} \end{lemma} Now~(T2) follows by (a) and (b), since with $\varphi_p := \log g_p$, \begin{align*} H_{\varphi_p}(p , y, i) &\overset{(a)}{=} e^{-\varphi_p(y,i)} \left[ B_p + V_p + R \right] e^{\varphi_p(y,i)} \\&= \frac{1}{g_p(y,i)} \left[B_p + V_p + R\right] g_p (y,i) \overset{(b)}{=} \mathcal{H}(p). \end{align*} \emph{Proof of Lemma \ref{lemma:LDP_MM:contI:principal_eigenvalue}.} Writing $p = \nabla f(x)$, Item~(a) follows directly by regrouping the terms in~\eqref{eq:LDP_MM:contI:limit_op_H}. Regarding Item~(b),~$\left[B_p + V_p +R\right] g_p = \mathcal{H}(p) g_p$ is a system of weakly coupled nonlinear elliptic PDEs on the flat torus. They are weakly coupled in the sense that the component functions $g_p^i$ are only coupled in the lowest order terms by means of the operator $R$, while the operators $B_p$ and $V_p$ act solely on the diagonal. When cast in matrix form, the eigenvalue problem to solve reads as follows: for $D_p + R$, with a diagonal matrix~$D_p$ and a coupling matrix $R$ with entries $R_{ij} = r_{ij}$ ($i \neq j$) and $R_{ii} = - \sum_{j\neq i}r_{ij}$ on the diagonal, \begin{align*} D_p = \begin{pmatrix} B_p^1 + V^1_p & & 0 \\ & \ddots & \\ 0 & & B_p^J + V^J_p \end{pmatrix}, \qquad R = \begin{pmatrix} R_{11} & & \geq 0 \\ & \ddots & \\ \geq 0 & & R_{JJ} \end{pmatrix}, \end{align*} % find a strictly positive vector function $g_p > 0$ such that $\left[ D_p + R \right] g_p = \mathcal{H}(p) g_p$. Guido Sweers showed how to obtain the principal eigenvalue for such kind of coupled systems for bounded sets~$\Omega \subseteq \mathbb{R}^d$ under Dirichlet boundary conditions~\cite{Sweers92}, but the line of argument applies to the periodic setting as well---we summarize the result in Proposition \ref{proposition:appendix:PrEv:fully_coupled_system}. Under our irreducibility assumption on~$R$, there exists a $\lambda(p)$ and $g_p > 0$ such that $\left[-D_p - R \right] g_p = \lambda(p) g_p$. Thereby, $\left[D_p + R \right] g_p = \mathcal{H}(p) g_p$ follows with the same eigenfunction $g_p > 0$ and the principal eigenvalue $\mathcal{H}(p) = - \lambda(p)$. This finishes the verification of~\ref{MM:item:T2}. \end{proof} % \begin{proof}[Verification of (T3) of Theorem \ref{thm:results:action_integral_representation}] We prove that the principal eigenvalue $\mathcal{H}(p)$ of Lemma \ref{lemma:LDP_MM:contI:principal_eigenvalue} is convex in $p\in\mathbb{R}^d$ and satisfies $\mathcal{H}(0)=0$. % To that end, we use an explicit variational representation formula for the principal eigenvalue. By Proposition \ref{proposition:appendix:PrEv:fully_coupled_system}, the eigenvalue $\mathcal{H}(p) = - \lambda(p)$ admits the representation % \begin{align*} \mathcal{H}(p) &= - \sup_{g > 0} \inf_{z^\prime \in E^\prime} \left\{ \frac{1}{g(z^\prime)}\left[ (-B_p - V_p - R)g \right](z^\prime) \right\} \\ &= \inf_{g > 0} \sup_{z^\prime \in E^\prime} \left\{ \frac{1}{g(z^\prime)} \left[ (B_p + V_p + R)g \right](z^\prime) \right\} \\ &= \inf_{\varphi} \sup_{z^\prime \in E^\prime} \left\{ e^{-\varphi(z^\prime)} \left[(B_p + V_p + R)e^{\varphi} \right] (z^\prime) \right\} =: \inf_{\varphi} \sup_{z^\prime \in E^\prime} F(p,\varphi)(z^\prime). \end{align*} % The map $F$ is given by % \begin{multline*} F(p,\varphi)(y,i) = \frac{1}{2}\Delta\varphi^i(y) + \frac{1}{2} |\nabla\varphi^i(y)+p|^2 + b^i(y)(\nabla\varphi^i(y)+p) \\+ \sum_{j = 1}^J r_{ij}(y) \left[ e^{\varphi^j(y)-\varphi^i(y)}-1 \right], \end{multline*} % and hence is jointly convex in $p$ and $\varphi$. For the eigenfunction $\varphi = \varphi_p$, equality holds in the sense that for any $z \in E^\prime$, we have $\mathcal{H}(p) = F(p,\varphi_p)(z)$. Therefore, we obtain for $\tau\in[0,1]$ and any $p_1, p_2 \in \mathbb{R}^d$ with corresponding eigenfunctions $g_1 = e^{\varphi_1}$ and $g_2 = e^{\varphi_2}$ that % \begin{align*} \mathcal{H}(\tau p_1 + (1-\tau) p_2) &= \inf_\varphi\sup_{E^\prime}F\left(\tau p_1 + (1-\tau) p_2, \varphi\right)\\ &\leq \sup_{E^\prime}F\left(\tau p_1 + (1-\tau) p_2, \tau \varphi_1+(1-\tau)\varphi_2\right)\\ &\leq \sup_{E^\prime}\left[\tau F(p_1,\varphi_1) + (1-\tau) F(p_2,\varphi_2)\right]\\ &\leq \tau \sup_{E^\prime}F(p_1,\varphi_1) + (1-\tau) \sup_{E^\prime} F(p_2,\varphi_2) \\ &= \tau \mathcal{H}(p_1) + (1-\tau) \mathcal{H}(p_2). \end{align*} % Regarding the claim $\mathcal{H}(0) = 0$, we choose the constant function $\varphi = (1,\dots,1)$ in the variational representation of $\mathcal{H}(p)$. Thereby, we obtain the estimate $\mathcal{H}(0) \leq 0$. For the opposite inequality, we show that for any $\varphi \in C^2(E^\prime)$ % $$ \lambda(\varphi) := \sup_{z^\prime \in E^\prime} \left\{ e^{-\varphi(z^\prime)} \left[ (B_0 + V_0 + R) e^{\varphi} \right](z^\prime) \right\} \geq 0, $$ % which then implies $\mathcal{H}(0) = \inf_{\varphi} \lambda(\varphi) \geq 0$. Let $\varphi\in C^2(E^\prime)$; the continuous function $\varphi$ on the compact set $E^\prime$ admits a global minimum $z_m = (y_m, i_m) \in E^\prime$. Thereby, noting that $V_0 \equiv 0$, we find % \begin{multline*} \lambda(\varphi) \geq e^{-\varphi(z_m)}(B_0 + R) e^{\varphi(z_m)} = \underbrace{\frac{1}{2} \Delta_y \varphi(y_m,i_m)}_{ \displaystyle \geq 0} + \frac{1}{2}|\underbrace{\nabla_y \varphi(y_m,i_m)}_{\displaystyle = 0}|^2 \\+ b^{i_m}(y_m)\cdot \underbrace{\nabla_y \varphi(y_m,i_m)}_{\displaystyle = 0} + \sum_{j\neq i} r_{ij}(y_m) \underbrace{\left[ e^{\varphi(y_m,j) - \varphi(y_m,i_m)} - 1 \right]}_{\displaystyle \geq 0} \geq 0. \end{multline*} % This finishes the verification of (T3), and thereby the proof of Theorem \ref{thm:results:LDP_cont_MM_Limit_I}. \end{proof} \subsubsection{Proof of Theorem \ref{thm:results:LDP_cont_MM_Limit_II}} \label{subsubsection:LDP_cont_MM_Limit_II} % % In this section, we consider the process $(X^\varepsilon_t, I^\varepsilon_t)$ from Definition \ref{def:intro:cont_MM} in the limit regime $\gamma(\varepsilon) \to \infty$ as $\varepsilon \to 0$. As above in the proof of Theorem \ref{thm:results:LDP_cont_MM_Limit_I}, we start with the nonlinear generator $H_\varepsilon$ from \eqref{eq:LDP_MM:cont:H_varepsilon}, and verify Conditions (T1), (T2) and (T3) of Theorems \ref{thm:results:LDP_switching_MP} and \ref{thm:results:action_integral_representation}. \begin{proof}[Verification of (T1) of Theorem \ref{thm:results:LDP_switching_MP}] We can not make the same Ansatz as in the proof of Theorem \ref{thm:results:LDP_cont_MM_Limit_I}, since the reaction terms with $\gamma(\varepsilon)$ diverge whenever the exponent remains of order one. We have three different scales: order $1$ via the variable $x$, of order $1/\varepsilon$ via $(x/\varepsilon)$, and of order $\gamma(\varepsilon)/\varepsilon \gg 1/\varepsilon$ in the variable $i$. Therefore, we choose functions $f_\varepsilon(x,i)$ of the form % $$ f_\varepsilon(x,i) = f(x) + \varepsilon \, \varphi \left( \frac{x}{\varepsilon} \right) + \frac{\varepsilon}{\gamma(\varepsilon)} \, \xi\left( \frac{x}{\varepsilon},i \right). $$ % We abbreviate in the following $y=x/\varepsilon$. Then computing $H_\varepsilon f_\varepsilon$ results in % \begin{multline*} H_\varepsilon f_\varepsilon (x,i) = \frac{\varepsilon}{2}\Delta f(x) + \frac{1}{2}\left[\Delta\varphi(y)+\frac{1}{\gamma(\varepsilon)}\Delta\xi^i(y)\right] \\+ \frac{1}{2} \big| \nabla f(x)+\nabla\varphi(y)+\frac{1}{\gamma(\varepsilon)}\nabla\xi^i(y) \big|^2 + b^i(y)\left(\nabla f(x)+\nabla\varphi(y) + \frac{1}{\gamma(\varepsilon)} \nabla\xi^i(y)\right) \\+ \gamma(\varepsilon)\sum_{j = 1}^J r_{ij}(y)\left[e^{(\xi(y,j)-\xi(y,i))/\gamma}-1\right]. \end{multline*} % The $1/\gamma$ terms vanish as $\gamma\rightarrow\infty$. The last term satisfies % $$ \gamma \sum_{j = 1}^J r_{ij}(y) \left[ e^{(\xi^j-\xi^i)/\gamma}-1 \right] = \sum_{j = 1}^Jr_{ij}(y) \left[ \xi^j(y)-\xi^i(y) \right] + \mathcal{O}(\gamma^{-2}). $$ % Therefore, we choose again $E^\prime := \mathbb{T}^d \times \{1,\dots, J\}$ as the state space of the macroscopic variables, and use the following limit operator $H$, % \begin{align}\label{MM:eq:multi-H-proof-cont-averaged} H:= \left\{ (f, H_{f,\varphi,\xi} \, : \, f \in C^2(\mathbb{T}^d) \text{ and } H_{f, \varphi,\xi} \in C(\mathbb{T}^d \times E^\prime) \right\}, \end{align} with functions $\varphi$ and $\xi$ in the sets $\varphi \in C^2(\mathbb{T}^d)$ and $\xi = (\xi^1, \dots, \xi^J) \in C^2(E^\prime) \simeq (C^2(\mathbb{T}^d))^J$. The image functions $H_{f,\varphi,\xi} : \mathbb{T}^d \times \mathbb{T}^d \times \{1,\dots,J\} \to \mathbb{R}$ are % % \begin{multline} H_{f,\varphi,\xi}(x,y,i) := \frac{1}{2}\Delta_y\varphi(y) + \frac{1}{2} |\nabla f(x)+\nabla_y\varphi(y)|^2 + b^i(y) \left(\nabla f(x)+\nabla_y\varphi(y)\right) \\ + \sum_{j = 1}^J r_{ij}(y)\left[\xi(y,j)-\xi(y,i)\right]. \label{eq:LDP_MM:contII:limit_op_H} \end{multline} % Then $H$ satisfies (T1), which is shown by the same line of argument as above in the proof of Theorem \ref{thm:results:LDP_cont_MM_Limit_I}, with the same maps $\eta_\varepsilon$ and $\eta_\varepsilon^\prime$ as there. The image functions depend only on gradients,~$H_{f,\varphi,\xi}(x,y,i)=H_{\varphi,\xi}(\nabla f(x),y,i)$. % \end{proof} % % \begin{proof}[Verification of (T2) of Theorem \ref{thm:results:LDP_switching_MP}] % For any $p \in \mathbb{R}^d$, we establish the existence of functions $\varphi_p \in C^2(\mathbb{T}^d)$ and $\xi \in C^2(E^\prime)$ such that $H_{\varphi, \xi}(p,\cdot)$ becomes constant on $E^\prime = \mathbb{T}^d \times \{1,\dots,J\}$. To that end, we find a constant $\mathcal{H}(p) \in \mathbb{R}$ and $\varphi_p$ and $\xi_p$ such that for all $(y,i) \in E^\prime$, we have % $$ H_{\varphi_p,\xi_p}(p,y,i) = \mathcal{H}(p). $$ % We reduce the problem to finding a principal eigenvalue. % \begin{lemma} Let $E^\prime = \mathbb{T}^d \times \{1,\dots,J\}$ and let~$H$ be the operator~\eqref{MM:eq:multi-H-proof-cont-averaged}. Then: % \begin{enumerate}[(a)] \item For $f \in \mathcal{D}(H)$, the images $H_{\varphi,\xi}$ are given by % \[ \tilde{H}_{\varphi,\xi}(p,y,i) = e^{-\varphi(y)}\left[ (B^i_{p} + V^i_{p}) e^{\varphi}\right](y) + \sum_{j = 1}^J r_{ij}(y)\left[\xi(y,j)-\xi(y,i)\right], \] % where $p = \nabla f(x) \in \mathbb{R}^d$, $B_p^i = \frac{1}{2}\Delta + (p + b^i(y))\cdot\nabla$ and multiplication operator~$V_p^i(y) = p^2/2 + p\cdot b^i(y)$. \item For any $\varphi$ and $y\in \mathbb{T}^d$, there exists a function $\xi(y,\cdot)$ on $\{1,\dots,J\}$ such that $\xi \in C^2(E^\prime)$ and for all $i=1,\dots,J$, % \[ e^{-\varphi}\left[ (B^i_{p} + V^i_{p}) e^{\varphi}\right](y) + \sum_{j = 1}^J r_{ij}(y)\left[\xi(y,j)-\xi(y,i)\right] = e^{-\varphi(y)} \left[ B_p + V_p \right] e^{\varphi(y)}, \] % where $B_p = \frac{1}{2}\Delta + (p + \overline{b}(y))\cdot\nabla$, $V_p(y) = \frac{p^2}{2} + p\cdot\overline{b}(y)$. In the operators, $\overline{b}(y) := \sum_{i = 1}^J \mu_y(i)b^i(y)$ is the average drift with respect to the stationary measure $\mu_y \in \mathcal{P}(\{1, \dots, J\})$ of the jump process with frozen jump rates~$r_{ij}(y)$. \item There exists a strictly positive eigenfunction $g_p$ and an eigenvalue $\mathcal{H}(p) \in \mathbb{R}$ such that % \begin{equation} \left[ B_p + V_p \right] g_p = \mathcal{H}(p) g_p. \label{eq:LDP_MM:contII:PrEv_eq} \end{equation} \end{enumerate} \label{lemma:LDP_MM:contII:principal_eigenvalue} \end{lemma} By (a), (b) and (c), taking $\varphi_p = \log g_p$ and the corresponding $\xi(y,i)$, we obtain~(T2) via % \begin{align*} H_{\varphi_p,\xi}(p,y,i) &\overset{(a)}{=} e^{-\varphi_p(y)}\left[ B^i_{p} + V^i_{p}\right] e^{\varphi_p(y)} + \sum_{j\in\mathcal{J}}r_{ij}(y)\left[\xi(y,j)-\xi(y,i)\right] \\&\overset{(b)}{=} e^{-\varphi_p(y)} \left[ (B_p + V_p)e^{\varphi} \right] (y) \overset{(c)}{=} \mathcal{H}(p). \end{align*} % \emph{Proof of Lemma \ref{lemma:LDP_MM:contII:principal_eigenvalue}.} Regarding (a), writing $\xi(y,i)=\xi_y(i)$ and $p = \nabla f(x)\in\mathbb{R}^d$, for all $(y,i)\in E^\prime$ we find % \begin{align*} H_{\varphi,\xi}(p,y,i) &= \underbrace{\frac{1}{2}\Delta\varphi + \frac{1}{2} \big|p + \nabla\varphi \big|^2 + b^i(p+\nabla\varphi)}_{\displaystyle=e^{-\varphi}(B_{p,i}+V_{p,i})e^{\varphi}} + \underbrace{\sum_{j = 1}^J r_{ij}(y) \left[ \xi(y,j)-\xi(y,i) \right]}_{\displaystyle =:R_y \xi(y,\cdot)(i)}, \end{align*} % with a generator $R_y$ of a jump process with frozen jump rates~$r_{ij}(y)$. \smallskip For (b), let $\varphi \in C^2(\mathbb{T}^d)$ and $y\in \mathbb{T}^d$. We wish to find a function~$\xi_y(\cdot) = \xi(y,\cdot) \in C(\{1,\dots,J\})$ such that % $$ e^{-\varphi}\left[B_{p,i}+V_{p,i}\right]e^{\varphi} + R_y \xi_y(i) $$ % becomes constant in $i = 1,\dots, J$. By the Fredholm alternative, for any vector~$h\in C(\{1,\dots,J\})$, the equation $R_y\xi_y = h$ has a solution $\xi_y(\cdot)\in C(\{1,\dots,J\})$ if and only if $h \perp \text{ker}(R_y^\ast)$. Since $R_y$ is the generator of a jump process on the finite discrete set $\{1, \dots, J\}$ with rates $r_{ij}(y)$, the null space $\text{ker}(R_y^\ast)$ is one-dimensional and spanned by the unique stationary measure $\mu_y\in\mathcal{P}(\{1,\dots,J\})$, which exists by our irreducibility assumption of Theorem~\ref{thm:results:LDP_cont_MM_Limit_II} (e.g.~\cite[Theorem~17.51]{klenke2013probability}). % Hence % $ e^{-\varphi}\left[B_{p,i}+V_{p,i}\right]e^{\varphi} + R_y \xi_y(i) = h(p,y) $ % is independent of $i \in \{1,\dots,J\}$ iff % \[ \sum_{i = 1}^J \mu_y(i)\left[(h(p,y)-e^{-\varphi}\left[B_{p,i}+V_{p,i}\right]e^{\varphi}\right]=0. \] This solvability condition leads to % \begin{align*} \sum_{i = 1}^J \mu_y(i) \left[(h(p,y) - e^{-\varphi} \left( B_{p,i}+V_{p,i}\right) e^{\varphi} \right] &= h(p,y)- e^{-\varphi(y)}\left( B_p + V_p \right) e^{\varphi(y)} = 0. \end{align*} Hence for $h(p,y) := e^{-\varphi(y)}\left[ B_p + V_p \right]e^{\varphi(y)}$, there exists~$\xi(y,i)$ solving the equation~$R_y \xi(y,\cdot) = h$. Furthermore, since the stationary measure is an eigenvector of a one-dimensional eigenspace, and the rates $r_{ij}(\cdot)$ are smooth by assumption, the eigenfunctions $\xi_y$ depend smoothly on $y$ as well, and (b) follows. \smallskip Regarding (c) in Lemma \ref{lemma:LDP_MM:contII:principal_eigenvalue}, note that \eqref{eq:LDP_MM:contII:PrEv_eq} is a principal eigenvalue problem for a second-order uniformly elliptic operator. By Proposition \ref{proposition:appendix:PrEv:elliptic_op}, the principal eigenvalue problem $\left[ - B_p - V_p \right] g _p = \lambda(p) g_p$ has a solution $g_p > 0$, with eigenvalue $\lambda(p) \in \mathbb{R}$. The same function $g_p$ and the eigenvalue $\mathcal{H}(p) = -\lambda(p)$ solve~\eqref{eq:LDP_MM:contII:PrEv_eq}. % \end{proof} % % \begin{proof}[Verification of (T3) of Theorem \ref{thm:results:action_integral_representation}] The principal eigenvalue $\mathcal{H}(p)$ is of the form % $$ \mathcal{H}(p) = \inf_\varphi\sup_{y\in \mathbb{T}^d} F\left(p,\varphi\right)(y), $$ % with $F$ jointly convex in $p$ and $\varphi$. Convexity of~$\mathcal{H}(p)$ and~$\mathcal{H}(0) = 0$ follow as above in the proof of Theorem~\ref{thm:results:LDP_cont_MM_Limit_I}. % \end{proof} \subsection{Proof for the discrete models} \label{subsection:discr_MM} In this section, we prove the large-deviation Theorems \ref{thm:results:LDP_discr_MM_Limit_I} and \ref{thm:results:LDP_discr_MM_Limit_II} of the stochastic process $(X^n_t, I^n_t)$ from Defintion~\ref{def:intro:discr_MM}. We alert the reader that we use~$n$ as a scaling parameter instead of~$\varepsilon$. The generator $L_n$ in~\eqref{eq:intro:L_N_discr_MM} is % \begin{multline*} L_n f(x,i) = n r_+^i(nx) \left[ f(x + 1/n, i) - f(x,i) \right] + n r_-^i(nx) \left[ f(x - 1/n, i) - f(x,i) \right] \\ + \sum_{j = 1}^J n \gamma(n) r_{ij}(nx) \left[ f(x,j) - f(x,i) \right], \end{multline*} % with~$\gamma(n)>0$, the state space $E_n = \mathbb{T}_{\ell,n} \times \{1,\dots, J\} = \{(x,i)\}$, and $\mathbb{T}_{\ell,n}$ the discrete one-dimensional torus with lattice spacing $1/n$ and of length $\ell$. As in the continuous case, we verify~\ref{MM:item:T1},~\ref{MM:item:T2} and~(T3) of the large-deviation Theorems \ref{thm:results:LDP_switching_MP} and \ref{thm:results:action_integral_representation}. We start from the nonlinear generators~$H_n f = n ^{-nf} L_n e^{nf}$, % \begin{multline} H_n f(x,i) = r^i_{+}(nx)\left[e^{n\left(f(x+1/n,i)-f(x,i)\right)}-1\right] + r^i_{-}(nx)\left[e^{n\left(f(x-1/n,i)-f(x,i)\right)}-1\right] \\ + \gamma(n)\sum_{j = 1}^J r_{ij}(nx)\left[e^{n\left(f(x,j)-f(x,i)\right)}-1\right]. \label{eq:LDP_MM:discr:H_N} \end{multline} \subsubsection{Proof of Theorem \ref{thm:results:LDP_discr_MM_Limit_I}} \label{subsubsection:LDP_discr_MM_Limit_I} \begin{proof}[Verification of (T1) of Theorem \ref{thm:results:LDP_switching_MP}] We have~$\gamma\equiv 1$. Choose functions of the form $f_n(x,i) = f(x) + \frac{1}{n}\varphi(nx,i)$, where $(x,i) \in \mathbb{T}_{\ell, n} \times \{1,\dots,J\}$ and the~$\varphi(\cdot,i) \in C_{\ell\text{-per}}(\mathbb{Z}) \simeq C(\mathbb{T}_{\ell,1})$ are $\ell$-periodic functions. Then we obtain % \begin{multline*} H_nf_n(x,i) = r^i_{+}(nx)\left[e^{n\left(f(x+\frac{1}{n})-f(x)\right)}e^{\varphi^i(nx+1)-\varphi^i(nx)}-1\right] \\+ r^i_{-}(nx)\left[e^{n\left(f(x-\frac{1}{n})-f(x)\right)}e^{\varphi^i(nx-1)-\varphi^i(nx)}-1\right] \\ + \sum_{j = 1}^J r_{ij}(nx)\left[e^{\left(\varphi(nx,j)-\varphi(nx,i)\right)}-1\right]. \end{multline*} % Then $H_n f_n$ depends on the variables~$x\in\mathbb{T}_{\ell, n}$,~$nx\in\mathbb{T}_{\ell,1}$ and~$i \in \{1,\dots,J\}$. Therefore choose $E^\prime = \mathbb{T}_{\ell,1} \times \{1,\dots,J\}$ for the macroscopic variables, and set % \begin{multline*} H:= \bigg\{ (f, H_{f,\varphi)} \, : \, f \in C^1(\mathbb{T}_\ell) \text{ and } H_{f, \varphi} \in C(\mathbb{T}_{\ell} \times E^\prime),\\ \varphi = (\varphi^1, \dots, \varphi^J) \in C(E^\prime) \simeq (C(\mathbb{T}_{\ell, 1}))^J \bigg\}. \end{multline*} The image funcitons $H_{f,\varphi} : \mathbb{T}_\ell \times E^\prime \to \mathbb{R}$ are defined as % \begin{multline} H_{f,\varphi}(x,y,i) := r^i_{+}(y) \left[ e^{\partial_x f(x)}e^{\varphi^i(y+1)-\varphi^i(y)}-1 \right] \\+ r^i_{-}(y) \left[ e^{-\partial_x f(x)}e^{\varphi^i(y-1)-\varphi^i(y)}-1 \right] \\ + \sum_{j = 1}^J r_{ij}(y)\left[e^{\varphi(y,j)-\varphi(y,i)}-1\right]. \label{eq:LDP_MM:discrI:limit_op_H} \end{multline} % Then with the embedding $\eta_n': E_n \to E^\prime, (x,i) \mapsto \eta_n'(x,i):=(nx,i)$, and the projection $\eta_n (x,i) = x$, (C1) is satisfied. Regarding (C2), for $(f,H_{f,\varphi}) \in H$, the function $f_n(x,i):= f(x)+\frac{1}{n}\varphi(nx,i)$ satisfies $f_n\rightarrow f$ uniformly in $(x,i)\in E_n$ with respect to $\eta_n$, using that $\sup_{E^\prime}\varphi<\infty$. Regarding the images, we note that % \begin{multline*} \sup_{x,i} \big| H_{f,\varphi}(x,nx,i) - H_n f_n (x,i) \big| \\\leq \sup_{x,i}\bigg| r_+^i(nx) \left[ e^{\partial_x f(x)} - e^{n\left(f(x+1/n)-f(x)\right)}\right] e^{\varphi(nx+1,i) - \varphi(nx,i)} \bigg| \\ + \sup_{x,i}\bigg| r_-^i(nx) \left[ e^{-\partial_x f(x)} - e^{n\left(f(x-1/n)-f(x)\right)}\right] e^{\varphi(nx-1,i) - \varphi(nx,i)} \bigg|, \end{multline*} % which converges to zero as $n$ goes to infinity, since $\sup_{E^\prime}\varphi < \infty$ and we have uniformly bounded jump rates $r_\pm^i$. Furthermore, the images depend on $x$ only via the derivatives of $f$: $H_{f,\varphi}(x,y,i) = H_\varphi(\partial_x f(x),y,i)$. Hence (C3) is satisfied, and this finishes the verification of (T1). \end{proof} % % \begin{proof}[Verification of (T2) of Theorem \ref{thm:results:LDP_switching_MP}] % For $p \in \mathbb{R}$, we want to find a function $\varphi_p$ such that the images $H_{\varphi}(p,y,i)$ become constant in $(y,i)$. As in the continuous case, this can be achieved by solving a principal eigenvalue problem. Here in the discrete case, instead of elliptic partial differential equations, we encounter principal eigenvalues of irreducible M-matrices. % \begin{lemma}\label{lemma:LDP_MM:discrI:principal_ev} Let $E^\prime = \mathbb{T}_{\ell,1} \times \{1,\dots,J\}$ and $H \subseteq C^1(\mathbb{T}_\ell) \times C(\mathbb{T}_\ell \times E^\prime)$ be the multivalued operator from \eqref{eq:LDP_MM:discrI:limit_op_H}, and let $p \in \mathbb{R}$. Then: % \begin{enumerate}[(a)] \item Writing $g(y,i) = g^i(y) := e^{\varphi^i(y)}$, the images $H_\varphi(p,y,i)$ are of the form % \[ \tilde{H}_\varphi(p,y,i) = \frac{1}{g(y,i)} \left[ B_p + R \right]g (y,i), \] % where % \[ B_p g(y,i) : = r^i_+(y)\left[e^pg^i(y+1)-g^i(y)\right] + r^i_-(y)\left[e^{-p}g^i(y-1)-g^i(y)\right], \] % and % \[ R g (y,i) := \sum_{j = 1}^J r_{ij}(y) \left[ g(y,j)-g(y,i) \right]. \] % \item There exist strictly positive vectors $g^i = \left( g^i(0),\dots,g^i(\ell-1)\right) \in \mathbb{R}^\ell$, $g^i(y) > 0$ for all $i = 1,\dots, J$ and $y = 0, \dots, \ell-1$, and an eigenvalue $\mathcal{H}(p) \in \mathbb{R}$ such that % \[ [B_p + R] g(y,i) = \mathcal{H}(p) g(y,i). \] \end{enumerate} \end{lemma} By (a) and (b), choosing $\varphi(y,i) := \log g(y,i)$, we obtain % $$ H_\varphi(p,y,i) \overset{(a)}{=} \frac{1}{g(y,i)} \left[ B_p + R \right]g (y,i) \overset{(b)}{=} \mathcal{H}(p). $$ \emph{Proof of Lemma \ref{lemma:LDP_MM:discrI:principal_ev}.} Part (a) follows from rewriting the images $H_\varphi(p,y,i)$. Regarding (b), when cast in matrix form, the eigenvalue problem reads % \begin{align*} \left[ \begin{pmatrix} B_p^1 & & 0 \\ & \ddots & \\ 0 & & B_p^J \end{pmatrix} + \begin{pmatrix} R_{11} & & \geq 0 \\ & \ddots & \\ \geq 0 & & R_{JJ} \end{pmatrix} \right] \begin{pmatrix} g^1 \\ \vdots \\ g^J \end{pmatrix} = \mathcal{H}(p) \begin{pmatrix} g^1 \\ \vdots \\ g^J \end{pmatrix}, \end{align*} % where each $g^i$ is a vector, $g^i = \left( g^i(0), \dots, g^i(\ell-1) \right) \in \mathbb{R}^\ell$, and the square matrices $B^i_p \in \mathbb{R}^{\ell \times \ell}$ are similar to a discretized Laplacian with periodic boundaries. More precisely, the matrix $B_p^i$ has entries $-(r_+^i(y) + r_-^i(y))$ on the diagonal that are flanked by $r_+^i(y)e^p$ to the right and $r_-^i(y) e^{-p}$ to the left next entries. % Each~$R_{ii}$ is a diagonal matrix with~$(R_{ii})_{kk}=-\sum_{j\neq i}r_{ij}(k)$, where~$k=0,1,\dots,\ell-1$. The remaining block matrices in~$R$ are non-negative and mix the different component vectors $g^i$ and $g^j$. \smallskip By the irreducibility assumption in Theorem~\ref{thm:results:LDP_discr_MM_Limit_I} on $R$. Since all off-diagonal terms in $B_p + R$ are non-negative, the off-diagonal elements form an irreducible matrix. Therefore, $M_p := -B_p - R$ is an irreducible M-matrix (Definition~\ref{def:appendix:PrEv:irreducible_M_matrix} further below), and by Proposition~\ref{proposition:appendix:PrEv:M_matrix}, it admits a principal eigenvalue $\lambda(p)$ with strictly positive eigenvector~$g_p$, that is~$M_p g_p = \lambda (p) g_p$. Consequently, we find~$\left[ B_p + R \right] g_p = \mathcal{H}(p) g_p$ with the same eigenvector~$g_p$ and principal eigenvalue~$\mathcal{H}(p) = -\lambda(p)$. This finishes the verification of~\ref{MM:item:T2}. % \end{proof} \begin{proof}[Verification of (T3) of Theorem \ref{thm:results:action_integral_representation}] By Proposition~\ref{proposition:appendix:PrEv:M_matrix}, the eigenvalue satisfies \begin{multline*} \mathcal{H}(p) = - \sup_{g>0} \inf_{y,i} \left[ \frac{1}{g(y,i)} \left( -B_p - R \right)g(y,i) \right] \\= \inf_{\varphi} \sup_{y,i} \bigg\{ r^i_{+}(y) \left[ e^{p}e^{\varphi^i(y+1)-\varphi^i(y)}-1 \right] + r^i_{-}(y) \left[ e^{-p}e^{\varphi^i(y-1)-\varphi^i(y)}-1 \right] \\+ \sum_{j = 1}^J r_{ij}(y) \left[ e^{\varphi(y,j)-\varphi(y,i)}-1 \right] \bigg\}. \end{multline*} Hence the eigenvalue is of the form % \[ \mathcal{H}(p) = \inf_{\varphi} \sup_{y,i} F(p, \varphi)(y,i), \] % with $F(p,\varphi)$ jointly convex in $p$ and $\varphi$, and convexity of $\mathcal{H}(p)$ follows as demonstrated in the proof of Theorem~\ref{thm:results:LDP_cont_MM_Limit_I}. Choosing the constant vector $\varphi = (1,\dots, 1)$ in the variational representation, we obtain $\mathcal{H}(0) \leq 0$. Conversely, any $\varphi$ admits a global minimum $(y_m,i_m)$. We have the estimate~$ F(0,\varphi)(y_m,i_m) \geq 0$. Therefore,~$\sup F(0,\varphi)\geq0$ for any $\varphi$, and~$\mathcal{H}(0) \geq 0$ follows. \end{proof} \subsubsection{Proof of Theorem \ref{thm:results:LDP_discr_MM_Limit_II}} \label{subsubsection:LDP_discr_MM_Limit_II} \begin{proof}[Verification of (T1) of Theorem \ref{thm:results:LDP_switching_MP}] We have~$\gamma(n)\to\infty$ as~$n\to\infty$. With functions of the form $f_n(x,i) = f(x) + \frac{1}{n} \varphi(nx) + \frac{1}{n\gamma(n)} \xi(nx,i)$, with functions~$\varphi$ and~$\xi(\cdot,i)$ in $C(\mathbb{T}_{\ell,1})$, we obtain % \begin{multline*} H_nf_n(x,i) = r^i_{+}(nx)\left[e^{n\left(f(x+\frac{1}{n})-f(x)\right)}e^{\varphi(nx+1)-\varphi(nx)} e^{\left( \xi(nx + 1,i) - \xi(nx,i) \right) / \gamma(n)}-1\right] \\ + r^i_{-}(nx)\left[e^{n\left(f(x-\frac{1}{n})-f(x)\right)}e^{\varphi(nx-1)-\varphi(nx)} e^{\left( \xi(nx - 1,i) - \xi(nx,i) \right) / \gamma(n)} -1\right] \\ + \gamma(n)\sum_{j = 1}^J r_{ij}(nx)\left[e^{\left(\xi(nx,j)-\xi(nx,i)\right) / \gamma(n)}-1\right]. \end{multline*} Take $E^\prime := \mathbb{T}_{\ell,1} \times \{1,\dots,J\}$ and set % \begin{multline*} H:= \bigg\{ (f, H_{f,\varphi,\xi}) \, : \, f \in C^1(\mathbb{T}_\ell) \text{ and } H_{f, \varphi, \xi} \in C(\mathbb{T}_\ell \times E^\prime), \\ \varphi \in C(\mathbb{T}_{\ell,1}), \; \xi = (\xi^1, \dots, \xi^J) \in C(E^\prime) \simeq (C(\mathbb{T}_{\ell,1}))^J \bigg\}, \end{multline*} with image functions $H_{f,\varphi} : \mathbb{T}_\ell \times E^\prime \to \mathbb{R}$ defined by % \begin{multline} H_{f,\varphi}(x,y,i) := r^i_{+}(y)\left[e^{\partial_x f(x)}e^{\varphi(y+1)-\varphi(y)}-1\right]+r^i_{-}(y)\left[e^{-\partial_x f(x)}e^{\varphi(y-1)-\varphi(y)}-1\right]\\ + \sum_{j = 1}^J r_{ij}(y)\left[\xi(y,j) - \xi(y,i)\right]. \label{eq:LDP_MM:discrII:limit_op_H} \end{multline} % Then with the embedding $\eta_n': E_n \to E^\prime, (x,i)\mapsto\eta_n^\prime(x,i):=(nx,i)$, and the projection $\eta_n (x,i) = x$, Item~(C1) is satisfied. Regarding Item~(C2), consider a pair~$(f,H_{f,\varphi,\xi}) \in H$. The function $f_n(x,i):=f(x)+\frac{1}{n}\varphi(nx) + \frac{1}{n\gamma(n)} \xi(nx,i)$ satisfies~$f_n\rightarrow f$ uniformly in $(x,i)$ with respect to $\eta_n$. For the convergence of images, use % \[ \sup_{x,i} \bigg| \left(\xi(nx + 1,i) - \xi(nx,i)\right)/\gamma(n) \bigg| \leq \frac{1}{\gamma(n)} \sup_{y,i} \bigg| \xi(y + 1,i) - \xi(y,i) \bigg| \xrightarrow{n\to\infty} 0. \] % Expanding the exponential terms in $H_n f_n$ and using the same uniform bounds lead to the claimed convergence. Finally, (C3) is satisfied, since the images \eqref{eq:LDP_MM:discrII:limit_op_H} depend on $x$ only via derivatives of $f$. % \end{proof} % % \begin{proof}[Verification of (T2) of Theorem \ref{thm:results:LDP_switching_MP}] % For any $p \in \mathbb{R}$, we wish to obtain functions $\varphi \in C(\mathbb{T}_{\ell,1})$ and $\xi \in C(E^\prime)$ such that the images $H_{\varphi,\xi}(p,y,i)$ are constant in $(y,i)$. We reduce that to a principal-eigenvalue problem. \begin{lemma}\label{lemma:LDP_MM:discrII:principal_ev} Let $E^\prime = \mathbb{T}_{\ell,1} \times \{1,\dots,J\}$, $p\in\mathbb{R}$, and let $H \subseteq C^1(\mathbb{T}_\ell) \times C(\mathbb{T}_\ell \times E^\prime)$ be the multivalued operator from \eqref{eq:LDP_MM:discrII:limit_op_H}. Then: % \begin{enumerate}[(a)] \item The images $H_{\varphi,\xi}(p,y,i)$ are of the form % \[ \tilde{H}_{\varphi,\xi}(p,y,i) = \frac{1}{g(y)} B^i_p g(y) + R \xi(y,i), \] % where~$g(y) := e^{\varphi(y)}$, % \[ B^i_p g(y) : = r^i_+(y)\left[e^pg(y+1)-g(y)\right] + r^i_-(y)\left[e^{-p}g(y-1)-g(y)\right] \] % and % \[ R \xi (y,i) := \sum_{j = 1}^J r_{ij}(y) \left[ \xi(y,j)-\xi(y,i) \right]. \] % \item For any $g(y) = e^{\varphi(y)}$ and $y\in \mathbb{T}_{\ell,1} \simeq \{0,1,\dots,\ell-1\}$, there exists a function $\xi_p(y,\cdot) \in C(\{1,\dots,J\})$ such that for all $i \in \{1,\dots,J\}$, % \[ \frac{1}{g(y)} B^i_{p} g(y) + R\xi(y,i) = \frac{1}{g(y)} B_p g(y), \] % with % \[ B_p g(y) : = \overline{r}_+(y)\left[e^pg(y+1)-g(y)\right] + \overline{r}_-(y)\left[e^{-p}g(y-1)-g(y)\right], \] % where $\overline{r}_{\pm}(y) = \sum_{i = 1}^J \mu_y(i) r_{\pm}^i(y)$ are the average jump rates with respect to the stationary measure $\mu_y \in \mathcal{P}(\{1,\dots,J\})$ of the jump process with rates~$r_{ij}(y)$. \item There exists a strictly positive eigenvector $g_p = \left( g_p(0), \dots, g_p(\ell-1) \right) \in \mathbb{R}^\ell$, $g_p(y) > 0$ for all $y = 0, \dots, \ell-1$, and a corresponding principal eigenvalue $\mathcal{H}(p) \in \mathbb{R}$ such that % $$ B_p g_p = \mathcal{H}(p) g_p. $$ \end{enumerate} \end{lemma} With $\varphi_p := \log g_p$ and the corresponding function~$\xi_p(y,i)$ of~(b), we find % $$ H_{\varphi_p,\xi_p}(p,y,i) \overset{(a)}{=} \frac{1}{g(y)} B^i_p g(y) + R \xi_p(y,i) \overset{(b)}{=} \frac{1}{g_p(y)} B_p g_p(y) \overset{(c)}{=} \mathcal{H}(p). $$ \emph{Proof of Lemma \ref{lemma:LDP_MM:discrII:principal_ev}.} Part (a) follows from rewriting the images in terms of $g(y) = \log\varphi(y)$. For part (b), the argument is similar to the one given in the proof of Theorem \ref{thm:results:LDP_cont_MM_Limit_II}. By the Fredholm alternative, for every $y \in \mathbb{T}_{\ell,1} \simeq \{0,\dots,\ell-1\}$, the equation % $$ R\xi(y,i) = \frac{1}{g(y)} \left[B^i_p - B_p\right]g (y) $$ % has a solution $\xi(y,\cdot) \in C(\{1,\dots,J\})$ if and only if for the stationary measure $\mu_y \in \mathcal{P}(\{1,\dots,J\})$ satisfying $R^\ast \mu_y = 0$, we have % $$ \bigg\langle \mu_y , \frac{1}{g(y)} \left[ B^i_p - B_p \right]g (y) \bigg\rangle = 0, $$ % where the pairing corresponds to a sum over the $i \in \{1,\dots,J\}$. Writing out that condition leads exactly to the average operator $B_p$ as given in (b). \smallskip For part (c), we note that $B_p g_p = \mathcal{H}(p) g_p$ is a matrix eigenvalue problem. The matrix $B_p \in \mathbb{R}^{\ell \times \ell}$ has nonzero entries similar to a discretized Laplacian with periodic boundaries: % \begin{align*} B_p = \begin{pmatrix} -(\overline{r}_+(0) + \overline{r}_-(0)) & \overline{r}_+(0) e^p & \dots & \overline{r}_-(0)e^{-p} \\ \overline{r}_-(1) e^{-p} & -(\overline{r}_+(1) + \overline{r}_-(1)) & \overline{r}_+(1)e^p & \dots \\ 0 & \overline{r}_-(2)e^{-p} & -(\overline{r}_+(2) + \overline{r}_-(2)) & \dots \\ \vdots & \vdots & \ddots & \vdots\\ \end{pmatrix}. \end{align*} % By the positivity assumptions on the rates $r_\pm^i$ in Definition \ref{def:intro:discr_MM}, the average rates $\overline{r}_\pm$ are positive. Thereby, $M_p := -B_p$ is an irreducible $M$-matrix, so that by Proposition \ref{proposition:appendix:PrEv:M_matrix}, there exists a strictly positive eigenvector $g_p > 0$ and a principal eigenvalue $\lambda(p) \in \mathbb{R}$ such that % $ M_p g_p = \lambda(p) g_p. $ % That implies $B_p g_p = \mathcal{H}(p) g_p$ with the same eigenvector $g_p$ and principal eigenvalue $\mathcal{H}(p) = -\lambda(p)$. This finishes the proof of Lemma \ref{lemma:LDP_MM:discrII:principal_ev}, and thereby the verification of (T2). \end{proof} % % \begin{proof}[Verification of (T3) of Theorem \ref{thm:results:action_integral_representation}] We prove the claimed properties of~$\mathcal{H}(p)$ by means of a variational representation. By Proposition~\ref{proposition:appendix:PrEv:M_matrix}, we have % \begin{align*} \mathcal{H}(p) &= - \sup_{g>0} \inf_{y} \left[ \frac{1}{g(y)} (-B_p) g(y) \right] \\ &= \inf_{\varphi} \sup_{y} \bigg\{ \overline{r}_+(y)\left[e^p e^{\varphi(y+1)-\varphi(y)} - 1\right] + \overline{r}_-(y)\left[e^{-p} e^{\varphi(y-1)-\varphi(y)} - 1\right] \bigg\}. \end{align*} % The representation is of the form % \[ \mathcal{H}(p) = \inf_{\varphi} \sup_{y} F(p, \varphi(y)), \] % with a joint convex $F$. With that, convexity and~$\mathcal{H}(0)=0$ follow as above. \end{proof} \subsection{Detailed balance implies symmetry of the Hamiltonian} \label{subsection:detailed_balance} In Theorem~\ref{thm:results:detailed_balance_limit_I}, we proved that detailed-balance implies symmetric Hamiltonians. The proof was based on a suitable variational representation of the Hamiltonian. In this section, we show how to obtain this representation. \smallskip To that end, we recall the setting. We work with~$E^\prime = \mathbb{T}^d \times \{1, \dots, J\}$, and denote by~$\mathcal{P}(E^\prime)$ the set of probability measures on $E^\prime$. The Hamiltonian~$\mathcal{H}(p)$ is the principal eigenvalue of the cell problem~\eqref{eq:LDP_MM:contI:cell_problem} described in Lemma~\ref{lemma:LDP_MM:contI:principal_eigenvalue}. Here, we start from the fact that this Hamiltonian satisfies \begin{equation} \mathcal{H}(p) = \sup_{\mu\in\mathcal{P}(E^\prime)} \left[ \int_{E^\prime} V_p(z) \, \mathrm{d} \mu(z) - I_p(\mu) \right]. \label{eq:results:LDP_MM:DV_var_rep_H(p)} \end{equation} In this formula, we have the continuous map \begin{equation}\label{MM:eq:function-V-in-Hamiltonian} V_p (x,i) := \frac{1}{2} p^2 - p\cdot \nabla\psi^i(x), \end{equation} and the Donsker-Varadhan functional \begin{equation} I_p(\mu)=-\inf_{u > 0}\int_{E^\prime} \frac{L_p u}{u}\, \mathrm{d} \mu, \label{eq:results:LDP_MM:DV_functional} \end{equation} where the infimum is over strictly positive~$u\in C^2(E')$ and the operator~$L_p$ is \begin{equation} L_p u(x,i) := \frac{1}{2} \Delta_x u(x,i) + (p-\nabla \psi_i(x))\cdot \nabla_x u(x,i) + \sum_{j = 1}^J r_{ij}(x) \left[u(x,j) - u(x,i)\right]. \label{eq:results:LDP_MM:L_p_in_DV_functional} \end{equation} The variational representation~\eqref{eq:results:LDP_MM:DV_var_rep_H(p)} is a special case of Donsker's and Varadhan's results on principal eigenvalues~\cite{DonskerVaradhan75, DonskerVaradhan76}. Under their general conditions, the infimum is taken over functions that are in the domain of the infinitesimal generator of the semigroup generated by~$L_p$. Pinsky showed that the infimum can be taken over~$C^2$ functions if the coefficient functions appearing in the operators are smooth~\cite{pinsky1985evaluating, Pi07}. \smallskip Given in the form~\eqref{eq:results:LDP_MM:DV_var_rep_H(p)}, it is not clear why~$\mathcal{H}(p)$ should be symmetric under the detailed-balance condition. We perform a suitable shift in the infimum of the Donsker-Varadhan functional~\eqref{eq:results:LDP_MM:DV_functional} to obtain a suitable representation. Let us first briefly describe this transformation in an informal way. Representing in~\eqref{eq:results:LDP_MM:DV_functional} the strictly positive functions as~$u=\exp(\varphi)$, we find \begin{equation*} I_p(\mu)=-\inf_{\varphi} \sum_i \int\left[ \frac{1}{2}\Delta\varphi_i + \frac{1}{2}|\nabla\varphi_i|^2 +(p-\nabla\psi_i) \nabla\varphi_i+\sum_j r_{ij}\left(e^{\varphi_j-\varphi_j}-1\right)\right] \mathrm{d}\mu_i. \end{equation*} Suppose that~$ \mathrm{d}\mu_i=\overline{\mu}_i\, \mathrm{d} x$ with strictly positive~$\overline{\mu}_i$, where~$ \mathrm{d} x$ is the Lebesgue measure on the torus. Then shifting in the infimum as~$\varphi_i\to\varphi_i+\psi_i+\frac{1}{2}\log\overline{\mu}_i$, we find by calculation that \begin{equation} \label{MM:eq:DV-functional-after-shift} I_p(\mu)=\mathcal{R}(\mu)+\int_{E^\prime} V_p \, \mathrm{d}\mu - K_p(\mu), \end{equation} where~$\mathcal{R}(\mu)$ is the Fisher information given by \begin{equation} \label{MM:eq:relative-Fisher-information} \mathcal{R}(\mu) := \frac{1}{8}\sum_i\int_{\mathbb{T}^d}\left|\nabla \left(\log\frac{\overline{\mu}_i}{e^{-2\psi_i}}\right)\right|^2\, \mathrm{d}\mu_i, \end{equation} and~$K_p(\mu)$ is given by \begin{multline} K_p(\mu) = \inf_{\phi}\bigg\{\sum_{i = 1}^J \int_{\mathbb{T}^d}\left( \frac{1}{2}|\nabla \phi_i(x) + p|^2 -\sum_{j = 1}^J r_{ij}(x)\right) \, \mathrm{d} \mu_i(x)\\ +\sum_{i, j = 1}^J \int_{\mathbb{T}^d}r_{ij}(x) e^{-2\psi_i(x)}\sqrt{\overline{\mu}_i(x) \overline{\mu}_j(x)} e^{\psi_j(x) + \psi_i(x)} e^{\phi(x,j) - \phi(x,i)} \, \mathrm{d} x\bigg\}. \label{eq:results:LDP_MM:K_p(mu)_I} \end{multline} Plugging formula~\eqref{MM:eq:DV-functional-after-shift} into the variational representation~\eqref{eq:results:LDP_MM:DV_var_rep_H(p)} leads to the desired representation of the Hamiltonian. The transformation we used corresponds to shifting by~$(1/2)\log(\overline{\mu}_i/\pi_i)$, where~$\pi_i=e^{-2\psi_i}$ is the stationary measure (up to multiplicative constant). This transformation is actually reminiscent of a \emph{symmetrization} discussed in Touchette's notes~\cite[Eq.~(36)]{Touchette2018}. Finally, when formulating the detailed-balance condition with additional constants in~\eqref{MM:eq:detailed-balance} (meaning not shifting the potentials by constants to renormalized), one can include these constants in the shift to arrive at the same conclusions. \smallskip To make the strategy displayed above rigorous, we prove that we can work with measures~$\mu$ having the required regularity properties. The central idea is to exploit the fact that~$I_p(\mu)$ is finite since~$\mathcal{H}(p)$ is finite. By a result of Stroock~\cite[Theorem 7.44]{stroock2012introduction}, finiteness of the Donsker-Varadhan functional implies certain regularity properties in case the generator is reversible. Since the generator~$L_p$ is not reversible, we instead bound~$I_p$ by a suitable Donsker-Varadhan functional~$I_\mathrm{rev}$ corresonding to a reversible process, and can then apply~\cite[Theorem 7.44]{stroock2012introduction}. This strategy appears in the proof of the following proposition. The formula we use in the proof of Theorem~\ref{thm:results:detailed_balance_limit_I} of Section~\ref{subsection:results:LDP_in_MM} is given in~(c). \begin{proposition} The Hamiltonian~$\mathcal{H}(p)$ given by~\eqref{eq:results:LDP_MM:DV_var_rep_H(p)} satisfies the following: \begin{enumerate}[(a)] \item % The supremum in \eqref{eq:results:LDP_MM:DV_var_rep_H(p)} can be taken over a smaller set $\mathbf{P}$ of measures, that is % $$ \mathcal{H}(p) = \sup_{\mu\in\mathbf{P}} \left[ \int_{E^\prime} V_p \, \mathrm{d}\mu - I_p(\mu) \right], $$ % where % $ \mathbf{P} \subset \mathcal{P}(E^\prime)$ are the probability measures $\mu = (\mu_1,\dots,\mu_J)$ such that: % \begin{enumerate}[(P1)] \item Each $\mu_i$ is absolutely continuous with respect to the uniform measure on $\mathbb{T}^d$. \item For each~$i$, we have~$\nabla (\log \overline{\mu}_i) \in L^2_{\mu_i}(\mathbb{T}^d)$, where $ \mathrm{d}\mu_i(x) = \overline{\mu}_i(x) \mathrm{d} x$. \end{enumerate} % \item We have % \begin{equation} \mathcal{H}(p) = \sup_{\mu \in \mathbf{P}} \left[ K_p(\mu) - \mathcal{R}(\mu) \right], \label{eq:results:LDP_MM:new_representation_H(p)} \end{equation} with the maps~$\mathcal{R}$ and~$K_p$ given by~\eqref{MM:eq:relative-Fisher-information} and~\eqref{eq:results:LDP_MM:K_p(mu)_I} above. In~$K_p(\mu)$, the infimum can be taken over vectors of functions $\phi_i = \phi(\cdot,i)$ such that $\nabla \phi_i \in L^{2}_{\mu_i}(\mathbb{T}^d)$. \item Under the detailed balance condition, \begin{multline} K_p(\mu) = \inf_{\phi}\bigg\{ \sum_{i = 1}^J \int_{\mathbb{T}^d} \left( \frac{1}{2}|\nabla \phi^i(x) + p|^2 - \sum_{j = 1}^J r_{ij}(x) \right) \, \mathrm{d} \mu_i(x) \\ + \sum_{i, j = 1}^J \int_{\mathbb{T}^d} r_{ij}(x)e^{-2\psi_i(x)} \sqrt{\overline{\mu}_i(x) \overline{\mu}_j(x)} e^{\psi_j(x) + \psi_i(x)} \cosh{(\phi(x,j) - \phi(x,i))} \, \mathrm{d} x \bigg\}. \label{eq:results:LDP_MM:K_p(mu)_I:det_bal} \end{multline} % \end{enumerate} % \label{prop:results:detailed_balance_limit_I} \end{proposition} % The representation~\eqref{eq:results:LDP_MM:K_p(mu)_I:det_bal} follows from~\eqref{eq:results:LDP_MM:K_p(mu)_I} by rewriting the sums appearing therein as~$\sum_{ij} a_{ij} = \frac{1}{2} \sum_{ij} (a_{ij} + a_{ji})$, where % $$ a_{ij} = \int_{\mathbb{T}^d} r_{ij}e^{-2\psi_i} \sqrt{\overline{\mu}^i(x) \overline{\mu}^j(x)} e^{\psi^j(x) + \psi^i(x)} e^{\phi(x,j) - \phi(x,i)} \, \mathrm{d} x. $$ This leads to the $\cosh(\cdot)$ terms in \eqref{eq:results:LDP_MM:K_p(mu)_I:det_bal}, and proves (c). We now give the proof of (a) and (b) of Proposition \ref{prop:results:detailed_balance_limit_I}. % \begin{proof}[Proof of (a) in Proposition \ref{prop:results:detailed_balance_limit_I}] Since $\mathcal{H}(p)$ is finite for any $p$ and $V_p(\cdot)$ is bounded, the supremum can be taken over measures $\mu$ such that $I_p(\mu)$ is finite. We show that finiteness of $I_p(\mu)$ implies that $\mu$ must satisfy (P1) and (P2). To that end, define the map $L_{\text{rev}} : \mathcal{D}(L_{\mathrm{rev}}) \subseteq C(E^\prime) \to C(E^\prime)$ by $\mathcal{D}(L_{\mathrm{rev}}) := C^2(E^\prime)$ and % $$ L_{\mathrm{rev}} f(x,i) = \frac{1}{2} \Delta_x f(x,i) - \nabla \psi_i(x) \cdot \nabla_x f(x,i) + \overline{\gamma} \sum_{j \neq i} s_{ij}(x) \left[ f(x,j) - f(x,i) \right], $$ % with jump rates $s_{ij}$ defined as % $ s_{ij} \equiv 1 $ % and % $ s_{ji} \equiv e^{2\psi_j - 2\psi_i}, $ % for $i \leq j$, and with % $ \overline{\gamma} := \sup_{\mathbb{T}^d} \left( r_{ij} / s_{ij}\right) < \infty, $ % where $r_{ij}(\cdot)$ are the jump rates appearing in~$L_p$. Furthermore, define $I_{L_{\text{rev}}} : \mathcal{P}(E^\prime) \to [0,\infty]$ by % $$ I_{L_\mathrm{rev}}(\mu) := -\inf_{\varphi \in C^2(E^\prime)} \int_{E^\prime} e^{-\varphi} L_{\mathrm{rev}} (e^{\varphi}) \, \mathrm{d}\mu. $$ % We prove two statements. First, if $I_{L_{\mathrm{rev}}}(\mu)$ is finite, the measure $\mu$ satisfies (P1) and (P2). Second, if $I_p(\mu)$ is finite, then $I_{L_{\mathrm{rev}}}(\mu)$ is finite. Since % $ s_{ij} e^{-2\psi_i} = s_{ji} e^{-2\psi_j}, $ % the operator $L_\mathrm{rev}$ admits a reversible measure $\nu_{\text{rev}}$ in $\mathcal{P}(E^\prime)$ given by % $$ \nu_{\mathrm{rev}}(A_1, \dots, A_J) = \frac{1}{\mathcal{Z}} \sum_{i = 1}^J \nu_{\mathrm{rev}}^i(A_i), \quad \text{ where } \mathrm{d}\nu_{\mathrm{rev}}^i = e^{-2 \psi_i} \mathrm{d} x \text{ and } \mathcal{Z} = \sum_i \nu_\mathrm{rev}^i(\mathbb{T}^d). $$ % The measure $\nu_{\mathrm{rev}}$ is reversible for $L_{\mathrm{rev}}$ in the sense that for all $f,g \in \mathcal{D}(L_\text{rev})$, % $$ \langle L_\mathrm{rev} f, g \rangle_{\nu_\mathrm{rev}} = \langle f, L_\mathrm{rev} g \rangle_{\nu_\mathrm{rev}}, \quad \text{ where } \langle f, h \rangle_{\nu_\mathrm{rev}} = \frac{1}{\mathcal{Z}} \sum_i \int_{\mathbb{T}^d} f^i(x)h^i(x) \, \mathrm{d}\nu_\mathrm{rev}^i(x). $$ % Hence by Stroock's result~\cite[Theorem 7.44]{stroock2012introduction}, % \begin{align*} I_{L_{\text{rev}}}(\mu) &= \begin{cases} \displaystyle -\langle f_\mu, L_\text{rev} f_\mu \rangle_{\nu_\text{rev}} ,& f_\mu = \sqrt{g_\mu} \in D^{1/2} := \mathcal{D}\left( \sqrt{-L_\text{rev}} \right) \text{ and } g_\mu = \frac{ \mathrm{d}\mu}{ \mathrm{d} \nu_\text{rev}}, \\ \displaystyle +\infty ,& \text{otherwise}, \end{cases} \end{align*} where $ \mathrm{d}\mu / \mathrm{d}\nu_\text{rev}$ is the Radon-Nikodym derivative. This statement entails that if~$I_{L_\mathrm{rev}}(\mu)$ is finite, then~$\mu\ll\nu_{\mathrm{rev}}$. Then~$I_{L_\mathrm{rev}}(\mu)$ is explicitly given by % \begin{multline} I_{L_{\text{rev}}}(\mu) = -\langle f, L_\text{rev} f \rangle_{\nu_\text{rev}} \\= \frac{1}{\mathcal{Z}}\sum_{i=1}^J \left[ \int_{\mathbb{T}^d} |\nabla f^i(x)|^2 \, d\nu_\text{rev}^i(x) + \overline{\gamma} \sum_{j = 1}^J \int_{\mathbb{T}^d} s_{ij}(x)|f^j(x) - f^i(x)|^2 \, d\nu_\text{rev}^i(x) \right], \label{eq:LDP_MM:det_bal:I_L_rev_explicit} \end{multline} % where we write $f^i = ( \mathrm{d}\mu^i/ \mathrm{d}{\nu^i_{\text{rev}}})^{1/2}$. Furthermore, $\mu^i$ is absolutely continuous with respect to $\nu^i = e^{-2\psi^i} \mathrm{d} x$. Since~$e^{-2\psi^i} \mathrm{d} x \ll \mathrm{d} x$, we find that~$\mu^i$ is absolutely continuous with respect to the volume measure on $\mathbb{T}^d$. Hence (P1) holds true. \smallskip We prove that finiteness of $I_{L_\mathrm{rev}}(\mu)$ implies (P2) by showing that the integral % $ \int_{\mathbb{T}^d} |\nabla (\log \overline{\mu}^i)|^2 \, d\mu^i $ % is finite. Let $g^i_\mu := \mathrm{d}\mu^i / \mathrm{d}\nu^i_{\mathrm{rev}}$ be the density of $\mu^i$ with respect to $\nu_\mathrm{rev}^i$. Then the densities $\overline{\mu}^i = \mathrm{d} \mu^i/ \mathrm{d} x$ satisfy~$g_\mu^i = \overline{\mu}^i e^{2\psi^i}$, because % $$ \overline{\mu}^i = \frac{ \mathrm{d}\mu^i}{ \mathrm{d}\nu^i_\text{rev}} \frac{ \mathrm{d}\nu_\text{rev}^i}{ \mathrm{d} x} = \frac{ \mathrm{d}\mu^i}{ \mathrm{d}\nu^i_\text{rev}} e^{-2\psi^i}. $$ Let $f_\mu^i := \sqrt{g_\mu^i}$. If $I_{L_\mathrm{rev}}(\mu)$ is finite, then by~\eqref{eq:LDP_MM:det_bal:I_L_rev_explicit}, $\int_{\mathbb{T}^d}|\nabla f_\mu^i|^2 \mathrm{d}\nu_\mathrm{rev}^i$ is finite for every $i = 1,\dots, J$. Hence with the estimate % \begin{align*} \int_{\mathbb{T}^d} |\nabla f_\mu^i|^2 \mathrm{d}\nu_\text{rev}^i &\geq \int_{\mathbb{T}^d} |\nabla f_\mu^i|^2 \mathbf{1}_{\{ \overline{\mu}^i > 0\}} \mathrm{d}\nu_\text{rev}^i = \frac{1}{4}\int_{\mathbb{T}^d} \frac{|\nabla g_\mu^i|^2}{g_\mu^i} \mathbf{1}_{\{ \overline{\mu}^i > 0\}} \mathrm{d}\nu^i_\text{rev} \\ &= \frac{1}{4}\int_{\mathbb{T}^d} \frac{| e^{2\psi^i} \nabla \overline{\mu}^i + 2 \overline{\mu}^i \nabla \psi^i e^{2\psi^i}|^2 }{\overline{\mu}^i} e^{-4\psi^i} \mathbf{1}_{\{ \overline{\mu}^i > 0\}} \mathrm{d} x\\ &= \frac{1}{4} \int_{\mathbb{T}^d} | \nabla (\log \overline{\mu}^i) + 2 \nabla \psi^i |^2 \mathbf{1}_{\{ \overline{\mu}^i > 0\}} \mathrm{d}\mu^i \\ &\geq \frac 18 \int_{\mathbb{T}^d} |\nabla(\log \overline{\mu}^i)|^2 \mathbf{1}_{\{ \overline{\mu}^i > 0\}} \mathrm{d}\mu^i - \int_{\mathbb{T}^d} |\nabla \psi^i|^2 \mathbf{1}_{\{ \overline{\mu}^i > 0\}} \mathrm{d}\mu^i, \end{align*} we find~$\nabla (\log \overline{\mu}^i) \in L^2_{\mu^i}(\mathbb{T}^d)$. We are left with proving that if $I_p(\mu)$ is finite, then $I_{L_{\mathrm{rev}}}(\mu)$ is finite. Estimating $r_{ij} / s_{ij}$ from above by $\overline{\gamma} = \sup_{\mathbb{T}^d} (r_{ij} / s_{ij})$, we find % \begin{multline*} I_p(\mu) \geq \sup_\varphi \sum_i \int_{\mathbb{T}^d} - \bigg[ \frac{1}{2} \Delta \varphi^i(x) + \frac{1}{2} |\nabla \varphi^i(x)|^2 + (p - \nabla\psi^i(x)) \nabla \varphi^i(x) \\+ \overline{\gamma} \sum_{j\neq i} s_{ij}(x) (e^{\varphi(x,j) - \varphi(x,i)} -1) \bigg] \, \mathrm{d}\mu^i - s_0(\mu), \end{multline*} % where % $ s_0(\mu) = \sum_{ij} \int_{\mathbb{T}^d} \left[ \overline{\gamma} \, s_{ij}(x) - r_{ij}(x) \right] \mathrm{d}\mu^i $ % is finite. For $p = 0$, this means that $I_0 (\mu) \geq I_{L_\mathrm{rev}}(\mu) - s_0(\mu)$ holds for all $\mu \in \mathcal{P}(E^\prime)$. In particular, if $I_0 (\mu)$ is finite, then $I_{L_\mathrm{rev}}(\mu)$ is finite. For $p \neq 0$, the additional $p$-term is dealt with by Young's inequality applied as $-p\cdot \nabla \phi^i \geq - p^2/(2 \varepsilon) - \frac{\displaystyle \varepsilon}{2} |\nabla\phi^i|^2$. Thereby, % \begin{multline*} I_p(\mu) \geq \sup_\varphi \sum_i \int_{\mathbb{T}^d} - \bigg[ \frac{1}{2} \Delta \varphi^i(x) + \frac{1 + \varepsilon}{2} |\nabla \varphi^i(x)|^2 + - \nabla\psi^i(x) \nabla \varphi^i(x) \\+ \overline{\gamma} \sum_{j\neq i} s_{ij}(x) (e^{\varphi(x,j) - \varphi(x,i)} -1) \bigg] \, \mathrm{d}\mu^i -\frac{p^2}{2\varepsilon}- s_0(\mu) \\= \frac{1}{\lambda} \sup_\varphi \sum_i \int_{\mathbb{T}^d} - \bigg[ \frac{1}{2} \Delta \varphi^i(x) + \frac{1}{2} |\nabla \varphi^i(x)|^2 + - \nabla\psi^i(x) \nabla \varphi^i(x) \\+ \lambda \overline{\gamma} \sum_{j\neq i} s_{ij}(x) (e^{(\varphi(x,j) - \varphi(x,i)) / \lambda} -1) \bigg] \, \mathrm{d}\mu^i -\frac{p^2}{2\varepsilon}- s_0(\mu), \end{multline*} % where the last equality follows by rescaling $\varphi \rightarrow \varphi / \lambda$, with $\lambda = 1 + \varepsilon > 1$. Therefore, apart from the factor $1/\lambda$ in the exponential term and the multiplicative factor $\lambda \overline{\gamma}$, we obtain the same estimate as above in the $p = 0$ case. Denoting the supremum term in the last line by $I^\lambda_{L_\text{rev}}$, we found the estimate % \[ I_p(\mu) \geq \frac{1}{\lambda} I^\lambda_{L_\text{rev}}(\mu) - s_p(\mu), \] % where % $ s_p(\mu) = \frac{p^2}{2\varepsilon} + s_0(\mu) $ % is finite. We now show that~$I_{L_\text{rev}}(\mu) = \infty$ implies $I^\lambda_{L_{\text{rev}}}(\mu) = \infty$, which proves that finiteness of $I_{L_\text{rev}}^\lambda (\mu)$ implies finiteness of $I_{L_{\text{rev}}}(\mu)$. If $I_{L_\text{rev}}(\mu) = \infty$, then by definition, there exist functions $\varphi_n$ such that % \begin{multline*} a(\varphi_n) := -\sum_{i=1}^J \int_{\mathbb{T}^d} \bigg[ \frac{1}{2} \Delta\varphi_n^i + \frac{1}{2} |\nabla \varphi_n^i|^2 -\nabla\psi^i \nabla \varphi_n^i \\+ \overline{\gamma} \sum_{j\neq i} s_{ij} \left( e^{\varphi_n(x,j) - \varphi_n(x,i)} - 1 \right) \bigg] \, \mathrm{d}\mu^i(x) \xrightarrow{ n \rightarrow \infty} \infty. \end{multline*} % We aim to prove that $a(\varphi_n) \leq I^\lambda_{L_\text{rev}}(\mu)$ holds for all $n$. To that end, write % \begin{multline*} a^\lambda(\varphi_n) := - \sum_i \int_{\mathbb{T}^d} \bigg[ \frac{1}{2} \Delta \varphi_n^i + \frac{1}{2} |\nabla \varphi_n^i|^2 + - \nabla\psi^i \nabla \varphi_n^i \\+ \lambda \overline{\gamma} \sum_{j\neq i} s_{ij} (e^{(\varphi_n(x,j) - \varphi_n(x,i)) / \lambda} -1) \bigg] \, \mathrm{d}\mu^i \end{multline*} % for the according evaluation of $\varphi_n$ in $I^\lambda_{L_\text{rev}}(\mu)$. we have % $ I^\lambda_{L_\text{rev}}(\mu) \geq a^\lambda(\varphi_n), $ and show that $a^\lambda(\varphi^n) \rightarrow \infty$. The only difference between $a(\varphi_n)$ and $a^\lambda(\varphi_n)$ lies in the $\lambda$-factors that appear in the exponential terms. Since~$e^x \geq e^x \mathbf{1}_{\{x \geq 0\}}$, % \begin{multline*} \overline{a}_n := -\sum_{i=1}^J \int_{\mathbb{T}^d} \bigg[ \frac{1}{2} \Delta\varphi_n^i + \frac{1}{2} |\nabla \varphi_n^i|^2 -\nabla\psi^i \nabla \varphi_n^i \\+ \overline{\gamma} \sum_{j\neq i} s_{ij} \left( e^{\varphi_n(x,j) - \varphi_n(x,i)} \mathbf{1}_{\{\varphi_n(x,j) - \varphi_n(x,i) \geq 0\}} - 1 \right) \bigg] \, \mathrm{d}\mu^i(x) \end{multline*} % diverges as $n \rightarrow \infty$ (we have $a(\varphi_n) \leq \overline{a}_n$). Define this analogously for $a^\lambda(\varphi_n)$, % \begin{multline*} \overline{a}^\lambda_n := - \sum_i \int_{\mathbb{T}^d} \bigg[ \frac{1}{2} \Delta \varphi_n^i + \frac{1}{2} |\nabla \varphi_n^i|^2 + - \nabla\psi^i \nabla \varphi_n^i \\+ \lambda \overline{\gamma} \sum_{j\neq i} s_{ij} \left( e^{(\varphi_n(x,j) - \varphi_n(x,i)) / \lambda} \mathbf{1}_{\{ \varphi_n(x,j) - \varphi_n(x,i) \geq 0 \}} -1 \right) \bigg] \, \mathrm{d}\mu^i. \end{multline*} Since~$a^\lambda(\varphi_n)\geq \overline{a}^\lambda_n - \sum_{ij} \int_E \lambda \overline{\gamma} s_{ij}(x) \, d\mu^i(x)$, proving that $\overline{a}_n^\lambda \rightarrow \infty$ as $n \to \infty$ is sufficient for obtaining $a^\lambda(\varphi_n) \rightarrow \infty$. Finally, the fact that $\overline{a}^\lambda_n$ diverges as $n \to \infty$ follows by noting that $\overline{a}_n\leq \overline{a}^\lambda_n$, which can be seen via % \begin{multline*} \overline{a}_n - \overline{a}^\lambda_n = -\sum_i \int_{\mathbb{T}^d} \overline{\gamma} \sum_{j \neq i} s_{ij} \left( e^{\varphi_n^j - \varphi_n^i} \mathbf{1}_{\{ \varphi_n^j - \varphi_n^i \geq 0 \}} - 1 \right) d\mu^i \\+ \lambda \overline{\gamma} \sum_i \int_{\mathbb{T}^d} s_{ij} \left( e^{\varphi_n^j - \varphi_n^i} \mathbf{1}_{\{ \varphi_n^j - \varphi_n^i \geq 0 \}} - 1 \right) \mathrm{d}\mu^i \\ = \overline{\gamma} (1 - \lambda) \sum_{ij} \int_{\mathbb{T}^d} s_{ij} d\mu^i + \overline{\gamma} \sum_{ij} \int_{\mathbb{T}^d} s_{ij} \left( e^{(\varphi_n^j - \varphi_n^i) / \lambda} - e^{\varphi_n^j - \varphi_n^i} \right) \mathbf{1}_{\{ \varphi_n^j - \varphi_n^i \geq 0 \}} \mathrm{d}\mu^i, \end{multline*} % which is bounded above by zero since $\lambda = 1 + \varepsilon > 1$ and $e^{x / \lambda} \leq e^{x}$ for $x \geq 0$. This finishes the proof of part (a) of Proposition \ref{prop:results:detailed_balance_limit_I}. % \end{proof} % % \begin{proof}[Proof of (b) of Proposition \ref{prop:results:detailed_balance_limit_I}] It is sufficient to show that for any $\mu \in \mathbf{P}$, the Donsker-Varadhan functional~$I_p(\mu)$ satisfies~\eqref{MM:eq:DV-functional-after-shift}. Integration by parts gives \begin{multline*} I_p(\mu) = -\inf_{\varphi} \sum_i \int_{\mathbb{T}^d} \bigg[ -\frac{1}{2} \nabla\varphi^i \nabla(\log \overline{\mu}^i) + \frac{1}{2}|\nabla\varphi^i|^2 +(p-\nabla\psi^i) \nabla\varphi^i \\+ \sum_j r_{ij} \left( e^{\varphi^j - \varphi^i} - 1 \right) \bigg] \mathrm{d} \mu^i, \end{multline*} % where $ \mathrm{d} \mu^i = \overline{\mu}^i \mathrm{d} x$. By a density argument, the infimum can be taken over functions in~$L^{1,2}_{\mu^i}(\mathbb{T}^d)$. Now shifting in the infimum as~$\varphi_i\to\varphi_i+\frac{1}{2}\log(\overline{\mu}_i) + \psi^i$, we find after some algebra that \begin{multline*} I_p(\mu) = -\inf_\varphi \sum_i \int_{\mathbb{T}^d} \bigg[ \frac{1}{2} |\nabla\varphi^i + p|^2 - \frac{1}{2} | (p - \nabla\psi^i) - \frac{1}{2} \nabla \log\overline{\mu}^i|^2 \\+ \sum_j r_{ij} \left( \sqrt{\frac{\overline{\mu}^j}{\overline{\mu}^i}} e^{\psi^j - \psi^i} e^{\varphi^j - \varphi^i} - 1\right) \bigg]\, \mathrm{d}\mu^i. \end{multline*} The term containing the square roots and logarithms are not singular since they are integrated against $ \mathrm{d}\mu^i$, so that the integration is over the set $\{\overline{\mu}^i > 0\}$. Now writing out the terms and reorganizing them leads to the claimed equality. % \end{proof} % \section{Principal eigenvalues and their variational representations} \sectionmark{Principal eigenvalues} \label{appendix:prinipal_ev} In this section, we collect some results about the principal eigenvalue problems that we encounter in this chapter. \begin{definition}[Irreducible M-matrix] A matrix $P \in \mathbb{R}^{d\times d}$ is an \emph{irreducible M-matrix} if $P = s\mathbf{1} - R$, with some $s\in \mathbb{R}$ and an irreducible matrix $R \geq 0$ with non-negative elements. \label{def:appendix:PrEv:irreducible_M_matrix} \end{definition} The eigenvalue problems are the following: \begin{enumerate}[(E1)] \item For an irreducible M-matrix~$P \in \mathbb{R}^{d \times d}$, find a real eigenvalue $\lambda$ and a corresponding eigenvector $v > 0$ that has strictly positive components $v_j > 0$, such that $P v = \lambda v$. The eigenvalue problems arising for the discrete models (Lemmas \ref{lemma:LDP_MM:discrI:principal_ev} and \ref{lemma:LDP_MM:discrII:principal_ev}) are of that type. % \item For a second-order uniformly elliptic operator given by % \begin{equation} P = -\sum_{k \ell} a_{k \ell}(\cdot) \frac{\partial^2}{\partial x^k \partial x^\ell} + \sum_k b_k(\cdot) \frac{\partial}{\partial x^k} + c(\cdot), \label{eq:appendix:uniform_elliptic_op} \end{equation} % with smooth coefficients $a_{k \ell}, b_k, c \in C^\infty(\mathbb{T}^d)$, find a real eigenvalue $\lambda$ and a corresponding strictly positive eigenfunction $u$ such that $P u = \lambda u$. This corresponds to the eigenvalue problem in Lemma \ref{lemma:LDP_MM:contII:principal_eigenvalue}, with $a_{k \ell} = 1$. % \item For a coupled system of second-order elliptic operators on $\mathbb{T}^d$, find a real eigenvalue $\lambda$ and a vector of strictly positive functions $u = (u^1, \dotsm u^J)$, $u^i > 0$ on $\mathbb{T}^d$, such that % \begin{equation} \left[ \begin{pmatrix} L^{(1)} & & 0 \\ & \ddots & \\ 0 & & L^{(J)} \end{pmatrix} - \begin{pmatrix} R_{11} & & \geq 0 \\ & \ddots & \\ \geq 0 & & R_{JJ} \end{pmatrix} \right] \begin{pmatrix} u^1 \\ \vdots \\ u^J \end{pmatrix} = \lambda \begin{pmatrix} u^1 \\ \vdots \\ u^J \end{pmatrix}, \label{eq:appendix:PrEv:eigenproblem:coupled_system_of_elliptic_op} \end{equation} % where $L : C^2(\mathbb{T}^d)^J \rightarrow C(\mathbb{T}^d)^J$ is a $J\times J $ diagonal matrix of uniformly elliptic operators, % \begin{align} L = \begin{pmatrix} L^{(1)} & & 0 \\ & \ddots & \\ 0 & & L^{(J)} \end{pmatrix},\;L^{(i)} = -\sum_{k \ell}^J a_{k \ell}^{(i)}(\cdot) \frac{\partial^2}{\partial x^k \partial x^\ell} + \sum_k^J b^{(i)}_k(\cdot)\frac{\partial}{\partial x^k} + c^{(i)}(\cdot), \label{eq:appendix:elliptic_operators_in_coupled_system} \end{align} % with % $ a_{k \ell}^{(i)}(\cdot), b_k^{(i)}(\cdot), c^{(i)}(\cdot) \in C^\infty(\mathbb{T}^d), $ % and $R$ is a $J\times J$ matrix with non-negative functions on the off-diagonal, % \begin{align*} R = \begin{pmatrix} R_{11} & & \geq 0 \\ & \ddots & \\ \geq 0 & & R_{JJ} \end{pmatrix}, \qquad R_{ij} \geq 0 \text{ for all } i \neq j. \end{align*} % Coupled systems of this type appear in Lemma \ref{lemma:LDP_MM:contI:principal_eigenvalue}. % \end{enumerate} % The principal-eigenvalue problems (E1), (E2) and (E3) can be solved by means of the Krein-Rutman Theorem. We recall the setting of the Theorem. \begin{definition}[{Ordered Banach space $\left(X,\geq\right)$~ \cite[Appendix 4]{dautray2000spectral}}] For a real Banach space $X$, a closed set $K\subseteq X$ with nonempty interior is called a \emph{cone} if i) $0 \in K$, ii) whenever $v,w\in K$ then $av + bw \in K$ for all reals $a,b \geq 0$, iii) if $v\in K$ and $(-v)\in K$, then $v = 0$, and iv) $X = K - K$. For given $v,w\in X$, we write $v \geq w$ if $ v- w \in K$, and denote the elements $v$ in $K$ as $v\geq 0$ the elements in the interior $\mathring{K}$ as $v>0$. Further, $K^\ast \subseteq X^\ast$ is called a \emph{dual cone} if for all $\ell \in K^\ast$, $\langle \ell, v \rangle \geq 0$ whenever $v\ \geq 0$. We write $(X,\geq)$ for an ordered Banach space $X$, where the order $\geq$ is defined by means of a cone $K$. \end{definition} % For an ordered Banach space $(X,\geq)$ and an operator $P:\mathcal{D}(P)\subseteq X \rightarrow X$, we want to find a strictly positive eigenvector~$u>0$ with an associated eigenvalue~$\lambda \in \mathbb{R}$ such that % \begin{equation} P u = \lambda u. \tag{PrEv} \label{eq:solving_principal_ev:basic_ev_equation} \end{equation} The problems (E1), (E2) and (E3) are of this type, in the following settings: % \begin{enumerate}[(E1)] \item $X = \mathbb{R}^d$, with cone $K = \{v\in\mathbb{R}^d : v_j\geq 0,\,j =1,\dots,d\}$, and corresponding interior $\mathring{K} = \{ v \in K : v_j > 0,\,j=1,\dots,d\}$. The operator $P: \mathbb{R}^d \to \mathbb{R}^d$ is an irreducible M-matrix. % \item $X = C(\mathbb{T}^d)$, with cone $K = \{ f \in X: f \geq 0\}$ and corresponding interior $\mathring{K} = \{f\in X : f > 0\}$. The operator $P : C^2(\mathbb{T}^d) \subseteq C(\mathbb{T}^d) \to C(\mathbb{T}^d)$is~\eqref{eq:appendix:uniform_elliptic_op}. % \item $X = C(E^\prime)$, with $E^\prime = \mathbb{T}^d \times \{1, \dots, J\}$ and cone $K = \{f \in X: f(x,i) \geq 0,\, x \in \mathbb{T}^d\, i = 1,\dots,J\}$, and interior $\mathring{K} = \{f\in K : f(\cdot,i) > 0,\,i = 1,\dots,J\}$. We identify $C(E^\prime)$ with $C(\mathbb{T}^d)^J$ via $f(x,i) = f^i(x)$, $f = (f^1, \dots, f^J)$. % \end{enumerate} An operator $B : \mathcal{D}(B) \subseteq X \rightarrow X$ is is called positive if $f\geq 0$ implies $Bf \geq 0$, and is called strongly positive if $f\geq 0$ and $f \neq 0$ imply $Bf > 0$. % \begin{theorem}[Krein-Rutman, Appendix 4 in \cite{dautray2000spectral}] Let $(X,\geq)$ be an ordered Banach space and $T :X \rightarrow X$ be a linear bounded operator. If $T$ is also compact and strongly positive, then there exist unique $g>0$ and $g^\ast > 0$ such that % \[ T g = r(T) g, \; \|g\|_X =1, \qquad \text{and} \qquad T^\ast g^\ast = r(T) g^\ast, \; \|g^\ast\|_{X^\ast} = 1, \] % with $T^\ast$ the dual operator to $T$, and $\langle g^\ast , f\rangle >0$ whenever $f\geq 0$ and $f\neq 0$. Here, $r(T) = r(T^\ast) $ is the spectral radius of $T$. \label{thm:appendix:solving_principal_ev:KR-theorem} \end{theorem} % \begin{theorem}[Positive and compact resolvant implies existence of a principal eigenvalue] If for some $\alpha \in \mathbb{R}$, $P_\alpha := P + \alpha \mathbf{1}$ is such that $T_\alpha := P_\alpha^{-1}$ exists as a linear bounded operator $T_\alpha :X \rightarrow X$ that is compact and strongly positive, then \eqref{eq:solving_principal_ev:basic_ev_equation} holds with $\lambda = \frac{1}{r(T_\alpha)} - \alpha$ and eigenfunction $u = T_\alpha g$, where $g$ satisfies $T_\alpha g = r(T_\alpha) g$. Furthermore, $\lambda \in \mathbb{R}$ is the unique eigenvalue with a strictly positive eigenvector. \label{thm:appendix:solving_principal_ev:apply_KR} \end{theorem} % \begin{proof}[Proof of Theorem \ref{thm:appendix:solving_principal_ev:apply_KR}] By the Krein-Rutman Theorem \ref{thm:appendix:solving_principal_ev:KR-theorem}, there exists a $g>0$ such that $T_\alpha g = r(T_\alpha) g$. By strong positivity of $T_\alpha$, we have $u:= T_\alpha g > 0$, and in particular $r(T_\alpha) >0$. By definition of $T_\alpha$ as the solution operator $h\mapsto f$ of $P_\alpha f =h$, the vector $u \in \mathring{K}$ satisfies $P_\alpha u = \frac{1}{r(T_\alpha)} u$, and \eqref{eq:solving_principal_ev:basic_ev_equation} follows with principal eigenvalue $\lambda = \frac{1}{r(T_\alpha)} - \alpha$ and strictly positive eigenfunction $u > 0$. Regarding uniqueness of the eigenvalue $\lambda$, note that every solution to \eqref{eq:solving_principal_ev:basic_ev_equation} defines an eigenfunction for $T_\alpha$, by shifting with $\alpha$. Thus two independent solutions to \eqref{eq:solving_principal_ev:basic_ev_equation} would correspond to two independent solutions to $T_\alpha g = r(T_\alpha) g$, contradicting the uniqueness (after normalization) of $g>0$ in the Krein-Rutman Theorem. \end{proof} % Theorem \ref{thm:appendix:solving_principal_ev:apply_KR} applies to the eigenvalue problems (E1), (E2) and (E3). \begin{proposition} In the setting (E1), if $P \in \mathbb{R}^{d \times d}$ is an irreducible M-matrix, then there exists an eigenvector $u>0$ and a unique principal eigenvalue $\lambda \in \mathbb{R}$ such that \eqref{eq:solving_principal_ev:basic_ev_equation} holds. The principal eigenvalue~$\lambda$ is given by % $$ \lambda = \sup_{w > 0} \inf_{i \in \{1, \dots, J\}} \frac{P w(i)}{w(i)}. $$ % \label{proposition:appendix:PrEv:M_matrix} \end{proposition} % % \begin{proposition} In the setting (E2), let $P$ be given by~\eqref{eq:appendix:uniform_elliptic_op}. Then there exists a strictly positive eigenfunction $u \in C^\infty(\mathbb{T}^d)$ and a unique principal eigenvalue $\lambda \in \mathbb{R}$ satisfying \eqref{eq:solving_principal_ev:basic_ev_equation}. The principal eigenvalue~$\lambda$ is given by % $$ \lambda = \sup_{g > 0} \inf_{x\in \mathbb{T}^d} \left[\frac{P g(x)}{g(x)}\right] = \inf_{\mu \in \mathcal{P}(\mathbb{T}^d)} \sup_{g > 0} \left[ \int_{\mathbb{T}^d} \frac{Pg}{g} \,d\mu \right]. $$ % \label{proposition:appendix:PrEv:elliptic_op} \end{proposition} % % \begin{proposition} In the setting (E3), let~$L$ be given by~\eqref{eq:appendix:PrEv:eigenproblem:coupled_system_of_elliptic_op} and~\eqref{eq:appendix:elliptic_operators_in_coupled_system}. Suppose that the matrix $\overline{R}$ with entries $\overline{R}_{ij} := \sup_{y \in \mathbb{T}^d} R_{ij}(y)$ is irreducible. Then for the operator $P:= L - R$, there exists a unique principal eigenvalue $\lambda \in \mathbb{R}$ and a strictly positive eigenvector $u \in \left(C^\infty(\mathbb{T}^d)\right)^J$, $u^i(\cdot) > 0$ for all $i = 1, \dots, J$, solving \eqref{eq:solving_principal_ev:basic_ev_equation}. Furthermore, the principal eigenvalue is given by % $$ \lambda = \sup_{g > 0} \inf_{z \in E^\prime} \left[\frac{P g(z)}{g(z)}\right] = \inf_{\mu \in \mathcal{P}(E^\prime)} \sup_{g > 0} \left[ \int_{E^\prime} \frac{Pg}{g} \,d\mu \right]. $$ % \label{proposition:appendix:PrEv:fully_coupled_system} \end{proposition} % The principal eigenvalue problem on closed manifolds, such as $\mathbb{T}^d$, is solved for instance by Padilla \cite{padilla1997principal}. Donsker and Varadhan's variational representations \cite{DonskerVaradhan75, DonskerVaradhan76} apply to the case of compact metric spaces without boundary. A proof of how to obtain the principal eigenvalue for coupled systems of equations is given by Sweers \cite{Sweers92} and Kifer \cite{kifer1992principal}. Sweers considers a Dirichlet boundary problem, but his results transfer to the compact setting without boundary. Kifer gives an independent proof for the case of a compact manifold, in Lemma 2.1 and Proposition 2.2 in \cite{kifer1992principal}. \chapter{Large Deviations of Empirical Measures} \label{chapter:LDP-of-empirical-measures} \section{Introduction} In this chapter, we are motivated by the task of sampling from a distribution~$\pi$ with density with respect to Lebesgue measure given by \begin{align*} \mathrm{d} \pi (y) = C^{-1}e^{-U(y)}\, \mathrm{d} y, \quad C = \int_E e^{-U(y)}\, \mathrm{d} y, \end{align*} for some potential function $U: E \to \mathbb{R}$ and state space $E$. The most common approach is to use Markov chain Monte Carlo (MCMC) methods, which are now essential tools in areas such as computational statistics, molecular dynamics and machine learning~\cite{RobertCasella2004,AsmussenGlynn07,AndrieuEtAl03}. \smallskip The idea behind MCMC is to construct a Markov process $Y_t$ with $\pi$ as the invariant measure and use the corresponding empirical measure to obtain approximations. For example, under ergodicity, for any observable $f \in L^1 (\pi)$ we have almost surely \begin{equation*} \lim_{t\to\infty} \frac{1}{t}\int_0^t f(Y_s)\, \mathrm{d} s = \int_E f(y)\,\pi( \mathrm{d} y). \end{equation*} Therefore, for $t>0$ large, $\frac{1}{t} \int _0 ^t f(Y_s)\, \mathrm{d} s$ can be used to approximate the expected value $\int_E f (y) \pi ( \mathrm{d} y)$. Although many standard MCMC constructions, such as the Metropolis-Hastings algorithm \cite{Metropolis1953}, can be used to sample from essentially any target distribution $\pi$, most suffer from slow convergence to the invariant distribution or heavy computational costs per iteration. Designing new, efficient dynamics has therefore become an important research direction within applied probability. \smallskip Over the last decade, piecewise-deterministic Markov processes (PDMPs) have emerged as a new tool for the numerical simulation of probability distributions. An introduction to these processes is offered by Davis' monograph~\cite{davis1984piecewise}. The two main examples of such processes used in MCMCs are the Bouncy Particle Sampler and the Zig-Zag Sampler \cite{BouchardCoteVollmerDoucet2017,bierkens2019zig}, after similar ideas appeared first in~\cite{PetersDeWith2012} and~\cite{Monmarche2016}. The idea of using PDMPs extends the ubiquitous discrete time MCMC methodology towards a new continuous time approach, having several advantageous aspects. First, by construction PDMPs are irreversible Markov processes, which typically results in a smaller asymptotic variance as compared to reversible methods. For instance, Duncan, Lelièvre and Pavliotis demonstrate variance reduction for irreversible Langevin samplers~\cite{DuncanLelievrePavliotis2016}. We refer to~\cite{Andrieu2019a} for a recent study of this effect, and to~\cite{bierkens2019zig,Fearnhead2016a} for details of the computational aspects of PDMP trajectories on a computer. \smallskip In order to employ this new PDMP methodology a solid understanding of the mathematical properties of these methods is necessary. Whereas the theoretical properties of PDMPs have been an active research area in recent years, our understanding of the performance of the corresponding MCMC methods is still incomplete. In particular knowledge of the speed of convergence of time averages is essential in choosing the most suitable sampling technology for a particular problem and in tuning the parameters of the chosen method. In the spirit of recent work on empirical measure large deviations in the MCMC context \cite{dupuis2012infinite, rey2015irreversible}, we propose the use of large deviation results for studying and comparing the performance of PDMPs. \smallskip In summary, the main contributions we develop in this chapter are: \begin{itemize} \item A semigroup approach to establish the large deviation principles for the empirical measures of a class of Markov processes satisfying assumptions aimed at position-velocity PDMPs. \item The large deviation principle for empirical measures of the zig-zag process in both a compact and non-compact setting. \item A derivation of an explicit form of the rate function associated with the zig-zag process. \item Evaluation of the zig-zag rate function as a function of the additional switching rate $\gamma$, providing an answer to a key question about the switching rate. \end{itemize} Donsker and Varadhan studied large deviations for empirical measures in a series of papers~\cite{donsker1975asymptoticI, donsker1975asymptoticII, DonskerVaradhan76}. In the simulation context it is well-known that for rare-event simulation, sample-path large deviations play an important r\^ole in evaluating and designing efficient algorithms ; see \cite{AsmussenGlynn07, Bucklew04, BudhirajaDupuis2019} and references therein. In contrast, empirical measure large deviations are much less explored as a tool for analysing Monte Carlo methods. Standard measures for analysing the efficiency of methods based on ergodic Markov processes include the spectral gap of the associated semigroup and the asymptotic variance for given observables, see for example \cite{Rosenthal2003, BedardRosenthal08,DiaconisHolmesNeal00,FrankeEtAl10,FrigessiEtAl93,HwangHwangSheu05, MengersenTweedie96, RobertsRosenthal04}. However these measures are not necessarily appropriate for studying the rate of convergence, as they only link indirectly to the empirical measure, the quantity of interest in Monte Carlo methods. Empirical measure large deviations on the other hand connect explicitly to the relevant properties, such as the transient behaviour of the underlying process. In a similar spirit, \cite{BirrellRB19} recently used concentration inequalities to obtain non-asymptotic performance guarantees for PDMPs. \smallskip The first results using empirical measure large deviations for the analysis of MCMC methods were obtained in~\cite{plattner2011infinite, dupuis2012infinite}. Therein empirical measure large deviations, specifically the associated rate function, was proposed as a tool for analysing parallel tempering, one of the computational workhorses of the physical sciences, leading to a new type of simulation method (infinite swapping). In the subsequent work~\cite{DDN2018} empirical measure large deviations were again used, combined with associated stochastic control problems, to analyse the convergence properties of these algorithms. Similarly, in~\cite{rey2015irreversible} Rey-Bellet and Spiliopoulos use empirical measure large deviations to analyse the performance of certain irreversible MCMC samplers. \smallskip The work by Donsker and Varadhan is the starting point for many results and application of empirical measure large deviations and their work has been extended in numerous directions, see e.g.\ \cite{DemboZeitouni1998, FengKurtz2006, BudhirajaDupuis2019} for an overview and further references. However, naively applying the existing theory to PDMPs does not work since the transition probabilities are not sufficiently regular: for every $t > 0$ there is a positive probability that the process has not switched by time $t$, resulting in an atomic component of the Markov transition kernel. As a first step towards using empirical measure large deviations for analysing the performance of PDMPs we must therefore establish the relevant large deviations principles. \smallskip In this chapter, our focus is to establish general large deviation results aimed at PDMPs and then to specialize to the zig-zag process. In the process of proving the necessary large deviation results we consider a general class of Markov processes that can have position-velocity PDMPs, such as the bouncy particle and the zig-zag samplers, as special cases. In particular, this class includes processes that are not of diffusion type and irreversible processes. When specialising to the zig-zag process, we derive an explicit form of the rate function, going beyond the variational form typical for results of Donsker-Varadhan-type. To the best of our knowledge this is the first instance where an explicit form of the rate function has been obtained for irreversible processes that do not have a drift-diffusion character. \smallskip A key question for using the zig-zag process for MCMC is whether or not it is advantageous for convergence to use the minimal (canonical) switching rates, or if one should allow for additional switches according to a fixed refreshment rate $\gamma >0$. Our analysis of the rate function associated with the zig-zag process allows us to give a partial answer to this question: in Section~\ref{sec:rate} we establish that the rate function is decreasing as a function of the additional rate $\gamma$, establishing that from a large deviations perspective it is optimal to use the smallest possible rates, i.e.\ set $\gamma =0$. This goes in the opposite direction of the conclusion drawn from a spectral analysis (see \cite[Section 7.3]{BierkensVerduynLunel2019}), which shows at least a small benefit of increasing gamma beyond zero. This highlights the different nature of convergence of empirical averages by studying large deviations or asymptotic variance (e.g.~\cite{Andrieu2019a,BierkensDuncan2016}) and convergence to equilibrium, using e.g. the spectral gap to describe rate of convergence; We refert to~\cite{Rosenthal2003} for more on this phenomenon. Our conclusion is in line with the earlier observation that having more irreversibility increases the rate function~\cite{rey2015irreversible}: one can view increasing $\gamma$ as decreasing the extent of irreversibility inherent to the process. In that sense,~$\gamma=0$ corresponds to "maximal irreversibility" of the zig-zag process. The fact that the spectral gap can not always detect the benefits of irreversibility is best illustrated with the following example, which can also be found in~\cite[Example~2.9]{rey2015irreversible}. \paragraph{Example.} Consider the diffusion~$ \mathrm{d} X_t = v\, \mathrm{d} t + \mathrm{d} B_t$ on the one-dimensional flat torus~$\mathbb{T}$, where~$v$ is a parameter. We focus on the behavior of its empirical measure~$\eta_T$ defined on Borel subsets~$A\subseteq\mathbb{T}$ by \begin{equation*} \eta_T (A) = \frac{1}{T}\int_0^T\mathbf{1}_A\left(X_t\right)\, \mathrm{d} t. \end{equation*} For a set~$A$,~$\eta_T(A)$ measures the fraction of time that the process~$X_t$ spends in~$A$. As~$T\to\infty$, the empirical measure converges to the uniform measure~$ \mathrm{d} x$ on~$\mathbb{T}$. We are interested in how the convergence rate depends on the drift~$v$. The spectrum of its generator~$L_v=v\nabla + (1/2)\Delta$ is \begin{equation*} \sigma(L_v) =\left\{-n^2 + inv\,:\,n\in\mathbb{Z}\right\}. \end{equation*} Hence the spectral gap is~$-1$, and is in particular independent of~$v$. Therefore, the spectral gap does not provide us with any information about how the rate of convergence changes with~$v$. However, for a measure~$ \mathrm{d}\mu(x) = u(x)\, \mathrm{d} x $ with a smooth and positive density~$u$, the Donsker-Varadhan rate function for the empirical measure is \begin{equation*} \mathcal{I}_v(\mu) = \frac{1}{8}\int_\mathbb{T}\left|\nabla \log u\right|^2\, \mathrm{d}\mu + \frac{1}{2} \,v^2 \left(1-\frac{1}{\int_\mathbb{T}\frac{1}{u(x)} \mathrm{d} x}\right). \end{equation*} The family~$\{\eta_T\}_{T>0}$ satisfies a large deviation principle with this rate function in the limit~$T\to\infty$. Informally, this means \begin{equation*} \mathbb{P}\left(\eta_T \approx \mu\right) \sim e^{-T\,\mathcal{I}_v(\mu)},\quad T\to\infty. \end{equation*} In conclusion, for higher values of~$v$, the empirical measure converges faster to the uniform measure, since rate function increases with increasing~$v$. The limit of~$\eta_T$ is independent of~$v$; we always find~$\mathcal{I}_v( \mathrm{d} x)=0$.\qed \smallskip Evaluation of the large deviation rate function for empirical measures, beyond the variational form given by Donsker and Varadhan, is typically a challenging task. For the diffusion setting, including both reversible and irreversible processes, see \cite{dupuis2018large} and the references therein. In \cite{dupuis2015large} the authors consider reversible jump Markov processes and use stochatic control and weak convergence arguments to derive an explicit form of the rate function. Lastly, in the MCMC context, \cite{rey2015irreversible} consider diffusion processes on a compact manifold where the drift can be decomposed into sufficiently smooth reversible and irreversible parts. The rate function can then be expressed in terms of the rate function of a related reversible diffusion and the solution of an elliptic PDE associated with the irreversible component of the drift. \smallskip The proofs of the large deviation results are based on the general Hamilton-Jacobi approach to empirical measures developed by Feng and Kurtz in~\cite[Chapter 12]{FengKurtz2006}. We describe this approach, in the context of this paper, in more detail in Section~\ref{sec:aux}. \smallskip The remainder of this chapter is organised as follows. In Section \ref{sec:prelim} we give the necessary preliminaries: notation and relevant definitions, background on the zig-zag process and empirical measure large deviations. In particular we recall well-known large deviation results for empirical measures by Donsker and Varadhan. The main results are then presented in Section \ref{sec:main}. The section is split into the main assumptions and general large deviation statements (Section \ref{sec:gen_LDP}), large deviation results for the zig-zag process (Section \ref{sec:LDP_zigzag}) and an explicit expression of the rate function associated with the zig-zag process (Section \ref{sec:rate}). All proofs are deferred to Section \ref{sec:proofs}. \section{Preliminaries} \label{sec:prelim} \subsection{Notation and definitions} \label{sec:notation} Throughout this chapter, $E$ will denote a complete separable metric space (Polish space) and $\mathcal B (E)$ the relevant $\sigma$-algebra on $E$; unless otherwise stated this is taken to be the Borel $\sigma$-algebra. $C(E)$ and $C_b(E)$ are the spaces of functions $f : E \to \mathbb{R}$ that are continuous and bounded continuous, respectively. The space of continuous and right-continuous functions from $[0, \infty)$ to $E$ is denoted by $C_E[0, \infty)$ and $D_E [0,\infty)$, respectively. A sequence of functions $\{ f_n \}_n$ on $E$ converges {\it boundedly and uniformly on compacts} to a function $f$ if and only if $\sup _n \norm{f_n} < \infty$ and for each compact $K \subseteq E$, \begin{align*} \lim _{n\to \infty} \sup_{x \in K} | f_n(x) - f(x) | =0. \end{align*} This is denoted as $f = buc-\lim_{n\to \infty} f_n$. For a Markov process $Y = \{ Y_t: \ t \geq 0\}$, we denote by $S = \{ S(t): t \geq 0 \}$ the associated Markov semigroup. A semigroup $S(t)$ acting on $C(E)$ is {\it Feller continuous} if, for any $t$, $S(t) : C(E) \to C(E)$, {\it strongly continuous} if $S(t) f \to f$ as $t \to 0$ for any $f \in C(E)$ and {\it buc-continuous} if $buc-\lim _{t\to 0} S(t) f = f$ for $f \in C_b(E)$. For an operator $L$, $\mathcal D (L)$ denotes the domain of $L$. For functions in $\mathcal D (L)$, $\mathcal D ^+ (L)$ denotes those that are strictly positive and $\mathcal D^{++}(L)$ those that are positive and uniformly bounded from below by a positive constant. For a given $L$ we use $B$ to denote the extended generator associated with $L$. We use $\mathcal{P}(E)$ to denote the space of probability measures on $E$, and $\mathcal P _c (E)$ is the subset of probability measures with compact support. Throughout the paper we equip $\mathcal P (E)$ with the topology of weak convergence: $\rho _n \to \rho$ in this topology if \begin{align*} \int _E f(x) \rho _n (dx) \to \int _E f(x) \rho (dx), \ n\to \infty, \ \ \forall f \in C_b (E). \end{align*} A special case that will be considered several times is $\mathcal{P}(D_E [0,\infty))$, which is also equipped with the weak topology. For a process $\{ Y(t), t \geq 0 \}$ taking values in $E$ and $y \in E$, we denote by $\mathbb{P}_y \in \mathcal{P}(D_E [0,\infty) )$ the distribution of the process $Y(t)|_{t \geq 0}$ starting at~$y \in E$. The set of positive Borel measures on $E$ is denoted by $\mathcal M (E)$ and the set of finite Borel measures on $E$ are denoted by $\mathcal M _f (E) \subset \mathcal M (E)$. We let $\mathcal L (E)$ denote the following subset of $\mathcal M (E \times [0,\infty))$: \begin{align*} \mathcal L (E) = \{ z \in \mathcal M (E \times [0, \infty)): \ z(E \times [0,t]) = t, \ t \geq 0 \}. \end{align*} The set $\mathcal L (E)$ is endowed with the topology of weak convergence on bounded time intervals: for $\{ \rho_n \} \subset \mathcal L (E)$, $\rho_n \to \rho$ if for all $f \in C_b(E \times [0, \infty))$ and all $t \geq 0$, \begin{align*} \int _{E \times [0,t]} f(x,s) d\rho_n(x,s) \to \int _{E \times [0,t]} f(x,s) d\rho(x,s). \end{align*} Then $\mathcal L (E)$ is the set of Borel-measures on $E \times [0, \infty)$ of the form \begin{align*} d\rho (x,t) = \mu _t (dx) dt, \end{align*} for probability measures $\mu_t \in \mathcal P (E)$. That is , for every $\rho \in \mathcal L (E)$, there exists a measurable path $s \mapsto \mu_s \in \mathcal P (E)$ such that \begin{align*} \rho (A \times [0,t] ) = \int _0 ^t \mu _s (A)ds, \ \textrm{ for any } A \in \mathcal B (E), \ t >0. \end{align*} \subsection{Large deviations for empirical measures} \label{sec:intro_LDP} Consider a Markov process $Y = \{ Y_t: t \geq 0 \}$ taking values in a Polish space~$E$, with associated generator $L : \mathcal{D}(B) \subseteq C_b(E) \to C_b(E)$ and semigroup $S(t)$. The {\it empirical measure} $\eta_t$ associated with $Y_t$ is the stochastic process with values in $\mathcal{P}(E)$ defined by \begin{equation*} \eta_t (A) = \frac{1}{t} \int_0^t \boldsymbol{1}_A(Y_s)ds,\quad A \in \mathcal{B}(E). \end{equation*} Empirical measures play an important role in, for example, the settings of MCMC methods and steady-state simulations, via the pairing of measures and observables: For a probability measure $\mu \in \mathcal{P}(E)$ and a function $V \in C_b(E)$, we write \begin{equation*} \mu(V) = \int_E V(y) d\mu(y) \end{equation*} for the pairing of measures and observables. For the empirical measure $\eta_t$, this pairing corresponds to time averages, \begin{equation} \label{eq:etaV} \eta_t(V) = \frac{1}{t}\int_0^t V(Y_s) ds. \end{equation} If there is an invariant measure $\pi \in \mathcal{P}(E)$ associated with the generator $L$, ergodicity of the process $Y_t$ will ensure the convergence $\eta _t \to \pi$ as $t\to \infty$, w.p.\ 1 in $\mathcal P (E)$, from which it follows that for any $V \in C_b(E)$, \begin{align*} \eta_t(V) \to \pi(V) \quad \text{ as } t \to \infty, \; \mathbb{P}-a.s. \end{align*} Thus, time averages such as \eqref{eq:etaV} are precisely what is used to form approximations in Monte Carlo methods and there is a direct link between the performance of such simulation methods and the properties of the empirical measure. The theory of large deviations for empirical measures is concerned with deviations of $\eta _t$ from $\pi$ as $t$ grows large. Recall that the gist of the so-called large deviations principle is that for any $\rho \in \mathcal{P} (E)$, for large $t$ \begin{align*} \mathbb{P}_y (\eta _t \approx \rho) \sim \exp \left\{ -t \, \mathcal{I}(\rho) \right\}, \end{align*} where the function $\mathcal{I} : \mathcal P (E) \to [0,\infty]$ is the rate function associated with the process. This formula is just a short notation for Definition~\ref{def:LDP}; that means~$\mathcal{I}$ has compact sublevel-sets, and for any measurable subset $A \subseteq \mathcal P (E)$, we have \begin{align*} - \inf _{\mu \in \mathrm{int}(A)} I (\mu) &\leq \liminf _{t\to \infty} \frac{1}{t} \log \mathbb{P} \left(\eta _t \in A \right) \\ &\leq \limsup _{t\to \infty} \frac{1}{t} \log \mathbb{P} \left( \eta _t \in A \right) \leq -\inf _{\mu \in \mathrm{clos}(A)} I(\mu), \end{align*} where $\mathrm{int}(A)$ and $\mathrm{clos}(A)$ are the interior and closure of the set $A$. \smallskip Under relatively mild conditions on the dynamics of the process $Y$ the rate function will be strictly convex and satisfy $\mathcal{I}(\mu) =0$ if and only if $\mu = \pi$. Thus, the rate function characterises the exponential rate of decay of probabilities of sets not including the invariant distribution $\pi$. Moreover the rate function can be used to characterise {\it how} events may occur - for sets $A$ that do not include $\pi$, the minimisers of $\mathcal{I}$ over $A$ represent the behaviour $\eta _t$ is most likely to exhibit if $A$ occurs. For empirical measures of Markov processes, the rate function associated with an LDP can often be expressed using a variational form, obtained by Donsker and Varadhan~\cite{donsker1975asymptoticI}, involving the generator $L$ of the underlying process. For the compact setting, they proved the following result. \begin{theorem}[{\cite[Theorem 3]{donsker1975asymptoticI}}]\label{thm:proving_LDP:DV_I} Take $E$ to be a compact, complete separable metric space. Let $S(t)$ be a Markov semigroup acting on $C(E)$ equipped with the supremum norm, and let $L$ be the generator associated to $S(t)$. Assume the following: \begin{enumerate}[label =(DV.\arabic*)] \item\label{item:thm_DV_I:Feller} The semigroup is Feller continuous and strongly continuous. \item\label{item:thm_DV_I:reference_measure} There exists a probability measure $\lambda \in \mathcal{P}(E)$ such that for each $t > 0$ and $x\in E$, the transition probabilities $P(t,x,dy)$ are absolutely continuous with respect to $\lambda$, that is \begin{equation*} P(t,x,dy) = p(t,x,y) \lambda(dy), \end{equation*} for some $p$ with $0< a(t) \leq p(t,x,y) \leq A(t) < \infty$. \end{enumerate} Then the associated sequence $\{\eta_t\}_{t > 0}$ satisfies a large deviation principle in $\mathcal{P}(E)$, with rate function $\mathcal{I}: \mathcal{P}(E) \to [0,\infty]$ given by \begin{equation}\label{eq:proving_LDP:DV_rate_function} \mathcal{I}(\mu) = -\inf_{u \in \mathcal{D}^+(L)}\int_E \frac{Lu}{u} d\mu. \end{equation} \end{theorem} The theorem applies in particular to drift-diffusions taking values in a compact space. Roughly speaking, for such processes, with reasonable coefficients, the Feller-continuity is satisfied and the diffusive part ensures absolute continuity with respect to a volume measure $dx$. In \cite{rey2015irreversible} Rey-Bellet and Spiliopoulos use this result to study performance of specific irreversible MCMC methods based on drift-diffusions; their Assumption~(H) allows for an application of Theorem \ref{thm:proving_LDP:DV_I}. Condition~\ref{item:thm_DV_I:reference_measure} is a reasonable transitivity assumption for processes that involve a diffusive term. However, this condition excludes many interesting examples, such as continuous-time jump processes, see e.g.\ \cite{dupuis2015large}. The issues highlighted therein are present also for the zig-zag process on $\mathbb{R} \times \{ \pm 1\}$: in a sense, the absence of a diffusive operator excludes the possibility of finding a suitable reference measure. If the process $Y_t$ is reversible with respect to the reference measure, that is $p(t,x,y) = p(t,y,x)$, then the rate function takes a more explicit form, see e.g.\ Theorem~5 in~\cite{donsker1975asymptoticI}. However, our interests are explicitly in irreversible processes, such as the zig-zag process, and therefore such representations are not available. In conclusion, while Theorem \ref{thm:proving_LDP:DV_I} can be a starting point for many drift-diffusion processes, it is not a sufficient tool for many other interesting processes, including the position-velocity PDMPs. In order to use large deviation results to study performance of such MCMC algorithms we must first overcome this obstacle and establish the relevant large deviations principles. In~\cite{dupuis2018large}, Dupuis and Lipshutz consider large deviations of empirical measures of $\mathbb{R}^d$-valued drift-diffusions. Their Condition~2.2 corresponds to a type of stability criterion in terms of a Lyapunov function. A transitivity property similar to Condition~\ref{item:thm_DV_I:reference_measure} of Theorem~\ref{thm:proving_LDP:DV_I} is satisfied due to the diffusive part, and they prove a different, explicit representation of the rate function, assuming only standard regularity conditions on the coefficients. In particular, this representation holds for irreversible drift-diffusions. \subsection{The zig-zag process} \label{sec:zig-zag} In this section we will discuss very concisely the zig-zag process. As discussed in the introduction the zig-zag process is an example of a piecewise deterministic Markov process \cite{davis1984piecewise}. As the name indicates, a piecewise deterministic Markov process is a Markov process with deterministic trajectories, in between event times at which the process makes a discontinuous change. For the one-dimensional zig-zag process, the state space is either $E = \mathbb R \times \{\pm 1\}$ or $E = \mathbb{T} \times \{\pm 1\}$ and a typical state is denoted in this paper by $(x,v)$. Here $x$ represents a position and $v$ a velocity. Starting from $(x,v)$ at time $t= T_0 := 0$, the dynamics of a Markov process $(X_t, V_t)$ are given, until the first (random) event time $T_1 > 0$, by \[ (X_t, V_t) = (x +t v, v), \quad 0 \leq t < T_1.\] In other words, the position changes according to the constant velocity $v$, which itself does not change in between event times. The random time $T_1$ at which the first event happens is distributed according to \[ \P_{x,v}(T_1 \geq t) = \exp \left( -\int_0^t \lambda(X_s, V_s) \, d s \right) = \exp \left( -\int_0^t \lambda(x + vs, v) \, d s \right),\] where $\lambda : E \rightarrow [0,\infty)$ is the \emph{event rate}, which is in the case of the zig-zag process also known as the \emph{switching rate}, which we will discuss in more detail below. At an event time $T$ the velocity changes sign and the position remains unchanged: \[ V_{T_1} = -V_{T_1-} \quad \text{and} \quad X_{T_1} = X_{T_1-}.\] From the time $T_1$ onward, the process repeats the dynamics described above: for $i = 1, 2, \dots$ \begin{align*} & X_t = X_{T_{i-1}} +(t- T_{i-1}) V_{T_{i-1}}, \quad V_t = V_{T_{i-1}}, \quad T_{i-1}\leq t < T_{i}, \\ & \P(T_i \geq t \mid T_{i-1}, X_{T_{i-1}}, V_{T_{i-1}}) = \exp \left( -\int_{T_{i-1}}^t \lambda(X_{T_{i-1}} + s V_{T_{i-1}}, V_{T_{i-1}}) \, d s \right), \\ & X_{T_i} = X_{T_i-}, \quad V_{T_i} = -V_{T_i-}. \end{align*} The switching rate $\lambda : E \rightarrow \mathbb R$ is assumed to be continuous. If $\lambda$ satisfies \begin{equation} \label{eq:switching-intensity-condition-1} \lambda(x, 1) - \lambda(x,-1) = U'(x), \end{equation} for a continuously differentiable function $U$, then the measure defined by \begin{equation*} \pi( \mathrm{d} x, \mathrm{d} v) = \exp(-U(x)) \, \mathrm{d} x \otimes \mathrm{Unif}_{\pm 1}( \mathrm{d} v) \end{equation*} is a stationary measure for $(X_t, V_t)$. An equivalent condition to~\eqref{eq:switching-intensity-condition-1} is that for some continuous non-negative function $\gamma(x)$, we have \begin{equation} \label{eq:switching-intensity-condition-2} \lambda(x,v) = \max (0, v U'(x)) + \gamma(x). \end{equation} Here $(\max 0, vU'(x))$ is called the \emph{canonical switching intensity}, and $\gamma$ is called the \emph{excess switching intensity} or \emph{refreshment rate}. As a rule of thumb, high values of~$\gamma$ lead to many switches of the velocity. We study the dependence of the empirical measure of the process~$(X_t, V_t)$ on~$\gamma$ in Section~\ref{sec:rate}. \smallskip The zig-zag process can be extended in a natural way to a multi-dimensional process in $\mathbb R^d \times \{\pm 1\}^d$ (\cite{bierkens2019zig, bierkens2019ergodicity}). Since we focus in this paper on properties of the one-dimensional process we will not discuss this extension here. The ergodic properties of the zig-zag process are essential in order to establish a large deviation principle for the empirical measure. Under mild conditions it can be shown that the zig-zag process is exponentially ergodic, which is proven in~\cite{BierkensRoberts2017} for the one-dimensional case and in~\cite{bierkens2019ergodicity} for the multi-dimensional zig-zag process. Finally, by \cite[Theorem 26.14]{Davis1993}, the extended generator of the zig-zag process is given by \[ B f(x,v) = v \partial_x f(x,v) + \lambda(x,v) [ f(x,-v) - f(x,v)], \quad (x,v) \in E,\] with \[ \mathcal D(B) = \{ f : E \rightarrow \mathbb R : f(\cdot,v) \, \text{is absolutely continuous for } v = \pm 1\}.\] \section {Large deviations for empirical measures of PDMPs} \label{sec:main} In this section we present our main results: we establish a large deviations principle for the empirical measure of a Markov process under fairly general assumptions which include in particular examples of position-velocity PDMPs such as the zig-zag process. After obtaining these general results we focus for concreteness on the zig-zag process, for which we verify the stated assumptions. We also give an explicit characterisation of the corresponding rate function, a necessary step towards using the LDP for analysing the performance and properties of approximations based on the zig-zag process. To streamline the presentation we split the analysis according to whether we consider a compact or non-compact state space~$E$. \smallskip To facilitate the proof of the LDP for the empirical measures, we first formulate in Section~\ref{sec:gen_LDP} two more general large deviations results (compact and non-compact setting) for empirical measures arising from certain continous-time stochastic processes. We then show that the zig-zag process is a special case in this class of processes in Section \ref{sec:LDP_zigzag}. It is worth to emphasise that we do not aim for greatest generality in the large deviations results Theorems \ref{thm:proving_LDP:LDP_compact} and \ref{thm:proving_LDP:LDP_non_compact}. Rather, we settle for conditions that make the general conditions of Lemma \ref{lemma:FengKurtz} more transparent and concrete whilst still allowing us to prove the large deviations principle for the empirical measures of the zig-zag process. \subsection{Results aimed at position-velocity PDMPs} \label{sec:gen_LDP} Before we specialize to the zig-zag process, we consider the setting described in Section~\ref{sec:notation} to PDMPs: $Y$ is a Markov process taking values in a locally compact complete separable metric space $E$, with associated semigroup $S(t)$ and infinitesimal generator $L$. We also make use of the extended generator $B$; see \cite{Davis1993,EthierKurtz1986} and Section~\ref{sec:zig-zag}. Typically, $E=\mathbb{R}^d\times\mathcal{S}$ where $\mathbb R^d$ is the state space for a position variable $X_t$ and $\mathcal{S}$ is a compact set that models the state space of the velocity variables $V_t$. For the zig-zag process, $\mathcal{S}=\{\pm 1\}^d$, and for the Bouncy Particle Sampler $\mathcal S$ can be taken to be the $(d-1)$-dimensional unit sphere. Note that for $d =1 $ these two choices coincide. \smallskip The following are the assumptions we will impose in order to establish an LDP for the empirical measures of the process $Y$. Not all conditions are required at the same time: we impose conditions~\ref{item:thm_LDP_compact:Feller}, \ref{item:thm_LDP_compact:tight} and~\ref{item:thm_LDP_compact:principal_eigenvalue} for the compact case and \ref{item:thm_LDP_compact:Feller}, \ref{item:thm_LDP_compact:tight}, \ref{item:thm_LDP_non_compact:Lyapunov} and~\ref{item:thm_LDP_non_compact:mixing} for the non-compact case. \begin{enumerate}[label = (A.\arabic*)] \item\label{item:thm_LDP_compact:Feller} The semigroup $S(t)$ is a Feller semigroup. \item\label{item:thm_LDP_compact:tight} For any compact set $K\subseteq E$, the set of measures $\{\mathbb{P}_y: y \in K\}$ is tight in $\mathcal{P}(D_E[0,\infty))$. \item\label{item:thm_LDP_compact:principal_eigenvalue} For any function $V \in C(E)$, there exists a function $u \in \mathcal{D}^+(L)$ and a real eigenvalue $\beta \in \mathbb{R}$ such that pointwise on $E$, \begin{equation*} (V+L) u = \beta u. \end{equation*} \item\label{item:thm_LDP_non_compact:Lyapunov} There exist two non-negative functions $g_1,g_2 \in C(E;[0,\infty))$ such that: \begin{enumerate} \item\label{item:thm_LDP_non_compact:Lyapunov1} For any $\ell \geq 0$, the sublevel-sets $\{g_i\leq \ell\}$ are compact and $g_i(y)\to\infty$ as $|y|\to\infty$, \item\label{item:thm_LDP_non_compact:Lyapunov2} $g_1(y)/g_2(y) \to 0$ as $|y|\to\infty$, \item\label{item:thm_LDP_non_compact:Lyapunov3} $e^{g_i} \in \mathcal D(B)$, for any $c\in\mathbb{R}$ the superlevel-sets $\{y\in E\,:\,e^{-g_i(y)} B(e^{g_i})(y)\geq c\}$ are compact, and $e^{-g_1(y)} B(e^{g_1})(y)\to-\infty$ as $|y|\to\infty$, \end{enumerate} where we recall that $B$ is the extended generator of $Y$. We write $|y_n|\to\infty$ if $d(y_n,z)\to\infty$ for all points~$z\in E$. \item\label{item:thm_LDP_non_compact:mixing} For any two compactly supported probability measures $\nu_1,\nu_2 \in \mathcal{P}_c(E)$, there exist constants $T,M > 0$ and measures $\rho_1,\rho_2 \in \mathcal{P}([0,T])$ such that for all Borel sets $A \subseteq E$, % \begin{equation}\label{eq:proving_LDP:LDP_non_compact:mixing} \int_0^T\int_E P(t,y,A)\, d\nu_1(y)d\rho_1(t) \leq M \int_0^T\int_E P(t,z,A)\, d\nu_2(z)d\rho_2(t), \end{equation} % where $P(t,y,dy')$ denotes the transition probabilities associated to $Y_t$. \end{enumerate} Conditions \ref{item:thm_LDP_compact:Feller}-\ref{item:thm_LDP_compact:principal_eigenvalue} are enough to prove Theorem \ref{thm:proving_LDP:LDP_non_compact}, the large deviations principle in a compact setting. In this setting conditions \ref{item:thm_LDP_compact:Feller} and \ref{item:thm_LDP_compact:tight} replace Condition~\ref{item:thm_DV_I:Feller} of Theorem \ref{thm:proving_LDP:DV_I}; Condition \ref{item:thm_LDP_compact:tight} can also be weakened to $\mathbb{P}_{y_n} \to \mathbb{P}_y$ in $\mathcal{P}(D_E[0,\infty))$ whenever $y_n \to y$. Together Conditions \ref{item:thm_LDP_compact:Feller} and \ref{item:thm_LDP_compact:tight} imply strong continuity of the semigroup $S$ (see e.g. \ \cite[Remark~11.22]{FengKurtz2006}). \smallskip As pointed out in Section \ref{sec:intro_LDP}, the processes we have in mind do not satisfy a transitivity condition similar to Condition \ref{item:thm_DV_I:reference_measure} of Theorem \ref{thm:proving_LDP:DV_I}. In the compact setting this can be replaced by condition~\ref{item:thm_LDP_compact:principal_eigenvalue}, which corresponds to a principal-eigenvalue problem for the operator $L+V$. In compact settings, such eigenvalue problems can usually be solved if the coefficients of the generator are regular enough. In Section \ref{sec:LDP_zigzag} we show that this is the case for the zig-zag process taking values in the compact torus. \smallskip In the non-compact setting, the eigenvalue problem \ref{item:thm_LDP_compact:principal_eigenvalue} is replaced by conditions \ref{item:thm_LDP_non_compact:Lyapunov} and \ref{item:thm_LDP_non_compact:mixing}. Condition~\ref{item:thm_LDP_non_compact:Lyapunov} is closely related to the stability conditions assumed in~\cite{donsker1976asymptotic} and~\cite{dupuis2018large}. Because $e^{g_1}$ is unbounded, formally we have to use the extended generator $B$ instead of the infinitesimal generator $L$ to formulate Condition~\ref{item:thm_LDP_non_compact:Lyapunov3}. The same problem occurs in Condition~2.2 of~\cite{dupuis2018large}: for a diffusion process $Y_t$ in $\mathbb{R}^d$ satisfying $ dY_t = -Y_t dt + dW_t, $ the second-order differential operator \begin{equation*} Bf (x) = \frac{1}{2} \Delta f(x) - x\nabla f(x) \end{equation*} acting on $C^2(\mathbb{R}^d)$ is well-defined and is equal to the infinitesimal generator $L$ of the process when restricted to $C^2_b(\mathbb{R}^d)$. With $g_1(x) = \delta |x|^2/2$, the function $e^{-g_1(x)}Be^{g_1}(x)$ goes to minus infinity for $\delta$ small enough. A second Lyapunov function is $g_2(x) = \sqrt{1+|x|^2}$. In the context of the zig-zag process, since $E$ is of the form $E=\mathbb{R}^d\times\{\pm 1\}^d$, using continuous functions that grow to infinity when fixing the velocity variable is sufficient for obtaining compact level sets. \smallskip Condition~\ref{item:thm_LDP_non_compact:mixing} plays the role of a transitivity assumption in the non-compact case. While it is feasible to solve a principal-eigenvalue problem for a compact state space, this is much more difficult in the non-compact setting. It would require deriving not only the eigenvalue itself, but also the corresponding eigenfunction on a non-compact space, for which general existence results are not available. In this setting the transitivity condition \ref{item:thm_DV_I:reference_measure} of Theorem \ref{thm:proving_LDP:DV_I} is instead partly replaced by the mixing property \ref{item:thm_LDP_non_compact:mixing}. It is a weakened version of~\cite[Condition B.8]{FengKurtz2006},which is based on~\cite[Condition~$\tilde{U}$, page~113]{DeuschelStroock1989}. It is weaker in that it requires the transition probabilities to be comparable only for compactly supported initial conditions~$\nu_1,\nu_2 \in \mathcal{P}_c(E)$. This weakening is crucial for the results in this paper, because the stronger condition fails to be true for the zig-zag process if for instance $\nu_1 = \mathcal{N}(0,1) \otimes \mathrm{Unif}_{\pm 1}$ and $\nu_2 = \delta_y$. In that example, while the left-hand side of \eqref{eq:proving_LDP:LDP_non_compact:mixing} is in this case positive for any Borel set $A \subseteq E$, the right-hand side can become zero. This is because the zig-zag process has finite speed propagation, so that for arbitrary $T > 0$, if $\mathrm{dist}(A,y) > T$, then the probability of transitioning from $y$ into $A$ is zero. However for compactly supported measures the condition is satisfied. We verify the conditions of Theorem \ref{thm:proving_LDP:LDP_non_compact} for the zig-zag process in Section \ref{sec:LDP_zigzag}. \smallskip We are now ready to state the two general large deviations results of this paper, which in Section \ref{sec:LDP_zigzag} will be used to derive the large deviations principle for the empirical measures of the zig-zag process. We start with the compact setting. % \begin{theorem}\label{thm:proving_LDP:LDP_compact} Let $E$ be compact, $S(t)$ a Markov semigroup acting on $C(E)$ equipped with the supremum norm, and $Y_t$ the corresponding Markov process. Let $L$ be the infinitesimal generator of $Y_t$, and assume that $Y_t$ solves the associated martingale problem. Suppose Assumptions \ref{item:thm_LDP_compact:Feller}, \ref{item:thm_LDP_compact:tight} and \ref{item:thm_LDP_compact:principal_eigenvalue} hold. Then the empirical measures $\{\eta_t\}_{t > 0}$ associated to $Y_t$ satisfy a large deviations principle in $\mathcal{P}(E)$ with rate function $\mathcal{I}:\mathcal{P}(E) \to [0,\infty]$ given by~\eqref{eq:proving_LDP:DV_rate_function}. \end{theorem} Theorem \ref{thm:proving_LDP:LDP_compact} remains valid when replacing the eigenvalue-problem condition~\ref{item:thm_LDP_compact:principal_eigenvalue} by the mixing condition~\ref{item:thm_LDP_non_compact:mixing}. This is because the latter is a weaker condition sufficient for verifying the inequality \eqref{eq:ineqH1H2}, upon which the proof of the theorem hinges. The next theorem gives the corresponding large deviations result for the non-compact setting; this is the result we use for proving the large deviations principle for the zig-zag process on $\mathbb{R} \times \{\pm 1\}$ (Theorem \ref{thm:LDP-zigzag:non-compact-1d}). \begin{theorem}\label{thm:proving_LDP:LDP_non_compact} Let $S(t)$ be a Markov semigroup acting on $C_b(E)$ and $Y_t$ the corresponding Markov process. Let $L$ be the infinitesimal generator of $Y_t$ and assume that $Y_t$ solves the associated martingale problem. Assume \ref{item:thm_LDP_compact:Feller}, \ref{item:thm_LDP_compact:tight}, \ref{item:thm_LDP_non_compact:Lyapunov} and \ref{item:thm_LDP_non_compact:mixing}. Then, if $Y_0 \in K$ for some compact set $K$, the empirical measures $\{\eta_t\}_{t > 0}$ associated to the Markov process $Y_t$ satisfy a large deviations principle in $\mathcal{P}(E)$, with rate function $\mathcal{I} : \mathcal{P}(E) \to [0,\infty]$ given by \begin{equation*} \mathcal{I}(\mu) = -\inf_{u \in \mathcal{D}^{++}(L)} \int_E \frac{Lu}{u} d\mu. \end{equation*} \end{theorem} The proofs of Theorems \ref{thm:proving_LDP:LDP_compact} and \ref{thm:proving_LDP:LDP_non_compact} are given in Sections ~\ref{section:proof-of-LDP:compact} and \ref{section:proof-of-LDP:non-compact}, respectively. \subsection{The empirical measures of the zig-zag process} \label{sec:LDP_zigzag} Having established the general large deviations results Theorems \ref{thm:proving_LDP:LDP_compact} and \ref{thm:proving_LDP:LDP_non_compact}, we now specialize to the zig-zag process. Throughout the section, $Y_t$ is used to denote the zig-zag process, $Y_t = (X_t, V_t)$ with $X_t$ and $V_t$ as in Section \ref{sec:zig-zag}. However the state space $E$ will change as we split the large deviations statements for the empirical measures of $Y$ into compact (torus) and non-compact ($\mathbb{R}$) settings. Although \ref{thm:proving_LDP:LDP_non_compact} holds for arbitrary dimension $d \geq 1$, for the zig-zag process we limit ourselves to verifying the conditions for the case $d = 1$. Extending these results to $d > 1$ is substantially more difficult and remains a topic of further research. While conditions~\ref{item:thm_LDP_compact:Feller}, \ref{item:thm_LDP_compact:tight}, \ref{item:thm_LDP_non_compact:Lyapunov} hold true, the main challenge is verifying~\ref{item:thm_LDP_non_compact:mixing}. We begin by considering the compact state space $\mathbb{T} \times\{\pm 1\}$. In this case the infinitesemal generator $L$ of the semigroup $S(t)$ is has domain $\mathcal{D}(L) = C^1(\mathbb{T} \times \{ \pm 1\}) = \{f\in C(\mathbb{T} \times \{ \pm 1\}): f(\cdot,\pm 1) \in C^1(\mathbb{T})\}$, and takes the form \begin{equation} \label{eq:gen_compact} Lf (x,v) = v \partial_x f(x,v) + \lambda(x,v) \left[f(x,-v) - f(x,v)\right], \end{equation} with $\lambda$ given by \eqref{eq:switching-intensity-condition-2}. The LDP for the empirical measures associated with $Y$ and this state space is given in Theorem \ref{thm:LDP-zigzag:compact}. We prove this result in Section~\ref{section:zig-zag:LDP:compact} by verifying the conditions of Theorem \ref{thm:proving_LDP:LDP_compact}, the large deviations principle for processes taking values in a compact state space. \begin{theorem}\label{thm:LDP-zigzag:compact} Suppose that $U \in C^2(\mathbb{T})$. Then the family of empirical measures $\{\eta_t\}_{t>0}$ of the zig-zag process taking values in $\mathbb{T} \times \{\pm 1\}$ satisfies a large deviations principle in the limit $t \to \infty$, with rate function $\mathcal{I}:\mathcal{P}(\mathbb{T} \times \{\pm 1\}) \to [0,\infty]$ given by \begin{equation*} \mathcal{I}(\mu) = -\inf_{u \in \mathcal{D}^+(L)} \int_{\mathbb{T} \times \{\pm 1\}} \frac{Lu}{u} d\mu. \end{equation*} \end{theorem} We now move to the setting of a non-compact state space. Specifically, we consider the zig-zag process $Y_t =(X_t,V_t) $ taking values in $\mathbb{R} \times \{ \pm 1 \}$. As before, $L$ is the generator of this process, i.e.\ $L : \mathcal{D}(L) \subseteq C_b(\mathbb{R} \times \{ \pm 1\}) \to C_b(\mathbb{R} \times \{ \pm 1\})$ is a densely defined linear operator, on the set of functions $\{ f(\cdot, \pm 1) \in C_b ^1(\mathbb{R}) \}$ we have the representation \begin{align*} Lf(x,v) = v \partial _x f(x,v) + \lambda(x,v) \left[ f(x, -v) - f(x,v) \right], \ \ f \in \mathcal D (L), \end{align*} with $\lambda(x,v)=\max(0,vU'(x))+\gamma(x)$. To prove the large deviations principle in this non-compact setting we need additional assumptions on the potential function $U$ determining the jump rates. \begin{enumerate}[label =($B$.\arabic*)] \item\label{item:thm-LDP-zig-zag:Ui} $U(x) \to \infty$ as $|x| \to \infty$ and $U'(x) \to \pm \infty$ as $x \to \pm \infty,$ \item\label{item:thm-LDP-zig-zag:Uii} $U'(x)/U(x) \to 0$ as $|x| \to \infty,$ \item\label{item:thm-LDP-zig-zag:Uiii} $U''(x)/U'(x) \to 0$ as $|x| \to \infty.$ \end{enumerate} Furthermore, we will assume that there exists a second potential $V \in C^2(\mathbb{R})$ such that: \begin{enumerate}[label =($C$.\arabic*)] \item\label{item:thm-LDP-zig-zag:Upsi} $V(x) \to \infty$ as $|x| \to \infty$ and $V'(x) \to \pm \infty$ as $x \to \pm \infty$, \item\label{item:thm-LDP-zig-zag:Upsii} $V(x)/U(x) \to 0$, $U'(x)/V(x) \to 0 $ and $V'(x)/U'(x) \to 0$ as $|x| \to \infty$, \item\label{item:thm-LDP-zig-zag:Upsiii} $U''(x)/V'(x) \to 0$ as $|x| \to \infty$. \end{enumerate} In Section~\ref{section:zig-zag:LDP:non_compact}, we prove the following Theorem. \begin{theorem}\label{thm:LDP-zigzag:non-compact-1d} Assume that $U\in C^3(\mathbb{R})$ satisfies \ref{item:thm-LDP-zig-zag:Ui} - \ref{item:thm-LDP-zig-zag:Uiii}, that there is a function $V \in C^2(\mathbb{R})$ satisfying \ref{item:thm-LDP-zig-zag:Upsi} - \ref{item:thm-LDP-zig-zag:Upsiii} and the function $\gamma$ in \eqref{eq:switching-intensity-condition-2} is uniformly bounded by some $\bar \gamma$. Suppose that the initial condition $Y_0$ belongs to a compact set $K \subseteq \mathbb{R} \times \{ \pm 1\}$. Then the empirical measures $\{\eta_t\}_{t > 0}$ of $Y$ satisfies a large deviations principle on $\mathcal{P}(\mathbb{R} \times \{ \pm 1\})$ with speed $t$ and rate function $\mathcal{I}:\mathcal{P}(\mathbb{R} \times \{ \pm 1\}) \to [0,\infty]$ given by \begin{equation*} \mathcal{I}(\mu) = -\inf_{u \in \mathcal{D}^{++}(L)} \int_{\mathbb{R} \times \{ \pm 1\}} \frac{Lu}{u} d\mu. \end{equation*} \end{theorem} Some comments on the additional assumptions \ref{item:thm-LDP-zig-zag:Ui} - \ref{item:thm-LDP-zig-zag:Uiii} and \ref{item:thm-LDP-zig-zag:Upsi} - \ref{item:thm-LDP-zig-zag:Upsiii} are in place. The condition $U \in C^3(\mathbb{R})$ is imposed to allow for an application of Theorem 4 of \cite{bierkens2019ergodicity}, which is used to verify that \ref{item:thm_LDP_non_compact:mixing} holds. The auxiliary potential $V$ is used to find a second Lyapunov function for $L$ that grows slower than $U$ at infinity; roughly speaking, $V$ behaves asymptotically in-between the potential $U$ and its derivative $U'$ as $|x|$ grows. As an example, in the Gaussian case, $U(x) = x^2/2$ satisfies Conditions \ref{item:thm-LDP-zig-zag:Ui} - \ref{item:thm-LDP-zig-zag:Uiii}, and for any $0<\kappa<1$, the potential $V(x) = |x|^{1+\kappa}/(1+\kappa)$ satisfies \ref{item:thm-LDP-zig-zag:Upsi} - \ref{item:thm-LDP-zig-zag:Upsiii}. In general, any potential $U$ growing at infinity as $(1+|x|^2)^{\beta/2}$ with $\beta > 1$ satisfies the conditions, with $0<\kappa < 1$ such that $\beta - \kappa > 1$ and auxiliary potential $V(x) \sim (1+|x|^2)^{(\beta - \kappa)/2}$. \subsection{Explicit expression for the rate function} \label{sec:rate} In Theorems \ref{thm:LDP-zigzag:compact} and \ref{thm:LDP-zigzag:non-compact-1d} we establish the LDP for the empirical measures of the zig-zag process taking values in $\mathbb{T} \times \{ \pm 1\}$ and $\mathbb{R} \times \{ \pm 1 \}$, respectively. In those results the rate function is given on the variational form of the results by Donsker and Varadhan, see Section \ref{sec:intro_LDP}. This form follows from the more general large deviations results in Section \ref{sec:gen_LDP} and are not specific to the zig-zag process. Here, we use the properties of the latter to derive a more explicit form of the rate function for the case $E = \mathbb{T} \times \{\pm 1\}$, taking a first step towards using it as a tool for analysing the corresponding simulation algorithms. We assume throughout that $E = \mathbb{T} \times \{\pm 1\}$ and the switching rate $\lambda(x,v)$ satisfies $\lambda(x,v) > 0$ for all $(x,v) \in E$. This does not include the canonical rates $\lambda(x,v) = \max(0, v U'(x))_+$; however at the end of this section we present a formal expression for this case. Define a reference measure $\nu_0$ on $E$ by $\nu_0(dx, dv) = \mathrm{Leb}(dx) \otimes \mathrm{Unif}_{\pm 1}(dv)$. For any function $f : E \rightarrow \mathbb R$ we write $f^+(x) := f(x,+1)$ and $f^-(x) := f(x,-1)$. Recall the $\operatorname{arcsinh}$ function, \[ \operatorname{arcsinh}(\xi) = \log \left( \xi + \sqrt{\xi^2 +1} \right), \quad \xi \in \mathbb R.\] The proofs of the following results are given in Section~\ref{sec:proofs-rate-function}. \begin{proposition} \label{prop:expression-ratefunction} Suppose $\mu(dx, dv) = \rho(x,v) \nu_0(dx, dv)$ for a continuously differentiable function $\rho : E \rightarrow [0,\infty)$. If $\frac{d \rho^+}{dx}(x)= \frac{d \rho^-}{dx}(x)$ and $\rho^+$, $\rho^-$ are strictly positive for all $x \in \mathbb{T}$ then the Donsker-Varadhan functional is given by \begin{align} \label{eq:rate-function} \nonumber \mathcal I(\mu)& = \int_{\mathbb{T}} \bigg\{\tfrac 1 2 \rho' \log \left( \frac{\lambda^+ \rho^+}{\lambda^- \rho^-} \right)+ \rho' \operatorname{arcsinh} \left( \frac{ \rho'}{2 \sqrt{ \lambda^+ \lambda^- \rho^+ \rho^-}}\right) \\ & \quad \quad \quad- \sqrt{ 4 \lambda^+ \lambda^- \rho^+ \rho^- + (\rho')^2} + \lambda^+ \rho^+ + \lambda^- \rho^- \bigg\} \ \mathrm{d} x. \end{align} If $\rho^+ \geq 0$ and $\rho^- \geq 0$ are constant, then \begin{equation} \label{eq:rate-function-constant-density} \nonumber \mathcal I(\mu) = \int_{\mathbb{T}} \left( \sqrt{\lambda^+ \rho^+} - \sqrt{\lambda^- \rho^-} \right)^2 \ \mathrm{d} x. \end{equation} If $\frac{d \rho^+(x)}{dx}(x) \neq \frac{d \rho^-(x)}{dx}$ for some $x \in \mathbb{T}$ then $\mathcal I(\mu) = \infty$. \end{proposition} Note that if $\mu(dx,dv) = \rho(x,v) \nu_0(dx, dv)$ and $\frac{d \rho^+}{dx}= \frac{d \rho^-}{dx}$ on $\mathbb{T}$, then for some constant $c \in \mathbb R$ and a probability density function $\rho$ on $\mathbb{T}$ we have $\rho^+(x,v) = \rho(x) + c$ and $\rho^-(x,v) = \rho(x) - c$. A useful application of the rate function~$\mathcal I(\mu)$ is in estimating deviations of ergodic averages, which typically requires the computation of \[ \inf_{\mu \in \mathcal P} \left(\mathcal I(\mu) - \int_E V \ \mathrm{d} \mu \right). \] The rigorous statement is the Laplace principle~\cite[Definition~1.6, Theorem~1.8]{BudhirajaDupuis2019}. If the function $V$ does not depend on $v$, then by the following result we can safely assume $c = 0$ and thus restrict the minimization problem to minimization over probability densities on $\mathbb{T}$. \begin{proposition} \label{prop:no-v-dependence} Let $\rho \in C^1(\mathbb{T})$ be a strictly positive probability density function on $\mathbb{T}$. Let $|k| := \inf_{x} \rho(x)$. Consider the one-parameter family of probability measures $(\mu_c)_{c \in (-k,+k)} \in \mathcal P_{eq}$ with probability density functions $\rho_c : E \rightarrow (0, \infty)$ given by \[ \rho_c(x,+1) = \rho(x) + c, \quad \rho_c(x,-1) = \rho(x) - c, \quad c \in (-k, +k).\] Then $c \mapsto \mathcal I(\mu_c)$ is minimized at $c = 0$. Furthermore, for $\mu = \mu_0$, \begin{equation} \label{eq:ratefunction-simplified} \begin{aligned} \mathcal I(\mu) & = \int_{\mathbb{T}} \bigg\{ \tfrac 1 2 \rho' \log \left( \frac{ \lambda^+}{\lambda^-} \right) + \rho' \operatorname{arcsinh} \left( \frac{\rho'}{2 \rho \sqrt{ \lambda^+ \lambda^-}} \right) \\ & \quad \quad \quad - \sqrt{ 4 \lambda^+ \lambda^- \rho^2 + (\rho')^2} + (\lambda^+ + \lambda^-) \rho \bigg\} \ \mathrm{d} x. \end{aligned} \end{equation} \end{proposition} We will specialize to the case in which $\rho = \rho^+ = \rho^-$ and use the representation $\rho = \exp(-W)$, where $W \in C^1(\mathbb{T})$. We then find \begin{equation} \label{eq:in-W} \begin{aligned} \mathcal I(\mu) & = \int_{\mathbb{T}} \bigg\{ -\tfrac 1 2 W' \log \left( \frac{\lambda^+}{\lambda^-} \right) + W' \operatorname{arcsinh} \left( \frac{ W'}{2 \sqrt{\lambda^+ \lambda^-}} \right) \\ & \quad \quad \quad - \sqrt{4 \lambda^+ \lambda^- + (W')^2} + \lambda^+ + \lambda^- \bigg\} \exp(-W) \ \mathrm{d} x. \end{aligned} \end{equation} Let \begin{equation} \label{eq:switching-rate} \lambda^+(x) = \gamma + \max(0, U'(x)) \quad \mbox{and} \quad \lambda^-(x) = \gamma + \max(0, - U'(x)),\end{equation} where $\gamma > 0$ is constant, so that $\lambda^{\pm}$ satisfy~\eqref{eq:switching-intensity-condition-2} and hence the measure with $\nu_0$-density $\exp(-U(x))$ is invariant. We call $\gamma$ the \emph{excessive switching intensity} or \emph{refreshment rate}. We can now investigate the dependence of the rate function $\mathcal I$, through the expression~\eqref{eq:in-W}, on $\gamma$. The derivative of the integrand of~\eqref{eq:in-W} with respect to $\gamma$ can be computed to be \begin{equation} \label{eq:gamma-derivative} \left( \frac{4 \lambda^+ \lambda^- +(\lambda^+ - \lambda^-)W' - (\lambda^+ + \lambda^-)\sqrt{4 \lambda^- \lambda^+ + (W')^2}}{2 \lambda^+ \lambda^-}\right)\exp(-W),\end{equation} which is non-positive, and zero only if $W' = \lambda^+ - \lambda^- = U'$ (which can be seen by maximizing with respect to $W'$). It follows that $\mathcal I(\mu)$ is strictly decreasing as a function of $\gamma$ for $\mu$ not equal to the stationary measure. In other words, for a smaller refreshment rate $\gamma$, the rate function increases. Hence the convergence of empirical averages to equilibrium is faster for smaller~$\gamma$. Suppose that $\nu_0 (\{ x \in \mathbb{T} : U'(x) = 0\}) = 0$, i.e. the set of points where the derivative of $U$ vanishes is $\nu_0$-negligible. In the formal limit~$\gamma \downarrow 0$ in~\eqref{eq:switching-rate}, we obtain the following expression for the rate function: \begin{equation} \label{eq:limit-functional} \begin{aligned} \mathcal I(\mu) & = \begin{cases} \int_{\mathbb{T}} \left\{ |W'| \left( \log\left( \frac{ W'}{U'} \right) - 1 \right) + |U'| \right\} \exp(-W) \ \mathrm{d} x \quad & \mbox{if $\operatorname{sign}(W') \equiv \operatorname{sign}(U')$}, \\ \infty \quad & \mbox{otherwise}. \end{cases} \end{aligned} \end{equation} \section{Proofs} \label{sec:proofs} \subsection{General large-deviation Theorems \ref{thm:proving_LDP:LDP_compact} and \ref{thm:proving_LDP:LDP_non_compact}} \label{sec:aux} In this section we give the proofs of Theorems \ref{thm:proving_LDP:LDP_compact} and \ref{thm:proving_LDP:LDP_non_compact}, which are used to obtain the large deviations principle for the empirical measures of the zig-zag process. The case of a compact state space is treated in Section \ref{section:proof-of-LDP:compact} and the non-compact case in Section \ref{section:proof-of-LDP:non-compact}. Before we embark on these proofs we outline the overall strategy; a more detailed description can be found in the book by Feng and Kurtz~\cite[Chapter~12]{FengKurtz2006}. \smallskip Consider the empirical measure \begin{equation*} \eta_t(\cdot) = \frac{1}{t} \int_0^t \delta_{Y_s} (\cdot) \mathrm{d} s. \end{equation*} With a change of variable $s \mapsto ts$ in the integral we can express this as \begin{align*} \eta_t (\cdot) = \int _0 ^1 \delta _{Y_{st} } (\cdot) \mathrm{d} s, \end{align*} the empirical measure for the sped-up process (we can think of $t>1$) $Y^t _s = Y_{st}$ over the time interval $[0,1]$; in fact we will use $t=n \in \mathbb{N} _+$ below. We can consider the empirical measure of this time-scaled process $Y_t$ on time intervals of lengths other than unity: for $\tau >0$ define $\eta _t ^{\tau}$ as \begin{align*} \eta _t ^{\tau} (\cdot) = \int _0 ^{\tau} \delta _{Y_{st}} \mathrm{d} s. \end{align*} This empirical measure is viewed as an element of $\mathcal L (E)$, the set of Borel measures on $E \times [0, \infty)$ of the form $ \mathrm{d}\rho (x,s) = \mu_s ( \mathrm{d} x) \mathrm{d} s$, $\mu _s \in \mathcal P (E)$ (see Section \ref{sec:notation}). Any such $\rho \in \mathcal L (E)$ defines a continuous path $t \mapsto \rho _t = \rho (\cdot \times [0,t]) \in \mathcal M _f (E)$ and for $t=1$ this is a probability measure. The strategy for proving the large deviations principle for $\{ \eta _t \}$ is to first show that $\{ \eta _t ^{\tau} \}$ satisfies a large deviations principle in $\mathcal L (E)$. We can then use the fact that projections are continuous maps on $\mathcal L (E)$ (Lemma~\ref{lemma:proofs_LDP:continuous_projection}) and an application of the contraction principle to obtain the sought-after large deviations principle on $\mathcal P (E)$. This is summarised in the following proposition. \begin{proposition} \label{prop:LDP_strategy} Suppose that the family $\{\eta^\tau_t\}_{t > 0}$ satisfies a large deviations principle in $\mathcal{L}(E)$ with rate function $\mathcal{J}:\mathcal{L}(E) \to [0,\infty]$ given by \begin{equation*} \mathcal{J}(\rho) = \int_0^\infty \mathcal{I}(\mu_s) \mathrm{d} s, \quad \text{ for } \, \rho_t = \int_0^t \mu_s \mathrm{d} s, \end{equation*} where $\mathcal{I} : \mathcal{P}(E) \to [0,\infty]$ is the rate function appearing in the Donsker-Varadhan results, \begin{equation*} \mathcal{I}(\mu) = -\inf_{u \in \mathcal{D}^{++}(L)} \int_E\frac{Lu}{u} \mathrm{d}\mu. \end{equation*} Then $\eta_t $ satisfies a large deviations principle in $\mathcal{P}(E)$ with rate function $\mathcal{I}$. \end{proposition} \begin{proof} Because $\{\eta^\tau_t\}_{t > 0}$ satisfies a large deviations principle on $\mathcal{L}(E)$ and the projection $\pi_1 : \mathcal{L}(E) \to \mathcal{P}(E)$ given by \begin{align*} \pi _1 (\rho) = \rho _1, \end{align*} is continuous (Lemma~\ref{lemma:proofs_LDP:continuous_projection} below), by the contraction principle the sequence evaluated at~$\tau=1$,~$\{\eta_t ^1\}_{t > 0}$, satisfies a large deviation principle on~$\mathcal{P}(E)$ with rate function~$\tilde{\mathcal{I}}: \mathcal{P}(E) \to [0,\infty]$ given by \begin{align*} \tilde{\mathcal{I}} (\nu) &= \inf\left\{ \mathcal{J}(\rho) = \int_0^\infty \mathcal{I}(\mu_s) \, \mathrm{d} s : \rho_t = \int_0^t \mu_s \, \mathrm{d} s \in \mathcal{L}(E), \rho_1 = \nu \right\}. \end{align*} It remains to show that $\tilde{\mathcal I} (\nu) = \mathcal I (\nu)$ for every $\nu \in \mathcal P (E)$. First, in the integral defining $\mathcal J (\rho)$, the integrand is always positive after time $t=1$. It is therefore enough to consider only integrating to time $t=1$ in the infimum, as we are free to chose the the form of $\rho$ after that time. Thus, \begin{align*} \tilde{\mathcal I} (\nu) = \inf \left\{ \int _0 ^1 \mathcal I (\mu _t) \mathrm{d} t : \rho _t = \int _0 ^t \mu_s \mathrm{d} s \in \mathcal L (E), \ \rho_1 = \nu \right\}. \end{align*} For a fixed $\nu \in \mathcal P (E)$, take any $\rho_t = \int _0 ^t \mu _s ds \in \mathcal L (E)$ such that $\rho _1 = \nu$. The rate function $\mathcal I $ is convex on $\mathcal P (E)$ and by Jensen's inequality we have \begin{align*} \mathcal I (\nu) &= \mathcal I \left( \rho _1 \right) \\ &= \mathcal I \left( \int _0 ^1 \mu _s \mathrm{d} s \right) \\ &\leq \int _0 ^1 \mathcal I \left( \mu _s \right) \mathrm{d} s. \end{align*} Taking the infimum over all such $\rho \in \mathcal L(E)$ yields the inequality \begin{align*} \mathcal I (\nu) \leq \tilde{\mathcal I} (\nu), \end{align*} The constant path $\mu _s = \nu$ gives equality and we have that $\tilde{\mathcal I} = \mathcal I $ as functionals on $\mathcal P(E)$. \end{proof} \begin{lemma}[Projection is continuous]\label{lemma:proofs_LDP:continuous_projection} Let $\mathcal{L}(E)$ be the above space with the topology of weak convergence on bounded time intervals. Let $\mathcal{P}(E)$ be equipped with the weak topology. Then the projection $\pi_1 : \mathcal{L}(E) \to \mathcal{P}(E)$ defined by $\pi_1 (\rho) := \rho_1$ is a continuous map. \end{lemma} \begin{proof}[Proof of Lemma~\ref{lemma:proofs_LDP:continuous_projection}] Let $\rho^n \to \rho$ in $\mathcal{L}(E)$. We need to prove that for any bounded and continuous function $g$ on $E$, we have \begin{equation*} \int_E g(u) \mathrm{d}\rho^n_1(u) \to \int_E g(u) \mathrm{d}\rho_1. \end{equation*} Since \begin{equation*} \int_E g(u) \mathrm{d}\rho^n_1(u) = \int_{E \times [0,1]} g(u) \mathrm{d}\rho^n(u,s), \end{equation*} and~$\varphi(u,s) = g(u)$ is continuous and bounded on~$E \times [0,\infty)$, this is implied by~$\rho^n \to \rho$. \end{proof} Armed with Proposition \ref{prop:LDP_strategy}, one way to prove Theorems \ref{thm:proving_LDP:LDP_compact} and \ref{thm:proving_LDP:LDP_non_compact} is to prove the large deviations principle for the empirical measures of the associated sped-up versions of underlying processes and apply the proposition. This is the approach we take and we rely on the following result from \cite{FengKurtz2006} for proving the large deviations principles on $\mathcal L (E)$. \begin{lemma}[Theorem~12.7 of~\cite{FengKurtz2006}] \label{lemma:FengKurtz} Suppose that the following conditions hold: \begin{enumerate}[label=(FK.\arabic*)] \item The martingale problem for $L$ is well-posed. \label{cond:FK1} \item The semigroup $S$ is Feller-continuous. \label{cond:FK2} \item The semigroup $S$ is $buc$-continuous. \label{cond:FK3} \item There is an index set $\mathcal Q$ and a family of subsets of $E$, $\{ \tilde{K} ^q _n \subset E : q \in \mathcal Q\}$, such that for $q_1, q_2 \in \mathcal Q$, there exists $q_3 \in \mathcal Q$ with $\tilde{K} ^{q_1} _n \cup \tilde{K} ^{q_2} _n \subset \tilde{K} ^{q_3} _n$, and for every $y \in E$, there exists $q \in \mathcal Q$ such that $\lim _{n\to \infty} d (y, \tilde{K} ^{q} _n) =0$. Moreover, for each $q \in \mathcal Q$, $T>0$ and $a >0$, there exists a $\hat q (q,a,T) \in \mathcal Q$ satisfying \begin{align*} \limsup _{n \to \infty} \sup _{y \in \tilde{K} ^q _n} \frac{1}{n} \log \mathbb{P}_{y} \left( Y_t \notin \tilde{K} ^{\hat q (q,a,T)} _n, \ \textrm{some } t \leq nT \right) \leq -a. \end{align*} \label{cond:FK4} \item There exists an upper semicontinuous function $\Psi$ on $E$, $\{ \varphi _n \} \subset \mathcal D ^{++} (B_0)$, and $q_0 \in \mathcal Q$ such that $\Psi$ is bounded above, $\{ y\in E: \Psi(y) \geq c \}$ is compact for each $c \in \mathbb{R}$, $0 < \inf _{y \in K _n ^{q_0}} \varphi _n (y) < 2 \inf _{y\in E} \varphi _n(y)$, $\inf_{n, y \in E} \varphi_n (y) >0$, \begin{align*} \lim _{n\to \infty} \frac{1}{n} \log \norm{\varphi _n} =0, \ \ \sup_{n,y} \frac{L \varphi _n (y) }{ \varphi_n (y)} < \infty, \end{align*} and for each $q \in \mathcal Q$, \begin{align*} \lim _{n \to \infty} \sup _{y \in \tilde{K} ^q _n} \left( \frac{L \varphi _n (y) }{ \varphi_n (y)} - \Psi (y) \right) \leq 0, \ \ q\in \mathcal Q. \end{align*} In addition, for each $n$ and $\beta \in (-\infty, 1]$, \begin{align*} \lim_{t\to 0} \norm{S(t) \varphi_n^{\beta} - \varphi_n^{\beta}} =0. \end{align*} \label{cond:FK5} \item For each $a >0$ there exists compact $K$ and $q \in \mathcal Q$ such that \begin{align*} \limsup _{n \to \infty} \frac{1}{n} \log \mathbb{P} \left( Y^n _0 \notin K \cap \tilde{K} ^{q} _n \right) \leq -a. \end{align*} \label{cond:FK6} \item Take $\mathcal C \subset C_b (E)$ separating and define, with $\Psi$ as in \ref{cond:FK5}, \begin{align*} H_1 ^{\beta, \Psi}& = \inf_{0 < \kappa \leq 1} \inf_{f \in \mathcal{D}^{++}(L)} \sup_{y \in E} \left[ \beta (y) \cdot p + (1-\kappa) \frac{Lf(y)}{f(y)} + \kappa \Psi(y)\right],\\ H_2 ^{\beta, \Psi} &= \sup_{\kappa > 0} \sup_{f \in \mathcal{D}^{++}(L)} \inf_{y \in E} \left[ \beta (y) \cdot p + (1+\kappa) \frac{Lf(y)}{f(y)} - \kappa \Psi(y)\right]. \end{align*} It holds that $H_1 ^{\beta, \Psi} \leq H_2 ^{\beta, \Psi}$, for $\beta \in \mathcal C ^d$, $d=1,2.\dots$. \label{cond:FK7} \end{enumerate} Then $\{ \eta ^{\tau} _n \} _n$ satisfies the large deviations principle in $C_E[0, \infty)$ with rate function \begin{align*} \label{eq:rateFK} \hat \mathcal J (\rho) = \int _0 ^\infty I^{\Psi} (\rho_s) \mathrm{d} s, \ \rho \in \mathcal L (E), \end{align*} where \begin{align*} I^{\Psi} (\mu) = -\min\left[\inf _{u \in \mathcal D^{++} (L)} \int _{E} \frac{Lu}{u} \mathrm{d}\mu , \int _E \Psi \mathrm{d}\mu\right]. \end{align*} \end{lemma} \subsubsection{Proof of Theorem~\ref{thm:proving_LDP:LDP_compact}---compact state-space $E$} \label{section:proof-of-LDP:compact} As outlined in the previous section, we can prove Theorem \ref{thm:proving_LDP:LDP_compact} by first verifying the conditions of Lemma \ref{lemma:FengKurtz} under the given assumptions and then apply Proposition \ref{prop:LDP_strategy}. \begin{proof}[Proof of Theorem \ref{thm:proving_LDP:LDP_compact}] First, Conditions \ref{cond:FK1}-\ref{cond:FK3} follow from the assumption of Feller continuity \ref{item:thm_LDP_compact:Feller} and tightness; see e.g.\ Remark 11.22 in \cite{FengKurtz2006}. Next, Conditions \ref{cond:FK4} and \ref{cond:FK5} always hold for compact $E$: take $\varphi_n \equiv 1$, $\Psi \equiv 0$, $Q = \{q\}$ (singleton), and $K^q_n :=E$ for every $n \in \mathbb{N}$. For this choice both conditions are met---it is only for non-compact spaces $E$ that these conditions become non-trivial (see the proof of Theorem \ref{thm:proving_LDP:LDP_non_compact}). Condition \ref{cond:FK6} is trivially true for compact $E$. Remains to verify the inequality $H_1 ^{\beta} \leq H_2 ^{\beta}$. Take $d \geq 1$ and $\beta \in \mathcal C ^d$. With the choice $\Psi \equiv 0$ the definitions of $H_i ^{\beta}: \mathbb{R} ^d \to \mathbb{R}$, $i=1,2$, become \begin{align*} H_1 ^{\beta}& = \inf_{f \in \mathcal{D}^{++}(L)} \sup_{y \in E} \left[ \beta (y) \cdot p + \frac{Lf(y)}{f(y)} \right],\\ H_2 ^{\beta} &= \sup_{f \in \mathcal{D}^{++}(L)} \inf_{y \in E} \left[ \beta (y) \cdot p + \frac{Lf(y)}{f(y)} \right]. \end{align*} We now show that the required inequality follows from Assumption \ref{item:thm_LDP_compact:principal_eigenvalue}, solvability of the principal eigenvalue problem. For any $\beta \in \mathcal C ^d$ and $p \in \mathbb{R} ^d$, define the map $V_p (y): E \to \mathbb{R}$ as \begin{align*} V_p (y) = \beta (y) \cdot p \end{align*} This is a continuous function on $E$ and for every $p$ there exists a function $f_p \in \mathcal D ^+ (L)$ and real eigenvalue $\lambda_p$ such that \begin{align*} (L + \beta \cdot p) f_p = \lambda _p f_p. \end{align*} It follows that, for any $p \in \mathbb{R}^d$, we have \begin{align*} \lambda _p = \sup_{y \in E} \left[ \frac{Lf_p(y)}{f_p(y)} + \beta(y) \cdot p \right] = \inf_{y \in E} \left[ \frac{Lf_p(y)}{f_p(y)} + \beta(y) \cdot p \right], \end{align*} which leads to the upper bound % \begin{align*} H^\beta_1(p) &= \inf_{f \in \mathcal{D}^{+}(L)} \sup_{y \in E} \left[ \frac{Lf(y)}{f(y)} + \beta(y) \cdot p \right] \\ &\leq \sup_{y \in E} \left[ \frac{Lf_p(y)}{f_p(y)} + \beta(y) \cdot p \right] \\ &= \inf_{y \in E} \left[ \frac{Lf_p(y)}{f_p(y)} + \beta(y) \cdot p \right] \\ &\leq \sup_{f \in \mathcal{D}^{+}(L)} \inf_{y \in E} \left[ \frac{Lf(y)}{f(y)} + \beta(y) \cdot p \right] \\ &= H^\beta_2(p). \end{align*} % This shows that Condition \ref{cond:FK7} of Lemma \ref{lemma:FengKurtz} follows from \ref{item:thm_LDP_compact:principal_eigenvalue}. As a result, in the setting of compact $E$, Assumptions \ref{item:thm_LDP_compact:Feller} - \ref{item:thm_LDP_compact:principal_eigenvalue} ensure that Lemma \ref{lemma:FengKurtz} is applicable. This gives the large deviations principle for the empirical measures associated with sped-up versions of the process $Y$ and Proposition \ref{prop:LDP_strategy} transfers this to the empirical measures of the original process. This concludes the proof of the large deviations principle. The form of the rate function is trivially seen to be equal to the prescribed form because of the choice of $\Psi \equiv 0$. \end{proof} \subsubsection{Proof of Theorem~\ref{thm:proving_LDP:LDP_non_compact}---non-compact state space $E$} \label{section:proof-of-LDP:non-compact} We prove large deviations of the family of measures~$\{\eta_t ^\tau\}_{t > 0}$ introduced at the beginning of Section \ref{sec:aux} by verifying the assumptions of Lemma \ref{lemma:FengKurtz}. Proposition \ref{prop:LDP_strategy} then implies the large deviations principle of the empirical measures $\{\eta_t\}_{t > 0}$ with the prescribed rate function. Whereas the conditions of Lemma \ref{lemma:FengKurtz} where straightforward to verify in the compact setting of Theorem \ref{thm:proving_LDP:LDP_compact}, the non-compact case requires more work. Specifically, because we can no longer assume that there is a solution to the principal eigenvalue problem---such an assumption would not allow us to prove the large deviations principle for the zig-zag process---and the state space is no longer compact, \ref{cond:FK4}-\ref{cond:FK7} are more difficult to verify. A crucial component of the proof of Theorem \ref{thm:proving_LDP:LDP_non_compact} is an inequality that is connected to the necessary comparison principle. To streamline the proof we now state this inequality as a separate result. \smallskip For any $V \in C_b(E)$ and $\Psi : E \to \mathbb{R}$, define $H_1 ^{\Psi}, H_2 ^{\Psi} \in \mathbb{R}$ by \begin{equation} \begin{split} H_1 ^{\Psi} &= \inf_{0 < \kappa \leq 1} \inf_{f \in \mathcal{D}^{++}(L)} \sup_{y \in E} \left[ V(y) + (1-\kappa) \frac{Lf(y)}{f(y)} + \kappa \Psi(y)\right], \label{eq:H1_H2} \\ H_2 ^{\Psi} &= \sup_{\kappa > 0} \sup_{f \in \mathcal{D}^{++}(L)} \inf_{y \in E} \left[ V(y) + (1+\kappa) \frac{Lf(y)}{f(y)} - \kappa \Psi(y)\right]. \end{split} \end{equation} \begin{proposition}\label{prop:non_compact:H1_leq_H2} Take any $V \in C_b (E)$ and suppose~\ref{item:thm_LDP_non_compact:mixing} holds and that for any $c\in\mathbb{R}$, the superlevel-set $\{\Psi \geq c\}$ is compact. Then \begin{align} \label{eq:ineqH1H2} H_1 ^{\Psi} \leq H _2 ^{\Psi}. \end{align} \end{proposition} We first complete the proof of Theorem \ref{thm:proving_LDP:LDP_non_compact}. \begin{proof}[Proof of Theorem \ref{thm:proving_LDP:LDP_non_compact}] The proof amounts to showing that Conditions \ref{cond:FK1}-\ref{cond:FK7} of Lemma \ref{lemma:FengKurtz} hold. We start with the ones that are straightforward to obtain from the assumptions of the theorem. Conditions \ref{cond:FK1}-\ref{cond:FK3} follow from \ref{item:thm_LDP_compact:Feller} and \ref{item:thm_LDP_compact:tight}. For condition \ref{cond:FK6} the existence of such a compact set follows immediately from the assumption that the initial value $Y(0)$ belongs to a compact set $K \subseteq E$. We now show that Conditions \ref{cond:FK4} and \ref{cond:FK5} follow from \ref{item:thm_LDP_non_compact:Lyapunov}, the existence of Lyapunov functions $g_1$ and $g_2$ with certain growth properties. We start with \ref{cond:FK4} and define the family of compact sets $K^q_n \subseteq E$ by \begin{equation*} K^q_n = \{y \in E\,:\, g_2(y) \leq qn\},\quad q,n \in \mathbb{N} \end{equation*} For any $q_1, q_2$ and with $q_3 = \max (q_1, q_2)$, it then holds that \begin{align*} K^{q_1}_n \cup K^{q_2}_n \subseteq K^{q_3}_n, \ \ \forall n \in \mathbb{N}. \end{align*} Because $g_2 (y)$ is finite for any $y\in E$, there exists $q, N \in \mathbb{N}$ such that $n \geq N$ implies that $y \in K_n ^{q}$. In particular, $\textrm{dist} (y, K_n ^q) = 0$. For the last part of Condition \ref{cond:FK4}, take $q \in \mathbb{N}$ and $T, a > 0$. It remains to find a $\tilde q$ such that \begin{align*} \limsup _{n \to \infty} \sup _{y \in K ^{q} _n} \frac{1}{n} \log \mathbb{P} _y \left( Y_t \notin K ^{\tilde q} _n, \ \textrm{some } t \leq nT \right) \leq -a. \end{align*} By Lemma 4.20 in \cite{FengKurtz2006}, for any open neighbourhood $\mathcal O$ of $K_n ^q$, \begin{align} \label{eq:openN} \mathbb{P}\left(Y_t \notin \mathcal{O}, \,\mathrm{some}\, t \leq nT \,|\, Y_0 \in K^q_n\right) \leq \mathbb{P}\left(Y_0 \in K^q_n\right) e^{-\beta _q + nT\gamma(\mathcal{O})}, \end{align} where the constants $\beta_q$ and $\gamma(\mathcal{O})$ are given by \begin{align*} \beta_q = \inf_{E \setminus \mathcal{O}} g_2 - \sup_{K^q_n} g_2, \end{align*} and \begin{align*} \gamma(\mathcal{O}) = \max \left(\sup_{\mathcal{O}}e^{-g_2} B e^{g_2}, 0\right). \end{align*} By the growth condition for $g_2$ (part (a) of \ref{item:thm_LDP_non_compact:Lyapunov}) for any $\tilde q > \hat q > q$ large enough, there exists an open set $\mathcal O$ such that \begin{align*} K_n ^q \subseteq K_n ^{\hat q} \subseteq \mathcal O \subseteq K^{\tilde q} _n. \end{align*} By definition, $g_2 \leq nq$ on $K ^q _n$ and because $K ^{\hat q} _n \subseteq \mathcal O$, we have $g_2 \geq \hat{q} n$ on $E \setminus \mathcal O$. Combined with the upper bound $\gamma (\mathcal O) \leq \gamma (E)$ this gives, starting from \eqref{eq:openN}, \begin{align*} \frac{1}{n} \log \mathbb{P} \left( Y_t \notin K ^{\tilde q} _n, \ \textrm{some } t\leq nT | Y_0 \in K_n ^q \right) &\leq T \gamma(\mathcal O) - \frac{1}{n} \beta _q \\ &\leq T \gamma(E) +q - \hat{q}. \end{align*} The last part of Condition \ref{cond:FK4} is now straightforward to obtain. First, take $\hat q = \hat q (q, a, T)$ large enough that the right-hand side of the last display is bounded by $-a$: \begin{align*} T \gamma(E) +q - \hat{q} \leq -a. \end{align*} Next, choose $\tilde q = \tilde q (q, a, T)$ large enough that there is an open set $\mathcal O$ such that $K ^{\hat q} _n \subseteq \mathcal O \subseteq K^{\tilde q} _n$. The asymptotic statement then follows, which concludes the verification of condition \ref{cond:FK4} of Lemma \ref{lemma:FengKurtz}. \smallskip To show that condition \ref{cond:FK5} is fulfilled we generalize the arguments used in Example 11.24 in \cite{FengKurtz2006}. The functions $\varphi_n$ are constructed from the Lyapunov functions $g_1$ and $g_2$. First, define \begin{equation}\label{eq:proving_LDP:r_n} r_n := \sup \left\{g_1(y) \,: \, y \in E,\, g_1(y) g_2(y) \leq n^2\right\}. \end{equation} Then $r_n \to \infty$ and $r_n/n \to 0$ as $n \to \infty$, since~\ref{item:thm_LDP_non_compact:Lyapunov2} and the condition in the set imply \begin{equation*} \frac{r_n}{n} = \frac{g_1(y_n)}{n} \leq \sqrt{\frac{g_1(y_n)}{g_2(y_n)}} \to 0. \end{equation*} Furthermore, for each $q$ there exists $n_q$ such that $n \geq n_q$ implies \begin{equation*} K^q_n \subseteq \left\{y\,:\, g_1(y) \leq r_n\right\}. \end{equation*} For a smooth, non-decreasing and concave function $\rho : [0,\infty) \to [0,2]$ satisfying $\rho(r) = r$ for $0 \leq r \leq 1$ and $\rho(r) = 2$ for $r \geq 3$, define the functions $\varphi_n$ by cutting off $g_1$: \begin{equation}\label{eq:proving_LDP:varphi_n} \varphi_n(y) := e^{r_n} \rho(e^{-r_n} e^{g_1(y)}). \end{equation} We have $\varphi_n = e^{g_1}$ on the compact sets $K^q_n$. Setting $\Psi = e^{-g_1} B e^{g_1}$, we therefore obtain \begin{equation*} \frac{L \varphi_n(y)}{\varphi_n(y)} = \Psi(y),\quad y \in K^q_n,\, n \geq n_q. \end{equation*} The fact that $r_n/n\to 0$ as $n\to\infty$ implies $n^{-1}\log\|\varphi_n\| \to 0$ as $n\to\infty$. For proving that \begin{equation*} \sup_{n,y}\frac{L\varphi_n(y)}{\varphi_n(y)}<\infty, \end{equation*} it is sufficient to show that for any positive function $u:E \to (0,\infty)$ in the domain of $B$ and for any $y_0 \in E$, we have \begin{equation}\label{eq:proof-LDP-noncompact:ineq-pos-max-pr} \frac{B (\rho(u))(y_0)}{\rho(u)(y_0)} \leq \frac{\max\left(B u(y_0),0\right)}{u(y_0)}. \end{equation} Then with $u=e^{-r_n}e^{g_1}$ and noting that $L\varphi_n=B\varphi_n$, by linearity we obtain \begin{equation*} \frac{L\varphi_n}{\varphi_n} \leq \frac{\max\left(B e^{g_1},0\right)}{e^{g_1}}, \end{equation*} and the result follows since $\Psi(y)=e^{-g_1(y)} \left(B e^{g_1}\right)(y)\to-\infty$ as $|y|\to\infty$. Hence we are left with verifying~\eqref{eq:proof-LDP-noncompact:ineq-pos-max-pr}. If $u(y_0) \in (3,\infty)$, then $\rho(u)(y_0)$ is maximal. Hence by the positive maximum principle, $B\rho(u)(y_0) \leq 0$, and the inequality follows. If $u(y_0) \in (0,3]$, then $a_0 := \rho'(u(y_0)) \in [0,1]$, the region where $\rho$ goes from slope one to slope zero. Consider the function $f_0 := \rho(u) - a_0 u$. Since $g_0(s) := \rho(s) - a_0 s$ is maximal for $s_0$ satisfying $\rho'(s_0) = a_0$, we obtain that $y_0$ is an optimizer, that is $f_0(y_0) = \sup_y f(y)$. Furthermore, $g_0(s_0) \geq 0$, so by the positive maximum principle $Bf_0(y_0) \leq 0$. By linearity of $B$ and since $r \leq \max(r,0)$, we obtain the inequality $B \rho(u)(y_0) \leq a_0 \cdot \max\left(Bu(y_0),0\right)$. Hence \begin{equation*} \frac{B \rho(u)(y_0)}{\rho(u)(y_0)} \leq \frac{a_0}{\rho(u)(y_0)}\max(Bu(y_0),0) \leq \frac{1}{u(y_0)} \max(Bu(y_0),0), \end{equation*} using that $0 \leq g_0(s_0) = \rho(u)(y_0)-a_0 u(y_0)$. This finishes the verification of~\eqref{eq:proof-LDP-noncompact:ineq-pos-max-pr}. \smallskip It remains to show that condition \ref{cond:FK7} is fulfilled. However, this is precisely the conclusion of Proposition \ref{prop:non_compact:H1_leq_H2} - the function $V(y) = \beta (y)\cdot p$ where $\beta$ is as in condition (vii) is an element of $C_b (E)$, and by~\ref{item:thm_LDP_non_compact:Lyapunov3}, the function $\Psi$ has compact superlevel-sets. \smallskip We have shown that under the assumptions of the theorem, all conditions of Lemma \ref{lemma:FengKurtz} are fulfilled. The large deviations principle for the empirical measures of the sped-up versions thus holds and Proposition \ref{prop:LDP_strategy} then gives the large deviations principle for the empirical measures $\{ \eta _t \}$ associated with~$Y$. \smallskip We are left with showing that the rate function $I ^{\Psi}$ of Proposition \ref{prop:LDP_strategy} satisfies \begin{align*} I ^{\Psi} (\mu) = -\inf _{u \in \mathcal D^{++} (L)} \int _{E} \frac{Lu}{u} \mathrm{d}\mu. \end{align*} Below, we prove that \begin{equation*} \limsup_{n\to\infty}\int_{E}\frac{L\varphi_n}{\varphi_n} \mathrm{d}\mu \leq \int_E \Psi \mathrm{d}\mu. \end{equation*} Then \begin{equation*} \inf_{u \in \mathcal D^{++} (L)}\int_E\frac{Lu}{u} \mathrm{d}\mu \leq \inf_n \int_E \frac{L\varphi_n}{\varphi_n} \mathrm{d}\mu \leq \int_E \Psi \mathrm{d}\mu, \end{equation*} and hence the rate function is given by \begin{align*} I^{\Psi} (\mu) = -\min \left[ \inf _{u \in \mathcal D^{++} (L)} \int _{E} \frac{Lu}{u} \mathrm{d}\mu, \int _E \Psi d\mu \right] = -\inf _{u \in \mathcal D^{++} (L)} \int _{E} \frac{Lu}{u} \mathrm{d}\mu. \end{align*} To see that the functions $\varphi_n$ satisfy the limsup inequality, note that $\Psi$ has compact super-level sets and $\Psi(y)\to-\infty$ as $|y|\to\infty$. Since the compact sets $K_n^q$ exhaust $E$ in the sense that $E = \cup_n K^q_n$ and $K^q_n\subseteq K^q_{n+1}$, there exists a constant $C > 0$ such that \begin{equation*} f_n = -\frac{L\varphi_n}{\varphi_n} + C \geq 0 . \end{equation*} Pointwise, we have $f=-\Psi + C = \liminf_n f_n$. Therefore, by Fatou's lemma \begin{equation*} \liminf_{n\to\infty} \int_E \left[-\frac{L\varphi_n}{\varphi_n} + C\right]\, \mathrm{d}\mu \geq \int_E\left[-\Psi + C\right]\, \mathrm{d}\mu, \end{equation*} and the required limsup inequality follows from reorganizing. \end{proof} We now prove the important Proposition \ref{prop:non_compact:H1_leq_H2}. The proof is essentially a combination of different arguments from Chapter 11 and Appendix B of \cite{FengKurtz2006} (see especially Lemmas 11.12, 11.37, B.9-B.11 for full details). We present the proof as to make the presentation self-contained and give a succinct derivation of the results for the setting we consider. The main novelty compared to the arguments in \cite{FengKurtz2006} is that we work with measures $\nu \in \mathcal P _c (E) $ rather than imposing the condition $\int _E \Psi \nu > -\infty$, and we must verify that we can indeed modify the latter. \begin{proof}[Proof of Proposition \ref{prop:non_compact:H1_leq_H2}] The strategy is to find two constants, depending on $V$, $c_V^\ast$ and $c_V ^{\ast\ast}$ such that $c_V ^\ast \geq c_V ^{\ast \ast} $ and \begin{align} \label{eq:ineqH} H_1 ^{\Psi} \leq c_V ^{\ast\ast}, \, \, \textrm{and }\, H_2 ^{\psi} \geq c_V ^\ast, \end{align} To achieve this we study the following quantity: for $\nu \in \mathcal P_c (E)$, define \begin{align*} c_V (\nu) = \limsup _{t \to \infty} \frac{1}{t} \log \mathbb{E} \left[ \mathrm{exp}\left\{ \int _0 ^t V(Y(s)) \mathrm{d} s \right\} \right]. \end{align*} It can be shown - see e.g. Lemma B.9 in \cite{FengKurtz2006} - that under \ref{item:thm_LDP_non_compact:mixing}, $c_V (\nu)$ exists for each $\nu \in \mathcal P _c (E)$ and the necessary inequalities for $H_i ^{\Psi}$ can be derived for \begin{align*} c_V^{\ast} = \inf_{\nu \in \mathcal P _c (E)} c_V(\nu) \quad \text{ and } \quad c_V^{\ast\ast} = \sup_{\nu \in \mathcal P _c (E)} c_V(\nu). \end{align*} Cleary $c_V ^\ast \leq c_V ^{\ast \ast}$. However it can be shown, again using~\ref{item:thm_LDP_non_compact:mixing}, that the two quantities are in fact equal, that $c_V (\nu)$ is independent of $\nu$ on $\mathcal P _c (E)$. If we can prove \eqref{eq:ineqH} this would then yield the claim. We start with the upper bound \begin{align*} H_1 ^{\Psi} \leq c_V ^{\ast\ast}. \end{align*} An argument similar to what will follow is also used in \cite{DonskerVaradhan75}, in the proof of their Lemma~2. Because $\Psi$ has compact superlevel-sets $\{ \Psi \geq c \}$, $c\in \mathbb{R}$, and $\Psi (y) \to - \infty$ as $\norm{y} \to \infty$, it can be shown using the arguments of Lemma B.11 of \cite{FengKurtz2006} that \begin{align*} \sup_{\nu \in \mathcal{P}_c(E)} \inf_{f \in \mathcal{D}^{++}(L)} \int_E \left(V + \frac{Lf}{f}\right)d\nu \leq c_V^{\ast\ast}. \end{align*} It therefore suffices to show that \begin{align} \label{eq:ineqH1} H_1 ^{\Psi} \leq \sup_{\nu \in \mathcal{P}_c(E)} \inf_{f \in \mathcal{D}^{++}(L)} \int_E \left(V + \frac{Lf}{f}\right)d\nu. \end{align} For any finite collection of functions $f_1, \dots , f_m$ in $\mathcal D ^{++} (L)$ and scalars $\alpha_i \geq 0$, $i=1,\dots , m$, $\sum \alpha_i =1$, we have \begin{align*} H_1 ^{\Psi} \leq \inf_{0 < \kappa \leq 1} \inf_{\alpha_i} \inf_{f_1,\dots,f_m} \sup_{y \in E} \left[ V(y) + (1-\kappa)\sum_{i=1}^m \alpha_i \frac{Lf_i(y)}{f_i(y)} + \kappa \Psi(y), \right] \end{align*} which follows as in Lemma~11.35 of~\cite{FengKurtz2006}; define for $t>0$ \begin{align*} h_t = \frac{1}{t} \int _0 ^t S(\tau) \prod _{i=1} ^m f_i ^{\alpha _i} d \tau. \end{align*} Then as we let $t\to 0$, \begin{align*} \lim_{t \to 0} h_t = \prod_i f_i^{\alpha_i}, \end{align*} and we have the upper bound \begin{align*} \lim_{t \to 0}Lh_t \leq \left(\prod_i f_i^{\alpha_i}\right) \sum_i \alpha_i \frac{Lf_i}{f_i}, \end{align*} where the convergence is uniform. Now specializing in the definition of~$H_1^\Psi$ to with these type of functions~$h_t$ with $f_1,\dots,f_m$ and according~$\alpha_i$, and taking the limit $t\to 0$ gives the above estimate for~$H_1^\Psi$. By Lemma~11.37 of~\cite{FengKurtz2006}, we can select a sequence of functions $\{ f_i \} $ from $\mathcal D ^{++} (L)$ such that for any $\mu \in \mathcal P (E)$, \begin{equation*} \inf_{i} \int_E \frac{Lf_i}{f_i} d\mu = \inf_{f \in \mathcal{D}^{++}(L)} \int_E \frac{Lf}{f} d\mu. \end{equation*} % Specialising to these functions, for any $m \in \mathbb{N}$ and $\kappa > 0$ we have the upper bound % \begin{equation*} H_1 ^{\Psi} \leq \inf_{\alpha_i} \sup_{y \in E} \left[ V(y) + (1-\kappa)\sum_{i=1}^m \alpha_i \frac{Lf_i(y)}{f_i(y)} + \kappa \Psi(y). \right] \end{equation*} % The functions $V + Lf_i/f_i$ are bounded, but a priori there is no guarantee that the supremum is attained in a given compact set. However, because $\Psi(y) \to -\infty$ as $\norm{y} \to \infty$, for any $m \in \mathbb{N}$ and $\kappa > 0$, there exists a constant $\ell = \ell(m,\kappa) > 0$ such that the supremum is attained in the compact set $K_{\ell} = \{\Psi \geq -\ell\}$. Therefore, if we define $\mathcal{K}_\ell = \{\nu \in \mathcal{P}(E): \nu(K_\ell) = 1\}$, then % \begin{align*} H_1 ^{\Psi} &\leq \inf_{\alpha_i} \sup_{y \in K_{\ell}} \left[ V(y) + (1-\kappa)\sum_{i=1}^m \alpha_i \frac{Lf_i(y)}{f_i(y)} + \kappa \Psi(y) \right] \\ &= \inf_{\alpha_i} \sup_{\nu \in \mathcal{K}_\ell} \left[ \int_E\left(V(y) + (1-\kappa)\sum_{i=1}^m \alpha_i \frac{Lf_i(y)}{f_i(y)} + \kappa \Psi(y) \right) d\nu(y) \right]. \end{align*} % For any $\ell$, we have $\mathcal{K}_\ell \subseteq \mathcal{P}_c(E)$, so that % \begin{equation*} H_1 ^{\Psi} \leq \inf_{\alpha_i} \sup_{\nu \in \mathcal{P}_c(E)} \left[ \int_E\left(V + (1-\kappa)\sum_{i=1}^m \alpha_i \frac{Lf_i}{f_i} + \kappa \Psi \right) d\nu \right]. \end{equation*} % For any $m \in \mathbb{N}$, the set $\{ \alpha_i: \alpha _i \geq 0, \sum _{i=1} ^m \alpha _i =1 \}$ is compact and the infimum and supremum in the last display can be exchanged by Sion's Theorem. This yields % \begin{align*} H_1 ^{\Psi} &\leq \sup_{\nu \in \mathcal{P}_c(E)} \inf_{\alpha_i} \left[ \int_E\left(V + (1-\kappa)\sum_{i=1}^m \alpha_i \frac{Lf_i}{f_i} + \kappa \Psi \right) d\nu \right] \\ &= \sup_{\nu \in \mathcal{P}_c(E)} \left[ \int_E\left(V + (1-\kappa)\min_{i\leq m} \frac{Lf_i}{f_i} + \kappa \Psi \right) d\nu \right], \end{align*} % where we have used that $\inf_{\alpha_i}\sum \alpha_i x_i = \min_i x_i$ for non-negative $x$ and $f_i \in \mathcal D ^{++} (L)$. Taking the infimum over $\kappa$ and the limit $m \to \infty$, % \begin{align*} H_1 ^{\Psi} &\leq \lim_{m \to \infty} \inf_{0 < \kappa \leq 1} \sup_{\nu \in \mathcal{P}_c(E)} \left[ \int_E V d\nu + (1-\kappa) \min_{i \leq m} \int_E \frac{Lf_i}{f_i} d\nu + \kappa \int_E \Psi d\nu \right] \\ & = \lim_{m \to \infty} \sup_{\nu \in \mathcal{P}_c(E)} \left[ \int_E V d\nu + \min\left\{\min_{i \leq m} \int_E \frac{Lf_i}{f_i} d\nu, \int_E \Psi d\nu \right\} \right]. \end{align*} % The limit and supremum can be shown to commute similarly to the last part of the proof of Lemma 11.12 in \cite{FengKurtz2006}, leading to \begin{align*} H_1 ^{\Psi} &\leq \sup_{\nu \in \mathcal{P}_c(E)} \left[ \int_E V d\nu + \min\left\{\inf_{f \in \mathcal{D}^{++}(L)} \int_E \frac{Lf}{f} d\nu, \int_E \Psi d\nu\right\} \right] \\ &\leq \sup_{\nu \in \mathcal{P}_c(E)} \left[ \int_E V d\nu + \inf_{f \in \mathcal{D}^{++}(L)} \int_E \frac{Lf}{f} d\nu \right] . \end{align*} This completes the proof of the upper bound for $H^ {\Psi} _1$. Next, we move to the lower bound for $H_2 ^{\Psi}$. Take $\lambda < c_V^\ast$. We prove that for any $\varepsilon > 0$, we have $H_2 ^{\Psi} \geq \lambda - \varepsilon$. To this end, we define the new semigroup $ \{ T(t) \} $ by \begin{align*} (T(t)f)(y) = \mathbb{E} \left[ f(Y_t) e^{\int_0 ^t V(Y_s)ds} | Y(0)=y \right], \end{align*} set \begin{align*} R_{\lambda} ^t f = \int _0 ^t e^{-\lambda s} T(s) g ds, \end{align*} and take $\Gamma$ to be the collection of functions $f_{\gamma}$ of the form \begin{align*} f_{\gamma} = \int _0 ^\infty R_{\lambda} ^t 1 \gamma (dt), \ \ \gamma \in \mathcal P ([0,\infty)). \end{align*} Then $\Gamma \subseteq \mathcal{D}^{++}(L)$ and for any $f \in \Gamma$ we have the uniform lower bound % \begin{equation} \label{eq:uniformLower} V(y) + (1+\kappa) \frac{Lf (y)}{f(y)}\geq -(1-2\kappa)\|V\|, \ \ y \in E. \end{equation} % Because $\Gamma \subseteq \mathcal D ^{++} (L)$, for any $\kappa >0$ we have the lower bound % \begin{equation*} H_2 ^{\Psi} \geq \sup_{f \in \Gamma} \inf_{y\in E} \left[ V(y) + (1+\kappa)\frac{Lf(y)}{f(y)} - \kappa \Psi (y) \right]. \end{equation*} % Due to the uniform lower bound \eqref{eq:uniformLower} and the fact that $\Psi(y) \to -\infty$ as $\norm{y} \to \infty$, for any $\kappa$ there exists an $\ell = \ell(\kappa)$ such that the infimum over $E$ is attained in the compact set $K_\ell = \{ \Psi \geq -\ell\}$. Therefore, % \begin{align*} H_2 ^{\Psi} &\geq \sup_{f \in \Gamma} \inf_{y\in K_\ell} \left[ V(y) + (1+\kappa)\frac{Lf(y)}{f(y)} - \kappa \Psi(y) \right] \\ &= \sup_{f \in \Gamma} \inf_{\nu \in \mathcal{K}_\ell} \left[ \int_E \left( V + (1+\kappa)\frac{Lf}{f} - \kappa \Psi\right)\,d\nu \right] \\ &= \sup_{f \in \Gamma} \inf_{\nu \in \mathcal{K}_\ell} \frac{1}{\int_E f d\nu} \left[ -\kappa \int_E (V + \Psi) f d\nu + \int_E (1+\kappa) (V+L)f d\nu \right], \end{align*} % where $\mathcal{K}_\ell = \{\nu \in \mathcal{P}(E): \nu(K_\ell) = 1\}$. The second equality follows from the fact that $\inf_\nu \int_E (a/b) d\nu = \inf_\nu (\int_E a d\nu)/ (\int_E b d\nu)$ for $b > 0$. By compactness of $\mathcal{K}_\ell$ and the fact that both $\mathcal{K}_\ell$ and $\Gamma$ are convex, the infimum and supremum are exchangable by Sion's Theorem. This gives the lower bound % \begin{align*} H_2 ^{\Psi} &\geq \inf_{\nu \in \mathcal{K}_\ell} \sup_{f \in \Gamma} \frac{1}{\int_E f d\nu} \left[ -\kappa \int_E (V + \Psi) f d\nu + \int_E (1+\kappa) (V+L)f d\nu \right] \\ &\geq \inf_{\nu \in \mathcal{P}_c(E)} \sup_{f \in \Gamma} \frac{1}{\int_E f d\nu} \left[ -\kappa \int_E (V + \Psi) f d\nu + \int_E (1+\kappa) (V+L)f d\nu \right], \end{align*} The second estimate follows since $\mathcal{K}_\ell \subseteq \mathcal{P}_c(E)$ for any $\ell$. The rest of the proof follows arguments similar to those used in~\cite{FengKurtz2006}: taking the limit $\kappa \to 0$, and moving it inside the infimum and supremum, we obtain the lower bound % \begin{align*} H_2 ^{\Psi} & \geq \inf_{\nu \in \mathcal{P}_c(E)} \sup_{f \in \Gamma} \left[ \frac{1}{\int_E f d\nu}\int_E (V+L)f d\nu \right]. \end{align*} % Therefore, for any $\varepsilon$, there exists a $\nu_\varepsilon \in \mathcal{P}_c(E)$ such that % \begin{align*} H_2 ^{\Psi} \geq \sup_{f \in \Gamma} \left[ \frac{1}{\int_E f d\nu_\varepsilon}\int_E (V+L)f d\nu_\varepsilon \right] - \varepsilon. \end{align*} % There exist functions $f_t \in \Gamma$ satisfying % \begin{align*} \frac{\int_E (V+L) f_t d\nu}{\int_E f_t d\nu} = \lambda + \frac{ \int_E e^{-\lambda t} T(t) 1 d\nu - 1}{\int_E f_t d\nu}, \end{align*} % for any $\nu \in \mathcal{P}_c(E)$. Specialising to such $f_t$, we obtain % \begin{align*} H_2 ^{\Psi} \geq \lambda + \frac{\int_E e^{-\lambda t} T(t)1 d\nu_\varepsilon - 1}{\int_E f_t d\nu_\varepsilon} - \varepsilon. \end{align*} % Since $\limsup_{t \to \infty} \int_E e^{-\lambda t} T(t) 1 d\nu_\varepsilon = \infty$, the second term is positive for $t$ large enough, giving the bound % \begin{equation*} H_2 ^{\Psi} \geq \lambda - \varepsilon. \end{equation*} % This completes the proof of the lower bound for $H_2 ^{\Psi}$, and thereby the lemma. \end{proof} \subsection{Proofs for the empirical measure of the zig-zag process} In this section, we prove the large deviations theorems for the empirical measures of the zig-zag process. \subsubsection{Proof of Theorem~\ref{thm:LDP-zigzag:compact}---compact case} \label{section:zig-zag:LDP:compact} For the proof of Theorem~\ref{thm:LDP-zigzag:compact}, recall that the zig-zag generator takes the form \begin{equation*} Lf(x,v)=v\partial_x f(x,v) + \lambda(x,v)\left[f(x,-v)-f(x,v)\right], \quad (x,v)\in E:= \mathbb{T}\times\{\pm 1\}. \end{equation*} It is enough to show that assumptions \ref{item:thm_LDP_compact:Feller}-\ref{item:thm_LDP_compact:principal_eigenvalue} hold for the zig-zag process on $E$, the result then follows form Theorem \ref{thm:proving_LDP:LDP_compact}. We first verify that $L$ is a closed operator that generates the zig-zag process. Note that $L$ is a restriction of the extended generator (see Section~\ref{sec:zig-zag}). We verify that $L$ is a closed operator. Let $\{ f_n \}$ be a sequence in $\mathcal{D}(L)$ such that $f_n \to f$ and $Lf_n \to g$, some $f,g$, both uniformly on~$E$. Then \begin{equation*} \lim_{n \to \infty} v \partial_x f_n(x,v) = g(x,v) - \lambda(x,v) \left[ f(x,-v) - f(x,v) \right]. \end{equation*} We can represent $f_n (x,v)$ as \begin{equation*} f_n(x,v) = f_n(0,v) + v \int_0^x v \partial_x f_n(\xi,v) \, d\xi, \end{equation*} and from the dominated convergence theorem we obtain that \begin{equation*} f(x,v) = f(0,v) + v \int_0^x \left[ g(\xi,v) - \lambda(\xi,v) \left( f(\xi,-v) - f(\xi,v) \right) \right] \, d\xi. \end{equation*} In particular, $f \in \mathcal{D}(L)$, and $Lf = g$ follows from taking derivative $\partial_x$ and multiplying by $v$. The Feller-continuity property \ref{item:thm_LDP_compact:Feller} of the zig-zag semigroup $S$ is proven in Proposition~4 of~\cite{BierkensRoberts2017}. Since $\mathbb{T}$ is compact, this also follows from the boundedness of the continuous rates $\lambda$, see \cite[Theorem 27.6]{Davis1993}. It remains to verify assumption \ref{item:thm_LDP_compact:principal_eigenvalue}, the principal-eigenvalue problem. Take $V \in C(E)$. We will show that for any constant $\gamma > \sup_E V$, as a map from $C(E)$ to $\mathcal{D}(L) \subseteq C(E)$, the resolvent % \begin{align} \label{eq:resolvent} R_\gamma = \left( \gamma - (V+L) \right)^{-1}, \end{align} % is compact and strongly positive; here strongly positive means that if $f \geq 0$ and $f \neq 0$, then $R_\gamma f > 0$ on $E$. Given strong positivity and compactness, by the Krein-Rutman theorem there exists a strictly positive function $g \in C(E)$ and a real eigenvalue $\beta >0 $ such that % \begin{equation*} \left( \gamma - (V+L) \right)^{-1} g = \beta g. \end{equation*} % The resolvent maps into the domain of $L$, so that $g \in \mathcal{D}(L)$. An application of $\gamma - (V+L)$ in the eigenvalue equation gives % \begin{equation*} (V+L) g = \left(\gamma - \frac{1}{\beta}\right) g. \end{equation*} This is precisely \ref{item:thm_LDP_compact:principal_eigenvalue} with function $g$ and eigenvalue $(\gamma - 1/\beta)$. We are left with verifying that the resolvents defined by \eqref{eq:resolvent} are strongly positive and compact. For strong positivity, because $V$ is continuous on $E$, it is sufficient to prove strong positivity of $(\gamma - L)^{-1}$; see \cite[Proposition C-III-3.3]{arendt1986one}. The resolvent $(\gamma - L)^{-1}$ exists for any $\gamma > 0$, and is given by % \begin{equation} \label{eq:resolvent2} (\gamma - L)^{-1} f = \int_0^\infty e^{-\gamma t} S(t)f \, dt. \end{equation} % The semigroup associated to the zig-zag process is irreducible in the following sense: for any $f \in C(E)$ such that $f \geq 0$ and $ f \neq 0$, \begin{align*} \cup_{t \geq 0}\left\{ z \in E \,:\, S(t) f(z) > 0 \right\} = E. \end{align*} Combined with \eqref{eq:resolvent2} this implies strong positivity of $(\gamma - L) ^{-1}$; see \cite[Definition C-III-3.1]{arendt1986one}. \smallskip For compactness of $R_\gamma$, let $A \subseteq C(E)$ be bounded. We show that the image $B := R_\gamma(A) \subseteq C(E)$ is bounded and equi-continuous. Compactness of the resolvent then follows from an application of the Arzelà-Ascoli theorem. To show boundedness, by dissipativity of $L$ we obtain, for any $g \in B$, % \begin{align*} (\gamma -\|V\|_E) \|g \| &\leq \|(\gamma - (V+L))g\| \\ & \leq \sup_{f \in A} \|f\| \\ &< \infty. \end{align*} % Hence $B$ is bounded by $C_A / (\gamma - \|V\|_E)$, where $ C_A := \sup _{f \in A} \|f\|$, and we end the proof by showing that $B$ is equi-continuous. For any $g \in B$ we have $(\gamma - (V + L))g = f$ for some $f \in A$, which implies % \begin{equation*} v \partial_x g(x,v) = f(x,v) + V(x,v) g(x,v) + \gamma g(x,v) - \lambda(x,v) (g(x,-v) - g(x,v). \end{equation*} % By boundedness of the functions $\lambda(x,v)$ and $V$ on $E$ and the sets $A$ and $B$, % \begin{equation*} \sup_{g \in B} \|\partial_x g\| \leq C \sup_{g \in B}\|g\| + \sup_{f \in A}\|f\| < \infty. \end{equation*} % Hence functions in $B$ have uniformly bounded derivatives, and as a consequence, $B$ is equi-continuous. It follows that $R_{\gamma}$ in \eqref{eq:resolvent} is compact and strongly continuous. This finishes the verification of \ref{item:thm_LDP_compact:principal_eigenvalue} and we have shown that assumptions \ref{item:thm_LDP_compact:Feller}-\ref{item:thm_LDP_compact:principal_eigenvalue} hold for the zig-zag process on the compact state space $\mathbb{T} \times \{ \pm 1\}$. An application of Theorem \ref{thm:proving_LDP:LDP_compact} then proves the claimed large deviations principle. \subsubsection{Proof of Theorem~\ref{thm:LDP-zigzag:non-compact-1d}---non-compact case} \label{section:zig-zag:LDP:non_compact} For notational simplicity we take $E = \mathbb{R} \times \{ \pm 1\}$. Similar to the proof of Theorem \ref{thm:LDP-zigzag:compact}, the strategy is to verify the conditions of the more general large deviations result Theorem \ref{thm:proving_LDP:LDP_non_compact}, which covers the non-compact setting. That is, it suffices to verify \ref{item:thm_LDP_compact:Feller}, \ref{item:thm_LDP_compact:tight}, \ref{item:thm_LDP_non_compact:Lyapunov} and \ref{item:thm_LDP_non_compact:mixing}. \smallskip Condition \ref{item:thm_LDP_compact:Feller}, Feller-continuity of the Markov semigroup, is proven in Proposition 4 of~\cite{BierkensRoberts2017}. Next, we use Theorem 7.2 of \cite{EthierKurtz1986} to verify \ref{item:thm_LDP_compact:tight}. Define the metric $d$ on $E$ as \begin{align*} d((x,v),(y,v')) = |x-y|_\mathbb{R} + |v-v'|, \end{align*} and for any path $\gamma \in D_E[0,\infty)$ set % \begin{equation*} w'(\gamma,\delta,T) = \inf_{\{t_i\}} \max_i \sup_{s,t \in [t_i,t_{i+1})} d(\gamma(s),\gamma(t)), \end{equation*} % where the infimum is taken over finite partitions $\{ t_i \}$ of $[0,T]$ such that $\min_i |t_{i+1}-t_i| > \delta$. Theorem 7.2 of \cite{EthierKurtz1986} states that tightness of $\{ \mathbb{P} _y : \ y \in K \}$ is equivalent to the following two conditions: \begin{enumerate}[label =(\arabic*)] \item \label{item:proof-LDP-zigzag:tightness1} For any $\varepsilon > 0$ and rational $t > 0$, there exists a compact set $K_{\varepsilon,t} \subseteq E$ such that % \begin{equation*} \inf_{y \in K} \mathbb{P}_y\left[Y_t \in K_{\varepsilon,t} \right] \geq 1 - \varepsilon. \end{equation*} % \item \label{item:proof-LDP-zigzag:tightness2} For any $\varepsilon > 0$ and $T > 0$, there exists a $\delta > 0$ such that % \begin{equation*} \sup_{y \in K} \mathbb{P}_y\left[w'\left(Y,\delta,T\right) \geq \varepsilon\right] \leq \varepsilon. \end{equation*} \end{enumerate} The spatial component $X_t$ of the zig-zag process propagates with finite speed. This implies that there exists a compact set $K_t \subseteq \mathbb{R}$ such that if $y \in K$, then \begin{equation*} \mathbb{P}_y \left[X_t \in K_t \right] = 1. \end{equation*} For any $\varepsilon > 0$ and $t>0$, taking $K_{\varepsilon,t} = K_t \times \{\pm 1\}$ gives~\ref{item:proof-LDP-zigzag:tightness1}. \smallskip For part \ref{item:proof-LDP-zigzag:tightness2}, let $\varepsilon > 0$ and $T > 0$. For any realization $Y(\omega)$ of the zig-zag process on the time interval $[0,T]$, if the sojourn times $\tau_i$ satisfy $\min_i \tau_i > 2\delta$, then $w'(Y(\omega),\delta,T) \leq 2\delta$. In particular, for $\delta$ small enough, $w'(Y(\omega),\delta,T) < \varepsilon$. The probability of having at least one sojourn time that is less than $2\delta$ can be estimated uniformly over starting points $y\in K$. Let $K(T)$ denote the set of points that the zig-zag can reach in the time interval $[0,T]$ when starting in the set $K$ and set $\lambda_K = \sup_{y \in K(T)}\lambda(y)$, a uniform upper bound on the jump rates $\lambda(x,v)$. An estimate for the probability of at least one sojourn time that is less than $2\delta$ is then given by \begin{equation*} \sup_{y\in K} \mathbb{P}_y\left[\min_i \tau_i \leq 2\delta\right] \leq 1 - e^{-\lambda_K 2\delta}. \end{equation*} For any $y\in K$ we obtain the bound \begin{align*} \mathbb{P}_y\left[w'(Y,\delta,T) \geq \varepsilon\right] &= \mathbb{P}_y\left[\{w'(Y,\delta,T)\geq \varepsilon\} \cap \{\min_i \tau_i > 2\delta\}\right] \\ & \quad + \mathbb{P}_y\left[\{w'(Y,\delta,T)\geq \varepsilon\} \cap \{\min_i \tau_i \leq 2\delta\}\right]\\ &\leq 0 + \mathbb{P}_y\left[\{\min_i \tau_i \leq 2\delta\}\right] \\ &\leq 1 - e^{-\lambda_K 2\delta}. \end{align*} It follows that, as $\delta \to 0$, \begin{equation*} \sup_{y \in K} \mathbb{P}_y\left[\{\min_i \tau_i \leq 2\delta\}\right] \leq 1 - e^{-\lambda_K 2\delta} \to 0, \end{equation*} and \ref{item:proof-LDP-zigzag:tightness2} follows from taking $\delta$ small enough that $1 - e^{-\lambda_K 2\delta} < \epsilon$. We now move to verifying Condition \ref{item:thm_LDP_non_compact:Lyapunov}, by explicitly defining two Lyapunov functions $g_1,g_2 : E \to \mathbb{R}$ satisfying the condition. For brevity, we carry out the calculations for the case of $\gamma (x) \equiv 0$ in the switching rate $\lambda$ (see \eqref{eq:switching-intensity-condition-2}). Then we can use the following functions: for $\alpha_1,\alpha_2 \in (0,1)$ and $\beta > 0$, let \begin{align*} g_1(x,v) &= \alpha_1 V(x) + \beta v U'(x),\\ g_2(x,v) &= \alpha_2 U(x) + \beta v U'(x). \end{align*} For non-constant $\gamma$ that is uniformly bounded by some $\bar \gamma$, the following functions can instead be used: \begin{align*} g_1(x,v) &= \alpha_1 V(x) + \phi(v U'(x)),\\ g_2(x,v) &= \alpha_2 U(x) + \phi(v U'(x)), \end{align*} where $\phi(s) = \beta \frac{1}{2} \text{sign}(s) \log(\bar{\gamma} + |s|)$ and $\beta \in (0,1)$. For example, for the choice $\beta = 1/2$ calculations analogous to the ones below hold. We now return to the case $\gamma \equiv 0$ and take $g_1, g_2$ accordingly. Without loss of generality we can assume $g_1, g_2 \geq 0$: we can take $\beta$ small enough and if necessary add a constant to ensure that this holds. We show that for suitable $\alpha_i$ small enough, the functions $g_1,g_2$ satisfy \ref{item:thm_LDP_non_compact:Lyapunov}. For two real-valued functions $f$ and $g$, we write~$f \sim g$ as $x \to \infty$ to say that they asymptotically equivalent in the limit $x \to \infty$, that means~$(f(x)/g(x)))\to 1$ as~$x\to\infty$. \smallskip By \ref{item:thm-LDP-zig-zag:Upsi}, $V(x) \to \infty$, and by \ref{item:thm-LDP-zig-zag:Upsii}, $U'(x)/V(x) \to 0$. It follows that $g_1$ grows to infinity as $|x| \to \infty$. Moreover, $g_2$ grows to infinity by the assumption \ref{item:thm-LDP-zig-zag:Ui} on $U$; since $g_1$ and $g_2$ are continuous, this settles part (a) of \ref{item:thm_LDP_non_compact:Lyapunov}. Part (b) of \ref{item:thm_LDP_non_compact:Lyapunov} requires that that $g_2$ grows faster than $g_1$ at infinity. This follows from Assumption \ref{item:thm-LDP-zig-zag:Upsii} on the potentials $U$ and $V$: both dominate the derivative $U'$, and $U$ grows faster than $V$. \smallskip To show that \ref{item:thm_LDP_non_compact:Lyapunov} holds for the zig-zag process, we show that both $g_1$ and $g_2$ satisfy \begin{equation*} e^{-g_i(x,v)} (B e^{g_i})(x,v) \to -\infty \quad |x|\to\infty. \end{equation*} Then since $e^{-g_i(x,v)} (B e^{g_i})(x,v)$ is continuous, the compactness of superlevel-sets follows. \smallskip By the definition of $g_1, g_2$ and the extended generator $B$, \begin{align*} e^{-g_1(x,v)} (B e^{g_1})(x,v) &= \alpha_1 v V'(x) + \beta U''(x) + \max(vU'(x),0) \left[e^{-2v\beta U'(x)} - 1\right], \end{align*} and \begin{align*} e^{-g_2(x,v)} (B e^{g_2})(x,v) &= \alpha_2 v U'(x) + \beta U''(x) + \max(vU'(x),0) \left[e^{-2v\beta U'(x)} - 1\right]. \end{align*} We first verify the condition for $g_2$. For $v = +1$, we have \begin{equation*} e^{-g_2(x,+1)} (B e^{g_2})(x,+1) = \alpha_2 U'(x) + \beta U''(x) + \max(U'(x),0) \left[e^{-2 \beta U'(x)} - 1\right]. \end{equation*} For $x \to + \infty$, we have $U'(x) \to + \infty$ by~\ref{item:thm-LDP-zig-zag:Ui}, so that \begin{align*} e^{-g_2(x,+1)} (B e^{g_2})(x,+1) &= U'(x) \left[\alpha_2 -1 + \beta \frac{U''(x)}{U'(x)} + e^{-2\beta U'(x)}\right] \\ &\sim U'(x) (\alpha_2 - 1) \to -\infty,\quad x \to + \infty, \end{align*} since $U''/U' \to 0$ by~\ref{item:thm-LDP-zig-zag:Uiii} and $\alpha_2 < 1$. \smallskip For $x \to -\infty$, we have $U'(x) \to -\infty$ by~\ref{item:thm-LDP-zig-zag:Ui}, in particular $U'(x) < 0$ for large $x$. Hence, \begin{align*} e^{-g_2(x,+1)} (B e^{g_2})(x,+1) &= U'(x) \left[\alpha_2 + \beta \frac{U''(x)}{U'(x)}\right] \\ &\sim U'(x) \alpha_2 \to -\infty,\quad x \to - \infty. \end{align*} For $v = -1$, the argument is analogous and we omit the details; this concludes the treatment of $g_2$. \smallskip We now consider $g_1$. For $v = +1$, \begin{align*} e^{-g_1(x,+1)} (B e^{g_1})(x,+1) &= \alpha_1 V'(x) + \beta U''(x) + \max(U'(x),0) \left[ e^{-2v\beta U'(x)} - 1\right]. \end{align*} In the limit $x \to + \infty$, $U'(x) \to +\infty$ and $V'(x)/U'(x) \to 0$ by~\ref{item:thm-LDP-zig-zag:Upsii}. It follows that \begin{align*} e^{-g_1(x,+1)} (B e^{g_1})(x,+1) &= \alpha_1 V'(x) + \beta U''(x) + U'(x) \left[ e^{-2v\beta U'(x)} - 1\right]\\ &= U'(x) \left[\alpha_1 \frac{V'(x)}{U'(x)} + \beta \frac{U''(x)}{U'(x)} + e^{-2\beta U'(x)} - 1\right] \\ &\sim - U'(x) \to - \infty, \quad x \to + \infty. \end{align*} For $x \to -\infty$, similar to the computations for $g_2$, \begin{align*} e^{-g_1(x,+1)} (B e^{g_1})(x,+1) &= \alpha_1 V'(x) + \beta U''(x)\\ &= V'(x) \left[\alpha_1 + \beta \frac{U''(x)}{V'(x)}\right] \to - \infty, \quad x \to + \infty, \end{align*} since $U''/V' \to 0$ by~\ref{item:thm-LDP-zig-zag:Upsiii} and $V' \to - \infty$ by~\ref{item:thm-LDP-zig-zag:Upsi}. The case $v = -1$ can be handled using similar arguments. The preceding computations conclude the verification of Condition~\ref{item:thm_LDP_non_compact:Lyapunov}. We are left with verifying the mixing property \ref{item:thm_LDP_non_compact:mixing}. Let $\nu_1,\nu_2 \in \mathcal{P}_c(E)$. Then there exists a compact set $K\subseteq E$ with $\nu_1(K) = \nu_2(K) = 1$. To show that \ref{item:thm_LDP_non_compact:mixing} holds, we must find $T,M > 0$ and $\rho_1,\rho_2 \in \mathcal{P}([0,T])$ such that for all $A \in \mathcal{B}(E)$, \begin{equation*} \int_0^T\int_E P(t,y,A) \,d\nu_1(y)d\rho_1(t) \leq M \int_0^T\int_E P(t,y,A) \,d\nu_2(y)d\rho_2(t). \end{equation*} By Fubini's theorem, it is sufficient to prove that for any points $y_1 \in \text{supp}(\nu_1)$ and $y_2 \in \text{supp}(\nu_2)$, \begin{equation}\label{eq:proof-LDP-zigzag:sufficient-Fubini} \int_0^T P(t,y_1,A)\,d\rho_1(t) \leq M \int_0^T P(t,y_2,A)\,d\rho_2(t), \end{equation} with $\rho_1,\rho_2,T,M$ independent of $y_1,y_2$. To that end, let $K\subseteq E$ be a compact set containing the support of both $\nu_1$ and $\nu_2$. Without loss of generality, we can take $K$ of the form $K_\mathbb{R} \times \{\pm 1\}$, where $K_\mathbb{R}$ is a closed interval. For $t_1 > 0$, let $K(t_1)$ be the set of points that the zig-zag process with speed one can reach in the time interval $[0,t_1]$ when starting in $K$: \begin{equation*} K(t_1) = \left\{y \in E\,:\, \text{dist}_E(y,K) \leq t_1\right\}. \end{equation*} We prove the inequality \eqref{eq:proof-LDP-zigzag:sufficient-Fubini} for arbitrary points $y_1,y_2 \in K$, using the following two steps; in what follows we set $\mu = \mathrm{Leb} \otimes \mathrm{Unif}_{\pm 1}$. \begin{enumerate}[label=(\roman*)] \item \label{item:proof-zigzag:step_one} For any $t_1 > 0$ and with $\rho_1$ the uniform distribution over $[0,t_1]$, there is a positive constant $C_{K,t_1}$ depending only on $K$ and $t_1$ such that for any $T > t_1$, we have \begin{equation*} \int_0^T P(t,y_1,A)\,d\rho_1(t) \leq C_{K,t_1} \cdot \mu\left(A \cap K(t_1)\right), \quad \text{ for all } A \in \mathcal{B}(E), \end{equation*} with $\mu$ as the reference measure on $\mathcal{B}(E)$. \item \label{item:proof-zigzag:step_two} There exist positive constants $T > 0$ and $C'_{K,T}$ such that with $\rho_2$ the uniform distribution over $[0,T]$, we have \begin{equation*} \int_0^T P(t,y_2,A)\,d\rho_2(t) \geq C'_{K,T}\cdot \mu\left(A \cap K(t_1)\right), \quad \text{ for all } A \in \mathcal{B}(E). \end{equation*} \end{enumerate} Suppose \ref{item:proof-zigzag:step_one} and \ref{item:proof-zigzag:step_two} hold. Then the estimate \eqref{eq:proof-LDP-zigzag:sufficient-Fubini} also holds, with $M = C_{K,t_1}/C'_{K,T}$, some $t_1 < T$. \smallskip To verify \ref{item:proof-zigzag:step_one}, note that the measure \begin{equation*} \mu_{y_1}(A) = \int_0^T P(t,y_1,A)\,d\rho_1(t) \end{equation*} is absolutely continuous with respect to $\mu= \mathrm{Leb} \otimes \mathrm{Unif}_{\pm 1}$ and its density is uniformly bounded in $K$. Now~\ref{item:proof-zigzag:step_one} follows since $P(t,K,A) = 0$ whenever $A \cap K(t_1) = \emptyset$ and $t \leq t_1$. \smallskip Next, we use Lemma 8 of \cite{bierkens2019ergodicity} to show \ref{item:proof-zigzag:step_two}. To that end, recall that a tuple $(y,y')$ in $E \times E$ is called reachable if there exists an admissible path from $y$ to $y'$. By Theorem 4 of \cite{bierkens2019ergodicity}, any two points are reachable as long as the potential $U$ has at least one non-degenerate local minimum (which is trivially satisfied on $\mathbb R$ under our assumptions) and satisfies $U\in C^3(\mathbb{R})$. \smallskip By Lemma 8 in \cite{bierkens2019ergodicity}, for any two points $y_a = (x_a,v_a)$ and $y_b = (x_b,v_b)$ in $E$, there are open neighborhoods $U_{y_a}$ of $x_a$ and $U_{y_b}$ of $x_b$, a time interval $(t_0,t_0 + \varepsilon]$ and a constant $c > 0$ such that for all $x_a'\in U_{y_a}$ and $t \in (t_0,t_0 + \varepsilon]$, \begin{equation*} P\left(t,(x_a',v_a),A_\mathbb{R} \times \{v_b\}\right) \geq c \, \mathrm{Leb}(A \cap U_{z_b}),\quad \text{ for all }A_\mathbb{R} \in \mathcal{B}(\mathbb{R}). \end{equation*} The spatial part of $K \times K(t_1)$ can be covered by open squares associated to all pairs of start and final points $y_a$ and $y_b$, with $y_a \in K$ and $ y_b \in K(t_1)$, as \begin{equation*} K_\mathbb{R} \times K(t_1)_\mathbb{R} \subseteq \bigcup_{(y_a,y_b)} U_{y_a} \times U_{y_b}, \end{equation*} where each $U_{y}$ is an open interval in $\mathbb{R}$. By compactness, there exists a finite subcover by open squares $U_{y_a^i} \times U_{y_b^i}$ corresponding to pairs $(y_a^i,y_b^i)$, \begin{equation*} K_\mathbb{R} \times K(t_1)_\mathbb{R} \subseteq \bigcup_{i = 1}^N U_{y_a^i} \times U_{y_b^i}. \end{equation*} Thereby, the set $K \times K(t_1) \subseteq E \times E$ is covered as \begin{equation*} K \times K(t_1) \subseteq \bigcup_{i = 1}^N \left[ \left(U_{y_a^i}\times \{\pm 1\}\right) \times \left(U_{y_b^i}\times \{\pm 1\}\right)\right]. \end{equation*} Hence for each $z = (x,v) \in K$, there are finitely many open sets $U_{y_b^i}$ covering $K(t_1)_\mathbb{R}$, with corresponding constants $c_i,t_i,\varepsilon_i$ such that for all $t \in (t_i,t_i+\varepsilon_i]$, \begin{equation}\label{eq:proof-LDP-zigzag:bound-P-below} P(t,y,A_\mathbb{R} \times \{v_b^i\}) \geq c_i \mathrm{Leb}(A_\mathbb{R} \cap U_{z_b^i}), \quad \text{ for all } A_\mathbb{R} \in \mathcal{B}(\mathbb{R}). \end{equation} For any $A = A_\mathbb{R} \times A_\pm \in \mathcal{B}(E)$, write \begin{align*} A^+ &:= A \cap (\mathbb{R} \times \{+1\}),\\ A^- &:= A \cap (\mathbb{R} \times \{-1\}). \end{align*} Then with $T > 0$ large enough for all intervals $(t_i,t_i+\varepsilon_i]$ to be contained in $[0,T]$, taking $\rho_2 = \mathrm{Unif}([0,T])$, for any $z \in K$ it holds that \begin{align*} \int_0^T P(t,y,A)\,d\rho_2(t) &\geq \int_0^T P(t,y,A) \sum_i \mathbf{1}_{(t_i,t_i+\varepsilon_i]}(t)\,d\rho_2(t) \\ &= \frac{1}{T}\sum_i \int_{t_i}^{t_i+\varepsilon_i} \left[P(t,y,A^+) + P(t,y,A^-)\right]\, dt. \end{align*} In each time interval $(t_i,t_i+\varepsilon_i]$, at least one transition probability is bounded from below as in~\eqref{eq:proof-LDP-zigzag:bound-P-below}, while the other one can be bounded from below by zero. Thereby, \begin{align*} \int_0^T P(t,y,A)\,d\rho_2(t) &\geq \frac{1}{T} \sum_i \varepsilon_i \cdot c_i\cdot \mathrm{Leb}(A_\mathbb{R} \cap U_{y_b^i}) \\ &\geq \frac{1}{T} \min_i(\varepsilon_i c_i) \sum_i \mu\left[A \cap (U_{y_b^i}\times\{\pm 1\})\right] \\ &\geq \frac{1}{T} \min_i(\varepsilon_ic_i) \cdot \mu \left[A \cap \bigcup_i \left(U_{y_b^i}\times\{\pm 1\}\right) \right] \\ &\geq \frac{1}{T} \min_i(\varepsilon_ic_i) \cdot \mu\left[A \cap K(t_1)\right], \end{align*} where the last inequality follows from $K(t_1)$ being covered by the $U_{y_b^i}\times\{\pm 1\}$. Hence \ref{item:proof-zigzag:step_two} follows with $C_{K,T}' = \min_i(\varepsilon_i c_i)/T$. \smallskip This finishes the verification of Condition \ref{item:thm_LDP_non_compact:mixing}, and thereby the proof of Theorem \ref{thm:LDP-zigzag:non-compact-1d}. \subsection{Derivation of the explicit form of the rate function} \label{sec:proofs-rate-function} Here we prove the results described in Section~\ref{sec:rate}. Recall that the state space is now taken as $E = \mathbb{T} \times \{ \pm 1\}$. Suppose $\mu$ is absolutely continuous with respect to $\nu_0$ and write $\frac{d \mu}{d \nu_0}(x,v) = \rho(x,v)$ for the Radon-Nikodym density of $\mu$ with respect to $\nu_0$, where $\rho$ is assumed to be absolutely continuous. Define a mapping $H : \mathcal D^+(L) \rightarrow \mathbb R$ by \begin{equation} \label{eq:H-functional} H (u) := \int_E \frac{ L u}{u} \ d \mu = \sum_{v\in \{-1,+1\}} \int_{\mathbb{T}} \frac{Lu}{u} (x,v) \rho(x,v) \ d x . \end{equation} We compute \begin{multline}\label{eq:first-steps} H(u) = \int_{\mathbb{T}} \left\{\frac{d \log u^+}{d x} + \lambda^+ \left( \frac{u^-}{u^+} - 1 \right) \right\} \rho^+ \ d x \\+ \int_{\mathbb{T}} \left\{ - \frac{d \log u^-}{d x} + \lambda^- \left( \frac{u^+}{u^-} - 1 \right) \right\} \rho^- \ d x \\= \int_{\mathbb{T}} \left\{ -\log u^+ \frac{d \rho^+}{dx} + \lambda^+ \rho^+ \left( \frac{u^-}{u^+} - 1 \right) \right\} \ d x \\+ \int_{\mathbb{T}} \left \{ \log u^- \frac{d \rho^-}{d x} + \lambda^- \rho^-\left( \frac{ u^+}{u^-} - 1 \right) \right\} \ d x. \end{multline} \begin{lemma} \label{lem:to-infinity} Suppose $\rho \in C(E)$ is absolutely continuous and satisfies \[ \nu_0 \left\{\dfrac{d\rho^+}{d x} \neq \dfrac{d \rho^-}{dx} \right\} > 0.\] Then $\inf_{u \in \mathcal D^+(L)} H(u)=-\infty$. \end{lemma} \begin{proof} Let $u^+_t(x) = u^-_t(x) = \exp \left( - t \left\{ \dfrac{d \rho^+}{d x} - \dfrac{d \rho^-}{d x} \right\}\right)$. From~\eqref{eq:first-steps} it follows that \[ H(u_t) = - t \int_{\mathbb{T}} \left( \dfrac{d \rho^+}{d x} - \dfrac{d \rho^-}{dx} \right)^2 \ d x.\] Now let $t \rightarrow \infty$. \end{proof} \begin{lemma} \label{lem:reparametrization} Suppose $\rho \in C(E)$ is absolutely continuous and $\frac{d \rho^+}{dx} = \frac{d \rho^-}{dx}$ for all $x \in \mathbb{T}$. Then $\mathcal I$ admits the representation \begin{equation} \label{eq:I-in-eta} \mathcal I(\mu) = - \inf_{\eta \in C(\mathbb{T})} \int_{\mathbb{T}} \left\{ - \rho' \eta + \lambda^+ \rho^+ (\exp(-\eta) - 1) + \lambda^- \rho^- (\exp(\eta) - 1) \right\} \ d x.\end{equation} \end{lemma} \begin{proof} Write $\rho' : =\frac {d \rho^+}{dx}$, and note that by our assumption $\rho' = \frac{d \rho^-}{dx}$. By~\eqref{eq:first-steps} we may write \[ H(u) = \int_{\mathbb{T}} \left\{ - \log \left( u^+/u^- \right) \rho' + \lambda^+\rho^+ (u^-/u^+ -1) + \lambda^- \rho^- (u^+/u^- - 1) \right\} \ d x.\] We see that only the ratio $u^+/u^-$ determines the value of $H(u)$. To any choice of $u \in \mathcal D^+(L)$ we may associate $\eta = \log u^+ - \log u^- \in C^1(\mathbb{T})$, and correspondingly, to any $\eta \in C^1(\mathbb{T})$ we can associate $u \in \mathcal D^+(L)$ by letting \[ u^+(x) = \exp(\tfrac 1 2 \eta(x)), \quad u^-(x) = \exp(-\tfrac 1 2 \eta(x)), \quad x \in \mathbb{T}.\] By the continuous dependence of $H$ on $\eta$, and the fact that $C^1(\mathbb{T})$ is dense in $C(\mathbb{T})$, we obtain the stated representation of $I(\mu)$. \end{proof} \begin{lemma} \label{lem:pointwise-minimization} Suppose $\rho \in C^1(E)$ and $\frac{ d \rho^+}{d x} = \frac{d \rho^-}{dx}$ for all $x \in \mathbb{T}$. Furthermore suppose $\lambda^- \lambda^+ \rho^- \rho^+ > 0$ on $\mathbb{T}$, and $\lambda^{\pm}$ are continuous. Then $\mathcal I$ is given by~\eqref{eq:rate-function}. \end{lemma} \begin{proof} Differentiating the integrand in~\eqref{eq:I-in-eta} pointwise with respect to $\eta$ gives the first order condition \[ -\rho' - \lambda^+ \rho^+ \exp(-\eta) + \lambda^- \rho^- \exp(\eta) = 0,\] which is solved uniquely by \[ \eta = \tfrac 1 2 \log \left( \frac{\lambda^+ \rho^+}{\lambda^- \rho^-} \right) + \operatorname{arcsinh} \left( \frac{ \rho'}{2 \sqrt{ \lambda^+ \lambda^- \rho^+ \rho^-}}\right),\] as long as $\lambda^- \lambda^+ \rho^- \rho^+ \neq 0$. Furthermore $\eta \in C(\mathbb{T})$ by the conditions on $\lambda$ and $\rho$. The second order derivative with respect to $\eta$ is given by \[ \lambda^+ \rho^+ \exp(-\eta) + \lambda^- \rho^- \exp(\eta) \geq 0,\] which shows that the critical value of $\eta$ corresponds to a pointwise global minimum of the integrand. \end{proof} \emph{Proof of Proposition~\ref{prop:expression-ratefunction}} The result for unequal derivatives is a consequence of Lemma~\ref{lem:to-infinity}, and the expression in case of equality follows from Lemma~\ref{lem:pointwise-minimization}. \begin{proof}[Proof of Proposition~\ref{prop:no-v-dependence}] We inspect the dependence of the various terms in the integrand of the expression~\eqref{eq:rate-function} $I(\mu_c)$ on $c$. For the first term, interchanging integral and derivative, \begin{align*} & \frac{d}{dc} \int_{\mathbb{T}} \rho' \log \left( \frac{\lambda^+ (\rho + c)}{\lambda^- (\rho-c)}\right) \ d x = \int_{\mathbb{T}} \rho' \left(\frac{1}{\rho + c} + \frac 1 {\rho-c} \right) \ d x \\ & = \int_{\mathbb{T}} \frac{d}{dx} \left( \log(\rho +c) + \log(\rho -c) \right) \ d x = 0. \end{align*} The following terms (i.e. the $\operatorname{arcsinh}$ and the square root) in the expression for $I(\mu_c)$ are decreasing with respect to the value of $\rho^+ \rho^- = \rho^2 -c^2$. It follows that the integrands are minimized at $c = 0$. Finally, we have that \[ \int_{\mathbb{T}} (\lambda^+ \rho^+ + \lambda^- \rho^- ) \ d x = \int_{\mathbb{T}} \left\{ ( \lambda^+ + \lambda^-) \rho + c (\lambda^+ - \lambda^-) \right\} \ d x.\] The linear term in $c$ vanishes since $\int_{\mathbb{T}} \{ \lambda^+ - \lambda^- \} \ d x= \int_{\mathbb{T}} U' \ dx = 0$. It follows that $c = 0$ minimizes $c \mapsto I(\mu_c)$. The stated expression for $I(\mu_0)$ is obtained after a manipulation of~\eqref{eq:rate-function}. \end{proof} \chapter{Large Deviations in Stochastic Slow-Fast Systems} \label{chapter:LDP-in-slow-fast-systems} \chaptermark{LDP in Stochastic Slow-Fast Systems} \section{Stochastic slow-fast systems---two time scales} Our focus in this chapter lies on stochastic systems with two time scales. In various stochastic problems arising for instance in atmospheric models~\cite{BouchetNardiniTangarife2013,BouchetGrafkeTangarifeVandenEijnden2016}, hydrodynamic limits~\cite{KipnisLandim1998}, genetic networks~\cite{CruduDebusscheRadulescu2009}, and statistical physics~\cite{MatosPerez1991,ColletDaiPra2012}, we can identify slow and fast components in the system. The distinction of slow and fast components in a system is based on the observation of different time scales: the fast components converge to their equilibrium state at a much shorter time scale at which the slow components have hardly evolved. As a consequence, the slow components evolve approximately under the averaged effect of the fast components. This observed separation of time scales motivates the term \emph{slow-fast system}. In a stochastic framework, slow-fast systems are frequently modelled by Markov processes that consist of two components, where one component models the slow variables and the other component the fast variables. \smallskip A valid approximation of the slow components by averaging over the fast components is also known as the \emph{averaging principle}~\cite{FreidlinWentzell1998}. Establishing an averaging principle in stochastic models has the benefit of rigorously reducing the complexity and leading to simpler models. In stochastic models, this transition from the full system to an approximation via averaging can be justified by the law of large numbers, as demonstrated for instance by Ball, Kan, Kurtz, Popovic and Rempala for the example of reaction networks~\cite{BallKurtzPopovicRempala2006,KangKurtz2013,KangKurtzPopovic2014}. Freidlin and Koralov proved averaging in quasi-linear parabolic PDEs~\cite{FreidlinKoralov2012}, and recently investigated averaging in a slow-fast system whose fast process admits multiple stationary measures~\cite{FreidlinKoralov2020}. \smallskip However, the approximation via an averaged evolution is only valid in the limit of infinite time-scale separation. In order to estimate the approximation error, many efforts have therefore concentrated on establishing finer asymptotic results. An example of such an asymptotic result is a pathwise large deviation principle of the slow component as the time-scale separation tends to infinity. Verifying such a large deviation principle is interesting for various reasons. If a large deviation principle is verified for the slow component, then we know the error of the average-approximation to vanish exponentially fast as a function of the time-scale separation. Furthermore, the exponential convergence rate is explicitly known as the so-called large-deviation rate function, which in many situations can be calculated. In the context of multiscale diffusions, Dupuis, Spiliopoulos and Wang show how the large-deviation rate function can be used to design Monte-Carlo for estimating rare-event probabilities~\cite{DupuisSpiliopoulosWang2012}. The rate function is also the crucial ingredient for characterizing the rare-event behaviour of the system~\cite[Theorem~1.4]{BudhirajaDupuis2019}. Vanden-Eijnden introduced numerical methods for systems with multiple time scales that do not require to derive the limiting effective equations~\cite{Vanden-Eijnden2003}, and further investigated numerical schemes with Fatkullin~\cite{FatkullinVanden-Eijnden2004} and Weinan and Liu~\cite{WeinanLiuVanden-Eijnden2005,WeinanLiuVanden-Eijnden2007}. We also refer to the monographs of Berglund and Gentz~\cite{BerglundGentz2005}, Kuehn~\cite[Chapter~15]{Kuehn2015} and Pavliotis and Stuart~\cite{PavliotisStuart2008} for more background on both stochastic and deterministic multiscale systems. \smallskip Establishing the large deviation principles in slow-fast systems is usually a delicate enterprise, and there has been vivid activity during the last decades to embark on that journey. In their monograph on random perturbations~\cite[Chapter~7]{FreidlinWentzell1998}, Freidlin and Wentzell prove large deviations for several examples where a process is perturbed by a fast process. The two processes are assumed to be weakly coupled in the sense that either the fast process evolves independently of the slow process, or the fast process has a deterministic diffusion coefficient, or the slow process is deterministic. Lipster and Veretennikov also consider a slow diffusion process whose coefficients are coupled to an independent fast diffusion process~\cite{Liptser1996,Veretennikov2000}, and Veretennikov allows for a weak coupling between diffusions in~\cite{Veretennikov1999}, similar to Freidlin and Wentzell. For coupled diffusions where the fast diffusion coefficient is indepedent of the slow process, Feng and Kurtz offer a proof based on Hamilton-Jacobi theory~\cite[Section~11.6, Lemma~11.60~(1)]{FengKurtz2006}. Kifer studies ODE's coupled to fast diffusions~\cite{Kifer1992,Kifer2009}. Bouchet, Grafke, Tangarife and Vanden-Eijnden~\cite{BouchetGrafkeTangarifeVandenEijnden2016} complement this study by specifying the ODEs to concrete examples in order to calculate the Hamiltonians, thereby obtaining a more explicit rate function. \smallskip Puhalskii studies fully coupled slow-fast diffusions~\cite{Puhalskii2016} by building up on Lipster's method of considering the joint distribution of the slow process and the empirical measure of the fast process~\cite{Liptser1996}. Spiliopoulos proves large deviations on the path level, and provides importance-sampling schemes for coupled diffusions~\cite{Spiliopoulos2013}. Feng, Fouque and Kumar prove large deviations for the time marginals of a slow diffusion process coupled to fast diffusions~\cite{FengFouqueKumar2012}, and Ghili provides a generalization of their results~\cite{Ghilli2018}. \smallskip More recently, fast components modelled by jump processes attracted more interest in the large-deviation context. He and Yin couple diffusions to fast jump processes~\cite{HeYin2014}, considering different scaling regimes of the time-scale separation. Similar in spirit to Puhalskii's paper, Huang, Mandjes and Spreij apply Lipster's idea from~\cite{Liptser1996} to prove large deviations of a slow diffusion process coupled to an independent fast jump process, by first proving joint large deviations of the slow process and the empirical measure process, and then using the contraction principle~\cite{HuangMandjesSpreij2016}. Bressloff and Faugeras start from large-deviation results and derive action-integral representations via contraction~\cite{BressloffFaugeras2017}. Budhiraja, Dupuis and Ganguly~\cite{BudhirajaDupuisGanguly2018} proof process-level large deviations of a slow diffusion process and fast jumps, with fully-coupled components. The rate functions are characterized via an optimal control problem, involving the empirical measure of the fast variable. Popovic and Kumar~\cite{KumarPopovic2017} tackle the general case where both slow and fast components are mixed jump-diffusion processes. They show that under the assumption of well-posedness of a certain Hamilon-Jacobi equation, the one-dimensional time marginals satisfy large deviations. \smallskip Despite the enormous interest and the huge literature on the topic of slow-fast systems, the important class of physical models of mean-field interacting particles described by jump processes on a finite state space has not been treated so far in the context of slow-fast systems. These Markovian jump models are frequently consulted as approximations to physical models describing certain non-equilibrium phenomena, such as spin dynamics. An overview involving different spin models is offered for instance by Martinelli~\cite{Martinelli1999}. A typical example is the Glauber dynamics in Ising-models and Potts-models describing ferromagnets. Other fields of applications include communication networks~\cite{AntunesFrickerRobert2006}, game theory with models involving a large number of agents~\cite{GomesMohrSouza2010}, and chemical reactions~\cite{MielkePattersonPeletierRenger2017}. \smallskip There is very recent activity in the study of Markovian mean-field jump processes from a large-deviation perspective. Dupuis, Ramanan and Wu prove large deviations of the empirical densities~\cite{DupuisRamananWu2016}, the clue being to allow for more than one jump simultaneously. In another paper with Fischer, they investigate the stability of the nonlinear limit evolution equation of the particle system by constructing Lyapunov functions from relative entropies~\cite{BudhirajaDupuisFischerRamanan2015}. Renger proves large deviations of density-flux pairs of non-interacting particles exploiting Girsanov transformations~\cite{Renger2017}, which Kraaij extended to include weak interactions~\cite{Kr17}. Bertini, Chetrite, Faggionato, and Gabrielli consider a mean-field system with deterministic time-periodic rates~\cite{BertiniChetriteFaggionatoGabrielli2018}, and prove large deviations in the large number of particles limit. Budhiraja and Wu also consider moderate deviations~\cite{BudhirajaWu2017}. \smallskip In our work, we contribute to these very recent studies by proving dynamic large deviation principles in mean-field interacting particles coupled to fast external processes. In general, the main methods used in the literature to prove large deviations in slow-fast systems are the weak-convergence method (\cite{BudhirajaDupuis2019}), classical techniques based on Girsanov transformations, and the method based on convergence of nonlinear generators and Hamilton-Jacobi Theory~\cite{FengKurtz2006}. Despite the interest in mean-field systems, there are few results illuminating the large-deviation behaviour of mean-field particles from a Hamilton-Jacobi point of view. A system of interacting diffusions is considered in~\cite[Chapter~13]{FengKurtz2006}. Feng, Mikami and Zimmer extend the methods therein to prove the comparison principle for equations involving Hamiltonians that arise in this context~\cite{FengMikamiZimmer2019}. Moreover, proofs about large deviations in coupled systems, like slow-fast systems, assume well-posedness of the comparison principle rather than verifying the comparison principle. The main novelties presented here are the following: \begin{itemize}[] \item We provide a general set of conditions under which we prove pathwise large deviations of slow components in slow-fast systems via Hamilton-Jacobi equations. The conditions allow for irreversible fast processes. \item We find Lagrangian rate functions. Next to the standard characterization of the Lagrangian in terms of the dual of a principal eigenvalue, we establish a characterization in terms of a double-optimization. \item As our main example, we treat density-flux large deviations of mean-field interacting particles on a finite state space coupled to fast drift-diffusion processes on a compact periodic space. This example requires arguments that are different from those currently available in the literature. We derive an averaging principle from the large deviation principle. \item The large-deviation results apply to small-diffusion processes coupled to fast jump processes. This solves a challenge pointed out by Budhiraja, Dupuis and Ganguly in~\cite{BudhirajaDupuisGanguly2018}, which is the fact that in slow-fast systems, classical results about comparison principles are not applicable due to the Hamiltonians having poor regularity properties. \end{itemize} \paragraph{Overview of this chapter.} In Section~\ref{SF:sec:toy-ex}, we treat two toy examples of stochastic slow-fast systems. The first toy example shows how fast variables affect the large-deviation behaviour of the slow variables. The second toy example illustrates the characterization of the Lagrangians in terms of a double-optimization, and it's connection to averaging principles. The examples provide the necessary background to have in picture in mind for the general results that follow. \smallskip In Section~\ref{SF:sec:main-results}, we state our main results: a general large-deviation theorem for slow components in a slow-fast system (Theorem~\ref{SF:thm:LDP_general}), an action-integral form of the rate functions (Theorem~\ref{SF:thm:rate-function}), a large-deviation theorem for mean-field interacting particles coupled to a fast diffusion process (Theorem~\ref{SF:thm:LDP-mean-field}), and an application of the large deviation principle to the averaging principle for mean-field systems (Theorem~\ref{SF:thm:mean-field-averaging}). In Section~\ref{SF:sec:assumptions:general-LDP-theorem} we collect the assumptions for the general large-deviation results. The remaining sections contain the proofs. \section{Two toy examples}\label{SF:sec:toy-ex} \subsection{Fastly-varying diffusion} We start from the large deviation principle of a small-diffusion process. Then we couple this process to a fast process to illustrate a slow-fast system. \paragraph{Single component.} For fixed $n \in \mathbb{N}$ and a fixed positive constant~$\sigma>0$, consider the stochastic process $Y^n_t \in \mathbb{R}$ solving \begin{equation*} \mathrm{d} Y^n_t = \frac{1}{\sqrt{n}} \sigma \cdot \mathrm{d} B_t, \quad Y^n(0) = 0. \end{equation*} We call the constant~$\sigma$ the diffusion coefficient, and $B_t$ denotes Brownian motion in $\mathbb{R}$. By Schilder's Theorem~(\cite[Theorem~5.2.3]{DemboZeitouni1998}), the process $Y^n_t$ satisfies a pathwise large deviation principle in the small-diffusion limit $n \to \infty$. The rate function is given by (see also Section~\ref{BG:sec:semigroup-flow-HJ-eq} in Chapter~2) \begin{equation*} J(y) = \int_0^\infty \frac{1}{2 a} |\partial_t y(t)|^2 \, \mathrm{d} t, \quad a := \sigma^2. \end{equation*} This corresponds to the Hamiltonian~$\mathcal{H}(p)=ap^2/2$. \paragraph{Slow-fast system.} To transition from the single-component process to a slow-fast system, we pass from the constant diffusion coefficient to a switching diffusion coefficient. The switching times depend on a jump process~$Z^n_t$ flipping between~$\pm 1$. The slow-fast system is defined as a two-component process~$(X_t^n,Z_t^n)$, where the first component evolves according to \begin{equation*} \mathrm{d} X_t^n = \frac{1}{\sqrt{n}}\sigma\left(Z_t^n\right) \mathrm{d} B_t,\quad X^n(0)=0. \end{equation*} The jump process evolves independently of the diffusion~$X_t^n$. In between the jump times of~$Z_t^n$, the dynamics of~$X_t^n$ is just the dynamics of the process~$Y_t^n$ from above, where depending on the value of the second component $Z^n_t$, the diffusion constant is either given by $\sigma_- := \sigma(-1)$ or by $\sigma_+ := \sigma(+1)$. To model the time-scale separation, we take~$Z_t^n$ to evolve with jump rates given by~$r_n(-1,+1)=n\cdot r_-$ and~$r_n(+1,-1)=n\cdot r_{+}$ for some fixed~$r_\pm > 0$. In this two-component process,~$X_t^n$ is the slow and~$Z_t^n$ is the fast component. \smallskip The typical questions we ask about such a slow-fast system are: does the slow component satisfy a pathwise large deviation principle? How does the dependence on~$Z_t^n$ affect the large-deviation behaviour? In this toy example, both questions can be answered explicitly. The first question is answered by the fact that the slow component~$X_t^n$ indeed satisfies pathwise large deviations with some rate function~$J_\pm$. The second question is answered by describing this rate function. As in the single-component version, the rate function is of action-integral form. The Lagrangian is the Legendre-Fenchel transform $\mathcal{L}_\pm(v)$ of a Hamiltonian $\mathcal{H}_\pm : \mathbb{R} \to \mathbb{R}$. However, due to the fast jump process, the Hamiltonian is no longer quadratic, but given by \begin{multline} \label{SF:eq:intro:Hamiltonian-vastly-varying-diffusion} \mathcal{H}_\pm(p) = \frac{p^2}{4}(a_{+} + a_{-}) - \frac{1}{2}(r_{+} + r_{-})\\ + \frac{1}{2}\sqrt{(r_{+} + r_{-})^2 + p^2(a_{+} - a_{-})(r_{-}-r_{+}) + \frac{1}{4}p^4(a_{+} - a_{-})^2}, \end{multline} where~$a_\pm := \sigma_\pm^2$. This Hamiltonian is the principal eigenvalue of the matrix \begin{equation*} M(p) = \frac{p^2}{2} \begin{pmatrix} a_- & 0\\ 0 & a_+ \end{pmatrix} + \begin{pmatrix} -r_- & r_-\\ r_+ & -r_+ \end{pmatrix}. \end{equation*} \begin{figure}[h!] \labellist \pinlabel $v$ at 2400 -80 \pinlabel $v$ at 4700 -80 \pinlabel $\mathcal{L}(v)/\mathcal{L}_\pm(v)$ at 3700 850 \pinlabel $\sigma_+^2$ at 3000 1500 \pinlabel {\color{dark_blue}{$\mathcal{L}(v)$}} at 600 1000 \pinlabel {\color{red_one}{$\mathcal{L}_\pm(v)$}} at 2300 580 \endlabellist \begin{center} \includegraphics[scale=.07]{./Figures/SlowFast/ToyEx} \end{center} \caption{In blue the quadratic Lagrangian with a constant~$\sigma>0$. In red the Lagrangian of with flipping between two values~$\sigma_\pm$ with~$\sigma_-=\sigma$ and~$\sigma_+>\sigma_-$. In the right graph the quotient~$\mathcal{L}/\mathcal{L}_\pm$.} \label{SF:fig:toy-ex:Lagrangians} \end{figure} \smallskip If the diffusion coefficients are equal, then $a_+=a_-$, and we recover the above quadratic Hamiltonian for the small diffusion limit. If the diffusion coefficient is flipping between two values~$\sigma_\pm$ with~$\sigma_+>\sigma_-$, then asymptotically, the exit probabilities \begin{equation*} \mathbb{P}\left[X^n(T)\geq C\right] \sim e^{-n T\mathcal{L}_\pm(C/T)},\quad n\to\infty, \end{equation*} are larger. This is illustrated in Figure~\ref{SF:fig:toy-ex:Lagrangians}, which depicts the fact that the Lagrangian~$\mathcal{L}_\pm$ is smaller with flipping than without flipping, provided $\sigma=\sigma_-$ and~$\sigma_+>\sigma_-$. Indeed, one can verify for instance the estimate \begin{equation*} \sigma_+^2\frac{1}{1+\sigma_+^2/v^2} \leq \left[\mathcal{L}(v)/\mathcal{L}_\pm(v)\right] \leq \sigma_+^2. \end{equation*} In this very specific example, the fast variable does not influence the law of large number limit: in both cases, uncoupled or coupled, the deterministic limit of the small-diffusion process is the path constant equal to zero. While in this simplified toy example, we can find an explicit formula for the Hamiltonian, this is no longer the case in more complicated systems. However, also in more involved systems the large-deviation behaviour is goverened by a principal-eigenvalue problem derived from the slow-fast system---see Section~\ref{SF:sec:proof-general-LDP-Theorem}. We close this example by formally deriving~$\mathcal{}H_\pm(p)$ from the generators~$L_n$ of~$(X^n,Z^n)$, \begin{equation*} L_nf(x,z)=\frac{1}{2n}\sigma(z)^2\Delta_x f(x,z) + n\cdot r(z,z')(f(x,z')-f(x,z)),\quad z':=(-1)\cdot z. \end{equation*} The nonlinear generators~$H_nf=n^{-1}e^{-nf}L_ne^{nf}$ are given by \begin{equation*} H_nf(x,z)=\frac{1}{2n}\sigma(z)^2 \Delta_x f + \frac{1}{2}\sigma(z)^2|\nabla_xf|^2 + r(z,z')\left[e^{n(f(x,z')-f(x,z))}-1\right]. \end{equation*} Consider functions of the form~$g_n(x,z)=g(x)+n^{-1}\varphi(z)$ to take the scale separation into account. Then \begin{align*} H_ng_n(x,z)\xrightarrow{n\to\infty} H_{g,\varphi}(x,z):=\frac{1}{2}\sigma(z)^2|\nabla g(x)|^2 +r(z,z') \left[e^{\varphi(z')-\varphi(z)}-1\right]. \end{align*} We want this limit to be independent of the fast variable~$z$. We fix~$x$, and thereby also~$p=\nabla g(x)$. By Perron-Frobenius type results, there exists a unique eigenvalue~$\lambda(p)\in\mathbb{R}$ and a vector~$\varphi=(\varphi(-),\varphi(+))$ such that \begin{equation*} \frac{1}{2}\sigma(z)^2p^2 +r(z,z') \left[e^{\varphi(z')-\varphi(z)}-1\right]=\lambda(p). \end{equation*} This eigenvalue~$\lambda(p)$ is precisely the Hamiltonian~$\mathcal{H}_\pm(p)=\lambda(p)$, and its explicit formula is~\eqref{SF:eq:intro:Hamiltonian-vastly-varying-diffusion} from above. \subsection{Fastly-alternating drifts} We slightly vary the previous toy example to illustrate how the Lagrangians in form of a double-optimization provide us with a convenient tool to connect the large-deviation results to the averaging principle. \paragraph{Single component.} For fixed~$u\in\mathbb{R}$ and~$n\in\mathbb{N}$, consider \begin{equation*} \mathrm{d} Y_t^n = u \, \mathrm{d} t + \frac{1}{\sqrt{n}}\, \mathrm{d} B_t,\quad Y^n(0)=0. \end{equation*} Then~$\{Y^n\}_{n=1,2,\dots}\in C_\mathbb{R}[0,\infty)$ (equipped with the Skorohod topology) satisfies a large deviation principle by the Freidlin-Wentzell Theorem, with rate function \begin{equation*} J(y) = \int_0^\infty \frac{1}{2}|\partial_t y (t) - u|^2\, \mathrm{d} t. \end{equation*} In particular, the limit of~$Y^n$ as~$n\to\infty$ is the path with constant velocity~$u$. \paragraph{Slow-fast system.} We consider the same setting as above, but let the velocity flip fastly between two values~$u_+,u_-\in\mathbb{R}$. As in the previous toy example, this means we introduce a jump process~$Z^n$ on~$\{-1,+1\}$ and consider the two-component process~$(X^n,Z^n)$, where~$X^n$ follows the dynamics \begin{equation*} \mathrm{d} X_t^n = u(Z_t^n)\, \mathrm{d} t + \frac{1}{\sqrt{n}}\, \mathrm{d} B_t,\quad X^n(0)=0, \end{equation*} with~$u(\pm 1)=u_\pm$. The jump process~$Z^n$ evolves independently of~$X^n$, with the same jump rates of order~$n$ as in the first toy example. Let~$\pi=\pi_-\delta_-+\pi_+\delta_+$ be the stationary measure of~$Z^n$. Since~$Z^n$ equilibriates fastly, we expect~$X^n$ to converge to the path~$\overline{x}$ with constant average velocity~$\overline{u}=u_-\pi_-+u_+\pi_+$. This statement is an example of the averaging principle. \smallskip Let us see how to obtain the averaging principle from a large-deviation perspective. Here, we argue heuristically: \begin{enumerate}[(a)] \item The jump process~$Z^n$ equilibriates exponentially fast at~$\pi$ with speed~$n$, \begin{equation*} \mathbb{P}\left(\int_0^1 \mathbf{1}_{Z^n(t)}(\cdot)\, \mathrm{d} t \approx \mu(\cdot)\right) \sim \exp\{- n \mathcal{I}(\mu)\},\quad n\to\infty, \end{equation*} with the Donsker-Varadhan functional~$\mathcal{I}:\mathcal{P}(\{-1,+1\})\to[0,\infty)$ \begin{equation*} \mathcal{I}(\mu) = \sup_{\xi\in\mathbb{R}^2} \left[r_-\mu_-(1-e^{\xi_+-\xi_-}) + r_+\mu_+(1-e^{\xi_--\xi_+})\right], \end{equation*} and~$\mathcal{I}(\mu)=0$ if and only if~$\mu=\pi$. \item Suppose that~$Z^n$ remains stationary at law~$\pi$. Then Freidlin-Wentzell large deviations suggest that for large~$n$, \begin{multline*} \mathbb{P}\left(X^n\approx x\,|\,\mathrm{law}(Z^n)=\pi\right) \\ \sim \exp\left\{-n\int_0^\infty\left[\frac{1}{2}|\partial_tx(t)-u_-|^2 \pi_- + \frac{1}{2}|\partial_tx(t)-u_+|^2 \pi_+\right]\, \mathrm{d} t\right\}. \end{multline*} \end{enumerate} When taking the limit~$n\to\infty$, both the convergence of~$Z^n$ to equilibrium and the convergence of~$X^n$ to a path with constant velocity are competing at the same scale or order~$n$. Therefore both effects contribute to the probabilistic cost when computing the rate function of the slow component deviating from its most likely path. To observe a velocity~$v$ of the process~$X^n(t)$ in a small time-window~$[t,t+\Delta t)$, three events can contribute: the fast process is distributed as~$\mu$ (instead of~$\pi$); while~$Z^n$ is in state~$-1$, the slow component's velocity is~$v_-$ (instead of~$u_-$); while~$Z^n$ is in state~$+1$, the slow component's velocity is~$v_+$ (instead of~$u_+$). The only condition for observing~$v$ is $v=v_-\mu_- + v_+\mu_+$. Since the winner takes it all, the rate~$\mathcal{L}(v)$ is obtained by optimizing over~$\mu,v_-,v_+$, and taking into account the cost of each event: \begin{equation}\label{SF:toy-ex:Lagrangian-fast-flip-drift} \mathcal{L}(v)=\inf_{\substack{\mu,v_-,v_+\\vee_-\mu_-+v_+\mu_+=v}}\frac{1}{2}|v_--u_-|^2\mu_- + \frac{1}{2}|v_+-u_+|^2\mu_+ + \mathcal{I}(\mu). \end{equation} When specializing Theorem~\ref{SF:thm:rate-function} to this example, we find that~$X^n$ satisfies pathwise large deviations with rate function~$J$ with this Lagrangian, \begin{equation*} J(x) = \int_0^\infty \mathcal{L}(\partial_t x(t))\, \mathrm{d} t. \end{equation*} This is an instant of a general principle expressed by Theorem~\ref{SF:thm:rate-function}, where we prove this double optimization to hold under the same conditions under which we prove large deviations. \smallskip We close this example by deriving the averaging principle from this rate function. As a consequence of the large deviation principle,~$X^n\to \overline{x}$ almost surely, where~$J(\overline{x})=0$ (Theorem~\ref{thm:math-formulation-LDP:LDP-implies-as}). Hence~$\mathcal{L}(\partial_t\overline{x}(t))=0$ with the Lagrangian~\eqref{SF:toy-ex:Lagrangian-fast-flip-drift}. Since all three terms in the Lagrangian are non-negative, each term must vanish. Thus~$(\mu,v_-,v_+)=(\pi,u_-,u_+)$ is the optimizer in this case, and we must have~$\partial_t\overline{x}(t) = u_-\pi_-+u_+\pi_+$. \section{Main results}\label{SF:sec:main-results} \subsection{Preliminaries}\label{SF:sec:preliminaries} For a Polish space~$E$, we denote by $C(E)$ and $C_b(E)$ the spaces of continuous and bounded continuous functions respectively. If $E \subseteq \mathbb{R}^d$ then we denote by $C_c^\infty(E)$ the space of smooth functions that vanish outside a compact set in $E$. We denote by $C_{cc}^\infty(E)$ the set of smooth functions that are constant outside of a compact set, and by $\mathcal{P}(E)$ the space of probability measures on $E$. We equip $\mathcal{P}(E)$ with the weak topology, that is, the one induced by convergence of integrals against bounded continuous functions. \smallskip We consider Markov processes defined via solutions to the martingale problem of a linear operator~$A : \mathcal{D}(A) \subseteq C_b(E) \rightarrow C_b(E)$. We write~$\mathcal{X}:=D_E[0,\infty)$ for the Skorokhod space of trajectories that are right-continuous and have left limits, equiped with its usual topology~\cite[Section~3.5]{EthierKurtz1986}. \begin{definition} Let $\mu \in \mathcal{P}(E)$. We say that a measure $\mathbb{P} \in \mathcal{P}(\mathcal{X})$ solves \textit{the martingale problem} for $(A,\mu)$ if for all $f \in \mathcal{D}(A)$ the process \begin{equation*} M_f(t) := f(X(t)) - f(X(0)) - \int_0^t Af(X(s)) \mathrm{d} s \end{equation*} is a martingale with respect to the filtration $t \mapsto \mathcal{F}_t := \left\{X(s) \, | \, s \leq t\right\}$, and if the projection of $\mathbb{P}$ on the time $0$ coordinate equals $\mu$. We say that~$\mathbb{P} \in \mathcal{P}(\mathcal{X})$ solves the martingale problem for $A$ if it solves the martingale problem for $(A,\mu)$ for some starting measure~$\mu$. We say that the process $\{X(t)\}_{t \geq 0}$ on $\mathcal{X}$ solves the martingale problem for $A$ if its distribution solves the martingale problem. A martingale problem is \textit{well-posed} if there exists a unique solution to the martingale problem for each starting measure.\qed \end{definition} \subsection{Setting of slow-fast systems}\label{SF:sec:general-setting} Here we introduce stochastic \emph{slow-fast systems} as certain two-component Markov processes~$(Y_t^n,Z_t^n)$, where the first component corresponds to the slow process, the second to the fast process. To incorporate the feature of being \emph{slow-fast}, we include a scaling parameter $r_n$ that introduces a separation of time-scales for the two processes. \smallskip We first fix the state space of a slow-fast system. To focus only on the features that arise due to the coupling of slow and fast variables, we will assume that the fast process $Z_t^n$ takes values in a compact Polish space $F$. This compactness assumption, as well as the fact that $F$ does not depend on $n$, can both be relaxed at the cost of more but non-trivial technicalities~(e.g.~\cite{Ghilli2018}). Furthermore, for each $n = 1, 2, \dots$, the slow process $X_t^n$ takes values in Polish spaces $E_n$ such that $\eta_n(E_n) \subseteq E \subseteq \mathbb{R}^d$, where $\eta_n : E_n \to E$ is a continuous embedding and $E$ is a Polish space as well. We assume that $E$ is contained in the $\mathbb{R}^d$-closure of its $\mathbb{R}^d$-interior, which ensures that gradients of functions on $E$ are determined by the values of the function in $E$. The setting of the state spaces is summarized in the following basic condition. \begin{condition}[Basic condition on the state spaces $E_n$ and $F$] \label{SF:condition:compact_setting:state-spaces} The state space $F$ is a compact Polish space. The state spaces $E_n$ are Polish spaces that are asymptotically dense in $E \subseteq \mathbb{R}^d$ with respect to continuous embeddings $\eta_n : E_n \to E$; that means for any $x \in E$, there exist $x_n \in E_n$ such that $\eta_n(x_n) \to x$ as $n \to \infty$. Furthermore, suppose that for each compact $K \subseteq E$ the set $\eta_n^{-1}(K)$ is compact in $E_n$ and that there exists a compact set $\widehat{K} \subseteq E$ such that \begin{equation*} K \subseteq \liminf_n \eta^{-1}_n(\widehat{K}). \end{equation*} The last condition means that for every compact $K \subseteq E$ there is a compact set $\widehat{K} \subseteq E$ such that for all $x \in K$ there is an increasing map $k : \mathbb{N}\rightarrow \mathbb{N}$ and $x_{k(n)} \in \eta_{k(n)}^{-1}(\widehat{K})$ such that $\lim_n \eta_{k(n)}(x_{k(n)}) = x$.\qed \end{condition} We consider two-component processes~$(Y_t^n,Z_t^n)$ defined by generators that decompose into slow and fast parts in the following sense. \begin{definition}[Generator of slow-fast system]\label{SF:def:generator-slow-fast} We say that a sequence of linear operators $A_n : \mathcal{D}(A_n) \subseteq C_b(E_n \times F) \to C_b(E_n \times F)$ corresponds to a slow-fast system if $A_n$ is given by \begin{equation}\label{SF:eq:setting:generator-slow-fast-system} A_n f(y,z) := A^\mathrm{slow}_{n,z} f(\cdot,z) (y) + r_n \cdot A^\mathrm{fast}_{n,y} f(y,\cdot)(z), \end{equation} where~$r_n$ is a sequence of positive real numbers such that $r_n \rightarrow \infty$ and \begin{enumerate}[label = (\roman*)] \item for each $z \in F$ and $n = 1,2,\dots$, there is a generator % \begin{equation*} A^\mathrm{slow}_{n,z} : \mathcal{D}(A^\mathrm{slow}_{n}) \subseteq C_b(E_n) \to C_b(E_n) \end{equation*} of an $E_n$-valued Markov process $Y^n_t$. The domain of $A^{\mathrm{slow}}_{n,z}$ is independent of $z$, denoted by $\mathcal{D}(A^\mathrm{slow}_n)$. For $f \in \mathcal{D}(A_n)$, we have $f(\cdot,z) \in \mathcal{D}(A^\mathrm{slow}_n)$. \item For each $y \in E_n$, there is a generator \begin{equation*} A^\mathrm{fast}_{n,y} : \mathcal{D}(A^\mathrm{fast}) \subseteq C(F) \to C(F) \end{equation*} of a Markov process on $F$. The domain is independent of $n$ and $y$, denoted by $\mathcal{D}(A^\mathrm{fast})$. For $f \in \mathcal{D}(A_n)$, we have $f(y,\cdot) \in \mathcal{D}(A^\mathrm{fast})$.\qed \end{enumerate} \end{definition} The sequence of positive numbers~$r_n$ models the time-scale separation of the two processes. The fast component runs at a time scale of order~$r_n$ compared to the slow component. In the law of large number limit, the time separation tends to infinity. \smallskip For a sequence of slow-fast systems constructed form operators~ $A_n$ defined as above, we make the following well-posedness assumption regarding solvability of the associated martingale problem. \begin{condition}[Well-posedness of martingale problem] \label{SF:condition:compact_setting:well-posedness-martingale-problem} Consider a slow-fast system constructed from operators $A_n$ as in Definition~\ref{SF:def:generator-slow-fast}. For each $n \in \mathbb{N}$ and each initial distribution $ \mu \in \mathcal{P}(E_n \times F)$, existence and uniqueness hold for the $(A_n,\mu)$-martingale problem on the Skorohod-space $D_{E_n \times F}[0,\infty)$. Denote the Markov process solving the martingale problem by~$(Y_n(t),Z_n(t))$. The mapping $(y,z) \mapsto P^n_{y,z}$ of $E_n \times F$ into $\mathcal{P}(D_{E_n \times F}[0,\infty))$ is continuous with respect to the weak topology on $\mathcal{P}(D_{E_n \times F}[0,\infty))$, where~$P^n_{y,z}$ is the distribution of the Markov process~$(Y_n(t),Z_n(t))$ starting at~$(y,z)$.\qed \end{condition} The assumption that $(y,z) \mapsto P^n_{y,z}$ is continuous is equivalent to the fact that the semigroup of the process~$(Y_n,Z_n)$ is Feller-continuous and that the set $\{P_{x,z}:(x,z)\in K\}$ is tight for any compact $K\subseteq E_n\times F$~(\cite[Remark~11.22]{FengKurtz2006}. We assume continuity in order to apply the general large-deviation results established by Kraaij in~\cite{Kraaij2019ExpResolv}. \subsection{General large-deviation theorem} \label{SF:sec:result:general-LDP} We formulate our main result for general slow-fast systems by two theorems. All assumptions stated in the theorems are collected in Section~\ref{SF:sec:assumptions:general-LDP-theorem}. For the large-deviation result, we consider a sequence of slow-fast systems~$(Y_t^n,Z_t^n)$ with values in~$E_n\times F$ satisfying Condition~\ref{SF:condition:compact_setting:state-spaces}. The following theorem establishes conditions under which slow components~$Y_t^n$ satisfy a pathwise large deviation principle. Recall the state spaces~$E_n$ imbedded into~$E$ by a continuous map~$\eta_n$. \begin{theorem}[Large-deviation principle of slow component]\label{SF:thm:LDP_general} Let ~$(Y_t^n,Z_t^n)$ be a slow-fast system satisfying the well-posedness Condition~\ref{SF:condition:compact_setting:well-posedness-martingale-problem}. In addition, suppose that Assumptions~\ref{SF:assumption:convergence-slow-nonlinear-generators},~\ref{SF:assumption:convergence-fast-nonlinear-generators},~\ref{SF:assumption:principal-eigenvalue-problem},~\ref{SF:assumption:regularity-V} and~\ref{SF:assumption:regularity-I} are satisfied. Let $X_n := \eta_n(Y_n)$ and suppose the large deviation principle holds for~$X_n(0)$ on~$E$ with speed~$r_n$ and rate function~$J_0$. Then the process~$X_n$ satisfies a large deviation principle in~$D_E[0,\infty)$ with speed~$r_n$ and with rate function~$J$ given in~\eqref{SF:eq:Richard-general-LDP-thm-rate-function} in Section~\ref{SF:sec:proof-general-LDP-Theorem}. \end{theorem} We prove Theorem~\ref{SF:thm:LDP_general} in Section~\ref{SF:sec:proof-general-LDP-Theorem}. The rate function is only implicitly characterized by the limit of nonlinear semigroups associated to the slow-fast system, and is therefore not satisfying. This is why we establish two alternative representations of the rate function. These alternative representations establish the rate function as a time-integral over a Lagrangian, which is why we call it action-integral representation. \begin{theorem}[Action-integral representation]\label{SF:thm:rate-function} In addition to the assumptions of Theorem~\ref{SF:thm:LDP_general}, suppose that also Assumption~\ref{SF:assumption:Hamiltonian_vector_field} is satisfied. Then there exists a map~$\mathcal{L}:E\times\mathbb{R}^d\to[0,\infty]$ such that the rate function~$J$ from Theorem~\ref{SF:thm:LDP_general} is \begin{equation}\label{SF:eq:action-integral-rate-function} J(\gamma) = \begin{cases} J_0(\gamma(0)) + \int_0^\infty \mathcal{L}(\gamma(s),\dot{\gamma}(s)) \mathrm{d} s & \text{if } \gamma \in \mathcal{A}\mathcal{C}([0,\infty);E), \\ \infty & \text{otherwise}. \end{cases} \end{equation} The map~$\mathcal{L}:E\times\mathbb{R}^d\to[0,\infty]$ admits the two representations specified below in~\eqref{SF:eq:Lagrangian-is-Legendre-dual} and~\eqref{SF:eq:results-Lagr-opt-proc}. \end{theorem} The proof is given in Section~\ref{SF:sec:proof-action-integral-form-RF}. The map~$\mathcal{L}$ is called the \emph{Lagrangian}. We characterize the Lagrangian in two ways, as the Legendre-Fenchel transform of a principal eigenvalue (Eq.~\eqref{SF:eq:variational_Hamiltonian} below), and as an optimization problem (Eq.~\eqref{SF:eq:results-Lagr-opt-proc} below). Both characterizations involve a Hamiltonian that we call \emph{slow Hamiltonian}, and the so-called Donsker-Varadhan rate functional. We first describe these two ingredients, and then give the representations of the Lagrangian. \smallskip For fixed~$z\in F$, consider the process~$\widehat{X}_z^n(t)$ with generator $A_{n,z}^\mathrm{slow}$. Intuitively, this means considering the dynamics when freezing the fast process to~$z$. By our assumptions, the process~$\widehat{X}_z^n(t)$ satisfies pathwise large deviations, \begin{equation*} \mathbb{P}\left[\widehat{X}_z^n\approx \gamma(\cdot)\right]\sim \exp\left\{-n\int_0^\infty \widehat{\mathcal{L}}(\gamma,\partial_t\gamma,z)\, \mathrm{d} t\right\},\quad n\to\infty, \end{equation*} where the \emph{slow Lagrangian}~$\widehat{\mathcal{L}}$ is the Legendre-Fenchel transform of a function that we call the \emph{slow Hamiltonian}~$V_{x,p}(z)$, as \begin{equation*} \widehat{\mathcal{L}}(x,v,z) = \sup_{p}\left[p\cdot v - V_{x,p}(z)\right]. \end{equation*} The slow Hamiltonian~$V_{x,p}(z)$ is derived from the slow generator. For~$p\in\mathbb{R}^d$ and a function~$f$ with~$\nabla f(x)=p$, it satifies \begin{equation}\label{SF:eq:main-result:slow-Hamiltonian} V_{x,p}(z) = \lim_{n\to\infty} \frac{1}{r_n}e^{-r_nf(x)}A_{n,z}^\mathrm{slow}e^{r_nf(x)}. \end{equation} We call~$V_{x,p}(z)$ the slow Hamiltonian since it arises from the slow dynamics when completely decoupling the slow and fast processes, which effectively means to consider the slow dynamics only. \smallskip Vice versa, consider the process~$\widehat{Z}_x^n(t)$ with generator~$r_n\cdot A_{x}^\mathrm{fast}$. As before, this intuitively means to consider the slow process frozen to~$x$, and to follow the fast dynamics independently of the slow dynamics. The operator~$A_x^\mathrm{fast}$ arises from our assumptions as the limit of the fast generators~$A_{x,n}^\mathrm{fast}$. Under appropriate ergodicity assumptions, the fast process converges exponentially fast to equilibrium with speed~$r_n$ in the sense that for a distribution~$\nu\in\mathcal{P}(F)$, \begin{equation*} \mathbb{P}\left[\int_0^1 \mathbf{1}_{\widehat{Z}_x^n(t)}(\cdot) \mathrm{d} t\approx \nu\right]\sim \exp\{-r_n \cdot \mathcal{I}(x,\nu)\},\quad n\to\infty. \end{equation*} The map~$\mathcal{I}(x,\cdot):\mathcal{P}(F)\to[0,\infty]$ is the Donsker-Varadhan functional. In terms of the limiting fast generator, it is given by \begin{equation}\label{SF:eq:main-results:DV-functional} \mathcal{I}(x,\nu) = -\inf_{\substack{u \in \mathcal{D}(A_x^\mathrm{fast})\\ u > 0}}\int_F \frac{A_x^\mathrm{fast}u}{u}\, \mathrm{d}\nu. \end{equation} We give more background on this type of convergence in Chapter~4, where we prove convergence to equilibrium for piecewise-deterministic processes. \smallskip The Lagrangian of Theorem~\ref{SF:thm:rate-function} admits two representations in terms of the slow Hamiltonian~$V_{x,p}(z)$ and the Donsker-Varadhan functional~$\mathcal{I}(x,\nu)$. \paragraph{Legendre dual of principal eigenvalue.} For~$(x,p)\in E\times\mathbb{R}^d$, let~$\mathcal{H}(x,p)$ be the principal eigenvalue of the operator $V_{x,p}(\cdot)+A^\mathrm{fast}_x$, meaning there exists a strictly positive function~$u:F\to(0,\infty)$ such that~$(V_{x,p}(z)+A^\mathrm{fast}_x)u(z)=\mathcal{H}(x,p) u(z)$. This Hamiltonian~$\mathcal{H}(x,p)$ admits the variational representation \begin{equation} \label{SF:eq:variational_Hamiltonian} \mathcal{H}(x,p) = \sup_{\nu \in \mathcal{P}(F)} \left\{\int V_{x,p}(z) \, \nu( \mathrm{d} z) - \mathcal{I}(x,\nu) \right\}. \end{equation} The Lagrangian is the Legendre dual \begin{equation}\label{SF:eq:Lagrangian-is-Legendre-dual} \mathcal{L}(x,v) = \sup_{p\in\mathbb{R}^d}\ip{p}{v} -\mathcal{H}(x,p). \end{equation} \paragraph{Optimization over velocities.} The Lagrangian~$\mathcal{L}$ defined by~\eqref{SF:eq:Lagrangian-is-Legendre-dual} satisfies \begin{multline}\label{SF:eq:results-Lagr-opt-proc} \mathcal{L}(x,v) = \inf \left\{ \int_F \widehat{\mathcal{L}}(x,w(z),z) \, \nu( \mathrm{d} z) + \mathcal{I}(x,\nu) \, \middle| \, \nu \in \mathcal{P}(F), \right. \\ \left. w : F \rightarrow \mathbb{R}^d \text{ $\nu$-integrable and } \int_F w(z) \, \nu( \mathrm{d} z) = v \right\}. \end{multline} We close this section by sketching how~\eqref{SF:eq:results-Lagr-opt-proc} follows from~\eqref{SF:eq:variational_Hamiltonian} and~\eqref{SF:eq:Lagrangian-is-Legendre-dual}. Starting from the latter, we find by exchanging infimum and supremum that \begin{align*} \mathcal{L}(x,v) &=\sup_{p} \inf_\nu \left[\ip{p}{v}-\int_F V_{x,p}\, \mathrm{d} \nu + \mathcal{I}(x,\nu)\right]\\ &= \inf_\nu \left[\sup_p \int_F \left(\ip{p}{w}-V_{x,p}\right)\, \mathrm{d} \nu + \mathcal{I}(x,\nu)\right], \end{align*} for any~$w$ averaging to~$v$. Passing the supremum inside the integral gives~\eqref{SF:eq:results-Lagr-opt-proc}. \subsection{Mean-field coupled to fast diffusion} \label{SF:sec:mean-field-fast-diffusion} In this section, we provide a large-deviation result for mean-field interacting jump processes coupled to a fast diffusion process. Concretely, we take the simultaneous limit of infinitely many particles and inifinte time-scale separation, and are interested in the large deviations of the empirical density-flux pairs of the mean-field system. For formulating the large-deviation result by Theorem~\ref{SF:thm:LDP-mean-field} below, we first introduce the processes~$X_t^n$ (Eq.~\eqref{SF:eq:def:density-flux} below) and~$Z_t^n$ (Eq.~\eqref{SF:eq:intro-mean-field:fast-generator} below) independently from one another, and then consider the coupling. We start with describing the mean-field system. \paragraph{The slow process: mean-field system.} The mean-field system of~$n$ particles is described by~$n$ weakly-interacting jump processes on a finite state space. That means every jump process~$Y_{n,i}$ takes values in~$\{1,\dots,q\}$, for~$i=1,\dots,n$. We collect the states of all particles in a vector \begin{equation*} Y_n(t) := (Y_{n,1}(t),\dots,Y_{n,n}(t)) \in \{1,\dots,q\}^n. \end{equation*} Each jump process can jump over an edge~$(a,b)$; for the set of directed edges in~$\{1,\dots,q\}$, we write $\Gamma = \left\{(a,b) \in \{1,\dots,q\}^2 \, \middle| \, a \neq b \right\}$. We assume that only one particle can jump at a time. The time-evolution of~$Y_n$ is specified by jump rates~$r(a,b)$ attached to each bond~$(a,b)\in \Gamma$. To incorporate the assumption of \emph{weak interactions}, the jump rates are assumped to depend on the configuration of the particles only via their distribution. More specifically, consider the \emph{empirical density} \begin{equation*} \mu_n(Y_n(t)) := \frac{1}{n}\sum_{i=1}^n\delta_{Y_{n,i}(t)}\in\mathcal{P}(\{1,\dots,q\}). \end{equation*} Then the transitions of~$Y_n$ as a jump process on~$\{1,\dots,q\}^n$ are determined by a family of rates~$\{r_n(a,b,\mu):(a,b)\in\Gamma,\mu\in\mathcal{P}(\{1,\dots,q\}\}$. For fixed~$\mu$, the scalar~$r_n(a,b,\mu)\geq 0$ is the rate at which transitions from~$a$ to~$b$ occur when the empirical density is in configuration~$\mu$. Put differently, if the particles are in configuration~$Y_n(t)$, then the jump~$Y_{n,i}(t)\to b$ of the i'th particle occurs at rate \begin{equation*} r_n\left(Y_{n,i}(t),b,\mu_n(Y_n(t)\right). \end{equation*} Next to the empirical density, we keep track of the number of jumps that occured over each bond. To that end, let~$t \mapsto W_{n,i}(t) \in \mathbb{N}^\Gamma$ be the process counting the number of times the i'th particle jumps over each bond, \begin{equation*} W_{n,i}(t)(a,b) := \#\left\{0\leq s \leq t \, \middle| \, \left(X_{n,i}(s-), X_{n,i}(s)\right) = (a,b) \right\}. \end{equation*} We regard~$W_{n,i}(t)$ as a random vector taking values in~$\mathbb{N}^\Gamma$. The average fluxes over all bonds are captured by the \emph{empirical flux}~$W_{n}$ defined as \begin{equation*} W_n(t) :=\frac{1}{n}\sum_{i=1}^nW_{n,i}(t). \end{equation*} The slow process we are interested in is the pair of empirical density and flux, \begin{equation}\label{SF:eq:def:density-flux} X_t^n := \left(\mu_n(Y_n(t)),W_n(t)\right) \in E:= \mathcal{P}(\{1,\dots,q\}) \times [0,\infty)^\Gamma, \end{equation} which we will refer to as the \emph{density-flux process}. We write~$x$ for the variables in~$E$, which are pairs~$x=(\mu,w)$ of configurations~$\mu\in\mathcal{P}(\{1,\dots,q\})$ and average fluxes~$w\in[0,\infty)^\Gamma$. We identify the probability measures~$\mathcal{P}(\{1,\dots,q\})$ with the simplex in~$\mathbb{R}^q$, \begin{equation*} \{\mu\in\mathbb{R}^q\,:\, \sum_{i=1}^q \mu_i = 1,\,\mu_i\geq 0\}, \end{equation*} equipped with the Euclidean topology inherited from~$\mathbb{R}^d$, so that convergence in the simplex coincides with weak convergence in~$\mathcal{P}(\{1,\dots,q\})$. We also identify the~$n$-atomic measures $P_n:=\{(1/n)\sum_{i=1}^n\delta_{q_i}\,:\,q_i\in\{1,\dots,q\}\}$ with the simplex intersected with~$(1/n)\mathbb{Z}^q$. We sometimes write~$\mu_i=\mu(i)$. \smallskip Finally, we describe the generator of~$X_t^n$. If~$\mu_n(Y_n(t))=:\mu$, then the transition of a particle from~$a$ to~$b$ occurs at rate~$r_n(a,b,\mu)$. The number of particles in state~$a$ is $n\cdot \mu(a)$. Hence the rate at which the configuration~$\mu$ transitions to the configuration $\mu + (\delta_b-\delta_a)/n$ is given by~$n\cdot \mu(a)\cdot r_n(a,b,\mu)$. Therefore, the generator~$A_n^\mathrm{slow}:C_b(E)\to C_b(E)$ of the jump process~$X_t^n$ is \begin{equation}\label{SF:eq:intro-mean-field:slow-generator} A_n^\mathrm{slow} f(x) = \sum_{a,b;a\neq b} n\cdot \mu(a)\cdot r_n(a,b,\mu)\left[f(x_{a\to b}^n)-f(x)\right], \end{equation} where for a state~$x=(\mu,w)\in E$, we denote by~$x_{a\to b}^n$ the state after the jump. Since after the jump, exactly one particle has changed its state from~$a$ to~$b$, \begin{equation*} x_{a\to b}^n = \left(\mu + \frac{1}{n}(\delta_b-\delta_a), w+\frac{1}{n}\delta_{(a,b)}\right). \end{equation*} \paragraph{The fast process: drift-diffusion.} The process $Z_t^n$ is a drift-diffusion process on the flat torus~$F=\mathbb{T}^m$, some~$m\in\mathbb{N}$. While our arguments that concern~$Z_t^n$ also hold true on a closed, smooth, compact, connected manifold, we do not consider this generalization in order to avoid geometric discussions. The generator of~$Z_t^n$ is a second-order uniformly-elliptic differential operator given by \begin{equation}\label{SF:eq:intro-mean-field:fast-generator} A_n^\mathrm{fast} f(z) = \sum_{i=1}^m b_n^i(z)\partial_i f(z) + \sum_{ij=1}^ma_n^{ij}(z)\partial_i\partial_j f(z), \end{equation} where~$a_n(z) = \sigma_n(z)\sigma_n(z)^T$ are symmetric positive-definite matrices and~$b_n(z)$ are vector fields. The domain~$\mathcal{D}(A^\mathrm{fast})$ of~$A_n^\mathrm{fast}$ is independent of~$n$ and is dense in~$C(F)$. In one dimension,~$\mathcal{D}(A^\mathrm{fast})=C^2(F)$, while for any dimension~$m\geq 2$, the domain is larger. On functions~$f\in C^2(F)$ however, the action of the generator is always given by~\eqref{SF:eq:intro-mean-field:fast-generator}. For details on the construction of the process from the operator, we refer to Ikeda's and Watanabe's monograph~\cite[Theorem~IV.6.1]{IkedaWatanabe2014} and the discussion thereafter. \paragraph{The coupled slow-fast system.} We described two processes above. First, the density-flux process~$X_t^n$ given in terms of jump rates~$r_n(a,b,\mu)$, whose generator~$A_n^\mathrm{slow}$ is a pure jump process on a finite subset of~$E$. Secondly, the drift-diffusion process~$Z_t^n$ defined in terms of drifts~$b_n^i(z)$, diffusion-coefficient matrices~$\sigma_n(z)$, and the generator~$A_n^\mathrm{fast}$. In order to obtain a coupled system, we consider coefficients depending on both slow and fast variables: \begin{enumerate}[label=(\roman*)] \item The jump rates are in addition~$z$-dependent,~$r_n=r_n(a,b,\mu,z)$. \item The drifts and diffusion-coefficients are in addition~$x$-dependent, meaning $b_n^i=b_n^i(x,z)$ and~$\sigma_n^{ij}=\sigma_n^{ij}(x,z)$. \end{enumerate} The pair~$(X_t^n,Z_t^n)$ we want to obtain is an example of coupling a jump process to a drift-diffusion process. The following regularity condition is imposed in order to ensure that we obtain a Feller-continuous process~$(X_t^n,Z_t^n)$ solving the martingale problem~\cite[Theorem~2.1, Section~2.5 and Theorem~2.18]{YinZhu2009}. \begin{condition}[Regularity]\label{SF:condition:mean-field:reg-coefficients} For each~$i,j\in 1$,~$n=1,2,\dots$, we have: \begin{enumerate}[label=(\arabic*)] \item For each~$x\in E$,~$a_n^{ij}(x,\cdot)\in C^2(F)$ and~$b_n^i(x,\cdot)\in C^1(F)$. \item There is a constant~$C>0$ such that $\ip{a_n(x,z)\xi}{\xi}\geq C|\xi|^2$ for all~$\xi\in T_z F$ and for all~$(x,z)\in E\times F$. \item For each~$(a,b)\in\Gamma$, the jump rates~$r_n(a,b,\mu,z)$ depend continuously on~$(\mu,z)$, and $r_n(a,b,\mu,\cdot)\in C^1(F)$ for each~$\mu\in E$. \qed \end{enumerate} \end{condition} Accordingly, we consider the operators~$A_{n,z}^\mathrm{slow}$ and~$A_{n,x}^\mathrm{fast}$ by replacing the coeffients in~\eqref{SF:eq:intro-mean-field:slow-generator} and~\eqref{SF:eq:intro-mean-field:fast-generator}, \begin{align} A_{n,z}^\mathrm{slow} g(x) &:= \sum_{a,b;a\neq b} n\cdot \mu(a)\cdot r_n(a,b,\mu,z)\left[g(x_{a\to b})-g(x)\right],\\ A_{n,x}^\mathrm{fast} h(z) &:= \sum_i b_n^i(x,z)\partial_i h(z) + \sum_{ij}a_n^{ij}(x,z)\partial_i\partial_j h(z). \end{align} Furthermore, we let the diffusion process run on the time-scale of order~$n$. The generator~$A_n$ of the couple~$(X_t^n,Z_t^n)$ is \begin{equation}\label{SF:eq:intro-mean-field:generator-slow-fast} A_n f(x,z) := A_{n,z}^\mathrm{slow}f(\cdot,z)(x) + n\cdot A_{n,x}^\mathrm{fast}f(x,\cdot)(z). \end{equation} We obtained a two-component process~$(X^n,Z^n)\in D_{E\times F}[0,\infty)$ with generator~$A_n$. The diffusion process~$Z^n$ is running at a time-scale or order~$n$ faster compared to the density-flux process~$X^n$. Therefore we refer to~$Z^n$ as the fast process and to~$X^n$ as the slow process. \paragraph{Large deviations of the slow component.} We take the limit~$n\to\infty$ and ask the following questions: does the density-flux process~$X_t^n$ satisfy a large deviation principle in~$D_E[0,\infty)$ under the influence of the fast diffusion process~$Z^n$? How exactly does the fast process affect the large-deviation fluctuations of the particle system? We answer these questions by Theorem~\ref{SF:thm:LDP-mean-field}. \smallskip A large-deviation result can only be expected if the jump rates of the particle system and the coefficients of the diffusion process converge as~$n\to\infty$. We work under the following convergence assumptions. \begin{assumption}[Convergence of rates]\label{SF:mean-field:conv-rates} There is a kernel~$r=r(a,b,\mu,z)$ such that for each edge~$(a,b)\in\Gamma$, \begin{equation*} \lim_{n\to\infty}\sup_{\mu\in \mathcal{P}_n}\sup_{z\in F}\left| r_n(a,b,\mu,z)-r(a,b,\mu,z)\right| = 0. \end{equation*} There are constants~$0<r_\mathrm{min}\leq r_{\mathrm{max}}<\infty$ such that for all edges~$(a,b)\in\Gamma$ satisfying~$\sup_{\mu,z}r(a,b,\mu,z)>0$, we have \begin{equation*} r_\mathrm{min}\leq \inf_{\mu,z}r(a,b,\mu,z) \leq \sup_{\mu,z}r(a,b,\mu,z) \leq r_\mathrm{max}. \end{equation*} \end{assumption} \begin{assumption}[Convergence of coefficients]\label{SF:mean-field:conv-coeff} For each~$i,j$, there are functions~$b^i$ and~$\sigma^{ij}$ on~$E\times F$ such that whenever~$x_n=(\mu_n,w_n)\to (\mu,w)$, then \begin{equation*} \|b^i(\mu,\cdot)-b_n^i(x_n,\cdot)\|_{F}\to 0\quad\text{and}\quad \|\sigma^{ij}(\mu,\cdot)-\sigma_n^{ij}(x_n,\cdot)\|_{F}\to 0, \end{equation*} where~$\|g\|_F=\sup_F|g|$. The maps~$\mu\mapsto\sigma^{ij}(\mu,\cdot)$ are continuous as functions from~$\mathcal{P}(\{1,\dots,q\})$ to~$C(F)$ equiped with the uniform norm.\qed \end{assumption} \begin{theorem}[Large deviations of the density-flux process] \label{SF:thm:LDP-mean-field} Let~$(X^n,Z^n)$ be the Markov process with generator~\eqref{SF:eq:intro-mean-field:generator-slow-fast}. Suppose that Assumptions~\ref{SF:mean-field:conv-rates} and~\ref{SF:mean-field:conv-coeff} hold true and that $X^n(0)$ satisfies a large deviation principle with good rate function $J_0:E\to[0,\infty]$ on $E = \mathcal{P}(\{1,\dots,q\}) \times [0,\infty)^\Gamma$. \smallskip Then $\{X^n\}_{n = 1,2\dots}$ satisfies a large deviation principle on $D_{E}[0,\infty)$ with good rate function $J$ given by \begin{equation*} J(x) = \begin{cases} J_0(\gamma(0)) + \int_0^\infty \mathcal{L}(\gamma(t),\partial_t \gamma(t)) \mathrm{d} t & \text{if } \gamma \in \mathcal{A}\mathcal{C}([0,\infty);E), \\ \infty & \text{otherwise}, \end{cases} \end{equation*} where the Lagrangian $\mathcal{L} : E \times \mathbb{R}^d \rightarrow [0,\infty]$ satisfies the two representations shown below.\qed \end{theorem} As in the general large-deviation result (Theorem~\ref{SF:thm:rate-function}), the Lagrangian admits two characterizations. To fix notation, a path~$\gamma:[0,\infty)\to E$ is a time-dependent pair~$\gamma_t=(\mu_t,w_t)\in \mathcal{P}(\{1,\dots,q\})\times[0,\infty)^\Gamma$, where we identify the probability measures with the simplex in~$\mathbb{R}^q$. The set~$E$ is a subset of~$\mathbb{R}^d$ with dimension~$d=q+|\Gamma|$. \smallskip We use the terminology from Section~\ref{SF:sec:result:general-LDP} to formulate the Lagrangian in terms of the following ingredients. The slow Hamiltonian; for~$(x,p)\in E\times \mathbb{R}^d$, \begin{equation*} V_{x,p}(z) = \sum_{ab}\mu_ar(a,b,\mu,z)\left[e^{p_b-p_a + p_{ab}}-1\right]. \end{equation*} The Donsker-Varadhan functional; for~$x\in E$, \begin{equation*} \mathcal{I}(\mu,\pi) = -\inf_{\substack{u>0\\u\in C^2(F)}} \int_F \frac{A_\mu^\mathrm{fast}u}{u}\, \mathrm{d}\pi, \end{equation*} where~$A_\mu^\mathrm{fast}u(z) := \sum_i b^n(\mu,z)\partial_i u(z) + \sum_{ij} a^{ij}(\mu,z)\partial_i u(z)\partial_j u(z)$. The relative entropy function $S(a|b)$, \begin{equation*} S(a \, | \, b) := \begin{cases} b & \text{if } a = 0, \\ a \log \left(a/b\right) - (a-b) & \text{if } a \neq 0, b \neq 0, \\ +\infty & \text{if } a \neq 0, b = 0. \end{cases} \end{equation*} \paragraph{Dual of principal eigenvalue.} For~$(x,v)\in E\times\mathbb{R}^d$, the Lagrangian~$\mathcal{L}(x,v)$ is the Legendre dual~$\mathcal{L}(x,v)=\sup_{p\in\mathbb{R}^d}\ip{p}{v}-\mathcal{H}(x,p)$, where the Hamiltonian is the principal eigenvalue of ~$(V_{x,p}+A_x^\mathrm{fast})$. The Hamiltonian satisfies the variational formula~\eqref{SF:eq:variational_Hamiltonian} from Section~\ref{SF:sec:result:general-LDP}.\qed \paragraph{Optimizing over velocities.} For a path~$\gamma:[0,\infty)\to E$,~$\gamma=(\mu,w)$, the Lagrangian~$\mathcal{L}$ is finite only if $\partial_t\mu_a = \sum_b \partial_t (w_{ba}-w_{ab})$. If this is the case, then \begin{equation*} \mathcal{L}\left(\gamma,\partial_t\gamma\right) = \inf_{\pi \in \mathcal{P}(F)} \inf_{u \in \Phi(\partial_tw,\pi)} \left\{ \sum_{(a,b) \in \Gamma} \int_F S(u_{ab}(z)\,|\, \mu_a r(a,b,\mu,z)) \pi( \mathrm{d} z) + \mathcal{I}(\mu,\pi) \right\}, \end{equation*} where $\Phi(\partial_tw,\pi)$ is the set of measurable functions $u_{ab}(z)$ for $z \in F$ and $(a,b) \in \Gamma$ such that~$\int u_{ab}(z) \pi( \mathrm{d} z) = \partial_t w_{ab}$.\qed \subsection{Averaging principles} \label{SF:sec:averaging-principles} We discuss the consequences of the pathwise large-deviation theorems. \paragraph{Mean-field system.} We consider the coupled system~$(X^n,Z^n)$ introduced in Section~\ref{SF:sec:mean-field-fast-diffusion}. The pair~$(X^n,Z^n)$ corresponds to the mean-field interaction particles coupled to fast diffusions. The density-flux pair~$X^n=(\rho^n,w^n)$ of the particle-system is a stochastic process in~$D_E[0,\infty)$, where the state space is given by~$E=\mathcal{P}(\{1,\dots,q\})\times[0,\infty)^\Gamma$. \smallskip If the particles are not coupled to the fast diffusion process, then in the limit of large numbers, the evolution of the particle density~$\rho^n$ is characterzied as the solution to a nonlinear ODE, which may be regarded as the finite-dimensional analogue of the McKean-Vlasov equation. We formulate the result in terms of freezing the diffusion process to a value~$z\in F$ and the transition-rate matrix~$R(\rho,z)$ of a jump process with rates~$r(a,b,\rho,z)$, that is \begin{equation*} R_{ab}(\rho,z)=r(a,b,\rho,z)\;\; (a\neq b)\qquad\text{and}\qquad R_{aa}(\rho,z)= -\sum_{b\neq a} r(a,b,\rho,z). \end{equation*} We write~$\rho R$ for the vector with components~$(\rho R)_a=\sum_{b}\rho_bR_{ba}$. \begin{proposition}[Law of Large Number limit of mean-field interacting particles] Let~$X^n=(\rho^n,w^n)$ be the density-flux process from~$\eqref{SF:eq:def:density-flux}$ with jump rates given by~$r_n(a,b,\cdot,z)$ for some fized~$z\in F$. If the initial density~$\rho^n(0)$ converges in probability to a distribution~$\mu\in\mathcal{P}(\{1,\dots,q\})$, then~$\rho^n$ converges uniformly on compact time intervals to a solution of \begin{equation*} \partial_t\rho = \rho R(\rho,z),\quad \rho(0)=\mu, \end{equation*} where~$R(\rho,z)$ is the transition-rate matrix of a jump process with rates~$r(a,b,\rho,z)$. \end{proposition} Budhiraja, Dupuis, Fischer and Ramanan proof of this statement~\cite[Theorem~2.2]{BudhirajaDupuisFischerRamanan2015} based on a classical convergence Theorem by Kurtz~\cite{Kurtz1970}. Under a Lipschitz condition on the limiting rates, the limit is unique. \smallskip Under the influence of the fast diffusion, we prove the limiting evolution to be altered according to the averaging principle. \begin{theorem}[Averaging Principle]\label{SF:thm:mean-field-averaging} Let~$(X^n,Z^n)$ be the slow-fast system from Theorem~\ref{SF:thm:LDP-mean-field}, with~$X^n=(\rho^n,w^n)$ and initial condition~$\rho^n(0)\to \mu\in\mathcal{P}(\{1,\dots,q\}$ weakly as~$n\to\infty$. Let~$\pi_\nu\in\mathcal{P}(F)$ be the unique measure satisfying~$\mathcal{I}(\nu,\pi_\nu)=0$. Then~$\rho^n$ converges a.s. with respect to the Skorohod topology to a solution of \begin{equation}\label{SF:averaging-principles:mean-field:limit-evol} \partial_t\rho = \rho \widehat{R}(\rho),\quad \rho(0) = \mu. \end{equation} The transition-rate matrix~$\widehat{R}(\rho)$ is an averaged matrix, componentwise given by \begin{equation}\label{SF:eq:averaging-principle:mean-field:R-hat} \widehat{R}_{ab}(\rho) = \int_F R_{ab}(\rho,z)\,\pi_\rho( \mathrm{d} z). \end{equation} \end{theorem} If~$\widehat{R}$ is Lischitz continuous, then the averaged McKean-Vlasov equation~\eqref{SF:averaging-principles:mean-field:limit-evol} has a unique solution. In that case, the minimizer of the rate function is unique, and the pathwise large deviation principle of Theorem~\ref{SF:thm:LDP-mean-field} implies that~$\rho^n$ converges to the solution. In general, if the rate function has multiple minimizers, then the large deviation principle does not contain enough information to determine the limit. \begin{proof}[Proof of Theorem~\ref{SF:thm:mean-field-averaging}] We show that any density~$\rho$ of the minimizer~$x=(\rho,w)$ of the rate function~$J$ solves~\eqref{SF:averaging-principles:mean-field:limit-evol}. If~$J(\rho,w)=0$, then~$\mathcal{L}(x(t),\partial_t x(t))=0$ for a.e.~$t>0$, where the Lagrangian~$\mathcal{L}$ is given by \begin{equation*} \mathcal{L}\left(x,\partial_tx\right) = \inf_{\pi \in \mathcal{P}(F)} \inf_{u \in \Phi(\partial_tw,\pi)} \left\{ \sum_{(a,b) \in \Gamma} \int_F S(u_{ab}(z)\,|\, \rho_a r(a,b,\rho,z)) \pi( \mathrm{d} z) + \mathcal{I}(\rho,\pi) \right\}, \end{equation*} and by finiteness of the Lagrangian, \begin{equation}\label{SF:eq:proof:averaging-principle:mean-field:rho} \partial_t\rho_a = \sum_b \partial_t (w_{ba}-w_{ab}). \end{equation} In the formula for the Lagrangian, all terms inside the infimum are non-negative. Hence for any~$u\in\Phi(\partial_tw,\pi)$ and~$\pi\in\mathcal{P}(F)$, the expression is only zero if we have~$\mathcal{I}(\rho,\pi)=0$. Therefore~$\pi=\pi_\rho$, and \begin{equation*} 0=\mathcal{L}(x,\partial_tx) = \inf_{u\in\Phi(\partial_tw,\pi_\rho)}\sum_{ab} \int_F S\left(u_{ab}(z)\,|\rho_a r(a,b,\rho,z)\right)\,\pi_\rho( \mathrm{d} z). \end{equation*} Since~$S(r,s)=0$ if and only if~$r=s$, any optimizer~$u_{ab}(\cdot)$ satisfies \begin{equation}\label{SF:eq:proof:averaging-principle:mean-field:uab} u_{ab}(z)=\rho_ar(a,b,\rho,z)\qquad \pi_\rho\,\mathrm{a}.\mathrm{e}, \end{equation} and by definition of the set~$\Phi(\partial_tw,\pi_\rho)$, \begin{equation}\label{SF:eq:proof:averaging-principle:mean-field:wab} \partial_tw_{ab}=\int_F u_{ab}(z)\,\pi_\rho( \mathrm{d} z). \end{equation} Combining these equalities, we find \begin{align*} \partial_t \rho_a &\overset{\eqref{SF:eq:proof:averaging-principle:mean-field:rho}}{=} \sum_{b\neq a} \partial_t (w_{ba}-w_{ab})\\ &\overset{\eqref{SF:eq:proof:averaging-principle:mean-field:wab}}{=} \sum_{b\neq a} \int_F (u_{ba}-u_{ab})\,\pi_\rho( \mathrm{d} z)\\ &\overset{\eqref{SF:eq:proof:averaging-principle:mean-field:uab}}{=} \sum_{b\neq a} \left[\rho_b\int_F r(b,a,\rho,z)\pi_\rho( \mathrm{d} z) -\rho_a \int_F r(a,b,\rho,z)\pi_\rho( \mathrm{d} z)\right] \\ &\overset{\eqref{SF:eq:averaging-principle:mean-field:R-hat}}{=} \sum_{b\neq a}\rho_b \widehat{R}_{ba}(\rho) + \rho_a\widehat{R}_{aa}(\rho)\stackrel{\mathclap{\text{def}}}{=} (\rho\widehat{R}(\rho))_a, \end{align*} which finishes the proof. \end{proof} The conclusion of Theorem~\ref{SF:thm:mean-field-averaging} remains true when replacing the fast diffusion process by a fast jump process on a finite state space~$\{1,\dots,m\}$. Then the limiting averaged matrix is simply obtained from the equilibrium measure~$\pi=(\pi_1,\dots,\pi_m)$ of the fast jump process as \begin{equation*} \widehat{R}(\rho) = \sum_{i=1}^m R(\rho,i)\pi_i. \end{equation*} \section{Assumptions of general large-deviation theorem} \label{SF:sec:assumptions:general-LDP-theorem} Here we collect the assumptions underlying Theorems~\ref{SF:thm:LDP_general} and~\ref{SF:thm:rate-function}. We pose all assumptions in terms of the slow-fast generators~$A_n$ given by~\eqref{SF:eq:setting:generator-slow-fast-system}, that is \begin{equation*} A_n f(y,z) = A^\mathrm{slow}_{n,z} f(\cdot,z) (y) + r_n \cdot A^\mathrm{fast}_{n,y} f(y,\cdot)(z). \end{equation*} The assumptions cluster in three groups, where each group corresponds to one step in the large-deviation proof: \begin{enumerate}[label=(\roman*)] \item Convergence of nonlinear generators. \item Comparison principle of a limiting Hamilton-Jacobi equation. \item Action-integral form of the rate function. \end{enumerate} We make these steps precise when explaining the strategy of proof in Section~\ref{SF:sec:proof-general-LDP-Theorem:strategy-of-proof}. Below, Assumptions~\ref{SF:assumption:convergence-slow-nonlinear-generators} and~\ref{SF:assumption:convergence-fast-nonlinear-generators} correspond to the convergence of nonlinear generators, Assumptions~\ref{SF:assumption:principal-eigenvalue-problem},~\ref{SF:assumption:regularity-V} and~\ref{SF:assumption:regularity-I} are used to prove the comparison principle, and finally Assumption~\ref{SF:assumption:Hamiltonian_vector_field} is made in order to obtain the action-integral form of the rate function. \smallskip Recall the setting from Condition~\ref{SF:condition:compact_setting:state-spaces}: the slow-fast process~$(X^n,Z^n$) takes values in the product space~$E_n\times F$. The spaces~$E_n$ are continuously embedded into a Polish space~$E\subseteq{R}^d$ with a map~$\eta_n:E_n\to E$, and the space~$F$ are compact Polish spaces. \smallskip We first state the two assumptions concerning the convergence of non-linear transforms~$H_n$ of the generator~$A_n$, defined by~$H_nf=(1/n)e^{-nf}A_ne^{nf}$. We assume the slow and fast parts to converge independently. \begin{assumption}[Convergence of slow non-linear generators] \label{SF:assumption:convergence-slow-nonlinear-generators} Let $D_0$ be a linear space $C_c^\infty(E) \subseteq D_0 \subseteq C_b^1(E)$ satisfying the following: \begin{enumerate}[label=(\roman*)] \item For any $n$, $z \in F$ and $f \in D_0$, $z \in F$ we have $e^{r_n f} \in \mathcal{D}(A_{n,z}^{slow})$ and \begin{equation*} \sup_{n}\sup_{x \in E_n,z \in F} \left|\frac{1}{r_n} e^{-r_nf(x,z)} A_{n,z}^\mathrm{slow} e^{r_nf(\cdot,z)(x)} \right| < \infty; \end{equation*} \item There exist continuous functions $V_{x,p} : F \to \mathbb{R}$, where $x \in E$ and $p \in \mathbb{R}^d$, such that for any $f \in D_0$ and all compact sets $K \subseteq E$ \begin{align*} \sup_{ x \in \eta_n^{-1}(K), z \in F} \left| \frac{1}{r_n} e^{-r_nf(x)} \left(A_{n,z}^\mathrm{slow} e^{r_nf(\cdot)}\right)(x) - V_{\eta_n(x),\nabla f(\eta_n(x))}(z) \right| \to 0. \tag*\qed \end{align*} \end{enumerate} \end{assumption} We refer to the function~$V_{x,p}(z)$ as the \emph{slow Hamiltonian}. \begin{assumption}[Convergence of fast non-linear generators] \label{SF:assumption:convergence-fast-nonlinear-generators} For every~$x\in E$, there exists an operator~$A_x^\mathrm{fast}$ with the following properties. For any~$g\in \mathcal{D}(A^\mathrm{fast})$,~$x_n \in E_n$ and~$g_n \in\mathcal{D}(A^\mathrm{fast})$ such that~$\eta_n(x_n)\to x$ and~$g_n\to g$ uniformly on~$F$, we have \begin{equation*} \|A^\mathrm{fast}_xg-A^\mathrm{fast}_{n,\eta_n(x_n)}g_n\|_F\to 0. \end{equation*} Furthermore, for any~$\phi\in \mathcal{D}(A^\mathrm{fast})$, \begin{align*} \sup_{n}\sup_{y\in E_n}\|e^{-\phi(z)} \left(A^\mathrm{fast}_{n,y} e^{-\phi}\right)(z)\|_F < \infty. \tag*\qed \end{align*} \end{assumption} With the above two convergence assumptions, we will obtain a limit operator~$H$ defined in terms of a graph~$H\subseteq C_b(E)\times C_b(E\times F)$. The precise definition of~$H$ is given in Definition~\ref{SF:def:multi-valued-limit:general}. The next three assumptions are imposed in order to prove the comparison principle of the Hamilton-Jacobi equation with this Hamiltonian~$H$. \smallskip For the first assumption, consider the Hamiltonian~$\mathcal{H}(x,p)$ defined by~\eqref{SF:eq:variational_Hamiltonian}; given the slow Hamiltonian~$V_{x,p}$ and the limit generator~$A^\mathrm{fast}$, \begin{equation}\label{SF:eq:sec-assumption:H} \mathcal{H}(x,p) = \sup_{\pi \in \mathcal{P}(F)} \left\{\int V_{x,p}(z) \, \pi( \mathrm{d} z) - \mathcal{I}(x,\pi) \right\}, \end{equation} where~$\mathcal{I}$ is the Donsker-Varadhan rate functional~\eqref{SF:eq:main-results:DV-functional}. \begin{assumption}[Approximative solution to a principal-eigenvalue problem] \label{SF:assumption:principal-eigenvalue-problem} Let~$(x,p)\in E\times\mathbb{R}^d$. The limit~$V_{x,p}$ from Assumption~\ref{SF:assumption:convergence-slow-nonlinear-generators} and the operators~$A^\mathrm{fast}_x$ from Assumption~\ref{SF:assumption:convergence-fast-nonlinear-generators} satisfy the following. \begin{enumerate}[label=($\mathcal{E}$\arabic*)] \item \label{SF:item:assumption:PI:domain} For any $\Phi$ such that $e^\Phi\in\mathcal{D}(A^\mathrm{fast})$, we have $e^{(1-\varepsilon)\Phi} \in \mathcal{D}(A^\mathrm{fast})$ for any~$0<\varepsilon<1$. \item \label{SF:item:assumption:PI:solvePI} For every $\delta > 0$ there exists a strictly positive function $u_\delta \in \mathcal{D}(A^\mathrm{fast})$ on~$F$ satisfying \begin{align*} \sup_{z \in F} \left| \left( V_{x,p}(z) + A^\mathrm{fast}_x \right) u_\delta(z) - \mathcal{H}(x,p) u_\delta(z) \right| \leq \delta. \tag*\qed \end{align*} \end{enumerate} \end{assumption} The second part of Assumption~\ref{SF:assumption:principal-eigenvalue-problem} is satisfied if the principal-eigenvalue problem for the operator~$V_{x,p}+A_x^\mathrm{fast}$ is well-posed, where~$V_{x,p}$ acts via multiplication. By principal-eigenvalue problem, we mean the existence of a strictly positive function~$u$ in the domain of~$A_x^\mathrm{fast}$ and an eigenvalue~$\lambda\in\mathbb{R}$ such that $(V_{x,p}+A_x^\mathrm{fast})u=\lambda u$ holds pointwise on~$F$. If the principal-eigenvalue problem is well-posed, then~$\lambda=\mathcal{H}(x,p)$ by a result of Donsker and Varadhan~\cite{DonskerVaradhan75}. \smallskip We impose the next two assumptions on~$V$ and~$\mathcal{I}$ in order to verify the comparison principle for Hamilton-Jacobi equations involving the above Hamiltonian~$\mathcal{H}(x,p)$. The assumptions are derived from~\cite{KraaijSchlottke2019} (Chapter~6), where we prove the comparison principle for Hamiltonians of the type~\eqref{SF:eq:sec-assumption:H}. \begin{assumption}[Regularity of the slow Hamiltonian]\label{SF:assumption:regularity-V} The slow Hamiltonian from Assumption~\ref{SF:assumption:convergence-slow-nonlinear-generators}, that is the map~$V:E\times\mathbb{R}^d\times F\to\mathbb{R}$, satisfies: \begin{enumerate}[label=($V$\arabic*)] \item \label{SF:item:assumption:slow_regularity:continuity} For every $(x,p)$ we have $V_{x,p} \in C(F)$, and the map $(x,p) \mapsto V_{x,p}$ is continuous on $C(F)$ for the supremum norm. \item \label{SF:item:assumption:slow_regularity:convexity} For any $x \in E$ and $z \in F$, the map $p \mapsto V_{x,p}(z)$ is convex. Furthermore, we have $V_{x,0}(z) = 0$ for all $x,z$. \item \label{SF:item:assumption:slow_regularity:compact_containment} There exists a continuous containment function $\Upsilon : E \to [0,\infty)$ in the sense of Definition~\ref{def:results:compact-containment}. \item \label{SF:item:assumption:slow_regularity:continuity_estimate} The function $\Lambda(x,p,\nu) := \int V_{x,p}(z) \, \nu( \mathrm{d} z)$ on~$E\times\mathbb{R}^d\times\mathcal{P}(F)$ satisfies the continuity estimate~\cite[Definition~4.14]{KraaijSchlottke2019}. A definition of the continuity estimate is given in~\ref{def:results:continuity_estimate}. \item \label{SF:item:assumption:slow_regularity:controlled_growth} For every compact set $K \subseteq E$, there exist constants $M, C_1, C_2 \geq 0$ such that for all $x \in K$, $p \in \mathbb{R}^d$ and all $z_1,z_2\in F$, \begin{align*} V_{x,p}(z_1) \leq \max\left\{M,C_1 V_{x,p}(z_2) + C_2\right\}. \tag*\qed \end{align*} \end{enumerate} \end{assumption} The conditions~\ref{SF:item:assumption:slow_regularity:continuity},~\ref{SF:item:assumption:slow_regularity:convexity} follow from the convergence in Assumption~\ref{SF:assumption:convergence-slow-nonlinear-generators}. We state them nevertheless to clearify the connection to~\cite{KraaijSchlottke2019}. \begin{assumption}[Regularity of the Donsker-Varadhan functional]\label{SF:assumption:regularity-I} The functional $\mathcal{I}:E\times\mathcal{P}(F) \to [0,\infty]$ from~\eqref{SF:eq:main-results:DV-functional} satisfies the following. \begin{enumerate}[label=($\mathcal{I}$\arabic*)] \item \label{SF:item:assumption:I:lsc} The map $(x,\nu) \mapsto \mathcal{I}(x,\nu)$ is lower semi-continuous on $E \times \mathcal{P}(F)$. \item \label{SF:item:assumption:I:zero-measure} For any $x\in E$, there exists a point $\nu_x\in\mathcal{P}(F)$ such that $\mathcal{I}(x,\nu_x) = 0$. \item \label{SF:item:assumption:I:compact-sublevelsets} For any $x \in E$, compact set $K \subseteq E$ and $C \geq 0$ the set $\left\{\nu \in \mathcal{P}(F) \, \middle| \mathcal{I}(x,\nu) \leq C\right\}$ is compact and $\cup_{x\in K}\left\{\nu \in \mathcal{P}(F) \, \middle| \, \mathcal{I}(x,\nu) \leq C\right\}$ is relatively compact. \item \label{SF:item:assumption:I:finiteness} For any converging sequence $x_n \to x$ in $E$ and sequence $\nu_n \in \mathcal{P}(F)$, if there is an $M > 0$ such that $\mathcal{I}(x_n,\nu_n) \leq M < \infty$ for all $n \in \mathbb{N}$, then there exists a neighborhood $U_x$ of $x$ and a constant $M' > 0$ such that for any $y \in U_x$ and $n \in \mathbb{N}$, \begin{equation*} \mathcal{I}(y,\nu_n) \leq M' < \infty. \end{equation*} \item \label{SF:item:assumption:I:equi-cont} For every compact set $K \subseteq E$ and each $M \geq 0$ the collection of functions $\{\mathcal{I}(\cdot,\nu)\}_{\nu \in \mathcal{P}(F)_M}$ with \begin{equation*} \mathcal{P}(F)_{M} := \left\{\nu \in \mathcal{P}(F) \, \middle| \, \forall \, x \in K: \, \mathcal{I}(x,\nu) \leq M \right\} \end{equation*} is equicontinuous. That is: for all $\varepsilon > 0$, there is a $\delta > 0$ such that for all $\nu \in \mathcal{P}(F)_M$ and $x,y \in K$ satisfying $d(x,y) \leq \delta$, we have the estimate~$|\mathcal{I}(x,\nu) - \mathcal{I}(y,\nu)| \leq \varepsilon$.\qed \end{enumerate} \end{assumption} Condition~\ref{SF:item:assumption:I:lsc} follows if the map~$x\mapsto A_x^\mathrm{fast}\phi$ is continuous as a function from~$E$ to~$C(F)$ equiped with the supremum norm. Conditions~\ref{SF:item:assumption:I:zero-measure} and~\ref{SF:item:assumption:I:compact-sublevelsets} are always satisfied by the compactness assumption on~$F$. Again, we state these conditions to make the connection to~\cite{KraaijSchlottke2019} as clear as possible. \smallskip Assumptions~\ref{SF:assumption:convergence-slow-nonlinear-generators},~\ref{SF:assumption:convergence-fast-nonlinear-generators},~\ref{SF:assumption:principal-eigenvalue-problem},~\ref{SF:assumption:regularity-V} and~\ref{SF:assumption:regularity-I} suffice for the proof of Theorem~\ref{SF:thm:LDP_general}, which establishes pathwise large deviations. We need one additional assumption to prove the action-integral representation of the rate function. To that end, we denote for a convex function $\Phi : \mathbb{R}^d \rightarrow (-\infty,\infty]$ its subdifferential by \begin{equation*} \partial_p \Phi(p_0) := \left\{ \xi \in \mathbb{R}^d \,:\, \Phi(p) \geq \Phi(p_0) + \xi \cdot (p-p_0) \quad (\forall p \in \mathbb{R}^d) \right\}. \end{equation*} The Bouligand tangent cone to $E$ in $\mathbb{R}^d$ at $x$ is \begin{equation*} T_E(x) := \left\{z \in \mathbb{R}^d \, \middle| \, \liminf_{\lambda \downarrow 0} \frac{d(y + \lambda z, E)}{\lambda} = 0\right\}. \end{equation*} \begin{assumption}[] \label{SF:assumption:Hamiltonian_vector_field} The slow Hamiltonian $V : E \times \mathbb{R}^d \times F \rightarrow \mathbb{R}$ from Assumption~\ref{SF:assumption:convergence-slow-nonlinear-generators} satisfies $\partial_p V_{x,p}(z) \subseteq T_E(x)$ for all $p$, $x$ and $z$.\qed \end{assumption} In~\cite{KraaijSchlottke2019}, this assumption is made on the full Hamiltonian~$\mathcal{H}(x,p)$ instead of the slow Hamiltonian~$V_{x,p}(z)$. We will show this property to bootstrap from the slow to the full Hamiltonian. \section{Proof of large deviations of the slow process} \label{SF:sec:proof-general-LDP-Theorem} \subsection{Strategy of the proof} \label{SF:sec:proof-general-LDP-Theorem:strategy-of-proof} We outline the large-deviation proof for the slow component of a slow-fast system from Theorem~\ref{SF:thm:LDP_general}. For the generator~$A_n$ of a slow-fast system~$(Y^n,Z^n)$, define the operator~$H_n$ on~$\mathcal{D}(H_n) := \{f\in C_b(E_n\times F)\,:\,e^{r_nf}\in \mathcal{D}(A_n)\}$ by \begin{equation}\label{SF:eq:nonlinear-generator-slow-fast} H_n f(y,z):= \frac{1}{r_n}e^{-r_nf(y,z)} \left(A_n e^{r_nf(\cdot)}\right)(y,z) \end{equation} We call this operator the \emph{nonlinear generator} of~$(X^n,Z^n)$. To prove large deviations, we exploit the semigroup-convergence method built by Jin Feng and Thomas Kurtz~\cite{FengKurtz2006}. In a nutshell, the large-deviation proof boils down to two steps: \begin{enumerate}[label=(\roman*)] \item Convergence of nonlinear generators to a limit operator. \item Verifying the comparison principle for the limit operator. \end{enumerate} The definition of the comparison principle is given in~\ref{definition:viscosity_solutions}. Here, we first give precise version of the above steps by Theorem~\ref{SF:thm:Richard-abstract-LDP} below, which is Kraaij's result from~\cite{Kraaij2019ExpResolv} taylored to our setting. After that, we give the proof of Theorem~\ref{SF:thm:LDP_general}. We use the following convergence concepts. \begin{definition}[LIM-convergence] \label{SF:def:LIM-convergence} Let $f_n \in C_b(E_n \times F)$ and $f \in C_b(E \times F)$. We say that $\LIM f_n = f$ if \begin{enumerate}[label=(\roman*)] \item $\sup_n \vn{f_n} < \infty$, \item for all compact sets $K \subseteq E$, \begin{align*} \lim_{n \rightarrow \infty} \sup_{(y,z) \in \eta_n^{-1}(K) \times F} \left|f_n(y,z) - f(\eta_n(y),z) \right| = 0. \tag*\qed \end{align*} \end{enumerate} \end{definition} \begin{definition}[Extended-LIM]\label{SF:def:extended-LIM} Let $B_n \subseteq C_b(E_n \times F) \times C_b(E_n\times F)$. The set $\mathrm{ex}-\LIM B_n$ is defined as \begin{multline*} \mathrm{ex}-\LIM B_n \\ := \left\{(f,g) \in C_b(E \times F)^2 \, \middle| \, \exists \, (f_n,g_n) \in B_n: \, \LIM f_n = f, \LIM g_n = g \right\}. \tag*\qed \end{multline*} \end{definition} \begin{definition}[Exponential compact containment condition] \label{SF:def:exp-comp-containment} Consider the context of Conditions~\ref{SF:condition:compact_setting:state-spaces} and~\ref{SF:condition:compact_setting:well-posedness-martingale-problem}. The sequence of processes $(Y^n,Z^n)$ satisfies the \emph{exponential compact containment condition} at speed $r_n$ if for each compact set $K \subseteq E$, $T >0$ and $a > 0$ there is a compact set $\widehat{K} = \widehat{K}(K,T,a) \subseteq E$ such that \begin{equation*} \limsup_{n \rightarrow \infty} \sup_{(y,z) \in \eta_n^{-1}(K) \times F} \frac{1}{r_n} \log P_{y,z}\left[Y_n(t) \notin \eta_n^{-1}(\widehat{K}) \text{ for some } t \in [0,T] \right] \leq - a. \end{equation*} \qed \end{definition} The following simplified version of~\cite[Theorem~7.10]{Kraaij2019ExpResolv} is sufficient for our purposes. \begin{theorem}[{Adaptation of~\cite[Theorem~7.10]{Kraaij2019ExpResolv} to our context}] \label{SF:thm:Richard-abstract-LDP} Consider a sequence of slow-fast processes~$(Y^n,Z^n)$ in the setting of Conditions~\ref{SF:condition:compact_setting:state-spaces} and~\ref{SF:condition:compact_setting:well-posedness-martingale-problem}, and let $X_n := \eta_n(Y_n)$. Suppose the following conditions hold true: \begin{enumerate}[label=(\roman*)] \item The exponential compact containment condition (Definition~\ref{SF:def:exp-comp-containment}) is satisfied. \item \label{item:LDP_abstract_convergenceHn} There is an operator $H \subseteq C_b(E) \times C_b(E \times F)$ such that $H \subseteq \mathrm{ex}-\LIM H_n$. \item \label{item:LDP_abstract_comparison} For all $h \in C_b(E)$ and $\lambda > 0$ the comparison principle holds for $f - \lambda Hf = h$. \end{enumerate} Suppose furthermore the large deviation principle to hold for $X_n(0) = \eta_n(Y_n(0))$ with speed $r_n$ and good rate function $J_0$. \smallskip Then the processes $X_n = \eta_n(Y_n)$ satisfy a large deviation principle on $D_E[0,\infty)$ with speed $r_n$ and a good rate function~$J$ given by~\eqref{SF:eq:Richard-general-LDP-thm-rate-function}.\qed \end{theorem} The rate function~$J$ is implicitly characterized by means of a nonlinear semigroup~$V(t):C_b(E)\to C_b(E)$, as \begin{equation} \label{SF:eq:Richard-general-LDP-thm-rate-function} J(\gamma) = J_0(\gamma(0)) + \sup_{k \geq 1} \sup_{\substack{0 = t_0 < t_1 < \dots, t_k \\ t_i \in \Delta_\gamma^c}} \sum_{i=1}^{k} J_{t_i - t_{i-1}}(\gamma(t_i) \, | \, \gamma(t_{i-1})), \end{equation} where $\Delta_\gamma^c$ is the set of continuity points of $\gamma$ and the conditional rate functions~$J_t$ are given by \begin{equation*} J_t(y \, | \, x) = \sup_{f \in C_b(E)} \left\{f(y) - V(t)f(x) \right\}. \end{equation*} The semigroup~$V(t)$ is the limit of nonlinear semigroups~$V_n(t)$ of~$(Y^n,Z^n)$. We do not need the precise statement about the convergence~$V_n\to V$ here. For details, we refer to~\cite{Kraaij2019ExpResolv}. \subsection{Proof of Theorem~\ref{SF:thm:LDP_general}} The proof of Theorem~\ref{SF:thm:LDP_general} hinges on the verification of the conditions of Theorem~\ref{SF:thm:Richard-abstract-LDP} above. In the setting of Theorem~\ref{SF:thm:LDP_general}, we consider a sequence of slow-fast systems~$(Y^n,Z^n)$ satisfying Condition~\ref{SF:condition:compact_setting:well-posedness-martingale-problem} (the well-posedness condition on the martingale problem). Their generators~$A_n$ are given by~\eqref{SF:eq:setting:generator-slow-fast-system}, that is \begin{equation*} A_n f(y,z) = A^\mathrm{slow}_{n,z} f(\cdot,z) (y) + r_n \cdot A^\mathrm{fast}_{n,y} f(y,\cdot)(z), \end{equation*} Applying the program outlined by Theorem~\ref{SF:thm:Richard-abstract-LDP} requires to establish a limit operator~$H$ of the nonlinear generators~$H_n$ defined above in~\eqref{SF:eq:nonlinear-generator-slow-fast}. The following operator~$H$ defined in terms of a graph~$H\subseteq C_b(E)\times C_b(E\times F)$ serves us as the limit. \begin{definition}[Multi-valued limit operator]\label{SF:def:multi-valued-limit:general} For $f \in C_{cc}^\infty(E)$, $x \in E$ and a function $\phi\in C_b(F)$ such that $e^\phi \in \mathcal{D}(A^\mathrm{fast}_x)$, set \begin{equation*} H_{f,\phi}(x,z) := V_{x,\nabla f(x)}(z) + e^{-\phi(z)} A^\mathrm{fast}_x e^{\phi}(z), \end{equation*} and let~$H$ be the graph \begin{equation*} H := \left\{(f,H_{f,\phi}) \, \middle| \, f \in C_{cc}^\infty(E), \phi: e^{\phi} \in \mathcal{D}(A^\mathrm{fast}) \right\}. \end{equation*} The operator $H \subseteq C_b(E) \times C_b(E \times F)$ with $\mathcal{D}(H) = C_{cc}^\infty(E)$ is multi-valued. \qed \end{definition} We prove the following three Lemma's in the subsequent sections under the Assumptions of Theorem~\ref{SF:thm:LDP_general}. \begin{lemma}[Exponential compact containment]\label{SF:lemma:proof-general-LDP:exp-comp-cont} The sequence of slow-fast systems~$(Y^n,Z^n)$ satisfies the exponential compact containment condition. \end{lemma} \begin{lemma}[Convergence of nonlinear generators]\label{SF:lemma:proof-general-LDP:conv-to-H} Let~$H$ be the operator from Definition~\ref{SF:def:multi-valued-limit:general}. The nonlinear generators~$H_n$ from~\eqref{SF:eq:nonlinear-generator-slow-fast} satisfy~$H\subseteq\mathrm{ex}-\LIM H_n$ in the sense of Definition~\ref{SF:def:extended-LIM}. \end{lemma} \begin{lemma}[Comparison principle]\label{SF:lemma:proof-general-LDP:CP-for-H} Let~$H$ be operator from Definition~\ref{SF:def:multi-valued-limit:general}. Then for any $h \in C_b(E)$ and $\lambda > 0$, the comparison principle holds for $f - \lambda Hf = h$. \end{lemma} \begin{proof}[Proof of Theorem~\ref{SF:thm:LDP_general}] By virtue of the above three Lemma's, the conditions of the general large-deviation result from Theorem~\ref{SF:thm:Richard-abstract-LDP} above are satisfied. \end{proof} While the verification of exponential compact containment and convergence of nonlinear operators are standard, the proof of the comparison principle takes up the bulk of the argument. We prove Lemma's~\ref{SF:lemma:proof-general-LDP:exp-comp-cont} and~\ref{SF:lemma:proof-general-LDP:conv-to-H} here, and prove Lemma~\ref{SF:lemma:proof-general-LDP:CP-for-H} in Section~\ref{SF:sec:proof-of-CP:general} below. \begin{proof}[Proof of Lemma~\ref{SF:lemma:proof-general-LDP:conv-to-H}] We have to show that for all $(f,g) \in H$ there are functions $f_n \in \mathcal{D}(H_n)$ satisfying $\LIM f_n = f$ and $\LIM H_n f_n = g$, with the~$\LIM$ convergence from Definition~\ref{SF:def:LIM-convergence}. Recall the slow-fast generator~$A_n$, \begin{equation*} A_n f(y,z) = A^\mathrm{slow}_{n,z} f(\cdot,z) (y) + r_n \cdot A^\mathrm{fast}_{n,y} f(y,\cdot)(z), \end{equation*} and the nonlinear generators~$H_nf=(1/r_n)e^{-r_nf}A_ne^{r_nf}$, which amounts to \begin{equation*} H_n f(y,z) = \frac{1}{n}e^{-nf(y,z)}A^\mathrm{slow}_{n,z}\left( e^{nf(\cdot,z)}\right)(y) + r_n\cdot \frac{1}{n} e^{-nf(x,z)} \left(A^\mathrm{fast}_{n,y}e^{nf(x,\cdot)}\right)(z). \end{equation*} Now let~$(f,H_{f,\phi})\in H$ be arbitrary. Set~$f_n(y,z) := f(\eta_n(y)) + r_n^{-1} \phi(z)$. Then~$f_n\in\mathcal{D}(H_n)$. We are left with proving $\LIM f_n = f$ and $\LIM H_n f_n = H_{f,\phi}$. \smallskip Since both $f$ and $\phi$ are bounded, $\vn{f_n - f} = r_n^{-1}\vn{\phi} \rightarrow 0$, and $\LIM f_n = f$ follows. The images $H_n f_n$ are given by % \begin{align*} H_n f_n(y,z) = \frac{1}{r_n} e^{-r_nf(\eta_n(y))} A_{n,z}^\mathrm{slow} e^{r_nf(\eta_n(y))} + e^{-\phi(z)} \left(A^{\mathrm{fast}}_{\eta_n(y)} e^{\phi}\right)(z). \end{align*} The convergence assumptions on the slow generators and fast generators (Assumptions~\ref{SF:assumption:convergence-slow-nonlinear-generators} and~\ref{SF:assumption:convergence-fast-nonlinear-generators}) imply $\LIM H_nf_n=H_{f,\phi}$. \end{proof} \begin{proof}[Proof of Lemma~\ref{SF:lemma:proof-general-LDP:exp-comp-cont}] By~\ref{SF:item:assumption:slow_regularity:compact_containment} of Assumption~\ref{SF:assumption:regularity-V} on the slow Hamiltonians~$V$, there are a compact containment function~$\Upsilon$ and a constant~$c_\Upsilon>0$ satisfying \begin{equation*} \sup_{x,z} V_{x,\nabla \Upsilon(x)}(z) \leq c_\Upsilon. \end{equation*} Choose $\beta > 0$ such that $T\cdot c_\Upsilon + 1 - \beta \leq -a$. By continuity of~$\Upsilon$ is, there is a constant $c>0$ such that \begin{equation*} K \subseteq \left\{x \, \middle| \, \Upsilon(x) \leq c \right\} \end{equation*} Next, let $G := \left\{x \, \middle| \, \Upsilon(x) < c + \beta \right\}$, which is an open set. Let $\widehat{K}$ be the closure of~$G$. Then~$\widehat{K}$ is compact since~$\Upsilon$ is a compact containment function. \smallskip Let $f(x) := \iota \circ \Upsilon $, where $\iota$ is some smooth increasing function satisfying \begin{equation*} \iota(r) = \begin{cases} r & \text{if } r \leq \beta +c, \\ \beta+ c + 1 & \text{if } r \geq \beta + c + 2. \end{cases} \end{equation*} Then $\iota \circ \Upsilon = \Upsilon$ on $\widehat{K}$, and~$f$ is constant outside of a compact set. Set $f_n = f \circ \eta_n$, $g_n := H_n f_n$ and $g := \LIM g_n$. The function~$g$ exists due to Assumption~\ref{SF:assumption:convergence-slow-nonlinear-generators} on the slow generators. Then $g(x,z) = V_{x,\nabla \Upsilon(x)}(z)$ if $x \in \widehat{K}$. Therefore, we have $\sup_{x \in \widehat{K}, z \in F} g(x,z) \leq c_\Upsilon$. Let $\tau$ be the stopping time $\tau := \inf \left\{t \geq 0 \, \middle| \, Y_n(t) \notin \eta_n^{-1}(G) \right\}$ and let \begin{equation*} M_n(t) := \exp \left\{r_n \left( f_n(Y_n(t)) - f_n(Y_n(t)) - \int_0^t g_n(Y_n(t),Z_n(t)) \mathrm{d} s \right) \right\}. \end{equation*} By construction $M_n$ is a martingale. By the optional stopping theorem, $t \mapsto M_n(t \wedge \tau)$ is a martingale as well. We obtain \begin{align*} & \mathbb{P}_{y,z}\left[Y_n(t) \notin \widehat{K} \text{ for some } t \in [0,T]\right] \\ & \leq \mathbb{P}_{y,z}\left[Y_n(t) \notin \eta_n^{-1}(G) \times F \text{ for some } t \in [0,T]\right] \\ & = \mathbb{E}_{y,z}\left[\mathbbm{1}_{\{Y_n(t) \notin \eta_n^{-1}(G) \text{ for some } t \in [0,T]\}} M_n(t \wedge \tau) M_n(t\wedge \tau)^{-1} \right] \\ & \leq \exp\left\{- r_n \left(\inf_{y_1 \in G^c} \Upsilon(\eta_n(y_1)) - \Upsilon(\eta_n(y)) \right. \right. \\ & \hspace{4cm} \left. \left. - T \sup_{y_2 \in \eta_n^{-1}(G), z_2 \in F} g_n(y_2,z_2) \right) \right\} \\ & \hspace{2.5cm} \times \mathbb{E}_{y,z}\left[\mathbbm{1}_{\{Y_n(t) \notin \eta_n^{-1}(G) \text{ for some } t \in [0,T]\}} M_n(t \wedge \tau) \right] \end{align*} Since $\LIM f_n = f$ and $\LIM g_n = g$, the term in the exponential is bounded by $ r_n\left(c_\Upsilon T - \beta \right) \leq -r_n a$ for sufficiently large $n$. The final expectation is bounded by $1$ due to the martingale property of $M_n(t \wedge \tau)$. We conclude that \begin{align*} \limsup_n \sup_{y \in \eta_n^{-1}(K), z \in F} \frac{1}{r_n} \log \mathbb{P}_{y,z}\left[Y_n(t) \notin \eta^{-1}(\widehat{K}) \text{ for some } t \in [0,T]\right] \leq -a, \end{align*} which finishes the proof. \end{proof} \subsection{Proof of the comparison principle} \label{SF:sec:proof-of-CP:general} In this section, we prove Lemma~\ref{SF:lemma:proof-general-LDP:CP-for-H}; the comparison principle for the Hamilton-Jacobi equation $f - \lambda Hf = h$ for the multi-valued limit operator~$H$ from Definition~\ref{SF:def:multi-valued-limit:general} introduce above. We recall the definition of viscosity solutions and the comparison principle in the appendix. \smallskip A key role is played by the principal eigenvalue~$\mathcal{H}(x,p)$ from~\eqref{SF:eq:sec-assumption:H}, \begin{equation*} \mathcal{H}(x,p) = \sup_{\pi \in \mathcal{P}(F)} \left\{\int V_{x,p}(z) \, \pi( \mathrm{d} z) - \mathcal{I}(x,\pi) \right\},\quad (x,p)\in E\times\mathbb{R}^d, \end{equation*} where the maps~$V$ and~$\mathcal{I}$ satisfy Assumptions~\ref{SF:assumption:regularity-V} and~\ref{SF:assumption:regularity-I}. We associate the following differential operator~$\mathbf{H}$ to this Hamiltonian. \begin{definition}[Principal-eigenvalue Hamiltonian]\label{SF:def:principal-eigenvalue-Hamiltonian} The operator~$\mathbf{H}$ acting on the domain~$\mathcal{D}(\mathbf{H}) = C_{cc}^\infty(E)$ is given by $\mathbf{H} f(x) := \mathcal{H}(x, \nabla f(x))$.\qed \end{definition} The prove of Lemma~\ref{SF:lemma:proof-general-LDP:CP-for-H} hinges on being able to reduce the comparison principle of~$H$ to the comparison principle of~$\mathbf{H}$. To that end, we introduce four auxiliary operators and establish the diagram shown in Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP}. \begin{figure}[h!] \begin{center} \begin{tikzpicture} \matrix (m) [matrix of math nodes,row sep=1em,column sep=4em,minimum width=2em] { { } & H_1 &[7mm] H_\dagger &[5mm] { } \\ H & { } & { } & \mathbf{H} \\ { } & H_2 & H_\ddagger & { } \\}; \path[-stealth] (m-2-1) edge node [above] {sub} (m-1-2) (m-2-1) edge node [below] {super \qquad { }} (m-3-2) (m-1-2) edge node [above] {sub \qquad { }} (m-1-3) (m-3-2) edge node [below] {super \qquad { }} (m-3-3) (m-2-4) edge node [above] {\qquad sub} (m-1-3) (m-2-4) edge node [below] {\qquad super} (m-3-3); \begin{pgfonlayer}{background} \node at (m-2-3) [rectangle,draw=blue!50,fill=blue!20,rounded corners, minimum width=1cm, minimum height=2.5cm] {comparison}; \end{pgfonlayer} \end{tikzpicture} \end{center} \caption{An arrow connecting an operator $A$ with operator $B$ with subscript 'sub' means that viscosity subsolutions of $f - \lambda A f = h$ are also viscosity subsolutions of $f - \lambda B f = h$. Similarly for arrows with a subscript 'super'. The box around the operators $H_\dagger$ and $H_\ddagger$ indicates that the comparison principle holds for subsolutions of $f - \lambda H_\dagger f = h$ and supersolutions of $f - \lambda H_\ddagger f = h$.} \label{SF:fig:CP-diagram-in-proof-of-CP} \end{figure} \smallskip The theoretical treatment of the Hamitlon-Jacobi equation of~$\mathbf{H}$ is carried out in~\cite{KraaijSchlottke2019}. In there, the comparison principle for the Hamilton-Jacobi equation associated with~$\mathbf{H}$ is proven~\cite[Theorem~3.4]{KraaijSchlottke2019} under a generalization of Assumptions~\ref{SF:assumption:regularity-V} and~\ref{SF:assumption:regularity-I}. The proof establishes the top-right and bottom-right arrows connecting~$\mathbf{H}$ with the auxiliary operators~$H_\dagger,H_\ddagger$. Here, we make the connection the Hamilton-Jacobi equation with the limit operator~$H$ by establishing the remaining arrows in Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP}. \begin{proof}[Proof of Lemma~\ref{SF:lemma:proof-general-LDP:CP-for-H}] Fix~$h\in C_b(E)$ and~$\lambda>0$. Let~$u_1$ be a viscosity subsolution and~$u_2$ be a viscosity supersolution to~$(1-\lambda H)f=h$. By Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP}, the function~$u_1$ is a viscosity subsolution to~$(1-\lambda H_\dagger)f=h$ and~$u_2$ is a viscosity supersolution to~$(1-\lambda H_\ddagger)f=h$. Hence by~\cite[Theorem~3.4]{KraaijSchlottke2019},~$u_1\leq u_2$, which finishes the proof. \end{proof} The rest of this section is devoted to proving Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP}. \paragraph{Definition of auxiliary operators.} We introduce the auxiliary operators $H_\dagger,H_\ddagger$ and $H_1,H_2$ appearing in Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP}. The new Hamiltonians serve as natural upper and lower bounds for~$\mathbf{H}$ and~$H$, respectively. These new Hamiltonians are defined in terms of the containment function~$\Upsilon$ from Assumption~\ref{SF:assumption:regularity-V}, which allows us to restrict the analysis to compact sets. The definitions use the constant $C_\Upsilon := \sup_{x,z} V_{x,\nabla \Upsilon(x)}(z)$. Denote by~$C_l^\infty(E)$ the set of smooth functions on~$E$ that have a lower bound and by~$C_u^\infty(E)$ the set of smooth functions on~$E$ that have an upper bound. \begin{definition}[$H_\dagger$ and~$H_\ddagger$] For $f \in C_l^\infty(E)$ and $\varepsilon \in (0,1)$, set \begin{equation*} f^\varepsilon_\dagger := (1-\varepsilon) f + \varepsilon \Upsilon \quad\text{and}\quad H_{\dagger,f}^\varepsilon(x) := (1-\varepsilon) \mathbf{H} f(x) + \varepsilon C_\Upsilon. \end{equation*} Then~$H_\dagger$ is the the graph defined by \begin{equation*} H_\dagger := \left\{(f^\varepsilon_\dagger,H_{\dagger,f}^\varepsilon) \, \middle| \, f \in C_l^\infty(E), \varepsilon \in (0,1) \right\}. \end{equation*} For $f \in C_u^\infty(E)$ and $\varepsilon \in (0,1)$, set \begin{equation*} f^\varepsilon_\ddagger := (1+\varepsilon) f - \varepsilon \Upsilon \quad\text{and}\quad H_{\ddagger,f}^\varepsilon(x) := (1+\varepsilon) \mathbf{H} f(x) - \varepsilon C_\Upsilon. \end{equation*} Then~$H_\ddagger$ is the graph defined by \begin{align*} H_\ddagger := \left\{(f^\varepsilon_\ddagger,H_{\ddagger,f}^\varepsilon) \, \middle| \, f \in C_u^\infty(E), \varepsilon \in (0,1) \right\}. \tag*\qed \end{align*} \end{definition} \begin{definition}[$H_1$ and~$H_2$] For $f \in C_l^\infty(E)$ , $\varepsilon \in (0,1)$ and $\phi$ such that $e^\phi \in \mathcal{D}(A^\mathrm{fast})$, set \begin{gather*} f^\varepsilon_1 := (1-\varepsilon) f + \varepsilon \Upsilon, \\ H^\varepsilon_{1,f,\phi}(x,z) := (1-\varepsilon) \left( V_{x,\nabla f(x)}(z) + e^{-\phi(z)} A^\mathrm{fast}_x e^{\phi}(z)\right) + \varepsilon C_\Upsilon. \end{gather*} Then~$H_1$ is the graph defined by \begin{equation*} H_1 := \left\{(f^\varepsilon_1,H^\varepsilon_{1,f,\phi}) \, \middle| \, f \in C_l^\infty(E), \varepsilon \in (0,1), \phi: \, e^\phi \in \mathcal{D}(A^\mathrm{fast}) \right\}. \end{equation*} For $f \in C_u^\infty(E)$, $\varepsilon \in (0,1)$ and $\phi$ such that $e^\phi \in \mathcal{D}(A^\mathrm{fast})$, set \begin{gather*} f^\varepsilon_2 := (1+\varepsilon) f - \varepsilon \Upsilon, \\ H^\varepsilon_{2,f,\phi}(x,z) := (1+\varepsilon) \left( V_{x,\nabla f(x)}(z) + e^{-\phi(z)} A^\mathrm{fast}_x e^{\phi}(z) \right) - \varepsilon C_\Upsilon. \end{gather*} Then~$H_2$ is the graph defined by \begin{align*} H_2 := \left\{(f^\varepsilon_2,H^\varepsilon_{2,f,\phi}) \, \middle| \, f \in C_u^\infty(E), \varepsilon \in (0,1), \phi: \, e^\phi \in \mathcal{D}(A^\mathrm{fast}) \right\}. \tag*\qed \end{align*} \end{definition} \paragraph{Arrows based on the solution of an eigenvalue problem.} \begin{lemma}\label{SF:lemma:viscosity_solutions_arrows_based_on_eigenvalue} Fix $\lambda > 0$ and $h \in C_b(E)$. \begin{enumerate}[(a)] \item Every subsolution to $f - \lambda H_1 f = h$ is also a subsolution to $f - \lambda H_\dagger f = h$. \item Every supersolution to $f - \lambda H_2 f = h$ is also a supersolution to $f - \lambda H_\ddagger f = h$. \end{enumerate} \end{lemma} For the proof of this lemma, we need an auxiliary lemma. \begin{lemma} \label{SF:lemma:strong_viscosity_solutions} Fix $\lambda > 0$ and $h \in C_b(E)$. \begin{enumerate}[(a)] \item Let $u$ be a subsolution to $f - \lambda H_1 f = h$, then for all $(f,g) \in H_1$ and $x_0 \in E$ such that \begin{equation*} u_1(x_0) - f(x_0) = \sup_x u_1(x) - f(x) \end{equation*} we have \begin{equation*} u_1(x_0) - \lambda g(x_0,z) \leq h(x_0). \end{equation*} \item Let $u_2$ be a supersolution to $f - \lambda H_2 f = h$, then for all $(f,g) \in H_2$ and $x_0 \in E$ such that \begin{equation*} u_2(x_0) - f(x_0) = \inf_x u_2(x) - f(x) \end{equation*} we have \begin{equation*} u_2(x_0) - \lambda g(x_0,z) \geq h(x_0). \end{equation*} \end{enumerate} \end{lemma} The following proof is inspired on \cite[Lemma 9.9]{FengKurtz2006}. \begin{proof}[Proof of Lemma~\ref{SF:lemma:strong_viscosity_solutions}] We only prove (a). Let $u$ be a viscosity subsolution to $f - \lambda H_1 f = h$ and consider $(f,g) \in H_1$. By definition $f$ has compact sublevel-sets. Thus, instead of working with a sequence $x_n$ along which a maximum is attained, we can work with a single point $x_0$. This gives us the existence of a point $(x_0,z) \in E \times F$ satisfying \begin{gather*} u(x_0) - f(x_0) = \sup_x u_1(x) - f(x), \\ u(x_0) - \lambda g(x_0,z) \leq h(x_0), \end{gather*} rather than having the second inequality for all $x_0$ satisfying $u(x_0) - f(x_0) = \sup_x u(x) - f(x)$. Now let $x_0$ be such that $u(x_0) - f(x_0) = \sup_x u(x) - f(x)$. Pick a function $\hat{f} \in C_{cc}^\infty(E)$ satisfying $\hat{f}(x_0) = 0$ and $\hat{f}(x) > 0$ for $x \neq x_0$. Define the function $f_0 = f+ \hat{f}$, and let $g_0$ be the corresponding image, $(f_0,g_0) \in H_1$. Since $\nabla f_0(x_0) = \nabla f(x_0)$ and $g(x_0,z)$ and $g_0(x_0,z)$ only depend on $f$ and $f_0$ via their derivatives at $x_0$, we obtain $g_0(x_0,z) = g(x_0,z)$. By construction $x_0$ is the unique point satisfying $u(x_0) - f_0(x_0) = \sup_x u(x) - f_0(x)$. By the sub-solution property, we find \begin{equation*} u(x_0) - \lambda g(x_0,z) = u(x_0) - \lambda g_0(x_0,z) \leq h_0(x_0), \end{equation*} establishing the claim. \end{proof} \begin{proof}[Proof of Lemma~\ref{SF:lemma:viscosity_solutions_arrows_based_on_eigenvalue}] We only prove the subsolution statement. To that end, fix $\lambda > 0$ and $h \in C_b(E)$, and let $u$ be a subsolution of $f - \lambda H_1 f = h$. We prove it is also a subsolution of $f - \lambda H_\dagger f = h$. Let $f^\varepsilon_1 \in \mathcal{D}(H_1)$ and let $x_0$ be such that \begin{equation*} u(x_0) - f^\varepsilon_1(x_0) = \sup_x u(x) - f_1^\varepsilon(x). \end{equation*} For each $\delta > 0$ we find by Assumption~\ref{SF:assumption:principal-eigenvalue-problem} a function $e^{\phi_\delta} \in \mathcal{D}(A^\mathrm{fast})$ such that \begin{equation*} \mathcal{H}(x,p) \geq V_{x_0,\nabla f(x_0)}(z) - e^{-\phi_\delta(z)}\left(A_{x_0}^\mathrm{fast} e^{\phi_\delta}\right)(z) - \delta \end{equation*} for all $z \in F$. Since \begin{equation*} \left(f^\varepsilon_1, (1-\varepsilon) \left( V_{x,\nabla f(x)}(z) + e^{-\phi(z)} A^\mathrm{fast}_x e^{\phi(z)}\right) + \varepsilon C_\Upsilon \right) \in H_1, \end{equation*} we find by the subsolution property of $u$ and Lemma~\ref{SF:lemma:strong_viscosity_solutions} that for all $z$ \begin{align*} h(x_0) & \geq u(x_0) - \lambda \left((1-\varepsilon) \left( V_{x_0,\nabla f(x_0)}(z) + e^{-\phi(z)} A^\mathrm{fast}_{x_0} e^{\phi(z)}\right) + \varepsilon C_\Upsilon\right) \\ & \geq u(x_0) - \lambda \left((1-\varepsilon) \mathcal{H}(x_0,\nabla f(x_0)) + \varepsilon C_\Upsilon\right) - \lambda(1-\varepsilon)\delta. \end{align*} Sending $\delta \rightarrow 0$ establishes that $u$ is a subsolution for $f - \lambda H_\dagger f = h$. \end{proof} \paragraph{Arrows based on compact containment.} \begin{lemma} \label{SF:lemma:viscosity_solutions_compactify1} Fix $\lambda > 0$ and $h \in C_b(E)$. \begin{enumerate}[(a)] \item Every subsolution to $f - \lambda H f = h$ is also a subsolution to $f - \lambda H_1 f = h$. \item Every supersolution to $f - \lambda H f = h$ is also a supersolution to $f - \lambda H_2 f = h$. \end{enumerate} \end{lemma} \begin{lemma} \label{SF:lemma:viscosity_solutions_compactify2} Fix $\lambda > 0$ and $h \in C_b(E)$. \begin{enumerate}[(a)] \item Every subsolution to $f - \lambda \mathbf{H} f = h$ is also a subsolution to $f - \lambda H_\dagger f = h$. \item Every supersolution to $f - \lambda \mathbf{H} f = h$ is also a supersolution to $f - \lambda H_\ddagger f = h$. \end{enumerate} \end{lemma} Lemma~\ref{SF:lemma:viscosity_solutions_compactify2} has been proven in~\cite[Lemma~6.3]{KraaijSchlottke2019}. \begin{proof}[Proof of Lemma~\ref{SF:lemma:viscosity_solutions_compactify1}] The proof is similar to the proof of~\cite[Lemma~6.3~(a)]{KraaijSchlottke2019}. We only prove~(a). \smallskip Fix $\lambda > 0$ and $h \in C_b(E)$. Let $u$ be a subsolution to $f - \lambda H f = h$. We prove it is also a subsolution to $f - \lambda H_1 f = h$. Fix $\varepsilon \in (0,1)$, $\phi$ such that $e^\phi \in \mathcal{D}(A^\mathrm{fast})$, and $f \in C_{l}^\infty(E)$, so that $(f^\varepsilon_1,H^\varepsilon_{1,f,\phi}) \in H_1$. We will prove that there are $(x_n,z_n)$ such that \begin{gather} \lim_n u(x_n) - f^\varepsilon_1(x_n) = \sup_x u(x) - f^\varepsilon_1(x),\label{SF:eqn:proof_lemma_conditions_for_subsolution_first} \\ \limsup_n u(x_n) - \lambda H^\varepsilon_{1,f,\phi}(x_n,z_n) - h(x_n) \leq 0. \label{SF:eqn:proof_lemma_conditions_for_subsolution_second} \end{gather} As $u -(1-\varepsilon)f$ is bounded from above and $\varepsilon \Upsilon$ has compact sublevel-sets, the sequence $x_n$ along which the first limit is attained can be assumed to lie in the compact set $K := \left\{x \, | \, \Upsilon(x) \leq \inf_x \varepsilon^{-1} \left(u(x) - (1-\varepsilon)f(x) \right)\right\}$. We use the constant~$M := \inf_x \varepsilon^{-1} \left(u(x) - (1-\varepsilon)f(x) \right)$. Let $\gamma : \mathbb{R} \rightarrow \mathbb{R}$ be a smooth increasing function such that \begin{equation*} \gamma(r) = \begin{cases} r & \text{if } r \leq M, \\ M + 1 & \text{if } r \geq M+2. \end{cases} \end{equation*} Denote by $f_\varepsilon$ the function on $E$ defined by \begin{equation*} f_\varepsilon(x) := \gamma\left((1-\varepsilon)f(x) + \varepsilon \Upsilon(x) \right). \end{equation*} By construction $f_\varepsilon$ is smooth and constant outside of a compact set and thus lies in $\mathcal{D}(H) = C_{cc}^\infty(E)$. As $e^\phi \in \mathcal{D}(A^\mathrm{fast})$ we have by Assumption~\ref{SF:assumption:principal-eigenvalue-problem} that also $e^{(1-\varepsilon)\phi} \in \mathcal{D}(A^\mathrm{fast})$. We conclude that $(f_\varepsilon, H_{f,(1-\varepsilon)\phi}) \in H$. As $u$ is a viscosity subsolution for $f - \lambda Hf = h$ there exist $x_n \in K \subseteq E$ (by our choice of $K$) and $z_n \in F$ with \begin{gather} \lim_n u(x_n) - f_\varepsilon(x_n) = \sup_x u(x) - f_\varepsilon(x), \label{SF:eqn:visc_subsol_sup} \\ \limsup_n u(x_n) - \lambda H_{f,(1-\varepsilon)\phi}(x_n,z_n) - h(x_n) \leq 0. \label{SF:eqn:visc_subsol_upperbound} \end{gather} As $f_\varepsilon$ equals $f$ on $K$, we have from \eqref{SF:eqn:visc_subsol_sup} that also \begin{equation*} \lim_n u(x_n) - f(x_n) = \sup_x u(x) - f(x), \end{equation*} establishing \eqref{SF:eqn:proof_lemma_conditions_for_subsolution_first}. Convexity of $p \mapsto V_{x,p}$ and $\psi \mapsto e^{-\psi(z)}\left(A_x^\mathrm{fast} e^\psi\right)(z)$ yields for arbitrary $(x,z)$ the elementary estimate \begin{align*} H_{f,(1-\varepsilon)\phi}(x,z) = & V_{x,\nabla f_\varepsilon}(z) + e^{-(1-\varepsilon)\phi(z)} \left(A^\mathrm{fast}_x e^{(1-\varepsilon)\phi}\right)(z) \\ & \leq (1-\varepsilon) V_{x,\nabla f(x)}(z) + \varepsilon V_{x,\nabla \Upsilon(x)} + (1-\varepsilon)e^{-\phi(z)} \left(A^\mathrm{fast}_x e^{\phi}\right)(z) \\ & = H^\varepsilon_{1,f,\phi}(x,z). \end{align*} Combining this inequality with \eqref{SF:eqn:visc_subsol_upperbound} yields \begin{multline*} \limsup_n u(x_n) - \lambda H^\varepsilon_{1,f,\phi}(x,z) - h(x_n) \\ \leq \limsup_n u(x_n) - \lambda H_{f,(1-\varepsilon)\phi}(x_n,z_n) - h(x_n) \leq 0, \end{multline*} establishing \eqref{SF:eqn:proof_lemma_conditions_for_subsolution_second}. This concludes the proof. \end{proof} \section{Proof of action-integral representation}\label{SF:sec:proof-action-integral-form-RF} \subsection{Structure of proof} In this section, we outline the structure of proof of Theorem~\ref{SF:thm:rate-function}. To that end, recall the Hamiltonian~$\mathcal{H}:E\times\mathbb{R}^d\to\mathbb{R}$ from~\eqref{SF:eq:variational_Hamiltonian}, \begin{equation*} \mathcal{H}(x,p) = \sup_{\nu \in \mathcal{P}(F)} \left\{\int V_{x,p}(z) \, \nu( \mathrm{d} z) - \mathcal{I}(x,\nu) \right\}, \end{equation*} and the Lagrangian~$\mathcal{L}(x,v)$ defined as the Legendre dual, \begin{equation}\label{SF:prof-RF:Lagrangian} \mathcal{L}(x,v)=\sup_{p\in\mathbb{R}^d}\left[\ip{p}{v}-\mathcal{H}(x,p)\right]. \end{equation} Theorem~\ref{SF:thm:rate-function} consists of two claims: \begin{enumerate}[label=(\Roman*)] \item \label{SF:item:proof-action:I} The rate function~$J$ obtained in Theorem~\ref{SF:thm:LDP_general} satisfies the action-integral representation~\eqref{SF:eq:action-integral-rate-function} with the Lagrangian~\eqref{SF:prof-RF:Lagrangian}. \item \label{SF:item:proof-action:Lagr} The Lagrangian satisfies the formula~\eqref{SF:eq:results-Lagr-opt-proc}. \end{enumerate} We prove the statement~\ref{SF:item:proof-action:Lagr} in Section~\ref{SF:sec:proof-alternative-form-of-L}. To outline the proof of~\ref{SF:item:proof-action:I}, recall that the rate function~$J$ obtained in Theorem~\ref{SF:thm:LDP_general} given by~\eqref{SF:eq:Richard-general-LDP-thm-rate-function} is characterized in terms of a semigroup~$V(t)$, as \begin{equation*} J(\gamma) = J_0(\gamma(0)) + \sup_{k \geq 1} \sup_{\{t_i\}} \sum_{i=1}^{k} J_{t_i - t_{i-1}}(\gamma(t_i) \, | \, \gamma(t_{i-1})), \end{equation*} where the conditional rate functions~$J_t$ are defined by \begin{equation*} J_t(y \, | \, x) = \sup_{f \in C_b(E)} \left\{f(y) - V(t)f(x) \right\}. \end{equation*} We describe the semigroup~$V(t):C_b(E)\to C_b(E)$ further below. Our proof is based on the following definitions. First, we define the variational semigroup~$\mathbf{V}(t)$ arising from an optimal control problem with cost function~$\mathcal{L}$. \begin{definition}[Variational semigroup~$\mathbf{V}(t)$] For~$f\in C_b(E)$ and~$t\geq 0$, define \begin{align*} \mathbf{V}(t) f(x) := \sup_{\substack{\gamma \in \mathcal{A}\mathcal{C}\\ \gamma(0) = x}} h(\gamma(t)) - \int_0^t \mathcal{L}(\gamma(s),\dot{\gamma}(s)), \end{align*} where the supremum is over absolutely continuous maps~$\gamma:[0,\infty)\to E$.\qed \end{definition} Secondly, we will exploit the fact that the semigroups~$V(t)$ and~$\mathbf{V}(t)$ are determined by means of the existence of unique viscosity solutions to the equations~$(1-\lambda H)f=h$ and~$(1-\lambda\mathbf{H})f=h$, respectively. To do so, we introduce the following resolvents. \begin{definition}[Resolvent~$R(\lambda)$] Let~$H$ be the multi-valued operator from Definition~\ref{SF:def:multi-valued-limit:general},~$\lambda>0$ and~$h\in C_b(E)$. Define~$R(\lambda):C_b(E)\to C_b(E)$ by setting~$R(\lambda)h := u$, the unique viscosity solution to~$(1-\lambda H)u=h$.\qed \end{definition} \begin{definition}[Resolvent~$\mathbf{R}(\lambda)$] For~$\lambda>0$ and~$h\in C_b(E)$, define the resolvent~$\mathbf{R}(\lambda)h:E\to\mathbb{R}$ by \begin{equation} \mathbf{R}(\lambda) h(x):= \sup_{\substack{\gamma \in \mathcal{A}\mathcal{C}\\ \gamma(0) = x}} \int_0^\infty \lambda^{-1} e^{-\lambda^{-1}t} \left[h(\gamma(t)) - \int_0^t \mathcal{L}(\gamma(s),\dot{\gamma}(s))\right] \, \mathrm{d} t, \end{equation} where the supremum is over absolutely-continuous maps~$\gamma:[0,\infty)\to E$.\qed \end{definition} The semigroup~$V(t)$ is determined via~$R$ as (e.g.\cite[Prop.~6.6]{Kraaij2019ExpResolv}) \begin{equation*} V(t)f(x) = \lim_{m\to\infty}\left[R\left(t/m\right)\right]^{m}f. \end{equation*} The statement~\ref{SF:item:proof-action:I} is a direct consequence of the following Lemmas. \begin{lemma}\label{SF:lemma:R-equals-mathbf-R} Let Assumptions~\ref{SF:assumption:regularity-V},~\ref{SF:assumption:regularity-I} and~\ref{SF:assumption:Hamiltonian_vector_field} be satisfied. Then for all~$\lambda>0$, we have~$R(\lambda)=\mathbf{R}(\lambda)$. \end{lemma} \begin{lemma}\label{SF:lemma:V-equals-mathbf-V} Let Assumptions~\ref{SF:assumption:regularity-V},~\ref{SF:assumption:regularity-I} and~\ref{SF:assumption:Hamiltonian_vector_field} be satisfied. If~$R(\lambda)=\mathbf{R}(\lambda)$ for all~$\lambda>0$, then~$V(t)=\mathbf{V}(t)$. \end{lemma} \begin{lemma}\label{SF:lemma:equal-semigroup-implies-RF} If~$V(t)=\mathbf{V}(t)$, then~\ref{SF:item:proof-action:I} holds true. \end{lemma} Lemma~\ref{SF:lemma:equal-semigroup-implies-RF} can be proven as shown in~\cite[Theorem~8.14]{FengKurtz2006}, using convexity of~$v\mapsto \mathcal{L}(x,v)$. We show Lemmas~\ref{SF:lemma:R-equals-mathbf-R} and~\ref{SF:lemma:V-equals-mathbf-V} in Section~\ref{SF:thm:proof-of-RF-action}. \subsection{Proof of Theorem~\ref{SF:thm:rate-function}} \label{SF:thm:proof-of-RF-action} For the proof of Lemma~\ref{SF:lemma:R-equals-mathbf-R}, we argue with the diagram in~Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP} that we established in the proof of the comparison principle. We recall it here below. \begin{figure}[h!] \begin{center} \begin{tikzpicture} \matrix (m) [matrix of math nodes,row sep=1em,column sep=4em,minimum width=2em] { { } & H_1 &[7mm] H_\dagger &[5mm] { } \\ H & { } & { } & \mathbf{H} \\ { } & H_2 & H_\ddagger & { } \\}; \path[-stealth] (m-2-1) edge node [above] {sub} (m-1-2) (m-2-1) edge node [below] {super \qquad { }} (m-3-2) (m-1-2) edge node [above] {sub \qquad { }} (m-1-3) (m-3-2) edge node [below] {super \qquad { }} (m-3-3) (m-2-4) edge node [above] {\qquad sub} (m-1-3) (m-2-4) edge node [below] {\qquad super} (m-3-3); \begin{pgfonlayer}{background} \node at (m-2-3) [rectangle,draw=blue!50,fill=blue!20,rounded corners, minimum width=1cm, minimum height=2.5cm] {comparison}; \end{pgfonlayer} \end{tikzpicture} \end{center} \end{figure} \smallskip \begin{proof}[Proof of Lemma~\ref{SF:lemma:R-equals-mathbf-R}] Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP} shows that if~$u$ is a viscosity solution to~$(1-\tau H)f=h$ and~$v$ is a viscosity solution to~$(1-\tau\mathbf{H})f=h$, then~$u=v$. \smallskip Let~$\lambda>0$ and~$h\in C_b(E)$. Then by definition,~$R(\lambda)h$ is the viscosity solution to~$(1-\lambda H)f=h$. We prove that the function~$\mathbf{R}(\lambda)h$ is the viscosity solution to~$(1-\lambda\mathbf{H})f=h$. Then by virtue of Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP}, we obtain~$R(\lambda)h=\mathbf{R}(\lambda)h$. Since~$\lambda$ and~$h$ are arbitrary, this establishes Lemma~\ref{SF:lemma:R-equals-mathbf-R}. \smallskip The fact that~$\mathbf{R}(\lambda)h$ is a viscosity solution is established in~\cite[Theorem~3.7]{KraaijSchlottke2019}, under Assumptions~3.12,~3.13 and~3.16 therein. Here, our Assumption~\ref{SF:assumption:regularity-V} corresponds exactly to \cite[Assumption~3.12]{KraaijSchlottke2019}, and our Assumption~\ref{SF:assumption:regularity-I} to~\cite[Assumption~3.13]{KraaijSchlottke2019}. We are left with showing that~\cite[Assumption 3.16]{KraaijSchlottke2019}, follows from our Assumption~\ref{SF:assumption:Hamiltonian_vector_field}. \smallskip To that end, for a convex function $\Phi$ $\Phi : \mathbb{R}^d \rightarrow (-\infty,\infty]$, define the subdifferential set by \begin{equation*} \partial_p \Phi(p_0) := \left\{ \xi \in \mathbb{R}^d \,:\, \Phi(p) \geq \Phi(p_0) + \xi \cdot (p-p_0) \quad (\forall p \in \mathbb{R}^d) \right\}. \end{equation*} Fix $x \in E$ and $p_0 \in \mathbb{R}^d$. We aim to prove that $\partial_p \mathcal{H}(x,p_0) \subseteq T_E(x)$. Since the map $p \mapsto \mathcal{H}(x,p)$ is proper and convex as a supremum over convex functions, the subdifferential $\partial_p \mathcal{H}(x,p_0)$ is non-empty. \smallskip Let $\Omega$ be the set that of measures~$\pi$ that optimize \begin{equation} \label{SF:eqn:Hamiltonian_in_subdifferential_proof} \mathcal{H}(x,p_0) = \sup_\pi \left\{\int V_{x,p_0}(z) \pi( \mathrm{d} z) - \mathcal{I}(x,\pi) \right\} \end{equation} We first aim to relate $\partial_p \mathcal{H}(x,p_0)$ to $\bigcup_{\pi^* \in \Omega}\partial_p \int V_{x,p_0}(z) \pi^*( \mathrm{d} z)$. Afterwards, we show that for all $\pi$ we have $\partial_p \int V_{x,p_0}(z) \pi( \mathrm{d} z) \subseteq T_E(x)$. \smallskip For each fixed $p$ we can restrict our supremum in~\eqref{SF:eqn:Hamiltonian_in_subdifferential_proof} to the compact set of measures $\pi$ such that $\mathcal{I}(x,\pi) \leq 2\vn{V_{x,p}(\cdot)}$. For various $p$, this set might change and we might end up with a non-compact set. However, to study the subdifferential at $p_0$ we can instead at the map $p \mapsto \mathcal{H}(x,p)$ with its domain restricted to $[p_0-1,p_0 + 1]$ which leaves the subdifferential set unchanged. \smallskip Set $C_V := \sup_{p \in [p_0-1,p_0+1]} \sup_z \vn{v_{\cdot,p}(z)}_\infty < \infty$, and let~$\Xi$ to be the closure of \begin{equation} \{\pi \in \mathcal{P}(F) \, \| \, \mathcal{I}(x,\pi) \leq 2C_V\}. \end{equation} By Assumption~\ref{SF:assumption:regularity-I}, the set $\Xi$ is compact. Therefore, for all $p \in [p_0-1,p_0+1]$, we can restrict the supremum in~\eqref{SF:eqn:Hamiltonian_in_subdifferential_proof} to the compact set $\Xi$. \smallskip Using the definition of $\Omega$ as the set of optimizers and that $\mathcal{I}$ is lower semicontinuous by Assumption~\ref{SF:assumption:regularity-I}, it follows by \cite[Theorem 4.4.2]{HiriartLemarechal2012} that \begin{equation*} \partial_p \mathcal{H}(x,p_0) = ch \left(\bigcup_{\pi^* \in \Omega} \partial_p \left(\int V_{x,p_0}(z) \pi^*( \mathrm{d} z) - \mathcal{I}(x,\pi^*) \right)\right). \end{equation*} Here $ch$ denotes the convex hull. Since $\mathcal{I}(x,\pi^*)$ does not depend on $p$, \begin{equation*} \partial_p \mathcal{H}(x,p_0) = ch \left(\bigcup_{\pi^* \in \Omega} \partial_p \left(\int V_{x,p_0}(z) \pi^*( \mathrm{d} z)\right)\right). \end{equation*} Since $\partial_p V_{x,p}(z) \subseteq T_E(x)$ for all $p$ and $z$, we find by~\cite[Theorem 3]{Papageorgiou1997} applied with $\varepsilon = 0$ that $\partial_p \mathcal{H}(x,p_0) \subseteq T_E(x)$. This establishes~\cite[Assumption 3.16]{KraaijSchlottke2019}. \end{proof} \begin{proof}[Proof of Lemma~\ref{SF:lemma:V-equals-mathbf-V}] By~\cite[Theorem 7.10]{Kraaij2019ExpResolv} and \cite[Theorem 6.1]{Kraaij2019GenConv}, there is some sequentially strictly dense set $D \subseteq C_b(E)$ such that for $f \in D$ \begin{equation} \label{SF:eqn:convergence_R_to_V} \lim_{m \rightarrow \infty} \vn{R\left(\frac{t}{m}\right)^m f - V(t)f} = 0. \end{equation} Similarly, we find by \cite[Lemma 8.18]{FengKurtz2006} that for all $f \in C_b(E)$ and $x \in E$ \begin{equation} \label{SF:eqn:convergence_bfR_to_bfV} \lim_{m \rightarrow \infty} \mathbf{R}\left(\frac{t}{m}\right)^m f(x) = \mathbf{V}(t)f(x). \end{equation} Combining~\eqref{SF:eqn:convergence_R_to_V} and~\eqref{SF:eqn:convergence_bfR_to_bfV} we conclude that $V(t)f = \mathbf{V}(t)f$ for all $t$ and $f \in D$. Since Figure~\ref{SF:fig:CP-diagram-in-proof-of-CP} implies $R(\lambda)h$ = $\mathbf{R}(\lambda)h$ for $h \in C_b(E)$, we conclude from~\eqref{SF:eqn:convergence_R_to_V} and~\eqref{SF:eqn:convergence_bfR_to_bfV} that $V(t)f = \mathbf{V}(t)f$ for all $t$ and $f \in D$. \smallskip Since $D$ is sequentially strictly dense by assumption, the equality for all $f \in C_b(E)$ follows if $V(t)$ and $\mathbf{V}(t)$ are sequentially continuous. The semigroup~$V(t)$ is seequentially continuous by~\cite[Theorem 7.10]{Kraaij2019ExpResolv} and \cite[Theorem~6.1]{Kraaij2019GenConv}, and~$\mathbf{V}(t)$ is sequentially continuous by~\cite[Lemma 8.22]{FengKurtz2006}. We conclude that $V(t)f = \mathbf{V}(t)f$ for all $f \in C_b(E)$ and $t \geq 0$. \end{proof} \subsection{Proof of alternative form of Lagrangian} \label{SF:sec:proof-alternative-form-of-L} We prove that the Lagrangian~$\mathcal{L}(x,v)$ defined in~\eqref{SF:prof-RF:Lagrangian} as the Legendre dual of~$\mathcal{H}(x,p)$ satisfies~\eqref{SF:eq:results-Lagr-opt-proc}. Recall that the Hamiltonian is \begin{equation*} \mathcal{H}(x,p)=\sup_{\pi\in\mathcal{P}(F)}\left[\int_F V_{x,p}(z)-\mathcal{I}(x,\pi)\right]. \end{equation*} For the proof, we write for~$\pi\in\mathcal{P}(F)$ \begin{equation*} \mathcal{H}_\pi(x,p) := \int_F V_{x,p}(z) \pi( \mathrm{d} z)\quad\text{and}\quad \mathcal{L}_\pi(x,v) := \sup_p \ip{p}{v} - \int_F V_{x,p}(z) \pi( \mathrm{d} z). \end{equation*} Furtheremore, let $\Phi(v,\pi)$ be the set of measurable functions $w \in L^1(F;\mathbb{R}^d,\pi)$ such that \begin{equation*} \int w(z) \pi( \mathrm{d} z) = v. \end{equation*} \begin{proposition}\label{SF:proposition:representation_of_Lagrangian} Suppose that Assumptions~\ref{SF:assumption:regularity-V} and~\ref{SF:assumption:regularity-I} are satisfied. Then \begin{equation*} \mathcal{L}(x,v) = \inf_\pi \inf_{w \in \Phi(v,\pi)} \left\{\int \mathcal{L}_z(x,w(z)) \pi( \mathrm{d} z) + \mathcal{I}(x,\pi) \right\}. \end{equation*} \end{proposition} This rewrite is a consequence of results in convex analysis and follows under much weaker assumptions, namely convexity of $\pi \mapsto \mathcal{I}(x,\pi)$ and $p \mapsto V_{x,p}(z)$, which is satisfied in our setting. The proof below only uses results from convex analysis in~\cite{Papageorgiou1997,HiriartLemarechal2012,Rockafellar1970}. These results have been stated for~$\mathbb{R}^d$, which is also the setting to which we restrict ourselves in this chapter. We believe, however, that the result should extend to a more general setting, but we were unable to find their generalizations in the literature on convex analysis. \begin{lemma} \label{SF:lemma:constant_momentum} Fix~$\pi\in\mathcal{P}(F)$ and suppose that $v \in \text{rel. int. dom } \mathcal{L}_\pi(x,\cdot)$. Then: \begin{enumerate}[(a)] \item There is a $p^* \in \mathbb{R}^d$ such that $v \in \partial_p \mathcal{H}_\pi(x,p^*)$, \item There is a $w^* \in \Phi(v,\pi)$ such that $w^*(z) \in \partial_p V_{x,p^*}(z)$ $\pi$ almost surely. \item \label{SF:item:equality_of_Lagrangians_in_relint} We have \begin{multline*} \sup_{p} \ip{p}{v} - \int V_{x,p}(z) \pi( \mathrm{d} z) \\ = \inf_{\substack{w(z) \\ \int w \mathrm{d} \pi = v}} \sup_{p(z)} \int \ip{p(z)}{w(z)} - V_{x,p(z)}(z) \pi( \mathrm{d} z). \end{multline*} \end{enumerate} \end{lemma} For the proof of this lemma, we use the notion of the relative interior of a convex set. If $A \subseteq \mathbb{R}^d$ is a convex set, then $\text{rel. int. } A$ is the interior of $A$ inside the smallest affine hyperplane in $\mathbb{R}^d$ that contains $A$. For a convex functional $\Phi : E \rightarrow (-\infty,\infty]$ the domain of $\Phi$, denoted by $\text{dom } \Phi$, is the set of points $x \in E$ where $\Phi(x) < \infty$. \begin{proof}[Proof of Lemma~\ref{SF:lemma:constant_momentum}] The Legendre transform of $\mathcal{H}_\pi$ equals $\mathcal{L}_\pi$. Since we have $v \in \text{rel. int. dom } \mathcal{L}_\pi(x,\cdot)$, we have by~\cite[Theorem 23.4]{Rockafellar1970} or~\cite[Theorem E.1.4.2]{HiriartLemarechal2012} that $\partial_v \mathcal{L}_\pi(x,v)$ is non-empty. Let $p^* \in \partial_v \mathcal{L}_\pi(x,v)$. Then by~\cite[Theorem 23.5]{Rockafellar1970} or~\cite[Proposition E.1.4.3]{HiriartLemarechal2012}, we obtain that $v \in \partial_p H_\pi(x,p^*)$. \smallskip By~\cite[Theorem~3]{Papageorgiou1997} applied for $\varepsilon = 0$, we find a $\pi$-integrable function~$w^*$ such that $\int w^*(z) \pi( \mathrm{d} z) = v$ and $w(z) \in \partial_p V_{x,p^*}(z)$ $\pi$ almost surely. We proceed with the proof of \ref{SF:item:equality_of_Lagrangians_in_relint}. To that end, note that \begin{multline*} \sup_{p} \ip{p}{v} - \int V_{x,p}(z) \pi( \mathrm{d} z) \\ \leq \inf_{\substack{w(z) \\ \int w \mathrm{d} \pi = v}} \sup_{p(z)} \int \ip{p(z)}{w(z)} - V_{x,p(z)}(z) \pi( \mathrm{d} z). \end{multline*} For the other inequality, note that \begin{align*} & \inf_{\substack{w(z) \\ \int w \mathrm{d} \pi = v}} \sup_{p(z)} \int \ip{p(z)}{w(z)} - V_{x,p(z)}(z) \pi( \mathrm{d} z) \\ & \quad \leq \sup_{p(z)} \int \ip{p(z)}{w^*(z)} - V_{x,p(z)}(z) \pi( \mathrm{d} z) \\ & \quad = \int \ip{p^*}{w^*(z)} - V_{x,p^*}(z) \pi( \mathrm{d} z) \\ & \quad = \ip{p^*}{v} - \int V_{x,p^*}(z) \pi( \mathrm{d} z) \\ & \quad \leq \sup_p \ip{p}{v} - \int V_{x,p}(z) \pi( \mathrm{d} z) \end{align*} where we used in the third line that $w(z) \in \partial_p V_{x,p^*}(z)$ $\pi$ almost surely by~\cite[Theorem 23.5]{Rockafellar1970} or~\cite[Propposition E.1.4.3]{HiriartLemarechal2012}. \end{proof} \begin{proof}[Proof of Proposition~\ref{SF:proposition:representation_of_Lagrangian}] We have \begin{align} \mathcal{L}(x,v) & = \sup_p \ip{p}{v} - \mathcal{H}(x,p) \notag \\ & = \sup_p \inf_{\pi \in \mathcal{P}(F)} \ip{p}{v} - \int V_{x,p}(z) \pi( \mathrm{d} z) + I_x(\pi) \notag \\ & = \inf_{\pi \in \mathcal{P}(F)} \sup_p \ip{p}{v} - \int V_{x,p}(z) \pi( \mathrm{d} z) + I_x(\pi) \label{SF:eqn:sion_lagrangian} \end{align} by Sion's minimax lemma, since the map $\pi \mapsto \mathcal{I}(x,\pi)$ is convex. Fix $\pi \in \mathcal{P}(F)$, and write \begin{align*} \widehat{\mathcal{L}}_\pi(x,v) = \inf_{w: \int w(z) \pi( \mathrm{d} z) = v} \int \mathcal{L}_z(x,w(z)) \pi( \mathrm{d} z). \end{align*} By \eqref{SF:eqn:sion_lagrangian}, our proposition follows if for all $(x,v)$ and $\pi$ we have \begin{equation} \label{SF:eqn:equality_Lagrangians_pi} \mathcal{L}_\pi(x,v) = \widehat{\mathcal{L}}_\pi(x,v). \end{equation} Fix $(x,v)$ and $\pi$. \smallskip \textit{Step 1:} We establish $\mathcal{L}_\pi(x,v) \leq \widehat{\mathcal{L}}_\pi(x,v)$. For any integrable function $z \mapsto w(z)$ such that $\int w(z) \pi( \mathrm{d} z) = v$, we have \begin{equation*} \mathcal{L}_\pi(x,v) = \sup_p \int \ip{p}{w(z)} - V_{x,p}(z) \pi( \mathrm{d} z), \end{equation*} implying that \begin{equation*} \mathcal{L}_\pi(x,v) = \inf_{w: \int w(z) \pi( \mathrm{d} z) = v} \sup_p \int \ip{p}{w(z)} - V_{x,p}(z) \pi( \mathrm{d} z) \leq \widehat{\mathcal{L}}_\pi(x,v) \end{equation*} by taking the supremum over $p$ inside the integral. We conclude that $\mathcal{L}_\pi(x,v) \leq \widehat{\mathcal{L}}_\pi(x,v)$. \smallskip \textit{Step 2:} We now establish that if $v \in \text{rel. int. dom } \mathcal{L}(x,\cdot)$ then $\mathcal{L}_\pi(x,v) = \widehat{\mathcal{L}}_\pi(x,v)$. Indeed, by Lemma \ref{SF:lemma:constant_momentum} there is a measurable function $z \mapsto w(z)$ such that $\int w(z) \pi( \mathrm{d} z) = v$ and \begin{align*} \widehat{\mathcal{L}}_\pi(x,v) & = \inf_{\substack{w(z) \\ \int w \mathrm{d} \pi = v}} \sup_{p(z)} \int \ip{p(z)}{w(z)} - V_{x,p(z)}(z) \pi( \mathrm{d} z) \\ & = \sup_{p} \ip{p}{v} - \int V_{x,p(z)}(z) \pi( \mathrm{d} z) \\ & = \mathcal{L}_\pi(x,v). \end{align*} \textit{Step 3:} We now establish $\mathcal{L}_\pi(x,v) = \widehat{\mathcal{L}}_\pi(x,v)$. By step 1, we have \begin{equation*} \text{rel. int. dom } \widehat{\mathcal{L}}_\pi(x,\cdot) \subseteq \text{rel. int. dom } \mathcal{L}_\pi(x,\cdot), \end{equation*} since the Lagrangians are ordered point-wise. By step 2, \begin{equation*} \text{if}\;v \in \text{rel. int. dom } \mathcal{L}_\pi(x,\cdot),\quad\text{then}\quad v \in \text{dom } \mathcal{L}_\pi(x,\cdot) \end{equation*} We conclude that \begin{equation*} \text{rel. int. dom } \widehat{\mathcal{L}}_\pi(x,\cdot) = \text{rel. int. dom } \mathcal{L}_\pi(x,\cdot), \end{equation*} and $\mathcal{L}_\pi(x,\cdot) = \widehat{\mathcal{L}}_\pi(x,\cdot)$ holds on this set. We conclude that $\mathcal{L}_\pi(x,v) = \widehat{\mathcal{L}}_\pi(x,v)$ by \cite[Corollary 7.3.4]{Rockafellar1970} (this can also be derived from \cite[Proposition B.1.2.6]{HiriartLemarechal2012}). \end{proof} \section{Proof of mean-field large deviations} \label{SF:sec:proof-mean-field} In this section, we prove Theorem~\ref{SF:thm:LDP-mean-field} by verifying the assumptions of our general large-deviation result (Theorem~\ref{SF:thm:LDP_general}) and the action-integral representation (Theorem~\ref{SF:thm:rate-function}), that is means Assumptions~\ref{SF:assumption:convergence-slow-nonlinear-generators},~\ref{SF:assumption:convergence-fast-nonlinear-generators},~\ref{SF:assumption:principal-eigenvalue-problem},~\ref{SF:assumption:regularity-V},~\ref{SF:assumption:regularity-I} and~\ref{SF:assumption:Hamiltonian_vector_field}. \smallskip We recall the setting: The slow-fast process~$(X^n,Z^n)$ takes values in~$E_n\times F$, where we embed~$E_n$ by identity into~$E=\mathcal{P}(\{1,\dots,q\})\times[0,\infty)^\Gamma$, and regard~$(X^n,Z^n)$ as a process on~$E\times F$. The set~$F$ is a finite-dimensional torus~$\mathbb{T}^,$. The generator of the slow-fast system is \begin{equation*} A_n f(x,z) := A_{n,z}^\mathrm{slow}f(\cdot,z)(x) + n\cdot A_{n,x}^\mathrm{fast}f(x,\cdot)(z), \end{equation*} with slow and fast generators given by \begin{align*} A_{n,z}^\mathrm{slow} g(x) &:= \sum_{ab,a\neq b} n\cdot \mu(a)\cdot r_n(a,b,\mu,z)\left[g(x_{a\to b})-g(x)\right],\\ A_{n,x}^\mathrm{fast} h(z) &:= \sum_i b_n^i(x,z)\partial_i h(z) + \sum_{ij}a_n^{ij}(x,z)\partial_i\partial_j h(z). \end{align*} \begin{proof}[Verification of Assumption~\ref{SF:assumption:convergence-slow-nonlinear-generators}] We have to find the slow Hamiltonian~$V_{x,p}(z)$ such that \begin{equation*} \frac{1}{n}e^{-nf}A_{n,z}^\mathrm{slow}e^{nf}\xrightarrow{n\to\infty} V_{x,\nabla f(x)}(z) \end{equation*} as specified in Assumption~\ref{SF:assumption:convergence-slow-nonlinear-generators}. We have \begin{align*} \frac{1}{n}e^{-nf(x)}A_{n,z}^\mathrm{slow}e^{nf(x)}&= \sum_{ab,a\neq b}\mu(a) r_n(a,b,\mu,z) \left[\exp\{n(f(x_{a\to b}^n)-f(x))\}-1\right]. \end{align*} Suppose that~$x_n=(\mu_n,w_n)\to x$. Then by Taylor expansion, \begin{equation*} n(f(x_{a\to b}^n)-f(x_n)) \xrightarrow{n\to\infty} \ip{\nabla f(x)}{e_{b}-e_a+e_{ab}}, \end{equation*} for all~$f\in C^2(E)$, uniformly on compacts~$K\subseteq E$. By the convergence assumption on~$r_n$, we obtain the claimed convergence with~$D_0=C_b^2(E)$ and \begin{equation*} V_{x,p}(z) = \sum_{ab,a\neq b}\mu(a)r(a,b,\mu,z)\left[e^{p_b-p_a+p_{ab}}-1\right]. \end{equation*} \end{proof} \begin{proof}[Verification of Assumption~\ref{SF:assumption:convergence-fast-nonlinear-generators}] Let~$x_n\to x$ in~$E$ and~$h_n\to h$ in~$C(F)$. By the convergence assumptions on the coefficients~$b_n^i$ and~$a_n^{ij}$, we obtain \begin{equation*} A_{n,x_n}^\mathrm{fast}h_n(z) \to \sum_ib^i(x,z)\partial_ih(z)+\sum_{ij}a^{ij}(x,z)\partial_i\partial_j h(z) =:A_x^\mathrm{fast}h(z) \end{equation*} uniformly over~$z \in F$. \end{proof} \begin{proof}[Verification of Assumption~\ref{SF:assumption:principal-eigenvalue-problem}] Part~\ref{SF:item:assumption:PI:domain} follows since~$F$ is compact. Let~$x\in E$ and~$p\in\mathbb{R}^d$. We find a strictly positive eigenfunction~$u:F\to(0,\infty)$ and an eigenvalue~$\mathbb{R}$ such that \begin{equation}\label{SF:eq:proof-mean-field-eigenvalue-problem} (V_{x,p} + A_x^\mathrm{fast})u=\lambda u. \end{equation} Then as remarked below Assumption~\ref{SF:assumption:principal-eigenvalue-problem}, part~\ref{SF:item:assumption:PI:solvePI} follows. Equation~\eqref{SF:eq:proof-mean-field-eigenvalue-problem} is a principal-eigenvalue problem for an uniformly elliptic operator. Uniform ellipticity follows by Condition~\ref{SF:condition:mean-field:reg-coefficients} on the diffusion coefficients and the uniform convergence in Assumption~\ref{SF:mean-field:conv-coeff}. Hence there exists a unique eigenfunction~$u$ with a real eigenvalue~$\lambda$ (e.g. Sweers~\cite{Sweers92}). By~\cite{DonskerVaradhan75}, this principal eigenvalue satisfies the variational representation \begin{equation*} \lambda = \sup_{\pi\in\mathcal{P}(F)}\left[\int_F V_{x,p}(z)\, \mathrm{d}\pi(z) - \mathcal{I}(x,\pi)\right], \end{equation*} with the functional \begin{equation*} \mathcal{I}(x,\pi)=-\inf_{\phi>0}\int_F\frac{A_x^\mathrm{fast}\phi(z)}{\phi(z)}\, \mathrm{d}\pi(z). \end{equation*} Hence Assumption~\ref{SF:assumption:principal-eigenvalue-problem} holds with the Hamtilonian~\eqref{SF:eq:sec-assumption:H} as claimed. \end{proof} \begin{proof}[Verification of Assumptions~\ref{SF:assumption:regularity-V} and~\ref{SF:assumption:regularity-I}] The verification can be found in Proposition~\ref{prop:mean-field-coupled-to-diffusion} of Chapter~\ref{chapter:CP-for-two-scale-H}. The proofs are also found in~\cite[Proposition~8.2 and~8.4]{KraaijSchlottke2019}. Our example at hand is considered in Remark~8.5 in there. \end{proof} \begin{proof}[Verification of Assumption~\ref{SF:assumption:Hamiltonian_vector_field}] This follows via computation. For instance, consider~$E=\mathcal{P}(\{a,b\})$ (ignoring the flux for the moment), and identify~$E$ with the simplex in~$\mathbb{R}^2$. Fix the external variable~$z$. We have to show~$\partial_pV_{x,p}(z)\subseteq T_E(x)$. Recall that~$T_E(x)$ is the tangent cone at~$x$, that means the vectors at~$x$ pointing inside of~$E$. We compute the vector~$\nabla_p V_{x,p}(z)\in\mathbb{R}^2$, \begin{equation*} \nabla_pV_{x,p}(z) = \begin{pmatrix} \mu_a r(a,b,\mu,z) (-1) e^{p_b-p_a} + \mu_b r(b,a,\mu,z) e^{p_a-p_b}\\ \mu_a r(a,b,\mu,z) e^{p_b-p_a} + \mu_b r(b,a,\mu,z) (-1)e^{p_a-p_b} \end{pmatrix}. \end{equation*} For~$\mu=(\mu_a,\mu_b)\in E$ with~$\mu_a,\mu_b > 0$, the tangent cone~$T_E(x)$ is spanned by~$(1,-1)^T$. Since~$\nabla_pV_{x,p}(z)$ is orthogonal to~$(1,1)^T$, we indeed find~$\partial_pV_{x,p}(z)\subseteq T_E(x)$ in that case. For~$\mu=(1,0)$, the tangent cone is~$T_E(1,0)=\{\lambda(-1,1)^T\,:\,\lambda \geq 0\}$. We have \begin{equation*} \nabla_pV_{\mu,p}(z) = \begin{pmatrix} r(a,b,\mu,z) (-1) e^{p_b-p_a}\\ r(a,b,\mu,z) e^{p_b-p_a} \end{pmatrix}, \end{equation*} which is parallel to~$(-1,1)^T$, and therefore~$\partial_pV_{\mu,p}(z)\subseteq T_E(x)$. The argument is similar for~$\mu=(0,1)$. The general case (including the fluxes) follows from writing out the definitions. \end{proof} \chapter{Comparison Principle for Two-Scale Hamiltonians} \label{chapter:CP-for-two-scale-H} \chaptermark{CP for Two-Scale Hamiltonians} \section{Introduction and aim} \label{section:introduction} The main purpose of this chapter is to establish well-posedness for first-order nonlinear partial differential equations of Hamilton-Jacobi-Bellman type on subsets $E$ of $\mathbb{R}^d$, \begin{equation}\label{eq:intro:HJ-general} u(x)-\lambda \,\mathcal{H}\left[u(x),\nabla u(x)\right] = h(x),\quad x \in E\subseteq \mathbb{R}^d.\tag{\text{HJB}} \end{equation} In there, $\lambda > 0$ is a scalar and $h$ is a continuous and bounded function on~$E$. The Hamiltonian $\mathcal{H}:E\times \mathbb{R}^d\to \mathbb{R}$ is given by \begin{equation}\label{eq:intro:variational_hamiltonian} \mathcal{H}(x,p) = \sup_{\theta \in \Theta}\left[\Lambda(x,p,\theta) - \mathcal{I}(x,\theta)\right], \end{equation} where $\theta \in \Theta$ plays the role of a control variable. For fixed $\theta$, the function $\Lambda$ can frequently be interpreted as an Hamiltonian itself. We call it the \emph{internal} Hamiltonian. The function $\mathcal{I}$ can be interpreted as the cost of applying the control $\theta$. This type of Hamiltonians typically arises in two-scale problems such as discussed in the previous chapter. \smallskip We will establish existence of viscosity solutions (e.g.~\cite{CIL92}) in the sense of Definition~\ref{definition:viscosity_solutions} via a resolvent defined in terms of a standard discounted control procedure. However, the main problem we overcome in this chapter is to verify a \emph{comparison principle} in order to establish uniqueness of viscosity solutions. The comparison principle for Hamilton-Jacobi equations is a well-studied problem in the literature. The standard assumption that allows one to obtain the comparison principle in the context of optimal control problems (e.g.~\cite{BardiDolcetta1997}) is that either there is a modulus of continuity $\omega$ such that \begin{equation}\label{eq:intro:standard-reg-estimate-on-H} |\mathcal{H}(x,p)-\mathcal{H}(y,p)| \leq \omega\left(|x-y|(1+|p|)\right), \end{equation} or that $\mathcal{H}$ is uniformly coercive: \begin{equation} \label{eqn:uniformly_coercive} \lim_{|p| \rightarrow \infty} \inf_x \mathcal{H}(x,p) = \infty. \end{equation} The estimate~\eqref{eq:intro:standard-reg-estimate-on-H} can be translated into conditions for~$\Lambda$ and $\mathcal{I}$, which include (e.g. \cite[Chapter~III]{BardiDolcetta1997}) \begin{itemize} \item $|\Lambda(x,p,\theta)-\Lambda(y,p,\theta)|\leq \omega_\Lambda(|x-y|(1+|p|))$, uniformly in $\theta$, and \item $\mathcal{I}$ is bounded, continuous and $|\mathcal{I}(x,\theta) - \mathcal{I}(y,\theta)| \leq \omega_\mathcal{I}(|x-y|)$. \end{itemize} However, such type of estimates are not satisfied for the examples that we are interested in. We make these examples of~\eqref{eq:intro:HJ-general} more precise in Section~\ref{section:intro:motivation}. There we also explain why the standard assumptions are not satisfied and where the challenge of solving~\eqref{eq:intro:HJ-general} is pointed out in the literature. Here, we focus on the motivation for our assumptions. They mainly build up on two observations: \begin{enumerate}[label=(\roman*)] \item Fix a control variable $\theta_0\in\Theta$ and consider the Hamiltonian $H(x,p):= \Lambda(x,p,\theta_0)$. In all our examples, the comparison principle is satisfied for sub- and supersolutions of~$u(x)-\lambda H(x,\nabla u(x))=h(x)$. \item In all our examples, the cost function $\mathcal{I}(x,\theta)$ satisfies an estimate of the type $|\mathcal{I}(x,\theta) - \mathcal{I}(y,\theta)| \leq \omega_{\mathcal{I},C}(|x-y|)$ on sublevel sets $\{\mathcal{I} \leq C\}$. \end{enumerate} Our main idea is to take advantage of viscosity sub- and supersolution inequalities in order to work on sublevel sets of the cost function $\mathcal{I}$. To do so, we assume that $H(x,p)=\Lambda(x,p,\theta_0)$ satisfies a \emph{continuity estimate} uniformly for $\theta_0$ varying in a compact set. This continuity estimate captures the key information that allows to prove the comparison principle for~$H$. In the end, this is what we call the bootstrap principle: given sufficient regularity of $\mathcal{I}$, one can bootstrap the comparison principle for the internal Hamiltonian $\Lambda$ to obtain a comparison principle for the full Hamiltonian $\mathcal{H}$. In examples, this approach proves to be a crucial improvement over known results. \smallskip In summary, the novelties we present in this chapter are: \begin{enumerate}[$\bullet$] \item Motivated by examples violating the standard regularity estimate~\eqref{eq:intro:standard-reg-estimate-on-H} on Hamiltonians, we find different conditions under which the comparison principle for~\eqref{eq:intro:HJ-general} is satisfied for variational Hamiltonians $\mathcal{H}$ of the type~\eqref{eq:intro:variational_hamiltonian}. The result is formulated in Theorem~\ref{theorem:comparison_principle_variational}. The main bootstrapping argument is explained in simplified form in Section~\ref{section:bootstrap-argument-in-nutshell} and carried out in Section~\ref{section:comparison_principle}. \item A proof of the comparison principle that covers a class of non-coercive Hamiltonians which typically arises in mean-field interacting particle systems that are coupled to external variables. This example has not been treated before, and we make it explicit in Proposition~\ref{prop:mean-field-coupled-to-diffusion} of Section~\ref{section:examples-H}. \item A proof of existence of a viscosity solution based on solving subdifferential inclusions in the non-compact setting. The proof relies on continuity of $\mathcal{H}$ and finding a priori estimates on the range of solutions to associated differential inclusions. The result is formulated in Theorem~\ref{theorem:existence_of_viscosity_solution}, and the structure of the proof is explained in Section~\ref{section:strategy_existence_viscosity_solution}. \end{enumerate} With these results established, we can study large deviation problems with two time-scales from a Hamilton-Jacobi point-of-view in more generality. This is the subject of Chapter~5, where we exploit the semigroup approach to large deviations. We remark that in~\cite[Lemmas~9.3,~9.19,~9.25]{FengKurtz2006}, a different technique is introduced, based on introducing an extra parameter~$\lambda$. We give further comments on that in the discussion section in Chapter~\ref{chapter:discussion}. \paragraph{Overview of this chapter.} In Section~\ref{section:intro:motivation}, we discuss Hamiltonians violating the standard regularity assumptions. The main results are formulated in Section \ref{section:results}. We proceed with a discussion of the strategy of the proofs in Section \ref{section:strategy}. In Section \ref{section:regularity-of-H-and-L} we establish regularity properties of $\mathcal{H}$ used in the later proof sections. In Section \ref{section:comparison_principle} we establish the comparison principle. In Section \ref{section:construction-of-viscosity-solutions} we establish that a resolvent operator $R(\lambda)$ in terms of an exponentially discounted control problem gives rise to viscosity solutions of the Hamilton-Jacobi-Bellman equation~\eqref{eq:intro:HJ-general}. Finally, in Section~\ref{section:verification-for-examples-of-Hamiltonians} we verify the assumptions for examples. \section{Examples violating the standard assumptions} \label{section:intro:motivation} Hamiltonians of the type~\eqref{eq:intro:variational_hamiltonian} arise in a range of fields. In this section, we mention two examples of Hamiltonians arising in the context of stochastic systems with two time scales. We explain why they violate the standard regularity estimates. These examples illustrate the need for an alternative set of assumptions allowing to treat these cases. These Hamiltonians frequently arise in the study of systems with multiple time-scales, e.g. geophysical flows, planetary motion, finance, weather-climate interaction models, molecular dynamics and models in statistical physics---we provide more background in Chapter~5. In such systems, one can often recognize a slow and a fast component. Typically, one is interested in the behaviour of the slow component in the limit in which the separation of time scales goes to infinity. As the fast system equilibrates before the slow system has made a significant difference, the limit of such systems can be described by a ordinary or partial differential equation involving only the average behaviour of the fast component. \smallskip However, in applications an infinite separation of time scales is never really achieved. Thus, the slow process still shows fluctuations around its limiting behaviour while the fast process fluctuates around its average. The effective fluctuations arise from the combination of both sources. In this two-scale context, when analysing the fluctuations by means of large-deviation techniques, one obtains Hamiltonians of the type~\eqref{eq:intro:variational_hamiltonian}. We refer to~\cite{KumarPopovic2017} for derivations in this context, and to~\cite{BouchetGrafkeTangarifeVandenEijnden2016} for an extensive explanation in which the authors study ODE's coupled to fast diffusion. In these examples, the internal Hamiltonians~$\Lambda$ capture the fluctuations of the slow component, while the cost function~$\mathcal{I}$ arises from fluctuations of averages of the fast component. The full Hamiltonian~$\mathcal{H}$ takes both contributions into account. \smallskip \textit{Example 1}. In~\cite{BudhirajaDupuisGanguly2018}, the authors study large deviations of a diffusion processes with vanishing noise on $E = \mathbb{R}^d$ coupled to a fast jump process on a finite discrete set $\{1,\dots,J\}$. They identified the challenge of proving comparison principles for Hamiltonians arising in such two-scale systems, where the Hamiltonians can be casted in the form~\eqref{eq:intro:variational_hamiltonian}. We consider this general setting in Proposition~\ref{prop:diffusion-coupled-to-jumps} in Section~\ref{section:examples-H}. We illustrate the issues arising in a simpler but more concrete form. With $d=1$ and $J=2$, when approaching this problem from the Hamilton-Jacobi perspective, a key step (e.g.~\cite{KumarPopovic2017}) is to solve~\eqref{eq:intro:HJ-general} with $\mathcal{H}$ consisting of the following ingredients: \begin{enumerate}[label=(\roman*)] \item The internal state space is $E=\mathbb{R}^d$. \item The set of control variables is $\Theta=\mathcal{P}(\{1,2\})$. \item The internal Hamiltonian~$\Lambda$ is given by \begin{equation*} \Lambda(x,p,\theta) = \frac{1}{2}a(x,1)|p|^2 \theta_1 + \frac{1}{2} a(x,2)|p|^2 \theta_2, \end{equation*} where $a(x,i) > 0$ and $\theta_i = \theta(\{i\})$. \item The cost function~$\mathcal{I}$ is given by \begin{equation*} \mathcal{I}(x,\theta) = \sup_{w\in\mathbb{R}^2} \left[r_{12}(x)\theta_1 \left(1-e^{w_2-w_1}\right) + r_{21}(x)\theta_2 (1-e^{w_1-w_2})\right], \end{equation*} where $r_{ij}(x) \geq 0$. \end{enumerate} In this example, the cost function is unbounded if $r_{ij}(x)$ is unbounded. For instance, consider $\theta_1 = 1$ and $\theta_2 = 0$. Then by choosing $w=(1,0)$ in the supremum, \begin{equation*} \mathcal{I}(x,\theta) \geq C \, r_{12}(x), \end{equation*} and thus $\mathcal{I}(x,\theta)$ diverges as $|x|\to\infty$. \smallskip We now turn to another notable problem with two time-scales that motivates our considerations: a system of mean-field interacting particles coupled to fast external variables. \smallskip \textit{Example 2}. In~\cite{BertiniChetriteFaggionatoGabrielli2018}, the authors prove large-deviation principles of mean-field interacting particles that are coupled to fast time-periodic variables. In this setting, the associated Hamilton-Jacobi equations are solved in~\cite{Kr17}. However, when considering a coupling to general fast random variables such as diffusions, then solving the corresponding Hamilton-Jacobi equations remained an open challenge. In full generality, we formulate this case in Proposition~\ref{prop:mean-field-coupled-to-diffusion}. For a corresponding large-deviation analysis, we refer to Chapter~\ref{chapter:LDP-in-slow-fast-systems} (based on~\cite{KraaijSchlottke2020}). Here we illustrate the difficulties that arise by considering the Hamiltonian in a simplified setting: \begin{enumerate}[label=(\roman*)] \item The internal state space is $E=\mathcal{P}(\{a,b\}) \times [0,\infty)\times[0,\infty)$, embedded in~$\mathbb{R}^4$ by identifying~$\mathcal{P}(\{a,b\})$ with the simplex in~$\mathbb{R}^2$. We denote the variables as $x = (\mu,w)$, with $\mu\in\mathcal{P}(\{a,b\})$ and $w\in[0,\infty)^2$. \item The set of control variables is $\Theta=\mathcal{P}(\mathbb{T})$, that is the probability measures on the torus~$\mathbb{T}$. \item The internal Hamiltonian~$\Lambda$ is given by \begin{multline*} \Lambda(x,p,\theta) = \mu_a r_{ab}(\mu,\theta)\left[\exp\left\{p_b-p_a + p_{ab}\right\}-1\right] \\ + \mu_b r_{ba}(\mu,\theta)\left[\exp\left\{p_a-p_b + p_{ba}\right\}-1\right], \end{multline*} with $p = (p_a,p_b,p_{ab},p_{ba}) \in \mathbb{R}^4$ and $\mu_i := \mu(\{i\})$. The rates $r_{ij}$ are non-negative. \item The cost function~$\mathcal{I}:\Theta\to[0,\infty]$ is independent of $x$ and is given by \begin{equation*} \mathcal{I}(\theta) = \sup_{\substack{u\in C^\infty(\mathbb{T})\\ u > 0}} \int_\mathbb{T} \left(-\frac{u''(y)}{u(y)}\right)\, \mathrm{d}\theta(y) \end{equation*} \end{enumerate} In this example, the internal Hamiltonian~$\Lambda$ is not uniformly coercive. For instance, take momenta $p$ such that $p_b-p_a+p_{ab}$ is constant. Then if $|p|\to\infty$, we do not necessarily have that $\Lambda(x,p,\theta)\to\infty$. A similar effect occurs when choosing $p_a \rightarrow \infty$ and $\mu_a = 0$. Regarding the cost function, for any singular measure $\delta_z$ with a point $z\in S$ we have $\mathcal{I}(\delta_z) = \infty$. This similarly holds for finite convex combinations of Dirac measures. Since this linear span is dense in $\mathcal{P}(\mathbb{T})$, this implies that $\mathcal{I}$ can not be continuous. \section{Main results} \label{section:results} In this section, we start with preliminaries in Section~\ref{section:preliminaries} which includes the definition of viscosity solutions and that of the comparison principle. \smallskip We proceed in Section~\ref{section:results:HJ-of-Perron-Frobenius-type} with the main results: a comparison principle for the Hamilton-Jacobi-Bellman equation~\eqref{eq:intro:HJ-general} based on variational Hamiltonians of the form~\eqref{eq:intro:variational_hamiltonian}, and the existence of viscosity solutions. \smallskip In Section \ref{section:assumptions} we collect all the assumptions that are needed for all main results in one place and discuss the applicability of our results. In Section~\ref{section:examples-H}, we verify the assumptions for the examples that motivate the Hamilton-Jacobi equations we discuss in this chapter. \subsection{Preliminaries} \label{section:preliminaries} For a Polish space $\mathcal{X}$, we denote by $C(\mathcal{X})$ and $C_b(\mathcal{X})$ the spaces of continuous and bounded continuous functions respectively. If $\mathcal{X} \subseteq \mathbb{R}^d$ then we denote by $C_c^\infty(\mathcal{X})$ the space of smooth functions that vanish outside a compact set. We denote by $C_{cc}^\infty(\mathcal{X})$ the set of smooth functions that are constant outside of a compact set, and by $\mathcal{P}(\mathcal{X})$ the space of probability measures on $\mathcal{X}$. We equip $\mathcal{P}(\mathcal{X})$ with the weak topology, that is, the one induced by convergence of integrals against bounded continuous functions. \smallskip Throughout this chapter, $E$ will be the set on which we base our Hamilton-Jacobi equations. We assume that $E$ is a subset of $\mathbb{R}^d$ that is a Polish space which is contained in the $\mathbb{R}^d$ closure of its $\mathbb{R}^d$ interior. This ensures that gradients of functions are determined by their values on $E$. Note that we do not assume that $E$ is open. We assume that the space of controls $\Theta$ is Polish. \smallskip We next introduce viscosity solutions for the Hamilton-Jacobi equation with Hamiltonians like $\mathcal{H}(x,p)$ of our introduction. \begin{definition}[Viscosity solutions and comparison principle] \label{definition:viscosity_solutions} Let $A : C_b(E) \to C_b(E)$ be an operator with domain $\mathcal{D}(A)$, $\lambda > 0$ and $h \in C_b(E)$. Consider the Hamilton-Jacobi equation \begin{equation} f - \lambda A f = h. \label{eqn:differential_equation} \end{equation} We say that $u$ is a \textit{(viscosity) subsolution} of equation \eqref{eqn:differential_equation} if $u$ is bounded, upper semi-continuous and if, for every $f \in \mathcal{D}(A)$ there exists a sequence $x_n \in E$ such that \begin{gather*} \lim_{n \uparrow \infty} u(x_n) - f(x_n) = \sup_x u(x) - f(x), \\ \lim_{n \uparrow \infty} u(x_n) - \lambda A f(x_n) - h(x_n) \leq 0. \end{gather*} We say that $v$ is a \textit{(viscosity) supersolution} of equation \eqref{eqn:differential_equation} if $v$ is bounded, lower semi-continuous and if, for every $f \in \mathcal{D}(H)$ there exists a sequence $x_n \in E$ such that \begin{gather*} \lim_{n \uparrow \infty} v(x_n) - f(x_n) = \inf_x v(x) - f(x), \\ \lim_{n \uparrow \infty} v(x_n) - \lambda Af(x_n) - h(x_n) \geq 0. \end{gather*} We say that $u$ is a \textit{(viscosity) solution} of equation \eqref{eqn:differential_equation} if it is both a subsolution and a supersolution to \eqref{eqn:differential_equation}. We say that \eqref{eqn:differential_equation} satisfies the \textit{comparison principle} if for every subsolution $u$ and supersolution $v$ to \eqref{eqn:differential_equation}, we have $u \leq v$. \end{definition} \begin{remark} \label{remark:existence of optimizers} Consider the definition of subsolutions. Suppose that the testfunction $f \in \mathcal{D}(A)$ has compact sublevel sets, then instead of working with a sequence $x_n$, there exists $x_0 \in E$ such that \begin{gather*} u(x_0) - f(x_0) = \sup_x u(x) - f(x), \\ u(x_0) - \lambda A f(x_0) - h(x_0) \leq 0. \end{gather*} A similar simplification holds in the case of supersolutions. For an explanatory text on the notion of viscosity solutions and fields of applications, we refer to~\cite{CIL92}. \end{remark} \subsection{Hamilton-Jacobi-Bellman Equations} \label{section:results:HJ-of-Perron-Frobenius-type} In this Section, we state our main results, which are the comparison principle (Theorem~\ref{theorem:comparison_principle_variational}) and the existence of solutions (Theorem \ref{theorem:existence_of_viscosity_solution}). We consider the variational Hamiltonian $\mathcal{H} : E \times \mathbb{R}^d \rightarrow \mathbb{R}$ given by \begin{equation}\label{eq:results:variational_hamiltonian} \mathcal{H}(x,p) = \sup_{\theta \in \Theta}\left[\Lambda(x,p,\theta) - \mathcal{I}(x,\theta)\right]. \end{equation} The precise assumptions on the maps $\Lambda$ and $\mathcal{I}$ are formulated in Section~\ref{section:assumptions}. Define the operator $\mathbf{H} f(x) := \mathcal{H}(x,\nabla f(x))$ with domain $\mathcal{D}(\mathbf{H}) = C_{cc}^\infty(E)$. Our first main result is that this operator $\mathbf{H}$ constructed out of $\mathcal{H}$ satisfies the comparison principle. \begin{theorem}[Comparison principle]\label{theorem:comparison_principle_variational} Suppose that the maps~$\Lambda$ and~$\mathcal{I}$ satisfy Assumptions~\ref{assumption:results:regularity_of_V} and~\ref{assumption:results:regularity_I}, respectively. Then for any $h \in C_b(E)$ and $\lambda > 0$, the comparison principle holds for \begin{equation}\label{eq:results:HJ-eq} f - \lambda \, \mathbf{H} f = h. \end{equation} \end{theorem} \begin{remark}[Uniqueness] If $u$ and $v$ are two viscosity solutions of~\ref{eq:results:HJ-eq}, then we have $u\leq v$ and $v\leq u$ by the comparison principle, giving uniqueness. \end{remark} \begin{remark}[Domain] The comparison principle holds with any domain that satisfies $C_{cc}^\infty(E)\subseteq \mathcal{D}(\mathbf{H})\subseteq C^1_b(E)$. We state it with $C^\infty_{cc}(E)$ to connect it with the existence result of Theorem~\ref{theorem:existence_of_viscosity_solution}, where we need to work with test functions whose gradients have compact support. \end{remark} We turn to the existence of a viscosity solution for~\eqref{eq:results:HJ-eq}. As mentioned in the introduction, the viscosity solution is given in terms of an optimization problem with discounted cost. The Legendre dual $\mathcal{L} : E \times \mathbb{R}^d \rightarrow [0,\infty]$ of $\mathcal{H}$, given by \begin{equation*} \mathcal{L}(x,v) := \sup_{p\in\mathbb{R}^d} \left[\ip{p}{v} - \mathcal{H}(x,p)\right], \end{equation*} plays the role of a running cost. In the following Theorem, $\mathcal{A}\mathcal{C}$ is the collection of absolutely continuous paths in $E$. For each $\lambda > 0$, let $R(\lambda)$ be the operator \begin{equation}\label{HJB:eq:resolvent} R(\lambda) h(x) = \sup_{\substack{\gamma \in \mathcal{A}\mathcal{C}\\ \gamma(0) = x}} \int_0^\infty \lambda^{-1} e^{-\lambda^{-1}t} \left[h(\gamma(t)) - \int_0^t \mathcal{L}(\gamma(s),\dot{\gamma}(s))\right] \, \mathrm{d} t. \end{equation} \begin{theorem}[Existence of viscosity solution] \label{theorem:existence_of_viscosity_solution} Suppose that~$\Lambda$ and $\mathcal{I}$ satisfy Assumptions~\ref{assumption:results:regularity_of_V} and~\ref{assumption:results:regularity_I}, respectively, and that $\mathcal{H}$ satisfies Assumption~\ref{assumption:Hamiltonian_vector_field}. Then the function~$R(\lambda)h$ is the unique viscosity solution to~\eqref{eq:results:HJ-eq}. \end{theorem} \begin{comment} \begin{remark}[Assumption~\ref{assumption:Hamiltonian_vector_field}] a \end{remark} \begin{remark} For fixed $x\in E$, the functional $\theta\mapsto \mathcal{I}(x,\theta)$... \end{remark} \end{comment} \subsection{Assumptions} \label{section:assumptions} In this section, we formulate and comment on the assumptions imposed on the Hamiltonians defined in the previous sections. We first motivate the assumptions that are required for proving the comparison principle, Theorem~\ref{theorem:comparison_principle_variational}. \smallskip Usually, proofs of the comparison principle for a subsolution $u$ and a supersolution $v$ for the equation $f - \lambda \mathbf{H} f = h$ are reduced to establishing an estimate of the type \begin{equation*} \liminf_{\varepsilon \downarrow 0} \liminf_{\alpha \rightarrow \infty}\mathcal{H}(x_{\alpha,\varepsilon},\alpha(x_{\alpha,\varepsilon}-y_{\alpha,\varepsilon})) - \mathcal{H}(y_{\alpha,\varepsilon},\alpha (x_{\alpha,\varepsilon}-y_{\alpha,\varepsilon})) \leq 0 \end{equation*} where $(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon})$ are elements of $E$ such that \begin{multline} \label{eqn:heuristic:doubling_variable} u(x_{\alpha,\varepsilon}) - v(x_{\alpha,\varepsilon}) - \frac{\alpha}{2} |x_{\alpha,\varepsilon}-y_{\alpha,\varepsilon}|^2 - \frac{\varepsilon}{2} (|x_{\alpha,\varepsilon}|^2 + |y_{\alpha,\varepsilon}|^2) \\ = \sup_{x,y \in E} u(x) - v(y) - \frac{\alpha}{2} |x-y|^2 - \frac{\varepsilon}{2} (|x|^2 + |y|^2). \end{multline} Equation~\eqref{eqn:heuristic:doubling_variable}, together with the sub- and supersolution property of $u$ and $v$ respectively, has the following consequences: \begin{enumerate}[(1)] \item \label{item:relative_compact} For all $\varepsilon >0 $, the set $\{x_{\alpha,\varepsilon}, y_{\alpha,\varepsilon} \, | \, \alpha > 0\}$ is relatively compact in $E$; \item \label{item:distance} For all $\varepsilon >0 $, we have $|x_{\alpha,\varepsilon} - y_{\alpha,\varepsilon}| + \alpha |x_{\alpha,\varepsilon} - y_{\alpha,\varepsilon}|^2 \rightarrow 0$ as $\alpha \rightarrow \infty$; \item \label{item:coercivity} For all $\varepsilon > 0$, we have \[ \inf_{\alpha} \mathcal{H}(x_{\alpha,\varepsilon}, \alpha(x_{\alpha,\varepsilon} - y_{\alpha,\varepsilon})) > - \infty \quad\text{and}\quad \sup_{\alpha} \mathcal{H}(y_{\alpha,\varepsilon}, \alpha(x_{\alpha,\varepsilon} - y_{\alpha,\varepsilon})) < \infty. \] \end{enumerate} In our bootstrap procedure, we aim to lift the comparison principle that holds for the Hamilton-Jacobi equation in terms of $\Lambda$ to that for $\mathbf{H}$. Thus, we need to establish an estimate of the type \eqref{eqn:heuristic:doubling_variable} under assumptions of the type \ref{item:relative_compact}, \ref{item:distance} and \ref{item:coercivity} where in addition, we have to vary our control variable~$\theta$. It turns out that it suffices to vary $\theta$ in a compact set in $\Theta$ that depends on $\varepsilon$. In addition, to make sure that we can bootstrap, we have to relax the $\sup$ and $\inf$ in \ref{item:coercivity} to a $\limsup$ and $\liminf$. \smallskip To establish the comparison principle, the quadratic distance is not special, except for being symmetric and well suited for quadratic Hamiltonians. We will work with a general non-negative function~$\Psi$ to penalize the distance between~$x$ and~$y$, and use a function~$\Upsilon$ to penalize points~$x$ and~$y$ far away from the `origin'. \begin{definition}[Penalization function]\label{def:results:good_penalization_function} We say that $\Psi : E^2 \rightarrow [0,\infty)$ is a \textit{ penalization function} if $\Psi \in C^1(E^2)$ and if $x = y$ if and only if $\Psi(x,y) = 0$. \end{definition} \begin{definition}[Containment function]\label{def:results:compact-containment} We say that a function $\Upsilon : E \rightarrow [0,\infty]$ is a \textit{containment function} for $\Lambda$ if there is a constant $c_\Upsilon$ such that \begin{itemize} \item For every $c \geq 0$, the set $\{x \, | \, \Upsilon(x) \leq c\}$ is compact; \item We have $\sup_\theta\sup_x \Lambda\left(x,\nabla \Upsilon(x),\theta\right) \leq c_\Upsilon$. \end{itemize} \end{definition} \begin{definition}[Continuity estimate] \label{def:results:continuity_estimate} Let $\Psi$ be a penalization function and let $\mathcal{G}: E \times \mathbb{R}^d\times\Theta : (x,p,\theta)\mapsto \mathcal{G}(x,p,\theta)$ be a function. Suppose that for $\varepsilon > 0$ and $\alpha > 0$, we have a collection of variables $(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha})$ in $E^2$ and variables $\theta_{\varepsilon,\alpha}$ in $\Theta$. We say that this collection is \textit{fundamental} for $\mathcal{G}$ with respect to $\Psi$ if: \begin{enumerate}[label = (C\arabic*)] \item \label{item:def:continuity_estimate:1} For each $\varepsilon$, there are compact sets $K_\varepsilon \subseteq E$ and $\widehat{K}_\varepsilon\subseteq\Theta$ such that for all $\alpha$ we have $x_{\varepsilon,\alpha},y_{\varepsilon,\alpha} \in K_\varepsilon$ and $\theta_{\varepsilon,\alpha}\in\widehat{K}_\varepsilon$. \item \label{item:def:continuity_estimate:2} For each $\varepsilon > 0$, we have limit points $x_{\varepsilon} \in K_\varepsilon$ and $y_{\varepsilon} \in K_\varepsilon$ of $x_{\alpha,\varepsilon}$ and $y_{\alpha,\varepsilon}$ as $\alpha\rightarrow \infty$. For these limit points we have \begin{equation*} \lim_{\alpha \rightarrow \infty} \alpha \Psi(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon}) = 0, \qquad \Psi(x_{\varepsilon},y_{\varepsilon}) = 0. \end{equation*} \item \label{item:def:continuity_estimate:3} We have \begin{align} & \limsup_{\varepsilon \rightarrow 0} \limsup_{\alpha \rightarrow \infty} \mathcal{G}\left(y_{\alpha,\varepsilon}, - \alpha (\nabla \Psi(x_{\alpha,\varepsilon},\cdot))(y_{\alpha,\varepsilon}),\theta_{\varepsilon,\alpha}\right) < \infty, \label{eqn:control_on_Gbasic_sup} \\ & \liminf_{\varepsilon \rightarrow 0} \liminf_{\alpha \rightarrow \infty} \mathcal{G}\left(x_{\alpha,\varepsilon}, \alpha (\nabla \Psi(\cdot,y_{\alpha,\varepsilon}))(x_{\alpha,\varepsilon}),\theta_{\varepsilon,\alpha}\right) > - \infty. \label{eqn:control_on_Gbasic_inf} \end{align} \label{itemize:funamental_inequality_control_upper_bound} In other words, the operator $\mathcal{G}$ evaluated in the proper momenta is eventually bounded from above and from below. \end{enumerate} We say that $\mathcal{G}$ satisfies the \textit{continuity estimate} if for every fundamental collection of variables we have % \begin{multline}\label{equation:Xi_negative_liminf} \liminf_{\varepsilon \rightarrow 0} \liminf_{\alpha \rightarrow \infty} \mathcal{G}\left(x_{\alpha,\varepsilon}, \alpha (\nabla \Psi(\cdot,y_{\alpha,\varepsilon}))(x_{\alpha,\varepsilon}),\theta_{\varepsilon,\alpha}\right) \\ - \mathcal{G}\left(y_{\alpha,\varepsilon}, - \alpha (\nabla \Psi(x_{\alpha,\varepsilon},\cdot))(y_{\alpha,\varepsilon}),\theta_{\varepsilon,\alpha}\right) \leq 0. \end{multline} \end{definition} The continuity estimate is a sensible notion because it is satisfied in a wide range of examples. Indeed, all our examples satisfy the continuity estimate., and in Section \ref{section:verification_of_continuity_estimate}, we verify the continuity estimate in three different contexts. In the appendix of~\cite{KraaijSchlottke2019}, we state a slightly more general continuity estimate on the basis of multiple penalization functions. For the first reading of the proofs below, the use of this more general setting would be distracting. We want to mention, however, that all arguments below can be carried out on the basis of this more elaborate continuity estimate. Following~\cite{Kr17} a continuity estimate of this more elaborate type can be established in the context of Markov jump processes and their fluxes. \smallskip Our first assumption essentially states that we can solve the comparison principle for the Hamilton-Jacobi equation for $\Lambda$ uniformly over compact sets in $\Theta$. In addition to this assumption, we assume \ref{item:assumption:slow_regularity:controlled_growth} which states the function $\Lambda$ grows roughly equally fast in $p$ for different control variables. \begin{assumption}\label{assumption:results:regularity_of_V} The function $\Lambda:E\times\mathbb{R}^d\times\Theta\to\mathbb{R}$ in the Hamiltonian~\eqref{eq:results:variational_hamiltonian} satisfies the following. \begin{enumerate}[label=($\Lambda$\arabic*)] \item \label{item:assumption:slow_regularity:continuity} The map $\Lambda : E\times\mathbb{R}^d\times\Theta\to\mathbb{R}$ is continuous and for any $(x,p)$, we have boundedness: $\|\Lambda(x,p,\cdot)\|_{\Theta}:= \sup_{\theta\in\Theta}|\Lambda(x,p,\theta)| < \infty$. \item \label{item:assumption:slow_regularity:convexity} For any $x\in E$ and $\theta\in\Theta$, the map $p\mapsto \Lambda(x,p,\theta)$ is convex. For $p_0=0$, we have $\Lambda(x,p_0,\theta) = 0$ for all $x\in E$ and all $\theta \in \Theta$. \item \label{item:assumption:slow_regularity:compact_containment} There exists a containment function $\Upsilon : E \to [0,\infty)$ in the sense of Definition~\ref{def:results:compact-containment}. \item \label{item:assumption:slow_regularity:continuity_estimate} The function $\Lambda$ satisfies the continuity estimate. % \item \label{item:assumption:slow_regularity:controlled_growth} For every compact set $K \subseteq E$, there exist constants $M, C_1, C_2 \geq 0$ such that for all $x \in K$, $p \in \mathbb{R}^d$ and all $\theta_1,\theta_2\in\Theta$, we have \begin{equation*} \Lambda(x,p,\theta_1) \leq \max\left\{M,C_1 \Lambda(x,p,\theta_2) + C_2\right\}. \end{equation*} \end{enumerate} \end{assumption} Our next assumption is on the regularity of the cost functional $\mathcal{I}$. They are satisfied for continuous and bounded $\mathcal{I}$ and $\Theta$ a compact space. \begin{assumption}\label{assumption:results:regularity_I} The functional $\mathcal{I}:E\times\Theta \to [0,\infty]$ in~\eqref{eq:results:variational_hamiltonian} satisfies the following. \begin{enumerate}[label=($\mathcal{I}$\arabic*)] \item \label{item:assumption:I:lsc} The map $(x,\theta) \mapsto \mathcal{I}(x,\theta)$ is lower semi-continuous on $E \times \Theta$. \item \label{item:assumption:I:zero-measure} For any $x\in E$, there exists a point $\theta_x\in\Theta$ such that $\mathcal{I}(x,\theta_x) = 0$. \item \label{item:assumption:I:compact-sublevelsets} For any $x \in E$, compact set $K \subseteq E$ and $C \geq 0$ the set $\left\{\theta \in \Theta \, \middle| \mathcal{I}(x,\theta) \leq C\right\}$ is compact and $\cup_{x\in K}\left\{\theta\in\Theta \, \middle| \, \mathcal{I}(x,\theta) \leq C\right\}$ is relatively compact. \item \label{item:assumption:I:finiteness} For any converging sequence $x_n \to x$ in $E$ and sequence $\theta_n \in \Theta$, if there is an $M > 0$ such that $\mathcal{I}(x_n,\theta_n) \leq M < \infty$ for all $n \in \mathbb{N}$, then there exists a neighborhood $U_x$ of $x$ and a constant $M' > 0$ such that for any $y \in U_x$ and $n \in \mathbb{N}$, \begin{equation*} \mathcal{I}(y,\theta_n) \leq M' < \infty. \end{equation*} \item \label{item:assumption:I:equi-cont} For every compact set $K \subseteq E$ and each $M \geq 0$ the collection of functions $\{\mathcal{I}(\cdot,\theta)\}_{\theta \in \Theta_M}$ with \begin{equation*} \Theta_{M} := \left\{\theta\in\Theta \, \middle| \, \forall \, x \in K: \, \mathcal{I}(x,\theta) \leq M \right\} \end{equation*} is equicontinuous. That is: for all $\varepsilon > 0$, there is a $\delta > 0$ such that for all $\theta \in \Theta_M$ and $x,y \in K$ such that $d(x,y) \leq \delta$ we have $|\mathcal{I}(x,\theta) - \mathcal{I}(y,\theta)| \leq \varepsilon$. \end{enumerate} \end{assumption} \begin{remark}[Gamma-convergence] The assumptions on $\mathcal{I}$ imply that for any sequence $x_n\to x$ in $E$, the functionals defined by $\mathcal{I}_n(\theta):=\mathcal{I}(x_n,\theta)$ $\Gamma$-converge to $\mathcal{I}_\infty$ defined by $\mathcal{I}_\infty(\theta) := \mathcal{I}(x,\theta)$. We give a proof in Proposition \ref{prop:Gamma-convergence-of-I} below. \end{remark} We turn to Theorem \ref{theorem:existence_of_viscosity_solution}. A key ingredient in establishing the existence of a viscosity solution to Hamilton-Jacobi equations is the existence of `optimally' controlled paths. The optimal controls can, for continuously differentiable Hamiltonians, be found from the Hamiltonian flow. In our context, $\mathcal{H}$ is not continuously differentiable. We will show in Proposition \ref{prop:reg-of-H-and-L:reg-H}, however, that $\mathcal{H}$ is convex in $p$. We can therefore define the subdifferential set \begin{multline} \label{eqn:subdifferential_H} \partial_p \mathcal{H}(x_0,p_0) \\ := \left\{ \xi \in \mathbb{R}^d \,:\, \mathcal{H}(x_0,p) \geq \mathcal{H}(x_0,p_0) + \xi \cdot (p-p_0) \quad (\forall p \in \mathbb{R}^d) \right\}. \end{multline} Instead using solutions arising from the differential equation arising from the gradient of $\mathcal{H}$, we will use solutions to differential inclusions arising from $\partial_p \mathcal{H}$. As our set $E$ is not necessarily equal to $\mathbb{R}^d$, but could be, e.g. a domain with corners like $[0,\infty)^d$, we need some conditions to make sure that the solutions to our differential inclusions remain within $E$. Assumption \ref{assumption:Hamiltonian_vector_field} below will make sure that the Hamiltonian vector field points `inside' $E$. \begin{definition} \label{definition:tangent_cone} The tangent cone (sometimes also called \textit{Bouligand cotingent cone}) to $E$ in $\mathbb{R}^d$ at $x$ is \begin{equation*} T_E(x) := \left\{z \in \mathbb{R}^d \, \middle| \, \liminf_{\lambda \downarrow 0} \frac{d(y + \lambda z, E)}{\lambda} = 0\right\}. \end{equation*} \end{definition} \begin{assumption} \label{assumption:Hamiltonian_vector_field} The map $\mathcal{H} : E \times \mathbb{R}^d \rightarrow \mathbb{R}$ defined in~\eqref{eq:results:variational_hamiltonian} is such that $\partial_p \mathcal{H}(x,p) \subseteq T_E(x)$ for all $p$. \end{assumption} Assumption \ref{assumption:Hamiltonian_vector_field} is intuitively implied by the comparison principle for $\mathbf{H}$. We therefore expect Assumption \ref{assumption:Hamiltonian_vector_field} to be satisfied in any situation in which Theorem \ref{theorem:comparison_principle_variational} holds. We argue in a simple case why this is to be expected. The main reason is that the comparison principle for $\mathbf{H}$ builds upon the \emph{maximum principle}. \smallskip Let $E = [0,1]$ and $f,g \in C^1_b(E)$. Suppose that $f(0) - g(0) = \sup_x f(x) - g(x)$. As $0$ is a boundary point, we conclude that $f'(0) \leq g'(0)$. If the maximum principle holds, we must have \begin{equation*} \mathcal{H}(0,f'(0)) = Hf(0) \leq Hg(0) = \mathcal{H}(0,g'(0)). \end{equation*} Hence the map $p \mapsto \mathcal{H}(0,p)$ is increasing, which just means \begin{equation*} \partial_p \mathcal{H}(x,p)) \subseteq [0,\infty) = T_{[0,1]}(0). \end{equation*} \subsection{Examples of Hamiltonians} \label{section:examples-H} The purpose of this section is to demonstrate via different examples that the method introduced is versatile enough to capture a variety of interesting examples. Propositions~\ref{prop:diffusion-coupled-to-jumps} and~\ref{prop:diffusion-coupled-to-diffusion} correspond to the Hamiltonian that one encounters in two-scale systems as studied in~\cite{BudhirajaDupuisGanguly2018,KumarPopovic2017}. The example of Proposition~\ref{prop:mean-field-coupled-to-diffusion} arises in models of mean-field interacting particles that are coupled to fast external variables, whose Hamiltonians can not be treated with standard methods. Recall the form of the Hamiltonian, \begin{equation}\label{eq:results:H-example-section} \mathcal{H}(x,p) = \sup_{\theta \in \Theta}\left[\Lambda(x,p,\theta) - \mathcal{I}(x,\theta)\right], \end{equation} Each definition below corresponds to a specification of the elements involved in~\eqref{eq:results:H-example-section}. All propositions are proven in Section~\ref{section:verification-for-examples-of-Hamiltonians}, by verifying the general Assumptions~\ref{assumption:results:regularity_of_V} and~\ref{assumption:results:regularity_I} on the functions~$\Lambda$ and~$\mathcal{I}$. Let us start with Hamiltonians arising from a diffusion process coupled to a fast jump process. \begin{proposition}[Diffusion coupled to jumps]\label{prop:diffusion-coupled-to-jumps} Let $E=\mathbb{R}^d$ and $F=\{1,\dots,J\}$ be a finite set. Suppose the following. \begin{enumerate}[label=(\roman*)] \item The set of control variables is $\Theta:=\mathcal{P}(\{1,\dots,J\})$, that is probability measures over the finite set $F$. \item The function $\Lambda$ is given by \begin{equation*} \Lambda(x,p,\theta) := \sum_{i\in F}\left[\ip{a(x,i)p}{p}+\ip{b(x,i)}{p}\right]\theta_i, \end{equation*} where $a:E\times F\to\mathbb{R}^{d\times d}$ and $b:E\times F\to\mathbb{R}^d$, and $\theta_i:=\theta(\{i\})$. \item The cost function $\mathcal{I}:E\times\Theta\to[0,\infty)$ is given by \begin{equation*} \mathcal{I}(x,\theta) := \sup_{w\in\mathbb{R}^J}\sum_{ij}r(i,j,x)\theta_i \left[1-e^{w_j-w_i}\right], \end{equation*} with non-negative rates $r:F^2\times E\to[0,\infty)$. \end{enumerate} Suppose that the cost function~$\mathcal{I}$ satisfies the assumptions of Proposition~\ref{prop:verify:DV-for-Jumps} and the function~$\Lambda$ satisfies the assumptions of Proposition~\ref{prop:verify-ex:Lambda_quadratic}. Then Theorems~\ref{theorem:comparison_principle_variational} and~\ref{theorem:existence_of_viscosity_solution} apply to the Hamiltonian~\eqref{eq:results:H-example-section}. \end{proposition} Under irreducibility conditions on the rates, as assumed below in Proposition~\ref{prop:verify:DV-for-Jumps}, by~\cite{DonskerVaradhan75} the Hamiltonian~$\mathcal{H}(x,p)$ is the principal eigenvalue of the matrix $A_{x,p} \in \mathrm{Mat}_{J \times J}(\mathbb{R})$ given by \[ A_{x,p} = \mathrm{diag}\left[\ip{a(x,1)p}{p}+\ip{b(x,1)}{p}, \dots, \ip{a(x,J)p}{p}+\ip{b(x,J)}{p}\right] + R_x, \] where $x,p \in \mathbb{R}^d$ and $R_x$ is the matrix with~$(R_x)_{ii} = -\sum_{j \neq i} r_{ij}(x)$ on the diagonal and $(R_x)_{ij} = r_{ij}(x)$ for $i \neq j$. \smallskip The next Hamiltonian arises from a diffusion process coupled to a diffusion. \begin{proposition}[Diffusion coupled to diffusion]\label{prop:diffusion-coupled-to-diffusion} Let $E=\mathbb{R}^d$ and $F$ be a smooth compact Riemannian manifold without boundary. Suppose the following. \begin{enumerate}[label=(\roman*)] \item The set of control variables $\Theta$ equals the space $\mathcal{P}(F)$. \item The function $\Lambda$ is given by \begin{equation*} \Lambda(x,p,\theta) := \int_F\left[\ip{a(x,z)p}{p}+\ip{b(x,z)}{p}\right]\,d\theta(z), \end{equation*} with $a:E\times F\to\mathbb{R}^{d\times d}$ and $b:E\times F\to\mathbb{R}^d$. \item The cost function $\mathcal{I}:E\times\Theta\to[0,\infty]$ is given by \begin{equation*} \mathcal{I}(x,\theta) := \sup_{\substack{u\in \mathcal{D}(L_x)\\u>0}}\left[ -\int_F \frac{L_xu}{u}\,d\theta\right], \end{equation*} where $L_x$ is a second-order elliptic operator locally of the form \begin{equation*} L_x = \frac{1}{2}\nabla\cdot\left(a_x \nabla\right) + b_x\cdot \nabla, \end{equation*} on the domain $\mathcal{D}(L_x):=C^2(F)$, with positive-definite matrix $a_x$ and co-vectors $b_x$. \end{enumerate} Suppose that the cost function~$\mathcal{I}$ satisfies the assumptions of Proposition~\ref{prop:verify:DV-functional-of-drift-diffusion} and the function~$\Lambda$ satisfies the assumptions of Proposition~\ref{prop:verify-ex:Lambda_quadratic}. Then Theorems~\ref{theorem:comparison_principle_variational} and~\ref{theorem:existence_of_viscosity_solution} apply to the Hamiltonian~\eqref{eq:results:H-example-section}. \end{proposition} In the context of weakly interacting jump processes on a collection of states $\{1,\dots,q\}$ the dynamics of the empirical measures takes place on $\mathcal{P}(\{1,\dots,q\})$. Transitions occur over the bonds $(a,b) \in E^2$ with $a \neq b$. We denote the set of bonds with $\Gamma$. \begin{definition}[Proper kernel] \label{definition:proper_kernel} Let $v : \Gamma \times \mathcal{P}(\{1,\dots,q\}) \times \Theta \rightarrow \mathbb{R}^+$. We say that $v$ is a \textit{proper kernel} if $v$ is continuous and if for each $(a,b) \in \Gamma$, the map $(\mu,\theta) \mapsto v(a,b,\mu,\theta)$ is either identically equal to zero or satisfies the following two properties: \begin{enumerate}[(a)] \item $v(a,b,\mu,\theta) = 0$ if $\mu(a) = 0$ and $v(a,b,\mu,\theta) > 0$ for all $\mu$ with $\mu(a) > 0$. \item There exists a decomposition $v(a,b,\mu,\theta) = v_{\dagger}(a,b,\mu(a)) v_{\ddagger}(a,b,\mu,\theta)$ such that $v_{\dagger}$ is increasing in the third coordinate and such that $v_{\ddagger}(a,b,\cdot,\cdot)$ is continuous and satisfies $v_{\ddagger}(a,b,\mu,\theta) > 0$. \end{enumerate} \end{definition} A typical example of a proper kernel is given by \begin{equation*} v(a,b,\mu,\theta) = \mu(a) r(a,b,\theta) e^{ \partial_a V(\mu) - \partial_b V(\mu)}, \end{equation*} with $r > 0$ continuous and $V \in C^1_b(\mathcal{P}(\{1,\dots,q\})$. \begin{proposition}[Mean-field coupled to diffusion]\label{prop:mean-field-coupled-to-diffusion} Let the space $E$ be given by the embedding of $E:=\mathcal{P}(\{1,\dots,J\})\times[0,\infty)^\Gamma\subseteq \mathbb{R}^d$ and $F$ be a smooth compact Riemannian manifold without boundary. Suppose the following. \begin{enumerate}[label=(\roman*)] \item The set of control variables $\Theta$ equals $\mathcal{P}(F)$. \item The function $\Lambda$ is given by \begin{equation*} \Lambda((\mu,w),p,\theta) = \sum_{(a,b) \in \Gamma} v(a,b,\mu,\theta)\left[\exp\left\{p_b - p _a + p_{(a,b)} \right\} - 1 \right] \end{equation*} with a proper kernel $v$ in the sense of Definition~\ref{definition:proper_kernel}. \item The cost function $\mathcal{I}:E\times\Theta\to[0,\infty]$ is given by \begin{equation*} \mathcal{I}(x,\theta) := \sup_{\substack{u\in \mathcal{D}(L_x)\\u>0}}\left[ -\int_F \frac{L_xu}{u}\,d\theta\right], \end{equation*} where $L_x$ is a second-order elliptic operator locally of the form \begin{equation*} L_x = \frac{1}{2}\nabla\cdot\left(a_x \nabla\right) + b_x\cdot \nabla, \end{equation*} on the domain $\mathcal{D}(L_x):=C^2(F)$, with positive-definite matrix $a_x$ and co-vectors $b_x$. \end{enumerate} Suppose that the cost function~$\mathcal{I}$ satisfies the assumptions of Proposition~\ref{prop:verify:DV-functional-of-drift-diffusion} and the function~$\Lambda$ satisfies the assumptions of Proposition~\ref{prop:verify-ex:Lambda_exponential}. Then Theorems~\ref{theorem:comparison_principle_variational} and~\ref{theorem:existence_of_viscosity_solution} apply to the Hamiltonian~\eqref{eq:results:H-example-section}. \end{proposition} An analogous proposition can be formulated for mean-field particles coupled to jumps as in Proposition~\ref{prop:diffusion-coupled-to-jumps}. \section{Strategy of the proofs} \label{section:strategy} We comment on the overall strategy of proofs. In Section~\ref{section:bootstrap-argument-in-nutshell}, we explain informally without the details how the bootstrap argument works in a simple setting in which $E$ is taken to be compact. This allows us to focus on the bootstrapping argument without having to bother with the reduction to compact sets. We proceed with a discussion on the existence of a viscosity solution in Section~\ref{section:strategy_existence_viscosity_solution}. \subsection{The bootstrap argument in a nutshell} \label{section:bootstrap-argument-in-nutshell} In this section, we explain informally the main bootstrapping idea behind proving the comparison principle with Hamiltonians of the type~\eqref{eq:results:variational_hamiltonian} for \begin{equation*} u(x)-\mathcal{H}(x,\nabla u(x)) = 0, \end{equation*} assuming compactness of $E$ and $\Psi(x,y) = \frac{1}{2}|x-y|^2$. In what follows, $u_1$ is a subsolution and $u_2$ is a supersolution. Recall that for smooth functions $f$, if $(u_1-f)$ is maximal at a point $x$, then \begin{equation*} u_1(x) -\mathcal{H}(x,\nabla f(x)) \leq 0. \end{equation*} Similarly for the supersolution $u_2$: If $(f-u_2)$ is maximal at a point $y$, then \begin{equation*} u_2(y)-\mathcal{H}(y,\nabla f(y)) \geq 0. \end{equation*} We sketch how to prove $u_1\leq u_2$ in several steps. \begin{enumerate}[label=(\roman*)] \item By the classical doubling of variables procedure (e.g. \cite{CIL92}), choosing for each $\alpha > 0$ points $x_{\alpha},y_\alpha$ such that \begin{equation*} u_1(x_\alpha) - u_2(y_\alpha) - \alpha \Psi(x_\alpha,y_\alpha) = \sup_{x,y \in E} u_1(x) - u_2(y) - \alpha \Psi(x,y), \end{equation*} then by the properties of $\Psi$, we have \begin{equation} \label{eqn:informal_control_Psi} \alpha \Psi(x_\alpha,y_\alpha) \rightarrow 0 \end{equation} and the difference $\sup_x u_1(x) - u_2(x)$ can be approximated as \begin{equation*} \sup(u_1-u_2) \leq \liminf_{\alpha \rightarrow \infty} u_1(x_\alpha) - u_2(y_\alpha). \end{equation*} Set $p_\alpha := \alpha(x_\alpha - y_\alpha)$. Using the subsolution inequality $u_1(x_\alpha)\leq \mathcal{H}(x_\alpha,p_\alpha)$ and the supersolution inequality $u_2(y_\alpha) \geq \mathcal{H}(y_\alpha,p_\alpha)$, one arrives at the estimate \begin{equation*} \sup(u_1-u_2) \leq \liminf_{\alpha \rightarrow \infty} \mathcal{H}(x_\alpha,p_\alpha)-\mathcal{H}(y_\alpha,p_\alpha). \end{equation*} \item Recall that the Hamiltonian is given by \begin{equation*} \mathcal{H}(x,p) = \sup_{\theta\in\Theta}\left[\Lambda(x,p,\theta) - \mathcal{I}(x,\theta)\right]. \end{equation*} Taking the optimizer $\theta_\alpha$ for $\mathcal{H}(x_\alpha,p_\alpha)$ and estimating the Hamiltonian at $y_\alpha$ with this optimizer, we obtain \begin{multline*} \sup(u_1-u_2) \leq \\ \liminf_{\alpha \rightarrow \infty} \left[\Lambda(x_\alpha,p_\alpha,\theta_\alpha) - \Lambda(y_\alpha,p_\alpha,\theta_\alpha)\right] + \left[ \mathcal{I}(y_\alpha,\theta_\alpha)- \mathcal{I}(x_\alpha,\theta_\alpha)\right]. \end{multline*} \item \label{item:informal_continuity_estimate} We assume the \emph{continuity estimate} on $\Lambda$. That means that if we have \begin{align} & \alpha \Psi(x_\alpha,y_\alpha) \rightarrow 0 \label{eqn:informal_control_cont_estimate1} \\ & \liminf_{\alpha\to\infty}\Lambda(x_\alpha,p_\alpha,\theta_\alpha) > -\infty, \label{eqn:informal_control_cont_estimate2} \\ & \limsup_{\alpha\to\infty}\Lambda(y_\alpha,p_\alpha,\theta_\alpha) < \infty, \label{eqn:informal_control_cont_estimate3} \end{align} and that $\theta_{\alpha}$ are in a compact set, then the difference of $\Lambda$'s is controlled as \begin{equation*} \liminf_{\alpha\to\infty}\left[\Lambda(x_\alpha,p_\alpha,\theta_\alpha) - \Lambda(y_\alpha,p_\alpha,\theta_\alpha)\right] \leq 0. \end{equation*} We postpone the verification that $\theta_{\alpha}$ are in a compact set to the next step \ref{item:informal_boundedness_I} below. Part~\eqref{eqn:informal_control_cont_estimate1} is just what we already know~\eqref{eqn:informal_control_Psi}. We show how the other two bounds follow from the sub- and supersolution inequalities. By the subsolution inequality, \begin{equation*} u_1(x_\alpha) \leq \mathcal{H}(x_\alpha,p_\alpha) = \Lambda(x_\alpha,p_\alpha,\theta_\alpha) - \mathcal{I}(x_\alpha,\theta_\alpha) \leq \Lambda(x_\alpha,p_\alpha,\theta_\alpha), \end{equation*} and~\eqref{eqn:informal_control_cont_estimate2} follows since $u_1$ is bounded. Letting $\theta_\alpha^0$ be the control variable such that $\mathcal{I}(y_\alpha,\theta_\alpha^0) = 0$, we obtain from the supersolution inequality that \begin{equation} \label{eqn:informal_supersolution_bound} u_2(y_\alpha) \geq \mathcal{H}(y_\alpha,p_\alpha) \geq \Lambda(y_\alpha,p_\alpha,\theta_\alpha^0), \end{equation} and therefore $\Lambda(y_\alpha,p_\alpha,\theta_\alpha^0)$ is bounded above. Assuming that \begin{equation*} \Lambda(y_\alpha,p_\alpha,\theta_\alpha) \leq C_1 \Lambda(y_\alpha,p_\alpha,\theta_\alpha^0) + C_2, \end{equation*} the bound~\eqref{eqn:informal_control_cont_estimate3} follows. In summary, if indeed $\theta_{\alpha}$ are in a compact set, taking the $\liminf_{\alpha\to\infty}$ in the last estimate on $(u_1-u_2)$, we obtain \begin{equation*} \sup(u_1-u_2) \leq 0 + \liminf_{\alpha\to\infty}\left[\mathcal{I}(y_\alpha,\theta_\alpha)- \mathcal{I}(x_\alpha,\theta_\alpha)\right]. \end{equation*} \item \label{item:informal_boundedness_I} We assume that if the cost functions are uniformly bounded, \begin{equation} \label{eqn:informal_bounds_on_I} \mathcal{I}(x_\alpha,\theta_\alpha) \leq M \quad \text{and} \quad \mathcal{I}(y_\alpha,\theta_\alpha) \leq M, \end{equation} then (1) the control variables $\theta_\alpha$ are in a compact set, implying that we can carry out the argument of step~\ref{item:informal_continuity_estimate} above, and (2) the cost functions are continuous as a function of the internal variables $x$, giving \begin{equation*} \limsup_{\alpha\to\infty}\left[\mathcal{I}(y_\alpha,\theta_\alpha)- \mathcal{I}(x_\alpha,\theta_\alpha)\right] = 0. \end{equation*} The required bounds on $\mathcal{I}$ in~\eqref{eqn:informal_bounds_on_I} follow as well from the sub- and supersolution inequalities. From the subsolution inequality, we have \begin{equation*} u_1(x_\alpha) \leq \mathcal{H}(x_\alpha,p_\alpha) = \Lambda(x_\alpha,p_\alpha,\theta_\alpha) - \mathcal{I}(x_\alpha,\theta_\alpha). \end{equation*} Thus the bound on $\mathcal{I}(x_\alpha,\theta_\alpha)$ follows if we establish an upper bound on $\Lambda(x_\alpha,p_\alpha,\theta_\alpha)$. Note that \begin{equation*} \Lambda(x_\alpha,p_\alpha,\theta_\alpha) \leq C_1 \Lambda(x_\alpha,p_\alpha,\theta_\alpha^0) + C_2 \end{equation*} and \begin{equation*} \Lambda(x_\alpha,p_\alpha,\theta_\alpha^0) = \Lambda(y_\alpha,p_\alpha,\theta_\alpha^0) + \left[\Lambda(x_\alpha,p_\alpha,\theta_\alpha^0)-\Lambda(y_\alpha,p_\alpha,\theta_\alpha^0)\right]. \end{equation*} We have an upper bound for the first term on the right-hand side by \eqref{eqn:informal_supersolution_bound}. The second term is bounded above by the continuity estimate, which can be carried out as we know that the $\theta_{\alpha}^0$ are in a compact set because they satisfy $\mathcal{I}(y_\alpha,\theta_{\alpha}^0) = 0$. Since $y_\alpha$ is close to $x_\alpha$ and $\mathcal{I}$ is continuous as a function of $x$ when bounded, the bound on $\mathcal{I}(x_\alpha,\theta_\alpha)$ carries over to $\mathcal{I}(y_\alpha,\theta_\alpha)$. \end{enumerate} In summary, by using the information contained in the sub- and supersolution inequalities, the continuity estimate of the functions $\Lambda$ bootstraps to a continuity estimate of $\mathcal{H}$, giving the comparison principle. \subsection{Proof of the existence of a viscosity solution}\label{section:strategy_existence_viscosity_solution} For the existence of a viscosity solution to $f - \lambda \mathbf{H} f = h$, we will use the results of Chapter 8 of \cite{FengKurtz2006}. We will briefly discuss the method to obtain this result. To establish that $R(\lambda)h$ given by~\eqref{HJB:eq:resolvent} yields a viscosity solution to $f - \lambda \mathbf{H} f = h$, we follow a general strategy, first used in \cite{FengKurtz2006} and summarized in a more general context in~\cite[Proposition~3.4]{Kraaij2019GenConv}. For this strategy, we need to check three properties (see also~Section~\ref{BG:sec:semigroup-flow-HJ-eq} of Chapter~2): \begin{enumerate}[(a)] \item For all $(f,g) \in \mathbf{H}$, we have $f = R(\lambda)(f - \lambda g)$ ; \item The operator $R(\lambda)$ is a pseudo-resolvent: for all $h \in C_b(E)$ and $0 < \alpha < \beta$ we have \begin{equation*} R(\beta)h = R(\alpha) \left(R(\beta)h - \alpha \frac{R(\beta)h - h}{\beta} \right). \end{equation*} \item The operator $R(\lambda)$ is contractive. \end{enumerate} In other words: if $R(\lambda)$ serves as a classical left-inverse to $\mathbbm{1} - \lambda \mathbf{H}$ and is also a pseudo-resolvent, then it is a viscosity right-inverse of $(\mathbbm{1}- \lambda \mathbf{H})$. Establishing (c) is a matter of writing out the definition. The proof of (a) and (b) stems from two main properties of exponential random variable. Let~$\tau_\lambda$ be the measure on~$\mathbb{R}^+$ corresponding to the exponential random variable with mean~$\lambda^{-1}$. \begin{itemize} \item (a) is related to integration by parts: for bounded measurable functions $z$ on $\mathbb{R}^+$, we have \begin{equation*} \lambda \int_0^\infty z(t) \, \tau_\lambda( \mathrm{d} t) = \int_0^\infty \int_0^t z(s) \, \mathrm{d} s \, \tau_\lambda( \mathrm{d} t). \end{equation*} \item (b) is related to a more involved integral property of exponential random variables. For $0 < \alpha < \beta$, we have \begin{multline*} \int_0^\infty z(s) \tau_\beta( \mathrm{d} s) \\ = \frac{\alpha}{\beta} \int_0^\infty z(s) \tau_\alpha( \mathrm{d} s) + \left(1 - \frac{\alpha}{\beta}\right) \int_0^\infty \int_0^\infty z(s+u) \, \tau_\beta( \mathrm{d} u) \, \tau_\alpha( \mathrm{d} s). \end{multline*} \end{itemize} Establishing (a) and (b) can then be reduced by a careful analysis of optimizers in the definition of $R(\lambda)$, and concatenation or splittings thereof. This was carried out in Chapter 8 of \cite{FengKurtz2006} on the basis of three assumptions, namely \cite[Assumptions 8.9, 8.10 and 8.11]{FengKurtz2006}. We verify these in Section~\ref{section:construction-of-viscosity-solutions}. \section{Regularity of the Hamiltonian} \label{section:regularity-of-H-and-L} In this section, we establish continuity, convexity and the existence of a containment function for the Hamiltonian $\mathcal{H}$ of \ref{eq:results:variational_hamiltonian}. We repeat its definition for convenience: \begin{equation} \label{eqn:regularity_section_H_variational_rep} \mathcal{H}(x,p) = \sup_{\theta \in \Theta}\left[\Lambda(x,p,\theta) - \mathcal{I}(x,\theta)\right]. \end{equation} \begin{proposition}[Regularity of the Hamiltonian]\label{prop:reg-of-H-and-L:reg-H} Let $\mathcal{H} : E \times \mathbb{R}^d\to \mathbb{R}$ be the Hamiltonian as in \eqref{eqn:regularity_section_H_variational_rep}, and suppose that Assumptions~\ref{assumption:results:regularity_of_V} and~\ref{assumption:results:regularity_I} are satisfied. Then: \begin{enumerate}[label=(\roman*)] \item \label{item:prop:reg-of-H-and-L:convex} For any $x \in E$, the map $p \mapsto \mathcal{H}(x,p)$ is convex and $\mathcal{H}(x,0) = 0$. \item \label{item:prop:reg-of-H-and-L:compact-contain} With the containment function $\Upsilon : E \to \mathbb{R}$ of~\ref{item:assumption:slow_regularity:compact_containment}, we have \[ \sup_{x \in E}\mathcal{H}(x,\nabla\Upsilon(x)) \leq C_\Upsilon < \infty. \] \end{enumerate} \end{proposition} \begin{proof}[Proof] The map $p \mapsto \mathcal{H}(x,p)$ is convex as it is the supremum over convex functions. \smallskip For proving $\mathcal{H}(x,0) = 0$, let $x \in E$. Then by~\ref{item:assumption:slow_regularity:convexity} of Assumption~\ref{assumption:results:regularity_of_V}, we have $\Lambda(x,0,\theta) = 0$, and therefore % \[ \mathcal{H}(x,0) = - \inf_{\theta\in\Theta} \mathcal{I}(x,\theta) = 0, \] % since $\mathcal{I} \geq 0$ and $\mathcal{I}(x,\theta_x)=0$ for some $\theta_x$ by~\ref{item:assumption:I:zero-measure} of Assumption~\ref{assumption:results:regularity_I}. Regarding~\ref{item:prop:reg-of-H-and-L:compact-contain}, we note that by~\ref{item:assumption:slow_regularity:compact_containment}, \begin{align*} \mathcal{H}(x,\nabla \Upsilon(x)) \leq \sup_\theta \Lambda(x,\nabla \Upsilon(x),\theta) \leq \sup_{\theta\in\Theta}\sup_{x \in E} \Lambda(x,\nabla \Upsilon(x),\theta) \leq C_\Upsilon. \end{align*} \end{proof} To prove that $\mathcal{H}$ is continuous, we use Assumption \ref{assumption:results:regularity_I}. What we truly need, however, is that $\mathcal{I}$ Gamma converges as a function of $x$. We establish this result first. \begin{proposition}[Gamma convergence of the cost functions]\label{prop:Gamma-convergence-of-I} Let a cost function $\mathcal{I}:E\times\Theta\to[0,\infty]$ satisfy Assumption~\ref{assumption:results:regularity_I}. Then if $x_n\to x$ in $E$, the functionals $\mathcal{I}_n$ defined by \begin{equation*} \mathcal{I}_n(\theta) := \mathcal{I}(x_n,\theta) \end{equation*} converge in the $\Gamma$-sense to $\mathcal{I}_\infty(\theta) := \mathcal{I}(x,\theta)$. That is: \begin{enumerate} \item If $x_n \rightarrow x$ and $\theta_n \rightarrow \theta$, then $\liminf_{n\to\infty} \mathcal{I}(x_n,\theta_n) \geq \mathcal{I}(x,\theta)$, \item For $x_n \rightarrow x$ and all $\theta \in \Theta$ there are $\theta_n \in \Theta$ such that \[ \theta_n \rightarrow \theta\quad\text{and}\quad \limsup_{n\to\infty} \mathcal{I}(x_n,\theta_n) \leq \mathcal{I}(x,\theta). \] \end{enumerate} \end{proposition} \begin{proof}[Proof] Let $x_n\to x$. If $\theta_n\to \theta$, then by lower semicontinuity~\ref{item:assumption:I:lsc}, \begin{equation*} \liminf_{n\to\infty}\mathcal{I}(x_n,\theta_n) \geq \mathcal{I}(x,\theta). \end{equation*} For the $\text{lim-sup}$ bound, let $\theta\in\Theta$. If $\mathcal{I}(x,\theta)=\infty$, there is nothing to prove. Thus suppose that $\mathcal{I}(x,\theta)$ is finite. Then by~\ref{item:assumption:I:finiteness}, there is a neighborhood $U_x$ of $x$ and a constant $M < \infty$ such that for any $y\in U_x$, \begin{equation*} \mathcal{I}(y,\theta) \leq M. \end{equation*} Since $x_n\to x$, the $x_n$ are eventually contained in $U_x$. Taking the constant sequence $\theta_n:=\theta$, we thus get that $\mathcal{I}(x_n,\theta_n) \leq M$ for all $n$ large enough. By~\ref{item:assumption:I:equi-cont}, \begin{equation*} \lim_{n\to\infty}|\mathcal{I}(x_n,\theta_n)-\mathcal{I}(x,\theta)| \leq 0, \end{equation*} and the $\text{lim-sup}$ bound follows. \end{proof} \begin{proposition}[Continuity of the Hamiltonian]\label{prop:reg-of-H-and-L:continuity} Let $\mathcal{H} : E \times \mathbb{R}^d\to \mathbb{R}$ be the Hamiltonian defined in~\eqref{eq:results:variational_hamiltonian}, and suppose that Assumptions~\ref{assumption:results:regularity_of_V} and~\ref{assumption:results:regularity_I} are satisfied. Then the map $(x,p) \mapsto \mathcal{H}(x,p)$ is continuous and the Lagrangian $(x,v) \mapsto \mathcal{L}(x,v) := \sup_{p} \ip{p}{v} - \mathcal{H}(x,p)$ is lower semi-continuous. \end{proposition} Before we start with the proof, we give a remark on the generality of its statement and on the assumption that $\Theta$ is Polish. \begin{remark} The proof of upper semi-continuity of $\mathcal{H}$ works in general, using continuity properties of $\Lambda$, lower semi-continuity of $(x,\theta) \mapsto I(x,\theta)$ and the compact sublevel sets of $\mathcal{I}(x,\cdot)$. To establish lower semi-continuity,we need the that the functionals $\mathcal{I}$ Gamma converge as a function of $x$. This was established in Proposition \ref{prop:Gamma-convergence-of-I}. \end{remark} \begin{remark} In the lemma we use a sequential characterization of upper hemi-continuity. This is inspired by the natural formulation of Gamma convergence in terms of sequences. An extension of our results to spaces $\Theta$ beyond the Polish context should take care of this issue. Without introducing the complicated matter, an extension is possible to Hausdorff $\Theta$ that are k-spaces in which all compact sets are metrizable. \end{remark} We will use the following technical result to establish upper semi-continuity of $\mathcal{H}$. \begin{lemma}[Lemma 17.30 in \cite{AlBo06}] \label{lemma:upper_semi_continuity_abstract} Let $\mathcal{X}$ and $\mathcal{Y}$ be two Polish spaces. Let $\phi : \mathcal{X} \rightarrow \mathcal{K}(\mathcal{Y})$, where $\mathcal{K}(\mathcal{Y})$ is the space of non-empty compact subsets of $\mathcal{Y}$. Suppose that $\phi$ is upper hemi-continuous, that is if $x_n \rightarrow x$ and $y_n \rightarrow y$ and $y_n \in \phi(x_n)$, then $y \in \phi(x)$. Let $f : \text{Graph} (\phi) \rightarrow \mathbb{R}$ be upper semi-continuous. Then the map defined by~$m(x) := \sup_{y \in \phi(x)} f(x,y)$ is upper semi-continuous. \end{lemma} \begin{proof}[Proof of Proposition~\ref{prop:reg-of-H-and-L:continuity}] We start by establishing upper semi-continuity of $\mathcal{H}$. We argue on the basis of Lemma \ref{lemma:upper_semi_continuity_abstract}. Recall the representation of $\mathcal{H}$ of \eqref{eqn:regularity_section_H_variational_rep}. Set $\mathcal{X} = E\times\mathbb{R}^d$ for the $(x,p)$ variables, $\mathcal{Y} = \Theta$, and $f(x,p,\theta) = \Lambda(x,p,\theta) - \mathcal{I}(x,\theta)$ and note that this function is upper semi-continuous by Assumption~\ref{assumption:results:regularity_I}~\ref{item:assumption:I:lsc} and by Assumption \ref{assumption:results:regularity_of_V}~\ref{item:assumption:slow_regularity:continuity}. \smallskip By Assumption \ref{assumption:results:regularity_I}~\ref{item:assumption:I:zero-measure}, we have $\mathcal{H}(x,p) \geq \Lambda(x,p,\theta_x)$. Thus, it suffices to restrict the supremum over $\theta \in \Theta$ to $\theta \in \phi(x,p)$ where \begin{equation*} \phi(x,p) := \left\{\theta \in \Theta \, \middle| \, \mathcal{I}(x,\theta) \leq 2 \vn{\Lambda(x,p,\cdot)}_\Theta \right\}, \end{equation*} in the sense that we have \begin{equation*} \mathcal{H}(x,p) = \sup_{\theta\in \phi(x,p)}\left[\Lambda(x,p,\theta)-\mathcal{I}(x,\theta)\right]. \end{equation*} $\phi(x,p)$ is non-empty as $\theta_x \in \phi(x,p)$ and it is compact due to Assumption \ref{assumption:results:regularity_I}~\ref{item:assumption:I:compact-sublevelsets}. We are left to show that $\phi$ is upper hemi-continuous. \smallskip Thus, let $(x_n,p_n,\theta_n) \rightarrow (x,p,\theta)$ with $\theta_n \in \phi(x_n,p_n)$. We establish that $\theta \in \phi(x,p)$. By \ref{item:assumption:I:lsc} and the definition of $\phi$ we find \begin{equation*} \mathcal{I}(x,\theta) \leq \liminf_n \mathcal{I}(x_n,\theta_n) \leq \liminf_n 2\vn{\Lambda(x_n,p_n,\cdot}_\Theta = 2 \vn{\Lambda(x,p,\cdot)}_\Theta \end{equation*} which implies indeed that $\theta \in \phi(x,p)$. Thus, upper semi-continuity follows by an application of Lemma \ref{lemma:upper_semi_continuity_abstract}. \smallskip We proceed with proving lower semi-continuity of $\mathcal{H}$. Suppose that $(x_n,p_n) \rightarrow (x,p)$, we prove that $\liminf_n \mathcal{H}(x_n,p_n) \geq \mathcal{H}(x,p)$. Let $\theta$ be the measure such that $\mathcal{H}(x,p) = \Lambda(x,p,\theta) - \mathcal{I}(x,\theta)$. We have \begin{itemize} \item By Proposition \ref{prop:Gamma-convergence-of-I} there are $\theta_n$ such that $\theta_n \rightarrow \theta$ and $\limsup_n \mathcal{I}(x_n,\theta_n) \leq \mathcal{I}(x,\theta)$. \item $\Lambda(x_n,p_n,\theta_n)$ converges to $\Lambda(x,p,\theta)$ by Assumption \ref{item:assumption:slow_regularity:continuity}. \end{itemize} Therefore, \begin{align*} \liminf_{n\to\infty}\mathcal{H}(x_n,p_n)&\geq \liminf_{n\to\infty} \left[\Lambda(x_n,p_n,\theta_n)-\mathcal{I}(x_n,\theta_n)\right]\\ &\geq \liminf_{n\to\infty}\Lambda(x_n,p_n,\theta_n)-\limsup_{n\to\infty}\mathcal{I}(x_n,\theta_n)\\ &\geq \Lambda(x,p,\theta)-\mathcal{I}(x,\theta) = \mathcal{H}(x,p), \end{align*} establishing that $\mathcal{H}$ is lower semi-continuous. \smallskip The Lagrangian $\mathcal{L}$ is obtained as the supremum over continuous functions. This implies $\mathcal{L}$ is lower semi-continuous. \end{proof} \section{The comparison principle} \label{section:comparison_principle} In this section, we establish the comparison principle for $f - \lambda \mathbf{H} f = h$ in the context of Theorem \ref{theorem:comparison_principle_variational}, using the general strategy of Section \ref{section:bootstrap-argument-in-nutshell}. Before being able to use this strategy, we need to restrict our analysis to compact sets in $E$. We will use a classical penalization technique that we will write down in operator form. \smallskip We thus introduce two new operators $H_\dagger$ and $H_\ddagger$, which are defined in terms of $\mathcal{H}$ and the containment function $\Upsilon$ from Assumption \ref{assumption:results:regularity_of_V} \ref{item:assumption:slow_regularity:compact_containment}. We will then show that the comparison principle holds for a pair of Hamilton-Jacobi equations in terms of $H_\dagger$ and $H_\ddagger$. This procedure allows us to clearly separate the reduction to compact sets on one hand, and the proof of the comparison principle on the basis of the bootstrap procedure on the other. Schematically, we will establish the following diagram: \begin{center} \begin{tikzpicture} \matrix (m) [matrix of math nodes,row sep=1em,column sep=4em,minimum width=2em] { { } &[7mm] H_\dagger \\ \mathbf{H} & { } \\ { } & H_\ddagger \\}; \path[-stealth] (m-2-1) edge node [above] {sub \qquad { }} (m-1-2) (m-2-1) edge node [below] {super \qquad { }} (m-3-2); \begin{pgfonlayer}{background} \node at (m-2-2) [rectangle,draw=blue!50,fill=blue!20,rounded corners, minimum width=1cm, minimum height=2.5cm] {comparison}; \end{pgfonlayer} \end{tikzpicture} \end{center} In this diagram, an arrow connecting an operator $A$ with operator $B$ with subscript 'sub' means that viscosity subsolutions of $f - \lambda A f = h$ are also viscosity subsolutions of $f - \lambda B f = h$. Similarly for arrows with a subscript 'super'. \smallskip We introduce the operators $H_\dagger$ and $H_\ddagger$ in Section~\ref{subsection:definition_of_Hamiltonians}. The arrows will be established in Section \ref{subsection:implications_from_compact_containment}. Finally, we will establish the comparison principle for $H_\dagger$ and $H_\ddagger$ in Section~\ref{subsection:proof_of_comparison_principle}, which by the arrows implies the comparison principle for $\mathbf{H}$. \begin{proof}[Proof of Theorem~\ref{theorem:comparison_principle_variational}] Fix $h_1,h_2 \in C_b(E)$ and $\lambda > 0$. \smallskip Let $u_1,u_2$ be a viscosity sub- and supersolution to $f - \lambda \mathbf{H} f = h_1$ and $f - \lambda \mathbf{H} f = h_2$ respectively. By Lemma \ref{lemma:viscosity_solutions_compactify2} proven in Section~\ref{subsection:implications_from_compact_containment}, $u_1$ and $u_2$ are a sub- and supersolution to $f - \lambda H_\dagger f = h_1$ and $f - \lambda H_\ddagger f = h_2$ respectively. Thus $\sup_E u_1 - u_2 \leq \sup_E h_1 - h_2$ by Proposition~\ref{prop:CP} of Section~\ref{subsection:proof_of_comparison_principle}. Specialising to $h_1=h_2$ gives Theorem~\ref{theorem:comparison_principle_variational}. \end{proof} \subsection{Definition of auxiliary operators} \label{subsection:definition_of_Hamiltonians} In this section, we repeat the definition of $\mathbf{H}$, and introduce the operators $H_\dagger$ and $H_\ddagger$. \begin{definition} \label{definition_effectiveH} The operator $\mathbf{H} \subseteq C_b^1(E) \times C_b(E)$ has domain $\mathcal{D}(\mathbf{H}) = C_{cc}^\infty(E)$ and satisfies $\mathbf{H} f(x) = \mathcal{H}(x, \mathrm{d} f(x))$, where $\mathcal{H}$ is the map \begin{equation*} \mathcal{H}(x,p) = \sup_{\theta \in \Theta}\left[\Lambda(x,p,\theta) - \mathcal{I}(x,\theta)\right]. \end{equation*} \end{definition} We proceed by introducing $H_\dagger$ and $H_\ddagger$. These new Hamiltonians will serve as natural upper and lower bound for $\mathbf{H}$. They are defined in terms of the containment function $\Upsilon$, and essentially allow us to restrict our analysis to compact sets. \smallskip For the following definition, recall Assumption~\ref{item:assumption:slow_regularity:compact_containment} and the constant $C_\Upsilon := \sup_{\theta}\sup_x \Lambda(x,\nabla \Upsilon(x),\theta)$ therein. Denote by $C_\ell^\infty(E)$ the set of smooth functions on $E$ that have a lower bound and by $C_u^\infty(E)$ the set of smooth functions on $E$ that have an upper bound. \begin{definition}[The operators $H_\dagger$ and $H_\ddagger$] For $f \in C_\ell^\infty(E)$ and $\varepsilon \in (0,1)$ set \begin{gather*} f^\varepsilon_\dagger := (1-\varepsilon) f + \varepsilon \Upsilon \\ H_{\dagger,f}^\varepsilon(x) := (1-\varepsilon) \mathcal{H}(x,\nabla f(x)) + \varepsilon C_\Upsilon. \end{gather*} and set \begin{equation*} H_\dagger := \left\{(f^\varepsilon_\dagger,H_{\dagger,f}^\varepsilon) \, \middle| \, f \in C_\ell^\infty(E), \varepsilon \in (0,1) \right\}. \end{equation*} For $f \in C_u^\infty(E)$ and $\varepsilon \in (0,1)$ set \begin{gather*} f^\varepsilon_\ddagger := (1+\varepsilon) f - \varepsilon \Upsilon \\ H_{\ddagger,f}^\varepsilon(x) := (1+\varepsilon) \mathcal{H}(x,\nabla f(x)) - \varepsilon C_\Upsilon. \end{gather*} and set \begin{equation*} H_\ddagger := \left\{(f^\varepsilon_\ddagger,H_{\ddagger,f}^\varepsilon) \, \middle| \, f \in C_u^\infty(E), \varepsilon \in (0,1) \right\}. \end{equation*} \end{definition} \subsection{Implications based on compact containment} \label{subsection:implications_from_compact_containment} The operator $\mathbf{H}$ is related to $H_\dagger, H_\ddagger$ by the following Lemma. \begin{lemma}\label{lemma:viscosity_solutions_compactify2} Fix $\lambda > 0$ and $h \in C_b(E)$. \begin{enumerate}[(a)] \item Every subsolution to $f - \lambda \mathbf{H} f = h$ is also a subsolution to $f - \lambda H_\dagger f = h$. \item Every supersolution to $f - \lambda \mathbf{H} f = h$ is also a supersolution to~$f-\lambda H_\ddagger f=~h$. \end{enumerate} \end{lemma} We only prove (a) of Lemma~\ref{lemma:viscosity_solutions_compactify2}, as (b) can be carried out analogously. \begin{proof}[Proof] Fix $\lambda > 0$ and $h \in C_b(E)$. Let $u$ be a subsolution to $f - \lambda \mathbf{H}f = h$. We prove it is also a subsolution to $f - \lambda H_\dagger f = h$. \smallskip Fix $\varepsilon > 0 $ and $f\in C_\ell^\infty(E)$ such that $(f^\varepsilon_\dagger,H^\varepsilon_{\dagger,f,\phi}) \in H_\dagger$. We will prove that there are $x_n\in E$ such that \begin{gather} \lim_{n\to\infty}\left(u-f_\dagger^\varepsilon\right)(x_n) = \sup_{x\in E}\left(u-f_\dagger^\varepsilon\right),\label{eqn:proof_lemma_conditions_for_subsolution_first}\\ \limsup_{n\to\infty} \left[u(x_n)-\lambda H_{\dagger,f}^\varepsilon(x_n) - h(x_n)\right]\leq 0.\label{eqn:proof_lemma_conditions_for_subsolution_second} \end{gather} As the function $\left[u -(1-\varepsilon)f\right]$ is bounded from above and $\varepsilon \Upsilon$ has compact sublevel-sets, the sequence $x_n$ along which the first limit is attained can be assumed to lie in the compact set \begin{equation*} K := \left\{x \, | \, \Upsilon(x) \leq \varepsilon^{-1} \sup_x \left(u(x) - (1-\varepsilon)f(x) \right)\right\}. \end{equation*} Set $M = \varepsilon^{-1} \sup_x \left(u(x) - (1-\varepsilon)f(x) \right)$. Let $\gamma : \mathbb{R} \rightarrow \mathbb{R}$ be a smooth increasing function such that \begin{equation*} \gamma(r) = \begin{cases} r & \text{if } r \leq M, \\ M + 1 & \text{if } r \geq M+2. \end{cases} \end{equation*} Denote by $f_\varepsilon$ the function on $E$ defined by \begin{equation*} f_\varepsilon(x) := \gamma\left((1-\varepsilon)f(x) + \varepsilon \Upsilon(x) \right). \end{equation*} By construction $f_\varepsilon$ is smooth and constant outside of a compact set and thus lies in $\mathcal{D}(H) = C_{cc}^\infty(E)$. As $u$ is a viscosity subsolution for $f - \lambda Hf = h$ there exists a sequence $x_n \in K \subseteq E$ (by our choice of $K$) with \begin{gather} \lim_n \left(u-f_\varepsilon\right)(x_n) = \sup_x \left(u-f_\varepsilon\right)(x), \label{eqn:visc_subsol_sup} \\ \limsup_n \left[u(x_n) - \lambda \mathbf{H} f_\varepsilon(x_n) - h(x_n)\right] \leq 0. \label{eqn:visc_subsol_upperbound} \end{gather} As $f_\varepsilon$ equals $f_\dagger^\varepsilon$ on $K$, we have from \eqref{eqn:visc_subsol_sup} that also \begin{equation*} \lim_n \left(u-f_\dagger^\varepsilon\right)(x_n) = \sup_{x\in E}\left(u-f_\dagger^\varepsilon\right), \end{equation*} establishing~\eqref{eqn:proof_lemma_conditions_for_subsolution_first}. Convexity of $p \mapsto \mathcal{H}(x,p)$ yields for arbitrary points $x\in K$ the estimate \begin{align*} \mathbf{H} f_\varepsilon(x) &= \mathcal{H}(x,\nabla f_\varepsilon(x)) \\ & \leq (1-\varepsilon) \mathcal{H}(x,\nabla f(x)) + \varepsilon \mathcal{H}(x,\nabla \Upsilon(x)) \\ &\leq (1-\varepsilon) \mathcal{H}(x,\nabla f(x)) + \varepsilon C_\Upsilon = H^\varepsilon_{\dagger,f}(x). \end{align*} Combining this inequality with \eqref{eqn:visc_subsol_upperbound} yields \begin{multline*} \limsup_n \left[u(x_n) - \lambda H^\varepsilon_{\dagger,f}(x_n) - h(x_n)\right] \\ \leq \limsup_n \left[u(x_n) - \lambda \mathbf{H} f_\varepsilon(x_n) - h(x_n)\right] \leq 0, \end{multline*} establishing \eqref{eqn:proof_lemma_conditions_for_subsolution_second}. This concludes the proof. \end{proof} \subsection{The comparison principle} \label{subsection:proof_of_comparison_principle} In this section, we prove the comparison principle for the operators $H_\dagger$ and $H_\ddagger$. \begin{proposition}\label{prop:CP} Fix $\lambda > 0$ and $h_1,h_2 \in C_b(E)$. Let $u_1$ be a viscosity subsolution to $f - \lambda H_\dagger f = h_1$ and let $u_2$ be a viscosity supersolution to $f - \lambda H_\ddagger f = h_2$. Then we have $\sup_x u_1(x) - u_2(x) \leq \sup_x h_1(x) - h_2(x)$. \end{proposition} The proof uses an estimate that was proven in the proof of Proposition~A.11 of \cite{CoKr17} for one penalization function $\Psi$, or in the context of the more general continuity estimate of the Appendix of~\cite{KraaijSchlottke2019}, in the proof of Proposition~4.5 of \cite{Kr17} for two penalization functions $\{\Psi_1,\Psi_2\}$. In both contexts we use the containment function $\Upsilon$ of Assumption~\ref{assumption:results:regularity_of_V}, \ref{item:assumption:slow_regularity:compact_containment}. We start with a key result that allows us to find optimizing points that generalize the argument of Section \ref{section:bootstrap-argument-in-nutshell} to the non compact setting. \smallskip The result is a copy of Lemma A.11 of \cite{CoKr17}, which is in turn a variant of Lemma 9.2 in \cite{FengKurtz2006} and Proposition 3.7 in \cite{CIL92}. We have included it for completeness. \begin{lemma}\label{lemma:doubling_lemma} Let $u$ be bounded and upper semi-continuous, let $v$ be bounded and lower semi-continuous, let $\Psi : E^2 \rightarrow \mathbb{R}^+$ be penalization functions and let $\Upsilon$ be a containment function. \smallskip Fix $\varepsilon > 0$. For every $\alpha >0$ there exist $x_{\alpha,\varepsilon},y_{\alpha,\varepsilon} \in E$ such that \begin{multline} \label{eqn:existence_optimizers} \frac{u(x_{\alpha,\varepsilon})}{1-\varepsilon} - \frac{v(y_{\alpha,\varepsilon})}{1+\varepsilon} - \alpha \Psi(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon}) - \frac{\varepsilon}{1-\varepsilon}\Upsilon(x_{\alpha,\varepsilon}) -\frac{\varepsilon}{1+\varepsilon}\Upsilon(y_{\alpha,\varepsilon}) \\ = \sup_{x,y \in E} \left\{\frac{u(x)}{1-\varepsilon} - \frac{v(y)}{1+\varepsilon} - \alpha \Psi(x,y) - \frac{\varepsilon}{1-\varepsilon}\Upsilon(x) - \frac{\varepsilon}{1+\varepsilon}\Upsilon(y)\right\}. \end{multline} Additionally, for every $\varepsilon > 0$ we have that \begin{enumerate}[(a)] \item The set $\{x_{\alpha,\varepsilon}, y_{\alpha,\varepsilon} \, | \, \alpha > 0\}$ is relatively compact in $E$. % \item All limit points of $\{(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon})\}_{\alpha > 0}$ as $\alpha \rightarrow \infty$ are of the form $(z,z)$ and for these limit points we have $u(z) - v(z) = \sup_{x \in E} \left\{u(x) - v(x) \right\}$. % \item We have % \[ \lim_{\alpha \rightarrow \infty} \alpha \Psi(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon}) = 0. \] % \end{enumerate} \end{lemma} \begin{proof}[Proof of Proposition~\ref{prop:CP}] Fix $\lambda >0$ and $h_1,h_2 \in C_b(E)$. Let $u_1$ be a viscosity subsolution and $u_2$ be a viscosity supersolution of $f - \lambda H_\dagger f = h_1$ and $f - \lambda H_\ddagger f = h_2$ respectively. We prove Theorem~\ref{prop:CP} in two steps. \smallskip \underline{\emph{Step 1}}: We prove that for $\varepsilon > 0 $ and $\alpha > 0$, there exist points $x_{\varepsilon,\alpha},y_{\varepsilon,\alpha} \in E$ and momenta $p_{\varepsilon,\alpha}^1,p_{\varepsilon,\alpha}^2 \in \mathbb{R}^d$ such that \begin{multline} \label{eqn:estimate_step_1} \sup_E(u_1-u_2) \leq \lambda \liminf_{\varepsilon\to 0}\liminf_{\alpha \to \infty} \left[\mathcal{H}(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha}) - \mathcal{H}(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha})\right] \\ + \sup_{E}(h_1 - h_2). \end{multline} This step is solely based on the sub- and supersolution properties of $u_1,u_2$, the continuous differentiability of the penalization function $\Psi(x,y)$, the containment function $\Upsilon$, and convexity of $p \mapsto \mathcal{H}(x,p)$. \smallskip \underline{\emph{Step 2}}: Using Assumptions~\ref{assumption:results:regularity_of_V} and~\ref{assumption:results:regularity_I}, we prove that \begin{equation*} \liminf_{\varepsilon\to 0}\liminf_{\alpha \to \infty} \left[\mathcal{H}(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha}) - \mathcal{H}(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha})\right] \leq 0. \end{equation*} \smallskip \underline{\emph{Proof of Step 1}}: For any $\varepsilon > 0$ and any $\alpha > 0$, define the map $\Phi_{\varepsilon,\alpha}: E \times E \to \mathbb{R}$ by \begin{equation*} \Phi_{\varepsilon,\alpha}(x,y) := \frac{u_1(x)}{1-\varepsilon} - \frac{u_2(y)}{1+\varepsilon} - \alpha \Psi(x,y) - \frac{\varepsilon}{1-\varepsilon} \Upsilon(x) - \frac{\varepsilon}{1+\varepsilon}\Upsilon(y). \end{equation*} Let $\varepsilon > 0$. By Lemma \ref{lemma:doubling_lemma}, there is a compact set $K_\varepsilon \subseteq E$ and there exist points $x_{\varepsilon,\alpha},y_{\varepsilon,\alpha} \in K_\varepsilon$ such that \begin{equation} \label{eqn:comparison_optimizers} \Phi_{\varepsilon,\alpha}(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha}) = \sup_{x,y \in E} \Phi_{\varepsilon,\alpha}(x,y), \end{equation} and \begin{equation}\label{eq:proof-CP:Psi-xy-converge} \lim_{\alpha \to \infty} \alpha \Psi(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha}) = 0. \end{equation} As in the proof of Proposition~A.11 of~\cite{Kr17}, it follows that \begin{equation}\label{eq:proof-CP:general-bound-u1u2} \sup_E (u_1 - u_2) \leq \liminf_{\varepsilon \to 0} \liminf_{\alpha \to \infty} \left[ \frac{u_1(x_{\varepsilon,\alpha})}{1-\varepsilon} - \frac{u_2(y_{\varepsilon,\alpha})}{1+\varepsilon}\right]. \end{equation} At this point, we want to use the sub- and supersolution properties of $u_1$ and $u_2$. Define the test functions $\varphi^{\varepsilon,\alpha}_1 \in \mathcal{D}(H_\dagger), \varphi^{\varepsilon,\alpha}_2 \in \mathcal{D}(H_\ddagger)$ by \begin{multline*} \varphi^{\varepsilon,\alpha}_1(x):=(1-\varepsilon) \bigg[\frac{u_2(y_{\varepsilon,\alpha})}{1+\varepsilon} + \alpha \Psi(x,y_{\varepsilon,\alpha}) + \frac{\varepsilon}{1-\varepsilon}\Upsilon(x) + \frac{\varepsilon}{1+\varepsilon}\Upsilon(y_{\varepsilon,\alpha})\\ + (1-\varepsilon)(x-x_{\varepsilon,\alpha})^2\bigg] \end{multline*} and \begin{multline*} \varphi^{\varepsilon,\alpha}_2(y):= (1+\varepsilon)\bigg[\frac{u_1(x_{\varepsilon,\alpha})}{1-\varepsilon} - \alpha \Psi(x_{\varepsilon,\alpha},y) - \frac{\varepsilon}{1-\varepsilon}\Upsilon(x_{\varepsilon,\alpha}) - \frac{\varepsilon}{1+\varepsilon}\Upsilon(y)\\-(1+\varepsilon) (y-y_{\varepsilon,\alpha})^2\bigg]. \end{multline*} Using \eqref{eqn:comparison_optimizers}, we find that $u_1 - \varphi^{\varepsilon,\alpha}_1$ attains its supremum at $x = x_{\varepsilon,\alpha}$, and thus \begin{equation*} \sup_E (u_1-\varphi^{\varepsilon,\alpha}_1) = (u_1-\varphi^{\varepsilon,\alpha}_1)(x_{\varepsilon,\alpha}). \end{equation*} Denote $p_{\varepsilon,\alpha}^1 := \alpha \nabla_x \Psi(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha})$. By our addition of the penalization $(x-x_{\varepsilon,\alpha})^2$ to the test function, the point $x_{\varepsilon,\alpha}$ is in fact the unique optimizer, and we obtain from the subsolution inequality that \begin{equation}\label{eq:proof-CP:subsol-ineq} u_1(x_{\varepsilon,\alpha}) - \lambda \left[ (1-\varepsilon) \mathcal{H}\left(x_{\varepsilon,\alpha}, p_{\varepsilon,\alpha}^1 \right) + \varepsilon C_\Upsilon\right] \leq h_1(x_{\varepsilon,\alpha}). \end{equation} With a similar argument for $u_2$ and $\varphi^{\varepsilon,\alpha}_2$, we obtain by the supersolution inequality that \begin{equation}\label{eq:proof-CP:supersol-ineq} u_2(y_{\varepsilon,\alpha}) - \lambda \left[(1+\varepsilon)\mathcal{H}\left(y_{\varepsilon,\alpha}, p_{\varepsilon,\alpha}^2 \right) - \varepsilon C_\Upsilon\right] \geq h_2(y_{\varepsilon,\alpha}), \end{equation} where $p_{\varepsilon,\alpha}^2 := -\alpha \nabla_y \Psi(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha})$. With that, estimating further in~\eqref{eq:proof-CP:general-bound-u1u2} leads to \begin{multline*} \sup_E(u_1-u_2) \leq \liminf_{\varepsilon\to 0}\liminf_{\alpha \to \infty} \bigg[\frac{h_1(x_{\varepsilon,\alpha})}{1-\varepsilon} - \frac{h_2(y_{\varepsilon,\alpha})}{1+\varepsilon} + \frac{\varepsilon}{1-\varepsilon} C_\Upsilon \\ + \frac{\varepsilon}{1+\varepsilon} C_\Upsilon + \lambda \left[\mathcal{H}(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha}) - \mathcal{H}(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha})\right]\bigg]. \end{multline*} Thus, \eqref{eqn:estimate_step_1} in Step 1 follows. \smallskip \underline{\emph{Proof of Step 2}}: Recall that $\mathcal{H}(x,p)$ is given by \begin{equation*} \mathcal{H}(x,p) = \sup_{\theta \in \Theta}\left[\Lambda(x,p,\theta) - \mathcal{I}(x,\theta)\right]. \end{equation*} Since $\Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\cdot) : \Theta \to \mathbb{R}$ is bounded and continuous by \ref{item:assumption:slow_regularity:continuity} and the map $\mathcal{I}(x_{\varepsilon,\alpha},\cdot) : \Theta \to [0,\infty]$ has compact sub-level sets in $\Theta$ by~\ref{item:assumption:I:compact-sublevelsets}, there exists an optimizer $\theta_{\varepsilon,\alpha} \in\Theta$ such that \begin{equation} \label{eqn:choice_of_optimal_measure} \mathcal{H}(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha}) = \Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) - \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}). \end{equation} Choosing the same point in the supremum of the second term $\mathcal{H}(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha})$, we obtain for all $\varepsilon > 0$ and $\alpha > 0$ the estimate \begin{multline} \label{eqn:basic_decomposition_Hamitlonian_difference} \mathcal{H}(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha})- \mathcal{H}(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha}) \leq \Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha})- \Lambda(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha})\\ +\mathcal{I}(y_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha})- \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}). \end{multline} We will establish an upper bound for this difference using the continuity estimate \ref{item:assumption:slow_regularity:continuity_estimate} and equi-continuity \ref{item:assumption:I:equi-cont}. \smallskip To apply the continuity estimate \ref{item:assumption:slow_regularity:continuity_estimate}, we need to verify \eqref{eqn:control_on_Gbasic_sup} and \eqref{eqn:control_on_Gbasic_inf} (see \eqref{eq:proof-CP:Vx-unif-bound-below} and \eqref{eq:proof-CP:Vy-unif-bound-above} below) for the variables $\theta_{\varepsilon,\alpha}$. In addition, we need to establish that $\theta_{\varepsilon,\theta}$ are contained in a compact set. \smallskip To apply \ref{item:assumption:I:equi-cont}, we need to control the size of $\mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha})$ and $\mathcal{I}(y_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha})$ along subsequences, which by Assumption \ref{item:assumption:I:compact-sublevelsets} implies the above requirement that along these subsequences $\theta_{\varepsilon,\theta}$ are contained in a compact set. To obtain control on the size of $\mathcal{I}$, we employ an auxiliary argument based on the continuity estimate for the measures $\theta_{\varepsilon,\alpha}^0$, obtained by \ref{item:assumption:I:zero-measure}, satisfying \begin{equation}\label{eqn:choice_of_zero_measure} \mathcal{I}(y_{\alpha,\varepsilon},\theta_{\varepsilon,\alpha}^0) = 0. \end{equation} The application of the continuity estimate for $\theta_{\varepsilon,\alpha}^0$ only requires to check \eqref{eqn:control_on_Gbasic_sup} and \eqref{eqn:control_on_Gbasic_inf} as the measures $\theta_{\varepsilon,\alpha}^0$ are contained in a compact set by \eqref{eqn:choice_of_zero_measure} and~\ref{item:assumption:I:compact-sublevelsets}. Thus, we will first establish \begin{align} & \liminf_{\varepsilon \to 0}\liminf_{\alpha \to \infty} \Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) > - \infty,\label{eq:proof-CP:Vx-unif-bound-below} \\ & \liminf_{\varepsilon \to 0}\liminf_{\alpha \to \infty} \Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0) > - \infty, \label{eq:proof-CP:Vx-unif-bound-below_zero_measure} \\ & \limsup_{\varepsilon\to 0}\limsup_{\alpha \to \infty}\Lambda(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) < \infty, \label{eq:proof-CP:Vy-unif-bound-above} \\ & \limsup_{\varepsilon\to 0}\limsup_{\alpha \to \infty}\Lambda(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0) < \infty. \label{eq:proof-CP:Vy-unif-bound-above_zero_measure} \end{align} Note that by \ref{item:assumption:slow_regularity:controlled_growth} the bounds in \eqref{eq:proof-CP:Vx-unif-bound-below} and \eqref{eq:proof-CP:Vx-unif-bound-below_zero_measure} are equivalent. Similarly \eqref{eq:proof-CP:Vy-unif-bound-above} and \eqref{eq:proof-CP:Vy-unif-bound-above_zero_measure} are equivalent. \smallskip By the subsolution inequality~\eqref{eq:proof-CP:subsol-ineq}, \begin{align}\label{eq:proof-CP:estimate-via-subsol} \frac{1}{\lambda} \inf_E\left(u_1 - h\right) & \leq (1-\varepsilon) \mathcal{H}(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha}) + \varepsilon C_{\Upsilon} \\ &\leq (1-\varepsilon) \Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) + \varepsilon C_\Upsilon,\notag \end{align} and the lower bounds~\eqref{eq:proof-CP:Vx-unif-bound-below} and \eqref{eq:proof-CP:Vx-unif-bound-below_zero_measure} follow. \smallskip By the supersolution inequality~\eqref{eq:proof-CP:supersol-ineq}, we can estimate \begin{align*} (1+\varepsilon) \Lambda(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0) &= (1+\varepsilon) \left[\Lambda(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0) - \mathcal{I}(y_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0)\right] \\ &\leq \left((1+\varepsilon) \mathcal{H}\left(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha}\right) - \varepsilon C_\Upsilon\right) + \varepsilon C_\Upsilon \\ &\leq \frac{1}{\lambda} \sup_E (u_2-h) + \varepsilon C_{\Upsilon} < \infty, \end{align*} and the upper bounds~\eqref{eq:proof-CP:Vy-unif-bound-above} and \eqref{eq:proof-CP:Vy-unif-bound-above_zero_measure} follow. \smallskip Since the $\theta_{\varepsilon,\alpha}^0$ are contained in a compact set by~\ref{item:assumption:I:compact-sublevelsets}, we conclude by the continuity estimate~\ref{item:assumption:slow_regularity:continuity_estimate} that \begin{equation*} \liminf_{\varepsilon\to 0}\liminf_{\alpha\to\infty}\left[\Lambda\left(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0\right)-\Lambda\left(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0\right)\right]\leq 0. \end{equation*} Without loss of generality, we can choose for all small $\varepsilon$ subsequences $(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha})$ (denoted the same) such that also \begin{equation} \liminf_{\varepsilon\to 0}\limsup_{\alpha \to \infty} \left[\Lambda\left(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0\right)-\Lambda\left(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0\right)\right] \leq 0.\label{eqn:proof_comparison_application_continuity_estimate_zero_measures_strenghtened} \end{equation} We proceed to establish that along this collection of subsequences we have $\limsup_{\alpha \rightarrow \infty} \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) < \infty$. We return to the first inequality of \eqref{eq:proof-CP:estimate-via-subsol}, combined with \eqref{eqn:choice_of_optimal_measure}, to obtain \begin{align*} \frac{1}{\lambda} \inf_E\left(u_1 - h\right) & \leq (1-\varepsilon) \mathcal{H}(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha}) + \varepsilon C_{\Upsilon} \\ & = (1-\varepsilon) \left[\Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) - \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) \right] + \varepsilon C_{\Upsilon}. \end{align*} We conclude that $\limsup_{\alpha \rightarrow \infty} \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) < \infty$ is implied by \begin{equation*} \limsup_{\alpha \rightarrow \infty} \Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) < \infty \end{equation*} which by \ref{item:assumption:slow_regularity:controlled_growth} is equivalent to \begin{equation*} \limsup_{\alpha \rightarrow \infty} \Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0) < \infty. \end{equation*} This, however, yields what we want by \eqref{eq:proof-CP:Vy-unif-bound-above_zero_measure} and \eqref{eqn:proof_comparison_application_continuity_estimate_zero_measures_strenghtened}: \begin{multline*} \limsup_{\alpha \rightarrow \infty}\Lambda(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0) \leq \limsup_{\alpha \rightarrow \infty} \Lambda(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0) \\ \qquad + \limsup_{\alpha \rightarrow \infty} \left[\Lambda\left(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0\right)-\Lambda\left(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}^0\right)\right] < \infty. \end{multline*} We thus obtain \begin{equation*} \limsup_{\alpha \rightarrow \infty} \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) < \infty. \end{equation*} Therefore, by~\ref{item:assumption:I:compact-sublevelsets}, for each $\varepsilon > 0$ the $\theta_{\varepsilon,\alpha}$ are contained in a compact set. With the bounds~\eqref{eq:proof-CP:Vx-unif-bound-below} and~\eqref{eq:proof-CP:Vy-unif-bound-above}, we conclude by the continuity estimate~\ref{item:assumption:slow_regularity:continuity_estimate} that \begin{equation}\label{eq:proof-CP:final-bound-by-cont-estimate} \liminf_{\varepsilon\to 0}\liminf_{\alpha \to \infty} \left[\Lambda\left(x_{\varepsilon,\alpha},p^1_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}\right)-\Lambda\left(y_{\varepsilon,\alpha},p^2_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}\right)\right] \leq 0. \end{equation} By~\eqref{eq:proof-CP:Psi-xy-converge}, we have along a subsequence $(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha}) \to (z_\varepsilon,z_\varepsilon) \in K_\varepsilon \times K_\varepsilon$ as $\alpha \to \infty$. Therefore by~\ref{item:assumption:I:finiteness} there exists a subsequence of $(x_{\varepsilon,\alpha},y_{\varepsilon,\alpha})$ (denoted the same) and a constant $M_\varepsilon' < \infty$ such that for all $\alpha > 0$ large enough, \begin{equation*} \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) \leq M_\varepsilon' \quad \text{ and } \quad \mathcal{I}(y_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) \leq M_\varepsilon'. \end{equation*} Hence by~\ref{item:assumption:I:equi-cont}, for any $\varepsilon > 0$, \begin{equation}\label{eq:proof-CP:Iy-Ix-leq-0} \limsup_{\alpha \to \infty}|\mathcal{I}(y_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}) - \mathcal{I}(x_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha})| = 0. \end{equation} Then combining~\eqref{eq:proof-CP:final-bound-by-cont-estimate} with~\eqref{eq:proof-CP:Iy-Ix-leq-0} gives an estimate on \eqref{eqn:basic_decomposition_Hamitlonian_difference} which completes Step 2. \end{proof} \section{Construction of viscosity solutions} \label{section:construction-of-viscosity-solutions} In this Section, we will show that $R(\lambda)h$, for $h \in C_b(E), \lambda > 0$ of Theorem \ref{theorem:existence_of_viscosity_solution} is indeed a viscosity solution to $f - \lambda \mathbf{H} f = h$. To do so, we will use the methods of Chapter 8 of \cite{FengKurtz2006} which are based on the strategy laid out in Section \ref{section:strategy_existence_viscosity_solution}. \smallskip In particular, we will verify \cite[Conditions 8.9, 8.10 and 8.11]{FengKurtz2006} which imply by~\cite[Theorem 8.27]{FengKurtz2006} and the comparison principle for $f - \lambda \mathbf{H} f = h$ that $R(\lambda)h$ is a viscosity solution to $f - \lambda \mathbf{H} f = h$. \begin{proof}[Verification of Conditions 8.9, 8.10 and 8.11] In the notation of \cite{FengKurtz2006}, we use $U = \mathbb{R}^d$, $\Gamma = E \times U$, one operator $\mathbf{H} = \mathbf{H}_\dagger = \mathbf{H}_\ddagger$ and $Af(x,u) = \ip{\nabla f(x)}{u}$ for $f \in \mathcal{D}(\mathbf{H}) = C_{cc}^\infty(E)$. \smallskip Regarding Condition~8.9, by continuity and convexity of $\mathcal{H}$ obtained in Propositions \ref{prop:reg-of-H-and-L:reg-H} and \ref{prop:reg-of-H-and-L:continuity}, parts 8.9.1, 8.9.2, 8.9.3 and 8.9.5 can be proven e.g. as in the proof of \cite[Lemma 10.21]{FengKurtz2006} for $\psi = 1$. Part 8.9.4 is a consequence of the existence of a containment function, and follows as shown in the proof of~\cite[Theorem~A.17]{CoKr17}. Since we use the argument further below, we briefly recall it here. We need to show that for any compact set $K \subseteq E$, any finite time $T > 0$ and finite bound $M \geq 0$, there exists a compact set $K' = K'(K,T,M) \subseteq E$ such that for any absolutely continuous path $\gamma :[0,T] \to E$ with $\gamma(0) \in K$, if % \begin{equation} \label{eqn:control_on_L} \int_0^T \mathcal{L}(\gamma(t),\dot{\gamma}(t)) \, dt \leq M, \end{equation} % then $\gamma(t) \in K'$ for any $0\leq t \leq T$. \smallskip For $K\subseteq E$, $T>0$, $M\geq 0$ and $\gamma$ as above, this follows by noting that % \begin{align} \label{eq:action_integral_representation:Lyapunov_bound} \Upsilon(\gamma(\tau)) &= \Upsilon(\gamma(0)) + \int_0^\tau \nabla\Upsilon(\gamma(t)) \dot{\gamma}(t) \, dt \notag \\ &\leq \Upsilon(\gamma(0)) + \int_0^\tau \left[ \mathcal{L}(\gamma(t),\dot{\gamma}(t))) + \mathcal{H}(x(t),\nabla \Upsilon(\gamma(t))) \right] \, dt \notag \\ &\leq \sup_K \Upsilon + M + T \sup_{x \in E} \mathcal{H}(x,\nabla \Upsilon(x)) =: C < \infty, \end{align} % for any $0 \leq \tau \leq T$, so that the compact set $K' := \{z \in E \,:\, \Upsilon(z) \leq C\}$ satisfies the claim. \smallskip We proceed with the verification of Conditions~8.10 and 8.11 of~\cite{FengKurtz2006}. By Proposition~\ref{prop:reg-of-H-and-L:reg-H}, we have $\mathcal{H}(x,0) = 0$ and hence $\mathbf{H} 1 = 0$. Thus, Condition 8.10 is implied by Condition 8.11 (see Remark 8.12 (e) in~\cite{FengKurtz2006}). \smallskip We establish that Condition 8.11 is satisfied: for any function $f\in \mathcal{D}(\mathbf{H}) = C_{cc}^\infty(E)$ and $x_0 \in E$, there exists an absolutely continuous path $x:[0,\infty) \to E$ such that $x(0) = x_0$ and for any $t \geq 0$, \begin{equation} \label{eq:action_integral_representation:solution_control_problem} \int_0^t \mathcal{H}(x(s),\nabla f(x(s)) \, ds = \int_0^t \left[ \dot{x}(s) \cdot \nabla f(x(s)) - \mathcal{L}(x(s),\dot{x}(s)) \right] \, ds. \end{equation} To do so, we solve the differential inclusion \begin{equation} \label{eq:action_integral_representation:subdifferential_eq} \dot{x}(t) \in \partial_p \mathcal{H}(x(t),\nabla f(x(t))), \qquad x(0) = x_0, \end{equation} where the subdifferential of $\mathcal{H}$ was defined in \eqref{eqn:subdifferential_H} on page \pageref{eqn:subdifferential_H}. \smallskip Since the addition of a constant to $f$ does not change the gradient, we may assume without loss of generality that $f$ has compact support. A general method to establish existence of differential inclusions~$\dot{x} \in F(x)$ is given by Lemma 5.1 of Deimling~\cite{De92}. We use this result for $F(x) := \partial_p \mathcal{H}(x,\nabla f(x))$. To apply this lemma, we need to verify that: % \begin{enumerate}[(F1)] \item $F$ is upper hemi-continuous and $F(x)$ is non-empty, closed, and convex for all $x \in E$. \item $\|F(x)\| \leq c(1 + |x|)$ on $E$, for some $c > 0$. \item $F(x) \cap T_E(x) \neq \emptyset$ for all $x \in E$. (The Definition~\ref{definition:tangent_cone} of~$T_E(x)$ is given on page~\pageref{eqn:subdifferential_H} of this thesis). \end{enumerate} % While part (F1) follows from the properties of a subdifferential set and (F3) is a consequence of Assumption \ref{assumption:Hamiltonian_vector_field}, part (F2) is in general not satisfied. To circumvent this problem, we use properties of $\mathcal{H}$ to establish a-priori bounds on the range of solutions. \smallskip \emph{Step 1:} Let $T > 0$, and assume that $x(t)$ solves \eqref{eq:action_integral_representation:subdifferential_eq}. We establish that there is some $M$ such that~\eqref{eqn:control_on_L} is satisfied. By~\eqref{eq:action_integral_representation:subdifferential_eq} we obtain for all $p \in \mathbb{R}^d$, % \[ \mathcal{H}(x(t),p) \geq \mathcal{H}(x(t),\nabla f(x(t))) + \dot{x}(t) \cdot (p - \nabla f(x(t))), \] % and as a consequence % \[ \dot{x}(t) \nabla f(x(t)) - \mathcal{H}(x(t),\nabla f(x(t))) \geq \mathcal{L}(x(t),\dot{x}(t)). \] % Since $f$ has compact support and $\mathcal{H}(y,0) = 0$ for any $y \in E$, we estimate % \begin{align*} \int_0^T \mathcal{L}(x(t),\dot{x}(t)) \, ds &\leq \int_0^T \dot{x}(t) \nabla f(x(t)) \, dt - T\inf_{y \in \mathrm{supp}(f)} \mathcal{H}(y,\nabla f(y)). \end{align*} % By continuity of $\mathcal{H}$ the field $F$ is bounded on compact sets, so the first term can be bounded by % \[ \int_0^T \dot{x}(t) \nabla f(x(t)) \, dt \leq T \sup_{y \in \mathrm{supp}(f)}\|F(y)\| \sup_{z \in \mathrm{supp}(f)}|\nabla f(z)|. \] % Therefore, for any $T>0$, we obtain that the integral over the Lagrangian is bounded from above by $M = M(T)$, with % \[ M := T \sup_{y \in \mathrm{supp}(f)}\|F(y)\| \sup_{z \in \mathrm{supp}(f)}|\nabla f(z)| - \inf_{y \in \mathrm{supp}(f)} \mathcal{H}(y,\nabla f(y)). \] From the first part of the, see the argument concluding after \eqref{eq:action_integral_representation:Lyapunov_bound}, we find that the solution $x(t)$ remains in the compact set \begin{equation} \label{eqn:containment_set_existence} K' := \left\{ z \in E \, \middle| \, \Upsilon(z) \leq C \right\}, \quad C := \Upsilon(x_0) + M + T \sup_x \mathcal{H}(x,\nabla \Upsilon(x)), \end{equation} for all $t \in [0,T]$. \smallskip \emph{Step 2}: We prove that there exists a solution $x(t)$ of \eqref{eq:action_integral_representation:subdifferential_eq} on $[0,T]$. % Using $F$, we define a new multi-valued vector-field $F'(z)$ that equals $F(z) = \partial_p \mathcal{H}(z,\nabla f(z))$ inside $K'$, but equals $\{0\}$ outside a neighborhood of $K$. This can e.g. be achieved by multiplying with a smooth cut-off function $g_{K'} : E \to [0,1]$ that is equal to one on $K'$ and zero outside of a neighborhood of $K'$. \smallskip The field $F'$ satisfies (F1), (F2) and (F3) from above, and hence there exists an absolutely continuous path $y : [0,\infty) \to E$ such that $y(0) = x_0$ and for almost every $t \geq 0$, % \[ \dot{y}(t) \in F'(y(t)). \] % By the estimate established in step 1 and the fact that $\Upsilon(\gamma(t)) \leq C$ for any $0 \leq t \leq T$, it follows from the argument as shown above in \eqref{eq:action_integral_representation:Lyapunov_bound} that the solution $y$ stays in $K'$ up to time $T$. Since on $K'$, we have $F' = F$, this implies that setting $x = y|_{[0,T]}$, we obtain a solution $x(t)$ of \eqref{eq:action_integral_representation:subdifferential_eq} on the time interval $[0,T]$. \end{proof} \section{Verification for examples of Hamiltonians} \label{section:verification-for-examples-of-Hamiltonians} In this section, we verify the conditions on $\Lambda$ and $\mathcal{I}$ for the example Hamiltonians of Section~\ref{section:examples-H}. Since the conditions on the functions~$\Lambda$ and~$\mathcal{I}$ are independent of each other, we verify these conditions separately. In Section \ref{section:verify-ex:cost-functions}, we consider Assumption \ref{assumption:results:regularity_I} for $\mathcal{I}$. In Sections \ref{section:verify-ex:functions-Lambda}, we consider Assumption \ref{assumption:results:regularity_of_V} for $\Lambda$. The continuity estimates will be verified separately in Section \ref{section:verification_of_continuity_estimate}. \subsection{Verifying assumptions for cost functions $\mathcal{I}$} \label{section:verify-ex:cost-functions} We verify Assumption~\ref{assumption:results:regularity_I} for two types of cost functions $\mathcal{I}(x,\theta)$, corresponding to the examples of Section~\ref{section:examples-H}. \smallskip We start by considering the case in which the cost function is the large-deviation rate function for the occupation-time measures of jump process taking values in a finite set $\{1,\dots,J\}$ (e.g.~\cite{donsker1975asymptoticI,denHollander2000}). We follow this example in Proposition~\ref{prop:verify:DV-functional-of-drift-diffusion} in which the cost function stems from occupation-time large deviations of a drift-diffusion process on a compact manifold, see e.g. \cite{DonskerVaradhan75,Pi07}. We expect these results to extend also to non-compact spaces, but we feel this is better suited for a separate work. \begin{proposition}[Donsker-Varadhan functional for jump processes] \label{prop:verify:DV-for-Jumps} Consider a finite set $F = \{1,\dots,J\}$ and let $\Theta := \mathcal{P}(\{1,\dots,J\})$ be the set of probability measures on $F$. For $x\in E$, let $L_x : C_b(F) \rightarrow C_b(F)$ be the operator given by \begin{equation*} L_x f(i) := \sum_{j=1}^Jr(i,j,x)\left[f(j)-f(i)\right],\quad f :\{1,\dots,J\}\to\mathbb{R}. \end{equation*} Suppose that the rates $r:\{1,\dots,J\}^2\times E \rightarrow \mathbb{R}^+$ are continuous as a function on $E$ and moreover satisfy the following: \begin{enumerate}[label=(\roman*)] \item For any $x\in E$, the matrix $R(x)$ with entries $R(x)_{ij} := r(i,j,x)$ for $i\neq j$ and $R(x)_{ii} = -\sum_{j\neq i}r(i,j,x)$ is irreducible. \item For each pair $(i,j)$, we either have $r(i,j,\cdot)\equiv 0$ or for each compact set $K\subseteq E$, it holds that \begin{equation*} r_{K}(i,j) := \inf_{x\in K}r(i,j,x) > 0. \end{equation*} \end{enumerate} Then the Donsker-Varadhan functional $\mathcal{I}:E\times\Theta \rightarrow \mathbb{R}^+$ defined by \begin{equation*} \mathcal{I}(x,\theta) := \sup_{w\in\mathbb{R}^J}\sum_{ij}r(i,j,x)\theta_i \left[1-e^{w_j-w_i}\right] \end{equation*} satisfies Assumption~\ref{assumption:results:regularity_I}. \end{proposition} \begin{proof}[Proof] \underline{\ref{item:assumption:I:lsc}}: For a fixed vector $w\in\mathbb{R}^J$, the map \begin{equation*} (x,\theta)\mapsto \sum_{ij}r(i,j,x)\theta_i \left[1-e^{w_j-w_i}\right] \end{equation*} is continuous on $E\times\Theta$. Hence $\mathcal{I}(x,\theta)$ is lower semicontinuous as the supremum over continuous functions. \smallskip \underline{\ref{item:assumption:I:zero-measure}}: Let $x\in E$. First note that for all $\theta$, the choice $w = 0$ implies that $\mathcal{I}(x,\theta) \geq 0$. By the irreducibility assumption on the rates $r(i,j,x)$, there exists a unique measure $\theta_x\in\Theta$ such that for any $f:\{1,\dots,J\}\to\mathbb{R}$, \begin{equation} \label{eqn:example_jump_DV_stationarity} \sum_i L_x f(i) \theta_x(i)=0. \end{equation} We establish $\mathcal{I}(x,\theta_x) = 0$. Let $w \in \mathbb{R}^J$. By the elementary estimate \begin{equation*} \left(1-e^{b - a}\right)\leq -(b-a) \quad \text{ for all } \; a,b > 0, \end{equation*} we obtain \begin{align*} \sum_{ij}r(i,j,x) \theta_x(i) \left(1-e^{w_j - w_i}\right) &\leq -\sum_{ij}r(i,j,x) \theta_x(i) \left(w_j - w_i \right)\\ &= -\sum_i (L_x w)(i) \theta_x(i) \overset{\eqref{eqn:example_jump_DV_stationarity}}{=} 0 \end{align*} Since $\mathcal{I} \geq 0$, this implies $\mathcal{I}(x,\theta_x) = 0$. \smallskip \underline{\ref{item:assumption:I:compact-sublevelsets}}: Any closed subset of $\Theta$ is compact. \smallskip \underline{\ref{item:assumption:I:finiteness}}: Let $x_n\to x$ in $E$. It follows that the sequence is contained in some compact set $K \subseteq E$ that contains the $x_n$ and $x$ in its interior. For any $y\in K$, \begin{equation*} \mathcal{I}(y,\theta) \leq \sum_{ij, i \neq j} r(i,j,y) \theta_i \leq \sum_{ij, i\neq j} r(i,j,y) \leq \sum_{ij, i \neq j} \bar{r}_{ij}, \quad \bar{r}_{ij} := \sup_{y \in K} r(i,j,y). \end{equation*} Hence $\mathcal{I}$ is uniformly bounded on $K\times\Theta$, and~\ref{item:assumption:I:finiteness} follows with $U_x$ the interior of $K$. \smallskip \underline{\ref{item:assumption:I:equi-cont}}: Let $d$ be some metric that metrizes the topology of $E$. We will prove that for any compact set $K\subseteq E$ and $\varepsilon > 0$ there is some $\delta > 0$ such that for all $x,y \in K$ with $d(x,y) \leq \delta$ and for all $\theta \in \mathcal{P}(F)$, we have \begin{equation} \label{eqn:proof_equi_cont_I} |\mathcal{I}(x,\theta) - \mathcal{I}(y,\theta)| \leq \varepsilon. \end{equation} Let $x,y \in K$. By continuity of the rates the $\mathcal{I}(x,\cdot)$ are uniformly bounded for $x \in K$: \begin{equation*} 0 \leq \mathcal{I}(x,\theta) \leq \sum_{ij, i \neq j} r(i,j,x) \theta_i \leq \sum_{ij, i\neq j} r(i,j,x) \leq \sum_{ij, i \neq j} \bar{r}_{ij}, \quad \bar{r}_{ij} := \sup_{x \in K} r(i,j,x). \end{equation*} For any $n \in \mathbb{N}$, there exists $w^n \in \mathbb{R}^J$ such that \begin{equation*} 0 \leq \mathcal{I}(x,\theta) \leq \sum_{ij, i \neq j} r_{ij}(x) \theta_i (1 - e^{w^n_j - w^n_i}) + \frac{1}{n}. \end{equation*} By reorganizing, we find for all bonds $(a,b)$ the bound \begin{equation*} \theta_a e^{w^n_b - w^n_a} \leq \frac{1}{r_{K,a,b}} \left[ \sum_{ij, i \neq j, a \neq i, b \neq j} r(i,j,x)\theta_i + \frac{1}{n} \right] \leq \frac{1}{r_{K,a,b}} \left[ \sum_{ij, i \neq j} \bar{r}_{ij} + \frac{1}{n} \right]. \end{equation*} Thereby, evaluating in $\mathcal{I}(y,\theta)$ the same vector $w^n$ to estimate the supremum, \begin{align*} & \mathcal{I}(x,\theta) - \mathcal{I}(y,\theta) \\ &\leq \frac{1}{n} + \sum_{ab, a\neq b} r(a,b,x) \theta_a (1 - e^{w^n_b - w^n_a}) - \sum_{ab, a\neq b} r(a,b,y) \theta_a (1 - e^{w^n_b - w^n_a}) \\ &\leq \frac{1}{n} + \sum_{ab, a\neq b} |r(a,b,x) - r(a,b,y)| \theta_a + \sum_{ab, a\neq b} |r(a,b,y) - r(a,b,x)| \theta_a e^{w^n_b - w^n_a} \\ &\leq \frac{1}{n} + \sum_{ab, a\neq b}|r(a,b,x) - r(a,b,y)| \left( 1 + \frac{1}{r_{K,a,b}} \left[\sum_{ij, i \neq j} \bar{r}_{ij} + 1 \right] \right) \end{align*} We take $n \to \infty$ and use that the rates $x \mapsto r(a,b,x)$ are continuous, and hence uniformly continuous on compact sets, to obtain \eqref{eqn:proof_equi_cont_I}. \end{proof} \begin{proposition}[Donsker-Varadhan functional for drift-diffusions] \label{prop:verify:DV-functional-of-drift-diffusion} Let $F$ be a smooth compact Riemannian manifold without boundary and set $\Theta:=\mathcal{P}(F)$, the set of probability measures on $F$. For $x\in E$, let $L_x : C^2(F) \subseteq C_b(F) \rightarrow C_b(F)$ be the second-order elliptic operator that in local coordinates is given by \begin{equation*} L_x = \frac{1}{2}\nabla\cdot\left(a_x \nabla\right) + b_x\cdot \nabla, \end{equation*} where $a_x$ is a positive definite matrix and $b_x$ is a vector field having smooth entries $a_x^{ij}$ and $b_x^i$ on $F$. Suppose that for all $i,j$ the maps \begin{equation} \label{eqn:examples_DV_diffusion_continuous_coefficients} x \mapsto a_x^{i,j}(\cdot), \qquad x \mapsto b_x^i(\cdot) \end{equation} are continuous as functions from $E$ to $C_b(F)$, where we equip $C_b(F)$ with the supremum norm. Then the functional $\mathcal{I}:E\times\Theta\to[0,\infty]$ defined by \begin{equation*} \mathcal{I}(x,\theta) := \sup_{\substack{u\in \mathcal{D}(L_x)\\u>0}}\left[ -\int_F \frac{L_xu}{u}\,d\theta\right] \end{equation*} satisfies Assumption~\ref{assumption:results:regularity_I}. \end{proposition} \begin{proof}[Proof] \underline{\ref{item:assumption:I:lsc}}: For any fixed function $u\in\mathcal{D}(L_x)$ that is strictly positive on $F$, the function $(-L_xu/u)$ is continuous on $F$. For any fixed $u$ it follows by~\eqref{eqn:examples_DV_diffusion_continuous_coefficients} and compactness of $F$ that \begin{equation*} (x,\theta)\mapsto -\int_F \frac{L_xu}{u}\,d\theta \end{equation*} is continuous on $E\times\Theta$. As a consequence $\mathcal{I}(x,\theta)$ is lower semicontinuous as the supremum over continuous functions. \smallskip \underline{\ref{item:assumption:I:zero-measure}}: Let $x\in E$. The stationary measure $\theta_x\in\Theta$ satisfying \begin{equation}\label{eq:proof:verify-I-diffusion:I2} \int_F L_xg(z)\,d\theta_x(z) = 0\quad \text{for all}\;g\in \mathcal{D}(L_x) \end{equation} is the minimizer of $\mathcal{I}(x,\cdot)$, that is $\mathcal{I}(x,\theta_x) = 0$. This follows by considering the Hille-Yosida approximation $L_x^\varepsilon$ of $L_x$ and using the same argument (using $w = \log u$) as in Proposition~\ref{prop:verify:DV-for-Jumps} for these approximations. For any $u>0$ and for any~$\varepsilon>0$, \begin{align*} -\int_F \frac{L_xu}{u}\,d\theta & = -\int_F \frac{L^\varepsilon_xu}{u}\,d\theta + \int_F \frac{(L^\varepsilon_x-L_x)u}{u}\,d\theta\\ &\leq -\int_F \frac{L^\varepsilon_xu}{u}\,d\theta + \frac{1}{\inf_F u} \|(L_x^\varepsilon-L_x)u\|_F\\ &\leq -\int_F L^\varepsilon_x \log(u)\,d\theta + o(1)_{\varepsilon\to 0}. \end{align*} Sending $\varepsilon\to 0$ and then using~\eqref{eq:proof:verify-I-diffusion:I2} gives~\ref{item:assumption:I:zero-measure}. \smallskip \underline{\ref{item:assumption:I:compact-sublevelsets}}: Since $\Theta = \mathcal{P}(F)$ is compact, any closed subset of $\Theta$ is compact. Hence any union of sub-level sets of $\mathcal{I}(x,\cdot)$ is relatively compact in~$\Theta$. \smallskip \underline{\ref{item:assumption:I:finiteness}}: Let $x_n\to x$ in $E$ and $\theta_n$ be a sequence in $\Theta$, and suppose that $\mathcal{I}(x_n,\theta_n)\leq M$ for some constant $M$ independent of $n$. Let $ \mathrm{d} z$ be the Riemannian measure on $F$. By Pinsky's results in~\cite{pinsky1985evaluating,Pi07}, if $\mathcal{I}(y,\theta) < \infty$, then the density $\frac{ \mathrm{d} \theta}{ \mathrm{d} z}$ exists. In addition, there are constants $c_1,c_2,c_3,c_4$ depending only on $a_{y},b_{y}$, and not on $\theta$, such that \begin{equation} \label{eqn:Pinksy_bootstrap} c_1(y)\int_F|\nabla g_\theta |^2\,dz - c_2(y) \leq \mathcal{I}(y,\theta) \leq c_3(y) \int_F|\nabla g_\theta |^2\,dz + c_4(y), \end{equation} where $g_\theta = ( \mathrm{d} \theta/ \mathrm{d} z)^{1/2}$. In particular, as can be seen by the derivation of~\cite[Eq.~(2.18),~(2.19)]{pinsky1985evaluating}, the constants depend continuously on $y\in E$ by our continuity assumptions on $a_y$ and $b_y$. Applying this to our sequences $x_n$ and $\theta_n$, we have \begin{equation*} \int_F |\nabla g_{\theta_n}|^2\,dz \leq M', \end{equation*} for a constant $M'$. This implies again by \eqref{eqn:Pinksy_bootstrap} that for any $y$ in some neighborhood of $x$ that \begin{equation*} \mathcal{I}(y,\theta_{x_n}) \leq C <\infty, \end{equation*} with a constant independent of $n$. \smallskip \underline{\ref{item:assumption:I:equi-cont}}: Since the coefficients $a_x$ and $b_x$ of the operator $L_x$ depend continuously on $x$, assumption~\ref{item:assumption:I:equi-cont} follows from Theorem~2 of~\cite{Pi07}. \end{proof} \subsection{Verifying assumptions for functions $\Lambda$} \label{section:verify-ex:functions-Lambda} We verify Assumption~\ref{assumption:results:regularity_of_V} for three types of functions~$\Lambda$ corresponding to the examples of Section \ref{section:examples-H}. We start with $\Lambda$'s that are given as integrals over quadratic polynomials in $p$. \begin{proposition}[Quadratic function $\Lambda$]\label{prop:verify-ex:Lambda_quadratic} Let $E=\mathbb{R}^d$ and $\Theta=\mathcal{P}(F)$ for some compact Polish space $F$. Suppose that the function $\Lambda :E\times\mathbb{R}^d\times\Theta\to\mathbb{R}$ is given by \begin{equation*} \Lambda(x,p,\theta) = \int_F\ip{a(x,z)p}{p}\,d\theta(z) + \int_F\ip{b(x,z)}{p}\,d\theta(z), \end{equation*} where $a:E\times F\to\mathbb{R}^{d\times d}$ and $b:E\times F\to\mathbb{R}^d$ are continuous. Suppose that for every compact set $K \subseteq \mathbb{R}^d$, \begin{align*} a_{K,min} & := \inf_{x \in K, z \in F, |p|=1} \ip{a(x,z)p}{p} > 0, \\ a_{K,max} & := \sup_{x \in K, z \in F, |p| = 1} \ip{a(x,z)p}{p} < \infty, \\ b_{K,max} & := \sup_{x \in K, z \in F, |p|=1} |\ip{b(x,z)}{p}| < \infty. \end{align*} Furthermore, there exists a constant $L>0$ such that for all $x,y\in E$ and $z\in F$, \begin{equation*} \|a(x,z)-a(y,z)\| \leq L|x-y|, \end{equation*} and suppose that the functions $b$ are one-sided Lipschitz continuous. Then Assumption~\ref{assumption:results:regularity_of_V} holds. \end{proposition} \begin{proof}[Proof] \underline{\ref{item:assumption:slow_regularity:continuity}}: Let $(x,p)\in E\times\mathbb{R}^d$. By the boundedness assumptions on $a$ and $b$, \begin{equation*} \sup_\theta |\Lambda(x,p,\theta)| \leq a_{\{x\},\text{max}} + b_{\{x\},\text{max}} < \infty, \end{equation*} and hence the function $\theta\mapsto |\Lambda(x,p,\theta)|$ is bounded on $\mathcal{P}(F)$. Continuity of $\Lambda$ is a consequence of the fact that \begin{equation*} \Lambda(x,p,\theta) = \int_F V(x,p,z)\, \mathrm{d}\theta(z) \end{equation*} is the pairing of a continuous bounded function $V(x,p,\cdot)$ with~$\theta\in\mathcal{P}(F)$. \smallskip \underline{\ref{item:assumption:slow_regularity:convexity}}: Let $x\in E$ and $\theta \in \mathcal{P}(F)$. Convexity of $p\mapsto \Lambda(x,p,\theta)$ follows since $a(x,z)$ is positive definite by assumption. If $p_0 = 0$, then evidently $\Lambda(x,p_0,\theta) = 0$. \smallskip \underline{\ref{item:assumption:slow_regularity:compact_containment}}: We show that the map $\Upsilon : E\to\mathbb{R}$ defined by \begin{equation*} \Upsilon(x) := \frac{1}{2}\log\left(1 + |x|^2\right) \end{equation*} is a containment function for $\Lambda$. For any $x\in E$ and $\theta\in\mathcal{P}(F)$, we have \begin{align*} \Lambda(x,\nabla\Upsilon(x),\theta) &= \int_F \ip{a(x,z)\nabla\Upsilon(x)}{\nabla\Upsilon(x)}\,d\theta(z) + \int_F\ip{b(x,z)}{\nabla\Upsilon(x)}\,d\theta(z)\\ &\leq a_{\{x\},\text{max}} |\nabla\Upsilon(x)|^2 + b_{\{x\},\text{max}}|\nabla\Upsilon(x)|\\ &\leq C (1+|x|) \frac{x^2}{(1+x^2)^2} + C(1+|x|) \frac{x}{(1+x^2)}, \end{align*} and the boundedness condition follows with the constant \begin{equation*} C_\Upsilon := C \,\sup_x (1+|x|) \left[\frac{x^2}{(1+x^2)^2} + \frac{x}{(1+x^2)} \right] <\infty. \end{equation*} \smallskip \underline{\ref{item:assumption:slow_regularity:continuity_estimate}}: By the assumption on $a(x,z)$, the function $\Lambda$ is uniformly coercive in the sense that for any compact set $K\subseteq E$, \begin{equation*} \inf_{x\in K, \theta\in\Theta}\Lambda(x,p,\theta) \to \infty \quad \text{ as }\; |p|\to \infty, \end{equation*} and the continuity estimate follows by Proposition~\ref{proposition:continuity_estimate_coercivity}. \smallskip \underline{\ref{item:assumption:slow_regularity:controlled_growth}}: Let $K\subseteq E$ be compact. We have to show that there exist constants $M, C_1, C_2 \geq 0$ such that for all $x \in K$, $p \in \mathbb{R}^d$ and all $\theta_1,\theta_2 \in \mathcal{P}(F)$, we have \begin{equation} \label{eqn:growth_bound_general} \Lambda(x,p,\theta_1) \leq \max \left\{M, C_1 \Lambda(x,p,\theta_2) + C_2 \right\}. \end{equation} Fix $\theta_1,\theta_2 \in \mathcal{P}(F)$. We have for $x \in K$ \begin{equation*} \int \ip{a(x,z)p}{p} d\theta_1(z) \leq \frac{a_{K,max}}{a_{K,min}} \int \ip{a(x,z)p}{p} d\theta_2(z) \end{equation*} In addition, as $a_{K,min} > 0$ and $b_{K,max} < \infty$ we have for any $C > 0$ and sufficiently large $|p|$ that \begin{equation*} \int \ip{b(x,z)}{p} \,d\theta_1(z) - (C+1)\int \ip{b(x,z)}{p} \,d\theta_2(z) \leq C \int \ip{a(x,z)p}{p} \,d\theta_2(z) \end{equation*} Thus, for sufficiently large $|p|$ (depending on $C$) we have \begin{equation*} \Lambda(x,p,\theta_1) \leq (1+C) \Lambda(x,p,\theta_2). \end{equation*} Fix a $C =: C_1$ and denote the set of `large' $p$ by $S$. The map $(x,p,\theta) \mapsto \Lambda(x,p,\theta)$ is bounded on $K \times \times S^c\times \Theta$. Thus, we can find a constant $C_2$ such that \eqref{eqn:growth_bound_general} holds. \end{proof} We proceed with an example in which $\Lambda$ depends on $p$ through exponential functions. Let $q \in \mathbb{N}$ be an integer and \begin{equation*} \Gamma := \left\{(a,b)\,:\,a,b\in\{1,\dots,q\}, \,a\neq b\right\} \end{equation*} be the set of oriented edges in $\{1,\dots,q\}$. \begin{proposition}[Exponential function $\Lambda$]\label{prop:verify-ex:Lambda_exponential} Let $E\subseteq \mathbb{R}^d$ be the embedding of $E = \mathcal{P}(\{1,\dots,q\}) \times (\mathbb{R}^+)^{|\Gamma|}$ and $\Theta$ be a topological space. Suppose that $\Lambda$ is given by \begin{equation*} \Lambda((\mu,w),p,\theta) = \sum_{(a,b) \in \Gamma} v(a,b,\mu,\theta)\left[\exp\left\{p_b - p _a + p_{(a,b)} \right\} - 1 \right] \end{equation*} where $v$ is a proper kernel in the sense of Definition~\ref{definition:proper_kernel}. Suppose in addition that there is a constant $C > 0$ such that for all $(a,b) \in \Gamma$ such that $v(a,b, \cdot,\cdot) \neq 0$ we have \begin{equation}\label{eq:prop-verify-Lambda-exp:boundedness-kernel} \sup_{\mu} \sup_{\theta_1,\theta_2} \frac{v(a,b,\mu,\theta_1)}{v(a,b,\mu,\theta_2)} \leq C. \end{equation} Then $\Lambda$ satisfies Assumption~\ref{assumption:results:regularity_of_V}. \end{proposition} Similar to previous proposition, the assumptions on~$\Lambda$ are satisfied if~$\Theta = \mathcal{P}(F)$ for some Polish space $F$, and if~$v(a,b,\mu,\theta) = \mu(a) \int r(a,b,\mu,z) \theta( \mathrm{d} z)$ and there are constants~$0 < r_{min} \leq r_{max} < \infty$ such that for all~$(a,b) \in \Gamma$ such that~$\sup_{\mu,z} r(a,b,\mu,z) > 0$, we have \begin{equation*} r_{min} \leq \inf_{z} \inf_{\mu} r(a,b,\mu,z) \leq \sup_{z} \sup_{\mu} r(a,b,\mu,z) \leq r_{max}. \end{equation*} Regarding~\eqref{eq:prop-verify-Lambda-exp:boundedness-kernel}, for $(a,b) \in \Gamma$ for which $v(a,b,\cdot,\cdot)$ is non-trivial, we have \begin{equation*} \frac{v(a,b,\mu,\theta_1)}{v(a,b,\mu,\theta_2)} = \frac{\int r(a,b,\mu,z) \theta_1( \mathrm{d} z)}{\int r(a,b,\mu,z) \theta_2( \mathrm{d} z)} \leq \frac{r_{max}}{r_{min}}. \end{equation*} \begin{proof}[Proof of Proposition~\ref{prop:verify-ex:Lambda_exponential}] \underline{\ref{item:assumption:slow_regularity:continuity}}: The function $\Lambda$ is continuous as the sum of continuous functions. Boundedness of $\Lambda$ as a function of $\theta$ follows from the boundedness assumption~\eqref{eq:prop-verify-Lambda-exp:boundedness-kernel}. \smallskip \underline{\ref{item:assumption:slow_regularity:convexity}}: Convexity of $\Lambda$ as a function of $p$ follows from the fact that $\Lambda$ is a finite sum of convex functions, and $\Lambda(x,0,\theta)=0$ is evident. \smallskip \underline{\ref{item:assumption:slow_regularity:compact_containment}}: The function $\Upsilon : E\to\mathbb{R}$ defined by \begin{equation*} \Upsilon(\mu,w) := \sum_{(a,b)\in\Gamma}\log\left[1 + w_{(a,b)}\right] \end{equation*} is a containment function for $\Lambda$ (an explicit verification is given in~\cite{Kr17}). \smallskip \underline{\ref{item:assumption:slow_regularity:continuity_estimate}}: The continuity estimate is the content of Proposition~\ref{proposition:continuity_estimate_directional_extended} below. \smallskip \underline{\ref{item:assumption:slow_regularity:controlled_growth}}: Note that \begin{align*} \Lambda((\mu,w),\theta_1,p) & \leq \sum_{(a,b)\in \Gamma} v(a,b,\mu,\theta_1) e^{p_{a,b} + p_b - p_a} \\ & \leq C \sum_{(a,b)\in \Gamma} v(a,b,\mu,\theta_2) e^{p_{a,b} + p_b - p_a} \\ & \leq C \sum_{(a,b)\in \Gamma} v(a,b,\mu,\theta_2) \left[e^{p_{a,b} + p_b - p_a} - 1 \right] + C_2 . \end{align*} Thus the estimate holds with $M = 0$, $C_1 = C$ and $C_2 = \sup_{\mu,\theta} \sum_{a,b} v(a,b,\mu,\theta)$. \end{proof} \subsection{Verifying the continuity estimate} \label{section:verification_of_continuity_estimate} With the exception of the verification of the continuity estimate in Assumption \ref{assumption:results:regularity_of_V} the verification in Section \ref{section:verify-ex:functions-Lambda} is straightforward. On the other hand, the continuity estimate is an extension of the comparison principle, and is therefore more complex. We verify the continuity estimate in three contexts, which we hope illustrates that the continuity estimate follows from essentially the same arguments as the standard comparison principle. We will do this for: \begin{itemize} \item Coercive Hamiltonians \item One-sided Lipschitz Hamiltonians \item Hamiltonians arising from large deviations of empirical measures. \end{itemize} This list is not meant to be an exhaustive list, but to illustrate that the continuity estimate is a sensible extension of the comparison principle, which is satisfied in a wide range of contexts. In what follows, $E\subseteq \mathbb{R}^d$ is a Polish subset and $\Theta$ a topological space. \begin{proposition}[Coercive $\Lambda$] \label{proposition:continuity_estimate_coercivity} Let $\Lambda : E \times \mathbb{R}^d \times \Theta \rightarrow \mathbb{R}$ be continuous and uniformly coercive: that is, for any compact $K \subseteq E$ we have \begin{equation*} \inf_{x \in K, \theta\in\Theta} \Lambda(x,p,\theta) \to \infty \quad \mathrm{as} \; |p| \to \infty. \end{equation*} Then the continuity estimate holds for $\Lambda$ with respect to any penalization function $\Psi$. \end{proposition} \begin{proof} Let $\Psi(x,y) = \tfrac{1}{2}(x-y)^2$. Let $(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon},\theta_{\varepsilon,\alpha})$ be fundamental for $\Lambda$ with respect to $\Psi$. Set $p_{\alpha,\varepsilon} = \alpha(x_{\varepsilon,\alpha} - y_{\varepsilon,\alpha})$. By the upper bound~\eqref{eqn:control_on_Gbasic_sup}, we find that for sufficiently small $\varepsilon > 0$ there is some $\alpha(\varepsilon)$ such that \begin{equation*} \sup_{\alpha \geq \alpha(\varepsilon)} \Lambda\left(y_{\varepsilon,\alpha}, p_{\varepsilon,\alpha}, \theta_{\varepsilon,\alpha}\right) < \infty. \end{equation*} As the variables $y_{\alpha,\varepsilon}$ are contained in a compact set by property (C1) of fundamental collections of variables, the uniform coercivity implies that the momenta $p_{\varepsilon,\alpha}$ for $\alpha \geq \alpha(\varepsilon)$ remain in a bounded set. Thus, we can extract a subsequence $\alpha'$ such that $(x_{\varepsilon,\alpha'},y_{\varepsilon,\alpha'},p_{\varepsilon,\alpha'},\theta_{\varepsilon,\alpha'})$ converges to $(x,y,p,\theta)$ with $x = y$ due to property (C2) of fundamental collections of variables. By continuity of $\Lambda$ we find \begin{align*} & \liminf_{\alpha \rightarrow \infty} \Lambda\left(x_{\varepsilon,\alpha}, p_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}\right) - \Lambda\left(y_{\alpha,\varepsilon},p_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}\right) \\ & \leq \lim_{\alpha'\rightarrow \infty} \Lambda\left(x_{\varepsilon,\alpha'}, p_{\varepsilon,\alpha'},\theta_{\varepsilon,\alpha'}\right) - \Lambda\left(y_{\varepsilon,\alpha'},p_{\varepsilon,\alpha'},\theta_{\varepsilon,\alpha'}\right) = 0 \end{align*} establishing the continuity estimate. \end{proof} \begin{proposition}[One-sided Lipschitz $\Lambda$] \label{proposition:continuity_estimate_lipschitz} Let $\Lambda : E \times \mathbb{R}^d \times \Theta\rightarrow \mathbb{R}$ satisfy \begin{equation} \label{eqn:one_sided_Lipschitz_G} \Lambda(x,\alpha(x-y),\theta) - \Lambda(y,\alpha(x-y),\theta) \leq c(\theta) \omega( \alpha (x-y)^2) \end{equation} for some collection of constants $c(\theta)$ satisfying $\sup_\theta c(\theta) < \infty$ and a function $\omega : \mathbb{R}^+ \rightarrow \mathbb{R}^+$ satisfying $\lim_{\delta \downarrow 0} \omega(\delta) = 0$. Then the continuity estimate holds for $\Lambda$ with respect to $\Psi(x,y) = \tfrac{1}{2}(x-y)^2$. \end{proposition} \begin{proof} [Proof] Let $\Psi(x,y) = \tfrac{1}{2}(x-y)^2$. Let $(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon},\theta_{\varepsilon,\alpha})$ be fundamental for $\Lambda$ with respect to $\Psi$. Set $p_{\alpha,\varepsilon} = \alpha(x_{\varepsilon,\alpha} - y_{\varepsilon,\alpha})$. We find \begin{align*} & \liminf_{\alpha \rightarrow \infty} \Lambda\left(x_{\varepsilon,\alpha}, p_{\varepsilon,\alpha}, \theta_{\varepsilon,\alpha}\right) - \Lambda\left(y_{\alpha,\varepsilon},p_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}\right) \\ & \leq \liminf_{\alpha\rightarrow \infty} c(\theta) \omega( \alpha (x-y)^2) \end{align*} which equals $0$ as $\sup_\theta c(\theta) < \infty$, $\lim_{\delta \downarrow 0} \omega(\delta) = 0$ and property (C1) of a fundamental collection of variables. \end{proof} For the empirical measure of a collection of independent processes one obtains maps $\Lambda$ that are neither uniformly coercive nor Lipschitz. Also in this context one can establish the continuity estimate. We treat a simple 1d case and then state a more general version for which we refer to \cite{Kr17}. \begin{proposition} \label{proposition:continuity_estimate_directional} Suppose that $E = [-1,1]$ and that $\Lambda(x,p,\theta)$ is given by \begin{equation*} \Lambda(x,p,\theta) = \frac{1-x}{2} c_+(\theta) \left[e^{2p} -1\right] + \frac{1+x}{2} c_-(\theta) \left[e^{-2p} -1\right] \end{equation*} with $c_-,c_+$ non-negative functions of $\theta$. Then the continuity estimate holds for $\Lambda$ with respect to $\Psi(x,y) = \tfrac{1}{2}(x-y)^2$. \end{proposition} \begin{proof}[Proof] Let $\Psi(x,y) = \tfrac{1}{2}(x-y)^2$. Let $(x_{\alpha,\varepsilon},y_{\alpha,\varepsilon},\theta_{\varepsilon,\alpha})$ be fundamental for $\Lambda$ with respect to $\Psi$. Set $p_{\alpha,\varepsilon} = \alpha(x_{\varepsilon,\alpha} - y_{\varepsilon,\alpha})$. We have \begin{align*} & \Lambda\left(x_{\varepsilon,\alpha}, p_{\varepsilon,\alpha}, \theta_{\varepsilon,\alpha}\right) - \Lambda\left(y_{\alpha,\varepsilon},p_{\varepsilon,\alpha},\theta_{\varepsilon,\alpha}\right) \\ & = \frac{y_{\varepsilon,\alpha}-x_{\varepsilon,\alpha}}{2} c_+(\theta_{\varepsilon,\alpha}) \left[e^{2p_{\varepsilon,\alpha}} -1\right] + \frac{x_{\varepsilon,\alpha}-y_{\varepsilon,\alpha}}{2} c_-(\theta_{\varepsilon,\alpha}) \left[e^{-2p_{\varepsilon,\alpha}} -1\right] \end{align*} Now note that $y_{\varepsilon,\alpha}-x_{\varepsilon,\alpha}$ is positive if and only if $e^{2p_{\varepsilon,\alpha}} -1$ is negative so that the first term is bounded above by $0$. With a similar argument the second term is bounded above by $0$. Thus the continuity estimate is satisfied. \end{proof} \begin{proposition} \label{proposition:continuity_estimate_directional_extended} Suppose $E = \mathcal{P}(\{1,\dots,q\} \times (\mathbb{R}^+)^\Gamma$ and suppose that $\Lambda$ is given by \begin{equation*} \Lambda((\mu,w),\theta,p) = \sum_{(a,b) \in \Gamma} v(a,b,\mu,\theta)\left[\exp\left\{p_b - p _a + p_{(a,b)} \right\} - 1 \right] \end{equation*} where $v$ is a proper kernel. Then the continuity estimate holds for $\Lambda$ with respect to penalization functions \begin{align*} \Psi_1(\mu,\hat{\mu}) & := \frac{1}{2} \sum_{a} ((\hat{\mu}(a) - \mu(a))^+)^2, \\ \Psi_2(w,\hat{w}) & := \frac{1}{2} \sum_{(a,b) \in \Gamma} (w_{(a,b)} - \hat{w}_{(a,b)})^2. \end{align*} Here we denote $r^+ = r \vee 0$ for $r \in \mathbb{R}$. \end{proposition} In this context, one can use coercivity like in Proposition \ref{proposition:continuity_estimate_coercivity} in combination with directional properties used in the proof of Proposition \ref{proposition:continuity_estimate_directional} above. The proof of this proposition can be carried out exactly as the proof of~\cite[Theorem~3.8]{Kr17}. Namely at any point, a converging subsequence is constructed, and the variables~$\alpha$ need to be chosen such that we also get convergence of the measures~$\theta_{\varepsilon,\alpha}$ in~$\mathcal{P}(F)$. \chapter{Gradient Flow to Non-Gradient-Flow} \label{chapter:GF-to-NGF} \section{Introduction} \subsection{Diffusion in an asymmetric potential landscape} Our main interest in this chapter is the family of Fokker-Planck equations in one dimension defined by \begin{equation}\label{GF_NGF:eq:intro:upscaled-FP} \partial_t \rho_\varepsilon = \tau_\varepsilon\left[ \varepsilon\, \Delta \rho_\varepsilon + \mathrm{div} \left( \rho_\varepsilon \nabla V\right)\right], \quad t\geq 0,\, x\in\mathbb{R}. \end{equation} Here, we take an asymmetric double-well potential~$V:\mathbb{R}\to\mathbb{R}$ as depicted in Figure~\ref{GF_NGF:fig:asymmetric-doublewell-potential}. \begin{figure}[h!] \labellist \pinlabel $x$ at 1600 200 \pinlabel $x_a$ at 230 200 \pinlabel $x_0$ at 700 200 \pinlabel $x_b$ at 1300 330 \pinlabel $V(x)$ at 1400 1000 \endlabellist \centering \includegraphics[scale=.1]{Asymmetric_DoubleWell_WAxes_a25_bm15_xrange_m5p5_5p8} \caption{The typical asymmetric potential $V(x)$.} \label{GF_NGF:fig:asymmetric-doublewell-potential} \end{figure} \smallskip A typical solution~$\rho_\varepsilon(t,x)$ is displayed in Figure~\ref{GF_NGF:fig:intro:evolution-FP}, showing a mass transition from left to right. There are two parameters~$\varepsilon>0$ and~$\tau_\varepsilon>0$ appearing in the Fokker-Planck equation. The parameter~$\varepsilon$ controls how fast mass can transition in between the potential's wells. In general, smaller values of~$\varepsilon$ correspond to larger transition times of mass flowing from left to right. The time-scale parameter~$\tau_\varepsilon$ is chosen such that transitions from the local minimum~$x_a$ to the global minimum~$x_b$ happen at rate of order one. Below, we make our choice of~$\tau_\varepsilon$ precise. \begin{figure}[h!] \labellist \pinlabel $x_a$ at 130 0 \pinlabel $x_b$ at 240 0 \pinlabel $x_a$ at 460 0 \pinlabel $x_b$ at 570 0 \pinlabel $x_a$ at 790 0 \pinlabel $x_b$ at 900 0 \pinlabel $x_a$ at 1120 0 \pinlabel $x_b$ at 1230 0 \pinlabel $t=t_1$ at 420 240 \pinlabel $t=t_2$ at 750 240 \pinlabel $t=T$ at 1100 240 \pinlabel {\color{dark_blue}{$\rho_\varepsilon(0,x)$}} at 30 200 \endlabellist \centering \includegraphics[scale=.25]{WorkOn_Evolution_upscaled_FokkerPlanck} \caption{The time-evolution of a solution~$\rho_\varepsilon(t,x)$ to~\eqref{GF_NGF:eq:intro:upscaled-FP} whose initial distribution is supported solely on the left. Time is increasing from left to right. At final time, the solution os close to the equilibrium distribution, which is given by~$\exp\{-V(x)/\varepsilon\}$ up to normalization. The smaller the value of~$\varepsilon$, the sharper the equilibrium distribution concentrates around the global minimum~$x_b$.} \label{GF_NGF:fig:intro:evolution-FP} \end{figure} \smallskip We regard the PDE~\eqref{GF_NGF:eq:intro:upscaled-FP} as derived from a stochastic model for metastability introduced by Kramers to study chemical reactions~\cite{Kramers1940}. The stochastic model he considered is the diffusion process $Y^\varepsilon_t = Y^\varepsilon(t)$ in $\mathbb{R}$ solving \begin{equation*} \mathrm{d} Y^\varepsilon_t = -\nabla V(Y^\varepsilon_t)\, \mathrm{d} t + \sqrt{2\varepsilon}\; \mathrm{d} B_t, \end{equation*} where~$B_t$ denotes the standard Brownian motion. For example, consider a particle initiall starting in the left minimum~$x_a$ and propagating from left to right. This propagation may model an reaction-event in which a molecule's state changes from a low-energy state~$x_a$ via a high-energy state~$x_0$ to another low-energy state~$x_b$. Then the assumption of asymmetry of the potential~$V$ corresponds to modeling a reaction resulting in a molecule's state whose final energy is lower than its initial energy. The energy barrier that the particle has to overcome,~$V(x_0)-V(x_a)$, corresponds to the minimal \emph{activation energy} for the reaction to occur. Kramers discussed various examples of reactions that may be modeled this way~\cite[Paragraph~6]{Kramers1940}. His interest lied in deriving formulas for the average reaction rates from the average transition time of a particle from~$x_a$ to~$x_b$. In the stochastic model, as~$\varepsilon$ decreases, a transition from~$x_a$ to~$x_b$ becomes more unlikely, and hence the average-time for a transition~$x_a\to x_b$ to occur increases. Kramers derived an asymptotic expression for this average-time, \begin{equation*} \mathbb{E}_{x_a}\left[T(x_a \to x_b)\right] = \left[1 + o(1)_{\varepsilon\to 0}\right] \frac{2\pi}{\sqrt{V''(x_a) |V''(x_0)|}} \exp\{\varepsilon^{-1}(V(x_0) - V(x_a))\}, \end{equation*} which is also known as the \emph{Kramers formula}. It shows that the average transition time scales exponentially with respect to the energy barrier~$V(x_0)-V(x_a)$ and the inverse of the diffusion coefficient,~$\varepsilon^{-1}$. For further details and background on this model, we refer to the monographs on metastability of Bovier and den Hollander~\cite{BovierDenHollander2016}, and of Berglund and Gentz~\cite{BerglundGentz2005}. \smallskip Motivated by Kramers' formula, we define the time-scale parameter~$\tau_\varepsilon$ by \begin{equation}\label{GF_NGF:intro:eq:def-time-scale-parameter} \tau_\varepsilon := \frac{2\pi}{\sqrt{V''(x_a) |V''(x_0)|}} \exp^{\varepsilon^{-1}(V(x_0) - V(x_a))}, \end{equation} in order to be at a time-scale at which jumps from left to right happen at rate of order one. One way to motivate the PDE~\eqref{GF_NGF:eq:intro:upscaled-FP} from the small-diffusion process is to speed up the process~$Y(t)$ by exactly that time-scale parameter: consider the upscaled process $X^\varepsilon(t):= Y^\varepsilon(\tau_\varepsilon t)$. Then by Itô calculus,~$X^\varepsilon$ satisfies the SDE \begin{equation}\label{GF_NGF:eq:intro:upscaled-diffusion-process} \mathrm{d} X^\varepsilon_t = - \tau_\varepsilon V'(X^\varepsilon_t)\, \mathrm{d} t + \sqrt{\tau_\varepsilon} \sqrt{2\varepsilon} \; \mathrm{d} B_t, \end{equation} and the equation~\eqref{GF_NGF:eq:intro:upscaled-FP} is the Fokker-Planck equation for the transition probabilities $\rho_\varepsilon(t, \mathrm{d} x) = \mathbb{P}\left[X^\varepsilon_t \in \mathrm{d} x\right]$. \smallskip We are interested in the limit~$\varepsilon\to 0$ in the diffusion system~\eqref{GF_NGF:eq:intro:upscaled-FP}. In the limit, we expect the solution $\rho_\varepsilon$ to concentrate at the minima $x_a$ and $x_b$. This is because for small values of~$\varepsilon$, the particle spends most of its time around the minima of the potential. Furthermore, transitions from left to right occur frequently than from right to left due to the lower energy barrier. Since the transition frequency scales exponentially with~$\varepsilon$ and the potential barrier, in the limit~$\varepsilon\to 0$, we expect transitions to occur only from left to right. By our choice of the time-scale~$\tau_\varepsilon$, the limiting dynamics is characterized by mass being transfered at rate one from the local minimum~$x_a$ to the global minimum~$x_b$. In summary, $\rho_\varepsilon \to \rho_0 = z \delta_{x_a} + (1-z) \delta_{x_b}$, with a density~$z=z(t)$ decaying at rate one according to~$\partial_t z = - z$. The time evolution of the limiting density is depicted in Figure~\ref{GF_NGF:fig:intro:limit-evolution-FP}. \begin{figure}[h!] \labellist \pinlabel $x_a$ at 130 0 \pinlabel $x_b$ at 240 0 \pinlabel $x_a$ at 460 0 \pinlabel $x_b$ at 570 0 \pinlabel $x_a$ at 790 0 \pinlabel $x_b$ at 900 0 \pinlabel $x_a$ at 1120 0 \pinlabel $x_b$ at 1230 0 \pinlabel $t=t_1$ at 420 240 \pinlabel $t=t_2$ at 750 240 \pinlabel $t=T$ at 1080 240 \pinlabel {\color{red_one}{$\rho_0(0,x)$}} at 30 200 \endlabellist \centering \includegraphics[scale=.25]{Evolution_limit_upscaled_FokkerPlanck} \caption{The time evolution of~$\rho_0$, defined as the~$\varepsilon\to 0$ limit of the solution~$\rho_\varepsilon(t,x)$ to~\eqref{GF_NGF:eq:intro:upscaled-FP}. The initial distribution is supported solely on the left. As time progresses, mass is flowing only from left to right, with rate one.} \label{GF_NGF:fig:intro:limit-evolution-FP} \end{figure} \subsection{From diffusion to reaction---a singular limit} There has been recent interest in studying the limit~$\varepsilon\to 0$ for the case of \emph{symmetric} double-well potentials, that is potentials~$V$ satisfying~$V(x_a)=V(x_b)$. Peletier, Savaré and Veneroni have proved the concentration of solutions~$\rho_\varepsilon$ on the two potential-minima as~$\varepsilon$ tends to zero. The limiting densities are coupled by ODE's and correspond to a reaction-system~\cite{PeletieSavareVeneroni2010}. These results give a rigorous mathematical meaning to Kramers' program of approximating reactions by upscaling diffusions. The authors also included an additional spatial variable undergoing diffusive motion that we will not consider here. \smallskip A question left unanswered in~\cite{PeletieSavareVeneroni2010} rests on the fact that the Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP} is the gradient flow of the entropy with respect to the Wasserstein metric---we give the precise definitions of gradient flows further below in Section~\ref{GF_NGF:sec:GF}. It is then natural to ask whether a convergence result such as established in~\cite{PeletieSavareVeneroni2010} can be achieved when working only with the gradient-flow structure rather than with the specific equation itself. Indeed, motivated by that question, Arnrich, Mielke, Peletier, Savaré and Veneroni soon after proved in~\cite{ArnrichMielkePeletierSavareVeneroni2012} the convergence of the corresponding Wasserstein gradient flow to a limit gradient flow. Their result comprises the convergence of the upscaled diffusion to the limiting reaction system as a special case. The proof is no longer based on the linearity of the problem, but exploits information derived solely from boundedness of the players involved in the Wasserstein gradient flow: the entropy, the Fisher information, and the Wasserstein metric. \smallskip A convergence result of a variational structure, such as the Wasserstein gradient-flow, is interesting for multiple reasons. First, as Adams, Dirr, Peletier and Zimmer demonstrated~\cite{AdamsDirrPeletierZimmer2011}, the Wasserstein gradient flow is special since it arises naturally from a micro-macro limit using the theory of large deviations. That constitutes a probabilistic argument for working with the Wasserstein gradient flow rather than with other gradient-flow structures. Secondly, since many evolution equations are of Wasserstein gradient-flow type (e.g.~\cite{AmbrosioGigliSavare2008,BlanchetCalvezCarrillo2008,CarrilloDiFrancescoFigalliLaurentSlepcev2011,CarrilloYoungPilTse2019,CarlenGangbo2004,Gigli2010,GianazzaSavareToscani2009,MatthesMcCannSavare2009,Savare2007,Lisini2009}), arguments based on this variational structure have the potential to be applicable to other but similar systems as well. \smallskip The abovementioned studies concentrated on \emph{symmetric} potentials. Our work presented in this chapter contributes to these studies by tackling the case of \emph{asymmetric} double-well potentials~$V$ such as shown above in Figure~\ref{GF_NGF:fig:asymmetric-doublewell-potential}. In the spirit of~\cite{PeletieSavareVeneroni2010,ArnrichMielkePeletierSavareVeneroni2012}, we establish a Gamma-convergence result for variational structures associated to the family of equations~\eqref{GF_NGF:eq:intro:upscaled-FP} in the limit~$\varepsilon\to 0$. \smallskip On the level of a gradient-flow structure of~\eqref{GF_NGF:eq:intro:upscaled-FP}, the \emph{asymmetry} of the potential landscape comes with a couple of challenges that we need to address. We will describe gradient flows and their related convergence concepts in more detail in Section~\ref{GF_NGF:sec:GF}. When taking the limit~$\varepsilon\to 0$, for two reasons we do in fact not expect the Wasserstein gradient flow to converge as in~\cite{ArnrichMielkePeletierSavareVeneroni2012}: first, the \emph{energies diverge in the limit}, and secondly, taking the limit means \emph{passing from reversible to irreversible}. Let us comment further on these two reasons. \smallskip First, various convergence concepts for gradient structures have in common that they require control of energies. In the Wasserstein gradient-flow structure of~\eqref{GF_NGF:eq:intro:upscaled-FP}, the energy is given by the relative entropy with respect to the equilibrium distribution. Due to the asymmetry of the potential, these relative entropies diverge in the limit~$\varepsilon\to 0$ (Section~\ref{GF_NGF:sec:why-GF-not-converge}). This is the main reason for which we can not follow the line of argument in~\cite{ArnrichMielkePeletierSavareVeneroni2012}, which exploits boundedness of entropies. \smallskip Secondly, Mielke, Peletier and Renger identified that under quite general conditions, gradient-flow structures arising from density large deviations are linked one-to-one to time-reversible stochastic processes~\cite{MielkePeletierRenger2014}. From their result, we infer a general rule of thumb: when passing from reversible stochastic processes to an irreversible stochastic process, then we do not expect the limit of the corresponding gradient-flow structures to be of gradient-flow type anymore. In our problem at hand, in the pre-limit regime the Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP} corresponds to a reversible drift-diffusion process. When taking the limit~$\varepsilon\to 0$, we obtain a jump process with jumps only from left to right, which is an irreversible dynamics. This is why we do not expect the limit of the Wasserstein gradient flow to be a gradient flow anymore. We confirm this reasoning in our context by proving that the limiting \emph{variational structure} we obtain in Theorem~\ref{GF_NGF:thm:intro-main-result} is indeed not a gradient flow (Section~\ref{GF_NGF:sec:why-limit-is-not-GF}), even though the limiting equation can be given a gradient-flow structure. \subsection{Flux-density functionals} For the two abovementioned reasons, we can not take the limit of the Wasserstein gradient-flow structure. Therefore, we propose to work instead with a higher-level variational structure. While the Wasserstein gradient-flow structure can be motivated from \emph{density} large deviations, we take our motivation from so-called \emph{flux-density} large deviations~\cite{BertiniDeSoleGabrielliJonaLasinioLandim2015}. We will introduce the rigorous terms in Section~\ref{GF_NGF:sec:flux-density-functionals}. Here, we give a brief description of the flux-density functionals and its central ingredients in order to formulate our main result. \smallskip We define variational structures by functionals that act on time-dependent measures, where the minimizers of these functionals correspond to the dynamics of a Fokker-Planck equation. The Wasserstein gradient-flow of~\eqref{GF_NGF:eq:intro:upscaled-FP} is described by a map~$\mathcal{A}_\varepsilon$ acting on time-dependent probability measures~$\rho$ such that~$\mathcal{A}_\varepsilon(\rho)\geq 0$ for all~$\rho$. The solution~$\rho_\varepsilon$ to the dynamics of~\eqref{GF_NGF:eq:intro:upscaled-FP} minimizes the functional, that means~$\mathcal{A}_\varepsilon(\rho_\varepsilon)=0$. We describe this functional and its relation to gradient flows in more detail in Section~\ref{GF_NGF:sec:GF}. \smallskip For defining the flux-density funtionals, we reformulate the upscaled Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP} as an upscaled continuity equation, \begin{equation}\label{GF_NGF:eq:upscaled-CE} \partial_t\rho_\varepsilon + \mathrm{div} \,j_\varepsilon = 0,\quad t\geq 0,\, x\in\mathbb{R}, \end{equation} where the function~$j_\varepsilon$ is the so-called~\emph{flux} defined by \begin{equation}\label{GF_NGF:eq:intro:def-flux} j_\varepsilon(t,x) := -\tau_\varepsilon\left[\varepsilon\, \nabla \rho_\varepsilon + \rho_\varepsilon\nabla V\right]. \end{equation} In general, for a density~$\rho$, we write~$J_\varepsilon^\rho := -\tau_\varepsilon\left[\varepsilon\, \nabla \rho + \rho\nabla V\right]$. We denote the set of pairs~$(\rho,j)$ satisfying the continuity equation distributionally as \begin{equation*} \mathrm{CE}([0,T];\mathbb{R}) := \{(\rho,j)\,:\, \partial_t\rho + \mathrm{div}\, j = 0\;\text{in}\;\mathcal{D}'((0,T)\times\mathbb{R})\}. \end{equation*} The precise conditions on~$(\rho,j)$ are stated in Definition~\ref{GF_NGF:def:continuity-equation}. \paragraph{Pre-limit functional} For~$\varepsilon>0$, the map~$\mathcal{I}_\varepsilon:\mathrm{CE}([0,T];\mathbb{R})\to[0,\infty]$ is defined by \begin{equation}\label{GF_NGF:eq:level-2p5-rate-function} \mathcal{I}_\varepsilon(\rho,j) := \frac{1}{4} \int_0^T\int_\mathbb{R} \frac{1}{\varepsilon\, \tau_\varepsilon} \frac{1}{\rho(t,x)} \big|j(t,x) -J_\varepsilon^\rho(t,x)\big|^2\,dxdt. \end{equation} This formal expression assumes that the measure~$\rho(t, \mathrm{d} x)$ is absolutely continuous with respect to the Lebesgue measure on~$\mathbb{R}$ and strictly positive. In Definition~\ref{GF_NGF:def:pre-limit-RF}, we give the mathematically rigorous expression of~$\mathcal{I}_\varepsilon$, which is a dual formulation of~\eqref{GF_NGF:eq:level-2p5-rate-function}. \smallskip The map~$\mathcal{I}_\varepsilon$ is a functional whose minimizer corresponds to the solution of the upscaled continuity equation~\eqref{GF_NGF:eq:upscaled-CE}, and hence the upscaled Fokker Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP}. The formula for~$\mathcal{I}_\varepsilon$ is motivated from large-deviation theory of flux-density pairs~\cite[Eq.~(1.3)]{BertiniDeSoleGabrielliJonaLasinioLandim2015}. \smallskip The flux-density functional leads by contraction to the Wasserstein gradient flow, and in that sense comprises the Wasserstein gradient-flow, \begin{equation*} \frac{1}{2} \mathcal{A}_\varepsilon(\rho) = \inf_{\substack{j\\(\rho,j)\in\mathrm{CE}}}\mathcal{I}_\varepsilon(\rho,j), \end{equation*} where the infimum is over fluxes~$j$ such that~$j\ll\rho$. Other examples of such contraction principles from flux-density functionals to density functionals can be found for example in~\cite{Feng1994,Leonard1995,BertiniFaggionatoGabrielli2015}. \smallskip \subsection{Main result---$\Gamma$-convergence of flux-density functionals} In the spirit of~$\Gamma$-convergence of functionals, we would like to obtain a limit of the functionals~$\mathcal{I}_\varepsilon$ as~$\varepsilon\to 0$. Thus the main questions that we ask in this chapter are: \begin{enumerate}[label=(\roman*)] \item \emph{Compactness:} For a family of pairs~$(\rho_\varepsilon',j_\varepsilon')$ depending on~$\varepsilon$, does boundedness of~$\mathcal{I}_\varepsilon(\rho_\varepsilon',j_\varepsilon')$ imply the existence of a subsequence of~$(\rho_\varepsilon',j_\varepsilon')$ that converges in a certain topology~$\mathcal{T}$ on the set~$\mathrm{CE}([0,T];\mathbb{R})$ as~$\varepsilon\to 0$ ? \item \emph{Convergence along sequences:} Is there a limit functional~$\mathcal{I}_0$ satisfying \begin{equation*} (\rho_\varepsilon',j_\varepsilon')\xrightarrow{\mathcal{T}}(\rho,j)\quad\Rightarrow\quad \mathcal{I}_\varepsilon(\rho_\varepsilon',j_\varepsilon') \xrightarrow{\varepsilon\to 0} \mathcal{I}_0(\rho,j)\,? \end{equation*} \end{enumerate} We answer the first question in Theorem~\ref{GF_NGF:thm:compactness}, which establishes that sequences $(\rho_\varepsilon',j_\varepsilon')$ such that~$\mathcal{I}_\varepsilon(\rho_\varepsilon',j_\varepsilon')$ remains bounded are compact with respect to a certain topology. In Theorem~\ref{GF_NGF:thm:compactness}, we make the additional assumption that the densities~$\rho_\varepsilon'$ have uniformly bounded Radon-Nikodym derivatives with respect to a stationary measure we specify in Definition~\ref{GF_NGF:def:transformed-stationary-measure}. \smallskip The second question is answered by Theorems~\ref{GF_NGF:thm:lower-bound} (liminf bound) and Theorem~\ref{GF_NGF:thm:upper-bound} (limsup bound), which together establish a limit of~$\mathcal{I}_\varepsilon$ in the sense of~$\Gamma$-convergence. Here, we give a short version that combines these theorems into one statement. We will consider convergence in~$\mathrm{CE}([0,T];\mathbb{R})$ in the distributional sense, meaning convergence against any smooth and compactly supported test function (Definition~\ref{GF_NGF:def:converge-in-CE}). Furthermore, we introduce a variable transformation in Definition~\ref{GF_NGF:def:coordinate-transformation} akin to our problem at hand, and we give the reason for including the transformation when defining~$y_\varepsilon$. In brief, the purpose of this transformation is to map, in the limit~$\varepsilon\to 0$, the region around the left-minimum~$x_a$ to one point and the region around~$x_b$ to another point. The effect of this transformation for finite~$\varepsilon$ is shown much further below in Figure~\ref{GF_NGF:fig:coordinate-transformation}. \begin{theorem} [Main result] \label{GF_NGF:thm:intro-main-result} There is a functional~$\mathcal{I}_0$ such that under the assumptions of Theorems~\ref{GF_NGF:thm:lower-bound} and~\ref{GF_NGF:thm:upper-bound}, we have~$\lim_{\varepsilon\to 0}\mathcal{I}_\varepsilon = \mathcal{I}_0$ in the following sense of~$\Gamma$-convergence: for any~$(\rho,j)\in \mathrm{CE}([0,T];\mathbb{R})$ such that~$\mathcal{I}_0(\rho,j)$ is finite, there are~$(\rho_\varepsilon,j_\varepsilon)\in \mathrm{CE}([0,T];\mathbb{R})$ such that \begin{equation*} (\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) \xrightarrow{\varepsilon\to 0} (\rho,j)\quad\text{and}\quad \mathcal{I}_\varepsilon(\rho_\varepsilon,j_\varepsilon) \xrightarrow{\varepsilon\to 0}\mathcal{I}_0(\rho,j). \end{equation*} \end{theorem} This Theorem is a first step into proving commutativity of the diagram shown in Figure~\ref{GF_NGF:fig:commuting-diagram}. \vspace{.3cm} \begin{figure}[h!] \labellist \pinlabel \Large \color{black}{$\mathcal{I}_\varepsilon$} at 1300 1100 \pinlabel \color{dark_blue}{$\text{reversible}$} at -650 1100 \pinlabel \color{black}{$\text{Stochastic}$} at -100 1150 \pinlabel \color{black}{$\text{Process}$} at -100 1050 \pinlabel \color{black}{$(\varepsilon,n)$} at 225 1050 \pinlabel \Large \color{red_one}{$\mathcal{I}_0$} at 1300 120 \pinlabel \color{dark_blue}{$\text{Gradient Flow}$} at 1900 1100 \pinlabel \color{red_one}{$\text{irreversible}$} at -650 150 \pinlabel \color{black}{$\text{Stochastic}$} at -100 200 \pinlabel \color{black}{$\text{Process}$} at -100 100 \pinlabel \color{black}{$(0,n)$} at 225 100 \pinlabel \color{red_one}{$\text{Non-Gradient-Flow}$} at 2000 150 \pinlabel \color{black}{$\text{Large deviations}$} at 750 1170 \pinlabel \color{black}{$n\to\infty$} at 750 1050 \pinlabel \color{black}{$\text{Large deviations}$} at 750 170 \pinlabel \color{black}{$n\to\infty$} at 750 50 \pinlabel \color{black}{$\varepsilon$} at -100 760 \pinlabel \Large \color{black}{$\downarrow$} at -100 620 \pinlabel \color{black}{$0$} at -100 480 \pinlabel \color{black}{$\varepsilon$} at 1400 760 \pinlabel \Large \color{black}{$\downarrow$} at 1400 620 \pinlabel \color{black}{$0$} at 1400 480 \endlabellist \centering \includegraphics[scale=.1]{CommutingDiagram} \caption{The top row corresponds to the empirical flux-density pairs~\eqref{GF_NGF:eq:empirical-flux-density-pairs} stemming from i.i.d.~copies of the reversible diffusion process~$X^\varepsilon_i(t)$ from~\eqref{GF_NGF:eq:intro:upscaled-diffusion-process}, whose Fokker-Planck equation is~\eqref{GF_NGF:eq:intro:upscaled-FP}. The bottom row corresponds similarly to a jump process defined on two states~$\{-,+\}$, with jumps only from~$-$ to~$+$. The bottom arrow is a rigorous large-deviation principle, and we prove the right arrow by Theorem~\ref{GF_NGF:thm:intro-main-result}. Whether the left and top arrows correspond to theorems is still an open question.} \label{GF_NGF:fig:commuting-diagram} \end{figure} In there, the stochastic process depending on~$(\varepsilon,n)$ is the so-called empirical flux-density pair~$(\rho_{\varepsilon,n},j_{\varepsilon,n})$ formally defined by \begin{equation}\label{GF_NGF:eq:empirical-flux-density-pairs} \rho_{\varepsilon,n} = \frac{1}{n}\sum_{i=1}^n \delta_{X_i^\varepsilon(t)}\quad\text{and}\quad j_{\varepsilon,n}\approx\frac{1}{n}\sum_{i=1}^n\delta_{X_i^\varepsilon(t)} \partial_t X_i^\varepsilon(t), \end{equation} where~$X_i^\varepsilon(t)$ are independent copies of the upscaled diffusion process satisfying~\eqref{GF_NGF:eq:intro:upscaled-diffusion-process}. For every fixed~$\varepsilon>0$, this process is time-reversible. In the limit~$\varepsilon\to 0$, we expect to obtain a jump process on two states~$\{-,+\}$ with jumps only from left to right. This limit process is no longer reversible. \subsection{The limiting flux-density functional} \label{GF_NGF:sec:intro:limiting-flux-density-functional} We introduce the limiting functional~$\mathcal{I}_0$ from our main result, Theorem~\ref{GF_NGF:thm:intro-main-result} above, and then give a heuristic argument for why this functional is to be expected. The rate function is given in terms of the function \begin{equation}\label{GF_NGF:eq:S-fct} S(a,b):= \begin{cases} a\log(a/b) -(a-b), & a,b>0,\\ b, & a=0,b>0,\\ +\infty, & \text{otherwise}. \end{cases} \end{equation} \paragraph{Limit functional} The map~$\mathcal{I}_0:\mathrm{CE}([0,T];\mathbb{R})\to[0,\infty]$ is defined by \begin{equation*} \mathcal{I}_0(\rho,j) := \int_0^T S(j(t)|z(t))\,dt, \end{equation*} whenever~$\rho(t, \mathrm{d} x) = z(t)\delta_{-1/2}( \mathrm{d} x) + (1-z(t))\delta_{+1/2}( \mathrm{d} x)$ and the flux is piecewise constant and given by~$j(t,x) = j(t)\mathbf{1}_{(-1/2,+1/2)}(x)$. Otherwise, we set $\mathcal{I}_0(\rho,j) = +\infty$. \smallskip The limiting functional~$\mathcal{I}_0$ is finite only for measures~$\rho$ that are concentrated on the points~$\{\pm 1/2\}$. By continuity equation, the flux is given by $j(t)=-\partial_t z(t)$. If~$\mathcal{I}_0$ vanishes, then~$S(j(t)|z(t))=0$, which in turn implies that~$j(t)=z(t)$. Hence the minimizer~$\rho$ of the functional~$\mathcal{I}_0$ with density~$z$ satisfies the evolution equation~$\partial_tz=-z$. The evolution of such a~$\rho$ is depicted in Figure~\ref{GF_NGF:fig:intro:limit-evolution-FP}. The fact that the limit concentrates on~$\{\pm 1/2\}$ rather than~$\{x_a,x_b\}$ is a consequence of the coordinate transformation~$y_\varepsilon$ from Definition~\ref{GF_NGF:def:coordinate-transformation}. The choice of the left-point is arbitrary, but fixes the right point. We choose~$y_\varepsilon$ such that in the limit, the distance between the points is equal to one. \smallskip Just like the pre-limit functional, the functional~$\mathcal{I}_0$ is as well motivated from large-deviation theory. More precisely, it is the large-deviation rate function of flux-density pairs of independent jump processes on a set of two points~$\{-,+\}$, with jump rates~$r_{-+}=1$ and~$r_{+-}=0$. We prove these type of large-deviation results from a Hamilton-Jacobi point-of-view in more generality in Chapter~5. Renger gives a proof based on Girsanov-transformation arguments~\cite{Renger2017}, and Kraaij provides a proof based on Hamilon-Jacobi theory~\cite{Kr17}. Heuristically, we expect the limit of the Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP} to be characterized by exactly that dynamics: transition of mass occurs from left to right at rate one, while transitions from right to left do not occur at all. \subsection{Overview} The rest of this chapter is structured as follows. In Section~\ref{GF_NGF:sec:GF}, we introduce gradient-flow structures and their relation to large-deviation theory. This part provides the background to convergence to equilibirum in the Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP} emphasising the role of entropy, and the Wasserstein gradient flow formulation. In Section~\ref{GF_NGF:sec:flux-density-functionals}, we start from the action formulation (Definition~\ref{GF_NGF:def:wassterstein-GF}) to demonstrate in Section~\ref{GF_NGF:sec:why-GF-not-converge} that the Wasserstein functional does not converge for our problem at hand, as opposed to~\cite{ArnrichMielkePeletierSavareVeneroni2012}. After that, we define the flux-density functionals~$\mathcal{I}_\varepsilon$ and~$\mathcal{I}_0$. In Section~\ref{GF_NGF:sec:proof-of-gamma-convergence}, we prove the main Theorem by splitting it in three statements: compactness (Theorem~\ref{GF_NGF:thm:compactness}), the lower bound (Theorem~\ref{GF_NGF:thm:lower-bound}) and the upper bound (Theorem~\ref{GF_NGF:thm:upper-bound}). For the proof of the lower bound, we work under the assumption of uniformly bounded densities. \section{Gradient flows} \label{GF_NGF:sec:GF} Gradient flows are an example of variational structures that appear naturally in partial differential equations modelling dissipative phenomena. We refer to Peletier's lectures on variational modelling~\cite{Peletier2014} for background and physical motivations on gradient flows . Here in this section, we do not cover novel results, but provide the background to gradient-flow structures that underlie the type of Fokker-Planck equations we consider in this chapter. \smallskip By Fokker-Planck equations, we generally refer to a class of partial differential equations that describe the time evolution of distributions of stochastic processes. We illustrate gradient flows without the parameters present in~\eqref{GF_NGF:eq:intro:upscaled-FP}, that is we consider~$\rho=\rho(t,x)$ solving an equation of the type \begin{equation}\label{GF_NGF:eq:Fokker-Planck-intro} \partial_t \rho = \Delta \rho + \mathrm{div}\left(\rho \nabla V\right),\quad t\geq 0, \, x\in\mathbb{R}, \end{equation} which is a basic model for the probability distribution of a particle diffusing in one dimension in a confining potential landscape~$V(x)$. The asymmetric double-well potential as depicted in Figure~\ref{GF_NGF:fig:asymmetric-doublewell-potential} is an example of a confining potential: the particle is trapped by the potential, which effectively forces the particle to diffuse closely around the minima of~$V$. \smallskip We think of the solution~$\rho(t,x)$ to~\eqref{GF_NGF:eq:Fokker-Planck-intro} as the probability of observing the particle at time~$t$ being in state~$x$. As illustrated above by Kramers problem, the particle's state~$x$ can represent the value of a system's parameter that is fluctuating in time according to Brownian motion, and does not necessarily correspond to the position of a physical particle diffusing in a viscous fluid. The function~$V(x)$ then usually corresponds to an effective energy landscape. For a background on Fokker-Planck equations and their derivations from a phenomenological point of view, we refer to Risken's monograph on this type of equations~\cite{Risken1996}. \smallskip We first discuss in Section~\ref{GF_NGF:sec:GF:conv-to-equil} convergence to equilibrium in~\eqref{GF_NGF:eq:Fokker-Planck-intro}. The main point is to illustrate at the same time both the phenomenon of entropy-dissipation and the dynamics of~\eqref{GF_NGF:eq:Fokker-Planck-intro}. Then in Section~\ref{GF_NGF:sec:GF:diss-mech}, we recall the so-called JKO-scheme that Jordan, Kinderlehrer and Otto identified in~\cite{JordanKinderlehrerOtto1998}, to illuminate the fact that~\eqref{GF_NGF:eq:Fokker-Planck-intro} is the a solution to the gradient-flow of the entropy with respect to the Wasserstein distance. In Section~\ref{GF_NGF:sec:GF:var-struct}, we choose the formulation of gradient flows that we will use in later sections, by means of certain functionals~$\mathcal{I}$. The minimizers of those functionals are called \emph{curves of maximal slope} that correspond to gradient solutions in the classical case. This way of formulating a gradient flow in metric spaces goes back to Ennio De Giorgi and collaborators~\cite{DeGiorgiMarinoTosques1980}. The Wasserstein gradient-flow of~\eqref{GF_NGF:eq:Fokker-Planck-intro} is one example of such a structure: the gradient-flow dynamics is characterized as the minimizer of a functional that involves the entropy, Fisher information and Wasserstein distance. This variational formulation via a functional is the starting point for the~$\Gamma$-convergence results in~\cite{ArnrichMielkePeletierSavareVeneroni2012}, which is why we recall it in Section~\ref{GF_NGF:sec:GF:var-struct}. We use this formulation to showcase where exactly the line of argument in~\cite{ArnrichMielkePeletierSavareVeneroni2012} is limited to symmetric potentials~$V$. \smallskip The presentation draws from different sources: the overview of Markowich and Villani on convergence to equilibrium~\cite{MarkowichVillani2000}, the monograph on gradient flows~\cite{AmbrosioGigliSavare2008} written by Ambrosio, Gigli and Savaré, and the program of deriving gradient flows from large deviations put forward by Adams, Dirr, Mielke, Peletier, Renger and Zimmer~\cite{AdamsDirrPeletierZimmer2011,MielkePeletierRenger2014}. \subsection{Convergence to equilibrium via dissipation of entropy} \label{GF_NGF:sec:GF:conv-to-equil} Boltzmann discovered the celebrated~$\mathrm{H}$-Theorem: according to Boltzmann's equation, an ideal gas of particles evolves in time in such a way that its so-called entropy is monotonically decreasing. As a consequence, after enough time has passed, we find the gas in a state minimizing the entropy. In this state, the distribution of particle's velocities~$v$ is stable, known as the Maxwell-Boltzmann distribution. More generally, we usually refer to a state minimizing the entropy as equilibrium. If Boltzmann's~$\mathrm{H}$-Theorem applies to a system of particles, an initial distribution of particles will eventually converge to equilibrium. \smallskip We can also observe such a convergence phenomenon for the solutions to the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro}. Its equilibrium state, defined by satisfying~$\partial_t\gamma=0$, is given by~$\gamma = e^{-V}$, and we will refer to it as the \emph{Boltzmann distribution} or simply \emph{equilibrium}. We will assume that~$\gamma$ has mass one (otherwise, we add a constant to the potential~$V$). For measuring how far a solution~$\rho$ of~\eqref{GF_NGF:eq:Fokker-Planck-intro} is away from equilibirum, it is natural to introduce the density~$u(t,x)$ by~$\rho(t, \mathrm{d} x)=u(t,x)\gamma( \mathrm{d} x)$. Then the solution~$\rho$ is in equilibrium if and only if~$u\equiv 1$. The density~$u$ evolves in time according to \begin{equation*} \partial_t u = \Delta u - \nabla u \nabla V, \end{equation*} which we can infer from~\eqref{GF_NGF:eq:Fokker-Planck-intro}. For fixed time~$t>0$, the \emph{relative entropy} of~$\rho$ with respect to equilibrium is defined as \begin{equation}\label{GF_NGF:eq:intro:def-entropy} \mathrm{Ent}(\rho(t,\cdot)|\gamma) := \int_\mathbb{R} u(t,x)\log u(t,x) \, \mathrm{d} \gamma(x). \end{equation} In notation, we shall suppress the dependence on time. If the equilibrium distribution~$\gamma$ is clear from the context, we call~$\mathrm{Ent}$ simply the~\emph{entropy}. Here, we will point out the special role that the entropy plays in the study of the convergence to equilibrium. For further details, we refer to Markowich's and Villani's overview~\cite{MarkowichVillani2000}, where the authors connect convergence to equilibrium with various functional inequalities. \smallskip The entropy vanishes if~$u\equiv 1$, and therefore vanishes if~$\rho$ is in equilibrium. By the estimate~$x\log x \geq x-1$, the entropy is non-negative: \begin{equation*} \mathrm{Ent}(\rho|\gamma)\stackrel{\mathclap{\text{def}}}{=} \int_\mathbb{R}\frac{ \mathrm{d}\rho}{ \mathrm{d}\gamma} \log\left(\frac{ \mathrm{d}\rho}{ \mathrm{d}\gamma}\right)\, \mathrm{d}\gamma \geq \int_\mathbb{R}\left(\frac{ \mathrm{d}\rho}{ \mathrm{d}\gamma}-1\right)\, \mathrm{d}\gamma = 0. \end{equation*} Hence the equilibrium distribution~$\gamma$ indeed minimizes the entropy. For a solution~$\rho(t, \mathrm{d} x)$ of the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro}, let us see how the entropy evolves in time. A calculation involving integration by parts yields \begin{equation}\label{GF_NGF:eq:intro:diss-ent-is-fisher} \frac{ \mathrm{d}}{ \mathrm{d} t}\mathrm{Ent}(\rho|\gamma) = - \mathrm{I}(\rho|\gamma),\quad \text{where}\quad\mathrm{I}(\rho|\gamma):=\int_\mathbb{R} |\nabla (\log u)|^2\, \mathrm{d}\rho. \end{equation} The functional~$\mathrm{I}$ is non-negative and zero only if~$u$ is constant. Hence the entropy decreases in time unless~$\rho$ is in equilibrium. The functional~$\mathrm{I}$ is known as the Fisher information. In Chapter~4, we encounter the Fisher information as the exponential convergence rate of the empirical measure associated to~\eqref{GF_NGF:eq:Fokker-Planck-intro}. \smallskip Under suitable assumptions on the potential~$V$, we can be more precise about how fast the entropy decays. We say that the distribution~$\gamma=e^{-V}$ satisfies the logarithmic Sobolev inequality with a constant~$\lambda>0$ if \begin{equation}\label{GF_NGF:eq:intro:log-sobolev} \mathrm{Ent}(\rho|\gamma) \leq \frac{1}{2\lambda} \mathrm{I}(\rho|\gamma). \end{equation} If that inequality is satisfied, then \begin{equation*} \frac{ \mathrm{d}}{ \mathrm{d} t} \mathrm{Ent}(\rho|\gamma) \overset{\eqref{GF_NGF:eq:intro:diss-ent-is-fisher}}{=} -\mathrm{I}(\rho|\gamma) \overset{\eqref{GF_NGF:eq:intro:log-sobolev}}{\leq} -2\lambda \mathrm{Ent}(\rho|\gamma). \end{equation*} Hence by Gr\"{o}nwall's inequality, the entropy decays exponentially fast: \begin{equation}\label{GF_NGF:eq:intro:ent-decays-exp} \mathrm{Ent}(\rho(t,\cdot)|\gamma) \leq \mathrm{Ent}(\rho(0,\cdot)|\gamma) e^{-2\lambda t}. \end{equation} According to the estimate~\eqref{GF_NGF:eq:intro:ent-decays-exp}, the entropy is being dissipated under the time evolution of~\eqref{GF_NGF:eq:Fokker-Planck-intro} under two conditions. First, the initial distribution~$\rho(0,\cdot)$ must be non-singular with respect to equilibrium in the sense that the relative entropy is finite. Secondly, the logarithmic Sobolev inequality must be satisfied. The latter is satisfied for confining potentials (for instance~\cite[Theorem~1]{MarkowichVillani2000} and the discussion thereafter). Otto and Villani give geometric derivations of Talagrand- and logarithmic Sobolev inequalities in~\cite{OttoVillani2000}. \smallskip The above analysis demonstrates that for solutions~$\rho$ of the Fokker-Planck equation, the dissipation of entropy happens exponentially fast under fairly general conditions on the potential~$V$, and that the amount of dissipation is quantified by the Fisher information~\eqref{GF_NGF:eq:intro:diss-ent-is-fisher}. Jordan, Kinderlehrer and Otto revealed in~\cite{JordanKinderlehrerOtto1998} an exciting and deeper geometric connection between the entropy and the Fokker-Planck equation: the solution~$\rho$ flows in the direction of the Wasserstein gradient of the entropy. Their analysis leads to a variational structure that we will call a \emph{Wasserstein gradient flow}, and we shall discuss their insights next. \subsection{Gradient flow---a dissipation mechanism} \label{GF_NGF:sec:GF:diss-mech} As we saw above, solutions to the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro} evolve such that entropy decays exponentially fast. Here, we shall discuss the dissipation mechanism that Jordan, Kinderlehrer and Otto identified in~\cite{JordanKinderlehrerOtto1998}, in which the entropy plays the role of the energy being dissipated. Before we describe this dissipation mechanism for the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro}, we illustrate the central ingredients of a dissipation mechanism in a simpler context. \smallskip In the one-dimensional Euclidian setting, a gradient-flow is an equation of the type \begin{equation}\label{GF_NGF:eq:intro:basic-GF-in-R} \partial_t x = -\nabla\mathrm{E}(x),\qquad x(0)=x_0, \end{equation} where~$x:[0,T]\to\mathbb{R}$ is a sufficiently regular path,~$\mathrm{E}:\mathbb{R}\to\mathbb{R}$ is a confining potential that we refer to as an \emph{energy} and~$\nabla \mathrm{E}$ is the gradient of~$\mathrm{E}$, here the derivative. By confining we mean that~$E(x)\to\infty$ as~$|x|\to\infty$,~$\mathrm{E}\in C^2(\mathbb{R})$ and that its second derivative is uniformly bounded from below. We will write~$x(t)=x_t$ for the evaluation of the path~$x$ at time~$t$. \smallskip By definition of the gradient in 1d, in each time step the solution~$x$ to~\eqref{GF_NGF:eq:intro:basic-GF-in-R} follows the direction that dissipates as much energy as possible. As a result, as time tends to infinity, the solution converges to a local minimum of~$\mathrm{E}$. One way to understand this evolution is to start from a time-discretization. For an infinitesimal time-step~$\tau>0$, the backward Euler approximation to~\eqref{GF_NGF:eq:intro:basic-GF-in-R} is \begin{equation*} \frac{x(t+\tau)-x(t)}{\tau} + \nabla \mathrm{E}(x(t+\tau)) \approx 0, \end{equation*} which motivates the implicit Euler scheme: define the set of points~$\{x_k^\tau\}_{k=0,1,\dots}$ iteratively by~$x_0^\tau := x_0$ and \begin{equation}\label{GF_NGF:eq:intro:min-movement-1d-R} x_k^\tau := \mathrm{argmin}_{\substack{x}\in\mathbb{R}}\left[\frac{d(x,x_{k-1}^\tau)^2}{2\tau} + \mathrm{E}(x)\right],\qquad d(x,y) := |x-y|. \end{equation} The map~$d$ is just the standard Euclidian metric. We have the following convergence statement of this time-discretization: if both~$\tau\to 0$ and~$k\to\infty$ such that~$k\tau \to t$, then $x_k^\tau \to x(t)$, where~$x$ solves~\eqref{GF_NGF:eq:intro:basic-GF-in-R}. \smallskip In the formulation~\eqref{GF_NGF:eq:intro:min-movement-1d-R}, we can recognize a couple of aspects. First, in each time-step the solution~$x$ minimizes not merely the potential, but rather the combination of both the metric~$\mathrm{d}$ and the potential~$\mathrm{E}$. Secondly, we can also interpret the precise role of the metric. To that end, consider the step~$k\to k+1$ for a fixed and small value of~$\tau$. In the minimization procedure~\eqref{GF_NGF:eq:intro:min-movement-1d-R}, points far away from the starting point~$x_{k}^\tau$ are heavily punished since the metric is upscaled by~$\tau^{-1}$, whereas points close to~$x_k^\tau$ that decrease the value of~$\mathrm{E}$ are favored. In combination, roughly speaking, the faster the metric grows (the map $y\mapsto d(y,x_k^\tau)$), the less the energy will decrease in the step~$k\to k+1$. In this way, the metric determines how much energy is dissipated in each time step. \smallskip We therefore call~\eqref{GF_NGF:eq:intro:min-movement-1d-R} a \emph{dissipation meachanism} underlying the gradient flow equation~\eqref{GF_NGF:eq:intro:basic-GF-in-R}. In geometric terms, the potential and metric together determine the direction of movement while the metric controls the amount of dissipated energy per step. Let us summarize the players of the dissipation mechanism that leads to the gradient flow~\eqref{GF_NGF:eq:intro:basic-GF-in-R}: \begin{enumerate}[label=(\roman*)] \item A state space~$\mathrm{M}$; here~$\mathrm{M}=\mathbb{R}$. \item A map~$\mathrm{E}:\mathrm{M}\to\mathbb{R}$; here~$\mathrm{E}$ is a confining potential, which we call energy. \item A metric~$d:\mathrm{M}\times \mathrm{M}\to[0,\infty]$; here~$d$ is the standard Euclidian metric. \end{enumerate} Jordan, Kinderlehrer and Otto made the remarkable discovery~\cite{JordanKinderlehrerOtto1998} that the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro} admits a dissipation mechanism in which the Boltzmann entropy serves as the energy. They identified the corresponding distance as a transport cost that arises in the theory of optimal transport. The scheme they developed is made from the following three ingredients: \begin{enumerate}[label=(\roman*)] \item $\mathrm{M}:=\mathcal{P}_2(\mathbb{R})$, the set of probability measures with finite second moments. \item $\mathrm{E}:=\mathrm{Ent}(\cdot|\gamma):\mathrm{M}\to\mathbb{R}\cup\{+\infty\}$, the entropy defined as in~\eqref{GF_NGF:eq:intro:def-entropy} by \begin{equation}\label{GF_NGF:eq:JKO-scheme-relative-entropy} \mathrm{Ent}(\mu|\gamma) := \int_\mathbb{R} u\log u \, \mathrm{d} \gamma,\quad \text{with}\; u(x) := \frac{ \mathrm{d}\mu}{ \mathrm{d}\gamma}(x). \end{equation} If~$\mu$ is not absolutely continuous with respect to~$\gamma$, then~$\mathrm{Ent}(\mu|\gamma):=+\infty$. \item $d:=\mathcal{W}$, the Wasserstein metric defined by \begin{equation*} \mathcal{W}(\mu,\nu) := \inf_{m\in \Pi(\mu,\nu)}\int_{\mathbb{R}\times\mathbb{R}}|x-y|^2\,m( \mathrm{d} x \mathrm{d} y), \end{equation*} where~$\Pi(\mu,\nu)$ is the set of probability measures on~$\mathbb{R}\times\mathbb{R}$ whose first marginal equals~$\mu$ and whose second marginal equals~$\nu$. \end{enumerate} \smallskip The Wasserstein metric can be interpreted as the minimal cost required to transport a pile of sand distributed as~$\mu$ to a pile of sand distributed as~$\nu$, where the cost of transporting a sand grain from~$x$ to~$y$ is given by~$|x-y|^2$. For a thorough historical and mathematical overview of the topic of optimal transport we refer to Villani's monograph~\cite{Villani2008}. \smallskip The main result discovered by Jordan, Kinderlehrer and Otto is the following dissipation mechanism (\cite[Theorem~5.1]{JordanKinderlehrerOtto1998}). For an initial condition~$\rho_0\in \mathcal{P}_2(\mathbb{R})$ and fixed time-step~$\tau>0$, define~$\{\rho_k^\tau\}_{k=0,1,\dots}$ iteratively by \begin{equation}\label{GF_NGF:eq:intro:diss-mech-for-FP} \rho_k^\tau := \text{argmin}_{\mu\in \mathcal{P}_2(\mathbb{R})}\left[\frac{\mathcal{W}(\mu,\rho_{k-1}^\tau)^2}{2\tau}+\mathrm{Ent}(\mu|\gamma)\right]. \end{equation} Define the piecewise-constant path~$\rho^\tau$ by~$\rho^\tau(t):=\rho_k^\tau$ for~$t\in[k\tau,(k+1)\tau)$. Then we have~$\rho^\tau\to \rho$ strongly in~$L^1((0,T)\times\mathbb{R})$ as~$\tau\to 0$, where~$\rho$ is the solution to~\eqref{GF_NGF:eq:Fokker-Planck-intro} with initial condition~$\rho(0, \mathrm{d} x)=\rho_0( \mathrm{d} x)$. \smallskip This time-discretization scheme, also refered to as the JKO-scheme, is one way of making sense of the one-dimensional gradient flow~\eqref{GF_NGF:eq:intro:basic-GF-in-R} in infinite dimensions (with $\mathrm{M}=\mathcal{P}_2(\mathbb{R})$ instead of~$\mathrm{M}=\mathbb{R}$). On top of the fact that the entropy decays exponentially fast, the JKO-scheme reveals that solutions to the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro} flow along the \emph{steepest descent} of the entropy. The Wasserstein metric determines the amount of dissipated entropy per time-stepm just as the Euclidian metric determines the amount of dissipated energy in~\eqref{GF_NGF:eq:intro:min-movement-1d-R}. We say the solution~$\rho$ to the scheme~\eqref{GF_NGF:eq:intro:diss-mech-for-FP} is the solution to the \emph{Wasserstein gradient-flow}. Soon after, Otto further attached a precise geometrical meaning to a Wasserstein gradient-flow~\cite{Otto2001}. \smallskip Ambrosio, Gigli and Savaré generalize the formulation of gradient flows via a dissipation mechanism, such as~\eqref{GF_NGF:eq:intro:diss-mech-for-FP}, to arbitrary metric spaces~\cite[Chapter~2]{AmbrosioGigliSavare2008}. This generalization of~\eqref{GF_NGF:eq:intro:diss-mech-for-FP} is called a \emph{minimizing movement scheme}, \cite[Definition~2.0.6]{AmbrosioGigliSavare2008}. The main assumptions on the energy functional in order to obtain solutions to a minimizing movement scheme are suitable coercivity, lower-semicontinuity and compactness prtoperties. For the precise set of assumptions, we refer in particular to~\cite[Section~2.2]{AmbrosioGigliSavare2008}. \subsection{Gradient flow---a variational structure} \label{GF_NGF:sec:GF:var-struct} In the previous section, we discussed the minimizing movement scheme or JKO-scheme~\eqref{GF_NGF:eq:intro:diss-mech-for-FP}, a dissipation mechanism build up from a triple~$(\mathrm{M},\mathrm{E},d)$. The JKO-scheme represents one way of regarding the solution~$\rho$ to~\eqref{GF_NGF:eq:Fokker-Planck-intro} as a solution to a \emph{gradient flow}, since the limiting solution obtained from~\eqref{GF_NGF:eq:intro:diss-mech-for-FP} flows along the steepest descent of~$\mathrm{E}$. \smallskip While this formulation of a gradient flow in terms of discrete time steps is conceptually enlightening, it is not well suited for passing to limits in gradient flows. For instance, given a family of triples~$(\mathrm{M},\mathrm{E}_\varepsilon,d_\varepsilon)$, under which convergence conditions on the energies~$\mathrm{E}_\varepsilon$ and metrics~$d_\varepsilon$ will solutions to the~$(\mathrm{M},\mathrm{E}_\varepsilon,d_\varepsilon)$-scheme converge to solutions of a limiting scheme $(\mathrm{M},\mathrm{E}_0,d_0)$? To answer questions of that type for gradient flows and to simplify the treatment of convergence of gradient flows, we introduce in this section a different but formally equivalent formulation of a gradient-flow. This formulation is known as the \emph{energy-dissipation principle}, and defines a gradient flow in terms of a functional. As in the previous section, we first illustrate the formulation on the example of the real-valued gradient flow~\eqref{GF_NGF:eq:intro:basic-GF-in-R}. Then we turn to the Wasserstein gradient flow of the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro}. \subsubsection{Example illustrating the energy-dissipation principle} Recall that~\eqref{GF_NGF:eq:intro:basic-GF-in-R} is the equation~$\partial_t x = -\nabla\mathrm{E}(x)$ on~$\mathbb{R}$. For any~$a,b\in\mathbb{R}$, if~$2ab\leq -a^2-b^2$, then $a=-b$. Hence a path~$x$ solves~\eqref{GF_NGF:eq:intro:basic-GF-in-R} if and only if \begin{equation}\label{GF_NGF:eq:GF:Young-bound-GF-on-R} \partial_tx \cdot \nabla E(x) \leq -\frac{1}{2}|\partial_t x|^2 - \frac{1}{2}|\nabla E(x)|^2. \end{equation} By the chain rule,~$\partial_t\mathrm{E}(x)=\nabla\mathrm{E}(x)\partial_t x$. Hence performing integration in time, the solution~$x$ to~\eqref{GF_NGF:eq:intro:basic-GF-in-R} satisfies the inequality \begin{equation*} E(x_T) + D(x;0,T) \leq \mathrm{E}(x_0),\quad \end{equation*} where we introduced the \emph{dissipation} \begin{equation}\label{GF_NGF:eq:GF:dissipation-euclidian-example} D(x;0,T):=\int_0^T\left[\frac{1}{2} |\partial_t x|^2+ \frac{1}{2}|\nabla E(x)|^2\right] \mathrm{d} t. \end{equation} For an absolutely continuous path~$y:[0,T]\to\mathbb{R}$, \begin{equation*} \mathcal{I}(y) := \mathrm{E}(y_T)-\mathrm{E}(y_0) + D(y;0,T). \end{equation*} The map~$y\mapsto\mathcal{I}(y)$ carries two important features. First, it is non-negative for \emph{any} path~$y$. This follows from the chain rule and the estimate~$2ab \geq -a^2-b^2$, \begin{equation*} E(y_T)-E(y_0) = \int_0^T\partial_t y\cdot \nabla E(y)\, \mathrm{d} t \geq \int_0^T\left[-\frac{1}{2}|\partial_t y|^2 - \frac{1}{2}|\nabla E(y)|^2\right] \mathrm{d} t. \end{equation*} Secondly,~$\mathcal{I}(y)$ vanishes if and only if~$y=x$ is a solution to the gradient flow~$\partial_tx=-\nabla\mathrm{E}(x)$, which follows from the bound~\eqref{GF_NGF:eq:GF:Young-bound-GF-on-R} for~$y$. \smallskip Since~$\mathcal{I}$ is non-negative and zero only for the solution, we can reformulate the solution of a gradient-flow as \begin{equation*} \partial_tx=-\nabla\mathrm{E}(x) \quad\Leftrightarrow\quad \mathrm{E}(x_T)+D(x)\leq E(x_0)\quad\Leftrightarrow\quad \mathcal{I}(x) = 0. \end{equation*} The map~$\mathcal{I}$ is an example of a gradient-flow structure. The reformulation in terms of a dissipation~$\mathrm{D}(\cdot)$ by integrating the infinitesimal gradient-flow in time is an example of Ennio De Giorgi's \emph{Energy-Dissipation-Principle}. This connection between solutions to gradient flows is also refered to as the \emph{Energy-Dissipation Theorem}, which holds in much more generality than presented here. \subsubsection{Energy-Dissipation Principle} Motivated by the previous example, we will consider the following formulation of a gradient flow, which corresponds to~\cite[Definition~1.1]{ArnrichMielkePeletierSavareVeneroni2012}. \begin{definition}[Gradient flow]\label{GF_NGF:def:GF} Let~$\mathrm{M}$ be a metric space,~$\mathrm{E}:\mathrm{M}\to\mathbb{R}\cup\{+\infty\}$ be a function and~$\mathrm{D}(\cdot;t_1,t_2):C([0,T];\mathrm{M})\to\mathbb{R}\cup\{+\infty\}$ be a functional defined for all~$0\leq t_1<t_2\leq T$. We call the triple~$(\mathrm{M},\mathrm{E},\mathrm{D})$ a \emph{gradient-flow structure} if for any~$\mu\in C([0,T];\mathrm{M})$ and all~$t_1<t_2$, the inequality \begin{equation}\label{GF_NGF:eq:def:GF} \mathrm{E}(\mu_{t_2}) + D(\mu;t_1,t_2) \geq E(\mu_{t_1}) \end{equation} is satisfied.\qed \end{definition} We call~$\mathrm{E}$ the \emph{energy} and~$\mathrm{D}$ the \emph{dissipation}. \begin{definition}[Solution to gradient flow]\label{GF_NGF:def:sol-to-GF} We call a curve~$\mu \in C([0,T];\mathrm{M})$ a solution to the gradient-flow structure~$(\mathrm{M},\mathrm{E},\mathrm{D})$ if~$\mathrm{E}(\mu_0)<\infty$ and \begin{equation}\label{GF_NGF:eq:def:GF-solution} \mathrm{E}(\mu_t) + \mathrm{D}(\mu;0,t) = \mathrm{E}(\mu_0)\qquad \text{for all } t\in [0,T]. \end{equation} \qed \end{definition} A solution to the gradient flow is defined by maximizing the dissipation of energy; hence the equality~\eqref{GF_NGF:eq:def:GF-solution}, which in the classical case corresponds by~\eqref{GF_NGF:eq:GF:Young-bound-GF-on-R} to curves of maximal slope. This equality is the \emph{Energy-Dissipation Principle}. \smallskip There are various ways in which the dissipation~$\mathrm{D}$ may depend on the energy~$\mathrm{E}$. In the definition of a gradient flow, the inequality~\eqref{GF_NGF:eq:def:GF} plays the role of replacing the chain rule. In the Euclidian example from above, this inequality holds true as a consequence of two aspects: the dissipation is related to the energy by~\eqref{GF_NGF:eq:GF:dissipation-euclidian-example} and the chain rule applies in~$\mathbb{R}$. On the other hand, the gradient flow~$\partial_tx=-\nabla\mathrm{E}(x)$ is recovered from~\eqref{GF_NGF:eq:def:GF-solution} via the fact that~$2ab\leq -a^2-b^2$ implies $a=-b$. In general, the formulation of a gradient-flow solution via Definition~\ref{GF_NGF:def:sol-to-GF} is equivalent if the dissipation is given via so-called dissipation potentials~$\mathcal{R}$-$\mathcal{R}^\ast$ (~\cite[Theorem~3.3.1]{Mielke2016}). \smallskip The Wasserstein gradient flow of~\eqref{GF_NGF:eq:Fokker-Planck-intro} however can be well-motivated from the quadratic structure as in~\eqref{GF_NGF:eq:GF:dissipation-euclidian-example}. We give an example based on generalizing the modulus of the gradient~$|\nabla\mathrm{E}|$ and the velocity~$|\partial_tx|$. To that end, let~$(\mathrm{M},\mathrm{E},\mathrm{D})$ be a triple as in Definition~\ref{GF_NGF:def:GF}. The local slope of the functional~$\mathrm{E}:\mathrm{M}\to\mathbb{R}\cup\{+\infty\}$ is defined by (\cite[Definition~1.2.4]{AmbrosioGigliSavare2008}) \begin{equation*} |\partial\mathrm{E}|(\mu) := \limsup_{\nu\to\mu}\frac{(\mathrm{E}(\mu)-\mathrm{E}(\nu))_+}{d(\mu,\nu)}. \end{equation*} For an absolutely-continuous curve $\mu:[0,T]\to\mathrm{M}$, define its metric velocity as (\cite[Eq.~(1.1.3)]{AmbrosioGigliSavare2008}) \begin{equation*} |\partial_t\mu|(t) := \lim_{\Delta t\to 0}\frac{d(\mu(t),\mu(t+\Delta t))}{\Delta t}. \end{equation*} We consider the dissipation to be given by \begin{equation}\label{GF_NGF:eq:intro:def-of-dissipation} \mathrm{D}(\mu,t_1,t_2) := \int_{t_1}^{t_2}\left[\frac{1}{2}|\partial_t\mu|(t)^2 + \frac{1}{2}|\partial\mathrm{E}|(\mu_t)^2\right]\, \mathrm{d} t. \end{equation} Assume that~$|\partial\mathrm{E}|$ is a \emph{strong upper gradient} (\cite[Definition~1.2.1]{AmbrosioGigliSavare2008}), meaning \begin{equation*} |\mathrm{E}(\gamma_{t_2})-\mathrm{E}(\gamma_{t_1})| \leq \int_{t_1}^{t_2} |\partial_t \gamma|(t)\cdot |\partial\mathrm{E}|(\gamma_t)\, \mathrm{d} t \end{equation*} holds for every absolutely-continuous curve~$\gamma:[0,T]\to\mathrm{M}$. Then by Young's inequality, \begin{equation*} \mathrm{E}(\gamma_{t_1})-\mathrm{E}(\gamma_{t_2}) \leq \int_{t_1}^{t_2} \left[\frac{1}{2}|\partial_t \gamma|(t)^2 + \frac{1}{2}|\partial\mathrm{E}|(\gamma_t)^2\right]\, \mathrm{d} t \overset{\eqref{GF_NGF:eq:intro:def-of-dissipation}}{=} \mathrm{D}(\gamma,t_1,t_2). \end{equation*} Hence if the local slope of the energy functional~$\mathrm{E}$ is a strong upper gradient, then the triple~$(\mathrm{M},\mathrm{E},\mathrm{D})$ is indeed a gradient-flow structure in the sense of Definition~\ref{GF_NGF:def:GF}. \subsubsection{Wasserstein gradient flow} As the JKO-scheme suggests, we choose the state space~$\mathrm{M}=\mathcal{P}_2(\mathbb{R})$ equiped with the Wasserstein metric and $\mathrm{E}(\mu):=\mathrm{Ent}(\mu|\gamma)$, the relative entropy as defined in~\eqref{GF_NGF:eq:JKO-scheme-relative-entropy} with the equilbirum distribution~$\gamma=e^{-V}$. We take the dissipation~$\mathrm{D}$ defined by~\eqref{GF_NGF:eq:intro:def-of-dissipation}. To complete the description, we give the characterization of the relative entropy's local slope and the Wasserstein velocity~$|\partial_t\mu|(t)$. \smallskip The local slope of the relative entropy is the relative Fisher information \cite[Theorem~10.4.7]{AmbrosioGigliSavare2008} given by \begin{equation*} \mathrm{I}(\mu|\gamma) = \int_\mathbb{R}|\nabla \log u|^2\, \mathrm{d}\mu,\qquad u(x) := \frac{ \mathrm{d}\mu}{ \mathrm{d}\gamma}(x). \end{equation*} The Wasserstein velocity is characterized by a particular velocity field~$v(t,x)$ satisfying~$\partial_t\mu_t+\mathrm{div}(v_t\mu_t)=0$ in the sense of distributions, as (\cite[Proposition~8.4.5]{AmbrosioGigliSavare2008}) \begin{equation*} |\partial_t \mu|(t)^2 = \int_\mathbb{R}|v(t,x)|^2\,\mu(t, \mathrm{d} x). \end{equation*} This characterization is closely related to the dynamical formulation of the Wasserstein distance discovered by Benamou and Brenier~\cite{BenamouBrenier2000}, \begin{equation*} \mathcal{W}(\mu_0,\mu_1)^2 = \inf_{\mu_t}\left\{\int_0^1\int_\mathbb{R}|v(t,x)|^2\,\mu_t( \mathrm{d} x)dt\,:\,\partial_t\mu_t+\mathrm{div}(v_t\mu_t)=0\right\}\, \end{equation*} where~$v(t,x)=v_t(x)$. With these remarks, we find the dissipation~$\mathrm{D}$ \begin{equation}\label{GF_NGF:eq:wasserstein-dissipation} \mathrm{D}(\mu;t_{1},t_{2}) = \int_{t_1}^{t_2}\left[\frac{1}{2}\int_\mathbb{R}|v(t,x)|^2\mu(t, \mathrm{d} x) + \frac{1}{2}\mathrm{I}(\mu_t|\gamma)\right]\, \mathrm{d} t. \end{equation} \begin{definition}[Wasserstein gradient flow]\label{GF_NGF:def:wassterstein-GF} Let~$\mathrm{M}:=\mathcal{P}_2(\mathbb{R})$, the set of probability measures on~$\mathbb{R}$ with finite second moments. Let~$\mathcal{A}:C([0,T];\mathrm{M})\to[0,\infty]$ be the map given by \begin{equation}\label{GF_NGF:non-eps-Wasserstein-action} \mathcal{A}(\rho) := \mathrm{Ent}(\rho_T|\gamma)-\mathrm{Ent}(\rho_0|\gamma) + \mathrm{D}(\rho;0,T), \end{equation} with the relative entropy~\eqref{GF_NGF:eq:JKO-scheme-relative-entropy} and the dissipation~\eqref{GF_NGF:eq:wasserstein-dissipation}. We call~$\mathcal{A}$ the \emph{Wasserstein action functional} corresponding to the \emph{Wasserstein gradient-flow structure} given by~$(\mathcal{P}_2(\mathbb{R}),\mathrm{Ent},\mathcal{W})$. The curve~$\rho$ satisfying~$\mathcal{A}(\rho)=0$ is called the solution to the Wasserstein gradient flow.\qed \end{definition} The minimizer of~$\mathcal{A}$ is also the solution to the JKO-scheme~\cite[Theorem~11.2.1]{AmbrosioGigliSavare2008}, and hence the solution to the Fokker-Planck equation~\eqref{GF_NGF:eq:Fokker-Planck-intro}. The solution~$\rho$ satisfies the energy-dissipation equality (e.g.~\cite[Eq.~(11.2.4)]{AmbrosioGigliSavare2008}) \begin{equation*} \mathrm{Ent}(\rho_T|\gamma)+\int_0^T\mathrm{I}(\rho_t|\gamma)\, \mathrm{d} t=\mathrm{Ent}(\rho_0|\gamma), \end{equation*} which is also obtained by integrating~\eqref{GF_NGF:eq:intro:diss-ent-is-fisher} in time. \subsubsection{The $\mathcal{R}$-$\mathcal{R}^\ast$ formulation} The quadratic structure of the dissipation~\eqref{GF_NGF:eq:intro:def-of-dissipation} is an example of a more general structure of grandient flows. We introduce this more general structure here. In the~$\mathcal{R}$-$\mathcal{R}^\ast$ formulation, generalized gradient-flow structures in a smooth setting arise from a combination of the following three ingredients: \begin{enumerate}[label=(\roman*)] \item A \emph{state space}~$\mathrm{M}$, which is a set with a sufficiently rich differentiable structure that gives gradients a meaning, such as Riemannian manifolds. \item A function~$\mathrm{E}:\mathrm{M}\to\mathbb{R}$, the \emph{energy}. \item A function~$\mathcal{R}:T\mathrm{M}\to[0,\infty]$, which we call \emph{dissipation potential}., such that for each state~$x\in \mathrm{M}$: \begin{enumerate}[label=($\mathcal{R}$\arabic*)] \item $\mathcal{R}(x,\cdot):T_x\mathrm{M}\to[0,\infty]$ is convex and lower semicontinuous. \item $\mathcal{R}(x,0) = \min_{v\in T_x\mathrm{M}}\mathcal{R}(x,v) = 0$. \end{enumerate} \end{enumerate} We denote by~$\mathcal{R}^\ast:T^\ast \mathrm{M}\to[0,\infty]$ the Legendre transform of~$\mathcal{R}$ defined by \begin{equation*} \mathcal{R}^\ast(x,\xi) := \sup_{v\in T_q\mathrm{M}}\left[\ip{\xi}{v} - \mathcal{R}(x,v)\right], \end{equation*} For an energy~$\mathrm{E}:\mathrm{M}\to\mathbb{R}$, we denote by~$\mathrm{d}\mathrm{E}$ its differential, that is the map \begin{equation*} \mathrm{d}\mathrm{E}:\mathrm{M}\to T^\ast \mathrm{M}, \quad x\mapsto \mathrm{d}\mathrm{E}_x \in T_x^\ast \mathrm{M}. \end{equation*} A functional~$\mathcal{I}$ acting on trajectories~$C([0,T];\mathrm{M})$ is of \emph{gradient-flow structure} if \begin{equation}\label{GF_NGF:eq:action-of-R-R_star-functional} \mathcal{I}(x) = \mathrm{E}(x_T)-\mathrm{E}(x_0) + \int_0^T \left[\mathcal{R}\left(x_t,\partial_t{x}_t\right)+\mathcal{R}^\ast\left(x_t,-\mathrm{d}\mathrm{E}(x_t)\right)\right]dt. \end{equation} The dissipation~\eqref{GF_NGF:eq:GF:dissipation-euclidian-example} from above corresponds to the flat space~$\mathbb{R}$, where~$ \mathrm{d}\mathrm{E}$ gets identified with~$\nabla\mathrm{E}$, and with the quadratic dissipation potentials \begin{equation*} \mathcal{R}(x,v) = \frac{1}{2}v^2\quad\text{and}\quad \mathcal{R}^\ast(x,\xi) = \frac{1}{2}\xi^2. \end{equation*} Typical examples where the~$\mathcal{R}$-$\mathcal{R}^\ast$ dissipation occurs are large-deviation rate functions of jump processes. The limit problem of this chapter is an example: if the potential~$V$ in~\eqref{GF_NGF:eq:intro:upscaled-FP} is symmetric, then our limit variational structure admits an~$\mathcal{R}$-$\mathcal{R}^\ast$ formulation with a $\cosh$-type dissipation potential~$\mathcal{R}$; however, we show there is no such formulation for \emph{asymmetric} potentials (Section~\ref{GF_NGF:sec:why-limit-is-not-GF}). In infinite-dimensional settings such as in our pre-limit problem, a careful definition of the tangent and cotangent spaces~\cite[Section~12.4]{AmbrosioGigliSavare2008} is required to make the above display~\eqref{GF_NGF:eq:action-of-R-R_star-functional} rigorous. \subsection{Taking limits of gradient-flow structures} There are many variants of taking limits of gradient flows. Mielke provides several different definitions of types of convergences in~\cite{Mielke2016}. The natural concept of a gradient-flow convergence is to demand both the energies and dissipations to converge separately. Sandier and Serfaty introduced this concept in~\cite{SandierSerfaty2004}, which since then has found applications in a variety of other problems. This convergence concept is also applied in~\cite{ArnrichMielkePeletierSavareVeneroni2012}, and we introduce it next. For~$\rho_n, \rho\in C([0,T],\mathrm{M})$, we say~$\rho_n\to\rho$ if the convergence is uniform in time. \begin{definition}[EDP convergence]\label{GF_NGF:def:EDP-convergence} Let~$(\mathrm{M},\mathrm{E}_\varepsilon,\mathrm{D}_\varepsilon)$ be a family of gradient-flow structures in the sense of Definition~\ref{GF_NGF:def:GF}. We say that~$(\mathrm{M},\mathrm{E}_\varepsilon,\mathrm{D}_\varepsilon)$ converges in the \emph{EDP sense} to a gradient-flow structure~$(\mathrm{M},\mathrm{E}_0,\mathrm{D}_0)$ if: \begin{enumerate}[label=(\roman*)] \item $\mathrm{E}_\varepsilon\xrightarrow{\Gamma}\mathrm{E}_0$ in~$\mathrm{M}$; \item For each~$t\in[0,T]$, $\mathrm{D}_\varepsilon\xrightarrow{\Gamma}\mathrm{D}_0$ in~$C([0,T];\mathrm{M})$.\qed \end{enumerate} \end{definition} EDP convergence implies convergence of solutions (e.g.~\cite[Lemma~2.8]{MielkeMontefuscoPeletier2020}). \begin{proposition}\label{GF_NGF:prop:simple-EDP-convergence} Assume that a family of gradient-flow structures~$(\mathrm{M},\mathrm{E}_\varepsilon,\mathrm{D}_\varepsilon)$ converges in the EDP sense to a gradient-flow structure~$(\mathrm{M},\mathrm{E}_0,\mathrm{D}_0)$. Let~$\rho_\varepsilon$ be the solutions of~$(\mathrm{M},\mathrm{E}_\varepsilon,\mathrm{D}_\varepsilon)$. Suppose that \begin{equation*} \rho_\varepsilon\to\rho_0 \;\text{in}\; C([0,T];\mathrm{M})\quad\text{and}\quad \mathrm{E}_\varepsilon(\rho_\varepsilon(0)) \to \mathrm{E}_0(\rho_0(0)). \end{equation*} Then~$\rho_0$ is a solution of~$(\mathrm{M},\mathrm{E}_0,\mathrm{D}_0)$. \end{proposition} \begin{proof} By the assumption of~$\Gamma$-convergences, exploiting~$\rho_\varepsilon\to \rho$ gives \begin{multline*} \mathrm{E}_0(\rho_0(T))-\mathrm{E}_0(\rho_0(0)) + \mathrm{D}_0(\rho_0;0,T) \\\leq \liminf_{\varepsilon\to 0}\left[ \mathrm{E}_\varepsilon(\rho_\varepsilon(T))-\mathrm{E}_\varepsilon(\rho_\varepsilon(0)) + \mathrm{D}_\varepsilon(\rho_\varepsilon;0,T)\right] = 0. \end{multline*} The other inequality is satisfied by Definition~\ref{GF_NGF:def:GF}, and hence~$\rho_0$ is a solution in the sense of Definition~\ref{GF_NGF:def:sol-to-GF}. \end{proof} EDP convergence is therefore a suitable limit concept in problems where the energies remain bounded in the limit~$\varepsilon\to 0$. In~\cite{ArnrichMielkePeletierSavareVeneroni2012}, the authors proof boundedness of the entropies for the case of a symmetric potential~$V$. As a consequence of their~$\Gamma$-convergence result, one obtains by Proposition~\ref{GF_NGF:prop:simple-EDP-convergence} convergence of solutions for free. For the asymmetric case we consider in this chapter, boundedness of the entropies is no longer satisfied (Section~\ref{GF_NGF:sec:why-GF-not-converge}). \section{Flux-density functionals} \label{GF_NGF:sec:flux-density-functionals} The main point of this section is to give the rigorous definitions of the flux-density functionals (Definitions~\ref{GF_NGF:def:pre-limit-RF} and~\ref{GF_NGF:def:limit-RF}). We first demonstrate why the Wasserstein gradient-flow functionals do not converge as in~\cite{ArnrichMielkePeletierSavareVeneroni2012}, which motivates our choice of working with flux-density functionals in the first place. \subsection{Why the gradient-flow structure does not converge} \label{GF_NGF:sec:why-GF-not-converge} By Definition~\ref{GF_NGF:def:wassterstein-GF}, the action functional defining the Wasserstein gradient-flow structure of the Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP} is \begin{equation}\label{GF_NGF:epsilon-Wasserstein-GF-action} \mathcal{A}_\varepsilon(\rho) = \mathrm{Ent}(\rho(T)|\gamma_\varepsilon) -\mathrm{Ent}(\rho(0)|\gamma_\varepsilon) + \mathrm{D}_\varepsilon(\rho;0,T), \end{equation} where the time-scale parameter~$\tau_\varepsilon$ enters the dissipation~$\mathrm{D}_\varepsilon$ as in~\cite{ArnrichMielkePeletierSavareVeneroni2012}; the dissipation part is not important for our argument however. The equilibrium distribution~$\gamma_\varepsilon$ has mass one and is given by \begin{equation*} \gamma_\varepsilon( \mathrm{d} x) = \mathcal{N}_\varepsilon^{-1}e^{-V(x)/\varepsilon}\, \mathrm{d} x,\quad \mathcal{N}_\varepsilon := \int_\mathbb{R} e^{-V(x)/\varepsilon}\, \mathrm{d} x. \end{equation*} In the limit~$\varepsilon\to 0$, the equilibrium distribution concentrates solely on the global minimum~$x_b$ of the potential~$V$, that is~$\gamma_\varepsilon$ converges weakly to $\delta_{x_b}$. For proving EDP convergence (Definition~\ref{GF_NGF:def:EDP-convergence}), we have to verify that the energies and dissipations converge independently from one another. \begin{proposition}[Diverging entropies]\label{GF_NGF:prop:diverging-entropies} Let~$\gamma_\varepsilon$ be the equilibrium distribution to the Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP} and let~$\mu_\varepsilon\in\mathcal{P}(\mathbb{R})$ be a family of probability measures converging weakly to~$\mu_0$. Suppose that~$\mu_0\neq \delta_{x_b}$. Then \begin{equation*} \mathrm{Ent}(\mu_\varepsilon|\gamma_\varepsilon) \to +\infty. \end{equation*} \end{proposition} \begin{proof} This follows from the fact that~$\gamma_\varepsilon\xrightharpoonup{\ast} \delta_{x_b}$ and~$\mathrm{Ent}(\mu_0|\delta_{x_b})=+\infty$. \end{proof} Let us demonstrate why this excludes the possibility of proving EDP convergence of the Wasserstein gradient flow of~\eqref{GF_NGF:eq:intro:upscaled-FP}. A EDP convergence requires the entropies of the initial conditions to converge to some \emph{finite} limiting energy functional~$\mathrm{E}_0$, \begin{equation*} \mathrm{Ent}(\rho_\varepsilon(0)|\gamma_\varepsilon) \to \mathrm{E}_0(\rho_0(0)). \end{equation*} By Proposition~\ref{GF_NGF:prop:diverging-entropies}, any initial condition that is not concentrating on~$\{x_b\}$ leads to diverging relative entropies. Therefore, if we insist on finite entropies in the limit, the only initial conditions we could consider are those converging to equilibrium in the limit~$\varepsilon\to 0$, meaning only the initial condition~$\delta_{x_b}$. Since this excludes any dynamics in the limit~$\varepsilon\to 0$, we do not work with~$\mathcal{A}_\varepsilon$. \smallskip While we can not use the Wasserstein action~\eqref{GF_NGF:epsilon-Wasserstein-GF-action}, the density-flux functional~$\mathcal{I}_\varepsilon$ from~\eqref{GF_NGF:eq:level-2p5-rate-function} provides a natural way to cope with this divergence of entropies by including them into the dissipation. We sketch this observation. To that end, consider the density-flux functional without the $\varepsilon$-dependent parameters, \begin{equation*} \mathcal{I}(\rho,j) =\frac{1}{4}\int\frac{1}{\rho}|j-j^\rho|^2\, \mathrm{d} x \mathrm{d} t, \end{equation*} where~$\partial_t\rho +\mathrm{div}\,j=0$ and~$J^\rho=-\nabla\rho + \rho\nabla V$. Expanding the square leads to \begin{equation*} \mathcal{I}(\rho,j) = \frac{1}{4}\left[\int \left(\frac{ \mathrm{d} j}{ \mathrm{d}\rho}\right)^2\, \mathrm{d}\rho +\int \left(\frac{ \mathrm{d} J^\rho}{ \mathrm{d}\rho}\right)^2\, \mathrm{d}\rho - 2 \int \frac{ \mathrm{d} j}{ \mathrm{d}\rho}\frac{ \mathrm{d} J^\rho}{ \mathrm{d}\rho}\, \mathrm{d}\rho\right]. \end{equation*} Using~$J^\rho = -\rho \nabla \log (\rho/e^{-V})=-\rho\nabla (\log u)$, and hence~$ \mathrm{d} J^\rho/ \mathrm{d}\rho = -\nabla\log(u)$, we find the second term to be the Fisher information in the dissipation~$\mathrm{D}$ from~\eqref{GF_NGF:eq:wasserstein-dissipation}. For the cross term, integrating by parts and using~$\partial_t\rho + \mathrm{div}\,j=0$, \begin{align*} -\int \frac{ \mathrm{d} j}{ \mathrm{d}\rho}\frac{ \mathrm{d} J^\rho}{ \mathrm{d}\rho}\, \mathrm{d}\rho &= \int(\nabla\log u)\, \mathrm{d} j\\ &= - \int \log (u) \,\mathrm{div}\,j \, \mathrm{d} x \mathrm{d} t\\ &= \int \log(u) \,\partial_t\rho = \int \partial_t u \log(u)\, \mathrm{d}\gamma \mathrm{d} t \\ &= \int_0^T \partial_t \left(\int_\mathbb{R} u\log u\, \mathrm{d} x\right) \, \mathrm{d} t + 0, \end{align*} which leads to the entropy terms. Hence taking the infimum over fluxes~$j$ satisfying the continuity equation and such that~$j\ll \rho$, and using the Benamou-Brenier characterization of the Wasserstein distance, we find back the Wasserstein functional~\eqref{GF_NGF:non-eps-Wasserstein-action}, \begin{equation*} \inf_j \mathcal{I}(\rho,j) = \frac{1}{2}\mathcal{A}(\rho). \end{equation*} \subsection{Stationary measure and coordinate transformation} \label{GF_NGF:sec:cooridnate-transformation} We introduce in Definition~\ref{GF_NGF:def:left-normalized-stationary-measure} stationary measures that are not normalized to mass one on~$\mathbb{R}$. Rather, they are normalized to mass one when integrating from~$-\infty$ to the local maximum~$x_0$ of~$V$. We call these measures \emph{left-normalized stationary measures}. The normalization is chosen in order to capture the transitions from left to right, which are or order one. We use the superscript~$\ell$ to distinguish objects that are derived from this choice of normalization. \begin{definition}[Left-normalized stationary measure]\label{GF_NGF:def:left-normalized-stationary-measure} For a potential $V$ as in Figure~\ref{GF_NGF:fig:asymmetric-doublewell-potential}, define the left-normalized stationary measure $\gamma_\varepsilon^\ell \in \mathcal{M}(\mathbb{R})$ by \begin{equation*} \gamma_\varepsilon^\ell(A) := Z_\varepsilon^{-1} \int_A e^{-V(x)/\varepsilon}\,dx, \quad Z_\varepsilon^{-1} := \int_{-\infty}^{x_0} e^{-V(x)/\varepsilon}\, dx. \end{equation*} \end{definition} With this left-normalization, these measures concentrate in the limit~$\varepsilon\to 0$ on the potential wells, that is the set $\{V\leq 0\}$. \begin{proposition}[Concentration of measure] \label{prop:GF_NGF:left-normalized-stationary-measure} For any~$\delta > 0$, \begin{equation*} \lim_{\varepsilon\to 0}\gamma_\varepsilon^\ell(\{V>\delta\}) = 0. \end{equation*} \end{proposition} \begin{proof}[Proof of Proposition~\ref{prop:GF_NGF:left-normalized-stationary-measure}] Let~$\delta > 0$. For any finite $M > \delta$, we find \begin{align*} \gamma_\varepsilon^\ell\left(\left\{M > V \geq \delta\right\}\right) &= Z_\varepsilon^{-1} \int_{\left\{M > V \geq \delta\right\}} e^{-V(x)/\varepsilon}\,dx \\ &\leq Z_\varepsilon^{-1}\, e^{-\delta/\varepsilon}\, \mathcal{L}\left(\left\{M > V \geq \delta\right\}\right) \xrightarrow{\varepsilon\to 0}0, \end{align*} since $V(x_a) = 0$ and $Z_\varepsilon=[1+o(1)] \sqrt{2\pi\varepsilon/V''(x_a)} e^{-V(x_a)/\varepsilon}$, which follows from Laplace's method (Lemma~\ref{lemma:watson}). \smallskip Since $V(x) \to \infty$ as $|x| \to \infty$, there is a sequence $M_n \to \infty$ such that the sets $A_n := \left\{V \geq M_n\right\}$ are decreasing in $n$ in the sense that $A_{n+1}\subseteq A_n$. By finiteness of the measure~$\gamma_\varepsilon^\ell$, this implies % \begin{equation*} \lim_{n \to\infty} \gamma_\varepsilon^\ell(A_n) = \gamma_\varepsilon^\ell\left(\cap_{n} A_n \right) = 0. \end{equation*} Let $\kappa > 0$. Since \begin{equation*} \gamma_\varepsilon^\ell\left(\left\{V \geq \delta\right\}\right) = \gamma_\varepsilon^\ell\left(\left\{V\geq M_n\right\}\right) + \gamma_\varepsilon^\ell\left(\left\{M_n > V \geq \delta\right\}\right), \end{equation*} when choosing $n$ large enough such that $\gamma_\varepsilon^\ell(A_n) < \kappa/2$, then for all $\varepsilon$ small enough such that $\gamma_\varepsilon^\ell\left(\left\{M_n > V \geq \delta\right\}\right) < \kappa/2$, we obtain the estimate \[ \gamma_\varepsilon^\ell\left(\left\{V \geq \delta\right\}\right) < \kappa. \] Since~$\kappa$ is arbitrary, the claim follows. \end{proof} With these stationary measures at hand, we now motivate the coordinate transformation~$y_\varepsilon$. To that end, we start from the flux-density rate function (\cite[Eq.~(1.3)]{BertiniDeSoleGabrielliJonaLasinioLandim2015}) specialized to the Fokker-Planck equation~\eqref{GF_NGF:eq:intro:upscaled-FP}, \begin{equation*} \mathcal{I}_\varepsilon(\rho,j) := \frac{1}{4} \int_0^T\int_\mathbb{R} \frac{1}{\varepsilon \tau_\varepsilon} \frac{1}{\rho(t,x)} \big|j(t,x) -j_\varepsilon^\rho(t,x)\big|^2\, \mathrm{d} x \mathrm{d} t, \end{equation*} where $j_\varepsilon^\rho(t,x) := -\tau_\varepsilon\left[\varepsilon \nabla \rho + \rho \nabla V\right]$. This formula suggests that we should consider measures~$\rho(t, \mathrm{d} x)$ that have a Lebesgue density. Then~$\rho$ also has a density with respect to the left-normalized stationary measure, and we write $\rho(t, \mathrm{d} x) = u_\varepsilon^\ell(t,x)\gamma_\varepsilon^\ell( \mathrm{d} x) = u_\varepsilon^\ell(t,x)g_\varepsilon^\ell(x) \mathrm{d} x$ with $g_\varepsilon^\ell(x)=Z_\varepsilon^{-1}e^{-V(x)/\varepsilon}$. With that, the flux-density rate function can be written as \begin{equation*} \mathcal{I}_\varepsilon(\rho,j) = \frac{1}{4} \int_0^T\int_\mathbb{R} \frac{1}{\varepsilon\tau_\varepsilon} \frac{1}{g_\varepsilon^\ell(x) u_\varepsilon^\ell(t,x)}\big| j(t,x) + \varepsilon\,\tau_\varepsilon\, g_\varepsilon^\ell(x) \partial_x u_\varepsilon^\ell(t,x)\big|^2\, \mathrm{d} x \mathrm{d} t. \end{equation*} The transformation is chosen such that the parameters~$\varepsilon$ and~$\tau_\varepsilon$ are shifted to the densities and do not appear explicitly in the flux-density functional. This suggests to introduce the coordinate transformation~$y_\varepsilon$ on~$\mathbb{R}$ satisfying \begin{equation*} \mathrm{d} y_\varepsilon(x) = \frac{1}{\varepsilon\, \tau_\varepsilon\, g_\varepsilon^\ell(x)} \, \mathrm{d} x. \end{equation*} Then with $\hat{u}_\varepsilon^\ell(t,y_\varepsilon(x)) := u_\varepsilon^\ell(t,x)$ and $\hat{\jmath}_\varepsilon(t,y_\varepsilon(x)) := j(t,x)$, we obtain \begin{equation*} \mathcal{I}_\varepsilon(\rho,j) = \frac{1}{4}\int_0^T\int_\mathbb{R} \frac{1}{\hat{u}_\varepsilon^\ell(t,y)}\big|\hat{\jmath}_\varepsilon(t,y) + \partial_y \hat{u}_\varepsilon^\ell(t,y)\big|^2\, \mathrm{d} y \mathrm{d} t. \end{equation*} Written in this form, all the parameters are absorbed into the density~$\hat{u}_\varepsilon^\ell$. The coordinate transformation~$y_\varepsilon$ is the almost the same as in~\cite{ArnrichMielkePeletierSavareVeneroni2012}; the only difference is that we use the left-normalized stationary measure, whereas in the symmetric case, one can use the stationary measure normalized to one. \begin{definition}[Coordinate transformation $y_\varepsilon$]\label{GF_NGF:def:coordinate-transformation} For a potential~$V$ as in Figure~\ref{GF_NGF:fig:asymmetric-doublewell-potential}, the left-normalized stationary measure $ \mathrm{d}\gamma_\varepsilon^\ell = g_\varepsilon^\ell(z)dz$ of Definition~\ref{GF_NGF:def:left-normalized-stationary-measure} and the time-scale $\tau_\varepsilon$ defined by~\eqref{GF_NGF:intro:eq:def-time-scale-parameter}, define the map $y_\varepsilon : \mathbb{R} \to \mathbb{R}$ by \begin{align*} y_\varepsilon(x) := \frac{1}{\varepsilon\, \tau_\varepsilon} \int_{x_0}^x \frac{1}{g_\varepsilon^\ell(z)}\, \mathrm{d} z. \tag*\qed \end{align*} \end{definition} \begin{figure}[h!] \labellist \pinlabel $V(x)$ at 1700 1250 \pinlabel $x_0$ at 800 600 \pinlabel $x_a$ at 400 780 \pinlabel $x_b$ at 1350 750 \pinlabel $x$ at 1600 750 \pinlabel $-\frac{1}{2}$ at 400 -60 \pinlabel $0$ at 800 -60 \pinlabel $+\frac{1}{2}$ at 1150 -60 \pinlabel $y_\varepsilon(x)$ at 1750 -50 \endlabellist \centering \includegraphics[scale=.1]{Coordinate_Transformation} \caption{The effect of the coordinate transformation $y_\varepsilon$ of Defintion~\ref{GF_NGF:def:coordinate-transformation}. Points to the left of~$x_0$ s.t.~$V(x)<V(x_0)$ are mapped to~$-1/2$, and similarly, points to the right of~$x_0$ are mapped to~$+1/2$. The smaller the value of~$\varepsilon$, the sharper is the concentration effect. As~$\varepsilon\to 0$, points far to the left of~$x_a$ and far to the right of~$x_b$ are mapped to~$\mp\infty$, respectively.} \label{GF_NGF:fig:coordinate-transformation} \end{figure} This coordinate transformation indeed maps the minima of the potential~$V$ to~$\pm 1$, as the following Proposition shows. \begin{proposition}[Coordinate transformation]\label{GF_NGF:prop:coordinate-transformation} The map $y_\varepsilon:\mathbb{R}\to \mathbb{R}$ of Definition~\ref{GF_NGF:def:coordinate-transformation} satisfies the following: \begin{enumerate}[label=(\roman*)] \item The map $y_\varepsilon$ is strictly increasing and bijective. \item For any $x<x_0$ such that $V(x) < V(x_0)$, we have $y_\varepsilon(x) \to -\frac{1}{2}$ as $\varepsilon \to 0$. \item For any $x>x_0$ such that $V(x) < V(x_0)$, we have $y_\varepsilon(x) \to +\frac{1}{2}$ as $\varepsilon \to 0$. \end{enumerate} \end{proposition} \begin{proof}[Proof of Proposition~\ref{GF_NGF:prop:coordinate-transformation}] Since $y_\varepsilon'(x) > 0$ for any $x \in \mathbb{R}$ and $y_\varepsilon(x) \to \pm \infty$ as $x \to \pm\infty$, the map $y_\varepsilon$ is strictly increasing and bijective. For $x < x_0$ satisfying $V(x) < V(x_0)$, we obtain \begin{align*} y_\varepsilon(x) &= \frac{1}{\varepsilon \tau_\varepsilon} \cdot Z_\varepsilon \cdot \int_{x_0}^x e^{V(z)/\varepsilon}\, dz \\ &=[1+o(1)] \frac{1}{\varepsilon \tau_\varepsilon} \cdot e^{-V(x_a)/\varepsilon} \sqrt{\frac{2\pi\varepsilon}{V''(x_a)}} \cdot \frac{1}{2}e^{V(x_0)/\varepsilon} \sqrt{\frac{2\pi\varepsilon}{|V''(x_0)|}} (-1) = -\frac{1}{2}, \end{align*} by applying Lemma~\ref{lemma:watson} to $Z_\varepsilon = \int_{-\infty}^{x_0} e^{-V(z)/\varepsilon}\,dz$ and the integral. The factor~$\frac{1}{2}$ stems from the fact that the exponential $e^{V/\varepsilon}$ achieves its maximum at the boundary of the interval~$[x,x_0]$. The argument for the case~$x>x_0$ is similar. \end{proof} \begin{definition}[Transformed left-normalized stationary measure]\label{GF_NGF:def:transformed-stationary-measure} For the measure~$\gamma_\varepsilon^\ell\in \mathcal{M}(\mathbb{R})$ from Definition~\ref{GF_NGF:def:left-normalized-stationary-measure} and the coordinate transformation~$y_\varepsilon$ from Definition~\ref{GF_NGF:def:coordinate-transformation}, we let~$\hat{\gamma}_\varepsilon^\ell\in\mathcal{M}(\mathbb{R})$ be the push-forward measure \begin{equation*} \hat{\gamma}_\varepsilon^\ell(A) := (y_\varepsilon)_\#\gamma_\varepsilon^\ell(A) = \gamma_\varepsilon^\ell\left(y_\varepsilon^{-1}(A)\right). \end{equation*} \end{definition} \begin{proposition}[Concentration of measure]\label{prop:GF_NGF:transformed-stationary-measure} For any~$\kappa>0$ small, let~$ U_\kappa$ be the neighborhood $U_\kappa := B_\kappa(-1/2) \cup B_\kappa(+1/2)$ of~$\{\pm1/2\}$. Then \begin{equation*} \lim_{\varepsilon\to 0} \hat{\gamma}_\varepsilon^\ell(\mathbb{R}\setminus U_\kappa) = 0. \end{equation*} \end{proposition} \begin{proof}[Proof of Proposition~\ref{prop:GF_NGF:transformed-stationary-measure}] Let~$\kappa>0$ and fix~$\delta>0$. By Proposition~\ref{GF_NGF:prop:coordinate-transformation}, if~$\varepsilon>0$ is small enough, then~$\{V<\delta\} \subseteq y_\varepsilon^{-1}(U_\kappa)$. Therefore~$\mathbb{R}\setminus y_\varepsilon^{-1}(U_\kappa) \subseteq \{V>\delta\}$, and we find that \begin{equation*} \hat{\gamma}_\varepsilon^\ell(\mathbb{R}\setminus U_\kappa) \leq \gamma_\varepsilon^\ell(\{V>\delta\}). \end{equation*} By Proposition~\ref{prop:GF_NGF:left-normalized-stationary-measure}, the right-hand side vanishes in the limit~$\varepsilon\to 0$. \end{proof} \subsection{Definition of flux-density functionals} The flux-density functionals are defined on pairs of measures~$(\rho,j)$ satisfying the continuity equation $\partial_t\rho + \mathrm{div} j = 0$ in the following sense. \begin{definition}[Continuity Equation]\label{GF_NGF:def:continuity-equation} Fix~$T>0$ and let~$E:=(0,T)\times\mathbb{R}$. We say that a pair~$(\rho(t,(\cdot),j(t,\cdot))$ of time-dependent Borel measures on~$\mathbb{R}$ satisfies the continuity equation if: \begin{enumerate}[label=(\roman*)] \item For each~$t\in(0,T)$, $\rho(t,\cdot)$ is a probability measure on~$\mathbb{R}$. The map~$t\mapsto \rho(t,\cdot)\in\mathcal{P}(\mathbb{R})$ is measurable with respect to the weak topology on~$\mathcal{P}(\mathbb{R})$. \item For each~$t\in(0,T)$, $j(t,\cdot)$ is a finite Borel measure on~$\mathbb{R}$. The map~$t\mapsto j(t,\cdot)\in \mathcal{M}(\mathbb{R})$ is measurable with respect to the weak topology on~$\mathcal{M}(\mathbb{R})$. \item The pair solves $\partial_t\rho + \mathrm{div}\, j = 0$ in~$\mathcal{D}'(E)$; that means for any test function $\varphi\in C_c^\infty(E)$, we have \begin{equation} \int_0^T\int_\mathbb{R} \left[\rho(t,dy)\, \partial_t \varphi(t,y) + j(t,dy)\, \partial_y \varphi(t,y) \right]\,dt = 0. \end{equation} \end{enumerate} We denote by~$\mathrm{CE}(0,T;\mathbb{R})$ the set of all pairs~$(\rho,j)$ satisfying the continuity equation.\qed \end{definition} As discussed in the previous section, with the coordinate transformation~$y_\varepsilon$, the flux-density rate function takes the form \begin{equation*} \mathcal{I}_\varepsilon(\rho,j) = \frac{1}{4}\int_0^T\int_\mathbb{R} \frac{1}{\hat{u}_\varepsilon^\ell(t,y)}\big|\hat{\jmath}_\varepsilon(t,y) + \partial_y \hat{u}_\varepsilon^\ell(t,y)\big|^2\,dydt. \end{equation*} We take the dual formulation for integrals over convex functions (Lemma~\ref{GF_NGF:lemma:appendix:dual-of-convex-functions}), which generalizes \begin{equation*} \frac{1}{2}\frac{x^2}{y} = \sup_{\substack{b \in \mathbb{R}}} \left[(-b^2/2)y + bx\right],\quad x\in\mathbb{R},\,y>0. \end{equation*} Shifting derivatives to test functions, we arrive at the following Definition. \begin{definition}[Prel-limit Rate Function]\label{GF_NGF:def:pre-limit-RF} For~$E:=(0,T)\times\mathbb{R}$ and~$\varepsilon>0$, define the map $\widehat{\mathcal{I}}_\varepsilon:\mathrm{CE}(0,T;\mathbb{R})\to[0,\infty]$ by \begin{equation}\label{def:GF-NGF:pre-limitRF} \widehat{\mathcal{I}}_\varepsilon\left(\hat{\rho},\hat{\jmath}\right) := \frac{1}{2} \sup_{b\in C_c^\infty(E)}\int_E \left[\hat{u}_\varepsilon^\ell\left(-\partial_y b - \frac{1}{2}b^2\right) + \hat{\jmath}\cdot b\right]\,dydt, \end{equation} if~$\hat{\rho}(t,dy)=\hat{u}_\varepsilon^\ell(t,y) \hat{\gamma}_\varepsilon^\ell(dy)$, that is if~$\hat{\rho}(t,\cdot)$ is absolutely continuous with respect to~$\hat{\gamma}_\varepsilon^\ell$, the left-normalized stationary measure from Definition~\ref{GF_NGF:def:transformed-stationary-measure}. Otherwise, we set~$\widehat{\mathcal{I}}_\varepsilon\left(\hat{\rho},\hat{\jmath}\right)$ equal to~$+\infty$.\qed \end{definition} \begin{definition}[Limit Rate Function]\label{GF_NGF:def:limit-RF} With the funciton~$S$ from~\eqref{GF_NGF:eq:S-fct}, define~$\widehat{\mathcal{I}}_0:\mathrm{CE}(0,T;\mathbb{R})\to[0,\infty]$ by \begin{equation} \widehat{\mathcal{I}}_0\left(\hat{\rho},\hat{\jmath}\right) := \int_0^T S\left(\hat{\jmath}(t),\hat{z}(t)\right)\,dt, \end{equation} if~$\hat{\rho}(t,dy) = \hat{z}(t)\delta_{-\frac{1}{2}}(dy) + (1-\hat{z}(t))\delta_{+\frac{1}{2}}(dy)$ and $\hat{\jmath} = \hat{\jmath}(t)\mathbf{1}_{\left(-\frac{1}{2},+\frac{1}{2}\right)}(y)dtdy$, with coefficient~$\hat{z} \in H^1([0,T])$ and~$\hat{\jmath}(t)>0$. Otherwise, we set~$\widehat{\mathcal{I}}_0\left(\hat{\rho},\hat{\jmath}\right)$ equal to~$+\infty$.\qed \end{definition} In fact, we have~$\hat{\jmath}(t)=-\partial_t\hat{z}(t)$, which follows from the continuity equation~$\partial_t\hat{\rho}+\partial_y\hat{\jmath}=0$ and the special form of~$\hat{\rho}$ (see Theorem~\ref{GF_NGF:thm:compactness},~\ref{item:compact:j-is-nice}). That means the rate function is finite only if~$\hat{z}(t)$ is decreasing, meaning that mass is flowing only from left to right. We will show furthermore that finiteness of~$\mathcal{I}_0$ implies~$z\in W^{1,1}([0,T])$. \subsection{Why the limit is not a gradient flow} \label{GF_NGF:sec:why-limit-is-not-GF} We give a formal argument. Suppose that~$\mathcal{I}_0$ is a generalized gradient-flow given by~\eqref{GF_NGF:eq:action-of-R-R_star-functional}, with an energy~$\mathrm{E}$ and dissipation potentials~$\mathcal{R}$,~$\mathcal{R}^\ast$. Then locally, we obtain \begin{equation*} S(j,z) = \mathrm{d} \mathrm{E}(\rho) \cdot j + \mathcal{R}(\rho,j) + \mathcal{R}^\ast(\rho,- \mathrm{d}\mathrm{E}(\rho)). \end{equation*} Taking the derivative with respect to~$j$, \begin{equation*} \partial_j S(j,z) = \mathrm{d}\mathrm{E}(\rho) + \partial_j \mathcal{R}(\rho,j). \end{equation*} Since~$\mathcal{R}(\rho,0)=0$ is minimal by definition, \begin{equation*} \partial_j S(0,z) = \mathrm{d} \mathrm{E}(\rho) + 0. \end{equation*} But~$\partial_jS(j,z) = \log(j/z)$ diverges to~$-\infty$ as~$j\to 0$. \smallskip Informally, the limit structure is not an \emph{entropy} gradient flow because there is no decay in entropy. As we saw in Section~\ref{GF_NGF:sec:why-GF-not-converge}, the entropies diverge in the limit~$\varepsilon\to 0$. In the limit, the mass of the stationary measure is concentrated on one point, while the dynamics has mass on both points. Hence for any finite time, the relative entropy equals~$+\infty$ and is not decaying. \section{Proof of Gamma-convergence} \label{GF_NGF:sec:proof-of-gamma-convergence} In~$\mathrm{CE}(0,T;\mathbb{R})$, we consider convergence in distribution. \begin{definition}[Convergence of solutions to continuity equation]\label{GF_NGF:def:converge-in-CE} We say that a sequence~$(\hat{\rho}_n,\hat{\jmath}_n)$ in~$\mathrm{CE}(0,T;\mathbb{R})$ converges to~$(\hat{\rho},\hat{\jmath})$ if and only if for any test function~$\varphi\in C_c^\infty((0,T)\times\mathbb{R})$, we have \begin{equation*} \int_{0}^T\int_\mathbb{R} \left[\hat{\rho}_n \partial_t\varphi + \hat{\jmath}_n \,\mathrm{div}\,\varphi\right]\,dydt \xrightarrow{n\to\infty} \int_{0}^T\int_\mathbb{R} \left[\hat{\rho} \partial_t\varphi + \hat{\jmath}\, \mathrm{div}\,\varphi\right]\,dydt. \end{equation*} \end{definition} \begin{theorem}[Lower Bound]\label{GF_NGF:thm:lower-bound} For any sequence~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\in\mathrm{CE}(0,T;\mathbb{R})$ such that \begin{equation*} (\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\to(\hat{\rho}_0,\hat{\jmath}_0)\in\mathrm{CE}(0,T;\mathbb{R})\quad\text{and}\quad \sup_{(t,y)\in E}|\hat{u}_\varepsilon^\ell(t,y)| \leq C, \end{equation*} where~$\hat{\rho}_\varepsilon=\hat{u}_\varepsilon^\ell\hat{\gamma}_\varepsilon^\ell$, we have \begin{equation*} \liminf_{\varepsilon\to 0}\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) \geq \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0). \end{equation*} \end{theorem} \begin{theorem}[Upper bound]\label{GF_NGF:thm:upper-bound} For any~$(\hat{\rho}_0,\hat{\jmath}_0)\in\mathrm{CE}(0,T;\mathbb{R})$ such that the rate function is finite, $\widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0)<\infty$, there exist~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\in\mathrm{CE}(0,T;\mathbb{R})$ such that \[ (\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\xrightarrow{\varepsilon\to 0}(\hat{\rho}_0,\hat{\jmath}_0)\quad\text{and}\quad \limsup_{\varepsilon\to 0}\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) \leq \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0). \] \end{theorem} \subsection{Proof of compactness} Recall we denote by~$\mathrm{CE}(0,T;\mathbb{R})$ the set of solutions to the continuity equation in the sense of Definition~\ref{GF_NGF:def:continuity-equation}, and by~$\widehat{\mathcal{I}}_\varepsilon:\mathrm{CE}(0,T;\mathbb{R})\to[0,\infty]$ the rate function from Definition~\ref{GF_NGF:def:pre-limit-RF}. The measures~$\hat{\gamma}_\varepsilon^\ell$ are the transformed left-normalized stationary measures introduced in Definition~\ref{GF_NGF:def:transformed-stationary-measure}. \begin{theorem}[Sequential Compactness]\label{GF_NGF:thm:compactness} For $\varepsilon>0$, let $(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\in \mathrm{CE}(0,T;\mathbb{R})$ be pairs such that~$\hat{\rho}_\varepsilon(t,\cdot)$ is absolutely continuous w.r.t.~$\hat{\gamma}_\varepsilon^\ell$, with Radon-Nikodym derivative $\hat{u}_\varepsilon^\ell(t,\cdot)$. Let~$E:=(0,T)\times\mathbb{R}$. Suppose that there exists a constant~$C>0$ such that for all~$\varepsilon>0$, \begin{equation*} \widehat{\mathcal{I}}_\varepsilon\left(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon\right) \leq C \quad\text{and}\quad \sup_{(t,y)\in E}|\hat{u}_\varepsilon^\ell(t,y)| \leq C. \end{equation*} Then there exists a pair~$(\hat{\rho}_0,\hat{\jmath}_0)\in\mathrm{CE}(0,T;\mathbb{R})$ and a limiting function~$\hat{u}_0^\ell$ such that: \begin{enumerate}[label=(\roman*)] \item \label{item:compact:u-converge}$\hat{u}_0^\ell \in L^\infty(E)$ and along a subsequence~$\hat{u}_\varepsilon^\ell\xrightharpoonup{\ast}\hat{u}_0^\ell$ in~$\sigma(L^\infty(E),L^1(E))$. \item \label{item:compact:rho-converge}The densities converge weakly: $\hat{\rho}_\varepsilon\xrightharpoonup{\ast}\hat{\rho}_0$ w.r.t.~$\sigma(\mathcal{M}(E),C_b(E))$, where for every $t\in[0,T]$, the measure $\hat{\rho}_0(t,\cdot) \in \mathcal{P}(\mathbb{R})$ is absolutely continuous with respect to $\hat{\gamma}_0 := \delta_{-1/2}+\delta_{+1/2}$. \item \label{item:compact:j-converge} Along a subsequence: $\hat{\jmath}_\varepsilon\xrightharpoonup{\ast}\hat{\jmath}_0$ in~$\sigma(Y^\ast,Y)$, where $Y:=L^2\left(0,T;X\right)$ with the Banach space~$X$ obtained by taking the closure of~$C_c^\infty(\mathbb{R})$ under the norm \[ \|f\|_X := \|f\|_{L^2(\mathbb{R})} + \|\partial_y f\|_{L^1(\mathbb{R})}. \] \end{enumerate} Moreover, the limiting objects~$\hat{u}_0^\ell, \hat{\rho}_0$ and~$\hat{\jmath}_0$ satisfy the following regularity properties: \begin{enumerate}[label=(\roman*)] \setcounter{enumi}{3} \item \label{item:compact:rho-is-nice} The density $\hat{z}_0(t)$ such that~$\hat{\rho}_0(t,dy)=\hat{z}_0(t)\delta_{-1/2}(dy) + (1-\hat{z}_0(t))\delta_{+1/2}(dy)$ satisfies~$\hat{z}_0 \in H^1([0,T])$. \item \label{item:compact:j-is-nice} The limiting flux~$\hat{\jmath}_0$ is unique and is given by \begin{equation*} \hat{\jmath}_0(dt\,dy) = -\partial_t \hat{z}_0(t) \mathbf{1}_{(-1/2,+1/2)}(y)\,dtdy. \end{equation*} \item \label{item:compact:u-is-nice} The limiting function~$\hat{u}_0^\ell$ satisfies for a.e.~$t\in(0,T)$ \begin{equation*} \partial_y\hat{u}_0^\ell \in L^2\left((0,T)\times\mathbb{R}\right),\quad \hat{u}_0^\ell(t,-1/2) = \hat{z}_0(t) \quad\text{and}\quad \hat{u}_0^\ell(t,+1/2) = 0. \end{equation*} \end{enumerate} \end{theorem} \begin{proof}[Proof of Theorem~\ref{GF_NGF:thm:compactness}] If both~\ref{item:compact:rho-converge} and~\ref{item:compact:j-converge} hold, then a limiting pair~$(\hat{\rho}_0,\hat{\jmath}_0)$ satisfies the continuity equation: for any~$\varphi\in C_c^\infty(E)$, $\partial_t\varphi\in C_c^\infty(E)$ and~$\partial_y\varphi \in Y$, so that \[ \int_E \partial_t\varphi\, \hat{\rho}_\varepsilon \xrightarrow{\varepsilon\to 0}\int_E \partial_t \varphi\,\hat{\rho}_0\quad\text{and}\quad \int_E \partial_y\varphi(t,y)\,\hat{\jmath}_\varepsilon \xrightarrow{\varepsilon\to 0} \int_E \partial_y\varphi(t,y)\,\hat{\jmath}_0, \] Hence $\partial_t\hat{\rho}_0+\partial_y\hat{\jmath}_0=0$ in~$\mathcal{D}'$ is inherited from $\partial_t\hat{\rho}_\varepsilon+\partial_y\hat{\jmath}_\varepsilon=0$ in~$\mathcal{D}'$. \smallskip For proving~\ref{item:compact:u-converge} and~\ref{item:compact:rho-converge}, we only exploit the uniform boundedness assumption on the densities~$\hat{u}_\varepsilon^\ell$. The remaining properties follow from the boundedness assumption on the rate function. \smallskip \underline{\ref{item:compact:u-converge}}: The family of functions $\{\hat{u}_\varepsilon^\ell\}_{\varepsilon>0}$ is bounded in~$L^\infty(E)$, the topological dual of $L^1(E)$. Hence by the Banach-Alaoglu Theorem, there is a subsequence converging in~$\sigma(L^\infty(E),L^1(E))$. \smallskip \underline{\ref{item:compact:rho-converge}}: For any Borel subset $I\times A \subseteq E$, \begin{align*} |\hat{\rho}_\varepsilon(I\times A)| = \left|\int_I\int_A \hat{u}_\varepsilon^\ell(t,y)\hat{\gamma}_\varepsilon^\ell(dy)dt\right|&\leq T \cdot \|\hat{u}_\varepsilon^\ell\|_{L^\infty(E)}\cdot \hat{\gamma}_\varepsilon^\ell(A)\\ &\leq T\cdot C \cdot \hat{\gamma}_\varepsilon^\ell(A). \end{align*} For~$\kappa>0$, let $U_\kappa := B_\kappa(-1/2)\cup B_\kappa(+1/2)$. Then $\hat{\gamma}_\varepsilon^\ell(U_\kappa)\to 0$ as~$\varepsilon\to 0$ (Proposition~\ref{prop:GF_NGF:transformed-stationary-measure}). Since~$\kappa>0$ is arbitrary, this means that~$\hat{\rho}_\varepsilon$ converges weakly to a measure~$\hat{\rho}_0$ that is supported on the set~$(0,T)\times \{-\frac{1}{2},+\frac{1}{2}\}$. \smallskip \underline{\ref{item:compact:j-converge}}: By the uniform-boundedness assumption of the rate function, \[ \sup_{b\in C_c^\infty(E)}\int_0^T\int_\mathbb{R} \left[\hat{u}_\varepsilon^\ell \left(-\partial_y b - \frac{1}{2}b^2\right) + \hat{\jmath}_\varepsilon \cdot b\right]\,dtdy \leq C < \infty. \] Therefore, for any~$b\in C_c^\infty(E)$, \begin{align*} \left|\int_0^T\int_\mathbb{R} \hat{\jmath}_\varepsilon\cdot b(t,y)\,dydt\right| &\leq C + \|\hat{u}_\varepsilon^\ell\|_{\infty} \int_0^T\int_\mathbb{R} \left(|\partial_y b| + \frac{1}{2}b^2\right)\,dydt\\ &\leq C'\left[1+\int_0^T\left(\|b(t,\cdot)\|_{L^2(\mathbb{R})}^2 + \|\partial_yb(t,\cdot)\|_{L^1(\mathbb{R})}\right)\,dt\right], \end{align*} where $C'=\max(C,\|\hat{u}_\varepsilon^\ell\|)$. We henceforth abbreviate integrals $\int_0^T\int_\mathbb{R} \hat{\jmath}_\varepsilon b\,dtdy$ simply by $\langle \hat{\jmath}_\varepsilon,b\rangle$. Rescaling in the above estimate as~$b\to \lambda b$, we obtain that for any~$\lambda>0$ and~$b\in C_c^\infty(E)$, \begin{align*} \left|\langle \hat{\jmath}_\varepsilon, b \rangle\right| \leq C'\left[\frac{1}{\lambda} + \lambda \int_0^T\|b(t,\cdot)\|_2^2\,dt + \int_0^T\|\partial_y b(t,\cdot)\|_1 \,dt\right]. \end{align*} Optimizing the right-hand side in~$\lambda$ gives \[ \lambda_{\mathrm{op}} = \left(\int_0^T\|b(t,\cdot)\|_2^2\,dt\right)^{-1/2}. \] With that optimal~$\lambda=\lambda_\mathrm{op}$, we found the estimate \begin{align*} \left|\langle \hat{\jmath}_\varepsilon, b \rangle\right| \leq C'\left[\left(\int_0^T\|b(t,\cdot)\|_2^2\,dt\right)^{1/2} + \int_0^T\|\partial_y b(t,\cdot)\|_1 \,dt\right]. \end{align*} With the elementary estimate $(a+b)^2 \leq 2a^2+2b^2$, we arrive at \begin{align*} \left|\langle \hat{\jmath}_\varepsilon, b \rangle\right|^2 &\leq 2C'^2\left[\int_0^T\|b(t,\cdot)\|_2^2\,dt + \left(\int_0^T\|\partial_y b(t,\cdot)\|_1 \,dt\right)^2\right] \\ &\leq 2C'^2\left[\int_0^T\|b(t,\cdot)\|_2^2\,dt + \int_0^T\|\partial_y b(t,\cdot)\|_1^2 \,dt\right], \end{align*} where the second estimate is a consequence of Jensen's inequality. Therefore, for some constant~$C>0$ and for all~$b\in C_c^\infty(E)$, \begin{align*} \left|\langle \hat{\jmath}_\varepsilon, b \rangle\right| \leq C \|b\|_{Y}. \end{align*} Hence~$\hat{\jmath}_\varepsilon$ is bounded in~$Y^\ast$, and by the Banach-Alaoglu Theorem, there exists a converging subsequence of~$\hat{\jmath}_\varepsilon$ in the~$\sigma(Y^\ast,Y)$ topology. \smallskip \underline{\ref{item:compact:rho-is-nice}}: The density~$\hat{z}_0(t)$ is measurable as the limit of measurable functions, since \[ \hat{z}_0(t) = \lim_{\varepsilon\to 0} \hat{\rho}_\varepsilon(t,U_-) \] for $U_-$ a small neighborhood of~$- 1/2$. We now prove the claimed regularity. For a test function~$b\in C_c^\infty(E)$, we write $B(t,y) := \int_{-\frac{1}{2}}^y b(t,z)\,dz$, so that in particular $\partial_y B = b$. Since the pair~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ satisfies the continuity equation, we obtain for any~$b$ such that~$B$ is compactly supported that \[ \int_0^T\int_\mathbb{R} \partial_y B\,\hat{\jmath}_\varepsilon = - \int_0^T\int_\mathbb{R} \partial_t B \,\hat{\rho}_\varepsilon. \] From the boundedness of the rate function, we find for such~$b$ the estimate \begin{align*} C\geq \widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) &\geq \frac{1}{2}\int_0^T \int_\mathbb{R} \left[ \hat{u}_\varepsilon^\ell\left( - \partial_y b - \frac{1}{2}b^2\right) + \hat{\jmath}_\varepsilon \partial_y B \right]\,dydt \\ &= \frac{1}{2} \int_0^T \int_\mathbb{R} \left[ \hat{u}_\varepsilon^\ell\left( - \partial_y b - \frac{1}{2}b^2\right) - \hat{\rho}_\varepsilon \partial_t B \right]\,dydt. \end{align*} We specialize further to functions~$b$ such that~$B(t,y)=\varphi(t)\psi(y)$, where the function~$\varphi \in C_c^\infty(0,T)$ is arbitrary and~$\psi$ is a fixed function that has compact support and satisfies $\psi(-1/2)=0$ and $\psi(1/2)=1$. Writing~$\hat{z}_+:=1-\hat{z}_0$, \begin{align*} \left|\int_0^T \varphi'(t) \hat{z}_+(t)\,dt\right| &= \left|\int_0^T\int_\mathbb{R} \partial_t B(t,y)\, \hat{\rho}_0(dtdy) \right| \\ &\leq C + \left|\int_0^T\int_\mathbb{R} \hat{u}_0^\ell \left(\varphi(t) \psi''(y) + \frac{1}{2}\varphi(t)^2 |\psi'(y)|^2\right)\,dydt\right| \\ &\leq C + \|\hat{u}_0^\ell\|_\infty \left(\|\psi''\|_\infty \|\varphi\|_{L^1}+\frac{1}{2} \|\psi'\|_2^2 \|\varphi\|_{L^2}^2 \right) \\ &\leq C\left(1 + \|\varphi\|_{L^1} + \|\varphi\|_{L^2}^2\right). \end{align*} Rescaling as~$\varphi\to\lambda\varphi$ and optimizing the resulting estimate in~$\lambda$ in the same fashion as in the proof of~\ref{item:compact:j-converge} above, we arrive at \begin{align*} \left|\int_0^T\varphi'(t)\hat{z}_+(t)\,dt\right| \leq C\left(\|\varphi\|_{L^2} + \|\varphi\|_{L^1}\right) \leq C' \|\varphi\|_{L^2}, \end{align*} where the second estimate uses $\|\varphi\|_{L^1} \leq \sqrt{T}\|\varphi\|_{L^2}$. Since this bound holds for any~$\varphi\in C_c^\infty(0,T)$, we obtain that~$\hat{z}_+\in H^1(0,T)$, and hence also~$\hat{z}_0 \in H^1(0,T)$. \smallskip \underline{\ref{item:compact:j-is-nice}}: Let~$\hat{\jmath}_0$ be such that~$\hat{\jmath}_\varepsilon\xrightharpoonup{\ast}\hat{\jmath}_0$ in~$\sigma(Y^\ast,Y)$. First, we show that~$\hat{\jmath}_0$ is piecewise constant in the sense that \[ \hat{\jmath}_0(dt\,dy) = \left[j^-(t)\mathbf{1}_{(-\infty,-\frac{1}{2})}(y) + j(t)\mathbf{1}_{(-\frac{1}{2},+\frac{1}{2})}(y) + j^+(t)\mathbf{1}_{(+\frac{1}{2},+\infty)}(y)\right]\,dtdy, \] where~$j^-,j,j^+$ are measurable functions. Secondly, we verify that \[ j^-\equiv 0,\quad j\equiv -\partial_t \hat{z}_0,\quad j^+\equiv 0. \] Combining the two statements proves the claim. \smallskip The limiting density is of the form $\hat{\rho}_0(t,dy) = \hat{z}_-(t)\delta_{-\frac{1}{2}}(dy) + \hat{z}_+(t)\delta_{+\frac{1}{2}}(dy)$. Specializing the continuity equation $\partial_t\hat{\rho}_0 + \partial_y\hat{\jmath}_0=0$ to test functions of the form $b(t,y) = \varphi(t)\psi(y)$, where~$\varphi\in C_c^\infty(0,T)$ and~$\psi\in C_c^\infty((-\infty,-1/2))$, we find \begin{align*} \int_0^T\left[\int_\mathbb{R}\partial_y\psi(y)\hat{\jmath}_0(t,dy)\right]\varphi(t)\,dt = 0 \end{align*} Therefore $\partial_y\hat{\jmath}_0 = 0$ in $(0,T)\times(-\infty,-1/2)$, since~$\varphi,\psi$ are arbitrary. Repeating the arument on $(-1/2,+1/2)$ and $(+1/2,\infty)$, we find that~$\hat{\jmath}_0$ is piecewise constant as claimed. We are left with verifying that the flux vanishes outside the interval~$(-1/2,+1/2)$ and in the interval is given by~$\partial_t\hat{z}_+=-\partial_t\hat{z}_0$. \smallskip By boundedness of the rate function, for any~$b\in C_c^\infty(E)$, \begin{align*} C \geq \int_0^T\int_\mathbb{R} \left[\hat{u}_\varepsilon^\ell\left(-\partial_y b - \frac{1}{2}b^2\right)+\hat{\jmath}_\varepsilon b\right]\,dydt. \end{align*} The densities~$\hat{u}_\varepsilon^\ell$ converge along a subsequence in~$\sigma(L^\infty(E),L^1(E))$, the fluxes~$\hat{\jmath}_\varepsilon$ converge in~$\sigma(Y^\ast,Y)$, and any test function~$b$ together with its derivatives is both in $L^1(E)$ and~$Y$. Therefore we can pass to the limit to obtain \begin{align*} C \geq \int_0^T\int_\mathbb{R} \left[\hat{u}_0^\ell\left(-\partial_y b - \frac{1}{2}b^2\right)+\hat{\jmath}_0 b\right]\,dydt. \end{align*} Specializing to a sequence of functions~$b_n=\varphi(t)\psi_n(y)$ with functions~$\psi_n$ that are supported in~$(-\infty,-1)$ and satisfy \[ \|\psi_n\|_{L^1} \xrightarrow{n\to\infty}\infty,\quad\|\partial_y\psi_n\|_{L^1}\leq C\quad\text{and}\quad \|\psi_n^2\|_{L^1} \xrightarrow{n\to\infty}0, \] we find that \begin{align*} \left|\int_0^T \varphi(t)j^-(t)\,dt\right|\cdot\left| \int_\mathbb{R}\psi_n \,dy\right| &= \left|\int_0^T\int_{-\infty}^{-1}b_n \hat{\jmath}_0\,dydt\right|\\ &\leq C \left[1 + T\|\varphi\|_\infty\left( \|\hat{u}_\varepsilon^\ell\|_\infty \|\partial_y\psi_n\|_{L^1} + \|\hat{u}_\varepsilon^\ell\|_\infty \|\psi_n^2\|_{L^1}\right)\right]\\ &\leq C'. \end{align*} Since~$\|\psi_n\|_{L^1}\to\infty$ and since~$\varphi$ is arbitrary, this implies~$j^-\equiv 0$. Examples of~$\psi_n$ are smoothend versions of the step functions~$n^{-2/3}\mathbf{1}_{(-n,-1)}$. The argument for the region~$(+1/2,+\infty)$ is similar. Therefore, \[ \hat{\jmath}_0(dt,dy) = j(t)\mathbf{1}_{\left(-\frac{1}{2},+\frac{1}{2}\right)}(y)\,dtdy. \] Testing the continuity equation $\partial_t\hat{\rho}_0+\partial_y\hat{\jmath}_0=0$ with functions~$b(t,y)=\varphi(t)\psi(y)$ such that~$\psi(-1/2)=0$ and~$\psi(+1/2)=1$, we find \begin{align*} \int_0^T\hat{z}_+(t) \partial_t\varphi(t)\,dt + \int_0^Tj(t)\varphi(t)\,dt = 0. \end{align*} Since~$\hat{z}_+$ is in~$H^1$, integration by parts and arbitraryness of the test function~$\varphi$ imply that the flux is given by~$j(t)=\partial_t\hat{z}_+(t)$. \smallskip \underline{\ref{item:compact:u-is-nice}}: As shown above, we have for any~$b\in C_c^\infty(E)$ the bound \[ C\geq \int_E \left[\hat{u}_0^\ell\left(-\partial_y b - \frac{1}{2}b^2\right) + \hat{\jmath}_0 b\right]\,dydt. \] Using that $\hat{\jmath}_0\in L^2(E)$, we find \begin{align*} \left|\int_E \hat{u}_0^\ell \, \partial_y b\,dydt\right| &\leq C + \frac{1}{2} \|\hat{u}_0^\ell\|_\infty \|b\|_{L^2(E)}^2 + \|\hat{\jmath}_0\|_{L^2(E)} \|b\|_{L^2(E)} \\ &\leq C'\|b\|_{L^2(E)}, \end{align*} where the second estimate follows after rescaling $b\to\lambda b$ and optimizing in~$\lambda$. This shows boundedness of the map \[ b\mapsto \langle\hat{u}_0^\ell,\partial_y b\rangle_{L^2(E)}. \] Since~$L^2(E)$ is self-dual, the fact that~$\partial_y \hat{u}_0^\ell\in L^2(E)$ follows by the Banach-Alaoglu Theorem. \smallskip We now show $\hat{u}_0^\ell(t,-1/2) = \hat{z}_0(t)$ for a.e.~$t\in(0,T)$. The density~$\hat{z}_0(t)$ satisfies \[ \hat{z}_0(t) = \lim_{\varepsilon\to 0}\hat{\rho}_\varepsilon(t,U_\kappa), \] where~$U_\kappa$ is a small ball of radius~$\kappa$ around~$\{-1/2\}$. In~$U_\kappa$, the densities~$\hat{u}_\varepsilon^\ell$ and~$\hat{u}_0^\ell$ are close in the sense that \[ \int_{U_\kappa}\hat{u}_\varepsilon^\ell\,\hat{\gamma}_\varepsilon^\ell = \int_{U_\kappa}\hat{u}_0^\ell\,\hat{\gamma}_\varepsilon^\ell + \int_{U_\kappa}(\hat{u}_\varepsilon^\ell-\hat{u}_0^\ell)\,\hat{\gamma}_\varepsilon^\ell = \int_{U_\kappa}\hat{u}_0^\ell\,\hat{\gamma}_\varepsilon^\ell + o(1)_{\varepsilon\to 0}, \] since~$\hat{\gamma}_\varepsilon^\ell$ is left-normalized and concentrates on~$U_\kappa$ in the sense that \[ \hat{\gamma}_\varepsilon^\ell(U_\kappa) = \frac{1}{Z_\varepsilon^\ell}\int_{U_\kappa} e^{-V(y )/\varepsilon}\,dy \xrightarrow{\varepsilon\to 0}1, \] and since~$\hat{u}_\varepsilon^\ell\xrightharpoonup{\ast} \hat{u}_0^\ell$ in~$\sigma(L^\infty(E),L^1(E))$. With~$\hat{\rho}_\varepsilon(t,dy) = \hat{u}_\varepsilon^\ell(t,y)\hat{\gamma}_\varepsilon^\ell(dy)$, we therefore find \begin{align*} o(1)_{\varepsilon\to 0} + \left(\inf_{U_\kappa}\hat{u}_0^\ell(t,\cdot)\right)\hat{\gamma}_\varepsilon^\ell(U_\kappa) \leq \hat{\rho}_\varepsilon(t,U_\kappa) \leq \left(\sup_{U_\kappa}\hat{u}_0^\ell(t,\cdot)\right)\hat{\gamma}_\varepsilon^\ell(U_\kappa) + o(1)_{\varepsilon\to 0}. \end{align*} First passing to the limit~$\varepsilon\to 0$ and then taking~$\kappa\to 0$ gives \begin{align*} \lim_{\kappa\to 0}\inf_{U_\kappa}\hat{u}_0^\ell(t,\cdot) \leq \hat{z}_0(t) \leq \lim_{\kappa \to 0}\sup_{U_\kappa}\hat{u}_0^\ell(t,\cdot). \end{align*} Hence~$\hat{z}_0(t)$ is bounded from below by the lower-semicontinuous regularization of~$\hat{u}_0^\ell(t,y)$ at~$y=-1/2$, and from above by the upper-semicontinuous regularization. Since~$\hat{u}_0^\ell(t,\cdot)\in H^1(\mathbb{R})$ for almost every~$t\in(0,T)$, the function~$\hat{u}_0^\ell(t,\cdot)$ is continuous, implying that \[ \hat{u}_0^\ell(t,-1/2) = \lim_{\kappa \to 0}\sup_{U_\kappa}\hat{u}_0^\ell(t,\cdot) = \lim_{\kappa\to 0}\inf_{U_\kappa}\hat{u}_0^\ell(t,\cdot). \] Hence~$\hat{u}_0^\ell(t,-1/2)=\hat{z}_0(t)$ for a.e.~$t\in(0,T)$. \smallskip The fact that~$\hat{u}_0^\ell(t,+1/2)=0$ follows from observing that in the limit~$\varepsilon\to 0$, the left-normalized measure~$\hat{\gamma}_\varepsilon^\ell$ blows up in a neighborhood~$U_\kappa^+$ of~$\{+\frac{1}{2}\}$ while \[ 1\geq \hat{\rho}_\varepsilon(t,U_\kappa^+) = \int_{U_\kappa^+}\hat{u}_\varepsilon^\ell(t,y)\,\hat{\gamma}_\varepsilon^\ell(dy) \] remains bounded. Hence continuity of~$\hat{u}_0^\ell(t,\cdot)$ enforces~$\hat{u}_0^\ell(t,+1/2)=0$. \end{proof} \subsection{Proof of lower bound} \begin{proof}[Proof of Theorem~\ref{GF_NGF:thm:lower-bound}] The limiting measure~$\hat{\rho}_0$ is supported on the set $(0,T)\times\{-1/2,+1/2\}$, that is~$\hat{\rho}_0=\hat{z}_0(t)\delta_{-1/2}+(1-\hat{z}_0(t))\delta_{+1/2}$, and the limiting flux~$\hat{\jmath}_0$ is piecewise constant, given as in~\ref{item:compact:j-is-nice} of Theorem~\ref{GF_NGF:thm:compactness}. By definition of~$\widehat{\mathcal{I}}_\varepsilon$, for any~$b\in C_c^\infty(E)$, \begin{align*} C\geq \widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) &\geq \frac{1}{2}\int_0^T\int_\mathbb{R} \left[\hat{u}_\varepsilon^\ell\left(-\partial_y b - \frac{1}{2}b^2\right)+\hat{\jmath}_\varepsilon b\right]\,dydt. \end{align*} As in the proof of Theorem~\ref{GF_NGF:thm:compactness}, we can pass to the limit since~$\hat{u}_\varepsilon^\ell$ and~$\hat{\jmath}_\varepsilon$ converge: $\hat{u}_\varepsilon^\ell\xrightarrow{\ast}\hat{u}_0^\ell$ in $\sigma(L^\infty(E),L^1(E))$ and~$\hat{\jmath}_\varepsilon\xrightarrow{\varepsilon\to 0}\hat{\jmath}_0$ in $\sigma(Y^\ast,Y)$, where the limiting flux is given by~$\hat{\jmath}_0(dt,dy)=\hat{\jmath}_0(t)\mathbf{1}_{(-1/2,+1/2)}(y)\,dtdy$ with~$\hat{\jmath}_0(t)=-\partial_t\hat{z}_0(t)$. This leads to \begin{align*} \liminf_{\varepsilon\to 0}\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) &\geq \frac{1}{2}\int_0^T\int_\mathbb{R} \left[\hat{u}_0^\ell\left(-\partial_y b - \frac{1}{2}b^2\right)+\hat{\jmath}_0 b\right]\,dydt\\ &= \frac{1}{2}\int_0^T\int_\mathbb{R}\left[\hat{u}_0^\ell\left(-\frac{1}{2}b^2\right)+b\left(\hat{\jmath}_0 + \partial_y\hat{u}_0^\ell\right)\right]\,dydt, \end{align*} using that~$\partial_y \hat{u}_0^\ell \in L^2(E)$ by~Theorem~\ref{GF_NGF:thm:compactness} and integration by parts. Taken the supremum over smooth functions~$b$ that have compact support in $E_0:=(0,T)\times(-1/2,+1/2)$, we find that \begin{align*} \liminf_{\varepsilon\to 0}\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) &\geq \frac{1}{2}\sup_{b\in C_c^\infty(E_0)}\int_0^T\int_{-1/2}^{+1/2} \left[\hat{u}_0^\ell\left(- \frac{1}{2}b^2\right)+ b\left(\hat{\jmath}_0(t)+\partial_y\hat{u}_0^\ell\right)\right]\,dydt\\ &\overset{\ref{GF_NGF:lemma:appendix:dual-of-convex-functions}}{=} \frac{1}{4} \int_0^T\int_{-1/2}^{+1/2}\frac{1}{\hat{u}_0^\ell}\left|\hat{\jmath}_0(t)+\partial_y\hat{u}_0^\ell\right|^2\,dydt, \end{align*} the last equality following from Lemma~\ref{GF_NGF:lemma:appendix:dual-of-convex-functions}. For fixed~$t>0$, we have \begin{equation*} \int_{-1/2}^{+1/2}\frac{1}{\hat{u}_0^\ell}\big|\hat{\jmath}_0(t) + \partial_y\hat{u}_0^\ell\big|^2\,dy \geq \inf_{\substack{\hat{u}=\hat{u}(y)\\ \hat{u}(\pm 1/2) = \hat{u}_0^\ell(t,\pm 1/2)}} \int_{-1/2}^{+1/2}\frac{1}{\hat{u}(y)}\big|\hat{\jmath}_0(t) + \partial_y \hat{u}\big|^2\,dy. \end{equation*} By Theorem~\ref{GF_NGF:thm:compactness}, the boundary conditions are given by~$\hat{u}_0^\ell(t,+1/2)=0$ and $\hat{u}_0^\ell(t,-1/2)=\hat{z}_0(t)$. With the function $S(a,b):=a\log(a/b) - (a-b)$ from~\eqref{GF_NGF:eq:S-fct}, the infimum is \begin{equation*} \inf_{\substack{\hat{u}(- 1/2) = \hat{z}_0(t)\\\hat{u}(t,+1/2)= 0}} \int_{-1/2}^{+1/2}\frac{1}{\hat{u}(y)}\big|\hat{\jmath}_0(t) + \partial_y \hat{u}\big|^2\,dy = 4 \, S\left(\hat{\jmath}_0(t), \hat{z}_0(t)\right), \end{equation*} which we prove in Lemma~\ref{lemma:GF_NGF:variational-problem}. Therefore, \begin{align*} \liminf_{\varepsilon\to 0}\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) &\geq \frac{1}{4} \int_0^T\int_{-1/2}^{+1/2}\frac{1}{\hat{u}_0^\ell}\left|\hat{\jmath}_0(t)+\partial_y\hat{u}_0^\ell\right|^2\,dydt\\ &\geq \frac{1}{4}\int_0^T\inf_{\substack{\hat{u}(- 1/2) = \hat{z}_0(t)\\\hat{u}(+1/2)= 0}} \int_{-1/2}^{+1/2}\frac{1}{\hat{u}(y)}\big|\hat{\jmath}_0(t) + \partial_y \hat{u}\big|^2\,dy\,dt\\ &= \int_0^T S\left(\hat{\jmath}_0(t), \hat{z}_0(t)\right)\,dt = \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0), \end{align*} which finishes the proof of the lower bound. \end{proof} \subsection{Proof of upper bound} We first comment on the idea of proof of Theorem~\ref{GF_NGF:thm:upper-bound}. To that end, let \[ E:= (0,T)\times\mathbb{R}\quad\text{and}\quad E_0:=(0,T)\times(-1/2,+1/2). \] If the limiting rate function is finite, then by definition the pair~$(\hat{\rho}_0,\hat{\jmath}_0)$ is given by \begin{align}\label{eq:GF_NGF:limsup:rho_0} \hat{\rho}_0(t,dy) &= \hat{z}_0(t)\delta_{-1/2}(dy) + (1-\hat{z}_0(t))\delta_{+1/2}(dy),\\ \label{eq:GF_NGF:limsup:j_0} \hat{\jmath}_0(t,dy) &= \hat{\jmath}_0(t) \mathbf{1}_{(-1/2,+1/2)}(y)\,dy, \end{align} with~$\hat{z}_0\in H^1(0,T)$ and~$\hat{\jmath}_0(t)=-\partial_t\hat{z}_0(t) \geq 0$. We will first work under the following regularity assumption. \begin{assumption}\label{assump:GF_NGF:z0-is-ct-and-pos} The density~$\hat{z}_0:[0,T]\to[0,1]$ satisfies \begin{equation} \partial_t\hat{z}_0\in C([0,T]),\; \inf_{t\in(0,T)}|\partial_t \hat{z}_0(t)|>0 \quad\text{and}\quad \sup_{t\in(0,T)}|\partial_{tt}\hat{z}_0(t)|<\infty. \end{equation} \end{assumption} The proof of Theorem~\ref{GF_NGF:thm:upper-bound} consists of the following four steps. \begin{enumerate} \item We show that the limiting rate function satisfies \begin{equation}\label{eq:GF_NGF:limit-RF-via-density} \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0) = \frac{1}{4} \int_{E_0} \hat{b}_0^2\,\hat{u}_0\,dydt, \end{equation} where~$\hat{u}_0:E_0\to[0,\infty)$ is the function given by \begin{equation}\label{eq:GF_NGF:limit-density-u0} \hat{u}_0(t,y) = -\left(\hat{\jmath}_0-\hat{z}_0\right)\left(y+\hat{y}_t\right)\left(y-\frac{1}{2}\right),\quad \hat{y}_t := \frac{1}{2} \frac{\hat{\jmath}_0+\hat{z}_0}{\hat{\jmath}_0-\hat{z}_0}, \end{equation} and~$\hat{b}_0:E_0\to\mathbb{R}$ is defined by \begin{equation}\label{eq:GF_NGF:limit-function-b0} \hat{b}_0(t,y) := \frac{\hat{\jmath}_0(t)+\partial_y\hat{u}_0(t,y)}{\hat{u}_0(t,y)} = \frac{2}{\hat{y}_t + y}. \end{equation} The second-order polynomial~$\hat{u}_0(t,\cdot)$ is either concave ($\hat{\jmath}_0>\hat{z}_0$), linear ($\hat{\jmath}_0=\hat{z}_0$) or convex ($\hat{\jmath}_0<\hat{z}_0$). These three cases are sketched in Figure~\ref{fig:u_concance_linear_convex}. \begin{figure}[h!] \labellist \pinlabel $y$ at 950 0 \pinlabel $\hat{z}_0(t)$ at 900 500 \pinlabel $\hat{u}_0(t,y)$ at 550 750 \endlabellist \centering \includegraphics[scale=.18]{Limit_u0_concave_linear_convex} \caption{The polynomial $y\mapsto \hat{u}_0(t,y)$ on~$[-1/2,+1/2]$ for the three cases~$\hat{\jmath}_0(t)>\hat{z}_0(t)$ (yellow), $\hat{\jmath}_0(t)=\hat{z}_0(t)$ (red) and~$\hat{\jmath}_0(t)<\hat{z}_0(t)$ (blue). In particular, the function always satisfies $\hat{u}_0(t,-1/2) = \hat{z}_0(t)$ and~$\hat{u}_0(t,+1/2)=0$.} \label{fig:u_concance_linear_convex} \end{figure} \item We define the function~$\hat{u}_\varepsilon^\ell:E\to[0,\infty)$ as the weak solution to the auxiliary PDE \begin{equation}\label{eq:GF_NGF:steps-auxiliary-PDE} \hat{g}_\varepsilon^\ell \partial_t \hat{u}_\varepsilon^\ell = \partial_{yy}\hat{u}_\varepsilon^\ell - \partial_y(\hat{b}_0\mathbf{1}_{E_0} \hat{u}_\varepsilon^\ell), \end{equation} where~$\hat{g}_\varepsilon^\ell:\mathbb{R}\to(0,\infty)$ denotes the Lebesgue density of the left-stationary measure~$\hat{\gamma}_\varepsilon^\ell$ from Definition~\ref{GF_NGF:def:transformed-stationary-measure}, that is~$\hat{\gamma}_\varepsilon^\ell(dy) = \hat{g}_\varepsilon^\ell(y)dy$. With that, we define the pair~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ by setting \begin{align*} \hat{\rho}_\varepsilon(t,dy) := \hat{u}_\varepsilon^\ell(t,y)\hat{\gamma}_\varepsilon^\ell(dy)\quad\text{and}\quad \hat{\jmath}_\varepsilon := -\partial_y\hat{u}_\varepsilon^\ell + \hat{b}_0\mathbf{1}_{E_0} \hat{u}_\varepsilon^\ell. \end{align*} We choose the initial condition~$\hat{u}_\varepsilon^\ell(0,\cdot)$ such that the measure \begin{align*} \hat{\rho}_\varepsilon(0,dy):=\hat{u}_\varepsilon^\ell(0,y)\hat{\gamma}_\varepsilon^\ell(dy) \end{align*} has mass one and converges weakly to~$\hat{\rho}_0(0,dy)$. \item We show that the solution~$\hat{u}_\varepsilon^\ell$ to the auxiliary PDE~\eqref{eq:GF_NGF:steps-auxiliary-PDE} is such that \begin{equation}\label{eq:GF_NGF:u_eps-converges-to-u-in-E0} \hat{u}_\varepsilon^\ell\mathbf{1}_{E_0} \xrightarrow{\varepsilon\to 0} \hat{u}_0 \quad\text{weakly in}\;L^2(E_0), \end{equation} and that the pair~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ converges to~$(\hat{\rho}_0,\hat{\jmath}_0)$ in the sense of Definition~\ref{GF_NGF:def:converge-in-CE}. \item We verify that with the choice of~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ as above, the rate function is given by \begin{equation}\label{eq:GF_NGF:RF-via-density} \widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) = \frac{1}{4}\int_{E_0}\hat{b}_0^2 \hat{u}_\varepsilon^\ell\,dydt. \end{equation} \end{enumerate} With these steps accomplished, the limsup-bound follows as \begin{align*} \lim_{\varepsilon\to 0}\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) &\overset{\eqref{eq:GF_NGF:RF-via-density}}{=} \lim_{\varepsilon\to 0} \frac{1}{4}\int_{E_0}\hat{b}_0^2 \hat{u}_\varepsilon^\ell\,dydt \\ &\overset{\eqref{eq:GF_NGF:u_eps-converges-to-u-in-E0}}{=} \frac{1}{4}\int_{E_0}\hat{b}_0^2\hat{u}_0\,dydt \\ &\overset{\eqref{eq:GF_NGF:limit-RF-via-density}}{=} \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0). \end{align*} We now formulate the Lemmas we need in order to rigorously carry out the abovementioned steps. After that, we give the proof of Theorem~\ref{GF_NGF:thm:upper-bound} and then prove the Lemmas. \begin{lemma}\label{GF_NGF:lemma:upperbound:energy-dense-set-of-densities} The set of densities~$\{\hat{z}\}$ satisfying Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos} is energy-dense; that means if~$\widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0)$ is finite, then there are denities~$\hat{z}_0^\delta$ satisfying Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos} such that the pair~$(\hat{\rho}_0^\delta,\hat{\jmath}_0^\delta)$ defined via~$\hat{z}_0^\delta$ as in~\eqref{eq:GF_NGF:limsup:rho_0} and~\eqref{eq:GF_NGF:limsup:j_0} satisfies \begin{equation*} \lim_{\delta\to 0}(\hat{\rho}_0^\delta,\hat{\jmath}_0^\delta) = (\hat{\rho}_0,\hat{\jmath}_0) \quad\text{and}\quad \lim_{\delta\to 0}\widehat{\mathcal{I}}_0(\hat{\rho}_0^\delta,\hat{\jmath}_0^\delta) = \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0). \end{equation*} \end{lemma} \begin{lemma}[Limiting Rate Function]\label{lemma:GF_NGF:limsup:limiting-RF} The rate function~$\widehat{\mathcal{I}}_0$ is given by~\eqref{eq:GF_NGF:limit-RF-via-density}. \end{lemma} In the next Lemmas,~$\hat{\gamma}_\varepsilon^\ell(dy) = \hat{g}_\varepsilon^\ell(y)dy$ is the transformed left-normalized stationary measure from Definition~\ref{GF_NGF:def:transformed-stationary-measure}. \begin{lemma}[Auxiliary PDE]\label{lemma:GF_NGF:limsup:auxiliary-PDE} For any~$\varepsilon>0$ and any initial condition~$\hat{u}_\varepsilon^\ell(0,\cdot)\in C(\mathbb{R};[0,\infty))$, under Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos} there exists a weak solution~$\hat{u}_\varepsilon^\ell$ to the PDE~\eqref{eq:GF_NGF:steps-auxiliary-PDE}; that means there exists a function~$\hat{u}_\varepsilon^\ell:E\to[0,\infty)$ satisfying \begin{equation*} \hat{u}_\varepsilon^\ell \in L^2(0,T;H^1(\mathbb{R}))\cap C(0,T;L^2(\mathbb{R})) \quad\text{and}\quad \partial_t \hat{u}_\varepsilon^\ell \in L^2(0,T;H^{-1}(\mathbb{R})) \end{equation*} such that for any~$\varphi\in H^1(\mathbb{R})$, \begin{equation} \int_E \varphi \, \hat{g}_\varepsilon^\ell \partial_t\hat{u}_\varepsilon^\ell\,dydt = -\int_E \partial_y \hat{u}_\varepsilon^\ell \, \partial_{y}\varphi \,dydt + \int_E \hat{b}_0\mathbf{1}_{E_0}\hat{u}_\varepsilon^\ell \, \partial_y \varphi\,dydt. \end{equation} \end{lemma} \begin{lemma}[Uniform Energy Estimates]\label{lemma:GF_NGF:unif-energy-est} For~$\varepsilon>0$, let~$\hat{u}_\varepsilon^\ell$ be the solution to the auxiliary PDE~\eqref{eq:GF_NGF:steps-auxiliary-PDE} under Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos} and with initial condition~$\hat{u}_\varepsilon^\ell(0,\cdot)$ such that $\hat{\rho}_\varepsilon(0,dy) = \hat{u}_\varepsilon^\ell(0,y)\hat{\gamma}_\varepsilon^\ell(dy)$ has mass one and~$\|\hat{u}_\varepsilon^\ell(0,\cdot)\|_{L^\infty(\mathbb{R})}$ is uniformly bounded in~$\varepsilon>0$. Let~$B:E\to[0,\infty)$ be the function defined by~$B(t,y) := \int_{-1/2}^{y}\hat{b}_0(t,z)\mathbf{1}_{E_0}(t,z)\,dz$, and define~$\hat{v}_\varepsilon^\ell := e^{-B}\hat{u}_\varepsilon^\ell$ and~$\Omega := (-17,+17)$. Then there exists a constant~$C>0$ such that for every~$\varepsilon>0$, \begin{align} &\int_0^T\int_\mathbb{R} e^{B} |\partial_y\hat{v}_\varepsilon^\ell|^2\,dydt + \sup_{t\in(0,T)}\int_\mathbb{R} e^{B}\hat{g}_\varepsilon^\ell \hat{v}_\varepsilon^\ell(t)^2\,dy \leq C,\label{eq:GF_NGF:limsup:energy-bound-v_eps}\\ & \int_0^T\|\hat{u}_\varepsilon^\ell(t,\cdot)\|_{H^1(\Omega)}^2\,dt \leq C.\label{eq:GF_NGF:limsup:u_eps-bounded-in-H1-Omega} \end{align} \end{lemma} The size of~$\Omega$ can be chosen arbitrary, as long as it is finite and contains the inverval~$[-1/2,+1/2]$ in its interior. \begin{lemma}[Limiting density]\label{lemma:GF_NGF:limsup:limit-density} Let~$(\hat{\rho}_0,\hat{\jmath}_0)$ be a pair given by~\eqref{eq:GF_NGF:limsup:rho_0} and~\eqref{eq:GF_NGF:limsup:j_0}. Let~$\hat{u}_\varepsilon^\ell$ be the solution to the PDE~\eqref{eq:GF_NGF:steps-auxiliary-PDE} with initial condition~$\hat{u}_\varepsilon(0,\cdot)\in C^\infty(\mathbb{R})$ such that $\hat{u}_\varepsilon^\ell(0,y)\hat{\gamma}_\varepsilon^\ell(dy)\xrightharpoonup{\ast} \hat{\rho}_0(0,dy)$ as~$\varepsilon\to 0$. Define \begin{equation}\label{eq:GF_NGF:limsup:rho_eps-and-j_eps} \hat{\rho}_\varepsilon(t,dy) := \hat{u}_\varepsilon^\ell(t,y)\hat{\gamma}_\varepsilon^\ell(dy)\quad\text{and}\quad \hat{\jmath}_\varepsilon := -\partial_y\hat{u}_\varepsilon^\ell + \hat{b}_0\mathbf{1}_{E_0} \hat{u}_\varepsilon^\ell, \end{equation} and let~$\Omega:=(-17,+17)$. Then we can choose a subsequence of~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ (denoted the same) such that: \begin{enumerate}[label=(\roman*)] \item \label{item:GF_NGF:lemma-limit-density:i}$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\in \mathrm{CE}(0,T;\mathbb{R})$ and~$\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ is given by~\eqref{eq:GF_NGF:RF-via-density}. \item \label{item:GF_NGF:lemma-limit-density:rho-j-converge} The pair~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ converges to~$(\hat{\rho}_0,\hat{\jmath}_0)$ in the sense of Definition~\ref{GF_NGF:def:converge-in-CE}. \item \label{item:GF_NGF:lemma-limit-density:ii} There exists a function~$\hat{u}_0^\ell\in L^2(0,T;H^1(\Omega))$ such that $\hat{u}_\varepsilon^\ell$ converges to $\hat{u}_0^\ell$ weakly in~$L^2(0,T;L^2(\Omega))$, and~$\hat{u}_0^\ell \mathbf{1}_{E_0}=\hat{u}_0$. \end{enumerate} \end{lemma} \begin{proof}[Proof of Theorem~\ref{GF_NGF:thm:upper-bound}] Let~$(\hat{\rho}_0,\hat{\jmath}_0)$ be given by~\eqref{eq:GF_NGF:limsup:rho_0} and~\eqref{eq:GF_NGF:limsup:j_0}. By Lemma~\ref{GF_NGF:lemma:upperbound:energy-dense-set-of-densities}, we can suppose without loss of generality that~$\hat{z}_0$ satisfies Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos}. \smallskip By Lemma~\ref{lemma:GF_NGF:limsup:auxiliary-PDE}, we can define the function~$\hat{u}_\varepsilon^\ell:E\to[0,\infty)$ as the weak solution to the PDE~\eqref{eq:GF_NGF:steps-auxiliary-PDE}. We take the initial condition~$\hat{u}_\varepsilon^\ell(0,\cdot)\in C(\mathbb{R})$ to be such that~$\hat{\rho}_\varepsilon(0,dy)\xrightharpoonup{\ast}\hat{\rho}_0(0,dy)$ as~$\varepsilon\to 0$ and define the measures $(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)$ by~\eqref{eq:GF_NGF:limsup:rho_eps-and-j_eps}. \smallskip By~\ref{item:GF_NGF:lemma-limit-density:rho-j-converge} of Lemma~\ref{lemma:GF_NGF:limsup:limit-density}, $\lim_{\varepsilon\to 0}(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)=(\hat{\rho}_0,\hat{\jmath}_0)$ in the sense of Definition~\ref{GF_NGF:def:converge-in-CE}. We are left with verifying the limsup bound. By~\ref{item:GF_NGF:lemma-limit-density:i} of Lemma~\ref{lemma:GF_NGF:limsup:limit-density}, \begin{equation*} \widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) = \frac{1}{4}\int_{E_0}\hat{b}_0^2 \hat{u}_\varepsilon^\ell\,dydt. \end{equation*} As a consequence of Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos}, the function~$\hat{b}_0^2$ is in~$L^2(E_0)$, and by~\ref{item:GF_NGF:lemma-limit-density:ii} of Lemma~\ref{lemma:GF_NGF:limsup:limit-density}, the function~$\hat{u}_\varepsilon^\ell$ converges to~$\hat{u}_0$ weakly in~$L^2(E_0)$. Therefore \begin{equation*} \lim_{\varepsilon\to 0} \frac{1}{4}\int_{E_0}\hat{b}_0^2 \hat{u}_\varepsilon^\ell\,dydt = \frac{1}{4}\int_{E_0}\hat{b}_0^2 \hat{u}_0\,dydt, \end{equation*} and by Lemma~\ref{lemma:GF_NGF:limsup:limiting-RF}, \begin{equation*} \frac{1}{4}\int_{E_0}\hat{b}_0^2 \hat{u}_0\,dydt = \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0). \end{equation*} Thus $\lim_{\varepsilon\to 0}\widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) = \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0)$, which proves the limsup bound. \end{proof} \subsubsection{Proofs of the Lemmas} \begin{proof}[Proof of Lemma~\ref{GF_NGF:lemma:upperbound:energy-dense-set-of-densities}] One can follow the same line of argument of~\cite[Theorem~6.1]{ArnrichMielkePeletierSavareVeneroni2012}. \end{proof} \begin{proof}[Proof of Lemma~\ref{lemma:GF_NGF:limsup:limiting-RF}] By definition, for a pair~$(\hat{\rho}_0,\hat{\jmath}_0)$ satisfying~\eqref{eq:GF_NGF:limsup:rho_0} and~\eqref{eq:GF_NGF:limsup:j_0}, \begin{equation*} \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0) = \int_0^T S(\hat{\jmath}_0(t)|\hat{z}_0(t))\,dt, \end{equation*} We show in~\ref{item:GF_NGF:lemma:var-probl:i} of Lemma~\ref{lemma:GF_NGF:variational-problem} that the function~$S$ arises as the solution to the following variational problem: \begin{equation*} S(\hat{\jmath}_0(t)|\hat{z}_0(t)) = \frac{1}{4} \inf_u \int_{-1/2}^{+1/2} \frac{1}{u(y)}\big|\hat{\jmath}_0(t) + \partial_y u(y)\big|^2\,dy, \end{equation*} where the infimum is taken over smooth functions~$u$ satisfying the boundary conditions $u(-1/2)=\hat{z}_0(t)$ and~$u(+1/2)=0$. By~\ref{item:GF_NGF:lemma:var-probl:ii} of Lemma~\ref{lemma:GF_NGF:variational-problem}, the optimizer of this variational problem is the polynomial $y\mapsto \hat{u}(t,y)$ given above in~\eqref{eq:GF_NGF:limit-density-u0}. Hence we find that \begin{align*} \widehat{\mathcal{I}}_0(\hat{\rho}_0,\hat{\jmath}_0) &\overset{\mathrm{def}}{=} \int_0^T S(\hat{\jmath}_0(t)|\hat{z}_0(t))\,dt\\ &= \frac{1}{4} \int_0^T\int_{-1/2}^{+1/2} \frac{1}{\hat{u}_0(t,y)}\left|\hat{\jmath}_0(t) + \partial_y \hat{u}_0(t,y)\right|^2\,dydt \overset{\mathrm{def}}{=} \frac{1}{4}\int_{E_0}\hat{b}_0^2 \hat{u}_0\,dydt, \end{align*} where the last equality follows from the Definition of~$\hat{b}_0$ in~\eqref{eq:GF_NGF:limit-function-b0}. \end{proof} \begin{proof}[Proof of Lemma~\ref{lemma:GF_NGF:limsup:auxiliary-PDE}] This follows from the fact that~$\hat{b}_0$ is bounded. \end{proof} \begin{proof}[Proof of Lemma~\ref{lemma:GF_NGF:unif-energy-est}] We first prove the estimate~\eqref{eq:GF_NGF:limsup:energy-bound-v_eps}. As a consequence of Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos}, the function~$B$ is bounded. We find by calculation that the function $\hat{v}_\varepsilon^\ell = e^{-B}\hat{u}_\varepsilon^\ell$ is the weak solution to \begin{equation}\label{eq:GF_NGF:limsup:eq-for-v_eps} \hat{g}_\varepsilon^\ell \partial_t \left(e^{B}\hat{v}_\varepsilon^\ell\right) = \partial_y\left(e^{B}\partial_y \hat{v}_\varepsilon^\ell\right). \end{equation} Multiplying~\eqref{eq:GF_NGF:limsup:eq-for-v_eps} with $\hat{v}_\varepsilon^\ell$ and integrating over~$\mathbb{R}$, (that is specialising the test function to the weak solution~$\hat{v}_\varepsilon^\ell$), we find \begin{equation*} \frac{1}{2}\frac{d}{dt}\left(\int_{\mathbb{R}}\hat{g}_\varepsilon^\ell e^B \frac{1}{2}(\hat{v}_\varepsilon^\ell)^2\,dy\right) + \frac{1}{2}\int_\mathbb{R}\hat{g}_\varepsilon^\ell (\hat{v}_\varepsilon^\ell)^2 \,\partial_t e^{B}\,dy= -\int_\mathbb{R} e^{B}|\partial_y\hat{v}_\varepsilon^\ell|^2\,dy. \end{equation*} Integrating over the time inverval~$(0,t)$ for~$t\in (0,T)$, \begin{multline}\label{eq:GF_NGF:proof-lemma-energy-dens:after-mult-v} \frac{1}{2}\int_\mathbb{R} e^B \hat{g}_\varepsilon^\ell \frac{1}{2} \hat{v}_\varepsilon^\ell(t,y)^2\,dy + \frac{1}{2} \int_0^t\int_\mathbb{R} \left(\partial_t e^B\right) \hat{g}_\varepsilon^\ell (\hat{v}_\varepsilon^\ell)^2\,dydt' + \int_0^t\int_\mathbb{R} e^B |\partial_y\hat{v}_\varepsilon^\ell|^2\,dydt \\ = \frac{1}{2}\int_\mathbb{R} e^{B(0,y)} \hat{g}_\varepsilon^\ell \frac{1}{2}\hat{v}_\varepsilon^\ell(0,y)^2\,dy \end{multline} Applying the estimate $ac\geq -(1/2)a^2-(1/2)c^2$ to the second term with \begin{equation*} a = \sqrt{\hat{g}_\varepsilon^\ell} \hat{v}_\varepsilon^\ell e^{B/2} \partial_t B \quad \text{and}\quad c = \sqrt{\hat{g}_\varepsilon^\ell} \hat{v}_\varepsilon^\ell e^{B/2} \end{equation*} leads to the estimate \begin{multline*} \int_0^t\int_\mathbb{R} \left(\partial_t e^B\right) \hat{g}_\varepsilon^\ell (\hat{v}_\varepsilon^\ell)^2\,dydt \\ \geq -\frac{1}{2}\int_0^t\int_\mathbb{R} \left(\partial_t B\right)^2 e^B \hat{g}_\varepsilon^\ell (\hat{v}_\varepsilon^\ell)^2\,dydt'- \frac{1}{2} \int_0^t\int_\mathbb{R}e^{B}\hat{g}_\varepsilon^\ell (\hat{v}_\varepsilon^\ell)^2\,dydt' \\ \geq (-t)\left[\frac{1}{2}\sup_{E}|\partial_t B|^2 + \frac{1}{2} \right] \sup_{t'\in(0,T)} \int_\mathbb{R} e^{B(t',y)}\hat{g}_\varepsilon^\ell(y) \hat{v}_\varepsilon^\ell(t',y)^2\,dy. \end{multline*} With the abbreviations \begin{equation*} C := \frac{1}{2}\sup_{E}|\partial_t B|^2 + \frac{1}{2} \quad\text{and}\quad C' := \frac{1}{2}\int_\mathbb{R}e^{B(0,y)} \hat{g}_\varepsilon^\ell \frac{1}{2}\hat{v}_\varepsilon^\ell(0,y)^2\,dy, \end{equation*} we find via the above estimate and by~\eqref{eq:GF_NGF:proof-lemma-energy-dens:after-mult-v} that \begin{equation*} (1-C\cdot t) \sup_{t'\in(0,T)} \int_\mathbb{R} e^{B(t',y)}\hat{g}_\varepsilon^\ell(y) \hat{v}_\varepsilon^\ell(t',y)^2\,dy + \int_0^t\int_\mathbb{R} e^{B}|\partial_y\hat{v}_\varepsilon^\ell|^2\,dydt \leq C'. \end{equation*} Now iterating this estimate,~\eqref{eq:GF_NGF:limsup:energy-bound-v_eps} follows. \smallskip We now prove~\eqref{eq:GF_NGF:limsup:u_eps-bounded-in-H1-Omega}, that is boundedness of~$\hat{u}_\varepsilon^\ell$ in~$L^2(0,T;H^1(\Omega))$. Since both~$B$ and~$\partial_y B$ are bounded functions as a consequence of Assumption~\ref{assump:GF_NGF:z0-is-ct-and-pos}, proving boundedness of~$\hat{v}_\varepsilon^\ell=e^{-B}\hat{u}_\varepsilon^\ell$ in~$L^2(0,T;H^1(\Omega))$ is sufficient for proving~\eqref{eq:GF_NGF:limsup:u_eps-bounded-in-H1-Omega}. To prove boundedness of~$\hat{v}_\varepsilon^\ell$ in~$L^2(0,T;H^1(\Omega))$, we will establish the following estimates: \begin{enumerate}[label=(\arabic*)] \item There exists a constant~$C_1>0$ such that for all~$\varepsilon>0$, \begin{equation}\label{eq:GF_NGF:limsup:seminorm-bounded} p(\hat{v}_\varepsilon^\ell)\leq C_1, \end{equation} where $p$ is the seminorm~$p(f):= \left(\int_0^T|f(t,+1/2)|^2\,dt\right)^{-1/2}$. \item There exists a constant~$C_2>0$ such that for all~$\varepsilon>0$, \begin{equation}\label{eq:GF_NGF:limsup:poincare} \int_0^T\|\hat{v}_\varepsilon^\ell(t,\cdot)\|_{L^2(\Omega)}^2\,dt \leq C_2 \left[\int_0^T\|\partial_y\hat{v}_\varepsilon^\ell(t,\cdot)\|_{L^2(\Omega)}^2\,dt + p(\hat{v}_\varepsilon^\ell)\right]. \end{equation} \end{enumerate} With these estimates established, boundedness of~$\hat{v}_\varepsilon^\ell$ and hence~\ref{eq:GF_NGF:limsup:u_eps-bounded-in-H1-Omega} follow as \begin{align*} \int_0^T\|\hat{v}\|_{L^2(\Omega)}^2\,dt + \int_0^T\|\partial_y \hat{v}_\varepsilon^\ell\|_{L^2(\Omega)}^2\,dt &\overset{\eqref{eq:GF_NGF:limsup:poincare}}{\leq}(1+C_2)\int_0^T \|\partial_y \hat{v}_\varepsilon^\ell\|_{L^2(\Omega)}^2\,dt + C_2p(\hat{v}_\varepsilon^\ell)\\ &\overset{\eqref{eq:GF_NGF:limsup:seminorm-bounded}}{\leq} (1+C_2)\int_0^T \|\partial_y \hat{v}_\varepsilon^\ell\|_{L^2(\Omega)}^2\,dt + C_2 C_1\\ &\overset{\eqref{eq:GF_NGF:limsup:energy-bound-v_eps}}{\leq} (1+C_2) \cdot \sup_E (e^{-B}) \cdot C + C_2 C_1 < \infty. \end{align*} The estimate~\eqref{eq:GF_NGF:limsup:poincare} is the Poincaré inequality~\cite[Eq.~1.35]{Temam2012}, which holds since~$p$ is a seminorm that is a norm when restricted to constant functions, that is \begin{equation*} (p(c)=0,c\in\mathbb{R}) \Rightarrow c= 0. \end{equation*} For verifying~\eqref{eq:GF_NGF:limsup:seminorm-bounded}, we prove that \begin{equation*} \lim_{\varepsilon\to 0}p(\hat{v}_\varepsilon^\ell) = 0. \end{equation*} Since there exists a constant~$C>0$ such that for all~$\varepsilon>0$, \begin{equation*} \int_0^T\int_{\Omega} |\partial_y\hat{v}_\varepsilon^\ell|^2\,dydt \leq \sup_E(e^{-B}) \int_0^T\int_\mathbb{R}|\partial_y\hat{v}_\varepsilon^\ell|^2\,dydt \overset{\eqref{eq:GF_NGF:limsup:energy-bound-v_eps}}{\leq} C, \end{equation*} there are a function~$\alpha_\varepsilon\in L^2(0,T)$ and a constant~$C'>0$ such that for all~$\varepsilon>0$, \begin{equation*} \|\alpha_\varepsilon\|_{L^2(0,T)}^2\leq C'\quad\text{and}\quad \hat{v}_\varepsilon^\ell(t,y) \geq \hat{v}_\varepsilon^\ell(t,1/2) - \alpha_\varepsilon(t)|y-(1/2)|^{1/2}. \end{equation*} Let~$\delta>0$ be arbitrary and set~$U_\delta:=(\frac{1}{2}-\delta,\frac{1}{2}+\delta)$. Then since~$\hat{u}_\varepsilon^\ell(t,y)\hat{\gamma}_\varepsilon^\ell(dy)$ has mass one for every~$t>0$ and~$\hat{\gamma}_\varepsilon^\ell(dy)=\hat{g}_\varepsilon^\ell(y)dy$, \begin{align*} T &= \int_0^T\int_\mathbb{R} e^B e^{-B}\hat{u}_\varepsilon^\ell \hat{g}_\varepsilon^\ell\,dydt \\ &\geq \inf_E(e^B)\int_0^T\int_{U_\delta}\left(\hat{v}_\varepsilon^\ell(t,1/2) - \alpha_\varepsilon(t)|y-(1/2)|^{1/2}\right)\hat{g}_\varepsilon^\ell\,dydt\\ &\geq \inf_E(e^B)\int_0^T\int_{U_\delta}\hat{v}_\varepsilon^\ell(t,1/2)\hat{g}_\varepsilon^\ell\,dydt - \inf_E(e^B)\delta^{1/2}\int_0^T\int_{U_\delta} \alpha_\varepsilon(t)\hat{g}_\varepsilon^\ell\,dydt. \end{align*} By re-organizing, we deduce the estimate \begin{align*} \int_0^T\hat{v}_\varepsilon^\ell(t,1/2)\,dt \int_{U_\delta}\hat{g}_\varepsilon^\ell\,dy\leq C \left( 1 + \delta^{1/2} \int_{U_\delta}\hat{g}_\varepsilon^\ell\,dy\right), \end{align*} where~$C = \max(T \cdot (\inf_E e^B)^{-1}, C' T^{1/2})$, and therefore arrive at \begin{equation*} \int_0^T\hat{v}_\varepsilon^\ell(t,1/2)\,dt \leq C\delta^{1/2} + C \left(\int_{U_\delta}\hat{g}_\varepsilon^\ell\,dy\right)^{-1}. \end{equation*} For any~$\delta>0$, we have~$\int_{U_\delta}\hat{g}_\varepsilon^\ell\,dy\to+\infty$ as $\varepsilon\to 0$, so that \begin{equation*} \limsup_{\varepsilon\to 0}\int_0^T\hat{v}_\varepsilon^\ell(t,1/2)\,dt \leq C \delta^{1/2}. \end{equation*} Since~$\delta>0$ is arbitrary, this implies~$p(\hat{v}_\varepsilon^\ell)\to 0$ as~$\varepsilon\to 0$. \end{proof} \begin{proof}[Proof of Lemma~\ref{lemma:GF_NGF:limsup:limit-density}] \ref{item:GF_NGF:lemma-limit-density:i}: The fact that~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\in\mathrm{CE}(0,T;\mathbb{R})$ follows directly from~\ref{eq:GF_NGF:limsup:rho_eps-and-j_eps} and the definition of~$\hat{u}_\varepsilon^\ell$. The rate function is given by \begin{align*} \widehat{\mathcal{I}}_\varepsilon(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon) &\overset{\mathrm{def}}{=} \frac{1}{2} \sup_{b\in C_c^\infty(E)}\int_E \left[\hat{u}_\varepsilon^\ell\left(-\partial_y b - \frac{1}{2}b^2\right) + \hat{\jmath}_\varepsilon\cdot b\right]\,dydt \\ &= \frac{1}{4}\int_E \frac{1}{\hat{u}_\varepsilon^\ell(t,y)}\big|\hat{\jmath}_\varepsilon(t,y) + \partial_y \hat{u}_\varepsilon^\ell(t,y)\big|^2\,dydt, \end{align*} where the last equality follows from Lemma~\ref{GF_NGF:lemma:appendix:dual-of-convex-functions}. The form of the rate function~\eqref{eq:GF_NGF:RF-via-density} is an immediate consequence of the definition of~$\hat{\jmath}_\varepsilon$ in~\eqref{eq:GF_NGF:limsup:rho_eps-and-j_eps}. \smallskip We prove~\ref{item:GF_NGF:lemma-limit-density:rho-j-converge} and~\ref{item:GF_NGF:lemma-limit-density:ii} via the following steps: \begin{enumerate}[label=(\arabic*)] \item \label{item:GF_NGF:proof:rho-j-conv:1} We show that there is a pair~$(\hat{\rho}_0^\ell,\hat{\jmath}_0^\ell)\in\mathrm{CE}(0,T;\mathbb{R})$ of the form \begin{align*} \hat{\rho}_0^\ell(t,dy) &= \hat{z}_0^\ell(t)\delta_{-1/2}(dy) + (1-\hat{z}_0^\ell(t))\delta_{+1/2}(dy),\\ \hat{\jmath}_0^\ell(t,y)&= -\partial_t\hat{z}_0^\ell(t)\mathbf{1}_{(-1/2,+1/2)}(y), \end{align*} such that~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\to(\hat{\rho}_0^\ell,\hat{\jmath}_0^\ell)$ as~$\varepsilon\to 0$. We use the superscript~$\ell$ to distinguish this limit~$(\hat{\rho}_0^\ell,\hat{\jmath}_0^\ell)$ from~$(\hat{\rho}_0,\hat{\jmath}_0)$. \item \label{item:GF_NGF:proof:rho-j-conv:2} We show that the density~$\hat{u}_\varepsilon^\ell$ converges to a function~$\hat{u}_0^\ell$ in $L^2(0,T;H^1(\Omega))$ that satisfies for a.e. $t\in(0,T)$ the ODE \begin{align*} \begin{cases} \displaystyle-\partial_y\hat{u}_0^\ell(t,y) + \hat{b}_0(t,y) \hat{u}_0^\ell(t,y) = -\partial_t\hat{z}_0^\ell(t) \quad \text{in}\; \left(-\frac{1}{2},+\frac{1}{2}\right),\\ \displaystyle\hat{u}_0^\ell(t,-1/2) = \hat{z}_0^\ell(t),\\ \displaystyle\hat{u}_0^\ell(t,+1/2) = 0. \end{cases} \end{align*} \item \label{item:GF_NGF:proof:rho-j-conv:3} We show that the ODE enforces both~$\hat{z}_0^\ell(t) = \hat{z}_0(t)$ for a.e.~$t\in(0,T)$ and~$\hat{u}_0^\ell\mathbf{1}_{E_0}=\hat{u}_0$ in~$L^2(E_0)$. \end{enumerate} Then the convergence statement~\ref{item:GF_NGF:lemma-limit-density:rho-j-converge} follows as \begin{equation*} \lim_{\varepsilon\to 0}\left(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon\right)\overset{\ref{item:GF_NGF:proof:rho-j-conv:1}}{=} (\hat{\rho}_0^\ell,\hat{\jmath}_0^\ell) \overset{\ref{item:GF_NGF:proof:rho-j-conv:3}}{=}\left(\hat{\rho}_0,\hat{\jmath}_0\right), \end{equation*} and likewise~\ref{item:GF_NGF:lemma-limit-density:ii} as \begin{equation*} \lim_{\varepsilon\to 0}\hat{u}_\varepsilon^\ell\mathbf{1}_{E_0} \overset{\ref{item:GF_NGF:proof:rho-j-conv:2}}{=} \hat{u}_0^\ell \overset{\ref{item:GF_NGF:proof:rho-j-conv:3}}{=} \hat{u}_0. \end{equation*} We are left with verifying~\ref{item:GF_NGF:proof:rho-j-conv:1},~\ref{item:GF_NGF:proof:rho-j-conv:2} and~\ref{item:GF_NGF:proof:rho-j-conv:3}. \smallskip \ref{item:GF_NGF:proof:rho-j-conv:1}: For any test function~$\varphi\in C_b(E)$, \begin{align*} \left|\int_E \varphi \hat{\rho}_\varepsilon\right|^2 &\overset{\mathrm{def}}{=} \left|\int_E\varphi\, e^{B}\hat{g}_\varepsilon^\ell \hat{v}_\varepsilon^\ell\,dydt\right|^2\\ &\overset{\mathrm{CS}}{\leq} \left(\int_E|e^{B}\hat{g}_\varepsilon^\ell \hat{v}_\varepsilon^\ell(t)^2|\,dydt\right) \left(\int_E |\varphi e^{B}\hat{g}_\varepsilon^\ell| \,dydt\right)\\ &\leq C \left(\sup_t \int_\mathbb{R} e^{B(t)} \hat{g}_\varepsilon^\ell \hat{v}_\varepsilon^\ell(t)^2\,dy\right) \int_{\text{supp}(\varphi)}\hat{g}_\varepsilon^\ell(y)\,dy\\ &\overset{\eqref{eq:GF_NGF:limsup:energy-bound-v_eps}}{\leq} C' \int_{\text{supp}(\varphi)}\hat{g}_\varepsilon^\ell(y)\,dy. \end{align*} Hence for any testfunction with support outside of~$\{\pm 1/2\}$, \begin{equation*} \int_E \varphi \hat{\rho}_\varepsilon \xrightarrow{\varepsilon\to 0} 0. \end{equation*} Therefore in the limit~$\varepsilon\to 0$, the family of measures~$\hat{\rho}_\varepsilon$ converges weakly to a measure~$\hat{\rho}_0^\ell$ that is concentrated on~$[0,T]\times\{\pm 1/2\}$. \smallskip The flux~$\hat{\jmath}_\varepsilon$ is given by~$\hat{\jmath}_\varepsilon = e^{-B}\partial_y\hat{v}_\varepsilon^\ell$. Since the function~$B$ is bounded, we find by virtue of the estimate~\eqref{eq:GF_NGF:limsup:energy-bound-v_eps} that~$\hat{\jmath}_\varepsilon$ is bounded in~$L^2(E)$, because \begin{equation*} \int_E |\hat{\jmath}_\varepsilon|^2\,dydt \leq C \int_E e^B |\partial_y\hat{v}_\varepsilon^\ell|^2\,dydt \overset{\eqref{eq:GF_NGF:limsup:energy-bound-v_eps}}{\leq} C'. \end{equation*} Hence the flux converges weakly in~$L^2(E)$ along a subsequence (denoted the same) to some~$\hat{\jmath}_0^\ell \in L^2(E)$. This finishes the proof of~$(\hat{\rho}_\varepsilon,\hat{\jmath}_\varepsilon)\to(\hat{\rho}_0^\ell,\hat{\jmath}_0^\ell)$, since weak $L^2$ convergence is stronger than convergence in distribution in the sense of Definition~\ref{GF_NGF:def:converge-in-CE}. \smallskip Combining the above convergence statements of~$\hat{\rho}_\varepsilon$ and~$\hat{\jmath}_\varepsilon$, we find for any test function~$\varphi\in C^\infty_c(E)$, \begin{equation*} 0 \overset{\mathrm{CE}}{=} \int_E \partial_t \varphi \, \hat{\rho}_\varepsilon + \int_E \partial_y\varphi \, \hat{\jmath}_\varepsilon \xrightarrow{\varepsilon\to 0} \int_E \partial_t \varphi \, \hat{\rho}_0^\ell + \int_E \partial_y\varphi \,\hat{\jmath}_0^\ell. \end{equation*} Since~$\hat{\rho}_0^\ell$ is concentrated on~$[0,T]\times\{\pm1/2\}$, the limiting flux is piecewise constant with jumps only at~$\{\pm1/2\}$, and due to the fact that~$\hat{\jmath}_0^\ell$ is in~$L^2(E)$, this limiting flux must vanish outside of~$(-1/2,+1/2)$. Therefore, the continuity equation~$0=\partial_t\hat{\rho}_0^\ell + \partial_y\hat{\jmath}_0^\ell$ in the distributional sense implies that the flux is given by \begin{equation*} \hat{\jmath}_0^\ell(t,y)= -\partial_t\hat{z}_0^\ell(t)\mathbf{1}_{(-1/2,+1/2)}(y). \end{equation*} \smallskip \ref{item:GF_NGF:proof:rho-j-conv:2}: By definition, the flux~$\hat{\jmath}_\varepsilon$ is given by \begin{equation*} \hat{\jmath}_\varepsilon = -e^{B}\partial_y\hat{v}_\varepsilon^\ell = -\partial_y\hat{u}_\varepsilon^\ell + \hat{b}_0\mathbf{1}_{E_0}\hat{u}_\varepsilon^\ell. \end{equation*} By the estimate~\eqref{eq:GF_NGF:limsup:u_eps-bounded-in-H1-Omega} from Lemma~\ref{lemma:GF_NGF:unif-energy-est}, the function~$\hat{u}_\varepsilon^\ell$ converges to some function~$\hat{u}_0^\ell$ weakly in~$L^2(0,T;L^2(\Omega))$, and as shown above, the flux~$\hat{\jmath}_\varepsilon$ is bounded in~$L^2(E)$. Hence for any test function~$\varphi\in C^\infty_c((0,T)\times\Omega)$, \begin{equation*} 0=\lim_{\varepsilon\to 0}\int_{(0,T)\times \Omega}\left[\varphi\hat{\jmath}_\varepsilon -\hat{u}_\varepsilon^\ell\partial_y\varphi -\hat{b}_0\mathbf{1}_{E_0}\hat{u}_\varepsilon^\ell\right]= \int_{(0,T)\times \Omega}\left[\varphi\hat{\jmath}_0^\ell -\hat{u}_0^\ell\partial_y\varphi -\hat{b}_0\mathbf{1}_{E_0}\hat{u}_0^\ell\right]. \end{equation*} Therefore~$\hat{\jmath}_0^\ell = -\partial_y\hat{u}_0^\ell + \hat{b}_0\mathbf{1}_{E_0}\hat{u}_0^\ell$ weakly in~$L^2((0,T)\times\Omega)$. Since we also found above that~$\hat{\jmath}_0^\ell(t,y) = -\partial_t \hat{z}_0^\ell(t)\mathbf{1}_{(-1/2,+1/2)}(y)$, this means that in~$E_0$, the function~$\hat{u}_0^\ell$ is the weak solution to the ODE \begin{equation*} -\partial_y\hat{u}_0^\ell(t,y) + \hat{b}_0(t,y)\hat{u}_0^\ell(t,y) = -\partial_t\hat{z}_0^\ell(t). \end{equation*} We are left with verifying the boundary conditions. We will prove that for any test function~$\psi\in C_c^\infty(0,T)$, \begin{align*} 0&=\int_0^T\left(\hat{z}_0^\ell(t)-\hat{u}_0^\ell(t,-1/2)\right)\psi (t)\,dt,\\ 0&= \int_0^T\hat{u}_0^\ell(t,+1/2)\psi(t)\,dt. \end{align*} For~$\delta>0$, let~$U_\delta$ be a small neighborhood around~$(-1/2)$ of length~$2\delta$. Since~$\hat{u}_\varepsilon^\ell$ is uniformly bounded in~$L^2(0,T;H^1(\Omega))$ by~\eqref{eq:GF_NGF:limsup:u_eps-bounded-in-H1-Omega} of Lemma~\ref{lemma:GF_NGF:unif-energy-est}, there is a $C(t)$ such that \begin{equation*} \hat{u}_\varepsilon^\ell(t,y)\leq \hat{u}_\varepsilon^\ell(t,-1/2) + C(t)\,|y+(1/2)|^{1/2}. \end{equation*} With that, we can estimate \begin{multline*} \int_0^T\psi(t)\hat{\rho}_\varepsilon(t,U_\delta)\,dt = \int_0^T\int_{U_\delta} \psi(t)\hat{u}_\varepsilon^\ell(t,y)\hat{g}_\varepsilon^\ell(y)\,dydt\\ \leq \int_0^T\psi(t)\hat{u}_\varepsilon^\ell(t,-1/2)\,dt \int_{U_\delta}\hat{g}_\varepsilon^\ell(y)\,dy + C \|\psi\|_{L^\infty} \int_{U_\delta} |y+(1/2)|^{1/2}\hat{g}_\varepsilon^\ell(y)\,dy\\ \leq \int_0^T\psi(t)\hat{u}_\varepsilon^\ell(t,-1/2)\,dt \int_{U_\delta}\hat{g}_\varepsilon^\ell(y)\,dy + C \|\psi\|_{L^\infty} \delta^{1/2} \int_{U_\delta}\hat{g}_\varepsilon^\ell(y)\,dy. \end{multline*} For each~$\delta>0$,~$\int_{U_\delta}\hat{g}_\varepsilon^\ell(y)dy$ converges to one as~$\varepsilon\to 0$, and \begin{equation*} \lim_{\varepsilon\to 0}\int_0^T\psi(t)\hat{\rho}_\varepsilon(t,U_\delta)\,dt = \int_0^T\psi(t)\hat{z}_0^\ell(t)\,dt. \end{equation*} Therefore, \begin{equation*} \int_0^T\psi(t)\hat{z}_0^\ell(t)\,dt \leq \liminf_{\varepsilon\to 0}\int_0^T\psi(t)\hat{u}_\varepsilon^\ell(t,-1/2)\,dt + C'\delta^{1/2}. \end{equation*} Noting that~$\delta>0$ is arbitrary and repeating the argument for the reversed inequality, we find that \begin{equation*} \int_0^T\psi(t)\hat{z}_0^\ell(t)\,dt = \lim_{\varepsilon\to 0}\int_0^T\psi(t)\hat{u}_\varepsilon^\ell(t,-1/2)\,dt, \end{equation*} and the first boundary conditions follows since~$\hat{u}_\varepsilon^\ell$ converges in~$L^2(\Omega)$ and~$\hat{u}_0^\ell(t,\cdot)$ is continuous. The argument for the second boundary condition is similar, using that~$\hat{g}_\varepsilon^\ell(+1/2)\to\infty$ as~$\varepsilon\to 0$. \smallskip \ref{item:GF_NGF:proof:rho-j-conv:3}: With $B(t,y) = \int_{-1/2}^yb(t,z)\,dz$, the solution in~$E_0$ satisfying the boundary condition~$\hat{u}_0^\ell(t,-1/2)=\hat{z}_0^\ell(t)$ is given by \begin{equation*} \hat{u}_0^\ell(t,y) = e^{B(t,y)}\left[\hat{z}_0^\ell(t) + \partial_t\hat{z}_0^\ell(t) \int_{-1/2}^ye^{-B(t,z)}\,dz\right]. \end{equation*} A calculation yields that \begin{equation*} \int_{-1/2}^{+1/2}e^{-B(t,z)}\,dz = -\frac{\hat{z}_0(t)}{\partial_t\hat{z}_0(t)} > 0. \end{equation*} The boundary condition~$\hat{u}_0^\ell(t,+1/2)=0$ therefore enforces \begin{equation}\label{GF_NGF:eq:upper-bound:proof-lemma-limiting-density} \partial_t \log\hat{z}_0^\ell(t) = \partial_t\log\hat{z}_0(t). \end{equation} The convergence assumption on the initial condition~$\hat{\rho}_\varepsilon(0,dy)$ implies~$\hat{z}_0^\ell(0)=\hat{z}_0(0)$. Hence by \eqref{GF_NGF:eq:upper-bound:proof-lemma-limiting-density}, we obtain~$\hat{z}_0^\ell = \hat{z}_0$. Now the fact that~$\hat{u}_0^\ell$ equals~$\hat{u}_0$ on~$E_0$ follows from an explicit calculation. Alternatively, we note that~$\hat{z}_0^\ell = \hat{z}_0$ and~$\partial_t\hat{z}_0^\ell=\partial_t\hat{z}_0$ implies that~$\hat{u}_0$ is a solution to the ODE, and the result follows from uniqueness of solutions. \end{proof} \section{Appendix---useful lemmas} \begin{lemma}[Laplace's method]\label{lemma:watson} Let $f : [a,b] \to \mathbb{R}$ be twice differentiable. Suppose that for some $x_i \in (a,b)$, we have $f(x_i) = \inf_{[a,b]} f$. Then \begin{equation*} \int_a^b e^{-nf(x)}dx = \left[ 1 + o(1)\right] \sqrt{\frac{2\pi}{n f''(x_i)}} e^{-n f(x_i)}, \quad n \to \infty. \end{equation*} If $x_i = a$ or $x_i=b$, then \begin{equation*} \int_a^b e^{-nf(x)}dx = \left[ 1 + o(1)\right] \frac{1}{2} \sqrt{\frac{2\pi}{n f''(x_i)}} e^{-n f(x_i)}, \quad n \to \infty. \end{equation*} \end{lemma} \begin{lemma}[Dual of convex functions]\label{GF_NGF:lemma:appendix:dual-of-convex-functions} For $X=[0,T]\times \mathbb{R}^d$ and $f,g: X \to \mathbb{R}$ measurable with $g > 0$, any nonnegative Borel measure $\mu$ satisfies \begin{equation*} \int_X \frac{1}{2} \frac{|f(x)|^2}{g(x)} \, \mathrm{d} \mu(x) = \sup_{\substack{b \in C_c^\infty(X)}} \int_X \left[\left(-\frac{b(x)^2}{2}\right)g(x) + b(x)f(x)\right]\, \mathrm{d}\mu(x), \end{equation*} with the integral diverging when the supremum is infinity. \end{lemma} A proof is given for instance in~\cite[Lemma~3.4]{ArnrichMielkePeletierSavareVeneroni2012}. The representation in there can be further simplified by setting $a=-b^2/2$. \begin{lemma}[Variational Problem]\label{lemma:GF_NGF:variational-problem} Define the function~$S$ by~\eqref{GF_NGF:eq:S-fct}. Then: \begin{enumerate}[label=(\roman*)] \item \label{item:GF_NGF:lemma:var-probl:i} We have \begin{equation}\label{eq:GF_NGF:lemma:var-probl} S(j,z) = \frac{1}{4} \inf_u \int_{-1/2}^{+1/2} \frac{1}{u(y)}\big|j + \partial_y u(y)\big|^2\,dy, \end{equation} where the infimum is taken over smooth functions~$u:[-1/2,+1/2]\to[0,\infty)$ satisfying the boundary conditions $u(-1/2)=z$ and~$u(+1/2)=0$. \item \label{item:GF_NGF:lemma:var-probl:ii} The optimizer in~\eqref{eq:GF_NGF:lemma:var-probl} is the polynomial \begin{equation}\label{eq:GF_NGF:lemma-var-probl:optimal-u} u(y) = -(j-z)(y-y_0)\left(y-\frac{1}{2}\right), \quad y_0 = \frac{1}{2}\frac{z+j}{z-j}. \end{equation} \end{enumerate} \end{lemma} The proof is best carried out by exploiting the fact that the energy is conserved, since the function in the variational problem does not depend explicitly on~$y$. \chapter{Discussion and Future Questions} \label{chapter:discussion} Here we summarize the main results presented in each chapter and discuss interesting future questions related to them. \subsubsection{Chapter~\ref{chapter:LDP-for-switching-processes}: Large Deviations of Switching Processes.} \paragraph{Summary.} We consider a class of switching processes~$(X^\varepsilon,I^\varepsilon)$ in a periodic setting and prove pathwise large deviation principles of their spatial components~$X^\varepsilon$ in the limit~$\varepsilon\to 0$. The switching processes are motivated by stochastic models describing the spatial position of molecular motors walking on filaments within a cell, where the parameter~$\varepsilon>0$ corresponds to the ratio of microscopic to macroscopic scales. Our results embed existing results about molecular motors in a large-deviation context. The proofs of large deviation principle for the various models of molecular motors are examples of a general strategy outlined by Theorems~\ref{thm:results:LDP_switching_MP} and~\ref{thm:results:action_integral_representation}. In particular, the large-deviation proofs are independent of the specific choices involved in the models. Our method of proof exploits the connection of large deviations to Hamilton-Jacobi equations~\cite{FengKurtz2006}. Based on this connection, we find a strategy of proof consisting of two steps: first, identifying a multivalued limit operator, and second, solving a principal-eigenvalue problem. \smallskip In the models, the periodic setting reflects the periodic stucture of the filaments. As a consequence of this periodicity, the motor cannot advance without coupling to the chemically active environment, but switching mechanism between different configurations can generate motion. We derive an exact formula for the motor's large-scale velocity,~$v=\partial_p\mathcal{H}(0)$. This formula, based on the principal eigenvalue~$\mathcal{H}(p)$ of a cell problem, coincides with the findings of Perthame and Souganidis~\cite{PerthameSouganidis09a}. We work with variational representations of the principal eigenvalues to derive from the large deviation principles the following fact: a non-zero velocity~$v$ can only be achieved if detailed balance is broken (Theorem~\ref{thm:results:detailed_balance_limit_I}). \paragraph{Discussion and future questions.} Our more concrete conclusions based on working with the Hamiltonians~$\mathcal{H}(p)$ are limited to detailed balance. It would be interesting to investigate the Hamiltonians for systems not satisfying detailed balance. Hastings, Kinderlehrer and Mcleod for instance showed that transport occurs if potentials and rates collaborate in a suitable way~\cite[Theorem~2.1]{HastingsKinderlehrerMcleod08}. These conditions should consequently imply a non-trivial velocity~$v$. Another interesting question is the behaviour of the motor under load- or external forces. We showed under detailed balance that with a constant external force~$F$, the Hamiltonians are symmetric around~$-F$, which means that a positive (negative) force leads to a positive (negative) velocity. In general, does the velocity depend monotonically on external forces? Is there a stalling force~$F$ with which the motor's velocity vanishes? We could not find suitable symmetries of~$\mathcal{H}(p)$ for answering these questions. \smallskip Another open question is related to the coupled Fokker-Planck equations of the molecular-motor models. Chipot, Kinderlehrer and Kowalczyk considered a variational formulation for molecular motors~\cite{ChipotKinderlehrerKowalczyk2003}, similar in spirit to the JKO-scheme of Jordan, Kinderlehrer and Otto for the diffusion equation~\cite{JordanKinderlehrerOtto1998}. It would be interesting to know whether we can derive such variational formulations from large deviations of empirical densities, in the same manner as Adams, Dirr, Peletier and Zimmer derived Wasserstein gradient flows~\cite{AdamsDirrPeletierZimmer2011}. We do not expect a gradient-flow structure for molecular motors, since molecular motors are modelled by irreversible processes, and reversible processes lead to gradient flows as shown by Mielke, Peletier and Renger~\cite{MielkePeletierRenger2014}. However, once one knows how to derive a meaningful variational formulation in this example, one might be able to obtain variational formulations for similar irreversible processes as well. \subsubsection{Chapter~\ref{chapter:LDP-of-empirical-measures}: Large Deviations of Empirical Measures.} \paragraph{Summary.} The zig-zag process is an irreversible piecewise-deterministic Markov process designed to have a specific Gibbs-type stationary measure. We prove that its empirical measure satisfies a large deviation principle. Classical results in large deviation theory are not applicable due to the finite-speed and non-diffusive character of the zig-zag process. Therefore we derive suitable conditions based on the semigroup approach to large deviations~\cite{FengKurtz2006}. Our main contribution lies in proving that the Lyapunov functions in~\ref{item:thm_LDP_non_compact:Lyapunov} and the mixing property~\ref{item:thm_LDP_non_compact:mixing} suffice for a proof of large deviations in a non-compact state space. \smallskip We cannot characterize the rate functions by the Donsker-Varadhan formula for reversible diffusions, due to the inherent irreversibility of the zig-zag process. We derive an explicit formula of the rate function for the compact case. Based on this characterization, we conclude that the optimal rate of convergence is achieved by setting the refreshment rate~$\gamma$ (in Eq.~\eqref{eq:switching-intensity-condition-2}) to zero. \paragraph{Discussion and future questions.} Our conclusions about the zig-zag process are limited to one dimension. It would be very interesting to know whether our results also hold in higher dimensions. While the Lyapunov functions that we found for the zig-zag process are suitable for arbitrary dimensions, we were not able to verify the mixing property~\ref{item:thm_LDP_non_compact:mixing}. \smallskip Another open question is whether we can also explicitly characterize the rate functions in higher dimensions---for the zig-zag process as well as for other PDMPs such as the bouncy particle sampler~\cite{BouchardCoteVollmerDoucet2017}. The idea of using large-deviation rate functions to compare the performance of MCMC algorithms was introduced in~\cite{plattner2011infinite, dupuis2012infinite}. Rey-Bellet and Spiliopoulos showed that adding irreversible drifts to a diffusion process increases the rate functions~\cite[Theorem~2.2]{rey2015irreversible} and decreases the asymptotic variance~\cite[Theorem~2.7]{rey2015irreversible}. Explicit characterizations of the rate functions would be useful to address similar performance questions for PDMPs. Further natural steps are to compare samplers based on drift-diffusion processes and PDMPs, and to investigate how the rate functions scale with the dimension. An answer to the latter question would give interesting insights into how the various algorithms deal with the curse of dimensionality. \smallskip Nicolás García Trillos and Daniel Sanz-Alonso recently demonstrated that samplers based on drift-diffusion processes converge faster to equilibrium when choosing a suitable non-Euclidean metric for the space of position variables~\cite[Theorem~4.1, Proposition~4.3]{TrillosSanz-Alonso2018}. The authors call these processes geometry-informed Langevin diffusions, and their conclusions are based on an analysis of the spectral gap. Their results raise the question of whether a similar effect can be observed from a large-deviation point of view and for geometry-informed PDMPs. For instance, in between jumps of the velocity variables, the zig-zag and bouncy-particle samplers move in straight lines. It would be interesting to explore whether these samplers can benefit from modifying the piecewise-deterministic dynamics to follow geodesics with respect to a non-Euclidean metric. \subsubsection{Chapter~\ref{chapter:LDP-in-slow-fast-systems}: Large Deviations in Stochastic Slow-Fast Systems.} \paragraph{Summary.} We consider two-component stochastic processes whose individual components run at different time scales. Our main results are a proof of large deviation principles in the limit of an infinite time-scale separation and an interpretation of the Lagrangian rate functions we obtain. The analytical challenge in the proof (the comparison principle for an associated Hamilton-Jacobi equation) is solved in Chapter~\ref{chapter:CP-for-two-scale-H}. The results apply in particular to irreversible diffusions as fast processes. Our main example are mean-field interacting particles coupled to fast diffusion processes, for which we deduce an averaging principle from the large deviation principle. A key ingredient for this argument is a suitable formula for the Lagrangians. \paragraph{Discussion and future questions.} We assumed the fast variables to live in a compact space to focus only on the effects coming from the scale separation. It would be worthwhile to extend the analysis to the non-compact setting in order to cover for instance a fast Ornstein–Uhlenbeck process. Another interesting question we left unanswered is whether one can treat \emph{degenerate} diffusions as in~\cite{BudhirajaDupuisGanguly2018} with our methods---we always worked under uniform ellipticity assumptions. In all these examples, the key problem one has to solve is the comparison principle. We further comment on that in the discussion below. \subsubsection{Chapter~\ref{chapter:CP-for-two-scale-H}: Comparison Principle for Two-Scale Hamiltonians.} \paragraph{Summary.} We prove existence and uniqueness of solutions of a Hamilton-Jacobi equation, where the Hamiltonian is given by an optimization over control variables. The Hamiltonians appearing in large-deviation problems for slow-fast systems (Chapter~\ref{chapter:LDP-in-slow-fast-systems}) are of this type. We propose a bootstrap procedure to solve the comparison principle, for which we have to assume sufficient regularity of the cost functions. The method applies to non-coercive Hamiltonians arising in mean-field models. Furthermore, it addresses a problem pointed out in~\cite{BudhirajaDupuisGanguly2018}, which is that classical comparison results are not readily applicable due to the poor regularity properties of this type of two-scale Hamiltonians. \paragraph{Discussion and future questions.} There are various examples that we cannot treat with our method, but which are important to address. Let us mention two examples. First, if the internal Hamiltonians correspond to degenerate diffusions---we use uniform ellipticity in the proof of Proposition~\ref{prop:verify-ex:Lambda_quadratic}. Under Lipschitz conditions on the diffusion coeffcients, the comparison principle for degenerate diffusions is proven in~\cite[Lemma~9.25]{FengKurtz2006} by means of an auxiliary variable~$\lambda$. It would be interesting to investigate whether one can combine this method of proof to include the case of degenerate diffusions in two-scale Hamiltonians. \smallskip Second, we considered Hamiltonians arising from a scale separation in a weakly-coupled regime. That is reflected in the fact that the cost functionals do not depend on~$p$. But there are interesting problems leading to such as setting. For instance, in the molecular-motor models, we only discussed potentials and rates $\{\psi_i, r_{ij}\}$ depending on the up-scaled variables, in the sense that~$\psi_i=\psi_i(x/\varepsilon)$ and~$r_{ij}=r_{ij}(x/\varepsilon)$. That assumption leads to a simplification, since then the well-posedness of the principal-eigenvalue problem is sufficient for proving the comparison principle---this is basically the content of~\ref{MM:item:T1} and~\ref{MM:item:T2} of Theorem~\ref{thm:results:LDP_switching_MP}, which state that finding an eigenvalue~$\mathcal{H}(p)$ and an eigenfunction~$\varphi_p$ are sufficient. When we consider instead potentials~$\psi_i=\psi_i(x,x/\varepsilon)$ and rates~$r_{ij}=r_{ij}(x,x/\varepsilon)$, the eigenvalue Hamiltonians are---similar to~\eqref{eq:results:LDP_MM:DV_var_rep_H(p)} of Section~\ref{subsection:detailed_balance}---of the form \begin{equation*} \mathcal{H}(x,p)=\sup_{\mu\in\mathcal{P}(E')}\left[\int_{E'}V_{x,p}(z)\, \mathrm{d}\mu(z) - \mathcal{I}_{x,p}(\mu)\right]. \end{equation*} In there, the maps~$V_{x,p}$ and~$\mathcal{I}_{x,p}$ are obtained from~\eqref{MM:eq:function-V-in-Hamiltonian} and~\eqref{eq:results:LDP_MM:DV_functional} by replacing the potentials and rates. It is unknown whether the comparison principle is satisfied for the Hamilton-Jacobi equation with these Hamiltonians. The Hamiltonians we obtain in slow-fast systems in Chapter~\ref{chapter:LDP-in-slow-fast-systems} are simpler in the sense that the Donsker-Varadhan functionals~$\mathcal{I}_{x,p}(\mu)$ in there are indepedent of the momentum variable~$p$. It would be interesting to explore whether the method developed in Chapter~\ref{chapter:CP-for-two-scale-H} can be extended to include this type of Hamiltonians. \subsubsection{Chapter~\ref{chapter:GF-to-NGF}: Gradient Flow to Non-Gradient-Flow.} \paragraph{Summary.} We study a family of Fokker-Planck equations corresponding to a particle diffusing in an asymmetric double-well potential. The associated gradient-flow structures do not converge in a certain limit due to the relative entropies diverging, which originates from the asymmetry of the potential. We propose to work instead with a different variational formulation based on functionals that include fluxes, and show~$\Gamma$-convergence of these functionals. Our motivation is taken from the fact that reversible processes give us gradient flows via large deviation theory. Therefore the convergence of gradient-flow structures appears in many contexts, and it is natural to ask which convergence concepts are suitable for treating cases in which the underlying processes become irreversible. \paragraph{Discussion and future questions.} It would be exciting to investigate other cases of gradient-flow structures that are not converging due to the relative entropies diverging. On the level of the functionals, one may regard the inclusion of fluxes as "absorbing" or "including" the relative entropies into the dissipation functional. While we use a special coordinate transformation that is akin to the problem we study, a natural question is whether the techniques we employed in our case also apply to~$\Gamma$-convergence problems for other density-flux functionals. \qed \chapter*{Abstract} Time-irreversible stochastic processes are frequently used in natural sciences to explain non-equilibrium phenomena and to design efficient stochastic algorithms. Our main goal in this thesis is to analyse their dynamics by means of large deviation theory. \smallskip We focus on processes that become deterministic in a certain limit, and characterize their fluctuations around that deterministic limit by Lagrangian rate functions. Our main techniques for establishing these characterizations rely on the connection between large deviations and Hamilton-Jacobi equations. We sketch this connection with examples in the introductory parts of this thesis. \smallskip The second part of the thesis is devoted to irreversible processes that are motivated from molecular motors, Markov chain Monte Carlo (MCMC) methods and stochastic slow-fast systems. We characterize the asymptotic dynamics of molecular motors by Hamiltonians defined in terms of principal-eigenvalue problems. From our results about the zig-zag sampler used in MCMCs, we learn that maximal irreversibility corresponds to an optimal rate of convergence. In stochastic slow-fast systems, our main theoretical contributions are techniques to work with the variational formulas of Hamiltonians that one encounters in mean-field systems coupled to fast diffusions. \smallskip In the final part of the thesis, we study a family of Fokker-Planck equations whose solutions become singular in a certain limit. The associated gradient-flow structures do not converge since the relative entropies diverge in the limit. To remedy this, we propose to work with a different variational formulation that takes fluxes into account, which is motivated by density-flux large deviations. \smallskip \paragraph{Keywords.} Large deviations, partial differential equations, viscosity solutions, comparison principle, variational techniques,~$\Gamma$-convergence, gradient flows. \chapter{Acknowledgments} First I want to thank you, Mark. This thesis would not have been possible without your support and guidance. I am grateful that you gave me the opportunity to become a mathematician; that you patiently taught me how to approach mathematical questions, how to write papers, how to present science; also that erasers are personal belongings rather than public goods. I enjoyed in particular working with you in the office; I always learned a lemma, a theorem, and your humor made the discussions enjoyable. I missed that during times of corona. I also appreciate that you nudged me to organize CASA Days and the Wednesday Morning Sessions---this gentle kick making me become active is exactly what I needed. \smallskip I thank the committee members for accepting the invitation, and for their many comments, remarks and suggestions after reading the first manuscript, which motivated me to read up on many other works. Thank you for your interest in my thesis and in our work. \smallskip Frank, Francesca and Federico, I greatly enjoyed the frequent and inspiring meetings we had in Delft and Eindhoven. I learned to appreciate stochastic processes, martingales and Brownian motion during our discussions, and liked the atmosphere that you created in our meetings. \smallskip I am also grateful to my collaborators. Richard, you always made me feel welcome in Delft by chatting about life and mathematics. Thank you for offering me numerous cups of coffee; I liked our discussions about comparison principles,~$f=h$, and many more topics. Joris and Pierre, thank you for introducing me to the world of MCMCs. I learned a lot from your style of writing and from our frequent attempts to show that the zig-zag process is a nice process. Mario, thank you for our discussions in Eindhoven and Bonn. \smallskip Jin, thank you for answering all my questions via many emails and for our discussions at the Leiden conference; they were crucial for making progress. \smallskip The four years at CASA have been a lot of fun. Diane, Enna and Jolijn, you were a great support during my stay at CASA. I want to thank my office mates I had over the years; Saeed, Upanshu, Koondi, Jasper, Anastasiia and Alberto. Thank you Anastasiia and Jasper for the fun times during the ODE course and discussions on the whiteboard, and for saving my plants (before and during corona). Arthur (Zigge-zagge); thanks for all the amusing and entertaining talks. Anastasiia, Harshit, Xingang, it was fun to get our chip-predictions right (Brownian motion). Jim, I really enjoyed being part of your measure-theory course, discussing exams and homeworks with you, and going for pizza to celebrate the end of a course; thank you for this time, I learned a lot from you about measure theory. Georg, thank you for discussing compact operators and principal eigenvalues with me; it was also great preparing the workshop on quantum computing with you. Thanks Oliver for frequently dropping by at our office to chat about math. Thank you Jan-Cees for the interesting projects during the ODE course. Alberto, Carlo, Oxana, thank you for your suggestions during the Wednesday Morning Sessions we had so far. Finally, I also want to thank all others who make CASA a welcoming place. \smallskip I am also glad to be part of the random people in Delft; Andrea, Bart, Federico, Francesca, Mario, Martina, Richard, Rik, Sebastiano, Simone, I always enjoyed being at TU Delft and chatting with you over coffee! \smallskip Special thanks goes to the Nederlandse Spoorwegen and Julia's. Thanks to your trains and coffees during these four years, I could live in (and in between) Eindhoven, Delft and Leiden. \smallskip Ich m{\"o}chte besonders meiner Familie danken, die mich in den vergangenen Jahren begleitet hat und zu meiner Verteidigung anreist: Mama, Papa, Joana, Nielsson, Oma, Max und Olha. Mama, danke dass du dich so sehr daf{\"u}r eingesetzt hast, mich auf ein Gymnasium zu bringen; ohne all deine Bem{\"u}hungen und Unterst{\"u}tzung h{\"a}tte ich niemals anfangen k{\"o}nnen diese Arbeit zu schreiben. Papa, danke dass du mir kurz nach meiner Geburt den kleinen Fermat vorgelesen hast, in der Hoffnung ich h{\"a}tte einen Geistesblitz. Zwar blieb dieser bis heute aus, aber der Funke ist {\"u}bergesprungen weil du meine Freude an der Physik und Mathematik immer unterst{\"u}tzt und befeuert hast. \smallskip Mia, thank you so much for supporting me during the whole time of my PhD. You were there for me. You discussed math with me, we prepared exams and homeworks for measure theory together, you encouraged me during the process of writing the thesis when I needed you; thank you for all of that! I am happy about all the memories we share from the last years, and when looking ahead with you. Thank you for coming into my life, it is wonderful with you! \chapter{Curriculum Vitae} \pagestyle{empty} Mikola Christoph Schlottke was born on 29-06-1991 in Erlangen, Germany. After finishing high school in 2010 at the Friedrich-Alexander-Gymnasium in Neustadt an der Aisch, he did a Voluntary Year of Social Service at the Bavarian Red Cross as a paramedic. He then started his studies of Physics at the University of Potsdam in Germany, which he completed in 2014 with distinction and a thesis on the tunnel effect under the supervision of prof.dr. Markus Klein. He continued to study Theoretical Physics at the University of Amsterdam, where he graduated in 2016 with a thesis on the Atiyah-Singer-Index Theorem under the supervision of dr. H.B. Posthuma. \smallskip In October 2016, he started a PhD project at the Eindhoven University of Technology under the supervision of prof.dr. Mark A. Peletier. The results obtained during this project are presented in this dissertation. The PhD project was part of the TOP-1 project \emph{Large deviations and gradient flows: beyond equilibrium}, which included regular meetings with prof.dr. F.H.J. Redig, dr. Francesca Collet and dr. Federico Sau, and was funded by the NWO grant 613.001.552. \chapter{Summary} \begin{center} \Large \myTitle \end{center} \thispagestyle{empty} In this thesis we study path distributions of stochastic processes by means of large deviation theory. We focus on processes that are typically time-irreversible, which means that inverting time leads to a different path distribution. Our main motivation comes from the fact that while reversible processes lead via large deviation theory to gradient flows, it is an open question of which variational structures can be obtained from irreversible processes. In this thesis we make a first step to answering this question by deriving large deviation principles for irreversible processes. \smallskip The stochastic processes we consider depend on a parameter characterzing the concrete process at hand; a length-scale separation, the number of particles in a system, the time variable itself, or a parameter modeling separation of time scales. If the parameter is sent off to infinity, the stoachstic process becomes deterministic. That means in the limit, realizations of the processes are with probability one equal to a particular limiting trajectory. We use large deviation theory to show that the probability of obtaining an atypical realization of the process vanishes exponentially fast, with a rate depending on the atypical trajectory. Our aim is to express this rate as an integral over time involving a so-called Lagrangian, which provides one way of determining the limiting typical behaviour of the stochastic process. In the reversible case, the connection to gradient flows case is derived using symmetries of the Lagrangians. \smallskip The first two chapters introduce the basic concept of large deviation theory applied in the context of stochastic processes. In particular, we illustrate the Feng-Kurtz method of how to rigorously derive Lagrangians of a sequence of stochastic processes starting from the infinitesmial generators of the processes. \smallskip In Chapter~3, we contribute to the analysis of stochastic models of molecular motors, which are proteins transporting cargo in living cells. The stochastic processes model the position of a molecular motor walking on a filament. We use the Feng-Kurtz method to prove large deviations principles of the position variable in the large-scale limit. Our results provide one way of analysing the macroscopic behaviour of the molecular motor starting from the microscopic dynamics. For instance, the influence under external forces, or the fact that transport can only occur if time-reversibility is broken. \smallskip Chapter~4 is dedicated to the analysis of Markov chain Monte Carlo (MCMC) methods based on piecewise-deterministic Markov processes (PDMP). The idea behind MCMC is to approximate a probability distribution by the occupation time measure of a stochastic process. Under ergodicty assumptions, the occupation time measure converge to the stationary measure of the process, which is designed to be equal to the desired probability distribution. Our results offer a framework for proving that the associated occupation time measures of PDMP's satisfy in fact a large deviation principle. Classical theorems do not apply due to the singular nature of PDMPs, but we show how the nonlinear semigroup approach provides one way of overcoming this difficulty. We learn from our results that for the zig-zag process, maximal irreversibility corresponds to the optimal rate of convergence to stationarity. \smallskip In Chapters~5 and~6, we consider stochastic slow-fast systems. In particular, we are interested in mean-field interacting particles where the interaction rates are fluctuating on a much faster time scale than the particle's evolution. Intuitively, one expects the particle system to evolve under averaged interaction rates, which is refered to the averaging principle. We first prove large deviation principles of the particle densities and fluxes in the simultaneous limit of infinitely many particles and time-scale separation tending to infinity. Then we show that the averaging principle holds as a consequence of the large deviation principle. The techniques are based on Hamilton-Jacobi theory. Chapter~5 contains the large-deviation analysis, while we solve in Chapter~6 more general Hamilton-Jacobi-Bellman equations arising in this context. \smallskip Finally, we analyse in Chapter~7 partial differential equations arising in models of chemical reactions. The equations contain parameters modeling the activation energy of certain chemical reactions and the time-scale of reaction events. A crucial role in our analysis is the variational formulation of such PDEs by means of density-flux functionals. In the limit of large-activation energy, we prove~$\Gamma$-convergence of these functionals. On the level of underlying stochastic processes, this convergence result corresponds to passing from reversible to irreversible processes. With this problem we address the question of which variational formulations beyond gradient flows are suitable for studying such limits from reversible to irreversible. \smallskip \cleardoublepage \chapter{Summary} \begin{center} \Large \myTitle \end{center} \thispagestyle{empty} In this thesis we study path distributions of stochastic processes by means of large deviation theory. We focus on processes that are typically time-irreversible, which means that inverting time leads to a different path distribution. Our main motivation comes from the fact that while reversible processes lead via large deviation theory to gradient flows, it is an open question of which variational structures can be obtained from irreversible processes. In this thesis we make a first step to answering this question by deriving large deviation principles for irreversible processes. \smallskip The stochastic processes we consider depend on a parameter characterzing the concrete process at hand; a length-scale separation, the number of particles in a system, the time variable itself, or a parameter modeling separation of time scales. If the parameter is sent off to infinity, the stoachstic process becomes deterministic. That means in the limit, realizations of the processes are with probability one equal to a particular limiting trajectory. We use large deviation theory to show that the probability of obtaining an atypical realization of the process vanishes exponentially fast, with a rate depending on the atypical trajectory. Our aim is to express this rate as an integral over time involving a so-called Lagrangian, which provides one way of determining the limiting typical behaviour of the stochastic process. In the reversible case, the connection to gradient flows case is derived using symmetries of the Lagrangians. \smallskip The first two chapters introduce the basic concept of large deviation theory applied in the context of stochastic processes. In particular, we illustrate the Feng-Kurtz method of how to rigorously derive Lagrangians of a sequence of stochastic processes starting from the infinitesmial generators of the processes. \smallskip In Chapter~3, we contribute to the analysis of stochastic models of molecular motors, which are proteins transporting cargo in living cells. The stochastic processes model the position of a molecular motor walking on a filament. We use the Feng-Kurtz method to prove large deviations principles of the position variable in the large-scale limit. Our results provide one way of analysing the macroscopic behaviour of the molecular motor starting from the microscopic dynamics. For instance, the influence under external forces, or the fact that transport can only occur if time-reversibility is broken. \smallskip Chapter~4 is dedicated to the analysis of Markov chain Monte Carlo (MCMC) methods based on piecewise-deterministic Markov processes (PDMP). The idea behind MCMC is to approximate a probability distribution by the occupation time measure of a stochastic process. Under ergodicty assumptions, the occupation time measure converge to the stationary measure of the process, which is designed to be equal to the desired probability distribution. Our results offer a framework for proving that the associated occupation time measures of PDMP's satisfy in fact a large deviation principle. Classical theorems do not apply due to the singular nature of PDMPs, but we show how the nonlinear semigroup approach provides one way of overcoming this difficulty. We learn from our results that for the zig-zag process, maximal irreversibility corresponds to the optimal rate of convergence to stationarity. \smallskip In Chapters~5 and~6, we consider stochastic slow-fast systems. In particular, we are interested in mean-field interacting particles where the interaction rates are fluctuating on a much faster time scale than the particle's evolution. Intuitively, one expects the particle system to evolve under averaged interaction rates, which is refered to the averaging principle. We first prove large deviation principles of the particle densities and fluxes in the simultaneous limit of infinitely many particles and time-scale separation tending to infinity. Then we show that the averaging principle holds as a consequence of the large deviation principle. The techniques are based on Hamilton-Jacobi theory. Chapter~5 contains the large-deviation analysis, while we solve in Chapter~6 more general Hamilton-Jacobi-Bellman equations arising in this context. \smallskip Finally, we analyse in Chapter~7 partial differential equations arising in models of chemical reactions. The equations contain parameters modeling the activation energy of certain chemical reactions and the time-scale of reaction events. A crucial role in our analysis is the variational formulation of such PDEs by means of density-flux functionals. In the limit of large-activation energy, we prove~$\Gamma$-convergence of these functionals. On the level of underlying stochastic processes, this convergence result corresponds to passing from reversible to irreversible processes. With this problem we address the question of which variational formulations beyond gradient flows are suitable for studying such limits from reversible to irreversible. \smallskip \cleardoublepage
\section{Introduction} In Unifying paper 1 of 4 a generalized sandwich variance estimators was proposed that is applicable to virtually any experimental design, any linear estimator and any variance bound (defined therein), subsuming other well known sandwich variance estimators (which go by names such as ``robust", ``cluster robust'', ``heteroskedastic consistent", ``sandwich", ``White", ``Huber-White", ``HC", ``CR", etc.). This paper presents two novel classes of variance estimators with superior properties, in the absence of parametric or semi-parametric assumptions. The first new class of estimator is the Oblo\v{z}en\`{e} Chleb\`{i}\v{z}ky (OC) variance estimators as a novel alternative to the generalized sandwich in Paper 1 of 4. That the OC concept is unlikely to arise from other, more standard, frameworks is manifestly true in light of the 40 year lacuna since White (1980). For any member of the generalized sandwich variance estimator class, there is an OC with the same expected value. The this alternative replaces a random matrix at the center with a nonrandom one. The second type of estimator is guaranteed conservative for the variance of the estimator and is based upon a similar principle of replacing a random matrix with its (nonrandom) expectation. There is heuristic appeal in eliminating variance components from variance estimators, because it may mean that the OC may be more precise than the sandwich upon which it is based, though this may need not be true in general. In simulations based on a real randomized experiment, reductions in variance of variance estimators is substantial, and guaranteed conservative variance estimators do not suffer from small sample bias the way so-called robust, sandwich-type variance estimators do. \section{Notation} Consider a randomized experiment with $k$ treatment arms. The Neyman causal model (NCM) assumes that the units in the experimental study represent a finite population of size $n$. For a given outcome measure, call it $y$, each unit, $i$, responds with one of $k$ possible values in $\{y_{1i}, y_{2i}, ..., y_{ki} \}$, depending on their treatment assignment. The possible responses are referred to as the \textit{potential outcomes}. In the NCM these values are considered (nonrandom) constants, which stands in contrast to other, more common, formulations where potential outcomes are assumed to be sampled from some (possibly nonparametric) joint distribution. The only random elements in the NCM are the treatment assignment indicators \linebreak $\{R_{1i}, R_{2i},...,R_{ki} \}$, and they determine which potential outcome will be observed by the researcher. Since a unit, $i$, can only be assigned to one arm of the experiment these random indicators must sum to unity, i.e., $R_{1i}+R_{2i}+...+R_{ki}=1$. A standard representation of the \textit{observed} response for the $i^{th}$ unit under the NCM would be, \begin{align*} Y_i^{obs}= y_{1i}R_{1i}+y_{2i}R_{2i}+...+y_{ki}R_{ki}, \end{align*} which is itself random, due to the assignment indicators. The observed data can then be represented as $\{Y^{obs}_i, R_{1i}, R_{2i},..., R_{ki}, x_i\}_{\forall i}$, where $x_i$ is an additional vector of $k$ covariates. Like the potential outcomes, $x_i$ is considered to be nonrandom, and, unlike the potential outcomes, does not depend on the assignment, which might be ensured, in practice, by collecting the covariates before the assignment. Ideally, a researcher might like to know the difference between responses under various arms for a given individual, $i$ for example, $y_{2i}-y_{1i}$, or perhaps $\frac{1}{2}\left( y_{2i}-y_{1i} + y_{4i}-y_{3i} \right)$ and so on, which are examples of different \textit{contrasts} between potential outcomes. However, it is clear from the definition of $Y_i^{obs}$ that individual treatment effects are not identified since only one of the two potential outcomes can be observed. This is known as \textit{fundamental problem of causal inference} \citep{holland}. As a result, we often study averages of these values over the units of study. To continue with the above examples, a researcher might be satisfied to estimate averages over these individual treatment effects. Continuing the example, we have the average treatment effects $n^{-1} \sum_i \left(y_{2i}-y_{1i}\right) $ and $ n^{-1} \sum_i \frac{1}{2} \left(y_{2i}-y_{1i} + y_{4i}-y_{3i} \right)$, respectively. To simplify notation, let $y_1$, $y_2$,...,$y_k$ represent length $n$ vectors of potential outcomes associated with each of the arms, with the $i^{th}$ element of each corresponding to the $i^{th}$ unit. Next, define \begin{align*} y := \left(y_1' \hspace{2mm} y_2' \hspace{2mm} \hdots \hspace{2mm} y_k' \right)', \end{align*} which is the length $kn$, representing all $k$ potential outcomes for each of the $n$ units. Next, if we let $1_{\scriptscriptstyle n}$ be a $n$-length vector of ones, then a $kn \times k$ \textit{intercept matrix} can be defined as, \begin{align*} \mathds{1} := & \left[ \begin{matrix} 1_{\scriptscriptstyle n} & & & \\ & 1_{\scriptscriptstyle n} & & \\ & & \ddots \\ & & & 1_{\scriptscriptstyle n} \end{matrix} \right], \end{align*} which, for example, allows us to express a $k$-length vector of means of the arms as as $n^{-1} \mathds{1}' y$ or, equivalently, $\left(\mathds{1}' \mathds{1}\right)^{-1} \mathds{1}' y$. Given a length-$k$ \textit{contrast vector}, $c$, we can contrast the means for the various arms. In keeping with the running example with four assignment arms, if one is interested in the average difference in responses to the first two treatments, then $c=(-1\hspace{2mm} 1 \hspace{2mm} 0 \hspace{2mm} 0)'$ and we have $ n^{-1} c' \mathds{1}' y= n^{-1} \sum_i \left(y_{2i}-y_{1i}\right) $. Likewise, if one chooses $c=(-\frac{1}{2}\hspace{2mm} \frac{1}{2} \hspace{2mm} -\frac{1}{2} \hspace{2mm} \frac{1}{2} )'$ then $n^{-1} c' \mathds{1}' y = n^{-1} \sum_i \frac{1}{2} \left(y_{2i}-y_{1i} + y_{4i}-y_{3i} \right)$. Sensible contrasts such as these meet the conditions $\sum_{j=1}^{k} c_j=0$ and $\sum_{j=1}^{k} | c_j | =2$, though this would not be strictly necessary, mathematically speaking. Next define an $n \times n$ diagonal matrix that has all $n$ assignment indicators for treatment arm 1 on the diagonal, \begin{align*} \mathbf{R}_1 :=& \left[ \begin{matrix} R_{11} \\ & R_{12} \\ & & \ddots \\& & & R_{1i} \\ & & & & \ddots& \\ & & & & & R_{1n} \end{matrix}\right], \hspace{2mm} \end{align*} and define $\mathbf{R}_2$, $\mathbf{R}_3$, $\hdots$, $\mathbf{R}_k$ analogously. Arange these matrices to create the diagonal $kn \times kn$ matrix \begin{align*} \mathbf{R} :=& \left[ \begin{matrix} \mathbf{R}_{1} \\ & \mathbf{R}_{2} \\ & & \ddots \\& & & \mathbf{R}_{k} \end{matrix}\right] \hspace{2mm} \end{align*} and note the a $kn\times kn$ diagonal matrix of assignment probabilities can be written as $\boldsymbol{\pi}:=\text{\textnormal{E}}[\mathbf{R}]$, with the first $n$ diagonal elements representing probabilities of assignment to arm 1, then the next $n$ diagonal elements are probabilities of assignment to arm 2 and so on. In this alternative notation the researcher can be said to observe the assignment, $\mathbf{R}$, the observed vector of outcomes, $\mathbf{R} y$, and also a matrix of $l$ pre-treatment covariates, $\mathbf{x}$, which has size $n \times l$. In a randomized experiment $\boldsymbol{\pi}$ is also observed (known) in many cases. When intractable analytically, however, it might be estimated to arbitrary precision by repeating the original randomization until a target level of precision is achieved. For covariate adjusted estimators, it will also be convenient to define the $kn \times (k+l) $ matrix, \begin{align*} \mathbb{x} := & \left[ \begin{matrix} 1_{\scriptscriptstyle n} & & & & \mathbf{x} \\ & 1_{\scriptscriptstyle n} & & & \mathbf{x} \\ & & \ddots & & \vdots \\ & & & 1_{\scriptscriptstyle n} & \mathbf{x} \end{matrix} \right]. \end{align*} \begin{remark} For some cases, such adjusting for covariates separately by arm, it might be useful to define $\mathbb{x}$ with $\mathbf{x}$ matrices arranged along a block-diagonal. In that case, it is prudent to stipulate that $\mathbf{x}$ have columns that sum to zero to avoid problems of coefficient interpretation \citep[cf.][]{lin, middleton18}. This will be discussed further in paper 3 of 4. \end{remark} \section{The class of WLS estimators}\label{section.estimators} This paper will discuss the class of estimators that can be characterized as weighted least squares (WLS), which includes the difference-of-means, OLS and Hajek estimators as special cases. For the purposes of giving asymptotic variance expressions for this class, the Horvitz-Thompson estimator is also introduced. Paper 3 of 4 will introduce a wider class of estimators that will include these as special cases, and specifically examine their properties as point estimators. This paper is primarily concerned with a new approach to variance bound estimation, irrespective of what the estimator \textit{estimates}. As in Paper 1 of 4, \textit{linear estimators} are defined as having the form, \begin{align}\label{linear.est} \widehat{\delta}_c := & c' \mathbf{W} \mathbf{R} y, \end{align} where $\mathbf{W}$ a matrix with $kn$ columns and $k$ rows if it is an unadjusted esimator and $k+l$ rows if it is a covariate adjusted estimator. The length of the contrast vector, $c$, is equal to the number of rows in $\mathbf{W}$. The first $k$ entries of $c$ are the contrast values, followed by $l$ zeros in the case of a covariate adjusted estimator. \begin{definition}[Horvitz-Thompson estimator] The Horvitz-Thompson estimator written as in equation (\ref{linear.est}) with, \begin{align*} \mathbf{W} &= \mathbf{w}^{\scriptscriptstyle{\textnormal{HT}}} :=\left(\mathds{1}'\mathds{1}\right)^{-1} \mathds{1}'\bpi^{-1} . \end{align*} \end{definition} \begin{definition}[WLS estimators] WLS estimators can be written as in equation (\ref{linear.est}) with, \begin{align*} \mathbf{W} &= \mathbf{W}^{\scriptscriptstyle{\textnormal{WLS}}} := \left(\mathbb{x}' \mathbf{m} \mathbf{R} \mathbb{x} \right)^{-1}\mathbb{x}' \mathbf{m} \end{align*} where the $kn \times kn$ matrix $\mathbf{m}$ must have nonegative entries on the diagonal (with some strictly positive) and zeros elsewhere. Also, define \begin{align*} \mathbf{w}^{{\scriptscriptstyle{\textnormal{WLS}}}} := & \left. \mathbf{W}^{{\scriptscriptstyle{\textnormal{WLS}}}} \right|_{\mathbf{R}=\boldsymbol{\pi}} \\ = & \left(\mathbb{x}' \mathbf{m} \boldsymbol{\pi} \mathbb{x} \right)^{-1}\mathbb{x}' \mathbf{m}, \end{align*} which is $\mathbf{W}^{{\scriptscriptstyle{\textnormal{WLS}}}}$ with $\boldsymbol{\pi}=\text{\textnormal{E}}\left[\mathbf{R}\right]$ replacing $\mathbf{R}$. \end{definition} \begin{remark} WLS gives OLS as a special case when $\mathbf{m}=\mathbf{i}_{kn}$ ($\mathbf{i}_{kn}$ is the identity matrix). If $\mathbf{m}=\mathbf{i}_{kn}$ and, in addition, $\mathbb{x}=\mathds{1}$ (there are no covariates), WLS is equivalent to the difference-of-means. If $\mathbf{m}=\bpi^{-1}$ and $\mathbb{x}=\mathds{1}$, then it is the Hajek estimator. The covariate adjusted WLS with $\mathbf{m}=\bpi^{-1}$ will be discussed further in paper 3 of 4, because it is algebraically equivalent to the generalized regression estimator introduced there. \end{remark} \begin{theorem}\label{theorem.Taylor.is.HT} For a suitably chosen constant, $a$, and vector of constants, $z_c$, the first-order Taylor approximation for a WLS can be written as, \begin{align*} \widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}} ({\scriptscriptstyle{\textnormal{WLS}}})}_c = & \hspace{1mm} a + n\ones{(k+l)}' \mathbf{w}^{{\scriptscriptstyle{\textnormal{HT}}}} \mathbf{R} z_c, \end{align*} with \begin{align*} z_c := \boldsymbol{\pi} \diag{u} {\mathbf{w}^{\scriptscriptstyle{\textnormal{WLS}}}}' c , \end{align*} and where \begin{align*} u := y- \mathbb{x} b^{\scriptscriptstyle{\textnormal{WLS}}} \end{align*} is the ``true" residual and \begin{align*} b^{\scriptscriptstyle{\textnormal{WLS}}} := \mathbf{w}^{{\scriptscriptstyle{\textnormal{WLS}}}} \boldsymbol{\pi} y \end{align*} is the ``true" WLS coefficient. \end{theorem} \begin{remark} By ``true" it is meant to suggest that these are nonrandom quantities that, for large enough samples, represent approximately the centers of the distributions of observed residuals and WLS coefficient, respectively. \end{remark} \begin{remark} While the vectors $z_c$, $u$ and $b^{\scriptscriptstyle{\textnormal{WLS}}}$ are not directly observable, the result is useful because it shows that the first-order Taylor approximation of a linear estimator is a Horvitz-Thompson estimator with contrast vector $c=n \ones{(k+l)}$ and ``outcome" vector $z_c$. Expressing its variance will provide a basis for an asymptotically valid approximation. The constant $a$ is unimportant for the purposes of variance expressions, and so its explicit form is not given. \end{remark} \begin{corollary}[The Oblo\v{z}en\`{e} Chleb\`{i}\v{z}ky Principle]\label{corollary.z.insideout} In Theorem \ref{theorem.Taylor.is.HT} we could have also given an equivalent expression for, $z_c$, as, \begin{align*} z_c^{equiv} := & \boldsymbol{\pi} \hspace{1mm} \diag{ c' \mathbf{w}^{\scriptscriptstyle{\textnormal{WLS}}} } u \\ =& z_c. \end{align*} \end{corollary} \begin{remark} Corollary \ref{corollary.z.insideout} gives the key insight in the development of the Oblo\v{z}en\`{e} Chleb\`{i}\v{z}ky variance estimators. Residuals need not be in the center of the sandwich. \end{remark} \section{Variance bounds and their estimation}\label{section.var} As in Paper 1 of 4, define $\ones{kn}$ as a $kn$-length vector of ones and the $kn \times kn$ ``design matrix" as, \begin{align}\label{dmat} \mathbf{d}:=\text{\textnormal{V}} \left( \ones{kn}' \bpi^{-1} \mathbf{R} \right). \end{align} This is a variance-covariance matrix of weighted treatment assignments. An exact expression for first-order Taylor approximations of linear estimators can be written as, \begin{align} \label{var.general} \text{\textnormal{V}}\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}} ({\scriptscriptstyle{\textnormal{WLS}}})}_c \right) = z'_c \mathbf{d} z_c. \end{align} \begin{definition}[Bounding Matrix]\label{def.varbound} Let $y$ be an outcome vector and let the contrast vector be $c=n \ones{k}$. Then the associated Horvitz-Thompson estimator is $n \ones{k} \mathbf{w}^{{\scriptscriptstyle{\textnormal{HT}}}}\mathbf{R} y$ with variance $y'\mathbf{d} y$. Then, the arbitrary $kn \times kn$ matrix, $\tilde{\mathbf{d}}$, is a ``bounding matrix" if, for all $y\in\mathds{R}^{kn}$, $y'\mathbf{d} y \leq y'\tilde{\mathbf{d}}y$. \end{definition} \begin{remark} For more on bounding matrices, see Paper 1 of 4. Unless otherwise noted, the Generalized Neyman Bounding matrix, $\tilde{\mathbf{d}}=\tilde{\mathbf{d}}^{{\scriptscriptstyle{\textnormal{N}}}}$, will be assumed. \end{remark} Now, define the $2n \times 2n$ matrix of probabilities and joint probabilities of assignment, \begin{align {\mathbf{p}} := \text{\textnormal{E}} \left[\mathbf{R} 1_{\scriptscriptstyle 2n} 1'_{\scriptscriptstyle 2n} \mathbf{R} \right] \nonumber. \end{align} Next define an inverse probability weighted version of bounding matrix, $\tilde{ \mathbf{d} }$, as \begin{align} \tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}} := \tilde{ \mathbf{d} } / \mathbf{p} \end{align} with $/$ denoting element-wise division defined such that division by zero equals zero. Hypothetically, if the observed outcome vector was $\mathbf{R} z_c$, then the Horvitz-Thompson estimator with $c=n \ones{k}$ has variance $z_c' \tilde{ \mathbf{d} }z_c$, which could be estimated unbiasedly by \begin{align}\label{var_lin_est} \widehat{\tilde{\text{\textnormal{V}}}}\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{HT}}} }_{n1_k} \right) := z_c' \mathbf{R} \tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}} \mathbf{R} z_c. \end{align} Of course, the vector $z_c$ is defined by quantities which are not directly observed. However, we might identify random quantities that approximate $z_c$ and $u$ as \begin{align*} Z_c := & \boldsymbol{\pi} \diag{U} {\mathbf{W}^{\scriptscriptstyle{\textnormal{WLS}}}}' c \\ = & \boldsymbol{\pi} \diag{c'{\mathbf{W}^{\scriptscriptstyle{\textnormal{WLS}}}} } U \end{align*} and \begin{align*} U := & y- \mathbb{x} \mathbf{W}^{\scriptscriptstyle{\textnormal{WLS}}} \mathbf{R} y, \end{align*} respectively. \begin{definition}[The Generalized Sandwich Variance Estimator] The Generalized Sandwich Variance Estimator is, \begin{align}\label{var_sand_est} \widehat{\tilde{\text{\textnormal{V}}}}{}^{{\scriptscriptstyle{\textnormal{GS}}}}\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}}) }_c \right) := & Z_c'\mathbf{R} \tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}} \mathbf{R} Z_c \\=& c' \mathbf{W}^{\scriptscriptstyle{\textnormal{WLS}}} \hspace{1mm} \diag{\mathbf{R} U} \left(\boldsymbol{\pi} \tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}} \boldsymbol{\pi} \right) \diag{\mathbf{R} U} {\mathbf{W}^{\scriptscriptstyle{\textnormal{WLS}}}}' c \nonumber \\ = & y' \bigg \{ \mathbf{M} \hspace{1mm} \diag{c' \mathbf{W}^{\scriptscriptstyle{\textnormal{WLS}}}}\left(\boldsymbol{\pi} \tilde{ \dmat }_{\hspace{-.6mm}{}{/}}{}_{\scriptscriptstyle \hspace{-.6mm}\mathbf{p}} \boldsymbol{\pi} \right) \hspace{1mm} \diag{c' \mathbf{W}^{\scriptscriptstyle{\textnormal{WLS}}}} \mathbf{M} \bigg \} y \nonumber \\ = & y' \mathbf{O}_{\scriptscriptstyle (0)} y \nonumber \end{align} where $\mathbf{M} :=(\mathbf{R}- \mathbf{R} \mathbb{x} \mathbf{W}^{\scriptscriptstyle{\textnormal{WLS}}} \mathbf{R} )$ is a ``residual maker" matrix and $\mathbf{O}_{\scriptscriptstyle (0)} $ denotes the random matrix in curly brackets in the line just above with the subscript $(0)$ differentiating $\mathbf{O}_{\scriptscriptstyle (0)}$ from $\mathbf{O}_{\scriptscriptstyle (1)}$ and $\mathbf{O}_{\scriptscriptstyle (2)}$, introduced below. \end{definition} The third line uses the Oblo\v{z}en\`{e} Chleb\`{i}\v{z}ky principle from Corollary \ref{corollary.z.insideout} and the equality $\mathbf{R} U=\mathbf{M} y$. \begin{remark} The generalized sandwich is equivalent to Eicker-Huber-White variance estimator under Bernoulli designs and $\mathbf{m}=\mathbf{i}_{kn}$. Likewise it is algebraically equivalent to ``cluster robust" standard errors (CR0) under Bernoulli assignment of clusters and $\mathbf{m}=\mathbf{i}_{kn}$ (see Paper 1 of 4 for more details). Refinements for degrees-of-freedom and leverage are easily accommodated, and simulations will compare sandwiches HC0, HC1, and HC2 to the parallel OC estimators. \end{remark} \section{Oblo\v{z}en\`{e} Chleb\`{i}\v{z}ky variance bound estimators} The last line of equation (\ref{var_sand_est}) has used the Oblo\v{z}en\`{e} Chleb\`{i}\v{z}ky principle from Corrolary \ref{corollary.z.insideout} to rearrange terms in the generalized sandwich. Written like this, it is easy to see that the expectation of the generalized sandwich is, \begin{align} \label{var_gs_exp} \text{\textnormal{E}} \left[ \widehat{\tilde{\text{\textnormal{V}}}}{}^{{\scriptscriptstyle{\textnormal{GS}}}}\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}}) }_c \right) \right] = & y' \text{\textnormal{E}}\left[\mathbf{O}_{\scriptscriptstyle (0)} \right] y \nonumber \\ = & y' \mathbf{o}_{\scriptscriptstyle (0)} y \end{align} with $\mathbf{o}_{\scriptscriptstyle (0)}:=\text{\textnormal{E}} \left[ \mathbf{O}_{\scriptscriptstyle (0)} \right]$. The matrix $\mathbf{o}_{\scriptscriptstyle (0)}$ can be computed for small samples. For larger samples, it may be simulated to arbitrary precision by drawing from the randomization distribution. \subsection{OC0: A ``baseline'' variance estimator that is not invariant} \begin{definition}[OC0] Next, an estimator with the same expected value as the Generalized Sandwich in Equation \textnormal{(\ref{var_sand_est})}, is the OC0 estimator, \begin{align*} \widehat{\tilde{\text{\textnormal{V}}}}^{{\scriptscriptstyle{\textnormal{OC}}} 0}\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}}) }_c\right) :=& y'\mathbf{R} \mathbf{o}_{\scriptscriptstyle (0)\hspace{-.6mm}{}{/ \scriptscriptstyle \matp}}{} \mathbf{R} y, \end{align*} with $\mathbf{o}_{\scriptscriptstyle (0)\hspace{-.6mm}{}{/ \scriptscriptstyle \matp}} := \mathbf{o}_{\scriptscriptstyle (0)} / \mathbf{p}$ where, as above, ``$/$" is element-wise division with division by zero resolving to zero. \end{definition} The key insight with respect to OC0 is that it is an unbiased estimator of the expected value of the Generalized Sandwich, i.e., \begin{align*} \text{\textnormal{E}} \left[\widehat{\tilde{\text{\textnormal{V}}}}^{{\scriptscriptstyle{\textnormal{OC}}} 0}\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}}) }_c\right)\right] =& \text{\textnormal{E}} \left[ \widehat{\tilde{\text{\textnormal{V}}}}{}^{{\scriptscriptstyle{\textnormal{GS}}}}\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}}) }_c \right) \right], \end{align*} because $\text{\textnormal{E}} \left[\mathbf{R} \mathbf{o}_{\scriptscriptstyle (0)\hspace{-.6mm}{}{/ \scriptscriptstyle \matp}} \mathbf{R} \right]= \mathbf{o}_{\scriptscriptstyle (0)}$. OC0 is a Horvitz-Thompson estimator, and therefore lacks invariance to location shifts in the outcome variable. Likewise, its variance may depend on the scaling of $y$ and so it may also be less precise than covariate-adjusted alternatives. In the next sections, refinements that are invariant are considered. \subsection{OC1: Covariate-adjustment achieves invariance, but introduces bias} To improve the precision of OC0, consider the covariate adjusted alternative, \begin{align}\label{OC1} \widehat{\tilde{\text{\textnormal{V}}}}^{{\scriptscriptstyle{\textnormal{OC}}} \scriptscriptstyle 1 }\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}}) }_c\right) : =& y' \big \{ \mathbf{M} \mathbf{o}_{\scriptscriptstyle (0)\hspace{-.6mm}{}{/ \scriptscriptstyle \matp}} \mathbf{M} \big \} y \\ =& y' \mathbf{O}_{\scriptscriptstyle (1)} y \end{align} with $\mathbf{M} :=(\mathbf{R}- \mathbf{R} \mathbb{x} \mathbf{W}^{\scriptscriptstyle{\textnormal{WLS}}} \mathbf{R} )$, as above, the residual maker for WLS. Due to the covariate adjustment, OC1 may be more precise than OC0, and OC1 is also invariant to location shifts in $y$. It is, nonetheless, biased for the mean of the Generalized Sandwich. In the next section, a bias correction is considered. \subsection{OC2: An unbiased and invariant OC variance estimator} Next the bias of OC1 relative to the expected value of the Generalized Sandwich variance, \begin{align}\label{bias0} \mathbf{Bias}^{\left({\scriptscriptstyle{\textnormal{GS}}}\right)} \left[\widehat{\tilde{\text{\textnormal{V}}}}^{{\scriptscriptstyle{\textnormal{OC}}} \scriptscriptstyle 1 } \left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}}) }_c\right)\right] =& \text{\textnormal{E}} \left[ \widehat{\tilde{\text{\textnormal{V}}}}^{{\scriptscriptstyle{\textnormal{OC}}} \scriptscriptstyle 1 }\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}}) }_c\right) - \widehat{\tilde{\text{\textnormal{V}}}}^{{\scriptscriptstyle{\textnormal{GS}}} }\left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}}) }_c\right) \right] \nonumber \\=& y' \bigg \{ \text{\textnormal{E}} \left[ \mathbf{M} \mathbf{o}_{\scriptscriptstyle (0)\hspace{-.6mm}{}{/ \scriptscriptstyle \matp}} \mathbf{M} - \mathbf{R} \mathbf{o}_{\scriptscriptstyle (0)\hspace{-.6mm}{}{/ \scriptscriptstyle \matp}} \mathbf{R} \right] \bigg \} y . \end{align} Next, define the degree 4, $kn \times kn \times kn \times kn$ tensor, \begin{align*} \mathfrak{B}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd} := \left( \mathbf{M}^{ab} \cdot \mathbf{M}^{cd} - \mathbf{R}^{ab} \cdot \mathbf{R}^{cd} \right) \circ \big( {\mathbf{p}^{ad}} \cdot {\mathbf{p}^{bc}} \big)^{\circ \tiny{-}\frac{1}{2}}, \end{align*} with $a, b, c$ and $d$ giving labels for dimensions, $\cdot$ represents the tensor multiplication using Einstein's convention of inner product for dimensions with identical labels and outer product otherwise, $\circ$ is element-wise (Hadamard) multiplication and $(.)^{\circ \tiny{-}\frac{1}{2}}$ is element wise exponentiation by $-\frac{1}{2}$, with division by zero resolving to zero. With this tensor notation, the bias in Equation (\ref{bias0}) can be written, \begin{align*} \mathbf{Bias}^{\left({\scriptscriptstyle{\textnormal{GS}}}\right)} \left[\widehat{\tilde{\text{\textnormal{V}}}}^{{\scriptscriptstyle{\textnormal{OC}}} \scriptscriptstyle 0. {\scriptscriptstyle{\textnormal{B}}} } \left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}}) }_c\right)\right] =& y' \bigg \{ \left( \text{\textnormal{E}} \left[ \mathfrak{B}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd} \right] \circ \left({\mathbf{p}^{ad} \cdot \mathbf{p}^{bc}}\right)^{\circ \frac{1}{2}} \right) \hspace{1mm}\cdot \hspace{1mm} \mathbf{o}_{\scriptscriptstyle (0)\hspace{-.6mm}{}{/ \scriptscriptstyle \matp}}^{bc} \bigg \} y \\ =& y' \bigg \{ \left( \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd} \circ \left({\mathbf{p}^{ad} \cdot \mathbf{p}^{bc}}\right)^{\circ \frac{1}{2}} \right) \hspace{1mm}\cdot \hspace{1mm} \mathbf{o}_{\scriptscriptstyle (0)\hspace{-.6mm}{}{/ \scriptscriptstyle \matp}}^{bc} \bigg \} y \end{align*} with $\mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd}:= \text{\textnormal{E}} \left[ \mathfrak{B}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd} \right]$, which can be estimated to arbitrary precision using repeated randomizations. Next taking the tensor SVD we can decompose as follows, \begin{align*} \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd} =& - \mathfrak{u}^{ade} \cdot \lambda^e \cdot {\mathfrak{u}^{bce}} \\ =& - \mathfrak{u}^{ade}_{\scriptscriptstyle (0<\lambda<1)} \cdot \lambda^e_{\scriptscriptstyle (0<\lambda<1)} \cdot \mathfrak{u}^{bce}_{\scriptscriptstyle (0<\lambda<1)} \hspace{2mm} - \mathfrak{u}^{ade}_{\scriptscriptstyle (\lambda \geq 1)} \cdot \lambda^e_{\scriptscriptstyle (\lambda \geq 1)} \cdot \mathfrak{u}^{bce}_{\scriptscriptstyle (\lambda \geq 1)} \\ = & \hspace{2mm}\mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd}_{\scriptscriptstyle (0<\lambda<1)} \hspace{2mm} + \hspace{2mm} \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd}_{\scriptscriptstyle (\lambda \geq 1)}, \end{align*} with $\lambda^e$ representing a length $k^2 n^2$ vector (tensor of degree 1) of singular values and $\mathfrak{u}^{ade}$ as a $kn \times kn \times k^2n^2$ tensor. In the second line, the tensor is decomposed into two terms. The first term, with subscripts $\left(0<\lambda <1\right)$, is the tensor constructed from the slices of $\mathfrak{u}$ corresponding to singular values greater than 0 but less than 1. The second term, with subscripts $\left(\lambda \geq 1\right)$, is constructed from the slices of $\mathfrak{u}$ corresponding to singular values greater than or equal to 1. Note that the orthogonality property, such that the tensor product ${\mathfrak{u}^{ade}} \cdot \mathfrak{u}^{adf}$ results in the identity matrix, $\mathbf{i}^{ef}$. \begin{conjecture} The singular values, $\lambda^e$, are bounded by zero and one, i.e., $0 \leq \lambda^e \leq 1$. \end{conjecture} \begin{lemma} The infinite tensor series \begin{align*} {\mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd}_{(\infty)}} \hspace{2mm} := & \hspace{2mm} \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd}_{\scriptscriptstyle (0<\lambda<1)} \hspace{2mm}- \hspace{2mm} \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{aefd}_{\scriptscriptstyle (0<\lambda<1)}\cdot \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{ebcf}_{\scriptscriptstyle (0<\lambda<1)} \hspace{2mm}+ \hspace{2mm} \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{aefd}_{\scriptscriptstyle (0<\lambda<1)}\cdot \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{eghf}_{\scriptscriptstyle (0<\lambda<1)} \cdot \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{gbch}_{\scriptscriptstyle (0<\lambda<1)} \hspace{2mm} \\ & \hspace{4mm} - \hspace{2mm} \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{aefd}_{\scriptscriptstyle (0<\lambda<1)}\cdot \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{eghf}_{\scriptscriptstyle (0<\lambda<1)} \cdot \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{gijh}_{\scriptscriptstyle (0<\lambda<1)} \cdot \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{ibcj}_{\scriptscriptstyle (0<\lambda<1)} \hspace{2mm}+ \hspace{2mm} \dots \end{align*} has closed form, \begin{align*} {\mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd}_{ (\infty)}} = - \mathfrak{u}^{ade}_{\scriptscriptstyle (0<\lambda<1)} \cdot \phi ^e_{\scriptscriptstyle (0<\lambda<1)} \cdot \mathfrak{u}^{bce}_{\scriptscriptstyle (0<\lambda<1)} \hspace{2mm} \end{align*} where $\phi ^e_{\scriptscriptstyle (0<\lambda<1)} := \lambda^e_{\scriptscriptstyle (0<\lambda<1)} / (\ones{} - \lambda^e_{\scriptscriptstyle (0<\lambda<1)})$ with $/$ representing element-wise division. \end{lemma} \begin{theorem} An unbiased estimator of the bias of OC1 as an estimator of the mean of the Generalized Sandwich is, \begin{align}\label{bias.est} \widehat{\mathbf{Bias}}^{\left({\scriptscriptstyle{\textnormal{GS}}}\right)} \left[\widehat{\tilde{\text{\textnormal{V}}}}^{{\scriptscriptstyle{\textnormal{OC}}} \scriptscriptstyle 1 } \left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}}) }_c\right)\right] :=& y' \mathbf{M} \bigg \{ \left( \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd}_{(\infty)} \circ \left({\mathbf{p}^{ad}}^{\circ -\frac{1}{2}} \cdot {\mathbf{p}^{bc}}^{\circ \frac{1}{2}} \right) \right) \hspace{1mm}\cdot \hspace{1mm} \mathbf{o}_{\scriptscriptstyle (0)\hspace{-.6mm}{}{/ \scriptscriptstyle \matp}}^{bc} \bigg \} \mathbf{M} y \\ & + y' \mathbf{R} \bigg \{ \left( \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd}_{(\lambda \geq 1)} \circ \left({\mathbf{p}^{ad}}^{\circ -\frac{1}{2}} \cdot {\mathbf{p}^{bc}}^{\circ \frac{1}{2}} \right) \right) \hspace{1mm}\cdot \hspace{1mm} \mathbf{o}_{\scriptscriptstyle (0)\hspace{-.6mm}{}{/ \scriptscriptstyle \matp}}^{bc} \bigg \}\mathbf{R} y ,\nonumber \end{align} where $\mathbf{M}$ is the residual-maker, as above. \end{theorem} \begin{conjecture}\label{conjecture.zeroInvariantTerm} The second term in Equation \textnormal{(\ref{bias.est})} is zero for all randomizations. Hence, \begin{align*}\label{bias.est.oneterm} \widehat{\mathbf{Bias}}^{\left({\scriptscriptstyle{\textnormal{GS}}}\right)} \left[\widehat{\tilde{\text{\textnormal{V}}}}^{{\scriptscriptstyle{\textnormal{OC}}} \scriptscriptstyle 1 } \left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}}) }_c\right)\right] =& y' \mathbf{M} \bigg \{ \left( \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd}_{(\infty)} \circ \left({\mathbf{p}^{ad}}^{\circ -\frac{1}{2}} \cdot {\mathbf{p}^{bc}}^{\circ \frac{1}{2}} \right) \right) \hspace{1mm}\cdot \hspace{1mm} \mathbf{o}_{\scriptscriptstyle (0)\hspace{-.6mm}{}{/ \scriptscriptstyle \matp}}^{bc} \bigg \} \mathbf{M} y \end{align*} is an unbiased estimator of the bias \textnormal{OC1} relative to the Generalized Sandwich. \end{conjecture} \begin{definition}[OC2] The OC2 variance estimator is, \begin{align*} \widehat{\tilde{\text{\textnormal{V}}}}^{{\scriptscriptstyle{\textnormal{OC}}} \scriptscriptstyle 2} \left(\widehat{\delta}^{{\scriptscriptstyle{\textnormal{T}}}({\scriptscriptstyle{\textnormal{WLS}}}) }_c\right) :=& y' \mathbf{M} \mathbf{o}_{\scriptscriptstyle (0)\hspace{-.6mm}{}{/ \scriptscriptstyle \matp}} \mathbf{M} y - y' \mathbf{M} \bigg \{ \left( \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd}_{(\infty)} \circ \left( {\mathbf{p}^{ad}}^{\circ -\frac{1}{2}} \cdot {\mathbf{p}^{bc}}^{\circ \frac{1}{2}} \right) \right) \hspace{1mm}\cdot \hspace{1mm} \mathbf{o}_{\scriptscriptstyle (0)\hspace{-.6mm}{}{/ \scriptscriptstyle \matp}}^{bc} \bigg \}\mathbf{M} y \\ =& y' \Bigg \{ \mathbf{M} \Bigg ( \bigg ( \mathbf{i}_{kn}^{ab} \cdot \mathbf{i}_{kn}^{cd} - \mathfrak{b}} %_{\hspace{-.6mm}{}{/ \scriptscriptstyle \sqrt{\matp}\sqrt{\matp}}}^{abcd}_{(\infty)} \circ \left( {\mathbf{p}^{ad}}^{\circ -\frac{1}{2}} \cdot {\mathbf{p}^{bc}}^{\circ \frac{1}{2}} \right) \bigg ) \hspace{1mm}\cdot \hspace{1mm} \mathbf{o}_{\scriptscriptstyle (0)\hspace{-.6mm}{}{/ \scriptscriptstyle \matp}}^{bc} \Bigg ) \mathbf{M} \Bigg \} y \\ =& y' \mathbf{O}_{\scriptscriptstyle (2)} y \end{align*} \end{definition} \begin{remark} If true, Conjecture \textnormal{(\ref{conjecture.zeroInvariantTerm})} implies that OC2 is unbiased as an estimator of the Generalized Sandwich variance. The presence of the residual-maker matrix, $\mathbf{M}$, means that OC2 is invariant to location shifts in the outcome, $y$. \end{remark} \subsection{Comparing the precision of OC2 and GS} Using tensor notation, the variance of the OC2 variance estimator can be written, \begin{align*} \text{\textnormal{V}}\left(\widehat{\tilde{\text{\textnormal{V}}}}^{{\scriptscriptstyle{\textnormal{OC}}} \scriptscriptstyle 2}\right) =& y^a \cdot y^b \cdot \bigg \{ \text{\textnormal{E}} \left[ \mathbf{O}^{ab}_{\scriptscriptstyle (2)} \cdot \mathbf{O}^{cd}_{\scriptscriptstyle (2)} \right] - \text{\textnormal{E}} \left[ \mathbf{O}^{ab}_{\scriptscriptstyle (2)} \right]\cdot \text{\textnormal{E}} \left[ \mathbf{O}^{cd}_{\scriptscriptstyle (2)} \right] \bigg \} \cdot y^c \cdot y^d. \end{align*} Similarly, the variance of the GS variance estimator can be written, \begin{align*} \text{\textnormal{V}}\left(\widehat{\tilde{\text{\textnormal{V}}}}^{{\scriptscriptstyle{\textnormal{GS}}} \scriptscriptstyle }\right) =& y^a \cdot y^b \cdot \bigg \{ \text{\textnormal{E}} \left[ \mathbf{O}^{ab}_{\scriptscriptstyle (0)} \cdot \mathbf{O}^{cd}_{\scriptscriptstyle (0)} \right] - \text{\textnormal{E}} \left[ \mathbf{O}^{ab}_{\scriptscriptstyle (0)} \right]\cdot \text{\textnormal{E}} \left[ \mathbf{O}^{cd}_{\scriptscriptstyle (0)} \right] \bigg \} \cdot y^c \cdot y^d. \end{align*} So, with Conjecture (\ref{conjecture.zeroInvariantTerm}), we have the difference of variances, \begin{align*} \text{\textnormal{V}}\left(\widehat{\tilde{\text{\textnormal{V}}}}^{{\scriptscriptstyle{\textnormal{GS}}} \scriptscriptstyle }\right)-\text{\textnormal{V}}\left(\widehat{\tilde{\text{\textnormal{V}}}}^{{\scriptscriptstyle{\textnormal{OC}}} \scriptscriptstyle 2}\right) = y^a \cdot y^b \cdot \bigg \{ \text{\textnormal{E}} \left[ \mathbf{O}^{ab}_{\scriptscriptstyle (0)}\cdot \mathbf{O}^{cd}_{\scriptscriptstyle (0)}\right] -\text{\textnormal{E}} \left[\mathbf{O}^{ab}_{\scriptscriptstyle (2)} \cdot \mathbf{O}^{cd}_{\scriptscriptstyle (2sim)} \right] \bigg \} \cdot y^c \cdot y^d. \end{align*} with $\text{\textnormal{E}} \left[ \mathbf{O}^{ab}_{\scriptscriptstyle (0)}\cdot \mathbf{O}^{cd}_{\scriptscriptstyle (0)}\right]$ and $\text{\textnormal{E}} \left[\mathbf{O}^{ab}_{\scriptscriptstyle (2)} \cdot \mathbf{O}^{cd}_{\scriptscriptstyle (2sim)} \right] $ computable in small samples or to arbitrary precision through repeated randomizations. \section{Guaranteed conservative variance estimator}\label{section.GC} From first principles, the exact variance of a linear estimators of the form given in equation (\ref{linear.est}) is, \begin{align*} \text{\textnormal{V}} \left( \widehat{\delta_c} \right) = & \text{\textnormal{E}} \left[ y'\mathbf{R} \mathbf{W}' c c' \mathbf{W} \mathbf{R} y \right]-\text{\textnormal{E}} \left[ y'\mathbf{R} \mathbf{W}' c \right] \text{\textnormal{E}} \left[c' \mathbf{W} \mathbf{R} y \right] \\ = & y' \bigg \{ \text{\textnormal{E}} \left[ \mathbf{R} \mathbf{W}' c c' \mathbf{W} \mathbf{R} \right]-\text{\textnormal{E}} \left[ \mathbf{R} \mathbf{W}' c \right] \text{\textnormal{E}} \left[c' \mathbf{W} \mathbf{R} \right] \bigg \} y \\ = & y' \mathbf{g} y \end{align*} where $\mathbf{g}$ is defined as the matrix inside the curly brackets in the line above. The matrix, $\mathbf{g}$, may be computed exactly for small studies or to arbitrary precision by repeating the randomization until desired precision is achieved. As before, some terms in this quadratic are not observed, and a suitable bound can be found generalizing one of the methods from Paper 1 of 4 (Neyman, Aronow-Samii or Middleton). Algorithm 4.7 from Paper 1 of 4 will be slightly modified and applied to the simulations below. With Conjecture \section{Data from Paluck and Green (2009) } \cite{paluckgreen} pair-randomized 14 villages (7 pairs) in post-genocide Rwanda to receive one of two possible radio programs. Half of the villages were exposed to a program aimed at ``discouraging blind obedience and reliance on direction from authorities and promoting independent thought and collective action in problem solving" (treatment). The other half were exposed to a radio program about health (control). The analysis of the properties of the OC and GS variance estimators are compared in the spirit of (permutation/rerandomization-based) simulation. The analysis is simulation in the sense that it makes untestable assumptions about the outcomes that would have been observed under alternative assignments (e.g., the values of missing potential outcomes). The appeal of using real data, rather than generating data from a contrived DGP, however, is that it may provide a more realistic data set and the analysis can reflect the design actually used. \subsection{Randomization method} The original paired-cluster design was simulated and the estimator is OLS as in the original paper. With 7 pairs this results in $2^7=128$ possible randomizations. \subsection{Data} Analysis used the same 497 cases analyzed in model 1 of Table 4 in \cite{paluckgreen}. Number of units by village pair and assignment arm are given in Table \ref{table.clusterSizes}. The average cluster size was 35.5. The minimum and maximum cluster sizes were 20 and 43, respectively. Five cases had missing values for \textit{age}, which were mean-imputed for this analysis so that the same units to be used in both specifications. By contrast, the original analysis dropped these five cases when \textit{age }was included in the OLS. \begin{table}[ht] \caption{Number of units by village pair and original assignment} \centering \begin{tabular}{rrrrrrrr}\label{table.clusterSizes} & \multicolumn{7}{c}{Village Pair} \\ \cline{2-8} & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline Control & 37 & 39 & 39 & 39 & 33 & 37 & 43 \\ Treatment & 33 & 37 & 36 & 37 & 38 & 20 & 29 \\ \hline \end{tabular} \end{table} \subsection{Outcome measure} The outcome is a post-treatment measure of social distance. The original effect estimates using OLS were presented in Table 4 of \cite{paluckgreen}. The social distance measure was an index created by combining four survey items, each of which could take on integer values of 1,2,3 or 4. The resulting measure, an average of the items, also ranged from 1 to 4, but could take on 13 possible values. Additionally the outcome, y, was location shifted by subtracting the mid-point on the scale, (max($y$)-min($y$))/2, such that the scale ranged from -1.5 to 1.5 rather than 1 to 4. One motivation for this is that non-invariant estimators such as OC$J$ and GC$J$ can, themselves, have high variance when the mean of $y$ is shifted away from zero. Another motivation is that when scale is bounded, and thus max($y$) and min($y$) are known, shifting by the scale midpoint introduces an invariance property. For example, subtracting off the scale midpoint results in the same observed values whether a researcher records the original outcomes on a scale of integers $\{0,1,2,3\}$ or $\{1, 2, 3,4\}$. Another option might be to subtract the observed sample mean from each outcome. However, this leads to a shift that may depend on the randomization, when there are treatment effects, and so the practice can introduce biases. \subsection{Variance estimators compared} The Generalized Neyman bounding matrix, given in section 4.1 of Paper 1 of 4 \citep{middleton20_1of4}, $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{N}}}$, is not applicable in this case because of unobservable cells in main block diagonal of the design matrix, $\mathbf{d}$. Therefore simulations use the bounding matrix, $\tilde{\mathbf{d}}^{\scriptscriptstyle{\textnormal{M}}}$, which is based on Algorithm 4.7 in Paper 1 of 4. It provides a tighter bound than the Aronow-Samii bounding matrix because clusters were pair-randomized, a result that is similar to the one given for pair-randomization of units in the example provided in section 4.4 of that paper. The variance estimators are based upon the Generalized Sandwich (GS) given in equation (\ref{var_sand_est}) in Section \ref{section.var}, the Oblo\v{z}en\`{e} Chleb\`{i}\v{z}ky-based, given in Section \ref{subsection.OCJ} ($J=10$), and the Guaranteed Conservative, given in Section \ref{section.GC} ($J=10$). \subsection{Covariate specifications} The OC and GS variance estimators were examined with and without covariates. The ``no covariates" OLS included only intercepts, so that $\mathbb{x}=\mathds{1}$. This is equivalently the difference-of-means. The second specification included the additional covariates in column 3 of Table 4 in the original: \textit{displaced by violence}, \textit{sex}, \textit{age}, and \textit{radio lisening habits}. For both of these specifications, classic Cluster Robust (CR) variance estimators also included fixed-effects for cluster-pairs as in columns 2 and 3 of Table 4 of \cite{paluckgreen}. The typical motivation for including the fixed effects for blocks/pairs is to obtain standard errors that reflect this design feature. These are unnecessary in the case of OC and GC variance estimators because the paired-cluster design is already accounted for in the design matrix, $\mathbf{d}$. \subsection{Simulation assumptions} The assumptions of NCM apply, for example, assuming that potential outcomes are fixed (non-stochastic) and depend only on assignment. Also the sharp null, $y_{0i}=y_{1i}$ for all $i$, is invoked in order to impute missing potential outcomes.\footnote{Simulating under the sharp null seems reasonable for two reasons. First, the estimated average effects (-.029 to -.041, depending on specification) are small relative to the range of the measure (1.0\% to 1.4\%, respectively) and also to its standard deviation (3.6\% to 5.1\%, respectively). Second, and more importantly, simulating under the sharp null (or constant treatment effects more generally) is useful because the variance and its (identified) bound will be equal. The implication is that any \textit{downward} bias of the variance estimator that is attributable to borrowing the variance of the first-order approximation, and/or to using a ``plug-in'' estimator thereof, will be evident in simulation. By contrast, downward bias can be masked (i.e., offset) under heterogeneous effects because the \textit{bound} will tend to be conservative in that case. So, simulating under the sharp null gives a ``worst-case" assessment of anti-conservative bias.} The simulation also proceeds as if the survey response is not stochastic and whether a unit participates in the survey is not dependent on treatment assignments.\footnote{Simulating as if survey response is non-stochastic and not affected by treatment assignments also seems reasonable for two reasons. First, an assumption about the independence of assignment and response would also be required for consistency in the original analysis given by \cite{paluckgreen}. Second, similar to the case of the sharp null, if survey response was independent of assignment but {stochastic}, then variance estimators would be conservativeness relative to the assumption of response being non-random. Again, with this assumption, simulation results give a ``worst-case" assessment of anti-conservative bias. } \subsection{Simulation results} Tables \ref{table.OLSwCov} and \ref{table.OLSnoCov} give simulation results for OLS with and without covariates, respectively, using the data originally reported in \cite{paluckgreen}. Comparing rMSE of variance estimators: Comparisons: \begin{itemize} \item Generalized Sandwich is less biased and has a smaller SE[$\widehat{\tilde{ \text{\textnormal{V}}}}]$ compared to the classical Cluster Robust variance estimators \item OC estimators have smaller SE[$\widehat{\tilde{ \text{\textnormal{V}}}}]$ compared to GS, while having he same expected value as GS by construction \item Only GC$J$ is unbiased for the variance of the OLS coefficient. It has slightly higher SE[$\widehat{\tilde{ \text{\textnormal{V}}}}]$ than the GS, though the rMSE is lower because GS is biased. \end{itemize} \setlength{\extrarowheight}{6pt} \begin{table}[ht] \caption{Comparing Variance Estimators for OLS, No Covariates} \centering \scriptsize \addtolength{\tabcolsep}{-2pt} \begin{tabular}{rcHcHcHcccccccccccc} \cline{3-8} \cline{10-10} \cline{12-14} \cline{16-18} & & \multicolumn{6}{c}{Classical Cluster Robust} & & \makecell[c]{ Gen. \\ Sandwich } & & \multicolumn{3}{c}{\makecell[c]{Oblo\v{z}en\`{e} Chleb\`{i}\v{z}ky}} & & \multicolumn{3}{c}{\makecell[c]{Guaranteed Conservative}} \\ \cline{3-8} \cline{10-10} \cline{12-14} \cline{16-18} & & CR0 & CR0 & CR1 & CR1 & CR2 & CR2 & & GS0 & & OC1 & OC$J$.B & OC$J$ & & GC0.B & GC$J$.B & GC$J$ \\ \hline $\text{\textnormal{E}} [ \widehat{\tilde{\text{\textnormal{V}}}} / \text{\textnormal{V}} ] $ & & 0.802 & 0.429 & 0.864 & 0.462 & 0.932 & 0.818 & & 0.842 & & 0.841 & 0.842 & 0.842 & & 0.858 & 0.860 & 1.000 \\ $\textnormal{SE}[\widehat{\tilde{\text{\textnormal{V}}}}/ \text{\textnormal{V}} ]$ & & 0.121 & 0.097 & 0.130 & 0.104 & 0.144 & 0.167 & & 0.144 & & 0.123 & 0.123 & 0.123 & & 0.128 & 0.129 & 0.132 \\ $\textnormal{Bias}[\widehat{\tilde{\text{\textnormal{V}}}} / \text{\textnormal{V}} ] $ & & -0.198 & -0.571 & -0.136 & -0.538 & -0.068 & -0.182 & & -0.158 & & -0.159 & -0.158 & -0.158 & & -0.142 & -0.140 & 0.000 \\ $\textnormal{rMSE}[\widehat{\tilde{\text{\textnormal{V}}}} / \text{\textnormal{V}} ]$ & & 0.232 & 0.579 & 0.188 & 0.548 & 0.160 & 0.247 & & 0.214 & & 0.201 & 0.200 & 0.200 & & 0.191 & 0.190 & 0.132 \\ $\textnormal{CV}[\widehat{\tilde{\text{\textnormal{V}}}} ]$ & & 0.150 & 0.225 & 0.150 & 0.225 & 0.155 & 0.204 & & 0.171 & & 0.146 & 0.147 & 0.146 & & 0.149 & 0.150 & 0.132 \\ \hline \makecell[l]{rMSE ratio:} \\ vs. GS0 & & 1.086 & 2.712 & 0.882 & 2.566 & 0.747 & 1.155 & & 1.000 & & & & & & & & \\ vs. OC$J$ & & 1.158 & 2.892 & 0.941 & 2.737 & 0.797 & 1.232 & & 1.066 & & 1.005 & 1.000 & 1.000 & & & & \\ vs. GC$J$ & & 1.759 & 4.392 & 1.428 & 4.156 & 1.210 & 1.870 & & 1.619 & & 1.526 & 1.519 & 1.519 & & 1.451 & 1.442 & 1.000 \\ \hline \makecell[l]{$\textnormal{CV}$ ratio:} \\ vs. GS0 & & 0.880 & 1.317 & 0.880 & 1.317 & 0.906 & 1.191 & & 1.000 & & & & & & & & \\ vs. OC$J$ & & 1.027 & 1.537 & 1.027 & 1.537 & 1.057 & 1.389 & & 1.167 & & 0.999 & 1.000 & 1.000 & & & & \\ vs. GC$J$ & & 1.141 & 1.707 & 1.141 & 1.707 & 1.174 & 1.543 & & 1.296 & & 1.110 & 1.111 & 1.111 & & 1.132 & 1.134 & 1.000 \\ \hline \end{tabular}\label{table.OLSnoCov} \end{table} \setlength{\extrarowheight}{6pt} \begin{table}[ht] \caption{Comparing Variance Estimators for OLS, With Covariates} \centering \scriptsize \addtolength{\tabcolsep}{-2pt} \begin{tabular}{rcHcHcHcccccccccccc} \cline{3-8} \cline{10-10} \cline{12-14} \cline{16-18} & & \multicolumn{6}{c}{Classic Cluster Robust} & & \makecell[c]{ Gen. \\ Sandwich } & & \multicolumn{3}{c}{\makecell[c]{Oblo\v{z}en\`{e} Chleb\`{i}\v{z}ky}} & & \multicolumn{3}{c}{\makecell[c]{Guaranteed Conservative}} \\ \cline{3-8} \cline{10-10} \cline{12-14} \cline{16-18} & & CR0 & CR0 & CR1 & CR1 & CR2 & CR2 & & GS0 & & OC1 & OC$J$.B & OC$J$ & & GC0.B & GC$J$.B & GC$J$ \\ \hline $\text{\textnormal{E}} [ \widehat{\tilde{\text{\textnormal{V}}}} / \text{\textnormal{V}} ] $ & & 0.795 & 0.431 & 0.856 & 0.464 & 0.941 & 0.819 & & 0.802 & & 0.797 & 0.802 & 0.802 & & 0.853 & 0.861 & 1.000 \\ $\textnormal{SE}[\widehat{\tilde{\text{\textnormal{V}}}}/ \text{\textnormal{V}} ]$ & & 0.130 & 0.113 & 0.140 & 0.121 & 0.157 & 0.187 & & 0.131 & & 0.094 & 0.095 & 0.095 & & 0.118 & 0.121 & 0.125 \\ $\textnormal{Bias}[\widehat{\tilde{\text{\textnormal{V}}}} / \text{\textnormal{V}} ] $ & & -0.205 & -0.569 & -0.144 & -0.536 & -0.059 & -0.181 & & -0.198 & & -0.203 & -0.198 & -0.198 & & -0.147 & -0.139 & 0.000 \\ $\textnormal{rMSE}[\widehat{\tilde{\text{\textnormal{V}}}} / \text{\textnormal{V}} ]$ & & 0.243 & 0.580 & 0.201 & 0.550 & 0.168 & 0.260 & & 0.237 & & 0.224 & 0.220 & 0.220 & & 0.189 & 0.184 & 0.125 \\ $\textnormal{CV}[\widehat{\tilde{\text{\textnormal{V}}}} ]$ & & 0.164 & 0.261 & 0.164 & 0.261 & 0.167 & 0.228 & & 0.163 & & 0.118 & 0.119 & 0.118 & & 0.138 & 0.140 & 0.125 \\ \hline \makecell[l]{rMSE ratio:} \\ vs. GS0 & & 1.024 & 2.447 & 0.847 & 2.318 & 0.708 & 1.095 & & 1.000 & & & & & & & & \\ vs. OC$J$ & & 1.104 & 2.640 & 0.914 & 2.500 & 0.764 & 1.181 & & 1.079 & & 1.019 & 1.000 & 1.000 & & & & \\ vs. GC$J$ & & 1.940 & 4.638 & 1.605 & 4.393 & 1.342 & 2.075 & & 1.895 & & 1.790 & 1.758 & 1.757 & & 1.506 & 1.472 & 1.000 \\ \hline \makecell[l]{$\textnormal{CV}$ ratio:} \\ vs. GS0 & & 1.007 & 1.606 & 1.007 & 1.606 & 1.027 & 1.400 & & 1.000 & & & & & & & & \\ vs. OC$J$ & & 1.384 & 2.207 & 1.384 & 2.207 & 1.412 & 1.923 & & 1.374 & & 0.998 & 1.003 & 1.000 & & & & \\ vs. GC$J$ & & 1.310 & 2.089 & 1.310 & 2.089 & 1.336 & 1.820 & & 1.300 & & 0.944 & 0.949 & 0.946 & & 1.106 & 1.121 & 1.000 \\ \hline \end{tabular}\label{table.OLSwCov} \end{table} \pagebreak \pagebreak
\section{Introduction} In 1974, L. Welch proved the following milestone result which revolutioned the study of finite set of vectors in finite dimensional Hilbert spaces. \begin{theorem}\cite{WELCH}\label{WELCHTHEOREM} (\textbf{Welch bounds}) Let $n\geq d$. If $\{\tau_j\}_{j=1}^n$ is any collection of unit vectors in $\mathbb{C}^d$, then \begin{align*} \sum_{j=1}^n\sum_{k=1}^n|\langle \tau_j, \tau_k\rangle |^{2m}\geq \frac{n^2}{{d+m-1\choose m}}, \quad \forall m \in \mathbb{N}. \end{align*} In particular, \begin{align*} \sum_{j=1}^n\sum_{k=1}^n|\langle \tau_j, \tau_k\rangle |^{2}\geq \frac{n^2}{{d}}. \end{align*} Further, \begin{align}\label{FIRST123} \text{(\textbf{Higher order Welch bounds})} \quad \max _{1\leq j,k \leq n, j\neq k}|\langle \tau_j, \tau_k\rangle |^{2m}\geq \frac{1}{n-1}\left[\frac{n}{{d+m-1\choose m}}-1\right], \quad \forall m \in \mathbb{N}. \end{align} In particular, \begin{align*} \text{(\textbf{First order Welch bound})}\quad \max _{1\leq j,k \leq n, j\neq k}|\langle \tau_j, \tau_k\rangle |^{2}\geq\frac{n-d}{d(n-1)}. \end{align*} \end{theorem} A very powerful application of Welch bounds is the lower bound on root-mean-square (RMS) absolute cross relation of unit vectors $\{\tau_j\}_{j=1}^n$ which is defined as \begin{align*} I_{\text{RMS}} (\{\tau_j\}_{j=1}^n)\coloneqq \left(\frac{1}{n(n-1)}\sum _{1\leq j,k \leq n, j\neq k}|\langle \tau_j, \tau_k\rangle |^{2}\right)^\frac{1}{2}. \end{align*} Theorem \ref{WELCHTHEOREM} says that \begin{align*} I_{\text{RMS}} (\{\tau_j\}_{j=1}^n) \geq \left(\frac{n-d}{d(n-1)}\right)^\frac{1}{2}. \end{align*} Another powerful application of Theorem \ref{WELCHTHEOREM} is the lower bound for frame potential which is introduced by Benedetto and Fickus \cite{BENEDETTOFICKUS} and further studied in \cite{CASAZZAFICKUSOTHERS, BODMANNHAASPOTENTIAL}. Let us recall that given a collection of unit vectors $\{\tau_j\}_{j=1}^n$, the frame potential is defined as \begin{align*} FP(\{\tau_j\}_{j=1}^n)\coloneqq \sum_{j=1}^n\sum_{k=1}^n|\langle \tau_j, \tau_k\rangle |^{2}. \end{align*} Theorem \ref{WELCHTHEOREM} directly tells \begin{align*} FP(\{\tau_j\}_{j=1}^n)\geq \frac{n^2}{{d}}. \end{align*} There are several practical applications of Theorem \ref{WELCHTHEOREM} such as correlations \cite{SARWATE}, codebooks \cite{DINGFENG}, numerical search algorithms \cite{XIA, XIACORRECTION}, quantum measurements \cite{SCOTTTIGHT}, coding and communications \cite{TROPPDHILLON, STROHMERHEATH}, code division multiple access (CDMA) systems \cite{CHEBIRA1, CHEBIRA2}, wireless systems \cite{YATES}, compressed sensing \cite{TAN}, `game of Sloanes' \cite{JASPERKINGMIXON}, equiangular tight frames \cite{SUSTIKTROPP}, etc. \\ A decade ago, a continuous version of Theorem \ref{WELCHTHEOREM} appeared in the paper \cite{DATTAHOWARD} which states as follows. \begin{theorem}\cite{DATTAHOWARD}\label{DATTATHEOREM} Let $\mathbb{C} \mathbb{P}^{n-1}$ be the complex projective space and $\mu$ be a normalized measure on $\mathbb{C} \mathbb{P}^{n-1}$. If $\{\tau_\alpha\}_{\alpha \in \mathbb{C} \mathbb{P}^{n-1}}$ is a continuous frame for a $d$-dimensional subspace $\mathcal{H}$ of a Hilbert space $\mathcal{H}_0$, then \begin{align*} \int_{\mathbb{C} \mathbb{P}^{n-1}}\int_{\mathbb{C} \mathbb{P}^{n-1}}|\langle \tau_\alpha, \tau_\beta\rangle|^{2m}\, d \mu(\alpha)\, d \mu(\beta)\geq \frac{1}{{d+m-1\choose m}}, \quad \forall m \in \mathbb{N}. \end{align*} \end{theorem} Drawback of Theorem \ref{DATTATHEOREM} is that it works only for the measures defined on complex projective spaces. Further, we need a generalization of Inequality (\ref{FIRST123}) for measure spaces. Therefore it is desirable to improve Theorem \ref{DATTATHEOREM}.and to get a continuous version of Inequality (\ref{FIRST123}) by replacing maximum by supremum. For the sake of completeness, we note that there are some further refinements of Theorem \ref{WELCHTHEOREM}, see \cite{CHRISTENSENDATTAKIM, DATTAWELCHLMA, WALDRONSH}.\\ The goal of this article is to derive Theorem \ref{WELCHTHEOREM} for arbitrary measure spaces (Theorem \ref{CONTINUOUSWELCHMAIN}). We give some applications of Theorem \ref{CONTINUOUSWELCHMAIN}. We also ask some problems for further research. \section{Continuous Welch bounds} Our proof of the result stated in the abstract is using the theory of continuous frames. This is generalization of frames indexed by discrete sets to measurable sets. Continuous frames are introduced independently by Ali, Antoine and Gazeau \cite{ALIANTOINEGAZEAU} and Kaiser \cite{KAISER}. In the paper, $\mathbb{K}$ denotes $\mathbb{C}$ or $\mathbb{R}$ and $\mathcal{H}$ denotes a finite dimensional Hilbert space. \begin{definition}\cite{ALIANTOINEGAZEAU, KAISER} Let $(\Omega, \mu)$ be a measure space. A collection $\{\tau_\alpha\}_{\alpha\in \Omega}$ in a Hilbert space $\mathcal{H}$ is said to be a \textbf{continuous frame} (or generalized frame) for $\mathcal{H}$ if the following holds. \begin{enumerate}[\upshape(i)] \item For each $h \in \mathcal{H}$, the map $\Omega \ni \alpha \mapsto \langle h, \tau_\alpha \rangle \in \mathbb{K}$ is measurable. \item There are $a,b>0$ such that \begin{align*} a\|h\|^2\leq \int_{\Omega}|\langle h, \tau_\alpha \rangle|^2\,d\mu(\alpha)\leq b \|h\|^2, \quad \forall h \in \mathcal{H}. \end{align*} \end{enumerate} If $a=b$, then the frame is called as a tight frame and if $\|\tau_\alpha\|=1$, $\forall \alpha \in \Omega$, then we say that the frame is normalized. If $a=b=1$, then the frame is called as a Parseval frame. If we do not demand the first inequality in (ii), then we say it is a \textbf{continuous Bessel family} for $\mathcal{H}$. \end{definition} We first observe that there is an abundance of continuous frames for finite dimensional Hilbert spaces. Further, it is known that given any finite mesure space $(\Omega, \mu)$ and a finite dimensional space $\mathcal{H}$, there exists a continuous frame $\{\tau_\alpha\}_{\alpha\in \Omega}$ for $\mathcal{H}$ \cite{RAHIMIDARABYDARVISHI}. Given a continuous Bessel family, the analysis operator \begin{align*} \theta_\tau:\mathcal{H} \ni h \mapsto \theta_\tau h \in \mathcal{L}^2(\Omega); \quad \theta_\tau h:\Omega \ni \alpha \mapsto \langle h, \tau_\alpha \rangle \in \mathbb{K} \end{align*} is a well-defined bounded linear operator. Its adjoint, the synthesis operator is given by \begin{align*} \theta_\tau^*:\mathcal{L}^2(\Omega)\ni f \mapsto \int_{\Omega}f (\alpha)\tau_\alpha \,d\mu(\alpha)\in \mathcal{H}. \end{align*} By combining analysis and synthesis operators, we get the frame operator, defined as \begin{align*} S_\tau\coloneqq \theta_\tau^* \theta_\tau:\mathcal{H} \ni h \mapsto\int_{\Omega}\langle h, \tau_\alpha \rangle \tau_\alpha \,d\mu(\alpha)\in \mathcal{H}. \end{align*} Note that the integrals are weak integrals (Pettis integrals \cite{TALAGRAND}). Following result captures the trace of frame operator using Bessel family. \begin{theorem}\label{TRACEFORMULA} Let $\{\tau_\alpha\}_{\alpha\in \Omega}$ be a continuous Bessel family for $\mathcal{H}$. Then \begin{align*} & \text{Tra}(S_\tau)=\int_\Omega \| \tau_\alpha\|^2\, d \mu(\alpha),\\ & \text{Tra}(S_\tau^2)=\int_\Omega\int_\Omega |\langle \tau_\alpha, \tau_\beta\rangle|^2\, d \mu(\alpha)\, d \mu(\beta). \end{align*} \end{theorem} \begin{proof} Let $\{\omega_j\}_{j=1}^d$ be an orthonormal basis for $\mathcal{H}$, where $d$ is the dimension of $\mathcal{H}$. Then \begin{align*} \text{Tra}(S_\tau)&=\sum_{j=1}^d\langle S_\tau\omega_j, \omega_j \rangle=\sum_{j=1}^d\left \langle \int_\Omega \langle \omega_j, \tau_\alpha \rangle \tau_\alpha\, d \mu(\alpha), \omega_j\right \rangle \\ &=\sum_{j=1}^d\int_\Omega \langle \omega_j, \tau_\alpha \rangle\langle \tau_\alpha,\omega_j \rangle\, d \mu(\alpha)=\int_\Omega\left\langle \sum_{j=1}^d\langle \tau_\alpha,\omega_j \rangle\omega_j, \tau_\alpha \right\rangle \, d \mu(\alpha)\\ &=\int_\Omega \| \tau_\alpha\|^2\, d \mu(\alpha). \end{align*} Further, \begin{align*} \text{Tra}(S_\tau^2)&=\sum_{j=1}^d\langle S_\tau^2\omega_j, \omega_j \rangle=\sum_{j=1}^d\langle S_\tau\omega_j, S_\tau\omega_j \rangle=\sum_{j=1}^d\left \langle \int_\Omega \langle \omega_j, \tau_\alpha \rangle \tau_\alpha\, d \mu(\alpha), S_\tau\omega_j\right \rangle \\ &=\sum_{j=1}^d\int_\Omega \langle \omega_j, \tau_\alpha \rangle\langle \tau_\alpha,S_\tau\omega_j \rangle\, d \mu(\alpha)=\int_\Omega\left\langle \sum_{j=1}^d\langle \tau_\alpha,S_\tau\omega_j \rangle\omega_j, \tau_\alpha \right\rangle \, d \mu(\alpha)\\ &=\int_\Omega\left\langle \sum_{j=1}^d\langle S_\tau^*\tau_\alpha,\omega_j \rangle\omega_j, \tau_\alpha \right\rangle \, d \mu(\alpha)=\int_\Omega \langle S_\tau^*\tau_\alpha, \tau_\alpha\rangle \, d \mu(\alpha)\\ &=\int_\Omega \langle S_\tau\tau_\alpha, \tau_\alpha\rangle \, d \mu(\alpha)=\int_\Omega\left\langle \int_\Omega\left\langle \tau_\alpha,\tau_\beta\right\rangle \tau_\beta\, d \mu(\beta),\tau_\alpha\right\rangle \, d \mu(\alpha)\\ &=\int_\Omega\int_\Omega |\langle \tau_\alpha, \tau_\beta\rangle|^2\, d \mu(\alpha)\, d \mu(\beta). \end{align*} \end{proof} Note that a finite spanning set is a frame for finite dimensional Hilbert space \cite{HANKORNELSONLARSON}. Thus it is not required to assume any condition on set of vectors in the discrete case to derive Theorem \ref{TRACEFORMULA}. However, we need to assume the Besselness for continuous family of vectors to assure the existence of frame operator. With Theorem \ref{TRACEFORMULA} we derive continuous Welch bounds. First we need a lemma. \begin{lemma}\label{LEMMAFINITE} If $\{\tau_\alpha\}_{\alpha\in \Omega}$ is a normalized continuous Bessel family for $\mathcal{H}$ with bound $b$, then $\mu(\Omega)\leq b \operatorname{dim}(\mathcal{H})$. In particular, $\mu(\Omega)<\infty$. \end{lemma} \begin{proof} Let $\operatorname{dim}(\mathcal{H})=d$ and $\{\omega_j\}_{j=1}^{d}$ be an orthonormal basis for $\mathcal{H}$. Then \begin{align*} \mu(\Omega)&= \int_\Omega \| \tau_\alpha\|^2\, d \mu(\alpha)= \int_\Omega \sum_{j=1}^{d}|\langle x_\alpha, \omega_j \rangle|^2\, d \mu(\alpha)=\sum_{j=1}^{d}\int_\Omega|\langle x_\alpha, \omega_j \rangle|^2\, d \mu(\alpha)\\ &=\sum_{j=1}^{d}\int_\Omega|\langle \omega_j, x_\alpha \rangle|^2\, d \mu(\alpha)\leq \sum_{j=1}^{d}b\|\omega_j\|^2=bd. \end{align*} \end{proof} \begin{theorem}\label{FIRSTORDERCONTINUOUS} Let $(\Omega, \mu)$ be a measure space and $\{\tau_\alpha\}_{\alpha\in \Omega}$ be a normalized continuous Bessel family for $\mathcal{H}$ of dimension $d$. If the diagonal $\Delta\coloneqq \{(\alpha, \alpha):\alpha \in \Omega\}$ is measurable in the measure space $\Omega\times \Omega$, then \begin{align}\label{1} \int_{\Omega\times\Omega}|\langle \tau_\alpha, \tau_\beta\rangle|^2\, d(\mu\times\mu)(\alpha,\beta)=\int_{\Omega}\int_{\Omega}|\langle \tau_\alpha, \tau_\beta\rangle|^{2}\, d \mu(\alpha)\, d \mu(\beta)\geq \frac{\mu(\Omega)^2}{d}. \end{align} Equality holds in Inequality (\ref{1}) if and only if $\{\tau_\alpha\}_{\alpha\in \Omega}$ is a tight continuous frame. Further, we have the \textbf{first order continuous Welch bound} \begin{align*} \sup _{\alpha, \beta \in \Omega, \alpha\neq \beta}|\langle \tau_\alpha, \tau_\beta\rangle |^{2}\geq \frac{1}{(\mu\times\mu)((\Omega\times\Omega)\setminus\Delta)}\left[\frac{\mu(\Omega)^2}{d}-(\mu\times\mu)(\Delta)\right]. \end{align*} \end{theorem} \begin{proof} Let $\lambda_1, \dots, \lambda_d$ be eigenvalues of the frame operator $ S_{\tau}$. Then $\lambda_1, \dots, \lambda_d\geq0$. Now using the diagonalizability of $ S_{\tau}$, Cauchy-Schwarz inequality and Theorem \ref{TRACEFORMULA} we get \begin{align*} \mu(\Omega)^2&=\left(\int_\Omega \| \tau_\alpha\|^2\, d \mu(\alpha)\right)^2= (\operatorname{Tra}(S_{\tau}))^2=\left(\sum_{k=1}^d \lambda_k\right)^2\leq d \sum_{k=1}^d \lambda_k^2\\ &=d\operatorname{Tra}(S^2_{\tau})=d\int_\Omega\int_\Omega |\langle \tau_\alpha, \tau_\beta\rangle|^2\, d \mu(\alpha)\, d \mu(\beta). \end{align*} Equality holds if and only if we have equality in Cauchy-Schwarz inequality if and only if the frame is tight. Since the measure is finite (Lemma \ref{LEMMAFINITE}), using Fubini's theorem, \begin{align*} \frac{ \mu(\Omega)^2}{d}&=\int_\Omega\int_\Omega |\langle \tau_\alpha, \tau_\beta\rangle|^2\, d \mu(\alpha)\, d \mu(\beta)=\int_{\Omega\times\Omega}|\langle \tau_\alpha, \tau_\beta\rangle|^2\, d(\mu\times\mu)(\alpha,\beta)\\ &=\int_{\Delta}|\langle \tau_\alpha, \tau_\beta\rangle|^2\, d(\mu\times\mu)(\alpha,\beta)+\int_{(\Omega\times\Omega)\setminus\Delta}|\langle \tau_\alpha, \tau_\beta\rangle|^2\, d(\mu\times\mu)(\alpha,\beta)\\ &=\int_{\Delta}|\langle \tau_\alpha, \tau_\alpha\rangle|^2\, d(\mu\times\mu)(\alpha,\beta)+\int_{(\Omega\times\Omega)\setminus\Delta}|\langle \tau_\alpha, \tau_\beta\rangle|^2\, d(\mu\times\mu)(\alpha,\beta)\\ &=(\mu\times\mu)(\Delta)+\int_{(\Omega\times\Omega)\setminus\Delta}|\langle \tau_\alpha, \tau_\beta\rangle|^2\, d(\mu\times\mu)(\alpha,\beta)\\ &\leq(\mu\times\mu)(\Delta)+\sup _{\alpha, \beta \in \Omega, \alpha\neq \beta}|\langle \tau_\alpha, \tau_\beta\rangle |^{2}(\mu\times\mu)((\Omega\times\Omega)\setminus\Delta). \end{align*} which gives the required inequality after rearrangement. \end{proof} Under the stronger assumption that $\{\tau_\alpha\}_{\alpha\in \Omega}$ is a continuous frame for $\mathcal{H}$, Inequality (\ref{1}) appears in Chapter 16 of \cite{WALDONBOOK}. We now illustrate Theorem \ref{FIRSTORDERCONTINUOUS} using the following example. \begin{example} Let $\Omega\coloneqq [0,2\pi]$ and $\mu$ be the Lebesgue measure on $\Omega$. Define \begin{align*} \tau_\alpha \coloneqq (\cos \alpha, \sin \alpha ), \quad \forall \alpha \in \Omega. \end{align*} Then \begin{align*} \int_\Omega |\langle (x,y), \tau_\alpha \rangle |^2\, d\alpha&=\int_{0} ^{2\pi} |\langle (x,y), (\cos \alpha, \sin \alpha ) \rangle |^2\, d\alpha=\int_{0} ^{2\pi} (x\cos \alpha+ y \sin \alpha )^2\, d\alpha\\ &=\int_{0} ^{2\pi} (x^2\cos^2 \alpha+ y^2 \sin^2 \alpha +2 xy \sin \alpha \cos \alpha )\, d\alpha\\ &=\pi (x^2+y^2)= \pi \left\| (x,y) \right\|^2, \quad \forall (x,y) \in \mathbb{R}^2. \end{align*} Therefore $\{\tau_\alpha\}_{\alpha \in \Omega}$ is a normalized continuous frame for $\mathbb{R}^2$ \cite{WALDONBOOK}. Next we verify inequalities in Theorem \ref{FIRSTORDERCONTINUOUS}: \begin{align*} & \int_{\Omega}\int_{\Omega}|\langle \tau_\alpha, \tau_\beta\rangle|^{2}\, d \mu(\alpha)\, d \mu(\beta)=\int_{0} ^{2\pi}\int_{0} ^{2\pi}|\langle (\cos \alpha, \sin \alpha ), (\cos \beta, \sin \beta) \rangle |^2\, d\alpha\, d\beta\\ &=\int_{0} ^{2\pi}\int_{0} ^{2\pi} (\cos \alpha \cos \beta+\sin \alpha \sin \beta)^2\, d\alpha\, d\beta\\ &=\left(\int_{0} ^{2\pi}\cos^2 \alpha\, d\alpha\right)\left(\int_{0} ^{2\pi}\cos^2 \beta\, d\beta \right)+2 \left(\int_{0} ^{2\pi}\cos \alpha \sin \alpha \, d\alpha \right)\left(\int_{0} ^{2\pi}\cos\beta \sin \beta\, d\beta \right)+\\ &\quad \left(\int_{0} ^{2\pi}\sin^2 \alpha\, d\alpha\right)\left(\int_{0} ^{2\pi}\sin^2 \beta\, d\beta \right)\\ &=2\pi^2=\frac{(2\pi)^2}{2}=\frac{\mu(\Omega)^2}{d} \end{align*} and \begin{align*} \sup _{\alpha, \beta \in \Omega, \alpha\neq \beta}|\langle \tau_\alpha, \tau_\beta\rangle |^{2}&= \sup _{\alpha, \beta \in [0,2\pi], \alpha\neq \beta}|\langle (\cos \alpha, \sin \alpha ), (\cos \beta, \sin \beta) \rangle |^2\\ &= \sup _{\alpha, \beta \in [0,2\pi], \alpha\neq \beta}|\cos \alpha \cos \beta+\sin \alpha \sin \beta|^2\\ &=\sup _{\alpha, \beta \in [0,2\pi], \alpha\neq \beta}|\cos^2(\alpha-\beta)|=1>\frac{1}{4\pi^2}\left[\frac{4\pi^2}{2}-0\right]\\ &=\frac{1}{(\mu\times\mu)((\Omega\times\Omega)\setminus\Delta)}\left[\frac{\mu(\Omega)^2}{d}-(\mu\times\mu)(\Delta)\right]. \end{align*} \end{example} Our next goal is to derive higher order continuous Welch bounds. We are going to use the following result. \begin{theorem}\cite{COMON, BOCCI}\label{SYMMETRICTENSORDIMENSION} If $\mathcal{V}$ is a vector space of dimension $d$ and $\text{Sym}^m(\mathcal{V})$ denotes the vector space of symmetric m-tensors, then \begin{align*} \text{dim}(\text{Sym}^m(\mathcal{V}))={d+m-1 \choose m}, \quad \forall m \in \mathbb{N}. \end{align*} \end{theorem} \begin{theorem}\label{CONTINUOUSWELCHMAIN} Let $(\Omega, \mu)$ be a measure space and $\{\tau_\alpha\}_{\alpha\in \Omega}$ be a normalized continuous Bessel family for $\mathcal{H}$ of dimension $d$. If the diagonal $\Delta\coloneqq \{(\alpha, \alpha):\alpha \in \Omega\}$ is measurable in the measure space $\Omega\times \Omega$, then \begin{align}\label{WELCHCONTINUOUS1} \int_{\Omega\times\Omega}|\langle \tau_\alpha, \tau_\beta\rangle|^{2m}\, d(\mu\times\mu)(\alpha,\beta)= \int_{\Omega}\int_{\Omega}|\langle \tau_\alpha, \tau_\beta\rangle|^{2m}\, d \mu(\alpha)\, d \mu(\beta)\geq \frac{\mu(\Omega)^2}{{d+m-1\choose m}}, \quad \forall m \in \mathbb{N}. \end{align} Equality holds in Inequality (\ref{WELCHCONTINUOUS1}) if and only if $\{\tau_\alpha\}_{\alpha\in \Omega}$ is a tight continuous frame. Further, we have the \textbf{higher order continuous Welch bounds} \begin{align}\label{WELCHCONTINUOUS2} \sup _{\alpha, \beta \in \Omega, \alpha\neq \beta}|\langle \tau_\alpha, \tau_\beta\rangle |^{2m}\geq \frac{1}{(\mu\times\mu)((\Omega\times\Omega)\setminus\Delta)} \left[\frac{ \mu(\Omega)^2}{{d+m-1 \choose m}}-(\mu\times\mu)(\Delta)\right], \quad \forall m \in \mathbb{N}. \end{align} \end{theorem} \begin{proof} First note that $\{\tau_\alpha\}_{\alpha\in \Omega}$ is a normalized continuous Bessel family for the Hilbert space $\text{Sym}^m(\mathcal{H})$. We execute the proof of Theorem \ref{FIRSTORDERCONTINUOUS} for the space $\text{Sym}^m(\mathcal{H})$. Let $\lambda_1, \dots, \lambda_{\text{dim}(\text{Sym}^m(\mathcal{H}))}$ be eigenvalues of $S_{\tau}$. Then using Theorem \ref{SYMMETRICTENSORDIMENSION} we get \begin{align*} \mu(\Omega)^2&=\left(\int_\Omega \| \tau_\alpha\|^{2m}\, d \mu(\alpha)\right)^2=\left(\int_\Omega \| \tau_\alpha^{\otimes m}\|^2\, d \mu(\alpha)\right)^2= (\operatorname{Tra}(S_{\tau}))^2\\ &=\left(\sum_{k=1}^{\text{dim}(\text{Sym}^m(\mathcal{H}))} \lambda_k\right)^2\leq \text{dim}(\text{Sym}^m(\mathcal{H})) \sum_{k=1}^{\text{dim}(\text{Sym}^m(\mathcal{H}))} \lambda_k^2\\ &={d+m-1 \choose m}\operatorname{Tra}(S^2_{\tau})={d+m-1 \choose m}\int_\Omega\int_\Omega |\langle \tau_\alpha^{\otimes m}, \tau_\beta^{\otimes m}\rangle|^2\, d \mu(\alpha)\, d \mu(\beta)\\ &={d+m-1 \choose m}\int_\Omega\int_\Omega |\langle \tau_\alpha, \tau_\beta\rangle|^{2m}\, d \mu(\alpha)\, d \mu(\beta) \end{align*} and hence \begin{align*} \frac{ \mu(\Omega)^2}{{d+m-1 \choose m}}&=\int_\Omega\int_\Omega |\langle \tau_\alpha, \tau_\beta\rangle|^{2m}\, d \mu(\alpha)\, d \mu(\beta)=\int_{\Omega\times\Omega}|\langle \tau_\alpha, \tau_\beta\rangle|^{2m}\, d(\mu\times\mu)(\alpha,\beta)\\ &=\int_{\Delta}|\langle \tau_\alpha, \tau_\alpha\rangle|^{2m}\, d(\mu\times\mu)(\alpha,\beta)+\int_{(\Omega\times\Omega)\setminus\Delta}|\langle \tau_\alpha, \tau_\beta\rangle|^{2m}\, d(\mu\times\mu)(\alpha,\beta)\\ &=(\mu\times\mu)(\Delta)+\int_{(\Omega\times\Omega)\setminus\Delta}|\langle \tau_\alpha, \tau_\beta\rangle|^{2m}\, d(\mu\times\mu)(\alpha,\beta)\\ &\leq(\mu\times\mu)(\Delta)+\sup _{\alpha, \beta \in \Omega, \alpha\neq \beta}|\langle \tau_\alpha, \tau_\beta\rangle |^{2m}(\mu\times\mu)((\Omega\times\Omega)\setminus\Delta) \end{align*} which gives Inequality (\ref{WELCHCONTINUOUS2}). \end{proof} \begin{corollary} Theorem \ref{WELCHTHEOREM} is a corollary of Theorem \ref{CONTINUOUSWELCHMAIN}. \end{corollary} \begin{proof} Take $\Omega=\{1,\dots,n\} $ and $\mu$ as the counting measure. \end{proof} \begin{corollary} Theorem \ref{DATTATHEOREM} is a corollary of Theorem \ref{CONTINUOUSWELCHMAIN}. \end{corollary} \begin{proof} Take $\Omega=\mathbb{C} \mathbb{P}^{n-1}$ and $\mu$ as the normalized measure on $\mathbb{C} \mathbb{P}^{n-1}$. \end{proof} We observe that given a measure space $\Omega$, the diagonal $\Delta$ need not be measurable (see \cite{DRAVECKY}). This is the reason behind the measurability of diagonal in Theorem \ref{CONTINUOUSWELCHMAIN}. Further, we see that the measurability of the diagonal $\Delta$ was used only in deriving Inequality (\ref{WELCHCONTINUOUS2}) and not in Inequality (\ref{WELCHCONTINUOUS1}). \\ In \cite{WALDRON2003}, Waldron generalized Welch bounds to vectors which need not be normalized. In the following result we state such a result for continuous Bessel family whose proof is similar to the proof of Theorem \ref{CONTINUOUSWELCHMAIN}. \begin{theorem}\label{CONTINUOUSWELCHMAINSECOND} Let $(\Omega, \mu)$ be a $\sigma$-finite measure space and $\{\tau_\alpha\}_{\alpha\in \Omega}$ be a continuous Bessel family for $\mathcal{H}$ of dimension $d$. If the diagonal $\Delta\coloneqq \{(\alpha, \alpha):\alpha \in \Omega\}$ is measurable in the measure space $\Omega\times \Omega$, then \begin{align}\label{WELCHCONTINUOUS3} \int_{\Omega\times\Omega}|\langle \tau_\alpha, \tau_\beta\rangle|^{2m}\, d(\mu\times\mu)(\alpha,\beta)= \int_{\Omega}\int_{\Omega}|\langle \tau_\alpha, \tau_\beta\rangle|^{2m}\, d \mu(\alpha)\, d \mu(\beta)\geq \frac{1}{{d+m-1\choose m}}\left(\int_\Omega \| \tau_\alpha\|^{2m}\, d \mu(\alpha)\right)^2, \quad \forall m \in \mathbb{N}. \end{align} Equality in Inequality (\ref{WELCHCONTINUOUS3}) holds if and only if $\{\tau_\alpha\}_{\alpha\in \Omega}$ is a tight continuous frame. Further, we have the \textbf{generalized higher order continuous Welch bounds} \begin{align}\label{WELCHCONTINUOUS4} \sup _{\alpha, \beta \in \Omega, \alpha\neq \beta}|\langle \tau_\alpha, \tau_\beta\rangle |^{2m}\geq \frac{1}{(\mu\times\mu)((\Omega\times\Omega)\setminus\Delta)} \left[\frac{1}{{d+m-1 \choose m}}\left(\int_\Omega \| \tau_\alpha\|^{2m}\, d \mu(\alpha)\right)^2-\int_{\Delta}\| \tau_\alpha\|^{4m}\, d(\mu\times\mu)(\alpha,\beta)\right], \end{align} for all $m \in \mathbb{N}.$ \end{theorem} Note that we imposed $\sigma$-finiteness of measure in Theorem \ref{CONTINUOUSWELCHMAINSECOND} to use Fubini's theorem whereas we derived in Lemma \ref{LEMMAFINITE} that measure is finite for normalized continuous Bessel family. Also note that Theorem \ref{CONTINUOUSWELCHMAINSECOND} remains valid as long as Fubini's theorem is valid (for instance, it is valid for complete measure spaces). Since Fubini's theorem is not valid for arbitrary measure spaces, we are finally left with the following problem. \begin{question} \textbf{Classify measure spaces $(\Omega, \mu) $ such that Theorem \ref{CONTINUOUSWELCHMAINSECOND} holds?} In other words, \textbf{given a measure space $(\Omega, \mu) $, does the validity of Inequality (\ref{WELCHCONTINUOUS3}) or Inequality (\ref{WELCHCONTINUOUS4}) implies conditions on meausre space $(\Omega, \mu) $, say $\sigma$-finite?} \end{question} In a recent work, Christensen, Datta and Kim derived Welch bounds for dual frames \cite{CHRISTENSENDATTAKIM}. We now extend this result to continuous frames. For this we recall the notion of dual frame. A continuous frame $\{\omega_\alpha\}_{\alpha\in \Omega}$ for $\mathcal{H}$ is said to be a dual for a continuous frame $\{\tau_\alpha\}_{\alpha\in \Omega}$ for $\mathcal{H}$ if $\theta_\omega^*\theta_\tau=I_\mathcal{H}$ or $\theta_\tau^*\theta_\omega=I_\mathcal{H}$, the identity operator on $\mathcal{H}$. In terms of weak integrals, this is same as \begin{align*} \int_{\Omega}\langle h, \tau _\alpha \rangle \omega_\alpha \, d \mu (\alpha)=h, ~ \forall h \in \mathcal{H} \quad \text{ or } \quad \int_{\Omega}\langle h, \omega _\alpha \rangle \tau_\alpha \, d \mu (\alpha)=h, ~ \forall h \in \mathcal{H}. \end{align*} We now see that the frame $\{S_\tau^{-1}\tau_\alpha\}_{\alpha\in \Omega}$ is always a dual to a frame $\{\tau_\alpha\}_{\alpha\in \Omega}$ for $\mathcal{H}$. Further, if $\{\omega_\alpha\}_{\alpha\in \Omega}$ is any dual for $\{\tau_\alpha\}_{\alpha\in \Omega}$, then \begin{align}\label{BEST} \int_{\Omega}|\langle h, \omega_\alpha\rangle |^2\,d\mu(\alpha)\geq \int_{\Omega}|\langle h, S_\tau^{-1}\tau_\alpha\rangle|^2\,d\mu(\alpha), \quad \forall h \in \mathcal{H}. \end{align} We need two more results before we derive continuous Welch bounds for dual frames. \begin{theorem}\label{TRACETHEOREM} If $\{\tau_\alpha\}_{\alpha\in \Omega}$ is a continuous frame for $\mathcal{H}$, then for any linear operator $T:\mathcal{H}\to \mathcal{H}$, we have \begin{align*} \operatorname{Tra}(T)=\int_{\Omega}\langle TS_\tau^{-\frac{1}{2}}\tau _\alpha, S_\tau^{-\frac{1}{2}}\tau _\alpha\rangle \, d \mu (\alpha). \end{align*} \end{theorem} \begin{proof} First we prove the theorem for Parseval frames. Assume that $\{\tau_\alpha\}_{\alpha\in \Omega}$ is Parseval. Let $\{\omega_j\}_{j=1}^d$ be an orthonormal basis for $\mathcal{H}$, where $d$ is the dimension of $\mathcal{H}$. Then \begin{align*} \operatorname{Tra}(T)&=\sum_{j=1}^d\langle T\omega_j, \omega_j \rangle=\sum_{j=1}^d\left \langle \int_\Omega \langle T\omega_j, \tau_\alpha \rangle \tau_\alpha\, d \mu(\alpha), \omega_j\right \rangle \\ &=\sum_{j=1}^d\int_\Omega \langle T\omega_j, \tau_\alpha \rangle\langle \tau_\alpha,\omega_j \rangle\, d \mu(\alpha)=\int_\Omega\left\langle \sum_{j=1}^d\langle \tau_\alpha,\omega_j \rangle T\omega_j, \tau_\alpha \right\rangle \, d \mu(\alpha)\\ &=\int_\Omega \langle T\tau_\alpha, \tau_\alpha \rangle \, d \mu(\alpha). \end{align*} Now the theorem follows by noting that $\{S_\tau^{-1/2}\tau_\alpha\}_{\alpha\in \Omega}$ is a Parseval frame for $\mathcal{H}$. \end{proof} \begin{theorem}\label{DIMBOUNDED} If $\{\omega_\alpha\}_{\alpha\in \Omega}$ is a dual continuous frame for $\{\tau_\alpha\}_{\alpha\in \Omega}$, then \begin{align*} \int_{\Omega}\int_{\Omega}|\langle \tau_\alpha, \omega_\beta\rangle|^{2}\, d \mu(\alpha)\, d \mu(\beta)\geq \operatorname{dim}(\mathcal{H}). \end{align*} \end{theorem} \begin{proof} Inequality (\ref{BEST}) says that \begin{align*} \int_{\Omega}|\langle \tau_\alpha, \omega_\beta \rangle|^2\,d\mu(\beta)\geq \int_{\Omega}|\langle \tau_\alpha, S_\tau^{-1}\tau_\beta\rangle|^2\,d\mu(\beta), \quad \forall \alpha \in \Omega. \end{align*} Therefore \begin{align*} \int_{\Omega}\int_{\Omega}|\langle \tau_\alpha, \omega_\beta\rangle|^{2}\, d \mu(\beta)\, d \mu(\alpha)\geq \int_{\Omega}\int_{\Omega}|\langle \tau_\alpha, S_\tau^{-1}\tau_\beta\rangle|^2\,d\mu(\beta)\, d \mu(\alpha). \end{align*} Now we simplify the right side and use Theorem \ref{TRACETHEOREM} to get \begin{align*} \int_{\Omega}\int_{\Omega}|\langle \tau_\alpha, S_\tau^{-1}\tau_\beta\rangle|^2\,d\mu(\beta)\, d \mu(\alpha)&=\int_{\Omega}\int_{\Omega}|\langle S_\tau^{-\frac{1}{2}}\tau_\alpha, S_\tau^{-\frac{1}{2}}\tau_\beta\rangle|^2\,d\mu(\beta)\, d \mu(\alpha) \\ &=\int_{\Omega}\|S_\tau^{-\frac{1}{2}}\tau_\alpha\|^2\, d \mu(\alpha)=\int_{\Omega}\langle S_\tau^{-\frac{1}{2}}\tau_\alpha, S_\tau^{-\frac{1}{2}}\tau_\alpha\rangle\, d \mu(\alpha)\\ &=\operatorname{Tra}(I_\mathcal{H})=\operatorname{dim}(\mathcal{H}). \end{align*} \end{proof} \begin{theorem}\label{DUALWELCHCONTINUOUS} Let $\{\tau_\alpha\}_{\alpha\in \Omega}$ be a continuous frame for $\mathcal{H}$ of dimension $d$. Assume that $\{\omega_\alpha\}_{\alpha\in \Omega}$ is a dual continuous frame for $\{\tau_\alpha\}_{\alpha\in \Omega}$ and \begin{align*} \langle \tau_\alpha, \omega_\alpha \rangle = \langle \tau_\beta, \omega_\beta \rangle, \quad \forall \alpha, \beta \in \Omega. \end{align*} If the diagonal $\Delta\coloneqq \{(\alpha, \alpha):\alpha \in \Omega\}$ is measurable in the measure space $\Omega\times \Omega$, then \begin{align*} \sup _{\alpha, \beta \in \Omega, \alpha\neq \beta}|\langle \tau_\alpha, \omega_\beta\rangle |^{2}\geq \frac{d(\mu(\Omega)^2-d(\mu \times \mu)(\Delta)}{\mu(\Omega)^2(\mu\times\mu)((\Omega\times\Omega)\setminus\Delta)}. \end{align*} \end{theorem} \begin{proof} Since $\{\omega_\alpha\}_{\alpha\in \Omega}$ is a dual for $\{\tau_\alpha\}_{\alpha\in \Omega}$ we have $\theta_\omega^*\theta_\tau=I_\mathcal{H}$. Let $\{\rho_j\}_{j=1}^d$ be an orthonormal basis for $\mathcal{H}$. Then \begin{align*} d&=\operatorname{dim}(\mathcal{H})=\sum_{j=1}^d\langle \rho_j, \rho_j \rangle=\sum_{j=1}^d\left\langle \int_{\Omega}\langle \rho_j, \tau _\alpha \rangle \omega_\alpha \, d \mu (\alpha), \rho_j \right \rangle\\ &=\int_{\Omega}\sum_{j=1}^{d}\langle \rho_j, \tau _\alpha \rangle \langle \omega_\alpha, \rho_j \rangle \, d \mu (\alpha)=\int_{\Omega}\left\langle \omega_\alpha, \sum_{j=1}^{d}\langle \tau _\alpha , \rho_j\rangle \rho_j\right\rangle \, d \mu (\alpha)\\ &=\int_{\Omega}\langle \omega_\alpha, \tau_\alpha\rangle \,d\mu(\alpha)=\int_{\Omega}\langle \tau_\alpha, \omega_\alpha\rangle \,d\mu(\alpha). \end{align*} Set $\gamma \coloneqq \langle \tau_\alpha, \omega_\alpha \rangle$ which is independent of $\alpha$ by the assumption. Then \begin{align*} \int_{\Delta}|\langle \tau_\alpha, \omega_\alpha\rangle |^2\,d(\mu\times\mu)(\alpha,\beta) &=\int_{\Delta}|\gamma|^2\,d(\mu\times\mu)(\alpha,\beta)=\int_{\Delta}\left|\frac{1}{\mu(\Omega)}\int_{\Omega}\langle \tau_\alpha, \omega_\alpha\rangle\,d\mu(\alpha)\right|^2\,d(\mu\times\mu)(\alpha,\beta)\\ &=\int_{\Delta}\left|\frac{d}{\mu(\Omega)}\right|^2\,d(\mu\times\mu)(\alpha,\beta)=\frac{d^2(\mu\times \mu)(\Delta)}{\mu(\Omega)^2}. \end{align*} Theorem \ref{DIMBOUNDED} then gives \begin{align*} & \sup _{\alpha, \beta \in \Omega, \alpha\neq \beta}|\langle \tau_\alpha, \omega_\beta\rangle |^{2}\geq \frac{1}{(\mu\times\mu)((\Omega\times\Omega)\setminus\Delta)} \int_{(\Omega\times\Omega)\setminus\Delta}|\langle \tau_\alpha, \omega_\beta\rangle|^2\, d(\mu\times\mu)(\alpha,\beta)\\ &~=\frac{1}{(\mu\times\mu)((\Omega\times\Omega)\setminus\Delta)}\left[\int_{\Omega}\int_{\Omega}|\langle \tau_\alpha, \omega_\beta\rangle|^{2}\, d \mu(\alpha)\, d \mu(\beta)-\int_{\Delta}|\langle \tau_\alpha, \omega_\alpha\rangle|^2\,d(\mu\times\mu)(\alpha,\beta)\right]\\ &~\geq \frac{1}{(\mu\times\mu)((\Omega\times\Omega)\setminus\Delta)}\left[d-\frac{d^2(\mu \times \mu)(\Delta)}{\mu(\Omega)^2}\right]=\frac{d}{(\mu\times\mu)((\Omega\times\Omega)\setminus\Delta)}\left[1-\frac{d(\mu \times \mu)(\Delta)}{\mu(\Omega)^2}\right]. \end{align*} \end{proof} \begin{corollary} Let $\{\tau_\alpha\}_{\alpha\in \Omega}$ be a continuous frame for $\mathcal{H}$ of dimension $d$. Assume that $\{\omega_\alpha\}_{\alpha\in \Omega}$ is a dual continuous frame for $\{\tau_\alpha\}_{\alpha\in \Omega}$. If the diagonal $\Delta\coloneqq \{(\alpha, \alpha):\alpha \in \Omega\}$ is measurable in the measure space $\Omega\times \Omega$, then \begin{align*} \sup _{\alpha, \beta \in \Omega, \alpha\neq \beta}|\langle \tau_\alpha, \omega_\beta\rangle |^{2}\geq \frac{1}{(\mu\times\mu)((\Omega\times\Omega)\setminus\Delta)}\left[d-\int_{\Delta}|\langle \tau_\alpha, \omega_\alpha\rangle|^2\,d(\mu\times\mu)(\alpha,\beta)\right]. \end{align*} \end{corollary} Higher order continuous Welch bounds leads to the following question which we do not have answer at present. \begin{question} Is there a higher order version of Theorem \ref{DUALWELCHCONTINUOUS} like Theorem \ref{CONTINUOUSWELCHMAIN}? \end{question} It is natural to ask whether we have continuous Welch bounds by replacing natural number $m$ in Theorem \ref{CONTINUOUSWELCHMAIN} by arbitrary positive real $r$. We now derive such results. In the discrete case, the first result for normalized tight frames is derived in \cite{HAIKINZAMIRGAVISH} and the second result is derived in \cite{EHLEROKOUDJOU}. \begin{theorem} Let $\{\tau_\alpha\}_{\alpha\in \Omega}$ be a normalized continuous Bessel family for $\mathcal{H}$ of dimension $d$. Then \begin{align*} \frac{1}{\mu(\Omega)} \operatorname{Tra}(\theta_\tau^*\theta_\tau)^r\geq \left(\frac{\mu(\Omega)}{d}\right)^{d-1} ,\quad \forall r \in [1, \infty) \end{align*} and \begin{align*} \frac{1}{\mu(\Omega)} \operatorname{Tra}(\theta_\tau^*\theta_\tau)^r\leq \left(\frac{\mu(\Omega)}{d}\right)^{d-1} ,\quad \forall r \in (0,1). \end{align*} \end{theorem} \begin{proof} Let $\lambda_1, \dots, \lambda_{\text{dim}(\text{Sym}^m(\mathcal{H}))}$ be eigenvalues of $ S_{\tau}$. Let $r \in [1, \infty)$. Using Jensen's inequality \begin{align*} \left(\frac{1}{d}\sum_{k=1}^d\lambda_k\right)^r\leq \frac{1}{d}\sum_{k=1}^d\lambda_k^r. \end{align*} Since $S_{\tau}$ is diagonalizable we get \begin{align*} \left(\frac{\mu(\Omega)}{d}\right)^r=\left(\frac{1}{d}\int_\Omega \| \tau_\alpha\|^2\, d \mu(\alpha)\right)^r= \left(\frac{1}{d}\operatorname{Tra}(S_\tau)\right)^r\leq \frac{1}{d}\operatorname{Tra}(S_\tau)^r=\frac{1}{d}\operatorname{Tra}(\theta_\tau^*\theta_\tau)^r. \end{align*} Similarly the case $ r \in (0,1) $ follows by using Jensen's inequality. \end{proof} \begin{theorem}\label{PWELCH} Let $2<p<\infty$. Let $(\Omega, \mu)$ be a measure space and $\{\tau_\alpha\}_{\alpha\in \Omega}$ be a normalized continuous Bessel family for $\mathcal{H}$ of dimension $d$. If the diagonal $\Delta\coloneqq \{(\alpha, \alpha):\alpha \in \Omega\}$ is measurable in the measure space $\Omega\times \Omega$, then \begin{align*} \int_{\Omega\times\Omega}|\langle \tau_\alpha, \tau_\beta\rangle|^{p}\, d(\mu\times\mu)(\alpha,\beta)&= \int_{\Omega}\int_{\Omega}|\langle \tau_\alpha, \tau_\beta\rangle|^{p}\, d \mu(\alpha)\, d \mu(\beta)\\ &\geq \frac{1}{(\mu\times \mu)((\Omega\times\Omega)\setminus\Delta)^{\frac{p}{2}-1}} \left(\frac{\mu(\Omega)^2}{d}-(\mu\times\mu)(\Delta)\right)^\frac{p}{2}+(\mu\times\mu)(\Delta). \end{align*} \end{theorem} \begin{proof} Define $r\coloneqq 2p/(p-2)$ and $q$ be the conjugate index of $p/2$. Then $q=r/2$. Using Theorem \ref{FIRSTORDERCONTINUOUS} and Holder's inequality, we have \begin{align*} \frac{\mu(\Omega)^2}{d}-(\mu\times\mu)(\Delta)&\leq \int_{(\Omega\times\Omega)\setminus\Delta}|\langle \tau_\alpha, \tau_\beta\rangle|^2\, d(\mu\times\mu)(\alpha,\beta)\\ &\leq \left(\int_{(\Omega\times\Omega)\setminus\Delta}||\langle \tau_\alpha, \tau_\beta\rangle|^2|^\frac{p}{2}\, d(\mu\times\mu)(\alpha,\beta)\right)^\frac{2}{p}\left(\int_{(\Omega\times\Omega)\setminus\Delta}d(\mu\times\mu)(\alpha,\beta)\right)^\frac{1}{q}\\ &=\left(\int_{(\Omega\times\Omega)\setminus\Delta}|\langle \tau_\alpha, \tau_\beta\rangle|^p\, d(\mu\times\mu)(\alpha,\beta)\right)^\frac{2}{p}(\mu\times \mu)((\Omega\times\Omega)\setminus\Delta)^\frac{1}{q}\\ &=\left(\int_{(\Omega\times\Omega)\setminus\Delta}|\langle \tau_\alpha, \tau_\beta\rangle|^p\, d(\mu\times\mu)(\alpha,\beta)\right)^\frac{2}{p}(\mu\times \mu)((\Omega\times\Omega)\setminus\Delta)^\frac{2}{r}\\ &=\left(\int_{(\Omega\times\Omega)\setminus\Delta}|\langle \tau_\alpha, \tau_\beta\rangle|^p\, d(\mu\times\mu)(\alpha,\beta)\right)^\frac{2}{p}(\mu\times \mu)((\Omega\times\Omega)\setminus\Delta)^\frac{p-2}{p} \end{align*} which gives \begin{align*} \left(\frac{\mu(\Omega)^2}{d}-(\mu\times\mu)(\Delta)\right)^\frac{p}{2}\leq \left(\int_{(\Omega\times\Omega)\setminus\Delta}|\langle \tau_\alpha, \tau_\beta\rangle|^p\, d(\mu\times\mu)(\alpha,\beta)\right)(\mu\times \mu)((\Omega\times\Omega)\setminus\Delta)^{\frac{p}{2}-1}. \end{align*} Therefore \begin{align*} &\frac{1}{(\mu\times \mu)((\Omega\times\Omega)\setminus\Delta)^{\frac{p}{2}-1}} \left(\frac{\mu(\Omega)^2}{d}-(\mu\times\mu)(\Delta)\right)^\frac{p}{2}+(\mu\times\mu)(\Delta)\\ &~=\frac{1}{(\mu\times \mu)((\Omega\times\Omega)\setminus\Delta)^{\frac{p}{2}-1}} \left(\frac{\mu(\Omega)^2}{d}-(\mu\times\mu)(\Delta)\right)^\frac{p}{2}+\int_{\Delta}|\langle \tau_\alpha, \tau_\alpha\rangle|^p\, d(\mu\times\mu)(\alpha,\beta)\\ &~\leq \int_{(\Omega\times\Omega)\setminus\Delta}|\langle \tau_\alpha, \tau_\beta\rangle|^p\, d(\mu\times\mu)(\alpha,\beta)+\int_{\Delta}|\langle \tau_\alpha, \tau_\alpha\rangle|^p\, d(\mu\times\mu)(\alpha,\beta)\\ &~=\int_{\Omega\times\Omega}|\langle \tau_\alpha, \tau_\beta\rangle|^{p}\, d(\mu\times\mu)(\alpha,\beta). \end{align*} \end{proof} There are four more bounds which are in line with Welch bounds. To state them we need a definition. \begin{definition}\cite{JASPERKINGMIXON} Given $d\in \mathbb{N}$, define \textbf{Gerzon's bound} \begin{align*} \mathcal{Z}(d, \mathbb{K})\coloneqq \left\{ \begin{array}{cc} d^2 & \quad \text{if} \quad \mathbb{K} =\mathbb{C}\\ \frac{d(d+1)}{2} & \quad \text{if} \quad \mathbb{K} =\mathbb{R}.\\ \end{array} \right. \end{align*} \end{definition} \begin{theorem}\cite{JASPERKINGMIXON, XIACORRECTION, MUKKAVILLISABHAWALERKIPAAZHANG, SOLTANALIAN, BUKHCOX, CONWAYHARDINSLOANE, HAASHAMMENMIXON, RANKIN} \label{LEVENSTEINBOUND} Define $m\coloneqq \operatorname{dim}_{\mathbb{R}}(\mathbb{K})/2$. If $\{\tau_j\}_{j=1}^n$ is any collection of unit vectors in $\mathbb{K}^d$, then \begin{enumerate}[\upshape(i)] \item (\textbf{Bukh-Cox bound}) \begin{align*} \max _{1\leq j,k \leq n, j\neq k}|\langle \tau_j, \tau_k\rangle |\geq \frac{\mathcal{Z}(n-d, \mathbb{K})}{n(1+m(n-d-1)\sqrt{m^{-1}+n-d})-\mathcal{Z}(n-d, \mathbb{K})}\quad \text{if} \quad n>d. \end{align*} \item (\textbf{Orthoplex/Rankin bound}) \begin{align*} \max _{1\leq j,k \leq n, j\neq k}|\langle \tau_j, \tau_k\rangle |\geq\frac{1}{\sqrt{d}} \quad \text{if} \quad n>\mathcal{Z}(d, \mathbb{K}). \end{align*} \item (\textbf{Levenstein bound}) \begin{align*} \max _{1\leq j,k \leq n, j\neq k}|\langle \tau_j, \tau_k\rangle |\geq \sqrt{\frac{n(m+1)-d(md+1)}{(n-d)(md+1)}} \quad \text{if} \quad n>\mathcal{Z}(d, \mathbb{K}). \end{align*} \item (\textbf{Exponential bound}) \begin{align*} \max _{1\leq j,k \leq n, j\neq k}|\langle \tau_j, \tau_k\rangle |\geq 1-2n^{\frac{-1}{d-1}}. \end{align*} \end{enumerate} \end{theorem} Theorem \ref{LEVENSTEINBOUND} leads to the following problem. \begin{question} Whether there is a continuous version of Theorem \ref{LEVENSTEINBOUND}?. In particular, does there exists a continuous version of \begin{enumerate}[\upshape(i)] \item Bukh-Cox bound? \item Orthoplex/Rankin bound? \item Levenstein bound? \item Exponential bound? \end{enumerate} \end{question} \section{Applications} Our first application of Theorem \ref{CONTINUOUSWELCHMAIN} is to the continuous version of RMS correlation of vectors which we define as follows. \begin{definition}\label{CRMSDEFINITION} Let $\{\tau_\alpha\}_{\alpha\in \Omega}$ be a normalized continuous Bessel family for $\mathcal{H}$. If the diagonal $\Delta$ is measurable, then the \textbf{continuous root-mean-square} (CRMS) absolute cross relation of $\{\tau_\alpha\}_{\alpha\in \Omega}$ is defined as \begin{align*} I_{\text{CRMS}}(\{\tau_\alpha\}_{\alpha\in \Omega})\coloneqq \left(\frac{1}{(\mu\times\mu)((\Omega\times\Omega)\setminus\Delta)}\int_{(\Omega\times\Omega)\setminus\Delta}|\langle \tau_\alpha, \tau_\beta\rangle|^2\, d(\mu\times\mu)(\alpha,\beta)\right)^\frac{1}{2}. \end{align*} \end{definition} Theorem \ref{CONTINUOUSWELCHMAIN} now gives the following estimate. \begin{proposition} Under the set up as in Definition \ref{CRMSDEFINITION}, one has \begin{align*} 1\geq I_{\text{CRMS}}(\{\tau_\alpha\}_{\alpha\in \Omega}) \geq \left(\frac{1}{(\mu\times\mu)((\Omega\times\Omega)\setminus\Delta)}\left[\frac{\mu(\Omega)^2}{d}-(\mu\times\mu)(\Delta)\right]\right)^\frac{1}{2}. \end{align*} \end{proposition} Our second application of Theorem \ref{CONTINUOUSWELCHMAIN} is to the continuous version of frame potential which is defined as follows. \begin{definition}\label{CONTINUOUSPOTENTIALDEFINITION} Let $\{\tau_\alpha\}_{\alpha\in \Omega}$ be a normalized continuous Bessel family for $\mathcal{H}$. The \textbf{continuous frame potential} of $\{\tau_\alpha\}_{\alpha\in \Omega}$ is defined as \begin{align*} FP(\{\tau_\alpha\}_{\alpha\in \Omega})\coloneqq \int_{\Omega}\int_{\Omega}|\langle \tau_\alpha, \tau_\beta\rangle|^{2}\, d \mu(\alpha)\, d \mu(\beta). \end{align*} \end{definition} Note that the order of integration does not matter in Definition \ref{CONTINUOUSPOTENTIALDEFINITION}. Further, finiteness of measure says that potential is finite. In general, it is difficult to find potential using Definition \ref{CONTINUOUSPOTENTIALDEFINITION}. Following theorem simplifies it to a greater extent. \begin{theorem} If $\{\tau_\alpha\}_{\alpha\in \Omega}$ is a normalized continuous Bessel family for $\mathcal{H}$, then \begin{align*} FP(\{\tau_\alpha\}_{\alpha\in \Omega})= \text{Tra}(S_\tau^2)= \text{Tra}((\theta_\tau^*\theta_\tau)^2). \end{align*} \end{theorem} \begin{proof} This follows from Theorem \ref{TRACEFORMULA}. \end{proof} Using Theorem \ref{CONTINUOUSWELCHMAIN} we have following estimates. \begin{proposition}\label{FPESTIMATE} Given a normalized continuous Bessel family $\{\tau_\alpha\}_{\alpha\in \Omega}$ for $\mathcal{H}$, one has \begin{align*} \frac{\mu(\Omega)^2}{d}\leq FP(\{\tau_\alpha\}_{\alpha\in \Omega})\leq \mu(\Omega)^2. \end{align*} Further, if the diagonal $\Delta$ is measurable, then one also has \begin{align*} (\mu\times\mu)(\Delta)\leq FP(\{\tau_\alpha\}_{\alpha\in \Omega})\leq \mu(\Omega)^2. \end{align*} \end{proposition} Proposition \ref{FPESTIMATE} and the study of paper \cite{BENEDETTOFICKUS} leads to the following problem. \begin{question} \textbf{Is there a characterization of continuous frames using continuous frame potential (like Theorem 7.1 in \cite{BENEDETTOFICKUS})?} \end{question} Our third application of Theorem \ref{CONTINUOUSWELCHMAIN} is to the continuous frame correlations defined as follows. \begin{definition} Let $\{\tau_\alpha\}_{\alpha\in \Omega}$ be a normalized continuous frame for $\mathcal{H}$. We define the \textbf{continuous frame correlation} of $\{\tau_\alpha\}_{\alpha\in \Omega}$ as \begin{align*} \mathcal{M}(\{\tau_\alpha\}_{\alpha\in \Omega})\coloneqq \sup_{\alpha, \beta \in \Omega, \alpha\neq \beta}|\langle\tau_\alpha, \tau_\beta \rangle|. \end{align*} \end{definition} In discrete frame theory the notion which comes along with frame correlation is the notion of Grassmannian frames defined in \cite{STROHMERHEATH}. We next set up the notion of continuous Grassmannian frames. \begin{definition} A normalized continuous frame $\{\tau_\alpha\}_{\alpha\in \Omega}$ for $\mathcal{H}$ is said to be a \textbf{continuous Grassmannian frame} for $\mathcal{H}$ if \begin{align*} \mathcal{M}(\{\tau_\alpha\}_{\alpha\in \Omega})=\inf\left\{\mathcal{M}(\{\omega_\alpha\}_{\alpha\in \Omega}):\{\omega_\alpha\}_{\alpha\in \Omega}\text{ is a normalized continuous frame for }\mathcal{H} \right\}. \end{align*} \end{definition} Using compactness and continuity arguments it is known that Grassmannian frames exist in every dimension with any number of vectors (greater than or equal to dimension) \cite{BENEDETTONKOLESAR}. However we can not use this argument for measures. Therefore we state the following open problem. \begin{question} \textbf{Classify measure spaces and (finite dimensional) Hilbert spaces so that continuous Grassmannian frames exist}. \end{question} The notion which is associated to Grassmannian frames is the notion of equiangular frames (see \cite{STROHMERHEATH}). For the continuous case, we set the definition as follows. \begin{definition} A continuous frame $\{\tau_\alpha\}_{\alpha\in \Omega}$ for $\mathcal{H}$ is said to be \textbf{$\gamma$-equiangular} if there exists $\gamma\geq0$ such that \begin{align*} |\langle\tau_\alpha, \tau_\beta \rangle|=\gamma, \quad \forall \alpha, \beta \in \Omega, \alpha\neq \beta. \end{align*} \end{definition} There is a celebrated Zauner's conjecture for equiangular tight frames (see \cite{APPLEBY}). For the purpose of record, we set the continuous version of Zauner's conjecture as follows. \begin{conjecture} (\textbf{Continuous Zauner's conjecture}) \textbf{For a given measure space $(\Omega, \mu)$ and for every $d\in \mathbb{N}$, there exists a $\gamma$-equiangular tight continuous frame $\{\tau_\alpha\}_{\alpha\in \Omega}$ for $\mathbb{C}^d$ such that $\mu(\Omega)=d^2$}. \end{conjecture} \begin{theorem}\label{CNG2} Let $\{\tau_\alpha\}_{\alpha\in \Omega}$ be a normalized continuous frame for $\mathcal{H}$. Then \begin{align}\label{EQUIANGULARINEQUALITY} \mathcal{M}(\{\tau_\alpha\}_{\alpha\in \Omega})\geq \left(\frac{1}{(\mu\times\mu)((\Omega\times\Omega)\setminus\Delta)}\left[\frac{\mu(\Omega)^2}{d}-(\mu\times\mu)(\Delta)\right]\right)^\frac{1}{2}\eqqcolon\gamma. \end{align} If the frame is $\gamma$-equiangular, then we have equality in Inequality (\ref{EQUIANGULARINEQUALITY}). \end{theorem} In the case of (discrete) Grassmannian frames, the converse statement of Theorem \ref{CNG2} is valid (see \cite{STROHMERHEATH}). There are also relations between number of elements in the frame and dimension of the space (Theorem 2.3 in \cite{STROHMERHEATH}). We do not know any such \textbf{relation between measure of $\Omega$ and the dimension of $\mathcal{H}$}. \section*{Acknowledgements} I thank Dr. P. Sam Johnson, Department of Mathematical and Computational Sciences, National Institute of Technology Karnataka (NITK), Surathkal for some discussions. \bibliographystyle{plain}
\section{Introduction}\label{sec:Introdcution} The emergence and spread of the coronavirus disease 2019 (COVID-19) have had a global impact, with 190 countries having reported cases as of April 5, 2020 \cite{johnhopkins2020covid}. In Australia, federal restrictions were enacted to reduce community transmissions, which have resulted in the closure of work premises and university campuses. Consequently, work and collaboration have needed to shift into remote and online environments. The distribution and reporting on the various aspects of COVID-19 through multiple sources, such as federal reports or social media, have posed a challenge for Australians to understand the numerous facets of the pandemic situation. In light of this, a team of 48 student volunteers developed an open-source COVID-19-AU information dashboard (\textcolor{blue}{https://covid-19-au.com}) while working under legislative restrictions that required social isolation (inspired by \cite{ralph2020pandemic}, we refer to this sort of software development as \textit{pandemic software development}). The project is a data aggregation software that aims to ease the challenge of understanding COVID-19 in Australia by providing reliable, accurate, and updated information about the pandemic. The site displays useful metrics, data visualizations, and relevant articles derived from various sources. Some prior research on developing COVID-19 software has concentrated on technical challenges like bugs and improving software quality \cite{Rahman2020exploratory}, and characteristics of COVID-19 software repositories \cite{wang2020open}. Other researchers focus on how the pandemic has influenced educational institutions and their instructional strategies (e.g., \cite{bao2020covid, kanij2020adapting, barr2020online}). A growing number of the literature \cite{ford2020taleNew, butler2020challenges, bao2020does, bezerra2020human, ralph2020pandemic, rodeghero2020please, russo2021predictors, o2021covid, miller2021your} has started looking into the consequences of the pandemic on the software development process (e.g., the effects of relocating into a new working environment with working from home \cite{ford2020taleNew}). These works investigate the problems, motivations, and experiences of \textit{practicing professionals}. Some other researchers investigated the different aspects of engaging students in open-source software development (e.g., \cite{silva2020google, pinto2019training, smith2014selecting}). Despite these efforts, there is no research on how a \textit{student team} develops a software project during the COVID-19 pandemic. The challenges faced by a (cross-disciplinary) \textit{student team} may vary from that of a \textit{professional team} due to various factors like lack of prior work experience or the absence of pre-existing policies to aid work management during a crisis. Hence, these differences may display varying behavior in how the students adapt and overcome these challenges. The research presented in this paper aims to comprehend the experiences of the students that contributed to the COVID-19-AU information dashboard project in four areas: their motivations to contribute to the project, the challenges while working on this project, the strategies employed to overcome the challenges, and the learning's gained through the experiences. To this end, we conducted an online survey with 39 out of 48 project participating students, with questions formulated based on a pilot analysis of the student team's internal messages on Slack and their usage of GitHub, as well as existing literature. \begin{figure}[t] \centering \includegraphics[scale=0.121]{images/covid-19-au-dashboard.png} \caption{A Snapshot of the COVID-19 Information Dashboard} \label{fig:dashboard} \end{figure} Our findings indicate that playing a positive role in the crisis was the motivation most selected by the participants. Other significant motivations include learning new skills and technologies and gaining experience for their CV. The most prominent challenges for the students were regarding data collection, which was strongly attributed to the unreliability and inaccuracy of the data provided through government sources. Some students expressed difficulty in maintaining a work-life balance while working from home and in forming relationships with the other contributors as the project's development was entirely remote. However, the majority of general project challenges were not deemed substantial by the students, which ties with the many mitigation strategies that were employed by the students for the duration of the project. Of these mitigation strategies, the students most frequently used clear language when messaging other team members. Team morale was also maintained through vocal appreciation of the work and by encouraging the other contributors. Overall, the students exhibited growth in their technical and non-technical skills, particularly in their front-end development skills, understanding of COVID-19, and ability to work online. \textbf{Contributions}: (1) a better understating of the student experience in pandemic software development (2) a set of practical implications for students, researchers, and policymakers. \textbf{Paper Structure}: Section \ref{sec:Background} provides the background. Section \ref{sec:ResearchMethod} explains our research method. Section \ref{sec:Findings} reports the findings. We reflect on our findings in Section \ref{sec:Discussion}. Section \ref{sec:RelatedWork} summarises the related work. Section \ref{sec:Conclusion} concludes our study. \section{Background}\label{sec:Background} \subsection{COVID-19} As of February 5, 2021, there have been 130, 422,190 confirmed cases of COVID-19 and 2, 842,135 confirmed deaths \cite{whodashboard}. Like other countries, the Australian government introduced legislative restrictions to minimize the spread of the disease \cite{ausgovnews}. These restrictions included limiting public gatherings, shutting down on-site working alongside encouraging working from home (WFH), placing a 5km radius restriction on an individual traveling from their house, the closure of Australian university campuses, etc. \subsection{COVID-19 Information Dashboard} Through the progression of this pandemic, a plethora of information about the disease has become publicly available through many different sources, such as news outlets, federal and state reports, and social media \cite{storenreporting}. The consolidation of these sources can be overwhelming due to inaccuracies or inconsistencies in their content. The COVID-19 information dashboard was developed as a data aggregation software for COVID-19 information in response to this challenge. The website aims to help Australians stay informed on key areas of the disease, such as case numbers and outbreak hot spots. Fig. \ref{fig:dashboard} is a snippet of the dashboard. \subsubsection{Contributors} The COVID-19 information dashboard project is open-source software (OSS) maintained and managed by a team of 48 student volunteers. The students were recruited primarily through advertisements on student social spaces and by word of mouth. The team includes four key areas: data collection, data visualization, web development, and marketing. Many of the students did not have prior expertise in relation to their area of contribution. The majority of the students also had no prior professional experience in working on a software project (74.36\%). A further breakdown of the team's demographics is presented in Section \ref{sec:demographics}. \subsubsection{Features} The COVID-19 information dashboard displays a variety of metrics on COVID-19. Metrics including confirmed cases, active cases, recovered cases, test numbers, hospital numbers, and deaths are presented both numerically and through heat map visualizations. The specificity of the data can also be varied between a national view, state view, and local government area view. In addition, time series data visualizations are also available to view historical figures or trends in the data. Other key features of the website also include a global comparison of COVID-19 between Australia and other nations, demographic analysis of the pandemic by state, and a timeline of COVID-19 related news articles released by reputable outlets. The data used by the site is updated in real time through the use of an automated data crawler that scrapes various sources, such as government reports, news articles, and social media posts. The data also undergoes a manual review to manage inconsistencies or mistakes. \subsubsection{Development Process} \label{sec:developmentprocess} Due to the restrictions in Australia, the team was required to collaborate through a purely online medium, with many also having to contribute while working from home. Communication within the team was largely facilitated through the use of Slack, which provides private messaging, channel messaging, and video conferencing services. In addition, GitHub was used as the version control hosting site for the software. The developers would perform issue labeling and provide feedback through the features provided by the platform. Moreover, they had to self-manage and develop the necessary policies and processes for project development. This included the on-boarding process of new members, managing shared resources such as spreadsheets and code, and the workflows required to ensure ongoing tasks could be tracked. Many strategies adopted by the team in developing the software are discussed in this paper. \subsubsection{Project Impact} The project has gathered much public attention, with the website achieving almost 13 million visits as of April 5, 2020. Among all the visitors, more than 200,000 (22.2\%) users are returning users. It has attracted over 700,000 unique users since its release and had almost 60,000 users access the site in a single day during the peak of the pandemic in Australia. The site has also attracted visitors from 180 other countries around the world. There have been 3,641,690 sessions, with users spending 2.62 minutes on average in each session. User feedback collected through different channels (e.g., social media, email, online survey) showed that around 81\% of the users had positive reviews of the website. \section{Research Method}\label{sec:ResearchMethod} To characterize the experiences of the student volunteers of the COVID-19 dashboard project (for brevity, the COVID-19 project) during the pandemic, we conducted a survey. \subsection{Research Questions} Our study was guided by the following research questions: \begin{comment} \begin{center} \begin{tcolorbox}[colback=green!2!white,colframe=black!75!black] \textit{\textbf{RQ1.} What factors do motivate students to contribute to the COVID-19 project during the COVID-19 pandemic?} \end{tcolorbox} \end{center} \end{comment} \textbf{RQ1.} \textit{What factors do motivate students to contribute to the COVID-19 project during the COVID-19 pandemic?} \textbf{\underline{Motivation}}: Students may have participated in the COVID-19 project for different reasons, such as improving their CVs and challenging themselves. This question aims to understand what factors motivated students to work on the COVID-19 project during the COVID-19 pandemic. \begin{comment} \begin{tcolorbox}[colback=green!2!white,colframe=black!75!black] \textit{\textbf{RQ2.} What challenges do students experience when working on the COVID-19 project during the COVID-19 pandemic?} \end{tcolorbox} \end{comment} \textbf{RQ2.} \textit{What challenges do students experience when working on the COVID-19 project during the COVID-19 pandemic?} \textbf{\underline{Motivation}}: Software development is a collaborative and joint endeavor that involves individuals with diverse skills and seniority. The COVID-19 pandemic may negatively influence this process. For example, participating students may have had a lack of or inadequate access to (accurate) resources (e.g., data). They may have faced new or exacerbated software bugs that they did not experience before \cite{Rahman2020exploratory}. Hence, we aim to understand such challenges that may have impacted students’ learning process and work on the COVID-19 project. \begin{comment} \begin{tcolorbox}[colback=green!2!white,colframe=black!75!black] \textit{\textbf{RQ3.} What strategies do students employ when working on the COVID-19 project during the COVID-19 pandemic?} \end{tcolorbox} \end{comment} \textbf{RQ3.} \textit{What strategies do students employ when working on the COVID-19 project during the COVID-19 pandemic?} \textbf{\underline{Motivation}}: It aims to understand the strategies that students consider beneficial in minimizing the impact of the pandemic on the project and their involvement in the project. \begin{comment} \begin{tcolorbox}[colback=green!2!white,colframe=black!75!black] \textit{\textbf{RQ4.} What skills do students learn when working on the COVID-19 project during the COVID-19 pandemic?} \end{tcolorbox} \end{comment} \textbf{RQ4.} \textit{What skills do students learn when working on the COVID-19 project during the COVID-19 pandemic?} \textbf{\underline{Motivation}}: Participating students may have learned and developed new technical and non-technical skills and expertise while working on the project within the COVID-19 pandemic. Such skills and experiences may be leveraged by students and their peers in the future to deal with such kind of crises and disasters in their personal life or professional career. \subsection{Pilot Study Research on the effects of the COVID-19 pandemic on software development and software engineering education is rare. Hence, it was challenging for us to design appropriate and comprehensive survey questions. To better understand the possible challenges faced by and solutions adopted by students, we conducted a pilot study before the survey to analyze the team discussions on Slack and the issue tracking system of the project. \begin{table}[] \caption{Top 10 challenges highlighted by Slack messages} \label{tba:SlackMesage} \centering \resizebox{.47\textwidth}{!}{% {\renewcommand{\arraystretch}{1.0} \begin{tabular}{p{6cm} c} \hline \textbf{Code} & \textbf{Total} \\ \hline Collecting data & 147 \\ Designing the interface & 57 \\ Working with the codebase & 57 \\ Having the necessary experience for the project & 29 \\ Time management with project tasks & 29 \\ Mistakes in day entry & 22 \\ Online communication & 15 \\ Heavy workload & 11 \\ Using internal team resources & 11 \\ Balancing external commitments & 9 \\ \hline \end{tabular} }\quad } \end{table} \textbf{Slack}. First, the text dump of messages was cleaned, and non-text blocks such as links and code snippets were removed. Next, the text was tokenized, and the tokens were categorized by research question. The tokens were then used as search terms for relevant messages, with further filtering was done to remove false positives. Finally, the relevant messages were open coded \cite{creswell2002educational} into categories that would form the basis of our survey questions. For instance, the challenge of \emph{collecting data} made up a high proportion of challenge-related messages (147 out of 457, or 32.17\%), as shown in Table \ref{tba:SlackMesage}. This informed several data collection specific challenges that were presented in a separate section of the survey. Additionally, we also observed a substantial proportion of messages centered around proactive collaboration, such as offering to help with debugging or acknowledging team members' work. As a result, \textit{``actively responding to teammates' messages''} and \textit{``encouraging the efforts of other members''} were included as strategy statements in the survey. \textbf{GitHub}. We also analyzed comments in pull requests and raised issues to identify common topics discussed among the participants. Of 66 discussion threads, most of them centered around \textit{bug fixes} and \textit{code review}, further reinforcing the Slack data analysis that showed participants lacked technical experience and working with the codebase. Another discussion details how participants worked together to establish a reliable source for the number of recovered cases to replace the Australian government website when it stopped releasing them in late March. This resulted in providing the basis for the strategy \textit{``prompt discussing any differences found across data sources with my team''} to be included in the survey. \subsection{Main Study: Survey} \subsubsection{Protocol} We designed an online survey that included both close-ended and open-ended questions. The survey was hosted on Qualtrics software\footnote{https://www.qualtrics.com/au/core-xm/survey-software/} and took approximately 25 minutes to complete. The complete list of the questions is available at \cite{replpack}. The survey questions were mainly formulated based on the existing literature (e.g., \cite{ford2020taleNew, da2010challenges,silva2020google}) and our pilot study (i.e., analyzing the students' discussions on Slack and GitHub). The survey started with a brief overview of our research objective. The survey questions can be generally organized into six groups: \textbf{Demographics}. Our survey had 7 questions to collect demographic information such as students' gender and their prior professional experience in software development. \textbf{Motivations}. Inspired by \cite{silva2020google, lakhani2003hackers}, we designed a multiple-choice question to seek the students' motives to contribute to the project. \textbf{Challenges}. We used 10 statements (i.e., some of them adopted from \cite{ford2020taleNew, da2010challenges}) to measure to what extent students agreed or disagreed with the potential challenges (if any) that may have occurred during their work on the COVID-19 project. The statements were rated based on a six-point Likert scale (from ``Strongly agree'' to ``Strongly disagree''). We also provided “Not Applicable” in the answer options, which allowed students to indicate if they did not face a given challenge. We also designed 4 six-point Likert scale statements to seek the level of agreement or disagreement of students on the possible challenges in data collection during the project. \textbf{Practices}. Similarly to the challenges, we designed two types of statements to explore how often students applied a provided list of 10 practices or techniques to address the challenges they encountered during the project, as well as 5 used exclusively during the data collection. The students were asked to rate them using five-point Likert scale statements (from ``Very often'' to ``Never''). \textbf{Skills}. The students were asked to show how confident they were about 8 soft skills and 8 technical skills before contributing to the project and after participating in the project. These statements were rated on 11 scales from 0 (not confident) to 10 (very confident). \textbf{Open-ended Questions}. All multiple- and single-choices questions (except for the demographic questions) were followed by an open-ended question to collect further opinions and thoughts from the students. In total, we asked 7 open-ended questions. \subsubsection{Participants} The survey participants were recruited from the volunteering students who contributed to the COVID-19 information dashboard. In total, 48 students were involved in different steps of the project. After collecting the email addresses of the 48 students, we sent an invitation email to all of them. We also sent a message via Slack and invited them to fill in the survey. To encourage students to complete the survey, we promised the students that they would receive an incentive of an 80 AUD Coles gift card for participating. We received 39 responses (acceptance rate: 81.25\%). \subsection{Data Analysis} Closed-ended questions were analyzed using descriptive statistics, while open-ended questions were analyzed using open coding \cite{creswell2002educational} and axial coding \cite{corbin2014basics}. The codes generated were used to provide more descriptive results for the related closed questions. \section{Findings}\label{sec:Findings} \subsection{Demographics}\label{sec:demographics} \textbf{Age}. The participants' ages ranged from 20 years old to 35 years old. The mean age of the participants is 24.56 years. \textbf{Gender}. Of 39 participants, 27 (69.23\%) were male, and the rest (12, 30.77\%) were female. \textbf{Education}. 56.41\% of the participants stated that they were doing a postgraduate degree, and 43.59\% said that they were pursuing an undergraduate degree at the time of the survey. \textbf{Degree}. The majority of the students' degrees (69.23\%) were related to IT fields such as Information Technology, Software Engineering, Data Science, and Computer Science. The rest (30.76\%) were studying non-IT-related disciplines, e.g., Education, Mechanical Engineering, Law, and Art. \textbf{Role}. 35.90\% of the students indicated that they mainly contributed to the project as a developer. 12 students (30.77\%) were primarily responsible for marketing. Information contributor was another highly cited role by the students (23.08\%). \textbf{Area of Contribution}. Table \ref{table:team_breakdown} depicts the different aspects of the project and the proportion of survey participants identified as having worked in each area. A single team member could select multiple areas. The most dominant areas of the project were data collection (17, 43.59\%) and promotion/marketing (17, 43.59\%). \begin{table}[] \caption{Team Breakdown and Responsibilities} \label{table:team_breakdown} \centering \resizebox{.47\textwidth}{!}{% {\renewcommand{\arraystretch}{1.01} \begin{tabular}{l l l} \hline \textbf{Team} & \textbf{\#Num} & \textbf{Responsibility} \\ \hline Promotion & 17 & Promote the website in different channels \\ Data collection & 17 & Collect general info (e.g., policy, symptom) \\ Data update & 12 & Live number update from government site\\ Front-end development & 11 & Develop front-end website \\ Data vis & 10 & Visualise the statistics interactively\\ UI/UX & 8 & Graphical UI design and user experience \\ Back-end development & 4 & Develop the back-end \\ Translation & 3 & Develop multi-lingual site\\ \hline \end{tabular} }\quad } \end{table} \textbf{Experience}. 29 students (74.36\%) pointed out that they had no experience in software development in the industry before joining the project. Only 10 students (25.64\%) indicated that they had such experience: 4 had 1-2 years experience, 5 had 3-5 years experience, and 1 had more than 10 years experience. \subsection{RQ1: Motivating Factors} The participants were presented with 12 motivations and asked to select the statements that applied to them. Table \ref{table:Motivations} shows the motivations that the participants selected from. \begin{table}[] \centering \caption{List of motivating factors and survey responses} \resizebox{\linewidth}{!}{ {\renewcommand{\arraystretch}{1.01} \begin{tabular}{lcc} \hline \textbf{Statements} & \textbf{\#} & \textbf{\%} \\ \hline Play a positive role in this crisis & 35 & 89.74 \\ Learn new skills and technologies & 30 & 76.92 \\ Gain experience and build CV & 27 & 69.23 \\ Build a network with new people & 26 & 66.67 \\ Participate in a student initiated/led project & 25 & 64.10 \\ Learn more about the COVID-19 situation & 24 & 61.54 \\ Demonstrate my skills and expertise & 23 & 58.97 \\ Challenge myself to do technically challenging tasks & 19 & 48.72 \\ Experience working on a crisis related software project & 19 & 48.72 \\ Learn to develop software system in industrial setting & 17 & 43.59 \\ To occupy free time & 10 & 25.64 \\ Others & 3 & 7.69 \\ \hline \end{tabular} } }\quad \label{table:Motivations} \end{table} Given the ongoing pandemic, 89.74\% of participants were highly motivated to play a positive role in the crisis. 58.97\% took the project as an opportunity to demonstrate their skills, with one participant commenting he could use his past experience in \emph{``projects (that...) involved large-scale data collection and normalization''} to contribute \emph{``towards Australian and international efforts combating this pandemic''}. 61.54\% wanted to learn more about COVID-19, and 48.72\% also saw this as an opportunity to experience working on a crisis related software project. As mentioned earlier, 74\% of the students had no software development experience in the industry before joining the project, which may have resulted in the team being strongly motivated by the desire to learn new skills and technologies (77\%), and gaining experience for their CV (69\%). Moreover, participants further expressed they wanted to build a network by meeting and communicating with new people (67\%) and to contribute to a student-initiated/led project (64\%). Participants largely disagreed with participating simply to occupy free time, with only 26\% agreeing with the option. \begin{center} \begin{tcolorbox}[colback=black!5!white,colframe=black!75!black] \textbf{\footnotesize RQ1.} \textit{\footnotesize We found that playing a positive role in the COVID-19 crisis, learning new skills and technologies, and gaining experience for their CV were the most cited motivations for volunteering students to contribute to the COVID-19 information dashboard.} \end{tcolorbox} \end{center} \subsection{RQ2: Challenges} \label{sec:Challenges} We classify the possible challenges that the students faced into General Challenges and Data Collection Challenges. \begin{table*}[!ht] \centering \caption{List of general challenges and responses (in \%). STA: Strongly Agree, A: Agree, SWA: Somewhat Agree, SWD: Somewhat Disagree, D: Disagree, STD: Strongly Disagree} \footnotesize \resizebox{\textwidth}{!}{% {\renewcommand{\arraystretch}{1.0} \rowcolors{2}{gray!25}{white} \begin{tabular}{|c|l|cccccc|} \hline \textbf{ID} & \textbf{Challenge} & \textbf{STA} & \textbf{A} & \textbf{SWA} & \textbf{SWD} & \textbf{D} & \textbf{STD} \\ \hline C1 & Balance my university commitments and working on this project & 2.94 & 8.82 & 26.47 & 14.71 & \textbf{32.35} & 14.71 \\ \hline C2 & Manage my mental health while working on this project from home & 0.00 & 5.26 & 7.89 & 7.89 & 31.58 & \textbf{47.37} \\ \hline C3 & Manage physical health while working on this project & 2.56 & 2.56 & 2.56 & 7.69 & \textbf{43.59} & 41.03 \\ \hline C4 & Work on this project from home & 0.00 & 7.69 & 5.13 & 12.82 & 33.33 & \textbf{41.03} \\ \hline C5 & Keep attention away from distractions while working from home & 0.00 & 17.95 & 15.38 & 12.82 & \textbf{33.33} & 20.51 \\ \hline C6 & Establish a work-life balance while working from home & 5.13 & 20.51 & \textbf{23.08} & 7.69 & 20.51 & \textbf{23.08} \\ \hline C7 & Set up my own productive workspace while working from home & 2.56 & 12.82 & 10.26 & 10.26 & \textbf{33.33} & 30.77 \\ \hline C8 & Stay motivated while working from home & 5.13 & 12.82 & 15.38 & 20.51 & \textbf{25.64} & 20.51 \\ \hline C9 & Collaborate with the team through a purely online medium & 2.56 & 12.82 & 12.82 & 17.95 & \textbf{28.21} & 25.64 \\ \hline C10 & Work in a purely online medium & 0.00 & 7.89 & 5.26 & 18.42 & \textbf{44.74} & 23.68 \\ \hline \end{tabular} }\quad } \label{table:challenges} \end{table*} \begin{table*}[!ht] \centering \caption{List of data collection challenges and survey responses (in \%). STA: Strongly Agree, A: Agree, SWA: Somewhat Agree, SWD: Somewhat Disagree, D: Disagree} \resizebox{\textwidth}{!}{% {\renewcommand{\arraystretch}{1.0} \rowcolors{2}{gray!25}{white} \begin{tabular}{|c|p{9cm}|cccccc|} \hline \textbf{ID} & \textbf{Statements} & \textbf{STA} & \textbf{A} & \textbf{SWA} & \textbf{SWD} & \textbf{D} & \textbf{STD} \\ \hline C11 & Find reliable and accurate data & 0.00 & \textbf{47.06} & 29.41 & 5.88 & 17.65 & 0.00 \\ \hline C12 & Find data that was up to date & 5.88 & 17.65 & \textbf{52.94} & 5.88 & 17.65 & 0.00 \\ \hline C13 & Find data that was consistent across multiple sources & 11.76 & \textbf{35.29} & 23.53 & 17.65 & 11.76 & 0.00 \\ \hline C14 & Interpret the data on sources we found & 0.00 & \textbf{35.29} & 5.88 & 23.53 & 29.41 & 5.88 \\ \hline \end{tabular} }\quad } \label{table:data_challenges} \end{table*} \subsubsection{General Challenges} We showed the students a list of possible challenges (See Table \ref{table:challenges}). None of the challenges were agreed upon by more than 50\% of the participants. Furthermore, \emph{Strongly Disagree} and \emph{Disagree} were the most selected options for this question. Our study also showed that this sentiment was not sensitive to the participant's background, as heavy disagreement was also observed when breaking down the results by demographics such as prior experience and role. While these challenges were present in the pilot study, the students did not feel strongly about their presence in the project. This relates to the active employment of several strategies, which is further discussed in Section \ref{sec:strategies}. Notably, the participants did not feel that it was challenging to manage their mental and physical health when working on the project during the pandemic (statements C2 and C3 respectively), as over 80\% disagreed with these statements. This contrasts previous research that reports an increase in psychological distress levels during the pandemic \cite{anuhardship}. The vast majority of the participants (86.84\%) did not agree that working only through an online medium was a challenge (statement C10), and 71.8\% of them felt that it was not difficult to collaborate through a purely online medium (statement C9). Despite this, we found some references in the open-ended questions, which indicates that team building and relationship forming was difficult due to having to communicate through a purely online medium. For example, a student mentioned that \emph{``the sense of belonging and community was lacking a bit in my opinion''}, and another wrote \emph{``having never met any of the other student volunteers in real life (...) was a little challenging''}. Other students described the effect of such a working style on team and project management. As an example, we have, \emph{``It was also challenging to manage the team, especially when delegating tasks because many people would join the project but may not have real commitment''}. Of the general challenges, the most prevalent was 50\% of students agreeing that establishing a work-life balance while working from home was a challenge (statement C6), which is related to the government 'stay-at-home' policies and its impact on students in managing the different areas of their lives. \begin{table*}[!ht] \centering \caption{List of general strategies and practices and survey responses (in \%)} \resizebox{\textwidth}{!}{% {\renewcommand{\arraystretch}{1.0} \rowcolors{2}{gray!25}{white} \begin{tabular}{|c|p{10cm}|ccccc|} \hline \textbf{ID} & \textbf{Statements} & \textbf{Never} & \textbf{Rarely} & \textbf{Sometimes} & \textbf{Often} & \textbf{Very} \textbf{Often} \\ \hline S1 & Worked on tasks with teammates & 2.56 & 10.26 & \textbf{38.46} & 35.90 & 12.82 \\ \hline S2 & Worked according to fixed schedule & 2.56 & 5.13 & 20.51 & \textbf{48.72} & 23.08 \\ \hline S3 & Used clear language in messages & 0.00 & 0.00 & 7.69 & 35.90 & \textbf{56.41} \\ \hline S4 & Used voice calls for discussions & 15.38 & \textbf{35.90} & 25.64 & 10.26 & 12.82 \\ \hline S5 & Responded to teammates' messages actively & 0.00 & 0.00 & 12.82 & \textbf{46.15} & 41.03 \\ \hline S6 & Encouraged and acknowledged the efforts of other teammates & 0.00 & 7.69 & 15.38 & \textbf{38.46} & \textbf{38.46} \\ \hline S7 & Celebrated project milestones with the team & 5.13 & 5.13 & 28.21 & \textbf{38.46} & 23.08 \\ \hline S8 & Distanced self from constant feed of COVID-19 related news & 17.95 & 25.64 & \textbf{30.77} & 17.95 & 7.69 \\ \hline S9 & Referred to other COVID-19 projects to help create visualisations & 20.51 & 10.26 & 25.64 & \textbf{28.21} & 15.38 \\ \hline S10 & Set up workspace separate from personal space & 12.82 & 17.95 & 23.08 & \textbf{28.21} & 17.95 \\ \hline \end{tabular} }\quad } \label{table:generalStrategies} \end{table*} \begin{table*}[!ht] \centering \caption{List of data collection strategies and practices and survey responses (in \%)} \resizebox{\textwidth}{!}{% {\renewcommand{\arraystretch}{1.0} \rowcolors{2}{gray!25}{white} \begin{tabular}{|l|p{10cm}|ccccc|} \hline \textbf{ID} & \textbf{Statements} & \textbf{Never} & \textbf{Rarely} & \textbf{Sometimes} & \textbf{Often} & \textbf{Very Often} \\ \hline S11 & Maintained a list of trustworthy sources & 0.00 & 0.00 & 12.00 & 41.00 & \textbf{47.00} \\ \hline S12 & Regularly revisited data sources to collect the most up-to-date information & 0.00 & 0.00 & 0.00 & 41.00 & \textbf{59.00} \\ \hline S13 & Discussed any differences found across data sources with my teammates & 0.00 & 6.00 & 12.00 & \textbf{47.00} & 35.00 \\ \hline S14 & Cross-checked data with multiple sources & 0.00 & 0.00 & 0.00 & \textbf{59.00} & 41.00 \\ \hline S15 & Did background research on topics related to COVID-19 & 0.00 & 6.00 & 18.00 & 35.00 & \textbf{41.00} \\ \hline \end{tabular} }\quad } \label{table:dataStrategies} \end{table*} \subsubsection{Data Collection Challenges} Data collection was one of the most dominant activities of the project, with 42.5\% of participants indicating that they were involved in data collection. Challenges related to data collection were also frequently found through the pilot study, with example Slack messages such as \emph{``gov can make a mistake and it's hard for us to always keep an eye on it''}, \emph{``they are always changing the format...''}, and \emph{``due to the lack of a federal level information hub we have to manually collect some data for our app from different places''}. Hence, we presented the participants involved in data collection with challenge statements specific to data collection, shown in Table \ref{table:data_challenges}. We observe the majority of students agreeing to the statements, which shows that these challenges were prevalent in the project. Moreover, analysis of the open questions also highlighted the issues associated with the government's reporting process in releasing information about COVID-19. One student commented that \emph{``Governments release their data at different times, which requires us to monitor and collect data throughout the entire day. This increased the workload of the job''}, and another commented, \emph{``state governments had disparate processes which made our jobs a bit harder''}. Thus, we attribute the challenges faced by students in collecting data to the reporting process by the government during the pandemic. Conversely, while collecting data was a challenge for many of the participants, the team did not consider understanding the data found on the sources difficult. Approximately 59\% of participants disagreed that it was difficult to interpret the data on the sources they found (statement C14). \begin{center} \begin{tcolorbox}[colback=black!5!white,colframe=black!75!black] \textbf{\footnotesize RQ2.} \textit{\footnotesize Students largely disagreed with the general challenges, including management of their mental health. They voiced that forming relationships and team building was difficult as the project was entirely online. They expressed more strongly that data collection was a significant challenge as it was difficult to collect reliable, accurate, and up-to-date data from various government sources.} \end{tcolorbox} \end{center} \subsection{RQ3: Strategies and Practices} \label{sec:strategies} We presented a total of 15 strategy statements, of which 5 were specifically related to data collection. We considered a strategy to be have been commonly used if they were rated ``Often'' or ``Very Often'' by the participants. \subsubsection{General Strategies} As shown in Table \ref{table:generalStrategies}, the most commonly used practices were related to communication and team well-being management. Statements S3 and S5, which were related to communication, had 92\% and 87\% of the participants indicating that they were common practices. These were practices the participants have adopted to address the communication challenges discussed in Section \ref{sec:Challenges}. The main form of communication between the project participants was through text messages rather than voice calls, as only 21\% agreed that voice calls were made for more efficient conversations (statement S4). Efforts were made to manage individual well-being. To keep the team motivated, the participants often encouraged each other (statement S6) and celebrated project milestones as a team (statement S7). In responses to the open question, a few participants also mentioned practices to manage their well-being, such as having \emph{``regular exercise, consistent sleep schedule…''} and \emph{``…periods of relaxation…''}. Another participant mentioned \emph{``building personal relationships with team members … helped during isolation''}. About 72\% of the participants also responded that they worked on a fixed schedule to manage their commitments. The open-ended questions also revealed other practices in task management, with participants mentioning that they kept track of tasks through reminders and referred to different resources to help them with their tasks. We identified a few strategies that the participants less commonly practiced. About 56\% of the participants rarely distanced themselves from the constant feed of COVID-19 news (statement S8), and close to 18\% of the participants never did so. This strategy could have been difficult to practice as the majority of the tasks revolved around data collection. Another practice that was not as popular was to refer to similar sites for data visualization creation (statement S9). Above 20\% never adopted this practice, and about 36\% did not do so frequently. This can be justified by the fact that only a quarter of the participants were involved in data visualizations. About half the participants also infrequently separated their work and personal spaces (statement S10), with only 46\% stating they have kept separate spaces for different purposes. \subsubsection{Data Collection Strategies} Most participants frequently practiced the strategies presented in the survey, with participants agreeing that they were (very) often visiting data sources for most up-to-date data (statement S12) and cross-checking data across sources (statement S14). These practices helped the participants overcome the challenges in finding reliable and accurate data (statement C11) and up-to-date data (statement C12). Responses to the open-ended questions also supported the use of these strategies, with participants mentioning Twitter updates and referring to other sites for inspiration. \begin{center} \begin{tcolorbox}[colback=black!5!white,colframe=black!75!black] \textbf{\footnotesize RQ3.} \textit{\footnotesize Frequent and clear communication through text was one of the most commonly adopted practices. Students also frequently showed appreciation and encouragement to other team members. As for data collection, students often visited trusted sources and cross-checked data to ensure the quality of data displayed on the website.} \end{tcolorbox} \end{center} \subsection{RQ4: Technical and Soft Skills} In order to determine how much the participants felt they learned from their participation in the project, we presented a set of 16 skills (8 technical and 8 non-technical). Each participant was asked to rank on a numerical scale of how confident they felt in each skill (0 being the least confident and 10 being the most confident) before and after the project. \subsubsection{Technical Skills}\label{sec:techSkills} \begin{figure}[h] \centering \includegraphics[width=7cm,height=3cm,keepaspectratio]{images/TechSkillNew.pdf} \caption{The mean of the participants' confidence in technical skills before and after participating in the COVID-19 project} \label{fig:techskills} \end{figure} As shown in Fig. \ref{fig:techskills}, out of software development-related skills, participants grew the most in front-end development with 34\%, while back-end development saw a drop in confidence by about 4\%. This can be attributed to the lack of back-end for the project, forcing back-end developers to learn and work in front-end development instead. Moreover, analyzing open responses showed that participants gained great insight into the development process of a software project. These include version control, CI/CD, the usage of Git (particularly pull requests), and code reviews. Participants who worked on data-related areas of the project grew 40\% more confident in data visualization and 30\% more confident in data collection. No participants indicated their ability to provide data updates had declined, with confidence in that area growing by roughly 27\%. It is worth noting that out of 10 participants who worked in promotion but not data-related areas, 8 participants did not recognize growth in their data collection and visualization skills. In addition, other technical areas where the participants felt more confident were language translation (36\%), UI/UX (32\%), and promotion (30\%). \subsubsection{Non-Technical Skills}\label{sec:softskills} \begin{figure}[h] \centering \includegraphics[width=7cm,height=3cm,keepaspectratio]{images/Non-techSkill.pdf} \caption{The mean of the participants' confidence in non-technical skills before and after participating in the COVID-19 project } \label{fig:sofskills} \end{figure} Although the participants were abruptly forced to adjust to the unusual circumstances of the pandemic, they showed high levels of learning and adaptability. Fig. \ref{fig:sofskills} indicates an overwhelming consensus among the participants that their understanding of COVID-19 grew by close to 80\% through their experience working on the project. They also grew roughly 31\% more confident in their ability to work online, with one student explicitly mentioning Slack as a useful tool for online work. Moreover, their confidence in time and stress management under stressful conditions grew by 24\% and 18\% respectively, with no participants indicating they had regressed in their ability to manage these aspects even under the challenging circumstances. All contributors expressed they had grown roughly 20\% more confident in teamwork. About 20 participants who stepped up to lead in specific areas or in discussions reported they grew about 28\% more confident in their leadership skills. Students especially noticed a rise in self-confidence, expressing they felt more confident \emph{``speaking up''} or \emph{``talking a lot with sponsors''}. One student identified networking as an area of growth, saying the project was a \emph{``great place to meet people''} and he \emph{``made some connections [he] was able to use''} going forward. Participants also reported they grew 24\% more confident in their ability to prioritize tasks effectively and 16\% more confident in task ownership, both of which are skills related to workload management. \begin{center} \begin{tcolorbox}[colback=black!5!white,colframe=black!75!black] \textbf{\footnotesize RQ4.} \textit{\footnotesize Students showed overall positive growth in technical and non-technical skills, particularly data-related skills, understanding of the pandemic, and working online. Students especially appreciated learning about project development aspects such as version control and CI/CD. Back-end development was the only skill participants did not grow in due to the absence of a back-end for the project.} \end{tcolorbox} \end{center} \section{Discussion}\label{sec:Discussion} \subsection{Implications for Research} \subsubsection{Student Motivation} Silva et al. found that students were motivated to participate in OSS projects by rewards and for experience \cite{silva2020google}. Our study supports this with a majority of students expressing interest in learning new skills, gaining experience for their CV, and building a network. Additionally, we observed that students were motivated to contribute by wanting to play a positive role during the pandemic and to gain experience working in a crisis. This further extends prior research as it provides an altruistic view for student motivation. Future projects may want to leverage students as reliable and responsible human resources in dealing with crises. \subsubsection{Challenges and Growth} Prior studies on professional developers identified several challenges stemming from working from home during the pandemic, such as a poor work environment, poor work-life balance, and difficulties in collaborating \cite{ford2020taleNew, bao2020does}. While these issues were also present in the student team, they were reported to a less significant degree. We also observed that the students had to balance their academic commitments, similar to professional developers balancing external commitments such as family \cite{ford2020taleNew, ralph2020pandemic}. Students who participate in such projects may be more adept at handling multiple responsibilities when entering the professional environment, which is supported by increased confidence in their task prioritization abilities. The main challenge of the COVID-19 project was data collection. Our findings suggest that the students were able to adapt to these difficulties through the employment of various data collection strategies. This resulted in students' growth in their data collection skills and contextual understanding of COVID-19. Future projects should encourage placing students in challenging environments as they may stimulate an improvement in skills. \subsubsection{Student Well-being} A major focus has been placed on developer well-being during COVID-19 \cite{ralph2020pandemic, butler2020challenges}, as WFH has often been observed to have varying impacts on an individuals well-being. The students in this project were active in maintaining the well-being of the team, with students supporting and acknowledging each other to boost team morale. This is supported by a majority expressing that mental health was not a significant challenge while working on this project. The strategies adopted by the students in maintaining well-being while working under these situations may be translated to other student teams or professional teams. \subsection{Implications for Practice} \subsubsection{Students} We observed that the students employed many strategies and practices while working on this project, and conversely, an overall disagreement with the presented challenge statements. Students who work on future projects can actively utilize the strategies discussed in this study to manage their project or team, especially if working online or within a crisis. \subsubsection{Educators} Proper management of the challenges in a project will affect the experiences and continual motivation of the students contributing to a project. Educators can leverage the challenges identified in this study, with the corresponding strategies, to help cultivate positive experiences while working. Additionally, educators can emphasize the benefits of working on a project in line with the motivations highlighted, such as gaining experience for CV. \subsubsection{Government} As discussed, the students primarily faced challenges with collecting data, as the dissemination of information was disparate and inconsistent. As the primary source of information for the students was government reporting, we recommend that efforts should be made to ensure the consistency and reliability of federal reporting across Australia. This may include presenting information in a consistent format or having a central information hub. This would be beneficial not solely to data aggregation projects, but to the general public seeking information on a crisis. \subsection{Threats to Validity} \subsubsection{Threats to External Validity} Threats to external validity refer to how our results may be generalized to other software teams of a similar nature \cite{wohlin2012experimentation}. In this study, we examined only one project team in the context of the COVID-19 pandemic. Different student teams may have different experiences depending on the nature of the students or the type of software being developed. Our findings may not generalize to other student software projects. However, the proposed methodology may provide a guideline for further studies on a larger scale. \subsubsection{Threats to Internal Validity} Threats to internal validity refer to the conditions present while conducting this study. We primarily ascertained the participants' opinions through Likert scales. The statements presented may have been biased based on preconceptions of the author. However, these statements were derived from a pilot study conducted on communication between the team members and existing literature to reduce this bias. Furthermore, the statements were finalized after several iterations and taking into account the opinions of multiple authors. This helped further reduce bias during the pilot study. We paired open-ended questions with each Likert scale question to allow the participants to express further views above the statements presented. While their responses could have been influenced by the preceding statements, we emphasized that further views should be separate from the presented statements. A monetary incentive was also provided to the participants to encourage a higher quality of response. We do not present role-specific statements aside from data collection, as the pilot study indicated that there were few role-specific challenges present in other roles. The students may have tended to give socially acceptable responses (e.g., social desirability bias \cite{furnham1986response}). We minimized this bias by assuring the students that we would not reveal their individual information and responses in any possible research outcomes. \section{Related Work}\label{sec:RelatedWork} \textbf{Software Development during the COVID-19 Pandemic}. The COVID-19 pandemic has forced many organizations to adopt the work from home (WFH) policy, requiring employees to work remotely from home. Several studies, such as \cite{perez2002benefits, ford2019remote, baker2007satisfaction}, investigated the possible positive and negative impacts of WFH on employees (e.g., increased flexibility and autonomy, reduced costs) before the COVID-19 pandemic. The majority of them targeted general workers, not only software practitioners \cite{bao2020does}. Further to this, WFH during the COVID-19 pandemic is different from traditional remote working \cite{o2021covid, rodeghero2020please, ralph2020pandemic}. Several reasons can explain this difference, for example, having additional restrictions (e.g., restricted traveling) and blended family life and work-life during the pandemic \cite{o2021covid}. Hence, some studies have recently investigated how WFH during the pandemic has changed the way developers work and its effects on developers' productivity levels and well-being. Butler et al. \cite{butler2020challenges} found that while this policy is associated with increased flexibility and spending more time with family, software engineers in a large organization often complain about the increased workload and have too many meetings due to this policy. Through a two-wave longitudinal study, Russo et al. \cite{russo2021daily} found that WFH does not \textit{per se} presents a difficulty for either organizations or software engineers. Rodeghero et al. \cite{rodeghero2020please} looked at the remote onboarding process during the pandemic. They found that newly hired software engineers faced several challenges, such as searching internal documents, constructing team connections, and seeking help and feedback. Ford et al. \cite{ford2020taleNew}, Forsgen \cite{octoverse}, and Russo et al. \cite{russo2021predictors} identified lower initial productivity of developers in the early stages of the pandemic, which eventually stabilized or recovered as developers became accustomed to the new policy in place. The studies done by Ford et al. \cite{ford2020taleNew}, Bao et al. \cite{bao2020does}, and Ralph et al. \cite{ralph2020pandemic} revealed that developer productivity is affected by their adaptability to the change in work environment and ergonomics. In these studies, developers with increased productivity quoted benefits of WFH, such as better work-life balance and flexibility in working hours. Conversely, flexibility in working hours also hindered productivity when it is not well-managed by developers \cite{ford2020taleNew}. Other reasons for lowered productivity quoted were difficulties collaborating with others \cite{bao2020does}, poor work environment \cite{bezerra2020human}, distractions \cite{ford2020taleNew, bezerra2020human}, and emotional issues \cite{bezerra2020human}. WFH also affected developers' well-being both positively and negatively. Ralph et al. \cite{ralph2020pandemic} and Russo et al. \cite{russo2021predictors} explored the relationship between developers' productivity and well-being during the pandemic and found that they are related. Developers whose well-being improved commonly mentioned better work-life balance. Varying reasons, such as less physical activities, less social interactions, and difficult communication, were quoted by developers suffering from worse well-being \cite{ford2020taleNew}. Longer workdays and working during weekends were also observed by Forsgen \cite{octoverse}. However, the WFH policy has encouraged more collaboration on OSS, evident from the increase in the number of developers in numerous projects. As these studies examined professional developers, ours provides insights into how students fare in a different work environment and its impact on their software development. \textbf{Education during the COVID-19 Pandemic}. Temporal closures on most educational institutions worldwide due to the COVID-19 pandemic \cite{unesco2020education} had a tremendous impact on the education system in various countries \cite{schleicher2020impact}. In particular, schools transitioned to remote learning to continue with the curriculum. Bao \cite{bao2020covid} looked into challenges and provided suggestions (e.g., the teaching content should be divided into smaller units to help students focus) to improve the overall experience of remote learning. It was realized that students generally had lower motivation and engagement levels with remote learning. Gonzalez et al. investigated how well university students coped during the pandemic in terms of performance and found that students developed better studying habits during this time \cite{gonzalez2020influence}. Other researchers \cite{zhang2020web, kanij2020adapting, barr2020online} investigated teaching challenges and adaptive delivery methods for software engineering courses. Zhang et al. \cite{zhang2020web} found it is possible to successfully run the distributed software development course as a joint course in different countries during the pandemic by leveraging only online platforms. \textbf{Students in OSS Development}. Some studies have leveraged OSS in software engineering education and investigated the involvement of students in OSS development \cite{silva2020google, pinto2017training, pinto2019training, holmes2014lessons,smith2014selecting}. Silva et al. \cite{silva2020google} looked at the students' motivations in joining an OSS program and found that rewards and gaining experiences were the main motivating factors. In two studies \cite{pinto2019training, pinto2017training}, it was found that using OSS in software engineering courses is associated with benefits, such as improving technical and non-technical skills, for students and costs/challenges, such as selecting the best-fitting OSS project, for lecturers and students. Holmes et al. \cite{holmes2014lessons} argued that a mentor should be assigned to help students when they are involved in an OSS project. None of these studies explored the experiences of a student team in developing an OSS project during a pandemic. Further to this, unlike the works mentioned above, the student team that we studied had no mentor, and they had to self-manage and develop the necessary policies and processes for project development (See Section \ref{sec:developmentprocess}). \section{Conclusions}\label{sec:Conclusion} We conducted an online survey to understand the experiences of the students who contributed to a COVID-19 information dashboard project during the COVID-19 pandemic. We have observed that playing a positive role in the COVID-19 crisis and learning new skills and technologies were among the most cited motivating factors for the students. The students felt that collecting data from government sources was challenging due to the inaccurate and unreliable nature of the available data. Conversely, while some students found it difficult to manage their work-life balance or form relationships with the team members, they were generally able to adapt well to the challenges while being socially isolated. Some of the strategies they used to adapt to or minimize the present challenges were frequent and clear communication in the team and uplifting team members with words of encouragement. Finally, the participants indicated an overall positive growth in their skills - especially data-related skills, understanding of the COVID-19 pandemic, working online, and an overall increase in their confidence. We hope that our research provides a clearer, deeper picture of the student response and experience in crises and contributes to identifying appropriate challenges and solutions in crisis-based software development. \bibliographystyle{IEEEtran}
\section{Introduction}\label{sec:intro} Pretrained Language Models (PLMs) such as BERT \cite{devlin2019bert} and RoBERTa \cite{liu2019roberta} provide dynamic contextual representations; they induce token-level lexical representations that capture the impact of the word's context on its embedding. Recent studies have assessed the PLMs by probing into their off-the-shelf representation/feature space \cite{gari-soler-etal-2019-comparison,wiedemann2019does,Reif:2019neurips,soler2021let}. While off-the-shelf PLMs already offer a useful contextualised lexical semantic space, their contextualised representation spaces suffer from instability and anisotropy \cite{mickus-etal-2020-mean,pedinotti-lenci-2020-dont}. As a consequence, they usually fall far behind the performance of the same PLM fine-tuned with (i) sense annotations \cite{hadiwinoto-etal-2019-improved,blevins-zettlemoyer-2020-moving} or (ii) external (e.g., WordNet) knowledge \cite{levine-etal-2020-sensebert}. \begin{figure}[t] \centering \includegraphics[width=0.999\linewidth]{figs/mirror-wic-front-page-v2.pdf} \caption{An illustrative overview of the {\textsc{MirrorWiC}}\xspace method, based on contrastive learning, for eliciting better word-in-context (WiC) representations from pretrained language models. We augment a randomly selected WiC instance with random span masking and apply dropout to the hidden states to create two slightly different representations of the base instance. These two representations form a positive pair for contrastive fine-tuning. During fine-tuning, we pull the representations of each positive pair closer together, while at the same time pushing away representations of other WiC instances, serving as negative examples.} \label{fig:overview} \end{figure} However, PLMs have been shown to actually store more lexical and sentence-level information than what can be directly extracted from their off-the-shelf variants. In simple words, this knowledge must be `unlocked' or exposed via additional adaptive fine-tuning \cite{Ruder:2021blog}. For instance, while off-the-shelf PLMs are not directly effective as universal sentence encoders, it is possible to convert them into such encoders through supervised \cite{reimers2019sentence,Feng:2020labse,liu2020self} or self-supervised fine-tuning \cite{carlsson2021semantic,liu2021fast,gao2021simcse} based on the \textit{contrastive learning} paradigm. The fundamental limitation of extracting contextual features/representations directly from the layers of the off-the-shelf PLMs is the mismatch between their (pre)training objectives and the feature extraction method. In other words, the contextual representations, typically extracted as the averages over the top four layers of a base PLM \cite{liu2020towards,soler2021let}, can be seen as a by-product of training a language model, and are not directly optimised for contextual sensitivity. Inspired by the previous work on adaptive fine-tuning for word and sentence representations \cite{liu2021fast}, we propose a simple self-supervised technique termed {\textsc{MirrorWiC}}\xspace: it \textit{rewires} input PLMs to provide improved word-in-context (WiC) representations. Unlike prior work on fine-tuning towards improving WiC representations, our {\textsc{MirrorWiC}}\xspace procedure disposes of any sense labels, annotated task data, and any external knowledge, and elicits improved WiC representations from PLMs in a \textit{fully unsupervised} way. We design a contrastive learning framework that directly optimises the contextual representations (i.e., the top four hidden layers of the input PLM) that are also the feature space at inference time; see Figure~\ref{fig:overview} and Table~\ref{tab:train_inference_consistency}. {\textsc{MirrorWiC}}\xspace relies on the sets of positive and negative pairs, where the positive pairs are created by pairing an input sequence (which contains a target word) with its slightly altered variant. This altered sequence is obtained via random span masking and the resulting representations for this pair are further altered by dropout. The negative pairs are then simply the same or different word's contextual representations in a different context; Figure~\ref{fig:overview}. These pairs for fine-tuning are mined from raw Wikipedia sentences. To understand why {\textsc{MirrorWiC}}\xspace works so well, we provide ablation studies on the design choices (including dropout rate, random span masking, etc.) and layer-wise analyses and visualisation on {\textsc{MirrorWiC}}\xspace's effects on embedding properties such as isotropy. \vspace{2.0mm} \noindent \textbf{Contributions.} \textbf{1)} We present a simple yet extremely effective unsupervised {\textsc{MirrorWiC}}\xspace technique for eliciting contextual lexical knowledge. \textbf{2)} Our experiments on a range of English, multilingual, and cross-lingual context-sensitive lexical benchmarks demonstrate that {\textsc{MirrorWiC}}\xspace achieves consistent and substantial improvements over different baseline PLMs, indicating its robustness and wide applicability. \textbf{3)} We offer extensive analyses and additional insights into the inner workings of {\textsc{MirrorWiC}}\xspace, and its impact on the contextual representation space. We release our code at {\small \url{github.com/cambridgeltl/MirrorWiC}}. \section{Related Work and Background}\label{sec:rw} \noindent \textbf{Word-in-Context Representations.} Modelling context influence on lexical meaning and creating context-aware word representations is a long-standing research goal in lexical semantics. One direction is to create discrete sense embeddings according to a fixed sense inventory such as WordNet. These embeddings can be created from the attributes in the sense inventory such as glosses \cite{chen-etal-2014-unified} or from the knowledge structure \cite{camacho2016nasari}. We point to \citet{camacho2018word} for a thorough survey on sense embeddings. Such sense representations require a fixed and discrete sense inventory and might not be sensitive enough to the the dynamic and fluid nature of contextual changes. More recently, PLMs provide dynamic and continuous contextual representations, not tied to predefined sense inventories, computed as a function of both the target word and its context. The use of PLMs has resulted in further progress on a range of context-aware evaluation benchmarks \cite{pilehvar2019wic,Wang:2019superglue,raganato-etal-2020-xl}. A body of work has aimed to enrich context-aware and sense information in the PLMs by injecting such knowledge (e.g., sense annotations from predefined sense inventories) at pretraining stage \cite{levine-etal-2020-sensebert} or during inference \cite{loureiro-jorge-2019-language}. Other work has attempted at combining/ensembling multiple contextualised and static type-level embeddings to refine the contextualised representation space \citep{liu2020towards,xu2020improving}. \vspace{2.0mm} \noindent \textbf{Inducing Text Representations from PLMs via Self-Supervision.} Recently, there has been growing interest in learning completely unsupervised sentence representations from PLMs using contrastive learning techniques \citep{carlsson2021semantic,liu2021fast,gao2021simcse,yan2021consert,kim-etal-2021-self,zhang-etal-2021-bootstrapped}. Similar to the supervised approaches such as Sentence-BERT \cite{reimers-gurevych-2019-sentence} or SapBERT \cite{liu2020self}, the idea is to transform an input PLM into an effective sentence encoder via additional fine-tuning. During self-supervised contrastive fine-tuning, the model learns from identical or automatically modified text sequences (treated as positive examples), and regards different sentences as negative pairs. {\textsc{MirrorBert}}\xspace \citep{liu2021fast} is a general self-supervised contrastive fine-tuning framework that transforms off-the-shelf PLMs into effective word and sentence encoders. Our proposed {\textsc{MirrorWiC}}\xspace method can be seen as an extension of {\textsc{MirrorBert}}\xspace, now focused on eliciting improved word-in-context representations and context-sensitive lexical tasks. \begin{table*}[!t] \centering \small \begin{tabular}{lll} \toprule model & representations fine-tuned & representations extracted \\ \midrule off-the-shelf PLMs & (\texttt{[CLS]} +) language modelling head & word token average (top four layers) \\ {\textsc{MirrorBert}}\xspace & \texttt{[CLS]}/mean-pooling & \texttt{[CLS]}/mean-pooling\\ {\textsc{MirrorWiC}}\xspace & word token average (top four layers) & word token average (top four layers)\\ \bottomrule \end{tabular \caption{{\textsc{MirrorWiC}}\xspace benefits from the consistency of representations at (i) fine-tuning and (ii) feature extraction and inference: both are focused on word-in-context (WiC) representations.} \label{tab:train_inference_consistency} \end{table*} \begin{table}[!t] \centering \def0.75{0.97} \setlength{\tabcolsep}{1.2pt} \resizebox{1.0\columnwidth}{!}{ \begin{tabular}{cl} \toprule \multicolumn{2}{l}{Step 1: Automatic dataset creation for WiC fine-tuning} \\ \midrule $({\color{Blue}x_1},{\color{magenta}y_1})$ & ({\color{Blue}\textit{Due to the fat-tailed \textbf{nature} of pandemic risk, \ldots}}, {\color{magenta}$1$}) \\ $({\color{Blue}\overline{x}_1},{\color{magenta}\overline{y}_1)}$ & ({\color{Blue}\textit{Due to the fat-tailed \textbf{nature} of pandemic risk, \dots},} {\color{magenta}$1$})\\ \ldots & \ldots \\ $({\color{Blue}x_i},{\color{magenta}y_i})$ & ({\color{Blue}\textit{Human interaction with \textbf{nature} has played a major role.}}, {\color{magenta}$i$}) \\ $({\color{Blue}\overline{x}_i},{\color{magenta}\overline{y}_i})$ & ({\color{Blue}\textit{Human interaction with \textbf{nature} has played a major role.}}, {\color{magenta}$i$}) \\ \ldots & \ldots \\ $({\color{Blue}x_N}, {\color{magenta}y_N})$ & ({\color{Blue}\textit{The end doesn't always \textbf{justify} the means.}}, {\color{magenta}$N$}) \\ $({\color{Blue}\overline{x}_N}, {\color{magenta}\overline{y}_N})$ & ({\color{Blue}\textit{The end doesn't always \textbf{justify} the means.}}, {\color{magenta}$N$}) \\ \midrule \multicolumn{2}{l}{Step 2: Random span masking} \\ \midrule $({\color{Blue}x_1}, {\color{magenta}y_1})$ & ({\color{Blue}\textit{Due to the fat-tailed \textbf{nature} of pandemic risk, \dots}}, {\color{magenta}$1$}) \\ $({\color{Blue}\overline{x}_1}, {\color{magenta}\overline{y}_1})$ & ({\color{Blue}\textit{Due \_e fat-tailed \textbf{nature} of pandemic \_ \ldots}}, {\color{magenta}$1$})\\ \ldots & \ldots \\ $({\color{Blue}x_i}, {\color{magenta}y_i})$ & ({\color{Blue}\textit{Human interaction with \textbf{nature} has played a major role.}}, {\color{magenta}$i$}) \\ $({\color{Blue}\overline{x}_i},{\color{magenta}\overline{y}_i)}$ & ({\color{Blue}\textit{Human intera\_ with \textbf{nature} has play\_major role.}}, {\color{magenta}$i$}) \\ \ldots & \ldots \\ $({\color{Blue}x_N},{\color{magenta}y_N})$ & ({\color{Blue}\textit{the end does not always \textbf{justify} The means.}},{\color{magenta}$N$}) \\ $({\color{Blue}\overline{x}_N},{\color{magenta}\overline{y}_N)}$ & ({\color{Blue}\textit{The end does\_always \textbf{justify} \_eans.}}, {\color{magenta}$N$}) \\ \bottomrule \end{tabular}} \caption{Upper: the automatically generated labelled dataset for fine-tuning PLMs towards learning better word-in-context representations. \textbf{Bold} denotes the target word. Lower: data augmentation via random span masking. `\_' denotes the `[MASK]' token.} \label{tab:data} \end{table} \section{{\textsc{MirrorWiC}}\xspace: Methodology} \label{sec:method} \noindent \textbf{Baseline WiC Representations.} Prior work directly extracts word-in-context representations from the parameters of the off-the-shelf PLMs. The most effective (empirically validated) strategy is 1) averaging the representations from the top four PLM's layers, and 2) then taking either the first constituent subword from the PLM's vocabulary to represent the target word, or further averaging the representations of the word's constituent subwords \citep{liu2020towards,soler2021let}. \subsection{Self-Supervised WiC Fine-Tuning} We hypothesise that it is possible to convert the input PLM into an improved WiC encoder through adaptive (self-supervised) fine-tuning. Given a set of raw sentences without labels, how do we tune the PLMs to further expose their word-in-context knowledge? Inspired by {\textsc{MirrorBert}}\xspace \citep{liu2021fast}, we apply a self-supervised contrastive learning scheme to elicit better word-in-context representations. We fine-tune the input PLM by contrasting the representations of different word-in-context pairs while pulling representations of a self-duplicated word-in-context pair closer in the representation space (see Figure~\ref{fig:overview}). \vspace{2.0mm} \noindent \textbf{Data Creation.} Given a set of $N$ non-duplicated sentences, we randomly select a word in each sentence as the target word: i.e., the sentences become a set of `word-in-context instances'. We then follow {\textsc{MirrorBert}}\xspace and generate a labelled dataset by duplicating each instance in the set and assigning identical labels to identical instances and different labels to different word-in-contexts (\Cref{tab:data}, upper half): $\mathcal{D} = \{(x_1, y_1), (\overline{x}_1, \overline{y}_1), \ldots, (x_N, y_N), (\overline{x}_N, \overline{y}_N)\}$, where $\forall i=1,\ldots N$, it holds $x_i = \overline{x}_i, y_i = \overline{y}_i$. \vspace{2.0mm} \noindent \textbf{Data Augmentation.} We further follow {\textsc{MirrorBert}}\xspace to create a slightly altered (or augmented) `view' of the same text sequence: we randomly replace a span of text with `[MASK]'\footnote{Or `<MASK>' for input to RoBERTa.} in all duplicated examples. There is a fundamental difference to {\textsc{MirrorBert}}\xspace where such `random span masking' technique is applied on sentences; for word-in-context, we keep the target word intact (otherwise the semantics changes drastically) and randomly replace a span of length $K$ on \textit{both sides} of the target word; see \Cref{tab:data} (lower half). Besides random span masking, the dropout modules in the Transformer layers also slightly and randomly alter the representations of each word-in-context instance. They serve as another source of data augmentation to further perturb the word-in-context representations. After both input space augmentation (random span masking) and feature space augmentation (dropout layers embedded in the Transformer layers), the resulting embeddings of even a positive pair will be slightly different.\footnote{Note that random span masking is applied on only one instance of each duplicated pair, while the dropouts are applied to all instances.} \vspace{2.0mm} \noindent \textbf{Contrastive Fine-Tuning.} Following the feature extraction procedure from off-the-shelf PLMs, we compute the average of hidden states from the PLM's top four layers, and then take the average of all token(s) that correspond to the target word, as the word-in-context representation. Let $f(\cdot)$ denote the encoder which outputs such WiC representation. We leverage InfoNCE \citep{oord2018representation} to cluster/attract the positive pairs together and push away the negative pairs in the embedding space: \vspace{-2mm} {\footnotesize \begin{equation} \mathcal{L} = -\sum_{i=1}^{N}\log\frac{\exp(\cos(f(x_i), f(\overline{x}_i))/\tau)}{\displaystyle \sum_{x_j\in \mathcal{N}_i}\exp(\cos(f(x_i), f(x_j))/\tau)}. \label{eq:infonce} \end{equation} }% \noindent where $\tau$ is a tunable temperature; $\mathcal{N}_i$ denotes all negatives of $x_i$, which includes all $x_j,\overline{x}_j$ where $i\neq j$ in the current data batch (i.e., $|\mathcal{N}_i| = N - 2$). Intuitively, the numerator is the similarity of the self-duplicated pair (a positive pair) and the denominator is the sum of the similarities between $x_i$ and all other strings besides $\overline{x}_i$ (negative pairs). For positive pairs, though one sequence in the pair is slightly altered via random span masking and the representations go through dropout, the encoding function $f(\cdot)$ should learn an invariant mapping and reconstruct the correct semantics from the noise \cite{liu2021fast}. Most negative examples contain different target words and different contexts (e.g., $x_1$ and $x_N$ in \Cref{tab:data}). Naturally, such pairs are of different meanings and the model should produce different representations.Note that it is possible to also have the same target word appearing in different contexts as a negative pair (e.g., $x_1$ and $x_i$ in \Cref{tab:data}). If the pair indeed has very different semantics (of a different sense), then pushing them apart is actually desirable. However, even if the items in the pair happen to have similar meanings, our learning objective still instructs the model to push them away from each other. Our rationale and decision here are based on the following: (1) Such \textit{false} negative pairs can act as a regularisation; and (2) in essence, one could argue that all distinct word-in-context instances have slightly different meanings since sense is a continuous function of word and context. \section{Experimental Setup} \label{sec:exp} \noindent \textbf{WiC Evaluation.} We evaluate {\textsc{MirrorWiC}}\xspace on a range of context-sensitive lexical semantic tasks in monolingual English settings, as well as in multilingual and cross-lingual settings. For English, we evaluate on two similarity-based tasks: \textit{Usim} and \textit{CoSimLex}; two word-in-context classification tasks: \textit{WiC} and \textit{WiC-TSV}; and one-shot Word Sense Disambiguation (WSD). {Usim} \citep{erk2013measuring} measures the similarity between two instances of the same word occurring in two different sentential contexts. {CoSimLex} \cite{armendariz2020cosimlex} measures the change in similarity between two different words appearing in two different contexts: paragraphs. We follow the standard evaluation protocol, computing the cosine similarity of the contextual word representations and comparing them against human-elicited scores via Spearman's rank correlation ($\rho$). The WiC classification task \citep{pilehvar2019wic} challenges a model to make a binary decision on whether or not the same target word has the same meaning in two different contexts. The {WiC-TSV} (TSV) task \citep{breit-etal-2021-wic} extends the original \textit{WiC} to multiple domains with three different subtasks. In TSV-1, the task is to decide if the intended sense of the target word in the context matches the target sense described by the definition. In TSV-2, the model must identify if the intended sense (in the context) is the hyponym of the provided hypernyms. TSV-3 combines the previous two subtasks (see \citet{breit-etal-2021-wic} for further details). The WSD task \cite{navigli2009word,Raganato:2017eacl} requires a system to select the correct label for a given target word in context from a candidate set of all possible meanings for this target word. To evaluate the feature space of the models in WSD, we create a one-shot setting where we provide one context example\footnote{The context examples are taken from WordNet entries. If a sense does not contain context, we reformat the definition as '<target word> means ...' as the target word's context.} per label and perform nearest neighbour search over contextual word representations from the candidate labels. We directly test the models on the concatenated \texttt{ALL} test set from \citet{Raganato:2017eacl} without access to training and development data. We also perform multilingual and cross-lingual evaluation on \textit{XL-WiC} \citep{raganato-etal-2020-xl} and \textit{AM2iCo} \citep{liu2021am2ico}. XL-WiC provides WiC-style evaluations in multiple languages. AM2iCo extends XL-WiC to lower-resource languages, adds more difficult adversarial examples, and enables cross-lingual evaluations. For brevity, we show results for four typologically diverse languages both from XL-WiC ({\textsc{zh}}\xspace, {\textsc{ko}}\xspace, {\textsc{hr}}\xspace, {\textsc{et}}\xspace); and four languages in AM2iCo ({\textsc{zh}}\xspace, {\textsc{ka}}\xspace, {\textsc{ja}}\xspace, {\textsc{ar}}\xspace).\footnote{{\textsc{zh}}\xspace: Mandarin Chinese, {\textsc{ko}}\xspace: Korean, {\textsc{hr}}\xspace: Croatian, {\textsc{et}}\xspace: Estonian, {\textsc{ka}}\xspace: Georgian, {\textsc{ja}}\xspace: Japanese, {\textsc{ar}}\xspace: Arabic.} For WiC, TSV, XL-WiC and AM2iCo, our main experiments follow the unsupervised method from \citet{pilehvar2019wic}: we compute cosine similarity between the contextual word representations in each pair, and search for a threshold to divide true (i.e., same meaning) and false instances on the development set in each task.\footnote{We add templates in each TSV subtask: `[target word] means <definition>' (TSV-1); `[target word] is a kind of <hypernym>' (TSV-2) and `[target word] is a kind of <hypernym> and means <definition>' (TSV-3). We then compute similarity based on the contextual representations of the target words in these templates. This results in an unsupervised approach which is more effective than the approach from prior work \citep{breit-etal-2021-wic}, where cosine similarity is computed on definition/hypernym embeddings.} We report accuracy scores in the main paper, while additional area-under-curve (AUC) scores are available in \Cref{sec:auc}. \vspace{2.0mm} \noindent \textbf{Underlying PLMs.} We experiment with several standard input PLMs for English, but we remind the reader that the {\textsc{MirrorWiC}}\xspace framework is applicable with a wide range of PLMs: \textbf{1)} BERT \cite{devlin2019bert} as a standard choice for WiC representation learning and evaluation \cite{raganato-etal-2020-xl}; \textbf{2)} RoBERTa \cite{liu2019roberta} as an optimised and improved PLM; and \textbf{3)} DeBERTa \cite{he2020deberta} as a more recent PLM that achieves state-of-the-art results in a range of natural language understanding tasks \cite{Wang:2019superglue}.\footnote{DeBERTa extends the standard BERT architecture by incorporating two novel techniques: disentangled attention that encodes a word's content and position separately, and an enhanced masked decoder that incorporates absolute position for predicting masked tokens during masked language modelling.} For all non-English experiments, unless noted otherwise, we rely on multilingual BERT (mBERT) as the underlying PLM (see \Cref{sec:encoder}). \vspace{2.0mm} \noindent \textbf{Fine-Tuning Details.} We largely follow the {\textsc{MirrorBert}}\xspace fine-tuning setup \cite{liu2021fast}, using 10k sentences randomly drawn from Wikipedia as the {\textsc{MirrorWiC}}\xspace fine-tuning corpus. For monolingual models, we sample 10k sentences from the corresponding Wikipedia of that language. For cross-lingual models, we sample 5k sentences from English Wikipedia and 5k from Wikipedia of each target language. We train all models with AdamW \cite{loshchilov2018decoupled} with a learning rate of \texttt{2e-5} for 1 epoch. The $\tau$ in \Cref{eq:infonce} is set to $0.04$. We set $K$ (random span masking rate) to $10$, $0$ and $1$ for BERT, RoBERTa and DeBERTa respectively. The respective dropout rates are $0.4$, $0.3$ and $0.3$ for BERT, RoBERTa and DeBERTa. All hyper-parameters are tuned on the development set of WiC and kept unchanged for all other experiments. We refer the reader to the Appendix (\Cref{Table:search_space}) for a full listing of hyperparameters along with their search space. \section{Results and Discussion} \label{sec:results} \begin{table*}[t!] \footnotesize \setlength{\tabcolsep}{3.0pt} \centering \begin{tabular}{lcccccccccccccccccccccccccccccc} \toprule model$\downarrow$, dataset$\rightarrow$ & Usim ($\rho$) & WiC (acc) & TSV-1 (acc) & TSV-2 (acc) & TSV-3 (acc) & CoSimLex ($\rho$) & One-shot WSD (acc)\\ \midrule Sentence-BERT &23.57& 61.91 & 62.46 &59.64 &62.72&-& 42.63\\ {\textsc{MirrorBert}}\xspace &23.21 & 64.10 & 66.32 & 64.78 & 66.32 & - & 44.93\\ \midrule BERT & 54.52 & 68.49 & 61.69 & 60.66 & 61.95 & 76.2 & 52.90 \\ \rowcolor{cyan!10} + {\textsc{MirrorWiC}}\xspace & 61.82 & \textbf{71.94} & 69.15 & 66.06 & 68.38 & 77.41 & 57.10\\ \cmidrule(l){2-9} RoBERTa& 50.25& 66.77& 55.52& 56.55& 57.58& 75.64 &51.38\\ \rowcolor{cyan!10} + {\textsc{MirrorWiC}}\xspace & 57.95& 71.15 &69.92& 67.60& 71.70& 77.27 & 56.51\\ \cmidrule(l){2-9} DeBERTa& 54.77& 66.14 & 59.38 &59.89 & 60.41 &72.06& 53.99 \\ \rowcolor{cyan!10} + {\textsc{MirrorWiC}}\xspace & \textbf{62.79} & 71.78 & \textbf{70.95} & \textbf{67.86} & \textbf{71.20} & \textbf{77.70}& \textbf{59.02}\\ \bottomrule \end{tabular} \caption{Results across a collection of context-aware lexical semantic tasks in English. \label{table:main}} \end{table*} \subsection{Main Results: Evaluation on English} \label{ss:resen} The main results are provided in \Cref{table:main} and \Cref{table:sup}. Most notably, we observe consistent and substantial gains over all unsupervised baselines, including the off-the-shelf PLMs without {\textsc{MirrorWiC}}\xspace fine-tuning. While the underlying PLMs, as suggested by prior work \cite{soler2021let}, do encode a wealth of sense-related knowledge, that knowledge can be further exposed via the proposed context-aware {\textsc{MirrorWiC}}\xspace fine-tuning procedure. \begin{figure*}[!t] \begin{subfigure}{0.4\textwidth} \includegraphics[width=\linewidth]{figs/wic_acc_against_layer_bert+mirrorwic.pdf} \caption{{BERT layer-wise accuracy; WiC dev }} \label{fig:wic_bert} \end{subfigure}\hspace*{\fill} \begin{subfigure}{0.4\textwidth} \includegraphics[width=\linewidth]{figs/wic_acc_against_layer_deberta+mirrorwic.pdf} \caption{{DeBERTa layer-wise accuracy; WiC dev }} \label{fig:wic_deberta} \end{subfigure} \medskip \begin{subfigure}{0.4\textwidth} \includegraphics[width=\linewidth]{figs/isotropy_against_layer_bert+mirrorwic.pdf} \caption{BERT isotropy (higher is better)} \label{fig:iso_bert} \end{subfigure}\hspace*{\fill} \begin{subfigure}{0.4\textwidth} \includegraphics[width=\linewidth]{figs/isotropy_against_layer_deberta+mirrorwic.pdf} \caption{DeBERTa isotropy (higher is better)} \label{fig:iso_deberta} \end{subfigure} \medskip \begin{subfigure}{0.4\textwidth} \includegraphics[width=\linewidth]{figs/cosine_against_layer_bert+mirrorwic.pdf} \caption{BERT random-word cosine similarity} \label{fig:ran_bert} \end{subfigure}\hspace*{\fill} \begin{subfigure}{0.4\textwidth} \includegraphics[width=\linewidth]{figs/cosine_against_layer_deberta+mirrorwic.pdf} \caption{DeBERTa random-word cosine similarity} \label{fig:ran_deberta} \end{subfigure} \medskip \begin{subfigure}{0.4\textwidth} \includegraphics[width=\linewidth]{figs/intra_sent_cosine_against_layer_bert+mirrorwic.pdf} \caption{BERT intra-sentence cosine similarity} \label{fig:intra_bert} \end{subfigure}\hspace*{\fill} \begin{subfigure}{0.4\textwidth} \includegraphics[width=\linewidth]{figs/intra_sent_cosine_against_layer_deberta+mirrorwic.pdf} \caption{DeBERTa intra-sentence cosine similarity} \label{fig:intra_deberta} \end{subfigure} \caption{Layer-wise analyses of BERT (left column) and DeBERTA (right column) before and after applying {\textsc{MirrorWiC}}\xspace. The first row (a,b) shows the model performance and can be linked to the isotropy analysis (the middle two rows: c,d,e,f) and contextualisation analysis (the last row: g,b). Task performance correlates strongly with isotropy and contextualisation changes especially in the last four layers (highlighted with dots); shade=variance.} \label{fig:analysis} \end{figure*} \vspace{2.0mm} \noindent \textbf{Impact of the Underlying PLM (\Cref{table:main}).} {\textsc{MirrorWiC}}\xspace is effective with BERT, RoBERTa and DeBERTa. DeBERTa+{\textsc{MirrorWiC}}\xspace yields larger gains, and even results in the highest absolute scores on average. In other words, a seemingly `weaker' off-the-shelf PLM under the naive feature extraction baseline (DeBERTa) is transformed into the best-performing WiC encoder after the {\textsc{MirrorWiC}}\xspace procedure. This hints at the necessity to unlock the input PLM's 'task solving potential' through adaptive fine-tuning. \vspace{2.0mm} \noindent \textbf{Comparison with Sentence Encoders (\Cref{table:main}).} We also probe how modelling the sentences (without knowing which target word the context is describing) performs on the evaluation tasks. In particular, we evaluate the standard 'go-to' sentence encoder Sentence-BERT \citep{reimers-gurevych-2019-sentence}, and the original {\textsc{MirrorBert}}\xspace \citep{liu2021fast}. We find that {\textsc{MirrorWiC}}\xspace, with its direct focus on word-in-context representations and WiC-oriented fine-tuning, substantially outperforms the two sentence encoders. The finding validates our hypothesis that naively applying sentence encoders is not sufficient for context-aware lexical semantic tasks. While the two sentence encoders do provide competitive performance in WiC-style tasks, their performance decreases drastically on Usim. This further indicates that the fine-grained similarity-based Usim evaluation requires a more accurate and subtler contextual lexical semantic ability than the binary classification in WiC. \vspace{2.0mm} \noindent \textbf{Comparison with Supervised WiC Methods (\Cref{table:sup}).} The scores reveal that the unsupervised BERT + {\textsc{MirrorWiC}}\xspace variant can even outperform the supervised model (fine-tuned with labelled in-task data) in the WiC task. The results on TSV indicate that the gap between the unsupervised BERT-based approach to the supervised performance is much reduced: from the $\sim$10\% gap to only $\sim$2\% in all three TSV tasks when {\textsc{MirrorWiC}}\xspace is applied. \subsection{Multilingual and Cross-Lingual Results} The results are summarised in \Cref{table:xl}. Notably, we observe that the effectiveness of {\textsc{MirrorWiC}}\xspace is not tied to English, and extends to other languages. We observe consistent improvements with the underlying PLMs monolingually pretrained in other languages, as well as with the multilingually pretrained mBERT. The gains on XL-WiC are more pronounced than on the more difficult AM2iCo benchmark. By design AM2iCo is a more challenging benchmark, and additional external knowledge injection might be necessary to improve the results further; unlike XL-WiC, AM2ico requires the models to understand the cross-lingual correspondence of mostly entity names that occur less frequently. \begin{table}[t!] \small \setlength{\tabcolsep}{4.2pt} \centering \begin{tabular}{llccccccccccccccccccccccccccccc} \toprule model$\downarrow$, dataset$\rightarrow$ & WiC & TSV-1 & TSV-2 & TSV-3 \\ \midrule BERT & 65.85 & 65.08 & 62.09& 63.16\\ \rowcolor{cyan!10} + {\textsc{MirrorWiC}}\xspace & \textbf{69.64} & 73.66 & 69.83 & 73.73 \\ \midrule task-supervised BERT& 69.00 & \textbf{75.30} & \textbf{71.40} & \textbf{76.60} \\ \bottomrule \end{tabular} \caption{BERT+{\textsc{MirrorWiC}}\xspace versus supervised BERT-based methods on the test sets of English WiC-style tasks. The supervised variant on WiC is replicated from \citet{Wang:2019superglue}. The supervised results on TSV are taken from \citet{breit-etal-2021-wic}.} \label{table:sup} \end{table} \begin{table}[!t] \centering {\small \begin{tabular}{lccccccccccccccccccccccccccccccccc} \toprule XL-WiC & {\textsc{zh}}\xspace* & {\textsc{ko}}\xspace* & {\textsc{hr}}\xspace & {\textsc{et}}\xspace\\ \midrule BERT & 73.74 & 68.41 & 61.10 & 57.06 \\ \rowcolor{cyan!10} + {\textsc{MirrorWiC}}\xspace & \textbf{75.70} & \textbf{72.26} & \textbf{67.32} & \textbf{61.43} \\ \midrule \midrule AM2iCo & {\textsc{zh}}\xspace & {\textsc{ka}}\xspace & {\textsc{ja}}\xspace & {\textsc{ar}}\xspace \\ \midrule BERT & 63.80 & 59.90 & 64.10 & 60.60 \\ \rowcolor{cyan!10} + {\textsc{MirrorWiC}}\xspace & \textbf{64.60} & \textbf{61.00} & \textbf{64.70} & \textbf{63.90} \\ \bottomrule \end{tabular} }% \caption{Results (test set accuracy) on multilingual and cross-lingual word-in-context tasks. We use mBERT as the underlying PLM for all the languages except for {\textsc{zh}}\xspace* and {\textsc{ko}}\xspace* (in XL-WiC) where their monolingual BERT models were used. \label{table:xl}} \end{table} \subsection{Further Discussion and Analyses} \label{ss:further} \noindent \textbf{Layer-wise Performance (\Cref{fig:wic_bert,fig:wic_deberta}).} The figures reveal that the success of {\textsc{MirrorWiC}}\xspace is attributed to the performance gains achieved in the last four layers of the fine-tuned PLMs. This is expected as these four layers are exactly what we optimise in the {\textsc{MirrorWiC}}\xspace procedure. This also confirms our hypothesis that matching training and inference representations helps adapt and elicit word-in-context knowledge from the PLMs. \vspace{2.0mm} \noindent \textbf{Isotropy (\Cref{fig:iso_bert,fig:iso_deberta}).} As empirically validated in prior work on sentence representations \cite{gao2021simcse,liu2021fast}, contrastive fine-tuning reshapes the embedding space geometry towards more isotropic representations, which in turn has a positive impact on semantic similarity tasks. We now examine whether the same `isotropy-increasing' effect is achieved with {\textsc{MirrorWiC}}\xspace. To this end, we leverage a quantitative isotropy score (IS), proposed in prior work \citep{arora2016latent,mu2017all},\footnote{The same metric is used for measuring isotropy of contextual word representations by \citet{rajaee-pilehvar-2021-cluster}.} and defined as: \vspace{-1mm} {\footnotesize \begin{equation} \text{IS} (\mathcal{V}) = \log \left(\frac{\min_{\mathbf{c}\in \mathcal{C}} \sum_{\mathbf{v}\in \mathcal{V}}\exp(\mathbf{c}^\top\mathbf{v})}{\max_{\mathbf{c}\in \mathcal{C}} \sum_{\mathbf{v}\in \mathcal{V}}\exp(\mathbf{c}^\top\mathbf{v})} \right) \end{equation} }% where $\mathcal{V}$ is the set of vectors, $\mathcal{C}$ is the set of all possible unit vectors in the embedding space (i.e., $\{\mathbf{c} : |\mathbf{c}|=1\}$). Practically, $\mathcal{C}$ is approximated by the eigenvector set of $\mathbf{V}^\top\mathbf{V}$ ($\mathbf{V}$ is the stacked embeddings of $\mathcal{V}$). The larger the IS value, the more isotropic an embedding space is.\footnote{We randomly sample 10k sentences from English Wikipedia as $\mathcal{V}$. We compute the average word-in-context embeddings for all words in each sentence and then compute the IS value. We repeat the process for five times to reduce the randomness introduced in sampling.} As seen in \Cref{fig:iso_bert} and \Cref{fig:iso_deberta}, both BERT and DeBERTa create more isotropic embedding spaces in general in the last four layers after {\textsc{MirrorWiC}}\xspace training. Note that DeBERTa's space isotropy is able to benefit more from {\textsc{MirrorWiC}}\xspace, which also explains its large gains in the end tasks. It is also possible to assess isotropy by simply looking at the cosine similarity of random words \cite{ethayarajh-2019-contextual}. We calculate word representations in each layer as the average of the word's contextual representations from Wikipedia. We then take five random samples of 200 random words and compute pair-wise similarity. We take the average of the similarity scores in each sample with variance reported in \Cref{fig:ran_bert} and \Cref{fig:ran_deberta}. The results confirm the trend: the last four layers with {\textsc{MirrorWiC}}\xspace exhibit much lower random word cosine similarities than the off-the-shelf PLM. \begin{table*}[th] {\footnotesize \begin{tabularx}{\textwidth}{p{0.33\textwidth}p{0.27\textwidth}p{0.1\textwidth}p{0.12\textwidth}p{0.05\textwidth}} \toprule {\bf Word-in-context 1} & {\bf Word-in-context 2}&{\bf \textsc{BERT}} & {\bf \textsc{+{\textsc{MirrorWiC}}\xspace}} &Gold\\ \midrule \textit{\textbf{Spend} money.} & \textit{He \textbf{spends} far more on gambling than he does on living proper.} & -0.0850~(F) &0.2327~(T) &T\\ \midrule[0.05pt] \textit{That toaster can make wonderful \textbf{toasts}.} & \textit{I ate a piece of \textbf{toast} for breakfast.} & 0.0160~(F) &0.3234~(T)& T \\ \midrule \textit{War is \textbf{hell}.} & \textit{The \textbf{hell} of battle.} &-0.0403~(F)&0.2378~(T) &F\\ \midrule[0.05pt] \textit{\textbf{Ease} the pain in your legs.} & \textit{The pain \textbf{eased} overnight.} & 0.0157~(F)&0.2873~(T)&F\\ \bottomrule \end{tabularx} } \caption{Examples of changed cosine similarity scores (isotropy-adjusted) after {\textsc{MirrorWiC}}\xspace; English WiC (dev). \label{table:wic_error}} \end{table*} \begin{figure*}[h] \centering \includegraphics[width=0.93\linewidth]{figs/cluster_spring.pdf} \caption{t-SNE embedding visualisation of different senses of \textit{spring} and \textit{summer} under different models.} \label{fig:tsne_spring} \end{figure*} \vspace{2.0mm} \noindent \textbf{Intra-Sentence Similarity (\Cref{fig:intra_bert,fig:intra_deberta}).} As a measure of \textit{contextualisation}, we follow \citet{ethayarajh-2019-contextual}, and define intra-sentence similarity as each word's similarity to its context. The context is computed as the mean vector of all the word representations in the sentence. The scores are isotropy-adjusted \ignore{Flora: consistent with the figure} by substracting the intra-sentence similarity scores by the random word similarity in each layer, see \cite{ethayarajh-2019-contextual}. For both BERT and DeBERTa, we can see that the last four layers become more contextualised after applying {\textsc{MirrorWiC}}\xspace: they encode more information about the context as the contextual word representations become much more similar to its context in the top Transformer layers than in the base PLM. This increased contextualisation could explain why {\textsc{MirrorWiC}}\xspace gives better performance in the context-sensitive lexical semantic tasks. \vspace{2.0mm} \noindent \textbf{Error Analysis (\Cref{table:wic_error}).} Conducting an error analysis of BERT before and after {\textsc{MirrorWiC}}\xspace on the WiC dev set, we observe that 94 instances changed their labels, among which 58 are {\textsc{MirrorWiC}}\xspace correcting the original predictions. In 43 out of 58 cases, {\textsc{MirrorWiC}}\xspace is producing more TRUE positives. The examples with the largest similarity changes are provided in the upper half of \Cref{table:wic_error}. For the 36 cases where {\textsc{MirrorWiC}}\xspace changes the originally correct predictions to the wrong prediction, 29 are false positives; see the lower half of \Cref{table:wic_error}. We manually inspect these cases and find that the distinctions between the two contexts are usually too fine-grained to tell even for humans. For instance, it seems acceptable to align with the {\textsc{MirrorWiC}}\xspace's (incorrect) predictions for \textbf{\textit{hell}} and \textbf{\textit{ease}} in the two examples in \Cref{table:wic_error}. \vspace{2.0mm} \noindent \textbf{Visualising the Embedding Space (\Cref{fig:tsne_spring}).} Contextualised embeddings for an ambiguous word (\textit{spring}) with off-the-shelf BERT, {\textsc{MirrorBert}}\xspace and {\textsc{MirrorWiC}}\xspace are visualised in \Cref{fig:tsne_spring} (sense labels from Wikipedia). While {\textsc{MirrorWiC}}\xspace maintains the sense clusters from BERT and teases apart the different senses even more, {\textsc{MirrorBert}}\xspace exhibits no clear sense distinctions. This shows a fundamental difference between {\textsc{MirrorWiC}}\xspace and {\textsc{MirrorBert}}\xspace: {\textsc{MirrorBert}}\xspace is insensitive to the target word, and directly applying it to context-sensitive lexical tasks yields subpar performance. \subsection{Ablation Study} An ablation study is conducted on English WiC (dev). Foreshadowing, the dropout rate and the layer averaging strategy are the two most important factors for {\textsc{MirrorWiC}}\xspace to be effective. \vspace{2.0mm} \noindent \textbf{Dropout and Random Span Masking (\Cref{tab:dropout,tab:random_erasing}).} The {\textsc{MirrorWiC}}\xspace performance is most sensitive to the dropout rate; it requires larger dropout rates (0.3 for DeBERTa and 0.4 for BERT) than {\textsc{MirrorBert}}\xspace (0.1 dropout). This may be related to the different levels of granularity. Sentence meanings can largely change with even slight differences in context: therefore, positive sentence pairs for {\textsc{MirrorBert}}\xspace are required to be very similar. Word-in-context meaning can tolerate larger contextual differences: larger dropout rates are thus preferable with {\textsc{MirrorWiC}}\xspace to create positive pairs with more distinct representations. Random span masking is less crucial than the dropout rate, and gives only slight gains (\Cref{tab:random_erasing}). \vspace{2.0mm} \noindent \textbf{Layer Averaging Strategy (\Cref{tab:layer}).} Averaging across all layers of the PLM is suboptimal for WiC representations, and the strategy of averaging only over the last four layers is indeed the optimal one for BERT. However, DeBERTa reaches its peak when averaging over the last 2 layers. Our findings corroborate those from previous studies which report that contextualised information is usually stored in higher layers \cite{ethayarajh-2019-contextual,soler2021let}, and the bulk of decontextualised information is stored in lower layers \cite{vulic-etal-2020-probing}. \vspace{2.0mm} \noindent \textbf{Input Size (\Cref{fig:input_size}).} As in \Cref{fig:input_size}, we show a sharp increase of performance from 5k to 10k on both Usim and WiC. While WiC maintains its performance with small fluctuation from 10k throughout to 50k, there is a clear downward slope for Usim from 10k onward. This is in line with findings in {\textsc{MirrorBert}}\xspace, and also shows that the model does not require plenty of fine-tuning data to transform into a WiC encoder. This further confirms that the model is not so much learning new knowledge as rewiring knowledge to the surface. \begin{table}[!t] \scriptsize \setlength{\tabcolsep}{2.2pt} \centering \begin{tabular}{lcccccccccccccccccccccccccccccc} \toprule dropout rate$\rightarrow$ & 0 & 0.1 & 0.2 & 0.3 & 0.4 & 0.5 & 0.6 \\ \midrule BERT + {\textsc{MirrorWiC}}\xspace & 68.02& 68.65& 70.21& 71.31& {\bf 71.94}& 68.80& 68.49 \\ DeBERTa + {\textsc{MirrorWiC}}\xspace & 65.67 &69.12 & 70.53 &{\bf 71.78} & 67.08 &65.98 &66.30 \\ \bottomrule \end{tabular} \caption{Impact of dropout rate in {\textsc{MirrorWiC}}\xspace.} \label{tab:dropout} \end{table} \begin{table}[!t] \scriptsize \setlength{\tabcolsep}{4.2pt} \centering \begin{tabular}{llccccccccccccccccccccccccccccc} \toprule model$\downarrow$, random span masking$\rightarrow$ & off & on \\ \midrule BERT + {\textsc{MirrorWiC}}\xspace & 71.31 & 71.47$_{\uparrow0.16}$\\ DeBERTa + {\textsc{MirrorWiC}}\xspace & 71.78 & 71.94$_{\uparrow0.16}$ \\ \bottomrule \end{tabular} \caption{Impact of random span masking.} \label{tab:random_erasing} \end{table} \begin{table}[!t] \scriptsize \setlength{\tabcolsep}{2.2pt} \centering \begin{tabular}{lcccccccccccccccccccccccccccccc} \toprule average last $n$ layers$\rightarrow$ & 1 & 2 & 3 & 4 & 5& 6 & 12 \\ \midrule BERT + {\textsc{MirrorWiC}}\xspace & 68.96 & 68.80 & 70.06& \textbf{71.94}& 70.68& 70.84& 67.71 \\ DeBERTa + {\textsc{MirrorWiC}}\xspace & 71.47& \textbf{73.04}& 72.41 &71.78 &71.15 &70.53& 69.74\\ \bottomrule \end{tabular} \caption{Impact of layer averaging strategies.} \label{tab:layer} \end{table} \begin{figure}[!t] \centering \begin{subfigure}{0.24\textwidth} \includegraphics[width=\linewidth]{figs/ablation_training_data_size_wic.pdf} \caption{WiC (dev)} \end{subfigure}\hspace*{\fill} \medskip \begin{subfigure}{0.24\textwidth} \includegraphics[width=\linewidth]{figs/ablation_training_data_size_usim.pdf} \caption{Usim} \end{subfigure} \caption{Impact of input size of the training data for {\textsc{MirrorWiC}}\xspace. Evaluation on WiC (dev).} \label{fig:input_size} \end{figure} \section{Conclusion} We proposed {\textsc{MirrorWiC}}\xspace, a fully unsupervised approach for eliciting word-in-context representations from pretrained language models (PLMs), requiring only raw sentences as input, and disposing of labelled data and sense inventories. We showed that {\textsc{MirrorWiC}}\xspace is PLM-agnostic and language-agnostic, yielding substantial performance boosts in context-aware lexical semantic tasks in English, multilingual and cross-lingual setups and demonstrating that additional WiC knowledge can be exposed from the PLMs. We then delved into the inner-working of {\textsc{MirrorWiC}}\xspace, demonstrating that the performance improvement strongly correlates with metrics such as isotropy score and intra-sentence word similarity. In future work, we will also look into weakly supervised approaches that combine self-supervision with external sense-related knowledge. \section*{Acknowledgements} We thank the three reviewers and the ACs for their helpful feedback. We acknowledge Peterhouse College at University of Cambridge for funding Qianchu Liu's PhD, and Grace \& Thomas C.H. Chan Cambridge Scholarship for funding Fangyu Liu's PhD. The work has also been funded by the ERC Grant LEXICAL (no. 648909) and the ERC PoC Grant MultiConvAI (no. 957356) awarded to Anna Korhonen.
\section{Introduction} A long standing open problem in the study of the recursively enumerable (r.e.) Turing degrees $\langle \mathcal{R}_{\turing},\leq_{\turing}\rangle$ involves identifying the lattices $\mathcal{L}=\langle L,\leq,\cap,\cup\rangle$ that can be embedded in $\mathcal{R}_{\turing}$, and characterizing the degrees below which such $L$ can be bounded. Here, a lattice is a partial order $\leq$ such that every pair of elements $\bm{a},\bm{b}\in L$ has a join $\bm{a}\cup\bm{b}\in L$, which is the lowest upper bound of the pair, and a meet $\bm{a}\cap\bm{b}\in L$, which is the greatest lower bound of the pair. It is known that $\langle \mathcal{R}_{\turing},\leq_{\turing}\rangle$ forms an upper semilattice (USL) with minimal element $\bm{0}$ and greatest element $\bm{0}'$. As an USL, the join between any pair must exist, but the meet may not~\cite{ambos1984pairs}. By the minimal pair priority argument~\cite{yates1966minimal,lachlan1966lower}, one can construct incomparable pairs whose meet exists, and therefore embed the diamond lattice (Figure~\ref{fig:diamond}) in $\mathcal{R}_{\turing}$. One can also generalize the construction to embed below any nonzero r.e.\ degree, any lattice that does not contain $N_5$ or $M_3$ (Figure~\ref{fig:N5-131}) as sublattices~\cite{thomason1971sublattices,lachlan1972embedding}. Lattices that avoid $N_5$ and $M_3$ are called \emph{distributive} lattices~\cite{birkhoff1937rings}, because they can be characterized as lattices $L$ whose meets distribute over the joins: \[(\forall \bm{a},\bm{b},\bm{c} \in L)\;\; [\bm{a}\cap (\bm{b}\cup\bm{c}) =(\bm{a}\cap\bm{b}) \cup(\bm{a}\cap\bm{c})].\] \begin{figure}[tpb] \centering \begin{tikzpicture}[every node/.style={circle,fill=black,inner sep=1.2pt}] \tikzset{diamond/.pic ={ \node[label=below:{$\bm{a} \cap\bm{b}$}] (d) at (0, -1) {}; \node[label=left:{$\bm{a}$}] (l) at (-1, 0) {}; \node[label=above:{$\bm{a} \cup\bm{b}$}] (u) at (0, 1) {}; \node[label=right:{$\bm{b}$}] (r) at (1, 0) {}; \draw [-,thick] (u) -- (r) -- (d) -- (l) -- (u); }} \path (0,0) pic[scale=0.5]{diamond}; \end{tikzpicture} \caption{The diamond lattice can be embedded in $\mathcal{R}_{\turing}$~\cite{yates1966minimal,lachlan1966lower}.} \label{fig:diamond} \end{figure} \begin{comment} To sketch the challenges faced, consider Birkhoff's representation Theorem~\ref{thm:distributive}: \begin{Definition} \label{def:join} Let $L$ be a finite lattice. \begin{enumerate} \item An element $\bm{b}\in L$ is \emph{join-irreducible} if $\bm{b}=\bm{a_0}\cup\bm{a_1}$ implies $\bm{b}=\bm{a_0}$ or $\bm{b}=\bm{a_1}$. \item An element $\bm{b}\in L$ is \emph{join-prime} if $\bm{b}\leq\bm{a_0}\cup\bm{a_1}$ implies $\bm{b}\leq\bm{a_0}$ or $\bm{b}\leq\bm{a_1}$. \end{enumerate} \end{Definition} \begin{Theorem}[Birkhoff's Representation \cite{birkhoff1937rings}] \label{thm:distributive} Non-distributive lattices must contain a join-irreducible element that is not join-prime. \end{Theorem} For $N_5$ and $M_3$, the witnesses to Birkhoff's theorem are shown in Figure~\ref{fig:N5-131} as $\bm{b} \leq\bm{a_0}\cup\bm{a_1}$, which cannot be computed by $\bm{a_0}$ or $\bm{a_1}$. When we construct an r.e.\ set $B$ whose degree $\bm{b}$ satisfies these requirements, the diagonalization condition $\bm{b}\nleq\bm{a_0}$ forces us to enumerate elements into $B$. However the join requirement $\bm{b}\leq\bm{a_0}\cup\bm{a_1}$ says that whenever we enumerate into $B$, we must also enumerate into $A_0$ or $A_1$. Therefore at least two permissions are requested --- one for $B$ and another for $A_0$ or $A_1$. Distributive lattices work to the effect of involving no joins, so a single permission is enough, allowing any nonzero r.e.\ degree to bound the lattice. In non-distributive lattices, joins prevent sets from being constructed independently. These dependencies can become complicated or even contradictory, preventing some lattices such as $S_8$~\cite{lachlan1980not} and $L_{20}$\cite{lempp1997finite} (Figure~\ref{fig:s8-l20}) from being embedded at all. \end{comment} As for non-distributive lattices, there is no known procedure to determine if the lattice can be embedded in $\mathcal{R}_{\turing}$. Some, such as $S_8$~\cite{lachlan1980not} and $L_{20}$\cite{lempp1997finite} (Figure~\ref{fig:s8-l20}), are non-embeddable. Others, like $N_5$, $M_3$, and $L_7$, can, and the the ability for an r.e.\ degree $\bm{d}$ to bound these lattices depends only on the ``\emph{fickleness}'' of the sets in $\bm{d}$, with degrees that bound $N_5$ ($L_7$, $M_3$) being exactly those that contain sets of fickleness $>1$ ($>\omega$, $\geq\omega^\omega$)~\cite{downey2007totally,ambos2019universally,downey2020hierarchy}. Here, set fickleness can be thought of as the number of times elements change their minds on their membership in the set. For instance, r.e.\ sets have fickleness $\leq1$ since elements are allowed to enter but not exit, and in a similar vein, $n$-r.e.\ sets have fickleness $\leq n$. Sets in an r.e.\ degree that are not r.e.\ may have fickleness $\geq\omega$, and we define a degree's fickleness to be the smallest ordinal $\alpha$ that bounds the fickleness of all sets in the degree. We formalize these definitions in Section~\ref{sec:fickle} \cite{downey2020hierarchy}. \begin{figure}[tpb] \centering \tikzset{every picture/.style={thick}} \begin{tikzpicture}[every node/.style={circle,fill=black,inner sep=1.2pt}] \tikzset{pics/131/.style n args={1}{code ={ \node (a) at (0, -1) {}; \node[label=left:{$\bm{a_0}$}] (b) at (-1, 0) {}; \node (c) at (0, 1) {}; \node[label=right:{$\bm{a_1}$}] (d) at (1, 0) {}; \node[label=left:{$\bm{b}$}] (e) at (0, 0) {}; \draw (a) -- (b) -- (c) -- (d) -- (a) -- (e) -- (c); \node[rectangle,align=left,draw=none,fill=none] at (0, -1.5) {$M_3$}; }}, pics/131/.default={} } \tikzset{n5/.pic ={ \node (a) at (0, -1) {}; \node[label=left:{$\bm{a_0}$}] (b) at (-1, 0) {}; \node (c) at (0, 1) {}; \node[label=right:{$\bm{b}$}] (d) at (1, 0.5) {}; \node[label=right:{$\bm{a_1}$}] (e) at (1, -0.5) {}; \draw (a) -- (b) -- (c) -- (d) -- (e) -- (a); \node[rectangle,align=left,draw=none,fill=none] at (0, -1.5) {#1}; }} \path (-2,0) pic[scale=0.6]{n5=$N_5$}; \path (2,0) pic[scale=0.6]{131}; \end{tikzpicture} \caption{Non-distributive lattices are those that contain $N_5$ or $M_3$ as sublattices \cite{birkhoff1937rings}.} \label{fig:N5-131} \end{figure} \begin{figure}[tpb] \centering \tikzset{every picture/.style={thick}} \begin{tikzpicture}[every node/.style={circle,fill=black,inner sep=1.2pt}] \tikzset{pics/s8/.style n args={1}{code ={ \node (x) at (-0.5, 1.5) {}; \node (y) at (0.5, 1.5) {}; \node (z) at (0, 2) {}; \node (a) at (0, -1) {}; \node (b) at (-1, 0) {}; \node (c) at (0, 1) {}; \node (d) at (1, 0) {}; \node (e) at (0, 0) {}; \draw (a)--(b)--(c)--(d)--(a)--(e)--(c) (c)--(x)--(z)--(y)--(c); \node[rectangle,align=left,draw=none,fill=none] at (0, -1.5) {$S_8$}; }}, pics/s8/.default={} } \tikzset{pics/lempp/.style n args={1}{code ={ \node[draw=none,fill=none,align=left] (l) at (0,0.5) {\includegraphics[width=1.5cm]{l20}}; \node[rectangle,align=left,draw=none,fill=none] at (0,-3.0) {$L_{20}$}; }}, pics/lempp/.default={} } \path (0,0) pic[scale=0.5]{s8}; \path (4,0) pic[scale=0.3]{lempp}; \end{tikzpicture} \caption{$S_8$~\cite{lachlan1980not} and $L_{20}$~\cite{lempp1997finite} cannot be embedded in $\mathcal{R}_{\turing}$.} \label{fig:s8-l20} \end{figure} \begin{figure}[tpb] \centering \tikzset{every picture/.style={thick}} \begin{tikzpicture}[every node/.style={circle,fill=black,inner sep=1.2pt}] \tikzset{l7/.pic ={ \node (a) at (0, -1) {}; \node (b) at (-1, 0) {}; \node (c) at (0, 1) {}; \node (d) at (1, 0) {}; \node (e) at (0, 0) {}; \draw (a) -- (b) -- (c) -- (d) -- (a); \node (f) at (-0.5, -0.5) {}; \node (g) at (0.5, -0.5) {}; \draw (c)--(e)--(f) (e)--(g); \node[align=left,draw=none,fill=none] at (0,-1.3) {$L_7$}; }} \path (0,0) pic[scale=0.5]{l7}; \end{tikzpicture} \caption{An r.e.\ degree bounds $L_7$ if and only if it contains an $>\omega$-fickle set~\cite{downey2007totally,ambos2019universally}.} \label{fig:l7} \end{figure} The fickleness hierarchy of the r.e.\ degrees was introduced by Downey and Greenberg \cite{downey2020hierarchy}, and was based on Ershov's work on $n$-r.e.\ sets \cite{ershov1968certain1,ershov1968certain2,ershov1968certain3}. The hierarchy collapses exactly to the powers of $\omega$, making the first few levels at $1$, $\omega$, $\omega^2$, $\ldots$, $\omega^\omega$, $\omega^{\omega+1}$, $\ldots$ \cite{downey2020hierarchy}, where the 1-fickle r.e.\ degrees contains just the zero degree. From earlier discussion, all known lattices characterize fickleness at the $>1$, $>\omega$, or $\geq\omega^\omega$-levels, which begs the question of whether there are lattices that characterize the degrees above the second non-trivial level $\omega^2$. This is the motivation of our work and the question remains open. We search for $>\omega^2$-candidates by considering lattices that are as ``\emph{short}'' and ``\emph{narrow}'' as $L_7$ and $M_3$, like those in Figure~\ref{fig:3direct}. In Section~\ref{sec:sufficient}, we discuss the fickleness that is sufficient for bounding these lattices, and in Section~\ref{sec:necessary} we discuss the fickleness that is necessary. Including $M_3$, we now have four lattices that characterize $\geq\omega^\omega$-fickleness. In Section~\ref{sec:reject}, we use these four to quickly reject ``larger'' candidates, for $>\omega^2$-candidates cannot contain any of those four overly fickle ones as sublattices. In Section~\ref{sec:usl}, we consider some USLs as candidates, obtained by removing the meet(s) of earlier lattices. We show that these USLs characterize the same degrees as their lattices, which leads us to conjecture in \ref{conj:usl-equals-lattice} that all USLs behave this way. We suggest future work in Section~\ref{sec:future}. \subsection{Defining $\alpha$-fickleness} \label{sec:fickle} We formalize what it means for an r.e.\ set or degree to be $\alpha$-fickle. By Shoenfield's Limit Lemma, every $\Delta^0_2$ set $A$ has a \emph{computable approximation} $a(x,s):\omega^2\to\omega$, such that for all $x,s\in\omega$: \[A(x) =\lim_s a(x,s).\] We ``count'' how often $a(x,-)$ changes its mind: \begin{Definition}[\cite{ershov1968certain1,ershov1968certain2,ershov1968certain3}] ~\label{def:comp-approx} Let $\mathcal{R} =(R, <_\mathcal{R})$ be a computable well-ordering (both $R$ and $<_\mathcal{R}$ are computable), and let $A$ be a $\Delta^0_2$ set. An $\mathcal{R}$-computable approximation ($\mathcal{R}$-c.a.) of $A$ is a computable approximation $a(x,s):\omega^2\to\omega$ of $A$ together with a computable \emph{mind-change function} $m(x,s):\omega^2\to R$, such that for all $x$ and $s$: \begin{itemize} \item $a(x,0)=0$, \item $m(x,s+1) \leq_\mathcal{R} m(x,s)$, \item if $a(x,s+1) \neq a(x,s)$, then $m(x,s+1) <_\mathcal{R} m(x,s)$. \end{itemize} \end{Definition} We think of $\alpha$ as the order type of $R$. $a$ is a computable guessing function for $A$, and $m$ associates an ordinal with each guess, so the initial ordinal $m(x,0)$ should represent $\alpha$. Like in the usual approximation for r.e.\ sets, the set is empty at first, so our first guess is $a(x,0)=0$ to represent that $x\notin A$. If $a(x,s+1)\neq a(x,s)$, then the ordinal must decrease. After the first mind-change, the ordinal is represented by an element of $R$. The ideas behind this definition were first formalized by Ershov~\cite{ershov1968certain1,ershov1968certain2,ershov1968certain3}, who referred to a set as $\alpha$-r.e.\ if $\alpha$ is the order type of $\mathcal{R}$, and if $\mathcal{R}$ satisfied the additional computable structure of being represented by a notation. Ershov's notion of being $\alpha$-r.e.\ was defined for $\alpha<\omega_1^{\text{CK}}$. There is an equivalent version given by Epstein, Hasse, and Kramer~\cite{epstein1981hierarchies}, and there is another version given by Knight and Ash~\cite{ash2000computable}. For the notion of fickleness to be independent from the $\mathcal{R}$ used, even stronger computable structure needs to be imposed on $\mathcal{R}$. To these ends, Downey and Greenberg required $\mathcal{R}$ to be \emph{canonical}, which is stronger than having a notation: \begin{Definition}[\cite{downey2020hierarchy}] \label{def:canonical} Let $\mathcal{R}$ be a computable well-ordering with \emph{order type} $\alpha$. Given $z\in R$, let $|z|$ denote the order type of $z$. Let $\mathrm{nf}_\mathcal{R}: \omega\rightarrow (\omega^2)^{<\omega}$ denote the function that takes each ordinal below $\alpha$ to its Cantor-normal form; i.e. $\forall z\in R$ \[\mathrm{nf}_\mathcal{R}(z) = \langle \langle z_0, n_0 \rangle, \ldots, \langle z_i, n_i\rangle \rangle,\] where $z_j\in R$, $|z_0| > \ldots > |z_i|$, $n_j \in \omega-\{0\}$, and \[|z| = \omega^{|z_0|}\cdot n_0 + \ldots + \omega^{|z_i|} \cdot n_i\] is the unique Cantor-normal form of $|z|$. If $\mathrm{nf}_\mathcal{R}$ is computable, we say that $\mathcal{R}$ is \emph{canonical}. \end{Definition} \begin{Definition}[\cite{downey2020hierarchy}] \label{def:fickleness} Let $A,\mathbf{d} \in\Delta^0_2$. \begin{enumerate} \item $A$ is \emph{$\leq\alpha$-fickle} if $A$ has a canonical $\mathcal{R}$-c.a.\ of order type $\alpha$. \item $A$ is \emph{$\alpha$-fickle} if $\alpha$ is the smallest ordinal such that $A$ is $\leq\alpha$-fickle. \item $\mathbf{d}$ is \emph{$\leq\alpha$-fickle} if every set in $\mathbf{d}$ is $\leq\alpha$-fickle. \item $\mathbf{d}$ is \emph{$\alpha$-fickle} if $\alpha$ is the smallest ordinal such that $\mathbf{d}$ is $\leq\alpha$-fickle. \end{enumerate} \end{Definition} Note that being $\alpha$-fickle was first introduced by Downey and Greenberg as being \emph{properly totally $\alpha$-computably approximable}. We use the term fickleness for succinctness. By canonicalness, if $\alpha$ is \emph{reasonably small}: \[\alpha <\epsilon_0, \text{where } \epsilon_0=\sup\{\omega, \omega^\omega, \omega^{\omega^\omega}, \ldots\},\] then in Definition~\ref{def:fickleness}, the choice of $\mathcal{R}$ would not matter~\cite{downey2020hierarchy}, because we would be able to switch from one computable approximation to another recursively. Restricting to smalls ordinals is enough for now because the embeddability results discussed do not involve ordinals exceeding $\omega^\omega<\epsilon_0$. Also, note that when a set $A$ is $\alpha$-fickle for some $\alpha\geq\omega$, the ``number of mind changes'' of the set is actually still finite, in the sense that $\lim_s A(x,s)$ exists for all $x\in\omega$; nonetheless the smallest canonical computable approximation for $A$ has an infinite order type. The fickleness hierarchy collapses to the powers of $\omega$: \begin{Theorem}[\cite{downey2020hierarchy}] \label{thm:collapse} Let $\alpha\leq \epsilon_0$. $\alpha$-fickle degrees exist if and only if $\alpha$ is a power of $\omega$. Also, an r.e.\ degree is 1-fickle if and only if the degree is the zero degree. \end{Theorem} Recall that the r.e.\ degrees that bound $N_5$ ($L_7$, $M_3$) are exactly those that contain sets of fickleness $>1$ ($>\omega$, $\geq\omega^\omega$ respectively). From Theorem~\ref{thm:collapse}, the first non-trivial level that has not been characterized is at $\omega^2$, which makes our search for a $>\omega^2$-lattice meaningful. \subsection{Some ``Short'' and ``Narrow'' Lattices} \label{sec:3direct} We consider $>\omega^2$-candidates that are as ``short'' and ``narrow'' as $L_7$ and $M_3$. We introduce the notion of \emph{3-directness} to describe such smallish lattices: \begin{Definition} \label{def:direct} A lattice $L$ is \emph{$n$-direct} if $L$ contains $n$ incomparable elements $\bm{a_0},\ldots,\bm{a_{n-1}}$, and every element in $L$ is of the form $\bigcup_{i\in I} \bm{a_i}$ or $\bigcap_{i\in I} \bm{a_i}$, where $I\subseteq \{0,\ldots,n-1\}$. \end{Definition} For instance, $L_7$ is 3-direct because we can name the middle element $\bm{a_1}$ and the two at the side $\bm{a_0}$ and $\bm{a_2}$. Then the top element will be $\bm{a_0}\cup\bm{a_1} =\bm{a_0}\cup\bm{a_2} =\bm{a_1}\cup\bm{a_2}$, the lower two elements will be $\bm{a_0}\cap\bm{a_1}$ and $\bm{a_1}\cap\bm{a_2}$, and the bottom element will be $\bm{a_0}\cap\bm{a_2} =\bm{a_0}\cap\bm{a_1}\cap\bm{a_2}$. Figure~\ref{fig:lempp-lerman} gives two lattices that are not 3-direct, for they each contain more than three incomparable elements. \begin{figure}[tpb] \centering \tikzset{every picture/.style={thick}} \begin{tikzpicture}[every node/.style={circle,fill=black,inner sep=1.2pt}] \tikzset{131/.pic ={ \node (a) at (0, -1) {}; \node (b) at (-1, 0) {}; \node (c) at (0, 1) {}; \node (d) at (1, 0) {}; \node (e) at (0, 0) {}; \draw (a) -- (b) -- (c) -- (d) -- (a) -- (e) -- (c); }} \tikzset{oo1/.pic ={ \node (d) at (0,-1) {}; \node (l) at (-1,0) {}; \node (u) at (0,1) {}; \node (r) at (1,0) {}; \node (c) at (0,0) {}; \node (ul) at (-0.5,0.5) {}; \node (dr) at (0.5,-0.5) {}; \draw (dr) --(ul) --(u) --(r) --(d) --(l) --(ul); }} \tikzset{oo2/.pic ={ \node (d) at (0,-1) {}; \node (l) at (-1,0) {}; \node (u) at (0,1) {}; \node (r) at (1,0) {}; \node (c) at (0,0) {}; \node (ul) at (-0.5,0.5) {}; \draw (ul) --(u) --(r) --(d) --(l) --(ul) --(c) --(d); }} \tikzset{oo3/.pic ={ \node (d) at (0,-1) {}; \node (l) at (-1,0) {}; \node (u) at (0,1) {}; \node (r) at (1,0) {}; \node (c) at (0,0) {}; \node (dl) at (-0.5,-0.5) {}; \draw (dl) --(c) --(u) --(r) --(d) --(l) --(u); }} \tikzset{l7/.pic ={ \node (a) at (0, -1) {}; \node (b) at (-1, 0) {}; \node (c) at (0, 1) {}; \node (d) at (1, 0) {}; \node (e) at (0, 0) {}; \draw (a)--(b)--(c)--(d)--(a); \node (f) at (-0.5, -0.5) {}; \node (g) at (0.5, -0.5) {}; \draw (c)--(e)--(f) (e)--(g); }} \tikzset{a0/.pic ={ \node (d) at (0,-1) {}; \node (l) at (-1,0) {}; \node (u) at (0,1) {}; \node (r) at (1,0) {}; \node (c) at (0,0) {}; \node (ul) at (-0.5,0.5) {}; \node (dl) at (-0.5,-0.5) {}; \draw (ul) --(u) --(r) --(d) --(l) --(ul) --(c) --(dl); }} \tikzset{a1/.pic ={ \node (d) at (0,-1) {}; \node (l) at (-1,0) {}; \node (u) at (0,1) {}; \node (r) at (1,0) {}; \node (c) at (0,0) {}; \node (ul) at (-0.5,0.5) {}; \node (dl) at (-0.5,-0.5) {}; \node (dr) at (0.5,-0.5) {}; \draw (ul) --(u) --(r) --(d) --(l) --(ul) --(c) --(dl); \draw (c) --(dr); }} \tikzset{a2/.pic ={ \node (d) at (0,-1) {}; \node (l) at (-1,0) {}; \node (u) at (0,1) {}; \node (r) at (1,0) {}; \node (c) at (0,0) {}; \node (ul) at (-0.5,0.5) {}; \node (ur) at (0.5,0.5) {}; \node (dr) at (0.5,-0.5) {}; \draw (ul) --(u) --(r) --(d) --(l) --(ul) --(c) --(dr); \draw (c)--(ur); }} \tikzset{a3/.pic ={ \node (d) at (0,-1) {}; \node (l) at (-1,0) {}; \node (u) at (0,1) {}; \node (r) at (1,0) {}; \node (c) at (0,0) {}; \node (ul) at (-0.5,0.5) {}; \node (ur) at (0.5,0.5) {}; \draw (ul) --(u) --(r) --(d) --(l) --(ul) --(c) --(d); \draw (c) --(ur); }} \tikzset{a4/.pic ={ \node (d) at (0,-1) {}; \node (l) at (-1,0) {}; \node (u) at (0,1) {}; \node (r) at (1,0) {}; \node (c) at (0,0) {}; \node (ul) at (-0.5,0.5) {}; \node (ur) at (0.5,0.5) {}; \node (dl) at (-0.5,-0.5) {}; \node (dr) at (0.5,-0.5) {}; \draw (ul) --(u) --(r) --(d) --(l) --(ul) --(dr); \draw (ur) --(dl); }} \tikzset{b0/.pic ={ \node (1) at (0,1) {}; \node (0) at (0,-1) {}; \node (c) at (0,0) {}; \node (cl) at (-1,0) {}; \node (cr) at (1,0) {}; \node (u) at (0,0.5) {}; \node (ul) at (-1,0.5) {}; \node (ur) at (1,0.5) {}; \node (d) at (0,-0.5) {}; \node (dl) at (-1,-0.5) {}; \node (dr) at (1,-0.5) {}; \draw (1) --(ur) --(c) --(ul) --(1); \draw (u) --(cr) --(d) --(cl) --(u); \draw (c) --(dr) --(0) --(dl) --(c); \draw (ul)--(dl) (ur)--(dr) (1)--(u) (0)--(d); }} \tikzset{b1/.pic ={ \node (1) at (0,1) {}; \node (0) at (0,-1) {}; \node (u) at (0,0.5) {}; \node (ul) at (-1,0.5) {}; \node (ur) at (1,0.5) {}; \node (d) at (0,-0.5) {}; \node (dl) at (-1,-0.5) {}; \node (dr) at (1,-0.5) {}; \draw (1) --(ur) --(d) --(ul) --(1); \draw (u) --(dr) --(0) --(dl) --(u); \draw (ul) --(dl) (ur)--(dr) (1)--(u) (0)--(d); }} \tikzset{b2/.pic ={ \node (1) at (0,1) {}; \node (0) at (0,-1) {}; \node (c) at (0,0) {}; \node (cl) at (-1,0) {}; \node (cr) at (1,0) {}; \node (u) at (0,0.5) {}; \node (ul) at (-1,0.5) {}; \node (ur) at (1,0.5) {}; \node (dl) at (-0.5,-0.5) {}; \draw (1) --(ur) --(c) --(ul) --(1); \draw (u) --(cr) --(0) --(cl) --(u); \draw (ul) --(cl) (ur)--(cr) (1)--(u) (c)--(dl); }} \tikzset{b3/.pic ={ \node (1) at (0,1) {}; \node (0) at (0,-1) {}; \node (c) at (0,0) {}; \node (cl) at (-1,0) {}; \node (cr) at (1,0) {}; \node (u) at (0,0.5) {}; \node (ul) at (-1,0.5) {}; \node (ur) at (1,0.5) {}; \node (dl) at (-0.5,-0.5) {}; \node (dr) at (0.5,-0.5) {}; \draw (1) --(ur) --(c) --(ul) --(1); \draw (u) --(cr) --(0) --(cl) --(u); \draw (ul) --(cl) (ur)--(cr) (1)--(u) (dl)--(c) --(dr); }} \tikzset{b4/.pic ={ \node (1) at (0,1) {}; \node (0) at (0,-1) {}; \node (c) at (0,0) {}; \node (cl) at (-1,0) {}; \node (cr) at (1,0) {}; \node (ul) at (-0.5,0.5) {}; \node (d) at (0,-0.5) {}; \node (dl) at (-1,-0.5) {}; \node (dr) at (1,-0.5) {}; \draw (1) --(cr) --(d) --(cl) --(1); \draw (c) --(dr) --(0) --(dl) --(c); \draw (cl) --(dl) (cr)--(dr) (0)--(d) (c)--(ul); }} \tikzset{b5/.pic ={ \node (1) at (0,1) {}; \node (0) at (0,-1) {}; \node (c) at (0,0) {}; \node (cl) at (-1,0) {}; \node (cr) at (1,0) {}; \node (ul) at (-0.5,0.5) {}; \node (ur) at (0.5,0.5) {}; \node (d) at (0,-0.5) {}; \node (dl) at (-1,-0.5) {}; \node (dr) at (1,-0.5) {}; \draw (1) --(cr) --(d) --(cl) --(1); \draw (c) --(dr) --(0) --(dl) --(c); \draw (cl) --(dl) (cr)--(dr) (0)--(d) (ul)--(c)--(ur); }} \tikzset{diamond/.pic ={ \node (l) at (-1,0) {}; \node (r) at (1,0) {}; \node (u) at (0,1) {}; \node (d) at (0,-1) {}; \draw (u)--(r)--(d)--(l)--(u); }} \tikzset{goo/.pic ={ \node[draw=none,fill=none] at (-2,0) {$\geq\omega^\omega$}; \path (-1,0) pic[scale=0.4]{131}; \path (0,0) pic[scale=0.4]{oo1}; \path (1,0) pic[scale=0.4]{oo2}; \path (2,0) pic[scale=0.4]{oo3}; }} \tikzset{go/.pic ={ \node[draw=none,fill=none] at (-0.5,0) {$>\omega$}; \path (0.5,0) pic[scale=0.4]{l7}; }} \tikzset{g0/.pic ={ \node[draw=none,fill=none] at (-5,2) {$>0$}; \path (-4,2) pic[scale=0.4]{a0}; \path (-3,2) pic[scale=0.4]{a1}; \path (-2,2) pic[scale=0.4]{a2}; \path (-1,2) pic[scale=0.4]{a3}; \path ( 0,2) pic[scale=0.4]{diamond}; \path ( 1,2) pic[scale=0.4]{a4}; \path ( 2,2) pic[scale=0.4]{b0}; \path ( 3,2) pic[scale=0.4]{b1}; \path ( 4,2) pic[scale=0.4]{b2}; \path ( 5,2) pic[scale=0.4]{b3}; \path ( 6,2) pic[scale=0.4]{b4}; \path ( 7,2) pic[scale=0.4]{b5}; }} \path (0,1.5) pic[align=left]{goo}; \draw [thin] (-2.3,0.75) --(2.5,0.75); \path (-1.5,0) pic[align=left]{go}; \draw [thin] (-2.3,-0.75) --(10.5,-0.75); \path (3,-3.5) pic[align=left]{g0}; \node[rectangle,draw=none,fill=none] at (6.5,-2.5) {$\underbrace{\hspace{8cm}}_{\text{distributive}}$}; \end{tikzpicture} \caption{All $\leq3$-direct lattices (Definition~\ref{def:direct}) are exhausted here, grouped by the fickleness levels characterized. We include also the diamond, which is the only $\leq2$-direct lattice, if we ignore trivial lattices such as the single point. Lattices including and to the right of the diamond are distributive.} \label{fig:3direct} \end{figure} In Figure~\ref{fig:3direct}, we exhibit some $\leq3$-direct lattices, which turns out to exhaust all of them~\cite{ko2021thesis}. Eight of them are distributive and can therefore be embedded below any nonzero r.e.\ degree~\cite{thomason1971sublattices}. Excluding $L_7$ and $M_3$, we are left with seven non-distributive lattices to characterize in the next two sections. \section{Some Lattices where $>1$ or $\geq\omega^\omega$-Fickleness is Sufficient} \label{sec:sufficient} We can apply the techniques in \cite{downey2020hierarchy} to show: \begin{Lemma} \label{lemma:3direct-oo} The four lattices at the top row of Figure~\ref{fig:3direct}, which includes $M_3$, can be bounded below any r.e.\ degree that contains $\geq\omega^\omega$-fickle sets. \end{Lemma} Known methods can also show: \begin{Lemma} \label{lemma:3direct-2} The first three lattices in the bottom row of Figure~\ref{fig:3direct} can be bounded below any non-zero r.e.\ degree. \end{Lemma} Lemma~\ref{lemma:3direct-2} is an application of the methods in \cite{lerman1984elementary}. The authors introduced a lattice-theoretic property known as the \emph{Trace-Probe Property} (TPP), which is sufficient for a lattice to be embeddable in $\mathcal{R}_{\turing}$. It is not hard to show that their TPP embedding technique is compatible with nonzero permitting. The three lattices satisfy TPP, and can therefore be bounded below any nonzero r.e.\ degree. The fourth lattice in the bottom row, enlarged in Figure~\ref{fig:3direct-n}, does not satisfy TPP. But we can still prove: \begin{Lemma} \label{lemma:3direct-n} The lattice in Figure~\ref{fig:3direct-n} can be bounded below any non-zero r.e.\ degree. \end{Lemma} In the rest of this section, we shall prove the lemma by modifying the TPP techniques, and applying nonzero permitting. The fickleness requested by a lattice comes from its positive requirements $\rho$. If $\rho$ requests for $n$ many permissions, then any set that can grant $\geq n$ permissions can satisfy $\rho$. In TPP lattices, $n\in\omega$ is a constant, while in the lattice of Lemma~\ref{lemma:3direct-n}, $n$ is bounded by $|\rho|\in\omega$. Since nonzero r.e.\ sets can grant $n$ many permissions for any fixed $n$, both types of lattices can be bounded below any nonzero degree. \begin{figure}[tpb] \centering \tikzset{every picture/.style={thick}} \begin{tikzpicture}[every node/.style={circle,fill=black,inner sep=1.2pt}] \tikzset{pics/a3/.style n args={2}{code ={ \node[label=below:{$D$}] (d) at (0,-1) {}; \node[label=left:{$A$}] (l) at (-1,0) {}; \node[label={[label distance=0em]above:{$AC$}}] (u) at (0,1) {}; \node[label=right:{$C$}] (r) at (1,0) {}; \node[label=right:{$B$}] (c) at (0,0) {}; \node[label=left:{$AB$}] (ul) at (-0.5,0.5) {}; \node[label=right:{$BC$}] (ur) at (0.5,0.5) {}; \draw (c)--(d)--(l)--(u)--(r)--(d) (ul)--(c)--(ur); }}, pics/a3/.default={x}{y} } \tikzset{pics/eq3/.style n args={2}{code ={ \node[rectangle,draw=none,fill=none] at (0,0) {$\begin{array}{rrclll} \text{Join: } &B &\leq &ACD,\\ \text{Diagonalize: } &A &\nleq &BCD, &&a\\ &B &\nleq &AD, &&bc\to ba \to \ldots\\ &B &\nleq &CD, &&ba\to bc \to \ldots\\ &C &\nleq &ABD, &&c\\ \text{Meet: } &ABD &\cap &BCD &\leq BD,\\ &BCD &\cap &AD &\leq D,\\ &ABD &\cap &CD &\leq D. \end{array}$}; }}, pics/eq3/.default={x}{y} } \path (0,0) pic{a3}; \path (6,0) pic{eq3}; \end{tikzpicture} \caption{Lattice that can be bounded below any non-zero r.e.\ degree. $\rho:B\nleq AD$ generates traces of length two that retarget between $BC$ and $BA$-traces, where the number of re-targeting is bounded by $|\rho|$. In particular, by the notation of \cite{lerman1984elementary}, this lattice is not a TPP lattice because the number of re-targets is not independent from $\rho$.} \label{fig:3direct-n} \end{figure} To see how $|\rho|$ comes about, we need to observe the interactions between $\rho$ and other requirements, such as with negative requirements $\eta$, and with joins $J$. We borrow notations from \cite{downey2007totally,downey2020hierarchy,lempp2012priority,ambos2019universally,lempp2006embedding}. In these constructions, $\rho$ generates sequences of elements that need to be enumerated. The sequences are referred to as \emph{traces}, and each element in a trace is often referred to as a \emph{ball}. The process of enumerating can be thought of as balls falling to the bottom of a pinball machine, into buckets that represent each ball's targeted set. Often, longer traces are \emph{partitioned} into shorter ones, so that when the balls in a trace are enumerated simultaneously, $\eta$ will not be injured in an unforeseeable manner. A trace can be as short as a single ball in length. Each trace enumeration must be permitted by the set bounding the lattice. A permission is granted when the set changes its mind, or in other words, when the set loses one fickleness. Henceforth, we shall use the terms ``permissions'' and ``fickleness'' interchangeably. Therefore, the length of the traces generated by $\rho$ bounds the fickleness sufficient for embedding $L$. As we shall see, these lengths do not exceed $|\rho|$. Let $X$ be an r.e.\ set of nonzero degree. We want to construct r.e.\ sets $A,B,C,D\leq X$ satisfying the requirements in Figure~\ref{fig:3direct-n}. To derive these requirements, we use $AB$ to abbreviate $A$ join $B$. We also let the r.e.\ set that represents a point on the lattice be the join of its label, with the sets of labels below it. For instance, the point labelled $A$ will be represented by $AD$, the join of sets $A$ and $D$, while the point labelled $AC$ will be represented by $ABCD$. This rule preserves the partial orders of the lattice, allowing us to omit requirements such as $D\leq A$ for instance, since $D\leq AD$. Because of this rule, to express ``$B\leq AC$'', which says that the join of the points $A$ and $C$ computes $B$, we use the requirement $B\leq ACD$. Also, note that we omitted requirements that can be derived from those listed in the figure. For instance, $BD\nleq AD$ holds if and only if $B\nleq AD$ holds, so we omit the longer version. Fix a computable ordering of the requirements. We shall use a $\Pi_2$ tree framework in our construction. First, consider the global requirements $A,B,C,D\leq X$, where we construct functionals $\Psi_A,\Psi_B,\Psi_C,\Psi_D$ to satisfy: \begin{align*} G_A: &\;A = \Psi_A(X),\\ G_B: &\;B = \Psi_B(X),\\ G_C: &\;C = \Psi_C(X),\\ G_D: &\;D = \Psi_D(X). \end{align*} We describe the strategy for $G_A$ only; the remaining $G$-strategies are similar. \begin{framed} \noindent\textbf{$G_A$-strategy}: \emph{Initialize} $G_A$ by setting $\Psi=\Psi_A=\emptyset$. Start with $a=0$. \begin{enumerate} \item \emph{Set up}: At stage $a$, some positive requirement $\rho$ might pick $a$ as a follower and assign a \emph{code} $i$ to $a$. Set use $\psi(a)=i$. At the next stage start a new cycle with $a+1$. \item \emph{Maintain}: Finitely often, $\rho$ might want to lift the use $\psi(a)$ or even enumerate $a$ into $A$. \emph{Permission is granted by $X$} to take those actions at the stage when $X\restriction \psi(a)$ changes. With permission, $\rho$ may also change the code of $a$ to $i'$, and we update the use to $\psi(a)=i'$. Note that it is possible for many elements to be assigned the same code. These elements wait for the same permission from $X$ to be enumerated, and if they come from the same follower of a positive requirement, they will be enumerated together. \end{enumerate} \end{framed} Next, consider the join requirement, which is also global, where we construct functional $K=K_B$ such that \begin{align*} J_B: B &=K_B(ACD). \end{align*} Since this lattice has no other join requirements, we drop the subscript $B$. \begin{framed} \noindent\textbf{$J$-strategy}: \emph{Initialize} $J$ by setting $K=\emptyset$. Start with $n=0$. \begin{enumerate} \item \emph{Set up}: At some stage $\geq n$, pick a large value as use $\kappa(n)$ targeted for $A$, $C$, or $D$, and set $K(n)=0$ with that use. The choice of the target will depend on the positive requirement $\rho$, if any, with which $n$ is associated. Start a new cycle with $n+1$. Note that $n$ is targeted for $B$, and as mentioned in the $G$-strategies, $n$ will be assigned by other requirements a code $i$. Assign the same code to $\kappa(n)$. \item \emph{Maintain}: We may \emph{lift the use at $n$} by enumerating $\kappa(n)$ into $A$, $C$, or $D$, then choosing a new large $\kappa(n)$. With the new use, we declare $K(n)=0$ if $n$ has been enumerated into $B$, otherwise we declare $K(n)=1$. The new use will be targeted for one of $A$, $C$, or $D$ again. Depending on $\rho$, the choice of the target may change, and we refer to this change as \emph{re-targeting}. Whenever we lift the use, the requirement that wanted the lifting may assign to the new use a new code. We will need to ensure that $\rho$ does not lift $\kappa(n)$ infinitely often. \end{enumerate} \end{framed} Consider the meet requirements $\eta$, where we construct $\Theta$ such that: \begin{align*} \eta_{\Phi W}: &\Phi_0(ABD) =\Phi_1(BCD) =W \implies (\exists \Theta) [W=\Theta(BD)],\\ \eta_{BA\Phi W}: &\Phi_0(BCD) =\Phi_1(AD) =W \implies (\exists \Theta) [W=\Theta(D)],\\ \eta_{BC\Phi W}: &\Phi_0(ABD) =\Phi_1(CD) =W \implies (\exists \Theta) [W=\Theta(D)]. \end{align*} We drop subscripts if context is clear. Consider $\eta_{BA}$, also referred to as \emph{$BA$-gates}, because $B$ and $A$ appear on opposite sides of the gate, which as we shall see, generally forbids $B$- and $A$-balls from being enumerated at the same time. Similarly, $\eta_{BC}$ is often referred to as a $BC$-gate. Maintaining a computation $W(m)=\Theta(m)$ at subrequirement $\eta_{AB},m$ involves protecting the computation at the $BCD$-side $\Phi_0(BCD,m)$, or the $AD$-side $\Phi_1(AD,m)$. In the $BA$-gate, if the hypothesis $\Phi_0=\Phi_1=W$ holds, we want to ensure that $W\leq D$, and hence refer to $D$ as a \emph{computing set(s)} of the gate. Similarly, the computing sets of the two other types of gates are $BD$ and $D$. A gate's strategy is based on the minimal pair strategy of \cite{yates1966minimal}, where whenever both sides of a computation are simultaneously injured, say at subrequirement $m$, an element $\leq\theta(m)$ must enter a computing set, which we refer to as the use $\theta(m)$ being \emph{lifted}: \begin{framed} \noindent \textbf{$\eta$-strategy}: \emph{Initialize} $\eta$ by setting $\Theta=\emptyset$ and $m=0$ and \emph{use} $\theta(m')$ to be undefined for all $m'\in\omega$. \begin{enumerate} \item \emph{Set up}: Wait for \emph{equality} \[\Phi_0\restriction (m+1) =\Phi_1\restriction (m+1) =W\restriction (m+1)\] at $m$ for the first time, say at stage $s_0$. Start a new phase at set up for the $(m+1)$-th subrequirement. \item \emph{Maintain}: When equality is first observed or has returned and $\theta(m)$ does not exist, assign a new large value for $\theta(m)$. Whenever $\Phi_0(m)$ or $\Phi_1(m)$ is injured by a follower that existed at stage $s_0$, and an element $\leq\theta(m)$ enters a computing set at the same time, we lift the use by declaring $\theta(m)$ to be undefined. Then we wait for the next $\eta$-stage before returning to the beginning of this maintenance phase to pick a new large use. \end{enumerate} \end{framed} To verify that $\eta$ is satisfied, we would like to show that the only elements that can injure $\Phi_0(m)$ or $\Phi_1(m)$ are those that existed at stage $s_0$. Also, $\Phi_0(m)$ and $\Phi_1(m)$ cannot be injured together unless $\theta(m)$ is lifted. Note that if equality at $m$ never returns, $\eta$ would be satisfied vacuously. If the hypothesis of the gate holds, we will need to show that the use is not lifted infinitely often. We shall provide such a verification in Lemma~\ref{lemma:eta} for a more complex construction. Now, consider the diagonalization or positive requirements, say $B\not\leq AD$. Given functional $\Xi$, we satisfy \[\rho_{\Xi}: B\neq \Xi(AD).\] \begin{figure}[tpb] \centering \tikzset{every picture/.style={thick}} \begin{tikzpicture}[every node/.style={rectangle,draw=none,fill=none}] \tikzset{pics/rho/.style n args={3}{code ={ \node at (-2,0) {$#1$}; \node[text width=10em,align=left] at (2.05+#2,0.2) {$#3$}; }}, pics/rho/.default={\eta}{0}{abab} } \tikzset{pics/gate/.style n args={3}{code ={ \node at (-2,0) {$#1$}; \node[text width=10em,align=left] at (2.05+#2,0.2) {$#3$}; \draw (0,0)--(5,0); }}, pics/gate/.default={\eta}{0}{abab} } \tikzset{pics/down/.style n args={3}{code ={ \draw[->] (0.4+#1,#2-0.1)--(0.4+#1,#2-0.6-#3); }}, pics/down/.default={0}{2}{0} } \tikzset{traces/.pic ={ \path (0,1) pic{rho={\rho:B\neq \Xi(AD)}{0}{bc_0}}; \path (0,0) pic{down={0.0}{1}{2}}; \path (0,0) pic{down={0.2}{1}{2}}; \path (0, 0) pic{gate={BA\text{-gate}}{0}{ }}; \path (0,-1) pic{gate={BA\text{-gate}}{0}{ }}; \path (0,-2) pic{gate={BC\text{-gate}}{0}{b\cancel{c_0}}}; \path (0,0) pic{down={0.0}{-2}{0}}; \path (0,-3) pic{gate={BA\text{-gate}}{0}{b\cancel{a_0}}}; \path (0,0) pic{down={0.0}{-3}{0}}; \path (0,-4) pic{gate={BC\text{-gate}}{0}{b\cancel{c_1}}}; \path (0,0) pic{down={0.0}{-4}{0}}; \path (0,-5) pic{gate={BA\text{-gate}}{0}{b\cancel{a_1}}}; \path (0,0) pic{down={0.0}{-5}{0}}; \path (0,-6) pic{rho={}{0}{b\cancel{c_2}}}; }} \tikzset{pics/eq/.style n args={2}{code ={ \node[rectangle,draw=none,fill=none] at (0,0) {$\begin{array}{rclll} B &\leq &ACD \end{array}$}; }}, pics/eq/.default={x}{y} } \path (0,0) pic{traces}; \path (8,1) pic{eq}; \end{tikzpicture} \caption{Traces generated by $\rho$, after interacting with the join on the right, and with gates depicted by a horizontal line. Gates of higher priority are drawn lower down. Whenever the trace meets consecutive $BA$- and $BC$-gates, it is re-targeted between $BC$ and $BA$-traces. Therefore, the total fickleness requested does not exceed $|\rho|$. In this toy example, the length of a stopped trace does not exceed 2. In more complex constructions, traces can be arbitrarily long, like those in Figure~\ref{fig:traces-layer}.} \label{fig:traces-3direct-n} \end{figure} The strategy is built on the usual Friedberg Muchnik approach, where we pick a follower $b$, wait for $b$ to be \emph{realized} when $\Xi(b)=0$, set a restraint of $\xi(b)$ on $AD$ to prevent un-realization, then wait for permission from $X$ to enumerate $b$ into $B$. But the joins and gates complicate this enumeration. Consider how $\rho=\rho_{\Xi}$ interacts with $J$ and with higher priority $BA$-gates and $BC$-gates. Refer to Figure~\ref{fig:traces-3direct-n} for an illustration. Assume $\rho$ has a follower $b$ that is realized at stage $s_0$. We want to enumerate $b$ into $B$ at the same time prevent elements $\leq\xi(b)$ from entering $AD$. But $J$ says that before we can enumerate $b$, we need to enumerate $\kappa(b)$ into targets $A$, $C$, or $D$. If $b$ was realized after $J$ chose $\kappa(b)$, then $\xi(b)>\kappa(b)$ and we cannot choose $A$ or $D$ as targets otherwise we will un-realize $b$. So we can only target $C$. So we want to enumerate $c_0=\kappa(b)$ into $C$, then $b$ into $B$. We think of these elements $c_0$ and $b$ as \emph{balls} falling past gates of a pinball machine, to be collected by their target sets $C$ and $B$ respectively. The enumeration of the $B$-ball demanded that a $C$-ball be enumerated first, and we say that the $B$-ball generates an \emph{$BC$-trace}. One might be tempted to enumerate the $BC$-trace simultaneously. But $BC$-gates prevent us from doing so, unless the gate's use $d$ targeted for $D$ is lifted at the same time. But if $d$ was picked before $b$ got realized, then $d<\xi(b)$ cannot be lifted without un-realizing $b$. Thus the $BC$-gate forces us to enumerate the balls in the $BC$-trace separately and in reverse, starting from the $C$-ball, say at stage $s_1\geq s_0$. We say that the trace is \emph{stopped} by the $BC$-gate from simultaneous enumeration. After enumerating $c_0$, we have to wait for the $C$-side computation of stopping gate to recover at some stage $s_2>s_1$, before we can enumerate the $B$-ball. When recovery has occurred, we say that the $BC$-gate has \emph{reopened}. While waiting for recovery, $J$ requires that we pick a new large use to be re-targeted to $A$, $C$, or $D$. The new target cannot be on the $C$-side of the $BC$-gate; otherwise, when the new use is enumerated later, we will injure the $C$-side again. Therefore we cannot re-target to $C$ or $D$, and are forced to choose $A$. Thus we re-target $bc_0$ to a $BA$-trace $ba_0$. In other words, once $c_0$ is enumerated, we need to pick an $A$-ball $a_0$ and wait for it to be enumerated into $A$, before we are allowed to enumerate $b$ into $B$. After the $C$-enumeration, the trace is no longer stopped by the $BC$-gate, and we say that it has \emph{passed} the gate. After the $C$-side of the $BC$-gate recovers, one might again be tempted to enumerate the $BA$-trace $ba_0$ simultaneously when permitted. But higher priority $BA$-gates disallows $B$ and $A$-balls from being enumerated together. We say that the trace is \emph{stopped} at this $BA$-gate. Repeating the argument in the above paragraph but with the role of $A$ and $C$ swapped, we will want to enumerate $a_0$ first, then retarget the $BA$-trace to a $BC$-trace $bc_1$. Again if there is a higher priority $BC$-gate, we will need to retarget to a $BA$-trace $ba_1$, and so on. Suppose $\rho$ has $k$ many higher priority gates \[\eta_1 <\ldots <\eta_k <\rho,\] that alternate between $BA$- and $BC$-gates. Refer to Figure~\ref{fig:traces-3direct-n} for an illustration, where higher priority gates are drawn lower down. The trace of $\rho$ first descends to the lowest priority gate $\eta_k$ and is stopped by that gate. After retargeting, enumerating, and waiting for the gate to reopen, the trace descends to the next lower priority gate $\eta_{k-1}$, where it again waits to pass. This process is repeated $k$ many times until the trace passes gate $\eta_0$, and the elements of the trace is enumerated simultaneously. Each enumeration requests one permission from $X$. Given that $k<|\rho|$, $|\rho|$ many fickleness will be sufficient to satisfy $\rho$. The last type of gate $\eta$, which asserts that $ABD\cap BCD \leq BD$, will not stop $BC$ or $BA$-traces, because $\eta$'s computing sets includes $B$, and $B$-elements are picked only as followers $b$ and not as trace extensions, meaning that the picking occurs at $\eta$-expansionary stages. At these stages, if a subrequirement $\eta,m$ has already been set up, then the $b$ will be too large to inflict injury; and if the subrequirement has yet to be set up, then $\theta(m)$ can always be lifted above $b$, allowing for simultaneous injuries from $b$ on $\eta,m$. Details can be found in \cite{ko2021thesis}. Using the same framework, we can show that the other $\rho$ requirements generate traces no longer than $|\rho|$, which allows any nonzero r.e.\ degree to satisfy all requirements, and hence bound the lattice. \section{Some Lattices where $\geq\omega^\omega$-Fickleness is Necessary} \label{sec:necessary} In \citeyear{downey2020hierarchy}, when Downey and Greenberg showed that the $M_3$ needed $\geq\omega^\omega$-fickleness, they proved: \begin{Theorem}[\cite{downey2020hierarchy}] \label{thm:oo-original} Let $L$ be a structure with 3 elements $A,B,C$ satisfying \begin{align*} \begin{matrix} A\leq BC,\\ B\leq AC,\\ C\leq AB,\\ (\forall W \leq A, B)\; [W \leq C],\\ (\forall W \leq A, C)\; [W \leq B],\\ A\not\leq C\;\; (\text{or } B\not\leq C \text{ or } A\not\leq B). \end{matrix} \end{align*} If $\bm{d}$ is an r.e.\ degree that bounds $L$, $\bm{d}$ must contain a $\geq\omega^\omega$-fickle set. \end{Theorem} The conditions in the theorem are satisfied by only two lattices in Lemma~\ref{lemma:3direct-oo}, including $M_3$. To show that all lattices in the lemma demand $\geq\omega^\omega$-fickleness, we strengthen Theorem~\ref{thm:oo-original} by removing one join condition: \begin{Theorem} \label{thm:oo} Let $L$ be a structure with 3 elements $A,B,C$ satisfying \begin{align*} \begin{matrix} A\leq BC,\\ B\leq AC,\\ (\forall W \leq A, B)\; [W \leq C],\\ (\forall W \leq A, C)\; [W \leq B],\\ A\not\leq C\;\; (\text{or } B\not\leq C \text{ or } A\not\leq B). \end{matrix} \end{align*} If $\bm{d}$ is an r.e.\ degree that bounds $L$, $\bm{d}$ must contain a $\geq\omega^\omega$-fickle set. \end{Theorem} All lattices in the lemma satisfy the conditions in the strengthened Theorem~\ref{thm:oo}, allowing us to apply the theorem with Lemma~\ref{lemma:3direct-oo} to get: \begin{Corollary} \label{cor:oo} The four lattices in the top row of Figure~\ref{fig:3direct} characterize the r.e.\ degrees that contain $\geq\omega^\omega$-fickle sets. \end{Corollary} \begin{figure}[tpb] \centering \tikzset{every picture/.style={thick}} \begin{tikzpicture}[every node/.style={rectangle,draw=none,fill=none}] \tikzset{pics/gate/.style n args={3}{code ={ \node at (-1,0) {$#1$}; \node[text width=10em,align=left] at (59+#2em,0.2) {$#3$}; \draw (0,0)--(5,0); }}, pics/gate/.default={\eta}{0}{abab} } \tikzset{pics/down/.style n args={2}{code ={ \draw[->] (2+#1em,#2-0.2)--(2+#1em,#2-0.7); }}, pics/down/.default={0}{2} } \tikzset{traces1/.pic ={ \node at (-1,1) {$\rho:A\neq \Xi(C)$}; \node at (1.0,1) {$abababab$}; \path (0,0) pic{down={1.0}{1}}; \path (0,0) pic{down={1.4}{1}}; \path (0,0) pic{down={1.8}{1}}; \path (0,0) pic{down={2.2}{1}}; \path (0,0) pic{down={2.6}{1}}; \path (0,0) pic{down={3.0}{1}}; \path (0,0) pic{down={3.4}{1}}; \path (0,0) pic{down={3.8}{1}}; \path (0,0) pic{down={4.2}{1}}; \path (0, 0) pic{gate={AB\text{-gate}}{0}{abababa\cancel{b}}}; \path (0,-1) pic{gate={AC\text{-gate}}{3}{a\cancel{c}}}; \path (0,-2) pic{gate={AB\text{-gate}}{3}{ababababababa\cancel{b}}}; \path (0,0) pic{down={3.9}{0}}; \path (0,0) pic{down={3.9}{-1}}; }} \tikzset{traces2/.pic ={ \node at (-1,1) {$\rho:A\neq \Xi(C)$}; \node at (1.0,1) {$abababab$}; \path (0,0) pic{down={1.0}{1}}; \path (0,0) pic{down={1.4}{1}}; \path (0,0) pic{down={1.8}{1}}; \path (0,0) pic{down={2.2}{1}}; \path (0,0) pic{down={2.6}{1}}; \path (0,0) pic{down={3.0}{1}}; \path (0,0) pic{down={3.4}{1}}; \path (0,0) pic{down={3.8}{1}}; \path (0,0) pic{down={4.2}{1}}; \path (0, 0) pic{gate={AB\text{-gate}}{0}{abababa\cancel{b}}}; \path (0,0) pic{down={3.9}{0}}; \path (0,-1) pic{gate={AC\text{-gate}}{3}{acacacacacaca\cancel{c}}}; \path (0,0) pic{down={9.8}{-1}}; \path (0,-2) pic{gate={AB\text{-gate}}{9}{\cdots}}; }} \tikzset{pics/eq1/.style n args={2}{code ={ \node[rectangle,draw=none,fill=none] at (0,0) {$\begin{array}{rclll} A &\leq &BC,\\ B &\leq &AC \end{array}$}; }}, pics/eq1/.default={x}{y} } \tikzset{pics/eq2/.style n args={2}{code ={ \node[rectangle,draw=none,fill=none] at (0,0) {$\begin{array}{rclll} A &\leq &BC,\\ B &\leq &AC,\\ C &\leq &AB \end{array}$}; }}, pics/eq2/.default={x}{y} } \path (0,0) pic{traces1}; \path (8,1) pic{eq1}; \path (0,-6) pic{traces2}; \path (8,-6) pic{eq2}; \end{tikzpicture} \caption{The top set of traces is obtained from the conditions in Theorem~\ref{thm:oo}, while the bottom set is from Theorem~\ref{thm:oo-original}, which has the additional join $J_C:C\leq AB$ shown at the right. The traces are generated by $\rho$. Without $J_C$, the top traces do not grow at the $AC$-gates, though they can still grow at the $AB$-gates. The lengths of the traces are bounded by $\omega^{|\rho|/2}$ and $\omega^{|\rho|}$ respectively.} \label{fig:traces-layer} \end{figure} The rest of this section will be used to prove Theorem~\ref{thm:oo}, where we tighten the layering technique of Theorem~\ref{thm:oo-original}. To get $\omega^\omega$, we generalize the framework in Section~\ref{sec:sufficient}, where we described the rules for the \emph{extending} and \emph{partitioning} of traces, so as to appease higher priority gates. In that framework, diagonalization conditions, such as $\rho: A\neq \Xi(C)$ in Theorem~\ref{thm:oo}, generates traces, whose first element is known as the follower and is targeted for $A$. $\rho$ interacts with joins such as $J_A: A\leq BC$ and $J_B: B\leq AC$, to \emph{extend} the length of its trace. As illustrated at the top of Figure~\ref{fig:traces-layer}, the initial trace of $\rho$ is written in the top row as ``$abababab$'', to depict balls whose targets alternate between $A$ and $B$, and where the first ``$a$'' is the follower of $\rho$ is targeted for $A$. To obtain this $ABAB$-trace, we start with the follower. Since it is targeted for $A$, we apply $J_A$ to determine that the target for the next ball must be $B$ or $C$. In our example we picked $B$. Then since $J_B$ exists, the ball extending the second one needs to be targeted for $A$ or $C$ according to $J_B$. In our example we chose $A$. This process repeats until the follower gets realized. Generally, we pick targets that make the trace shorter, so as to demand less fickleness. One might then wonder why we did not choose to target $C$ in the initial trace, since no $J_C$ requirements exist, meaning that $C$ elements do not need to be extended. The reason is $C$ elements cannot be picked until the follower is realized, otherwise the enumeration of those elements later will un-realize the follower. Therefore we are forced to pick a growing $ABAB$-trace at first. The initial situation is similar for Theorem~\ref{thm:oo-original}, where the first trace is an $ABAB$-one, as illustrated at the bottom of Figure~\ref{fig:traces-layer}. After realization, the $ABAB$-trace descends and gets stopped at the lowest priority gate $\preceq\rho$ that does not allow the entire trace to pass. Each gate represents a meet condition, for which there are two types in our theorem: \begin{align*} (\forall W \leq A, B)\; [W \leq C],\\ (\forall W \leq A, C)\; [W \leq B]. \end{align*} We shall call these $AB$- and $AC$-gates respectively. Gates do not allow elements from both of its sides to be enumerated at the same time. In our theorem as shown at the top of the figure, lower priority gates are drawn further up, so the lowest priority gate is an $AB$-gate, preventing elements from $A$ and $B$ from passing simultaneously. Since the initial trace contains elements for $A$ and $B$, the trace will be \emph{stopped} by this gate. A similar argument can be made for the $ABAB$-trace at the bottom of the figure, which is also stopped by the lowest priority $AB$-gate. When the gate \emph{opens}, only elements from the same side of the gate can pass. Therefore, we \emph{partition} the stopped trace into a head and a tail, making the tail as long as possible, but ensuring that when the elements in the tail are simultaneously enumerated, no more than one side of the gate is injured. In the figure, the last element of the trace is targeted for $B$, so that $b$ can pass when the $AB$-gate opens. The passing injures the $B$-side of the gate, thereby \emph{closing} the gate, which will only reopen when the injured side has recovered. The $A$-element preceding $b$ cannot pass with $b$ because that will injure also the $A$-side of the gate. Hence, the original trace $abababab$ is \emph{partitioned} into the $abababa$ head and the $b$ tail, where only the tail passes, leaving the head at the gate. The tail descends to the next gates. These gates will eventually allow $b$ to pass, since a single $B$-enumeration will not injure both sides of any gate. $b$ passes all the gates, and gets enumerated, as depicted by the cancellation of $b$ in the figure. After the tail is enumerated, we return to its head $abababa$, which remains at the lowest priority $AB$-gate. This trace terminates with an $A$-element, so we shall refer to such traces as $ABABA$-traces. While waiting for the stopping gate to reopen, the joins force us to extend the trace. We apply again the trace \emph{extension} rules described earlier, adding to the rules the criteria that the extension's targets should avoid the elements at the side of the stopping gate that is just injured. For instance, since the last element of the $ABABA$-trace is targeted for $A$, by the extension rules we can extend by a $B$ or $C$-element, and by the new criteria we cannot choose $B$ since the $AB$-gate has just been injured at the $B$-side. So we are forced to extend by $C$. By the extension rules again, in the top example, since there are no $J_C$ conditions, the trace stops growing. But in the bottom example, the rules say we must continue extending by $A$ or $B$, and by the new criteria we can only choose $A$, and repeating the extension rules we get an $ACAC$-extension. When the $AB$-gate reopens, the stopped trace stops extending. We apply the \emph{partitioning} rules again to break the stopped trace into a head and tail, making the tail as long as possible without containing elements targeted for both sides of the gate. The tail passes the $AB$-gate until it gets stopped again. In the top example, when the $AB$-gate reopens, the waiting trace is an $ABABAC$-one, which we can partition into an $ABAB$ head and an $AC$-tail according to the partitioning rules, since $A$ and $C$-elements do not appear on both sides of the $AB$-gate. The tail passes the gate but is stopped by the next $AC$-gate, which prevents $A$ and $C$-elements from passing simultaneously. A similar argument can be made for the bottom example, where trace is partitioned to a $ACAC$-tail. We repeat the process with the trace that is just stopped --- waiting for the stopping gate to open; partitioning the waiting trace into a head and a tail; allowing the tail to pass till it is stopped by a higher priority gate; repeating the process with the tail as the new waiting trace if the tail is not yet enumerated; returning to tend to the head when the tail is gone; extending the head by the extension rules when that happens; letting the extended head be the new waiting trace; and continuing until the follower is enumerated. Every enumeration requests for one permission; therefore the total length of the traces bounds the fickleness required. Consider the length of the traces for the conditions in Theorem~\ref{thm:oo}. In our example at the top of Figure~\ref{fig:traces-layer}, $\rho$ has three higher priority gates that alternate between $AB$ and $AC$. Following the trace extension and partitioning rules, the length of the initial trace that gets stopped at the lowest priority $AB$-gate is bounded by $\omega$, since the trace is an $ABAB$-one that stops extending only when the follower of $\rho$ gets realized, which could take arbitrarily long. At the middle $AC$-gate, the stopped trace could be an $AC$-trace or a $BC$-trace. Either way, the length does not exceed two. At the bottom $AB$-gate, the stopped trace is an $ABAB$-one, which keeps extending until the previous $AC$-gate reopens, and that again could take arbitrary long. Hence the trace's length is bounded by $\omega$. Now each element of the trace at the bottom gate requests for one permission, so the number of requests by a trace of length $<\omega$ at the bottom is $<\omega$. But every $<\omega$-length trace at the bottom gate is extended from one element at the middle $AC$-gate. Since the trace at the middle gate is never more than two elements long, if we consider only the effect from the bottom two gates, the fickleness requested is bounded by $\omega\cdot 2$. Repeating this argument, every 2-element trace at the middle is generated from one element at the top gate, and since there are $>\omega$-elements at the top, the total length of all the traces of $\rho$ is bounded by $\omega\cdot 2\cdot \omega=\omega^2$, in our example where $\rho$ has only three higher priority gates. More generally, given that $\rho$ will not have more than $|\rho|$ higher priority gates, the total length of the traces from $\rho$ is bounded by \[\underbrace{\omega\cdot 2 \cdot\omega \cdot 2 \cdot\ldots \cdot \omega \cdot 2\cdot\omega}_{\leq|\rho| \text{ many products}} <\omega^{\lceil |\rho|/2 \rceil},\] obtained from the alternating $ABAB$ then $AC$-traces of length $<\omega$ and $\leq 2$ respectively. Similarly, with the addition of $J_C$ in Theorem~\ref{thm:oo-original}, the traces of $\rho$ alternate between $ABAB$- and $ACAC$-ones of length $<\omega$, as shown at the bottom of Figure~\ref{fig:traces-layer}, bounding the total length of traces by \[\underbrace{\omega\cdot \omega \cdot\ldots \cdot\omega}_{\leq|\rho| \text{ many products}} <\omega^{|\rho|}.\] Given that $|\rho|$ can get arbitrarily large, the bound of the fickleness for our theorem is still $\omega^\omega$, even though our traces do not grow at every other gate. The alternating $ABAB$- and $AC$-trace of our theorem guides the modification of the proof of Theorem~\ref{thm:oo-original}. In the original proof, roughly speaking, the authors set up $<\omega^\omega$-many layers to protect $\rho:A\not\leq C$. The layers alternate between $ABAB$- and $ACAC$-layers, each of length $<\omega$, to reflect the $ABAB$- and $ACAC$-traces generated by $\rho$. We tighten their proof by replacing every pair of $ABAB$-$ACAC$-layers by $ABAB$-$AC$-$ABAB$-layers, where the $ABAB$-layers are of length $<\omega$, while the middle $AC$-layer is an $AC$-pair. These $ABAB$-$AC$-$ABAB$ layers reflect the $ABAB$-$AC$-$ABAB$-traces. We reuse notation from \cite{downey2020hierarchy}. We describe the construction for the case with just two alternations of $AB$- then $AC$-gates, where we show that no r.e.\ set $X$ with degree fickleness $\leq\omega^2$ can embed structures satisfying the conditions of Theorem~\ref{thm:oo}. The generalization from $\omega^2$ to $\omega^n$ for arbitrary $n\in\omega$ will not be different from described in \cite{downey2020hierarchy}, so we focus on $\omega^2$, which illustrates most of the changes needed. Fix functionals $\Lambda$, $\Phi_0$, $\Phi_1$ such that $\Lambda(X)=(A,B,C)$, $A=\Phi_0(B,C)$, and $B=\Phi_1(A,C)$. For $x\in\omega$, define \begin{align*} x^{(1)} =_{\mathrm{def}} &\;\max\{\phi_0(x), \phi_1(x)\},\\ x^{(n+1)} =_{\mathrm{def}} &\; \left(x^{(n)}\right)^{(1)}, \end{align*} with the idea that a change in $A$ or $B$ below $x$ necessitates a change in $A$ or $B$ or $C$ below $x^{(1)}$. We think of $x^{(n)}$ as having $n$ \emph{layers} of protection above $x$, which our opponent $X$ can peel with all the fickleness that it has remaining. Our bottom-most layer can be thought of as an $A$-layer that is associated with an $A\leq C$-computation that we want to stop $X$ from peeling at all costs. If we set up enough layers, we can prevent $X$ from reaching that $A$-layer, which would have resulted in an $A$-change that diagonalized $A$ against a $C$-computation. Since $X$ has $\leq\omega^2$-fickleness, we set up $\omega^2$ many layers above the bottom one. But this strategy will only work if $X$ peels layers one at a time. If layers are lost quickly, then $X$ might reach the bottom layer with $\leq\omega^2$-fickleness. When double peeling occurs, we arrange to win by a meet requirement. For instance, if $A$ and $B$-layers are simultaneously peeled, we will receive the $AB$-changes needed to diagonalize some set $Q\leq A,B$ against another $C$-computable function, allowing us to win by $(\exists Q\leq A,B) [Q\nleq C]$. Similarly, if the $AC$-layers are peeled, we can win by $(\exists Q\leq A,C) [Q\nleq B]$. Let $\Delta(X)$ be the $\leq\omega^2$-fickle function in our construction. To know the number of layers to set up at a given stage, we want to know the fickleness that remains in $\Delta(X)$. In other words, we want to know the $\leq\omega^2$-fickle function that computably approximates $\Delta(X)$. By the following lemma, there are only countably many approximations to guess from, and we can effectively enumerate them: \begin{Lemma}[\cite{downey2020hierarchy}] \label{lemma:enum} Let $\alpha\leq \epsilon_0$. There exists a canonical $\mathcal{R}$ of order type $\alpha$, a computable function $g(e):\omega \to R$ known as the \emph{bounding function}, and uniformly computable functions $f^e(x,s):\omega^3\to\omega$ and $m^e(x,s):\omega^3\to R$ known as the \emph{computable approximation functions}, such that $\langle f^e(x,s), m^e(x,s)\rangle_s$ is a $g(e)$-computable approximation of $f^e(x) :=\lim_s f^e(x,s)$, and $\langle f^e\rangle_{e\in\omega}$ enumerates the $<\alpha$-fickle functions. \end{Lemma} We will not know which computable approximation works for $\Delta(X)$, so we simultaneously try all of them, letting the $e$-th \emph{agent} guess that $\Delta(X)$ is the $e$-th approximation $f^e,o^e$ as in the lemma, with $\Delta(X)=f^e$. At stage $s$, we keep track of the first $s$ steps of the first $s$ agents. As we shall see, the agents work independently because they construct their own sets and functionals that do not interfere with each other. If we guess that $\Delta(X)$ has $(\omega m_1+m_0)$-fickleness remaining, we would like to have $m_1$, followed by $m_0$ many levels of protection. Each level involves a pair of elements, so we shall set up $(2m_1+1)$ inner $ABAB$-layers, followed by a middle $AC$-layer, followed by $(2m_0+1)$ outer $ABAB$-layers, as illustrated at the top of Figure~\ref{fig:layers}. The bottom-most $A$-layer works for $C\leq A$, the $ABAB$-layers work to construct a set $\leq A,B$ that cannot be computed by $C$, and the middle $AC$-layer works to construct a set $\leq A,C$ that cannot be computed by $B$. \begin{figure}[tpb] \centering \tikzset{every picture/.style={thick}} \begin{tikzpicture}[every node/.style={rectangle,draw=none,fill=none}] \tikzset{pics/gate/.style n args={3}{code ={ \node at (-1,0) {$#1$}; \node[text width=10em,align=left] at (59+#2em,0.2) {$#3$}; \draw (0,0)--(5,0); }}, pics/gate/.default={\eta}{0}{abab} } \tikzset{pics/down/.style n args={3}{code ={ \draw[dashed] (#1,#2)--(#1,-2); \node at (#1,-2.2) {$#3$}; }}, pics/down/.default={-2}{-1}{x} } \tikzset{pics/eq/.style n args={4}{code ={ \node[rectangle,draw=none,fill=none] at (0,0) {$\begin{array}{c} \scriptstyle 2m_{#4}+1\\ \scriptstyle A,#1\geq #2\neq #3 \end{array}$}; }}, pics/eq/.default={B}{Q_{ij}}{\Psi_k(C)}{1} } \tikzset{layer1/.pic ={ \node at (0,0) {$ABAB\ldots ABAB$}; \node at (1.1,0.5) {$AC$}; \node at (2.2,1.0) {$ABAB\ldots ABAB$}; \node at (0.0,-0.4) {$\underbrace{\hspace{2.6cm}}$}; \path (-0.1,-1.0) pic{eq}; \node at (2.2,1.3) {$\overbrace{\hspace{2.6cm}}$}; \path (2.2,2.0) pic{eq={B}{Q}{\Psi_i(C)}{0}}; \node at (1.1,2.6) {$\overbrace{\hspace{0.4cm}}^{A,C\geq Q_i \neq\Psi_j(B)}$}; \path (0,0) pic{down={-1.3}{-0.5}{x_{ij}}}; \path (0,0) pic{down={1.1}{-0.5}{u_{ij}<x_i<u_i<x}}; \path (0,0) pic{down={3.4}{0.8}{u}}; \node at (-1.4,0.5) {$\overbrace{\hspace{0.1cm}}^{\Xi_{ijk}(C)=A}$}; }} \tikzset{layer2/.pic ={ \node at (0,0) {$ABAB\ldots ABAB$}; \node at (2.2,0.5) {$ACAC\ldots ACAC$}; \node at (0.0,-0.4) {$\underbrace{\hspace{2.6cm}}$}; \path (-0.1,-1.0) pic{eq={B}{Q}{\Psi_j(C)}{1}}; \node at (2.2,0.8) {$\overbrace{\hspace{2.6cm}}$}; \path (2.2,1.5) pic{eq={C}{Q}{\Psi_i(B)}{0}}; \node at (-1.4,0.5) {$\overbrace{\hspace{0.1cm}}^{\Xi_{ij}(C)=A}$}; }} \node at (-5,0) {Without $J_C: C\leq AB$}; \path (0,0) pic{layer1}; \node at (-5,-5) {With $J_C: C\leq AB$}; \path (0,-5) pic{layer2}; \end{tikzpicture} \caption{The top set of layers is obtained from the conditions in Theorem~\ref{thm:oo}, while the bottom set is from Theorem~\ref{thm:oo-original}, which has the additional join $J_C$. At the top, given that the opponent has $(\omega m_1+m_0)$ many fickleness remaining, we set up $(2m_1+1)$ inner $ABAB$-layers, followed by a middle $AC$-layer, followed by $(2m_0+1)$ outer $ABAB$-layers. Without $J_C$, the $AC$-layer cannot be longer. The $ABAB$-layers protect the $AB$-gate computations while the $AC$-layer protects the $AC$-gate computation. At the bottom, which has $J_C$, the $AC$-pair and second $ABAB$-layer can be replaced by a long $ACAC$-layer.} \label{fig:layers} \end{figure} The $e$-th agent sets up its layers by enumerating an r.e.\ set $Q=Q^e$ and functionals $\Gamma=\Gamma^e$ and $\Theta=\Theta^e$ with the aim of having \[\Gamma(A)=\Theta(B)=Q \neq \Psi_i(C)\] for all $i\in\omega$. If we fail at some $i$, we enumerate a backup r.e.\ set $Q_i=Q^e_i$ and functionals $\Gamma_i=\Gamma^e_i$ and $\Theta_i=\Theta^e_i$, with the aim of having \[\Gamma_i(A)=\Theta_i(C)=Q_i \neq \Psi_j(B)\] for all $j\in\omega$. If we fail at some $j$, we enumerate a backup r.e.\ set $Q_{ij}=Q^e_{ij}$ and functionals $\Gamma_{ij}=\Gamma^e_{ij}$ and $\Theta_{ij}=\Theta^e_{ij}$, with the aim of having \[\Gamma_{ij}(A)=\Theta_{ij}(B)=Q_{ij} \neq \Psi_k(C)\] for all $k\in\omega$. If we fail at some $k$, we enumerate a functional $\Xi_{ijk}=\Xi^e_{ijk}$ with the aim of having \[\Xi_{ijk}(C) = A.\] The agent appoints followers $x$, $x_i$, $x_{ij}$ targeted for $Q, Q_i, Q_{ij}$ respectively. Each $x_{ij}$ may change several $x_i$'s and each $x_i$ may change several $x$'s. If $n$ is the code associated with these three followers, then at a stage where $o^e(n)=\omega m_1+m_0$, we shall arrange that \begin{align*} u_{ij}= &\;\max\left\{x_{ij}^{(2m_1+1)}, \gamma_{ij}(x_{ij})\right\},\\ u_i= &\;\max\left\{x_i^{(2)}, \gamma_i(x_i)\right\},\\ u= &\;\max\left\{x^{(2m_0+1)}, \gamma(x)\right\}, \end{align*} \begin{align} \label{eq:u} x_{ij} <u_{ij} <x_i <u_i <x <u <\lambda(u_x) <\delta(n), \end{align} as illustrated at the top of Figure~\ref{fig:layers}, where $x_{ij}$ denotes the position of the bottom-most layer, $u_{ij}$ denotes the end of the $(2m_1+1)$ inner $ABAB$-layers, $u_i$ denotes the end of the middle $AC$-layers, while $u$ denotes the end of the $(2m_0+1)$ outer $ABAB$-layers. The $e$-th agent enumerates its version of $Q, Q_i, Q_{ij}$, so there is no conflict with other agents. We often drop the subscript $e$ for conciseness. When the opponent attacks, it loses one fickleness and peels one or more layers. If the middle layers are attacked, resulting in $AB$, $BA$, or $AC$-changes, then we can win by the gate associated with those changes. Consider what happens when the opponent peels one layer at a time, or in order words, peels only the outermost layer whenever it attacks. What happens after the outer set of $ABAB$-layers, then the middle pair of $AC$-layers, which are those above $x_i$, have been peeled? The opponent's remaining fickleness would have descended to the next limit ordinal $\omega m_1$. Then when the opponent next attacks, it will peel the $B$-layer below $x_i$, and its ammunition would fall below the limit ordinal, say to $\omega (m_1-1) +m_0'$. The $B$-change causes $\Psi_j(B,x_i)$ to diverge, or, in other words, causes $x_i$ to be un-realized, which allows us to set up a new pair of middle $AC$-layers and $(2m_0'+1)$ outer $ABAB$-layers above the pair. This makes us ready for $(\omega (m_1-1) +m_0')$ many attacks. In other words, no more than two layers below $x_i$ will be lost before we can set up layers again, which makes the $(2m_0+1)$ many layers above $x_{ij}$ sufficient against our opponent. In fuller detail, we pick large followers $x_{ij}<x_i<x$ satisfying Equation~\eqref{eq:u} and wait for the followers to be realized. While waiting, we re-pick $x_i$ and $x$, if necessary, to preserve the equation. In the meantime, we also update \[\delta(n)=\lambda(u).\] After the followers are realized, set \begin{align} \label{eq:psi} \xi(x_{ij}) &=\max\{u_{ij},\psi_k(x_{ij})\},\\ \nonumber \theta_{ij}(x_{ij}) &=\max\{u_i,\psi_j(x_i)\},\\ \nonumber \theta_i(x_i) &=\max\{u,\psi_i(x)\},\\ \nonumber \theta(x) &=u. \end{align} Note that $\xi$ ($\theta_{ij}$, $\theta_i$) can be maintained because it only needs to exist if $\Psi_k$ (respectively $\Psi_j$, $\Psi_i$) is total. Consider the possible ways that the opponent may peel $x_{ij}'s$ $(2m_1+1)$ many layers that lie between $x_{ij}$ and $x_i$ and that are $\leq u_{ij}$. If $C$ changes below $u_{ij}$, then $\xi(x_{ij})\uparrow$ and $\delta(n)\uparrow$, which allows us to cancel all three followers and pick new large ones. If $C$ changes below $\psi_k(x_{ij})$ but not below $u_{ij}$, then $x_{ij}$ is un-realized and $\delta(n)\uparrow$, so we return to the earlier phase of waiting for realization to update Equations~\eqref{eq:psi}. If an inner $A$-layer is peeled ($\gamma_{ij}(x_{ij})\uparrow$), which results in the next $B$-layer being peeled ($\theta_{ij}(x_{ij})\uparrow$), then the simultaneous $AB$-change allows us to \emph{attack with $x_{ij}$} by enumerating $x_{ij}$ into $Q_{ij}$ and winning by $\Gamma_{ij}(A,x_{ij}) =\Theta_{ij}(B,x_{ij}) =Q_{ij}(x) \neq \Psi_k(C,x_{ij})$. If an $A$-change resulted instead in a $C$-change, then two of $x_i$'s layers will be peeled, since $\gamma_i(x_i),\theta_i(x_i)\geq x_i>u_{x_{ij}}$. This allows us to attack with $x_i$. If $x_{ij}$'s outer-most $B$-layer is peeled, then the $\theta_{ij}(x_{ij})$ and $\delta(n)$ changes allow us to cancel $x_i$ and $x$ and set up new large ones. Finally, if $x_{ij}$'s outer-most $A$-layer is peeled, then $x_{ij}$ indeed loses a layer. Next, consider $x_i's$ two layers, which lie between $x_i$ and $x$ and that are $\leq u_i$. Similar to the smaller follower, $B$-changes below $u_i$ allow us to cancel $x_i$ and $x$, while $B$-changes below $\psi_j(x_i)$ allow us to wait for realization of $x_i$ again. Also, if the inner $A$-layer is peeled ($\gamma_i(x_i)\uparrow$), which results in the next $C$-layer to be peeled ($\theta_i(x_i)\uparrow$), then we can \emph{attack with $x_i$}. If an $A$-change resulted instead in a $B$-change, then two of $x$'s layers will be peeled, since $\gamma(x),\theta(x)\geq x>u_{x_i}$. This allows us to attack with $x$. If $x_i$'s outer-most $C$-layer is peeled, we can cancel $x$ and set up a new large one. Finally, if $x_i$'s outer-most $A$-layer is peeled, then $x_i$ indeed loses a layer. Finally, consider $x's$ $(2m_0+1)$ many layers that lie between $x$ and $\leq u$. Similar to the smallest follower, $B$-changes below $u$ allow us to cancel $x$, while $C$-changes below $\psi_i(x)$ allow us to wait for realization of $x$ again. Also, if the inner $A$-layer is peeled ($\gamma(x)\uparrow$), which results in the next $B$-layer to be peeled ($\theta(x)\uparrow$), we can \emph{attack with $x$}. If an $A$-change resulted instead in a $C$-change, then this change below $u$ allows us to cancel $x$, as just mentioned. If $x$'s outer-most $A$ or $B$-layer is peeled, then $x$ indeed loses a layer. Note that our two-gate construction is similar to the three-gate one of \cite{downey2020hierarchy}. But we need to be careful when inner $C$-layers are peeled, since we will not be able to obtain a $CA$- or $CB$-change without $J_C: C\leq BA$, and these changes could have helped us to win at a gate. The paragraphs above hint at why $J_C$ was not needed: When we obtain a solo $C$-change in the middle, we can cancel followers and set up new layers, to the effect of not losing layers. Consider the trickier situation where layers between $x$ and $u$ are still unpeeled, but the $C$-layer below $u_i$ which belongs to $x_i$ is peeled ($\theta(x_i)\uparrow$). One might worry that the $A$-layer below the peeled layer will now become vulnerable. We argue that this is not the case: The $C$-change allows us to cancel $x$ and set up $(2m_0+1)$ many new layers above a new $x$. We are also allowed to lift $\theta_i(x_i)$ above the new $u$ and $\psi_i(x)$. Assume there are attacks on the $A$-layer ($\gamma(x_i)\uparrow$) below the lost $C$-layer due to a $B$-change. If this $A$-change occurred before the new $x$ is realized, then we can attack with $x_i$, since $\gamma(x_i)$ will not have converged yet. If the $A$-change occurred after realization, we will be able to attack with the new $x$ because the $AB$-change would be below the new $u_i$, which is in turn $\leq x\leq \gamma(x), \theta(x)$. Another concern is if the $B$-change occurred without the $A$-layer below being peeled away. The $B$-change would exceed $\theta_{ij}(x_{ij})$, making us unable to cancel $x_i$, as we would have before the $C$-layer was gone. The $B$-change must lead to an $A$- or $C$-change on the layer above. In the former case, we can attack with $x$, and in the latter case, we can cancel $x$ and set up new layers, as in the situation when the original $C$-layer was peeled. A symmetrical argument can be made to show how the outer-most $A$-layer of $x_{ij}$ cannot be peeled as long as there are layers belonging to $x_i$ sitting above. We are also prepared against attacks on the middle layers. For instance, if the opponent attacked the layers of $x_{ij}$ ($x$), we can obtain changes in $C$, $AC$, $BC$, $AB$, or in $BA$. In the first three cases, we may cancel $x_{ij}$ ($x$), and in the last two cases we may attack with $x_{ij}$ ($x$). If we attacked the middle layers of $x_i$, changes in $AC$ allow us to attack with $x_i$, changes in $C$ or $BC$ allow us to cancel $x$, while changes in $AB$ or $BA$ allow us to win by $x$. The precise verification of this 2-gate construction is similar to the 3-gate construction of \cite{downey2020hierarchy}. To generalize to the $n$-gate case, the generalization in \cite{downey2020hierarchy} still applies: If we guess that $\Delta(X)$ is $\omega^r$-fickle, so that \[o^e(n)=\omega^{r-1}m_{r-1} +\ldots +\omega m_1 +m_0,\] we set up $2r-1$ many followers that alternate between having $AB$- and $AC$-layers, and a follower associated with $AC$ has only two $AC$-layers above it, while the $k$-th largest follower associated with $AB$ has $2m_k+1$ $AB$-layers above it. \begin{comment} \begin{align} \label{eq:strong4} \begin{matrix} A\wedge B \leq CD, & A\leq BCD,\\ A\wedge C \leq BD, & B\leq ACD,\\ A\wedge D \leq BC, & C\leq ABD,\\ B\wedge C \leq AD, & D\leq ABC,\\ B\wedge D \leq AC, &\\ C\wedge D \leq AB, & A\not\leq B,\\ \end{matrix} \end{align} \begin{conj} \label{conj:direct-proof2} Any lattice with points satisfying equations~\ref{eq:strong4} cannot be embedded below any $\talpha(<\omega^\omega)$ degree. \end{conj} \end{comment} \section{Rejecting some ``Larger'' Lattices Quickly} \label{sec:reject} Since the $\leq3$-direct lattices are not $>\omega^2$-lattices, we considered larger structures as candidates. Given that $L_7$ characterizes the $>\omega$-levels, it was speculated that we could reach the $>\omega^2$-levels by making two $L_7$'s interact with each other. The two candidates in Figure~\ref{fig:lempp-lerman} were suggested as a result. However, we can use earlier results to reject these candidates immediately: Theorem~\ref{thm:oo} says that any structure that satisfies the conditions of the theorem demands at least $\omega^\omega$-fickleness and therefore cannot be a candidate $>\omega^2$-lattice. In particular, since the four lattices in the top row of Figure~\ref{fig:3direct} satisfy those conditions, we get: \begin{Corollary} \label{cor:non-candidate} A structure cannot characterize $>\omega^2$-fickleness if it contains, as sublattice, any of the four lattices in the top row of Figure~\ref{fig:3direct}. \end{Corollary} \begin{figure}[tpb] \centering \tikzset{every picture/.style={thick}} \begin{tikzpicture}[every node/.style={circle,fill=black,inner sep=1.5pt}] \tikzset{lempp/.pic ={ \node[fill=red] (0) at (0,-1) {}; \node (1) at (0,1.5) {}; \node[fill=red] (A) at (-0.5,-0.5) {}; \node (X) at (0.5,-0.5) {}; \node (AX) at (0,0) {}; \node (BX) at (-0.5,0.5) {}; \node (AY) at (0.5,0.5) {}; \node[fill=red] (C) at (-1.5,0.5) {}; \node (Z) at (1.5,0.5) {}; \draw[ultra thick] (1) --(Z) --(X) --(BX) --(1) --(AY) --(AX); \draw[densely dotted,red] (1) --(C) --(A) --(0) --(X); \draw[densely dotted,red] (AX) --(A); }} \tikzset{lerman/.pic ={ \node (0) at (0,-1) {}; \node (1) at (0,1.5) {}; \node (AY) at (0.5,0.5) {}; \node (C) at (-1.5,0.5) {}; \node (Z) at (1.5,0.5) {}; \node (Y) at (1,0) {}; \node (X) at (0,-1) {}; \node[fill=red] (AX) at (0,0) {}; \node[fill=red] (BX) at (-0.5,0.5) {}; \node[fill=red] (B) at (-1,0) {}; \draw[ultra thick] (1) --(C) --(0) --(Y) --(Z) --(1) --(AY) --(Y); \draw[densely dotted,red] (1) --(BX) --(AX) --(X); \draw[densely dotted,red] (AY) --(AX); \draw[densely dotted,red] (BX) --(B); }} \tikzset{large/.pic ={ \node[red] (abc) at (0,4) {}; \node[red] (ab) at (-4.5,3) {}; \node[red] (ac) at (0,3) {}; \node[red] (bc) at (4.5,3) {}; \node[red] (abnac) at (-4.5,2) {}; \node[red] (abnbc) at (0,2) {}; \node[red] (acnbc) at (4.5,2) {}; \node (abnacnbc) at (0,1) {}; \node[red] (a) at (-4.5,0) {}; \node[red] (b) at (0,0) {}; \node[red] (c) at (4.5,0) {}; \node (anbc) at (-4.5,-1) {}; \node (bnac) at (0,-1) {}; \node (cnab) at (4.5,-1) {}; \node (0) at (0,-2) {}; \draw[densely dotted,red] (abc)--(ab)--(abnac)--(a)--(anbc)--(0)--(cnab)--(c)--(acnbc)--(bc)--(abc)--(ac)--(abnac)--(abnacnbc)--(acnbc)--(ac); \draw[densely dotted,red] (ab)--(abnbc)--(bc) (abnbc)--(abnacnbc)--(anbc) (abnacnbc)--(cnab) (b)--(bnac)--(0); \draw[densely dotted,red] (b) edge[bend left] (abnbc); \draw[ultra thick] (bnac) edge[bend right] (abnacnbc); \draw[ultra thick] (bnac)--(0)--(anbc)--(abnacnbc)--(cnab)--(0); }} \path (-3,0) pic[scale=0.5]{lempp}; \path (0,0) pic[scale=0.5]{lerman}; \end{tikzpicture} \caption{These lattices cannot characterize $>\omega^2$-fickleness by Corollary~\ref{cor:non-candidate}. The overly fickle sublattice is shown in solid black lines. The lattices were suggested by Steffen Lempp and Manuel Lerman respectively.} \label{fig:lempp-lerman} \end{figure} \section{Some ``Short'' and ``Narrow'' Upper Semilattices (USLs)} \label{sec:usl} We also considered USLs $\mathcal{U} =(U,\leq,\cup,\cap)$ as $>\omega^2$-candidates. In a USL, the meet function $\cap$ may not be total. We obtained USLs by breaking some meets of the finite lattices considered earlier. For example, if we removed the meet of $M_3$, we would get the right most USL at the bottom row of Figure~\ref{fig:usls}, where the removed meet is depicted by an open circle. The figure also shows other USLs based on lattices in Figure~\ref{fig:3direct}. We can show that: \begin{figure}[tpb] \centering \tikzset{every picture/.style={thick}} \begin{tikzpicture}[every node/.style={circle,draw=black,fill=black,inner sep=1.2pt}] \tikzset{pics/oo0/.style n args={2}{code ={ \node[fill=#2] (d) at (0,-1) {}; \node (l) at (-1,0) {}; \node (u) at (0,1) {}; \node (r) at (1,0) {}; \node (c) at (0,0) {}; \node[fill=#1] (dl) at (-0.5,-0.5) {}; \draw (dl) --(c) --(u) --(r) --(d) --(dl) --(l) --(u); }}, pics/oo0/.default={black}{black} } \tikzset{pics/oo0s/.style n args={2}{code ={ \path (#2,0) pic[scale=#1]{oo0={black}{white}}; \path (#2*2,0) pic[scale=#1]{oo0={white}{white}}; }}, pics/oo0s/.default={1.0}{3} } \tikzset{pics/oo1/.style n args={2}{code ={ \node[fill=#2] (d) at (0,-1) {}; \node (l) at (-1,0) {}; \node (u) at (0,1) {}; \node (ul) at (-0.5,0.5) {}; \node (r) at (1,0) {}; \node (c) at (0,0) {}; \node[fill=#1] (dr) at (0.5,-0.5) {}; \draw[thick] (dr) --(c) --(ul) --(u) --(r) --(dr) --(d) --(l) --(ul); }}, pics/oo1/.default={black}{black} } \tikzset{pics/oo1s/.style n args={2}{code ={ \path (#2,0) pic[scale=#1]{oo1={black}{white}}; \path (#2*2,0) pic[scale=#1]{oo1={white}{white}}; }}, pics/oo1s/.default={1.0}{3} } \tikzset{pics/oo2/.style n args={2}{code ={ \node[fill=#1] (d) at (0, -1) {}; \node (lu) at (-0.5, 0.5) {}; \node (l) at (-1, 0) {}; \node (u) at (0, 1) {}; \node (r) at (1, 0) {}; \node (c) at (0, 0) {}; \draw (lu)--(c)--(d)--(l)--(lu)--(u)--(r)--(d); }}, pics/oo2/.default={black}{0} } \tikzset{pics/oo2s/.style n args={2}{code ={ \path (#2,0) pic[scale=#1]{oo2={white}{0}}; }}, pics/oo2s/.default={1.0}{3} } \tikzset{pics/m3/.style n args={2}{code ={ \node[fill=#1] (a) at (0, -1) {}; \node (b) at (-1, 0) {}; \node (c) at (0, 1) {}; \node (d) at (1, 0) {}; \node (e) at (0, 0) {}; \draw (a) -- (b) -- (c) -- (d) -- (a) -- (e) -- (c); }}, pics/m3/.default={black}{0} } \tikzset{pics/m3s/.style n args={2}{code ={ \path (#2,0) pic[scale=#1]{m3={white}{0}}; }}, pics/m3s/.default={1.0}{3} } \tikzset{pics/l7/.style n args={3}{code ={ \node[fill=#3] (a) at (0, -1) {}; \node (b) at (-1, 0) {}; \node (c) at (0, 1) {}; \node (d) at (1, 0) {}; \node (e) at (0, 0) {}; \draw[thick] (a) -- (b) -- (c) -- (d) -- (a); \node[fill=#1] (f) at (-0.5, -0.5) {}; \node[fill=#2] (g) at (0.5, -0.5) {}; \draw[thick] (c)--(e)--(f) (e)--(g); }}, pics/l7/.default={black}{black}{black} } \tikzset{pics/l7s/.style n args={2}{code ={ \path (#2,0) pic[scale=#1]{l7={black}{black}{white}}; \path (#2*2,0) pic[scale=#1]{l7={black}{white}{white}}; \path (#2*3,0) pic[scale=#1]{l7={white}{white}{white}}; }}, pics/l7s/.default={1.0}{3} } \path (0,1.5) pic{l7s={0.4}{1.0}}; \path (0,0) pic{oo0s={0.4}{1.0}}; \path (3,0) pic{oo1s={0.4}{1.0}}; \path (6,0) pic{oo2s={0.4}{1.0}}; \path (8,0) pic{m3s={0.4}{1.0}}; \end{tikzpicture} \caption{Here are some USLs obtained from removing some meets of lattices in Figure~\ref{fig:3direct}. Removed meets are shown as open circles. For instance, the USLs at the top are based on $L_7$ (Figure~\ref{fig:l7}). Each USL turns out to characterize the same degrees as its lattice. Specifically, those at the top characterize $>\omega$-fickleness, while those below characterize $\geq\omega^\omega$-fickleness.} \label{fig:usls} \end{figure} \begin{Theorem} \label{thm:usls} The USLs in Figure~\ref{fig:usls} characterize the same r.e.\ degrees as the lattice they are based on. \end{Theorem} In particular, the USLs considered do not characterize $>\omega^2$-fickleness. From the theorem, we conjecture: \begin{Conjecture} \label{conj:usl-equals-lattice} Let $U$ be a USL obtained by removing some meets of a finite lattice $L$. An r.e.\ degree bounds $U$ if and only if it bounds $L$. \end{Conjecture} Note that our USLs are different from the \emph{partial lattices} in \cite{lempp2006embedding}, where the authors removed not just the meet but also requirements associated with meets, producing structures that are embeddable below all nonzero r.e.\ degrees. Our USLs retain some form of meet, making them more difficult to embed. The USL in Theorem~\ref{thm:usls} that takes most work is the one enlarged in Figure~\ref{fig:usl-m3}, which is based on $M_3$ (Figure~\ref{fig:N5-131}). In the rest of this section, we prove the theorem for this USL. Details for the easier USLs can be found in \cite{ko2021thesis}. \begin{figure}[tpb] \centering \tikzset{every picture/.style={thick}} \begin{tikzpicture}[every node/.style={circle,fill=black,draw=black,inner sep=2.0pt}] \tikzset{131/.pic ={ \node[fill=white] (d) at (0,-1) {}; \node[label=above:{$A$}] (l) at (-1,0) {}; \node (u) at (0,1) {}; \node[label=above:{$C$}] (r) at (1,0) {}; \node[label=above:{$B$}] (c) at (0,0) {}; \draw[thick] (d) --(c) --(u) --(r) --(d) --(l) --(u); }} \tikzset{pics/eq/.style n args={2}{code ={ \node[rectangle,draw=none,fill=none] at (0,0) {$\begin{array}{rrcll} \text{Join: } &A &\leq &BC,\\ &B &\leq &AC,\\ &C &\leq &AB,\\ \text{Diagonalize: } &A &\nleq &B,\\ &B &\nleq &A,\\ &A &\nleq &C,\\ &C &\nleq &A,\\ &B &\nleq &C,\\ &C &\nleq &B,\\ \text{Meet: } &(\forall W\leq A &, &B) &[W\leq C],\\ &(\forall W\leq A &, &C) &[W\leq B],\\ &(\forall W\leq B &, &C) &[W\leq A],\\ \text{Non-Meet: } &A &\cap &B &\text{does not exist},\\ &A &\cap &C &\text{does not exist},\\ &B &\cap &C &\text{does not exist}. \end{array}$}; }}, pics/eq/.default={x}{y} } \path (0,0) pic{131}; \path (5,0) pic{eq}; \end{tikzpicture} \caption{This USL is obtained from removing the meet of $M_3$. The removed meet is shown as an open circle, and the requirements for bounding this USL are shown on the right. Like $M_3$, this USL characterizes the r.e.\ degrees that contain $\geq\omega^\omega$-fickle sets.} \label{fig:usl-m3} \end{figure} For the easier direction of the proof, we need to show that any r.e.\ degree that bounds the USL must contain a set of fickleness $\geq\omega^\omega$. Consider the requirements involved, shown at the right of Figure~\ref{fig:usl-m3}. The join ($J$) and diagonalization ($\rho$) requirements are exactly the same as the original lattice. As for the meets/gates $\eta$, there are three types: \begin{align*} \eta_{W,C}: (\forall W \leq A,B) [W\leq C],\\ \eta_{W,B}: (\forall W \leq A,C) [W\leq B],\\ \eta_{W,A}: (\forall W \leq B,C) [W\leq A]. \end{align*} We often drop the $W$ subscript. The computations associated with gate $\eta_A$ need to be computable by $A$, so we say that $\eta_A$'s \emph{computing set} is $A$. Similarly, the computing set of $\eta_B$ ($\eta_C$) is $B$ ($C$). These gates are not strictly meets because $A\cap B$, $A\cap C$, and $B\cap C$ do not exist, but we still call them meets/gates because their strategies are the same as the $\eta$-strategies of Section~\ref{sec:sufficient}. Now $J$, $\rho$, and $\eta$ satisfy the conditions in Theorem~\ref{thm:oo}, so $\geq\omega^\omega$-fickleness is necessary to bound the USL, which completes the easier direction of the proof. For the converse, fix an r.e.\ set $X$ whose degree contains a set $\Delta(X)$ of fickleness $\geq\omega^\omega$. We want to construct r.e.\ sets $A,B,C$ that satisfy the joins \begin{align*} J_A: &A\leq BC,\\ J_B: &B\leq AC,\\ J_C: &C\leq AB, \end{align*} the three types of gates $\eta_A$, $\eta_B$, and $\eta_C$, and the six types of $\rho$ requirements. The strategies for $J$ and $\eta$ were described in Section~\ref{sec:sufficient}. The interactions between $J$, $\rho$, and $\eta$ are like in $M_3$, which was shown in \cite{downey2020hierarchy} to produce traces of length $<\omega^\omega$, making $\geq\omega^\omega$-fickleness sufficient for satisfying $\rho$. Finally, consider the ``\emph{non-meet}'' requirements. There are three types, and they exert the non-existence of $A\cap B$, $A\cap C$ and $B\cap C$ respectively. We discuss only the first type, since the strategies of the others are the same after swapping the roles of $A$, $B$, and $C$. Given an r.e.\ set $V<A,B$ via $\Gamma=(\Gamma_A,\Gamma_B)$, we construct r.e.\ $E=E_{V\Gamma}$ via functional and $\Lambda=(\Lambda_A,\Lambda_B,\Lambda_C) =(\Lambda_{V\Gamma,A}, \Lambda_{V\Gamma,B},\Lambda_{V\Gamma,C})$, such that for all $\Pi$: \begin{align*} \tau_{V\Gamma}:\; &V =\Gamma_A(A)=\Gamma_B(B) \implies \exists E, \Lambda_A, \Lambda_B, \Lambda_C \text{ such that}\\ &E =\Lambda_A(A) =\Lambda_B(B) =\Lambda_C(C), \text{ and }\\ \tau_{V\Gamma\Pi}:\; &\Pi(V) \neq E. \end{align*} When context is clear, we drop subscripts $V\Gamma$. We use $\tau$ and $\tau_\Pi$ to refer to the two requirements, and call them parent and child nodes respectively. The hypothesis of the parent says that $V\leq A,B$. If this holds, then $E$ witnesses that $V\neq A\cap B$, since $E$ is a set below $A$ and $B$ that cannot be computed by $V$ regardless of the functional $\Pi$ used for the $V$-computation. Note that we have assumed $V$ to be \text{r.e.}; this is enough because the meet of r.e.\ degrees, if it exists, must also be \text{r.e.}, according to this lemma: \begin{Lemma}[\cite{lachlan1966lower}] If $A$ and $B$ are r.e.\ sets, and $U\leq_{\mathrm{T}} A,B$ (not necessarily \text{r.e.}), then there exists an r.e.\ set $V\leq_{\mathrm{T}} A,B$ such that $U\leq V$. \end{Lemma} Note that $\tau$ and its countably many children $\tau_\Pi$ also exert the non-existence of $A\cap B\cap C$, since any set below $A$ and $B$ is also below $A,B,C$, and the r.e.\ set $E$ constructed lies not just below $A$ and $B$, but also below $C$. Fix a computable ordering of the requirements so that child nodes are always of lower priority than their parent. We can ignore a child if the hypothesis $V=\Gamma_A(A)=\Gamma_B(B)$ of its parent does not hold. We use the usual notion of $\tau$-expansionary stages to guess the outcome of a parent's hypothesis. Specifically, define the \emph{length} of $\tau$ at stage $s$ as \begin{align*} \mathrm{length}(\tau)[s] &:=\max_{v\leq s}\; \left\{V\restriction v =\Gamma_A\restriction v =\Gamma_B\restriction v[s]\right\}, \end{align*} and we guess that $\tau$ has outcome $\infty$ at stage $s$ if $s$ is an \emph{$\tau$-expansionary} stage, which is when \begin{align*} \mathrm{length}(\tau)[s] &>\max_{s'<s}\{\mathrm{length}(\tau)[s']: s' \text{ is a } \tau\text{-stage}\}. \end{align*} Otherwise, we guess that the outcome of $\tau$ is $\texttt{fin}$. By $\tau$-expansionary stages, we must increase our definitions of $E$, $\Lambda_A$, $\Lambda_B$, and $\Lambda_C$, so that if $\tau$'s true outcome is $\infty$, then $E=\Lambda_A(A)=\Lambda_B(B)=\Lambda_C(C)$: \begin{framed} \noindent\textbf{$\tau=\tau_{V\Gamma}$-strategy}: \emph{Initialize} $\tau$ by setting $\Lambda_A=\Lambda_B=\Lambda_C=\emptyset$, $x=0$. \begin{enumerate} \item \emph{Maintain}: Wait for a $\tau$-expansionary stage. For each $e<x$, if $\lambda_A(e)$ or $\lambda_B(e)$ or $\lambda_C(e)$ is not defined, pick a large value for these uses, which are targeted for $A$, $B$, and $C$ respectively. Return to the beginning of this maintenance phase for $e+1$. \end{enumerate} \end{framed} We refer to $\lambda_A(e)$, $\lambda_B(e)$, and $\lambda_C(e)$ as the $A$, $B$, and $C$-uses of $e$ respectively. Each of these uses may be lifted only finitely often. Now consider the $\tau_\Pi$-strategy, which is based on the usual Friedberg Muchnik one, and as we shall see, is a finite injury requirement that inflicts both positive and negative injury. If $\tau_\Pi \succeq\tau^\frown\texttt{fin}$, we can ignore $\tau_\Pi$. Henceforth, assume $\tau_\Pi \succeq\tau^\frown\infty$. Pick a large follower $e$ targeted for $E$, and (re)assign $e$ large $A$, $B$, and $C$-uses by $\tau$-expansionary stages. Note that these stages are not necessarily $\tau_\Pi$-stages, since $\tau^\frown\infty\preceq\tau_\Pi$. Therefore, we need to be mindful of the interactions between $\tau_\Pi$ and $\eta$ later, if $\tau\prec\eta\prec\tau_\Pi$, for $\tau_\Pi$'s uses may not be picked at $\eta$-expansionary stages, making the uses small enough to injure some of $\eta$'s earlier subrequirements. Next, we wait for $e$ to be \emph{realized} ($\Pi(e)=0$). We would like to diagonalize at $e$ by enumerating $e$ with its uses simultaneously. But to avoid un-realizing $e$, we need: \begin{align*} \lambda_A(e) >\gamma_A(\restriction \pi(e)+1),\\ \text{or }\;\;\; \lambda_B(e) >\gamma_B(\restriction \pi(e)+1). \end{align*} In other words, we want to first lift the $A$- or $B$-use above its respective $\gamma$-use. Without loss of generality, we lift the $A$-use. To prevent the $B$-side of the computation from being lost, which could cause $e$ to be un-realized, we impose a restraint of $\gamma_B(\pi(e)+1)$ on $B$ prior to lifting. After lifting, by the next $\tau$-expansionary stage, the computation on the $\Gamma_A$-side would have returned, and we would pick a new large value for the $A$-use $\lambda_A(e)$, to exceed the $\gamma_A$-use. We can now change our restraint to the $A$-side by cancelling our restraint on $B$ and preventing elements below the raised $\gamma_A(\pi(e)+1)$ from entering $A$. Finally, we wait for $X$ to grant permission to enumerate $e$ with its new uses simultaneously. The $B$-enumeration may injure the $\gamma_B$-side of the computation, but $e$ will not become un-realized, because we are holding the $\gamma_A$-side of the computation, and if the $\gamma_B$-side does not return to equal the $\gamma_A$-side, then $\tau$ wins finitely and vacuously and we can ignore $\tau_\Pi$. Notice that each $e$ sets restraints and enumerates uses no more than twice. Therefore, $\tau_\Pi$ is a finite injury requirement, allowing it to interact nicely with other finitary requirements such as $\rho$. What about interactions with infinitary requirements such as gates? First consider the easier case where a gate $\eta$ lies between $\tau$ and $\tau_\Pi$; for instance, if: \[\tau^\frown\infty \preceq \eta_A^\frown\infty \preceq \tau_\Pi.\] Recall that the strategy of a subrequirement $\eta_A,m$ involves enumerating an element $\leq\theta(m)$ into $A$, if ``small'' elements are enumerated into $B$ and $C$ simultaneously, which injured the $B$ and $C$-sides of the subrequirement. Now simultaneous enumeration occurs only at the end of the $\tau_\Pi$-strategy, when $e$ enumerates its uses. We need to ensure that if the $B$ and $C$-uses are small, then $\theta(m)$ can be picked to exceed the $A$-use. There are two cases. In the easier case, $\eta_A,m$ is set up before $e$. Then at least one of $e$'s $B$ and $C$-uses will be too large to injure the computations of $\eta_A,m$. In the harder case, the subrequirement is set up later. But because we only tend to the subrequirement at $\eta_A$-expansionary stages, which are also $\tau$-expansionary stages where $e$'s uses exist, $\eta_A,m$ will always know the latest values of those uses, and in particular, update $\theta(m)$ to exceed the latest $A$-use. Then the enumeration of the final $A$-use will lift $\theta(m)$, as desired. Likewise, if $\eta$ works for $\eta_B$ ($\eta_C$), then because $\tau\prec\eta$, $\eta$ can keep track of the latest $B$-use ($C$-use) of $e$, and delay believing computations until that use and $e$ have been enumerated. The situation is trickier when $\tau_\Pi$ interacts with infinitary gates $\eta^\frown\infty \preceq\tau$ of higher priority than $\tau$; for instance, if: \[\eta_A^\frown\infty \preceq \tau^\frown\infty \preceq\tau_\Pi.\] Recall in our sketch of the $\tau_\Pi$-strategy that $e$ lifted its $A$-use once. A non-trivial situation occurs when a subrequirement $\eta_A,m_A$ is set up after $e$'s $A$-use is enumerated, but before stage $s_0$, the next $\tau$-expansionary stage when the new use is picked. $e$'s $B$ and $C$-uses may be small enough to injure both sides of the subrequirement, so we want $\theta(m_A)$ to exceed $e$'s $A$-use, should $e$'s current $B$ and $C$-uses be the final ones to be enumerated together later. But $\theta(m_A)$ may not be large enough, because it must be picked by the next $\eta_A$-expansionary stage, which generally comes before stage $s_0$. Therefore one of $e$'s $B$- or $C$-uses must be lifted after stage $s_0$, to avoid injuring $\eta_A,m_A$ at both sides. Without loss of generality, suppose we lift the $B$-use at some stage $s_1>s_0$. What happens if there is an $\eta_B$ gate of higher priority than $\eta_A$: \[\eta_B^\frown\infty \preceq \eta_A^\frown\infty \preceq \tau^\frown\infty \preceq\tau_\Pi.\] A subrequirement $\eta_B,m_B$ might be set up after $e$'s $B$-use is enumerated, but before stage $s_1$, when the new $B$-use is picked. Like above, $e$'s $A$ and $C$-uses might be small enough to injure both sides of $\eta_B,m_B$, so we either want to lift $\theta(m_B)$ beyond $e$'s $B$-use, or lift one of $e$'s $A$- or $C$-uses. The former is not possible because $\eta_B\prec\tau$, so we are forced to lift $e$'s use again. Suppose we fix the convention of not lifting $e$'s $A$-use again, choosing instead to lift the $B$ or $C$-uses when needed. In particular, we lift the $C$-use at some stage $s_2>s_1$. What happens if there is an $\eta_C$-gate of higher priority than $\eta_B$: \[\eta_C^\frown\infty \preceq \eta_B^\frown\infty \preceq \eta_A^\frown\infty \preceq \tau^\frown\infty \preceq\tau_\Pi.\] Repeating earlier argument, a subrequirement of $\eta_C$ that is set up after $e$'s $C$-use is enumerated, but before stage $s_2$, will call for $e$'s $B$ or $C$-use to be lifted after stage $s_2$. Even if we chose to lift $e$'s $A$-use instead of its $C$-use at stage $s_2$, we cannot avoid needing to lift one of $e$'s uses again after stage $s_2$, if there is a gate which works for $B\cap C\leq A$ of higher priority than $\eta_B$. More generally, assume there are $n$ many gates of higher priority than $\tau$: \[\eta_1^\frown\infty \preceq\eta_1^\frown\infty \preceq \ldots \preceq\eta_n^\frown\infty \preceq\tau.\] Following the sketch above, to prevent $e$ from being un-realized, we lift its $A$-use once and set a restraint on $A$. Then by the convention of not lifting the $A$-use again, we alternate between lifting the $B$ and $C$-uses to appease the gates $\preceq\tau$. After $k$ many lifts, we would have appeased the $k$ lowest priority gates \[\eta_{n-k+1} \prec\ldots \prec\eta_n,\] and we say that $e$ has \emph{passed} those gates. $e$ passes one more higher priority gate with every $B$ or $C$ lift, which means that no more $n\leq|\tau|$ many $B$ and $C$ lifts will allow $e$ to pass all gates. How do we ensure that a passed gate never gets into trouble with $e$ again? Revisit the earlier situation: \[\eta_C^\frown\infty \preceq \eta_B^\frown\infty \preceq \eta_A^\frown\infty \preceq \tau^\frown\infty \preceq\tau_\Pi.\] Assume $e$ passed $\eta_A$ then $\eta_B$, and has just enumerated its $B$-use, say at stage $s_0$, in an effort to pass $\eta_C$ also. When should $e$ pick its new use, in order to work with all subrequirements $\eta_B,m$ of $\eta_B$, regardless of how late that subrequirement is set up? By earlier argument, we cannot pick the new use before the next $\eta_C$-expansionary stage, if we want $e$ to pass $\eta_C$ later. Yet, we cannot wait beyond the next $\tau$-expansionary stage, according to the $\tau$-strategy. If $\eta_B,m$ is set up after stage $s_0$, it would notice $e$'s relatively small $A$ and $C$-uses, which will injure both sides of the subrequirement's computations if the uses are enumerated simultaneously later. To foresee this enumeration, $\eta_B,m$ will need to set $\theta(m)$ above the new $B$-use. Therefore, the new use must be picked by the next $\eta_B$-expansionary stage, not just by the next $\tau$-expansionary stage. Generally, if $e$ has already passed a gate $\eta$, and has just enumerated one of its uses in an effort to pass a higher priority gate $\eta'\preceq\eta$, then the new use must be picked by the next $\eta$-expansionary stage, but not before the next $\eta'$-expansionary stage. To these ends, we shall do the picking at the next $\eta'$-expansionary stage. Now consider the effect of $J$ on $\tau_\Pi$. Whenever $\tau_\Pi$ is waiting for an event to occur, its uses, if defined, need to extend traces because of $J$. We need to ensure that we can always choose targets for the extensions so as not to un-realize $e$, or to undo the effect from lifting uses. Consider the extension of the first $A$-use. Between knowing the $B$-restraint and changing the restraint to an $A$-restraint, the $A$-use and its traces will be enumerated. Until we know which $B$-values to avoid, the $A$-use's traces cannot be targeted for $B$. By $J_A$ and $J_C$, the $A$-use can only grow an $ACAC$-trace in the meantime. After this trace is enumerated, the $B$-restraint is dropped. Then a permanent $A$-restraint is imposed, and a new $A$-use which exceeds the restraint is picked. Since the $B$- and $C$-uses may be enumerated later, before knowing the $A$-values to avoid, the traces extending the $B$- or $C$-uses cannot be targeted for $A$, which forces us to extend them to $BCBC$- and $CBCB$-traces respectively. Summarizing, before we alternate between lifting $B$- and $C$-uses, the traces associated with these uses involve small $B$- and $C$-elements. Wlog, suppose we wish to lift the $B$-use next to appease a gate with $B$ on one side. If we jump directly into lifting, small $B$-elements will still be present in the $C$-use's $CBCB$-trace, which when enumerated later, will undo the effect of the lifting. Therefore, prior to lifting, we change the traces of the $C$-use to a $CACA$-one to avoid small $B$-elements. We enumerate the $C$-use's trace except the use itself, then re-target with $A$ and $C$-balls. We shall refer to this process as the \emph{re-targeting of $B$'s extension}. Similarly, to appease gates that want the $C$-use to be lifted, we cannot allow the $B$-use's trace to contain small $C$-elements, and therefore \emph{re-target $B$'s extension} to a $BABA$-one prior to lifting. What about the traces of $e$'s $A$-use? They also cannot be contain small $B$ or $C$-values. After re-targeting the $B$- and $C$-extensions, we want to lift the $B$-use next, so beforehand we need to change $A$'s trace to one that avoids $B$. But, we also know that after $B$ is lifted, we want to lift $C$ and will need the $A$-use to avoid extending to $C$-traces that are smaller than the $C$-elements of the $C$-use. For these reasons, we re-target $A$'s extension to the trace associated with the $C$-use itself. In other words, if currently the $A$-use's trace is $ax_0x_1\ldots$, and the $C$-use's trace is $ca_0c_0\ldots$, then we change $A$'s trace to $aca_0c_0\ldots$ by enumerating $x_0x_1\ldots$, and then re-targeting $a$ to $c$ just after $x_0$ is enumerated. This way, after the $B$-use is lifted, there will be no small $B$-elements in the traces of the $A$- or $C$-uses to undo the effect of the lifting. When the new $B$-use is picked, we extend it to a $BABA$-trace to avoid $C$. Similarly, after the $C$-use is lifted, we re-target $A$'s extension to the trace of the $B$-use, and after the new $C$-use is picked we extend it to a $CACA$-trace. Now we bound the fickleness for satisfying $\tau_\Pi$. After $e$ is realized, we lift the $A$-use and re-target the $B$-, $C$-, then $A$-extensions. Each lifting or re-targeting requests $\leq\omega^{|\tau_\Pi|}$-fickleness, if we follow the trace-extension and partitioning rules of Section~\ref{sec:necessary}. After re-targeting extensions, we alternate between lifting the $B$- and $C$-uses, lifting $\leq|\tau|$ many times. Finally, we enumerate $e$ with its uses, requesting one more fickleness. Thus a sufficient amount of fickleness for $\tau_\Pi$ is: \begin{align} \label{eq:tau-fickleness} \omega^{|\tau_\Pi|}\cdot (4+|\tau|) +1 <\omega^{|\tau_\Pi|+1} <\omega^\omega. \end{align} Now a single follower may not be granted enough permissions by $\Delta(X)$. So we keep picking new followers to eventually succeed on one of them, threatening to approximate $\Delta(X)$ by a $<\omega^{\omega}$-fickle function $f$ with mind-change function $o$ if no follower succeeds. Letting $e_i$ denote the $i$-th follower of $\tau_\Pi$, $o(i)[s]$ shall bound the total length of the traces belonging to any of $e_0,\ldots,e_i$ that has yet to be enumerated by stage $s$. Function $o(i)[-]$ will then be non-increasing, decreasing strictly when some follower $e\leq e_i$ enumerates elements. By the earlier argument, each follower has traces of length $\leq\omega^{|\tau_\Pi|+1}$; therefore, $o(i)[0]\leq\omega^{|\tau_\Pi|+1}\cdot i$, making $f$ a $\leq\omega^{|\tau_\Pi|+2}$-fickle function. Function $f(i)[s]$ shall represent the guess of $\Delta(X,i)$ at stage $s$ and is, therefore, a $\leq\omega^{|\tau_\Pi|+2}$-fickle function via $o$. Ideally, $e_i$ should receive permission only from $\Delta(X,i)$, but a complication arises when permission is received --- we need to cancel lower priority followers $e_{i'}>e_i$ to avoid undesirable interactions with gates $\eta,m$: $e_i$ might receive permission to act and injure one side of the gate; then $e_{i'}$ might receive permission and injure the other side, resulting in $\theta(m)$ being lifted and un-realizing $e_i$. But $e_{i'}$ might have been the follower to receive sufficient permissions. To prevent these permissions from being lost after $e_{i'}$'s cancellation, we adopt \cite{downey2007totally}'s strategy of letting $e_i$ inherit the fickleness meant for $e_{i'}$. Then since $\Delta(i')$ was fickle enough for $e_0,\ldots,e_{i'}$, $\Delta(i')$ will be fickle enough for $e_i$. The above example illustrates another complication from multiple followers: Without knowing which follower to wait for, gates cannot foresee if both of its sides will be simultaneously injured. Therein lies the purpose a gate's computing sets --- whenever a trace $t$ is waiting to be enumerated, we put $t$ into a \emph{permitting} bin, and \emph{assign} $t$ \emph{permitting ball(s)}, which are element(s) targeted for the computing set(s) of gates, so that gates can use their computing set(s) to foresee the enumeration, and delay believing computations until those traces are gone. Suppose a trace $t$ is placed in the permitting bin, and $t$ contains elements targeted for $A$ and $B$ only. Since there are three types of gates, and together their computing sets include not just $A$ and $B$ but also $C$, we need to assign $t$ a $C$-permitting ball, which will given the same permitting code as $t$ to be enumerated with the trace. When some $\eta_C,m$ notices $t$ in the bin, $\eta_C$ will set $\theta(m)$ to exceed the $C$-ball, so as to $C$-computably know if $t$ will be enumerated later. Likewise, $\eta_A$ can use the $A$-elements in $t$ to $A$-computably know if $t$ will be enumerated, and similarly for $\eta_B$. We can now provide the $\tau_\Pi$-strategy for the non-existence of $A\cap B$. For the other types of non-meets, swap the roles of $A$, $B$, and $C$ in the description below. \begin{framed} \noindent\textbf{$\tau_\Pi$-strategy}: If $\tau_\Pi\succeq \tau^\frown\texttt{fin}$, do nothing. Otherwise, \emph{initialize} $\tau_\Pi$ by cancelling all followers and restraints, if any, that have been set up by $\tau_\Pi$. \begin{enumerate} \item \emph{Set up}: Let $e$ be the largest follower that has been set up by $\tau$ and that has not been assigned to any other child-requirement. $e$'s $A$, $B$, and $C$-uses $\lambda_A(e)$, $\lambda_B(e)$, and $\lambda_C(e)$ would have just been assigned. Extend the traces of these uses, following the discussed rule that the traces of the $A$-use avoid $B$ and the traces of the $B$ and $C$-uses avoid $A$. Set the codes of all traces to $\delta\restriction(k+1)$, where $k$ is the number of followers of $\tau_\Pi$ so far. \item \emph{Realization}: Wait for $e$ to be realized at a $\tau_\Pi$-stage. Set a restraint on the $B$-side to stop $e$ from being un-realized. \item \emph{Lift $A$-use}: Enumerate the $A$-use's trace. If enough permissions are received that the $A$-use becomes enumerated, then at the next $\tau$-expansionary stage, the injured computation $V\restriction (\pi(e)+1) =\Gamma_A\restriction (\pi(e)+1)$ will have returned, and $\tau$ will pick a new large $A$-use $\lambda_A(e) >\gamma_A\restriction(\pi(e)+1)$. Set a restraint on the $A$-side to stop $e$ from being un-realized and cancel the earlier $B$-restraint. The $B$- and $C$-uses of $e$ can now grow traces targeted for $A$ if they wish. \item \emph{Re-target $B$-extension}: Let $bc_0\ldots$ be the current trace of the $B$-use. Enumerate this trace up to and including $c_0$. If enough permissions are granted that $c_0$ becomes enumerated, extend the trace of $b$ by a $BABA$-one. \item \emph{Re-target $C$-extension}: Let $cb_0\ldots$ be the current trace of the $C$-use. Enumerate this trace up to and including $b_0$. If enough permissions are granted that $b_0$ becomes enumerated, extend the trace of $c$ by a $CACA$-one. \item \emph{Re-target $A$-extension}: Let $ax\ldots$ be the current trace of the $A$-use. Enumerate this trace up to and including $x$. If enough permissions are granted that $x$ becomes enumerated, let the trace of $a$ extend by the $B$-use's $BABA$-trace so that the $A$-trace is $\lambda_A(e)\lambda_B(e)\ldots$. As discussed before, we consider $e$ not to have passed any infinitary gate of higher priority than $\tau$. \item \emph{Pass one more gate $\prec\tau$}: Let $\eta^\frown\infty \preceq\tau$ be the lowest priority gate that $e$ has not yet passed. If $\eta$ does not exist, then $e$ has passed all gates and we can go directly to the next diagonalization phase. Otherwise, let $Z\in\{B,C\}$ be any set that appears on one side of $\eta$. We want to lift the $Z$-use. Enumerate the $Z$-trace of $e$. If enough permissions are granted that the $Z$-use is enumerated, pick the new large $Z$-use at the next $\eta$-expansionary stage. If the trace extending $e$'s $A$-use is the previous $Z$-use, then after that previous use was enumerated, re-target $A$'s extension to the other use of $e$. Consider $e$ to have passed gate $\eta$, and return to the beginning of this gate-passing phase to pass the next lowest priority infinitary gate. \item \emph{Diagonalize}: Put $e$ and the traces of its uses into the permitting bin, assigning permitting ball(s) if necessary. Wait for a single $X$-permission to enumerate all elements simultaneously. Cancel all other followers and declare $\tau_\Pi$ satisfied by $e$. \end{enumerate} \end{framed} Apart from the rules above, we keep the usual conventions in priority constructions of cancelling lower priority followers whenever a follower $e$ receives attention, and of waiting for the next $\tau_\Pi$-stage before allowing $e$ to receive attention again and letting $\tau_\Pi$ pick a new follower. Also, if $e$ received permission to enumerate, we let $e$ inherit the permissions of all cancelled $e'>e$. Putting all strategies together, the overall construction is: \begin{framed} \label{pg:construction} \noindent \textbf{Construction.} \emph{Stage 0.} Initialize all requirements. \emph{Stage $s+1$}: Let $\lambda_s\in\Lambda$ be the node of length $s$ representing the outcomes of the first $s$ requirements, where we set up a node $\lambda\preceq\lambda_s$ along the way if $\lambda$ has not been been set up. Let $\lambda\preceq\lambda_s$ or $\lambda<_L\lambda_s$ be the highest priority positive node that wants to act. Let $\lambda$ act and initialize all nodes of lower priority than $\lambda$. \end{framed} To prove that all requirements are satisfied, let $g\in [\Lambda]$ be the true path on the tree of construction $\Lambda$. We prove by induction on $n$, the length of the node along the true path, that the requirement represented by node $\lambda=g(n)$ is satisfied. In the following lemmas, we can assume from induction that we are working in stages after nodes to the left of $\lambda$ are never visited again, and after all $\rho\preceq\lambda$ have stopped inflicting injury. Then $\lambda$ will never be cancelled and will always have highest priority to act. \begin{Lemma} \label{lemma:tau} If $\lambda=\tau$, then $\tau$ is satisfied and inflicts no injury. \end{Lemma} \begin{proof} $\tau$ never sets restraints or enumerates elements, and so cannot inflict injury. If the outcome of $\tau$ is $\texttt{fin}$, then $\tau$ is vacuously satisfied. So, assume there are infinitely many $\tau$-expansionary stages. Each follower $e$ of $\tau$ is assigned to at most one child node $\tau_\Pi$, which by the $\tau_\Pi$-strategy acts only finitely often until cancellation. Uses $\lambda_A(e)$, $\lambda_B(e)$, and $\lambda_C(e)$ always exist at $\tau$-expansionary stages, and when $e$ is enumerated, those uses are also enumerated. Therefore, the uses are lifted finitely often, and $E(e)=\Lambda_A(e)=\Lambda_B(e)=\Lambda_C(e)$. \end{proof} \begin{Lemma} \label{lemma:tau-pi} If $\lambda=\tau_\Pi$, then $\tau_\Pi$ is satisfied and inflicts finite injury. \end{Lemma} \begin{proof} Wait for $\tau_\Pi$ to stop being initialized. Followers that are realized never become un-realized because of the restraints. If some follower was never realized, the lemma holds trivially. So assume all followers eventually become realized. Each follower $e$ requests $\leq\omega^{|\tau_\Pi|+1}$ many permissions. Some $e$ must eventually receive enough permissions to satisfy $\tau_\Pi$, otherwise we can approximate $\Delta(X)$ by a $\leq\omega^{|\tau_\Pi|+2}$-fickle function, contradicting the $\geq\omega^\omega$-fickleness of $\Delta(X)$. Even though $\omega^{|\tau_\Pi|+1} \geq\omega$, in reality $e$ only enumerates finitely many elements, except these elements may not be indexed canonically by a natural number. Therefore, the injury by $\tau_\Pi$ is finite. \end{proof} The $G$ and $J$ requirements are global and satisfied by construction, like in \cite{downey2020hierarchy}. The verification for $\rho$ also remains unchanged, because the requirement is of finite injury, which allows it to mix with $\tau$ and $\tau_\Pi$, for they inflict finite injury. The verification that takes the most work is for $\eta$: \begin{Lemma} \label{lemma:eta} Let $\lambda=\eta$ and consider the subrequirement of $\eta$ at $m$. Let $s_0$ be the first $\eta$-stage where $\mathrm{length}(\eta)>m$. Let $s_1\geq s_0$ be the first $\eta$-stage where no follower that existed at stage $s_0$ has balls targeted for the computing set of $\eta$ that will later be enumerated. Note that the computing sets of $\eta$ can determine stage $s_1$. From stage $s_1$ onward, we say that $\eta,m$ \emph{believes its computation}. \begin{enumerate} \item The subrequirement can only be injured by followers that existed at stage $s_0$. Therefore $\theta(m)$ is lifted finitely often, since followers act finitely often. \item After stage $s_1$, $\Phi_0(m)$ and $\Phi_1(m)$ cannot be simultaneously injured. \end{enumerate} If $\eta^\frown\texttt{fin} \prec g$, then $\eta$ is vacuously satisfied. If $\eta^\frown\infty \prec g$, then $\eta$ will also be satisfied from the above two claims. \end{Lemma} \begin{proof} Claim 1 follows from the tree framework: Let $y$ be the first element whose enumeration contradicts the claim, and let $\sigma$ be node to which $y$ belongs. If $\sigma<_L\eta$ or $\sigma\preceq\eta$, then $y$ will never be enumerated otherwise $\eta$ will be cancelled; if $\sigma>_L\eta^\frown\infty$ then $y$ will be cancelled at expansionary stages, and will be too large to inflict injury at non-expansionary stages. So it must be that $\sigma\succeq \eta^\frown\infty$. Before $y$ acted, the subrequirement's use must have been lifted due to a recent action by some other $y'$. $y'$ must have existed at stage $s_0$ by the choice of $y$ being the first. Now $y$ must be picked after the action by $y'$, otherwise if $y$ is of higher priority than $y'$ then $y'$ would be cancelled before it could act, and if $y$ is of lower priority then $y$ would be cancelled by $y'$. Since $\sigma\succeq \eta^\frown\infty$, $y$ must be picked at an $\eta$-expansionary stage, which is a stage after $\eta,m$ has recovered from the injury inflicted by $y'$. Then $y$ be too large to inflict injury. Claim 2: We work in stages after $s_1$. By Claim 1, we can ignore all followers that are set up after stage $s_0$ or that were cancelled by stage $s_1$. Assume, for a contradiction, that there is a first stage where $\eta,m$ was injured on both sides simultaneously. There are three cases for how the injury could be inflicted, and we show that none of them are possible. Case 1 --- The injury was due to different followers: The permitting balls prevent this situation. Assume follower $y_0$ injured one side of $\eta,m$, but before the side recovered, some other $y_1$ belonging to $\sigma\succeq \eta^\frown\infty$ injures the other side. $y_0$ must have lower priority than $y_1$; otherwise, $y_1$ would be cancelled when $y_0$ attacked, and Claim 1 prevents followers that are set up later from inflicting injury. By our choice of $s_1$, $y_1$ did not have a permitting ball at stage $s_1$. $y_1$ can only be assigned permitting balls after $y_0$'s enumeration; otherwise, $y_0$ would be cancelled, and cannot injure $\eta,m$ by Claim 1. But after the assignment, $y_1$ would have waited for a $\sigma$-stage, which is an $\eta$-expansionary stage, before enumerating. The injury from $y_0$ would have recovered before $y_1$ could attack. Case 2 --- The injury was from a follower of $\rho$: This is not possible for the same reason that $\rho$ requirements work well with $\eta$ requirements in the embedding of $M_3$, which has been discussed in detail in \cite{downey2020hierarchy}. Case 3 --- The injury was from a follower $e$ of $\tau_\Pi$: Until we reach the diagonalization phase of the $\tau_\Pi$-strategy, enumerations by $e$ work like in Case 2, which does not give problems. So the injury must be inflicted at the final phase, when $e$'s uses are simultaneous enumerated. Assume wlog that $\tau_\Pi$ works for the non-existence of $A\cap B$. If $\eta\succeq\tau^\frown\infty$, then $\eta,m$ will always know the updated uses of $e$, since $e$ was set up before $\eta,m$ and always picks uses by $\tau$-expansionary stages. Therefore, $\eta,m$ knows $e$ will be enumerated and would not have believed computations until afterwards. So, assume $\eta^\frown\infty \preceq\tau$, and wait for $e$ to pass $\eta$, which would involve lifting the $B$- or $C$-use of $e$. Wlog, assume it was the $B$-use that was lifted, which means that $B$ appeared on exactly one side of $\eta$. If $\eta,m$ was set up before the passing, then after passing, new $B$-elements associated with $e$ will be too large to injure the $B$-side of $\eta,m$, by the $\tau_\Pi$-strategy of not letting $e$'s $A$- or $C$-traces contain small $B$-elements. Therefore the simultaneous injury cannot injure both sides of $\eta,m$. So it must be that $\eta,m$ was set up after the passing. Then $\eta,m$ can keep track of the $A$- and $C$-uses of $e$, because $e$'s $A$-use is never lifted again and its $C$-use, if lifted after passing $\eta$, will always be picked by the next $\eta$-expansionary stage. In particular, $\eta,m$ can keep lifting $\theta(m)$ above the relevant use of $e$, which will help the subrequirement delay believing computations until after $e$ is enumerated. \end{proof} \section{Future Work} \label{sec:future} We can proceed lattice theoretically or degree theoretically. We can consider using lattice theory to find more $>\omega^2$-candidates: \begin{Question} Can we systematically list the non-distributive lattices and apply Corollary~\ref{cor:non-candidate} to get $>\omega^2$-candidates? \end{Question} Given a candidate, like the one in Figure~\ref{fig:peter}, we can extend the known degree theoretic techniques to characterize the lattice. The layering and trace-extension methods need to be generalized before they can be applied here. \begin{Conjecture} The lattice in Figure~\ref{fig:peter} characterizes $\geq\omega^\omega$-fickleness. \end{Conjecture} \begin{figure}[tpb] \centering \begin{tikzpicture}[every node/.style={circle,inner sep=1.2pt}] \tikzset{omega2/.pic ={ \node[circle,fill=black] (0) at (0,-1) {}; \node[circle,fill=black] (1) at (0,1.5) {}; \node[circle,fill=black] (A) at (-0.5,-0.5) {}; \node[circle,fill=black] (X) at (0.5,-0.5) {}; \node[circle,fill=black] (AX) at (0,0) {}; \node[circle,fill=black] (B) at (-1,0) {}; \node[circle,fill=black] (Y) at (1,0) {}; \node[circle,fill=black] (BX) at (-0.5,0.5) {}; \node[circle,fill=black] (AY) at (0.5,0.5) {}; \node[circle,fill=black] (C) at (-1.5,0.5) {}; \node[circle,fill=black] (Z) at (1.5,0.5) {}; \draw [-,thick] (0) --(A) --(B) --(C) --(1) --(Z) --(Y) --(X) --(0); \draw [-,thick] (1) --(AY) --(AX) --(A); \draw [-,thick] (1) --(BX) --(AX) --(X); \draw [-,thick] (BX) --(B); \draw [-,thick] (AY) --(Y); }} \path (0,0) pic[scale=0.5]{omega2}; \end{tikzpicture} \caption{A $>\omega^2$-candidate, proposed by Peter Cholak.} \label{fig:peter} \end{figure} \section{The preamble} \label{preamble} Each article for publication by the ASL must start with the text in Section~\ref{sample}, which can be copied from the source file for this guide and used as a template. Here are some comments on this material: \smallskip \subsection{Options} At least one option is required for each manuscript, \pkg{jsl}, \pkg{bsl} or \pkg{conference}, specifying the venue of publication. In addition, one may add any number of \pkg{amsart} or \pkg{asl} options, which include the following: \begin{itemize} \item \pkg{reqno}; this places the equation numbers on the right, the default being \pkg{leqno} which puts them on the left. \item \pkg{fleqn}; places the displays at a fixed distance from the left margin, the default setting them centered. It can be combined with either the default \pkg{leqno} or \pkg{reqno} (not recommended). \item \pkg{endnotes}, \pkg{mixednotes}; these change footnotes to ``endnotes'' or allow both, see Subsection~\ref{footnotes}. \item \pkg{bibalpha}, \pkg{bibay1}, \pkg{bibay2}; different styles for the Bibliography and citations, explained in Section~\ref{bibtex}. \end{itemize} The \pkg{jsl}, \pkg{bsl} and \pkg{conference} options set the appropriate logo and Copyright information, they set a few additional publication-specific defaults, and (more significantly) they set the size of type---10pt for the \textsc{Journal} and the LNL and 11pt for the \textsc{Bulletin}. Manuscripts compiled with one of these options will give only an approximation of the final look of the published paper, because ASL publications are printed using proprietary Monotype Times Roman fonts rather than the usual Computer Modern fonts of \LaTeX2\raisebox{-1pt}{$\epsilon$}; it is a fairly good approximation, however, especially for formulas and displays, and so it can be very useful to the author. Do not worry when the typeset version declares that your paper will appear in Volume 0, of Year 0, etc., these default values are re-set (along with the fonts) at the time of production. \smallskip \subsection{Other packages} After the \pkg{documentclass} command, several ``packages'' may be loaded, for drawings, diagrams, etc. For example, this document includes in its preamble the command \begin{verbatim} \usepackage{rotate} \end{verbatim} \noindent which loads \pkg{rotate.sty}, needed for the ``game quantifier'' $\game$. All packages which are compatible with \pkg{article} or \pkg{amsart} are also compatible with \pkg{asl}---and please let us know of any exceptions you discover. \smallskip \subsection{The title} No commands defined in the paper should be used in the entries to \verb+\title+ --- if you need some special symbols in them, you should enter them using standard, \LaTeX2\raisebox{-1pt}{$\epsilon$}\ or \pkg{asl} commands. The optional short title (within brackets) is used for the page-top-headings, and it is only needed if the title of the paper is long or contains line-breaking commands \verb+\\+; do not include any \verb+\\+ in the short title. Contrary to a popular practice, \textit{only proper names are set in uppercase} in ASL publications: so don't enter \begin{verbatim} \title{A New Counterexample to G\"odel's Theorem} \end{verbatim} \noindent but write instead \begin{verbatim} \title{A new counterexample to G\"odel's Theorem} \end{verbatim} \addvspace{-10pt} Incidentally, the same practice is followed in the titles of chapters, sections and subsections in ASL publications: only proper names should be entered in upper case. \smallskip \subsection{} The keywords and subjclass entries (\AmS-style) are optional. \smallskip \subsection{Authors' names} Each author should have two entries of his or her name, in the form \smallskip \verb+\author{John J. John}+ \verb+\revauthor{John, John J.}+ \smallskip \noindent The ``reversed author'' command is used to produce and alphabetize Tables of Contents and Indices, and it should be entered exactly as the author writes his/her name last-name-first, which sometimes requires a period at the end, e.g., after a middle initial, the appellation ``Jr.'', etc. Use \smallskip \verb+\author{\Mac Lane, Saunders}+ to enter MacLane, and \verb+\author{\Mc Lane, James}+ to enter McLane, \smallskip \noindent but (preferably) the usual ``\texttt{MacLane}'' and ``\texttt{McLane}'' in the \verb+\revauthor+ field. For entering footnotes to authors' names see Subsection~\ref{thankses} below. \smallskip \subsection{Address, email, etc.} Each author should have exactly one entry of the form \smallskip \verb+\address{...}+ \quad or\quad \verb+\twoaddress{...}{...}{.}+ \smallskip \noindent and any number of optional entries of the form \smallskip \verb+\curraddr{...}+ \verb+\genaddr{...}{...}+ \verb+\email{...}+ \verb+\urladdr{...}+ \verb+\thanks{...}+ \smallskip \noindent The lines of the address are separated by \verb+\\+, and the country of the address must be included and put on the last line, not on a line by itself. The \verb+\twoaddress+ command is useful for authors with two affiliations; the third entry must be \textit{the number of lines} ($1$ plus the number of occurrences of \verb+\\+) \textit{in the first address}.\footnote{If you have three or more affiliations, just enter them separately and they will be hand-set by the ASL typesetters (and, perhaps, you should re-think your situation).} The address for this guide was entered in the form \begin{verbatim} \twoaddress{Department of Mathematics\\ University of California\\ Los Angeles, CA 90095-1555, USA} {Department of Mathematics\\ University of Athens\\ Panepistimioupolis, Zografou, 15784 Greece} {3} \end{verbatim} From the optional commands, \begin{verbatim} \curraddr{Department of Mathematics\\ University of California\\ Los Angeles, California, 90095-1555, USA} \end{verbatim} \noindent will produce at the end of the article (right after the address) the entry \smallskip \textit{Current address}: Department of Mathematics, University of California, Los Angeles, California, 90095-1555, USA. \smallskip \noindent The command \verb+\genaddr+ takes two arguments and adds an additional address with the heading specified by the first argument, e.g., \begin{verbatim} \genaddr{Correspondence address} {John J. John\\ c/o Joe's Happy Hour Place\\ 43 6th Ave.\\ New York, NY 08890, USA} \end{verbatim} \noindent will produce at the end of the article the entry \smallskip \textit{Correspondence address}: John J. John, c/o Joe's Happy Hour Place, 43 6th Ave., New York, NY 08890, USA. \smallskip \noindent In the self-explanatory \verb+\email+ and \verb+\urladdr+ commands, the symbol \texttt{\textasciitilde} should be entered as \verb+\urltilde+ or \verb+\textasciitilde+. \smallskip These ``address commands'' are all printed at the end of the article \textit{in the order in which they occur in the preamble}; this means that all the address commands of the first author must be entered before the first address command of the next author, etc., so that it is clear which address goes with whom. \smallskip \subsection{Thankses} \label{thankses} The ``thankses'' appear as numberless footnotes, on the first page, in the order in which they occur in the preamble. If you need a footnote accompanying the name of an author, you must do it manually, as follows: \begin{verbatim} \author[John J. John]{John J. John$^\dag$} \revauthor{John, John J.} \thanks{$^\dag$John J. John appreciates the help of his mother ...} \end{verbatim} \noindent Notice that the $^\dag$ is not entered in the optional so-called ``shortauthor'' entry \verb+[John J. John]+ (which is used for the page-top headings) or in the \verb+\revauthor+ command. \smallskip \subsection{Theorem environments} The \verb+\newtheorem+ commands are needed because the stylefile does not have any theorem environments built in. The default style is ``plain'' which sets the text of theorems in italics, and it can be changed by the \verb+\theoremstyle+ command. The most common theoremstyle (other than plain) is \pkg{definition}, which sets theorems in Roman; for more details see \pkg{amsthdoc}. \smallskip \subsection{Authors' macros} If there are many macros, put them in another file, e.g., \pkg{john.mac}, and put here \verb+\input{john.mac}+. \smallskip \subsection{The abstract} The abstract (which is optional) should be entered {\it before\/} the \verb+\maketitle+ command. This is a feature of \pkg{amsart}, its main difference in form from \pkg{article}; it helps with the layout of the first page of the article. \smallskip \section{The main part of the article} If you are not familiar with \pkg{amsart} and don't feel like learning it just now, read this guide and the 4-page \pkg{amsthdoc} and type your article using your new knowledge and the usual \pkg{article} commands---\pkg{equation}, \pkg{array}, \pkg{eqnarray}, etc. You won't really need to learn the more esoteric \pkg{amsart} commands, unless your paper involves many, complex mathematical formulas and displays (especially multiple subscripts and superscripts) and you want to get it all right by yourself. \smallskip \subsection{Formatting commands} These are instructions like \verb+\newpage+, \verb+\linebreak+, \verb+\allowdisplaybreaks+, \verb+\parindent=2em+, \verb+\widowpenalty=0+, etc., and the first rule is \textit{don't use any}; they will all be deleted before the final version of the article is prepared---and then some of them may be re-introduced by the ASL typesetters, as they are needed. \smallskip \subsection{Space commands} \label{spaces} These are things like \verb+\vspace+, \verb+\hspace+, \verb+\quad+, \urltilde\urltilde, etc., and the second rule is \textit{don't use any vertical space commands}---well, except perhaps for an occasional \verb+\smallskip+ or \verb+\medskip+; \textit{use horizontal space commands sparingly}; and \textit{never---ever---insert space within formulas} to enlarge the natural space that \TeX{} and the stylefile introduces. For example, authors are often tempted to enter \begin{align*} \texttt{a\urltilde=\urltilde{}b} \text{ which prints as }a~&=~b\\ \text{rather than }\texttt{a = b} \text{ which prints as } a&=b \end{align*} and the first of these does not look good to the trained eye. If you want to get the correct spacing around new function or binary relation symbols, don't enter it by hand, but use the command \begin{verbatim} \DeclareMathOperator{\height}{ht} \end{verbatim} \noindent which introduces the combination `$\height$' as the name of an operator or relation and lets \LaTeX2\raisebox{-1pt}{$\epsilon$}{} worry about spacing; with this command in effect, \smallskip \verb+\height(a,b)+ will print in math mode as $\height(a,b)$ \noindent and \verb+a \height b+ will print in math mode as $a \height b$. \smallskip \noindent This is especially useful for binary relations, while a one-time use of a function can be entered as \verb+\textup{ht}(a,b)+ which yields $\textup{ht}(a,b)$. For one-time uses of single binary relation \textit{symbols} (not words), you can use also use $$ \verb+x \mathbin{\natural} y+ \text{ which yields } x \mathbin{\natural} y. $$ ASL publications have a very ``tight'' layout which is not compatible with much white space, and all space commands are removed by our typesetters before the final, production version of the article is developed. Remember that what may look crowded in a preprint might look just right in ASL publications. \smallskip \subsection{Footnotes and endnotes} \label{footnotes} Footnotes are entered with the \pkg{footnote} command, attached to the footnoted word with no intervening space; for example\footnote{Sample footnote.} the line which produced the footnote on this page was entered as follows: \begin{verbatim} for example\footnote{Sample footnote.} the line which produced \end{verbatim} The option \pkg{endnotes} changes footnotes to endnotes, printed when the command \verb+\theendnotes+ is encountered, typically at the end of the article just before the bibliography. In more detail: the first time when \verb+\theendnotes+ is encountered, all the endnotes entered from the beginning of the article are printed, and each subsequent occurrence of the command causes the printing of all the endnotes entered since the previous occurrence. If you want the numbering of endnotes to start over, enter \verb+\startoverendnotes+ just after the \verb+\theendnotes+. (This option treats the command \verb+\endnote{...}+ as synonymous to \verb+\footnote{...}+.) The option \pkg{mixednotes} makes it possible to enter both footnotes and endnotes: \verb+\footnote{...}+ produces a footnote, while \verb+\endnote{...}+ produces an endnote, handled exactly as in the \pkg{endnotes} option. In this option the footnotes are numbered using symbols like $\dag$, $\ddag$, etc., and there should not be more than nine of them in any given page. When no option is specified, \verb+\endnote{...}+ produces a footnote, just like \verb+\footnote{..}+. Similarly, all other commands of the \pkg{endnote} package behave like their footnote equivalents, or do nothing if there is no such equivalent. This means that the following experimentation is possible: produce the document as if the \verb+mixednotes+ option is going to be used (thus using both \verb+\footnote+ and \verb+\endnote+), then try it with either option or with no option at all to see which looks best. \subsection{Common errors and bad practices} Four of these are worth pointing out here, because they occur very frequently and require a great deal of effort to correct. \smallskip (1) \textit{Don't use math mode to simulate italics}:\\[5pt] \begin{tabular}{lll} \verb+$George$+ &prints as& $George$, while\\ \verb+\textit{George}+ &prints as& \textit{George} \end{tabular}\\[5pt] which is better spaced. This is often committed when operators and binary relations with long names are defined in math mode, which should be done using the \verb+\DeclareMathOperator+ and \verb+\textup+ commands as explained in Subsection~\ref{spaces}. To switch between \textit{text} fonts (in either text or math mode) use the commands\\[5pt] \begin{tabular}{lll} \verb+\textit{George}+ &prints as& \textit{George} \\ \verb+\textup{George}+ &prints as& \textup{George} \\ \verb+\textbf{George}+ &prints as& \textbf{George} \\ \verb+\textsc{George}+ &prints as& \textsc{George} \end{tabular} \noindent Especially useful is the \verb+\textup{..}+ command, which can be used to introduce small phrases in straight-up text (Roman) within a slanted environment, e.g., within the statement of a theorem. For the commands needed to switch fonts in formulas, see Subsection~\ref{mathsymbols}. \smallskip (2) \textit{Don't precede or follow displays by blank lines}, unless, of course a display ends a paragraph. \smallskip (3) \textit{Do not overuse list environments}. There is a natural tendency to take too seriously the \LaTeX{} ``philosophy'' of \textit{logical design} and introduce lists within lists within lists, reflecting the logical structure of the statement of a theorem or a proof; in the end the article looks like a \texttt{lisp} program, and this does not help understanding. The rules are: \begin{itemize} \item Do not use a list environment (\pkg{enumerate}, \pkg{itemize}, etc.) if individual items will be more than two or three lines long. \item Do not use a nesting of lists of depth more than $2$ (list within list). \item Do not nest lists at all if the items of the inner list are more than one line long. \end{itemize} Every rule has exceptions, of course, and perhaps you want part of your paper to look like a program, but multiply nested lists will normally be re-set by the ASL typesetters to lessen the amount of white space on the page. (4) \textit{Format your \textup{\pkg{.tex}}-file so that it can be easily read by others}; while the published article should not look like a program, the \pkg{.tex}-file, really \textit{is} a program, which will be debugged by the ASL typesetters, and you should try to make their job easier. Two simple rules: \begin{itemize} \item Don't \verb+\input{mymacros}+ if \texttt{mymacros.tex} has $2000$ commands, only five of them needed for this paper; prune the macro files you submit. \item Format displays so they look like displays. \end{itemize} For example, don't bury the line \begin{verbatim} ... from which it follows that \[f(x)=0,\] and so ... \end{verbatim} \noindent in the middle of a long paragraph, type instead \begin{verbatim} ... from which it follows \[ f(x)=0, \] and so ... \end{verbatim} \noindent which makes it easier to identify it as a display in the source file. \smallskip \subsection{Theorems, lemmas, and the like} For introducing theorem environments, please see \pkg{amsthdoc} which describes succinctly the many possibilities offered by \pkg{amsthm}, whose commands are all available under \pkg{asl}. The only command described there which you should not use is \verb+\swapnumbers+, which does not fit in well with \pkg{asl}. Theorems are normally set in italics, but tradition (and taste) demands that parentheses, brackets, punctuation symbols and numerals in them are set straight-up. This is a painful problem when the Computer Modern fonts are used: because if you type \begin{verbatim} (2) ... and so (by Rice's Theorem) $p\sqsubseteq q$; \end{verbatim} \noindent within a theorem environment, you will get the ugly-looking \smallskip {\fontfamily{cmr}\fontshape{it}\selectfont (2) ... and so (by Rice's Theorem) $p\sqsubseteq q$;} \smallskip \noindent and, to correct this, you would need to type the cumbersome \begin{verbatim} \textup{(2)}... and so \textup{(}by Rice's Theorem\textup{)} $p\sqsubseteq q$\textup{;} \end{verbatim} \addvspace{-10pt} \noindent There is no need for this when preparing articles for ASL publications, because theorems are automatically set in a special font which uses italics for text but straight-up type for delimiters, punctuation symbols and numerals: so the first entry above (in a theorem environment) will produce the output \smallskip \smallskip \noindent in the font in which this document is typeset. So, if you can stand the ugly, leaning parentheses in your preprints, you can omit all the extra \verb+\textup+ commands in typing theorems. \smallskip \subsection{Proofs} For proofs, use the \pkg{proof} environment described in \pkg{amsthdoc}. Briefly: proofs are entered in the form \begin{verbatim} \begin{proof} The argument is by induction ... ... completing the argument. \end{proof} \end{verbatim} \noindent which will produce the output \begin{proof} The argument is by induction ... ... completing the argument. \end{proof} You can change the name ``proof'' with an optional argument: \begin{verbatim} \begin{proof}[Proof of John's Theorem] The argument is by induction ... ... which completes the argument. \end{proof} \end{verbatim} \noindent will produce the output \begin{proof}[Proof of John's Theorem] The argument is by induction ... ... which completes the argument. \end{proof} Finally, for those who like to start a proof with its name, \pkg{asl} provides the \pkg{proofplain} environment: entering \begin{verbatim} \begin{proofplain} is by induction on ... completing the argument. \end{proofplain} \end{verbatim} \noindent will produce the output \begin{proofplain} is by induction on ... completing the argument. \end{proofplain} \noindent You can change the end-of-proof symbol `$~\qedsymbol~$' customarily used in ASL publications by entering (in the preamble or, locally, within a specific proof) the command \begin{verbatim} \renewcommand{\qedsymbol}{...} \end{verbatim} \noindent but, please, don't choose something ugly and gloomy like $\blacksquare$. You can also have the ``blank'' end-of-proof symbol by typing (globally or locally, within a proof) \verb+\noqed+, but even in this case, it is good to encase your proofs in the \verb+\begin{proof}+ \ldots \verb+\end{proof}+ environment, to insure good spacing. For proofs which end with a displayed equation, see Subsection~\ref{eqnarray} below. \smallskip \subsection{Diagrams, formal proofs and graphics} These should always be encased in a \pkg{figure} or \pkg{table} environment, with the location set to [tb] (top-bottom), captioned and cited in the text; \textit{do not} use the location [h] (here), except for very small figures which will not take up more vertical space than about 10 lines of text. \LaTeX2\raisebox{-1pt}{$\epsilon$}{} places floats at the end of an article, after the \textsc{Bibliography}, and this is not allowed in the ASL journals; this means that if your attempt to control the placement of your figure is too strict and it ends up as a float, the figure will need to be re-positioned. There are many good packages for entering diagrams, including \pkg{xy-pic} which works well with \pkg{asl} and produces excellent output---although it is a little hard to debug, and so the author (rather than the ASL typesetter) has a greater responsibility to ``do it right''. For formal proofs, we recommend \pkg{bussproofs.sty}, which is simple to use (and to debug) and produces very good output.\footnote{\pkg{bussproofs.sty} is posted on \texttt{http\weakcolon\weakslash/www\weakdot math\weakdot ucla\weakdot edu\weakslash\urltilde asl/asltex} along with this guide.} There are, however, many other excellent packages which some authors may prefer. For figures and drawings, keep in mind that ASL publications are printed on a high-resolution, 1200 DPI imagesetter; this means that drawings which look fine when printed on a 300 DPI laserprinter may end up looking terrible when published. The main lesson from this are that \textit{you should try to avoid submitting bitmaps}, unless you can produce them at 1200 DPI, and \textit{you should not use very thin lines}, because they will become invisible at high resolution. If you know some program which suffices for your needs and produces \LaTeX2\raisebox{-1pt}{$\epsilon$}{} output (like \pkg{xy-pic.sty}, \pkg{bussproofs.sty} or \LaTeX2\raisebox{-1pt}{$\epsilon$}'s \pkg{picture} environment), use it; these have the great advantage that they use the default fonts of the documents for symbols, and so they fit in well with the rest of the article. Second best is to submit your drawings in \textit{encapsulated Postscript} (EPS) files, which are called by your document using the \pkg{epsfig.sty} package, especially if you avoid using bitmapped fonts in the drawings and (if you can) set the resolution of your Postscript-generating program to 1200 DPI; this produces very good results, and it allows shading, which often livens up a drawing. \smallskip \subsection{Other environments} There is nothing wrong with introducing your own environments, but, in practice, there is little need for many of them and you should not be carried away. In particular, the \verb+\newtheorem*+, \verb+\section*+ and \verb+\subsection*+ commands can often be used to introduce easily environments with good spacing. For example, entering \begin{verbatim} \subsection*{Acknowledgement} The author is grateful to his brother-in-law who actually proved the main theorem of this paper. \end{verbatim} \noindent will produce the output \subsection*{Acknowledgement} The author is grateful to his brother-in-law who actually proved the main theorem of this paper. \smallskip In a similar way, Remarks, Notes, Asides, etc. can be entered as theorem environments with no numbering, or a different numbering than the theorems of the article. \smallskip \subsection{Displayed equations and formulas} One advantage of \pkg{amsart} is that it allows for many more forms of displaying and aligning formulas and equations than \LaTeX2\raisebox{-1pt}{$\epsilon$}'s plain \pkg{equation} and \pkg{eqnarray}, which (when carefully used) can produce much finer results than the \pkg{article} environments. The following two are the simplest and the most useful. First, for definitions \textit{by cases}, enter \begin{verbatim} f(x) = \begin{cases} g(x) &\text{if } R(x) \\ h(x) &\text{otherwise.} \end{cases} \end{verbatim} \noindent which in math mode will produce the output $$ f(x) = \begin{cases} g(x) &\text{if } R(x) \\ h(x) &\text{otherwise.} \end{cases} $$ Second, the \pkg{multline} environment takes care of one-line displays that are too long to fit in one line: entering \begin{verbatim} \begin{multline*} \sigma_q X_q.\bigvee_{S\subseteq \Sigma\setminus \{p\}} \Biggl[ \Biggl( \bigvee_{D\in Y_q^S} (\alpha^{-p}_S\wedge \neg p\wedge \beta_{q,D})\vee ( \alpha^{-p}_S\wedge p\wedge \beta_{q,D} ) \Biggr) \\ \vee \bigvee_{D\in Z_q^S} (\alpha_S^p\wedge \beta_{q,D})\Biggr], \end{multline*} \end{verbatim} \noindent will produce the output \begin{multline*} \sigma_q X_q.\bigvee_{S\subseteq \Sigma\setminus \{p\}} \Biggl[ \Biggl( \bigvee_{D\in Y_q^S} (\alpha^{-p}_S\wedge \neg p\wedge \beta_{q,D})\vee ( \alpha^{-p}_S\wedge p\wedge \beta_{q,D} ) \Biggr)\\ \vee \bigvee_{D\in Z_q^S} (\alpha_S^p\wedge \beta_{q,D})\Biggr], \end{multline*} with the break in the line exactly where the author indicated it should go with the \verb+\\+ command and well-chosen margins. All display environments\footnote{Actually, the \pkg{tag} command does not work right in the \pkg{align} environment when both the \pkg{reqno} and \pkg{fleqn} options are in effect---an ugly combination which you don't really want to use.} of \pkg{asl} support the \verb+\tag+ command which allows the author to replace the equation number by any tag; for example, in the case of a single equation, entering \begin{verbatim} \begin{equation} A = B \tag{$\ast$} \label{george} \end{equation} \end{verbatim} \label{tagex} \noindent will print \begin{equation} A = B \tag{$\ast$} \label{george} \end{equation} This will not advance the equation counter, and references to this equation can be made as usual with \verb+\eqref{george}+. \smallskip \subsection{The enhanced \texttt{eqnarray} environment} \label{eqnarray} The familiar \pkg{eqnarray} environment of \LaTeX2\raisebox{-1pt}{$\epsilon$}{} and its starred version \pkg{eqnarray*} have been extended in \pkg{asl} to allow for two, useful refinements and a variation. First, you can have a third column: entering \begin{verbatim} \begin{eqnarray} A &=& B &\text{by equation~\eqref{george}} \\ C &=& D \end{eqnarray} \end{verbatim} \noindent will produce the output \begin{eqnarray} A &=& B &\text{by equation ~\eqref{george}} \\ C &=& D \end{eqnarray} assuming that the equation labeled \pkg{george} is, indeed, the equation tagged $(\ast)$. This is useful for commented computations and also works with \pkg{eqnarray*}. Second, \pkg{eqnarray} and \pkg{eqnarray*} support the \verb+\tag+ command described in the preceding section, albeit with one restriction: if you assign both a tag and a label to an equation, \textit{issue the tag command first and the label command after it}, as illustrated in the example above; if you enter these commands in the wrong order, \pkg{asl} will stop and warn you of the error. Finally, the variant environment \verb+endproofeqnarray+ makes it possible to end a proof with a displayed equation and still have `$~\qedsymbol~$' placed correctly; entering \begin{verbatim} \begin{proof} \dots and, finally, we compute: \begin{endproofeqnarray} f(x) &=& g(x) &\text{(by \eqref{george})} \\ &=& h(x) &\text{obviously.} \end{endproofeqnarray} \end{proof} \end{verbatim} \noindent produces the output: \begin{proof} \dots and, finally, we compute: \begin{endproofeqnarray} f(x) &=& g(x) &\text{(by \eqref{george})} \\ &=& h(x) &\text{obviously.} \end{endproofeqnarray} \end{proof} This also works with \verb+endproofeqnarray*+ (which does not number the equations). To end a proof with a single (for example, unnumbered) equation, enter \begin{verbatim} \begin{proof} ... and finally \begin{endproofeqnarray*} & a=b & \end{endproofeqnarray*} \end{proof} \end{verbatim} \noindent which is rendered as \begin{proof} ... and finally \begin{endproofeqnarray*} & a=b & \end{endproofeqnarray*} \end{proof} \noindent (You can omit the \verb+&+ symbols in the case of a single equation, when alignment is not needed, but surrounding the equation with them gives a more accurate centering of the display.) \subsection{Math symbols} \label{mathsymbols} To switch fonts in letters which occur within formulas, use the \verb+\math..{...}+ command, which is analogous to the \verb+\text..{...}+ command:\\ \begin{tabular}{lll} \verb+\mathrm{R}+ &prints as& $\mathrm{R}$ \\ \verb+\mathit{R}+ &prints as& $\mathit{R}$ (not useful, just type \verb+R+)\\ \verb+\mathbf{R}+ &prints as& $\mathbf{R}$ \\ \verb+\mathbb{R}+ &prints as& $\mathbb{R}$, and \\ \verb+\mathcal{R}+ &prints as& $\oldcal{R}$ or $\truescript{R}$, \end{tabular}\\ depending on the publication.\footnote{With the Monotype fonts, in all publications, $\backslash\texttt{oldcal}\{\texttt{R}\}=\oldcal{R}$ and $\backslash\texttt{truescript}\{\texttt{R}\}=\truescript{R}$; with CMR fonts, $\backslash\texttt{truescript}\{\texttt{R}\}= \backslash\texttt{oldcal}\{\texttt{R}\}= \backslash\texttt{mathcal}\{\texttt{R}\}=\oldcal{R}$.} The \verb+\mathbf..{...}+ command works only with letters (not symbols), while the \verb+\boldsymbol{...}+ command will give a boldface version of every symbol which exists in the current font: \smallskip \verb+\boldsymbol{\Sigma}+ is rendered as $\boldsymbol{\Sigma}$ \smallskip \noindent To cope with the unfortunate notation in Descriptive Set Theory where the difficult to see distinction between boldface and lightface Greek letters is essential, you may want to use the \verb+\tboldsymbol{...}+ command which proclaims explicitly the boldness: \smallskip \verb+\tboldsymbol{\Sigma}+ is rendered as $\tboldsymbol{\Sigma}$ The files \pkg{aslsyms.tex} and \pkg{aslsyms.ps} in the ASL Typesetting Office site give a complete list of all symbols which can be used with \pkg{asl}, including the \LaTeX{} symbols, the symbols from the AMS fonts, arithmetic subtraction $x\dotminus y$ and the ``correct'' game quantifier $(\game\alpha)$. We welcome suggestions and contributions of additional symbols useful for papers in logic. \section{Bibliography} \label{bibtex} A basic characteristic of the style for bibliographies in ASL publications is that \textit{complete names of journals are entered}, i.e., we do not write \textit{Bull.\ Am.\ Math.\ Soc.} but, in full, \textit{Bulletin of the American Mathematical Society}. The file \pkg{journals.lst} posted on the ASL Typesetting site lists the full names of most journals cited by our authors, and it is extremely helpful to the ASL Typesetting Office if complete names of the books and journals in the bibliography are sent in by the author. If you know how to use \pkg{bibtex}, please submit a \pkg{.bib} file with your article, otherwise one will be made up by our typesetters. The remainder of this section is aimed at those who know how to use \pkg{bibtex}, as described in Appendix B of the \LaTeX{} book. ASL publications use only one stylefile for bibliographies, \pkg{asl.bst}, invoked by putting at the end of the paper \begin{verbatim} \bibliographystyle{asl}
\section{Introduction} Optical interferometry exploiting squeezed light~\cite{LoudonJMO1987, ScullyBOOK, BreitbachNATURE1997, AndersenPS2016} has been -- since the pioneer 40-years-old proposal by Caves~\cite{CavesPRD1981} -- a cornerstone of theoretical~\cite{ParisPLA1995, BarnettEPJD2003, PezzePRL2008, LangPRL2013, Ruo-BercheraPRA2015, SparaciariPRA2016, BondurantPRD1984} and experimental~\cite{WuPRL1986, XiaoPRL1987, GrangierPRL1987, PolzikPRL1992, GodaNATPHYS2008} photonic quantum sensing~\cite{SchnabelPR2017, PirandolaNATPHOT2018, LawrieACSP2019, PolinoARXIV}. A Mach-Zehnder interferometer (MZI) with a high-power coherent state in one input port and a low-intensity squeezed-vacuum light in the other input can reach a phase estimation uncertainty $\Delta^2 \theta = e^{-2r}/\bar{n}_T$~\cite{CavesPRD1981}, where $r\geq 0$ is the squeeze parameter, $\bar{n}_T$ is the total average number of photons and $\theta$ is the relative phase shift between the two arms of the interferometer. This scheme can overcome the shot-noise (SN) limit $\Delta^2 \theta_{\rm SN} = 1/\bar{n}_T$ by an amount depending on the squeezing strength $r$. Currently, squeeze factors of more than 10 dB have been observed in several experiments~\cite{VahlbruchPRL2016, SchonbeckOPTLETT2018, SchnabelPR2017, LawrieACSP2019}. Furthermore, when the coherent and the squeezed-vacuum input states have approximately the same intensity, the MZI can achieve~\cite{PezzePRL2008} the Heisenberg limit (HL) $\Delta^2 \theta_{\rm HL} = 1/\bar{n}_T^2$. This prediction has been associated~\cite{HofmanPRA2007, PezzePRL2008} to the onset of NOON states after the first beam splitter of the MZI, as verified experimentally~\cite{AfekSCIENCE2010}. Enhancing the sensitivity by replacing the normally-empty input port with squeezed-vacuum light is relevant when there are constraints limiting the total light intensity inside the interferometer. Gravitational wave detection is an important application~\cite{SchnabelNATCOMM2010, RafalPRA2013, ChuaCQG2014, AbadieNATPHYS2011, AasiNATPHOT2013, TsePRL2019, AcernesePRL2019}, where the quantum-enhancement offered by squeezing allows to boost substantially the expected rate of detectable events. Quantum imaging~\cite{MoreauNPR2019, Ruo-BercheraMETROLOGIA2019}, microscopy~\cite{CasacioNATURE2021} and the probing of biological samples~\cite{TaylorNATPHOT2013} are other relevant applications that require high resolution but low probe power~\cite{TaylorPHYSREP2016}. Squeezed-vacuum states can be also generated via spin-changing collisions in a Bose-Einstein condensate~\cite{GrossNATURE2011, HamleyNATPHYS2012, PeiseNATCOMM2015} and used to enhance the sensitivity of atomic MZIs~\cite{KrusePRL2016, PezzeRMP2018}. \begin{figure*}[t!] \centering \includegraphics[width=1\textwidth]{newfig1.pdf} \caption{ A distributed quantum sensor for the estimation of $d$ relative phases $\theta_1, ..., \theta_d$ can follow an entangled (a) or a separable (b) strategy. Panel (a) shows the Mach-Zehnder sensor network composed by $d$ MZIs. The input of the $j$th MZI is given by a coherent state $\ket{\alpha_j}$ in the mode $a_j$, while the other input $b_j$ is one of the outputs of a linear $d$-mode quantum circuit. The input of the quantum circuit is a single squeezed-vacuum state $\ket{\xi}$, which is mixed with $d-1$ vacuum states $\ket{0}$. The output state of the $d$-mode quantum circuit is mode entangled: we thus identify the scheme of panel (a) as an entangled multiphase estimation strategy. In panel (b) the different MZIs are independent. The $j$th MZI has a coherent state $\ket{\alpha_j'}$ in the input mode $a_j$ and a squeezed-vacuum state $\ket{\xi'}$ in mode $b_j$. This scheme realizes a separable multiphase estimation strategy. The table in panel (c) summarizes the main results of the manuscript for what concerns the gain $\mathcal{G}$ of the entangled strategy over the separable one, under different constraints $\mathcal{C}$ (see text for details). Here, $\bar{n}_T$ is the total average number of particles, $\bar{n}_s$ is the total number of particles in the squeezed state(s), and prime symbols refer to the separable strategy.} \label{fig1} \end{figure*} To date, Mach-Zehnder interferometry using squeezed states has focused on the estimation of a single phase shift~\cite{SchnabelPR2017, LawrieACSP2019, RafalPROGOPT2015, PezzeRMP2018}. Yet, several applications require the estimation of multiple phases encoded simultaneously in a network of spatially-separated sensors~\cite{AlbarelliPLA2020}. Distributed quantum sensing~\cite{HumphreysPRL2013, LiuJPA2016, CiampiniSCIREP2016, ProctorPRL2018, GePRL2018, ElderidgePRA2018, GessnerPRL2018, ZhuangPRA2018, NicholsPRA2018, OhPRR2020, ZhuangNJP2020, GessnerNATCOMM2020, TriggianiARXIV, GebhartARXIV} is thus attracting increasing interest. Recently, different schemes have been experimentally realized using squeezed light~\cite{GuoNATPHYS2020, XiaPRL2020}, photonics Greenberger–Horne–Zeilinger (GHZ)~\cite{LiuNATPHOT2021}, Bell~\cite{ZhaoPRX2021}, multimode NOON~\cite{HongNATCOMM2021} and single-photon Fock~\cite{PolinoOPTICA2019, ValeriNPJ2020} states. In Ref.~\cite{GuoNATPHYS2020} a displaced squeezed state is split among four spatial modes, which then undergo a phase shift and are finally measured by homodyne detection. Reference~\cite{XiaPRL2020} has instead reported sensing of phase-space displacement using a squeezed vacuum state split among three modes~\cite{ZhuangPRA2018}. The sensor network of Refs.~\cite{LiuNATPHOT2021, ZhaoPRX2021} is based on the polarization rotation of photonic qubits. In particular, Ref.~\cite{ZhaoPRX2021} has realized distributed sensing over large spatial distances. Finally, Refs.~\cite{PolinoOPTICA2019, ValeriNPJ2020} have considered a multimode interferometer on a photonic chip, where single photons are split among many modes by a generalized beam splitter, phase shifted and recombined by a second multimode beam splitter~\cite{CiampiniSCIREP2016}. Surprisingly, so far, little effort has been devoted to study multiphase estimation in a network of distributed MZIs. This system is relevant in quantum optics, as well as in atom interferometry, with possible applications in arrays of quantum clocks~\cite{KomarNATPHYS2014, PolzikPRA2016} and spatial magnetometry~\cite{BaumgratzPRL2016, AltenburgPRA2017, ApellanizPRA2018, HouPRL2020}. A key aspect of the MZI is that phase sensitivity bounds are well defined and quantified in term of the {\it total} average number of particles in the input state~\cite{PezzePRL2007}, without ambiguities related to the resource cost necessary to establish a phase-reference~\cite{JarzynaPRA2012, PezzePRA2015, GoldbergPRA2020} (e.g. for homodyne detection). Total resource counting is crucial to quantify improved performances of quantum devices over classical strategies and to claim sub-SN sensitivities. In this manuscript, we study a distributed-sensing scheme that generalizes the single MZI with coherent$\otimes$squeezed-vacuum input light~\cite{CavesPRD1981,ParisPLA1995, BarnettEPJD2003, PezzePRL2008, LangPRL2013} to a network of $d \geq 1$ spatially-distributed MZIs, see Fig.~\ref{fig1}(a). In our setup, a single squeezed-vacuum state $\ket{\xi}$ of squeeze parameter $r$ is first split by a quantum circuit (QC) consisting of a $d$-mode beam splitter~\cite{GuoNATPHYS2020, XiaPRL2020}. The QC is identified by a unitary transformation $\vect{U}$ that can be realized, in practice, by a sequence of two-mode linear operations~\cite{ReckPRL1994, NokkalaNJP2018}. The sensor network of Fig.~\ref{fig1}(a) can thus be scaled to an arbitrary number, $d$, of interferometers. The linear splitting of the squeezed-vacuum state generates entanglement among the $d$ output modes $b_1, ..., b_d$ of the QC. We thus identify the scheme of Fig.~\ref{fig1}(a) as an entangled multiphase estimation strategy. Each mode $b_j$ is used as the input mode of a MZI, the other input $a_j$ being a coherent state. It should be notices that the $d$ coherent states $\vert \alpha_j \rangle$ are phase locked with the squeezed-vacuum state $\ket{\xi}$. In the $j$th MZI ($j=1, ..., d$), the two input modes mix at a balanced beam splitter, encode a relative phases $\theta_j$ and are detected by photocounting after a final balanced beam splitter. Here, we estimate {\it arbitrary linear combinations} $\vect{v} \cdot \vect{\theta} = \sum_{j=1}^d v_j \theta_j$ of the $d$ phase shifts $\vect{\theta} = \{\theta_1, ..., \theta_d\}$, where $\vect{v} = \{ v_1, ..., v_d \}$ is a real vector. The estimation method is based on a multimode moment-matrix approach~\cite{GessnerNATCOMM2020} and the corresponding sensitivity is compared to the multiparameter quantum Cram\'er-Rao bound~\cite{HelstromBOOK, HolevoBOOK, ParrisIJQI2009}. We identify different regimes -- depending on the relative intensity of the squeezed-vacuum and the coherent states -- and predict sub-shot noise sensitivities, up to the Heisenberg limit, with respect to the total number $\bar{n}_T$ of photons used. In particular, {\it i}) given a specific linear combination $\vect{v}\cdot \vect{\theta}$ that one wants to estimate, we identify the optimal configuration of the sensor network of Fig. \ref{fig1}(a) that minimizes the uncertainty $\Delta^2(\vect{v}\cdot \vect{\theta})$. The analytical optimization of $\vect{U}$, $\vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2$ and $r$ is supported by numerical calculations. In particular, we identify conditions for which the strategy of Fig.~\ref{fig1}(a) is never surpassed (for any $\vect{v} \cdot \vect{\theta}$) by the separable strategy of Fig.~\ref{fig1}(b), which uses independent MZIs for the estimation of each $\theta_j$. It should be also noticed that the separable strategy uses $d$ squeezed-vacuum states (one for each MZI), while the entangled strategy uses a single squeezed state. The table in Fig.~\ref{fig1}(c) summarizes our results concerning the maximum gain $\mathcal{G}$ of the entangled strategy over the separable one, under different constraints $\mathcal{C}$. There, $\mathcal{G}$ is understood as optimized over all $\vect{v}$. When $\bar{n}_s = \sinh^2 r \gg d$, we find a maximum gain given by a factor $d$. In the opposite limit, for $\bar{n}_s \ll d$ -- in particular for $d\to \infty$ -- we find a finite gain $e^{2r}$. The later result is surprising since, in this case, the squeezed vacuum is mixes, at the QC, with a diverging number of vacuum states. {\it Viceversa}, {\it ii}) for any given QC transformation $\vect{U}$, we identify optimal and orthogonal linear combinations $\vect{v} \cdot \vect{\theta}$ that can be estimated with the highest possible sensitivity. This optimization problem leads us to introduce the useful concepts of Fisher and squeezing spectra. In particular, we show that results are robust against random choices of $\vect{U}$. Our findings pave the way toward distributed multi-phase estimation in a network of MZIs, using quantum states and detection capabilities that are common to many laboratories. The paper is structured as it follows. Secion~\ref{IntroA} introduces basic and general notions of distributed sensing. In particular, we recall the multimode moment-matrix approach used in this work and the multiparameter Cram\'er-Rao bound. Section~\ref{MZSN} illustrates in details the Mach-Zehnder sensor network of Fig.~\ref{fig1}(a). Section~\ref{OptSens} presents the optimization for arbitrary $\vect{v}$. First, we provide, in Sec.~\ref{Sec.bounds}, upper and lower bounds to the sensitivity and present different sensitivity scalings with respect to the total average number of particles. We then compare, in Sec.~\ref{Sec.compare}, optimal entangled and separable strategies under different constraints, providing a detailed discussion of the results presented in the table of Fig. \ref{fig1}(c). Section~\ref{Optv} studies the optimal linear combination of phases that can be estimated for a given configuration of the Mach-Zehnder sensor network. We first introduce the notion of Fisher and squeezing spectra, in Sec. \ref{OptSpect}, and then apply this formalism to calculate the sensitivity achievable for random choices of the QC, in Sec. \ref{OptRand}. We finally, in Sec.~\ref{conclusion}, compare our finding with the literature and conclude. \section{Distributed quantum sensing} \label{IntroA} \subsection{Definition and strategies} In a distributed quantum sensing problem, $d$ unknown parameters $\theta_1, ..., \theta_d$, are encoded in independent (e.g. spatially-separated) modes or interferometers. Parameter encoding is described by commuting transformations. In the ideal noiseless scenario, this is given by the unitary evolution $e^{-i \vect{\theta} \cdot \hat{\vect{H}}} = \otimes_{j=1}^d e^{-i \hat{H}_j \theta_j}$, where $\hat{\vect{H}} = \{ \hat{H}_1, ..., \hat{H}_d \}$ is a set of commuting Hermitian operators, $[\hat{H}_i, \hat{H}_j] =0$ for $i,j=1, ...,d$, and $\vect{\theta} \cdot \hat{\vect{H}} = \sum_{j=1}^d \theta_j \hat{H}_j$. The sensing scheme can follow an {\it entangled} (also indicated as parallel, or global, in the literature) or a {\it separable} (sequential, or local) strategy~\cite{ProctorPRL2018, GePRL2018, GessnerPRL2018, KnottPRA2016, GuoNATPHYS2020, XiaPRL2020}. In an entangled strategy, the overall probe state $\hat{\rho}$ of the sensor network is prepared in a mode-entangled state. In contrast, a {\it separable} strategy uses the product state $\hat{\rho} = \bigotimes_{j=1}^d \hat{\rho}_j$, where $\hat{\rho}_j$ is the probe state of the $j$th sensor: the different sensors are thus uncorrelated and the parameters $\theta_1, ..., \theta_d$ are estimated independently. Notice that classical correlations among the different $\hat{\rho}_j$ are not useful to increase the multiparameter sensitivity, in general~\cite{GessnerPRL2018}. Finally, an interesting possibility is to consider local measurements at each sensor, without requiring a mode entangled measures (although also distributed sensing scheme based on a final recombination of parameter-sensing modes have been considered~\cite{CiampiniSCIREP2016, GePRL2018, TriggianiARXIV, PolinoOPTICA2019, ValeriNPJ2020, OhPRR2020}): local measurements are advantageous when the sensing modes are spatially delocalized~\cite{ZhaoPRX2021}. \subsection{Figure of merit} One of the goals of multiparameter estimation, in general, is to infer linear combinations $\vect{v} \cdot \vect{\theta} = \sum_{j=1}^d v_j \theta_j$ of $d$ parameters $\vect{\theta}$ encoded in the quantum device \cite{GePRL2018, ProctorPRL2018, GessnerPRL2018, XiaPRL2020, GuoNATPHYS2020, LiuNATPHOT2021, ZhaoPRX2021, RubioJPA2020, GrossJPA2021, QianPRA2019}. In the following we take $v_j$ real (either positive or negative) and $v_j \neq 0$ for all $j=1, ..., d$ to guarantee an irreducible $d$-parameter problem. We also consider the normalization $\vert \vect{v} \vert^2 = \sum_{j=1}^d v_j^2 = 1/d$, without loss of generality. An example of linear combination of parameters is the average $\vect{v} \cdot \vect{\theta} = (\theta_1 + \theta_2 + ... + \theta_d)/d$, corresponding to $v_j=1/d$. The method of moments is a feasible approach to multi-parameter estimation~\cite{GessnerNATCOMM2020}. Here, it is based on a set of $d$ Hermitian and commuting measurement operators $\hat{X}_j$ whose mean $\mean{\hat{X}_j}$ is a monotonic function of $\theta_j$ only. The estimation method consists of repeating the measurement of the local observable $\hat{X}_j$ several times. Taking the average value $\bar{X}_j$ and inverting the equation $\mean{\hat{X}_j}= \bar{X}_j$ provides an estimate of $\theta_j$. For the entangled multiparameter scenario, the method achieves an uncertainty~\cite{GessnerNATCOMM2020} \begin{equation} \label{emom} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} = \vect{v}^T \vect{\mathcal{M}}^{-1} \vect{v}, \end{equation} where $\vect{\mathcal{M}}=\vect{G}^T\vect{\Gamma}^{-1}\vect{G}$, $\vect{G}_{ij}=\partial \langle\hat{X}_i\rangle/\partial \theta_j$, and $\vect{\Gamma}_{ij}=\langle\hat{X}_i\hat{X}_j\rangle-\langle\hat{X}_i\rangle\langle\hat{X}_j\rangle$ are $d\times d$ matrices ($\vect{G}$ being diagonal in this case), and the expectation values are calculated with respect to the joint output state of the $d$ sensors, $e^{-i \hat{\vect{H}} \cdot \vect{\theta}}\hat{\rho} e^{i \hat{\vect{H}} \cdot \vect{\theta}}$. The covariance matrix $\vect{\Gamma}$ expresses correlations between measurement observables. These correlations are directly linked to the entanglement in the probe state $\hat{\rho}$ and can be engineered to enhanced the sensitivity in the estimation of certain combinations $\vect{v} \cdot \vect{\theta}$. In Ref.~\cite{GessnerNATCOMM2020} the moment matrix $\vect{\mathcal{M}}$ has been also used to characterize and detect metrological multimode squeezing. In separable strategies, $\vect{\Gamma}$ is diagonal and Eq.~(\ref{emom}) becomes \begin{equation} \label{smom} \Delta^2 (\vect{v} \cdot \vect{\theta})_{\rm smom} = \sum_{j=1}^d \frac{v_j^2 \Delta^2 \hat{X}_j}{(d \mean{\hat{X}_j}/d \theta_j)^2}, \end{equation} where $\Delta^2 \hat{X}_j = \mean{\hat{X}_j^2} - \mean{\hat{X}_j}^2$, with the expectation values calculated on the output state of the $j$th sensor, $e^{-i \hat{H}_j \theta_j} \hat{\rho}_j e^{i \hat{H}_j \theta_j}$. The ultimate sensitivity limit in the estimation of $\vect{v} \cdot \vect{\theta}$ is provided by the quantum Cramer-Rao bound~\cite{HelstromBOOK, HolevoBOOK, ParrisIJQI2009}. In the entangled setting, we have $\Delta^2 (\vect{v} \cdot \vect{\theta})_{\rm emom} \geq \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR}$, where \begin{equation} \label{Dthetan_par} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR} = \vect{v}^T \vect{\mathcal{F}_{\rm Q}}^{-1} \vect{v}, \end{equation} and $\vect{\mathcal{F}_{\rm Q}}$ is the $d\times d$ quantum Fisher information matrix (QFIM)~\cite{notaQFIM}. If the overall probe state is pure, $\hat{\rho} = \ket{\psi} \bra{\psi}$, then the QFIM is $(\vect{\mathcal{F}_{\rm Q}})_{ij} = 4 ( \langle \psi \vert \hat{H}_i \hat{H}_j \ket{ \psi } - \langle \psi \vert \hat{H}_i \ket{ \psi } \langle \psi \vert \hat{H}_j \ket{ \psi })$ and Eq.~(\ref{Dthetan_par}) can be saturated by optimal measurements and estimators~\cite{MatsumotoJPA2002, PezzePRL2017}. In the sequential setting, the quantum Cramer-Rao bound is $\Delta^2 (\vect{v} \cdot \vect{\theta})_{\rm smom} \geq \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm sQCR}$, where \begin{equation} \label{Dthetan_seq} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm sQCR} = \sum_{j=1}^d \frac{ v_j^2}{\mathcal{F}_j}, \end{equation} and $\mathcal{F}_j$ is the (scalar) quantum Fisher information~\cite{HelstromBOOK, HolevoBOOK, BraunsteinPRL1994}. For pure states, Eq.~(\ref{Dthetan_seq}) is obtained from Eq.~(\ref{Dthetan_par}) when taking the product $\ket{\psi} = \bigotimes_{j=1}^d \ket{\psi_j}$ such that $\vect{\mathcal{F}_{\rm Q}}$ becomes diagonal with entries $\mathcal{F}_j = (\vect{\mathcal{F}_{\rm Q}})_{jj} = 4( \bra{\psi_j} \hat{H}_j^2 \ket{\psi_j} - \bra{\psi_j} \hat{H}_j \ket{\psi_j}^2)$. We recall that the different terms on the right-hand side of Eqs.~(\ref{emom})-(\ref{Dthetan_seq}) are understood as divided by the number of repeated independent measurements $m$ used for the estimation. In particular, Eqs.~(\ref{emom})-(\ref{Dthetan_seq}) can be saturated, in general, for $m \gg 1$. To simplify the notation, we neglect the factor $m$ here and in the following (see Ref.~\cite{GebhartARXIV} for a multi-parameter Bayesian estimation analysis including $m$ as a resource). \section{Mach-Zehnder sensor network} \label{MZSN} The quantum distributed sensing scheme considered in this manuscript consists of a network of $d$ MZIs, see Fig.~\ref{fig1}. The entangled strategy is shown in Fig.~\ref{fig1}(a), while the separable one in Fig.~\ref{fig1}(b). In both cases, the $j$th interferometer is described by the unitary phase encoding transformation $e^{-i \theta_j \hat{H}_j}$, where $\hat{H}_j = (\hat{a}_j^\dag \hat{b}_j - \hat{b}_j^\dag \hat{a}_j)/2i$, $\hat{a}_j$ and $\hat{b}_j$ ($\hat{a}_j^\dag$ and $\hat{b}_j^\dag$) are bosonic annihilation (creation) operators for the two interferometer modes, respectively, and $\theta_j$ is a relative phase shift between the two interferometer arms. The $d$ MZIs are independent (namely, $[\hat{a}_i, \hat{a}_j^\dag] = [\hat{a}_i, \hat{b}_j^\dag] = [\hat{a}_i, \hat{b}_j] = 0$ for $i \neq j$), which guarantees $[\hat{H}_i, \hat{H}_j]=0$. Furthermore, we take local measurement observables $\hat{X}_j = (\hat{a}_j^\dag \hat{a}_j -\hat{b}_j^\dag \hat{b}_j)_{\rm out}/2$, counting the relative number of photons at the output port of the $j$th MZI, for $j=1, ..., d$. In the entangled strategy of Fig.~\ref{fig1}(a), the input mode $a_j$ of the $j$th MZI is fed with a coherent state $\ket{\alpha_j}$, where $\alpha_j = \vert \alpha_j \vert e^{i \phi_j}$. The other input mode $b_j$ is fed with the state obtained by the multi-mode splitting of a single squeezed-vacuum state $\ket{\xi}$. Here, $\xi= r e^{i \varphi}$, $r$ is the squeeze parameter, $\bar{n}_s = \sinh^2r$ is the mean number of photons, and $\varphi$ is the phase of $\ket{\xi}$. The multi-mode splitting corresponds to a QC described by a unitary $d\times d$ matrix $\vect{U}$. Denoting as $(\hat{b}_{\textrm{in}})_j$ the annihilation operators associated to the $j$th input mode, see Fig.~\ref{fig1}(a), we have $\hat{b}_{j}=\sum_k \vect{U}^{\dagger}_{jk}(\hat{b}_{\textrm{in}})_k$. The squeezed vacuum is inserted in one input port of the network, that we indicate as port $D$ (ranging from 1 to $d$), while all the other input modes are in the vacuum state. The total average number of photons in the full Mach-Zehnder sensor network of Fig.~\ref{fig1}(a) is given by $\bar{n}_T= \sum_{j=1}^d \vert \alpha_j \vert^2 +\bar{n}_s$. The inverse moment matrix $\vect{\mathcal{M}}^{-1}$ can be calculated analytically, see Appendix A. Below, we report the explicit expression by assuming the optimal phase-matching conditions $\Im(e^{i\chi_j}u_j)= 0$ for $j=1, ..., d$. Here $\Re(x)$ and $\Im(x)$ indicate the real and imaginary part of $x$, respectively, and $u_j=\vect{U}_{Dj}$ ($\sum_{j=1}^d |u_j|^2=1$ being $\vect{U}$ unitary). The condition $\Im(e^{i\chi_j}u_j)= 0$ can be fulfilled by adjusting the relative phase $\chi_j=\phi_j-\varphi/2$ between the coherent state in mode $a_j$ and the squeezed-vacuum. In other words, the optimal sensing condition is obtained by matching the phases of each $\ket{\alpha}_j$ relative to that of $\ket{\xi}$. At the optimal working point $\theta_j = \pi/2$, we have \begin{equation} \label{MOM} (\vect{\mathcal{M}}^{-1})_{ij}=\frac{\vert \alpha_i \vert (e^{-2r}-1) \vert \alpha_j \vert \tilde{u}_i \tilde{u}_j }{(\vert \alpha_i \vert^2-\tilde{u}_i^2\bar{n}_s)(\vert \alpha_j \vert^2-\tilde{u}_j^2\bar{n}_s)} +\frac{\vert \alpha_j \vert^2+\tilde{u}_j^2\bar{n}_s}{(\vert \alpha_j \vert^2-\tilde{u}_j^2\bar{n}_s )^2}\delta_{ij}, \end{equation} where $\delta_{ij}$ is the Dirac delta function and $\tilde{u}_j = \Re(e^{i\chi_j}u_j) =\pm|u_j|$. We also calculate analytically the QFIM (see Appendix A): \begin{equation} \label{QFIM} (\vect{\mathcal{F}_{\rm Q}})_{ij} = \vert \alpha_i \vert (e^{2r}-1) \vert \alpha_j \vert \tilde{u}_i \tilde{u}_j + ( \vert \alpha_j \vert^2 + \tilde{u}_i^2 \bar{n}_s ) \delta_{ij}, \end{equation} which is independent from $\vect{\theta}$. We finally notice that Eqs.~(\ref{MOM}) and~(\ref{QFIM}) do not depend on the QC transformation $\vect{U}$ as a whole, but only on the vector $\vect{\tilde{u}}=\{\tilde{u}_1,\dots,\tilde{u}_d\}$. Given a specific QC transformation $\vect{U}$ and the actual input port $D$ in which $\ket{\xi}$ is inserted, we can identify $2^d$ different (non-orthogonal) vectors $\{\tilde{u}_i\}_{i=1,\dots,d}$, depending on the choice of sign for each $\tilde{u}_i=\pm|\vect{U}_{Di}|$. We recall that $\vect{U}_{Di}$ is the element of the matrix $\vect{U}$ at row $D$ and column $i$. In the separable strategy of Fig.~\ref{fig1}(b), the $j$th MZI is fed with a coherent state $\ket{\alpha_j'}$ in mode $a_j$ and a squeezed vacuum state $\ket{\xi'}$ in mode $b_j$, where $\alpha_j'=\vert \alpha_j' \vert e^{i \phi_j'}$ and $\xi_j' = r_j' e^{i \varphi_j'}$. Under the optimal condition $\chi_j' = \phi_j' - \varphi_j'=0$ (requiring phase locking between $\ket{\alpha_j'}$ and $\ket{\xi'}$), we find~\cite{CavesPRD1981, ParisPLA1995, PezzePRL2008} \begin{equation} \label{sMOM} \frac{\Delta^2 \hat{X}_j}{(d \mean{\hat{X}_j}/d \theta_j)^2} = \frac{\vert \alpha_j' \vert^2 e^{-2r_j'} + (\bar{n}_s')_j}{[\vert \alpha_j' \vert^2 - (\bar{n}_s')_j]^2}, \end{equation} and the quantum Fisher information~\cite{PezzePRL2008, LangPRL2013} \begin{equation} \label{sQFIM} \mathcal{F}_j = \vert \alpha_j' \vert^2 e^{2r_j'} + (\bar{n}_s')_j, \end{equation} where $(\bar{n}_s')_j = \sinh^2 r_j'$ is the mean number of photon in the state $\ket{\xi'}$. Differently from the entangled strategy, the separable strategy uses $d$ squeezed-vacuum states. The total average number of particles in the separable sensor is thus $\bar{n}_T' = \sum_{j=1}^d \vert \alpha_j' \vert^2 + \bar{n}_s'$, where $\bar{n}_s' = \sinh^2 r_j'$ is the total average number of photons in the $d$ squeezed states. When $d=1$, Eqs.~\makeref{MOM} and~\makeref{QFIM} agree with Eqs.~\makeref{sMOM} and~\makeref{sQFIM}, respectively, and recover a single MZI with coherent$\otimes$squeezed-vacuum input state \cite{CavesPRD1981,ParisPLA1995, BarnettEPJD2003, PezzePRL2008, LangPRL2013, Ruo-BercheraPRA2015, SparaciariPRA2016}. \section{Optimal sensing configuration} \label{OptSens} In this section, we study the following problem: given a linear combination of parameters $\vect{v} \cdot \vect{\theta}$, we want to find the optimal configuration of the Mach-Zehnder sensor network of Fig.~\ref{fig1}(a) that minimizes the phase uncertainty $\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$, for instance when using the method of moment as estimation strategy. In other words, for a given $\vect{v} \in \mathbb{R}^d$, we search for \begin{equation} \label{minimization} \min_{\vect{U}, \, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2, r} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}. \end{equation} We recall that the minimization over the QC transformation $\vect{U}$ corresponds to a minimization over the vector $\vect{\tilde{u}}$ defined above. Here, we approach Eq.~(\ref{minimization}) by a direct calculation of the inverse moment matrix which, in some limits, assumes a convenient form suitable for analytical optimization. Clearly, Eq.~(\ref{minimization}) can be also generalized to the quantum Cramer-Rao bound, namely \begin{equation} \label{minimizationQCR} \min_{\vect{U},\,\vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2, r} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR}. \end{equation} In Sec. \ref{Sec.bounds}, we derive upper and lower bounds to Eqs.~(\ref{minimization}) and~(\ref{minimizationQCR}) that hold for every $\vect{v}$. We then compare, in Sec.~\ref{Sec.compare}, the optimized entangled and separable strategies, under different constraints. In particular, numerical studies for $d=2$ and $d=3$ show that the optimal parallel strategy overcomes a corresponding optimal sequential strategy for every $\vect{v}$. \subsection{Bounds and scalings} \label{Sec.bounds} For fixed $\bar{n}_T$ and $\bar{n}_s$, it is possible to find upper and lower bounds to Eq.~(\ref{minimization}), for every $\vect{v}$: \begin{equation} \label{ubound3LB} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} \geq \frac{e^{-2r}}{d\bar{n}_T} + \frac{\bar{n}_s}{d\bar{n}_T^2}, \end{equation} that holds for $\bar{n}_T \gg \bar{n}_s$, and \begin{equation} \label{ubound3UB} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} \leq \frac{e^{-2r}}{\bar{n}_T} + \frac{\bar{n}_s \mathcal{W}}{\bar{n}_T^2}, \end{equation} that holds for $\bar{n}_T \gg (d+1)\bar{n}_s$, where $\mathcal{W} = d^3 \sum_{j=1}^d v_j^4$. The above inequalities are derived in Appendix B. As shown below, the upper bound is tight for $\vect{v} = \vect{v}_{\rm ave}=(\pm 1, \pm 1, ..., \pm 1)/d$ such that $\vect{v}_{\rm ave} \cdot \vect{\theta} = \sum_{j=1}^d \pm \theta_j/d$ (that, for brevity, we indicate as generalized average). The lower bound is tight in the trivial case when $v_j = 1/\sqrt{d}$ and $v_{i\neq j} =0$ such that $\vect{v} \cdot \vect{\theta} = \theta_j/\sqrt{d}$ (the factor $\sqrt{d}$ is due to consistency with the normalization $\vert \vect{v} \vert^2 = 1/d$). In this case, the optimal scheme consists of a single MZI with a squeezed vacuum in one port and a coherent state of $\bar{n}_T - \bar{n}_s$ particles in the other port. The bounds (\ref{ubound3LB}) and (\ref{ubound3UB}) are characterized by different regimes and scalings. \begin{itemize} \item {\it Regime $\bar{n}_T \gg \bar{n}_s e^{2r} \mathcal{W}$.} Noticing that $\mathcal{W} \geq 1$, this regime also implies $\bar{n}_T \gg \bar{n}_s e^{2r}$. In this case, the first term in both Eqs.~(\ref{ubound3LB}) and~(\ref{ubound3UB}) dominates over the second one, giving \cite{notaEq13} \begin{equation} \label{ubound4} \frac{e^{-2r}}{d\bar{n}_T} \leq \min_{\vect{U}, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} \leq \frac{e^{-2r}}{\bar{n}_T}. \end{equation} Both terms correspond to a sub-SN uncertainty with prefactor related to the squeeze parameter $r$. \item {\it Optimal squeezing.} We minimize Eqs.~(\ref{ubound3LB}) and (\ref{ubound3UB}) with respect to $\bar{n}_s$, for a fixed $\bar{n}_T$. Considering $\bar{n}_s\gg 1$ (such that $e^{2r} \approx 4 \bar{n}_s$) and taking the derivative with respect to $\bar{n}_s$, one finds \begin{equation} \label{ubound5} \frac{1}{d\bar{n}_T^{3/2}} \leq \min_{U, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2, r} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} \leq \frac{\sqrt{\mathcal{W}}}{\bar{n}_T^{3/2}}. \end{equation} The optimal value of $\bar{n}_s$ minimizing the upper (lower) bound $\bar{n}_s\approx\sqrt{\bar{n}_T/4\mathcal{W}}$ ($\bar{n}_s\approx\sqrt{\bar{n}_T/4}$). These values are consistent with the validity conditions of Eq.~(\ref{ubound3LB}), namely $\bar{n}_T \gg \bar{n}_s$. Furthermore, the upper bound in Eq.~(\ref{ubound5}) holds under the additional condition $\bar{n}_s \gg (d+1)/(4 \mathcal{W})$. Overall, both bounds in Eq.~(\ref{ubound5}) corresponds to a scaling of phase uncertainty faster than the SN. \item {\it Transient Heisenberg scaling for $(d+1)\bar{n}_s \ll \bar{n}_T \ll \bar{n}_s e^{2r}$.} In this regime, which requires $e^{2r} \gg d+1$, both Eq.~(\ref{ubound3LB}) and Eq.~(\ref{ubound3UB}) show a transient Heisenberg scaling \cite{notaEq15}: \begin{equation} \label{ubound6} \frac{\bar{n}_s}{d\bar{n}_T^{2}} \leq \min_{U, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} \leq \frac{\bar{n}_s \mathcal{W}}{\bar{n}_T^{2}}. \end{equation} Equation (\ref{ubound6}) is understood as $1/\bar{n}_T^2$ scaling that holds as a function of $\bar{n}_T$ in a restricted regime, and for a fixed value of $\bar{n}_s$. \end{itemize} In analogy to Eqs.~(\ref{ubound3LB}) and~(\ref{ubound3UB}), we can find an upper and a lower bound to Eq. (\ref{minimizationQCR}): \begin{equation} \label{ubound7LB} \min_{\vect{U}, \, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR} \geq \frac{1}{d[\bar{n}_T e^{2r} - \bar{n}_s (e^{2r}-1)]}, \end{equation} and \begin{equation} \label{ubound7UB} \min_{\vect{U}, \, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR} \leq \frac{e^{-2r}}{\bar{n}_T - \bar{n}_s}. \end{equation} The bounds holds for every $\vect{v}$ and do not require additional conditions on $\bar{n}_T$ and $\bar{n}_s$. The demonstration of the inequalities~(\ref{ubound7UB}) and ~(\ref{ubound7LB}) is detailed in Appendix C. Also in this case, the upper bound is tight for the estimation of $\vect{v}_{\rm ave} \cdot \vect{\theta}$, while the lower bound is tight for the estimation of a single $\theta_j$. We distinguish different regimes: \begin{itemize} \item For $\bar{n}_T \gg \bar{n}_s$, Eqs.~(\ref{ubound7LB}) and~(\ref{ubound7UB}) simplify and we have \begin{equation} \label{ubound8} \frac{e^{-2r}}{d \bar{n}_T} \leq \min_{\vect{U}, \, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR} \leq \frac{e^{-2r}}{ \bar{n}_T}. \end{equation} Equation~(\ref{ubound8}) holds, in particular, also in the regime $\bar{n}_T \gg \bar{n}_s e^{2r} \mathcal{W}$, where the upper and lower bounds to Eq.~(\ref{ubound8}) coincide with that of Eq.~(\ref{ubound4}). \item {\it Heisenberg limit for $\bar{n}_T \approx 2 \bar{n}_s$.} Taking $\bar{n}_s\gg 1$ (so that $\bar{n}_s\approx e^{2r}/4$), we can immediately optimize Eqs.~(\ref{ubound7LB}) and (\ref{ubound7UB}) with respect to $\bar{n}_s$, and for fixed $\bar{n}_T$: \begin{equation} \label{sensitivity_same_intensity} \frac{1}{d \bar{n}_T^2} \leq \min_{\vect{U}, \, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2, r} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR} \leq \frac{1}{ \bar{n}_T^2}. \end{equation} It should be noticed that the value of the squeeze parameter that minimizes both bounds (\ref{ubound7LB}) and (\ref{ubound7UB}) is $\bar{n}_s = \bar{n}_T/2$. This is different from the value that minimizes the bounds in Eq.~(\ref{ubound5}). The different optimizations correspond to different scalings, $O(\bar{n}_T^{-3/2})$ and $O(\bar{n}_T^{-2})$, respectively. \end{itemize} \begin{figure}[t!] \centering \includegraphics[width=1\columnwidth]{newfig2.pdf} \caption{(a) Optimized sensitivity for the estimation of the generalized average $ \vect{v}_{\rm ave} \cdot \vect{\theta} = (\pm \theta_1 \pm \theta_2 ... \pm \theta_d)/d$, as a function of the total average number of particles $\bar{n}_T$, for fixed $\bar{n}_s$. The thin solid green line is $\min \Delta^2 (\vect{\theta}\cdot \vect{v}_{\rm ave})_{\rm emom}$, while the thin solid red line $\min \Delta^2 (\vect{\theta}\cdot \vect{v}_{\rm ave})_{\rm eQCR}$. For simplicity here $\min$ indicates the minimum over $\vect{U}$, and $\vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2$: the minimization if performed numerically for $d=2$. These numerics are compared with Eq.~(\ref{Dthetaave}) (thick green line) and Eq.~(\ref{DthetaaveQCR}) (thick red line). The thin red line is barely visible due to the perfect superposition with the thick red line. The dotted vertical line highlights the point $\bar{n}_T = \bar{n}_s e^{2r}$. Black lines correspond to different analytical limit: the dot-dashed line is $e^{-2r}/\bar{n}_T$, the dashed line is $1/\bar{n}_T^{3/2}$ and the dotted line is $\bar{n}_s/\bar{n}_T^{2}$. We also indicate the SN ($1/\bar{n}_T$) and the HL ($1/\bar{n}_T^2$). Here $\bar{n}_s = 100$. Panels~(b) and~(c) show $\min_r \Delta (\vect{\theta}\cdot \vect{v}_{\rm ave})_{\rm emom}$ and $\min_r \Delta (\vect{\theta}\cdot \vect{v}_{\rm ave})_{\rm eQCR}$ as a function of $\bar{n}_T$. We use $\min_r$ as shorthand notation to indicate the minimization over $\vect{U}$, $\vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2$ and over the squeeze parameter $r$. Dots are numerical results, while lines are expected analytical behaviours: $\bar{n}_T^{-3/2}$ [in panel (b)] and $\bar{n}_T^{-2}$ [in panel (c)].} \label{fig2} \end{figure} To summarize, through a set of bounds, we have identified different scalings and behaviours that characterize Eqs.~(\ref{minimization}) and~(\ref{minimizationQCR}) in different regimes of parameters. Below, we demonstrate the saturation of the upper bounds~(\ref{ubound3UB}) and~(\ref{ubound7UB}). For symmetry reasons, the best estimation of the generalized average phase $\vect{v}_{\rm ave} \cdot \vect{\theta} = ( \pm \theta_1 \pm \theta_2 \pm ... \pm \theta_d)/d$ (corresponding to $\vert v_{{\rm ave},j} \vert = 1/d$) is obtained when all the coherent states have the same intensity, namely $|\alpha_j|^2=\bar{n}_c, \forall j$. Moreover, in the regime $\bar{n}_T\gg (d+1)\bar{n}_s$ it is possible to prove that the QC satisfying the condition $\vect{\tilde{u}}=\sqrt{d}\vect{v}_{\rm ave}$ is optimal~(see Appendix D). We have \begin{equation}\label{Dthetaave} \min_{\vect{U}, \, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2} \Delta^2(\vect{v}_{\rm ave} \cdot \vect{\theta})_{\rm emom}= \frac{e^{-2r}}{\bar{n}_T} + \frac{\bar{n}_s}{\bar{n}_T^2}, \end{equation} that coincides with the upper bound~(\ref{ubound3UB}), when noticing that $\mathcal{W} = d^3 \sum_{j=1}^2 v_{{\rm ave},j}^4=1$. Equation~(\ref{Dthetaave}) holds under the same condition of Eq.~(\ref{ubound3UB}), namely $\bar{n}_T\gg (d+1)\bar{n}_s$. Furthermore, for the uniform QC considered here, the optimization of the quantum Cramer-Rao bound leads to \begin{equation}\label{DthetaaveQCR} \min_{\vect{U}, \, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2} \Delta^2(\vect{v}_{\rm ave} \cdot \vect{\theta})_{\rm eQCR}=\frac{1}{\bar{n}_Te^{2r}-\bar{n}_s\left(e^{2r}-1\right)}, \end{equation} that saturates Eq.~(\ref{ubound7UB}) for $r \gg 1$. Equation~(\ref{DthetaaveQCR}) is proved in Appendix~D for $\bar{n}_T \gg (d+1) \bar{n}_s$, showing that the condition $\vect{\tilde{u}}=\sqrt{d}\vect{v}_{\rm ave}$ is optimal in this regime. In Fig.~\ref{fig2}(a) we plot numerical results for $\min_{\vect{U}, \, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2} \Delta^2(\vect{v}_{\rm ave} \cdot \vect{\theta})_{\rm emom}$ (thin green line) and $\min_{\vect{U}, \, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2} \Delta^2(\vect{v}_{\rm ave} \cdot \vect{\theta})_{\rm eQCR}$ (thin red line) as a function of $\bar{n}_T$. These are compared with Eq.~(\ref{Dthetaave}) and~(\ref{DthetaaveQCR}), shown as thick green and red lines, respectively. The perfect superposition between the red lines shows that Eq. (\ref{DthetaaveQCR}) holds in all regimes. Equation (\ref{Dthetaave}) instead holds for sufficiently large values of $\bar{n}_T$, as expected. In Fig.~\ref{fig2} we also plot the analytical behaviours Eqs.~(\ref{ubound4})-(\ref{ubound6}) in the corresponding different regimes. In particular, Eqs. (\ref{Dthetaave}) and (\ref{DthetaaveQCR}) coincide for $\bar{n}_T\gg\bar{n}_se^{2r}$, indicating that the method of moments is an optimal estimation strategy in that regime. In Fig.~\ref{fig2}(b) and~(c) we plot, respectively, $\min_{\vect{U}, \, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2, r} \Delta^2(\vect{v}_{\rm ave} \cdot \vect{\theta})_{\rm emom}$ and $\min_{\vect{U}, \, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2, r} \Delta^2(\vect{v}_{\rm ave} \cdot \vect{\theta})_{\rm eQCR}$, as a function of $\bar{n}_T$. Dots are numerical results. The solid line in panel (b) [panel (c)] is obtained by minimizing Eq. (\ref{Dthetaave}) [Eq. (\ref{DthetaaveQCR})] with respect to $r$, predicting a sensitivity $1/\bar{n}_T^{3/2}$ [$1/\bar{n}_T^{2}$]. \begin{figure*}[ht!] \centering \includegraphics[width=1\textwidth]{newfig3.pdf} \caption{Results of a numerical optimization of the sensor network of Fig.~\ref{fig1}(a) for $d=2$ (upper row panels) and $d=3$ (lower row), under different constraints (as detailed in the text). Panels (a) and (b) corresponds to the optimization under the constraint $\mathcal{C}_1$, see Sec.~\ref{SubSec.C1}. Panel (a) plots $\min_{\vect{U}, \, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2, \, r} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$ (solid black line) and $\min_{(\vert \alpha_1 \vert^2, r_1), ..., (\vert \alpha_d \vert^2, r_d) } \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom}$ (dashed blue line). The dot-dashed orange lines are the upper and lower bounds of Eq.~(\ref{ubound5}). The gain Eq.~(\ref{gain1}) is shown in the inset of panel (a) for $d=2$ and in panel (b) for $d=3$. Panels (c) and (d) corresponds to the optimization under the constraint $\mathcal{C}_2$, see Sec.~\ref{SubSec.C2}. Panel (c) plots $\min_{\vect{U}} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$ (solid black line) and $\min_{r_1', ..., r_d'} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom}$ (dashed blue line). The corresponding gain, Eq.~(\ref{gain2}), is shown as solid line in the inset, together with the analytical prediction Eq.~(\ref{gain2an}) (dashed line). Panel (d) shows $\mathcal{G}_2(\vect{v})$ for $d=3$. In panels (c) and (d) we have set $\vert \alpha_j \vert^2 = \vert \alpha_j' \vert^2 = (\bar{n}_T - \bar{n}_s)/d$ for all $j$. Panels (e) and (f) corresponds to the optimization under the constraint $\mathcal{C}_3$, see Sec.~\ref{SubSec.C3}. In particular, we consider $\bar{n}_s/\bar{n}_T= 10^{-4}$ for the entangled strategy and $(\bar{n}_s')_j/(\bar{n}_T')_j= 10^{-4}$ ($j=1, ..., d$) for the separable strategy. Panel (e) plots $\min_{\vect{U}, \, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$ (solid black line) and $\min_{\vert \alpha_1' \vert^2, ..., \vert \alpha_d' \vert^2} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom}$ (dashed blue line). The gain Eq.~(\ref{gain3}) is shown in the inset of panel (c) for $d=2$ and in panel (d) for $d=3$. The dot-dashed orange lines are the lower and upper bounds Eqs.~(\ref{ubound3LB}) and (\ref{ubound3UB}), respectively. In all panels $\bar{n}_T=\bar{n}_T' = 10^6$. In panels (c)-(f) $\bar{n}_s=\bar{n}_s'=10^2$.} \label{fig3} \end{figure*} \subsection{Comparison between optimal entangled and separable strategies} \label{Sec.compare} In the following, we compare optimal entangled and separable strategies for an arbitrary linear combination of parameters $\vect{v} \cdot \vect{\theta}$. Let us define the gain factor \begin{equation} \label{gain} \mathcal{G}_{\mathcal{C}} = \frac{\min_{\{\vert \alpha_1' \vert^2, r_1', ..., \vert \alpha_d' \vert^2, r_d' \} \in \mathcal{C}} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom}}{\min_{\{ \vect{U}, \, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2, r \} \in \mathcal{C}} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}}, \end{equation} where $\mathcal{C}$ indicates a common constraint on resources for both cases. Different constraints are discussed below. We recall that the uncertainties $\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom}$ and $\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$ in Eq. (\ref{gain}) are already optimized with respect to the relative phase between the squeezed-vacuum state(s) and the $d$ coherent states. The minimizations in Eq. (\ref{gain}) are performed numerically for $d=2$ and $d=3$ by using a variational approach, see Fig. \ref{fig3}. Analytical predictions for any $d$ can be derived in interesting cases. For $d=2$, the QC consists of a generalized beam-splitter that implements the mode transformation $\vect{\hat{b}}={U}^{\dagger}\vect{\hat{b}_{\rm in}}$, where $U=\begin{pmatrix}\tau&\varrho\\-\varrho^* & \tau^* \end{pmatrix}$. Without loss of generality, we consider $\tau$ and $\varrho$ being real numbers with $\tau^2+\varrho^2=1$. The sensor network is given by two MZIs and $\vect{v}^T = ( \cos \phi_v , \sin \phi_v )/\sqrt{2}$ is expressed as a function of $\phi_{v} \in [0, 2\pi]$. For $d=3$, the sensing scheme consists of three MZIs and the goal is to estimate a linear combinations of three relative phases, $\theta_1$, $\theta_2$ and $\theta_3$. The QC is implemented as a general $3\times 3$ orthogonal transformation. Any such transformation can be realized, in general, by a sequence of three two-mode beam splitters \cite{ReckPRL1994}. For $d=3$, the vector $\vect{v}$ is parametrized as $\vect{v}^T = ( \sin \theta_v \cos \phi_v , \sin \theta_v \sin \phi_v, \cos \phi_v )/\sqrt{3}$, as a function of $\phi_{v} \in [0, 2\pi]$ and $\theta_v \in [0, \pi]$. Upon imposing different constraints, we observe $\mathcal{G}_{\mathcal{C}}(\vect{v}) \geq 1$ for every $\vect{v}$, see Fig. \ref{fig3}. In particular, we obtain $\mathcal{G}_{\mathcal{C}}(\vect{v})=1$ when the problem reduces to the estimation of a single phase [e.g. for $\phi_v = 0, \pi/2$ and $d=2$, corresponding to $\vect{v} = (1/\sqrt{d},0)$ and $(0,1/\sqrt{d})$, respectively]. The maximum gain $\mathcal{G}_{\mathcal{C}}(\vect{v})$ is obtained for the estimation of the generalized average phase $\vect{v}_{\rm ave} \cdot \vect{\theta} = \sum_{j=1}^d \pm \theta_d/d$, that is $\phi_v = \pm \pi/4$ for $d=2$ and $\phi_v= \pm \pi/4$, $\theta_v=\arccos(1/\sqrt{3})$, for $d=3$ (notice that the figure shows the case $v_j \geq 0$, while $\mathcal{G}_{\mathcal{C}}(\vect{v})$ is symmetric under $v_j\to-v_j$). \subsubsection{$\mathcal{C}_1$: same total average number of particles} \label{SubSec.C1} We impose here the only constraint of having the same total average number of particles for both strategies: $\bar{n}_T = \bar{n}_T'$. The entangled strategy is thus optimized over the QC transformation $\vect{U}$, the average number of particles of each coherent state, $\vert \alpha_j \vert^2$, and the squeeze parameter $r$. The sequential strategy is instead optimized over the input states of each independent MZI, namely over each $\vert \alpha_j \vert^2$ and squeeze parameter $r_j$, for $j=1, ..., d$. The gain factor is thus \begin{equation} \label{gain1} \mathcal{G}_1(\vect{v}) = \frac{\min_{\vert \alpha_1' \vert^2, r_1', ..., \vert \alpha_d' \vert^2, r_d' } \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom}}{\min_{\vect{U}, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2, r} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}}. \end{equation} Numerical results for $d=2$ and $d=3$ are shown in Fig.~\ref{fig3}(a) and (b), respectively. In the case $\vect{v}=\vect{v}_{\rm ave}$, the optimized entangled strategy is $\min \Delta^2(\vect{v_{\rm ave}} \cdot \vect{\theta})_{\rm emom} =\bar{n}_T^{-3/2}$. The optimized separable strategy is instead $\min \Delta^2(\vect{v_{\rm ave}} \cdot \vect{\theta})_{\rm smom} = 1/d\times(\bar{n}_T/d)^{-3/2}=\sqrt{d}\times(\bar{n}_T)^{-3/2}$, where $\bar{n}_T/d$ is the total average number of photons injected in each MZI. The highest gain in this case equals \begin{equation} \mathcal{G}_1(\vect{v_{\rm ave}})=\sqrt{d}. \end{equation} A maximum gain $\sqrt{2}$ and $\sqrt{3}$ can be seen in the inset of panels (a) and (b) of Fig.~\ref{fig3}, respectively. \subsubsection{$\mathcal{C}_2$: same total average number of particles and same coherent state intensities} \label{SubSec.C2} Here, we consider the same total average number of particles for both strategies, $\bar{n}_T = \bar{n}_T'$, and the same coherent state intensities, $\vert \alpha_j \vert^2 = \vert \alpha_j' \vert^2$ for all $j$. These constraints fix the total average number of photons in the squeezed state(s), namely $\bar{n}_s = \bar{n}_T - \sum_{j=1}^d \vert \alpha_j \vert^2= \bar{n}_s'$. The entangled strategy uses a single squeezed-vacuum state and we optimize the multimode splitting in the QC. The separable strategy is instead optimized with respect to the $d$ squeeze parameters $r_j'$ ($j=1,\dots,d$) with $\sum_{j=1}^d \sinh^2 r_j' = \bar{n}_s' = \bar{n}_s$. The gain factor writes \begin{equation} \label{gain2} \mathcal{G}_2(\vect{v}) = \frac{\min_{r_1', ..., r_d'} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom}}{\min_{\vect{U}} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}}. \end{equation} In the following, for simplicity, we can take $|\alpha_j|^2=\bar{n}_c$ for all $j$. In Fig.~\ref{fig5}(c) and~(d), we show the results of a numerical optimizations for $d=2$ and $d=3$, respectively. They agree well with the analytical prediction \begin{equation} \label{gain2an} \mathcal{G}_2(\vect{v})=d \,\Bigg( \sum_{i=1}^d|v_i| \Bigg)^2, \end{equation} that can be derived under the conditions $r,r_j' \gg 1$ and in the regime $\bar{n}_c \gg \bar{n}_s e^{2r}$, see Appendix~E. We observe $\mathcal{G}_2(\vect{v}) \geq 1$ for every $\vect{v}$, with maximum gain equal for $\vect{v} = \vect{v}_{\rm ave}$. Let us now focus the discussion on the maximum gain point $\vect{v} = \vect{v}_{\rm ave}$ and $\bar{n}_c \gg \bar{n}_s$. In this case, the optimal entangled strategy is obtained for $\tilde{u}_j = 1/\sqrt{d}$ and we have \begin{equation} \label{optent2} \min_{\vect{U}}\Delta^2(\vect{v}_{\rm ave} \cdot \vect{\theta})_{\rm emom} = \frac{e^{-2r}\bar{n}_c +\bar{n}_s/d}{d\bar{n}_c^2}, \end{equation} see Eq.~(\ref{Dthetaave}) and demonstration in Appendix D. The optimal separable strategy is obtained using $d$ squeezed-vacuum states having the same squeeze parameter $r_j' =r' = {\rm arcsinh} \sqrt{\bar{n}_s/d}$ [since $\bar{n}_s$ is fixed, the intensity of the squeezed-vacuum state in each MZI is $(\bar{n}_s')_j = \bar{n}_s/d$]. As shown in Appendix~F, for $\bar{n}_c \gg \bar{n}_s$, we obtain \begin{equation} \label{optsep2} \min_{r'_1, ..., r'_d} \Delta^2 (\vect{v}_{\rm ave} \cdot \vect{\theta})_{\rm smom} = \frac{\bar{n}_c e^{-2 r'} + \bar{n}_s/d}{d\bar{n}_c^2}. \end{equation} Finally, the gain factor \begin{equation} \label{gaindinf} \mathcal{G}_2(\vect{v}_{\rm ave}) = \frac{\bar{n}_c e^{-2 r'} + \bar{n}_s/d}{\bar{n}_c e^{-2 r} + \bar{n}_s/d} \end{equation} is obtained by taking the ratio between Eqs.~(\ref{optent2}) and~(\ref{optsep2}). It is interesting to consider different limits of Eq.~(\ref{gaindinf}), see also Fig.~\ref{fig4}. Let us consider $d$ fixed, $\bar{n}_s/d\gg 1$, such that $r,r' \gg 1$, and $d \bar{n}_c \gg \bar{n}_s e^{2r}$ (which also implies $d \bar{n}_c \gg \bar{n}_s e^{2r'}$). Notice that these conditions are fulfilled in Fig.~\ref{fig3}(c) and (d). In this case, Eq.~(\ref{gaindinf}) simplifies to \begin{equation} \label{gaindinf2} \mathcal{G}_2(\vect{v}_{\rm ave}) = \frac{e^{-2 r'}}{e^{-2 r}} = d. \end{equation} The gain factor $d$ is obtained taking into account that, for $r,r' \gg 1$, we have $e^{-2 r'}/4 \approx \bar{n}_s'/d$, $e^{-2 r}/4 \approx \bar{n}_s$. A maximum gain close to $2$ and $3$ can be seen in panels (c) and (d) of Fig.~\ref{fig3}, respectively. \begin{figure}[t!] \centering \includegraphics[width=1\columnwidth]{newfig4.pdf} \caption{Gain factor $\mathcal{G}_2(\vect{v}_{\rm ave})$, Eq.~(\ref{gaindinf}), as a function of $d$, for $\bar{n}_c = 10^8$ and $\bar{n}_s=10^2$ (dots). The solid line is $\mathcal{G}_2(\vect{v}_{\rm ave})=d$, which is expected for $d \ll \bar{n}_s$; the dashed line is $\mathcal{G}_2(\vect{v}_{\rm ave})=e^{2r}$, for $d \gg \bar{n}_s$.} \label{fig4} \end{figure} Let us consider the opposite limit, $\bar{n}_s/d \ll 1$. The discussion includes the limit $d\to \infty$ that is peculiar of the multiparameter problem. First, we notice that, for any fixed value of $\bar{n}_s$, in the limit $d \to \infty$, we have $r' = {\rm arcsinh} \sqrt{\bar{n}_s/d} \to 0$. The separable sensing scheme thus reduces to $d$ MZIs fed with coherent state in one port and vacuum in the other port. As shown in Eq.~(\ref{optsep2}), we recover the shot noise limit, $\min_{r'_1, ..., r'_d} \Delta^2 (\vect{v} \cdot \vect{\theta})_{\rm smom} \to 1/(d \bar{n}_c) = 1/\bar{n}_T$. It is easy to show that the same sensitivity is also achieved for the optimized quantum Cram\'er-Rao bound $\min_{r'_1, ..., r'_d} \Delta^2 (\vect{v} \cdot \vect{\theta})_{\rm sQCR}$. The situation is completely different for the entangled scheme. In this case, $r$ remains finite in the limit $d \to \infty$ and, according to Eq.~(\ref{optent2}), we have $\min_{\vect{U}}\Delta^2(\vect{v}_{\rm ave} \cdot \vect{\theta})_{\rm emom} = e^{-2r}/(d \bar{n}_c) = e^{-2r}/\bar{n}_T$. The entangled strategy still achieves a sub-SN sensitivity, with a gain factor \begin{equation} \label{gaindinf3} \mathcal{G}_2(\vect{v}_{\rm ave}) \to e^{2r}, \qquad {\rm for} \,\, d\to \infty. \end{equation} Surprisingly, a finite gain is obtained when a single squeezed-vacuum state is mixed, by the QC, with a diverging number ($d-1$) of vacuum states $\ket{0}$. The physical reason for the finite gain Eq.~(\ref{gaindinf3}) is due to quantum correlations in the covariance matrix $\vect{\Gamma}$. Under the above conditions $\vect{\Gamma}$ reads (see Appendix~A for the general expression) \begin{equation} \label{Gamma4} 4\vect{\Gamma} = \frac{\bar{n}_c(e^{2r}-1)}{d} \begin{pmatrix} 1 & \hdots & 1 \\ \vdots & \ddots & \vdots \\ 1 & \hdots & 1 \end{pmatrix} + \Big( \bar{n}_c + \frac{\bar{n}_s}{d}\Big) \begin{pmatrix} 1 & \hdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \hdots & 1 \end{pmatrix}. \end{equation} In the limit $d \to \infty$, the prefactor of the all-ones matrix tends to zero while the prefactor of the identity matrix remains finite. However, the all-ones matrix is characterized by perfect correlations between all its $d^2$ elements, while the identity matrix does not feature any correlation. When calculating $ \tfrac{(1,1,...,1)^T}{\sqrt{d}} 4\vect{\Gamma} \tfrac{(1,1,...,1)}{\sqrt{d}} = \bar{n}_c e^{2r} + \bar{n}_s/d \approx \bar{n}_c e^{2r}$ [notice that the vector $(1,1,...,1)/\sqrt{d}$ is normalized to one] the contributions coming from the two terms in Eq. (\ref{Gamma4}) have the same magnitude with respect to $d$. The finite mean value of the correlation matrix is responsible for the finite phase sensitivity and gain. \subsubsection{$\mathcal{C}_3$: same total average number of particles and same total squeezed-vacuum intensities} \label{SubSec.C3} We consider here $\bar{n}_T= \bar{n}_T'$ and the same total average number of particles in the squeezed state(s), namely $\bar{n}_s = \bar{n}_s' = \sum_{j=1}^d (\bar{n}_s')_j$. For the entangled strategy, we fix the ratio $\bar{n}_s/\bar{n}_T$ [equal to $10^{-4}$ in Fig.~\ref{fig3}(e) and (f)] and thus optimize $\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$ over the QC tranformation $\vect{U}$ and the $d$ coherent state intensities $\vert \alpha_1 \vert^2$, ..., $\vert \alpha_d \vert^2$. For the separable strategy, we fix the ratio $(\bar{n}_s')_j/(\bar{n}_T')_j$ [also equal to $10^{-4}$ for each $j$, in the figure], where $(\bar{n}_T')_j$ and $(\bar{n}_s')_j$ indicate the average number of particles in total and in each squeezed-vacuum state, respectively, as input of the $j$th MZI. We then optimize the separable strategy over each $\vert \alpha_j' \vert^2$. The gain factor is \begin{equation} \label{gain3} \mathcal{G}_3(\vect{v}) = \frac{\min_{\vert \alpha_1' \vert^2, ..., \vert \alpha_d' \vert^2} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom}}{\min_{\vect{U}, \,\vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}}. \end{equation} Results $d=2$ and $d=3$ are shown in Fig.~\ref{fig5}(e) and (f), respectively. It is particularly interesting that the entangled strategy outperforms the separable one in this case, $\mathcal{G}_3(\vect{v}) \geq 1$ for all $\vect{v}$. Indeed, it clearly shows that the main responsible for the gain in sensitivity is the use of an optimal entangled multi-mode state in place of a product of squeezed-vacuum states. When considering $\vect{v} = \vect{v}_{\rm ave}$, optimal strategies are obtained taking $\vert \alpha_j'\vert^2 = \vert \alpha_j\vert^2 = \bar{n}_c$ for all $j$ and $\tilde{\vect{u}} = 1/\sqrt{d}$. In this case, $\mathcal{G}_3(\vect{v}_{\rm ave})$ equals Eq.~(\ref{gaindinf}), for $\bar{n}_c \gg \bar{n}_s$, and the same considerations as above can be obtained. In particular, $\mathcal{G}_3(\vect{v}_{\rm ave}) = d$ for $\bar{n}_s \gg d$, while $\mathcal{G}_3(\vect{v}_{\rm ave}) = e^{2r}$ for $\bar{n}_s \ll d$ (in particular, in the limit $d\to \infty$). \subsubsection{$\mathcal{C}_4$: same total average number of particles and same squeezed-vacuum strength} Here, we compare the entangled strategy using a single squeezed-vacuum state $\ket{\xi}$ with the separable strategy using $d$ copies of the same squeezed-vacuum states $\ket{\xi}$. In other words, here, $r_j' = r$ for all $j$. For simplicity, we set $\vert \alpha_j' \vert^2 = \bar{n}_c'$ and $\vert \alpha_j \vert^2 = \bar{n}_c$ for all $j$. We also consider the same total average number of particles, $\bar{n}_T = \bar{n}_T'$, where $\bar{n}_T = d \bar{n}_c + \bar{n}_s$ and $\bar{n}_T' = d(\bar{n}_c' + \bar{n}_s)$, and recall that $\bar{n}_s = \sinh^2 r$. In this case, using Eqs.~(\ref{smom}) and~(\ref{sMOM}), the sensitivity achieved with the separable strategy is \begin{equation} \label{Dthetasep4} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom} = \frac{\bar{n}_c' e^{-2r} + \bar{n}_s}{d(\bar{n}_c' - \bar{n}_s)^2} \end{equation} for all $\vect{v}$. One of the characteristic features of Eq. (\ref{Dthetasep4}) is the divergence at $\bar{n}_c' = \bar{n}_s$ (namely $\bar{n}_T = 2 d \bar{n}_s$) and the saturation of the Cramer-Rao bound, $\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm sQCR} = 1/[d(\bar{n}_c' e^{2r} + \bar{n}_s)]$, for $\bar{n}_T \gg e^{2r} \bar{n}_s$ \cite{PezzePRL2008}. Instead, the entangled strategy, should be optimized over the QC transformation, thus giving \begin{equation} \label{gain4} \mathcal{G}_4(\vect{v}) = \frac{ \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom}}{\min_{\vect{U}} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}}. \end{equation} Let us focus on the case $\vect{v} = \vect{v}_{\rm ave}$ and take the limit $\bar{n}_c, \bar{n}_c' \gg \bar{n}_s$ [that, in particular imply $\bar{n}_T \gg (d+1) \bar{n}_s$, $\bar{n}_T \approx d \bar{n}_c$ and $\bar{n}_T' \approx d \bar{n}_c'$]. In this regime, $\min_{\vect{U}} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$ is given by Eq.~(\ref{Dthetaave}) which, taking into account Eq.~(\ref{Dthetasep4}), provides \begin{equation} \label{gain4_1} \mathcal{G}_4(\vect{v_{\rm ave}}) = \frac{\bar{n}_T e^{-2r} + d\bar{n}_s}{\bar{n}_T e^{-2r} + \bar{n}_s}. \end{equation} If $\bar{n}_T \gg d e^{2r} \bar{n}_s$, Eq. (\ref{gain4_1}) simplifies to \begin{equation} \mathcal{G}_4(\vect{v_{\rm ave}})=1. \end{equation} Although there is no gain in this case, it is still interesting that the parallel strategy using a {\it single} squeezed-vacuum state achieves the same performance as the sequential strategy using $d$ squeezed states with the same squeeze parameter. The opposite regime, $\bar{n}_T \ll \bar{n}_s e^{2r}$, should be considered with care. In particular, for $(d+1) \bar{n}_s \ll \bar{n}_T \ll \bar{n}_s e^{2r}$, the second term in both the numerator and denominator of Eq.~(\ref{gain4_1}) dominates, giving $\mathcal{G}_4(\vect{v_{\rm ave}}) = d$. Achieving $\mathcal{G}_4(\vect{v_{\rm ave}}) >1$ in this regime is due to the divergence of Eq.~(\ref{Dthetasep4}), as further discussed in Appendix~G. In particular, a calculation of the gain factor following a numerical optimization of $\min_{\vect{U}} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$ shows that $\mathcal{G}_4(\vect{v_{\rm ave}})$ diverges when $\bar{n}_T= 2 d \bar{n}_s$. This is an artifact due to the use of Eq.~(\ref{Dthetasep4}) outside the regime where it saturates the Cramer-Rao bound. \section{Optimal linear combination of phases} \label{Optv} In the previous section, we have discussed the optimal configuration of the sensor network of Fig. \ref{fig1}(a) that maximizes the sensitivity for the estimation of a fixed a linear combination of phases $\vect{v}\cdot \vect{\theta}$. Here we consider the opposite problem. Given a specific configuration of the sensor network, namely a specific QC transformation $U$, coherent state intensities and squeezed parameter, we discuss the optimal linear combination of phases $\vect{v}\cdot \vect{\theta}$ that can estimated with the smallest possible uncertainty. In the following, we fist provide a general framework for the minimization problem considered here, namely we introduce the notion of Fisher and squeezing spectra. We then apply this formalism to the Mach-Zehnder sensor network of Fig. \ref{fig1}(a) for random choices of the QC and discuss different sensitivity limits and regimes. \subsection{Fisher spectrum and squeezing spectrum} \label{OptSpect} Finding the optimal vector $\vect{v} \in \mathbb{R}^d$ that minimizes Eq.~(\ref{emom}) and/or Eq.~(\ref{Dthetan_par}) is solved by calculating the spectrum of the matrices $\vect{\mathcal{F}_{\rm Q}}$ and $\vect{\mathcal{M}}$, that we indicate as Fisher and squeezing spectrum, respectively. These spectra contain useful information regarding the multiparameter problem, in general. We have \begin{equation} \label{ineq0} \min_{\vect{v} \in \mathbb{R}^d} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} = \frac{1}{\mu_{\rm max} d}, \end{equation} where $\mu_{\rm max}$ is the largest eigenvalue of $\vect{\mathcal{M}}$. The corresponding optimal eigenvector $\vect{v}_{\mu_{\rm max}}$ gives the linear combination of parameters $\vect{v}_{\mu_{\rm max}} \cdot \vect{\theta}$ that can be estimated with the smallest possible uncertainty when using the specific method of moments considered (namely, based on the chosen measurement observables $\hat{X}_j$, probe state and phase encoding transformation). Following the inequality $\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR} \leq \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$, we have $f_{\rm max} \geq \mu_{\rm max}$, where $f_{\rm max}$ is the largest eigenvalue of the QFIM and satisfies \begin{equation} \label{ineq1} \min_{\vect{v}\in \mathbb{R}^d} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR} = \frac{1}{f_{\rm max} d}. \end{equation} The corresponding optimal eigenvector $\vect{v}_{f_{\rm max}}$ (in general, $\vect{v}_{f_{\rm max}}\neq \vect{v}_{\mu_{\rm max}}$) gives the linear combinations of parameters, $\vect{v}_{f_{\rm max}} \cdot \vect{\theta}$, that can be estimated with the highest possible sensitivity (when optimized over all generalized output measurements and all possible estimation strategies) for the given probe state and phase encoding transformation. The demonstration of Eqs.~(\ref{ineq0}) and~(\ref{ineq1}) is reported in Appendix~H. Furthermore, a degeneracy (e.g. in the squeezing spectrum) reveals independent linear combinations of parameters that can be estimated with the same sensitivity. Specifically, if $d_\mu$ is the degeneracy of the eigenvalue $\mu$ of $\vect{\mathcal{M}}$, then the sensitivity $\Delta^2 (\vect{v} \cdot \vect{\theta})_{\rm emom} = 1/(\mu d)$ is the same for any $\vect{v}$ given by a linear combination of the $d_\mu$ orthonormal eigenvectors $\vect{v}_\mu^{(1)}, ..., \vect{v}_\mu^{(d_\mu)}$. In particular, $\vect{\mathcal{M}}^{-1}$ is defined on the subspace of $\mathbb{R}^d$ generated by a basis of eigenvectors of $\vect{\mathcal{M}}$ corresponding to finite eigenvalues (and similarly for $\vect{\mathcal{F}_{\rm Q}}^{-1}$). \subsection{Random choice of quantum circuit} \label{OptRand} Here, we consider random choices of the QC and find the corresponding optimal $\Delta^2 (\vect{v}\cdot \vect{\theta})_{\rm emom}$. To be more explicit, we generate random unitary QC matrices $\vect{U}$ (with uniform deHaar measure) and calculate the largest eigenvalue $\mu_{\rm max}$ of $\vect{\mathcal{M}}$, Eq. (\ref{MOM}). Furthermore, without loss of generality, we take the same number of photons in each coherent state, namely $\vert \alpha_j \vert^2= \bar{n}_c$ for all $j$. Figure~\ref{fig3} summarizes our findings, while different analytical limits are discussed below. The figure shows $\mathcal{E}_{\rm QC}[1/(\mu_{\rm max}d)]$ (green dots), where $\mathcal{E}_{\rm QC}[...]$ indicates statistical averaging. For comparison, we also consider $\mathcal{E}_{\rm QC}[1/(f_{\rm max}d)]$ (red triangles). An analytical upper bound to Eq.~(\ref{ineq0}) can be derived by taking $\vect{v} = \vect{\tilde{u}}/\sqrt{d}$, giving $\min_{\vect{v} \in \mathbb{R}^d} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} \leq \vect{\tilde{u}}^T \mathcal{M}(\vect{\tilde{u}})^{-1} \vect{\tilde{u}}/d$. The inequality is valid for every QC~\cite{nota3} and numerical calculations reveal that it is tight in a wide regimes of parameters. In particular, for $\bar{n}_T \gg \bar{n}_s$, and taking the statistical average, we find the simplified expression~\cite{nota3} \begin{equation} \label{ubound} \frac{\mathcal{E}_{\rm QC}\big[\tilde{\vect{u}}^T \mathcal{M}(\tilde{\vect{u}})^{-1} \tilde{\vect{u}}\big]}{d} = \frac{e^{-2r}}{\bar{n}_T} + \frac{\bar{n}_s \mathcal{S}}{\bar{n}_T^2}, \end{equation} where $\mathcal{S} \equiv \mathcal{E}_{\rm QC}[d \sum_{j=1}^d \tilde{u}_j^4]$. Equation (\ref{ubound}) is plot as solid black line in Fig. \ref{fig5}. \begin{figure} \includegraphics[width=\columnwidth]{newfig5.pdf} \caption{Optimized phase uncertainties as a function of $\bar{n}_T$. Symbols show $\mathcal{E}_{\rm QC}[1/(\mu_{\rm max}d)]$ (green dots) and $\mathcal{E}_{\rm QC}[1/(f_{\rm max}d)]$ (red triangles), where $\mathcal{E}_{\rm QC}[...]$ indicates statistical averaging over random choices of the QC. Error bars are root mean square fluctuations. The solid line is Eq.~(\ref{ubound}). The dot-dashed line is $e^{-2r}/\bar{n}_T$, Eq.~(\ref{sensitivity_homodyne_limit}), the dashed line is $\sqrt{\mathcal{S}}/\bar{n}_T^{3/2}$, Eq.~(\ref{ubound1}), while the dotted line is $\bar{n}_s \mathcal{S}/\bar{n}_T^2$, Eq.~(\ref{ubound2}). The grey regions are defined by $1/\bar{n}_T$ (SN) and $1/\bar{n}_T^2$ (HL). Here, $d=10$, $\bar{n}_s=100$ and statistical averaging is obtained over $10^4$ random choices of unitary transformation $\vect{U}$.} \label{fig5} \end{figure} {\it Regime $\bar{n}_T \gg \bar{n}_s e^{2r}$.} In this regime, Eq.~(\ref{MOM}) becomes \cite{nota2} \begin{equation} \label{moment_matrix_homodyne_limit} \vect{\mathcal{M}}^{-1} = \frac{e^{-2r}-1}{\bar{n}_c} \vect{\tilde{u}}\vect{\tilde{u}}^T + \frac{1}{\bar{n}_c} \vect{I}_d, \end{equation} where $\vect{I}_d$ is the $d\times d$ identity matrix. Equation~(\ref{moment_matrix_homodyne_limit}) can be diagonalized straightforwardly: we find $\mu_{\max} = \bar{n}_c e^{2r}$, the corresponding eigenvector being $\vect{v}_{\mu_{\rm max}} = \vect{\tilde{u}}/\sqrt{d}$. In this case, the upper bound $\vect{\tilde{u}}^T \mathcal{M}(\tilde{u})^{-1} \vect{\tilde{u}})/\sqrt{d}$ is tight, with the first term in Eq.~(\ref{ubound}) dominating over the second one. The optimal sensitivity is \begin{equation} \label{sensitivity_homodyne_limit} \min_{\vect{\vect{v}} \in \mathbb{R}^d} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} =\frac{e^{-2r}}{\bar{n}_T}, \end{equation} shown as dot-dashed line in Fig.~\ref{fig5}. Equation.~(\ref{sensitivity_homodyne_limit}) holds for any QC. It is worth noticing that such sensitivity is independent of $\vect{\tilde{u}}$, while $\vect{v}_{\mu_{\rm max}}$ is independent of the numbers of particles $\bar{n}_c$ and $\bar{n}_s$ used. Equation~(\ref{sensitivity_homodyne_limit}) agrees with the numerical calculations shown in Fig.~\ref{fig5}. Below we show that $f_{\max} = \mu_{\max} = \bar{n}_c e^{2r}$ in this regime, with corresponding eigenvectors $\vect{v}_{f_{\rm max}} =\vect{v}_{\mu_{\rm max}} = \vect{\tilde{u}}/\sqrt{d}$. The optimal sensitivity predicted by the QFIM is thus saturated by the practical estimation method given by the method of moments: in the present limit, $\mathcal{E}_{\rm QC}[1/(\mu_{\rm max}d)] = \mathcal{E}_{\rm QC}[1/(f_{\rm max}d)] = e^{-r}/\bar{n}_T$ with negligible fluctuations due to random choices of the QC. \begin{figure}[t!] \includegraphics[width=\columnwidth]{newfig6.pdf} \caption{(a) $\mathcal{E}_{\rm QC}[\min_{r} 1/(\mu_{\rm max}d)]$ as a function of $\bar{n}_T$ and for $d=10$~(dots). The solid line is Eq.~(\ref{ubound1}). The corresponding optimal values of $\bar{n}_s$ are shown in the inset~(dots). There, the solid line is $\bar{n}_s = \sqrt{\bar{n}_T}/\sqrt{4 \mathcal{S}}$. Panel (b) shows $\mathcal{E}_{\rm QC}[\min_{\bar{n}_s} 1/(\mu_{\rm max}d)]\times \bar{n}_T^{3/2}$ as a function of $d$ and for $\bar{n}_T = 10^6$~(dots). The solid line is Eq.~(\ref{ubound1}). The corresponding optimal values of $\bar{n}_s$ are shown in the inset, where the solid line corresponds to the theoretical prediction. $\mathcal{E}_{\rm QC}[]$ indicates statistical average, here over $10^4$ random QC transformations, where error bars are root mean square fluctuations.} \label{fig6} \end{figure} {\it Optimal squeezing for $\bar{n}_T \approx \bar{n}_s e^{2r}$.} We now optimize the average number of particles in the squeezed-vacuum state in order to maximize $\mu_{\rm max}$, for a given total average number of particles $\bar{n}_T$ and QC transformation $\hat{U}$. Such optimization cannot be performed analytically and we rely on a numerical diagonalization of Eq.~\makeref{MOM}. For each QC, we evaluate numerically the maximum eigenvalue $\mu_{\rm max}$ of the corresponding $\vect{\mathcal{M}}$ and optimize it with respect to $\bar{n}_s$. Numerical results are compared to the analytical optimization of Eq.~(\ref{ubound}). For $\bar{n}_s \gg 1$ (such that $e^{2r} \approx 4 \bar{n}_s$) this predicts \begin{equation} \label{ubound1} \min_{r} \frac{\mathcal{E}_{\rm QC}\big[\tilde{u}^T \mathcal{M}(\tilde{u})^{-1} \tilde{u}\big]}{d} \approx \frac{\sqrt{\mathcal{S}}}{\bar{n}_T^{3/2}} \end{equation} for $\bar{n}_s \approx \sqrt{\bar{n}_T/(4 \mathcal{S})}$. In Fig.~\ref{fig6}(a) we plot $\mathcal{E}_{\rm QC}[\min_{\bar{n}_s} 1/(\mu_{\rm max}d)]$ as a function of $\bar{n}_T$ and for fixed $d$~(dots). The solid line is Eq.~(\ref{ubound1}). The inset shows the corresponding optimal values of $\bar{n}_s$~(dots), the solid line being $\bar{n}_s = \sqrt{\bar{n}_T}/\sqrt{4\mathcal{S}}$. In Fig.~\ref{fig6}(b) we plot $\mathcal{E}_{\rm QC}[\min_{\bar{n}_s} 1/\mu_{\rm max}] \times \bar{n}_T^{3/2}$ as a function of $d$, where the corresponding optimal values of $\bar{n}_s$ are shown in the inset. The numerical results (dots) are in excellent agreement with Eq.~(\ref{ubound1}) (solid line). Equation~(\ref{ubound1}) is further shown as dashed line in Fig.~\ref{fig5}. {\it Transient Heisenberg scaling for $\bar{n}_s \ll \bar{n}_T \ll \bar{n}_s e^{2r}$.} In this regime, the first term in Eq.~(\ref{ubound}) can be neglected and we obtain \begin{equation} \label{ubound2} \frac{\mathcal{E}_{\rm QC}\big[ \tilde{u}^T \mathcal{M}(\tilde{u})^{-1} \tilde{u} \big]}{d} \approx \frac{\bar{n}_s \mathcal{S}}{\bar{n}_T^2}. \end{equation} This predicts a transient Heisenberg scaling, for fixed $\bar{n}_s$, with prefactor approximately given by $\bar{n}_s$. This prediction is confirmed in Fig.~\ref{fig5} where Eq.~(\ref{ubound2}) is shown as the dotted line. \begin{figure}[t!] \includegraphics[width=\columnwidth]{newfig7.pdf} \caption{Plot of $\min_{\bar{n}_s} 1/(f_{\rm max} d)$, averaged over $10^4$ random choices of the QC (dots). The solid line is the analytical prediction $1/\bar{n}_T^2$.} \label{fig7} \end{figure} {\it Quantum Cramer-Rao bound.} We now study the QFIM, Eq.~(\ref{QFIM}), for $\vert \alpha_j \vert^2 = \bar{n}_c$ for all $j$. In the limit $\bar{n}_c e^{2r} \gg \bar{n}_s$ (which is $\bar{n}_c \gg 1$ for sufficiently large values of $\bar{n}_s$), Eq.~(\ref{QFIM}) assumes the simple form \begin{equation} \label{QFIM_homodyne_limit} \vect{\mathcal{F}_{\rm Q}} = \bar{n}_c (e^{2r}-1) \vect{\tilde{u}}\vect{\tilde{u}}^T + \bar{n}_c \vect{I}_d. \end{equation} The maximum eigenvalue is $f_{\rm max} = e^{2r} \bar{n}_c$ and the corresponding eigenvector is $\vect{v}_{f_{\rm max}} = \vect{\tilde{u}}/\sqrt{d}$. For $d\bar{n}_c \gg \bar{n}_s$, we have $\bar{n}_T \approx d\bar{n}_c$ and we find $\min_{\vect{\vect{v}}\in \mathbb{R}^d} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR} = e^{-2r}/\bar{n}_T$. This behaviour holds also for $\bar{n}_T \gg \bar{n}_s e^{2r}$, where $\min_{\vect{\vect{v}}\in \mathbb{R}^d} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR} = \min_{\vect{\vect{v}} \in \mathbb{R}^d} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$ as given in Eq.~(\ref{sensitivity_homodyne_limit}), see Fig.~\ref{fig5}. Furthermore, taking $\bar{n}_s\gg 1$ (so that $\bar{n}_s\approx e^{2r}/4$), we can optimize $f_{\rm max} = 4\bar{n}_c \bar{n}_s$ with respect to $\bar{n}_s$, for a fixed $\bar{n}_T$: replacing $\bar{n}_s = \bar{n}_T - \bar{n}_c d$ and taking the derivative with respect to $\bar{n}_c$, we find the optimal condition $d\bar{n}_c = \bar{n}_s = \bar{n}_T/2$. This predicts the saturation of the Heisenberg limit \begin{equation} \label{sensitivity_same_intensity_1} \min_{\vect{\vect{v}}\in \mathbb{R}^d} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR} = \Delta^2(\vect{\tilde{u}} \cdot \vect{\theta})_{\rm eQCR} =\frac{1}{\bar{n}_T^2} \end{equation} with respect to the total number of particles $\bar{n}_T$. In Fig. \ref{fig7} we show the the statistical average of $\min_{\bar{n}_s} 1/(f_{\rm max} d)$ (dots) as a function of $\bar{n}_T$. The solid line is $1/\bar{n}_T^2$. In Fig.~\ref{fig5} we plot $1/(f_{\rm max} d)$, averaged on random choices of the QC (triangles). Numerical simulations agree well with analytical predictions in the different limits. In particular, we see that the QFIM tends to a sub-shot noise scaling faster than the moment matrix, i.e. for smaller values of $\bar{n}_T$. \section{Conclusions and Discussion} \label{conclusion} This work generalizes one of the most important archetype of quantum interferometry -- namely, the single MZI with coherent$\otimes$squeezed-vacuum light~\cite{CavesPRD1981,ParisPLA1995, BarnettEPJD2003, PezzePRL2008, LangPRL2013, Ruo-BercheraPRA2015, SparaciariPRA2016} -- to a distributed sensor network composed by $d$ MZIs, see Fig. \ref{fig1}(a). The multiphase estimation analysis is based on a method of moments requiring local and independent photocounting at the output of each MZI. This avoids to recombine the phase-shifted modes using a second multimode beam splitter~\cite{TriggianiARXIV, OhPRR2020, GePRL2018}. The scheme is thus optimal to realize a highly spatially-separated sensor using a multimode entangled state of a large number of particles. In particular, our MZI sensor network is characterized by different regimes reaching $\Delta^2 (\vect{v} \cdot \vect{\theta})_{\rm emom} = O(\bar{n}_T^{-3/2})$ and the Heisenberg scaling $\Delta^2 (\vect{v} \cdot \vect{\theta})_{\rm emom} = O(\bar{n}_T^{-2})$. The manuscript is focused on two different problems: i) We have optimized the full Mach-Zehnder sensor network in order to minimize the uncertainty, $\Delta^2 (\vect{v} \cdot \vect{\theta})$, for the estimation of an {\it arbitrary} fixed linear combination of phase shifts $\vect{v} \cdot \vect{\theta}$. Studying the cases $d=2$ and $d=3$, we have shown that the optimized parallel strategy, exploiting the mode entanglement generated by the linear multimode splitting is never surpassed by an optimized sequential strategy using mode-separable squeezed-vacuum states, when considering different constraints. For any number of parameters, the maximum gain of the parallel over the sequential strategy is a factor $d$, for the estimation of the generalized average phase $\vect{v}_{\rm ave} \cdot \vect{\theta} = \sum_{j=1}^d \pm \theta_j/d$. While the literature on distributed quantum sensing has mainly focused on the estimation of specific linear combinations of different parameters, the possibility to optimize the sensor network for the estimation of any desired $\vect{v}\cdot \vect{\theta}$, as shown here, is generally highly desirable. This possibility has only been shown in the configurable multimode displacement sensor of Ref.~\cite{XiaPRL2020} and for multipass phase sensing~\cite{GebhartARXIV} using a photonic Bell state~\cite{ZhaoPRX2021}. Further configurable approaches include the splitting and multimode recombination of squeezed-vacuum light~\cite{TriggianiARXIV} and twin-Fock states~\cite{GePRL2018}. In our case, the optimized sensing scheme uses local measurements and avoids the recombination of the states in a second quantum circuit. ii) For arbitrary unitary splitting the squeezed vacuum state, we have identified optimal linear combinations of the $d$ phases that minimize the uncertainty $\Delta^2(\vect{v} \cdot \vect{\theta})$. Typical results and scalings with the total average number of particles $\bar{n}_T$ hold regardless the random choice of unitary QC transformation. A further interesting problems raised in the context of multiparameter estimation is whether a single sensor network allows the estimation of multiple linear combination of phases at the same time \cite{RubioJPA2020}. This problem is solved here by changing the mode $D$ of the QC where the squeezed vacuum state is injected, see Fig.~\ref{fig1}(a). Indeed, a single $d$-mode QC can be optimized to estimate $d$ different (e.g. orthogonal) linear combinations $\vect{v}_D \cdot \vect{\theta}$ (with $D=1, ..., d$ and $\vect{v}_i \cdot \vect{v}_j = \delta_{ij}$) with the same sensitivity: each input mode $D$ of the QC corresponds to a specific optimal $\vect{v}_D \cdot \vect{\theta}$. It is also worth comparing here directly with the results of Ref.~\cite{XiaPRL2020} that considered a sensor network based on the linear splitting of a squeezed-vacuum state, displacement operations and homodyne measurements on each output mode. It should be noticed that displacement sensing and phase sensing using a network of MZIs (as considered here) corresponds, in general, different parameter-encoding transformations. A precise mapping is obtained within a (mean-field) Holstein-Primakof approximation, where the mode operator $\hat{a}_j$, see Fig.~\ref{fig1}, is replaced by the classical number $\vert \alpha_j \vert$. In this case, the $j$th Mach-Zehnder transformation $e^{-\theta_j (\hat{a}^\dag_j \hat{b}_j - \hat{b}_j^\dag \hat{a}_j)/2}$ reduces to the single-mode displacement operator $\hat{D}(q_j)$ with $q_j = \vert \alpha_j \vert /2$. Our results predict $\Delta^2 (\vect{v} \cdot \vect{q})_{\rm eQCR} = \Delta^2 (\vect{v} \cdot \vect{\theta})_{\rm eQCR} \times \bar{n}_c/4 = e^{-2r}/4$ for $\vert \alpha_j \vert^2 = \bar{n}_c$, in agreement with Refs.~\cite{XiaPRL2020, ZhuangPRA2018}. Yet, while the phase uncertainty is characterized by a convenient scaling with $\bar{n}_T$, $\Delta^2 (\vect{v} \cdot \vect{\theta})_{\rm eQCR} = e^{-2r}/\sqrt{\bar{n}_T}$, the displacement uncertainty does not scale with $\bar{n}_T$. In this regime, the quantum Cramer-Rao bound is saturated by the estimation strategy based on the multiparameter method of moments \cite{GessnerNATCOMM2020} based on local photodetection. Furthermore, our formalism allows to go beyond the homodyne limit of Refs.~\cite{XiaPRL2020,ZhuangPRA2018} and discuss the phase sensitivity of a network of MZIs with respect to the total number of particles $\bar{n}_T$ used: this is crucial to discuss scalings of phase variance that are faster than $O(1/\bar{n}_T)$. The results of this work are relevant in current experiments realizing squeezed vacuum-light and multimode linear splitting transformations~\cite{GuoNATPHYS2020, XiaPRL2020, NokkalaNJP2018}. They pave the way to sensor networks using multiple MZIs -- in both optical and atomic systems -- with a large variety of applications ranging from field and biological sensing, gravitational wave detection, quantum clocks and inertial measurements. \begin{widetext} \section{Appendix} \subsection{Detailed derivation of Eqs. (\ref{MOM}) and (\ref{QFIM})} In this Appendix, we provide details on the derivation of Eqs.~(\ref{MOM}) and~(\ref{QFIM}). Our methods are based on a technique to calculate the QFIM that was outlined in Ref.~\cite{GagatsosPRA2016}. It should be noticed, however, that Ref.~\cite{GagatsosPRA2016} considered a different sensor network configuration: the generalization to a network of MZIs is not straightforward and requires additional algebraic work. Furthermore, our derivation corrects some flaws which are present in Ref.~\cite{GagatsosPRA2016} and that led to an incorrect final expression (see discussion below). Alternative approaches to calculate the QFIM of Gaussian states have been also considered, see Refs.~\cite{JiangPRA2014, BanchiPRL2015, NicholsPRA2018, OhPRR2020}. \subsubsection{Preliminary definitions} We consider the general case where a product of $d'$ single-mode squeezed states is sent to a passive linear network $\hat{A}^{\dagger}$ and transformed according to \begin{equation} \label{general_initial_state} \ket{\Psi}=\hat{A}^{\dagger}\bigotimes_{k=1}^{d'}\ket{\beta_k,\xi_k}. \end{equation} Here, $\ket{\beta_k,\xi_k}$ is the single-mode displaced-squeezed state in the mode $k$: $\beta_k$ is the coherent amplitude of the state and $\xi_k=r_k e^{i\varphi_k}$ its squeeze parameter. In the following, we will assume that $\hat{A}^{\dagger}$ is a Gaussian unitary, that is, a unitary operator which transforms Gaussian states into Gaussian states. Because $\hat{A}^{\dagger}$ is also a passive, i.e. particle-number preserving, transformation, if we set $\hat{\vect{c}}=(\hat{c}_1,\dots,\hat{c}_{d'})^T$, a relation $\hat{A}\hat{\vect{c}}\hat{A}^{\dagger}=\hat{\vect{c}}'=\vect{\mathcal{A}}\hat{\vect{c}}$ must hold, with $\vect{\mathcal{A}}$ a unitary matrix (similarly, $\hat{A} \hat{\vect{c}}^\dag \hat{A}^{\dagger} =\vect{\mathcal{A}}^*\hat{\vect{c}}^\dag$). Here, $\hat{c}^{\dagger}_k$ and $\hat{c}_k$ are bosonic creation and annihilation operators, respectively, We recall the definition of the Q-function for the state $\ket{\Phi}$ of a generic $d'$-mode system: \begin{equation} Q(\vect{\alpha})=\frac{\vert \langle \vect{\alpha} \vert \Phi \rangle \vert^2}{\pi}, \end{equation} where $\ket{\vect{\alpha}}=\bigotimes_{k=1}^{d'}\ket{\alpha_k}$, $\ket{\alpha_k}$ being an arbitrary single-mode coherent state in mode $k$. From the point of view of the Q-function, a transformation $\hat{A}^{\dagger}\ket{\Phi}$ is equivalent to a transformation $\hat{A}\ket{\vect{\alpha}}$ of the coherent states; moreover, it is a well know property that a Gaussian passive transformation $\hat{A}$ sends a product of coherent states into another product of coherent states, in particular: $\hat{A}\ket{\vect{\alpha}}=\ket{\vect{\alpha}'}=\ket{\vect{A}\vect{\alpha}}$. As the notation just used suggests, and according to Ref. \cite{GagatsosPRA2016}, $\vect{A}$ is the matrix that implements the transformation $\vect{\alpha}'=\vect{A}\vect{\alpha}$ of the amplitudes of the coherent states associated with the Q-function. It is possible to show that this matrix is the same as the one which describes the transformation of the annihilation operators implemented by $\hat{A}$, that is $\hat{A}^{\dagger}\hspace{0.1cm}\vect{\hat{c}}\hspace{0.1cm}\hat{A}=\vect{\hat{c}}'=\vect{A}\vect{\hat{c}}$, and, correspondingly, the hermitian conjugate of the matrix which describes the transformation of the annihilation operators implemented by $\hat{A}^{\dagger}$, which we have denoted as $\vect{\mathcal{A}}$ above. The relation $\vect{\mathcal{A}}^{\dagger}=\vect{A}$ will be frequently used in what follows. Using the Q-function representation of the states, \makeref{general_initial_state}, Ref. \cite{GagatsosPRA2016} showed that \begin{align} \langle \hat{n}_i \rangle&=-1+\partial_i\partial_i^*G(\vect{\mu})\Bigr\rvert_{\vect{\mu} = 0},\label{ni_general}\\ \langle \hat{n}_i\hat{n}_j \rangle&=\left[\partial_i\partial_i^*\partial_j\partial_j^*-(1+\delta_{ij})\partial_i\partial_i^*-\partial_j\partial_j^*\right]G(\vect{\mu})\Bigr\rvert_{\vect{\mu} = 0}+1,\label{ninj_general} \end{align} where $\vect{\mu}=(\lambda_1,\dots,\lambda_{d'},\lambda_1^*,\dots,\lambda_{d'}^*)^T$ is an arbitrary $2d'$-dimensional complex vector, $\partial_i$, $\partial_i^*$ are shorthand notation for $\partial/\partial \lambda_i$, $\partial/\partial \lambda_i^*$, $\hat{n}_i=\hat{c}^{\dagger}_i\hat{c}_i$ and the expectation values are evaluated in state $\ket{\Psi}$. We have $G(\vect{\mu})=e^{\Delta}$, where \begin{equation} \label{Delta} \Delta \equiv \displaystyle\frac{1}{4}\left(\vect{\nu_b}^{\dagger}\vect{M}^{-1}\vect{\mu}+\vect{\mu}^{\dagger}\vect{M}^{-1}\vect{\nu_b}+\vect{\mu}^{\dagger}\vect{M}^{-1}\vect{\mu}\right), \end{equation} \begin{equation} \vect{\nu_b}=(b_1,\dots,b_{d'},b_1^*,\dots,b_{d'}^*)^T, \end{equation} \begin{equation} b_j=\sum_k \vect{A}^{\dagger}_{jk}(\beta_k+\beta_k^*e^{i\varphi_k}\tanh{r_k}), \end{equation} \begin{equation} \vect{M}^{-1}=2\begin{pmatrix} \vect{E}&-\vect{NE}^T \\ -\vect{N}^{\dagger}\vect{E}&\vect{E}^T \end{pmatrix}, \label{M-1} \end{equation} \begin{equation}\label{N} \vect{N}=\vect{A}^{\dagger}\vect{D}\vect{A}^*, \end{equation} \begin{equation}\label{E} \vect{E}=\vect{A}^{\dagger}\vect{C}\vect{A}, \end{equation} \begin{equation}\label{C} \vect{C}_{jk}=\delta_{jk}\cosh^2 r_k, \end{equation} and \begin{equation}\label{D} \vect{D}_{jk}=\delta_{jk}e^{i\varphi_k}\tanh{r_k}. \end{equation} Using Eq. (\ref{M-1}), we find \begin{align} \Delta=\frac{1}{4}\left[\begin{pmatrix}\vect{b}^*&\vect{b}\end{pmatrix}\cdot2\begin{pmatrix} \vect{E}&-\vect{NE}^T \\ -\vect{N}^{\dagger}\vect{E}&\vect{E}^T \end{pmatrix}\begin{pmatrix}\vect{\lambda}\\ \vect{\lambda}^*\end{pmatrix}+\begin{pmatrix}\vect{\lambda}^*&\vect{\lambda}\end{pmatrix}\cdot2\begin{pmatrix} \vect{E}&-\vect{NE}^T \\ -\vect{N}^{\dagger}\vect{E}&\vect{E}^T \end{pmatrix}\begin{pmatrix}\vect{b}\\ \vect{b}^*\end{pmatrix} +\begin{pmatrix}\vect{\lambda}^*&\vect{\lambda}\end{pmatrix}\cdot2\begin{pmatrix} \vect{E}&-\vect{NE}^T \\ -\vect{N}^{\dagger}\vect{E}&\vect{E}^T \end{pmatrix}\begin{pmatrix}\vect{\lambda}\\ \vect{\lambda}^*\end{pmatrix}\right], \nonumber \end{align} which we can write more explicitly as \begin{align} \Delta &=\frac{1}{2}\left[\vect{b}^*\cdot\left(\vect{E}\vect{\lambda}-\vect{NE}^T\vect{\lambda}^*\right)+\vect{b}\cdot\left(-\vect{N}^{\dagger}\vect{E}\vect{\lambda}+\vect{E}^T\vect{\lambda}^*\right)+\vect{\lambda}^*\cdot\left(\vect{E}\vect{b}-\vect{NE}^T\vect{b}^*\right)+\vect{\lambda}\cdot\left(-\vect{N}^{\dagger}\vect{E}\vect{b}+\vect{E}^T\vect{b}^*\right)\right. \nonumber\\ &\left.\qquad+\vect{\lambda}^*\cdot\left(\vect{E}\vect{\lambda}-\vect{NE}^T\vect{\lambda}^*\right)+\vect{\lambda}\cdot\left(-\vect{N}^{\dagger}\vect{E}\vect{\lambda}+\vect{E}^T\vect{\lambda}^*\right)\right]. \nonumber \end{align} We then calculate the first and second partial derivatives of $\Delta$ with respect to $\lambda_i$ and $\lambda_i^*$: \begin{align} &\begin{aligned}[b]\partial_i\Delta &=\frac{1}{2}\sum_k\left[-\left(\left(\vect{N}^{\dagger}\vect{E}\right)_{ik}+\left(\vect{N}^{\dagger}\vect{E}\right)_{ki}\right)(\vect{\lambda}_k+\vect{b}_k)+2\vect{E}_{ki}(\vect{\lambda}_k^*+\vect{b}_k^*)\right]=\sum_k \vect{E}^*_{ik}(\vect{\lambda}_k^*+\vect{b}_k^*)-(\vect{EN})^*(\vect{\lambda}_k+\vect{b}_k),\end{aligned}\label{Deltaderivative}\\ &\begin{aligned}[b]\partial_i^*\Delta &=\frac{1}{2}\sum_k\left[2\vect{E}_{ik}(\vect{\lambda}_k+\vect{b}_k)-\left(\left(\vect{NE}^T\right)_{ik}+\left(\vect{NE}^T\right)_{ki}\right)(\vect{\lambda}_k^*+\vect{b}_k^*)\right]=\sum_k \vect{E}_{ik}(\vect{\lambda}_k+\vect{b}_k)-(\vect{EN})(\vect{\lambda}_k^*+\vect{b}_k^*),\end{aligned}\label{complex_Deltaderivative}\\ &\partial_i^*\partial_j\Delta=\vect{E}_{ij},\\ &\partial_i\partial_j^*\Delta=\vect{E}_{ji}=\vect{E}^*_{ij},\\ &\partial_i^*\partial_j^*\Delta=-\frac{1}{2}\left(\left(\vect{NE}^T\right)_{ij}+\left(\vect{NE}^T\right)_{ji}\right)=-(\vect{EN})_{ij},\\ &\partial_i\partial_j\Delta=-\frac{1}{2}\left(\left(\vect{N}^{\dagger}\vect{E}\right)_{ij}+\left(\vect{N}^{\dagger}\vect{E}\right)_{ji}\right)=-(\vect{EN})^*_{ij}. \end{align} To derive the above equations, we have used the following relations: \begin{align} &\vect{E}=\vect{E}^{\dagger} \implies \vect{E}^T=\vect{E}^*, \nonumber \\ &\vect{N}=\vect{N}^{T} \implies \vect{N}^{\dagger}=\vect{N}^*, \nonumber \\ &(\vect{EN})^T=\vect{EN}, \nonumber \\ &\vect{NE}^T=(\vect{EN})^T=\vect{EN}, \nonumber \\ &\vect{N}^{\dagger}\vect{E}=(\vect{EN})^{\dagger}=\left((\vect{EN})^T\right)^*=(\vect{EN})^*. \nonumber \end{align} We are now ready to work out the partial derivatives of $G(\vect{\mu})$ that appear in Eqs. \makeref{ni_general} and \makeref{ninj_general}: \begin{align} \partial_i\partial_i^*G(\vect{\mu} =(\partial_i\partial_i^*\Delta)e^{\Delta}+(\partial_i\Delta)(\partial_i^*\Delta)e^{\Delta}=\left(\vect{E}_{ii}+(\partial_i\Delta)(\partial_i^*\Delta)\right)e^{\Delta}, \nonumber \end{align} and \begin{align} \partial_i\partial_i^*\partial_j\partial_j^*G(\vect{\mu} =&\partial_i\left[\left(\vect{E}_{jj}+(\partial_j\Delta)(\partial_j^*\Delta)\right)(\partial_i^*\Delta)e^{\Delta}+\left((\partial_i^*\partial_j\Delta)(\partial_j^*\Delta)+(\partial_j\Delta)(\partial_i^*\partial_j^*\Delta)\right)e^{\Delta}\right] \nonumber \\ =&\left[(\vect{EN})_{ij}(\vect{EN})^*_{ij}-(\vect{EN})^*_{ij}(\partial_i^*\Delta)(\partial_j^*\Delta)-(\vect{EN})_{ij}(\partial_i\Delta)(\partial_j\Delta)+\vect{E}_{ij}\vect{E}^*_{ij}+\vect{E}_{ij}(\partial_i\Delta)(\partial_j^*\Delta)+\vect{E}^*_{ij}(\partial_i^*\Delta)(\partial_j\Delta)\right.\nonumber\\ &\left.+\left(\vect{E}_{ii}+(\partial_i\Delta)(\partial_i^*\Delta)\right)\left(\vect{E}_{jj}+(\partial_j\Delta)(\partial_j^*\Delta)\right)\right]e^{\Delta}. \nonumber \end{align} By evaluating the derivatives at $\vect{\mu}=0$, we get \begin{equation} \partial_i\partial_i^*G(\vect{\mu})\Bigr\rvert_{\vect{\mu} = 0}=\vect{E}_{ii}+(\partial_i\Delta)_0(\partial_i^*\Delta)_0, \nonumber \end{equation} where $(\partial_i\Delta)_0$ is shorthand notation for $(\partial_i\Delta)\bigr\rvert_{\vect{\mu} = 0}$, and \begin{align} \partial_i\partial_i^*\partial_j\partial_j^*G(\vect{\mu})\Bigr\rvert_{\vect{\mu}=0}=&(\vect{EN})_{ij}(\vect{EN})^*_{ij}-(\vect{EN})^*_{ij}(\partial_i^*\Delta)_0(\partial_j^*\Delta)_0-(\vect{EN})_{ij}(\partial_i\Delta)_0(\partial_j\Delta)_0+\vect{E}_{ij}\vect{E}^*_{ij}+\vect{E}_{ij}(\partial_i\Delta)_0(\partial_j^*\Delta)_0+\vect{E}^*_{ij}(\partial_i^*\Delta)_0(\partial_j\Delta)_0\nonumber\\ &+\left(\vect{E}_{ii}+(\partial_i\Delta)_0(\partial_i^*\Delta)_0\right)\left(\vect{E}_{jj}+(\partial_j\Delta)_0(\partial_j^*\Delta)_0\right). \nonumber \end{align} Finally, going back to Eqs. \makeref{ni_general} and \makeref{ninj_general}, we get \begin{align} \langle \hat{n}_i \rangle=-1+\partial_i\partial_i^*G(\vect{\mu})\Bigr\rvert_{\vect{\mu} = 0} =-1+\vect{E}_{ii}+(\partial_i\Delta)_0(\partial_i^*\Delta)_0 \label{ni} \end{align} and \begin{align} \langle \hat{n}_i\hat{n}_j \rangle=&\left[\partial_i\partial_i^*\partial_j\partial_j^*-(1+\delta_{ij})\partial_i\partial_i^*-\partial_j\partial_j^*\right]G(\vect{\mu})\Bigr\rvert_{\vect{\mu}=0}+1 \nonumber\\ =&\partial_i\partial_i^*\partial_j\partial_j^*G(\vect{\mu})\Bigr\rvert_{\vect{\mu} = 0}-(1+\delta_{ij})(\langle \hat{n}_i \rangle+1)-(\langle \hat{n}_j \rangle+1)+1 \nonumber \\ =&(\vect{EN})_{ij}(\vect{EN})^*_{ij}-(\vect{EN})^*_{ij}(\partial_i^*\Delta)_0(\partial_j^*\Delta)_0-(\vect{EN})_{ij}(\partial_i\Delta)_0(\partial_j\Delta)_0+\vect{E}_{ij}\vect{E}^*_{ij}+\vect{E}_{ij}(\partial_i\Delta)_0(\partial_j^*\Delta)_0+\vect{E}^*_{ij}(\partial_i^*\Delta)_0(\partial_j\Delta)_0\nonumber\\ &+\langle \hat{n}_i \rangle \langle \hat{n}_j \rangle-\delta_{ij}\left(\vect{E}_{ii}+(\partial_i\Delta)_0(\partial_i^*\Delta)_0\right).\label{ninj_intermediate} \end{align} At this point, we introduce the $d'\times d'$ matrix $\vect{h}$, with elements \begin{equation} \vect{h}_{ij}=\langle \hat{n}_i\hat{n}_j \rangle-\langle \hat{n}_i \rangle \langle \hat{n}_j \rangle,\label{hij_general} \end{equation} whose expression, taking into account the above equations for $\langle \hat{n}_i \rangle$ and $\langle \hat{n}_i\hat{n}_j \rangle$, can be immediately derived: \begin{align} \vect{h}_{ij}=&(\vect{EN})_{ij}(\vect{EN})^*_{ij}-(\vect{EN})^*_{ij}(\partial_i^*\Delta)_0(\partial_j^*\Delta)_0-(\vect{EN})_{ij}(\partial_i\Delta)_0(\partial_j\Delta)_0+\vect{E}_{ij}\vect{E}^*_{ij}+\vect{E}_{ij}(\partial_i\Delta)_0(\partial_j^*\Delta)_0+\vect{E}^*_{ij}(\partial_i^*\Delta)_0(\partial_j\Delta)_0\nonumber\\ &-\delta_{ij}\left(\vect{E}_{ii}+(\partial_i\Delta)_0(\partial_i^*\Delta)_0\right). \nonumber \end{align} This equation can be rewritten in a compact form by introducing the vector \begin{equation} \vect{\gamma}_i\equiv(\partial_i\Delta)_0. \nonumber\\ \end{equation} Notice that $(\gamma_i)^* = (\partial_i^*\Delta)_0$. From Eqs. \makeref{Deltaderivative} and \makeref{complex_Deltaderivative}, we get $\vect{\gamma}_i=\sum_k \vect{E}^*_{ik}b_k^*-(\vect{EN})^*_{ik}b_k$, namely $\vect{\gamma}=\vect{E}^*\vect{b}^*-(\vect{EN})^*\vect{b}$. Finally, making use of vector $\vect{\gamma}$, and of the Hadamard entrywise product $\circ$, we can rewrite $\vect{h}$ in the compact form: \begin{align} \vect{h} =&\vect{EN}\circ (\vect{EN})^*-\vect{EN}\circ\vect{\gamma}\vect{\gamma}^T-(\vect{EN})^*\circ\left(\vect{\gamma}\vect{\gamma}^T\right)^*+\vect{E}\circ \vect{E}^*+\vect{E}\circ\vect{\gamma}\vect{\gamma}^{\dagger}+\vect{E}^*\circ\left(\vect{\gamma}\vect{\gamma}^{\dagger}\right)^*-\left(\vect{E}+\vect{\gamma}\vect{\gamma}^{\dagger}\right)\circ\vect{I}.\label{hij_final} \end{align} It is evident that matrix $\vect{h}$ is real and symmetric. An expression similar to Eq. (\ref{hij_final}) was derived in Ref. \cite{GagatsosPRA2016}, see Eq. (14) in that reference. There are however important differences with respect to Eq. (\ref{hij_final}) due to flaws in the derivation reported in Ref.~\cite{GagatsosPRA2016}. \subsubsection{Quantum Fisher information matrix, Eq. (\ref{QFIM})} Using Eq. \makeref{hij_final}, we now show how to express the QFIM in terms of the matrices $\vect{E}$, $\vect{EN}$, etc., which were introduced in the previous paragraph and will here be evaluated for the specific case of the Mach-Zehnder sensor network of Fig.~\ref{fig1}. In our sensing scheme, the initial state is given by \begin{equation} \ket{\Psi_{\rm in}}=\left(\ket{\alpha_1}\otimes\dots\otimes \ket{\alpha_d}\right)\otimes\left(\ket{0}\otimes\dots\otimes\ket{\xi}\otimes\dots\otimes\ket{0}\right). \nonumber \end{equation} It is a product state of coherent states in modes $a_1, ..., a_d$, a squeezed-vacuum state $\ket{\xi}$ in mode $(b_{\rm in})_D$ and the vacuum $\ket{0}$ in modes $(b_{\rm in})_j$ for $j=1, ..., d$ and $j\neq D$. This initial state should be compared with the product state in Eq. \makeref{general_initial_state}. In order to facilitate the identification of the two cases, we can set $\hat{a}_j\equiv \hat{c}_j$ and $(\hat{b}_{\rm in})_j\equiv \hat{c}_{j+d}$ $(j=1,\dots,d)$, thus introducing a more homogeneous notation valid for all of the $2d=d'$ input modes of the sensing apparatus. We then identify the $2d \times 2d$ unitary matrix corresponding to the mode transformation performed by the QC as \begin{equation} \vect{U}_{\rm QC}^\dag =\begin{pmatrix}\vect{I}_d&0\\0&\vect{U}^{\dagger} \end{pmatrix}\label{U_NET}. \nonumber \end{equation} The $d\times d$ identity matrix $\vect{I}_d$ describes the action of the QC on the coherent states, while $\hat{b}_j=\sum_k (\vect{U}^{\dagger})_{jk}(\hat{b}_{\rm in})_k$ $(j=1,\dots,d)$, $\vect{U}^{\dagger}$ being a unitary $d\times d$ matrix. We denote as $\ket{\Psi_0}$ the output state of the QC: $\ket{\Psi_0}=\hat{U}_{\rm QC}^{\dagger}\ket{\Psi_{\rm in}}$. The phases $\theta_1, \dots, \theta_d$ to be estimated are encoded in $\ket{\Psi_0}$ through the unitary transformation $\otimes_{j=1}^d e^{-i \theta_j(\hat{J}_y)_j}$, where the transformation $e^{-i \theta_j(\hat{J}_y)_j}$ identifies the $j$th MZI in the network, with $\hat{H}_j = (\hat{J}_y)_j = (\hat{a}_j^\dag \hat{b}_j - \hat{b}_j^\dag \hat{a}_j)/2i$. This is equivalent to the phases being encoded in the state $\ket{\Psi}=\otimes_{j=1}^d e^{-i\frac{\pi}{2}(\hat{J}_x)_j}\ket{\Psi_0}$, where $(\hat{J}_x)_j = (\hat{a}_j^\dag \hat{b}_j + \hat{b}_j^\dag \hat{a}_j)/2$, through the unitary transformation $\otimes_{j=1}^d e^{-i \theta_j(\hat{J}_z)_j}$, with $(\hat{J}_z)_j = (\hat{a}_j^\dag \hat{a}_j - \hat{b}_j^\dag \hat{b}_j)/2$. This alternative formulation is more convenient here. Overall, $\ket{\Psi}$ can be expressed as \begin{equation} \ket{\Psi}=\left(\otimes_{j=1}^d e^{-i\frac{\pi}{2}(\hat{J}_x)_j}\right)\hat{U}^{\dagger}_{\rm QC}\ket{\Psi_{\rm in}}. \nonumber \end{equation} This equation should be compared with Eq. \makeref{general_initial_state}: the identification $\hat{A}^{\dagger}=(\otimes_{j=1}^d e^{-i\frac{\pi}{2}(\hat{J}_x)_j})\hat{U}^{\dagger}_{\rm QC}$ is straightforward. The action of $\hat{A}^{\dagger}$ on the annihilation operators of the input modes can be represented by the relation $\hat{c}_j'=\sum_k \vect{\mathcal{A}}_{jk}\hat{c}_k$ ($j=1,\dots,2d$) with \begin{align} \vect{\mathcal{A}}=&\frac{1}{\sqrt{2}}\begin{pmatrix}\vect{I}_d&-i\vect{I}_d\\-i\vect{I}_d&\vect{I}_d\end{pmatrix}\begin{pmatrix}\vect{I}_d&0\\0&\vect{U}^{\dagger}\end{pmatrix}=\frac{1}{\sqrt{2}}\begin{pmatrix}\vect{I}_d&-i\vect{U}^{\dagger}\\-i\vect{I}_d&\vect{U}^{\dagger}\end{pmatrix}.\label{network} \end{align} Notice that the matrix $\frac{1}{\sqrt{2}}\begin{pmatrix}\vect{I}_d&-i\vect{I}_d\\-i\vect{I}_d&\vect{I}_d\end{pmatrix}$ in the product above describes an array of balanced beam splitters working in parallel, corresponding to $\otimes_{j=1}^d e^{-i\frac{\pi}{2}(\hat{J}_x)_j}$. Under the hypotheses of a pure state $\ket{\Psi}$ for the system and of a phase-imprinting transformation of the form $\otimes_{j=1}^d e^{-i \theta_j(\hat{J}_z)_j}$ (see above), the QFIM is given by \begin{equation} \left(\vect{\mathcal{F}_{\rm Q}}\right)_{ij} = 4\left(\langle\Psi\vert(\hat{J}_z)_i (\hat{J}_z)_j\ket{\Psi}-\langle\Psi\vert(\hat{J}_z)_i \ket{\Psi}\langle\Psi\vert(\hat{J}_z)_j\ket{\Psi}\right) \hspace{0.5cm} (i,j=1,\dots,d). \nonumber \end{equation} Since $(\hat{J}_z)_j = (\hat{a}_j^{\dagger} \hat{a}_j - \hat{b}_j^{\dagger} \hat{b}_j)/2=(\hat{c}_j^{\dagger} \hat{c}_j-\hat{c}_{j+d}^{\dagger} \hat{c}_{j+d})/2=(\hat{n}_j-\hat{n}_{j+d})/2$, after simple calculations we get to express $\left(\vect{\mathcal{F}_{\rm Q}}\right)_{ij}$ as \begin{equation} \left(\vect{\mathcal{F}_{\rm Q}}\right)_{ij} = \vect{h}_{i,j} + \vect{h}_{i+d,j+d} - \vect{h}_{i,j+d} - \vect{h}_{i+d, j}, \hspace{0.5cm} (i,j=1,\dots,d)\label{QFIM_hij} \end{equation} where the expression of $\vect{h}_{ij}$, $\vect{h}_{ij}=\langle \Psi \vert \hat{n}_i\hat{n}_j \ket{ \Psi } - \langle \Psi \vert \hat{n}_i \ket{ \Psi }\langle \Psi \vert \hat{n}_j \ket{ \Psi }$, is exactly the one already given in Eq. \makeref{hij_general}. Notice that $\vect{\mathcal{F}_{\rm Q}}$ is a $d\times d$ matrix, whose elements, according to Eq. \makeref{QFIM_hij}, can be obtained as combinations of the elements of $\vect{h}$, a $2d\times 2d$ matrix. Equation \makeref{hij_final} from the previous paragraph expresses $\vect{h}$ in terms of the two matrices $\vect{E}$ and $\vect{EN}$ and the vector $\vect{\gamma}$. The two matrices are derived by referring to Eqs. from \makeref{N} to \makeref{D}. In particular, from Eqs. \makeref{C} and \makeref{D} we get {\begin{align} \vect{C}=\begin{pmatrix}\vect{I}_d&0\\0&\vect{C}_1\end{pmatrix},\label{C_QFIM} \end{align}} and {\begin{align} \vect{CD}=\begin{pmatrix}0&0\\0&\vect{C}_1\vect{D}_1\end{pmatrix}.\label{CD_QFIM} \end{align}} In the above equations, $\vect{C_1}$ and $\vect{C_1D_1}$ are $d \times d$ matrices with elements \begin{equation} (\vect{C_1})_{ij}=\delta_{ij}\left[\left(1-\delta_{Dj}\right)+\delta_{Dj}c^2\right],\label{C1} \end{equation} and \begin{equation} (\vect{C_1D_1})_{ij}=\delta_{ij}\delta_{Dj}e^{i\varphi}sc,\label{C1D1} \end{equation} respectively, where $D$ is the index of the input port into which $\ket{\xi}$ is injected, and $s \equiv \sinh{r}$, $c \equiv \cosh{r}$ (these shortcuts will be repeatedly used below). On account of Eqs. \makeref{N}, \makeref{E} and \makeref{network} and recalling the fundamental relation $\vect{A}=\vect{\mathcal{A}}^{\dagger}$ discussed above, we have ($\vect{U}\equiv \vect{A_1}$ in the following) \begin{align} \vect{E}=&\vect{A}^{\dagger}\vect{C}\vect{A}=\frac{1}{2}\begin{pmatrix}\vect{I}_d+\vect{E_1}&i(\vect{I}_d-\vect{E_1})\\-i(\vect{I}_d-\vect{E_1})&\vect{I}_d+\vect{E_1}\end{pmatrix}, \nonumber \end{align} with $\vect{E_1}=\vect{A_1}^{\dagger}\vect{C_1}\vect{A_1}$, and \begin{align} \vect{EN}=&\vect{A}^{\dagger}\vect{CD}\vect{A}^*=\frac{1}{2}\begin{pmatrix}-\vect{E_1N_1}&-i\vect{E_1N_1}\\-i\vect{E_1N_1}&\vect{E_1N_1}\end{pmatrix}, \nonumber \end{align} with $\vect{E_1N_1}=\vect{A_1}^{\dagger}\vect{C_1D_1}\vect{A_1}^*$. It is not difficult to see that, when none of the input modes is in a state $\ket{\beta,\xi}$ with both $\beta \neq 0$ and $\xi \neq 0$ -- that is, each mode is either in a coherent or in a squeezed vacuum state -- the expression of $\vect{\gamma}$ can be simplified as $\vect{\gamma}=\vect{b}^*$. Indeed, if that is the case, then $\vect{E}^*\vect{b}^*=\vect{b}^*$ and $(\vect{EN})^*\vect{b}=0$. In such case one also has $\vect{b}=\vect{A}^{\dagger}\vect{\beta}$ and $\vect{\beta}=(\vect{\beta_0}\hspace{0.1cm}0)^T$, with \begin{align} \vect{\beta_0}=\begin{pmatrix}\alpha_1\\\vdots\\\alpha_d\end{pmatrix}=\begin{pmatrix}|\alpha_1|e^{i\phi_1}\\\vdots\\|\alpha_d|e^{i\phi_d}\end{pmatrix}. \nonumber \end{align} Thus, one finds \begin{align} \vect{\gamma}=\frac{1}{\sqrt{2}}\begin{pmatrix}\vect{\beta_0}^*\\i\vect{\beta_0}^*\end{pmatrix}=\frac{1}{\sqrt{2}}\begin{pmatrix}\vect{\gamma_0}\\i\vect{\gamma_0}\end{pmatrix}, \nonumber \end{align} where the symbol $\vect{\gamma_0} \equiv \vect{\beta_0}^*$ was introduced. We are interested in the following combinations of $\vect{\gamma}$: {\begin{equation} \vect{\gamma}\vect{\gamma}^T=\frac{1}{2}\begin{pmatrix}\vect{\gamma_0}\vect{\gamma_0}^T&i\vect{\gamma_0}\vect{\gamma_0}^T\\i\vect{\gamma_0}\vect{\gamma_0}^T&-\vect{\gamma_0}\vect{\gamma_0}^T\end{pmatrix}, \nonumber \end{equation}} and {\begin{equation} \vect{\gamma}\vect{\gamma}^{\dagger}=\frac{1}{2}\begin{pmatrix}\vect{\gamma_0}\vect{\gamma_0}^{\dagger}&-i\vect{\gamma_0}\vect{\gamma_0}^{\dagger}\\i\vect{\gamma_0}\vect{\gamma_0}^{\dagger}&\vect{\gamma_0}\vect{\gamma_0}^{\dagger}\end{pmatrix}, \nonumber \end{equation}} where \begin{align} \vect{\gamma_0}\vect{\gamma_0}^T=&\begin{pmatrix}|\alpha_1|^2e^{-2i\phi_1}&|\alpha_1||\alpha_2|e^{-i(\phi_1+\phi_2)}&\hdots&|\alpha_1||\alpha_d|e^{-i(\phi_1+\phi_d)}\\ |\alpha_2||\alpha_1|e^{-i(\phi_2+\phi_1)}&|\alpha_2|^2e^{-2i\phi_2}&\hdots&|\alpha_2||\alpha_d|e^{-i(\phi_2+\phi_d)}\\ \vdots&\vdots&&\vdots\\ |\alpha_d||\alpha_1|e^{-i(\phi_d+\phi_1)}&|\alpha_d||\alpha_2|e^{-i(\phi_d+\phi_2)}&\hdots&|\alpha_d|^2e^{-2i\phi_d}\end{pmatrix}\equiv\vect{\phi_+}, \nonumber \end{align} and \begin{align} \vect{\gamma_0}\vect{\gamma_0}^{\dagger}=&\begin{pmatrix}|\alpha_1|^2&|\alpha_1||\alpha_2|e^{-i(\phi_1-\phi_2)}&\hdots&|\alpha_1||\alpha_d|e^{-i(\phi_1-\phi_d)}\\ |\alpha_2||\alpha_1|e^{-i(\phi_2-\phi_1)}&|\alpha_2|^2&\hdots&|\alpha_2||\alpha_d|e^{-i(\phi_2-\phi_d)}\\ \vdots&\vdots&&\vdots\\ |\alpha_d||\alpha_1|e^{-i(\phi_d-\phi_1)}&|\alpha_d||\alpha_2|e^{-i(\phi_d-\phi_2)}&\hdots&|\alpha_d|^2\end{pmatrix}\equiv\vect{\phi_-}. \nonumber \end{align} According to Eq. \makeref{hij_final}, which reads \begin{align} \vect{h} =&\vect{EN}\circ (\vect{EN})^*-\vect{EN}\circ\vect{\gamma}\vect{\gamma}^T-(\vect{EN})^*\circ\left(\vect{\gamma}\vect{\gamma}^T\right)^*+\vect{E}\circ \vect{E}^*+\vect{E}\circ\vect{\gamma}\vect{\gamma}^{\dagger}+\vect{E}^*\circ\left(\vect{\gamma}\vect{\gamma}^{\dagger}\right)^*-\left(\vect{E}+\vect{\gamma}\vect{\gamma}^{\dagger}\right)\circ\vect{I}, \nonumber \end{align} $\vect{h}$ is obtained by referring to the following matrices: \begin{align}\label{1_term_QFIM} \vect{EN}\circ(\vect{EN})^*=\frac{1}{4}\begin{pmatrix}\vect{E_1N_1}\circ(\vect{E_1N_1})^*&\vect{E_1N_1}\circ(\vect{E_1N_1})^*\\\vect{E_1N_1}\circ(\vect{E_1N_1})^*&\vect{E_1N_1}\circ(\vect{E_1N_1})^*\end{pmatrix}, \end{align} \begin{align}\label{2_term_QFIM} -\vect{EN}\circ\vect{\gamma}\vect{\gamma}^T=\frac{1}{4}\begin{pmatrix}\vect{E_1N_1}\circ\vect{\phi_+}&-\vect{E_1N_1}\circ\vect{\phi_+}\\-\vect{E_1N_1}\circ\vect{\phi_+}&\vect{E_1N_1}\circ\vect{\phi_+}\end{pmatrix}, \end{align} \begin{align}\label{3_term_QFIM} \vect{E}\circ \vect{E}^*=\frac{1}{4}\begin{pmatrix}\vect{I}_d+\left(\vect{E_1}+\vect{E_1}^*\right)\circ\vect{I}_d+\vect{E_1}\circ\vect{E_1}^*&\vect{I}_d-\left(\vect{E_1}+\vect{E_1}^*\right)\circ\vect{I}_d+\vect{E_1}\circ\vect{E_1}^*\\\vect{I}_d-\left(\vect{E_1}+\vect{E_1}^*\right)\circ\vect{I}_d+\vect{E_1}\circ\vect{E_1}^*&\vect{I}_d+\left(\vect{E_1}+\vect{E_1}^*\right)\circ\vect{I}_d+\vect{E_1}\circ\vect{E_1}^*\end{pmatrix}, \end{align} \begin{align}\label{4_term_QFIM} \vect{E}\circ\vect{\gamma}\vect{\gamma}^{\dagger}=\frac{1}{4}\begin{pmatrix}\vect{I}_d\circ\vect{\phi_-}+\vect{E_1}\circ\vect{\phi_-}&\vect{I}_d\circ\vect{\phi_-}-\vect{E_1}\circ\vect{\phi_-}\\\vect{I}_d\circ\vect{\phi_-}-\vect{E_1}\circ\vect{\phi_-}&\vect{I}_d\circ\vect{\phi_-}+\vect{E_1}\circ\vect{\phi_-}\end{pmatrix}, \end{align} \begin{align}\label{5_term_QFIM} -\left(\vect{E}+\vect{\gamma}\vect{\gamma}^{\dagger}\right)\circ\vect{I}_d=\frac{1}{2}\begin{pmatrix}\vect{I}_d+\vect{E_1}\circ\vect{I}_d+\vect{I}_d\circ\vect{\phi_-}&0\\0&\vect{I}_d+\vect{E_1}\circ\vect{I}_d+\vect{I}_d\circ\vect{\phi_-}\end{pmatrix}. \end{align} The above set of equations shows that $\vect{h}$ is a sum of $2d \times 2d$ matrices of the form $\begin{pmatrix}\vect{X}^{(k)}&\vect{Y}^{(k)}\\\vect{Y}^{(k)}&\vect{X}^{(k)}\end{pmatrix}$, $\vect{X}^{(k)}$, $\vect{Y}^{(k)}$ being $d \times d$ matrices. Consequently, computing the two sums $\vect{X}=\sum_{k}\vect{X}^{(k)}$ and $\vect{Y}=\sum_{k}\vect{Y}^{(k)}$ is enough to determine $\vect{h}$ completely. We find \begin{align} \vect{X}=\frac{1}{4}\vect{E_1N_1}\circ(\vect{E_1N_1})^*+\frac{1}{4}\vect{E_1}\circ \vect{E_1}^*+\frac{1}{4}\left[\vect{E_1N_1}\circ\vect{\phi_+}+(\vect{E_1N_1})^*\circ\vect{\phi_+}^*\right]+\frac{1}{4}(\vect{E_1}\circ\vect{\phi_-}+\vect{E_1}^*\circ\vect{\phi_-}^* +\frac{1}{4}(\vect{E_1}+\vect{E_1}^*)\circ\vect{I}_d-\frac{1}{2}\vect{E_1}\circ\vect{I}_d-\frac{1}{4}\vect{I}_d \nonumber \end{align} and \begin{align} \vect{Y}=\frac{1}{4}\vect{E_1N_1}\circ(\vect{E_1N_1})^*+\frac{1}{4}\vect{E_1}\circ \vect{E_1}^*-\frac{1}{4}\left[\vect{E_1N_1}\circ\vect{\phi_+}+(\vect{E_1N_1})^*\circ\vect{\phi_+}^*\right]-\frac{1}{4}(\vect{E_1}\circ\vect{\phi_-}+\vect{E_1}^*\circ\vect{\phi_-}^*)-\frac{1}{4}(\vect{E_1}+\vect{E_1}^*)\circ\vect{I}_d+\frac{1}{2}\vect{I}_d\circ\vect{\phi_-}+\frac{1}{4}\vect{I}_d. \nonumber \end{align} Finally, from Eq. \makeref{QFIM_hij}, and using $\vect{h}_{i,j}=\vect{h}_{i+d,j+d}=\vect{X}_{ij}$ and $\vect{h}_{i,j+d}=\vect{h}_{i+d,j}=\vect{Y}_{ij}$, we find \begin{align} \vect{\mathcal{F}_{\rm Q}}=&2\vect{X}-2\vect{Y} =\vect{E_1N_1}\circ\vect{\phi_+}^*+(\vect{E_1N_1})^*\circ\vect{\phi_+}^*+\vect{E_1}\circ\vect{\phi_-}+\vect{E_1}^*\circ\vect{\phi_-}^*-\vect{\phi_-}\circ\vect{I}_d+\vect{E_1}^*\circ\vect{I}_d-\vect{I}_d.\label{QFIM_Mach_Zender_2} \end{align} Furthermore, we use \begin{eqnarray} (\vect{E_1N_1})_{ij}&=&\left(\vect{A_1}^{\dagger}\vect{C_1D_1}\vect{A_1}^*\right)_{ij} =\sum_{kl}\left(\vect{U}^{\dagger}\right)_{ik}\left(e^{i\varphi}sc\right)\delta_{kl}\delta_{Dl}\left(\vect{U}^*\right)_{lj} =e^{i\varphi}sc\hspace{0.1cm}\left(\vect{U}^{\dagger}\right)_{iD}\left(\vect{U}^*\right)_{Dj} \nonumber \\ &=&e^{i\varphi}sc\hspace{0.1cm}\left(\vect{U}^*\right)_{Di}\left(\vect{U}^*\right)_{Dj} \nonumber \end{eqnarray} and \begin{eqnarray} (\vect{E_1})_{ij}&=&\left(\vect{A_1}^{\dagger}\vect{C_1}\vect{A_1}\right)_{ij}=\sum_{kl}\left(\vect{U}^{\dagger}\right)_{ik}\delta_{kl}\left[\left(1-\delta_{Dl}\right)+\delta_{Dl}c^2\right]\left(\vect{U}\right)_{lj}=\sum_{kl}\left(\vect{U}^{\dagger}\right)_{ik}\delta_{kl}\left(\vect{U}\right)_{lj}+\sum_{kl}\left(\vect{U}^{\dagger}\right)_{ik}(c^2-1)\delta_{kl}\delta_{Dl}\left(\vect{U}\right)_{lj} \nonumber \\ &=&\delta_{ij}+s^2\left(\vect{U}^*\right)_{Di}\left(\vect{U}\right)_{Dj}, \nonumber \end{eqnarray} derived on the basis of Eq. \makeref{C1D1} and \makeref{C1}, respectively. Also, since $(\vect{\phi_{+}})_{ij}=|\alpha_i||\alpha_j|e^{-i\phi_i}e^{-i\phi_j}$, and $(\vect{\phi_{-}})_{ij}=|\alpha_i||\alpha_j|e^{-i\phi_i}e^{i\phi_j}$, one has \begin{equation} (\vect{E_1N_1}\circ\vect{\phi_{+}})_{ij}=e^{i\varphi}sc\hspace{0.1cm}\left(\vect{U}^*\right)_{Di}\left(\vect{U}^*\right)_{Dj}|\alpha_i||\alpha_j|e^{-i\phi_i}e^{-i\phi_j},\label{first_term} \end{equation} and \begin{align} (\vect{E_1}\circ\vect{\phi_{-}})_{ij}=&\left[\delta_{ij}+s^2\left(\vect{U}^*\right)_{Di}\left(\vect{U}\right)_{Dj}\right]|\alpha_i||\alpha_j|e^{-i\phi_i}e^{i\phi_j}=|\alpha_i|^2\delta_{ij}+s^2\left(\vect{U}^*\right)_{Di}\left(\vect{U}\right)_{Dj}|\alpha_i||\alpha_j|e^{-i\phi_i}e^{i\phi_j}.\label{second_term} \end{align} For the sake of a lighter notation, we set $(\vect{U})_{Di} \equiv u_i$; the same notation was used in the main text. Plugging Eqs. \makeref{first_term} and \makeref{second_term} into Eq. \makeref{QFIM_Mach_Zender_2} and by some algebraic manipulation, we find \begin{align} (\vect{\mathcal{F}_{\rm Q}})_{ij}=&|\alpha_i||\alpha_j|\left[\left(e^{-i\varphi}u_ie^{i\phi_i} u_je^{i\phi_j}+e^{i\varphi}u^*_ie^{-i\phi_i} u^*_je^{-i\phi_j}\right)sc+2\delta_{ij}+\left(u^*_ie^{-i\phi_i} u_je^{i\phi_j}+u_ie^{i\phi_i} u^*_je^{-i\phi_j}\right)s^2-\delta_{ij}\right]+|u_i|^2\delta_{ij}s^2 \nonumber \\ =&|\alpha_i||\alpha_j|\left[\Re\left(e^{i\chi_i}u_i\right)\Re\left(e^{i\chi_j}u_j\right)\left(e^{2r}-1\right)+\Im\left(e^{i\chi_i}u_i\right)\Im\left(e^{i\chi_j}u_j\right)\left(e^{-2r}-1\right)\right]+\left(|\alpha_i|^2+|u_i|^2\bar{n}_s\right)\delta_{ij}\label{QFIM_final}, \end{align} where $\chi_i \equiv \phi_i-\varphi/2$ and $s^2 \equiv \sinh^2 r=\bar{n}_s$. By imposing the condition $\Im(e^{i\chi_j}u_j)= 0$, for $j=1, ..., d$, one finally recovers Eq. \makeref{QFIM} of the main text. \subsubsection{Inverse moment matrix, Eq. (\ref{MOM})} The so called \textit{moment matrix} corresponds to the covariance matrix of a particular set of estimators of the unknown parameters $\theta_i$, $i=1,\dots,d$. It is defined as follows \cite{GessnerNATCOMM2020}: \begin{equation} \vect{\mathcal{M}}=\vect{G}^T\vect{\Gamma}^{-1}\vect{G}, \end{equation} where \begin{equation} \vect{G}_{ij}=\frac{\partial \langle\hat{X}_i\rangle_{\rho(\vect{\theta})}}{\partial \theta_j} \hspace{0.5cm} (i=1,\dots,K; \hspace{0.1cm} j=1,\dots,d), \label{G} \end{equation} and \begin{equation} \vect{\Gamma}_{ij}=\langle \hat{X}_i\hat{X}_j\rangle_{\rho(\vect{\theta})}-\langle\hat{X}_i\rangle_{\rho(\vect{\theta})}\langle\hat{X}_j\rangle_{\rho(\vect{\theta})} \hspace{0.5cm} (i,j=1,\dots,K), \label{Gamma} \end{equation} $\rho(\vect{\theta})$ being the output state of the whole sensor network. The $\hat{X}_i$, $i=1,\dots,K$, are $K$ hermitian operators which correspond to measurements performed on the output state $\rho(\vect{\theta})$. We choose $\hat{X}_i \equiv (\hat{J}_z)_i=\left(\hat{a}_i^{\dagger}\hat{a}_i-\hat{b}_i^{\dagger}\hat{b}_i\right)/2$, with $i=1,\dots,d$. In such case, the two matrices $\vect{G}$ and $\vect{\Gamma}$ can be evaluated through the \textit{Q function}-based technique already illustrated in the previous section. This time, we need to take into account the complete transformation performed by the network on the input state, including the phase--encoding stage. Such transformation is described by the matrix \begin{align} \label{transformation_moment_matrix} \vect{A}^{\dagger}=&\begin{pmatrix}\vect{\tilde{C}}&\vect{\tilde{S}}\\-\vect{\tilde{S}}&\vect{\tilde{C}}\end{pmatrix}\begin{pmatrix}\vect{I}_d&0\\0&\vect{A_1}^{\dagger}\end{pmatrix} = \begin{pmatrix}\vect{\tilde{C}}&\vect{\tilde{S}}\vect{A_1}^{\dagger}\\-\vect{\tilde{S}}&\vect{\tilde{C}}\vect{A_1}^{\dagger}\end{pmatrix}, \end{align} where $\vect{\tilde{C}}_{ij}=\cos{\left(\theta_i/2\right)}\delta_{ij}$ and $\vect{\tilde{S}}_{ij}=\sin{\left(\theta_i/2\right)}\delta_{ij}$. Let $\ket{\Psi(\vect{\theta})}$ be the output state of our MZI sensor network. On the basis of Eq. \makeref{Gamma} and having set $\hat{X}_i \equiv (\hat{J}_z)_i$, we have \begin{equation} \vect{\Gamma}_{ij} =\langle\Psi(\vect{\theta})\vert(\hat{J}_z)_i (\hat{J}_z)_j\ket{\Psi(\vect{\theta})}-\langle\Psi(\vect{\theta})\vert(\hat{J}_z)_i\ket{\Psi(\vect{\theta}})\langle\Psi(\vect{\theta})\vert(\hat{J}_z)_j\ket{\Psi(\vect{\theta})} \hspace{0.5cm} (i,j=1,\dots,d), \end{equation} which can be rewritten as \begin{equation} \vect{\Gamma}_{ij} =\frac{1}{4} \left(\vect{h}_{i,j} + \vect{h}_{i+d,j+d} - \vect{h}_{i,j+d} - \vect{h}_{i+d, j}\right) \hspace{0.5cm} (i,j=1,\dots,d), \end{equation} where $\vect{h}_{ij}=\langle\Psi(\vect{\theta})\vert\hat{n}_i\hat{n}_j \ket{\Psi(\vect{\theta})}-\langle\Psi(\vect{\theta})\vert\hat{n}_i\ket{\Psi(\vect{\theta})}\langle\Psi(\vect{\theta})\vert\hat{n}_j\ket{\Psi(\vect{\theta})}$. Notice that $\vect{h}_{ij}$ can still be computed by means of Eq. \makeref{hij_final}, provided that the expression of matrix $\vect{A}^{\dagger}$ is that given in Eq. \makeref{transformation_moment_matrix}. Matrices $\vect{C}$ and $\vect{CD}$, on the other hand, being only related to the form of the input state, have the same expressions as in Eqs. from \makeref{C_QFIM} to \makeref{C1D1}. So we get \begin{align} \vect{E}=\vect{A}^{\dagger}\vect{C}\vect{A}=\begin{pmatrix}\vect{\tilde{C}}^2+\vect{\tilde{S}}\vect{E_1}\vect{\tilde{S}}&-\left(\vect{\tilde{S}}\vect{\tilde{C}}-\vect{\tilde{S}}\vect{E_1}\vect{\tilde{C}}\right)\\-\left(\vect{\tilde{S}}\vect{\tilde{C}}-\vect{\tilde{C}}\vect{E_1}\vect{\tilde{S}}\right)&\vect{\tilde{S}}^2+\vect{\tilde{C}}\vect{E_1}\vect{\tilde{C}}\end{pmatrix}\label{E_moment_matrix} \end{align} and \begin{align} \vect{EN}=&\vect{A}^{\dagger}\vect{CD}\vect{A}^*=\begin{pmatrix}\vect{\tilde{S}}\vect{E_1N_1}\vect{\tilde{S}}&\vect{\tilde{S}}\vect{E_1N_1}\vect{\tilde{C}}\\\vect{\tilde{C}}\vect{E_1N_1}\vect{\tilde{S}}&\vect{\tilde{C}}\vect{E_1N_1}\vect{\tilde{C}}\end{pmatrix}. \nonumber \end{align} We also have \begin{align} \vect{\gamma}=&\vect{b}^*=\begin{pmatrix}\vect{\tilde{C}}\vect{\beta_0}^*\\-\vect{\tilde{S}}\vect{\beta_0}^*\end{pmatrix}=\begin{pmatrix}\vect{\tilde{C}}\vect{\gamma_0}\\-\vect{\tilde{S}}\vect{\gamma_0}\end{pmatrix}, \nonumber \end{align} so that \begin{align} \vect{\gamma}\vect{\gamma}^{\dagger}=\begin{pmatrix}\vect{\tilde{C}}\vect{\phi_-}\vect{\tilde{C}}&-\vect{\tilde{C}}\vect{\phi_-}\vect{\tilde{S}}\\-\vect{\tilde{S}}\vect{\phi_-}\vect{\tilde{C}}&\vect{\tilde{S}}\vect{\phi_-}\vect{\tilde{S}}\end{pmatrix},\label{gammad_moment_matrix} \end{align} and \begin{align} \vect{\gamma}\vect{\gamma}^T=\begin{pmatrix}\vect{\tilde{C}}\vect{\phi_+}\vect{\tilde{C}}&-\vect{\tilde{C}}\vect{\phi_+}\vect{\tilde{S}}\\-\vect{\tilde{S}}\vect{\phi_+}\vect{\tilde{C}}&\vect{\tilde{S}}\vect{\phi_+}\vect{\tilde{S}}\end{pmatrix}. \nonumber \end{align} At this point, we set $\theta_i=\pi/2$, a choice which is expected to lead to minimum estimation uncertainty [maximum slope condition, see Eq. (\ref{Gij}) below]. We thus obtain the same matrices as in Eqs. \makeref{1_term_QFIM}-\makeref{5_term_QFIM}, while, for what concerns Eq. \makeref{2_term_QFIM}, we find \begin{align} -\vect{EN}\circ\vect{\gamma}\vect{\gamma}^T=\frac{1}{4}\begin{pmatrix}-\vect{E_1N_1}\circ\vect{\phi_+}&\vect{E_1N_1}\circ\vect{\phi_+}\\\vect{E_1N_1}\circ\vect{\phi_+}&-\vect{E_1N_1}\circ\vect{\phi_+}\end{pmatrix}, \nonumber \end{align} which has opposite sign with respect to the corresponding matrix used in the QFIM case. As a consequence, we eventually obtain an expression for $\vect{\Gamma}$ which is almost identical to the QFIM, the most notable difference being the swap of the real and imaginary part of the term $e^{i\chi_i}u_i$ (compare with Eq. \makeref{QFIM_final}): \begin{align} \label{Gamma_final} \vect{\Gamma}_{ij}=\frac{1}{4}\left\{|\alpha_i||\alpha_j|\left[\Im\left(e^{i\chi_i}u_i\right)\Im\left(e^{i\chi_j}u_j\right)\left(e^{2r}-1\right)+\Re\left(e^{i\chi_i}u_i\right)\Re\left(e^{i\chi_j}u_j\right)\left(e^{-2r}-1\right)\right]+\left(|\alpha_i|^2+|u_i|^2\bar{n}_s\right)\delta_{ij}\right\}. \end{align} Consider now Eq. \makeref{G}, rewritten for the specific choice $\hat{X}_i\equiv(\hat{J}_z)_i$: \begin{align} \label{Gij} \vect{G}_{ij}=&\frac{\partial \langle\Psi(\vect{\theta})\vert(\hat{J}_z)_i\ket{\Psi(\vect{\theta})}}{\partial \theta_j}=\frac{1}{2}\frac{\partial \langle\Psi(\vect{\theta})\vert(\hat{n}_i-\hat{n}_{i+d})\ket{\Psi(\vect{\theta})}}{\partial \theta_i}\delta_{ij}, \hspace{0.5cm} (i=1,\dots,d). \end{align} A formula for the evaluation of $\langle\Psi(\vect{\theta})\vert\hat{n}_i\ket{\Psi(\vect{\theta})}$ was derived in Eq. \makeref{ni}: \begin{align} \langle\Psi(\vect{\theta})\vert\hat{n}_i\ket{\Psi(\vect{\theta})}=-1+\vect{E}_{ii}+\vect{\gamma}_i\vect{\gamma}_i^* \hspace{0.5cm} (i=1,\dots,2d). \nonumber \end{align} The same information is conveniently condensed in the (diagonal) matrix \begin{align} -\vect{I}_d+\left(\vect{E}+\vect{\gamma}\vect{\gamma}^{\dagger}\right)\circ\vect{I}_d, \nonumber \end{align} whose diagonal elements are the $\langle\Psi(\vect{\theta})\vert\hat{n}_i\ket{\Psi(\vect{\theta})}$, $i=1, \dots, 2d$. Making use of Eqs. \makeref{E_moment_matrix} and \makeref{gammad_moment_matrix}, one finds \begin{align} -\vect{I}_d+\left(\vect{E}+\vect{\gamma}\vect{\gamma}^{\dagger}\right)\circ\vect{I}_d=&\begin{pmatrix}-\vect{I}_d+\vect{\tilde{C}}^2+\left(\vect{\tilde{S}}\vect{E_1}\vect{\tilde{S}}\right)\circ\vect{I}_d+\vect{\tilde{C}}\vect{\phi_-}\vect{\tilde{C}}&0\\0&-\vect{I}_d+\vect{\tilde{S}}^2+\left(\vect{\tilde{C}}\vect{E_1}\vect{\tilde{C}}\right)\circ\vect{I}_d+\vect{\tilde{S}}\vect{\phi_-}\vect{\tilde{S}}\end{pmatrix} \nonumber \\ &\begin{pmatrix}-\vect{I}_d+\vect{\tilde{C}}^2+\vect{\tilde{S}}^2\left(\vect{E_1}\circ\vect{I}_d\right)+\vect{\tilde{C}}\vect{\phi_-}\vect{\tilde{C}}&0\\0&-\vect{I}_d+\vect{\tilde{S}}^2+\vect{\tilde{C}}^2\left(\vect{E_1}\circ\vect{I}_d\right)+\vect{\tilde{S}}\vect{\phi_-}\vect{\tilde{S}}\end{pmatrix}, \nonumber \end{align} where the general result $(\vect{Z}\vect{Y}\vect{Z})\circ\vect{I}_d=\vect{Z}^2(\vect{Y}\circ\vect{I}_d)$ has been used, $\vect{Z}$ being a diagonal matrix. Note that, for $i=1,\dots,d$, the expectation value $\langle\Psi(\vect{\theta})\vert(\hat{n}_i-\hat{n}_{i+d})\ket{\Psi(\vect{\theta})}$ corresponds to the difference between the two diagonal blocks of this matrix, so that, after simple algebraic manipulation, we get \begin{align} \vect{G}_{ij}=&\frac{1}{2}\frac{\partial \langle\Psi(\vect{\theta})\vert(\hat{n}_i-\hat{n}_{i+d})\ket{\Psi(\vect{\theta})}}{\partial \theta_i}\delta_{ij} =\frac{1}{2}\sin\theta_i\left[\vect{E_1}\circ\vect{I}_d-\left(1+|\alpha_i|^2\right)\right]_{ii}\delta_{ij}.\nonumber \end{align} We set again $\theta_i=\pi/2$, ending up with: \begin{align}\label{G_final} \vect{G}_{ij}=\frac{1}{2}\left(|u_i|^2s^2-|\alpha_i|^2\right)\delta_{ij}. \end{align} At this point, if we aimed at obtaining the explicit expression of the moment matrix, we would still have to compute the inverse of matrix $\vect{\Gamma}$. On the other hand, we only need $\vect{G}^{-1}$ to derive $\vect{M}^{-1}=(\vect{G}^{-1})^T\vect{\Gamma}\vect{G}^{-1}$, the advantage being that $\vect{G}$ is diagonal and thus easily inverted. From Eqs. \makeref{Gamma_final} and \makeref{G_final}, one readily gets \begin{align} \left(\vect{M}^{-1}\right)_{ij}=&|\alpha_i||\alpha_j|\frac{\Im{(e^{i\chi_i}u_i)}} {|\alpha_i|^2-|u_i|^2\bar{n}_s}\frac{\Im{(e^{i\chi_j} u_j)}}{|\alpha|_j^2-|u_j|^2\bar{n}_s}(e^{2r}-1)+|\alpha_i||\alpha_j|\frac{\Re{(e^{i\chi_i}u_i)}} {|\alpha_i|^2-|u_i|^2\bar{n}_s}\frac{\Re{(e^{i\chi_j} u_j)}}{|\alpha|_j^2-|u_j|^2\bar{n}_s}(e^{-2r}-1)+\frac{|\alpha_i|^2+|u_i|^2\bar{n}_s}{(|\alpha_i|^2-|u_i|^2\bar{n}_s)^2}\delta_{ij}, \end{align} where $\chi_i \equiv \phi_i-\varphi/2$ and $s^2 \equiv \sinh^2 r=\bar{n}_s$. Under the condition $\Im(e^{i\chi_j}u_j)= 0$, for $j=1, ..., d$, one finally recovers Eq. \makeref{MOM}. \end{widetext} \subsection{Demonstration of Eqs. (\ref{ubound3LB}) and (\ref{ubound3UB})} \label{A} First, let us recall the general expression of $\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$, obtained using Eq.~(\ref{MOM}): \begin{eqnarray} \label{Eq1APPA} && \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} = \vect{v}^T\vect{\mathcal{M}}(\tilde{\vect{u}}, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2, \bar{n}_s )^{-1}\vect{v} \nonumber \\ && \quad = (e^{-2r}-1)\left(\sum_{j=1}^d \frac{|\alpha_j|\tilde{u}_j v_j}{|\alpha_j|^2-\tilde{u}_j^2\bar{n}_s}\right)^2+\sum_{j=1}^d \frac{|\alpha_j|^2+\tilde{u}_j^2\bar{n}_s}{\left(|\alpha_j|^2-\tilde{u}_j^2\bar{n}_s\right)^2}v_j^2. \nonumber \\ \end{eqnarray} Also, as a general result, we notice that the minimization problem $\min_{\vect{U}}\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$ is characterized by a symmetry of a simple type: the value of the minimum is invariant under the transformation $v_i\to-v_i$ performed on an arbitrary number of components of $\vect{v}$. This can be proved as follows. Let $\vect{\tilde{u}}_{\vect{v}}$ be the specific vector $\vect{\tilde{u}}$ that minimizes $\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$. Inverting the sign of $v_i$ for a certain $i\in\{1,\dots,d\}$ [$v_i'=-v_i$] will leave the second term in the second line of Eq. \makeref{Eq1APPA} unaltered, only the first term will change. However, it is easy to realize that the only effect of this transformation is to modify the minimum point of $\Delta^2(\vect{v}' \cdot \vect{\theta})_{\rm emom}$, which is now $\vect{\tilde{u}}_{\vect{v'}}$ with $(\vect{\tilde{u}}_{\vect{v'}})_i=-(\vect{\tilde{u}}_{\vect{v}})_i$, while the minimum itself will remain the same as for $\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$. Also, this argument can be immediately extended to a transformation that inverts the sign of an arbitrary number of components of $\vect{v}$. The same symmetry is easily seen to apply also to $\min_{ r_1', \dots, r_d'}\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom}$, the sequential strategy case. The lower bound (\ref{ubound3LB}) is obtained by noticing that \begin{equation} \min_{\vect{U}, \vert \alpha_1 \vert^2, ... \vert \alpha_d \vert^2}\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} \geq \min_{\vect{U}, \vert \alpha_1 \vert^2, ... \vert \alpha_d \vert^2}\Delta^2(\vect{v}_j \cdot \vect{\theta})_{\rm emom} \nonumber \end{equation} where we have indicated $\vect{v}_j$ as the vector with elements $v_j = 1/\sqrt{d}$ and $v_{i\neq j}=0$ and corresponds to the estimation of a single phase shift $\vect{v}_j \cdot \vect{\theta} = \theta_j/\sqrt{d}$. This inequality is supported by numerical evidence, see Fig.~\ref{fig3}. Specifically, from Eq.~(\ref{Eq1APPA}), we have \begin{eqnarray} \label{AppBeq} \Delta^2(\vect{v}_j \cdot \vect{\theta})_{\rm emom} &=& \frac{ (e^{-2r}-1)|\alpha_j|^2\tilde{u}_j^2}{d(|\alpha_j|^2-\tilde{u}_j^2\bar{n}_s)^2}+ \frac{|\alpha_j|^2+\tilde{u}_j^2\bar{n}_s}{d(|\alpha_j|^2-\tilde{u}_j^2\bar{n}_s)^2} \nonumber \\ && \approx \frac{(e^{-2r}-1) \tilde{u}_j^2 +1}{d|\alpha_j|^2} + \frac{\tilde{u}_j^2\bar{n}_s}{d|\alpha_j|^4}, \end{eqnarray} where the approximate expression in the second line is obtained for $|\alpha_j|^2 \gg \bar{n}_s$. Rewriting the numerator of Eq.~(\ref{AppBeq}) as $|\alpha_j|^2+[\bar{n}_s - (1 - e^{-2r})|\alpha_j|^2]\tilde{u}_j^2$, we see that the minimum in the interval $0\leqslant\tilde{u}^2_j\leqslant1$ is clearly achieved for $\tilde{u}^2_j=1$ if the term between square brackets is negative, namely $|\alpha_j|^2>\bar{n}_s/(1-e^{-2r})$, or simply $|\alpha_j|^2>\bar{n}_s$ for $r\gg 1$. Moreover, the minimum of Eq.~(\ref{AppBeq}) with respect to $|\alpha_j|^2$ is clearly obtained by setting $|\alpha_j|^2$ to its maximum value, which corresponds to $|\alpha_j|^2=d\bar{n}_c$. Thus, we have \begin{equation} \min_{\vect{U}, \vert \alpha_1 \vert^2, ... \vert \alpha_d \vert^2}\Delta^2(\vect{v}_j \cdot \vect{\theta})_{\rm emom} = \frac{e^{-2r}}{d^2\bar{n}_c} + \frac{\bar{n}_s}{d^3\bar{n}_c^2}. \nonumber \end{equation} We recall that the above equation has been derived under the condition $|\alpha_j|^2 = d\bar{n}_c \gg \bar{n}_s$ that implies $\bar{n}_T = d \bar{n}_c + \bar{n}_s \approx d\bar{n}_c$ and this $\bar{n}_T \gg \bar{n}_s$. We thus recover Eq.~(\ref{ubound3LB}). The upper bound~(\ref{ubound3UB}) is obtained for the sub-optimal conditions i) $\vert \alpha_j \vert^2 = \bar{n}_c$ for all $j$, where $\bar{n}_c = (\bar{n}_T - \bar{n}_s)/d$, and ii) $\vect{\tilde{u}} = \vect{v} \sqrt{d}$. The bound reads \begin{eqnarray} && \min_{\vect{U}, \vert \alpha_1 \vert^2, ... \vert \alpha_d \vert^2}\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} \leq \vect{v}^T\vect{\mathcal{M}}(\vect{v}\sqrt{d}, \bar{n}_c, \bar{n}_s )^{-1}\vect{v}\nonumber \\ && = d\bar{n}_c (e^{-2r}-1)\left(\sum_{j=1}^d \frac{v_j^2}{\bar{n}_c-dv_j^2\bar{n}_s}\right)^2+\sum_{j=1}^d \frac{\bar{n}_c+dv_j^2\bar{n}_s}{(\bar{n}_c-dv_j^2\bar{n}_s)^2}v_j^2. \nonumber \end{eqnarray} Taking into account the normalization $\sum_{j=1}^d v_j^2 = 1/d$, we have $d v_j^2 \leq 1$ for all $j$. Therefore, \begin{equation} \left(\sum_{j=1}^d \frac{v_j^2}{\bar{n}_c-dv_j^2\bar{n}_s}\right)^2 \leq \frac{1}{d^2 (\bar{n}_c - \bar{n}_s)^2} \nonumber \end{equation} and \begin{equation} \sum_{j=1}^d \frac{\bar{n}_c+dv_j^2\bar{n}_s}{(\bar{n}_c-dv_j^2\bar{n}_s)^2}v_j^2 \leq \frac{d \bar{n}_c + \mathcal{W} \bar{n}_s}{d^2 (\bar{n}_c - \bar{n}_s)^2}, \nonumber \end{equation} where $\mathcal{W} = d^3 \sum_{j=1}^d v_j^4$. Notice that $\mathcal{W} \geq 1$, with $\mathcal{W} = 1$ for $v_j= \pm 1/d$ for all $j$. Combining the above equations and using $d \bar{n}_c = \bar{n}_T - \bar{n}_s$, we find \begin{equation} \min_{\vect{U}, \vert \alpha_1 \vert^2, ... \vert \alpha_d \vert^2}\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} \leq \frac{(\bar{n}_T-\bar{n}_s) e^{-2r} + \bar{n}_s \mathcal{W}}{[\bar{n}_T - (d+1) \bar{n}_s]^2}. \nonumber \end{equation} Finally, we recover Eq.~(\ref{ubound3UB}) under the condition $\bar{n}_T \gg (d+1) \bar{n}_s$. \subsection{Demonstration of Eqs.~(\ref{ubound7LB}) and~(\ref{ubound7UB})} The lower bound to $\min_{\vect{U}, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR}$ is obtained by first using the Cauchy-Schwarz inequality \begin{equation} \label{CZ} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR} = \vect{v}^T \vect{\mathcal{F}_{\rm Q}}^{-1}\vect{v} \geq \frac{\vert \vect{v} \vert^4}{(\vect{v}^T \vect{\mathcal{F}_{\rm Q}}\vect{v})}. \end{equation} From Eq.~(\ref{QFIM}) we then have \begin{equation} \label{AppB1} \vect{v}^T \vect{\mathcal{F}_{\rm Q}}\vect{v} = (e^{2r} -1) \bigg(\sum_{j=1}^d \vert \alpha_j \vert \tilde{u}_j v_j \bigg)^2 + \sum_{j=1}^d \vert \alpha_j \vert^2 v_j^2 + \bar{n}_s \sum_{j=1}^d \tilde{u}_j^2 v_j^2. \end{equation} We have \begin{equation} \label{AppB2} \bigg(\sum_{j=1}^d \vert \alpha_j \vert \tilde{u}_j v_j \bigg)^2 \leq \bigg(\sum_{j=1}^d v_j^2 \bigg) \bigg(\sum_{j=1}^d \vert \alpha_j \vert^2 \tilde{u}_j^2 \bigg) \leq \frac{\sum_{j=1}^d \vert \alpha_j \vert^2}{d}, \nonumber \end{equation} where the first inequality is due to Cauchy-Schwarz and the second is a consequence of $\tilde{u}_j^2 \leq 1$ and $\sum_{j=1}^d v_j^2 = 1/d$. Using $v_j^2 \leq 1/d$, we also have \begin{equation} \label{AppB3} \sum_{j=1}^d \vert \alpha_j \vert^2 v_j^2 \leq \frac{\sum_{j=1}^d \vert \alpha_j \vert^2}{d}, \nonumber \end{equation} and \begin{equation} \label{AppB4} \sum_{j=1}^d \tilde{u}_j^2 v_j^2 \leq \frac{1}{d}. \nonumber \end{equation} Combining Eq.~(\ref{AppB1}) with the above inequalities gives \begin{equation} \vect{v}^T \vect{\mathcal{F}_{\rm Q}}\vect{v} \leq \frac{e^{2r} \sum_{j=1}^d \vert \alpha_j \vert^2+\bar{n}_s}{d}. \nonumber \end{equation} Taking into account that $\sum_{j=1}^d \vert \alpha_j \vert^2 = \bar{n}_T - \bar{n}_s$ and $\vert \vect{v} \vert^4 = 1/d^2$, from Eq. (\ref{CZ}), we obtain \begin{equation} \Delta^2(\vect{v}\cdot \vect{\theta})_{\rm eQCR} \geq \frac{1}{d[\bar{n}_T e^{2r} - \bar{n}_s (e^{2r}-1)]}. \nonumber \end{equation} The lower bound is valid for all $\vect{U}$ and all $\vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2$ and thus also for the optimal configuration, \begin{equation} \min_{\vect{U}, \, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR} \geq \frac{1}{d[\bar{n}_T e^{2r} - \bar{n}_s (e^{2r}-1)]}, \end{equation} which corresponds to the lower bound (\ref{ubound7LB}). To derive Eq. (\ref{ubound7UB}), we first use the Sherman-Morrison formula to invert Eq.~(\ref{QFIM}): \begin{align} \label{FQinv} \vect{\mathcal{F}_{\rm Q}}^{-1}=&\frac{1}{|\alpha_i|^2+\tilde{u}_i^2\bar{n}_s}\delta_{ij}\nonumber\\&-\frac{\left(e^{2r}-1\right)}{1+\mathcal{K}\left(e^{2r}-1\right)}\frac{|\alpha_i||\alpha_j|\tilde{u}_i\tilde{u}_j}{\left(|\alpha_i|^2+\tilde{u}_i^2\bar{n}_s\right)\left(|\alpha_j|^2+\tilde{u}_j^2\bar{n}_s\right)}, \end{align} where $\mathcal{K}=\sum_{j=1}^d \frac{|\alpha_j|^2\tilde{u}_j^2}{|\alpha_j|^2+\tilde{u}_j^2\bar{n}_s}$. From Eq. (\ref{FQinv}), it is possible to derive the general expression for $\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR}$: \begin{eqnarray} \label{EqAppB} && \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR} = \vect{v}^T\vect{\mathcal{F}_{\rm Q}}(\vect{\tilde{u}}, \vert \alpha_1 \vert^2, ..., \vert \alpha_d \vert^2, \bar{n}_s )^{-1}\vect{v} \nonumber \\ && \quad = \sum_{j=1}^d \frac{v_j^2}{|\alpha_j|^2+\tilde{u}_j^2\bar{n}_s}-\frac{\left(e^{2r}-1\right)}{1+\mathcal{K}\left(e^{2r}-1\right)}\left(\sum_{j=1}^d \frac{|\alpha_j|\tilde{u}_j v_j}{|\alpha_j|^2+\tilde{u}_j^2\bar{n}_s}\right)^2. \nonumber \\ \end{eqnarray} Similar to the derivation of Eq.~(\ref{ubound3UB}), the upper bound (\ref{ubound7UB}) is obtained by a specific configuration of the sensor network that simplifies the above equation: i) $\vert \alpha_j \vert^2 = \bar{n}_c$ for all $j$, where $\bar{n}_c = (\bar{n}_T - \bar{n}_s)/d$, and ii) $\vect{\tilde{u}} = \vect{v}\sqrt{d}$. In this case, we obtain \begin{equation} \label{first_form_ubound} \min_{\vect{U}, \, \vert \alpha_1 \vert^2, ... \vert \alpha_d \vert^2}\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR} \leq \frac{\mathcal{K}'}{1 + d\bar{n}_c(e^{2r}-1) \mathcal{K}'}. \end{equation} with $\mathcal{K}' = \sum_{j=1}^d \frac{v_j^2}{\bar{n}_c + d v_j^2\bar{n}_s}$. To derive an upper bound that is independent from $\vect{v}$, we notice that $\mathcal{K}'/(1+x \mathcal{K}')$ is a monotonic growing function of $\mathcal{K}'$, implying that $f(\mathcal{K}_1') < f(\mathcal{K}_2')$ if $\mathcal{K}_1' < \mathcal{K}_2'$. We have $\bar{n}_c + d v_j^2\bar{n}_s \geq \bar{n}_c$ and thus $\mathcal{K}' \leq 1/(d \bar{n}_c)$. Therefore, \begin{equation} \min_{\vect{U}, \, \vert \alpha_1 \vert^2, ... \vert \alpha_d \vert^2}\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR} \leq \frac{1}{d \bar{n}_c e^{2r}}. \end{equation} We recover the upper bound (\ref{ubound7UB}) when noticing that $d\bar{n}_c = \bar{n}_T - \bar{n}_s$. \subsection{Demonstration of Eqs. \makeref{Dthetaave} and \makeref{DthetaaveQCR}} Let us consider Eq. (\ref{Eq1APPA}) for $|\alpha_j|^2=\bar{n}_c$, for all $j$. In the regime $\bar{n}_c\gg\bar{n}_s$ [or, equivalently, $\bar{n}_T = d \bar{n}_c + \bar{n}_s \gg (d+1) \bar{n}_s$], we find \begin{align}\label{to_be_minimized} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} =\frac{e^{-2r}-1}{\bar{n}_c}\left(\sum_{i=1}^d \tilde{u}_iv_i\right)^2+\frac{1}{d\bar{n}_c}+\frac{\bar{n}_s}{\bar{n}_c^2}\sum_{i=1}^d\tilde{u}_i^2v_i^2. \end{align} We now show that the choice $\vect{\tilde{u}}= \sqrt{d} \vect{v}$ is optimal for the estimation of the generalized average phase $\vect{v}_{\rm ave} \cdot \vect{\theta}$, thus proving Eq. \makeref{Dthetaave}. Let us denote Eq. \makeref{to_be_minimized} with $f(\vect{\tilde{u}})$, as a function of $\vect{\tilde{u}}$. The goal here is to minimize $f(\vect{\tilde{u}})$ with respect to $\vect{\tilde{u}}$ under the normalization condition $g(\vect{\tilde{u}})=\sum_{i=1}^d \tilde{u}_i^2-1=0$. This problem can be solved through the method of Lagrange multipliers. Let $\lambda$ denote the Lagrange multiplier, the computation of the partial derivative with respect to $\tilde{u}_i$ of the Lagrangian function $\mathcal{L}(\vect{\tilde{u}},\lambda)=f(\vect{\tilde{u}})-\lambda g(\vect{\tilde{u}})$ gives \begin{equation} \frac{\partial}{\partial\tilde{u}_i}\mathcal{L}(\vect{\tilde{u}},\lambda)=\frac{e^{-2r}-1}{\bar{n}_c}2\left(\sum_{j=1}^d \tilde{u}_jv_j\right)v_i+2\frac{\bar{n}_s}{\bar{n}_c^2}\tilde{u}_iv_i^2-2\lambda\tilde{u}_i. \end{equation} The constrained minimum problem is solved by the pair $(\vect{\tilde{u}},\lambda)$ which satisfies $(\partial/\partial\tilde{u}_i)\mathcal{L}(\vect{\tilde{u}},\lambda)=0$ and $g(\vect{\tilde{u}})=0$ at the same time. Note that $\vect{\tilde{u}}=\sqrt{d}\vect{v}$ satisfies the constraint $g(\vect{\tilde{u}})=0$. Therefore, the choice $\vect{\tilde{u}}=\sqrt{d}\vect{v}$ is optimal if and only if a value of $\lambda$ can be found such that $(\partial/\partial\tilde{u}_i)\mathcal{L}\left(\vect{\tilde{u}},\lambda\right)\vert_{\vect{\tilde{u}}=\sqrt{d}\vect{v}}=0$. We thus search for the unique value of $\lambda$ that simultaneously solves all the equations in the following set: \begin{equation}\label{condition_minimum} \frac{e^{-2r}-1}{\bar{n}_c}+2d\frac{\bar{n}_s}{\bar{n}_c^2}v_i^2-2d\lambda=0, \end{equation} with $i$ such that $v_i \neq 0$, since we have divided by $v_i\neq 0$ -- if $v_i=0$, the $i$-th equation is identically satisfied. If such $\lambda$ actually exists, by subtracting consecutive pairs of equations contained in \makeref{condition_minimum}, we will end up with \begin{equation} \label{conditions} 2d\frac{\bar{n}_s}{\bar{n}_c^2}\left(v_i^2-v_{i+1}^2\right)=0, \end{equation} where $v_i, v_{i+1} \neq 0$. On the other hand, if the above conditions are met, we can immediately determine the sought value of $\lambda$ by solving any of the [linear] equations in \makeref{condition_minimum}. Therefore, Eq. \makeref{conditions} contains necessary and sufficient conditions for $\vect{\tilde{u}}=\sqrt{d}\vect{v}$ to give the optimal QC, which can be fulfilled in two different ways: \begin{equation} \frac{{\bar{n}}_s}{\bar{n}_c^2}=0, \qquad {\rm or} \qquad v_i^2-v_{i+1}^2=0,\nonumber \end{equation} with $v_i, v_{i+1} \neq 0$. The first alternative may be interpreted as referring to the situation when the last term in Eq. \makeref{to_be_minimized} is so small with respect to the rest that it can be neglected. If that is the case, the system in \makeref{condition_minimum} admits one solution $\lambda$ for every value of $\vect{v}$, implying that $\vect{\tilde{u}}=\sqrt{d}\vect{v}$ must be optimal in the estimation of any linear combination of phases. On the other hand, if such term cannot be neglected, we need that $v_i^2-v_{i+1}^2=0$ for all $v_i, v_{i+1}\neq 0$, namely, that all the non-vanishing components of $\vect{v}$ are equal in modulus. As anticipated, this condition identifies the generalized average phase estimation problem, with an arbitrary number of modes between $1$ and $d$. Evaluated at its minimum point and for $\vect{v}=\vect{v}_{\rm ave}$, Eq. \makeref{to_be_minimized} becomes \begin{equation} \min_{\vect{U},\, |\alpha_1|^2,\dots,|\alpha_d|^2}\Delta^2(\vect{v}_{\rm ave} \cdot \vect{\theta})_{\rm emom} = \frac{e^{-2r}\bar{n}_c +\bar{n}_s/d}{d\bar{n}_c^2}. \end{equation} Finally, we prove Eq. \makeref{DthetaaveQCR} for $\bar{n}_c\gg\bar{n}_s$ [equivalent to $\bar{n}_T \gg (d+1) \bar{n}_s$]. Setting $|\alpha_j|^2=\bar{n}_c$ for all $j$ in Eq. \makeref{EqAppB} and taking the limit $\bar{n}_c\gg\bar{n}_s$, one gets \begin{equation}\label{to_be_minimized_QFIM} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR}=\frac{e^{-2r}-1}{\bar{n}_c}\left(\sum_{i=1}^d\tilde{u}_iv_i\right)^2+\frac{1}{d\bar{n}_c}. \end{equation} This is just Eq. \makeref{to_be_minimized} lacking the last term. As already discussed above, the function in Eq. \makeref{to_be_minimized_QFIM} is minimized by choosing $\vect{\tilde{u}}=\sqrt{d}\vect{v}$, which corresponds to the condition used to get the upper bound. The saturation of the bound is only realized for $\vect{v}=\vect{v}_{\rm ave}$ since only in that case an even distribution of photons between the coherent modes, $|\alpha_j|^2=\bar{n}_c$ for all $j$, can be used to attain the minimum of $\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm eQCR}$. The right hand side of Eq.~(\ref{DthetaaveQCR}) is obtained, for any value of $\bar{n}_T$, assuming that conditions $\vect{\tilde{u}}=\sqrt{d}\vect{v}_{\rm ave}$ and $\vert \alpha_j \vert^2$ for all $j$ identify the optimal configuration of the sensor network, for any $\bar{n}_T$. These assumptions are confirmed by the results of numerical simulations shown in Fig. \ref{fig2}. \subsection{Demonstration of Eq. \makeref{gain2an}} To derive Eq. \makeref{gain2an}, we refer to Eq. \makeref{gain2} which gives the definition of $\mathcal{G}_2(\vect{v})$. We work in the regime $\bar{n}_c\gg e^{2r}\bar{n}_s$, which implies also $\bar{n}_c\gg e^{2r'_i}(\bar{n}'_s)_i$ for $i=1,\dots,d$ since, under the constraint $\mathcal{C}_2$, we have $\sum_{i=1}^d(\bar{n}'_s)_i=\bar{n}_s$. The sensitivity of the entangled strategy, $\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$, can be obtained from Eq. \makeref{to_be_minimized} by neglecting the last term, which needs not to be considered in such regime. The expression of $\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom}$, the sensitivity of the separable strategy, is derived from Eq. \makeref{sMOM}. In the limit considered, we only keep the first term both in the numerator and in the denominator of the inverse moment matrix, getting \begin{equation}\label{smomc2} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom}=\vect{v}^{T}\vect{\mathcal{M}^{-1}}\vect{v}=\sum_{i=1}^d\frac{e^{-2r'_i}}{\bar{n}_c}v_i^2. \end{equation} We then optimize the sensitivities of both strategies. In the previous section we proved that, when the rightmost term in Eq. \makeref{to_be_minimized} is negligible, the entangled strategy is optimized by the choice $\vect{\tilde{u}}=\sqrt{d}\vect{v}$, with \begin{equation} \min_{\vect{U}} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}=\frac{e^{-2r}}{d\bar{n}_c}.\end{equation} In order to make the minimization of Eq. \makeref{smomc2} as simple to perform, we need an extra condition that allows us to express $e^{2r'_i}$ as a simple function of $(\bar{n}'_s)_i=\sinh^2r'_i$. As a first case, we assume $r'_i\gg 1$, so that $e^{2r'_i}\approx 4(\bar{n}'_s)_i$. The method of Lagrange multipliers is very easily applied to this case, predicting the minimum \begin{equation} \min_{r'_1, ..., r'_d} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom}=\frac{e^{-2r}}{\bar{n}_c}\left(\sum_{i=1}^d|v_i|\right)^2, \end{equation} which is achieved for $(\bar{n}'_s)_i=\bar{n}_s|v_i|/\sum_{i=1}^d|v_i|$. We also find $\lambda=-(\sum_{i=1}^d|v_i|)^2/4\bar{n}_s^2$, $\lambda$ denoting the Lagrange multiplier associated with this optimization problem. It is easy to see that the ratio between the two sensitivities corresponds to Eq. \makeref{gain2an}. Notice that, for $v_i\to 0$, one has $(\bar{n}'_s)_i\to 0$ too, so that the approximation $r'_i\gg 1$ cannot be valid in such limit. We thus consider a second case, the limit $r'_i\ll 1$, which justifies the truncated series expansion $e^{-2r'_i}\approx 1-2r'_i\approx1-2\sqrt{(\bar{n}'_s)_i}$. Applying again the method of Lagrange multipliers, this time we find \begin{equation} \min_{r'_1, ..., r'_d} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom}=\frac{1}{d\bar{n}_c}-2\frac{\sqrt{\bar{n}_s}}{\bar{n}_c}\sqrt{\sum_{i=1}^d v_i^4} \end{equation} and $(\bar{n}'_s)_i=\bar{n}_s v_i^4/\sum_{i=1}^d v_i^4$, with $\lambda=\sqrt{\sum_{i=1}^d v_i^4}/\sqrt{\bar{n}_s}$. The expression of the gain is easily verified to be \begin{equation}\label{gain2new2} \mathcal{G}_2(\vect{v})= \left(1-2d\sqrt{\bar{n}_s}\sqrt{\sum_{i=1}^d v_i^4}\right)e^{2r}. \end{equation} In principle, both of the formulas for $\mathcal{G}_2(\vect{v})$, Eqs. (\ref{gain2an}) and (\ref{gain2new2}), are not expected to provide accurate predictions for non-uniform vectors $\vect{v}$, when $r'_i\gg 1$ and $r'_i\ll 1$ occur simultaneously, for different components $v_i$ of the same $\vect{v}$. So, it is interesting to note that Eqs. \makeref{gain2an} and \makeref{gain2new2} still give the correct value of the gain, $\mathcal{G}_2(\vect{v})=1$, when applied to the estimation of a single phase. Equation \makeref{gain2an} is found in good agreement with numerical results for all values of $\vect{v}$. \subsection{Demonstration of Eqs. \makeref{optsep2} and \makeref{gaindinf}} We demonstrate here Eq. \makeref{gaindinf}, which refers to the gain $\mathcal{G}_2(\vect{v}_{\rm ave})$ achieved in the estimation of the generalized average phase. Starting again from Eq. \makeref{sMOM}, with $|\alpha_j|^2=\bar{n}_c$, this time we can impose the less strict condition $\bar{n}_c\gg\bar{n}_s, (\bar{n}_s')_i$. As a consequence, we are only allowed to neglect the second term in the denominator of the inverse moment matrix, ending up with \begin{equation}\label{smomc3} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm smom}=\vect{v}^{T}\vect{\mathcal{M}^{-1}}\vect{v}=\sum_{i=1}^d\frac{\bar{n}_ce^{-2r'_i}+(\bar{n}_s')_i}{\bar{n}_c^2}v_i^2. \end{equation} Making use of the general relation $e^{2r_i'}=1+2(\bar{n}_s')_i+\sqrt{[1+2(\bar{n}_s')_i]^2-1}$, with $(\bar{n}_s')_i=\sinh^2r_i'$, which holds for any value of $r'_i$, and setting $\vect{v}=\vect{v}_{\rm ave}$, or $v_i^2=1/d^2$, we get \begin{equation} \Delta^2(\vect{v}_{\rm ave} \cdot \vect{\theta})_{\rm smom}=\frac{1}{d^2\bar{n}_c^2}\sum_{i=1}^d \frac{\bar{n}_c}{X_i+\sqrt{X^2_i-1}}+\frac{X_i-1}{2}. \end{equation} Here, we have set $X_i\equiv1+2(\bar{n}_s')_i$ for convenience. The function above has to be minimized with respect to the set of variables $\{X_i\}_{i=1,\dots,d}$ under the constraint $\sum_{i=1}^d X_i=X$, which comes from the original constraint $\sum_{i=1}^d(\bar{n}'_s)_i=\bar{n}_s$. Notice that $X=d+2\bar{n}_s$. Relying again on the method of Lagrange multipliers, we are able to show that the minimum point is $X_i=X/d$, which corresponds, as expected, to splitting $\bar{n}_s$ evenly between the $d$ MZIs used in the separable strategy: $(\bar{n}_s')_i=\bar{n}_s/d$. In this case, we find the following value for the Lagrange multiplier: $\lambda=1/(d^2\bar{n}_c^2)[\bar{n}_c(1-X/\sqrt{X^2-d^2})+1/2]$. Evaluated at its minimum point and for $\vect{v}=\vect{v}_{\rm ave}$, Eq. \makeref{smomc3} becomes \begin{equation} \min_{r'_1, ..., r'_d} \Delta^2(\vect{v}_{\rm ave} \cdot \vect{\theta})_{\rm smom} = \frac{\bar{n}_c e^{-2 r'} + \bar{n}_s/d}{d\bar{n}_c^2}, \end{equation} with $r' = {\rm arcsinh} \sqrt{\bar{n}_s/d}$. Taking the ratio with Eq. \makeref{optent2}, which expresses the optimal sensitivity of the entangled strategy, we find Eq. \makeref{gaindinf}. \subsection{Further discussion on Eq. (\ref{gain4_1})} In Fig.~\ref{fig8} we further clarify the behaviour of $\mathcal{G}_4(\vect{v}_{\rm ave})$ in a broad parameter regime. The dashed red line is the analytical Eq.~(\ref{gain4_1}), which is expected to be accurate for $\bar{n}_T \gg (d+1) \bar{n}_s$. The analytical formula predicts $\mathcal{G}_4(\vect{v}_{\rm ave})=1$ for $\bar{n}_T \gg d e^{2r} \bar{n}_s$ and a gain up to $\mathcal{G}_4(\vect{v}_{\rm ave})=d$ when $\bar{n}_T \ll (d+1) \bar{n}_s$. The solid line is $\mathcal{G}_4(\vect{v}_{\rm ave})$ where minimization over $\vect{U}$ is performed numerically. The quantity diverges at $\bar{n}_T = 2 d \bar{n}_s$ due to the divergence of Eq.~(\ref{Dthetasep4}), while $\min_{\vect{U}} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}$ remains finite. The dot dashed line shows the gain of the entangled strategy (with sensitivity calculate within the multimode moment-matrix approach) with respect to the quantum Cramer-Rao bound of the separable strategy: \begin{equation} \label{gain4CRB} \mathcal{\tilde{G}}_4(\vect{v}) = \frac{ \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm sQCR}}{\min_{\vect{U}} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom}}, \end{equation} where \begin{equation} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm sQCR} = \frac{1}{d[\bar{n}_c' e^{2r} + \bar{n}_s]}, \end{equation} under the constraints considered here. As we see from the figure, we obtain $\mathcal{\tilde{G}}_4(\vect{v}_{\rm ave})\leq 1$, even where $\mathcal{G}_4(\vect{v}_{\rm ave})$ diverges. In particular, $\mathcal{G}_4(\vect{v}_{\rm ave})=\mathcal{\tilde{G}}_4(\vect{v}_{\rm ave})=1$ for $\bar{n}_T \gg d e^{2r} \bar{n}_s$. \begin{figure}[t!] \includegraphics[width=\columnwidth]{newfig8.pdf} \caption{$\mathcal{G}_4(\vect{v}_{\rm ave})$ as a function of $\bar{n}_T$. The solid blue line is the result of a numerical optimization. The red dashed line is the analytical Eq.~(\ref{gain4_1}). The dot-dashed black line is Eq.~(\ref{gain4CRB}). Vertical dotted lines mark interesting values of $\bar{n}_T$~(see text). Here $d=10$ and $\bar{n}_s=100$.} \label{fig8} \end{figure} \subsection{Demonstration of Eqs. (\ref{ineq0}) and (\ref{ineq1})} Let us demonstrate Eq. (\ref{ineq0}): the demonstration of Eq. (\ref{ineq1}) is analogous. Equation (\ref{ineq0}) is a direct consequence of \begin{equation} \label{ineq2} \Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} = \vect{v}^T \vect{\mathcal{M}}^{-1} \vect{v} \geq \vert \vect{v} \vert^4 / \vect{v}^T \vect{\mathcal{M}} \vect{v}, \end{equation} $\vect{v}^T\vect{\mathcal{M}}\vect{v} \leq \vect{v}_{\mu_{\rm max}}^T\vect{\mathcal{M}}\vect{v}_{\mu_{\rm max}} = \mu_{\rm max}$ and $\vert \vect{v} \vert^2 = 1/d$. These imply the bound $\Delta^2(\vect{v} \cdot \vect{\theta})_{\rm emom} \geq 1/(\mu_{\rm max}d)$, which is saturable for $\vect{v}/\vert \vect{v} \vert = \vect{v}_{\mu_{\rm max}}$. The inequality (\ref{ineq2}) follows from the Cauchy-Schwarz inequality $(\vect{f}^T\vect{f})(\vect{g}^T\vect{g})\geq (\vect{f}^T\vect{g})^2$ with $\vect{f}=\vect{\mathcal{M}}^{1/2} \vect{v}$ and $\vect{g}=\vect{\mathcal{M}}^{-1/2}\vect{v}$ and is saturated if and only if $\vect{f} = \lambda \vect{g}$ for some real number $\lambda$, namely if and only if $\vect{v}$ is an eigenvector of $\vect{\mathcal{M}}$. Note that $\vect{\mathcal{M}}^{1/2}$ is well definite since $\vect{\mathcal{M}}\geq 0$: this follows from $\vect{\mathcal{M}}= \vect{C}^T \vect{\Gamma}^{-1} \vect{C}$, $\vect{\Gamma} \geq 0$ being a covariance matrix, and $\vect{\Gamma}^{-1} \geq 0$ being the inverse of a positive semidefinite matrix.
\section{Introduction} \proofreadfalse Hate speech is a type of online harm that expresses hostility toward individuals and social groups based on race, beliefs, sexual orientation, etc.~\cite{levy1986encyclopedia}. Hateful content \changemarker{is disseminated} faster and reaches \changemarker{wider} users than non-hateful contents through social media~\cite{MathewDG019,ziems}. This dissemination could trigger prejudices and violence. As a recent example of this, during the COVID-19 pandemic, people of Chinese origin suffered from discrimination and hate crimes~\cite{wang2021m,he2020discrimination}. Policymakers and social media companies work hard on mitigating hate speech and the other types of abusive language~\cite{preslav_survey_2021} while keeping balance of freedom of expression. AI systems are encouraged for easing the process and understanding the rationales behind hate speech dissemination~\cite{schmidt2017survey,FortunaN18}. In \changemarker{natural language processing}, hate speech has been widely studied in social media (e.g~\cite{DBLP:conf/semeval/BasileBFNPPRS19,poletto2020resources}) or as a task of news comment moderation (e.g ~\cite{korencic-etal-2021-block,shekhar2020automating}). \changemarker{However, m}ajority of the prior studies formulates the problem as a text classification~\cite{macavaney2019hate,schmidt2017survey} that determines whether an individual post is hate speech. This year, PAN 2021 \changemarker{organization~\cite{bevendorff:2021b}} proposed to explore the task as an author \changemarker{profiling problem~\cite{rangel:2021}}. In this case, the objective is to identify possible hate speech spreaders on Twitter as an initial effort towards preventing hate speech from being propagated among online users~\cite{rangel:2021}. In a similar shared task on profiling fake news spreaders~\cite{PardoGGR20}, many approaches rely on appending tweets to one text for each user (e.g~\cite{vogel2020fake,buda2020ensemble,Pizarro20}) to encode the inputs. However, this approach could be problematic if not all the tweets shared by hate speech spreader\changemarker{s} convey hatred message\changemarker{s}, and a human moderator needs \changemarker{a} detailed justification to ban users or delete related tweets. Furthermore, the global issues such as COVID-19 attract heated discussions from the users worldwide, thus there is a need for supporting multi-language systems to moderate those discussions. With these motivations, we propose a unified framework which is scalable to other languages and explains why a user receives a certain label based on the language used in her tweets by using token level and post level attention mechanisms~\cite{VaswaniSPUJGKP17}\changemarker{,} as shown in Figure~\ref{fig:system}. Our model outperformed multilingual DistillBERT~\cite{DBLP:journals/corr/abs-1910-01108} models. The source code is publicly available\footnote{\url{https://github.com/isspek/Cross-Lingual-Cyberbullying}}. \begin{figure*} \centering \includegraphics[width=\textwidth]{AuthorProfiling.png} \caption{The Proposed Framework} \label{fig:system} \end{figure*} \section{Methodology} Our proposed framework is shown in Figure~\ref{fig:system}. The input of the framework is a \changemarker{author} profile \changemarker{that} posts \textbf{n} number tweets. Each post is encoded with a Sentence Transformer, and then the encoded tweets pass through an attention layer. Finally, the output of the attention layer is fed into a classification layer which decides whether the \changemarker{author} is a hate speech spreader \changemarker{or not}. We give more details of each component in the subsequent sections. \subsection{Post Encodings} We encode the tweets with a Sentence-BERT (SBERT)~\cite{ReimersG19}\changemarker{,} a modified BERT~\cite{DevlinCLT19} network \changemarker{and} consists of Siamese and Triplet network structures. SBERTs are computationally more effective than BERT models and could provide semantically more meaningful sentence representations. Like BERT models, SBERTs \changemarker{also have} variations~\cite{DBLP:journals/corr/abs-1910-03771} that are publicly available. Since we have a limited resource to train our framework, and aim to use \changemarker{a} language model that learn\changemarker{s} the usages of social language, we prefer the pre-trained SBERT that is trained on Quora corpus in 50 languages\changemarker{,} and its knowledge is distilled~\cite{reimers-2020-multilingual-sentence-bert}. The SBERT produces outputs with 768 hidden layers. We set \changemarker{the} maximum length of the post as 32, and apply zero padding on any texts shorter than 32 tokens. The sentence embeddings are obtained by mean pooling operation on the last hidden of the outputs. \subsection{Post-Level Attention Layer} We employ an attention layer in order to learn importance scores for determining \changemarker{author profile vectors}. First, the pooled tweets (\textit{Hp}) are projected by feeding them to \changemarker{a} linear layer which produces \changemarker{a} hidden representation of \changemarker{the author} profile (\textit{Hap}) as shown in Equation~\ref{eq1}. Next, a softmax layer is applied to get the similarity between the post and \changemarker{author} profile \changemarker{(\textit{Hap})}. Lastly the similarity scores are multiplied with the \changemarker{author} profile to obtain \changemarker{the} attended \changemarker{author} profile (\textit{$Hap^{attended}$})\changemarker{,} as seen in Equation~\ref{eq2}. \begin{equation} \label{eq1} Hap=HpWap+b^{T} \\ \end{equation} \begin{equation} \label{eq2} Hap^{attended} = softmax({Hp*Hap^{T}})Hap \\ \end{equation} \subsection{Classification Layer} The classification layer consists of two linear layers. The output of the first layer is activated with \changemarker{the} tanh function to learn the non-linearity in the features. The second layer outputs the probabilities for \changemarker{each class}. The input of the classification layer is the attended user profile followed by a dropout layer which prevents the over-fitting. We use a cross entropy loss function for the outputs of the classification layer and an Adam \changemarker{optimizer with a weight decay}. \changemarker{During} training, the weights of the models are optimized by minimizing the loss, \changemarker{and} the batches contain mixed English and Spanish samples. \section{Experiments} \subsection{Dataset} PAN \changemarker{Profiling} Hate Speech Spreader \changemarker{Task~\cite{rangel:2021}} contains \changemarker{a} dataset in English and Spanish, whose samples were collected from Twitter. The total number of the profiles are 200 for each language\changemarker{,} and each profile \changemarker{is composed of a feed of 200 tweets}. The class distribution of the dataset is highly balanced. We observe a significant difference between the length of \changemarker{tweets} by hate speech spreader\changemarker{s} and normal profiles in the Spanish set. The statistics of the dataset \changemarker{are} summarized in Table~\ref{tab:data_stats}. \begin{table*}[] \caption{The statistics of the \changemarker{training} dataset} \centering \begin{tabular}{*{3}{l}r} \toprule \textbf{Stats} & \textbf{En} & \textbf{Es} \\ \toprule \#Total Profiles & 200 & 200 \\ \#Hate Speech Spreaders & 100 & 100 \\ \#Tweets per Profile & 200 & 200\\ \#Mean and Std of Tweets by hate speech Spreader& 67.72 $\pm$ 30.34 & 75.32 $\pm$ 28.91 \\ \#Mean and Std of Tweets by Normal Profiles& 67.42 $\pm$ 29.05 & 68.47 $\pm$ 28.99\\ \bottomrule \end{tabular} \label{tab:data_stats} \end{table*} \subsection{Preprocessing} The \changemarker{organizers have already cleaned the samples in the dataset}. For example, certain patterns have been replaced with special tags. We extend the vocabulary of the models' tokenizers with these tags as follows: \begin{itemize} \item \texttt{\#URL\#} is replaced with \texttt{[URL]} \item \texttt{\#HASHTAG\#} is replaced with \texttt{[HASHTAG]} \item \texttt{\#USER\#} is replaced with \texttt{[USER]} \item \texttt{RT} is replaced with \texttt{[RT]} \end{itemize} \subsection{Baselines and Ablation Models} We compare the performance of our model with a set of baselines and an ablation model as follows: \begin{itemize} \item \textbf{DistillBERT}~\cite{DBLP:journals/corr/abs-1910-01108}: We use one of its version that is multilingual and cased sensitive. First each tweets of an \changemarker{author} is joined to obtain one text. Then the joined texts for each users are fine-tuned with the DistillBERT by keeping their maximum length as 500 tokens. \item \textbf{DistillBERT{*}}: We additionally add \texttt{[POSTSTART]} and \texttt{[POSTEND]} tags, which \changemarker{indicate} the start and the end of the \changemarker{tweets}, to the vocabulary of the extended DistillBERT tokenizer. \item \textbf{SBERT-Mean}: is an ablation model that replaces the attention layer with a mean pooling layer which computes the mean values of the \changemarker{tweets'} hidden representations. \end{itemize} \subsection{Training Settings} We train the models by applying 5-Fold Cross Validation\footnote{We experiment also 10-Fold, but the models show worse performance in the test set.}, with the epochs of 5, learning rate as 1e-5, batch size as 2. We use the GPU of the Google Colab\footnote{\url{https://colab.research.google.com/}} as \changemarker{an} environment \changemarker{for training the models}. We use a fixed random seed of 1234 to ensure reproducible results. \changemarker{The official results are obtained by a TIRA machine~\cite{potthast:2019n}.} \section{Results and Discussion} We report the F1-Macro, F1-Weighted, accuracy, precision\changemarker{,} and recall for each model. Table~\ref{tab:5_fold} presents the results of the 5-fold cross validation training. SBERT-Attn, the model that we propose, outperformed the other models in all metrics. When we compare SBERT-Mean and SBERT-Attn, we see that standard deviations of the SBERT-Attn \changemarker{are} lower than the ablation model. This result indicates that the attention layer enables more generalized feature representations\changemarker{. It} also shows that the tweets by the hate speech spreader \changemarker{are} not necessarily hatred \changemarker{tweets} and vice versa for the \changemarker{non haters}. For this reason, the DistillBERT models that joins the all tweets by the user to one underperformed. \begin{table*}[!ht] \centering \caption{The results of the 5 Fold Cross Validation Experiment} \begin{tabular}{*{7}{l}r} \toprule \textbf{Models} & \textbf{F1-Macro} & \textbf{F1-Weighted} & \textbf{Accuracy} & \textbf{Precision} & \textbf{Recall }\\ \toprule \textbf{DistillBERT} & 67.46 $\pm$ 5.28 & 67.58 $\pm$ 5.37 & 67.75 $\pm$ 5.15 & 67.04 $\pm$ 5.68 & 71.46 $\pm$ 1.63 \\ \textbf{DistillBERT*} & 61.90 $\pm$ 3.01 & 62.04 $\pm$ 3.22 & 62.25 $\pm$ 3.39 & 63.13 $\pm$ 4.40 & 59.86 $\pm$ 7.49 \\ \midrule \textbf{SBERT-Mean} & 69.55 $\pm$ 6.82 & 69.58 $\pm$ 6.71 & 69.75 $\pm$ 6.86 & 67.38 $\pm$ 3.61 & 77.10 $\pm$ 12.12 \\ \textbf{SBERT-Attn} & \textbf{73.62} $\pm$ 4.11 & \textbf{73.77} $\pm$ 4.12 & \textbf{74.0} $\pm$ 4.14 & \textbf{70.97} $\pm$ 5.39 & \textbf{81.23} $\pm$ 5.39 \\ \bottomrule \end{tabular} \label{tab:5_fold} \end{table*} \begin{table*}[!ht] \centering \caption{Cross validation for each language and the PAN shared official result.} \begin{tabular}{*{3}{l}r} \toprule \textbf{Mode}& \textbf{Language} & \textbf{Accuracy} \\ \toprule Cross-Val & En & 67.09 $\pm$ 7.88 \\ & Es & 80.54 $\pm$ 1.78 \\ \midrule Official Result & En & 58 \\ & Es & 77 \\ \bottomrule \end{tabular} \label{tab:off_result} \end{table*} For the submission to the PAN shared task, we leverage the 5-fold trained models to obtain the predictions on official test set. The final predictions are the majority class. Table~\ref{tab:off_result} shows cross validation results for the English samples and the Spanish samples, and the official results of the PAN shared task where the accuracy is the evaluation metric. Our model obtained a result \changemarker{with} similar range in cross-validation. The performance of the English set is worse than the Spanish \changemarker{one}. Cultural bias or the topical difference could be reasons \changemarker{for} the performance. We leave the detail\changemarker{ed} analysis of these issues as future work. \section{Visualizations} \begin{figure}[!ht] \centering \includegraphics[width=\textwidth]{Multi-lang-Hatespeech-Profiling.png} \caption{Attention visualizations for English and Spanish. The original sentence in English is \changemarker{[USER] [USER] \textit{Yes, you're a part of feminism. And that's because you aren't a man};} and the other in Spanish is \changemarker{[USER] [USER] \textit{Le quedan grandes, como su vicepresidencia}} (Some emojis)} \label{fig:visualization} \end{figure} Our framework can provide explanations with \changemarker{tweet-level} and token-level attention, as shown in Figure~\ref{fig:visualization}. The token-level attentions are the average of the attentions in the last layer of the SBERT \changemarker{and} they are obtained through the self-attention mechanism. The \changemarker{tweet-}level attentions are obtained with the attention layer, which is connected to the classification layer. The examples in the figure are the most hatred examples from the \changemarker{authors} that are analysed. In \changemarker{the} English example, the model pays attention to feminism. In \changemarker{the} Spanish example, \textit{vice presidencia} is the important entity. \section{Conclusion} In this paper, we presented a unified framework for monitoring \changemarker{hate speech spreaders} in \changemarker{multilingualism}. The framework leverages \changemarker{multilingual} SBERT representations to encode texts regardless of \changemarker{the} language \changemarker{and} uses \changemarker{an} attention mechanism to determine the importance of the tweets by the \changemarker{author in} the task. Our method\changemarker{s} outperformed multilingual DistillBERT and SBERT that \changemarker{apply} mean pooling on the \changemarker{tweets.} In the future, we plan to evaluate the method on the related user profiling tasks such as \changemarker{profiling} fake news spreaders~\cite{PardoGGR20} and investigate advanced method (e.g~\cite{pfeiffer2020adapterhub}) for effectively transferring knowledge across the languages.
\section{Introduction} OK, I can't be bothered to make the rest of this be about VCG. What follows is the ACM's demo article. As a new technology, Wireless Sensor Networks (WSNs) has a wide range of applications \cite{Culler-01, Bahl-02, Akyildiz-01}, including environment monitoring, smart buildings, medical care, industrial and military applications. Among them, a recent trend is to develop commercial sensor networks that require pervasive sensing of both environment and human beings, for example, assisted living \cite{Akyildiz-02, Harvard-01,CROSSBOW} and smart homes \cite{Harvard-01, Adya-01,CROSSBOW}. \begin{quote} ``For these applications, sensor devices are incorporated into human cloths \cite{Natarajan-01, Zhou-06, Bahl-02, Adya-01} for monitoring health related information like EKG readings, fall detection, and voice recognition''. \end{quote} While collecting all these multimedia information \cite{Akyildiz-02} requires a high network throughput, off-the-shelf sensor devices only provide very limited bandwidth in a single channel: 19.2\,Kbps in MICA2 \cite{Bahl-02} and 250\,Kbps in MICAz. In this article, we propose MMSN, abbreviation for Multifrequency Media access control for wireless Sensor Networks. The main contributions of this work can be summarized as follows. \begin{itemize} \item To the best of our knowledge, the MMSN protocol is the first multifrequency MAC protocol especially designed for WSNs, in which each device is equipped with a single radio transceiver and the MAC layer packet size is very small. \item Instead of using pairwise RTS/CTS frequency negotiation \cite{Adya-01, Culler-01, Tzamaloukas-01, Zhou-06}, we propose lightweight frequency assignments, which are good choices for many deployed comparatively static WSNs. \item We develop new toggle transmission and snooping techniques to enable a single radio transceiver in a sensor device to achieve scalable performance, avoiding the nonscalable ``one control channel + multiple data channels'' design \cite{Natarajan-01}. \end{itemize} \section{MMSN Protocol} \subsection{Frequency Assignment} We propose a suboptimal distribution to be used by each node, which is easy to compute and does not depend on the number of competing nodes. A natural candidate is an increasing geometric sequence, in which \begin{equation} \label{eqn:01} P(t)=\frac{b^{\frac{t+1}{T+1}}-b^{\frac{t}{T+1}}}{b-1}, \end{equation} where $t=0,{\ldots}\,,T$, and $b$ is a number greater than $1$. In our algorithm, we use the suboptimal approach for simplicity and generality. We need to make the distribution of the selected back-off time slice at each node conform to what is shown in Equation~\eqref{eqn:01}. It is implemented as follows: First, a random variable $\alpha$ with a uniform distribution within the interval $(0, 1)$ is generated on each node, then time slice $i$ is selected according to the following equation: \[ i=\lfloor(T+1)\log_b[\alpha(b-1)+1]\rfloor. \] It can be easily proven that the distribution of $i$ conforms to Equation (\ref{eqn:01}). So protocols \cite{Bahl-02, Culler-01,Zhou-06,Adya-01, Tzamaloukas-01, Akyildiz-01} that use RTS/CTS controls\footnote{RTS/CTS controls are required to be implemented by 802.11-compliant devices. They can be used as an optional mechanism to avoid Hidden Terminal Problems in the 802.11 standard and protocols based on those similar to \citet{Akyildiz-01} and \citet{Adya-01}.} for frequency negotiation and reservation are not suitable for WSN applications, even though they exhibit good performance in general wireless ad hoc networks. \subsubsection{Exclusive Frequency Assignment} In exclusive frequency assignment, nodes first exchange their IDs among two communication hops so that each node knows its two-hop neighbors' IDs. In the second broadcast, each node beacons all neighbors' IDs it has collected during the first broadcast period. \paragraph{Eavesdropping} Even though the even selection scheme leads to even sharing of available frequencies among any two-hop neighborhood, it involves a number of two-hop broadcasts. To reduce the communication cost, we propose a lightweight eavesdropping scheme. \subsection{Basic Notations} As Algorithm~\ref{alg:one} states, for each frequency number, each node calculates a random number (${\textit{Rnd}}_{\alpha}$) for itself and a random number (${\textit{Rnd}}_{\beta}$) for each of its two-hop neighbors with the same pseudorandom number generator. \begin{algorithm}[t] \SetAlgoNoLine \KwIn{Node $\alpha$'s ID ($ID_{\alpha}$), and node $\alpha$'s neighbors' IDs within two communication hops.} \KwOut{The frequency number ($FreNum_{\alpha}$) node $\alpha$ gets assigned.} $index$ = 0; $FreNum_{\alpha}$ = -1\; \Repeat{$FreNum_{\alpha} > -1$}{ $Rnd_{\alpha}$ = Random($ID_{\alpha}$, $index$)\; $Found$ = $TRUE$\; \For{each node $\beta$ in $\alpha$'s two communication hops }{ $Rnd_{\beta}$ = Random($ID_{\beta}$, $index$)\; \If{($Rnd_{\alpha} < Rnd_{\beta}$) \text{or} ($Rnd_{\alpha}$ == $Rnd_{\beta}$ \text{and} $ID_{\alpha} < ID_{\beta}$)\; }{ $Found$ = $FALSE$; break\; } } \eIf{$Found$}{ $FreNum_{\alpha}$ = $index$\; }{ $index$ ++\; } } \caption{Frequency Number Computation} \label{alg:one} \end{algorithm} Bus masters are divided into two disjoint sets, $\mathcal{M}_{RT}$ and $\mathcal{M}_{NRT}$. \begin{description} \item[RT Masters] $\mathcal{M}_{RT}=\{ \vec{m}_{1},\dots,\vec{m}_{n}\}$ denotes the $n$ RT masters issuing real-time constrained requests. To model the current request issued by an $\vec{m}_{i}$ in $\mathcal{M}_{RT}$, three parameters---the recurrence time $(r_i)$, the service cycle $(c_i)$, and the relative deadline $(d_i)$---are used, with their relationships. \item[NRT Masters] $\mathcal{M}_{NRT}=\{ \vec{m}_{n+1},\dots,\vec{m}_{n+m}\}$ is a set of $m$ masters issuing nonreal-time constrained requests. In our model, each $\vec{m}_{j}$ in $\mathcal{M}_{NRT}$ needs only one parameter, the service cycle, to model the current request it issues. \end{description} Here, a question may arise, since each node has a global ID. Why don't we just map nodes' IDs within two hops into a group of frequency numbers and assign those numbers to all nodes within two hops? \section{Simulator} \label{sec:sim} If the model checker requests successors of a state which are not created yet, the state space uses the simulator to create the successors on-the-fly. To create successor states the simulator conducts the following steps. \begin{enumerate} \item Load state into microcontroller model. \item Determine assignments needed for resolving nondeterminism. \item For each assignment. \begin{enumerate} \item either call interrupt handler or simulate effect of next instruction, or \item evaluate truth values of atomic propositions. \end{enumerate} \item Return resulting states. \end{enumerate} Figure~\ref{fig:one} shows a typical microcontroller C program that controls an automotive power window lift. The program is one of the programs used in the case study described in Section~\ref{sec:sim}. At first sight, the programs looks like an ANSI~C program. It contains function calls, assignments, if clauses, and while loops. \begin{figure} \includegraphics{mouse} \caption{Code before preprocessing.} \label{fig:one} \end{figure} \subsection{Problem Formulation} The objective of variable coalescence-based offset assignment is to find both the coalescence scheme and the MWPC on the coalesced graph. We start with a few definitions and lemmas for variable coalescence. \begin{definition}[Coalesced Node (C-Node)]A C-node is a set of live ranges (webs) in the AG or IG that are coalesced. Nodes within the same C-node cannot interfere with each other on the IG. Before any coalescing is done, each live range is a C-node by itself. \end{definition} \begin{definition}[C-AG (Coalesced Access Graph)]The C-AG is the access graph after node coalescence, which is composed of all C-nodes and C-edges. \end{definition} \begin{lemma} The C-MWPC problem is NP-complete. \end{lemma} \begin{proof} C-MWPC can be easily reduced to the MWPC problem assuming a coalescence graph without any edge or a fully connected interference graph. Therefore, each C-node is an uncoalesced live range after value separation and C-PC is equivalent to PC. A fully connected interference graph is made possible when all live ranges interfere with each other. Thus, the C-MWPC problem is NP-complete. \end{proof} \begin{lemma}[Lemma Subhead]The solution to the C-MWPC problem is no worse than the solution to the MWPC. \end{lemma} \begin{proof} Simply, any solution to the MWPC is also a solution to the C-MWPC. But some solutions to C-MWPC may not apply to the MWPC (if any coalescing were made). \end{proof} \section{Performance Evaluation} During all the experiments, the Geographic Forwarding (GF) \cite{Akyildiz-01} routing protocol is used. GF exploits geographic information of nodes and conducts local data-forwarding to achieve end-to-end routing. Our simulation is configured according to the settings in Table~\ref{tab:one}. Each run lasts for 2 minutes and repeated 100 times. For each data value we present in the results, we also give its 90\% confidence interval. \begin{table}% \caption{Simulation Configuration} \label{tab:one} \begin{minipage}{\columnwidth} \begin{center} \begin{tabular}{ll} \toprule TERRAIN\footnote{This is a table footnote. This is a table footnote. This is a table footnote.} & (200m$\times$200m) Square\\ Node Number & 289\\ Node Placement & Uniform\\ Application & Many-to-Many/Gossip CBR Streams\\ Payload Size & 32 bytes\\ Routing Layer & GF\\ MAC Layer & CSMA/MMSN\\ Radio Layer & RADIO-ACCNOISE\\ Radio Bandwidth & 250Kbps\\ Radio Range & 20m--45m\\ \bottomrule \end{tabular} \end{center} \bigskip\centering \footnotesize\emph{Source:} This is a table sourcenote. This is a table sourcenote. This is a table sourcenote. \emph{Note:} This is a table footnote. \end{minipage} \end{table}% \section{Conclusions} In this article, we develop the first multifrequency MAC protocol for WSN applications in which each device adopts a single radio transceiver. The different MAC design requirements for WSNs and general wireless ad-hoc networks are compared, and a complete WSN multifrequency MAC design (MMSN) is put forth. During the MMSN design, we analyze and evaluate different choices for frequency assignments and also discuss the nonuniform back-off algorithms for the slotted media access design. \section{Typical references in new ACM Reference Format} In order to mitigate possible bias introduced by the ``First author et al.'' format when citing papers (coupled with the convention of alphabetically ordering authors), the style uses modified Natbib numeric citations in 2019. A paginated journal article \cite{Abril07}, an enumerated journal article \cite{Cohen07}, a reference to an entire issue \cite{JCohen96}, a monograph (whole book) \cite{Kosiur01}, a monograph/whole book in a series (see 2a in spec. document) \cite{Harel79}, a divisible-book such as an anthology or compilation \cite{Editor00} followed by the same example, however we only output the series if the volume number is given \cite{Editor00a} (so Editor00a's series should NOT be present since it has no vol. no.), a chapter in a divisible book \cite{Spector90}, a chapter in a divisible book in a series \cite{Douglass98}, a multi-volume work as book \cite{Knuth97}, an article in a proceedings (of a conference, symposium, workshop for example) (paginated proceedings article) \cite{Andler79}, a proceedings article with all possible elements \cite{Smith10}, an example of an enumerated proceedings article \cite{VanGundy07}, an informally published work \cite{Harel78}, a doctoral dissertation \cite{Clarkson85}, a master's thesis: \cite{anisi03}, an online document / world wide web resource \cite{Thornburg01, Ablamowicz07, Poker06}, a video game (Case 1) \cite{Obama08} and (Case 2) \cite{Novak03} and \cite{Lee05} and (Case 3) a patent \cite{JoeScientist001}, work accepted for publication \cite{rous08}, 'YYYYb'-test for prolific author \cite{SaeediMEJ10} and \cite{SaeediJETC10}. Other cites might contain 'duplicate' DOI and URLs (some SIAM articles) \cite{Kirschmer:2010:AEI:1958016.1958018}. Boris / Barbara Beeton: multi-volume works as books \cite{MR781536} and \cite{MR781537}. There is no longer any difference between citations that work like footnotes using \texttt{cite}/\texttt{citep}~\cite{Abril07} and citations that work like a part of speech using \texttt{citet}~\citet{Abril07}. \section{Introduction} From here on it's straightforward \LaTeX. In order to mitigate possible bias introduced by the ``First author et al.'' format when citing papers (coupled with the convention of alphabetically ordering authors), the style uses modified Natbib numeric citations in 2019. There is no longer any difference between citations that work like footnotes using \texttt{cite}/\texttt{citep}~\cite{Abril07} and citations that work like a part of speech using \texttt{citet}~\citet{Abril07}. \begin{acks} This is where we put acknowledgements. \end{acks} \bibliographystyle{ACM-Reference-Format} \section{Introduction} As the present millenial edition of the global economy unfolds, many authors and agencies have pointed out several undesirable features which have emerged. These are the paucity of "good" jobs, rising inequality, excessive consolidation, and the possibility of linkages between modern production and consumption processes with climate change. This paper deals with the the first two problems, {\em viz.}, the allocation of jobs and wages and rising inequality in wage incomes in the economy, and its structural determinants. For this purpose, we build a simple mathematical model, called the {\em Heterodox Model}, which illustrates some of the key features of the dependence of wages on the production and consumption parts of the economy. Our model has two parts, the production as determined by a technology matrix $T$, which utilizes $m$ labour classes and produces $n$ goods and determines quantities of goods produced, labour utilization and wages. This part assumes prices as a given, i.e., which cannot be changed. The second part is the consumption part, which is modelled as a Fisher market and a utility matrix $U$. This part of the economy assumes the production part as a given, i.e., wages and quantities of goods produced, and allocates goods based on wages (i.e., endowments or disposable incomes) held by each labour class, and determines prices. This paper shows the connection between $U$, the utility matrix and the wages obtained by various labour classes, as implemented by $T$. In other words, it traces the connection between personal consumption choice, with prices of goods, their production and finally wages received. Next, it shows that having a "private and real" utility $U_r $, and posting or posturing a different $U$ into the economy does indeed alter wages and has the potential to improve both the social welfare as well as the relative welfare for certain classes. This sets up the {\em consumer choice game}, where the manipulation of $U$ is the strategy, and the relative or total welfare, as measured by the allocation of goods and their utilities according to $U_r$, are the pay-offs. The manipulation of $U$ has been studied before, e.g., in connection with the impact of advertising on the competition between firms and their profitability. It has been used by pressure groups to label certain products, e.g., coffee, as "compliant" with a desirable idiom, e.g., fair wages to the coffee-bean picker. Our analysis is largely that of a closed economy and the study of its modes as functions of the parameters of the system. In classical terms, it is to develop and study, as a strategic game, the dependence of market equilibria on various parameters which define the economy. It is useful to point out earlier work on the {\em Fisher Market Game} \cite{c1},\cite{c3}\cite{c8}, where it was shown that going to the market with postured utilities $U$ (instead of the real ones, $U_r $) may indeed bring rewards in terms of more favourable allocations. However, that model relates only to the consumption side of the economy. Our aim is complement this by a simple production model to define a closed economy completely, so as to be able to find a consistent set of prices of goods, wages for each labour class, allocations of goods amongst classes so that an equilibrium exists in the economy. Then, building on the Fisher market concepts, we model the effects of strategizing on consumer preferences on wages, production and allocations. This work extends the Fisher Market Game conclusion that to show that, indeed consumer choice may be used to change wages as well. The model borrows from many existing models, specially so from the Arrow-Debreu model and its earlier cousin, the Fisher model, and philosophically, from Sraffa's accounting methods for calculating prices and wages \cite{c4} and labour inventory using the theory of value, the marginal production principle for calculating wages, and finally the use of utility functions to compute allocation of goods. The rest of the paper is organized as follows. In Section 2 we describe the Heterodox Model $\mathcal{H(C,P)}$ as composed of two interconnected systems, the consumption model ${\mathcal C}$ and the production model ${\mathcal P}$. The consumption model ${\mathcal C}$ consists of the key parameter $U$, the utility matrix, and the inputs as the endowments $w$ of agents, and $q$, the quantity of goods produced. The "output" variables are $p$, the prices, and $X$, the allocation of goods to labour classes (or agents). The production model ${\mathcal P}$ has the key parameter $T$, the {\em technology matrix}, and $Y$, the size of individual labour classes. The input variable is the price vector $p$. The outputs are the wages $w$, and the production vector $q$. We also define two global optimization functions $f_{\mathcal C}$ and $f_{\mathcal P}$, which couple ${\mathcal C}$ and ${\mathcal P}$. They also set up the {\em tatonnement} as an iterative interaction between ${\mathcal C}$ and ${\mathcal P}$ In Section 3, we further analyse the tatonnement process and exhibit certain non-convergent trajectories. Next, we associate combinatorial structures associated with equilibria and understand how they vary with the parameters of the economy, i.e., $T,Y$ and $U$. We use these results to define the $\mathcal{CCG}$, the {\em consumer choice game}, where $T,Y$ are fixed, and $U$ is the strategy space. We do this over a collection of open sets and show that explicit description of the game is obtained over these open sets. In Section 4, we use the above results to illustrate a particular market of three labour classes and three goods, and examine the vicinity of a particular fixed point $\mathcal{H}_3$. We use the combinatorial data associated with the fixed point, {\em viz.}, the Fisher solution forest, to explicitly construct the consumer choice game, i.e., the use of $U$ as strategies and the total utility as the pay-offs. We show that even within this open set, the strategic choice of $U$ makes eminent sense. In Section 5, we cast the Hetrodox market ${\mathcal H}$ as an Arrow-Debreu market. We show the equivalence of solutions of the Heterodox model, i.e., its fixed points, with the equilibria of the corresponding A-D market. Thus, this connects the two concepts and also gives an explicit description of the dependence of the A-D equilibria on the parameters of the economy. In Section 6, we go back to the combinatorial data arising from a fixed point. First, we show through a 2-player example, the decomposition of the strategy space, i.e., the $U$-space into various regions indexed by Fisher forests. This also leads to a correspondence ${\mathcal N}$ between the strategy space and the space of possible pay-offs. In other words, ${\mathcal N}\subseteq \mathbb{R}^2 \times \mathbb{R}^2$. We show that ${\mathcal N}$ is largely a 2-dimensional manifold. Finally, in Section 7, we conclude by pointing out what was achieved, its economic significance, and possible future directions. \section{The Heterodox model} We first list the basic parameters and internal variables of the Heterodox model. \subsection{The basic notations and assumptions} \begin{itemize} \item A good can be both, a fixed unit of service or an output of a manufacturing plant, made available in a fixed time interval, called {\em epoch}, for example, a year. The set of goods is denoted by ${\mathcal G}=\{ g_1 , \dots , g_n \}$. Also, $q$ is a ($n\times 1$) column vector with $q_j$ is the amount of good $g_j $ manufactured and $p$ is an $1\times n$ row vector with $p_j $ being the price of each good $g_j $, \item The whole population in the economy consists of agents divided into distinct classes, say according to their training. Thus, let ${\mathcal L}=\{ L_1 ,\ldots, L_k \}$ be these classes of labour, with each class $L_i $ willing to devote $Y_i $ units (e.g., person-years) of labour in every epoch. Thus, Y forms a $k\times 1 $ vector. \item Each (manufactured) good $g_j $ has exactly one production process or technology $T_j$ and each $T_j$ is a linear map $T_j : {\mathcal L} \rightarrow \mathbb{R}$. These tell us the amount of labour required from each labour-class to produce one unit of good $g_j $. The class of all such technologies is denoted by ${\mathcal T}$, which is represented as a $k\times m$-matrix $T$ with column $T_j $. Thus, in matrix $T$, $T_{ij}$ is the the amount of labour $L_i$ needed to produce $g_j$. \item For each $i$, there is a function $U_i :\mathbb{R}^n \rightarrow \mathbb{R}$, such that if $x\in \mathbb{R}^n $ is the bundle of goods allocated to $L_i $, then its utility to $L_i $ is given by $U_i(x)$. In fact, the utility $U_i $ is linear and $U_i (x)=\sum_j u_{ij} x_j $. We assume that for every good j, there is a buyer $i$ such that $u_{ij} > 0 $ and for every buyer $i$, there is a good $j$ such that $u_{ij}$ $>$ 0. \item We assume that utilities are same for all persons in one labour class and are measured in happiness per person per kilo units. For example, $u_{ij}$ is the happiness derived by a person from class $L_i$ by consuming a unit of good $G_j$. We denote the matrix formed by $u_{ij}$ entries as U. \noindent \end{itemize} Further, without loss of generality, we assume that for each labour class, there are technologies which utilize them. We also assume that the entries of $T,Y$ and $U$ are all in general position and satisfy no algebraic relation amongst themselves, with rational coefficients. \noindent \ \ We assume that for each epoch in an economy, there is a {\em non-negative} tuple \linebreak $(p,q,w,X)$ , where \begin{enumerate} \item $q$ is a $n\times 1$ column vector with $q_j$ is the amount of good $g_j $ manufactured, \item $p$ is an $n\times 1$ column vector and $p_j $ is the price of each good $g_j $, \item $w$ is an $1 \times k $ row vector where $w_i $ are the wages received by each person in labour class $L_i$ and finally, \item $X$ is a $k\times m$-matrix and $x_{ij}$, the total amount of good $G_j $ consumed by labour $L_i $ \end{enumerate} \subsection{The consumption space ${\mathcal C}$} Consumption in our economy is modelled as a Fisher market. Recall that, in a Fisher market, there are $k$ buyers (${\mathcal L}$, as in our case), and $m$ goods ${\mathcal G}$. Each agent $L_i $ is endowed with money $m_i$, and each good $G_j $ has quantity $q_j $ for sale. Solution of Fisher market is equilibrium prices $p = [p_j]_{j\in G}$ and allocations $X = [x_{ij} ]_{i\in B,j\in G}$ such that they satisfy the following two constraints \\ \noindent \textbf{Market Clearing}: Allocations are such that all goods are completely sold and the money of all the buyers is exhausted, i.e.\\ $\forall j \in G$, $ \sum _{i\in \mathcal{L}} x_{ij} = q_j$ \ and \ $\forall i \in \mathcal{L}$, $ \sum _{\in G} p_j x_{ij} = m_i$ \\ \noindent The consumption space is defined as: ${\mathcal C(m,q)=\{X,p | X,p \mbox{ satisfy market clearance} \}}$. \\ Next, on the set ${\mathcal C}(m,q)$ we define a solution to the Fisher market as one which satisfies:\\ \noindent \textbf{Optimal Goods}: Each buyer buys only those goods which give her the maximum utility per unit of money i.e if $x_{ij} > 0$, then $\frac {u_{ij}} { p_j} = \max \frac {u_{ik}} {p_{k}} $ \\ \noindent While the above condition appears to be a multi-objective optimization problem, it is known that solutions to Fisher market are optimal points of the Eisenberg-Gale maximization function, a money weighted combination of the utilities of the buyers. Adsul etc. \cite{simplex} too have given a convex program which captures the Fisher market solution as global optima. We denote such a global function as $f_{\mathcal C}$. We now illustrate the Fisher market $\mathcal{C}$ through an example.\\ \noindent \textbf{\textit{Example - 1}}. Consider a 2 buyers, 2 goods market with $m_1 = 4, m_2 = 1, q_1 = 2, q_2 = 2$, $(u_{11}, u_{12} ) = (1, 0.4)$ and $(u_{21}, u_{22}) = (0.5, 1)$. The equilibrium prices of this market are $(p_1, p_2) = ( 1.79, 0.71)$ and the unique equilibrium allocation is $ (x_{11}, x_{12}, x_{21}, x_{22}) = (2, 0.6, 0, 1.4)$. \\ We also note that when utilities $U,m$ and $q$ are generic, i.e. satisfy no algebraic relation amongst themselves with rational coefficients, then, the optimal solution to the Fisher market defines a unique weighted forest \cite{c1}: Let V(H) = ${\mathcal L} \cup {\mathcal G}$ and $E(H)=\{(i,j)| x_{ij}>0 \}$. For instance, the forest corresponding to Example 1 given above has four nodes $ (L_1 ,L_2, g_1, g_2)$ and three edges ($ e_{11}, e_{12}, e_{22}$) with weights $ (2, 0.6, 1.4)$ respectively i.e. the bipartite graph is a unique tree with three edges. \subsection{The production space ${\mathcal P}$} The production space ${\mathcal P}(p)$ is the collection of all wages $w$ and quantities $q$ such that: \begin{align} Tq \leq Y \\ q_j \cdot (p_j - (wT)_j) \geq 0 \\ q\geq 0 \label{eqn2} \end{align} Note that the first condition states that the quantities of goods produced are limited by labour constraints, while the second says that unprofitable goods are not produced. The global maximization function $f_{\mathcal P}$ is defined as $\sum_j p_j q_j$, i.e, revenue maximization. However, we must specify how wages $w$ get decided. For this, we consider the following relaxation LP program: \begin{equation} \label{eq8} \begin{matrix} \displaystyle \max_q & p^T q \\ \textrm{s.t.} & T q & \leq & Y \\& \displaystyle \ q_j & \geq & 0 & & \forall j \in G \end{matrix} \end{equation} \noindent To find the wages, we consider its dual program - \begin{equation} \begin{matrix} \label{eq9} \displaystyle \min_{\lambda_{1}} & \lambda_1^T Y \\ \textrm{s.t.} \ & \displaystyle \lambda_1^T T \geq p^T \\ \end{matrix} \end{equation} Or \[\left[ \begin{array}{cc} \lambda_1 & \lambda_2 \end{array} \right] \cdot \left[ \begin{array}{c} T \\ -I \end{array} \right] = \left[ \begin{array}{c} p \end{array} \right] \] \\ where $\lambda_{1}$ and $\lambda_{2}$ correspond to the dual variables associated with the first and second inequalities respectively. Here, $\lambda_1$ and $\lambda_2$ are $1\times m$ and $1\times n$ vectors respectively. \\ We take $w=\lambda_1 $ as the wages determined by $f_{\mathcal P}$. Karush-Kuhn-Tucker (KKT) conditions for the primal and dual program have the following implications- \begin{enumerate} \item If $q_i > 0$, then $\lambda_{2i}=0$.\\ Therefore, it follows from (\ref{eq9}) that $\lambda_{1i}T_i= p_i$ i.e. $wT_{i} = p_i$.\ \item If $\lambda_{1i}T_i \neq p_i$ i.e. $wT_{i} \neq p_i$, then $q_i = 0$ as $\lambda_{2i} \neq 0$. \item If $(Tq)_i < Y$, then $\lambda_{1i} = 0$, i.e. corresponding $w_i$ is zero. \item Similarly, if $w_i > 0$, then $(Tq)_i = Y_i$. \end{enumerate} In particular, we see that the inequality in the dual program, {\em viz.} $w^T T \geq p^T$, is opposite of the required constraint. However, in accordance with \ref{eqn2}, complementary slackness implies $q_j(p_j - (wT)_j) =0$. The conditions reduce T to a square matrix $T^{'}$ where all constraints are satisfied and tight for the active goods and classes. Let the corresponding prices, production and wages be $p',q',w'$. We can find the dual variables $\lambda_1$ i.e. wages as a product of $T^{'-1}$ and $p'$. We see that the tight equation $p' = w'T^{'}$ can also be derived through the marginal law of production. We also see that total money is conserved in the economy, i.e. $pq = wTq = wY$ holds true. This sets up a remarkable result which connects wages and production amounts as the dual variables of each other. \subsection{A {\em tatonnement} process} We now set up the {\em tatonnement}. The basic objective of the tatonnement process is to arrive at an equilibrium $\eta =(p,q,w,X)$ such that (i) $p,X$ are the outputs of the consumption side Fisher market if input the money vector $w\cdot Y$, and quantities $q$, and (ii) $q,w$ are the optimal solutions on the production side on input $p$. The process begins with a candidate $\eta $ and checks first if $\eta $ is indeed an equilibrium. If not, it updates alternately, the consumption side and the production side. The detailed description of the iterator function is given below. \begin{enumerate} \item Input $\eta_0 =(p_0 , q_0, w_0 ,X_0 )$. Put $n=0$. \item We first check if the state $(p_n, q_n, w_n, X_n)$ is an equilibrium. This is done by first checking if $(q_n,w_n)$ is an optimal solution to $f_{\mathcal{P}}$ in the process $\mathcal{P}$ with input $p_n$. Next, we check if $(p_n,X_n)$ satisfy the optimality conditions for the function $f_{\mathcal{C}}$ with inputs $(W_n,q_n)$ (where $W_n=w_n \cdot Y$, the total wages. If it does indeed satisfy both conditions, we declare the point $\eta_n $ as a {\bf \em Heterodox equilibrium}. \item If $\eta_n $ is not in equilibrium, we follow the iterative steps below. \item Using $p_n$, we first compute $(q_{n+1},w_{n+1})$ by optimizing $f_{\mathcal{P}}$. This is the $n$-th production-side update. \item We next find $(p_{n+1},X_{n+1})$ through the process $f_{\mathcal{C}}$ using the input $(q_{n+1},W_{n+1})$. \item Note that $p_{n+1}$ does not set prices for goods not produced. These are set, assuming that a small $\epsilon$ is indeed produced and predicting its price. Thus if $b_1 , \ldots, b_k$ are the maximum bang per buck values for the players, then \\ \[ p_j = \max_{i} \frac {u_{ij}} {b_i} \] \\ This tells us that when these Fisher-like prices are offered, for (at least) one player, the maximum bang per buck ratio equals the ratio these prices give, making the player buy the good. The computation of $p$ as before and its modification is called $\mathcal{C}(n)$, i.e., the $n$-th consumption-side update. \item This completes the definition of $\eta_{n+1}$. We go back to Step 2. \end{enumerate} We now illustrate two examples of equilibria obtained through the above iterative process.\\ \textbf{\textit{Example 2 :}} Let us consider a 3 classes - 3 goods market with following specifications for technology, utility and labour availability.\\ \[ T=\left[ \begin{array}{ccc} 1 & 0 & 2 \\ 3 & 4 & 0 \\ 0.5 & 2.5 & 2 \end{array} \right] ; \: U=\left[ \begin{array}{ccc} 1.5 & 0.41 & 0 \\ 0.58 & 1.1 & 0.2 \\ 0.5 & 1.4 & 0.6 \end{array} \right] ; \: Y=\left[ \begin{array}{c} 1 \\ 1 \\ 1 \end{array} \right] \: \] Starting with the price vector $[ 0.7379, \ \ 0.9379, \ \ 0.3617 ] $, the {\em tatonnement} process converges to an equilibrium point in 3 iterations, with the prices, production and wages in each iteration given by- \[\left[ \begin{array}{c} p_1\\ p_2 \\ p_3 \\ p_4 \end{array} \right]= \left[ \begin{array}{ccc} 2.0408 & 3.8706 & 0.7037 \\ 1.5961 & 3.027 & 1.2973 \\ 1.5099 & 2.8636 & 1.2273 \\ 1.5099 & 2.8636 & 1.2273 \end{array} \right] ; \] \[ \left[ \begin{array}{c} q_1\\ q_2 \\ q_3 \\ q_4 \end{array} \right]=\left[ \begin{array}{ccc} 0.2632 & 0.0526 & 0.3684\\ 0 & 0.25 & 0.1875 \\ 0.2631 & 0.0526 & 0.3684\\ 0.2631 & 0.0526 & 0.3684 \end{array} \right] ; \] \[ \left[ \begin{array}{c} w_1\\ w_2 \\ w_3 \\ w_4 \end{array} \right] =\left[ \begin{array}{ccc} 0.31636 & 0.52007 & 0.16357 \\ 0 & 0.68 & 0.32 \\ 0.086693 & 0.3865 & 0.52681\\ 0.086693 & 0.3865 & 0.52681\\ \end{array} \right] \] And the allocations are given by the forest- \begin{center} \includegraphics[width=2.8cm]{exm1.png} \end{center} \textbf{\textit{Example 3 :}} Let us now consider a $(2 \times 2 )$ market with the following market specifications - \[ T=\left[ \begin{array}{cc} 0.25 & 0 \\ 0.25 & 1 \end{array} \right] ; \: U=\left[ \begin{array}{cc} 1 & 0.81 \\ 1.234 & 1 \end{array} \right] ; \: Y=\left[ \begin{array}{c} 2 \\ 4 \end{array} \right] \: \] The {\em tatonnement} process converges to the following output of prices, production and wages, when it starts with $p_0$ = $[0.14196 , \ \ 0.75972]$ \[ \left[ \begin{array}{c} q_1\\ q_2 \\ q_3 \end{array} \right]=\left[ \begin{array}{cc} 0 & 4\\ 8 & 2 \\ 8 & 2 \end{array} \right] \] \[ \left[ \begin{array}{c} p_1\\ p_2 \\ p_3 \end{array} \right] = \left[ \begin{array}{cc} 0.3085 & 0.25 \\ 0.10394 & 0.084232\\ 0.10394 & 0.084232 \end{array} \right] \] \[ \left[ \begin{array}{c} w_1\\ w_2 \\ w_3 \end{array} \right] =\left[ \begin{array}{cc} 0 & 1\\ 0.66307 & 0.33693 \\ 0.66307 & 0.33693 \end{array} \right] \] The solution forest and the allocations are - \begin{center} \includegraphics[width=2.8cm]{exm2.png} \end{center} \section{Equilibria and the Consumer Choice Game} In this section, we illustrate the working of the tatonnement algorithm where it fails to converge. Next we analyse the combinatorial structure of equilibria, where we show that these structures are local invariants. This is then used to define the consumer choice game. \subsection{Analysis of the Tatonnement process} The {\em tatonnement } process does not always converge. We illustrate with an example, where it alternates between two or more states. In each state, a different production set and/or set of active classes is chosen, though there may be overlaps of multiple active goods/classes. This happens when production and consumption do not agree on a common set of active goods and classes, but cyclically choose two or more states. \\ \textbf{\textit{Example 4} :} Let us now consider a 3 classes - 3 goods market with following specifications.\\ \[ T=\left[ \begin{array}{ccc} 0.05 & 1 & 0.9 \\ 0.5 & 0.8 & 0.15 \\ 0.4 & 0.5 & 0.4 \end{array} \right] ; \: U=\left[ \begin{array}{ccc} 0.2 & 0.3 & 0.8 \\ 0.9 & 0.2 & 0.4 \\ 0.25 & 0.85 & 0.33 \end{array} \right] ; \: Y=\left[ \begin{array}{c} 10 \\ 10 \\ 10 \end{array} \right] \: \] The production, prices and wages, as computed by the function described before, are- \[ Prod=\left[ \begin{array}{ccc} 4.35 & 9.78 & 0 \\ 14.7 & 0 & 10.3 \end{array} \right] ; \: Prices= \left[ \begin{array}{ccc} 0.11 & 0.05 & 0.14 \\ 0.04 & 0.12 & 0.05 \end{array} \right] ; \: Wages =\left[ \begin{array}{ccc} 0.52 & 0.48 & 0 \\ 0.12 & 0 & 0.88 \end{array} \right] \] The above two states toggle cyclically. In this case it is not possible for a state to exist where all goods and classes are simultaneously active. The solution involves two states, where class-1 and good-1 are active in both of them and other goods and classes alternate between the two. In general, we see the following necessary condition for an equilibrium to exist with a given set of active goods and classes. - For all goods ($j$) that are not active in the economy, \[p_j = \max_i \frac{u_{ij}}{b_i} \text{ (U- Level}) < \sum_i T_{ij}w_i \text{ (T- Level})\] As we see earlier, if a good is not produced, it is allotted a Fisher like price, which is the $U$-level defined above. All produced goods have their prices greater than or equal to their $U$ levels. It is clear that if $U$-Level for an unproduced good $j$ is more that its $T$-Level i.e. $p_j > (w \cdot T)_j$, then it being profitable, that good becomes active in the next iteration, by perhaps pushing a less efficient good out of production. As seen from the examples, this method does work similar to the {\em tatonnement} process given in Walrus' theory of general equilibrium \cite{c11}. It too starts with a price vector, computes production and wages and gives a next set of prices based on these market variables. It is clear that the process terminates if and only if it attains an equilibrium. From the above example, it can be observed that the process may not always converge, and there may be toggling states. Moreover, it can be shown that equilibria whose Fisher forests are disconnected are unlikely to arise from the above process, even though they are fixed points. We thus make a distinction between a heterodox equilibrium or a fixed point and a limit point of the {\em tatonnement} process. However, as we show in Section 5, the Heterdox market has an equivalent Arrow-Debreau market. Whence, via the general theory of existence of equilibria, i.e., via Prop. \ref{P1} and \ref{P2} of the equivalence of the two, for any parameter set $(T,U,Y)$, satisfying certain broad conditions, a Heterodox equilibrium, i.e., a fixed point, always exists, but this need not be unique and it need not arise as a limit point. \subsection{Generic equilibrium and combinatorial data} We now associate a suitable combinatorial data with an equilibrium point $\eta =(p,q,w,X)$ for the parameters $T,Y,U$ of the economy. Define $I(\eta )=\{ i|w_i >0\}$, $J(\eta )=\{ j|q_j >0\}$ and $F(\eta )=\{ (i,j)| X_{ij}>0\}$. The combinatorial data identify key features of the equilibrium, e.g., the labour classes with non-zero wages, the goods produced, and the Fisher forest, i.e., the price-determining consumptions. We now define the notion of `generic-ness', which allows us to construct the equilibrium from its combinatorial data, and to extend such equilibria at a point to its vicinity. \begin{definition} We say that $\eta $ is a generic equilibrium if (i) for $j\not \in J(\eta )$, we have $(wT)_j >p_j $, and (ii) for $(i,j) \not \in F(\eta )$, we have $u_{ij}/p_j < \max_k u_{ik}/p_k $. \end{definition} Let us now fix $T,Y$ and vary $U$ over $\mathcal{U}=\mathbb{R}^{m\times n}$. Given a $U\in \mathcal{U}$, and an equilibrium point $\eta $ with the parameters $T,Y,U$, of the economy, we say that $\eta $ sits over $U$, since it is for this element of $\mathcal{U}$, that $\eta $ was observed. Theorem \ref{T1} relates to the existence of generic equilibria. \begin{theorem} \label{T1} Let $T,Y,U$ be matrices in general position, i.e., there be no algebraic relationship between the entries, with rational coefficients. Given an equilibrium $\zeta $ over $U$, there are arbitrarily close $U'$ and equilibria $\eta$ sitting over $U'$ which are generic. Moreover, if $\eta $ has $m$ wage-earning labour classes, i.e., $|I(\eta )|=m$ and $n$ goods produced, i.e., $|J(\eta )|=n$, then the number of connected components ($k$) of the solution Fisher forest $F(\eta )$ is at least $n-m+1$. \end{theorem} \begin{proof} Appendix-B. \end{proof} It is an important question if the data $(I,J,F)$ does indeed determine $\eta $, the equilibrium. This is summarized in the next theorem. \begin{theorem} \label{T2} Again, let $T,U,Y$ be in general position and $\eta $ be a generic equilibrium over $U$ with the combinatorial data $(I,J,F)$, then the parameters of $\eta $, viz., $p,w,q$ are solutions of a fixed set of algebraic equations in the coefficients of $U$. For an open set of the parameter space of $\mathcal{U}$, the equilibria, as guaranteed by Prop. \ref{P1}, \ref{P2}, are generic and have the same combinatorial data as $\eta$. \end{theorem} \begin{proof} The combinatorial data does give us the relationships $w_I T_{I,J}=p_J$ and $T_{I,J}q_J =Y_I$. From this it follows that $|I|\leq |J|$ for otherwise there would be an algebraic relationship between $T$ and $Y$. However, if $|I|=|J|$, and $k=1$, then $w$ is determined by $p$ and $q$ by $Y$. Since the forest $F$ is connected, $p$ is determined upto a scalar multiple and thus the whole system is solved. In summary, if $|I|=|J|$ and $k=1$, there is a unique $\eta $ sitting above this combinatorial data. However, in the general case, we must first append to the variables $q_J $, a suitable subset $\{ p_1 ,\ldots ,p_{k'}\}$, as in Appendix B.2. The $w$'s and the remaining $p$'s are expressible as homogeneous linear combinations of these $k'$ prices. Next, to the linear set of equations $T_{I,J}q_J =Y_I$ we add the $k-1$ independent money conservation equations to solve these simultaneously. Unfortunately, the conservation equations involve terms $p_i q_i $'s and are quadratic in the chosen variables with coefficients in the entries of $U$. Once these are solved, all other variables are known and the equilibrium point is reconstructed. Thus, over a given combinatorial data, we get an algebraic system with coefficients in $U$, but with finitely many solutions. By standard algebraic geometry results, other than a over a closed algebraic set, these solutions depend smoothly on the entries of $U$. \end{proof} \subsection{The Consumer Choice Game} We now define the consumer choice game $\mathcal{CCG} (T,Y)$, which is parametrized by the technology matrix $T$ and the labour inventory $Y$, which are henceforth assumed to be fixed. The players are the labour classes, i.e., ${\mathcal L}=\{ L_1 ,\ldots ,L_k \}$. The strategy space $S_i $ for player $i$ is the utility "row" vector $(u_{i*}) \in \mathbb{R}^n$. These rows together constitute the matrix $U$. This strategy space is denoted by ${\mathcal U}$. We also assume that there is a "real" utility matrix $U_r $ which is used to measure outcomes. Given a play $U$, the outcome is given by an $\eta (U)=(q,w,y,p,X)$, an equilibrium over $U$ obtained in the Heterodox market. The payoffs, $\mathbb{U}_i (X)= \sum_j (U_r )_{ij}x_{ij}$, i.e., the equilibrium allocations evaluated by each player on their true utilities, define the preference relations for each player. Let us now construct the pay-off functions in the vicinity of a generic equilibrium point $\eta (U)$ with the combinatorial data $(I,J,F)$. We first see that there is an open set $O_{I,J,F} \subseteq {\mathcal U}$ containing $U$ which has the same combinatorial data $(I,J,F)$. The exact inequalities defining $O_{I,J,F}$ arise from the requirement that the Fisher forest $F$ have non-negative flows in all edges of $F$, that the edge $(i,j)\not \in F$ has an inferior bang-per-buck, and that $(wT)_j -p_j >0$ for $j\not \in J$. As an example, consider an edge $(i,j)\in F$, and the requirement that the flow in this edge be positive. Now, the flow in this edge is a suitable linear combination of the wages $w$'s, prices $p$'s and quantities $q$'s. As we have argued before, these in turn, are smooth functions of the entries of $U$. Thus the condition that flow in the edge $(i,j)$ be positive is the requirement that $f(U)>0$ for a suitable smooth function $f$ on $U$. Thus, there is indeed such an open set $O_{I,J,F}$, and the pay-off functions are solutions of algebraic equations in the entries of $U$, the coefficients of which depend on the combinatorial data $(I,J,F)$. This gives us Theorem \ref{T3} below. \begin{theorem} \label{T3} For a generic equilibrium point $\eta (U)$ with the combinatorial data $(I,J,F)$, there is an open set $O_{I,J,F} \subseteq {\mathcal U}$ containing $U$ and a smooth family $\eta'(U')$ of equilibria for each $U'\in O_{I,J,F}$ such that (i) $\eta '(U)=\eta (U)$ and (ii) the combinatorial data for $\eta'(U')$ is $(I,J,F)$. \end{theorem} The pay-off function in general is to be pieced together by such a collection of open sets, indexed by the combinatorics. On non-generic $U'$, the equilibrium $\eta (U')$ will have multiple feasible allocations and this determines a correspondence between the strategy space ${\mathcal U}$ and $\mathbb{R}^k $, the pay-off space. Even for a generic $U$, there may be multiple equilibrium points, viz., $\eta_1 ,\ldots, \eta_k $, and each of these will define an analytic sheet of the correspondence over the generic open set. We now demonstrate the theory described so far through a $3 \times 3$ market. \section{An Example} In this section, we describe an economy with three labour classes and three goods, viz., $\mathcal{H}_3$ and construct the {\em consumer choice game} where two of the labour classes engage in strategic behaviour. Let $I=J=\{ 1,2,3 \}$. Let $T,U,Y$ be as given below: \[ T=\left[ \begin{array}{ccc} 1 & 0 & 0 \\ 1 & 2 & 0 \\ 1 & 2 & 4 \end{array} \right] \: Y=\left[ \begin{array}{c} 1 \\ 10 \\ 100 \end{array} \right] \: U_r=\left[ \begin{array}{ccc} 1 & 0 & 0 \\ 1 & 1 & 0 \\ 0 & 1 & 1 \end{array} \right] \: \mathbb{S}=\left[ \begin{array}{ccc} 1 & 0 & 0 \\ \alpha & 1 & 0 \\ 0 & \beta & 1 \end{array} \right] \: \] There are 3 labour types, with numbers 1, 10 and 100 respectively. $L_1 $ only prefers good $G_1 $, $L_2 $ only $G_1,G_2$ and $L_3 $ prefers $G_2$ and $G_3 $ as shown in the true utilities $U_r $. The example can be understood as an instance of a market with three socio-economic classes and a good such as footwear which is produced in three different ways or qualities. In such cases, the given utility matrix catches the general preference towards the goods produced by different classes. Let us consider labour class 2 and 3 as the players who exercise their strategies by choosing the variables $\alpha $ and $\beta $. This defines the strategy space $\mathbb{S}$ as shown above. Note that $U_r \in \mathbb{S}$. We compute (i) the dependence of the pay-offs on $\alpha $ and $\beta $, and (ii) the sub-domain of $\mathbb{S}$ over which the chosen forest $F$ below is the equilibrium forest. We first solve for the production part. \\ We see that $Tq=Y$ gives: \[ q=T^{-1} Y =\left[ \begin{array}{ccc} 1 & 0 & 0 \\ -0.5 & 0.5 & 0 \\ 0 & -0.25 & 0.25 \end{array} \right] Y \: =\left[ \begin{array}{c} 1 \\ 4.5 \\ 22.5 \end{array} \right] \] thus, the production is determined. Next, we use $p=wT$, \[ w=\left[ \begin{array}{ccc} w_1 & w_2 & w_3 \end{array} \right] = \left[ \begin{array}{ccc} p_1 & p_2 & p_3 \end{array} \right] \cdot T^{-1}= \left[ \begin{array}{ccc} p_1 -p_2/2 & p_2/2 -p_3/4 & p_3/4 \end{array} \right] \: \] This describes wages in terms of prices. All this does not need the equilibrium forest $F$. For the consumption and allocation processes, let us assume that the solution forest $F$ is given by: \begin{center} \includegraphics[width=2.5cm]{het3.png} \end{center} Note that this forest is motivated by the utility matrix given earlier. Using Fisher market constraints of optimum utility, we can write these equations : \[ p_1 /\alpha=p_2 \: \mbox{ and }\: p_2 /\beta =p_3 \] Conserving the total money while allotting the goods, the equations result in the following money flows, with the conditions that $2p_1 -p_2 > 0$, $9p_2 -5p_3 \geq 0$: \begin{center} \includegraphics[width=3.5cm]{het2.png} \end{center} The flows mentioned on edges are the amounts spent by classes on the corresponding goods. This conditions reduce to the requirements that $\alpha > 0.5$ and $\beta > 5/9$. Under these conditions, $F$ will arise as the equilibrium forest. Assuming total money in the economy as 1, we find class wages and allocations as functions of $\alpha$ and $\beta$ \[w_1=\frac {\beta(2\alpha-1) }{2\alpha\beta+9\beta+45 } ,\ \ \ x_{11} = 1- \frac{0.5}{\alpha}\] \[w_2=\frac {5(2\beta-1)} {2\alpha\beta+9\beta+45 } ,\ \ \ x_{21} = \frac{0.5}{\alpha}, \ \ x_{22} = 4.5 - \frac{5}{2\beta}\] \[w_3=\frac {50} {2\alpha\beta+9\beta+45 } ,\ \ \ x_{32} = \frac{5}{9\beta}, \ \ x_{33}= 22.5\] where $w_i$ are the class wages and dividing those by the number of people yields the values per person in each class. We see that $\alpha, \beta$ have significant impact on wages and allocations and thus, can be used as strategies. For example, if class-2 decides to keep the value of $\alpha$ at 0.75 as opposed to 1, the wage share of class-1 decreases and thereby that of class-2 improves. Moreover, the allocations also increase. For this forest, i.e., in the region $\alpha >0.5$ and $\beta >5/9$, the pay-offs based on the true utility $U_r $ are given below as functions of $\alpha, \beta$. \[u_1 = 1- \frac{0.5}{\alpha}\] \[ u_2 = 4.5 + \frac{0.5}{\alpha} - \frac{5}{2\beta}\] \[ u_3 = \frac{5}{9\beta}+ 22.5\] It is clear that decreasing $ \alpha$ and $\beta$ are the strategies for class-2 and 3. In fact, the impact of $\beta $ on $L_2 $ is more significant than on $L_3 $, and it would be in the interest of $L_2 $ and $L_3 $ to squeeze $L_1$ through the use of $\alpha $. Moreover, We see that multiple equilibrium forests are possible here, depending on $\alpha$ and $ \beta$, including the one given above. For each of them, the number of active classes may be different and thus the utility functions will vary. In fact, for a sufficiently small value of $\beta$, class-2 and thereby class-1 receive no wages. In this case, only good-3 is produced and its utility for class-3 is 25. This exceeds the utility of 23.5 which comes from the forest described above. This illustrates that the local combinatorial data is sufficiently explicit to enable the computation of the pay-off functions. Moreover, significant benefits may accrue to players if they utilize the freedom of posturing their utility functions. \section{Connecting the Heterodox model with the A-D Market} The objective of this section is to construct an Arrow-Debreu (A-D) market $\bar{AD}$ from the heterodox model $\bar{M}(T,U,Y)$, and show the equivalence of the equilibrium points in the Heterodox model and the market equilibria in the A-D sense. See Appendix C for a detailed description of the standard A-D market. \subsection{Heterodox Model as an A-D instance} We shall now build a suitable A-D market, given the data $T,U,Y$ for $\bar{M}$. We assume that $T$ and $U$ are $m\times n$, i.e., there are $m$ labour classes and $n$ processed goods, and $Y$ is the $m\times 1$ vector of labour class size. Recall that, $T_{ij}$ refers to the number of labour-units of type $i$ required to produce one unit of good $j$. The labour availability is given as a vector $Y$. We now construct $\bar{AD}$ as follows. \begin{itemize} \item The set of firms in $\bar{AD}$ is $F=\{ f_1 ,\ldots ,f_n \}$, where $n$ is the number of columns of $T$. The firm $f_j $ produces good $g_j$. \item The total number of goods are $m+n$, viz., $\{ g_1 ,\ldots , g_n , r_1 ,\ldots , r_m \}$, where $r_i $ corresponds to the labour of class $i$. We call labour inputs as 'raw' goods. \item The number of agents is $m$, and each agent $A_i $ begins with an endowment $Y_i $ of good $r_i $ above. \item The production function of $f_j $ is ${\mathcal Y_j}$ which arises from the column $j$ of $T$. Define $v_j $ as the $(m+n)$ vector $g_j -\sum_k T_{kj} r_k $ to represent that $T_{kj}$ units of labour type $k$ are used to make one unit of good $g_j$. Then ${\mathcal Y}=\{ \lambda \cdot v_j | \lambda \in [0,L]\}$ where $L$ is a large number. Thus firm $f_j $ produces some multiple of $v_j $. \item Agent $A_i $ owns a fraction $\alpha_{ij}$ of the firm $f_j $. The exact numbers will be irrelevant since we will see that in equilibrium, the firms make zero profits. Hence, income of each agent $i$, $M_i(\bar{p})$ is defined as (price i.e. wage)$\bar{p} \cdot r_i$ (initial endowment of labour units)$ = w_i$(wages) $\times 1$(labour input of one agent)$= w_i$. \item The utility matrix serves to define the continuous real valued utility function $u_i$ for each agent $i$. If $X_{ij}\geq 0$ is the amount of good $j$ allocated to agent $i$, then $u_i =\sum_j u_{ij} X_{ij}$. Utilities are zero for labour units hours, i.e., $U_{ij}=0$ for $j>n$, as it is only the firms which have any use for labour. Since the utilities are linear, it is clear that the principle of non-satiation holds. \end{itemize} This completes the specification of the A-D market $\bar{AD}$. An A-D equilibrium of the $\bar{AD}$ are prices $p_1,\ldots,p_n ,p_{n+1}=w_1, p_{n+m}=w_m$, production $q_j\cdot v_j \in {\mathcal Y}_j$ and allocations $X_{ij}$ such that (i) each firm maximizes profits under the given global labour constraints, and (ii) each agent $A_i $ maximizes its utility under the expenditure constraint of the wages received from its endowments $Y_i$ priced at wages $w_i$ and (iii) demand meets supply for each good when the corresponding price is nonzero i.e. all produced goods are exhausted. If supply is more than demand, the price is zero. \subsection{Heterodox equilibrium as an equilibrium point in AD} For the market $\bar{M}(T,U,Y)$, we denote an Heterodox equilibrium as $(\bar{p},\bar{q},\bar{w}, \bar{X})$. Let us assume that in the $(m \times n )$ market, in the above equilibrium, it is the first $m'$ labour classes and the first $n'$ goods which are active. We let $(p,q,w)$ denote the prices, production and wages of active goods and labour i.e. $\bar{p}= (p,p_M)$, $\bar{q}= (q, \bar{0})$ and $\bar{w} = (w, \bar{0})$. As defined in the Heterodox model, $p_M$ refers to the modified prices of the unproduced goods. By the feasibility of the equilibrium and the activity conditions, we have, \[T\bar{q} \leq Y\] \[\bar{w}T \geq \bar{p}\] and \[T^{'}q = Y^{'}\] \[wT^{'} = p\] where $T^{'}$ is the reduced technology matrix and $Y^{'}$ is the reduced Y vector in accordance with the active goods and classes. Let $\bar{Y} = (Y^{'}, \bar{0})$ be the amount of labour used. The variables are such that the production is optimal given $p$ and prices are solutions to Fisher market. Also, by the price-setting mechanism of unproduced goods $p_{n'+1}, ... p_n$, and the choice of $\bar{w}$ as the dual variables, we have \[p_j = \max_i \frac{u_{ij}}{b_i} \text{ (U- Level}) < \sum_i T_{ij}w_i \text{ (T- Level})\] where $b_i$ refers to the bang per buck ratio of $i$'s agent. \begin{proposition} \label{P1} Let $\bar{M}(T,U,Y)$ be the market with a Heterodox equilibrium point $(\bar{p},\bar{q},\bar{w}, \bar{X})$ as described above. Let $P = (\bar{p},\bar{w})$ and $Q = (\bar{q}, \bar{Y})$. Then, $(P,Q,\bar{X})$ is an equilibrium in the A-D market. \end{proposition} \begin{proof} Along with the optimization constraints, we need to prove that total supply of all goods, producible and raw, is greater than or equal to the goods demanded or consumed. Moreover, if supply is more than the demand, the corresponding price/wage is zero. This translates to saying that all `produced' and `raw' goods satisfying $T'q= Y'$ should be exhausted and all `raw' goods satisfying $T'q <Y'$ should receive zero wages. As described above, $P = (\bar{p}, \bar{w}) = (p_1,p_2, ..p_{m'}, \bar{0},w_1, w_2, .., w_{n'}, \bar{0})$. \begin{itemize} \item Let us first consider the active goods and classes. We prove that each firm maximizes the profit, given the global constraints. For firm $i$, let $v^*_i=(q_i,-l_i) $ maximize the profit, given that it lies in the set of production possible technologies. Here, $l_i$ is a vector of the amount of labour units consumed in making $q_i$ amount of good $i$. For all $i$, $v^*_i$ should satisfy \begin{equation} \begin{matrix} \displaystyle \max_y \ \ p_i q_i - w\cdot l_i = p_iq_i - (w\cdot T^{'}_{*,i})q_i \\ \textrm{s.t.} \displaystyle \ \ \ q_i, l_i \geq 0, \end{matrix} \end{equation} Using the Technology matrix, here we have $l_i$ given by $q_i(T^{'}_{*,i})$. \\ We note that since $p=wT^{'}$, the expression $p_i q_i - w \cdot l_i$ equals $p_i q_i - (w \cdot T^{'}_{*,i})q_i = 0$. This means that whenever $(q_i,-l_i)= (q_i, -q_i (T_{*,i}^{'}))$, firm $i$ gives an optimal production value, irrespective of $q_i$. \item We now consider $k > n'$. Since there is no production ($q_k = 0$) and consumption of labour, $p_k - (w \cdot T_{*,k } )< 0 $ as given by the duality of $q$ and $w$ in the Heterodox model. Hence, the maximum occurs at $q_k = 0$, $ l_k = 0$. Therefore, the optimization function is multivalued and $(\bar{q},-T\bar{q})$ given $T^{'}q=Y^{'}$ is an optimal point satisfying the global constraints. We also see that $T'q = Y'$ implies that the raw `used' goods are exhausted completely. On the other hand, there is a supply of raw `unused' goods but no demand resulting in zero prices i.e. wages. This establishes that all firms maximize their profits and for raw goods: supply meets demand for `used' goods and prices are zero for 'unused' goods. \item Next, we prove that each agent $i$ finds an optimal consumption set $\bar{X_i}$ by maximizing her utility under the expenditure constraint . The optimization program given below exactly conveys this requirement. Given $P$, we set up the equation for each agent $i$ - \begin{equation*} \begin{aligned} & \max_x \sum_j x_{ij}u_{ij} \\ & \text{s.t.} \ \ \bar{p} \cdot x_{i} \leq M_i(\bar{p}) = w_i, \\ & \ \ \ \ 0 < x_{i} \ \in \ X_{i} \end{aligned} \end{equation*} KKT conditions for this program imply that the optimal point satisfies $(u_{i1}, u_{i2}, .... u_{in}) = \mu (p_1 - \lambda_1, p_2 - \lambda_2, ... , p_{n}- \lambda_{n})$, where $\mu $ and $\lambda_j$ are the Lagrange multipliers associated with constraint 1 and 2 respectively. This means that whenever $x_{ij}$ is positive, $\lambda_j = 0$, and $p_j = \mu u_{ij}$. In other words, whenever agent $i$ buys goods $j1,j2$, we have $\frac{u_{ij1}}{u_{ij2}}= \frac{p_{j1}}{p_{j2}}$, which is a Fisher condition. \\ Since the utility function is convex, we observe that the Heterodox output for allocations, i.e., $\bar{X}$ maximizes the above function, as given by the sufficiency of KKT. Moreover, the Heterodox output for consumption is such that all produced goods are completely exhausted. Since utility for raw goods is zero, we see that each agent maximizes her payoff by buying the right set of produced goods. Thus, we prove that all agents maximimze their payoffs and demand equals supply of the reduced set of producible goods. \item This establishes that $(P,Q,\bar{X})$ so defined using the Heterodox model is an equilibrium point in the A-D market. \end{itemize} \end{proof} \subsection{A-D equilibrium as an equilibrium in the Heterodox market} Now, let $(P,Q,\bar{X})$ be an equilibrium point in the A-D market. We assume that $m'$ classes and $n'$ goods are active. Let $\bar{p}, \bar{w}$ be the corresponding prices and wages. Let the optimal production vector for each firm be $y_j= (q_j, l_j)$ so that the total output of firms is $ Q= (\sum_jq_j = \bar{q},\sum_j l_j = Y^{'}, \bar{0})$. Let $\bar{X}_{ij}$ give the consumption. \begin{proposition} \label{P2} Let $\bar{AD}$ be the market described above with a A-D equilibrium point $(P,Q,\bar{X})$. Then, $(\bar{p}, \bar{q}, \bar{w}, \bar{X})$ is an equilibrium point in the Heterodox model. \end{proposition} \begin{proof} We let $q$, $w$ be the `active' vectors consisting of all positive entries from $\bar{q}, \bar{w}$. Similarly, let $p$ denote the prices of active goods. \begin{itemize} \item We first look at the conditions $\bar{p}, \bar{q}, \bar{w}$ satisfy being a part of A-D equilibrium. For each firm $j$ which is active, $v_j=(q_j, -l_j)$ is its optimal solution where $l_j \leq Y$. In other words, $v_j$ has to maximize $p_jq_j- (w\cdot T_{*,i}) q_j$ subject to the non-negativity constraints. We can now consider these three cases -\\ $\bullet$ \ $p_i - (w\cdot T_{*,i}) < 0$,\\ $\bullet$ \ $p_i - (w\cdot T_{*,i})=0$ and\\ $\bullet$ \ $p_i - (w\cdot T_{*,i})>0$. Since $p_j, w$ are given, we note that since firm $j$ produces finite amount $q_j$, we can only have $p_i - (w\cdot T_{*,i}) \leq 0$. If this is not true, then any finite $q_j$ cannot maximize $p_jq_j- (w\cdot T_{*,i}) q_j$, which contradicts the definition. In other words, the function is strictly increasing as $q_j$ increases, thus giving an unbounded solution. When we artificially put a bound on $q_j$, the optimal solution is at an unattainable production plan. Moreover, the fact that firm $j$ is active i.e. it is not making any losses, translates to the condition $p_j - (w\cdot T_{*,j})=0$. Therefore, we get that for all active firms/goods $p_j = w \cdot T_{*,j}$, or $p = w \cdot T^{'}$ where $T^{'}$ represents the reduced T matrix corresponding to active goods. Continuing with the same concepts, for the inactive firms we must have $p_j- (w\cdot T_{*,j}) \leq 0$, for any feasible $p_j$. \item The analysis for agents' optimal consumption is exactly similar to that given in the earlier section, where the optimization program catches Fisher market conditions. Next, by the definition of an equilibrium point in AD, we know that total supply equals usage/consumption for all $k$ such that $w_k >0$. We have, zero utilities for raw goods i.e. labour hours. This forces that initial endowment of raw goods should equal the amount of raw goods consumed while producing other goods. This confirms that $T^{'} q = Y^{'}$. For the inactive classes, as $p_i - (w \cdot T_{*,i}) < 0$, firms don't utilize those. Therefore, there is supply but no demand for these goods. As the equilibrium production plan is attainable, we have $T\bar{q} = \sum_j l_j \leq Y$. In all, we have that $T\bar{q} \leq Y$ for all labour classes and $T^{'}q = Y^{'}$ for all classes that are active. Similarly, we have that $\bar{p} \leq \bar{w} T $ for all goods, and $p = wT^{'}$ for active goods. Along with these two conditions, we have that the allocations and prices follow Fisher market conditions i.e. all goods and endowments are exhausted and every buyer maximises her utility and buys only those goods which give her maximum bang per buck value. \item Building from the observations, we see that $\bar{q},\bar{w} $ are dual variables of each other and optimal for the following programs, as they satisfy the complementary slackness conditions. \begin{equation} \begin{matrix} \displaystyle \max_{\bar{q}} & \bar{p}\cdot (T\bar{q}) \\ \textrm{s.t.} & T\bar{q} \ \leq & Y \\& \displaystyle \bar{q_j} \ \geq & 0 & & \end{matrix} \begin{matrix} \displaystyle \min_{\bar{w}} & \bar{w} \cdot Y \\ \textrm{s.t.} & \bar{w} T \ \geq & \bar{p} \\ & \displaystyle \bar{w_i} & \geq & 0 & & \end{matrix} \end{equation} Moreover, we see that $p_j$ for $j= n'+1, ... n$ (unproduced goods) must satisfy \[ \max_i \frac{u_{ij}}{b_i} \text{ (U- Level}) \leq p_j < \sum_i T_{ij}w_i \text{ (T- Level}) \] If $p_j \geq $ T-Level, then it violates the constraint of optimality of production for firm $j$. Similarly, if $p_j < $ U-Level, we have $p_j < u_{ij} / b_i $ for some player $i$. This means that $b_i$ is less than the bang per buck that good $j$ offers, which contradicts the optimality condition of $D_i(p)$. Therefore, we see that the A-D model allows for a band for each $p_j$ that corresponds to an unproduced good. In the Heterodox model, we fix prices of such goods equal to their U-Levels, which belong to this band for every $j$. In short, Heterodox model modifies the equilibrium prices of inactive goods in A-D, while keeping all other variables and optimality conditions the same. \end{itemize} Thus we see that the A-D equilibrium point $(\bar{p}, \bar{q}, \bar{w}, X)$ satisfies all conditions for a fixed point in the Heterodox settings. In other words, when this point is given as an input to the iterator defined earlier, the production, prices, wages and allocations remain unchanged. \end{proof} This proves that given any set of $(U,T,Y)$, an equilibrium $(p,q,w,X)$ exists in the Heterodox model. As described before, Heterodox model can be considered an instance of the A-D model, where the existence of equilibrium is proved. Using the proof given above, the equilibrium (with little modifications) is a fixed point in the Heterodox model too. In the next section, we analyse a 2-player scenario and look at the decomposition of strategy space and also examine players' strategic behaviour. \section{A $2 \times 2$ market} Let us consider a two class economy with the following specifications - $T$ (Technology matrix), $Y$ (Labour availability), $ U_r$ (True Utility matrix) and ${\mathcal U}=\mathbb{R}^{2\times 2}$ (Strategy matrix) \[ T=\left[ \begin{array}{ccc} 0.25 & 0 \\ 0.25 & 1 \end{array} \right] \: Y=\left[ \begin{array}{c} 2 \\ 4 \end{array} \right] \: U_r= \left[ \begin{array}{cc} 1 & 1 \\ 1 & 1 \end{array} \right] \: U_2=\left[ \begin{array}{ccc} u_{11} & u_{12} \\ u_{21} & u_{22} \end{array} \right] \] Since Fisher solutions do not change if the rows of $U$ are scaled independently, we see that effectively, ${\mathcal U}$ is given by: \[ U_2= \left[ \begin{array}{cc} \alpha & 1 \\ \beta & 1 \end{array} \right] \] We assume that $0 < \alpha, \beta < \infty$. Let us solve this case completely, i.e., decompose ${\mathcal U}$ into various zones by their combinatorial signatures. We also analyse the case when we transit from one zone to another, and finally, when one of the labour classes is shut out of the market.\\ Whenever both classes are active, $q$ (production vector) is given by : \[q=T^{-1} Y= \left[ \begin{array}{ccc} 4 & 0 \\ -1 & 1 \end{array} \right] Y =\left[ \begin{array}{c} 8 \\ 2 \end{array} \right] \] and \[ w=\left[ \begin{array}{ccc} w_1 & w_2 \end{array} \right] = \left[ \begin{array}{ccc} p_1 & p_2 \end{array} \right] \cdot T^{-1}= \left[ \begin{array}{c} 4p_1 -p_2 \\ p_2 \end{array} \right] \: \] Therefore, class-wise wages may be obtained as - \[m_1=2(4p_1-p_2)\] \[m_2=4p_2 \] In a general $2\times 2$ economy, there are seven possible ways of allocating the produced goods are six forests and a cycle, where both classes participate, and two possible $(1 \times 1)$ graphs, where only one class is active. Out of these 9 graphs, the given set of inputs $(T,Y)$ allows for six possible equilibrium solutions, each with a different allocation graph. Firstly, if both the classes are active in the equilibrium, we have these five possibilities- \begin{center} \includegraphics[width=12cm]{fg22.png} \end{center} It is easily observed that the conservation of money allows only these graphs. The combinatorial data $(I,J,F)$ and the actual equilibrium values $(p,q,w,X)$ depend on the choice of $\alpha $ and $\beta$. As described in Section 3, for each forest, there is an open set, a "zone", of the $\alpha$-$\beta$ space over which the forest is the Fisher forest of the equilibrium. The conditions defining this zone arise from positivity of wages and allocations and the maximum bang per buck conditions. For the four forests, these are tabulated in the table given below. \\ The sixth possible equilibrium state is when $w_1$ becomes zero. As we see later, it occurs when $\beta < 1/4$. In this case, labour class 2 produces good 2 ($q = 4$) and gets the whole share of economy. Note that for no set of prices, do we have $w_2=0$ in equilibrium. \subsection{Market specifications} Here is a summary of the four forests given above. We analyse the condition $\alpha=\beta$ i.e. the cycle in the next section. Recall that $\alpha= \frac{u_{11}}{u_{12}}$ and $\beta= \frac{u_{21}}{u_{22}}$. Let $U1, U2$ denote the true utility functions of class-1 and 2 respectively. Also, $w_1+w_2 = 1$. \begin{table}[h] \label{t4} \centering \begin{tabular}{|l|l|l|l|l|} \hline &&&&\\[-0.5em] & Forest-1 & Forest-2 & Forest-3 & Forest-4 \\ \hline &&&&\\[-0.5em] Prices & $\beta= \frac {p_1}{p_2} > 1/4$ & $\alpha= \frac {p_1}{p_2} > 1/2$ & $1/4 < \beta =\frac {p_1}{p_2} < 1/2 $ & $\frac{p_1}{p_2} = \frac{1}{2}$ \\ \hline &&&&\\[-0.5em] Alloc - 1 & $x_{11} = 8 - \frac{2}{\beta}$ & $x_{11} = 8 - \frac{4}{\alpha}$, \ \ $x_{12}=2$ & $x_{12}= 8 \beta - 2$ & $x_{12} = 2$ \\ \hline &&&&\\[-0.5em] Alloc - 2 & $x_{21} = \frac{2}{\beta} , \ \ x_{22} = 2 $ & $x_{21} = \frac{4}{\alpha} $ & $x_{21} = 8 , \ \ x_{22} = 4 - 8\beta$ & $x_{21} = 8$ \\ \hline &&&&\\[-0.5em] $U1$ & $ U1= 8 - 2/ \beta$ & $ U1= 10-4/\alpha $ & $ U1 = 8\beta - 2$ & $U1 = 2$ \\ \hline &&&&\\[-0.5em] $U2$ & $ U2= 2+ 2/\beta $ & $ U2= 4/\alpha $ & $ U2= 12-8\beta$ & $U2 =8 $ \\ \hline &&&&\\[-0.3em] Wages-1 & $w_1 = 1- \frac{2}{1+4 \beta}$ & $w_1=1 - \frac{2}{1+4 \alpha}$ & $w_1 = 1- \frac{2} {1+4 \beta} $ & $w_1 = 1/3$ \\ \hline &&&&\\[-0.3em] Zones & $\alpha \geq \beta > 1/4$ & $\beta \geq \alpha > 1/2$ & $1/4 < \beta< 1/2$ and $\beta \geq \alpha$ & $ \alpha \leq 1/2 \leq \beta $ \\ \hline \end{tabular} \end{table} In addition to the conditions for these forests, if $\beta < 1/4$, the equilibrium solution is $w_1=0$. In that case, $U1 = 0 $ and $U2 = 4$ as the production amount is $(0,4)$. We denote this by forest-5 or zone-5. We also classify the generic equilibrium points here. Recall that $\eta $ is a generic equilibrium if (i) for $j\not \in J(\eta )$, we have $(wT)_j >p_j $, and (ii) for $(i,j) \not \in F(\eta )$, we have $u_{ij}/p_j < \max_k u_{ik}/p_k $. Therefore, we see that an equilibrium point belonging to, say zone-1, is generic if and only if $\alpha > \beta$. As proved in section-3, we can define an open set for zone-1, {\em viz. }, $\alpha > \beta > 1/4$, comprising only of generic equilibrium points. Similarly, for zone-4, the open set would be $ \alpha < 1/2 < \beta $. As we see in the figure given below, the interior of each zone is an open set consisting of generic points and the boundaries correspond to the non generic equilibrium points. \subsection{Transitions and the cycle at $\alpha=\beta$} We summarize the earlier section through a figure, where five zones are marked which correspond to the forests given above. The arrows indicate the direction of optimization for the dominant class i.e. the class that has a control over the price ratio. \begin{center} \includegraphics[width=4cm]{zones2.png} \end{center} We now look at the points where two or more forests are feasible, i.e. at the boundaries. It is clear from the figure that by changing $\alpha$ or $\beta$ it is possible to transit from one forest to another, by crossing the non-generic points where both forests are possible. It is shown earlier \cite{c31} that the set of allocations in Fisher market is hemicontinuous with respect to initial endowments and utility functions. Here, we show that though multiple allocations are possible at such points, utilities are bounded by the limits of utilities of forests at both sides. In other words, allocations and utilities at the transitions are convex combinations of the boundaries of those obtained in the adjoining zones. To make this precise, let us have the following definition. \begin{definition} Let $x\in \mathcal{U}$ be a point on the boundary of two zones, say Zone A and Zone B and let $\eta =(p,q,w,X)$ be a typical point above $x$, i.e., $\eta $ is an equilibrium for the parameter $x$. Let $\mathcal{X}(x)$ be the collection of all allocations of equilibria above $x$ in the U-space. We say that $x$ is a manifold point if the set $U_i (\mathcal{X}(x))$ is a bounded interval and its bounds are obtained as the limits $\lim_{q \rightarrow x} U_i (X(q))$ and $q\in$ Zone A and $q \in$ Zone B. \end{definition} Let us consider a point $x$ on the line $\alpha =\beta$, and let $\alpha (x)=\beta (x)=\mu >0.5$. Thus $p$ sits on the transition between Zone 1 and Zone 2. Let $\eta (x)=(p,q,w,X)$ be a typical point above $x$. We see that (i) $I(x)=J(x)=\{ 1,2\}$, and (ii) $F(p)=\{(1,1),(1,2),(2,1),(2,2)\}$, i.e., the cycle, since $X$ has flows on all edges. In fact, there is a set $\mathcal{X}$ of allocations possible at $\eta (p)$ and the bounds on $U_i (\mathcal{X})$ are precisely those achieved as $\lim_{q\rightarrow x} U_i (X(q))$ for $q$ in zone 1 and 2. Similarly, we see that for $1/4<\alpha= \beta< 1/2 $, the bounds on the corresponding $U_i (\mathcal{X})$ are obtained through zone 1 and 3. For the points on the boundaries with forest 4, however, we see that the limits $\lim_{q\rightarrow p} U_i (X(q))$ are equal from both zones, thus giving a unique allocation $X$. On the other hand, we see that the points on the boundary $\beta = 1/4$ are not manifold points. This is because for each point on this line, there is a unique allocation $\mathcal{X}$ leading to a unique $U_i (\mathcal{X})$ which does not equal $\lim_{q\rightarrow p} U_i (X(q))$ for $q$ in zone 1 or 3. We now classify the zones into interior points and the boundaries where two or more forests are possible. As stated earlier, the interior points refer to generic points which form an open set. Corresponding to the interior points, we have $U1,U2$ defined uniquely, which are continuous functions of $\alpha, \beta$. Moreover, these are invertible functions on their restricted domain of $\alpha, \beta$, which makes the sets of possible payoffs $U^p_1$, $U^p_2$ open. It follows that the correspondences $\mathcal{N}_i = (\alpha, \beta, U^p_1, U^p_2)$ are open for each forest $i$. Moving further, we see that for $\alpha = \beta$, which stands for a cycle, corresponding $U^p_1$ and $U^p_2$ belong to open sets. For example, on the boundary of forest 1 and 3, the open set $U^p_1$ is given by $1/4 < \alpha < 1/2$ and $(8\alpha-2 , 8- 2/\alpha)$. The region looks like half of a parabola, bounded from all the sides. Thus, interior of every possible solution or zone is open and neighbourhood of each point is homeomorphic to open subsets of $\mathbb{R}^2$. For forests, the homeomorphism is given by the inverse of utility functions and for the cycle, the sets are open in $\mathbb{R}^2$. We now claim that the boundaries of the forests and the cycle form 1 dimensional entities which serve as boundaries to the described 2 dimensional manifolds. Each boundary can be given by a unique equation in $\mathbb{R}^2$. On the line $\alpha=\beta$, there are two boundaries, one coming from $\alpha < \beta $ and another from $\alpha > \beta$. In between these two, a 2 dimensional plane is situated on on each part of the segment $\alpha = \beta$, i.e. on the boundary of forest-1 and 3 and forest 1 and 2. When considered closures of the open sets, we see that correspondences intersect along these boundaries. We therefore establish that in the region $\beta > 1/4$, payoff function $U_i$ is a 2 dimensional manifold with boundary, consisting of all `manifold' points. Moreover, a correspondence $\mathcal{N}$ = $(\alpha, \beta, U^p_1, U^p_2)$ can be defined between the strategy space and the payoffs space. A general version is dealt with in the appendix D where we argue that the same results follow. \subsection{Strategic Analysis} Here, as we see from the figure, class-2 is dominant in the sense that it has a strategy to become the only active class in the economy, just by reducing $\beta $. However, it is not in its interest to completely drive out class-1. If the state is in any zone with 2 active classes, $\beta$ can be decreased to reach zone 5, where class-2 gets utility 4. But, due to a discontinuity in the utility function, we see that for any $\alpha$, class-2 achieves the highest payoff, which is arbitrarily close to 10, when $\beta$ approaches 1/4, but is, strictly more than 1/4. Thus, the best strategy for class-2 is to keep class-1 active and pose $\beta$ as close to, but greater than 1/4. Technically, we see that the discontinuity of the utility functions results in the non-existence of Nash equilibria. Though this case rules out the possibility of a Nash equilibrium by making one class clearly dominant, the general scenario has a possibility of existence of Nash equilibria, which is discussed in the appendix. \section{Conclusion} This paper shows that consumer choice is indeed an important determinant of wage distribution in an economy. This connection provides an important tool for wage-earners to understand how they can adapt their consumption so as to support a more equitable distribution of wages. It does this by providing a modelling and analytic framework which allows us to explore concretely the thread between consumer choice, prices, production and wages. The paper also helps us understand pricing of many everyday items, e.g., smartphones, where two similar devices may have very different prices, and also that these prices may dramatically change based on a fluid consumer choice. It also suggests that preferring goods and services provided by small-branded and local/regional players, rather than buying the "best" may be a better strategy to ensure better wages. Next, the key data required of the economy, viz., $T$ and $Y$, is a {\em labour inventory} of the production processes of the economy and is part of some of the standard data sets of countries. Such an inventory could be used to develop a tool allowing each household to compute its {\em labour footprint}, i.e., an understanding of how their household consumption brings employment across the economy. One conjecture is that the consumption preferences of many wage-earners possibly do not support their own employment. Such an understanding may be useful to these very classes in modifying their personal consumption. Also note that the labour footprint, while very similar to the GDP calculation, does not need monetization. This is important in its own way. The Heterodox model, may also be applied to standard "comparative advantage" arguments in Ricardian economics, see Appendix E. Here it actually helps illustrate how the social benefits of trade actually transmit as wages across various classes. Technically, the computation of an equilibrium, given a $T,U,Y$ is an interesting problem. The A-D connection implies that already known efficient algorithms will shed some light. The tatonnement process of this paper needs to be strengthened and its "computing" power needs to be enhanced. A study of the pay-off correspondence and the existence of Nash equilibria needs to be undertaken. \keywords{economic models, wages, inequality, strategic behaviour, pricing, labour markets, consumer choice, utility maximization, Fisher markets, duality, technology, Arrow-Debreu market, equilibria }
\section{Introduction} Intelligent reflecting surfaces (IRSs), also known as reconfigurable intelligent surfaces (RISs), passive intelligent mirrors (PIMs), and large intelligent surfaces (LISs), have recently been proposed as a key enabler for next-generation wireless communications \cite{WuZhang2020, Renzo2020}. IRSs employ a large number of low-cost passive elements, instead of active transmitters, to ``reflect'' signals to empower smart and reconfigurable radio environments. It is envisioned that deploying IRSs is less expensive as compared to installing active transmitters such as base stations (BSs) and relays, and operating IRSs is more energy-efficient and eases signal processing and interference management requirements due to its low-cost and passive nature. Thus, IRSs are suitable for dense deployment and are promising to help meet the demands of beyond fifth-generation (B5G) and sixth-generation (6G) communications, such as high data rates, energy efficiency, and ubiquitous connectivity. There is a wealth of research on IRS focusing on joint transmit beamforming and IRS phase shifts optimization for sum-rate maximization (e.g., \cite{Wu2018, Huang2018, ML_Huang2020, OFDM_Li2020, Mu2020}) or power minimization (e.g., \cite{Wu2019, NOMA_Zheng2020}). IRS-enhanced multi-input single-output (MISO) systems were studied for single-user \cite{Wu2018} and multiuser \cite{Huang2018} scenarios, where transmit beamforming at the BS and the phase shifts at the IRS were configured by optimizing the received signal power or sum-rate of users. Machine learning-based techniques were also introduced into IRS-aided systems to adjust transmit beamforming and IRS phase shifts \cite{ML_Huang2020}. IRS-enhanced broadband orthogonal frequency division multiplexing (OFDM) systems were also studied \cite{OFDM_Li2020}. In \cite{OFDM_Li2020}, BS beamforming and IRS reflection were jointly designed for the objective of sum-rate maximization or, after transformation, mean square error (MSE) minimization in multiuser MISO systems. IRS-empowered non-orthogonal multiple access (NOMA) systems for signal-to-interference-plus-noise ratio (SINR) improvement were also studied \cite{Mu2020}. On the other hand, power minimization problems in IRS-aided systems were considered \cite{Wu2019, NOMA_Zheng2020}. In \cite{Wu2019}, transmit beamforming and IRS beamforming for power minimization subject to user SINR constraints in MISO systems were considered. In \cite{NOMA_Zheng2020}, transmit power minimization in IRS-empowered NOMA systems was studied. It was shown that incorporating IRSs into NOMA brings merits in decoding and differentiating multiple users due to IRS's ability to reconfigure wireless channels. Similarities and differences between IRS and classical decode-and-forward (DF) and amplify-and-forward (AF) relaying have been explored \cite{Bjornson2020, Huang2019, Nadeem2020, Renzo2020_relay}. In \cite{Bjornson2020}, comparisons between IRS and DF relaying were conducted analytically and numerically for a SISO system, showing that IRS with sufficient reflecting elements can achieve higher data rates and better energy efficiency in high target data rate regimes than DF relaying. In \cite{Huang2019}, comparisons between IRS and AF relaying were conducted numerically in an IRS-aided multiuser MISO system. It was shown that replacing the IRS with an AF relay yields higher sum rates but lower energy efficiency due to active power amplification of the AF relay. In \cite{Nadeem2020}, IRS and full-duplex/half-duplex AF relaying were compared. It was shown that IRS achieves comparable or even better performance as compared to full-duplex and half-duplex AF relaying when the number of IRS reflecting elements is sufficiently large. In \cite{Renzo2020_relay}, a comprehensive discussion on the subject was presented from various perspectives such as hardware complexity, power consumption, and spectral efficiency. It was similarly concluded that IRS with sufficient reflecting elements has the potential to outperform relay-aided transmission since IRS operates in a full-duplex manner, yet without the loop interference as in full-duplex relays. In this paper, we consider the practical scenario with {\it coexisting} IRS and half-duplex DF relay in a multiuser MISO (MU-MISO) system. The consideration is interesting and new, in especially two aspects. First, the IRS and relay coexistence system is different from the traditional multi-relay (in this case, two-relay) system, since there was no interaction between the relays in a multi-relay system but there is interaction between IRS and relay in the new system. Second, the IRS reflects signals at both phases of half-duplex DF relaying, and there exist tradeoffs in the design of IRS beamforming to cater for both the end users and the DF relay. The complex co-design problem of BS beamforming, relay beamforming, and IRS beamforming for maximum sum rates is examined. Note that these aspects were unexplored in the recent related work \cite{Yildirim2021}. Finally, numerical validation and discussion on the superiority of the coexistence system and tradeoffs therein are presented. \section{System Model and Problem Formulation} \label{sec_system_problem} \subsection{System Model} \label{subsec_system} \begin{figure}[tb!] \centering \includegraphics[width={0.83\linewidth}]{system_model_v2.eps} \caption{A coexisting IRS and relay assisted MU-MISO system. Solid/dashed lines indicate transmissions in the first/second phases.} \label{fig:system_model} \vspace{-0.1in} \end{figure} As shown in Fig.~\ref{fig:system_model}, we consider a downlink MU-MISO communication system that comprises a BS with $M$ antennas, $K$ single-antenna end users, an IRS with $N$ reflecting elements, and a classical half-duplex DF relay with $L$ antennas. Here, to ensure a sufficient degree of freedom, we assume $K \leq \min \{M, L\}$. The baseband equivalent channels between two communication nodes among the BS, IRS, relay, and user $k$ are denoted by self-explanatory notations ${\mathbf H}_{{\rm BS}, {\rm R}} \in {\mathbb C}^{L \times M}$, ${\mathbf H}_{{\rm BS}, {\rm IRS}} \in {\mathbb C}^{N \times M}$, ${\mathbf h}_{{\rm BS},k} \in {\mathbb C}^{1 \times M}$, ${\mathbf H}_{{\rm R}, {\rm IRS}} \in {\mathbb C}^{N \times L}$, ${\mathbf h}_{{\rm R},k} \in {\mathbb C}^{1 \times L}$, and ${\mathbf h}_{{\rm IRS},k} \in {\mathbb C}^{1 \times N}$. All channels are assumed to be quasi-static and Rayleigh flat-fading. The small-scale fading is modeled by complex Gaussian with zero mean and unit variance and the large-scale fading is modeled by $ \kappa {\left({d}/{d_{0}}\right)}^{-\varrho}, $ where $d$ is the distance between the two end nodes, $d_{0}$ is the reference distance, $\kappa$ is a large-scale fading constant, and $\varrho$ is the path-loss exponent. The CSI of all channels is assumed perfectly known at the BS, the IRS controller, and the relay. Due to the presence of the relay, there are two phases in one complete transmission of information, for which the first phase and the second phase are assumed to be within the channel coherence interval. Moreover, in this paper, reflecting elements can be adjusted by the IRS controller once in each complete transmission of the information. Next, we elaborate on the two-phase transmission protocol. \subsubsection{First Phase} During the first phase, the BS transmits its signal to all users and the relay via direct link. Meanwhile, the IRS reflects the incident signal from the BS towards the DF relay and all users. The received signal at user $k$ in the first phase is given by \begin{align} \label{eq_received_signal_I} {y}_{k}^{\rm I} ={\mathbf h}^{\prime}_{{\rm BS},k} {\mathbf x} + w_{k}^{\rm I}, \end{align} where ${\mathbf h}^{\prime}_{{\rm BS},k} \triangleq {\mathbf h}_{{\rm IRS},k} {\mathbf \Theta} {\mathbf H}_{{\rm BS}, {\rm IRS}} + {\mathbf h}_{{\rm BS},k}$ is the effective channel from the BS to the end user $k$, ${\mathbf \Theta} \triangleq {\rm diag}({\boldsymbol \theta})$ with ${\boldsymbol \theta} = \begin{bmatrix} \theta_{1} & \ldots & \theta_{N} \end{bmatrix}$ is the diagonal matrix accounting for the passive IRS beamforming, and $w_{k}^{\rm I} \sim \mathcal {CN} \left( 0, \sigma_{k}^2 \right)$ denotes the additive white Gaussian noise (AWGN) at user $k$ during the first phase. Note that the $n$-th reflecting element adjustment $\theta_{n}$ is given by $\theta_{n} = \beta_{n} e^{j \psi_{n}}$ with the amplitude attenuation $\beta_{n} \leq 1$ and the phase shift $\psi_{n} \in \left[0,2\pi\right)$. The transmit signal at the BS is ${\mathbf x}= \sum_{k=1}^{K} {\mathbf g}_{k}s_{k} = {\mathbf G} \cdot {\mathbf s}$, where ${\mathbf g}_{k} \in {\mathbb C}^{M \times 1}$ denotes the beamforming vector for user $k$ with ${\mathbf G} \triangleq [{\mathbf g}_{1}, \ldots, {\mathbf g}_{K}]$ and ${\mathbf s} \triangleq [s_{1}, \ldots, s_{K}]^{\rm T}$, $s_{k}$ is the data intended for user $k$ with zero mean and unit variance. The data streams from different users are assumed independent. Then, the transmit power at the BS is $P_{\rm BS}^{\rm total} = {\mathbb E}\big[{\Vert {\mathbf x} \Vert}^2\big] = {\rm tr}\left({\mathbf G}{\mathbf G}^{\rm H} \right) \leq P^{\max}_{\rm BS},$ where $P^{\max}_{\rm BS}$ is the maximum available power at the BS. The SINR for user $k$ in the first phase is \begin{align} \label{eq_SINR_I} \gamma_{k}^{\rm I} = \frac{{ |{\mathbf h}^{\prime}_{{\rm BS},k} {\mathbf g}_{k} |}^2}{\sum_{j=1, j \neq k}^{K} { |{\mathbf h}^{\prime}_{{\rm BS},k} {\mathbf g}_{j} |}^2 + \sigma_{k}^2}. \end{align} On the other hand, the received signal at the DF relay is \begin{align} \label{eq_received_Relay} {\mathbf y}_{\rm R} = {\mathbf H}^{\prime}_{{\rm BS}, {\rm R}} {\mathbf x} + {\mathbf w}_{\rm R}, \end{align} where ${\mathbf H}^{\prime}_{{\rm BS}, {\rm R}} \triangleq {\mathbf H}_{{\rm R}, {\rm IRS}}^{\rm H} {\mathbf \Theta} {\mathbf H}_{{\rm BS}, {\rm IRS}} + {\mathbf H}_{{\rm BS}, {\rm R}}$ is the effective channel from the BS to the relay and ${\mathbf w}_{\rm R} \sim \mathcal{CN} \left(0, \sigma_{R}^2 {\mathbf I}_{L} \right)$ is the AWGN at the relay. Matched filtering is employed at the relay to decode all users' signals from the BS. The resulting SINR is \cite{Tse2005} \begin{align} \label{eq_SINR_relay} \gamma_{{\rm R},k = \frac{{\Vert {\boldsymbol \alpha}_{k} \Vert}^{4}}{\sum_{j=1, j \neq k}^{K} {\boldsymbol \alpha}_{k}^{\rm H} {\boldsymbol \alpha}_{j} {\boldsymbol \alpha}_{j}^{\rm H} {\boldsymbol \alpha}_{k} + \sigma_{\rm R}^{2} {\Vert {\boldsymbol \alpha}_{k} \Vert}^{2}}, \end{align} where $ {\boldsymbol \alpha}_{k} \triangleq {\mathbf H}^{\prime}_{{\rm BS}, {\rm R}} {\mathbf g}_{k}$ is the filter weight for user $k$. \subsubsection{Second phase} During the second phase, the relay transmits the signal to all users and the IRS, where the latter also reflects the incident signal towards all users. Here, we assume that the DF relay can perfectly decode the signal for user $k$ if the SINR $\gamma_{{\rm R}, k}$ for user $k$ at the relay exceeds a predefined threshold $\gamma_{\rm R}^{\rm th}$. The transmit signal at the relay is $ {\mathbf x}_{\rm R} = \sum_{k=1}^{K} {\mathbf f}_{k} s_{k} = {\mathbf F} \cdot {\mathbf s}, $ where ${\mathbf f}_{k} \in {\mathbb C}^{L \times 1}$ denotes the beamforming vector at the relay for user $k$ and ${\mathbf F} \triangleq [{\mathbf f}_{1}, \ldots, {\mathbf f}_{K}]$. The relay's transmit power is $P_{\rm R}^{\rm total} = {\mathbb E}\left[{\Vert {\mathbf x}_{\rm R} \Vert}^2\right] = {\rm tr}\left({\mathbf F} {\mathbf F}^{\rm H}\right) \leq P_{\rm R}^{\max},$ where $P_{\rm R}^{\max}$ denotes the relay's maximum available power. The received signal at user $k$ in the second phase can be represented by \begin{align} \label{eq_received_signal_II_DF} y_{k}^{\rm II} = {\mathbf h}^{\prime}_{{\rm R},k} {\mathbf x}_{\rm R} + w_{k}^{\rm II}, \end{align} where ${\mathbf h}^{\prime}_{{\rm R},k} \triangleq {\mathbf h}_{{\rm IRS},k} {\mathbf \Theta} {\mathbf H}_{{\rm R}, {\rm IRS}} + {\mathbf h}_{{\rm R},k}$ is the effective channel from the relay to user $k$ and $w_{k}^{\rm II} \sim \mathcal{CN} \left( 0, \sigma_{k}^2 \right)$ is the corresponding AWGN. It follows that the SINR for user $k$ in the second phase is \begin{align} \label{eq_SINR_II} \gamma_{k}^{\rm II} = \frac{{ |{\mathbf h}^{\prime}_{{\rm R}, k} {\mathbf f}_{k} |}^2}{\sum_{j=1, j \neq k}^{K} { |{\mathbf h}^{\prime}_{{\rm R}, k} {\mathbf f}_{j} |}^2 + \sigma_{k}^2}. \end{align} Finally, the resulting SINR after combining the signals from the two phases using the maximal ratio combining is \begin{align} \label{eq_SINR} \gamma_{k} = \gamma_{k}^{\rm I} + \gamma_{k}^{\rm II}. \end{align} \subsection{Problem Formulation} \label{subsec_problem} In this paper, we aim for maximizing the sum-rate of all the users by jointly optimizing the active beamforming at the BS, the active beamforming at the relay, and the passive beamforming at the IRS. Specifically, the optimization problem is formulated as \begin{subequations} \label{eq_op_sum_rate} \begin{align} & \max_{\{\mathbf{g}_{k}\}, \{\mathbf{f}_{k}\}, \mathbf{\Theta}} & & \sum_{k=1}^{K}{\log_{2}\left(1 + \gamma_{k}\right)} \label{eq_op_sum_rate_obj} \\ & \hspace{20pt} \text{s.t.} & & P_{\rm BS}^{\rm total} \leq P^{\max}_{\rm BS}, \label{eq_op_sum_rate_cons_1} \\ & & & P_{\rm R}^{\rm total} \leq P_{\rm R}^{\max}, \label{eq_op_sum_rate_cons_2} \\ & & & {\left|\theta_{n}\right|} \leq 1, \forall n = 1,2,\ldots,N , \label{eq_op_sum_rate_cons_3} \\ & & & \gamma_{{\rm R},k} \geq \gamma_{\rm R}^{\rm th}, \forall k = 1,2, \ldots,K, \label{eq_op_sum_rate_cons_4} \end{align} \end{subequations} where the optimization variables and objective function are given in \eqref{eq_op_sum_rate_obj}, $\{\mathbf{g}_{k}\}$ and $\{\mathbf{f}_{k}\}$ are the sets of the BS beamforming and the relay beamforming vectors for all users, respectively. Constraints \eqref{eq_op_sum_rate_cons_1} and \eqref{eq_op_sum_rate_cons_2} denote the available transmit power at the BS and the DF relay, respectively. Constraint \eqref{eq_op_sum_rate_cons_3} is the reflection constraint for an ideal IRS. Constraint \eqref{eq_op_sum_rate_cons_4} ensures the decoding SINR requirements for all users' signals at the relay are satisfied. Note that the pre-log factor of $1/2$ due to two-phase transmission is dropped in the achievable rate expression, but is considered in all simulations. Solving the problem in \eqref{eq_op_sum_rate} is a challenging task, as the optimization variables are highly coupled, rendering a nonconvex problem. To tackle the problem, we propose an alternating optimization (AO)-based algorithm to decouple \eqref{eq_op_sum_rate} into three subproblems, as detailed in the next section. \section{AO-Based Beamforming Co-Design} \label{sec_pro_alg} In this section, we elaborate on the three subproblems in the proposed AO-based algorithm: BS beamforming, relay beamforming, and IRS beamforming. The entire AO algorithm runs through optimizing the BS beamforming (in Sec. \ref{sec_pro_alg_BS}), relay beamforming (in Sec. \ref{sec_pro_alg_Relay}), and IRS beamforming (in Sec. \ref{sec_pro_alg_IRS}), in an alternate fashion. \subsection{BS Beamforming Optimization} \label{sec_pro_alg_BS} Given fixed relay beamforming vectors $\{{\mathbf f}_{k}\}$ and IRS beamforming matrix $\mathbf \Theta$, the problem in \eqref{eq_op_sum_rate} becomes \begin{subequations} \label{eq_op_AO_BS} \begin{align} & \max_{\{\mathbf{g}_{k}\}} & & \sum_{k=1}^{K}{\log_{2}\left(C_{1,k} + \gamma_{k}^{\rm I}\right)} \label{eq_op_AO_BS_obj} \\ & \hspace{9pt} \text{s.t.} & & P_{\rm BS}^{\rm total} \leq P^{\max}_{\rm BS}, \label{eq_op_AO_BS_cons1} \\ & & & \gamma_{{\rm R},k} \geq \gamma_{\rm R}^{\rm th}, k = 1,\ldots,K, \label{eq_op_AO_BS_cons2} \end{align} \end{subequations} where $C_{1,k} = 1 + \gamma_{k}^{\rm II},$ $k = 1,\ldots,K$ are considered as constants under the AO-based decomposition. The subproblem \eqref{eq_op_AO_BS} is still nonconvex and difficult to solve. In this subsection, we tackle the subproblem in \eqref{eq_op_AO_BS} by first transforming the problem of finding $\mathbf{g}_{k}$ into one of finding the rank-one positive semidefinite matrix ${\mathbf G}_{k}=\mathbf{g}_{k}{\mathbf g}_{k}^{\rm H}$ and then by relaxing the rank-one constraint, which eventually leads to a convex semidefinite programming (SDP) problem. Toward this end, we develop the following four steps 1) introducing slack variables, 2) first-order Taylor approximation, 3) alternating optimization, and 4) semidefinite relaxation, as detailed below. \subsubsection{Introducing Slack Variables} We introduce slack variables $\{{\mathcal S}_{1,k}\}$, $\{{\mathcal I}_{1,k}\}$, $\{{\mathcal S}_{{\rm R},k}\}$, and $\{{\mathcal I}_{{\rm R},k}\}$ that satisfy \begin{align} \frac{1}{{\mathcal S}_{1,k}} &\triangleq {\left |{\mathbf h}^{\prime}_{{\rm BS},k} {\mathbf g}_{k} \right|}^2 \leq {\rm tr}({\mathbf G}_{k} {\mathbf h}^{\prime \prime}_{{\rm B},k}), \label{S_1}\\ {\mathcal I}_{1,k} & \triangleq \sum_{j \neq k} {\left |{\mathbf h}^{\prime}_{{\rm BS},k} {\mathbf g}_{j} \right|}^2 + \sigma_{k}^{2} \geq \sum_{j \neq k}{\rm tr}({\mathbf G}_{j} {\mathbf h}^{\prime \prime}_{{\rm B},k}) + \sigma_{k}^{2},\label{I_1}\\% \frac{1}{{\mathcal S}_{{\rm R},k}} &\triangleq {\Vert {\boldsymbol \alpha}_{k} \Vert}^{4} \leq {[{\rm tr}({\mathbf G}_{k} {\mathbf H}_{{\rm B}, {\rm R}}^{\prime \prime})]}^{2},\label{S_R}\\% {\mathcal I}_{{\rm R},k} &\triangleq \sum_{j\neq k} {\boldsymbol \alpha}_{k}^{\rm H} {\boldsymbol \alpha}_{j} {\boldsymbol \alpha}_{j}^{\rm H} {\boldsymbol \alpha}_{k} + \sigma_{\rm R}^{2} {\Vert {\boldsymbol \alpha}_{k} \Vert}^{2} \nonumber \\ &\geq \sum_{j\neq k}{\rm tr}({\mathbf G}_{k} {\mathbf H}_{{\rm B}, {\rm R}}^{\prime \prime} {\mathbf G}_{j} {\mathbf H}_{{\rm B}, {\rm R}}^{\prime \prime}) + \sigma_{\rm R}^{2} {\rm tr}({\mathbf G}_{k} {\mathbf H}_{{\rm B}, {\rm R}}^{\prime \prime}),\label{I_R} \end{align} where ${\mathbf H}_{{\rm B}, {\rm R}}^{\prime \prime} \triangleq {{\mathbf H}_{{\rm BS}, {\rm R}}^{\prime}}^{\rm H} {\mathbf H}_{{\rm BS}, {\rm R}}^{\prime}$ and ${\mathbf h}^{\prime \prime}_{{\rm B},k} \triangleq {{\mathbf h}^{\prime}_{{\rm BS},k}}^{\rm H} {\mathbf h}^{\prime}_{{\rm BS},k}$. Incorporating these slack variables into \eqref{eq_op_AO_BS} gives rise to the following equivalent problem \begin{subequations} \label{eq_op_AO_BS_2} \begin{align} & \max & & \sum_{k=1}^{K}{R_{1,k}} \label{eq_op_AO_BS_2_obj} \\ & \text{variables: } & & \{\mathbf{G}_{k}\}, \{R_{1,k}\}, \{{\mathcal S}_{1,k}\}, \{{\mathcal I}_{1,k}\}, \{{\mathcal S}_{{\rm R},k}\}, \{{\mathcal I}_{{\rm R},k}\} \nonumber \\ & \hspace{5pt} \text{s.t.} & & R_{1,k} \leq \log_{2}\big(C_{k,1} + \frac{1}{{\mathcal S}_{1,k}{{\mathcal I}_{1,k}}}\big)\triangleq u_1({\bf z}), \label{eq_op_AO_BS_2_cons1} \\ & & & v_1({\bf z}_{\rm R})\triangleq\frac{1}{{\mathcal S}_{{\rm R},k}{\mathcal I}_{{\rm R},k}} \geq \gamma_{\rm R}^{\rm th},\label{eq_op_AO_BS_2_cons3} \\% \forall k = 1,2, \cdots,K, \label{eq_op_AO_BS_2_cons3} \\ & & & \eqref{eq_op_AO_BS_cons1},\eqref{S_1},\eqref{I_1},\eqref{S_R},\eqref{I_R}, \label{eq_op_AO_BS_2_cons_supp} \\ & & & {\mathbf G}_{k} \succeq 0,~~ \text{rank}\left({\mathbf G}_{k}\right) = 1, \label{eq_op_AO_BS_2_cons8}\\ & & & \quad\quad \forall k = 1,2, \ldots,K,\notag \end{align} \end{subequations} where $u_1({\bf z})$ and $v_1({\bf z}_{\rm R})$ with ${\bf z}=[{\mathcal S}_{1,k}, {\mathcal I}_{1,k}]^{\rm T}$ and ${\bf z}_{\rm R}=[{\mathcal S}_{{\rm R}, k}, {\mathcal I}_{{\rm R}, k}]^{\rm T}$ defined in \eqref{eq_op_AO_BS_2_cons1} and \eqref{eq_op_AO_BS_2_cons3}, respectively, are for notational convenience and clarity. Note that the optimal solution of \eqref{eq_op_AO_BS_2} meets the constraints \eqref{S_1}--\eqref{I_R} in \eqref{eq_op_AO_BS_2_cons_supp} with equality. The subproblem in \eqref{eq_op_AO_BS_2} is still nonconvex. \subsubsection{First-Order Taylor Approximation} To convexify the constraints \eqref{eq_op_AO_BS_2_cons1} and \eqref{eq_op_AO_BS_2_cons3}, we utilize the fact that any convex function can be lower bounded by its first-order Taylor approximation. Since $u_1({\bf z})$ and $v_1({\bf z}_{\rm R})$ are convex, from the first-order Taylor representation, we have \begin{align} u_1({\bf z})&\geq u_1({\bf z}^{\rm loc})+\nabla u_1({\bf z}^{\rm loc})^{\rm T}({\bf z}-{\bf z}^{\rm loc})\triangleq R_{1, k}^{\rm low}, \label{lower bound: eq_op_AO_BS_2_cons1}\\ v_1({\bf z}_{\rm R})&\geq v_1({\bf z}_{\rm R}^{\rm loc})+\nabla v_1({\bf z}_{\rm R}^{\rm loc})^{\rm T}({\bf z}_{\rm R}-{\bf z}_{\rm R}^{\rm loc})\triangleq \gamma_{{\rm R}, k}^{\rm low},\label{lower bound: eq_op_AO_BS_2_cons3} \end{align} where ${\bf z}^{\rm loc}=[{\mathcal S}_{1,k}^{\rm loc}, {\mathcal I}_{1,k}^{\rm loc}]^{\rm T}$ and ${\bf z}_{\rm R}^{\rm loc}=[{\mathcal S}_{{\rm R},k}^{\rm loc}, {\mathcal I}_{{\rm R},k}^{\rm loc}]^{\rm T}$ are local points at which $u_1({\bf z})$ and $v_1({\bf z}_{\rm R})$ are differentiable, respectively. The two lower bounds $R_{1, k}^{\rm low}$ and $\gamma_{{\rm R}, k}^{\rm low}$ can be carried out in closed-form from the gradients $\nabla u_1({\bf z}^{\rm loc})$ and $\nabla v_1({\bf z}_{\rm R}^{\rm loc})$, respectively. Replacing $u_1({\bf z})$ in \eqref{eq_op_AO_BS_2_cons1} and $v_1({\bf z}_{\rm R})$ in \eqref{eq_op_AO_BS_2_cons3} with their respective lower bounds in \eqref{lower bound: eq_op_AO_BS_2_cons1} and \eqref{lower bound: eq_op_AO_BS_2_cons3} linearizes and convexifies the constraints \eqref{eq_op_AO_BS_2_cons1} and \eqref{eq_op_AO_BS_2_cons3}, converting the problem in \eqref{eq_op_AO_BS_2} to \begin{subequations} \label{eq_op_AO_BS_3} \begin{align} & \max & & \sum_{k=1}^{K}{R_{1,k}} \label{eq_op_AO_BS_3_obj} \\ & \text{variables: } & & \{\mathbf{G}_{k}\}, \{R_{1,k}\}, \{{\mathcal S}_{1,k}\}, \{{\mathcal I}_{1,k}\}, \{{\mathcal S}_{{\rm R},k}\}, \{{\mathcal I}_{{\rm R},k}\} \nonumber \\ & \hspace{9pt} \text{s.t.} & & R_{1,k} \leq R_{1, k}^{\rm low},~\gamma_{{\rm R}, k}^{\rm low} \geq \gamma_{\rm R}^{\rm th}, ~\eqref{eq_op_AO_BS_2_cons_supp}, \eqref{eq_op_AO_BS_2_cons8}, \label{eq_op_AO_BS_3_cons1} \\ & & & \quad\quad\forall k = 1,2, \ldots,K.\nonumber \end{align} \end{subequations} Note that the solution set of \eqref{eq_op_AO_BS_3} is a subset of that of the original problem in \eqref{eq_op_AO_BS_2}, as lower bounds are used as substitutes in the constraints \eqref{eq_op_AO_BS_2_cons1} and \eqref{eq_op_AO_BS_2_cons3}. \subsubsection{Alternating Optimization} The interleaving presence of BS beamforming matrices ${\mathbf G}_{k}$ and ${\mathbf G}_{j}$ still render the constraint \eqref{I_R} in \eqref{eq_op_AO_BS_2_cons_supp} nonconvex. AO is adopted within the subproblem to solve ${\mathbf G}_{k}$, $k=1,\ldots,K$, iteratively. Specifically, in the $k'$-th iteration, only the $k'$-th beamforming matrix ${\mathbf G}_{k'}$ is solved while keeping other ${\mathbf G}_{j}$, $j \neq k'$ as constants. As such, constraint \eqref{I_R} in \eqref{eq_op_AO_BS_2_cons_supp} becomes convex. \subsubsection{Semidefinite Relaxation} Finally, we relax the rank-one constraint in \eqref{eq_op_AO_BS_2_cons8} which, after combining with the Taylor approximation and alternating optimization, transforms the entire optimization to an SDP problem that can be solved by standard convex optimization software such as CVX \cite{cvx}. In general, the optimal solutions for ${\mathbf G}_{k}$'s are not necessarily of rank-one. One typical approach to obtaining rank-one solutions is by using the randomization procedure \cite{Huang2014} based on the eigen-decomposition of the optimal ${\mathbf G}_{k}$. \subsection{Relay Beamforming Optimization} \label{sec_pro_alg_Relay} Given fixed $\{{\mathbf g}_{k}\}$ (obtained from the steps in Sec. \ref{sec_pro_alg_BS}) and $\mathbf \Theta$, the problem of solving the relay beamforming $\{\mathbf{f}_{k}\}$ in \eqref{eq_op_sum_rate} becomes \begin{subequations} \label{eq_op_AO_Relay} \begin{align} & \max_{\{\mathbf{f}_{k}\}} & & \sum_{k=1}^{K}{\log_{2}\left(C_{2,k} + \gamma_{k}^{\rm II}\right)} \label{eq_op_AO_Relay_obj} \\ & \hspace{9pt} \text{s.t.} & & P_{\rm R}^{\rm total} \leq P_{\rm R}^{\max}, \label{eq_op_AO_Relay_cons1} \end{align} \end{subequations} where $C_{2,k} = 1 + \gamma_{k}^{\rm I}, k=1,2,\ldots,K$, are kept as constants. The subproblem for finding the relay beamforming vector $\mathbf{f}_{k}$ in \eqref{eq_op_AO_Relay} is nonconvex. Following similar steps developed in Sec.~\ref{sec_pro_alg_BS}, we elaborate on how to convexify \eqref{eq_op_AO_Relay} below. Let ${\mathbf F}_{k} = {\mathbf f}_{k} {\mathbf f}_{k}^{\rm H}$. Define the slack variables $\{{\mathcal S}_{2,k}\}$ and $\{{\mathcal I}_{2,k}\}$ that satisfy \begin{align} \frac{1}{{\mathcal S}_{2,k}} &\triangleq {\left |{\mathbf h}^{\prime}_{{\rm R},k} {\mathbf f}_{k} \right|}^2 \leq {\rm tr}\left({\mathbf F}_{k} {\mathbf h}^{\prime \prime}_{{\rm R},k}\right),\label{S_2}\\ {\mathcal I}_{2,k} & \triangleq \sum_{j \neq k} {\left |{\mathbf h}^{\prime}_{{\rm R},k} {\mathbf f}_{j} \right|}^2 + \sigma_{k}^{2} \geq \sum_{j \neq k}{\rm tr}\left({\mathbf F}_{j} {\mathbf h}^{\prime \prime}_{{\rm R},k}\right) + \sigma_{k}^{2},\label{I_2} \end{align} where ${\mathbf h}^{\prime \prime}_{{\rm R},k} \triangleq {{\mathbf h}^{\prime}_{{\rm R},k}}^{\rm H} {\mathbf h}^{\prime}_{{\rm R},k}$. With the above slack variables, the subproblem \eqref{eq_op_AO_Relay} can be equivalently rewritten as \begin{subequations} \label{eq_op_AO_Relay_2} \begin{align} & \max & & \sum_{k=1}^{K}{R_{2,k}} \label{eq_op_AO_Relay_2_obj} \\ & \text{variables: } & & \{\mathbf{F}_{k}\}, \{R_{2,k}\}, \{{\mathcal S}_{2,k}\}, \{{\mathcal I}_{2,k}\} \nonumber \\ & \hspace{9pt} \text{s.t.} & & R_{2, k} \leq \log_{2}\big(C_{2,k} + \frac{1}{{\mathcal S}_{2,k} {\mathcal I}_{2,k}}\big)\triangleq u_2({\bf z}), \label{eq_op_AO_Relay_2_cons1} \\ & & & \eqref{eq_op_AO_Relay_cons1},\eqref{S_2},\eqref{I_2}, ~{\mathbf F}_{k} \succeq 0, ~\text{rank}({\mathbf F}_{k}) = 1, \label{eq_op_AO_Relay_2_cons_supp2}\\ & & &\quad\quad\forall k = 1,2, \ldots,K,\nonumber \end{align} \end{subequations} where $u_2(\bf z)$ is for notational convenience. Similarly, we apply Taylor approximation on $u_2(\bf z)$ and obtain a lower bound $R_{2, k}^{\rm low}$, which has closed-form expression from $\nabla u_2({\bf z}^{\rm loc})$. Then, \eqref{eq_op_AO_Relay_2} can be converted to \begin{subequations} \label{eq_op_AO_Relay_3} \begin{align} & \max & & \sum_{k=1}^{K}{R_{2,k}} \label{eq_op_AO_Relay_3_obj} \\ & \text{variables: } & & \{\mathbf{F}_{k}\}, \{R_{2,k}\}, \{{\mathcal S}_{2,k}\}, \{{\mathcal I}_{2,k}\} \nonumber \\ & \hspace{9pt} \text{s.t.} & & R_{2, k} \leq R_{2, k}^{\rm low}, ~~\eqref{eq_op_AO_Relay_2_cons_supp2}, \label{eq_op_AO_Relay_3_cons1} \\ & & & \forall k = 1,\ldots,K. \nonumber \end{align} \end{subequations} The solution set of \eqref{eq_op_AO_Relay_3} is a subset of the solution set of \eqref{eq_op_AO_Relay_2}, since the lower bound $R_{2, k}^{\rm low}$ is used in the constraint \eqref{eq_op_AO_Relay_2_cons1}. By relaxing the rank-one constraint in \eqref{eq_op_AO_Relay_2_cons_supp2}, we can solve the resulting SDP problem with CVX. Finally, as in the case in Sec.~\ref{sec_pro_alg_BS}, the randomization procedure can be employed to obtain rank-one solutions for $\{{\mathbf f}_{k}\}$, $k=1,\ldots,K$. \subsection{IRS Beamforming Optimization} \label{sec_pro_alg_IRS} Given fixed BS beamforming $\{{\mathbf g}_{k}\}$ and relay beamforming $\{{\mathbf f}_{k}\}$ (respectively obtained from the steps in Sec. \ref{sec_pro_alg_BS} and Sec. \ref{sec_pro_alg_Relay}), the problem of solving the IRS beamforming matrix $\boldsymbol\Theta$ (or equivalently its vector form $\boldsymbol\theta$) in \eqref{eq_op_sum_rate} becomes \begin{subequations} \label{eq_op_AO_IRS} \begin{align} & \max_{\mathbf{\Theta}} & & \sum_{k=1}^{K}{\log_{2}\left(1 + \gamma_{k}\right)} \label{eq_op_IRS_obj} \\ & \hspace{9pt} \text{s.t.} & & {\left|\theta_{n}\right|} \leq 1, \forall n = 1,\ldots,N , \label{eq_op_AO_IRS_cons1} \\ & & & \gamma_{{\rm R},k} \geq \gamma_{\rm R}^{\rm th}, \forall k = 1,\ldots,K. \label{eq_op_AO_IRS_cons2} \end{align} \end{subequations} We adopt similar steps as in Secs. \ref{sec_pro_alg_BS} and \ref{sec_pro_alg_Relay} to solve \eqref{eq_op_AO_IRS}. To facilitate finding the optimal IRS beamforming matrix $\boldsymbol\Theta$, we re-arrange the order of $\boldsymbol\Theta$ in \eqref{eq_received_signal_I} and in \eqref{eq_received_signal_II_DF} respectively to ${y}_{k}^{\rm I}={\boldsymbol {\phi}}^{\rm H} {\mathbf H}_{{\rm B}, {\rm I}, k} {\mathbf x} + w_{k}^{\rm I}$ and $y_{k}^{\rm II}= {\boldsymbol {\phi}}^{\rm H} {\mathbf H}_{{\rm R}, {\rm I}, k} {\mathbf x}_{\rm R} + w_{k}^{\rm II},$ where ${\boldsymbol {\phi}} = {\begin{bmatrix} {\boldsymbol \theta} & 1 \end{bmatrix}}^{\rm H}$, ${\mathbf H}_{{\rm B}, {\rm I}, k} = \begin{bmatrix} {\rm diag}({\mathbf h}_{{\rm IRS}, k}) {\mathbf H}_{{\rm BS}, {\rm IRS}} \\ {\mathbf h}_{{\rm BS}, k} \end{bmatrix}$, and ${\mathbf H}_{{\rm R}, {\rm I}, k} = \begin{bmatrix} {\rm diag}({\mathbf h}_{{\rm IRS}, k}) {\mathbf H}_{{\rm R}, {\rm IRS}} \\ {\mathbf h}_{{\rm R}, k} \end{bmatrix}$. With the reordering, the slack variables $\{{\mathcal S}_{1,k}\}$, $\{{\mathcal I}_{1,k}\}$, $\{{\mathcal S}_{2,k}\}$, and $\{{\mathcal I}_{2,k}\}$ respectively in \eqref{S_1}, \eqref{I_1}, \eqref{S_2}, and \eqref{I_2} can be rewritten as \begin{align} \frac{1}{{\mathcal S}_{1, k}} &= {\left | {\boldsymbol {\phi}}^{\rm H} {\mathbf H}_{{\rm B}, {\rm I}, k} {\mathbf g}_{k} \right |}^{2} \leq {\rm tr}\left(\mathbf{\Phi} {\mathbf H}_{{\rm B}, {\rm I}, k} {\mathbf g}_{k} {\mathbf g}_{k}^{\rm H} {\mathbf H}_{{\rm B}, {\rm I}, k}^{\rm H}\right), \label{S_1_prime}\\ {\mathcal I}_{1,k} & \geq \sum_{j \neq k} {\rm tr}\left(\mathbf{\Phi} {\mathbf H}_{{\rm B}, {\rm I}, k} {\mathbf g}_{j} {\mathbf g}_{j}^{\rm H} {\mathbf H}_{{\rm B}, {\rm I}, k}^{\rm H}\right) + \sigma_{k}^{2},\label{I_1_prime}\\ \frac{1}{{\mathcal S}_{2,k}} & = {\left | {\boldsymbol {\phi}}^{\rm H} {\mathbf H}_{{\rm R}, {\rm I}, k} {\mathbf f}_{k} \right |}^{2} \leq {\rm tr}(\mathbf{\Phi} {\mathbf H}_{{\rm R}, {\rm I}, k} {\mathbf f}_{k} {\mathbf f}_{k}^{\rm H} {\mathbf H}_{{\rm R}, {\rm I}, k}^{\rm H}),\label{S_2_prime}\\ {\mathcal I}_{2,k} & \geq \sum_{j \neq k} {\rm tr}\left(\mathbf{\Phi} {\mathbf H}_{{\rm R}, {\rm I}, k} {\mathbf f}_{j} {\mathbf f}_{j}^{\rm H} {\mathbf H}_{{\rm R}, {\rm I}, k}^{\rm H}\right) + \sigma_{k}^{2},\label{I_2_prime} \end{align} where $\mathbf{\Phi} \triangleq {\boldsymbol {\phi}} {\boldsymbol {\phi}}^{\rm H}$. Similarly, we can re-arrange the order of $\boldsymbol\Theta$ in \eqref{eq_received_Relay}, by which the slack variables $\{{\mathcal S}_{{\rm R},k}\}$ and $\{{\mathcal I}_{{\rm R},k}\}$ in \eqref{S_R} and \eqref{I_R} can be rewritten in terms of $\mathbf{\Phi}$. With the above slack variables, we have the following equivalent problem \begin{subequations} \label{eq_op_AO_IRS_2} \begin{align} & \max & & \sum_{k=1}^{K}{R_{3,k}} \label{eq_op_AO_IRS_2_obj} \\ & \text{variables: } & & \mathbf{\Phi}, \{R_{3,k},{\mathcal S}_{1,k},{\mathcal I}_{1,k},{\mathcal S}_{2,k},{\mathcal I}_{2,k},{\mathcal S}_{{\rm R},k},{\mathcal I}_{{\rm R},k}\} \nonumber \\ & \hspace{9pt} \text{s.t.} & & R_{3,k} \leq \log_{2}\left(1 + \frac{1}{{\mathcal S}_{1,k} {\mathcal I}_{1,k}} + \frac{1}{{\mathcal S}_{2,k}{\mathcal I}_{2,k}}\right)\notag\\ & & & \quad\quad\triangleq u_3({\bf z}), \label{eq_op_AO_IRS_2_cons1}\\ & & & v_3({\bf z}_{\rm R})\triangleq\frac{1}{{\mathcal S}_{{\rm R}, k} {\mathcal I}_{{\rm R}, k}} \geq \gamma_{\rm R}^{\rm th}, \label{eq_op_AO_IRS_2_cons2} \\ & & & \eqref{eq_op_AO_IRS_cons1},\eqref{S_R},\eqref{I_R}, \eqref{S_1_prime}-\eqref{I_2_prime}, \label{eq_op_AO_IRS_2_cons_supp}\\%\frac{1}{{\mathcal S}_{1, k}} \leq {\rm tr}\left(\mathbf{\Phi} {\mathbf H}_{{\rm B}, {\rm I}, k} {\mathbf g}_{k} {\mathbf g}_{k}^{\rm H} {\mathbf H}_{{\rm B}, {\rm I}, k}^{\rm H}\right), \label{eq_op_AO_IRS_2_cons3}\\ & & & \mathbf{\Phi} \succeq 0,~~\text{rank}\left(\mathbf{\Phi}\right) = 1, \label{eq_op_AO_IRS_2_cons_rank1}\\% \label{eq_op_AO_IRS_2_cons9}\\ & & &\quad\quad\forall k = 1,\ldots,K,\nonumber \end{align} \end{subequations} where $u_3({\bf z})$ and $v_3({\bf z}_{\rm R})$ respectively defined in \eqref{eq_op_AO_IRS_2_cons1} and \eqref{eq_op_AO_IRS_2_cons2} are for notational convenience. Next, using the first-order Taylor approximation, as in the previous sections, lower bounds of $u_3({\bf z})$ and $v_3({\bf z}_{\rm R})$ can be obtained as $R_{3, k}^{\rm low}$ and $\gamma_{{\rm R}, k}^{\rm low}$, which can be used to convexify the two constraints \eqref{eq_op_AO_IRS_2_cons1} and \eqref{eq_op_AO_IRS_2_cons2}. Then, \eqref{eq_op_AO_IRS_2} can be rewritten as \begin{subequations} \label{eq_op_AO_IRS_3} \begin{align} & \max & & \sum_{k=1}^{K}{R_{3,k}} \label{eq_op_AO_IRS_3_obj} \\ & \text{variables: } & & \mathbf{\Phi}, \{R_{3,k},{\mathcal S}_{1,k},{\mathcal I}_{1,k},{\mathcal S}_{2,k},{\mathcal I}_{2,k},{\mathcal S}_{{\rm R},k},{\mathcal I}_{{\rm R},k}\} \nonumber \\ & \hspace{9pt} \text{s.t.} & & R_{3,k} \leq R_{3,k}^{\rm low},~~ \gamma_{{\rm R}, k}^{\rm low} \geq \gamma_{\rm R}^{\rm th}, \eqref{eq_op_AO_IRS_2_cons_supp},\eqref{eq_op_AO_IRS_2_cons_rank1}, \label{eq_op_AO_IRS_3_cons1}\\ & & & \quad\quad \forall k = 1,2, \ldots,K. \notag \end{align} \end{subequations} Relaxing the rank-one constraint \eqref{eq_op_AO_IRS_2_cons_rank1} in \eqref{eq_op_AO_IRS_3_cons1} converts the problem in \eqref{eq_op_AO_IRS_3} to an SDP, which can then be solved using CVX. Finally, Gaussian randomization procedure can be employed to obtain a rank-one solution. \section{Simulation Results and Discussion} \label{sec_num_res} \subsection{Simulation Settings} We simulate the topology shown in Fig.~\ref{fig:system_model} with the BS, IRS, and relay located at coordinates $(0,0)$, $(100,50)$, and $(100,-50)$, respectively, and the $K$ users randomly distributed within a circle centered at $(0,200)$ with a radius of $10$. The units of locations and radius are all meters. The small-scale fading of all channels follows $\mathcal{CN} (0,1)$. The parameters for large-scale fading of channels $\kappa (d/d_0)^{-\varrho}$ are set as follows: $d_{0} = 1$ m; $\kappa = 10^{-4}$ for ${\mathbf H}_{{\rm BS}, {\rm R}}$, ${\mathbf h}_{{\rm BS}, k}$, and ${\mathbf h}_{{\rm R}, k}$, and $\kappa = 10^{-0.5}$ for ${\mathbf H}_{{\rm BS}, {\rm IRS}}$, ${\mathbf H}_{{\rm R}, {\rm IRS}}$, and ${\mathbf h}_{{\rm IRS}, k}$; and $\varrho = 2$ for IRS-aided links and relay-aided links (free space), and $\varrho = 3.5$ for the direct link (severe path loss). The power constraints at the BS and relay are $P_{\rm BS}^{\rm max} = 10$ mW and $P_{\rm R}^{\rm max} = 10$ mW, respectively. The proposed coexistence and co-design scheme is compared with the following benchmarks: 1) {\it Relay only:} there is no IRS; only the relay assists transmission with BS and relay beamforming optimized; 2) {\it Random:} IRS beamforming adopts random phase shifts and fixed amplitudes of one, with BS and relay beamforming optimized; and 3) {\it Independent:} IRS assists transmission in the first phase but not in the second phase (turned off), with BS, relay, and IRS beamforming optimized in such case. Note that it is termed `Independent' since there is no interaction between IRS and relay in assisting BS transmission. \subsection{Results and Discussion} \label{results and discussion} \begin{figure*}[t] \begin{center} \subfigure[] { \includegraphics[width=0.64\columnwidth]{comparison_num_elements.eps} \label{fig:simulation_num_elements} } \subfigure[] { \includegraphics[width=0.64\columnwidth]{comparison_num_relay_antennas.eps} \label{fig:simulation_num_DF_antennas} } \subfigure[] { \includegraphics[width=0.64\columnwidth]{comparison_num_BS_antennas.eps} \label{fig:simulation_num_BS_antennas} } \caption{(a)--(c) Sum-rate vs. the number of IRS reflecting elements, relay antennas, and BS antennas, respectively.} \label{fig:simulation_results} \end{center} \vspace{-0.1in} \end{figure*} Fig.~\ref{fig:simulation_num_elements} compares the sum-rate performance vs. the number of IRS reflecting elements $N$, where we set $M = 8$, $L = 4$, and $K = 4$. As can be seen, the sum-rate of all schemes except the Relay only scheme increases as $N$ increases. The proposed scheme outperforms all benchmarks since it fully exploits the coexistence system with optimized beamforming and transmission mechanism. The Independent scheme exhibits performance loss in comparison to the proposed scheme since IRS is turned off in the second phase and thus relaying in the second phase does not acquire performance gain from IRS-enhanced links and IRS beamforming. This suggests that the interaction between IRS and DF relay benefits the system sum-rate. Comparing the Independent and Random schemes, while the Independent scheme only leverages IRS in the first phase, it still outperforms the Random scheme with IRS operating in both phases. This is because, while the Independent scheme achieves a lower SINR in the second phase as compared to the Random scheme, it provides a much higher SINR in the first phase due to judicious IRS beamforming, resulting in an overall higher sum-rate. The Random scheme outperforms the Relay only scheme since IRS, even with random phase shifts, provides additional paths for transmission. Fig.~\ref{fig:simulation_num_DF_antennas} compares the sum-rate performance vs. the number of relay antennas $L$, where we set $M = 8$, $N = 30$, and $K = 4$. The sum-rate of all schemes increases with $L$ due to a higher degree of freedom in the second phase. The proposed scheme achieves the best sum-rate performance in all antenna configurations, with diminishing gains as $L$ increases. This is because the existence and optimization of IRS with $N=30$ reflecting elements dominates the change in $L$ in terms of the system capacity in the second phase. As a result, increasing the number of relay antennas brings relatively small merits to the proposed scheme. The Independent and Random schemes exhibit a crossing point; specifically, the Random scheme outperforms the Independent scheme in the larger $L$ regime. The reason is that the DF relay with more antennas can better adjust the relay beamforming vectors $\{{\mathbf f}_{k}\}$ in \eqref{eq_SINR_II} for the combined IRS-assisted and direct channels from the relay to end users in the Random scheme. In contrast, since the IRS is turned off in the second phase, a relatively small gain is created for the Independent scheme as $L$ increases. More specifically, the higher SINR in the second phase outweighs the lower SINR in the first phase for the Random scheme, as compared to the Independent scheme. Fig.~\ref{fig:simulation_num_BS_antennas} plots the sum-rate performance vs. the number of BS antennas $M$, where we set $L = 4$, $N = 30$, and $K = 4$. The performance of all schemes improves as $M$ increases. Increasing $M$ however creates an incremental gain for the Relay only scheme due to the weak direct link from the BS to the end users. Other schemes, in contrast, are supported by the combined IRS-assisted and direct links in the first phase instead of only the direct link, and therefore observe larger gains as $M$ increases. The Independent scheme outperforms the Random scheme because the Independent scheme is enhanced by IRS beamforming in the first phase. Without optimized IRS phase shifts, the Random scheme suffers from performance loss. Especially, in the small $M$ region, the Random scheme achieves only a small performance gain as compared to the Relay only scheme. This suggests that the coexistence of an IRS and a relay does not always significantly benefit communications unless a proper co-design is performed. \section{Conclusion} \label{sec_conclusion} We have considered a multiuser MISO system in which an IRS and a DF relay coexist and assist downlink transmission simultaneously. We investigated a co-design problem of BS beamforming, relay beamforming, and IRS beamforming for sum-rate maximization. To tackle the complex nonconvex co-design problem, we proposed an algorithm based on alternating optimization and semidefinite relaxation. Simulation results and discussion on our proposed scheme and other benchmarks were presented. It was shown that our proposed algorithm significantly increases the sum-rate of end users. \bibliographystyle{IEEEtran}
\section{Introduction} Cancers in thoracic region are the most common cancers worldwide~\cite{sung2021global} and significant proportions of patients are diagnosed at late stages involved with lymph node (LN) metastasis. The treatment protocol is a sophisticated combination of surgical resection and chemotherapy and/or radiotherapy~\cite{hirsch2017lung}. Assessment of involved LNs~\cite{zhu2020lymph,chao2020lymph} and accurate labeling their corresponding stations are essential for the treatment selection and planning. For example, in radiation therapy, the delineation accuracy of gross tumor volume (GTV) and clinical target volume (CTV) are the two most critical factors impacting the patient outcome. For CTV delineation, areas containing metastasis \acp{LN} should be included to sufficiently cover the sub-clinical disease regions~\cite{chapet2005ct}. One strategy to outline the sub-clinical disease region is to include the \ac{LNS} that containing the metastasized \acp{LN}~\cite{pignon1992meta,yuan2019lymph}. Thoracic LNS is determined according to the text definitions of \ac{IASLC}~\cite{rusch2009iaslc}. The delineation of \ac{LNS} in the current clinical workflow is predominantly a manual process using \ac{CT} images. Visual assessment and manual delineation is a challenging and time-consuming task even for experienced physicians, since converting text definitions of \ac{IASLC} to precise 3D voxel-wise annotations can be error prone leading to large intra- and inter-user variability~\cite{chapet2005ct}. \begin{figure}[t] \centering \includegraphics[width=0.85\textwidth]{figure/Fig_demo_v4.eps} \caption{An illustration of \ac{LNS} and key referencing organs. The top row illustrates the auto-searched top-6 key referencing organs; the bottom row depicts the 12 \acp{LNS}.} \label{Fig:LNS_demo} \end{figure} Deep \acp{CNN} have made remarkable progress in segmenting organs and tumors in medical imaging~\cite{tang2019clinically,zhang2020robust,jin2019accurate,jin2019deep,guo2020organ,jin2020deeptarget}. Only a handful of non-deep learning studies have tackled the automated LNS segmentation~\cite{feuerstein2012mediastinal,matsumoto2014automatic,sarrut2014learning,liu2016mediastinal}. A LNS atlas was established using deformable registration~\cite{feuerstein2012mediastinal}. Predefined margins from manually selected organs, such as the aorta, trachea, and vessels, were applied to infer \acp{LNS}~\cite{liu2016mediastinal}, which was not able to accurately adapt to individual subject. Other methods~\cite{matsumoto2014automatic,sarrut2014learning} built fuzzy models to directly parse the LNS or learn the relative positions between LNS and some referencing organs. Average location errors ranging from $6.9$mm to $34.2$mm were reported using 22 test cases in~\cite{matsumoto2014automatic}, while an average Dice score (DSC) of $66.0\%$ for $10$ LNSs in 5 patients was observed in~\cite{sarrut2014learning}. In this work, we propose the DeepStationing -- an anatomical context encoded deep \ac{LNS} parsing framework with key organ auto-search. We first segment a comprehensive set of 22 chest organs related to the description of LNS according to \ac{IASLC} guideline. As inspired by~\cite{guo2020organ}, the 22 organs are stratified into the anchor or non-anchor categories. The predictions of the former category are exploited to guide and boost the segmentation performance of the later category. Next, \ac{CT} image and referencing organ predictions are combined as different input channels to the \ac{LNS} parsing module. The 22 referencing organs are identified by human experts. However, relevant but different from the human process, \ac{CNN} may require a particular set of referencing organs (key organs) that can opt for optimal performance. Therefore, we automatically search for the key organs by applying a channel-weighting to the input organ prediction channels based on differentiable neural search~\cite{liu2018darts}. The auto-searched final top-6 key organs, i.e., esophagus, aortic arch, ascending aorta, heart, spine and sternum (shown in Fig.~\ref{Fig:LNS_demo}), facilitate our DeepStationing method to achieve high LNS parsing accuracy. We adopt 3D nnU-Net~\cite{isensee2020nnu} as our segmentation and parsing backbone. Extensive 4-fold cross-validation is conducted using a dataset of $98$ \ac{CT} images with $12$ \ac{LNS} + $22$ Organ labels each, as \textit{the first of its kind} to date. Experimental results demonstrate that deep model encoded with the spatial context of auto-searched key organs significantly improves the LNS paring performance, resulting in an average \ac{DS} of $81.1\%\pm6.1\%$, which is $5.0\%$ and $19.2\%$ higher over the pure CT-based deep model and the most recent relevant work~\cite{liu2016mediastinal} (from our re-implementations), respectively. \section{Method} Fig.~\ref{Fig:LNS_overall_pipeline} depicts the overview of our DeepStationing framework, consisting of two major modularized components: (1) stratified chest organ segmentation; (2) context encoded \ac{LNS} parsing with key organ auto-search. \begin{figure}[t] \centering \includegraphics[width=0.85\textwidth]{figure/Fig_pipeline_v3.eps} \caption{Overall workflow of our DeepStationing, which consists of stratified chest organ segmentation and anatomical context encoded \ac{LNS} parsing with key organ auto-search. }\label{Fig:LNS_overall_pipeline} \end{figure} \subsection{Stratified Chest Organ Segmentation}\label{sec:prior_seg} To provide the spatial context for LNS parsing, we first segment a comprehensive set of 22 chest organs related to the description of LNS. Simultaneously segmenting a large number of organs increase optimization difficulty leading to sub-optimal performance. Motivated by ~\cite{guo2020organ}, we stratify 22 chest organs into the anchor and non-anchor categories. Anchor organs have high contrast, hence, it is relatively easy and robust to segment them directly using the deep appearance features. Anchor organs are first segmented, and their results serve as ideal candidates to support the segmentation of other difficult non-anchors. We use two CNN branches to stratify the anchor and non-anchor organ segmentation. With predicted anchor organs as additional input, the non-anchor organs are segmented. Assuming $N$ data instances, we denote the training data as $\mathbb{S}=\left\{ X_n, Y_n^{\mathrm{A}}, Y_n^{\mathrm{\neg A}}, Y_n^{\mathrm{L}}, \right\} _{n=1}^{N}$, where $X_n$, $Y_n^{\mathrm{A}}$, $Y_n^{\mathrm{\neg A}}$ and $Y_n^{\mathrm{L}}$ denote the input \ac{CT} and ground-truth masks for the anchor, non-anchor organs and \ac{LNS}, respectively. Assuming there are $C_{\mathrm{A}}$ and $C_{\mathrm{\neg A}}$ classes for anchor and non-anchor organs and dropping $n$ for clarity, our organ segmentation module generate the anchor and non-anchor organ predictions at every voxel location, $j$, and every output class, $c$: \begin{align} \hat{Y}^{\mathrm{A}}_c(j) = p^{\mathrm{A}}\left( Y^{\mathrm{A}}(j) = c\, |\, X ; \mathbf{W}^{\mathrm{A}}\right) \mathrm{,} & \quad \hat{\mathbf{Y}}^{\mathrm{A}}=\left[ \hat{Y}^{\mathrm{A}}_1\ldots\hat{Y}^{\mathrm{A}}_{C_{\mathrm{A}}} \right] \label{eq:anchor} \mathrm{,} \\ \hat{Y}^{\mathrm{\neg A}}_c(j) = p^{\mathrm{\neg A}}\left( Y^{\mathrm{\neg A}}(j) = c\, |\, X, \hat{\mathbf{Y}}^{\mathrm{A}}; \mathbf{W}^{\mathrm{\neg A}}\right) \mathrm{,} & \quad \hat{\mathbf{Y}}^{\mathrm{\neg A}}=\left[ \hat{Y}^{\mathrm{\neg A}}_1\ldots\hat{Y}^{\mathrm{\neg A}}_{C_{\mathrm{\neg A}}} \right] \label{eq:non-anchor} \mathrm{,} \end{align} where $p^{(\ast)}(.)$ denotes the \ac{CNN} functions and and $\hat{Y}^{(\ast)}_c$ for the output segmentation maps. Here, we combine both anchor and non-anchor organ predictions into an overall prediction map $\hat{\mathbf{Y}}^{\mathfrak{A}}=\hat{\mathbf{Y}}^{\mathrm{A}} \cup \hat{\mathbf{Y}}^{\mathrm{\neg A}}$. Predictions are vector valued 3D masks as they provide a pseudo-probability for every class. $\mathbf{W}^{(\ast)}$ represents the corresponding \ac{CNN} parameters. \subsection{Anatomical Context Encoded LNS Parsing}\label{Sec:LNS_parse} Segmenting \ac{LNS} by only CT appearance can be error prone, since LNS highly relies on the spatial context of adjacent anatomical structures. Emulating the clinical practice of \ac{IASLC} guidelines, we incorporate the referencing organs into the training process of \ac{LNS} parsing. Given $C_{\mathrm{L}}$ classes of the \acp{LNS}, as illustrated in Fig.~\ref{Fig:LNS_overall_pipeline}, we combine the above organ predictions with \ac{CT} images to create a multi-channel input: $\left[ X, \,\, \hat{\mathbf{Y}}^{\mathfrak{A}} \right]$: \begin{equation} \hat{Y}^{\mathrm{L}}_c(j) = p^{\mathrm{L}}\left( Y^{\mathrm{L}}(j) = c \, | \, X, \hat{\mathbf{Y}}^{\mathfrak{A}}; \mathbf{W}^{\mathrm{L}}\right) \mathrm{,} \quad \hat{\mathbf{Y}}^{\mathrm{L}} = \left[ \hat{Y}^{\mathrm{L}}_1\ldots\hat{Y}^{\mathrm{L}}_{C_{\mathrm{L}}} \right] \mathrm{.} \end{equation} Thereupon, the LNS parsing module leverages both the CT appearance and the predicted anatomical structures, implicitly encoding the spatial distributions of referencing organs during training. Similar to Eq.~\eqref{eq:anchor}, we have the \ac{LNS} prediction in its vector-valued form as $\hat{\mathbf{Y}}^{\mathrm{L}}$. \subsubsection{Key Organ Auto-search}\label{Sec:organ_search} The 22 referencing organs are previously selected according to the IASLC guideline. Nevertheless for deep learning based LNS model training, those manually selected organs might not lead to the optimal performance. Considering the potential variations in organ location and size distributions, and differences in automated organ segmentation accuracy, we hypothesize that the deep \ac{LNS} parsing model would benefit from an automated reference organ selection process that are tailored to this purpose. Hence, we use the differentiable neural search~\cite{guo2020organ} to search the key organs by applying a channel-weighting strategy to input organ masks. We make the search space continuous by relaxing the selection of the referencing organs to a Softmax function over the channel weights of the one-hot organ predictions $\hat{\mathbf{Y}}^{\mathfrak{A}}$. For $C_{\mathrm{L}}$ classes, we define a set of $C_{\mathrm{L}}$ learn-able logits for each channel, denoted as $\alpha_c, \forall c \in\left[1\cdots C_{\mathrm{L}}\right]$. The channel weight $\phi_c$ for a referencing organ is defined as: \begin{align} \phi_c = \dfrac{\text{exp}\left( \alpha_{c} \right)}{\sum_{m=1}^{C_{\mathrm{L}}}\text{exp}\left( \alpha_{m} \right)} & \mathrm{,} \quad \Phi = \left[\phi_1 \cdots \phi_{C_{\mathrm{L}}} \right] \mathrm{,} \\ F(\hat{Y}^{\mathfrak{A}}_c, \phi_c) = \phi_c \cdot \hat{Y}^{\mathfrak{A}}_c & \mathrm{,} \quad F (\hat{\mathbf{Y}}^{\mathfrak{A}}, \Phi) = \left[F(\hat{Y}^{\mathfrak{A}}_1, \phi_1) \cdots F(\hat{Y}^{\mathfrak{A}}_{C_{\mathrm{L}}}, \phi_{C_{\mathrm{L}}}) \right] \end{align} where $\Phi$ denotes the set of channel weights and $F(\phi_c, \hat{Y}^{\mathfrak{A}}_c)$ denotes the channel-wise multiplication between the scalar $\phi_c$ and the organ prediction $\hat{Y}^{\mathfrak{A}}_c$. The input of \ac{LNS} parsing model becomes $\left[ X, \,\, F (\hat{\mathbf{Y}}^{\mathfrak{A}}, \Phi) \right]$. As the results of the key organ auto-search, we select the organs with the top-$n$ weights to be the searched $n$ key organs. In this paper, we heuristically select the $n=6$ based on the experimental results. Last, we train the \ac{LNS} parsing model using the combination of original \ac{CT} images and the auto-selected top-$6$ key organs' segmentation predictions. \section{Experimental Results} \noindent{\bf Dataset.} We collected $98$ contrast-enhanced venous-phase \ac{CT} images of patients with esophageal cancers underwent surgery and/or radiotherapy treatments. A board-certified radiation oncologist with 15 years of experience annotated each patient with 3D masks of $12$ \acp{LNS}, involved \acp{LN} (if any), and $22$ referencing organs related to LNS according to \ac{IASLC} guideline. The 12 annotated \ac{LN} stations are: S1 \textit{(left + right)}, S2 \textit{(left + right)}, S3 \textit{(anterior + posterior)}, S4 \textit{(left + right)}, S5, S6, S7, S8. The average \ac{CT} image size is $512 \times 512 \times 80$ voxels with an average resolution of $0.7 \times 0.7 \times 5.0$mm. Extensive four-fold cross-validation (CV), separated at the patient level, was conducted. We report the segmentation performance using \ac{DS} in percentage, \ac{HD} and \ac{ASD} in mm. \begin{table}[!ht] \caption{Mean DSCs, HDs, and ASDs, and their standard deviations of LNS parsing performance using: (1) only CT appearance; (2) CT$+$all 22 referencing organ ground-truth masks; (3) CT$+$all 22 referencing organ predicted masks; (4) CT$+$auto-searched 6 referencing organ predicted masks. The best performance scores are shown in {\bf bold}.} \label{tab: quant} \centering \scalebox{.85}{ \setlength{\tabcolsep}{4.5mm}{ \begin{tabular}{|l|r|r|r|r|} \hline \multicolumn{1}{|c|}{} & \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{} \\ \multicolumn{1}{|c|}{\multirow{-2}{*}{LNS}} & \multicolumn{1}{c|}{\multirow{-2}{*}{CT Only}} & \multicolumn{1}{c|}{\multirow{-2}{*}{\begin{tabular}[c]{@{}c@{}}+22 \\ Organ GT\end{tabular}}} & \multicolumn{1}{c|}{\multirow{-2}{*}{\begin{tabular}[c]{@{}c@{}}+22 \\ Organ Pred\end{tabular}}} & \multicolumn{1}{c|}{\multirow{-2}{*}{\begin{tabular}[c]{@{}c@{}}+6 Searched \\ Organ Pred\end{tabular}}} \\ \hline \multicolumn{5}{|c|}{\cellcolor[HTML]{EFEFEF}DSC} \\ \hline S1 Left & 78.1 $\pm$ 6.8 & 84.3 $\pm$ 4.5 & 82.3 $\pm$ 4.6 & \textbf{85.1 $\pm$ 4.0} \\ S1 Right & 76.8 $\pm$ 5.0 & 84.3 $\pm$ 3.4 & 82.2 $\pm$ 3.4 & \textbf{85.0 $\pm$ 4.1} \\ S2 Left & 66.9 $\pm$ 11.4 & 75.8 $\pm$ 9.0 & 73.7 $\pm$ 8.9 & \textbf{76.1 $\pm$ 8.2} \\ S2 Right & 70.7 $\pm$ 8.5 & 74.8 $\pm$ 7.6 & 72.8 $\pm$ 7.6 & \textbf{77.5 $\pm$ 6.4} \\ S3 Anterior & 77.4 $\pm$ 4.9 & 79.8 $\pm$ 5.6 & 79.7 $\pm$ 5.6 & \textbf{81.5 $\pm$ 4.9} \\ S3 Posterior & 84.6 $\pm$ 3.1 & 87.9 $\pm$ 2.8 & 87.8 $\pm$ 2.9 & \textbf{88.6 $\pm$ 2.7} \\ S4 Left & 74.1 $\pm$ 8.2 & 77.0 $\pm$ 8.9 & 76.9 $\pm$ 8.9 & \textbf{77.9 $\pm$ 9.4} \\ S4 Right & 73.8 $\pm$ 8.9 & 74.9 $\pm$ 9.3 & 74.9 $\pm$ 9.4 & \textbf{76.7 $\pm$ 8.3} \\ S5 & 72.6 $\pm$ 6.7 & 73.2 $\pm$ 7.4 & 73.2 $\pm$ 7.4 & \textbf{77.9 $\pm$ 8.0} \\ S6 & 72.4 $\pm$ 5.7 & 74.9 $\pm$ 4.4 & 74.8 $\pm$ 4.5 & \textbf{75.7 $\pm$ 4.3} \\ S7 & 85.0 $\pm$ 5.1 & 86.6 $\pm$ 5.8 & 86.6 $\pm$ 5.8 & \textbf{88.0 $\pm$ 6.1} \\ S8 & 80.9 $\pm$ 6.1 & 84.0 $\pm$ 5.9 & 82.0 $\pm$ 5.9 & \textbf{84.3 $\pm$ 6.3} \\ \hdashline Average & 76.1 $\pm$ 6.7 & 79.8 $\pm$ 6.2 & 78.9 $\pm$ 6.3 & \textbf{81.1 $\pm$ 6.1} \\ \hline \multicolumn{5}{|c|}{\cellcolor[HTML]{EFEFEF}HD} \\ \hline S1 Left & 11.9 $\pm$ 3.2 & 12.3 $\pm$ 6.0 & 27.6 $\pm$ 38.8 & \textbf{10.3 $\pm$ 4.1} \\ S1 Right & 18.0 $\pm$ 29.3 & 10.6 $\pm$ 2.6 & 61.1 $\pm$ 97.6 & \textbf{9.7 $\pm$ 1.8} \\ S2 Left & 13.3 $\pm$ 9.2 & 9.7 $\pm$ 3.1 & 35.6 $\pm$ 76.9 & \textbf{9.2 $\pm$ 3.1} \\ S2 Right & 36.3 $\pm$ 61.7 & 10.8 $\pm$ 3.0 & 10.8 $\pm$ 3.0 & \textbf{9.5 $\pm$ 3.2} \\ S3 Anterior & 41.7 $\pm$ 62.4 & 13.5 $\pm$ 4.9 & 50.4 $\pm$ 79.1 & \textbf{12.2 $\pm$ 4.3} \\ S3 Posterior & 9.1 $\pm$ 3.3 & 8.0 $\pm$ 2.0 & 18.0 $\pm$ 30.9 & \textbf{7.6 $\pm$ 1.9} \\ S4 Left & 11.5 $\pm$ 4.9 & 14.7 $\pm$ 22.2 & 14.5 $\pm$ 22.2 & \textbf{9.8 $\pm$ 3.8} \\ S4 Right & 32.8 $\pm$ 69.7 & \textbf{9.8 $\pm$ 3.5} & 16.2 $\pm$ 21.5 & \textbf{9.8 $\pm$ 3.6} \\ S5 & 36.4 $\pm$ 56.4 & 20.5 $\pm$ 35.2 & 38.1 $\pm$ 60.3 & \textbf{10.9 $\pm$ 4.0} \\ S6 & 19.2 $\pm$ 30.6 & 8.6 $\pm$ 2.5 & 52.5 $\pm$ 85.3 & \textbf{8.5 $\pm$ 2.7} \\ S7 & 26.3 $\pm$ 42.6 & 9.6 $\pm$ 3.7 & 9.6 $\pm$ 3.7 & \textbf{9.5 $\pm$ 3.5} \\ S8 & 14.5 $\pm$ 6.0 & 13.6 $\pm$ 5.7 & 13.1 $\pm$ 5.8 & \textbf{12.2 $\pm$ 6.2} \\ \hdashline Average & 22.6 $\pm$ 31.6 & 11.8 $\pm$ 7.9 & 28.9 $\pm$ 43.8 & \textbf{9.9 $\pm$ 3.5} \\ \hline \multicolumn{5}{|c|}{\cellcolor[HTML]{EFEFEF}ASD} \\ \hline S1 Left & 1.6 $\pm$ 0.8 & 1.3 $\pm$ 0.6 & 1.4 $\pm$ 1.0 & \textbf{0.9 $\pm$ 0.5} \\ S1 Right & 1.8 $\pm$ 0.8 & 1.2 $\pm$ 0.5 & 1.6 $\pm$ 1.1 & \textbf{0.9 $\pm$ 0.5} \\ S2 Left & 1.4 $\pm$ 0.8 & 1.0 $\pm$ 0.6 & 1.3 $\pm$ 0.8 & \textbf{0.8 $\pm$ 0.6} \\ S2 Right & 1.5 $\pm$ 0.8 & 1.3 $\pm$ 0.7 & 1.3 $\pm$ 0.7 & \textbf{1.0 $\pm$ 0.7} \\ S3 Anterior & 1.0 $\pm$ 0.8 & 0.7 $\pm$ 0.4 & 0.9 $\pm$ 0.9 & \textbf{0.6 $\pm$ 0.4} \\ S3 Posterior & 0.9 $\pm$ 0.5 & \textbf{0.6 $\pm$ 0.3} & 0.8 $\pm$ 1.1 & \textbf{0.6 $\pm$ 0.4} \\ S4 Left & 1.0 $\pm$ 0.6 & 1.4 $\pm$ 2.7 & 1.2 $\pm$ 1.6 & \textbf{0.8 $\pm$ 0.6} \\ S4 Right & 1.5 $\pm$ 1.0 & 1.4 $\pm$ 1.0 & 1.5 $\pm$ 1.0 & \textbf{1.3 $\pm$ 1.0} \\ S5 & 1.3 $\pm$ 0.6 & 1.9 $\pm$ 3.4 & 1.6 $\pm$ 1.8 & \textbf{1.0 $\pm$ 0.5} \\ S6 & 0.8 $\pm$ 0.4 & 0.7 $\pm$ 0.3 & 1.0 $\pm$ 1.1 & \textbf{0.6 $\pm$ 0.3} \\ S7 & 0.9 $\pm$ 0.7 & 0.8 $\pm$ 0.6 & 0.8 $\pm$ 0.6 & \textbf{0.7 $\pm$ 0.6} \\ S8 & 1.7 $\pm$ 1.2 & 1.6 $\pm$ 1.1 & 1.6 $\pm$ 1.1 & \textbf{1.3 $\pm$ 1.3} \\ \hdashline Average & 1.3 $\pm$ 0.7 & 1.1 $\pm$ 1.0 & 1.3 $\pm$ 1.1 & \textbf{0.9 $\pm$ 0.6} \\ \hline \end{tabular} }} \end{table} \noindent{\bf Implementation details.} We adopt the nnU-Net~\cite{isensee2020nnu} with DSC+CE losses as our backbone for all experiments due to its high accuracy on many medical image segmentation tasks. The nnU-Net has been proposed to automatically adapt different preprocessing strategies (i.e., the training image patch size, resolution, and learning rate) to a given 3D medical imaging dataset. We use the default nnU-Net settings for our model training. The total training epochs is 1000. For the organ auto-search parameter $\alpha_c$, we first fix the $\alpha_c$ for $200$ epochs and alternatively update the $\alpha_c$ and the network weights for another $800$ epochs. The rest settings are the same as the default nnU-Net setup. We implemented our DeepStationing method in PyTorch, and an NVIDIA Quadro RTX 8000 was used for training. The average training/inference time is 2.5 GPU days or 3 mins. \subsubsection*{Quantitative Results.}\label{Sec:Eva} We first evaluate the performance of our stratified referencing organ segmentation. The average DSC, HD and ASD for anchor and nonanchor organs are $90.0\pm4.3\%$, $16.0\pm18.0mm$, $1.2\pm1.1mm$, and $82.1\pm6.0\%$, $19.4\pm15.0mm$, $1.2\pm1.4mm$, respectively. We also train a model by segmenting all organs using only one nnUNet. The average DSCs of the anchor, non-anchor, and all organs are $86.4\pm5.1\%$, $72.7\pm8.7\%$, and $80.8\pm7.06\%$, which are $3.6\%$, $9.4\%$, and $5.7\%$ less than the stratified version, respectively. The stratified organ segmentation demonstrates high accuracy, which provides robust organ predictions for the subsequent LNS parsing model. \begin{figure}[!ht] \centering \includegraphics[width=0.8\textwidth]{figure/Fig_quali_v5.eps} \caption{(a) Examples of \ac{LNS} parsing results using different setups. For better comparison, red arrows are used to depict visual improvements. (b) The bottom charts demonstrate the performance using different numbers of searched referencing organs.} \label{Fig:quali} \end{figure} Table~\ref{tab: quant} outlines the quantitative comparisons on different deep \ac{LNS} parsing setups. Columns 1 to 3 show the results using: 1) only \ac{CT} images, 2) \ac{CT} $+$ all $22$ ground-truth organ masks, and 3) \ac{CT} $+$ all $22$ predicted organ masks. Using only \ac{CT} images, \ac{LNS} parsing exhibits lowest performance with an average \ac{DS} of $76.1\%$ and \ac{HD} of $22.6$mm. E.g., distant false predictions is observed in the first image $2^{nd}$ row of~Fig.~\ref{Fig:quali} and false-positive S3 posterior is predicted (in pink) between the S1 and S2. When adding $22$ ground-truth organ masks as spatial context, both \ac{DS} and \ac{HD} show remarked improvements: from $76.1\%$ to $79.8\%$ in \ac{DS} and $22.6$mm to $11.8$mm in \ac{HD}. This verifies the importance and effectiveness of referencing organs in inferring LNS boundaries. However, when predicted masks of the 22 organs are used (the real testing condition), it has a significant increase in HD from $11.8$mm to $28.9$mm as compared to that using ground truth organ masks. This shows the necessity to select the key organs suited for the deep parsing model. Finally, using the top-6 auto-searched referencing organs, our DeepStationing model achieves the best performance reaching {\bf 81.1 $\pm$ 6.1\%} DSC, {\bf 9.9 $\pm$ 3.5mm} HD and {\bf 0.9 $\pm$ 0.6mm} ASD. Qualitative examples are shown in~Fig.~\ref{Fig:quali} illustrating these performance improvements. We auto-search for the organs that are tailored to optimize the \ac{LNS} parsing performance. Using an interval of 3, we train 7 additional \ac{LNS} parsing models, by including the top-3 up to top-21 organs. The auto-searched ranking of the 22 organs is listed as follows: \textit{esophagus, aortic arch, ascending aorta, heart, spine, sternum, V.BCV (R+L), V.pulmonary, descending aorta, V.IJV (R+L), A.CCA (R+L), V.SVC, A.pulmonary, V.azygos, bronchus (R+L), lung (R+L), trachea}, where \textit{`A'} and \textit{`V'} denote the \textit{Artery} and \textit{Vein}. The quantitative \ac{LNS} parsing results in selecting the top-n organs are illustrated in the bottom charts of Fig.~\ref{Fig:quali}. With more organs included gradually, the \ac{DS} first improves, then slightly drops after having more than top-6 organs. The performance later witnesses a sharp drop after including more than top-9 organs, then becoming steady when we include more than top-15 organs. This demonstrates that deep LNS paring model does not need a complete set of referencing organs to capture the LNS boundaries. We choose the top-6 as our final key organs based on experimental results. We notice that the trachea, lungs, and bronchus are surprisingly ranked in the bottom-5 of the auto-search, although previous works~\cite{lu2011automatic,liu2016mediastinal} manually selected them for the LNS parsing. The assumed reasons are that those organs are usually filled with air and have clear boundaries while \ac{LNS} does not include air or air-filled organs. With the help of the other found key organs, it is relatively straightforward for the \ac{LNS} parsing \ac{CNN} to distinguish them and reject the false-positives located in those air-filled organs. We further include 6 ablation studies and segment LNS using: (1) randomly selected 6 organs; (2) top-6 organs with best organ segmentation accuracy; (3) anchor organs; (4) recommended 6 organs from the senior oncologists; (5) searched 6 organs predictions from less accurate non-stratified organ segmentor; (6) searched 6 organs GT. The randomly selected 6 organs are: \textit{V.BCV (L)}, \textit{V.pulmonary}, \textit{V.IJV (R)}, \textit{heart}, \textit{spine}, \textit{trachea}; The 6 organs with the best segmentation accuracy are: \textit{lungs (R+L)}, \textit{descending aorta}, \textit{heart}, \textit{trachea}, \textit{spine}; Oncologists recommended 6 organs are: \textit{trachea}, \textit{aortic arch}, \textit{spine}, \textit{lungs (R+L)}, \textit{descending aorta}; The DSCs for setups (1-6) are 77.2\%, 78.2\%, 78.6\%, 79.0\%, 80.2\%, 81.7\%; the HDs are 19.3mm, 11.8mm, 12.4mm, 11.0mm, 10.1mm, 8.6mm, respectively. In comparison to the LNS predictions using only CT images, the ablation studies demonstrate that using the referencing organ for LNS segmentation is the key contributor for the performance gain, and the selection and the quality of supporting organs are the main factors for the performance boost, e.g., our main results of the setups (5) and (6) show that better searched-organ delineation can help get superior LNS segmentation performance. \noindent{\bf Comparison to previous work.} We compare the DeepStationing to the previous most relevant approach~\cite{liu2016mediastinal} that exploits heuristically pre-defined spatial margins for \ac{LNS} inference. The DeepStationing outperforms ~\cite{liu2016mediastinal} by $19.2\%$ in \ac{DS}, $30.2$mm in \ac{HD}, and $5.2$mm in \ac{ASD}. For the ease of comparison, similar to~\cite{liu2016mediastinal}, we also merge our \acp{LNS} into four \ac{LN} zones, i.e., \textit{supraclavicular} (S1), \textit{superior} (S2, S3, and S4), \textit{aortic} (S5 and S6) and \textit{inferior} (S7 and S8) zones, and calculate the accuracy of \ac{LN} instances that are correctly located in the predicted zones. DeepStationing achieves an average accuracy of $96.5\%$, or $13.3\%$ absolutely superior than \cite{liu2016mediastinal} in \ac{LN} instance counting accuracy. We tested additionally 2 backbone networks: 3D PHNN (3D UNet with a light-weighted decoding path) and 2D UNet. The DSCs of 3D PHNN and 2D UNet are 79.5\% and 78.8\%, respectively. The assumed reason for the performance drop might be the loss of the boundary precision/3D information. \section{Conclusion} In this paper, we propose DeepStationing as a novel framework that performs key organ auto-search based \ac{LNS} parsing on contrasted \ac{CT} images. Emulating the clinical practices, we segment the referencing organs in thoracic region and use the segmentation results to guide \ac{LNS} parsing. Different from employing the key organs directly suggested by oncologists, we search for the key organs automatically as a neural architecture search problem that can opt for optimal performance. Evaluated using a most comprehensive \ac{LNS} dataset, DeepStationing method outperforms previous most relevant approach by a significant quantitative margin of $19.2\%$ in \ac{DS}, and is coherent to clinical explanation. This work is an important step towards reliable and automated \ac{LNS} segmentation. \bibliographystyle{splncs04}
\section{Introduction} Entanglement is a key resource in quantum information \cite{Entanglement_Review_Horodecki,Entanglement_MB_Vedral,Vedral_Book}, quantum computing \cite{NielsenChuang,preskill2018quantum} and quantum metrology \cite{MetrologyTreutlein_Review}. Recently, there has been significant advancement in generating, manipulating and measuring entangled many body states; both experimentally and theoretically \cite{omran2019generation,islam2015measuring,kaufman2016quantum,kallush2021controlling}. Both preparation of the entangled state and its validation using, e.g. entanglement witnesses \cite{Witnesses_Gniewomir}, are challenging aspects in many body systems and are the focus of ongoing research \cite{lacroix2020symmetry,weimer2010rydberg,carr2013preparation,VerstraeteWolfCirac}. Preparation of a desired entangled state can be realized as the ground state of a carefully designed Hamiltonian. Therefore, understanding the entanglement properties of ground states is of practical importance. Significant effort has been directed for extended systems, especially in $1D$. The ground state of a Hamiltonian with local interactions typically exhibits an area law in the bipartite Von Neumann entanglement entropy \cite{Eisert_AreaLaw}, contrary to the generic volume law of typical quantum states. However, the area law does not characterise a system composed of a few sites, where each site can occupy a large number of particles (see Fig.~\ref{fig:ABsystem}). For two sites, the average Von Neumann entanglement entropy is known \cite{Page_averageEnropy,sen1996average}, but the ground state entanglement properties are not. A particularly appealing case is for a single agent in system $B$ to be entangled to a large number of particles in system $A$. Such entanglement allows to manipulate the many body system via the single agent. This setup was experimentally demonstrated in \cite{McConnell2015}, where a single photon was entangled with roughly $3,000$ atoms. At this point, it is unknown whether there is a limit to the number of particles that could realistically be entangled with a single agent. It is further unknown whether our setup leads to typical ground state entanglement properties. To answer the above questions, the entanglement needs to be quantified \cite{Huber_EntanglementCost_Review,Plenio_Entanglement_Review}. Choosing an appropriate entanglement quantifier depends on the intended application, e.g. entanglement distillation to produce Bell states. However, the entanglement quantifier can alternatively be chosen to accommodate fast calculations of known density matrices, e.g. the Logarithmic negativity $E_{ln}$. For pure states, the Von Neumann entanglement entropy $E_{vn}$ serves both purposes. \begin{figure} \centering \includegraphics[scale=0.45]{ABsystem.pdf} \caption{The systems $A$ and $B$ are made to interact such that we find a large occupancy of particles at system $A$ and a low occupancy at system $B$. } \label{fig:ABsystem} \end{figure} In this work we consider $N $ bosons, occupying a two-site system. We study the ground state entanglement properties when the overwhelming majority of bosons occupy site $A$ (see Fig.~\ref{fig:ABsystem}). To make this statement precise, let $\hat{n}_{A,B}$ be the corresponding number operators. Then, $R = \langle \hat{n}_A \rangle / \langle \hat{n}_B \rangle $ is the ratio of the particle occupancies. We study the large $R$ behaviour of both the ground state Von Neumann entanglement entropy and Logarithmic negativity of the Bose-Hubbard Hamiltonian. Then, we study the steady state Logarithmic negativity of a Lindblad super-operator model -- the quantum asymmetric inclusion process at large $R$ values \cite{eisler2011crossover,Bernard18}. Both models are studied at different scaling regimes. Nevertheless, they all consistently lead to a power law decay in the entanglement quantifiers. Quantitatively, the Von Neumann entanglement entropy $E_{vn} \sim \frac{\log R}{R^\alpha} $ and the Logarithmic negativity $E_{ln} \sim \frac{1}{R^\alpha}$ for $R\gg 1$. See Tables \ref{table:BH model table} and \ref{table:QASIP model table} for a summary of the results. The power law decay seem to be typical as we have considered two disparate models and different scaling regimes for each model. The slow power law decay, contrasting with an exponential decay, suggests it is realistic to entangle a single atom to a highly occupied many body state. The exponent $\alpha$ is non-universal. Therefore, interacting systems that result in small $\alpha $ values are favorable to facilitate entanglement between the single atom to the large occupancy system. The structure of this paper is as follows. In Sec.~\ref{sec:Results} we present the Hamiltonian and Lindblad models and summarise the main results. Sec.~\ref{sec:Analytical treatment} presents in full the analytical and numerical treatment of the systems under study. Finally, Sec.~\ref{sec:Discussion} recaps the main findings and their physical relevance and suggests future directions. \section{Models and results \label{sec:Results}} The aim of this work is to quantify the bipartite entanglement of a composite $AB$ system at large $R$ values. Therefore, it is natural to study lattice models, where the distinction between the two subsystems is clear cut. In particular, we study lattice models with two sites, $A$ and $B$. Two disparate lattice models are considered. First, the ground state entanglement of the Bose-Hubbard model is extensively studied. Second, we consider a generalization of the asymmetric inclusion process \cite{Grosskinsky_ASIP} to the quantum realm via a Lindblad equation, dubbed here the quantum asymmetric inclusion process (QASIP). We then study the entanglement properties of the steady state. \subsection{The Bose-Hubbard model} The Bose-Hubbard model is a simple yet rich many body lattice model of spin-less bosons. It allows studying the superfluid-insulator transition \cite{Fisher_BoseHubbard_SFinsulator} and can be experimentally implemented using optical lattices \cite{jaksch1998cold,greiner2002quantum}. The two site Bose-Hubbard model is expected to be both analytically tractable and to present typical physical behaviour in terms of the ground state entanglement. Hence, it serves as the starting point of our analysis. The Bose-Hubbard Hamiltonian is given by \begin{equation} \label{eq:BH Hamiltonian} H_{BH} = J (\hat{b}^\dagger _A \hat{b}_B + \hat{b}^\dagger _B \hat{b}_A ) - \mu \hat{n}_A + \frac{U}{2} \sum_{i=A,B} \hat{n}_i- \hat{n}^2 _i, \end{equation} where $J$ is the hopping matrix element between neighboring sites and $U$ determines the strength of the on-site interaction. The operators $\hat{b}_i,\hat{b}^\dagger _i $ are the site-dependent bosonic creation and annihilation operators and $\hat{n}_i = \hat{b}^\dagger _i \hat{b} _i $ is the number operator for $i=A,B$. In the optical lattice, the potential wells are represented by the two sites \cite{jaksch1998cold}. The potential offset between the two potential wells is given by $\mu$. It furthermore allows to imbalance the system towards large $R$ values. It is useful to note that the total particle number, $ \hat{N} = \hat{n}_A + \hat{n}_B $ is conserved. Therefore, we analyze the ground state with $N$ bosons. In what follows, we consider two scaling schemes leading to large $R$ values. First, taking large $\mu$ values and keeping $N,J$ and $U$ fixed, we find that $R = \mu^2 /J^2 + O(\mu) $. In this limit, and as long as $\frac{J \sqrt{N}}{ \mu } , \frac{U N^2}{ \mu} \ll 1 $, we find analytically the power law behaviour described in Table~\ref{table:BH model table}. These results are also numerically corroborated in Fig.~\ref{fig:BH large mu}. Note that the logarithmic correction in the Von Neumann entanglement hardly changes the behaviour from a clean power law. \begin{figure} \centering \includegraphics[scale=0.37]{figures BH/BH_largemucollapse.pdf} \caption{The scaling of the entanglement at large R for $N=7$ and $\mu \in \left[5\times 10^2 ,10^4\right]$ in the Bose-Hubbard model. The Von Neumann entanglement entropy and the Logarithmic negativity are shown to collapse to $\frac{N E_{ln}}{\ln(R/N)} = 1/R$ and $\frac{E_{ln} \ln 2}{2 \sqrt{N}} = 1/\sqrt{R}$ for the values $(J,U)=(1.325,-0.3245)$ (blue circles and green diamonds) and $(J,U)=(0.32,1.65)$ (orange triangles and red squares). Other $U,J$ values as well as different $N$ were considered, further validating the results. } \label{fig:BH large mu} \end{figure} Second, we consider the large $N$ limit, with fixed $\mu,J$ and $U$. A perturbative approach is harder in this case. Therefore, we studied the scaling limit numerically, leading to different scaling exponents of the power law behaviour. See Fig.~\ref{fig:BH large N fitting}. The results for the large $N$ limit are also summarised in Table~\ref{table:BH model table}. Contrary to the large $\mu$ case, the prefactor $\Gamma$ of the power law (see Table \ref{table:BH model table}) was not pursued in the large $N$ limit. Moreover, the value of the exponent changes appreciably when different values of $\mu,J,U$ are tested. Further analytical and numerical work is required to find the exponents and prefactors of the large $N$ limit. However, the power law behaviour is unequivocal. \begin{figure} \centering \includegraphics[scale=0.37]{figures BH/BH_largeN_Eloglog_openmarkers.pdf} \caption{The scaling of the entanglement at large R for $N \in \left[10,40 \right]$ for $(J,U,\mu) = (0.354, 1.321,0.875)$ (blue circles and green diamonds) and $(J,U,\mu) = (0.763,0.222,1.12)$(orange triangles and red squares). It is evident that the two different sets of values give the expected power law behaviour. The exponent for both the Von Neumann entropy and for the Logarithmic negativity depends on the values of $J,U,\mu$. } \label{fig:BH large N fitting} \end{figure} \begin{table}[ht] \centering \begin{tabular}{ |c||c|c|c| } \hline &&&\\ & $R$ & $E_{vn} = \Gamma \frac{\ln R}{ R^{\alpha }}$ & $E_{ln} = \frac{\Gamma}{ R^{\alpha }}$ \\ &&&\\ \hline &&&\\ $\mu \gg 1$ & $\mu^2/J^2 $ & $\Gamma = N , \alpha =1 $ & $\Gamma = \frac{2 \sqrt{N}}{\ln 2} , \alpha =\frac{1}{2} $ \\ &&& \\ $N \gg 1$ &$ \propto N^{\beta}, \, \beta \approx 2.03$ & $\alpha \approx 0.548 $ & $\alpha \approx 0.247 $ \\ \hline \end{tabular} \caption{The power law behaviour of the ground state entanglement of the Bose-Hubbard model at large $R$ values. For the large $N$ limit, the (parameter dependent) exponents are given for $(U,J,\mu) =(0.354,1.321,0.875) $. } \label{table:BH model table} \end{table} In conclusion, the ground state of the two site Bose-Hubbard model leads to a power law behaviour of both the Von Neumann entanglement entropy and the Logarithmic negativity at large $R$ values in two different scaling schemes. Next, we explore the large $R$ entanglement in an open quantum system setup: the quantum asymmetric inclusion process. \subsection{Open quantum system } Realistically, physical systems are never truly isolated. Interestingly, the coupling of a quantum system to an environment does not always lead to complete loss of entanglement in the system. Indeed, there are examples where the environment can be engineered to produce a desirable entangled state \cite{VerstraeteWolfCirac,shpielberg2020diffusion}. Here, we aim to study whether the large $R$ power law behaviour persists for open quantum systems as well. To that end, we focus on a quantum analog of the asymmetric inclusion process given in terms of the Lindblad equation. In this setup, one usually assumes that a quantum system is coupled to an environment with fast relaxation times. This in turn, allows to discard non-Markovian contributions to the evolution of the density matrix and results in the Lindblad equation \cite{BreuerBook,GKS_equation,lindblad1976generators} \begin{eqnarray} \label{eq:GKSL equation general} \partial_t \rho &=& \mathcal{H}(\rho) + \sum_k \mathcal{D}_{\hat{L}_k} (\rho) \\ \nonumber \mathcal{H}(\rho) &=& -i \left[H,\rho \right] \\ \nonumber \mathcal{D}_{\hat{L}} (\rho) &=& \hat{L}\rho \hat{L}^\dagger - \frac{1}{2} \lbrace \hat{L}^\dagger \hat{L} , \rho \rbrace. \end{eqnarray} In \eqref{eq:GKSL equation general}, $H$ is a Hermitian operator and $\left[ \bullet, \bullet \right],\lbrace \bullet , \bullet \rbrace$ are the commutation and anti-commutation relations correspondingly. Despite the restriction to Markovian dynamics, enough quantumness remains in the Lindblad equation \cite{Spohn_Lebowitz78,QuantumThermodynamics_Kosloff,Quantum_VDP}. The QASIP describes the dynamics of bosons on a two site lattice, where the boson interactions are environment assisted. The evolution of the density matrix is given by \begin{align} \label{eq:Lindblad dynamics} \partial_t \hat{\rho} &= \mathcal{L}_{QASIP} (\hat{\rho}) \\ \nonumber \mathcal{L}_{QASIP} (\hat{\rho}) & = \mathcal{H}_{\mathrm{tb}}(\hat{\rho}) + \mathcal{L}_{\mathrm{D}}(\hat{\rho}) + \mathcal{L}_{E}(\hat{\rho}) \\ \nonumber H_{\mathrm{tb}}(\hat{\rho}) &= \varepsilon \left( \hat{b}^\dagger _A \hat{b}_B + \hat{b}^\dagger _B \hat{b}_A \right) \\ \nonumber \mathcal{L}_{\mathrm{D}}(\hat{\rho}) &= \eta \sum _{k=A,B} \mathcal{D}_{\hat{n}_k} (\hat{\rho}) \\ \nonumber \mathcal{L}_{\mathrm{E}}(\hat{\rho}) &= \gamma \mathcal{D}_{\hat{b}^\dagger _A \hat{b}_B} (\hat{\rho}). \end{align} Here, the Hermitian $H_{\rm{tb}} $ is a tight-binding Hamiltonian, $\mathcal{L}_{\mathrm{D}}$ is responsible for dephasing at each site and $\mathcal{L}_{\mathrm{E}}$ explicitly breaks the symmetry between the two sites and induces the occupation imbalance. Later on, it will be shown that controlling $\gamma$ allows to induce large $R$ values. The relation of eq.\eqref{eq:Lindblad dynamics} to the classical ASIP is as follows. The dephasing and bias terms alone acting on the diagonal terms of the density matrix in the number basis lead to the ASIP master equation. Namly, the quantum master equation is split to the diagonal terms and the coherent terms, each having a closed set of equations (in the number operator basis). The tight-binding Hamiltonian mixes between the cohrent terms and the diagonal terms, hence a quantum ASIP. Three comments are in order before we present the results. First, note that here one cannot assume a priory that the quantum system is coupled to a series of thermalized baths as we have not performed a microscopic derivation of the Lindblad equation. Since we are not interested in studying thermalization, the lack of a microscopic derivation is of no importance. Second, the steady state density matrix is not pure. Hence, we will only use the Logarithmic negativity as an entanglement quantifier. Third, in \eqref{eq:Lindblad dynamics} we have set $\hbar $ to unity. Furthermore, we will assume $\varepsilon,\eta,\gamma$ and the time $t$ to be dimensionless for convenience. When presenting the different scaling schemes, the inverse time dimensions of $\varepsilon,\eta,\gamma$ could be restored. The QASIP, like the Bose-Hubbard model can be shown to conserve the particle number $\hat{N} = \hat{n}_A + \hat{n}_B$ (see the appendix \ref{App:Lindblad operator dynamics}). However, a related but more general property exists for the QASIP. In the number operator basis, we can write the density matrix as \begin{eqnarray} \label{eq:spanning rhoS} \hat{\rho} &=& \sum_{S} a_S \hat{\rho}_S, \quad \textrm{where} \\ \nonumber \hat{\rho}_S &= & \sum^{S} _{x,y=0} \varrho_{S} (x,y) \ket{x,S-x} \bra{y,y-S}. \end{eqnarray} Here, $S$ takes non-negative integer values and $a_S$ are non-negative prefactors that sum to $1$. Note that the hermitianity of the density matrix $\hat{\rho}_S$ implies $\varrho^* _S (x,y) = \varrho _S (y,x)$ and unity trace implies $\sum^S _{x=0} \varrho_S(x,x) =1$. The dynamics \eqref{eq:Lindblad dynamics} conserves the subspace $S$ \begin{eqnarray} \label{eq: S dynamics} \partial_t \varrho_S (x,y) &=& -\eta (x-y)^2 \varrho_S (x,y) \\ \nonumber && +\gamma \, x_- y_- \varrho_S (x-1,y-1) \\ \nonumber && -\frac{1}{2}\gamma \left( x^2 _+ + y^2 _+ \right) \varrho_S (x,y) \\ \nonumber && -i \varepsilon \sum_{z=\pm1 } x_z \varrho_S (x+z,y) -y_z \varrho_S (x,y+z) \\ \nonumber X_+& = & \sqrt{(X+1)(S-X)} \\ \nonumber X_-& = & \sqrt{X(S-X+1)}, \quad \textrm{where } X=x,y. \end{eqnarray} Namely, we have replaced the treatment of the infinite dimensional density matrix $\hat{\rho}$, with a treatment of finite dimensional $(S+1)^2$ density matrices $\hat{\rho}_S$ at fixed $S$. The conserved number $S$ of $\hat{\rho}_S$ equals the number of particles in the system as \begin{equation} \Tr \hat{\rho}_S \hat{N} = \sqrt{\Tr \hat{\rho}_S \hat{N}^2 } = S . \end{equation} The eq.\eqref{eq: S dynamics} implies therefore that the process conserves the particle number. From hereon out, we replace $S$ by $N$. In \eqref{eq:Lindblad dynamics}, there are different scaling schemes leading to the large $R$ limit. The Table \ref{table:QASIP model table} summarises the power law behaviour of the Logarithmic negativity in three different scaling regimes. The results in Table \ref{table:QASIP model table} were verified both analytically and numerically. See Fig.\ref{fig:QASIP large gamma different N }, \ref{fig:QASIP large gamma different eta } and \ref{fig:QASIP large gamma different epsilon } for the large $\gamma$ limit, and Fig.~\ref{fig:QASIP large eta different N }, \ref{fig:QASIP large eta different varepsilon } and \ref{fig:QASIP large eta different gamma } for the large $\eta$ limit. For the large $N$ only numerical evidence is currently present, see Fig.~\ref{fig:QASIP LogNeg plot } and \ref{fig:QASIP R of N scaling }. \begin{figure} \centering \includegraphics[scale=0.45]{figures Lindblad/QASIP_largegamma_diffS.pdf} \caption{The scaled Logarithmic Negativity for the QASIP with $\varepsilon=\eta=1, \gamma \in \left[1,200\right] $ and different $N$ values. The points collapse in the large $R$ limit onto a power law plot. The exponent is in accord with the analytical value of $\alpha =1/2$. } \label{fig:QASIP large gamma different N } \end{figure} \begin{figure} \centering \includegraphics[scale=0.45]{figures Lindblad/QASIP_largeeta_diffS.pdf} \caption{The scaled Logarithmic Negativity for the QASIP with $\varepsilon=\gamma=1, \eta \in \left[1,500\right] $ and different $N$ values. The points collapse in the large $R$ limit onto a power law plot. The exponent is in accord with the analytical value of $\alpha =1$. } \label{fig:QASIP large eta different N } \end{figure} \begin{table}[ht!] \centering \begin{tabular}{ |c||c|c| } \hline &&\\ & $R$ & $E_{ln}(R) = \Gamma R^{-\alpha} $ \\ &&\\ \hline &&\\ $\gamma \gg 1$ & $\frac{\gamma ^2 N^2}{4 \varepsilon ^2}$ &$\Gamma = \frac{2 \sqrt{N}}{ \ln 2} , \quad \alpha =1/2$ \\ && \\ $\eta \gg 1$& $\eta \frac{N \gamma }{2 \varepsilon^2} $ & $\Gamma = \frac{2N^{3/2} \gamma }{\varepsilon \ln 2}, \quad \alpha =1 $ \\ && \\ $N \gg 1$ & $ \propto N^{\beta},\beta \approx 1.941 $ & $ \alpha \approx 0.154 $ \\ \hline \end{tabular} \caption{The power law behaviour of the Logarithmic negativity in the steady state QASIP. For the large $N$ limit, the (parameter dependent) exponents are given for $(\varepsilon,\eta,\gamma) =(1,1,1). $} \label{table:QASIP model table} \end{table} In conclusion, the steady state QASIP in eq.\eqref{eq:Lindblad dynamics} exhibits a power law decay in the Logarithmic negativity, similarly to the Bose-Hubbard dynamics. In the next section, we provide a detailed derivation of the results for the Bose-Hubbard model and for the QASIP. \begin{figure} \centering \includegraphics[scale=0.45]{figures Lindblad/QASIP_largeN_diffgamma.pdf} \caption{ The Logarithmic Negativity for the QASIP with $\varepsilon=\eta=1, \gamma=\lbrace 1,2,3\rbrace $ and $N\in \left[1,30 \right]$. The power law form at large $R$ values is unequivocal, however the exponent $\alpha$ is imprecise as the $N$ values are not large enough. Nevertheless, it is clear that the exponent depends on $\gamma$. } \label{fig:QASIP LogNeg plot } \end{figure} \section{Analytical and numerical analysis \label{sec:Analytical treatment}} In Sec.~\ref{sec:Results}, we have introduced two lattice models: the Bose-Hubbard model and the quantum asymmetric inclusion process. The power law behaviour of the Von Neumann entanglement and the Logarithmic negativity was summarized in Tables \ref{table:BH model table} and \ref{table:QASIP model table}. In this section, we describe the analysis of these results in detail. \subsection{Bose-Hubbard model} To analyze the entanglement properties of the two site Bose-Hubbard model of eq.\eqref{eq:BH Hamiltonian}, we need to find the $N$-particle ground state of the Hamiltonian. Given a description of the ground state, finding the ratio $R$ and the entanglement quantifiers $E_{vn}, E_{ln}$ becomes straight-forward, but sometimes technically cumbersome. See the appendix~\ref{App:Entanglement}. The Hilbert space of $N$ particles for the Bose-Hubbard Hamiltonian eq.\eqref{eq:BH Hamiltonian} is spanned by the $N+1$ Fock states $\ket{n_A,n_B} = \frac{1}{n_A ! n_B !}(\hat{b}_A)^{n_A}(\hat{b}_B)^{n_B}\ket{0,0}$. Namely, \begin{equation} \ket{\psi_N} = \sum^N _{k=0} a_k \ket{k,N-k}, \quad \textrm{where }\sum^N _{k=0}|a_k|^2 =1. \end{equation} Then, the $N$ particle Bose-Hubbard Hamiltonian can be written as a $N+1 \times N+1 $ matrix. Finding the ground state can be done analytically and for all $\mu,U,J$ values when we set $N=1$. This simple case will reveal the intuitive scaling limits leading to the large $R$ behaviour, both for the Bose-Hubbard model as well as for the quantum asymmetric inclusion process in the next subsection. Indeed, for $N=1$, the Bose-Hubbard Hamiltonian can be represented by the $2\times 2$ matrix \begin{equation} \label{eq:BH Hamiltonian for N=1} H^{(N=1)} _{BH} = \begin{pmatrix} -\mu & -J \\ -J & 0 , \end{pmatrix} \end{equation} where the wavefunction is in its most general form \begin{equation} \label{eq:ket state for BH with N=1 } \ket{\psi_{N=1}} = \cos \zeta \ket{10} + {\rm e}^{i \phi_1 } \sin \zeta \ket{01} = \begin{pmatrix} \cos \zeta \\ {\rm e}^{i \phi_1} \sin \zeta \end{pmatrix} \end{equation} for real $\zeta, \phi_1 $ values and the right hand side of \eqref{eq:ket state for BH with N=1 } is in a vector notation corresponding to the matrix \eqref{eq:BH Hamiltonian for N=1}. Clearly, the ratio is $R = \cot^2 \zeta$. The lowest eigenvalue of \eqref{eq:BH Hamiltonian for N=1} is $\epsilon = - \frac{1}{2} (\mu + \sqrt{\mu^2 + 4J^2} )$ with the ground state $\ket{\psi_{N=1}} = \frac{1}{\mathcal{N}} ( -\epsilon \ket{10} +J \ket{01} )$ and $\mathcal{N}$ is a normalization constant. This implies that $R = \epsilon^2/J^2 $. Therefore, in this particular case, $R \gg 1$ only if $\mu/J \gg 1$ and leads to $R = (\mu/J)^2 + O(\mu) $ asymptotically. The Von Neumann entanglement for the ket state \eqref{eq:ket state for BH with N=1 } is \begin{equation} E_{vn} = - 2 \cos^2 \zeta \ln (\cos \zeta) - 2 \cos^2 \zeta \ln (\sin \zeta) . \end{equation} Using trigonometric identities, we recover $\cos^2 \zeta = \frac{1}{1+R}$ and $\sin^2 \zeta = \frac{R}{1+R}$. Asymptotically for large $R$, $E_{ln} = \frac{\ln R}{R} + O(R^{-2})$ as reported in \ref{table:BH model table}. To find the Logarithmic negativity, we need to write the partially transposed density matrix \begin{eqnarray} \rho^{PT} &=& \cos^2 \zeta \ket{10}\bra{10} + \sin^2 \zeta \ket{01}\bra{01} \\ \nonumber && + \cos \zeta \sin \zeta \left( {\rm e}^{i\phi_1} \ket{01}\bra{01} + {\rm e}^{-i\phi_1} \ket{10}\bra{10} \right). \end{eqnarray} The eigenvalues of the partially transposed density matrix are $\cos^2 \zeta , \sin^2 \zeta$ and $\pm i \frac{\sqrt{\cos 4\zeta -1}}{2\sqrt{2}}$. Therefore, the Logarithmic negativity is $E_{ln} = \log_2 (1 +\frac{\sqrt{\cos 4\zeta -1}}{\sqrt{2}}) $. For large $R$ and to leading order, we find $E_{ln} = \frac{2}{\ln 2} R^{-1/2} + O(R^{-1}) $ as reported in Table~\ref{table:BH model table}. For $N>1$, the ground state solution becomes cumbersome, but still requires dealing with a $N+1\times N+1 $ Bose-Hubbard matrix. The numerical code that produced Fig.~\ref{fig:BH large mu},\ref{fig:BH large N fitting} and \ref{fig:BH RofN} finds the ground state of the Bose-Hubbard matrix at some finite $N$. Then, it calculates the Von Neumann entanglement and the Logarithmic negativity. From the $N=1$ example , we have seen that the large $\mu$ limit leads to a large bias $R \gg 1$. For large $\mu$ values the particles are similarly biased to occupy site $A$. This happens when the $\mu$ term dominates the energy of the ground state, i.e. for $\mu \gg \sqrt{N}J , U N^2$. Another large $R$ limit is recovered for finite $\mu,U,J > 0$ and large $N$. In this limit, the particles condense due to the strong attractive energy $ \sim U N^2 $. The symmetry is broken by the potential offset $\mu$, leading to condensation of the particles in site $A$ and to large $R$ values. A perturbative approach for the large $N$ limit is non-trivial due to closing of the gapped Hamiltonian. However, a direct numerical analysis clearly reveals the power law behaviour in this limit. See Table \ref{table:BH model table}, Sec.\ref{sec:Results} and the appendix \ref{app:BH model} for more details. In what follows, we consider the large $\mu$ limit and evaluate the ground state and the entanglement quantifiers using a perturbative approach. Let us develop a standard perturbation theory for the Hamiltonian $H = H_0 + \frac{1}{\mu} H_1 $ \begin{equation} H_0 = - \hat{n}_A \quad H_1 = H_{BH} -\mu H_0 , \end{equation} at large $\mu $. The eigenstates of $H_0$ are $\ket{\phi^{(0)} _n} = \ket{n,N-n}$ with energies $\epsilon^{(0)} _n = - n$. The first order correction to the ground state is \begin{equation} \ket{\phi_N} = \ket{N,0} + \lambda \ket{N-1,1} + O(\lambda^2) \end{equation} where $\lambda = \frac{J \sqrt{N}}{\mu}$ assumed to be small as well as $U N^2 / \mu \ll 1 $. At this limit we find $R = \langle \hat{n}_A \rangle / \langle \hat{n}_B \rangle = N / \lambda^2. $ So, we can approximate at small $\lambda$, $R = \mu^2 /J^2 + O(\mu)$. The Von Neumann entanglement can be calculated for the ground state $\ket{\phi_N}$ \begin{eqnarray} E_{vn} = - \frac{1}{1+\lambda^2} \log \frac{1}{1+\lambda^2} - \frac{\lambda^2}{1+\lambda^2} \log \frac{\lambda^2}{1+\lambda^2} \\ \nonumber = - \lambda^2 \log \lambda^2 + O(\lambda^3). \end{eqnarray} At this limit, we find the reported scaling \begin{equation} \label{eq:Evn large mu} E_{vn} = \frac{N \log {R/N}}{R}. \end{equation} This is corroborated numerically in Fig.~\ref{fig:BH large mu} and summarised in Table \ref{table:BH model table}. Recall that in this scaling, $N$ may be large, but $R \gg N$. To find the Logarithmic negativity, we need to calculate the eigenvalues of the partially transposed density matrix of $\ket{\phi_N}$. For $N>1$, the only non-zero eigenvalues are $\frac{1}{1+\lambda^2},\frac{\lambda^2}{1+\lambda^2},\frac{\pm \lambda }{1+\lambda^2}$. This leads to \begin{equation} \label{eq:Eln large mu} E_{ln} = \log_2 \left( 1+ \frac{2\lambda }{1+\lambda^2} \right) \approx \frac{2}{\ln 2} \sqrt{\frac{N}{R}}. \end{equation} For large $R$ values, where the perturbation theory applies, the Logarithmic negativity dominates the Von Neumann entanglement as it should \cite{Plenio_Entanglement_Review,plenio2005entropy}. Again, we refer to Fig.~\ref{fig:BH large mu} to see the excellent agreement with the numerical evaluation. Other scaling schemes, leading to large $R$ values can exist. Nevertheless, the power law behaviour of the entanglement quantifiers is believed to persist, based on the $N=1$ exactly solvable cases. We turn to study the large $R$ entanglement properties of a completely different setup -- the quantum asymmetric inclusion process. \subsection{The QASIP} To analyze the entanglement properties of the QASIP at large $R$, we need to find the steady state density matrix with a fixed $S$, i.e. $\mathcal{L}_{QASIP}(\hat{\rho}_S) =0 $. Namely, we wish to find $\varrho_S (x,y)$ such that the right hand side of \eqref{eq: S dynamics} vanishes. As in the Bose-Hubbard model, it is useful to study first the simple case of $S=1$. Here, $x,y=\lbrace 0,1 \rbrace$ and demanding a steady state in \eqref{eq: S dynamics} leads to \begin{equation} \label{eq:QASIP S=1 matrix} \begin{pmatrix} -\gamma & i \varepsilon & -i \varepsilon & 0\\ i \varepsilon & -\frac{1}{2}\gamma-\eta & 0 & -i \varepsilon\\ -i \varepsilon & 0 & -\frac{1}{2}\gamma -\eta & i \varepsilon\\ \gamma & -i \varepsilon & i \varepsilon & 0 \end{pmatrix} \begin{pmatrix} \varrho_1 (0,0) \\ \varrho_1 (0,1) \\ \varrho_1 (1,0) \\ \varrho_1 (1,1) \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 0 \\ 0 \end{pmatrix}. \end{equation} Solving \eqref{eq:QASIP S=1 matrix}, we find the steady state solution for $S=1$ \begin{eqnarray} \mathcal{N}_1 \hat{\rho}_1 &=& 4 \varepsilon^2 \ket{0,1}\bra{0,1} \\ \nonumber && + 2i\gamma \varepsilon \left(\ket{1,0}\bra{0,1}-\ket{0,1}\bra{1,0}\right) \\ \nonumber && + (4\varepsilon^2 + \gamma^2 +2 \gamma \eta) \ket{1,0}\bra{1,0}. \end{eqnarray} where $\mathcal{N}_1 = \gamma ^2+2 \gamma \eta +8 \varepsilon ^2 $ ensures unity trace of $\hat{\rho}_1$. From the steady state solution we recover $R = 1 + \frac{\gamma(\gamma+2\eta)}{4\varepsilon^2} $ and $E_{ln} = \log_2 \left( 1+ \frac{4\gamma \varepsilon}{\gamma^2 + 8 \varepsilon^2 + 2\gamma \eta} \right) $. A few observations can already be made. At $\eta \rightarrow \infty$ the entanglement vanishes as can be expected in the large dephasing limit \cite{Bernard18,Altman_MBL}. Moreover, the Logarithmic negativity becomes positive due to a combination of biasing and coherent hopping, i.e. $\gamma \varepsilon>0$. We identify two limits where $R$ becomes large. For $\gamma \rightarrow \infty $ and finite $\eta,\varepsilon$ we recover $R \propto \gamma^2 $ and $E_{ln} \propto 1/ \sqrt{R} $. Similarly, for finite $\gamma,\eta$ and large $\eta$ we recover $R \propto \eta$ and $E_{ln}\propto 1/ R$. Already for the $S=1$ case we find that the entanglement power law behavior persists for large $R$ values. However, the exponent is non-universal and depends on the scaling scheme. Exact solution of the steady state for $S>1$ is at best tedious. Instead, we will find the steady state solution at two limits noted above, using a perturbative approach; The limits at finite $S$ will be shown to agree with the $S=1$ exact analysis carried out in the above. \subsubsection{Large asymmetry between the sites} For $\gamma \gg 1$, and at finite $S,\eta,\varepsilon$, we develop the steady state density matrix as a perturbative sum \begin{equation} \label{eq:gamma pert dm} \hat{\rho}_S = \frac{1}{\mathcal{N}_{\gamma}}(\hat{\rho}^{(0)} _S + \frac{1}{\gamma} \hat{\rho}^{(1)} _S + \frac{1}{\gamma^2} \hat{\rho}^{(2)} _S ) + O(1/\gamma^3), \end{equation} where $\mathcal{N}_{\gamma}$ is a normalization constant to assure trace one of the truncated density matrix. This perturbative approach implies the order by order steady state solutions \begin{eqnarray} \label{eq:gamma order 0} 0 &=& \mathcal{L}_{\mathrm{E}} (\hat{\rho}^{(0)} _S) \\ \label{eq:gamma order 1} 0 &=& \frac{1}{\gamma}\mathcal{L}_{\mathrm{E}} (\hat{\rho}^{(1)} _S) + (\mathcal{L}_{\mathrm{D}} + \mathcal{H}_{tb}) \hat{\rho}^{(0)}_S \\ \label{eq:gamma order 2} 0 &=& \frac{1}{\gamma}\mathcal{L}_{\mathrm{E}} (\hat{\rho}^{(2)} _S) + (\mathcal{L}_{\mathrm{D}} + \mathcal{H}_{tb}) \hat{\rho}^{(1)}_S \end{eqnarray} Eq.\eqref{eq:gamma order 0} admits a uniqe solution $\hat{\rho}^{(0)} _S = \ket{S,0}\bra{S,0} $, namely to leading order site $A$ is maximally occupied and site $B$ is depleted. Using the leading order solution, we find $\hat{\rho}^{(1)} _S = \frac{2 i \varepsilon}{\sqrt{S}} (\ket{S,0}\bra{S-1,1} + \ket{S-1,1}\bra{S,0})$. Note that to first order, there are yet no corrections to the occupancies. Hence, we solve to second order in $1/\gamma $ obtaining \begin{eqnarray} \hat{\rho}^{(2)} _S &=& \frac{4 \varepsilon ^2}{\gamma ^2 S} \ket{S-1,1}\bra{S-1,1} \\ \nonumber &+& \frac{4i \varepsilon \eta }{S^{3/2}} \ket{S-1,1}\bra{S,0} \\ \nonumber &-& \frac{2 \sqrt{2} \varepsilon ^2}{\sqrt{S (S-1)}} \ket{S,0}\bra{S-2,2} + \textrm{h.c.} . \end{eqnarray} To second order, we find $\mathcal{N}_{\gamma} = \frac{4 \varepsilon ^2}{\gamma ^2 S}+1$. From the perturbative solution \eqref{eq:gamma pert dm}, we find that \begin{equation} R = S-1 + \frac{S^2 \gamma^2}{4\varepsilon^2} + O(\gamma) \approx \frac{S^2 \gamma^2 }{4\varepsilon^2} . \end{equation} This approximation also implies the assumption $\varepsilon^2 \ll S \gamma^2$. Also, the Logarithmic negativity can be calculated as there are at most four non-zero eigenvalue for partially transposed density matrix for any $S$ value. We find to leading order \begin{equation} E_{ln} = \frac{4 \varepsilon }{\gamma \sqrt{S} \ln 2} +O(\frac{1}{\gamma ^2}) \approx \frac{2 \sqrt{S}}{ \ln 2 }\frac{1}{R} + O(\frac{1}{R^2}). \end{equation} As noted in Sec.~\ref{sec:Results}, the $E_{ln}(R)$ power law behaviour was verified numerically. \subsubsection{Large dephasing limit} Here we consider the large $\eta$ limit with fixed $S,\gamma, \varepsilon$. As in the large $\eta$ limit, we write the density matrix as a perturbative series in $1/\eta$ \begin{equation} \label{eq:eta pert dm} \hat{\rho}_S = \frac{1}{\mathcal{N}_{\eta}}(\hat{\rho}^{(0)} _S + \frac{1}{\eta} \hat{\rho}^{(1)} _S + \frac{1}{\eta^2} \hat{\rho}^{(2)} _S ) + O(1/\eta^3), \end{equation} where here $\mathcal{N}_\eta$ is a normalization constant ensuring the truncated density matrix has trace $1$. Again, the perturbative series implies the order by order steady state solutions \begin{align} \label{eq:eta order 0} 0 =& \mathcal{L}_{\mathrm{D}} (\hat{\rho}^{(0)} _S) \\ \label{eq:eta order 1} 0 =& \frac{1}{\eta}\mathcal{L}_{\mathrm{D}} (\hat{\rho}^{(1)} _S) + (\mathcal{L}_{\mathrm{E}} + \mathcal{H}_{tb}) \hat{\rho}^{(0)}_S \\ \label{eq:eta order 2} 0 =& \frac{1}{\eta}\mathcal{L}_{\mathrm{D}} (\hat{\rho}^{(2)} _S) + (\mathcal{L}_{\mathrm{E}} + \mathcal{H}_{tb}) \hat{\rho}^{(1)}_S \end{align} Eq.\eqref{eq:eta order 0} admits a degenerate solution \begin{equation} \hat{\rho}^{(0)} _S = \sum^S _{k=0} a_k \ket{k,S-k}\bra{k,S-k} \end{equation} with $a_k $ non-negative coefficients. This degeneracy is broken in the next order, i.e. eq.\eqref{eq:eta order 1}. We find $\hat{\rho}^{(0)} _S = \ket{S,0}\bra{S,0}$, however the degeneracy moves to the next order \begin{align} \hat{\rho}^{(1)} _S =& \sum^S _{k=0} b_k \ket{k,S-k}\bra{k,S-k} \\ \nonumber +&i\varepsilon \sqrt{S} (\ket{S,0}\bra{S-1,1}-\ket{S-1,1}\bra{S,0}) , \end{align} where $b_k$ are again non-negative coefficients. To evaluate to leading order $R$, we have to break the degeneracy in $b_k$. This breaking is obtained at the next order, i.e. eq.\eqref{eq:eta order 2}, where we find $b_k = \delta_{k,S-1} \frac{2\varepsilon^2}{\gamma}$ and \begin{align} \hat{\rho}^{(2)} _S =& -\frac{\varepsilon ^2 \sqrt{S-1} \sqrt{S}}{2 \sqrt{2}} \ket{S-2,2}\bra{S,0} \nonumber \\ \nonumber +&i\frac{\gamma ^2 \varepsilon S^{3/2}+4 \varepsilon ^3 \sqrt{S}}{2 \gamma } \ket{S-1,1}\bra{S,0} \\ \nonumber -&i\frac{2 \sqrt{2} \varepsilon ^3 \sqrt{S-1}}{\gamma } \ket{S-2,2}\bra{S-1,1} \\ \nonumber +& \sum^S _{k=0} c_k \ket{k,S-k}\bra{k,S-k} \\ & +\textrm{h.c.}. \end{align} The degeneracy in the non-negative terms $c_k$ is broken at the third order of the expansion. To leading order in $\eta$, we find $\mathcal{N}_\eta = 1+\frac{2 \varepsilon ^2}{\gamma \eta } $. Therefore, to leading order \begin{equation} R=\frac{\gamma \eta S}{2 \varepsilon ^2}+S-1\approx \frac{\gamma \eta S}{2 \varepsilon ^2}. \end{equation} Again, the spectrum of the partially transposed density matrix is composed of only four non-zero eigenvalues for any $S>1$: $(-\frac{2 \gamma \varepsilon \sqrt{S}}{\gamma \eta +2 \varepsilon ^2},\frac{2 \gamma \varepsilon \sqrt{S}}{\gamma \eta +2 \varepsilon ^2},\frac{2 \varepsilon ^2}{\gamma \eta +2 \varepsilon ^2},\frac{\gamma \eta }{\gamma \eta +2 \varepsilon ^2})$. The Logarithmic negativity is thus given by \begin{equation} E_{\ln }=\log_2\left(1+\frac{4 \gamma \varepsilon \sqrt{S}}{\gamma \eta +2 \varepsilon ^2}\right)\approx \frac{4 \varepsilon \sqrt{S}}{\eta \ln 2 }=\frac{2 \gamma S^{3/2}}{ \varepsilon \ln 2 } \frac{1}{R}. \end{equation} \subsection{Large number of particles} We also studied the scaling limit $S \gg 1$ and finite $\eta,\gamma,\varepsilon$. Analytically, a perturbative solution in this case becomes hard due to the closing of the gap. Nevertheless, it is possible to numerically find the steady state and calculate the Logarithmic negativity even for large $S$ values. This was carried out numerically and reported in Sec.\ref{sec:Results}. \section{Discussion \label{sec:Discussion} } State of the art experimental techniques allows to entangle a single agent to thousands of atoms \cite{McConnell2015}. However, it was unclear whether one could push the experimental techniques to significantly increase the number of atoms entangled to the agent. Here, we have explored the theoretical bounds on entangling one or a few agents to a many body system. The ground state of a two-site Bose-Hubbard model, with an occupancy bias $R\gg1 $ leads to a power law decay in the Logarithmic negativity and the Von Neumann entanglement entropy in different scaling limits. Furthermore, the steady state of the QASIP biased to large $R$ values also exhibits a power law decay in the Logarithmic negativity. We stress that while the power law behaviour is typical, the exponent depends on the scaling limits, see Tables \ref{table:BH model table} and \ref{table:QASIP model table}. From the slow decay of the entanglement, it is now clear why it is possible to entangle thousands of atoms to a single agent. Finding the exact conditions required to attain the observed power law behaviour is an open challenge. Furthermore, designing systems with slow entanglement decay (small $\alpha$) allows to entangle more particles in the many body system to the one agent (or a few). The average Von Neumann entanglement entropy over the random pure state of Hilbert space $N \times N$ is $E_{vn} \sim \log N$ \cite{Page_averageEnropy,sen1996average}. Therefore, the Von Neumann entanglement entropy of the ground state is fundamentally different than that of the average. This is not too surprising when one relates to the area law of ground states in extended systems compared to the typical volume law. In turn, the low Von Neumann entanglement entropy of the ground state suggests that ground states in the large $R$ limit could be susceptible to analytical and numerical techniques, even for large many body systems. From the analysis so far, it may seem that the two-site lattice model is paramount to achieve the power law behaviour. We have carried out preliminary tests in a three site Hubbard model. Taking sites $A,B$ to occupy most of the particles in the system, namely $R = \langle \hat{n}_A + \hat{n}_B \rangle / \langle \hat{n}_C \rangle $. The Von Neumann entanglement entropy between site $C$ and the subsystem $AB$ still exhibits a power law in large $R$. The analysis is beyond the scope of this work and will be presented elsewhere. Another question that comes to mind is whether the power law behaviour persists also in continuum models, and not only in lattice models. We believe this is not the case. After coarse graining a lattice model into a continuum model, an increase is expected in the Von Neumann entanglement entropy due to loss of information. This increase does not depend on the occupancies and hence adds a constant to the Von Neumann entanglement entropy. Therefore, in the large $R$ limit we expect to observe a saturation to a constant with a power law correction. Naively, that should be the same power law of the lattice model. It would be interesting to test this conjecture in future works. Acknowledgments: I would like to thank Guy Cohen, Shahaf Asban and Ofir E. Alon for stimulating talks on the subject.
\section{Introduction} Interphase diffusion processes in heterogeneous media are ubiquitous in a variety of contexts and applications, including magnetic resonance imaging (MRI) \cite{We05}, geological media \cite{To02a,Sa03,Da13,Ta18}, biological cells \cite{Br79,Hof13}, and controlled drug delivery \cite{La81}. In an unheralded paper published in 1963, Prager considered the time-dependent problem of mass transfer of solute between two phases of a heterogeneous medium in three-dimensional Euclidean space $\mathbb{R}^3$ \cite{Pr63b}. Phases 1 and 2 occupy volume fractions $\phi_1$ and $\phi_2$, respectively. He assumed that a solute that is being transferred from one phase to the other has the same diffusion coefficient $D$ in each phase. At $t = 0$, the solute is uniformly distributed throughout phase 2, and completely absent from phase 1. Prager desired to calculate the fraction of the total amount of solute present that has diffused into phase 1 at time $t$, which we denote by ${\cal S}(t)$; see Fig. 1 for a schematic illustrating the spreadability phenomena for a special microstructure. For two different microstructures at a given time $t$, the one with the larger value of ${\cal S}(t)$ spreads diffusion information more rapidly. For this reason, we henceforth call the time-dependent function ${\cal S}(t)$ the {\it spreadability}. Prager recognized that this problem can be solved exactly and found the following exact direct-space solution in three dimensions: \begin{equation} {\cal S}(t)= \frac{1}{(4\pi D t)^{3/2}\, \phi_2} \int_{\mathbb{R}^3} [\phi_2-S_2({\bf r})] \exp[-r^2/(4Dt)] d{\bf r}, \label{0} \end{equation} where $S_2({\bf r})$ is the two-point probability function of phase 2 (defined in Sec. \ref{back}). This is a singular result because it represents one of the rare examples of interphase mass transfer in two-phase random media where an exact solution is possible only in terms of $\phi_2$ and $S_2$. Generally, the effective properties of heterogeneous media are determined not only by $\phi_2$ and $S_2$ but all of the corresponding high-order correlation functions, which constitutes a countably infinite set \cite{To02a}. \begin{figure*}[bt] \includegraphics[width=2.1in,keepaspectratio,clip=]{diffusion-cartoon-1.eps} \hspace{0.2in}\includegraphics[width=2.1in,keepaspectratio,clip=]{diffusion-cartoon-2.eps} \hspace{0.2in}\includegraphics[width=2.1in,keepaspectratio,clip=]{diffusion-cartoon-3.eps} \caption{For purposes of illustration, this schematic shows diffusion spreadability at different times for the special case in which phase 2 is comprised of a spatial distribution of particles. The left panel depicts the uniform concentration of the solute species within phase 2 (dark blue regions) at time $t=0$. The middle panel depicts the spreading of diffusion information at short times. The right panel depicts the uniform concentration of the solute species throughout both phases (light blue region) in the infinite-time limit. The behavior of the spreadability ${\cal S}(t)$ as a function of time is intimately related to the underlying microstructure. Section \ref{periodic} describes remarkable links between the spreadability ${\cal S}(t)$, covering problem of discrete geometry, and nuclear magnetic resonance (NMR) measurements.} \label{cartoon} \end{figure*} Remarkably, the consequences of Prager's result are unknown because it has yet to be understood fundamentally or applied in any meaningful way. The purpose of this investigation is to explore the fundamental theoretical and practical implications of the spreadability ${\cal S}(t)$. We begin by generalizing Prager's formula (\ref{0}) to all space dimensions (Sec. \ref{direct}). We then obtain a new Fourier representation of the spreadability ${\cal S}(t)$ (Sec. \ref{fourier}) in terms of the spectral density ${\tilde \chi_{_V}}({\bf k})$ (defined in Sec. \ref{back}), which is obtainable from scattering experiments. There are many fundamental questions that we will explore. For example, what microstructural information is reflected by the spreadability ${\cal S}(t)$? What microstructures {\it maximize} spreadability up to time $t$? We determine microstructures for which the ``spreadability" is ``fast" or ``slow," thereby gaining an understanding of how the microstructure affects such time-dependent diffusion processes. Using the exact direct- and Fourier-space representations of the spreadability (Sec. \ref{theory}), we derive closed-form general asymptotic expansions of the spreadability for any $d$ that apply at short times and long times in terms of crucial small- and large-scale microstructural information, respectively. We show that the small-time behavior of ${\cal S}(t)$ is determined by the derivatives of $S_2({\bf r})$ at the origin, the leading order term of order $t^{1/2}$ being proportional to the specific surface $s$ (interface area per unit volume). By contrast, the corresponding long-time behavior is determined by the form of the spectral density ${\tilde \chi_{_V}}({\bf k})$ at small wavenumbers. We obtain exact results for ${\cal S}(t)$ for a variety of specific ordered and disordered model microstructures across dimensions that span from hyperuniform to antihyperuniform media (Secs. \ref{app} and \ref{app-stealthy}). Hyperuniform two-phase media are characterized by an anomalous suppression of volume-fraction fluctuations relative to garden-variety disordered media \cite{Za09,To18a} and can be endowed with novel physical properties \cite{To18a}; see Sec. \ref{back} for precise mathematical definitions. For hyperuniform media, disordered or not, we show that the excess spreadability, ${\cal S}(\infty)-{\cal S}(t)$, decays to its long-time behavior exponentially faster than that of any non-hyperuniform two-phase medium, the `slowest" being antihyperuniform media (Sec. \ref{long}). The stealthy hyperuniform class (see Sec. \ref{back}) is characterized by an excess spreadability with the fastest decay rate among all hyperuniform media and hence all translationally invariant microstructures. Specifically, ${\cal S}(t)$ for stealthy hyperuniform media decays faster than any inverse power law (Sec. \ref{app-stealthy}), the latter of which applies to any {\it nonstealthy} disordered hyperuniform medium (Sec. \ref{long}). Thus, the spreadability provides a new dynamic-based figure of merit to probe and classify the spectrum of possible microstructures that span between hyperuniform and nonhyperuniform media. We establish that the microstructures with ``fast" spreadabilities are also those that can be derived from efficient ``coverings" of Euclidean space $\mathbb{R}^d$ (Sec. \ref{covering}). Moreover, in Sec. \ref{NMR}, we identify a heretofore unnoticed fascinating connection between the spreadability ${\cal S}(t)$ and noninvasive nuclear magnetic resonance (NMR) relaxation measurements in physical and biological porous media \cite{Br79,Mit92b,Mi93,Se94,Or02,We05,No14}. We close with concluding remarks (Sec. \ref{discuss}), including a ``phase diagram" that schematically shows the spectrum of spreadability regimes and its relationship to the spectrum of microstructures. \section{Background} \label{back} \subsection{Correlation Functions} A two-phase medium is fully statistically characterized by the $n$-point correlation functions \cite{To02a}, defined by \begin{equation} S_{n}^{(i)} \left( \mathbf{x}_1, ..., \mathbf{x}_n \right) \equiv \left \langle {\cal I}^{(i)}(\mathbf{x}_1) \ldots {\cal I}^{(i)}(\mathbf{x}_n) \right \rangle, \end{equation} where ${\cal I}^{(i)}({\bf x})$ is the {\it indicator function} for phase $i=1, 2$, $n=1,2,3,\ldots$, and angular brackets denote an ensemble average. The function $S_n^{(i)}({\bf x}_1, \ldots, {\bf x}_n )$ also has a probabilistic interpretation, namely, it is the probability that the vertices of a polyhedron located at ${\bf x}_1, \ldots, {\bf x}_n$ all lie in phase $i$. For statistically homogeneous media, $S_{n}^{(i)} \left( \mathbf{x}_1, ..., \mathbf{x}_n \right)$ is translationally invariant and hence depends only on the relative displacements of the points. The {\it autocovariance} function $\chi_{_V}({\bf r})$, which is directly related to the two-point function $S_2^{(i)}({\bf r})$ and plays a central role in this paper, is defined by \begin{equation} \chi_{_V}({\bf r}) \equiv S_2^{(1)}({\bf r})-\phi_1^2=S_2^{(2)}({\bf r})-\phi_2^2. \label{covariance} \end{equation} Here, we have assumed statistical homogeneity. At the extreme limits of its argument, $\chi_{_V}({\bf r})$ has the following asymptotic behavior: $\chi_{_V}({\bf r}=0)=\phi_1\phi_2$ and $\lim_{|{\bf r}| \rightarrow \infty} \chi_{_V}({\bf r})=0$ if the medium possesses no long-range order. If the medium is statistically homogeneous and isotropic, then the autocovariance function ${\chi_{_V}}({\bf r})$ depends only on the magnitude of its argument $r=|\bf r|$, and hence is a radial function. In such instances, its slope at the origin is directly related to the {\it specific surface} $s$, which is the interface area per unit volume. In particular, the well-known three-dimensional asymptotic result \cite{De57} is easily obtained in any space dimension $d$: \begin{equation} \chi_{_V}({\bf r})= \phi_1\phi_2 - \kappa(d) s \;|{\bf r}| + {\cal O}(|{\bf r}|^2), \label{specific} \end{equation} where \begin{equation} \kappa(d)= \frac{\Gamma(d/2)}{2\sqrt{\pi} \Gamma((d+1)/2)}. \label{kappa} \end{equation} The nonnegative spectral density ${\tilde \chi}_{_V}({\bf k})$, which can be obtained from scattering experiments \cite{De49,De57}, is the Fourier transform of $\chi_{_V}({\bf r})$ at wave vector $\bf k$, i.e., \begin{equation} {\tilde \chi}_{_V}({\bf k}) = \int_{\mathbb{R}^d} \chi_{_V}({\bf r}) e^{-i{\bf k \cdot r}} {\rm d} {\bf r} \ge 0, \qquad \mbox{for all} \; {\bf k}. \label{spectral} \end{equation} For isotropic media, the spectral density only depends on the wavenumber $k=|{\bf k}|$ and, as a consequence of (\ref{specific}), its decay in the large-$k$ limit is controlled by the exact following power-law form: \begin{equation} {\tilde \chi}_{_V}({\bf k}) \sim \frac{\gamma(d)\,s}{k^{d+1}}, \qquad k \rightarrow \infty, \label{decay} \end{equation} where \begin{equation} \gamma(d)=2^d\,\pi^{(d-1)/2} \,\Gamma((d+1)/2). \end{equation} \subsection{Hyperuniformity} The hyperuniformity concept generalizes the traditional notion of long-range order in many-particle systems to not only include all perfect crystals and perfect quasicrystals, but also exotic amorphous states of matter according to \cite{To03a,To18a}. For two-phase heterogeneous media in $d$-dimensional Euclidean space $\mathbb{R}^d$, which include cellular solids, composites, and porous media, hyperuniformity is defined by the following infinite-wavelength condition on the {\it spectral density} ${\tilde \chi}_{_V}({\bf k})$\cite{Za09, To18a}, i.e., \begin{equation} \lim_{|{\bf k}|\to 0 }{\tilde \chi}_{_V}({\bf k}) = 0. \label{condition} \end{equation} An equivalent definition of hyperuniformity is based on the local volume-fraction variance $\sigma^2_{_V}(R)$ associated with a $d$-dimensional spherical observation window of radius $R$. A two-phase medium in $\mathbb{R}^d$ is hyperuniform if its variance grows in the large-$R$ limit faster than $R^d$. This behavior is to be contrasted with those of typical disordered two-phase media for which the variance decays like the inverse of the volume $v_1(R)$ of the spherical observation window, which is given by \begin{equation} v_1(R)=\frac{\pi^{d/2} R^d}{\Gamma(1+d/2)}. \label{v1} \end{equation} The hyperuniformity condition (\ref{condition}) dictates that the direct-space autocovariance function $\chi_{_V}({\bf r})$ exhibits both positive and negative correlations such that its volume integral over all space is exactly zero \cite{To16b}, i.e., \begin{equation} \int_{\mathbb{R}^d} \chi_{_V}({\bf r}) d{\bf r}=0, \label{sum-rule} \end{equation} which is a direct-space sum rule for hyperuniformity. \subsection{Classification of Hyperuniform and Nonhyperuniform Media} \label{class} The hyperuniformity concept has led to a unified means to classify equilibrium and nonequilibrium states of matter, whether hyperuniform or not, according to their large-scale fluctuation characteristics. In the case of hyperuniform two-phase media \cite{Za09,To18a}, there are three different scaling regimes (classes) that describe the associated large-$R$ behaviors of the volume-fraction variance when the spectral density goes to zero as a power-law scaling ${\tilde \chi}_{_V}({\bf k})\sim |{\bf k}|^\alpha$ as $|\bf k|$ tends to zero: \begin{align} \sigma^2_{_V}(R) \sim \begin{cases} R^{-(d+1)}, \quad\quad\quad \alpha >1 \qquad &\text{(Class I)}\\ R^{-(d+1)} \ln R, \quad \alpha = 1 \qquad &\text{(Class II)}\\ R^{-(d+\alpha)}, \quad 0 < \alpha < 1\qquad &\text{(Class III).} \end{cases} \label{eq:classes} \end{align} Classes I and III are the strongest and weakest forms of hyperuniformity, respectively. Class I media include all crystal structures, many quasicrystal structures and exotic disordered media \cite{Za09,To18a}. Stealthy hyperuniform media are also of class I and are defined to be those that possess zero-scattering intensity for a set of wavevectors around the origin \cite{To16b}, i.e., \begin{equation} {\tilde \chi}_{_V}({\bf k})=0 \qquad \mbox{for}\; 0 \le |{\bf k}| \le K. \label{stealth} \end{equation} Examples of such media are periodic packings of spheres as well as unusual disordered sphere packings derived from stealthy point patterns \cite{To16b,Zh16b}. By contrast, for any nonhyperuniform two-phase system, it is straightforward to show, using a similar analysis as for point configurations \cite{To21c}, that the local variance has the following large-$R$ scaling behaviors: \begin{align} \sigma^2_{_V}(R) \sim \begin{cases} R^{-d}, & \alpha =0 \quad \text{(typical nonhyperuniform)}\\ R^{-(d+\alpha)}, & -d <\alpha < 0 \quad \text{(antihyperuniform)}.\\ \end{cases} \label{sigma-nonhyper} \end{align} For a ``typical" nonhyperuniform system, ${\tilde \chi}_{_V}(0)$ is bounded \cite{To18a}. In {\it antihyperuniform} systems, ${\tilde \chi}_{_V}(0)$ is unbounded, i.e., \begin{equation} \lim_{|{\bf k}| \to 0} {\tilde \chi}_{_V}({\bf k})=+\infty, \label{antihyper} \end{equation} and hence are diametrically opposite to hyperuniform systems. Antihyperuniform systems include systems at thermal critical points (e.g., liquid-vapor and magnetic critical points) \cite{St87b,Bi92}, fractals \cite{Ma82}, disordered non-fractals \cite{To21b}, and certain substitution tilings \cite{Og19}. \section{Theory} \label{theory} \subsection{Generalization of Prager's formula for All Dimensions} \label{direct} Using the $d$-dimensional Green's function for the time-dependent diffusion equation, it is straightforward to generalize Prager's three-dimensional result for the spreadability ${\cal S}(t)$, given by (\ref{0}), to any Euclidean space dimension $d$. After rearranging terms, we find that \begin{equation} {\cal S}(t)= \frac{1}{(4\pi D t)^{d/2}\, \phi_2} \int_{\mathbb{R}^d}[\phi_2- S_2({\bf r})] \exp[-r^2/(4Dt)] d{\bf r}, \label{1} \end{equation} where it is to be noted that ${\cal S}(\infty)=\phi_1$, i.e., the infinite-time value of ${\cal S}(t)$. We note the identities \begin{equation} \frac{1}{(4\pi D t)^{d/2}} \int_{\mathbb{R}^d} \exp[-r^2/(4Dt)] d{\bf r}=1 \label{ident-1} \end{equation} and \begin{equation} \frac{1}{(4\pi D t)^{d/2}} \int_{\mathbb{R}^d} r^2 \exp[-r^2/(4Dt)] d{\bf r}= 2\,d D\, t. \label{ident-2} \end{equation} The second identity is nothing more than the mean-square displacement of a freely diffusing particle in the long-time limit. Use of the first identity in (\ref{1}) yields the difference ${\cal S}(\infty)-{\cal S}(t)$, which we call the {\it excess spreadability}, to be given by \begin{eqnarray} {\cal S}(\infty)- {\cal S}(t)&=& \frac{1}{(4\pi D t)^{d/2}\, \phi_2} \int_{\mathbb{R}^d} \chi_{_V}({\bf r}) \exp[-r^2/(4Dt)] d{\bf r} \nonumber\\ &=&\frac{d \,\omega_d}{(4\pi Dt)^{d/2}\,\phi_2} \int_0^\infty r^{d-1} \chi_{_V}(r) \exp[-r^2/(4Dt)] dr, \nonumber\\ \label{2} \end{eqnarray} where \begin{equation} \omega_d =\frac{\pi^{d/2}}{\Gamma(1+d/2)} \label{omega} \end{equation} is the volume of a $d$-dimensional sphere of unit radius and $\chi_{_V}({\bf r})$ is the autocovariance function, defined by (\ref{covariance}). In the second line of (\ref{2}), the autocovariance $\chi_{_V}(r)$ is the radial function that depends on the distance $r \equiv |{\bf r}|$, which results from averaging the vector-dependent quantity $\chi_{_V}({\bf r})$ over all angles, i.e., \begin{equation} \chi_{_V}(r)=\frac{1}{\Omega} \int_{\Omega} \chi_{_V}({\bf r})\, d\Omega, \end{equation} where $d\Omega$ is the differential solid angle and \begin{equation} \Omega = \frac{d \pi^{d/2}}{\Gamma(1+d/2)} \end{equation} is the total solid angle contained in a $d$-dimensional sphere. It is important to stress that relation (\ref{2}) applies to all translationally invariant two-media, including periodic media. \begin{figure}[bthp] \includegraphics[ width=1.65in,clip=keepaspectratio]{1Dcase-overlapping.eps} \includegraphics[ width=1.65in,clip=keepaspectratio]{1Dcase-perturblatt.eps}\\ \includegraphics[ width=1.65in,clip=keepaspectratio]{2Dcase-overlapping.eps} \includegraphics[ width=1.65in,clip=keepaspectratio]{2Dcase-stealthy.eps}\\ \includegraphics[ width=1.65in,clip=keepaspectratio]{3Dcase-overlapping.eps} \includegraphics[ width=1.65in,clip=keepaspectratio]{3Dcase-mrj.eps} \caption{\footnotesize Models of nonhyperuniform and hyperuniform two-phase media with different symmetries are shown in blue (left) and green (right) colors, respectively. In each row, the spreadability is larger for the hyperuniform medium than that of the corresponding nonhyperuniform medium, as proved in Sec. \ref{long}. Top row: 3D anisotropic stratified two-phase media consisting of infinite parallel slabs of phases 1 and 2 ($\phi_2=0.5$) whose thicknesses are derived from nonhyperuniform overlapping rods \cite{To02a} (left) and hyperuniform perturbed 1D integer lattice point patterns \cite{Kl20a} (right). Formulas (\ref{2}) and (\ref{3}) with $d=1$ for ${\cal S}(t)$ apply rigorously for these 3D anisotropic structures. Middle row: 3D anisotropic two-phase media ($\phi_2=0.5$) with cylindrical symmetry obtained from nonhyperuniform oriented overlapping circular cylinders \cite{To02a} (left) and stealthy and hyperuniform oriented nonoverlapping circular cylinders \cite{Zh16b,To21a} (right). Formulas (\ref{2}) and (\ref{3}) with $d=2$ for ${\cal S}(t)$ apply rigorously for these 3D anisotropic structures. Bottom row: 3D isotropic two-phase media ($\phi_2=0.636$) of overlapping spheres \cite{To02a} (left) and hyperuniform maximally random jammed spheres \cite{Kla14,To18b} (right). } \label{layered} \end{figure} Figure \ref{layered} shows examples of three-dimensional (3D) nonhyperuniform and hyperuniform media with different symmetries for which formula (\ref{2}) for the spreadability rigorously applies. It is noteworthy that the formula (\ref{2}), as well as formula (\ref{3}) below, for one-dimensional (1D) cases (i.e., $d=1$) are also rigorously exact for the idealized three-dimensional (3D) statistically {\it anisotropic} stratified two-phase media of parallel slabs of phases 1 and 2, as illustrated in the top row of Fig. \ref{layered}. This fact is easily proved by employing the first line of formula (\ref{2}), for example, with $d=3$ using Cartesian coordinates, and then recognizing that the vector-dependent quantity $\chi_{_V}({\bf r})$ is independent of the components of $\bf r$ in the directions orthogonal to the slab normal. Similarly, formulas (\ref{2}) and (\ref{3}) for two-dimensional (2D) cases (i.e., $d=2$) are rigorously exact for the idealized three-dimensional (3D) {\it anisotropic} media that possess transverse isotropy with respect to an axis of symmetry, as illustrated in the middle row of Fig. \ref{layered}. The bottom row of Fig. \ref{layered} shows examples of 3D statistically isotropic disordered nonhyperuniform and hyperuniform media. \subsection{Fourier Representation of the Spreadability} \label{fourier} Here, we obtain a Fourier representation of the spreadability, which is useful when scattering information is available. By Parseval's theorem, the direct-space relation (\ref{2}) for the spreadability can be re-expressed in Fourier space as \begin{eqnarray} {\cal S}(\infty)- {\cal S}(t)&=&\frac{1}{(2\pi)^d\,\phi_2} \int_{\mathbb{R}^d} {\tilde \chi}_{_V}({\bf k}) \exp[-k^2 Dt] d{\bf k} \nonumber\\ &=& \frac{d\,\omega_d}{(2\pi)^d\,\phi_2} \int_0^\infty k^{d-1} {\tilde \chi}(k) \exp[-k^2 Dt] dk, \nonumber\\ \label{3} \end{eqnarray} where ${\tilde \chi}_{_V}({\bf k})$ is the spectral density, which is the Fourier transform of $\chi_{_V}({\bf r})$, and $\bf k$ is the wave vector. In the second line of (\ref{3}), the spectral density ${\tilde \chi}_{_V}(k)$ is the radial function that depends on the wavenumber $k \equiv |{\bf k}|$, which results from averaging the vector-dependent quantity ${\tilde \chi}_{_V}({\bf k})$ over all angles, i.e., \begin{equation} {\tilde \chi}_{_V}(k)=\frac{1}{\Omega} \int_{\Omega} {\tilde \chi}_{_V}({\bf k}) \, d\Omega, \end{equation} $d\Omega$ is the differential solid angle. Now, since ${\tilde \chi}_{_V}({\bf k})$ is nonnegative for all $\bf k$, the integrand of (\ref{3}) is nonnegative and decreases with increasing $t$. Thus, the excess spreadability is a monotonically decreasing function of time and is itself nonnegative, i.e., \begin{equation} {\cal S}(\infty) -{\cal S}(t) \ge 0 \qquad \mbox{for all}\; t \label{pos} \end{equation} or, equivalently, \begin{equation} {\cal S}(t) \le \phi_1 \qquad \mbox{for all}\; t. \end{equation} In summary, we can ascertain the spreadability exactly for any microstructure across spatial dimensions using knowledge of the corresponding autocovariance via relation (\ref{2}) or the spectral density via (\ref{3}). \subsection{Small-Scale Structure via Short-Time Behavior of ${\cal S}(t)$} \label{short} To obtain the short-time asymptotic behavior of ${\cal S}(t)$ for statistically homogeneous media, we recognize that the Gaussian term $\exp[-r^2/(4 D t)]$ in the direct-space representation of the spreadability (\ref{2}) is nonnegligibly small for short times for distances only near the spatial origin ($r=0$). Therefore, the short-time behavior of the integral in (\ref{2}) is determined by the small-$r$ expansion of $\chi_{_V}(r)$ about $r=0$: \begin{equation} \chi_{_V}(r) = \phi_1\phi_2 - \frac{\omega_{d-1}}{\omega_d \,d} \,s\, r + \sum_{n=2}^N s_n r^n, \label{s} \end{equation} where $s$ is the specific surface and the coefficient $s_n=(d^n \chi_{_V}(r)/dr^n)_{r=0}$ is the $n$th order derivative at the origin. Substitution of (\ref{s}) into (\ref{2}) yields the following exact asymptotic expansion of ${\cal S}(t)$ for any $d$: \begin{widetext} \begin{equation} {\cal S}(t) = \frac{s}{\phi_2} \left(\frac{Dt}{\pi}\right)^{1/2} + \frac{d\, \omega_d}{\pi^{d/2} \phi_2} \sum_{n=2}^{N} 2^{n-1}\, s_{n}\,\Gamma((n+d)/2)\, (Dt)^{n/2} \quad (t \to 0), \label{small} \end{equation} \end{widetext} where we have employed the integral identity \begin{eqnarray} \frac{1}{(4\pi Dt)^{d/2}} \hspace{-0.2in}&&\int_{0}^\infty r^m \exp[-r^2/(4Dt)] dr \nonumber\\ &=&2^{m-d}\, {\pi^{-d/2} \Gamma((m+1)/2)}\, (Dt)^{(m+1-d)/2}, \nonumber \\ \end{eqnarray} and $m$ is a nonnegative integer. It is noteworthy that if the upper limit $N$ in the sum (\ref{small}) is infinite, i.e., the $s_n$ exist for all $n \ge 2$, formula (\ref{small}) is an exact convergent series representation of the spreadability for all times. The first two terms of the short-time asymptotic expansion (\ref{small}) are explicitly given by \begin{equation} {\cal S}(t) = \frac{s}{\phi_2} \left(\frac{Dt}{\pi}\right)^{1/2} - \frac{2 \,d\,s_2}{\phi_2}\, (D t) + {\cal O}(Dt/a^2)^{3/2}, \label{short-time} \end{equation} where $a$ is some characteristic heterogeneity length scale. Note that the leading term is of order $t^{1/2}$, independent of the space dimension, and proportional to the specific surface $s$, which is intuitively clear, since the solute species is only just emerging from phase 2 in the immediate vicinity of the two-phase interface. The term of order $t$ is determined by the curvature of $\chi_{_V}(r)$ at the origin due to the presence of the coefficient $s_2$. \subsection{Large-Scale Structure via Long-Time Behavior of ${\cal S}(t)$} \label{long} The long-time behavior of the spreadability ${\cal S}(t)$ is determined by the large-scale structural characteristics of the two-phase medium. Specifically, we see that the integrand of the Fourier representation (\ref{3}) of the spreadability is nonnegligibly small at long times for wavenumbers in the vicinity of the origin, i.e., the behavior of the spectral density ${\tilde \chi}_{_V}(k)$ in the infinite-wavelength limit. In the special situation in which ${\tilde \chi}_{_V}(k)$ is an analytic function at the origin, the spectral density admits a Taylor series expansion in only even powers of $k$ and whose coefficients depend on certain moments of the autocovariance function $\chi_{_V}(r)$, all of which must exist. Specifically, using (\ref{3}), we find the following exact series representation of the excess spreadability ${\cal S}(\infty)-{\cal S}(t)$: \begin{eqnarray} {\cal S}(\infty)- {\cal S}(t) &=& \frac{d \,\omega_d}{(4\pi Dt)^{d/2}\,\phi_2}\sum_{n=0}^\infty \frac{(-1)^n M_{2n+d-1}(\chi_{_V})}{n!(4 D t)^n} , \label{6} \end{eqnarray} where \begin{equation} M_n(\chi_{_V})= \int_0^\infty r^n \chi_{_V}(r) dr \end{equation} is the $n$th moment of $\chi_{_V}(r)$. Observe now that truncation of the infinite series (\ref{6}) yields the long-time asymptotic expansion of the excess spreadability. The first few terms of this asymptotic expansion are explicitly given by \begin{widetext} \begin{eqnarray} {\cal S}(\infty)- {\cal S}(t)&=&\frac{d \,\omega_d}{(4\pi Dt)^{d/2}\,\phi_2} \left[M_{d-1}(\chi_{_V}) - \frac{M_{d+1} (\chi_{_V})}{4 D t} +\frac{M_{d+3}(\chi_{_V})}{32 (Dt)^2} - \cdots\right] \quad (t\to \infty). \label{7} \end{eqnarray} \end{widetext} Note that since the moment $M_{d-1}(\chi_{_V})$ is nonnegative, then the leading-order term of the sum is of order $t^{-d/2}$ whenever the system is nonhyperuniform, i.e., $M_{d-1}(\chi_{_V})$ does not vanish, and all moments exist. Now we recognize that if this type of two-phase media is hyperuniform, then $M_{d-1}(\chi_{_V})$ in (\ref{7}) vanishes, implying that the leading-order term of the sum that involves the moment $M_{d+1}(\chi_{_V}) $ is of order $t^{-(d+2)/2}$, i.e., \begin{widetext} \begin{eqnarray} {\cal S}(\infty)- {\cal S}(t)&=& \frac{d \, \omega_d}{4 (4 \pi)^{d/2} (Dt)^{d/2+1}\,\phi_2} \left[- M_{d+1}(\chi_{_V}) +\frac{M_{d+3}(\chi_{_V})}{8Dt} + \cdots\right] \quad (t\to \infty). \label{hyp} \end{eqnarray} \end{widetext} In light of the nonnegativity condition (\ref{pos}), the moment $M_{d+1}(\chi_{_V}) $ must be negative for a hyperuniform medium. Moreover, since the spectral density ${\tilde \chi}_{_V}(k)$ is analytic at $k=0$ [i.e, all moments of $\chi_{_V}(r)$ exist], then it follows that ${\tilde \chi}_{_V}(k) \propto - M_{d+1}(\chi_{_V}) k^2$ in the limit $k \to 0$, and hence the two-phase medium is hyperuniform of class I. Thus, we see that for such hyperuniform media, disordered or not, ${\cal S}(\infty)- {\cal S}(t)$ decays to its long-time behavior exponentially faster than that of any non-hyperuniform two-phase medium. Now we consider the more general class of two-phase media in which the spectral density may be a nonanalytic function at the origin such that it obeys the following power-law scaling in the infinite-wavelength limit: \begin{equation} \lim_{|{\bf k}| \to {\bf 0}} {\tilde \chi}_{_V}({\bf k}) = B |{\bf k} a|^{\alpha}, \label{power} \end{equation} where $B$ is a positive dimensionless constant, $\alpha$ is an exponent that lies in the interval $(-d,\infty)$, and $a$ represents some characteristic heterogeneity length scale. Antihyperuniform media constitute cases in which $-d < \alpha <0$. The case $\alpha=0$ corresponds to nonhyperuniform media, while the cases $\alpha >0$ correspond to hyperuniform media that may belong to class I, II or III (see Sec. \ref{class}). This small-wavenumber behavior enables us to determine the more general long-time asymptotic behavior of ${\cal S}(t)$ using the Fourier representation (\ref{3}). Specifically, we find the following general asymptotic expansion: \begin{widetext} \begin{equation} {\cal S}(\infty)- {\cal S}(t) = \frac{ B\, \Gamma((d+\alpha)/2)\,\phi_2}{2^d\,{\pi}^{d/2}\,\Gamma(d/2)\, (Dt/a^2)^{(d+\alpha)/2}} +{o}\left((Dt/a^2)^{-(d+\alpha)/2}\right) \quad (Dt/a^2 \gg 1), \label{long-time} \end{equation} \end{widetext} where ${o}(x)$ signifies all terms of order less than $x$. Thus, we see that the long-time asymptotic behavior of ${\cal S}(t)$ is determined by the exponent $\alpha$ and the space dimension $d$, i.e., at long times, ${\cal S}(t)$ approaches the value $\phi_1$ with a power-law decay $1/t^{(d+\alpha)/2}$, implying a faster decay as $\alpha$ increases for some dimension $d$. When $\alpha$ is bounded and positive, this result means that class I hyperuniform media has the fastest decay, followed by class II and then class III, which has the slowest decay among hyperuniform media. Of course, antihyperuniform media with $\alpha \to -d$ has the slowest decay among all translationally invariant media. In the {\it stealthy limit} in which $\alpha \to \infty$, the predicted infinitely-fast inverse-power decay rate implies that the infinite-time aysmptote is approached exponentially fast. This result will be demonstrated explicitly in the case of periodic media, which are stealthy, as well as disordered stealthy hyperuniform media. \section{Applications to Nonhyperuniform, Hyperuniform and Antihyperuniform Media} \label{app} \subsection{Standard Nonhyperuniform Media} \label{Debye} It is instructive to first consider the spreadability ${\cal S}(t)$ for models of typical nonhyperuniform two-phase media. Prototypical examples are Debye random media \cite{Ye98a}, which are defined entirely by the following monotonic radial autocovariance function: \begin{equation} \chi_{_V}(r) =\phi_1\phi_2 \exp(-r/a). \label{debye} \end{equation} Such media can never be hyperuniform because the sum rule (\ref{sum-rule}) requires both positive and negative correlations \cite{To16b}. Debye et al. \cite{De57} hypothesized the simple exponential form (\ref{debye}) to model three-dimensional media with phases of ``fully random shape, size, and distribution.” It was many years after their 1957 study that such autocovariance functions were shown to be realizable in two \cite{Ye98a,Chi13,Ma20b} and three \cite{Ji07,To20a} dimensions. The corresponding spectral density is given by \begin{equation} {\tilde \chi}_{_V}(k) = \frac{ \phi_1\phi_2\, 2^d \,\pi^{d-1}\, a^d}{\omega_{d-1}\,[1+(ka)^2]^{(d+1)/2}}. \label{debye-spectral} \end{equation} Therefore, for small wavenumbers, \begin{equation} {\tilde \chi}_{_V}(k) = \phi_1\phi_2 \frac{2^d \pi^{d-1}\,a^d}{\omega_{d-1}} [1 -\frac{(d+1)}{2} (ka)^2 + {\cal O}((ka)^4)] \end{equation} so that ${\tilde \chi}_{_V}(0)=\phi_1\phi_2 2^d \pi^{d-1}\,a^d/\omega_{d-1}$. The spectral density is plotted in Fig. \ref{debye-spec} for the first three space dimensions. We observe that Debye random media departs from hyperuniformity superexponentially fast as the space dimension increases; specifically, ${\tilde \chi}_{_V}(0)/(\phi_1\phi_2a^d) \sim \sqrt{2} [2\pi d/\exp(1)]^{d/2}$ for large $d$. \begin{figure}[t] \centerline{\includegraphics[width=3.4in,keepaspectratio,clip=]{spectral-debye.eps}} \caption{ The scaled spectral density ${\tilde \chi}_{_V}(k)/(\phi_1\phi_2)$ versus wavenumber $k$ for Debye random media for the first three space dimensions, as obtained from (\ref{debye-spectral}). } \label{debye-spec} \end{figure} It is convenient to rewrite the direct-space representation of the spreadability ${\cal S}(t)$, given by (\ref{2}), as follows: \begin{equation} {\cal S}(\infty) -{\cal S}(t) =\frac{d\omega_d \phi_1}{(4\pi D t/a^2)^{d/2}} I_d(t), \end{equation} where \begin{equation} I_d(t) =\frac{1}{a^d}\int_0^\infty r^{d-1} \exp(-r/a) \exp[-r^2/(4Dt)] dr. \end{equation} We can obtain a closed-form exact expression for ${\cal S}(t)$ for Debye random media for any $d$ using the recurrence relation \begin{equation} I_{d+2}(t)= \frac{2Dt}{a^2}\left[ d\, I_{d} - I_{d+1} \right]. \label{recur} \end{equation} Specifically, the explicit expressions \begin{equation} I_1(t)=\exp(Dt/a^2)\,\sqrt{\pi Dt/a^2}\,\left[1 - \mbox{erf}(\sqrt{Dt/a^2})\right] \end{equation} and \begin{equation} I_2(t)= \frac{2Dt}{a^2}\left\{1-\exp(Dt/a^2)\,\sqrt{\pi Dt/a^2}\,\left[1- \mbox{erf}(\sqrt{Dt/a^2})\right]\right\}, \end{equation} for the first two dimensions combined with the recurrence relation (\ref{recur}) enables one to obtain $I_d$ for any $d \ge 3$. For example, for $d=3$, we have \begin{widetext} \begin{equation} I_3(t)= \frac{2Dt}{a^2}\Big\{ \exp(Dt/a^2)\,\sqrt{\pi Dt/a^2}\,\left[1 -\mbox{erf}(\sqrt{Dt/a^2})\right]\left[1+2Dt/a^2\right]- 2Dt/a^2\Big\}. \end{equation} \end{widetext} We also note that the $n$th moment of the autocovariance of Debye random media for any $d$ is given by \begin{equation} M_n(\chi_{_V})= \phi_1 \phi_2\, n! \,a^{n+1}. \label{debye-mom} \end{equation} This result enables us to obtain another exact representation of the spreadability via the infinite series (\ref{6}). For any space dimension $d$, the short-time behavior of the ${\cal S}(t)$ is given by \begin{equation} {\cal S}(t) = \frac{s}{\phi_2} \left(\frac{Dt/a^2}{\pi}\right)^{1/2} -\frac{d}{\phi_2} \left(\frac{D t}{a^2}\right) + {\cal O}((Dt/a^2)^{3/2}), \end{equation} where \begin{equation} s= \frac{\phi_1\phi_2 \omega_d d}{\omega_{d-1} \, a} \end{equation} is the specific surface for a Debye random medium and we have used (\ref{short-time}). Employing (\ref{6}) and (\ref{debye-mom}), we see that the first two terms of the long-time asymptotic expansion of the spreadability are given by \begin{widetext} \begin{equation} {\cal S}(\infty)-{\cal S}(t) = \frac{(d-1)!\,d \omega_d \phi_2}{(4\pi Dt/a^2)^{d/2}} -\frac{(d+1)!\,d \omega_d\phi_2}{(4\pi Dt/a^2)^{(d+2)/2}} +{\cal O}\left((Dt/a^2)^{-(d+4)/2}\right). \end{equation} \end{widetext} Figure \ref{debye-spread} shows the small- and intermediate-time behaviors of the spreadability for Debye random media in the first three space dimensions. It is seen that the effect of increasing dimensionality is to increase the spreadability for a fixed time for almost all times, namely, for dimensionless times $Dt/a^2> 1$. \begin{figure}[bthp] \centerline{\includegraphics[width=3.4in,keepaspectratio,clip=]{1D-2D-3D.eps}} \caption{ The spreadability ${\cal S}(t)$ versus dimensionless time $D t/a^2$ for small to intermediate times for Debye random media in the first three space dimensions. } \label{debye-spread} \end{figure} \subsection{Disordered Hyperuniform Media} \label{disorder-hyper} To model hyperuniform two-phase media in $\mathbb{R}^d$, Torquato \cite{To16b} considered the following family of autocovariance functions: \begin{equation} \frac{\chi_{_V}(r)}{\phi_1\phi_2}=c \, e^{-r/a}\cos(qr +\theta), \label{auto-hyper} \end{equation} where the parameters $q$ and $\theta$ are the wavenumber and phase associated with the oscillations of $\chi_{_V}(r)$, respectively, $a$ is a correlation length and $c$ is a normalization constant to be chosen so that the right-hand side of (\ref{auto-hyper}) is unity for $r=0$. In the special case in which $\theta=0$ and $c=1$, Torquato showed that the corresponding autocovariance function satisfies all of the necessary realizability conditions and hyperuniformity constraint (\ref{sum-rule}) for $d =2$ if $(qa)^2=1$ and for $d=3$ if $(qa)^2=1/3$. Thus, the spectral densities for $d=2$ and $d=3$ are respectively given by \begin{equation} \frac{{\tilde \chi}_{_V}(k)}{\phi_1\phi_2}= \frac{ 2\pi (ka)^2 [A(k)+B(k)] + 4\pi [A(k)-B(k)]\, a^2}{[(ka)^4+4] [A^2(k)+B^2(k)] }, \label{spec2-hyper} \end{equation} and \begin{equation} \frac{{\tilde \chi}_{_V}(k)}{\phi_1\phi_2}= \frac{216\pi \, [3 (ka)^2+8](ka)^2\,a^3}{81 (ka)^8+216 (ka)^6+ 432 (ka)^4+ 384 (ka)^2+256}, \label{spec3-hyper} \end{equation} where \begin{equation} A(k)=\sqrt{(ka)^2/2+ \sqrt{(ka)^4+4}/2}, \qquad B(k)=A^{-1}(k). \end{equation} It was shown that for the special case $\theta=0$ and $d=1$, the function (\ref{auto-hyper}) does not satisfy the hyperuniformity constraint for any values of the parameters $q$ and $\theta$. However, we note here that (\ref{auto-hyper}) meets all of the known realizability conditions and the hyperuniformity constraint for $d=1$, provided that the phase is given by $\theta =\tan^{-1}\left(1/(qa)\right)$, implying that the normalization constant is $c= [1+ (qa)^2]^{1/2}/(qa)$. For concreteness, we set $qa=1$, and hence $c=2$ and $\theta=\pi/4$. Taking the Fourier transform of (\ref{auto-hyper}) with these parameters yields the spectral density to be given by \begin{equation} \frac{{\tilde \chi}_{_V}(k)}{\phi_1\phi_2}= \frac{4\, (ka)^2\, a}{(ka)^4 +4}. \label{spec1-hyper} \end{equation} Substitution of this expression into (\ref{3}) yields the following exact formula for the spreadability \begin{equation} {\cal S}(\infty)-{\cal S}(t)= \frac{4 \phi_1 \,\sqrt{t}}{\sqrt{\pi}} [s_{1,1/2}(2t)-1], \end{equation} where $s_{\mu,\nu}(x)$ is the Lommel function of the second kind \cite{Ab72}. Figure \ref{spec-hyper} depicts the scaled spectral densities for the aforementioned disordered hyperuniform models in the first three space dimensions. It is seen that the peak values increase substantially with increasing dimension. \begin{figure}[bthp] \centerline{\includegraphics[width=3.6in,keepaspectratio,clip=]{spectral-hyper.eps}} \caption{ The scaled spectral density ${\tilde \chi}_{_V}(k)/(\phi_1\phi_2)$ versus wavenumber $k$ for disordered hyperuniform media for the first three space dimensions, as obtained from relations (\ref{spec2-hyper}), (\ref{spec3-hyper}) and (\ref{spec1-hyper}). } \label{spec-hyper} \end{figure} \begin{figure}[bthp] \centerline{\includegraphics[width=3.4in,keepaspectratio,clip=]{1D.eps}} \caption{Comparison of the spreadabilities for Debye random media and disordered hyperuniform media for $d=1$ and $\phi_2=0.5$. } \label{compare} \end{figure} The $n$th moment $M_n(\chi_{_V})$ of the autocovariance function (\ref{auto-hyper}) for any $n$ is given exactly by \begin{equation} M_n(\chi_{_V})= c \phi_1\phi_2 \frac{n!a^{n+1}}{[1+(qa)^2]^{n+1}} \left[ \cos(\beta)\cos(\theta) -\sin(\beta) \sin(\theta)\right], \label{mom-hyper} \end{equation} where $\beta= (n+1)\arctan(qa)$. The specific expressions for the moments for the parameters used above for the first three space dimensions are given in Appendix \ref{mom}, which yield corresponding exact representations of the spreadability ${\cal S}(t)$ via the infinite series (\ref{6}). Using these results and (\ref{hyp}) yields the corresponding long-time asymptotic expansions of ${\cal S}(t)$ for the first three space dimensions: \begin{equation} {\cal S}(\infty)- {\cal S}(t) = \frac{\phi_1}{4\sqrt{\pi} \,(Dt/a)^{3/2}} +{\cal O}\left((Dt/a)^{-5/2}\right) \quad (d=1), \end{equation} \begin{equation} {\cal S}(\infty) -{\cal S}(t) = \frac{3\phi_1}{16\, (Dt/a)^{2}} +{\cal O}\left((Dt/a)^{-3}\right) \quad (d=2), \end{equation} and \begin{equation} {\cal S}(\infty) -{\cal S}(t) = \frac{81\phi_1}{64\, \sqrt{\pi} (Dt/a)^{5/2}} +{\cal O}\left((Dt/a)^{-7/2}\right) \quad (d=3). \end{equation} For fixed dimension, we have already noted that the spreadability for disordered hyperuniform media will be substantially larger than that of nonhyperuniform media. Figure \ref{compare} specifically demonstrates this distinction in one dimension by comparing the spreadabilities for Debye random media and disordered hyperuniform media. \subsection{Antihyperuniform Media} As a model of antihyperuniform media in three dimensions, we consider here the following autocovariance function \begin{equation} \frac{\chi_{_V}(r)}{\phi_1\phi_2} =\frac{1}{1+2(r/a) +(r/a)^2}. \label{auto-anti} \end{equation} This monotonic functional form meets all of the known necessary realizability conditions on a valid autocovariance function \cite{To16b}. It is clear that any $n$th order moment $M_n(\chi_{_V})$ for $n \ge 1$ is unbounded. The corresponding spectral density is given by \begin{widetext} \begin{equation} {\tilde \chi}_{_V}(k)= \frac{4\pi a^2}{ka} \Big[ \mbox{Ci}(ka)[ ka \cos(ka)+\sin(ka)]+\mbox{Ssi}(ka)[ka\sin(ka)-\cos(ka)\Big] , \label{spec-anti} \end{equation} \end{widetext} where $\mbox{Ci}(x)\equiv \int_0^x dt \cos(t)/t$ is the cosine integral, $\mbox{Ssi}(x) \equiv \mbox{Si}(x) -\pi/2$ is the shifted sine integral and $\mbox{Si}(x) \equiv \int_0^x dt \sin(t)/t$ is the sine integral. We see that ${\tilde \chi}_{_V}(k)\sim2\pi^2/k$ in the limit $k\to 0$, which is consistent with the power-law decay $1/r^2$ of the $\chi_{_V}(r)$ in the limit $r \to \infty$. The spectral density is plotted in Fig. \ref{anti-spec}. \begin{figure}[bthp] \centerline{\includegraphics[width=3.4in,keepaspectratio,clip=]{spectral-anti.eps}} \caption{The scaled spectral density ${\tilde \chi}_{_V}(k)/(\phi_1\phi_2)$ versus wavenumber $k$ for antihyperuniform media in three dimensions, as obtained from (\ref{spec-anti}). } \label{anti-spec} \end{figure} We have already observed that the excess spreadability for antihyperuniform media will have the slowest decay to its infinite-time behavior relative to that of disordered hyperuniform media or even to nonhyperuniform media in which the spectral density is bounded at the origin. These distinguished behaviors are clearly exhibited in Figure \ref{compare} where the excess spreadabilities are compared for these three different cases in three dimensions. The long-time inverse power-law scalings of ${\cal S}(\infty)-{\cal S}(t)$ for the hyperuniform, nonhyperuniform and antihyperuniform three-dimensional models are $1/t^{5/2}$, $1/t^{3/2}$ and $1/t$, respectively, as obtained from (\ref{long-time}). \begin{figure}[bthp] \centerline{\includegraphics[width=3.4in,keepaspectratio,clip=]{3D-2.eps}} \caption{Comparison of the excess spreadabilities for Debye random media, disordered hyperuniform media and antihyperuniform media for $d=3$ and $\phi_2=0.5$. The long-time inverse power-law scalings of ${\cal S}(\infty)-{\cal S}(t)$ for each of these models is indicated. } \end{figure} \section{Applications to Stealthy Hyperuniform Media} \label{app-stealthy} In Sec. \ref{long}, we indicated that that the infinite-time aysmptotes of the spreadability of stealthy hyperuniform media are approached exponentially fast and hence faster than any inverse power-law, which applies to nonhyperuniform and nonstealthy hyperuniform media. In this section, we explicitly demonstrate such long-time behaviors of both stealthy disordered and ordered media. We also describe how the speadability of stealthy hyperuniform media is linked to the covering problem of discrete geometry \cite{Co93,To10d}. \subsection{Disordered Stealthy Hyperuniform Sphere Packings} Consider a packing of identical spheres of radius $a$, which we take to be phase 2. The packing fraction is $\phi_2=\rho v_1(a)$, where $\rho$ is the number density and $v_1(a)$ is the volume of a sphere [cf. (\ref{v1})]. The spectral density of such a packing, hyperuniform or not, can be expressed in terms of the structure factor $S({\bf k})$ according to \cite{To85b,To02a,To16b} \begin{eqnarray} {\tilde \chi}_{_V}({\bf k}) {\tilde \chi}({\bf k}) &=& \rho\, {\tilde m}^2(k;a) S({\bf k}) \nonumber \\ &=& \phi_2\, {\tilde \alpha}_2(k;a) S({\bf k}) \label{chi-S} \end{eqnarray} where ${\tilde m}(k;a)$ is the Fourier transform of the sphere indicator function, \begin{eqnarray} {\tilde \alpha}(ka) &=& \frac{1}{v_1(a)} {\tilde m}^2(k;a) \nonumber \\ &=& \frac{1}{v_1(a)} \left(\frac{2\pi a}{k}\right)^{d} J_{d/2}^2(ka) \nonumber \\ &=& 2^d \pi^{d/2} \Gamma(d/2+1)\frac{J_{d/2}^2(ka)}{k^d}. \end{eqnarray} \begin{equation} {\tilde \alpha}_2(k;a) = 2^d \pi^{d/2} \Gamma(d/2+1)\frac{J_{d/2}^2(ka)}{k^d} \end{equation} is the Fourier transform of the scaled intersection volume of two spherical windows \cite{To03a}. The zero-$k$ and large-$k$ of this function are given respectively by \begin{equation} {\tilde \alpha}_2(0;a) = v_1(a) \end{equation} and \begin{equation} {\tilde \alpha}_2(k;a) \sim 2^{d+1} \pi^{d/2-1} \Gamma(1+d/2)\frac{ \cos^2[ka -(d+1)/4]}{a k^{d+1}} \quad (ka \to \infty). \label{asym} \end{equation} Moreover, we have the following integral condition: \begin{equation} \frac{1}{(2\pi)^d}\int_{\mathbb{R}^d} {\tilde \alpha}_2(k;a) d{\bf k}=1. \end{equation} If the point configuration specified by the sphere centers is hyperuniform, then $\lim_{|{\bf k}|\to 0}S({\bf k})=0$, and hence the dispersion or packing is hyperuniform, since it immediately follows from (\ref{chi-S}) that the stealthy hyperuniformity condition (\ref{condition}) on the spectral density is obeyed. Moreover, if the sphere centers constitute a stealthy and hyperuniform point configuration, $S({\bf k})=0$ for $ 0 \le |{\bf k}| \le K$, and hence it follows that the spectral density is also identically zero up to the cut-off value $K$, i.e., it obeys relation (\ref{stealth}). Disordered stealthy hyperuniform packings have been generated using the collective-coordinate optimization procedure \cite{To15} by decorating the resulting ground-state point configurations by nonoverlapping spheres \cite{Zh16b,Ki20a}. The degree of order of such ground states depends on a tuning parameter $\chi$, which measures the extent to which the ground states are constrained by the size of the cut-off value $K$ relative to the number of degrees of freedom. For $\chi <1/2$, the ground states are typically disordered and uncountably infinitely degenerate in the infinite-volume limit \cite{To15}. Using the fact that $\rho \chi=v_1(K)/[2d(2\pi)^d]$ \cite{To15}, it immediately follows that for identical nonoverlapping spheres of radius $a$ that the dimensionless stealthy cut-off value $Ka$ in terms of the packing fraction $\phi_2$ for any space dimension $d$ is given by \begin{equation} (Ka)^d=d 2^{d+1}\Gamma^2(1+d/2) \phi_2 \chi. \label{K} \end{equation} Given the specific stealthy form obtained from (\ref{chi-S}), one can compute the spreadability from formula (\ref{3}). Our main interest here is to determine from this formula the exact long-time asymptotic form for disordered stealthy packings. Noting that at long times, the spectral density can be replaced with its constant value at $k=K$, we find \begin{widetext} \begin{equation} {\cal S}(\infty)-{\cal S}(t) \sim \frac{d \omega_d}{(2\pi)^d } {\tilde \alpha}_2(Ka) S(K) \int_K^\infty k^{d-1} \exp(-k^2 D t) dk = \frac{d \omega_d}{2(2\pi)^d } {\tilde \alpha}_2(Ka) S(K) \frac{\exp(-K^2 Dt)}{K^2Dt} \; (Dt/a^2 \gg 1). \label{S-stealth} \end{equation} \end{widetext} We see that the decay of the excess spreadability of a disordered stealthy hyperuniform two-phase medium is exponentially faster than that of any class I hyperuniform system in which the exponent $\alpha>1$, specified by (\ref{power}), is bounded. \subsection{Ordered Stealthy Hyperuniform Sphere Packings} \label{periodic} It is instructive to compare and contrast the spreadability of disordered stealthy hyperuniform packings to that of their ordered stealthy hyperuniform counterparts. For this purpose, we consider identical nonverlapping spheres of radius $a$ centered on the sites of a periodic lattice, which are stealthy and hyperuniform up to the first Bragg peak \cite{To15}. We begin by noting that the structure factor of the sites of a Bravais lattice in $\mathbb{R}^d$, excluding forward scattering, is given by \begin{equation} S({\bf k}) =\frac{(2\pi)^d}{v_c} \sum_{{\bf Q} \neq {\bf 0}} \delta({\bf k} -{\bf Q}), \label{factor} \end{equation} where $v_c$ is the volume of a fundamental cell in direct space and $\bf Q$ denotes a reciprocal lattice (Bragg) vector. Substitution of (\ref{chi-S}) and (\ref{factor}) into (\ref{3}) yields \begin{equation} {\cal S}(\infty)-{\cal S}(t)=\phi_2 \sum_{{\bf Q} \neq {\bf 0}} \frac{{\tilde \alpha}_2(|{\bf Q}|a)}{v_1(a)} \exp[-|{\bf Q}|^2 Dt]. \label{packing-b} \end{equation} Alternatively, we can recast this equation by employing the angular-averaged structure factor $S(k)$, which is given by \begin{equation} S(k) =\frac{(2\pi)^d}{v_c} \sum_{n=1} \frac{Z(Q_n)}{s_1(Q_n)} \delta(k - Q_n), \label{S-radial} \end{equation} where $Z(Q_n)$ is the coordination number at radial distance $Q_n$, $s_1(R)=d \pi^{d/2}R^{d-1}/\Gamma(1+d/2)$ is the surface area of $d$-dimensional sphere of radius $R$, and $\delta(k)$ is a radial Dirac-delta function. \begin{table*}[t] \caption{\label{1D} The scaled first Bragg peak $Q_1a$ for one-dimensional periodic packings of spheres (rods) of radius $a$ derived from common crystal structures in terms of the packing fraction $\phi_2$. The corresponding maximal packing fraction $\phi_2^{max}$ for each structure is also listed. In the case of a periodic packing with a an $n$-particle basis, $\eta$ is the dimensionless length of the fundamental cell in terms of the minimal nearest-neighbor distance and hence the maximal packing fraction $n/\eta$ is always less than or equal to unity. The packing with the largest value of $Q_1a$ is the one derived from the integer lattice $\mathbb{Z}$. } \begin{tabular}{c|c|c} \hline Crystal Structure & $Q_1a$ & $\phi_2^{max}$ \\ \hline Integer lattice ($\mathbb{Z}$) & $\pi \phi_2$ & 1 \\ Periodic with $n$-particle basis & $\pi \phi_2/n$ & $n/\eta$ \\ \hline \end{tabular} \end{table*} \begin{table*}[t] \caption{\label{2D} The scaled first Bragg peak $Q_1a$ (raised to the power 2) for two-dimensional periodic packings of spheres (circular disks) of radius $a$ derived from common crystal structures in terms of the packing fraction $\phi_2$. The corresponding maximal packing fraction $\phi_2^{max}$ for each structure is also listed. The packing with the largest value of $Q_1a$ is the one derived from the triangular lattice $A_2\equiv A_2^*$.} \begin{center} \begin{tabular}{c|c|c} \hline Crystal Structure & $(Q_1a)^2$ & $\phi_2^{max}$\\ \hline Triangular lattice ($A_2\equiv A_2^*$) &$(8\pi/\sqrt{3})\phi_2= (14.5103\ldots)\phi_2 $ & $\pi/\sqrt{12}=0.9068\ldots$ \\ Square lattice ($\mathbb{Z}^2=\mathbb{Z}^2_*$) & $(4\pi) \phi_2=(12.5663\ldots)\phi_2$ & $\pi/4= 0.7853\ldots$ \\ Honeycomb crystal ($\mbox{Dia}_2$) & $(4\pi/\sqrt{3})\phi_2= (7.2551\ldots)\phi_2 $ & $\pi/(3\sqrt{3})=0.6045\ldots$ \\ Kagom\'{e} crystal ($\mbox{Kag}_2$) & $[8\pi/(3\sqrt{3})]\phi_2= 4.8367\ldots)\phi_2$& $3\pi/(8\sqrt{3})=0.6801\ldots$ \\ \hline \end{tabular} \end{center} \end{table*} \begin{table*} \caption{\label{3D} The scaled first Bragg peak $Q_1a$ (raised to the power 3) for three-dimensional periodic packings of spheres of radius $a$ derived from common crystal structures in terms of the packing fraction $\phi_2$. The corresponding maximal packing fraction $\phi_2^{max}$ for each structure is also listed. The packing with the largest value of $Q_1a$ is the one derived from the BCC lattice $D_3^*$. } \begin{center} \begin{tabular}{c|c|c} \hline Crystal Structure & $(Q_1a)^3$ & $\phi_2^{max}$\\ \hline BCC lattice ($D_3^*$) &$(6\sqrt{2}\pi^2)\phi_2= (83.7463\ldots)\phi_2 $ & $\sqrt{3}\pi/8=0.6801\ldots$ \\ FCC lattice ($D_3\equiv A_3$) & $(9\sqrt{3}\pi^2/2)\phi_2=(76.9259\ldots)\phi_2$ & $\pi/\sqrt{18}=0.7408\ldots$ \\ HCP crystal & $(8\sqrt{6}\pi^2/3)\phi_2=(64.4679\ldots)\phi_2$ & $\pi/\sqrt{18}=0.7408\ldots$\\ SC lattice ($Z_3 \equiv Z_3^*$) & $ 6\pi^2\phi_2 =(59.2176\ldots)\phi_2$ & $\pi/6=0.5235\ldots$ \\ Simple hexagonal lattice & $ 3\sqrt{3} \pi^2\phi_2= (51.2839\ldots)\phi_2$ & $\pi/(3\sqrt{3})=0.6045\ldots$ \\ Diamond crystal ($\mbox{Dia}_3$) & $(9\sqrt{3}\pi^2/4)\phi_2=(38.4629\ldots)\phi_2$ & $\sqrt{3}\pi/16=0.3400\ldots$\\ Pyrochlore crystal ($\mbox{Kag}_3$) & $(9\sqrt{3}\pi^2/8)\phi_2=(19.2314\ldots)\phi_2$ & $\sqrt{2} \pi/12=0.3702\ldots$ \\ \hline \end{tabular} \end{center} \end{table*} \begin{table*} \caption{\label{4D} The scaled first Bragg peak $Q_1a$ (raised to the power 4) for four-dimensional periodic packings of spheres of radius $a$ derived from common crystal structures in terms of the packing fraction $\phi_2$. The corresponding maximal packing fraction $\phi_2^{max}$ for each structure is also listed. The packing with the largest value of $Q_1a$ is the one derived from the four-dimensional checkerboard lattice $D_4 \equiv D_4^*$.} \begin{center} \begin{tabular}{c|c|c} \hline Crystal Structure & $(Q_1a)^4$ & $\phi_2^{max}$ \\ \hline $D_4$ lattice & $64\pi^2 \phi_2$& $\pi^2/16 =0.6168\ldots$ \\ $\mathbb{Z}^4$ lattice & $32\pi^2 \phi_2$& $\pi^2/16 =0.3084\ldots$ \\ $\mbox{Dia}_4$ crystal &$32\pi^2 \phi_2$ & $\sqrt{5}\pi^2/125=0.1765\ldots$ \\ $\mbox{Kag}_4$ crystal & $(64\pi^2/5) \phi_2$& $\sqrt{5}\pi^2/128=0.1724\ldots$ \\ \hline \end{tabular} \end{center} \end{table*} Now we recognize that expression (\ref{S-radial}) for $S(k)$ applies more generally to {\it periodic packings} in which there are $N$ particles per fundamental cell, provided that $Z(Q_n)$ is interpreted to be the {\it expected} coordination number at radial distance $Q_n$. Thus, for periodic packings, we have \begin{equation} {\cal S}(\infty)-{\cal S}(t)=\phi_2 \sum_{n=1} Z(Q_n) \frac{{\tilde \alpha}_2(Q_n\,a)}{v_1(a)} \exp[-Q_n^2 Dt], \label{packing-radial} \end{equation} where the packing fraction is given by \begin{equation} \phi_2 =\frac{N v_1(a)}{v_c}. \end{equation} At large times, the first term in the sum of (\ref{packing-radial}) is the dominant contribution and so \begin{equation} {\cal S}(\infty)-{\cal S}(t) \sim \frac{\phi_2 Z(Q_1)\,{\tilde \alpha}_2(Q_1\,a)}{v_1(a)} \exp[-Q_1^2 Dt] \qquad (Dt/a^2 \gg 1), \label{S-order} \end{equation} where $Q_1$ is the first (smallest positive) Bragg wavenumber. Result (\ref{S-order}), which is also a lower bound for all times, means that among all periodic packings of identical spheres in $\mathbb{R}^d$ at a fixed packing fraction $\phi_2$, the one with the largest first Bragg peak will have the fastest approach to the infinite-time behavior in space dimension $d$. In dimensions one, two, three and four, these optimal packings for the spreadability correspond to the integer lattice $\mathbb{Z}$, triangular lattice $A_2$, body-centered cubic (BCC) lattice $D_3^*$ (dual to the face-centered cubic (FCC) or checkerboard lattice $D_3$), and the four-dimensional checkerboard lattice $D_4$ \cite{To15}, respectively. Tables I-IV list the scaled first Bragg peak $Q_1a$ raised to the power $d$ for some periodic sphere packings derived from commonly known periodic (crystal) point patterns in one, two, three, and four dimensions, respectively; see Appendix \ref{lattices} for mathematical definitions. An exact expression for the spreadability for all times for 1D integer lattice packings is given in Appendix \ref{1D-integer} and compared to spreadabilities of 1D models of disordered media. We see that both long-time relations (\ref{S-stealth}) and (\ref{S-order}) for disordered and ordered stealthy packings, respectively, involve exponential decay rates that are determined by the size of the stealthy cut-off value $Ka$, which equals $Q_1a$ in the ordered case. Now, since stealthy disordered ground states must have values of $\chi$ less than 1/2, any periodic packing with $\chi >1/2$ (see Ref. \cite{To15}) will have a larger cut-off value $Ka=Q_1a$, according to (\ref{K}) and hence faster spreadabilities. By the same token, the spreadability is slower for any periodic packing with a value of $\chi$ smaller than that of a disordered stealthy packing. For example, the pyrochlore crystal in three dimensions has a maximum $\chi$ value of $\chi=\pi/(4/\sqrt{12})=0.2267\ldots$ \cite{To15} and hence any disordered stealthy packing with $\chi$ greater than the pyrochlore value has a faster spreadability. This is to be contrasted with the optimal BCC structure with a maximal value of $\chi=2\sqrt{2}\pi/9=0.9873\ldots$ \cite{To15}. \subsection{Link to Covering Problem of Discrete Geometry} \label{covering} It should not go unnoticed that the point configurations corresponding to the optimal sphere packings for the spreadability are also the best {\it coverings} in the first four space dimensions \cite{To10d}. The covering problem asks for the point configuration that minimizes the radius of overlapping spheres circumscribed around each of the points required to cover $d$-dimensional Euclidean space $\mathbb{R}^d$ \cite{Co93}. While the spreadability involves the ``covering" of space by non-uniform concentration fields (as illustrated schematically in Fig. \ref{cartoon}), it is intuitively reasonable to conclude that decorations of the points of good coverings by identical nonoverlapping spheres correspond to media with large spreadabilities. Furthermore, it is interesting to note that the best coverings in the first four space dimensions are also the best {\it quantizers} and minimizers of large-scale density fluctuations \cite{To10d}. \subsection{Optimal Particle Shape for Spreadability} Would a decoration of a stealthy and hyperuniform point configuration in $\mathbb{R}^d$ by nonoverlapping identical nonspherical particles yield spreadabilities that are larger than that of their spherical counterparts? We conjecture that the decoration of such an infinite point configuration by identical spheres possesses the largest spreadability among all identical convex particles. While proving this conjecture is beyond the scope of the present paper, the key arguments to support it rest on the fact that the $d$-dimensional sphere is perfectly isotropic (i.e., possesses infinite-fold rotational symmetry) and is the closed set with the minimal surface area to volume ratio, a consequence of the isoperimetric inequality. \section{Link of the Spreadability to NMR and Diffusion MRI Measurements } \label{NMR} NMR techniques provide noninvasive means to characterize the microstructure of fluid-saturated porous media \cite{Br79,Mit92b,Mi93,Se94,Or02,We05,No14}. Here we identify a heretofore unknown relationship between the spreadability ${\cal S}(t)$ and the NMR pulsed field gradient spin-echo (PFGSE) amplitude ${\cal M}({\bf k},t)$ \cite{Mit92b} as well as MRI-measured water diffusion in biological media \cite{No14}. Consider a fluid-saturated porous medium, which invariably contains paramagnetic impurities at the interface. In particular, one can extract microstructural information of the porous medium from the PFGSE amplitude ${\cal M}({\bf q},t)$, which depends on the wave vector $\bf q$ and time $t$ \cite{Mit92b,Mi93,Se94,Or02}. The PFGSE amplitude contains information on both the spectrum (eigenvalues) and eigenfunctions of the diffusion operator, which are determined by the microstructure of the porous medium. For statistically isotropic media, the time-dependent diffusion coefficient $D(t)$ is directly obtained from the first derivative of the logarithm of ${\cal M}(q,t)$ with respect to the square of the wavenumber $q\equiv |\bf q|$, namely, \begin{equation} \lim_{q\to 0} -\frac{\partial \ln {\cal M}(q,t)}{\partial q^2}= {\cal D}(t)\,t, \end{equation} where ${\cal D}(t)$ is the effective time-dependent diffusion coefficient of the porous medium. The long-time limit of ${\cal D}(t)$ is the static effective diffusion coefficient ${\cal D}_e$ \cite{To02a}. Mitra {\it et al.} \cite{Mit92b} proposed a simple phenomenological ansatz, based on an effective diffusion propagator, that relates the PFGSE amplitude ${\cal M}({\bf k},t)$ to the spectral density of the porous medium. They showed that this approximation provides accurate estimates of ${\cal M}({\bf k},t)$ for both periodic and disordered microstructures. Now we observe that setting the wave vector $\bf k$ to zero in their formula (7) (up to a normalization parameter) gives, after simplification, the {\it total magnetization} as a function of time, i.e., \begin{equation} {\cal M}({\bf q=0},t)- \phi_2 = \frac{1}{(2\pi)^d \phi_2} \int {\tilde \chi}_{_V}({\bf k}) \exp[-k^2 {\cal D}(t) t]\; d{\bf k}, \label{nmr} \end{equation} where $\phi_2$ here is the porosity and ${\cal M}({\bf q}=0,t=0)=1$. Comparing this infinite-wavelength formula to relation (\ref{3}) for the excess spreadability ${\cal S}(\infty)-{\cal S}(t)$ reveals that they are very similar to one another in functional form, except for the fact that the diffusion coefficient appearing in (\ref{nmr}) is the effective time-dependent one. One can map the former to the latter problem via the transformations $ {\cal S}(\infty)-{\cal S}(t) \rightarrow {\cal M}({\bf q=0},t)- \phi_2$ and $D \rightarrow {\cal D}(t)$. Indeed, the total magnetization ${\cal M}({\bf q=0},t)$ shares many qualitative and quantitative features with the spreadability function ${\cal S}(t)$. For example, it is known that for porous media with {\it perfectly absorbing} interfaces, the short-time behavior of ${\cal M}({\bf q=0},t)$ is of order $t^{1/2}$ and proportional to the specific surface $s$ \cite{Mi93}, which, as we noted in Sec. \ref{short}, is exactly the case in the small-$t$ behavior of the spreadability ${\cal S}(t)$. At long times, formula (\ref{nmr}) for the power-law scaling (\ref{power}) of the spectral density has the following asymptotic behavior: \begin{widetext} \begin{equation} {\cal M}({\bf q}=0,t)- \phi_2 = \frac{ B\, \Gamma((d+\alpha)/2)\,\phi_2}{2^d\,{\pi}^{d/2}\,\Gamma(d/2)\, ({\cal D}_et/a^2)^{(d+\alpha)/2}} +{o}\left(({\cal D}_e t/a^2)^{-(d+\alpha)/2}\right) \quad ({\cal D}_e t/a^2 \gg 1). \label{long-time-2} \end{equation} \end{widetext} This formula is identical to long-time formula (\ref{long-time}) for the excess spreadability when $D$ is replaced by the static effective diffusion coefficient ${\cal D}_e$. This remarkable link between the two problems indicates that ${\cal S}(t)$ itself may serve as a simple figure of merit to gauge time-dependent diffusion processes in complex media and hence infer salient microstructural information about heterogeneous media. \begin{figure*}[bthp] \includegraphics[width=5in,keepaspectratio,clip=]{spreadability_diagram.eps} \caption{``Phase diagram" that schematically shows the spectrum spreadability regimes in terms of the exponent $\alpha$. As $\alpha$ increases from the extreme antihyperuniform limit of $\alpha \to -d$, the spreadability decay rate gets faster, i.e., the excess spreadability follows the inverse power law $1/t^{(d+\alpha)/2}$, except when $\alpha \to +\infty$, which corresponds to stealthy hyperuniform media with a decay rate that is exponentially fast.} \label{cartoon-2} \end{figure*} Diffusion-weighted magnetic resonance imaging (dMRI) has become a powerful tool for imaging water-saturated biological media \cite{We05}. For the purpose of modeling water diffusion in muscles and brain tissue, Novikov et al. \cite{No14} considered various one-dimensional models in which diffusion is hindered by permeable barriers and estimated the corresponding long-time behaviors of the time-dependent diffusion coefficient ${\cal D}(t)$. Based on this one-dimensional analysis, they were able to extend their findings to any space dimension and found the following long-time scaling behavior of $D(t)$: \begin{equation} {\cal D}(t)-{\cal D}_e \sim \frac{\mbox{C}}{t^{\varphi}}, \end{equation} where $C$ is an undetermined structure-dependent constant and the exponent $\varphi=(d+\alpha)/2$. Remarkably, we see that the long-time behavior of ${\cal D}(t)-{\cal D}_e$ is identical to the excess spreadability ${\cal S}(\infty)- {\cal S}(t)$, as specified by the explicit scaling law (\ref{long-time}). While the spreadability problem is substantially simpler than the determination of the effective time-dependent diffusion, it is seen that, apart from constants, one can map the former to the latter problem at long times via the transformations ${\cal S}(t) \rightarrow D(t)$ and ${\cal S}(\infty) \rightarrow {\cal D}_e={\cal D}(\infty)$. \section{Discussion} \label{discuss} Our investigation has demonstrated that the spreadability of diffusion information ${\cal S}(t)$ across time scales has the potential to serve as a powerful dynamic figure of merit to probe and classify all translationally invariant two-phase microstructures across length scales. We established that the small-time behavior of ${\cal S}(t)$ is determined by the derivatives of the autocovariance function $\chi_{_V}({\bf r})$ at the origin, the leading term of order $t^{1/2}$ being proportional to the specific surface $s$. We proved that the corresponding long-time behavior is determined by the form of the spectral density ${\tilde \chi_{_V}}({\bf k})$ at small wavenumbers, which enables one to ascertain the class of hyperuniform and nonhyperuniform media. In instances in which the spectral density has the power-law form ${\tilde \chi_{_V}}({\bf k})\sim |{\bf k}|^{\alpha}$ in the limit $|{\bf k}| \to 0$, the long-time excess spreadability for two-phase media in $\mathbb{R}^d$ is given by the following inverse power-law decay: \begin{equation} {\cal S}(\infty)-{\cal S}(t) \sim \frac{1}{t^{(d+\alpha)/2}}. \label{S} \end{equation} Observe that this formula can distinguish among the possible strongest forms of hyperuniformity, i.e., class I, according to the value of the exponent for any $\alpha >1$; the larger the value of $\alpha$ for such media, the faster the decay rate the spreadability. The limit $\alpha \to +\infty$ corresponds to media in which the decay rate of ${\cal S}$ is faster than any inverse power law, which we showed is the case for stealthy hyperuniform media. A measured long-time decay rate of ${\cal S}(\infty)-{\cal S}(t) \sim t^{-d/2}$, i.e., the case $\alpha=0$ in (\ref{S}), would reveal a nonhyperuniform medium in which the spectral density is a bounded positive number at the origin. On the other hand, antihyperuniform media (with $-d < \alpha <0$) have the slowest decay among all translationally invariant media, the slowest being when ${\cal S}(\infty)-{\cal S}(t)$ approaches a constant value (i.e., $\alpha \to -d$), independent of time. The stealthy hyperuniform class is characterized by an excess spreadability with the fastest decay rate (exponentially fast) among all hyperuniform media and hence all translationally invariant microstructures. In short, the spreadability provides a dynamic means to classify the spectrum of possible microstructures that span between hyperuniform and nonhyperuniform media, which is schematically illustrated in Figure \ref{cartoon-2}. Thus, in addition to the usual structure-based methods to ascertain the hyperuniformity/nonhyperuniformity of two-phase media discussed in Sec. \ref{class}, the spreadability at long times provides an alternative dynamic probe of such large-scale structural characteristics. We obtained exact results for ${\cal S}(t)$ as a function of time for a variety of specific ordered and disordered model microstructures across dimensions, including antihyperuniform media, nonhyperuniform Debye random media, nonstealthy hyperuniform media, disordered stealthy media and periodic media. We also demonstrated that the microstructures with ``fast" spreadabilities are also those that can be derived from efficient ``coverings" of Euclidean space $\mathbb{R}^d$. Finally, we identified a remarkable connection between the spreadability ${\cal S}(t)$ and noninvasive nuclear magnetic resonance (NMR) relaxation measurements in physical and biological porous media \cite{Br79,Mit92b,Mi93,Se94,Or02,We05,No14}. An interesting avenue for future work is the generalization of the spreadability problem by relaxing Prager's assumption that the diffusion coefficients of both phases are identical. This more general situation will involve expressions for ${\cal S}(t)$ that now will not only involve the volume fractions and $S_2^{(i)}$, but all higher-order correlation functions $S_3^{(i)},S_4^{(i)},\ldots$ as well as the ratio of the phase diffusion coefficients. The solution of this general problem could be approached using a similar formalism as the ``strong-contrast" methodology that has been developed to derive exact expressions for the effective conductivity of two-phase media in terms of this infinite set of correlation functions and phase contrast ratio \cite{Se89,To02a}. {
\section{Introduction} This paper deals with the equation \begin{equation}\label{4x} AXA=XAX, \end{equation} where $A \in \mathbb{C}^{n\times n}$ is a given complex matrix and $X\in \mathbb{C}^{n\times n}$ has to be determined. This equation is called the {\it Yang--Baxter-like matrix equation}. If $A$ is singular (nonsingular) matrix, then the equation \eqref{4x} is said to be the singular (nonsingular) Yang--Baxter-like matrix equation. The equation \eqref{4x} has its origins in the classical papers by Yang \cite{Yang1} and Baxter \cite{Baxter1}. Their pioneering works have led to extensive research on the various forms of the Yang--Baxter equation arising in braid groups, knot theory and quantum theory (see, e.g., the books \cite{Nichita,Yang2}). The YB-like equation \eqref{4x} is also known as the star-triangle-like equation in statistical mechanics; see, e.g., \cite[Part III]{McCoy}. A possible way of solving \eqref{4x} is to multiply out both sides, which leads to a system of $n^2$ quadratic equations with $n^2$ variables. However, this strategy may have little practical interest, unless $n$ is very small, say $n=2$ or $n=3.$ Note that the YB-like matrix equation \eqref{4x} has at least two trivial solutions$:$ $X = 0$ and $ X = A.$ Of course, the interest in solving it is in calculating non-trivial solutions. Discovering collections of solutions of \eqref{4x} or characterizing its full set of solutions have attracted the interest of many researchers in the last few years. Since a complete description of the solution set for an arbitrary matrix $A$ seems very challenging, many authors have been rather successful in doing so by imposing restrictive conditions on $A$. See, for instance, \cite{Cibotarica,Mansour} for $A$ idempotent, \cite{Ding15,Dong} for $A$ diagonalizable, and \cite{Tian} for matrices with rank one. Our interest in this paper is to solve the equation for a general singular matrix $A,$ without additional assumptions. We recall that among the published works on the YB-like equation \eqref{4x}, few are devoted to the numerical computation of its solutions. With this paper, we expect to give a contribution to fill in this gap. In our recent paper \cite{Kumar18}, we have proposed efficient and stable iterative methods for spotting commuting solutions for an arbitrary matrix $A.$ Nevertheless, those methods are not designed for determining non-commuting solutions and there are a few cases where it is difficult to choose a good initial approximation (e.g., $A$ is non-diagonalizable). The principal contributions of this work w.r.t. the solutions of singular YB-like equation $AXA=XAX$ are$:$ \begin{enumerate} \item[(i)] To establish a new connection between the YB-like equation and a set of two linear matrix equations, whose general solution is known; this is also valid for a nonsingular matrix $A$ (--cf. Sect. \ref{splitting}); \item[(ii)] To explain clearly the role of projectors commuting with $A$ in the process of deriving new families containing infinitely many solutions and to discuss how to find such projectors (--cf. Sect. \ref{proj-based}); \item [(iii)] To show how the similarity transformations can be utilized for locating more explicit representations of the solutions (--cf. Sect. \ref{similarity}); \item[(iv)] To propose effective numerical methods for solving the singular YB-like equation, alongside with a thorough discussion of their numerical behaviour and practical clues for implementation in MATLAB (--cf. Sects. \ref{issues} and \ref{sec-experiments}). \end{enumerate} By ${\mathbf 0}$ and $I,$ we mean respectively the zero and identity matrices of appropriate orders. For a given matrix $Y,$ we denote $N(Y)$ and $R(Y)$ by the null space and the range of $Y$, respectively; $v(\lambda)$ stands for the index of a complex number $\lambda$ with respect to a square matrix $Y,$ that is, $v(\lambda)$ is the index of the matrix $Y-\lambda I$ (check the beginning of Sect. \ref{basics} for the definition of the index of a matrix); \section{Basics}\label{basics} Given an arbitrary matrix $ A\in \mathbb{C}^{n\times n},$ consider the following conditions, where $X\in \mathbb{C}^{n\times n}$ is unknown$:$ $$\begin{array}{lll} \textrm{(gi.1)}\ AXA=A & \quad \textrm{(gi.2)}\ XAX=X & \quad \textrm{(gi.3)}\ AX=(AX)^* \\ \textrm{(gi.4)}\ XA=(XA)^* & \quad \textrm{(gi.5)}\ AX=XA & \quad \textrm{(gi.6)}\ A^\textrm{{ind}(A)+1}X=A^{\textrm{ind}(A)}, \end{array}$$ where $Y^*$ denotes the conjugate transpose of the matrix $Y$ and $\textrm{ind}(A)$ stands for the index of a square matrix $A,$ which is the smallest non-negative integer $\ell$ such that $\mathop{\mathrm{rank}}(A^\ell)=\mathop{\mathrm{rank}}(A^{\ell+1}).$ If $m(\lambda)$ is the minimal polynomial of $A$, then $\ell$ is the multiplicity of $\lambda = 0$ as a zero of $m(\lambda)$ \cite[p. 154]{Ben}. Thus, $\ell\leq n,$ where $n$ is the order of $A.$ A complex matrix $X \in\mathbb{C}^{n\times n}$ satisfying the condition (gi.2) is called a generalized outer inverse or a $\{2\}$-inverse of $A$, while the unique matrix $X$ verifying the conditions ({gi.1}) to ({gi.4}) is the well-known Moore--Penrose inverse of $A$, which is denoted by $A^\dag$ \cite{Penrose}; the unique matrix $X$ obeying the conditions ({gi.2}), ({gi.5}) and ({gi.6}) is the Drazin inverse, which is denoted by $A^D$ and is given by \begin{equation}\label{comp-drazin} A^D=A^\ell(A^{2\ell+1})^\dag A^\ell, \end{equation} where $\ell \geq \mathop{\mathrm{ind}}(A).$ Other instances of generalized inverses may be defined \cite{Ben}, but are not used in this paper. We refer the reader to \cite{Ben}, \cite[Chapter 4]{Laub}, and \cite[Section 3.6]{Lutkepohl} for the theory of generalized inverses. For both theory and computation, see \cite{Wang}. In the following, we revisit two important matrix decompositions, the Jordan and the Schur decompositions, whose proofs can be found in many Linear Algebra and Matrix Theory textbooks (see, for instance, \cite{Horn13}). Both decompositions will be used later in Sect.~\ref{similarity} to detect explicit solutions of the singular matrix equation $AXA=XAX.$ In addition, due to the numerical stability of the Schur decomposition, it is the basis of the algorithm that will be displayed in Figure \ref{fig1}. \begin{lemma} (Jordan Canonical Form) Let $A\in \mathbb{C}^{n\times n}$ and let $J:=\mathop{\mathrm{diag}}(J_{n_1}(\lambda _1), \ldots, J_{n_s}(\lambda_s))$, ($n_1+\cdots+n_s=n$), where $ \lambda_1, \ldots,\lambda_s$ are the eigenvalues of $A$, not necessarily distinct, and $J_k(\lambda)\in \mathbb{C}^{k\times k}$ denotes a Jordan block of order $k$. Then there exists a nonsingular matrix $S\in \mathbb{C}^{n\times n}$ such that $\,A=SJS^{-1}.\,$ The Jordan matrix $J$ is unique up to the ordering of the blocks $J_k,$ but the transforming matrix $S$ is not. \end{lemma} For singular matrix $A$ of order $n$ with $\mathop{\mathrm{rank}}(A)=r<n,$ it is possible to reorder the Jordan blocks in a way that those blocks associated with the eigenvalue $0$ appear in the bottom-right of $J$ with decreasing size, that is, $J:=\mathop{\mathrm{diag}}\left(J_{n_1}(\lambda _1), \ldots, J_{n_p}(\lambda_p),J_{n_{p+1}}(0), \ldots, J_{n_s}(0)\right)$, with $n_{p+1}\geq \ldots \geq n_s$ ($0\leq p\leq s$). So $A$ can be decomposed in the form \begin{equation}\label{block1} A=SJS^{-1}=S\, \left[\begin{array}{cc} J_1 & {\mathbf 0} \\ {\mathbf 0} & J_0 \end{array}\right]\, S^{-1}, \end{equation} where $J_1=\mathop{\mathrm{diag}}\left(J_{n_1}(\lambda _1), \ldots, J_{n_p}(\lambda_p)\right)$ is nonsingular and $J_0=\mathop{\mathrm{diag}}\left(J_{n_{p+1}}(0), \ldots, J_{n_s}(0)\right)$ is nilpotent. \begin{lemma} (Schur Decomposition) For a given matrix $A\in \mathbb{C}^{n\times n}$ there exists a unitary matrix $U$ and an upper triangular $T$ such that $\,A=UTU^{\ast},\,$ where $U^{\ast}$ stands for the conjugate transpose of $U.$ The matrices $U$ and $T$ are not unique. \end{lemma} If $A$ is singular, then by reordering the eigenvalues in the diagonal of $T,$ where the zero eigenvalues appear in the bottom-right, the Schur decomposition of $A$ can be written in the form \begin{equation}\label{block3} A=UTU^*=U\, \left[\begin{array}{cc} B_1 & B_2 \\ {\mathbf 0} & {\mathbf 0} \end{array}\right]\,U^*, \end{equation} where $B_1$ is $s \times s $ and $B_2$ is $s \times (n-s),$ with $ r=\mathop{\mathrm{rank}}(A) \leq s \leq n-1.$ Note that $B_2$ is not, in general, the zero matrix. Now we recall a lemma that provides an explicit solution for a well-known pair of linear matrix equations. \begin{lemma}\label{coupled}(\cite{Cecioni,Rao}) Let $A, B, C, D\in \mathbb{C}^{n\times n}.$ The pair of matrix equations $AX=B,\ XC=D$ is consistent if and only if $$AD=BC,\ AA^{\dag}B=B,\ DC^\dag C=D,$$ and its general solution is given by \begin{equation}\label{generalexpression} X=A^\dag B+(I-A^\dag A)DC^\dag + (I-A^\dag A)Y(I-CC^\dag), \end{equation} where $Y$ is an arbitrary $n\times n$ complex matrix. \end{lemma} Necessary and sufficient conditions for the equations $AX=B,\ XC=D$ to have a common solution are attributed to Cecioni \cite{Cecioni} and the expression \eqref{generalexpression} for a general common solution to Rao and Mitra \cite[p. 25]{Rao}. See also \cite[p. 54]{Ben} and \cite{Penrose}. \section{Splitting the YB-Like Matrix Equation}\label{splitting} In the next lemma, we split a general YB-like matrix equation into a system of matrix equations similar to the one in Lemma \ref{coupled}. Such a result will be useful in the next section. \begin{lemma}\label{connection} Let $A\in\mathbb{C}^{n\times n}$ be given and let $B\in\mathbb{C}^{n\times n}$ be such that the set of matrix equations \begin{equation}\label{set1} AX=B,\ XB=BA \end{equation} has at least a solution $X_0.$ Then $X_0$ is a solution of \eqref{4x}. Conversely, if $X_0$ is a solution of \eqref{4x}, then there exists a matrix $B$ such that $$AX_0=B,\ X_0B=BA.$$ \end{lemma} \begin{proof} If $X_0$ is a solution of the simultaneous equations in \eqref{set1}, then $AX_0=B $ and $X_0B=BA.$ Therefore $\,AX_0A=BA=X_0B=X_0AX_0.\,$ Conversely, suppose that $X_0$ is a solution of $AXA=XAX$, i.e. $AX_0A=X_0AX_0.$ Letting $B:=AX_0$, we have $BA=X_0B$, which implies that $X_0$ is a solution of \eqref{set1}. \qed \end{proof} Note that Lemma \ref{connection} is also valid for the nonsingular YB-like matrix equation. Using Lemmas \ref{coupled} and \ref{connection}, we must look for a matrix $B$ that makes \eqref{set1} consistent, that is, \begin{equation}\label{m-eq1} ABA=B^2, \ AA^\dag B=B, \ BAB^\dag B=BA. \end{equation} For a given singular matrix $A$ and any of $B$ satisfying \eqref{m-eq1}, the matrices of the form \begin{equation}\label{Explicit} X=A^\dag B+(I-A^\dag A)AB B^\dag + (I-A^\dag A)Y\big(I-BB^\dag\big), \end{equation} constitute an infinite family of solutions to \eqref{4x}, where $Y\in\mathbb{C}^{n\times n}$ is arbitrary . \section{Commuting Projectors-Based Solutions}\label{proj-based} Discovering all the matrices $B$ in \eqref{m-eq1} may be a very hard task, apparently so difficult as solving the YB-like matrix equation. However, if $A$ is singular and $B$ is taken as in the following lemma, we have the guarantee that $B$ satisfies the conditions in \eqref{m-eq1}. Thus, many collections containing infinite solutions to the singular YB-like matrix equation can be obtained, as shown below. \begin{lemma}\label{define-B} Let $A\in\mathbb{C}^{n\times n}$ be singular and $P$ be any idempotent matrix commuting with $A$, that is, $P^2=P$ and $PA=AP.$ Then, for $B\in\left\{A^2 P,\, A^2 (I-P)\right\}$, any matrix $X$ obtained as in \eqref{Explicit} is a solution of the singular YB-like matrix equation \eqref{4x}. \end{lemma} \begin{proof} If $B=A^2 P$, then the equality $PA=AP$ implies that $B$ commutes with $A.$ Using the equalities $P^2=P$ and $BB^\dag B=B$, it is not difficult to show that the conditions in \eqref{m-eq1} hold for the matrix $B$ and hence the result follows. Similar arguments apply to $B=A^2(I-P).$ \qed \end{proof} By Lemma \ref{define-B}, we must look for matrices $P$ that are idempotent and commute with a given singular matrix $A$, in order to define $B.$ Below, several cases with examples of matrices $B$ satisfying the conditions of Lemma \ref{define-B} will be presented when $A$ is a singular matrix. \medskip \noindent {\bf Case 1.} $B\in\left\{{\mathbf 0},\, A^2\right\}.$ \medskip This case arises, for instance, when $P$ is a trivial commuting projector, that is, $P={\mathbf 0}$ or $P=I.$ Let us assume first that $B={\mathbf 0}.$ Now the system \eqref{set1} reduces to the matrix equation $AX={\mathbf 0}$ which is clearly solvable. From \eqref{Explicit}, its general set of solutions can be determined through the formula \begin{equation}\label{explicit1} X=(I-A^\dag A)Y. \end{equation} Geometrically speaking, the set of matrices constructed by \eqref{explicit1} is a vector subspace of $\mathbb{C}^{n\times n}$, and hence the sum of solutions of the YB-like matrix equation or a scalar multiplication yield new solutions. Since $\mathop{\mathrm{rank}}(A)=\mathop{\mathrm{rank}}(A^\dag A)$ and $\mathop{\mathrm{rank}}(I-A^\dag A)=n-\mathop{\mathrm{rank}}(A)$, such a subspace has dimension equal to $n(n-\mathop{\mathrm{rank}}(A)).$ Now, if we assume that $B=A^2,$ by \eqref{Explicit}, \begin{equation}\label{explicit3} X=A^\dag A^2+(I-A^\dag A)A^3 \left(A^2\right)^\dag + (I-A^\dag A)Y\big(I-A^2\left(A^2\right)^\dag\big), \end{equation} where $Y\in\mathbb{C}^{n\times n}$ is arbitrary, gives another family of solutions to \eqref{4x}. \medskip In the following result, we identify the solutions defined by \eqref{explicit1} and \eqref{explicit3} that commute with $A$. \begin{proposition}\label{pro2} Let $A\in\mathbb{C}^{n\times n}$ be singular. For arbitrary matrices $Y_1,Y_2\in\mathbb{C}^{n\times n}$, the following formulae generate solutions of the equation \eqref{4x} that commute with $A$$:$ \begin{eqnarray} X_1&=& (I-A^\dag A)Y_1(I-AA^\dag);\label{exp1}\\ X_2&=& A^\dag A^2+(I-A^\dag A)A^2A^\dag +(I-A^\dag A)Y_2(I-AA^\dag).\label{exp2} \end{eqnarray} \end{proposition} \begin{proof} Every solution $X_1$ of $AX={\mathbf 0}$,\ $XA={\mathbf 0}$ belongs to the solution space defined by $AX={\mathbf 0}$, whose general solution is determined by \eqref{explicit1}. Let $X_1$ be a common solution of the equations $AX={\mathbf 0}$,\ $XA={\mathbf 0}.$ Then $X_1$ commutes with $A$ and satisfies $AXA=XAX.$ By Lemma \ref{coupled}, $X_1$ is of the form \eqref{exp1}. Clearly, the set of matrix equations $AX=A^2,\ XA=A^2$ is consistent and its solution set agrees with that of $AX=A^2,\ XA^2=A^3$, which is delivered by \eqref{explicit3}. Hence, $AXA=XAX.$ If $X_2$ is a solution of the coupled matrix equations $AX=A^2,\ XA=A^2$, then it is a commuting solution of \eqref{4x} and, again by Lemma \ref{coupled}, $X_2$ is given by \eqref{exp2}. \qed \end{proof} The following lemma gives theoretical support for Case 2. \begin{lemma}\label{Theorem21e} Let $A \in \mathbb{C}^{n \times n}$ be a given singular matrix and let $M \in \mathbb{C}^{n \times n}$ be any matrix such that $AM=MA.$ Then $P_M=MM^D$ is an idempotent matrix commuting with $A.$ \end{lemma} \begin{proof} Using the properties of the Drazin inverse, in particular, $M^DMM^D=M^D$, it is easily proven that $P_M$ is an idempotent matrix. It follows from Theorem 7 in \cite[Chapter 4]{Ben} that $M^D$ is a polynomial in $M$ and hence $M^DA=AM^D$, because $AM=MA.$ This shows that $P_M$ commutes with $A.$ \qed \end{proof} \noindent {\bf Case 2.} $B\in\left\{A^2P_M,\, A^2\(I-P_M\)\right\}.$ \medskip It should be mentioned that the matrix $M$ in Lemma~\ref{Theorem21e} must be singular to avoid trivial cases. Examples of such matrices $M$ can be taken from the infinite collection $$\mathfrak{M}_{\lambda_i}=\{f(A)-f(\lambda_i)I: f(x) \ \textnormal{is any polynomial over} \ \mathbb{C}\}, $$ for each $ \lambda_i \in \sigma(A)$, where $\sigma(A)$ is the spectrum of $A.$ A trivial example is to take $M=A$ yielding $P_M=AA^D$. \medskip The next case (Case 3) involves the matrix sign function. Before proceeding, let us recall its definition \cite[Chapter 5]{Higham08}. Let the $n\times n$ matrix $A$ have the Jordan canonical form $A=ZJZ^{-1}$ so that $J= \left[\begin{array}{cc} J^{(1)} & {\mathbf 0} \\ {\mathbf 0} & J^{(2)} \end{array}\right]$, where the eigenvalues of $ J^{(1)} \in \mathbb{C}^{p \times p}$ lie in open left half-plane and those of $ J^{(2)} \in \mathbb{C}^{q \times q}$ lie in open right half-plane. Then $S:=\mathop{\mathrm{sign}}(A)=Z\begin{bmatrix}-I_{p\times p} & 0 \\ 0 & I_{q\times q} \end{bmatrix}Z^{-1}$ is named as the matrix sign function of $A.$ If $A$ has any eigenvalue on the imaginary axis, then $\mathop{\mathrm{sign}}(A)$ is undefined. Here $S^2=I$ and $AS=SA.$ Note also that $P=(I+ S)/2$ and $Q=(I- S)/2$ are projectors onto the invariant subspaces associated with the eigenvalues in the right half-plane and left half-plane, respectively. For more properties and approximation of the matrix sign function, see \cite{Higham08}. Since in this work $A$ is assumed to be singular, we cannot use directly $\mathop{\mathrm{sign}}(A)$ because it is undefined. To overcome this situation, authors in \cite{ashim} have shifted and scaled the eigenvalues of $A$ so that the matrix sign of such resulting matrices exists and commutes with $A.$ Nevertheless, there is an absence of a systematic and algorithmic approach to generate these newly matrices. Towards this aim, let us consider the matrix $A_\alpha :=\alpha I+A$, where $\alpha$ is a suitable complex number. Note that the scalar $\alpha$ must be carefully chosen in order to avoid the intersection of the spectrum of $A_\alpha$ with the imaginary axis. Assuming that $A$ has at least one eigenvalue that does not lie on the imaginary axis, a simple procedure for calculating several values of $\alpha$ that leads to the acquisition of the maximal number of projectors is described as follows: \begin{enumerate} \item Let $\{r_1,\ldots,r_s\}$ be the set constituted by the distinct real parts of the eigenvalues of $A$ written in ascending order, that is, $r_1<r_2<\ldots<r_s;$ \item For $k=1,\ldots,s-1$, choose $\alpha_k = -(r_k+r_{k+1})/2.$ \end{enumerate} \noindent This way of calculating $\alpha_k$ guarantees that the eigenvalues of the successive $A_{\alpha_k}$ do not intersect the imaginary axis and avoids the trivial situations. That is to say, the spectrum of $A_{\alpha_k}$ does not lie entirely on either the open right half-plane or on the open left-plane, in which cases $\mathop{\mathrm{sign}}(A_{\alpha_k})=I$ or $\mathop{\mathrm{sign}}(A_{\alpha_k})=-I$. If $S_{\alpha}:=\mathop{\mathrm{sign}}(A_{\alpha})$, we see that $S_{\alpha_k}$ and $A_{\alpha_k}$ commute, because $S_{\alpha_k}$ commutes with $A_{\alpha_k}.$ Hence $\left(I+S_{\alpha_k}\right)/2$ and $\left(I-S_{\alpha_k}\right)/2$ are projectors commuting with $A$. In the particular case when all the eigenvalues of $A$ are pure imaginary, we may consider $\widetilde{A} = -iA$ and then apply the above procedure to $\widetilde{A}$ instead of $A$. \medskip \noindent {\bf Case 3.} $B \in \{A^2\left(\frac{I+S_{\alpha}}{2}\right), \, {A^2\left(\frac{I-S_{\alpha}}{2}\right) }\}.$ \medskip The upcoming case depends on the spectral projectors of $A$, which have played an important role in the theory of the YB-like matrix equation, \cite{23,Ding15,spec}. Yet, there is not any definite procedure to find out them in computer algebra systems. The next proposition contributes to settle it out. \begin{proposition}\label{pro3} Let $\lambda_1,\ldots,\lambda_s$ be the distinct eigenvalues of $A \in\mathbb{C}^{n\times n}$ and assume that $G_{\lambda_i}$ denotes the spectral projector onto the generalized eigenspace $N((A-\lambda _iI)^{v(\lambda_i)})$ along $R((A-\lambda _iI)^{v(\lambda_i)})$, associated with the eigenvalue $ \lambda_i $. Then, for any $i=1,\ldots,s$, $G_{\lambda_i}$ can be represented as $G_{\lambda_i} =I-(A-\lambda_i I)(A-\lambda_i I)^D$, where $v(\lambda_i)$ is the index of $\lambda_i.$ \end{proposition} \begin{proof} Let $r_i:=\mathop{\mathrm{rank}}((A-\lambda_i I)^{v(\lambda_i)}).$ Since $N((A-\lambda _iI)^{v(\lambda_i)})$ and $R((A-\lambda _iI)^{v(\lambda_i)})$ are complementary subspaces of $ \mathbb{C}^{n},$ the spectral projector $G_{\lambda_i}$ onto $N((A-\lambda _iI)^{v(\lambda_i)})$ along $R((A-\lambda _iI)^{v(\lambda_i)})$ can be written as: $ G_{\lambda_i}=Q_i \, \mathop{\mathrm{diag}} \left({\mathbf 0}_{r_i \times r_i},\right.$ $\, \left. I_{(n-r_i) \times (n-r_i)}\right) \, Q_i^{-1},$ with $Q_i=[X_i | Y_i]$, in which the columns of $X_i$ and $Y_i$ are bases for $R((A-\lambda _iI)^{v(\lambda_i)})$ and $N((A-\lambda _iI)^{v(\lambda_i)})$, respectively; see, for example, \cite{Ben} and \cite[Chapters 5 and 7]{cd}. \smallskip On the other hand, the core-nilpotent decomposition of the matrix $(A-\lambda_i I)$ via $Q_i$ can be written in the form $ Q_i^{-1}(A-\lambda _iI)Q_i=\mathop{\mathrm{diag}}(C_{r_i \times r_i}, \, N_{(n-r_i) \times (n-r_i)}), $ where $C_{r_i \times r_i}$ is nonsingular, and $ N_{(n-r_i) \times (n-r_i)}$ is nilpotent of index $v(\lambda_i),$ \cite[Chapter 5, p. 397]{cd}. Now we have, $ (A-\lambda _iI)=Q_i \, \mathop{\mathrm{diag}} \left(C_{r_i \times r_i}, \, N_{(n-r_i) \times (n-r_i)}\right) \, Q_i^{-1}$ and hence the Drazin inverse of $ (A-\lambda _iI)$ is given by $ (A-\lambda _iI)^D=Q_i \, \mathop{\mathrm{diag}} \left(C^{-1}_{r_i \times r_i}, \, {\mathbf 0}_{(n-r_i) \times (n-r_i)} \right) \, Q_i^{-1},$ \cite[Chapter 5, p. 399]{cd}. This further implies that $ I-(A-\lambda_i I)(A-\lambda_i I)^D=Q_i \, \mathop{\mathrm{diag}}({\mathbf 0}_{r_i \times r_i}, \, I_{(n-r_i) \times (n-r_i)}) \, Q_i^{-1},$ which coincides with $G_{\lambda_i}.$ \qed \end{proof} Now, we revisit a well-known result, whose proof can be found in the literature (e.g., \cite{Ben,spec,cd}). \begin{lemma}\label{new5} Let us assume that the notations and conditions of the Proposition \ref{pro3} are valid. Then: \begin{itemize} \item[\textnormal{(a)}] $G_{\lambda_i}^2=G_{\lambda_i}$, $AG_{\lambda_i}=G_{\lambda_i}A$, and $G_{\lambda_i}G_{\lambda_j}={\mathbf 0}$, for $i \neq j$; \item[\textnormal{(b)}] $P_{\lambda_i}=I-G_{\lambda_i}=(A-\lambda_i I)(A-\lambda_i I)^D$ is the complementary projector onto $R((A-\lambda _iI)^{v(\lambda_i)})$ along $N((A-\lambda _iI)^{v(\lambda_i)})$ commuting with $A.$ In addition, $P_{\lambda_i}P_{\lambda_j}=P_{\lambda_j}P_{\lambda_i}$; \item[\textnormal{(c)}] $\sum_{i=1}^s G_{\lambda_i}=I$; \item[\textnormal{(d)}] The sum of any number of matrices among the $G_{\lambda_i}$'{s} is also a commuting projector with $A.$ Thus, for any nonempty subset $\Gamma$ of $\{1,2, \dotsc, s\}$, $E_\Gamma$ is a projector commuting with $A$, where $E_\Gamma:=\sum_{i\in \Gamma} G_{\lambda_i}$; \item[\textnormal{(e)}] $P_{\lambda_i}=\sum^s_{\substack{j=1 \\ j \neq i}} G_{\lambda_j}.$ \end{itemize} \end{lemma} Note that the number of projectors $E_\Gamma$'s is $2^s-1.$ Next, in Case $4$, we present a new choice of $B$ in Lemma \ref{define-B}, using the projectors described above. \medskip\noindent {\bf Case 4.} $B \in \{A^2E_\Gamma \}.$ \medskip To derive the last case (see Case 5 below), we use again the matrix sign function. It is based on the following result. \begin{proposition}\label{theoremsign} Let $\lambda_1,\ldots,\lambda_s$ be the distinct eigenvalues of $A \in\mathbb{C}^{n\times n}$. For any scalar $\alpha$ and $i=1,\ldots, s$, the eigenvalues of the matrix $\hat{A}{_{\lambda_i}}=A+(\alpha-\lambda_i)G_{\lambda_i}$, consist of those of $A$, except that one eigenvalue $\lambda_i$ of $A$ is replaced by $\alpha.$ Moreover, if $\mathop{\mathrm{sign}}(\hat{A}{_{\lambda_i}})$ exists, then it commutes with $A.$ \end{proposition} \begin{proof} Let $A=P\, \mathop{\mathrm{diag}} \left(\widetilde{J}_1, \ldots, \widetilde{J}_i, \ldots, \widetilde{J}_s\right) \, P^{-1} $ be the Jordan decomposition of $A$, where $\widetilde{J}_i$ is the Jordan segment corresponding to $\lambda_i$ and $P$ is nonsingular. Here $ A-\lambda_i I=P \,\mathop{\mathrm{diag}} \left(\widetilde{J}_1-\lambda_i \widetilde{I}_1, \ldots, \widetilde{J}_i-\lambda_i \widetilde{I}_i, \ldots, \widetilde{J}_s-\lambda_i \widetilde{I}_s\right) \, P^{-1},$ where $\widetilde{I}_{i}$ is the identity matrix of the same order as $\widetilde{J}_i.$ From \cite[Chapter 4, Theorem 8]{Ben}, it follows that $(A-\lambda_i I)^D=P \, \mathop{\mathrm{diag}} \left((\widetilde{J}_1-\lambda_i \widetilde{I}_1)^{-1}, \ldots,{\mathbf 0}, \ldots, (\widetilde{J}_s-\lambda_i \widetilde{I}_s)^{-1} \right) \, P^{-1}$ and we get $G_{\lambda_i} =I-(A-\lambda_i I)(A-\lambda_i I)^D=P \, \mathop{\mathrm{diag}} \left({\mathbf 0}, \ldots,\widetilde{I}_i, \right.$ $\left. \ldots, {\mathbf 0} \right) \, P^{-1}.$ Thus, \begin{align}\label{shift-1} \hat{A}{_{\lambda_i}}=A+(\alpha-\lambda_i)G_{\lambda_i}&=P \, \mathop{\mathrm{diag}} \left(\widetilde{J}_1, \ldots, \widetilde{J}_i+(\alpha-\lambda_i)\widetilde{I}_i, \ldots, \widetilde{J}_s \right) \, P^{-1} \nonumber \\ &=P \, \mathop{\mathrm{diag}} \left(\widetilde{J}_1, \ldots, \widetilde{J}_i(\alpha), \ldots, \widetilde{J}_s \right) \, P^{-1}, \end{align} where $\widetilde{J}_i(\alpha)$ is the matrix $\widetilde{J}_i$ with $\alpha$ in the place of $\lambda_i$. This shows that the eigenvalues of the matrix $\hat{A}{_{\lambda_i}}$ coincide with those of $A$ with the exception that $\lambda_i$ is replaced by $\alpha$ in $\hat{A}{_{\lambda_i}}.$ This proves our first claim in the proposition. \\ \indent It is clear that no eigenvalue of $\hat{A}{_{\lambda_i}}$ lies on the imaginary axis, since we are assuming that $\mathop{\mathrm{sign}}(\hat{A}{_{\lambda_i}})$ exists. Let $\hat{S}{_{\lambda_i}}=\mathop{\mathrm{sign}}(\hat{A}{_{\lambda_i}})=P \, \mathop{\mathrm{diag}} \left(\mathop{\mathrm{sign}}(\widetilde{J}_1), \ldots, \mathop{\mathrm{sign}}(\widetilde{J}_i(\alpha)), \ldots, \mathop{\mathrm{sign}}(\widetilde{J}_s) \right) \, P^{-1}$. Then a simple calculation shows that $\hat{S}{_{\lambda_i}}$ commutes with $A$ because $\mathop{\mathrm{sign}}(\widetilde{J}_i)=\pm \widetilde{I}_{ i}$. This proves our second claim. \qed \end{proof} \noindent {\bf Case 5.} $B \in \{A^2\left(\frac{I+ \hat{S}{_{\lambda_i}}}{2}\right), \, A^2\left(\frac{I- \hat{S}{_{\lambda_i}}}{2}\right)\}.$ \medskip We stop here and do not pursue to attain more possibilities for $B.$ This could be considered for future works. \section{Connections Between the Projectors and $B$} For a given singular matrix $A$, the five cases presented in the previous section aimed at finding a commuting projector $P$ (i.e., $AP=PA$ and $P^2=P$) in order to obtain a matrix $B$ that will be inserted in \eqref{Explicit} to produce a family of solutions to the YB-like equation \eqref{4x}. One issue arising in this approach for spotting $B$ is that distinct projectors may correspond to the same $B.$ That is to say, if $P_1$ and $P_2$ are two distinct commuting projectors then we may have $B=A^2P_1=A^2P_2$, which means that $A^2(P_1-P_2)={\mathbf 0}$, that is, $R(P_1-P_2)\subseteq N(A^2).$ To get more insight into this connection between the projectors and $B$, we will present two simple examples. \medskip\noindent {\bf Example 1.} Let $A=\left[\begin{array}{ccc} 1 & 1 & 1 \\ 0 & 1 & 0 \\ 1& 1 & 1 \end{array}\right],$ which is a diagonalizable singular matrix with spectrum $\sigma(A)=\{0,1,2\}.$ Solving directly the equations $AP=PA$ and $P^2=P$, we achieve a total of eight distinct commuting projectors: \medskip\begin{tabular}{cccc} $P_1 = {\mathbf 0}$,& $P_2=\frac{1}{2}\left[\begin{array}{rrr} 1 & 1 & 1 \\ 0 & 2 & 0 \\ 1 & -1 & 1 \end{array}\right],$ & $P_3=\frac{1}{2}\left[\begin{array}{rrr} 1 & 1 & 1 \\ 0 & 0 & 0 \\ 1 & 1 & 1 \end{array}\right],$ & $P_4=\left[\begin{array}{rrr} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & -1 & 0 \end{array}\right],$ \\ &&&\\ $P_5 = I$, & $P_6=I-P_2$, & $P_7=I-P_3$, & $P_8=I-P_4.$ \end{tabular} \medskip\noindent However, there are just four distinct $B_i=A^2P_i$ ($i=1,\ldots,8$): \medskip\begin{tabular}{cccc} $B_1=A^2P_1= {\mathbf 0}$, & $B_2=A^2P_2= A^2$, & $B_3=A^2P_3$, & $B_4=A^2P_4$,\\ \end{tabular} \medskip\noindent because $B_5=B_2$, $B_6=B_1$, $B_7=B_4$ and $B_8=B_3.$ The same four distinct $B_i$'s can be obtained by means of the sign function (Case 3) for $\alpha\in\{-5/2,-3/2,-1/2,1/2\}.$ However, Case 3 gives only six distinct projectors: $P_1,P_2,P_3,P_5,P_6,P_7,$ instead of eight projectors. Note that the matrix sign function of $A_\alpha$ just depends on the sign of its eigenvalues, so choosing other values for $\alpha$ would not change the results. We have found those values of $\alpha$ by the method described in the previous section for Case 3. If we now find the six spectral projectors $P_{\lambda_i}$'s and $G_{\lambda_i}$'s, for all $\lambda_i\in\sigma(A)$ (see Proposition \ref{pro3} and Lemma \ref{new5}), we obtain all the commuting projectors, except the trivial ones $P_1$ and $P_5.$ Those six spectral projectors suffice to collect the four distinct matrices, $B_i$'s. Note that, for this matrix $A$, we can use \eqref{Explicit} to achieve four families of infinite solutions to the equation $AXA=XAX.$ \medskip\noindent {\bf Example 2.} Let $A=\left[\begin{array}{ccc} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{array}\right]$, which is a diagonalizable singular matrix: $A=S\,\mathop{\mathrm{diag}}(3,0,0)\,S^{-1},$ where $S=\left[\begin{array}{rrr} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 0 & -2 \end{array}\right].$ It can be proven that all the distinct commuting projectors $P$ are given by $$P=S\,\left[\begin{array}{cc} \mu & {\mathbf 0} \\ {\mathbf 0} & \widetilde{P} \end{array}\right]\,S^{-1},$$ where $\mu\in\{0,1\}$ and $\widetilde{P}$ is any idempotent matrix of order $2.$ Since for any of those projectors $B=A^2P={\mathbf 0}$ if $\mu=0$, and $B=A^2P=A^2$ if $\mu=1$, there are just two distinct matrices: $B={\mathbf 0}$ and $B=A^2.$ The same result is given independently by Cases 3 and 4, leading to two families of infinite solutions to the equation $AXA=XAX$ given by \eqref{Explicit}. \section{More Families of Explicit Solutions}\label{6} In this section, we provide more explicit representations for solutions to the singular YB-like equation, but now with the help of the index of $A.$ \begin{proposition}\label{theorem2} Assume that $A\in\mathbb{C}^{n\times n}$ is a given singular matrix such that $\mathop{\mathrm{ind}}(A)=\ell .$ \begin{enumerate} \item[(i)] If \begin{equation}\label{Y2} Y=\left(A^{\ell+1}\right)^\dag A^\ell (I-AZ)+Z, \end{equation} where $Z\in\mathbb{C}^{n\times n}$ is an arbitrary matrix, then, for any $V\in\mathbb{C}^{n\times n},$ \begin{equation}\label{formula3} X=A^{\ell-1}\left(AY-I\right)V \end{equation} is a solution of the YB-like matrix equation $AXA=XAX.$ \item[(ii)] If \begin{equation}\label{Y3} Y=(I-ZA)A^\ell\left(A^{\ell+1}\right)^\dag +Z, \end{equation} where $Z\in\mathbb{C}^{n\times n}$ is an arbitrary matrix, then, for any $V\in\mathbb{C}^{n\times n},$ \begin{equation}\label{formula4} X=V\left(Y A -I\right)A^{\ell-1} \end{equation} is a solution of the YB-like matrix equation $AXA=XAX.$ \end{enumerate} \end{proposition} \begin{proof} It is well-known that any square matrix has a Drazin inverse, which implies in particular that the matrix equation (gi.6) is solvable. From \cite[Theorem 6.3]{Laub}, it follows that $A^{\ell+1}\left(A^{\ell+1}\right)^\dag A^\ell=A^\ell.$ Now, a simple calculation shows that the matrix $Y$ given in \eqref{Y2} is a solution of the matrix equation (gi.6), that is, $A^{\ell+1}Y=A^\ell$, while $Y$ in \eqref{Y3} satisfies $YA^{\ell+1}=A^\ell.$ Moreover, any solution of the matrix equation $A^{\ell+1}X=A^\ell$ is of the form given in \eqref{Y2}, and any solution of $XA^{\ell+1}=A^\ell$ can be calculated from \eqref{Y3}. The proof that both $X$ in \eqref{formula3} and $X$ in \eqref{formula4} satisfy the singular YB-like matrix equation \eqref{4x}, follows from a few matrix calculations. \qed \end{proof} \section{ Solutions Based on Similarity Transformations}\label{similarity} \begin{lemma}\label{lem-similar Let $A,B\in \mathbb{C}^{n\times n}$ be similar matrices, that is, $A=SBS^{-1},$ for some nonsingular complex matrix $S.$ If $Y$ is a solution of the YB-like matrix equation $BYB=YBY,$ then $X=SYS^{-1}$ is a solution of the YB-like matrix equation $AXA=XAX.$ Reciprocally, if $X$ satisfies $AXA=XAX$ then there exists $Y$ verifying $BYB=YBY$ such that $X=SYS^{-1}.$ \end{lemma} The previous result, whose proof is easy, can be utilized in particular with similarity transformations like the Jordan canonical form or the Schur decomposition (--cf. Sect.~\ref{basics}). Let us assume that $A=SJS^{-1}=S\, \left[\begin{array}{cc} J_1 & {\mathbf 0} \\ {\mathbf 0} & J_0 \end{array}\right]\, S^{-1}$ is the Jordan decomposition of $A$, where $S$, $J_0$ and $J_1$ are as in \eqref{block1}. If $Y=\left[\begin{array}{cc} Y_{1} & Y_{2} \\ Y_{3} & Y_{4} \end{array}\right]\, $ is a solution of $YJY=JYJ,$ conformally partitioned as $J,$ then \begin{equation}\label{sys1} \begin{cases} Y_{1}J_1Y_{1}+Y_{2}J_0Y_{3}=J_1Y_{1}J_1, \ \ Y_{1}J_1Y_{2}+Y_{2}J_0Y_{4}=J_1Y_{2}J_0,\\ Y_{3}J_1Y_{1}+Y_{4}J_0Y_{3}=J_0Y_{3}J_1,\ \ Y_{3}J_1Y_{2}+Y_{4}J_0Y_{4}=J_0Y_{4}J_0. \end{cases} \end{equation} Hence one can determine all the solutions of equation \eqref{4x} by solving \eqref{sys1} for the matrices $Y_{\textrm{i}}$ ($i=1,2,3,4$). It turns out that building up its complete set of solutions seems to be unattainable. However, if we consider the special case for $Y$ in which $Y_{2}={\mathbf 0}$ and $Y_{3}={\mathbf 0}$, then \eqref{sys1} reduces to \begin{equation}\label{sys2} \begin{cases} Y_{1}J_1Y_{1}=J_1Y_{1}J_1, \\ Y_{4}J_0Y_{4}=J_0Y_{4}J_0, \end{cases} \end{equation} consisting of two independent nonsingular and singular YB-like matrix equations for $J_1$ and $J_0$, respectively. Now, we arrive at the following proposition with the help of Lemma~\ref{lem-similar}. \begin{proposition}\label{p1} Let $A\in \mathbb{C}^{n\times n}$ be a singular matrix and consider the notations used in \eqref{block1}. Then, \linebreak $ X=S\, \left[\begin{array}{cc} Y_1 & {\mathbf 0} \\ {\mathbf 0} & Y_4 \end{array}\right]\, S^{-1}$ is a solution of equation \eqref{4x}, where $Y_1$ and $Y_4$ satisfy their corresponding YB-like equations in \eqref{sys2}. \end{proposition} Now an important issue arises: how to solve \eqref{sys2}? A possible way is to take $Y_1=J_1$ or $Y_1={\mathbf 0}$, which satisfies the first equation in \eqref{sys2}, and then finding $Y_4$ by any of the suggested representations discussed in Sects. \ref{proj-based} and \ref{6}. Hence, a family of solutions to \eqref{4x} resulting from Proposition \ref{p1} is commuting or non-commuting according to $Y_4$ is commuting or non-commuting, respectively. If $Z=\left[\begin{array}{cc} Z_{1} & Z_{2} \\ Z_{3} & Z_4 \end{array}\right]\, $, which is assumed to be conformally partitioned as $T$ in \eqref{block3}, is a solution of $ZTZ=TZT$, then we come down with the next set of four equations: \begin{equation}\label{sys4} \begin{cases} Z_{1}B_{1}Z_{1}+Z_{1}B_{2}Z_{3}&=B_1Z_{1}B_1+B_2Z_{3}B_1, \\ Z_{1}B_1Z_{2}+Z_{1}B_2Z_4&=B_1Z_{1}B_2+B_{2}Z_{3}B_{2},\\ Z_{3}B_1Z_{1}+Z_{3}B_2Z_{3}&= {\mathbf 0}, \\ Z_{3}B_1Z_{2}+Z_{3}B_2Z_4&= {\mathbf 0}. \end{cases} \end{equation} Solving \eqref{sys4} is again a challenging task, therefore we restrict this task to the particular situation when $Z_{3}={\mathbf 0}.$ Now \eqref{sys4} becomes \begin{equation}\label{sys5} \begin{cases} Z_{1}B_{1}Z_{1}=B_1Z_{1}B_1, \\ Z_{1}B_1Z_{2}+Z_{1}B_2Z_4=B_1Z_{1}B_2, \end{cases} \end{equation} which leads us to the following proposition: \begin{proposition}\label{schur-based} Let $A\in \mathbb{C}^{n\times n}$ be a singular matrix of the form \eqref{block3}. Then, $ X=U\, \left[\begin{array}{cc} Z_1 & Z_2 \\ {\mathbf 0} & Z_4 \end{array}\right]\, U^{\ast}$, where $Z_1,$ $Z_2,$ and $Z_4$ satisfy simultaneously the equations \eqref{sys5}, is a solution of the equation \eqref{4x}. \end{proposition} Some examples of solutions to (\ref{sys5}) are: \begin{enumerate} \item[(i)] $Z_1={\mathbf 0}$, $Z_2$ and $Z_4$ arbitrary; \item[(ii)] $Z_1=B_1$, $Z_2=B_2$, and $Z_4={\mathbf 0}$; \item[(iii)] Any commuting solution of $Z_{1}B_{1}Z_{1}=B_1Z_{1}B_1$, along with $Z_2=B_2$ and $Z_4= {\mathbf 0}$; \item[(iv)] $Z_1=B_1^2B_1^D$, $Z_2=B_1B_1^DB_2$, $Z_4= {\mathbf 0}$, for the case when $B_1$ is singular. \end{enumerate} Other solutions to (\ref{sys5}) may be determined by finding $Z_1$ in the first equation $Z_{1}B_{1}Z_{1}=B_1Z_{1}B_1$, which is a YB-like equation, and then determine the unknowns $Z_2$ and $Z_4$ at a time by solving the multiple linear system \begin{equation}\label{undeterm} \left[Z_1B_1\quad Z_1B_2\right]_{s \times n} \left[\begin{array}{c} Z_2 \\ Z_4 \end{array}\right]_{n \times (n-s)}=B_1Z_1 B_2, \end{equation} provided it is consistent. For instance, if we fix $Z_1=B_1$, we know that (\ref{undeterm}) is consistent, because $Z_2=B_2$ and $Z_4={\mathbf 0}$ satisfy it. Moreover, since $B_1$ is $s \times s $, $B_2$ is $s \times (n-s),$ with $ r=\mathop{\mathrm{rank}}(A)\leq s \leq n-1,$ and $s<n$, it has infinitely many solutions. \section{Numerical Issues}\label{issues} We shall now consider the problem of solving the singular YB-like matrix equation in the finite precision environments. Most of the explicit formulae derived in Sect. \ref{proj-based} involve the computation of generalized inverses. We recall that the Moore--Penrose inverse is available in MATLAB through the function \texttt{pinv}, which is based on the singular value decomposition of $A.$ Many other methods and scripts are available in the literature. For instance, some iterative methods of Schulz-type (e.g., hyperpower methods) have received much attention in the last few years; see \cite{soley1} and the references therein. See also \cite{Stanimirovic}, and \cite{Wang} for the Drazin and other inverses. Formula \eqref{Explicit} with $B$ given in Cases 3 and 5 requires the computation of the matrix sign function, which is available through many methods (check \cite[Chapter 5]{Higham08}). In Sect. \ref{sec-experiments}, a Schur decomposition-based algorithm available in \cite{mftoolbox} is used to calculate the matrix sign function. Here, the accuracy of the attained solution to singular equation \eqref{4x} depends on the difficulties arising in the intermediate estimation of those functions, viz: Moore-Penrose inverses, the sign functions, or the Drazin inverses which influence the relative error affecting the detected solutions to the singular YB-like equation. Although the Jordan canonical decomposition is a very important tool in the theory of matrices, we must recall that its determination using finite precision arithmetic is a very ill-conditioning problem \cite{Golub1,Kagstrom}. Excepting a few particular cases, the numerical calculation of solutions of the YB-like matrix equation by means of the Jordan decomposition must be avoided. Instead, we shall resort to the Schur decomposition, whose stability properties make it well-suited for approximations. Hence, we shall focus on designing an algorithm based on \eqref{block3}. Even this approach is not free of risks when applied to matrices with multiple eigenvalues. We recall that the computation of repeated eigenvalues may be very sensitive to small perturbations. There are also the problems of knowing when it is reasonable to interpret a small quantity as being zero and how to correctly order the eigenvalues in the diagonal of the triangular matrix to get the form \eqref{block3}. To illustrate this, let us consider the matrix $$A=\left[\begin{array}{rrrr} -2 & -7 & -8 & -19\\ 0 & -6 & -6 & -12\\ 0 & 3 & 2 & 7\\ 1 & 2 & 3 & 6 \end{array}\right],$$ which is nilpotent. All of its eigenvalues are zero and its Jordan canonical form is $J_4(0)$, that is, it just involves a Jordan block of order $4.$ Hence, rank$(A)=3.$ However, if we calculate the eigenvalues of $A$ in MATLAB, which has unit roundoff $u\approx 2^{-53}$, by the function \texttt{eig}, we get \smallskip $\begin{array}{r} \texttt{2.2968e-04 + 2.2974e-04i} \\ \texttt{2.2968e-04 - 2.2974e-04i}\\ \texttt{-2.2968e-04 + 2.2963e-04i}\\ \texttt{-2.2968e-04 - 2.2963e-04i} \end{array},$ \smallskip \noindent instead of values with magnitudes more close to $u.$ This is quite expected and cannot be viewed as a failure of the algorithm used by MATLAB, because the condition number (evaluated through the function \texttt{condeig}) of the single eigenvalue of $A$ is about \texttt{4.7934e+11}. This example illustrates the shortcomings that may arise in the numerical calculation of solutions of the YB-like matrix equation by Schur decomposition when $A$ has badly conditioned eigenvalues. Despite such type of examples only, the Schur decomposition performs very well for general singular matrices, as will be shown in Sect.~\ref{sec-experiments}. \begin{figure}[ht] \centering \begin{lstlisting} function X = singular_yb_schur(A) [U,T] = schur(A,'complex'); r = rank(T); n = length(A); E = diag(T); E1 = sort(abs(E)); epsilon = E1(n-r); [US,TS] = ordschur(U,T,abs(E) > epsilon); B1 = TS(1:r,1:r); B2 =TS(1:r,r+1:n); O1 = TS(r+1:n,1:r); Ba = [B1^2 B1*B2]; Bb = B1^2*B2; Z1 = B1; Xp = linsolve(Ba,Bb); N = null(Ba); D=diag(randn(1,n-r)); Z = Xp+N(:,1:n-r)*D; Z2 = Z(1:r,:); Z4 = Z(r+1:n,:); TS1 = [Z1 Z2;O1 Z4]; X = US*TS1*US'; end \end{lstlisting} \caption{\small MATLAB script for finding solutions of the singular YB-like matrix equation by Schur decomposition combined with the solution of \eqref{undeterm}, with $s=r$} \label{fig1} \end{figure} In Figure \ref{fig1}, we provide a MATLAB script based on \eqref{undeterm} for obtaining solutions of the singular YB-like matrix equation. It involves the Schur decomposition, $A=UTU^\ast$, which is reordered to move all the elements in the diagonal of $T$ smaller than or equal to a certain quantity \texttt{epsilon} to the bottom-right. The tolerance \texttt{epsilon} determines what elements in the diagonal of $T$ are viewed as corresponding to the zero eigenvalue. To identify a suitable \texttt{epsilon}, we sort the eigenvalues of $T$ by increasing order of magnitude and assume that \texttt{epsilon} is the $(n-r)$-th eigenvalue in the ordered vector, where $r=\mathop{\mathrm{rank}}(A).$ Then a solution for the rank deficient linear system \eqref{undeterm} is attained by appropriate solvers. If all of the eigenvalues of $A$ are well-conditioned or if $A$ is diagonalizable, \texttt{epsilon} is in general small; otherwise, it can be larger (say, $10^{-4}$) (--cf. Sect.~\ref{sec-experiments}). \section{Numerical Experiments}\label{sec-experiments} We have considered several YB-like matrix equations corresponding to $15$ singular matrices with sizes ranging from $3\times 3$ to $20\times 20.$ The first three matrices (labelled with numbers from $1$ to $3$) are randomized and the next five matrices (from $4$ to $8$) were taken from the function \texttt{matrix} in the Matrix Computation Toolbox \cite{Higham-mct}; matrices labelled with $9$ to $15$ are academic examples, most of which are non-diagonalizable. We have selected the following four methods to get solutions of those $15$ YB-like matrix equations in MATLAB: \begin{itemize} \item \texttt{alg-Case1}: script based on Case 1, with $B=A^2$, and subsequent use of \eqref{explicit3}, with $Y$ being a randomized matrix; \item \texttt{alg-sign}: script based on finding a $B$ as in Case 3, with $\alpha=-(r_{s-1}+r_s)/2$, and subsequent insertion in \eqref{Explicit}, with $Y$ being a randomized matrix; here $\{r_1,\ldots,r_s\}$ is the set constituted by the distinct real parts of the eigenvalues of $A$ written in ascending order; for all the matrices in the experiments we have $s>1$; \item \texttt{alg-spectral}: script based on Case 4, with $B=A^2P_{\lambda_s}$, where $\lambda_s$ is the $n$-th component of the vector \texttt{eig(A)} obtained in MATLAB, and subsequent use of \eqref{Explicit}, with $Y$ being a randomized matrix; \item \texttt{alg-schur}: script provided in Figure \ref{fig1}. \end{itemize} Experiments related to other suggested formulae are not shown here. \texttt{alg-Case1}, \texttt{alg-sign}, and \linebreak \texttt{alg-spectral} involve the computation of the Moore--Penrose inverse, which has been carried out by the function \texttt{pinv} of MATLAB. The computation of the Drazin inverse in \texttt{alg-spectral} has been based on \eqref{comp-drazin}. To estimate the quality of the approximation $\widetilde{X}$ to a solution $X$ of equation \eqref{4x}, we use the expression provided in \cite[Equation (15)]{Kumar18} for estimating the relative error, which is recalled here for convenience: \begin{equation}\label{rel-err} \mathtt{est_{rel}(\widetilde{X})} = \frac{ \|R(\widetilde{X})\|}{\|M(\widetilde{X})\|\, \|\widetilde{X}\|}, \end{equation} where $\|.\|$ stands for the Frobenius norm, $R(X):=AXA-XAX$ and $M(X):=A^T\otimes A-I\otimes(XA)-(AX)^T\otimes I \in \mathbb{C}_{n^2\times n^2}$ ($\otimes$ denotes the Kronecker product). \begin{figure}[t] \centering \includegraphics[width=15cm]{figure2.eps} \caption{\small Top: relative error estimates for the solutions of \eqref{4x} obtained by \texttt{alg-Case1}, \texttt{alg-sign}, \texttt{alg-spectral}, and \texttt{alg-schur}. Bottom: values of \texttt{epsilon} defined in the script of Figure \ref{fig1}. The value of \texttt{epsilon} missing for matrix no. $10$ is exactly $zero$} \label{fig2} \end{figure} At the top of Figure \ref{fig2}, we observe \texttt{alg-Case1} performs very well for all the test matrices, with the exception of matrices $7$ and $8$, where the computation of the Moore--Penrose inverses causes some difficulties. Fortunately, in these two cases, \texttt{alg-schur} gives good results. So they seem to complement very well, in the sense that when one method gives poor results the other one has a good performance. Matrices $7$ and $8$ have, respectively, sizes $19\times 19$ and $20\times 20$, and ranks $12$ and $13.$ In the case of \texttt{alg-schur}, relative errors are larger for matrices $6$, $9$, $11,$ and $15$, which are non-diagonalizable and have ill-conditioned eigenvalues as well. It is interesting to note that a comparison between both graphics shows a synchronization of the relative errors with the values of \texttt{epsilon}. \texttt{alg-sign} and \texttt{alg-spectral} give quite poor results for some matrices, in which large errors arise mainly in the calculation of Moore-Penrose or Drazin inverses. In the case of \texttt{alg-sign}, the choice of $\alpha$ may also influence the accuracy of the computed solutions. It is worth pointing out that arbitrary matrices $Y$ with a large norm in \eqref{Explicit} may also cause difficulties. \section{Conclusions}\label{conclusions} At this point, it is worth highlighting the excellent features of the proposed techniques for computing solutions of singular YB-like matrix equations: \begin{itemize} \item They are valid for any singular matrix; \item They generate infinitely many solutions; \item They perform well in finite precision environments; \end{itemize} and also our main theoretical contributions: \begin{itemize} \item We have provided a novel connection between the YB-like matrix equation and a well-known system of linear matrix equations, and \item We have investigated the role of commuting projectors in the process of designing explicit formulae and have been able to find a large set of examples of those projectors. \end{itemize} We have also overcome the main difficulties arising in the implementation of the Schur decomposition-based formula of Proposition \ref{schur-based} combined with \eqref{undeterm}, by designing an effective algorithm. We recall that many ideas of the paper (for instance, the splitting of the YB-like equation) can be extended to the nonsingular case. \section*{Acknowledgments} The author, Ashim Kumar, acknowledges the I. K. Gujral Punjab Technical University Jalandhar, Kapurthala for providing research support to him.
\section{Introduction} In 1949, Kratky and Porod \cite{WLC} introduced the wormlike-chain (WLC) model for describing the conformations of stiff polymer chains. Soon after, the complete determination of the polymeric structure of DNA guided scientists towards the application of WLC-type models in the context of DNA statistical mechanics, allowing probabilistic predictions of relevant quantities of interest. Historically, the computations have been performed in terms of Fokker-Plank equations \cite{DAN, DIFF}, but also exploiting the point of view of path integrals \cite{PIC, FR1, FR2}, a technique inherited from Wiener's work \cite{W1, W2} and quantum mechanics \cite{BookFeynman}. These ideas were largely investigated by Yamakawa \cite{YAM0, YAM00, YAM1, YAM2, YAM3, YAM4, YAM6, YAM7}, who in particular considered the problem of computing ring-closure probabilities, now ubiquitous in molecular biology \cite{BIO3, BIO4, BIO5, BIO6}. Nowadays, for a homogeneous chain, the exact statistical mechanical theory of both the WLC and the helical WLC (with twist) is known \cite{WL1, WL2, WL3}, and the topic has been rigorously phrased over the special euclidean group SE(3) \cite{CHIR2}. In parallel, back in the early years of the 20th century, the Cosserat brothers Eugène and Fran\c cois formulated Kirchhoff’s rod theory using what are now known as directors \cite{COS}. However, the difficulties arising from the generality of the model, which includes the WLC as a particular constrained case, hindered its application to stochastic chains. Only quite recently, targeting a more realistic description of DNA, the mentioned framework has been partially or fully exploited both within new analytical studies \cite{MMK, ZC, NP, LUDT, LUD, CHIR1} and intense Monte Carlo (MC) simulations \cite{ALEX1, MCDNA, ALEX2, MCD}, the latter being only a partial solution because of time and cost. In this article, we aim to fill the gap between user-friendly but simplistic models (WLC) on one hand, and accurate but expensive simulations (MC) on the other one, still maintaining the analytical aspect which allows to draw conclusions of physical interest. This is achieved using \cite{LUDT, LUD} as a starting point for bridging the two historical lines of research, i.e. exploiting efficient (real) path integral techniques in the semi-classical approximation \cite{2020, PAP1, BookChaichian, BookSchulman, BookWiegel, MOR} (or Laplace method \cite{PIT}), and working within the special Cosserat theory of rods in $SE(3)$. Namely, for studying the end-to-end relative displacements of a fluctuating polymer at thermodynamic equilibrium with a heat bath, we describe the configurations of the chain in a continuum limit by means of framed curves over the special euclidean group. Thus, from an assumed Boltzmann distribution on rod configurations, a conditional probability can be expressed as the ratio of a Boltzmann weighted integral over all paths satisfying the desired end conditions, to the analogous weighted integral over all admissible paths (partition function). The resulting path integrals are finally approximated via a quadratic (semiclassical) expansion about a minimal energy configuration, for which the crucial assumption is that the energy required to deform the system is large with respect to the temperature of the heat bath. This means computing probabilities for length scales of some persistence lengths or less, which turns out to be of great relevance in biology. Although the present study is general and is applicable to various end-to-end statistics, we focus on the computation of ring-closure or cyclization probabilities for elastic rods, targeting three significant aspects. The first is the possibility of systematically distinguishing between the statistics provided by end positions alone (marginal looping) and the ones provided including also end orientations (full looping) \cite{2020}, for Kirchhoff as well as for Cosserat rods. We emphasise that although Kirchhoff rod theory \cite{AN1} generalises both Euler’s elastica theory to model deformations in three-dimensions, and the WLC model allowing arbitrary bending, twisting and intrinsic shapes of the rod, it does not allow extension or shearing of the rod centerline. This is indeed a prerogative of the Cosserat, more general framework, where the centerline displacement and the cross-section’s rotation are considered as independent variables. We show that these additional degrees of freedom are crucial in the analysis of polymer chains in short-length scale, or stiff, regimes, both in the full and marginal cases, where the system exploits extension and shear deformations for minimizing the overall elastic energy, in the face of an increasingly penalizing bending contribution. This allows the cyclization probability density to take high values even when the WLC model (and Kirchhoff) is vanishing exponentially. The second is addressing the ``perfect problem'' in the semi-classical context, where the symmetry of isotropy gives rise to a ``Goldstone mode'' \cite{G1} leading to a singular path integral, and requires a special treatment by suitably adapting (imaginary) quantum mechanical methods \cite{FADPOP, GHO, COL1, POLYA, JAR, BER} and functional determinant theories \cite{FORM, MCK, FAL}, which are novel in such a generality in the context of elastic rod. For simple models, an analysis in this direction is present in \cite{GUER}. The concepts of isotropy and non-isotropy can be roughly related to a circular shape rather than an elliptical shape for the cross section of the rod, and the two cases have two different mathematical descriptions in terms of Gaussian path integrals, which we discuss in detail in the course of this article. In particular, the effect of non-isotropy for semiflexible chain statistics has been addressed from a path integral point of view in \cite{LUD} for the planar case and in \cite{LUDT} for the three-dimensional case (and will be here taken up and simplified), but without resolving the singularity arising in the isotropic limit. The last significant aspect included in the present work is deriving approximated solution formulas that can always be easily evaluated through straightforward numerical solution of certain systems of Hamiltonian ODE, which in some particularly simple cases can even be evaluated completely explicitly. Versions of the solution formulas, involving evaluation of Jacobi fields at different equilibria and subject to different boundary conditions (BCs), are obtained for the two cases of full and marginal ring-closure probabilities. The efficiency aspect in computing looping probabilities, maintaining the same accuracy of MC in the biologically important range less than 1-2 persistence lengths, is fundamental. This is because MC simulation is increasingly intractable due to the difficulty of obtaining sufficiently good sampling with decreasing polymer length, which is the limit where the approximation is increasingly accurate. Contrariwise our approximations are increasingly inaccurate in longer length regimes where good MC sampling is easily achieved. Remarkably, the qualitative behaviour of the probability densities coming from Laplace approximation and from MC sampling are the same regardless of the length scale. We stress that the stiffness parameters expressing the physical properties of the polymer are allowed to vary along the material parameter of the curve, leading to a non-uniform rod which, in the context of DNA, would represent sequence-dependent variations. In addition, the model allows coupling between bend, twist, stretch and shear, as well as a non-straight intrinsic shape. Notwithstanding the latter generality, we prefer to illustrate our method with some basic examples of uniform and intrinsically straight rods and comparing it with a suitable MC algorithm, in order to highlight the contributions provided by the different choices of cyclization BCs in the presence of isotropy or non-isotropy, and to investigate the effect of shear and extension when moving from Kirchhoff to Cosserat rods. Finally, the results will be exposed under the hypothesis of linear elasticity, even tough the theory applies to more general energy functionals. The structure of the article is as follows. First, we give an overview of the statics of special Cosserat rods, with particular emphasis on equilibria and stability for the boundary value problems involved. In particular, the Hamiltonian formulation of the Euler-Lagrange and Jacobi equations provides a common theoretical framework for both Kirchhoff and Cosserat rods. Second, we present a preview of the examples that will be considered in the course of the article, namely in the context of linear elasticity. Therefore, we characterise the minimizers of the energy, distinguishing between the non isotropic and isotropic cases. The role of the continuous variational symmetries of isotropy and uniformity is explained. Then, we devote a section for describing the path integral formulation of fluctuating elastic rods as a model of polymers, introducing an appropriate parametrisation of the rotation group and giving the functional representations of full and marginal looping probability densities. Afterwards, the explicit approximated formulas for such densities are derived, initially in the case of non-isolated minimizers and thereafter in presence of non-isolation, for which a special theoretical analysis is performed. Moreover, we provide a MC algorithm for stochastic elastic rods, exploited to benchmark our results. The examples are finally investigated from the point of view of cyclization probabilities, with special focus on shear and extension contributions for Cosserat rods in the short-length scale regimes. Further discussion and conclusions follow. \section{Elastic rod equilibria and their stability} A comprehensive overview of the theory of elastic rods in the context of continuum mechanics can be found in \cite{ANT}. In particular, we follow the specific notation and Hamiltonian formulations introduced in \cite{HAM}. Briefly, a configuration of a Cosserat rod is a framed curve $\bm{q}(s)=(\bm{R}(s),\bm{r}(s))$ $\in SE(3)$ for each $s\in[0,L]$, which may be bent, twisted, stretched or sheared. The vector $\bm{r}(s)\in\mathbb{R}^3$ and the matrix $\bm{R}(s)\in SO(3)$ model respectively the rod centerline and the orientation of the material in the rod cross-section via a triad of orthonormal directors $\lbrace\bm{d}_i(s)\rbrace_{i=1,2,3}$ attached to the rod centerline, with respect to a fixed frame $\lbrace\bm{e}_i\rbrace_{i=1,2,3}$. As a matter of notation, the columns of the matrix $\bm{R}(s)$ in coordinates are given by the components of the vectors ${\bm{d}_j(s)}$ in the fixed frame $\lbrace\bm{e}_i\rbrace$, namely $\bm{R}_{i,j}(s)=\bm{e}_i\cdot\bm{d}_j(s),\,\,i,j=1,..,3$. Strains are defined as $\bm{u}(s)$, $\bm{v}(s)$ where $\bm{d}_i'=\bm{u}\times\bm{d}_i$, $\bm{r}'=\bm{v}$, with $\bm{u}$ the Darboux vector and the prime denoting the derivative with respect to $s$. Sans-serif font is used to denote components in the director basis (e.g. $\mathsf{u}_i=\bm{u}\cdot\bm{d}_i$), and we write $\bm{\mathsf{u}}=(\mathsf{u}_1,\mathsf{u}_2,\mathsf{u}_3)$, $\bm{\mathsf{v}}=(\mathsf{v}_1,\mathsf{v}_2,\mathsf{v}_3)$, etc. Physically, $\mathsf{u}_1$ and $\mathsf{u}_2$ represent the bending strains and $\mathsf{u}_3$ the twist strain. Analogously, $\mathsf{v}_1$ and $\mathsf{v}_2$ are associated with transverse shearing, whereas $\mathsf{v}_3$ with stretching or compression of the rod. In compact form, we have $\bm{\mathsf{u}}^{\times}(s)=\bm{R}(s)^T \bm{R}'(s)$, $\bm{\mathsf{v}}(s)=\bm{R}(s)^T \bm{r}'(s)$, where $\bm{\mathsf{u}}^{\times}$ is the skew-symmetric matrix or cross product matrix of $\bm{\mathsf{u}}$ having $(1,2)$, $(1,3)$ and $(2,3)$ entries respectively equal to $-\mathsf{u}_3$, $\mathsf{u}_2$ and $-\mathsf{u}_1$. The stresses $\bm{m}(s)$ and $\bm{n}(s)$ are defined as the resultant moment and force arising from averages of the stress field acting across the material cross-section at $\bm{r}(s)$. In the absence of any distributed loading, at equilibrium the stresses satisfy the balance laws ${\bm{{n}}}'=\bm{0}$, ${\bm{{m}}}'+\bm{{r}}'\times\bm{{n}}=\bm{0}$. Equilibrium configurations can be found once constitutive relations are introduced, which we do in a way that facilitates the recovery of the inextensible, unshearable limit tipically adopted in polymer physics. Namely, we consider a pair of functions $W,\,W^*:\mathbb{R}^3\times\mathbb{R}^3\times [0,L]\rightarrow\mathbb{R}$ that (for each $s\in[0,L]$) are strictly convex, dual functions under Legendre transform in their first two arguments, and with $\bm{0}\in\mathbb{R}^6$ their unique global minimum. If $\hat{\bm{\mathsf{u}}}(s)$ and $\hat{\bm{\mathsf{v}}}(s)$ are the strains of the unique energy minimizing configuration $\hat{\bm{q}}(s)$, then, $\forall\epsilon>0$ we introduce the Hamiltonian function $H=W^*(\bm{\mathsf{m}},\epsilon\bm{\mathsf{n}};s)+\bm{\mathsf{m}}\cdot\hat{\bm{\mathsf{u}}}+\bm{\mathsf{n}}\cdot\hat{\bm{\mathsf{v}}}$, and the constitutive relations are $\bm{\mathsf{u}}={\partial H}/{\partial \bm{\mathsf{m}}}=W_1^*(\bm{\mathsf{m}},\epsilon\bm{\mathsf{n}};s)+\hat{\bm{\mathsf{u}}}$, $\bm{\mathsf{v}}={\partial H}/{\partial\bm{\mathsf{n}}}=\epsilon W_2^*(\bm{\mathsf{m}},\epsilon\bm{\mathsf{n};s})+\hat{\bm{\mathsf{v}}}$, which can be inverted to obtain $\bm{\mathsf{m}}=W_1(\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}},\frac{\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}}{\epsilon};s)$, $\bm{\mathsf{n}}=\frac{1}{\epsilon}W_2(\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}},\frac{\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}}{\epsilon};s)$, where the Lagrangian $W(\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}},\frac{\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}}{\epsilon};s)$ defines the elastic potential energy of the system as $\int_0^L{W(\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}},\frac{\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}}{\epsilon};s)}\,\text{d} s$. Notice the use of the subscripts to denote partial derivatives with respect to the first or second component. The standard case of linear constitutive relations arises when $W^*(\bm{\mathsf{x}};s)=\frac{1}{2}\bm{\mathsf{x}}\cdot\bm{\mathcal{R}}(s)\bm{\mathsf{x}}$ and $W(\bm{\mathsf{y}};s)=\frac{1}{2}\bm{\mathsf{y}}\cdot\bm{\mathcal{P}}(s)\bm{\mathsf{y}}$ for $\bm{\mathsf{x}}$,$\,\bm{\mathsf{y}}\,\in\mathbb{R}^6$, where $\mathbb{R}^{6\times 6}\ni\bm{\mathcal{P}}^{-1}(s)=\bm{\mathcal{R}}(s)=\bm{\mathcal{R}}(s)^T>0$, with $\bm{\mathcal{P}}(s)$ a general nonuniform stiffness matrix and $\bm{\mathcal{R}}(s)$ the corresponding compliance matrix. For each $\epsilon>0$ and given $W$, $W^*$, we arrive at a well-defined Cosserat rod theory, where, e.g., the full potential energy of the system might include end-loading terms of the form $\bm{\lambda}\cdot(\bm{r}(L)-\bm{r}(0))$, $\bm{\lambda}\in\mathbb{R}^3$. The point of the above formulation is that the Hamiltonian and associated constitutive relations behave smoothly in the limit $\epsilon\rightarrow 0$, which imply the unshearability and inextensibility constraint on the strains ${\bm{\mathsf{v}}}(s)=\hat{\bm{\mathsf{v}}}(s)$, where $\hat{\bm{\mathsf{v}}}(s)$ are prescribed. This is precisely a Kirchhoff rod model, abbreviated as $(\mathtt{K})$, in contrast to $(\mathtt{C})$ for Cosserat. However, the $\epsilon\rightarrow 0$ limit of the $(\mathtt{C})$ Lagrangian is not smooth; rather the potential energy density for the $(\mathtt{K})$ rod is the Legendre transform of $W^*(\bm{\mathsf{m}},\bm{0};s)+\bm{\mathsf{m}}\cdot\hat{\bm{\mathsf{u}}}+\bm{\mathsf{n}}\cdot\hat{\bm{\mathsf{v}}}$ w.r.t. $\bm{\mathsf{m}}\in\mathbb{R}^3$, or $W^{(\mathtt{K})}({\bm{\mathsf{u}}}-\hat{\bm{\mathsf{u}}};s)-{\bm{\mathsf{n}}}\cdot\hat{\bm{\mathsf{v}}}$. In the case of linear elasticity for a $(\mathtt{C})$ rod with $\bm{\mathcal{P}}=\begin{small}\begin{pmatrix} \bm{\mathcal{K}} & \bm{\mathcal{B}} \\ \bm{\mathcal{B}}^T & \bm{\mathcal{A}} \end{pmatrix}\end{small}$ and $\bm{\mathcal{K}}$, $\bm{\mathcal{B}}$, $\bm{\mathcal{A}}$ in $\mathbb{R}^{3\times 3}$, the $(1,1)$ block of the compliance matrix is $\bm{\mathcal{R}}_{1,1}=(\bm{\mathcal{K}}-\bm{\mathcal{B}}\bm{\mathcal{A}}^{-1}\bm{\mathcal{B}}^T)^{-1}$ and $W^{(\mathtt{K})}({\bm{\mathsf{u}}}-\hat{\bm{\mathsf{u}}};s)=\frac{1}{2}(\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}})\cdot\bm{\mathcal{K}}^{(\mathtt{K})}(s)(\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}})$, with $\bm{\mathcal{K}}^{(\mathtt{K})}={\bm{\mathcal{K}}^{(\mathtt{K})}}^T=\bm{\mathcal{R}}_{1,1}^{-1}>0$. Uniform helical WLC models are recovered in the case of a uniform $(\mathtt{K})$ rod when $\hat{\bm{\mathsf{u}}}(s)$, $\hat{\bm{\mathsf{v}}}(s)$ and $\bm{\mathcal{K}}^{(\mathtt{K})}(s)$ are all taken to be constant. (For any uniform rod, $(\mathtt{C})$ or $(\mathtt{K})$, the Hamiltonian function is constant along equilibria). Linearly elastic $(\mathtt{K})$ rods are (transversely) isotropic when $\bm{\mathcal{K}}^{(\mathtt{K})}(s)=\text{diag}(k_1(s),k_2(s),k_3(s))$ with $k_1=k_2$ and $\hat{{\mathsf{u}}}_1=\hat{{\mathsf{u}}}_2=\hat{{\mathsf{v}}}_1=\hat{{\mathsf{v}}}_2=0$. Then $\mathsf{m}_3$ is constant on equilibria, and the potential energy reduces to a function of the square geometrical curvature $\kappa(s)$ of the curve $\frac{1}{2}\int_0^L{[k_1\kappa^2+k_3(\mathsf{u}_3-\hat{\mathsf{u}}_3)^2}]\,\text{d} s$ (where it should be noted that $\mathsf{u}_3(s)$ is still the twist of the $\lbrace\bm{d}_i\rbrace$ frame which is not directly related to the geometrical torsion of the Frenet framing of the rod centerline). The WLC model arises when $k_1(s)$ is constant and the twist moment $\mathsf{m}_3$ vanishes. There is an extensive literature concerning the study of equilibria of a given elastic rod. Numerically this involves the solution of a two-point boundary value problem (BVP), which can reasonably now be regarded as a straightforward well-understood procedure. Often coordinates on $SO(3)$ are introduced and the resulting system of second-order Euler Lagrange equations associated with the potential energy is solved numerically. We adopt an Euler parameters (or quaternions) parametrization of $SO(3)$, but solve the associated first-order canonical Hamiltonian system subject to appropriate (self-adjoint) two-point BCs, so that the inextensible, unshearable $(\mathtt{K})$ rod is a simple smooth limit of the extensible, shearable $(\mathtt{C})$ case. In this article we are primarly interested in the two specific BVPs, denoted respectively by $(\mathtt{f})$ and $(\mathtt{m})$: \begin{equation}\label{f} (\mathtt{f})\quad\bm{r}(0)=\bm{0},\,\,\bm{R}(0)=\mathbb{1},\,\,\bm{r}(L)=\bm{r}_L,\,\,\bm{R}(L)=\bm{R}_L, \end{equation} \begin{equation}\label{m} (\mathtt{m})\quad\bm{r}(0)=\bm{0},\,\,\,\bm{R}(0)=\mathbb{1},\,\,\,\bm{r}(L)=\bm{r}_L,\,\,\,\bm{m}(L)=\bm{0}. \end{equation} The BVP $(\mathtt{f})$ arises in modelling looping in $SE(3)$ including the particular case of cyclization where $\bm{r}_L=\bm{0}$ and $\bm{R}_L=\mathbb{1}$. The BVP $(\mathtt{m})$ arises in modelling looping in $\mathbb{R}^3$, where the value of $\bm{R}_L$ is a variable left free, over which one marginalises. In general, for rod two-point BVPs, equilibria with given BCs are non-unique. For isotropic or uniform rods, and for specific choices of $\bm{r}_L$ and $\bm{R}_L$ in $(\mathtt{f})$ and $(\mathtt{m})$, equilibria can arise in continuous isoenergetic families \cite{RING}, a case of primary interest here. As we assume hyper-elastic constitutive relations with \begin{equation}\label{energy} E(\bm{q})=\int_0^L{W(\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}},{\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}};s)}\,\text{d} s, \end{equation} stability of rod equilibria can reasonably be discussed dependent on whether an equilibrium is a local minimum of the associated potential energy variational principle. For $(\mathtt{C})$ rods classification of which equilibria are local minima has a standard and straightforward solution. The second variation $\delta^2E$ is a quadratic functional of the perturbation field $\bm{\mathsf{h}}=(\delta\bm{\mathsf{c}},\delta\bm{\mathsf{t}})$, where $\bm{\mathsf{q}}(s)=(\bm{\mathsf{c}}(s),\bm{\mathsf{t}}(s))\in\mathbb{R}^6$ is a given parametrisation of $SE(3)$ for the configuration variable in the director basis which will be specified later in the article, and reads as \begin{equation}\label{sec} \delta ^2 E=\int_0^L{\left({\bm{\mathsf{h}}'}\cdot\bm{\mathsf{P}}\bm{\mathsf{h}}'+2{\bm{\mathsf{h}}'}\cdot{\bm{\mathsf{C}}}\bm{\mathsf{h}}+\bm{\mathsf{h}}\cdot{\bm{\mathsf{Q}}}\bm{\mathsf{h}}\right)}\,\text{d}s, \end{equation}% where $\bm{\mathsf{P}}(s)$, ${\bm{\mathsf{C}}}(s)$ and ${\bm{\mathsf{Q}}}(s)$ are coefficient matrices in $\mathbb{R}^{6\times 6}$ computed at any equilibrium. The Jacobi equations are the (second-order) system of Euler-Lagrange equations for (Eq.~\ref{sec}), or equivalently the linearisation of the original Euler-Lagrange equations for the potential energy variational principle. One then solves a $6\times 6$ matrix valued system, namely an initial value problem for the Jacobi equations with initial conditions coinciding with the ones given later in the article when computing probability densities from Jacobi fields (shooting towards $s=0$, where in both $(\mathtt{f})$ and $(\mathtt{m})$ Dirichlet BCs are present; the case with Neumann BCs at both ends is more delicate \cite{NEU}). Provided that the determinant of the matrix solution does not vanish in $[0,L)$, then there is no conjugate point and the equilibrium is a local minimum \cite{JHMStab,ISO,HEL}. As described fully in \cite{JHMT}, the constrained case of $(\mathtt{K})$ is more subtle and a theory dating back to Bolza for isoperimetrically constrained calculus of variations must be applied \cite{BOLZA}. However, the Hamiltonian version of the Jacobi equations for rods (just like the Hamiltonian version of the Euler-Lagrange equilibrium equations) has a smooth limit as $\epsilon\rightarrow 0$, and the limit corresponds to the Hamiltonian formulation of the Bolza conjugate point conditions as described in \cite{ISO}. The Jacobi equations in first-order Hamiltonian form are written as \begin{equation}\label{JacHam} \begin{pmatrix} {{\bm{\mathsf{H}}'}} \\ {{\bm{\mathsf{M}}'}} \end{pmatrix} =\bm{J}{{\bm{\mathsf{E}}}}\begin{pmatrix} {{\bm{\mathsf{H}}}} \\ {{\bm{\mathsf{M}}}} \end{pmatrix}, \end{equation} with the Hamiltonian skew-symmetric matrix $\bm{J}=\begin{pmatrix} \mathbb{0} & \mathbb{1}\\ -\mathbb{1} & \mathbb{0} \end{pmatrix}\in\mathbb{R}^{12\times 12}$, $\bm{\mathsf{E}}(s)$ the symmetric matrix driving the system which will be detailed later on, and $\bm{\mathsf{M}}(s)\in\mathbb{R}^{6\times 6}$ the conjugate variable of the Jacobi fields $\bm{\mathsf{H}}(s)$ under the Legendre transform. In the following, we assume the existence and stability of the minimizers of the elastic energy (Eq.~\ref{energy}) $\bm{q}^f$ and $\bm{q}^m$ satisfying the BCs $(\mathtt{f})$ in (Eq.~\ref{f}) and $(\mathtt{m})$ in (Eq.~\ref{m}) respectively. Notice that the intrinsic configuration of the rod $\hat{\bm{q}}$ is itself a minimizer (global) satisfying \begin{equation}\label{hat} \bm{r}(0)=\bm{0},\,\,\,\bm{R}(0)=\mathbb{1},\,\,\,\bm{n}(L)=\bm{m}(L)=\bm{0}. \end{equation} Stability of equilibria is not the focus of this article, but we will show that the volume of certain Jacobi fields, i.e., the actual (positive) value of a Jacobi determinant, plays a central role in the evaluation formula for the quadratic path integrals that arise in our Laplace approximations to looping probabilities. The connection between Jacobi fields and quadratic imaginary path integrals is well known in the case that the coefficient matrix ${\bm{\mathsf{C}}}(s)$ in the cross-terms in (Eq.~\ref{sec}) vanishes (or is symmetric and so can be integrated away). By contrast, for elastic rods a non-symmetric ${\bm{\mathsf{C}}}(s)$ is typically present and the approach of Papadopoulos \cite{PAP1} is required to evaluate the quadratic path integrals, and as described in \cite{LUD, LUDT} a further Riccati transformation for the Papadopoulos solution formula is necessary to recover a Jacobi fields expression. Moreover, in \cite{2020} the latter studies are generalised for different choices of BCs on the paths, in particular for dealing with the partition function and solving the marginalised problem. The main contributions of this article are to demonstrate that the approach of \cite{LUD, LUDT} for conditional probability densities can be extended in two ways. First, isolated equilibria to BVP $(\mathtt{m})$ can be treated, in addition to the case of isolated equilibria to BVP $(\mathtt{f})$, and second, the case of non-isolated equilibria of both BVP $(\mathtt{f})$ and $(\mathtt{m})$ (as arises for isotropic rods) can be handled by appropriately generalising a particular regularization procedure \cite{MCK, FAL} within Forman's theorem in the field of functional determinants \cite{FORM}. Furthermore, the underlying physical phenomena arising from the different cases are discussed and explained within some guiding examples. \section{A preview of the examples considered} \begin{figure*} \subfigure[]{\includegraphics[width=.32\textwidth]{fig0.pdf}}\qquad\qquad \subfigure[]{\includegraphics[width=.32\textwidth]{fig1.pdf}} \caption{The thick lines represent the pairs of isolated minima for the non-isotropic case; the manifolds of minimizers for the isotropic case are displayed accordingly. In panel (a) the solutions for the $(\mathtt{f})$ case are the same for $(\mathtt{K})$ and $(\mathtt{C})$ rods. In panel (b) we underline the effect of shear and extension for the $(\mathtt{m})$ case, which modifies the red solutions $(\mathtt{K})$ into the green ones $(\mathtt{C})$.} \label{fig1} \end{figure*} The method developed in the present article will be applied, as a fundamental example, to a linearly elastic, uniform, with diagonal stiffness matrix, intrinsically straight and untwisted rod ($\bm{\mathcal{P}}(s)=\bm{\mathcal{P}}=$ diag $\lbrace k_1,k_2,k_3,a_1,a_2,a_3\rbrace$, $\hat{\bm{\mathsf{u}}}=\bm{0}$, $\hat{\bm{\mathsf{v}}}=(0,0,1)$). Neither intrinsic shear nor extension is present. Since we are primarily interested in ring-closure or cyclization probabilities, we look for minimizers of the energy satisfying the BCs reported in (Eq.~\ref{f}), (Eq.~\ref{m}) with $\bm{r}_L=\bm{0}$ and $\bm{R}_L=\mathbb{1}$. First, we consider a non-isotropic rod ($k_1\neq k_2$), further assuming w.o.l.o.g. that $k_1<k_2$. For the case of full looping $(\mathtt{f})$, there exist two circular, untwisted, isolated minima $\bm{{q}}^f$ lying on the $y-z$ plane characterised by $\bm{\mathsf{u}}^f=(\pm{2\pi}/{L},0,0)$ and $\bm{\mathsf{v}}^f=(0,0,1)$. In particular, the one having non-positive $y$ coordinate is given by $\bm{r}^f(s)=\frac{L}{2\pi}(0,\cos{({2\pi s}/{L})}-1,\sin{({2\pi s}/{L})})$ and the rotation matrix $\bm{R}^f(s)$ is a counterclockwise planar rotation about the $x$ axis of an angle $\varphi^f(s)={2\pi s}/{L}$, $s\in[0,L]$. Consequently, $\bm{\mathsf{u}}^f=({2\pi}/{L},0,0)$, $\bm{\mathsf{m}}^f=({2\pi k_1}/{L},0,0)$, $\bm{\mathsf{v}}^f=(0,0,1)$, $\bm{\mathsf{n}}^f=\bm{0}$ and the energy is simply computed as $E(\bm{{q}}^f)={2\pi^2 k_1}/{L}$. We observe that these solutions are special for the fact of being the same both for $(\mathtt{K})$ and $(\mathtt{C})$ rods, which is not the case in general. By contrast, there are no simple analytical expressions for the two planar and untwisted teardrop shaped isolated minimizers $\bm{{q}}^m$ involved in the marginal looping problem $(\mathtt{m})$, and elliptic functions or numerics must be used. For example, in the $(\mathtt{K})$ case, the rotation angle $\varphi^m(s)$ can be derived using elliptic functions in terms of the constant unknown force $\bm{n}^m=(0,n2,n3)$ \cite{AN1, AN2, AN3}. It is important to underline that here in $(\mathtt{m})$ the solutions for $(\mathtt{K})$ and $(\mathtt{C})$ rods are different, since the latter are characterised by $\bm{\mathsf{v}}^m=(0,\mathsf{v}_2^m(s)\neq 0,\mathsf{v}_3^m(s)\neq 1)$. The qualitative shapes of the minimal energy configurations are reported in Fig.\ref{fig1}. To be precise, among the equilibria satisfying the BCs for the $(\mathtt{f})$ and $(\mathtt{m})$ cases, there are also equilibria with figure eight centerlines, but in the present study their contributions will be neglected because of their higher elastic energy. Moreover, a detailed stability analysis should be carried out, and it is possible to show that the circle and teardrop solutions are stable, with exceptions for the $(\mathtt{C})$ rod in the limit of the undeformed length $L$ going to zero, where bifurcations occur. In particular, the ``compressed'' trivial solution $\bm{q}^c$, characterised by $\bm{r}^c=\bm{0}$, $\bm{R}^c=\bm{\mathbb{1}}$, $\bm{\mathsf{u}}^c=\bm{0}$, $\bm{\mathsf{m}}^c=\bm{0}$, $\bm{\mathsf{v}}^c=\bm{0}$, $\bm{\mathsf{n}}^c=(0,0,-a_3)$ with energy $E(\bm{{q}}^c)={a_3 L}/{2}$, starts to play an important role (this is not mentioned in \cite{LUD}). We will show that for the full $(\mathtt{C})$ case it exists $L^f>0$ such that the latter solution becomes stable and has lower energy than the circular minimizer $\bm{q}^f$ if $0<L<L^f$. In this regime the system will be mainly driven by the compressed solution (even if the circle remains stable). Moreover, for the marginal $(\mathtt{C})$ case, it exists $L^m>0$ such that the stable teardrop solution $\bm{q}^m$ ceases to exist in the interval $0<L<L^m$, merging with the compressed solution which becomes stable. In both the cases, this observation will have a strong impact on the trend of the cyclization probability densities, that is confirmed by MC simulations. In addition to the above statements, the isotropic case requires a more detailed analysis for the presence of a continuous symmetry. Namely, for a general linearly elastic (transversely) isotropic $(\mathtt{C})$ rod defined by $\bm{\mathcal{P}}(s)=\text{diag}(k_1(s),k_2(s),k_3(s),a_1(s),a_2(s),a_3(s))$ with $k_1=k_2$, $a_1=a_2$ and $\hat{{\mathsf{u}}}_1=\hat{{\mathsf{u}}}_2=\hat{{\mathsf{v}}}_1=\hat{{\mathsf{v}}}_2=0$, it is known \cite{RING} that for cyclization BCs $(\mathtt{f})$ in (Eq.~\ref{f}) and $(\mathtt{m})$ in (Eq.~\ref{m}) the equilibria are non-isolated and form a manifold obtained, starting from a known solution, by a rigid rotation of the rod of an angle $\theta$ about the $z$ axis and a subsequent rotation of the framing by an angle $-\theta$ about $\bm{d}_3(s)$, for $\theta\in[0,2\pi)$. As a consequence, in our particular examples, once selected e.g. the non-isotropic solution lying in the $y-z$ plane, $y\leq 0$ and characterized by the configuration $(\bm{R}(s),\,\,\bm{r}(s))$, $s\in[0,L]$, then we get an entire family of minimizers $\bm{R}(s;\theta)=\bm{Q}_{\theta}\bm{R}(s)\bm{Q}^T_{\theta}$, $\bm{r}(s;\theta)=\bm{Q}_{\theta}\bm{r}(s)$, where $\bm{Q}_{\theta}$ is defined as the counterclockwise planar rotation matrix about the $z$ axis of an angle $\theta\in[0,2\pi)$ (Fig.\ref{fig1}). As a side note for the $(\mathtt{f})$ example, being the circular solutions the same for $(\mathtt{K})$ and $(\mathtt{C})$ rods, the isotropy symmetry arises even if $a_1\neq a_2$. Furthermore, for a general linearly elastic uniform rod, for which the stiffness matrix $\bm{\mathcal{P}}$ and the intrinsic strains $\hat{\bm{\mathsf{u}}}$, $\hat{\bm{\mathsf{v}}}$ are independent of $s$, another continuous symmetry is present for the cyclization BCs $(\mathtt{f})$ in (Eq.~\ref{f}). In fact, starting from a known solution characterized by the configuration $(\bm{R}(s),\,\,\bm{r}(s))$, $s\in[0,L]$, it is possible to obtain a family of equilibria parametrised by $s^*\in[0,L)$ in the following way: select $s^*\in[0,L)$, rigidly translate the rod by $-\bm{r}(s^*)$, reparametrise the rod using the parameter $t\in[0,L]$ such that $s=t+s^*$ $(\text{mod}\,\,L)$, rigidly rotate the rod about the origin by means of $\bm{R}^T(s^*)$. However, in our uniform examples, the symmetry of uniformity is not playing any role, due to the circular centerline of the minimizers which is a fixed point of the transformation and, in the marginal case, to the impossibility of satisfying the condition $\bm{m}^m(L)=\bm{0}$ after the application of the symmetry. In the present article we will deal with only one symmetry parameter, namely $\theta\in[0,2\pi)$ associated to isotropic rods. Nevertheless, the theory can be applied to the uniformity symmetry alone and generalised to cases in which isotropy and uniformity allow the coexistence of two non-degenerate symmetry parameters $(\theta,\,s^*)$ generating a manifold of equilibria isomorphic to a torus, as it is the case of figure eight minimizers with $(\mathtt{f})$ cyclization BCs. Finally, notice that in the following theory there is no assumption either of uniformity of the rod, nor, in general, of a straight intrinsic shape. \section{Fluctuating elastic rods and the path integral formulation} Let us consider now an elastic rod at thermodynamic equilibrium with a heat bath in absence of external forces, assuming w.l.o.g. that $\bm{q}(0)=\bm{q}_0=(\mathbb{1},\bm{0})$. Then, given a prescribed $\bm{q}_L=(\bm{R}_L,\bm{r}_L)\in SE(3)$, we formulate the problem of computing a conditional probability density function (pdf) for the other end of the rod to satisfy at $s=L$ either $\bm{q}(L)=\bm{q}_L$, or the weaker condition $\bm{r}(L)=\bm{r}_L$. The first case gives rise to a conditional pdf $(\mathtt{f})$ over the space $SE(3)$, whereas the second one represents the $\mathbb{R}^3$-valued marginal $(\mathtt{m})$ over the final rotation variable, with no displacement constraint on $\bm{R}(L)$. If a polymer interacts with a solvent heat bath, the induced thermal motion gives rise to a stochastic equilibrium that we model making use of a Boltzmann distribution on rod configurations satisfying $\bm{q}(0)=\bm{q}_0$ \cite{LUD, LUDT}, of the form ${\mathcal{Z}^{-1}}{e^{-\beta E(\bm{q}(s))}}$, with $\beta$ the inverse temperature and $\mathcal{Z}$ the partition function of the system. A precise treatment of the previous expression requires the introduction of the path integral formalism \cite{BookFeynman, BookChaichian, BookSchulman, BookWiegel}. Namely, the $SE(3)$ and $\mathbb{R}^3$ densities $\rrf$ and $\rrm$ are respectively given as the ratios of infinite dimensional Wiener integrals \cite{2020}: \begin{equation}\label{dens} \rrf(\bm{q}_L,L|\bm{q}_0,0)=\frac{\mathcal{K}_f}{\mathcal{Z}},\quad\rrm(\bm{r}_L,L|\bm{q}_0,0)=\frac{\mathcal{K}_m}{\mathcal{Z}}, \end{equation} \begin{equation}\label{pathint} {\mathcal{K}_f}=\int\limits_{\bm{q}(0)=\bm{q}_0}^{\bm{q}(L)=\bm{q}_L}{e^{-\beta E(\bm{q})}\,\mathcal{D}\bm{q}},\,\,\,{\mathcal{K}_m}=\int\limits_{\bm{q}(0)=\bm{q}_0}^{\bm{r}(L)=\bm{r}_L}{e^{-\beta E(\bm{q})}\,\mathcal{D}\bm{q}}. \end{equation}% The limits of integration are dictated by the BCs (Eq.~\ref{f}) and (Eq.~\ref{m}) respectively and $\mathcal{Z}$ is a path integral over all paths with BCs given in (Eq.~\ref{hat}) that guarantees the normalisation condition: \begin{equation}\label{normex} \mathcal{Z} = \int\limits_{\bm{q}(0)=\bm{q}_0}{e^{-\beta E(\bm{q})}\,\mathcal{D}\bm{q}}, \end{equation} $\int_{SE(3)}{\rrf(\bm{q}_L,L|\bm{q}_0,0)}\,\text{d} \bm{q}_L=\int_{\mathbb{R}^3}{\rrm(\bm{r}_L,L|\bm{q}_0,0)}\,\text{d} \bm{r}_L=1$. The prescriptions $\bm{m}(L)=\bm{0}$ for $\mathcal{K}_m$ and $\bm{m}(L)=\bm{n}(L)=\bm{0}$ for $\mathcal{Z}$ account for Neumann natural BCs at $s=L$ and concern the minimizers. We stress that it is key that at this stage the model is an extensible, shereable rod, namely with $(\mathtt{C})$ energy (Eq.~\ref{energy}), otherwise the problem could not be expressed as simple BCs at $s=0$ and $s=L$. Moreover, to apply all the path integral machinery, we first have to deal with the rotation group $SO(3)$, being part of the configuration variable $\bm{q}(s)=(\bm{R}(s),\bm{r}(s))$, which gives rise to a manifold structure that should be treated carefully in order to recover eventually a ``flat space" formulation. For an explicit evaluation of the path integrals in (Eq.~\ref{pathint}) and (Eq.~\ref{normex}), in the following we introduce appropriate coordinates in $SE(3)$. As done originally by Feynman \cite{BookFeynman}, a path integral can be defined via a ``time slicing'' procedure, or ``parameter slicing'' in our case, which is to replace the infinite-dimensional integral $\mathcal{D}\bm{q}$ with the limit for $n\rightarrow\infty$ of $n$ iterated finite-dimensional integrals $\prod\limits_{j=1}^{n}{\text{d} \bm{q}_j}$. These have to be performed on the space of framed curves, whose measure can be chosen to be the product of the Lebesgue measure on the three-dimensional euclidean space $E(3)$ and of the Haar bi-invariant measure on $SO(3)$, which may be uniquely defined up to a constant factor \cite{BookSattinger, BookTung}. In order to avoid difficulty that can arise from the non simple connectivity of $SO(3)$, it is often convenient to consider instead its universal (double) covering $SU(2)$. Any matrix in $SU(2)$ can be parametrized by a quadruple of real numbers $\bm{\gamma}=(\gamma_1,\gamma_2,\gamma_3,\gamma_4)$ living on the unit sphere $S^3$ in $\mathbb{R}^4$, i.e. $\bm{\gamma}\cdot\bm{\gamma}=1$. The latter quadruple is know as a unit quaternion or a set of Euler parameters \cite{HAM}. Recalling that by Euler’s theorem each element of SO(3) is equivalent to a rotation of an angle $\varphi$ about a unit vector $\bm{w}$, the Euler parameters are expressed as a function of $\varphi$ and $\bm{w}$ as $\gamma_4=\cos{\left(\varphi/{2}\right)}$, $\gamma_i=w_i\sin{\left({\varphi}/{2}\right)}$, $i=1,2,3$. Hence $\bm{\gamma}$ and $-\bm{\gamma}$ encode the same rotation matrix and the correspondence from $SU(2)$ to $SO(3)$ is 2 to 1. Referring to \cite{LUDT}, for parametrising the group of proper rotations we restrict ourself to one hemisphere of the unit sphere $S^3$ in $\mathbb{R}^4$, and we introduce the matrices $\bm{B}_1$, $\bm{B}_2$ and $\bm{B}_3$ satisfying the algebra $\bm{B}_j\bm{B}_k=-\delta_{jk}\bm{\mathbb{1}}-\bm{\epsilon}_{ijk}\bm{B}_i$, where $\bm{\epsilon}_{ijk}$ is the total antisymmetric or Levi-Civita tensor and summation over equal indices is intended. Furthermore, given a unit quaternion $\bar{\bm{\gamma}}$, $\lbrace \bm{B}_1\bar{\bm{\gamma}},\bm{B}_2\bar{\bm{\gamma}},\bm{B}_3\bar{\bm{\gamma}},\bar{\bm{\gamma}}\rbrace$ is an orthonormal basis of $\mathbb{\bm{R}}^4$ and each quadruple of Euler parameters $\bm{\gamma}$ (hence each rotation) can be expressed in coordinates with respect to the latter basis. In particular, for one hemisphere of $S^3$, we consider the new variable $\bm{\mathsf{b}}=(\mathsf{b}_1,\mathsf{b}_2,\mathsf{b}_3)\in {B}_1^3$ living in the open ball of $\mathbb{R}^3$ such that $\bm{\gamma}(\bm{\mathsf{b}})=\sum\limits_{i=1}^3{\mathsf{b}_i\bm{B}_i\bar{\bm{\gamma}}}+\sqrt{1-\Vert \bm{\mathsf{b}}\Vert^2}\bar{\bm{\gamma}}$. Therefore, $\bm{\gamma}(\bm{\mathsf{b}})$ defines a $1$-to-$1$ parametrisation of $SO(3)$, adapted to the rotation expressed by the unit quaternion $\bar{\bm{\gamma}}$, meaning that $\bm{\gamma}(\bm{\mathsf{b}}=\bm{0})=\bar{\bm{\gamma}}$. To be precise, we should remark that the image of such a parametrisation does not include the elements lying on a maximal circle (which depends on $\bar{\bm{\gamma}}$) of the unit sphere in $\mathbb{R}^4$, since $SO(3)$ is not simply connected and rotations about a generic axis of a fixed angle are inevitably neglected. For Euler parameters, the infinitesimal measure is given by $\text{d} \bm{q}_j=\delta\left(1-\Vert\bm{\gamma}_j\Vert^2\right)\text{d} \bm{\gamma}_j\,\text{d} \bm{r}_j$, so that the Haar volume measure on $SO(3)$ becomes a surface measure on $S^3$ \cite{BookTung}. Thus, the parametrisation $\bm{\phi}=\bm{\gamma}(\bm{\mathsf{b}}):{B}_1^3\subseteq\mathbb{R}^3\rightarrow\mathcal{M}\subseteq\mathbb{R}^4,$ with $\mathcal{M}$ an hemisphere of $S^3$, naturally induces a metric tensor $\bm{\mathsf{g}}$ on the tangent space at each point of $\mathcal{M}$. Denoting the coordinate vectors as $\bm{\phi}_i=\frac{\partial\bm{\phi}}{\partial\mathsf{b}_i}$, $i=1,2,3$, the components of the metric tensor are given by ${\mathsf{g}}_{i,k}=\bm{\phi}_i\cdot\bm{\phi}_k$, $i,k=1,2,3$, and we get $\bm{\mathsf{g}}(\bm{\mathsf{b}})=\bm{\mathbb{1}}+{\bm{\mathsf{b}}\otimes\bm{\mathsf{b}}}/({1-\Vert\bm{\mathsf{b}}\Vert^2})$, $\text{d} \bm{q}_j=\sqrt{\det{[\bm{\mathsf{g}}(\bm{\mathsf{b}}_j)]}}\,\text{d} \bm{\mathsf{b}}_j\,\text{d} \bm{r}_j$ with the metric correction being equal to ${1}/{\sqrt{1-\Vert\bm{\mathsf{b}}_j\Vert^2}}$. Lastly, in order to deal with variables defined in the whole of $\mathbb{R}^3$, we introduce the Gibbs vector $\bm{\mathsf{c}}=\bm{\mathsf{b}}/(\sqrt{1-\Vert \bm{\mathsf{b}}\Vert^2})$. As a consequence, we have derived a $\bar{\bm{\gamma}}$-adapted parametrization of $SE(3)$ denoted by $\bm{\mathsf{q}}(s)=(\bm{\mathsf{c}}(s),\bm{\mathsf{t}}(s))\in\mathbb{R}^6$ as \begin{equation}\label{par} \bm{\gamma}(\bm{\mathsf{c}})=\frac{1}{\sqrt{1+\Vert \bm{\mathsf{c}}\Vert^2}}\left(\sum\limits_{i=1}^3{\mathsf{c}_i\bm{B}_i\bar{\bm{\gamma}}}+\bar{\bm{\gamma}}\right),\,\,\,\bm{\mathsf{t}}=\bm{R}(\bar{\bm{\gamma}})^T\bm{r}, \end{equation} with $\bm{\mathsf{c}}=(\mathsf{c}_1,\mathsf{c}_2,\mathsf{c}_3)\in\mathbb{\bm{R}}^3$ and $\bm{R}(\bar{\bm{\gamma}})$ the rotation matrix expressed by $\bar{\bm{\gamma}}$. In particular, exploiting the Feynman discrete interpretation of the path integral measure, \cite{BookFeynman} \begin{equation}\label{par2} \begin{split} \bm{\mathsf{g}}(\bm{\mathsf{c}})=\frac{\bm{\mathbb{1}}}{1+\Vert\bm{\mathsf{c}}\Vert^2}-\frac{\bm{\mathsf{c}}\otimes\bm{\mathsf{c}}}{\left(1+\Vert\bm{\mathsf{c}}\Vert^2\right)^2},\quad\qquad\\ \text{d} \bm{q}_j=\sqrt{\det{[\bm{\mathsf{g}}(\bm{\mathsf{c}}_j)]}}\,\text{d} \bm{\mathsf{c}}_j\,\text{d} \bm{\mathsf{t}}_j=\frac{1}{\left(1+\Vert\bm{\mathsf{c}}_j\Vert^2\right)^2}\,\text{d} \bm{\mathsf{c}}_j\,\text{d} \bm{\mathsf{t}}_j. \end{split} \end{equation} The latter results are implemented by choosing three different curves of unit quaternions $\bar{\bm{\gamma}}(s)$ to be the curves defined by the rotation component ${\bm{R}}(\bar{\bm{\gamma}})$ of the minimizers $\bm{q}^f$, $\bm{q}^m$ and $\hat{\bm{{q}}}$ respectively, which characterise the three different parametrisations involved in the computation of $\mathcal{K}_f$, $\mathcal{K}_m$ and $\mathcal{Z}$ in view of the semi-classical approximation. Then, replacing the configuration variable $\bm{q}(s)\in SE(3)$ with the sans-serif fonts $\bm{\mathsf{q}}(s)\in \mathbb{R}^6$, we can formally write the integrand and measure in (Eq.~\ref{pathint}) and (Eq.~\ref{normex}) as $e^{-\beta E(\bm{\mathsf{q}})}\sqrt{\det{[\bm{\mathsf{g}}(\bm{\mathsf{c}})]}}\,\mathcal{D}\bm{\mathsf{q}}$. The treatment of the metric factor relies on the introduction of real-valued ghost fields for exponentiating the measure, as can be found in \cite{GHO}. This means rewriting the factor as a Gaussian path integral in the ghost field $\bm{\mathsf{z}}(s)\in\mathbb{R}^3$ satisfying $\bm{\mathsf{z}}(0)=\bm{0}$ with energy $\frac{1}{2}\int_0^L{\bm{\mathsf{z}}^T\bm{\mathsf{g}}^{-1}(\bm{\mathsf{c}})\bm{\mathsf{z}}\,\text{d}s}$. After that, we consider the path integral expressions in the joint variable $\bm{\mathsf{w}}=(\bm{\mathsf{q}},\bm{\mathsf{z}})$, e.g., \begin{equation}\label{curved} \mathcal{K}_f=\int\limits_{\bm{\mathsf{w}}(0)=(\bm{\mathsf{q}}_0,\bm{0})}^{\bm{\mathsf{q}}(L)=\bm{\mathsf{q}}_L}{e^{-\beta\big[E(\bm{\mathsf{q}}(s))+\frac{1}{2}\int_0^L{\bm{\mathsf{z}}(s)^T\bm{\mathsf{g}}^{-1}(\bm{\mathsf{c}}(s))\bm{\mathsf{z}}(s)\,\text{d}s}\big]}\,\mathcal{D}\bm{\mathsf{w}}}. \end{equation} In the following, even if the theory could be given in principle for a general strain energy density $W$, in order to perform concrete computations we refer to the case of linear elasticity, where $W$ is a quadratic function of the shifted strains, driven by the stiffness matrix $\bm{\mathcal{P}}(s)$: \begin{equation}\label{energylin} E(\bm{\mathsf{q}})=\frac{1}{2}\int_0^L{ \begin{pmatrix} \bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}} \\ {\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}} \end{pmatrix}^T \begin{pmatrix} \bm{\mathcal{K}} & \bm{\mathcal{B}} \\ \bm{\mathcal{B}}^T & \bm{\mathcal{A}} \end{pmatrix} \begin{pmatrix} \bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}} \\ {\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}} \end{pmatrix}}\text{d} s. \end{equation} Moreover, we also refer to the particular looping case of ring-closure or cyclization, evaluating $\rrf$ at $\bm{q}_L=\bm{q}_0$ and the marginal $\rrm$ at $\bm{r}_L=\bm{0}$; the same conditions apply to the minimizers. \section{Looping probabilities in the case of isolated minimizers} Since the elastic energy functional (Eq.~\ref{energylin}) is nonquadratic in $\bm{\mathsf{q}}$, after the parametrisation we approximate $\mathcal{K}_f$, $\mathcal{K}_m$ and $\mathcal{Z}$ by means of a second-order expansion about a minimal energy configuration \cite{2020, PAP1, BookChaichian, BookSchulman, BookWiegel, MOR}, known as the semi-classical method, or, in our real-valued context, Laplace expansion \cite{PIT}. The present work follows the set-up of \citep{2020}. We further remind that such an approximation holds when the energy required to deform the system is large with respect to the temperature of the heat bath, i.e. in the short-length scale, or stiff, regimes. First, notice that there is no contribution to the result coming from the ghost energy when approximating path integrals of the kind of (Eq.~\ref{curved}) to second order in the joint variable $\bm{\mathsf{w}}$. This is a consequence of the structure of the metric tensor (Eq.~\ref{par2}), i.e. $\bm{\mathsf{g}}^{-1}(\bm{\mathsf{c}})=(1+\bm{\mathsf{c}}\cdot\bm{\mathsf{c}})(\bm{\mathbb{1}}+\bm{\mathsf{c}}\otimes\bm{\mathsf{c}})$, and therefore we can consider only the elastic energy (Eq.~\ref{energylin}) in the variable $\bm{\mathsf{q}}$. In fact, the minima $\bm{q}^f$ and $\bm{q}^m$ (here assumed to be isolated) encoded within the associated adapted parametrisations lead to the minimizers $\qqf$ and $\qqm$ (denoted generically by $\qqa$, $\alpha$ standing both for $f$ and $m$) characterised by $\bm{\mathsf{c}}^{\alpha}=\bm{0}$. In partcular, the Neumann natural BC $\bm{m}(L)=\bm{0}$ for $\bm{q}^m$ translates into $\frac{\partial W}{\partial\bm{\mathsf{c}}'}(L)=2[(\bm{\mathbb{1}}+\bm{\mathsf{c}}^{\times})/(1+\Vert\bm{\mathsf{c}}\Vert^2)\bm{\mathsf{m}}](L)=\bm{0}$ for $\qqm$. In the semi-classical approximation for $\mathcal{K}_f$ and $\mathcal{K}_m$ the energy is expanded about the associated $\qqa$ as $E(\bm{\mathsf{q}})\sim E(\qqa)+\frac{1}{2}\delta^2E(\bm{\mathsf{h}};\qqa)$, $\bm{\mathsf{q}}=\qqa+\bm{\mathsf{h}}$, being the first variation zero. The second variation $\delta^2E$ is reported in (Eq.~\ref{sec}), with $\bm{\mathsf{h}}=(\delta\bm{\mathsf{c}},\delta\bm{\mathsf{t}})$ the perturbation field describing fluctuations about the minimizer $\qqa$ and satisfying the linearised version of the parametrised BCs, i.e. $\bm{\mathsf{h}}(0)=\bm{\mathsf{h}}(L)=\bm{0}$ for $(\mathtt{f})$, or $\bm{\mathsf{h}}(0)=\bm{0}$, $\delta\bm{\mathsf{t}}(L)=\bm{0}$, $\delta\frac{\partial W}{\partial\bm{\mathsf{c}}'}(L)=2[\delta\bm{\mathsf{m}}-\bm{\mathsf{m}}^m\times\delta\bm{\mathsf{c}}](L)=\bm{0}$ for $(\mathtt{m})$. Analogously, for $\mathcal{Z}$ the energy is expanded about $\qqh$, being $\frac{\partial W}{\partial\bm{\mathsf{t}}'}(L)=[\hat{\bm{R}}^T\bm{R}\bm{\mathsf{n}}](L)=\bm{0}$ the associated Neumann natural BC arising from $\bm{n}(L)=\bm{0}$ in $\hat{\bm{q}}$ (in addition to the BC for the moment as described for $\qqm$). In this case, the linearised parametrised BCs are given by $\bm{\mathsf{h}}(0)=\bm{0}$, $\bm{\mathsf{\mu}}(L)=\bm{0}$, with $\bm{\mathsf{\mu}}(L)=(\delta\frac{\partial W}{\partial\bm{\mathsf{c}}'},\delta\frac{\partial W}{\partial\bm{\mathsf{t}}'})(L)=(2(\delta\bm{\mathsf{m}}-\hat{\bm{\mathsf{m}}}\times\delta\bm{\mathsf{c}}),\delta\bm{\mathsf{n}}-2\hat{\bm{\mathsf{n}}}\times\delta\bm{\mathsf{c}})(L)$. In the present case of linear elasticity, the second variation (Eq.~\ref{sec}) is characterised by $\bm{\mathsf{P}}$, related to the stiffness matrix $\bm{\mathcal{P}}$, and ${\bm{\mathsf{C}}}$, ${\bm{\mathsf{Q}}}$ which can be computed as follows in terms of strains, forces and moments of the minimizer involved, generically denoted by $\bar{\bm{q}}=({\bm{R}}(\bar{\bm{\gamma}}),\bar{\bm{r}})$. In elastic rod theory, the natural parametrisation for the variation field around $\bar{\bm{q}}$ is directly provided by the Lie algebra $so(3)$ of the rotation group in the director frame, namely $\delta\bm{R}={\bm{R}}(\bar{\bm{\gamma}})\delta\bm{\mathsf{\eta}}^{\times}$, where $\delta\bm{\mathsf{\eta}}^{\times}$ denotes the skew-symmetric matrix or cross product matrix of $\delta\bm{\mathsf{\eta}}\in\mathbb{R}^3$. In order to show the relation between $\delta\bm{\mathsf{\eta}}$ and the variation field $\delta\bm{\mathsf{c}}$, we use the formula $\delta\bm{\mathsf{\eta}}=2\left(\sum\limits_{i=1}^3{\bm{e}_i\otimes\bm{B}_i\bar{\bm{\gamma}}}\right)\delta\bm{\gamma}$ (which is substantially the relation between the Darboux vector and Euler parameters, see e.g. \cite{HAM}) with $\delta\bm{\gamma}=\frac{\partial\bm{\gamma}}{\partial\bm{\mathsf{c}}}\big|_{\bm{\mathsf{c}}=\bm{0}}\delta\bm{\mathsf{c}}=\sum\limits_{j=1}^3\bm{B}_j\bar{\bm{\gamma}}\delta\mathsf{c}_j$ referring to (Eq.~\ref{BMat}), (Eq.~\ref{par}) and we conclude that $\delta\bm{\mathsf{\eta}}(s)=2\,\delta\bm{\mathsf{c}}(s)$. With reference to \cite{NAD}, the second variation of the linear hyper-elastic energy (Eq.~\ref{energylin}) in the director variable $\bm{\mathsf{\omega}}=(\delta\bm{\mathsf{\eta}},\delta\bm{\mathsf{t}})$ is $\delta ^2 E=\int_0^L{[{\bm{\mathsf{\omega}}'}^T\bm{\mathcal{P}}\bm{\mathsf{\omega}}'+2{\bm{\mathsf{\omega}}'}^T{\bm{\mathcal{C}}}\bm{\mathsf{\omega}}+\bm{\mathsf{\omega}}^T{\bm{\mathcal{Q}}}\bm{\mathsf{\omega}}]}\,\text{d}s,$ where $\bm{\mathcal{P}}$ is the stiffness matrix and $\bm{\mathcal{C}}$, $\bm{\mathcal{Q}}$ are respectively given in terms of strains, forces and moments by (Eq.~\ref{Cmat}) and (Eq.~\ref{Qmat}). Finally, introducing the matrix $\bm{\mathcal{D}}=\begin{small}\begin{pmatrix} 2\mathbb{1} & \mathbb{0} \\ \mathbb{0} & \mathbb{1} \end{pmatrix}\end{small}$, we have that the second variation in the variable $\bm{\mathsf{h}}=(\delta\bm{\mathsf{c}},\delta\bm{\mathsf{t}})$ (Eq.~\ref{sec}) is given by $\delta ^2 E=\int_0^L{[{\bm{\mathsf{h}}'}^T\bm{\mathsf{P}}\bm{\mathsf{h}}'+2{\bm{\mathsf{h}}'}^T{\bm{\mathsf{C}}}\bm{\mathsf{h}}+\bm{\mathsf{h}}^T{\bm{\mathsf{Q}}}\bm{\mathsf{h}}]}\,\text{d}s$, with $\bm{\mathsf{P}}=\bm{\mathcal{D}}\bm{\mathcal{P}}\bm{\mathcal{D}}$, $\bm{\mathsf{C}}=\bm{\mathcal{D}}\bm{\mathcal{C}}\bm{\mathcal{D}}$ and $\bm{\mathsf{Q}}=\bm{\mathcal{D}}\bm{\mathcal{Q}}\bm{\mathcal{D}}$. The Jacobi equations in first order Hamiltonian form associated to the latter second variation functional are given in (Eq.~\ref{JacHam}) and are driven by the symmetric matrix $\bm{\mathsf{E}}(s)\in\mathbb{R}^{12\times 12}$ detailed in (Eq.~\ref{E1}). The Jacobi fields $\bm{\mathsf{H}}(s)\in\mathbb{R}^{6\times 6}$, together with the conjugate variable under the Legendre transform $\bm{\mathsf{M}}(s)\in\mathbb{R}^{6\times 6}$ represent the solutions of the Jacobi equations once prescribed appropriate initial conditions. The columns $\bm{\mathsf{h}}$ of $\bm{\mathsf{H}}$ and the ones $\bm{\mathsf{\mu}}$ of $\bm{\mathsf{M}}$ are related by $\bm{\mathsf{\mu}}=\bm{\mathsf{P}}\bm{\mathsf{h}}'+\bm{\mathsf{C}}\bm{\mathsf{h}}$. Notice that until now the formulation adopted is for the general $(\mathtt{C})$ rod with extension, shear and hence an invertible stiffness matrix $\bm{\mathcal{P}}$. The constrained inextensible and unshereable case $(\mathtt{K})$ requires the stiffness components $\bm{\mathcal{B}}$ and $\bm{\mathcal{A}}$ to diverge (as discussed in \cite{HAM, LUD, LUDT}), specifically as $\bm{\mathcal{B}}/{\epsilon}$ and $\bm{\mathcal{A}}/{\epsilon^2}$, for $\epsilon\rightarrow 0$. Switching to the Hamiltonian formulation, given a $(\mathtt{C})$ rod the compliance matrix $\bm{\mathcal{R}}$ (which is the inverse of $\bm{\mathcal{P}}$) has a smooth limit for $\epsilon\rightarrow 0$. Namely, for a $(\mathtt{K})$ rod we recover $\bm{\mathcal{R}}(s)=\begin{small}\begin{pmatrix} \bm{\mathcal{R}}_{1,1} & \bm{\mathcal{R}}_{1,2}=\bm{\mathbb{0}}\\ \bm{\mathcal{R}}_{2,1}=\bm{\mathbb{0}} & \bm{\mathcal{R}}_{2,2}=\bm{\mathbb{0}} \end{pmatrix}\end{small}$, with $\bm{\mathcal{R}}_{1,1}=(\bm{\mathcal{K}}-\bm{\mathcal{B}}\bm{\mathcal{A}}^{-1}\bm{\mathcal{B}}^T)^{-1}$. In conclusion, once prescribed a symmetric and positive definite matrix $\bm{\mathcal{K}}^{(\mathtt{K})}=\bm{\mathcal{R}}_{1,1}^{-1}$, there exists a sequence of positive definite and symmetric compliance matrices for the $(\mathtt{C})$ case converging smoothly to the $(\mathtt{K})$ case, implying that the expressions (Eq.~\ref{E2}) and (Eq.~\ref{E3}) for the blocks of the matrix $\bm{\mathsf{E}}(s)$ (Eq.~\ref{E1}) hold for both $(\mathtt{C})$ and $(\mathtt{K})$ rods. We emphasise that for the $(\mathtt{K})$ case $\delta\frac{\partial W}{\partial\bm{\mathsf{t}}'}$ is a basic unknown of the Jacobi equations and cannot be found using the relation $\bm{\mathsf{\mu}}=\bm{\mathsf{P}}\bm{\mathsf{h}}'+\bm{\mathsf{C}}\bm{\mathsf{h}}$, since the latter is not defined. The resulting path integrals arising from the semi-classical method are of the form, e.g. \begin{equation}\label{Gauss} \mathcal{K}_f\approx e^{-\beta E(\qqf)}\int\limits_{\bm{\mathsf{h}}(0)=\bm{0}}^{\bm{\mathsf{h}}(L)=\bm{0}}{e^{-\frac{\beta}{2}\delta^2 E(\bm{\mathsf{h}};\qqf)}\,\mathcal{D}\bm{\mathsf{h}}}, \end{equation} and similarly for $\mathcal{K}_m$ and $\mathcal{Z}$ but considering the different minimizers and linearised BCs. Then, applying the results derived in \cite{2020} for Gaussian path integrals, which are in turn extensions of the work of Papadopoulos \cite{PAP1}, the approximate form of the conditional probability density reads as \begin{equation}\label{fin} \rra\approx \left(\frac{\beta}{2\pi}\right)^{x(\alpha)} \frac{e^{-\beta E\left(\qqa\right)}}{\sqrt{\det{[\hha(0)]}}}, \end{equation} with $x(f)=3$, $x(m)=3/2$, and we are interested in the cyclization values $\rrf(\bm{q}_0,L|\bm{q}_0,0)$, $\rrm(\bm{0},L|\bm{q}_0,0)$. We denote by $\hha(s)$ the Jacobi fields computed at $\qqa$, solutions of the associated Jacobi equations (Eq.~\ref{JacHam}) with $\bm{\mathsf{E}}(s)$ reported in (Eq.~\ref{E2}), (Eq.~\ref{E3}) and initial conditions given at $s=L$ as \begin{equation}\label{inFM} \begin{split} \hhf(L)=\mathbb{0},\,\,\mmf(L)=-\mathbb{1};\quad\qquad\qquad\\ \hhm(L)= \begin{pmatrix} \mathbb{1}_{3\times 3} & \mathbb{0}_{3\times 3}\\ \mathbb{0}_{3\times 3} & \mathbb{0}_{3\times 3} \end{pmatrix},\,\,\mmm(L)=\begin{pmatrix} \mathbb{0}_{3\times 3} & \mathbb{0}_{3\times 3}\\ \mathbb{0}_{3\times 3} & -\mathbb{1}_{3\times 3} \end{pmatrix}. \end{split} \end{equation} In principle, denoting by $\hhh(s)$ $\in\mathbb{R}^{6\times 6}$ the Jacobi fields computed at $\hat{\bm{\mathsf{q}}}$ subjected to the initial conditions $\hhh(L)=\mathbb{1}$, $\mmh(L)=\mathbb{0}$ \cite{2020}, the numerator and denominator in (Eq.~\ref{fin}) should be respectively $e^{-\beta\left(E\left(\qqa\right)-E\left(\qqh\right)\right)}$ and $\sqrt{\det{[\hha\hhh^{-1}(0)]}}$, in order to include the contribution coming from the evaluation of the partition function $\mathcal{Z}$. However, the result simplifies since $E(\hat{\bm{\mathsf{q}}})=0$, being $\hat{\bm{\mathsf{q}}}$ the intrinsic configuration of the rod. At the same time $\bm{\mathsf{E}}_{1,1}$ is the zero matrix for this case, which implies $\mmh(s)=\bm{\mathbb{0}}\,\,\forall s$ (according to the initial conditions $\mmh(L)=\bm{\mathbb{0}}$) and consequently $\hhh(s)$ must satisfy a linear system whose matrix has zero trace. Thus, by application of the generalized Abel's identity or Liouville's formula, $\forall s$ we have that $\det[{{\hhh}}(s)]=\det[{{\hhh}}(L)]=\det[\bm{\mathbb{1}}]=1$. Furthermore, it is worth to mention that here the partition function computation is not affected by approximations, even if it apparently undergoes the semi-classical expansion. In fact, there exists a change of variables presented in \cite{LUD,LUDT} which allows an equivalent exact computation exploiting the specific BCs involved in $\mathcal{Z}$. In general, the latter change of variables is not applicable and the present method must be used, e.g. for non-linear elasticity or in the case of a linearly elastic polymer subject to external end-loadings, for which the shape of the energy leads to a non-trivial contribution of the partition function that must be approximated. \section{Looping probabilities in the case of non-isolated minimizers} In this section we consider non-isolated minimizers arising as a consequence of continuous symmetries of the problem. In particular, we provide a theory for one symmetry parameter, namely $\theta\in[0,2\pi)$ (as we want to deal with isotropic rods), but the same scheme can be suitably generalised to more symmetry parameters. The presence of a family of minimizers denoted by $\qqa(s;\theta)$ translates into a zero mode $\bm{\mathsf{\psi}}^{\alpha}(s;\theta)=\frac{\partial}{\partial\theta}\qqa(s;\theta)$ \cite{MOR} of the self-adjoint operator $\bm{\mathsf{S}}=-\bm{\mathsf{P}}\frac{d^2}{d s^2}+(\bm{\mathsf{C}}^T-\bm{\mathsf{C}}-\bm{\mathsf{P}}')\frac{d}{d s}+\bm{\mathsf{Q}}-\bm{\mathsf{C}}'$ associated to the second variation (Eq.~\ref{sec}), namely $\delta ^2 E=(\bm{\mathsf{h}},\bm{\mathsf{S}}\bm{\mathsf{h}})$, where $(\cdot,\cdot)$ is the scalar product in the space of square-integrable functions $L^2([0,L];\mathbb{R}^6)$. Consequently, we cannot proceed as before, for otherwise expression (Eq.~\ref{fin}) will diverge for the existence of a conjugate point at $s=0$. Thus, in evaluating expression (Eq.~\ref{pathint}) for $\mathcal{K}_f$ and $\mathcal{K}_m$, we adapt the parametrization to the minimizer corresponding to $\theta=0$, our choice of the gauge in applying the collective coordinates method, which amounts to a Faddeev-Popov-type procedure \cite{FADPOP}, widely used in the context of quantum mechanics for solitons or instantons \cite{COL1, BER, JAR, POLYA}, of inserting the Dirac delta transformation identity \begin{equation}\label{Fad-Pop} 1=\left\lvert\frac{\partial}{\partial\theta}F\right\rvert_{\theta=0}\int_0^{2\pi}{\delta(F(\theta))}\,\text{d}\theta,\,\,\,F(\theta)=\left(\bm{\mathsf{q}}-\qqa,\frac{\bm{\mathsf{\psi}}^{\alpha}}{\Vert\bm{\mathsf{\psi}}^{\alpha}\Vert}\right) \end{equation} within the path integral, in order to integrate over variations which are orthogonal to the zero mode. Once performed the semi-classical expansion as before about $\qqa$, exchanged the order of integration $\mathcal{D}\bm{\mathsf{h}}\leftrightarrow\text{d}\theta$ to get a contribution of $2\pi$, and having approximated to leading order both the metric tensor and the factor $\vert\partial/\partial\theta F\vert_{\theta=0}\approx \Vert\bm{\mathsf{\psi}}^{\alpha}(s;0)\Vert$, we are left with the computation of a ratio of Gaussian path integrals \begin{equation}\label{Isopathint} \frac{1}{\mathcal{Z}_g}\int{e^{-\pi(\bm{\mathsf{h}},\frac{\beta}{2\pi}\bm{\mathsf{S}}\bm{\mathsf{h}})}\delta\left[\left(\bm{\mathsf{h}},\frac{\bm{\mathsf{\psi}}^{\alpha}}{\Vert\bm{\mathsf{\psi}}^{\alpha}\Vert}\right)\right]\,\mathcal{D}\bm{\mathsf{h}}}, \end{equation} for the linearised parametrised BCs associated to (Eq.~\ref{f}) and (Eq.~\ref{m}) respectively. For notation simplicity, throughout this section $\bm{\mathsf{S}}$ stands for $\frac{\beta}{2\pi}\bm{\mathsf{S}}$ and $\hat{\bm{\mathsf{S}}}$ for $\frac{\beta}{2\pi}\hat{\bm{\mathsf{S}}}$, the latter operator driving the Gaussian path integral $\mathcal{Z}_g$ arising from the partition function $\mathcal{Z}$, in which the minimizer $\qqh$ is isolated. Notice that, since the argument of the delta distribution must vanish for $\theta=0$ according to (Eq.~\ref{Fad-Pop}), then the integration for the numerator is performed on the minimizer $\qqa(s;0)$ with associated zero mode $\bm{\mathsf{\psi}}^{\alpha}(s;0)$; in the following they will both be denoted simply by $\qqa$ and $\bm{\mathsf{\psi}}^{\alpha}$. Interpreting (Eq.~\ref{Isopathint}) as $\sqrt{\text{Det}(\hat{\bm{\mathsf{S}}})/{\text{Det}^{\star}({\bm{\mathsf{S}}})}}$, i.e., the square root of the ratio of the functional determinants for the operators $\hat{\bm{\mathsf{S}}}$ and ${\bm{\mathsf{S}}}$, the latter with removed zero eigenvalue (thus the $^{\star}$ sign) \cite{MCK, FAL}, we consider the following general strategy for its evaluation. Given the second variation operator ${\bm{\mathsf{S}}}$ acting on $\bm{\mathsf{h}}(s)\in\mathbb{R}^6$, with $s\in[0,L]$ and BCs determined by the square matrices $\bm{\mathsf{T}}_0$ and $\bm{\mathsf{T}}_L$ as $\bm{\mathsf{T}}_0\begin{small}\begin{pmatrix} \bm{\mathsf{h}}(0) \\ \bm{\mathsf{\mu}}(0) \end{pmatrix}\end{small}+\bm{\mathsf{T}}_L\begin{small}\begin{pmatrix} \bm{\mathsf{h}}(L) \\ \bm{\mathsf{\mu}}(L) \end{pmatrix}\end{small}=\bm{0}$, we state Forman's theorem \cite{FORM} in Hamiltonian form as \begin{equation}\label{For} \frac{\text{Det}({\bm{\mathsf{S}}})}{\text{Det}(\hat{\bm{\mathsf{S}}})}=\frac{\det{[\bm{\mathsf{T}}_0\bm{\mathsf{W}}(0)+\bm{\mathsf{T}}_L\bm{\mathsf{W}}(L)]}}{\det[{\bm{\mathsf{W}}(L)}]}, \end{equation} for $\bm{\mathsf{W}}(s)\in\mathbb{R}^{12\times 12}$ whose columns $ (\bm{\mathsf{h}},\bm{\mathsf{\mu}})^T$ solve the homogeneous problem ${\bm{\mathsf{S}}}\bm{\mathsf{h}}=\bm{0}$ (i.e., the Jacobi equations (Eq.~\ref{JacHam}) with the extra $\frac{\beta}{2\pi}$ factor, completed as $\bm{\mathsf{W}}'=\bm{J}\bm{\mathsf{E}}\bm{\mathsf{W}}$), and the trivial partition function contribution has already been evaluated. It is important to notice the freedom of choosing $\bm{\mathsf{W}}(0)$, $\bm{\mathsf{W}}(L)$ consistently; the latter statements are justified by the following considerations. Given two matrix differential operators $\bm{\mathsf{\Omega}}=\bm{\mathsf{G}}_0(s)\frac{\text{d}^2}{\text{d} s^2}+\bm{\mathsf{G}}_1(s)\frac{\text{d}}{\text{d} s}+\bm{\mathsf{G}}_2(s)$ and $\hat{\bm{\mathsf{\Omega}}}=\bm{\mathsf{G}}_0(s)\frac{\text{d}^2}{\text{d} s^2}+\hat{\bm{\mathsf{G}}}_1(s)\frac{\text{d}}{\text{d} s}+\hat{\bm{\mathsf{G}}}_2(s)$ with nonzero eigenvalues (with respect to the BCs), acting on $\bm{\mathsf{h}}(s)\in\mathbb{R}^d$, where $\bm{\mathsf{G}}_0$, $\bm{\mathsf{G}}_1$, $\hat{\bm{\mathsf{G}}}_1$, $\bm{\mathsf{G}}_2$, $\hat{\bm{\mathsf{G}}_2}\in\mathbb{R}^{d\times d}$, $\bm{\mathsf{G}}_0$ is invertible and $s\in[a,b]$, the results of Forman \cite{FORM} provide a simple way of computing the ratio of functional determinants $\text{Det}(\bm{\mathsf{\Omega}})/\text{Det}(\hat{\bm{\mathsf{\Omega}}})$, once prescribed the BCs $\bm{\mathsf{I}}_a\begin{small}\begin{pmatrix} \bm{\mathsf{h}}(a) \\ \bm{\mathsf{h}}'(a) \end{pmatrix}\end{small}+\bm{\mathsf{I}}_b\begin{small}\begin{pmatrix} \bm{\mathsf{h}}(b) \\ \bm{\mathsf{h}}'(b) \end{pmatrix}\end{small}=\bm{0}$ for $\bm{\mathsf{\Omega}}$ and $\hat{\bm{\mathsf{I}}}_a\begin{small}\begin{pmatrix} \bm{\mathsf{h}}(a) \\ \bm{\mathsf{h}}'(a) \end{pmatrix}\end{small}+\hat{\bm{\mathsf{I}}}_b\begin{small}\begin{pmatrix} \bm{\mathsf{h}}(b) \\ \bm{\mathsf{h}}'(b) \end{pmatrix}\end{small}=\bm{0}$ for $\hat{\bm{\mathsf{\Omega}}}$, being $\bm{\mathsf{I}}_a$, $\bm{\mathsf{I}}_b$, $\hat{\bm{\mathsf{I}}}_a$, $\hat{\bm{\mathsf{I}}}_b\in\mathbb{R}^{2d\times 2d}$. Namely \begin{equation}\label{For1} \frac{\text{Det}(\bm{\mathsf{\Omega}})}{\text{Det}(\hat{\bm{\mathsf{\Omega}}})}=\frac{\det{[\bm{\mathsf{I}}_a+\bm{\mathsf{I}}_b\bm{\mathsf{F}}(b)]}}{\sqrt{\det[{\bm{\mathsf{F}}(b)}]}}\frac{\sqrt{\det[{\hat{\bm{\mathsf{F}}}(b)}]}}{\det{[\hat{\bm{\mathsf{I}}}_a+\hat{\bm{\mathsf{I}}}_b\hat{\bm{\mathsf{F}}}(b)]}}, \end{equation} with $\bm{\mathsf{F}}(s)$ ($\hat{\bm{\mathsf{F}}}(s)$) in $\mathbb{R}^{2d\times 2d}$ the fundamental solution of the linear differential system $\bm{\mathsf{F}}'=\bm{\mathsf{\Gamma}}\bm{\mathsf{F}}$, $\bm{\mathsf{F}}(a)=\bm{\mathbb{1}}$ ($\hat{\bm{\mathsf{F}}}'=\hat{\bm{\mathsf{\Gamma}}}\hat{\bm{\mathsf{F}}}$, $\hat{\bm{\mathsf{F}}}(a)=\bm{\mathbb{1}}$) associated to the homogeneous problem $\bm{\mathsf{\Omega}}\bm{\mathsf{h}}=\bm{0}$ ($\hat{\bm{\mathsf{\Omega}}}\bm{\mathsf{h}}=\bm{0}$) and $\bm{\mathsf{\Gamma}}$ ($\hat{\bm{\mathsf{\Gamma}}}$) the matrix of first order reduction interpreting $\bm{\mathsf{h}}'$ as an independent variable \cite{MCK, FAL}. In particular, we specialize to general second variation operators for $s\in[0,L]$, $d=6$, and we make the choice $\bm{\mathsf{\Omega}}={\bm{\mathsf{S}}}=-{\bm{\mathsf{P}}}(s)\frac{\text{d}^2}{\text{d} s^2}+({\bm{\mathsf{C}}}^T(s)-{\bm{\mathsf{C}}}(s)-{\bm{\mathsf{P}}}'(s))\frac{\text{d}}{\text{d} s}+{\bm{\mathsf{Q}}}(s)-{\bm{\mathsf{C}}}'(s)$ computed in either $\bm{\mathsf{q}}^f$ or $\bm{\mathsf{q}}^m$ and $\hat{\bm{\mathsf{\Omega}}}={\hat{\bm{\mathsf{S}}}}$ computed in $\hat{\bm{\mathsf{q}}}$. Notice that, for notation convenience, throughout this section $\bm{\mathsf{P}}$, $\bm{\mathsf{C}}$ and $\bm{\mathsf{Q}}$ stand for $\frac{\beta}{2\pi}\bm{\mathsf{P}}$, $\frac{\beta}{2\pi}\bm{\mathsf{C}}$ and $\frac{\beta}{2\pi}\bm{\mathsf{Q}}$. Moreover, defining $\bm{\mathsf{Y}}(s)=\bm{\mathsf{F}}(s)\bm{\mathsf{Y}}(0)$ for a given non-singular matrix $\bm{\mathsf{Y}}(0)$, changing variables in Hamiltonian form by means of $\bm{\mathsf{Y}}=\bm{\mathsf{O}}\bm{\mathsf{W}}$, $\bm{\mathsf{O}}(s)=\begin{small}\begin{pmatrix} \bm{\mathbb{1}} & \bm{\mathbb{0}} \\ -{\bm{\mathsf{P}}}^{-1}{\bm{\mathsf{C}}} & {\bm{\mathsf{P}}}^{-1} \end{pmatrix}\end{small}$ being $\bm{\mathsf{W}}$ partitioned in $6$ by $6$ blocks as $\bm{\mathsf{W}}(s)=\begin{small}\begin{pmatrix} \bm{\mathsf{H}} & \bm{\mathsf{H}}^* \\ \bm{\mathsf{M}} & \bm{\mathsf{M}}^* \end{pmatrix}\end{small}$, and doing the same in terms of $\hat{\bm{\mathsf{F}}}$, it is easily shown that Forman's theorem (Eq.~\ref{For1}) for $\bm{\mathsf{S}}$, $\hat{\bm{\mathsf{S}}}$ becomes (Eq.~\ref{For}) multiplied by ${\det[{\hat{\bm{\mathsf{W}}}(L)}]}/{\det{[\hat{\bm{\mathsf{T}}}_0\hat{\bm{\mathsf{W}}}(0)+\hat{\bm{\mathsf{T}}}_L\hat{\bm{\mathsf{W}}}(L)]}}$, with the Hamiltonian verson of the BCs bein equal to $\bm{\mathsf{T}}_0=\bm{\mathsf{I}}_0\bm{\mathsf{O}}(0)$, $\bm{\mathsf{T}}_L=\bm{\mathsf{I}}_L\bm{\mathsf{O}}(L)$ and $\bm{\mathsf{W}}'=\bm{J}\bm{\mathsf{E}}\bm{\mathsf{W}}$ (the same is done for the ``hat'' term). Since the trace of $\bm{J}\bm{\mathsf{E}}$ is always zero, the so-called generalized Abel’s identity or Liouville’s formula implies that $\det[{\bm{\mathsf{W}}}]$ ($\det[{\hat{\bm{\mathsf{W}}}}]$) is constant. We further observe that for ${\hat{\bm{\mathsf{S}}}}$ the BCs on the paths (being the ones entering the path integral for the partition function) must be given by the matrices $\hat{\bm{\mathsf{T}}}_0=\begin{small}\begin{pmatrix} \bm{\mathbb{1}} & \bm{\mathbb{0}} \\ \bm{\mathbb{0}} & \bm{\mathbb{0}} \end{pmatrix}\end{small}$, $\hat{\bm{\mathsf{T}}}_L=\begin{small}\begin{pmatrix} \bm{\mathbb{0}} & \bm{\mathbb{0}} \\ \bm{\mathbb{0}} & \bm{\mathbb{1}} \end{pmatrix}\end{small}$, and choosing ${\hat{\bm{\mathsf{H}}}}(L)=\bm{\mathbb{1}}$, ${\hat{\bm{\mathsf{M}}}}(L)= \bm{\mathbb{0}}$ within $\hat{\bm{\mathsf{W}}}(L)$, the ``hat'' contribution reduces to $\text{det}[\hat{\bm{\mathsf{H}}}(0)]$, which is equal to $1$ by direct inspection (see previous section). The idea is now to compute expression (Eq.~\ref{For}) for the operator ${\bm{\mathsf{S}}}$ subject to carefully chosen perturbed BCs $\bm{\mathsf{T}}^{(\varepsilon)}_0$, in order to avoid the zero mode. This gives rise to a quasi-zero eigenvalue that can be found analytically using our extension to general second variation operators (including cross-terms) of the trick introduced in \cite{MCK}. Finally, by taking the limit for $\varepsilon\rightarrow 0$ in the ratio of the regularized expression (Eq.~\ref{For}) to the regularized quasi-zero eigenvalue, we recover the desired quantity ${\text{Det}^{\star}({\bm{\mathsf{S}}})}/{\text{Det}(\hat{\bm{\mathsf{S}}})}$. We anticipate here the results for the approximation formulas of the probability densities in the case of non-isolated minimizers, valid also for $(\mathtt{K})$ rods as detailed in the previous section (notice that the factor $\Vert\bm{\mathsf{\psi}}^{\alpha}\Vert$ simplifies out within the regularization procedure) \begin{equation}\label{finiso} \rra\approx2\pi\,e^{-\beta E(\qqa)}\sqrt{\frac{[\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^{\alpha}}(0)]_i}{]{\hha(0)}[_{i,i}}}, \end{equation} and we are interested in the cyclization values $\rrf(\bm{q}_0,L|\bm{q}_0,0)$, $\rrm(\bm{0},L|\bm{q}_0,0)$. In particular, $\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^{\alpha}}\in\mathbb{R}^6$ and $\hha\in\mathbb{R}^{6\times 6}$ are respectively the conjugate momentum of the zero mode and the Jacobi fields associated to ${\bm{\mathsf{S}}}^{\alpha}$, both computed by means of (Eq.~\ref{JacHam}) but reminding the contribution of $\frac{\beta}{2\pi}$. Moreover, here we denote with $[\cdot]_i$ the $i$-th component of a vector, with $]\cdot[_{i,i}$ the principal minor of a square matrix removing the $i$-th row and the $i$-th column, and the index $i$ depends on the choice of the boundary regularization, based on the non-zero components of $\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^{\alpha}}$. The appropriate ICs for $\hha$ are given at $s=L$ as: \begin{equation}\label{inFMiso} \begin{split} \hhf(L)=\bm{\mathbb{0}},\,\,\mmf(L)=\bm{\mathsf{\chi}};\qquad\qquad\quad\\ \hhm(L)=\begin{pmatrix} \bm{\mathsf{X}}_{1,1} & \bm{\mathsf{X}}_{1,2} \\ \bm{\mathbb{0}} & \bm{\mathbb{0}} \end{pmatrix},\,\,\mmm(L)=\begin{pmatrix} \bm{\mathbb{0}} & \bm{\mathbb{0}} \\ \bm{\mathsf{X}}_{2,1} & \bm{\mathsf{X}}_{2,2} \end{pmatrix}, \end{split} \end{equation} where $\bm{\mathsf{\chi}}$ is an arbitrary matrix with unit determinant such that the $i$-th column corresponds to $\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^f}(L)$ and $\bm{\mathsf{X}}=\begin{small}\begin{pmatrix} \bm{\mathsf{X}}_{1,1} & \bm{\mathsf{X}}_{1,2} \\ \bm{\mathsf{X}}_{2,1} & \bm{\mathsf{X}}_{2,2} \end{pmatrix}\end{small}\in\mathbb{R}^{6\times 6}$, partitioned in $3$ by $3$ blocks, is an arbitrary matrix with determinant equal to $-1$ such that the $i$-th column corresponds to $([{\bm{\mathsf{\psi}}}^m]_{1:3},[\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^m}]_{4:6})^T(L)$. We are now ready to explain how to regularize the functional determinants for ${\bm{\mathsf{S}}}^f$ and ${\bm{\mathsf{S}}}^m$ respectively, in order to get rid of the zero eigenvalue. Starting from the pure Dirichlet case, the BCs are given as ${\bm{\mathsf{T}}}_0^{(\varepsilon)}=\begin{small}\begin{pmatrix} \bm{\mathbb{1}} & \bm{\mathcal{E}} \\ \bm{\mathbb{0}} & \bm{\mathbb{0}} \end{pmatrix}\end{small}$, ${\bm{\mathsf{T}}}_L=\begin{small}\begin{pmatrix} \bm{\mathbb{0}} & \bm{\mathbb{0}} \\ \bm{\mathbb{1}} & \bm{\mathbb{0}} \end{pmatrix}\end{small}$, with $\bm{\mathcal{E}}$ the zero matrix with a non-zero diagonal entry $\varepsilon$ in position $i,i$ serving as a perturbation to avoid the zero mode. Then, choosing ${\bm{\mathsf{H}}}^f(L)$, ${\bm{\mathsf{M}}}^f(L)$ as given in (Eq.~\ref{inFMiso}), and applying the formulas for the determinant of a block matrix, from (Eq.~\ref{For}) we get ${\text{Det}^{(\varepsilon)}({\bm{\mathsf{S}}^f})}/{\text{Det}(\hat{\bm{\mathsf{S}}})}={\det{[\bm{\mathsf{H}}^f(0)+\bm{\mathcal{E}}\bm{\mathsf{M}}^f(0)]}}/{\det[{\bm{\mathsf{M}}^f(L)}]}=\varepsilon [\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^f}(0)]_i\,]{{\bm{\mathsf{H}}}^f(0)}[_{i,i}$. By construction the zero mode represents the $i$-th column of $\bm{\mathsf{H}}^f(s)$ and satisfies the linearised BC ${{\bm{\mathsf{\psi}}}^f}(0)=\bm{0}$, hence the last equality. On the other hand, for the marginalized case, the BCs are given by ${\bm{\mathsf{T}}}_0^{(\varepsilon)}$ as before and ${\bm{\mathsf{T}}}_L=\begin{small}\begin{pmatrix} \bm{\mathbb{0}} & \bm{\mathbb{0}} \\ \bm{\mathbb{1}}^{\bm{\mathbb{0}}} & \bm{\mathbb{1}}_{\bm{\mathbb{0}}} \end{pmatrix}\end{small}$, being $ \bm{\mathbb{1}}^{\bm{\mathbb{0}}}=\begin{small}\begin{pmatrix} \bm{\mathbb{0}} & \bm{\mathbb{0}} \\ \bm{\mathbb{0}} & \bm{\mathbb{1}} \end{pmatrix}\end{small}$, $\bm{\mathbb{1}}_{\bm{\mathbb{0}}}=\begin{small}\begin{pmatrix} \bm{\mathbb{1}} & \bm{\mathbb{0}} \\ {\bm{\mathbb{0}}} & {\bm{\mathbb{0}}} \end{pmatrix}\end{small}$ partitioned in $3$ by $3$ blocks. Then, choosing ${\bm{\mathsf{H}}}^m(L)$, ${\bm{\mathsf{M}}}^m(L)$ as given in (Eq.~\ref{inFMiso}), and applying the formulas for the determinant of a block matrix, from (Eq.~\ref{For}) we get ${\text{Det}^{(\varepsilon)}({\bm{\mathsf{S}}^m})}/{\text{Det}(\hat{\bm{\mathsf{S}}})}=-{\det{[\bm{\mathsf{H}}^m(0)+\bm{\mathcal{E}}\bm{\mathsf{M}}^m(0)]}}/{\det[{\bm{\mathsf{X}}}]}=\varepsilon [\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^m}(0)]_i\,]{{\bm{\mathsf{H}}}^m(0)}[_{i,i}$. By construction the zero mode represents the $i$-th column of $\bm{\mathsf{H}}^m(s)$ and satisfies the linearised BC ${{\bm{\mathsf{\psi}}}^m}(0)=\bm{0}$, hence the last equality. In addition, when computing $\text{det}[\bm{\mathsf{W}}^m(L)]$, we have used the determinant identity (Eq.~\ref{Id}) for $n=3$. The last step consists of finding the non-zero eigenvalue $\lambda^{\alpha}_{(\varepsilon)}$ associated to the eigenfunction $\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)}$ (arising from the zero mode $\bm{\mathsf{\psi}}^{\alpha}$) of the operator $\bm{\mathsf{S}}^{\alpha}$ with perturbed BCs. Since $(\bm{\mathsf{\psi}}^{\alpha},\bm{\mathsf{S}}^{\alpha}\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)})=\lambda^{\alpha}_{(\varepsilon)}(\bm{\mathsf{\psi}}^{\alpha},\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)})$, the left hand side can be rewritten as $(\bm{\mathsf{\psi}}^{\alpha},\bm{\mathsf{S}}^{\alpha}\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)})=(\bm{\mathsf{\psi}}^{\alpha},\bm{\mathsf{S}}^{\alpha}\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)})-(\bm{\mathsf{S}}^{\alpha}\bm{\mathsf{\psi}}^{\alpha},\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)})=[\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}}\cdot\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)}]_0^L-[\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)}}\cdot\bm{\mathsf{\psi}}^{\alpha}]_0^L=-(\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}}\cdot\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)})(0)=\varepsilon [\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}}(0)]_i [\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)}}(0)]_i$, where the second equality comes after integration by parts and the third and fourth ones are a consequence of the BCs. Finally, being $\lambda^{\alpha}_{(\varepsilon)}=\varepsilon [\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}}(0)]_i [\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)}}(0)]_i/(\bm{\mathsf{\psi}}^{\alpha},\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)})$, then we have that $\text{Det}^{\star}(\bm{\mathsf{S}}^{\alpha})/\text{Det}({\hat{\bm{\mathsf{S}}}})=\lim_{\varepsilon\rightarrow 0}(\lambda^{\alpha}_{(\varepsilon)})^{-1}\text{Det}^{(\varepsilon)}(\bm{\mathsf{S}}^{\alpha})/\text{Det}({\hat{\bm{\mathsf{S}}}})=\Vert\bm{\mathsf{\psi}}^{\alpha}\Vert^2\,]{{{\bm{\mathsf{H}}^{\alpha}}}(0)}[_{i,i}/[\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}}(0)]_i$. We conclude with a technical remark. Namely we observe that a priori the solution formulas for isolated minimizers could be recovered applying Forman's theorem in the framework of functional determinants (as done here for the non-isolated case); however, we exploit the insightful connection with the more standard theory of path integrals via ``time slicing" and explore both possibilities to gain a deeper understanding of the topic. \section{A Monte Carlo algorithm for stochastic elastic rods} In this section we refer to the approach of \cite{MCD, ALEX2, MCDNA} for DNA MC simulations of J-factors, using the “half-molecule” technique \cite{ALEX1} for enhancing the efficiency. Namely we give a Monte Carlo sampling algorithm for fluctuating linearly elastic rods according to the Boltzmann distribution having partition function (Eq.~\ref{normex}), i.e. $\mathcal{Z}=\int_{\bm{q}(0)=\bm{q}_0}{e^{-\beta E(\bm{q})}\,\mathcal{D}\bm{q}}$ with energy (Eq.~\ref{energylin}), and we use the compact notation $\bm{\mathsf{u}}_{\Delta}=\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}}$, $\bm{\mathsf{v}}_{\Delta}=\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}$ for the shifted strains. First of all, we need to rewrite the infinite-dimensional problem as a finite-dimensional one by means of a ``parameter slicing method". This is achieved, after parametrizing the configuration variable as $\bm{\mathsf{q}}(s)=(\bm{\mathsf{c}}(s),\bm{\mathsf{t}}(s))\in\mathbb{R}^6$, setting $\epsilon=\frac{L}{n}$ with $n$ a large positive integer and $s_j=j\epsilon$ for $j=0,...,n$. Moreover, by exploiting the change of variables $(\bm{\mathsf{c}}_j,\bm{\mathsf{t}}_j)\rightarrow(\bm{\mathsf{u}}_j,\bm{\mathsf{v}}_j)$ as presented in \cite{LUDT}, we get the following equality up to a constant factor for the discrete version of the partition function $\mathcal{Z}$ \begin{equation}\label{partfin} \begin{split} \int{e^{-\beta\epsilon\sum\limits_{j=0}^{n}{W(\bm{\mathsf{c}},\bm{\mathsf{t}})_j}}}\prod\limits_{j=1}^n\left(1+\Vert\bm{\mathsf{c}}_j\Vert^2\right)^{-2}\text{d}\bm{\mathsf{c}}_j\text{d}\bm{\mathsf{t}}_j\\ \sim\int{e^{-{\beta\epsilon}\sum\limits_{j=0}^{n-1}{W({\bm{\mathsf{u}}_{\Delta}},{\bm{\mathsf{v}}_{\Delta}})_j}}}\prod\limits_{j=0}^{n-1}\mathcal{J}(\bm{\mathsf{u}}_j)\text{d}\bm{\mathsf{u}}_j\text{d}\bm{\mathsf{v}}_j, \end{split} \end{equation} with $W_j=\frac{1}{2}\left[{\bm{\mathsf{u}}_{\Delta}}_j^T \bm{\mathcal{K}}_j{\bm{\mathsf{u}}_{\Delta}}_j+2{\bm{\mathsf{u}}_{\Delta}}_j^T \bm{\mathcal{B}}_j{\bm{\mathsf{v}}_{\Delta}}_j+{\bm{\mathsf{v}}_{\Delta}}_j^T \bm{\mathcal{A}}_j{\bm{\mathsf{v}}_{\Delta}}_j\right]$, $\mathcal{J}(\bm{\mathsf{u}}_j)=\left(1- {\epsilon^2}\Vert\bm{\mathsf{u}}_j\Vert^2/{4}\right)^{-\frac{1}{2}}$ and the subscript $j$ indicates that the associated term is evaluated in $s_j$. We observe that the Jacobian factor $\mathcal{J}$ can be neglected, as discussed in \cite{PL}, leading to the Gaussian distribution $\rho_{\mathcal{Z}}=e^{-{\beta\epsilon}\sum\limits_{j=0}^{n-1}{W({\bm{\mathsf{u}}_{\Delta}},{\bm{\mathsf{v}}_{\Delta}})_j}}/\int e^{-{\beta\epsilon}\sum\limits_{j=0}^{n-1}{W({\bm{\mathsf{u}}_{\Delta}},{\bm{\mathsf{v}}_{\Delta}})_j}}$ $\prod\limits_{j=0}^{n-1}\text{d}\bm{\mathsf{u}}_j\text{d}\bm{\mathsf{v}}_j$ which can be easily sampled by a direct MC method in order to get random instances of $\bm{\mathsf{u}}_j$, $\bm{\mathsf{v}}_j$, $j=0,...,n-1$, associated to a random framed curve with initial data $\bm{q}_0=(\bm{\mathbb{1}},\bm{0})$. Notice that, in the proposed uniform example with diagonal stiffness matrix, the Gaussian factorises and the sampling is simply performed componentwise in terms of independent univariate Gaussians. Since the conditional probability density is a function of the variables $\bm{R}_n=\bm{R}_L$, $\bm{r}_n=\bm{r}_L$, we need to reconstruct them from the sampled strains by discretization of the differential equations $\bm{\gamma}'(s)=\frac{1}{2}\sum\limits_{i=1}^3 [\bm{\mathsf{u}}(s)]_i\bm{B}_i\bm{\gamma}(s)$, $\bm{r}'(s)=\bm{R}(\bm{\gamma}(s))\bm{\mathsf{v}}(s)$, with $[\bm{\mathsf{u}}(s)]_i$ the $i$th component of $\bm{\mathsf{u}}$ and $\bm{R}(\bm{\gamma})$ the rotation matrix associated to the quaternion $\bm{\gamma}$. This is achieved, e.g., by application of the scalar factor method, derived in \cite{QUAT1} and discussed in \cite{QUAT2}, which is an efficient and precise one-step method for integrating the Darboux vector $\bm{\mathsf{u}}$, preserving the unit norm of the quaternion. Defining ${\delta_{\bm{\gamma}}}_j=\frac{\epsilon}{2}\sum\limits_{i=1}^3[\bm{\mathsf{u}}_j]_i\bm{B}_i\bm{\gamma}_j$, then we have that $\bm{\gamma}_{j+1}=(\bm{\gamma}_{j}+\tan{(\Vert{\delta_{\bm{\gamma}}}_j\Vert){\delta_{\bm{\gamma}}}_j/\Vert{\delta_{\bm{\gamma}}}_j\Vert})\cos{(\Vert{\delta_{\bm{\gamma}}}_j\Vert)}$ subject to the initial data $\bm{\gamma}_0=(0,0,0,1)$, and consequently $\bm{r}_{j+1}=\bm{r}_{j}+\epsilon\bm{R}(\bm{\gamma}_j)\bm{\mathsf{v}}_j$, $\bm{r}_0=\bm{0}$. In the spirit of \cite{MCD} for computing cyclization densities, we are now able to generate MC trajectories and assess whether or not $\bm{q}_n=(\bm{R}_n=\bm{R}(\bm{\gamma}_n),\bm{r}_n)$ is falling inside the given small region $\mathcal{R}_{\zeta,\xi}$ of $SE(3)$ centred in $(\bm{\mathbb{1}},\bm{0})$ parametrized as the Cartesian product $\mathcal{B}_{\zeta}\times\mathcal{B}_{\xi}$ of two open balls in $\mathbb{R}^3$, centred in $\bm{0}$, of radius $\zeta,\xi>0$ respectively. Namely, $(\bm{R}_n,\bm{r}_n)\in\mathcal{R}_{\zeta,\xi}$ if and only if $\Vert\bm{\mathsf{c}}(\bm{\gamma}_n)\Vert<\zeta$ and $\Vert\bm{r}_n\Vert<\xi$, with $\bm{\mathsf{c}}\in\mathbb{R}^3$ the same parametrization of $SO(3)$ presented above, adapted to $\bar{\bm{\gamma}}=(0,0,0,1)$. Notice that, since $\bm{\mathsf{c}}(\bm{\gamma}_n)=[\bm{\gamma}_n]_4^{-1}([\bm{\gamma}_n]_1,[\bm{\gamma}_n]_2,[\bm{\gamma}_n]_3)$ and $\Vert\bm{\gamma}_n\Vert=1$, the condition $\Vert\bm{\mathsf{c}}(\bm{\gamma}_n)\Vert<\zeta$ is equivalent to $\sqrt{[\bm{\gamma}_n]_4^{-2}-1}<\zeta$. Moreover, we have the following link between the probability of the set $\mathcal{R}_{\zeta,\xi}$ ($ \mathbb{P}(\mathcal{R}_{\zeta,\xi})$) computed using MC simulations and the conditional probability density defined in the theoretical framework \begin{equation}\label{link} \begin{split} &{|\lbrace\text{samples:}\,(\bm{R}_n,\bm{r}_n)\in\mathcal{R}_{\zeta,\xi}\rbrace|}\,/\,{|\lbrace\text{all samples}\rbrace|}\approx \mathbb{P}(\mathcal{R}_{\zeta,\xi})\\ &=\int_{\mathcal{R}_{\zeta,\xi}}{\rho_f(\bm{q}_L,L|\bm{q}_0,0)}\text{d}\bm{q}_L\approx |\mathcal{R}_{\zeta,\xi}|\,\rho_f(\bm{q}_0,L|\bm{q}_0,0), \end{split} \end{equation} where the notation $|\cdot |$ stands for the number of elements of a discrete set or the measure of a continuous set, and the accuracy of the approximation increases with $n\rightarrow\infty$, $|\lbrace\text{all samples}\rbrace |\rightarrow\infty$, $\zeta\rightarrow 0$, $\xi\rightarrow 0$. The set $\mathcal{R}_{\zeta,\xi}$ is measured by means of the product of the Haar measure and the Lebesgue measure for the $SO(3)$ and the $E(3)$ components. Thus, making use of the parametrisation, $|\mathcal{R}_{\zeta,\xi}|=\int_{\mathcal{R}_{\zeta,\xi}}{\text{d}\bm{q}_n}=\int_{\mathcal{B}_{\zeta}\times\mathcal{B}_{\xi}}{\left(1+\Vert\bm{\mathsf{c}}_n\Vert^2\right)^{-2}\,\text{d} \bm{\mathsf{c}}_n\,\text{d}\bm{r}_n}=8\pi^2\xi^3(\arctan{(\zeta)}-\zeta/(1+\zeta^2))/3$. Regarding the marginal $\rho_m(\bm{r}_0,L|\bm{q}_0,0)$, the method is applied only considering the condition on $\bm{r}_n$ for being inside the open ball $\mathcal{B}_{\xi}$ with measure $| \mathcal{B}_{\xi} |=4\pi\xi^3/3$, and neglecting all the details concerning the rotation component. More specifically, in order to enhance the efficiency of the algorithm, we refer to the approach adopted in \cite{MCD, ALEX2, MCDNA} for DNA MC simulations, using the “half-molecule” technique as developed by Alexandrowicz \cite{ALEX1}. In this technique, one computes $M$ random instances each of the first and second halves of the framed curve and then considers all first-half-second-half pairs in order to generate $M^2$ random curves, allowing a large sample size contributing for each density data point and providing the necessary accuracy to the estimation. In particular, we give here the specifications for the simulations reported in the following section. For the $(\mathtt{f})$ computations, $\sim 10^{15}$ samples were produced for each data point, choosing $n=200$ and $\zeta$, $\xi$ ranging from $2.5$ to $6.6$ \% of the parameter $L$. The estimated density value corresponds to the mean taken over $81$ ``boxes'', along with the standard deviation for these boxes defining the range of the bar for each MC data point. For the $(\mathtt{m})$ cases, $\sim 10^{13}$ samples were produced for each data point, choosing $n=200$ and $\xi$ ranging from $0.1$ to $4$ \% of the parameter $L$; $40$ different ``boxes'' were used for the final estimation. \section{Results and discussion for the examples considered} \subsection{A preliminary stability analysis} \begin{figure*} \centering \subfigure[]{ \includegraphics[width=.37\textwidth]{fig2.pdf}\qquad\qquad } \subfigure[]{ \includegraphics[width=.37\textwidth]{fig3.pdf} } \subfigure[]{ \includegraphics[width=.37\textwidth]{fig4.pdf}\qquad\qquad } \subfigure[]{ \includegraphics[width=.37\textwidth]{fig5.pdf} } \caption{Stability analysis for a non-isotropic $(\mathtt{C})$ rod with $k_1=0.5$, $k_2=5$, $k_3=10$ and $a_1=a_2=a_3=100$. Continuous lines represent quantities associated to stable solutions, dashed lines to unstable ones. In panels (a) and (b) the energies for the circular and teardrop equilibria are displayed in red, together with the compressed solution, in black, which becomes unstable after the bifurcation point $L^f$ or $L^m$. In panels (c) and (d) we report the values of $\det{[\bm{\mathsf{H}}(0)]}$ computed on the associated solutions for the $(\mathtt{f})$ and $(\mathtt{m})$ cases respectively, with conjugate points arising when the curves hit zero.} \label{fig2345} \end{figure*} We refer to a linearly elastic, uniform, with diagonal stiffness matrix, intrinsically straight and untwisted rod ($\bm{\mathcal{P}}(s)=\bm{\mathcal{P}}=$ diag $\lbrace k_1,k_2,k_3,a_1,a_2,a_3\rbrace$, $\hat{\bm{\mathsf{u}}}=\bm{0}$, $\hat{\bm{\mathsf{v}}}=(0,0,1)$), as presented above. For $(\mathtt{C})$ rods, cyclization problems $(\mathtt{f})$ and $(\mathtt{m})$ always admit a ``compressed'' trivial solution $\bm{q}^c$, characterised by $\bm{r}^c=\bm{0}$, $\bm{R}^c=\bm{\mathbb{1}}$, $\bm{\mathsf{u}}^c=\bm{0}$, $\bm{\mathsf{m}}^c=\bm{0}$, $\bm{\mathsf{v}}^c=\bm{0}$, $\bm{\mathsf{n}}^c=(0,0,-a_3)$, with energy $E(\bm{{q}}^c)=\frac{a_3 L}{2}$. Analysing the determinant of the associated Jacobi fields with BCs (Eq.~\ref{inFM}) by means of conjugate point theory, we observe that the latter solution is stable (i.e. a minimizer of the energy) in the range $0<L<L^f$ for the $(\mathtt{f})$ case, and in $0<L<L^m$ for the $(\mathtt{m})$ case, where $L^f={2\pi}/{a_3}\min{(\sqrt{k_1\,a_2},\,\,\sqrt{k_2\,a_1})}$ and $L^m=L^f/2$. Moreover, as already mentioned, for full looping $(\mathtt{f})$ there exist also circular solutions $\bm{q}^f$, which are stable for all $L>0$, with energy ${2\pi^2 k_1}/{L}$. (This is true except for $k_1>k_3$, $L<2\pi\sqrt{(k_1-k_3)/{a_1}}$, but in the present article we will not treat such an instability of the circular solution). Notice that if $k1\leq k2$ and $a_1=a_2=a_3$, then $E(\bm{q}^c)=E(\bm{q}^f)$ at $L^f={2\pi}\sqrt{k_1/a_3}$ and $E(\bm{q}^c)<E(\bm{q}^f)$ for $0<L<L^f$. For marginal looping $(\mathtt{m})$, the stable teardrop solution $\bm{q}^m$ ceases to exist in the interval $0<L<L^m$, merging with the compressed solution which becomes stable. We show the bifurcation diagrams in Fig.\ref{fig2345} for a non-isotropic $(\mathtt{C})$ rod. The isotropic case is totally analogous, except from the fact that an entire family of minimizers is involved and a conjugate point is always present due to the continuous symmetry. Observe that $E(\bm{q}^m)$ does not explode for small lengths, but instead reaches a maximum and decreases towards $E(\bm{q}^c)$. By contrast, for a $(\mathtt{K})$ rod the circular and teardrop solutions exist and are stable for all $L>0$, with energy diverging approaching $L=0$, and no compressed solution is present. Since in the $(\mathtt{C})$ case the compressed (isolated) solution is a minimizer for the short-length scale regimes, we evaluate analytically its contribution $\rho^c_{\alpha}$ to the cyclization probability density $(\mathtt{f})$ and $(\mathtt{m})$ for $0<L<L^f$ and $0<L<L^m$ respectively. Making use of (Eq.~\ref{fin}) with BCs (Eq.~\ref{inFM}) and setting the non-dimensional length $\tilde{L}=L/l_p$ for a given $l_p>0$, we get \begin{equation}\label{compr} \rho^c_{\alpha}\approx e^{-E_p\tilde{L}}\frac{1}{{l_p}^{3}{\tilde{L}}^{\frac{1}{x}}}\sqrt{\tau\,\csc(x\,\vartheta_1\,\tilde{L})^{\frac{2}{x}}\csc(x\,\vartheta_2\,\tilde{L})^{\frac{2}{x}}}, \end{equation} where $x=x(\alpha)$ with $x(f)=1$, $x(m)=2$ and $E_p=\beta\,l_p\,a_3/2$, $\vartheta_1=(l_p\,a_3)/(2\sqrt{k_1\,a_2})$, $\vartheta_2=(l_p\,a_3)/(2\sqrt{k_2\,a_1})$, $\tau=\tau(\alpha)$ with $\tau(f)=\beta^2\,k_3\,a_3\,E_p^4/\pi^6$, $\tau(m)=l_p^2\,\sqrt{\upsilon}\,E_p^3/{\pi^3}$, $\upsilon=a_1\,a_2/(k_1\,k_2)$. The latter formula is valid both for isotropic (setting $k_1=k_2$, $a_1=a_2$) and non-isotropic rods. In the following we focus on the contribution $\rho_{\alpha}$ to the cyclization probability density $(\mathtt{f})$ and $(\mathtt{m})$ coming from the circular and teardrop minimizers respectively. \subsection{Non-isotropic polymers} \begin{figure*} \subfigure[]{\includegraphics[width=.45\textwidth]{fig6.pdf}}\qquad \subfigure[]{\includegraphics[width=.45\textwidth]{fig7.pdf}} \caption{cyclization densities comparison between the path integral (PI) Laplace approximation (continuous lines) and MC (discrete points with standard deviation error bars) for a non-isotropic rod. For $(\mathtt{K})$ we set $\beta=1$, $k_1=0.5$, $k_2=5$, $k_3=10$; for the $(\mathtt{C})$ case, we also set $a_1=a_2=a_3=100$. The quantities are reported in non-dimensional form. In particular, the undeformed length of the rod is expressed in units of real persistence length $l_p\approx 0.9$, the harmonic average of $k_1$ and $k_2$. In panel (a) we address the $(\mathtt{f})$ case, reporting the values for $\rrf$ and displaying in red the zero order contribution. In panel (b) the results for the marginal density $\rrm$ are reported, with a zoom window in $log_{10}$ scale in order to underline the peculiar small length trend. In this case, $(\mathtt{K})$ and $(\mathtt{C})$ rods differ in zero order contribution of the energy, and two different red curves are displayed.} \label{fig67} \end{figure*} First, we consider a non-isotropic rod ($k_1\neq k_2$), further assuming w.o.l.o.g. that $k_1<k_2$. For the case of full looping $(\mathtt{f})$, there exist two circular, untwisted, isolated minimizers $\bm{{q}}^f$ lying on the $y-z$ plane with energy ${2\pi^2 k_1}/{L}$. The existence of a couple of reflected minima simply translates into a factor of 2 in front of (Eq.~\ref{fin}) and the semi-classical expansion is performed about one of them (e.g. about the one having non-positive $y$ coordinate). For this case (Eq.~\ref{JacHam}) is a constant coefficients Jacobi system, that we solve analytically together with the first set of BCs in (Eq.~\ref{inFM}), in order to obtain the approximated formula for the cyclization probability density $\rho_f(\bm{q}_0,L|\bm{q}_0,0)$ both for $(\mathtt{C})$ and $(\mathtt{K})$ rods. Setting the length scale $l_p=2\beta k_1$, which corresponds to the planar tangent-tangent persistence length for the same rod but constrained in two dimensions \cite{PL}, and the non-dimensional length $\tilde{L}=L/l_p$, we get $ \rrf\approx 2\,e^{-\pi^2 / \tilde{L}} h_{I}\,h_{O}$, where $h_{I}$ and $h_{O}$ are the in-plane (of the minimizer) and out-of-plane contributions \begin{small} \begin{equation}\label{Pop} {h_{I}}=\frac{1}{{l_p}^{2}{\tilde{L}}^{7/2}}\sqrt{\frac{\pi}{a^2}},\quad {h_{O}}_{(\mathtt{non-iso})} = \frac{1}{l_p{\tilde{L}}^{5/2}} \sqrt{\frac{8 \pi (1-\nu_3)}{b\,\nu_3(1-\cos\lambda)}}, \end{equation} \end{small} \begin{equation}\label{An1} {\rho_f}_{(\mathtt{non-iso})} \approx 2\,e^{-\frac{\pi^2}{\tilde{L}}}\frac{1}{{l_p}^{3}{\tilde{L}}^{6}}\sqrt{\frac{8 \pi^2 (1-\nu_3)}{a^2\,b\,\nu_3(1-\cos\lambda)}}, \end{equation} with $\lambda=2\pi\sqrt{(1-\nu_2)(1-\nu_3)}$, $a = 1 + ({2\pi}/{{\tilde{L}}})^2 (\eta_2+\eta_3)$, $b = 1 + ({2\pi}/{{\tilde{L}}})^2 (\omega_1-\eta_1)$, $\nu_2 = k_1/k_2$, $\nu_3 = k_1/k_3$, $\eta_1 = {k_1}/(a_1\,l_p^2)$, $\eta_2 = {k_1}/(a_2\,l_p^2)$, $\eta_3 = {k_1}/(a_3 \,l_p^2)$, $\omega_1 = {k_3}/(a_1\,l_p^2)$. The $(\mathtt{K})$ case is recovered setting $a=b=1$, and the density obtained disregarding the factor ${h_{O}}$ coincides with the cyclization probability density for planar rods given in \cite{LUD}. Notice that the in-plane and out-of-plane contributions are computed by performing two separated Gaussian path integrals for the in-plane and out-of-plane variation fields, exploiting the decomposition of the second variation in two distinguished terms \cite{LUDT}. Moreover, the expressions in (Eq.~\ref{Pop}), (Eq.~\ref{An1}) are valid under stability assumptions for $k_1<k_2$, $k_1\neq k_3$ and equal to the limit $k_3\rightarrow k_1$, i.e. $\nu_3\rightarrow 1$, if $k_3=k_1$. We further underline that (Eq.~\ref{An1}) diverges in the isotropic limit $k_2\rightarrow k_1$, i.e. $\nu_2\rightarrow 1$. In general, for computing the density $\rrm(\bm{0},L|\bm{q}_0,0)$ from (Eq.~\ref{fin}) together with the second set of BCs in (Eq.~\ref{inFM}), numerics must be used. In fact, for the case of marginal looping $(\mathtt{m})$, there are no simple analytical expressions for the two planar ($y-z$ plane) and untwisted teardrop shaped isolated minimizers $\bm{{q}}^m$. However, in the $(\mathtt{K})$ case there exists a scaling argument in the variable $L$, which allows to provide a qualitative expression. Namely, given the fact that we can compute numerically a $(\mathtt{K})$ equilibrium $\bm{{q}}^m_p$ for a given rod length $l_p$, characterised by $\bm{r}_p(s_p)$, $\bm{R}_p(s_p)$, $\bm{\mathsf{v}}_p(s_p)=\hat{\bm{\mathsf{v}}}$, $\bm{\mathsf{u}}_p(s_p)$ $\bm{\mathsf{n}}_p(s_p)$, $\bm{\mathsf{m}}_p(s_p)$ for $s_p\in[0,l_p]$, then for each $L>0$ it can be easily checked that $\bm{r}(s)=\tilde{L}\,\bm{r}_p(s/\tilde{L})$, $\bm{R}(s)=\bm{R}_p(s/\tilde{L})$, $\bm{\mathsf{v}}(s)=\,\bm{\mathsf{v}}_p(s/\tilde{L})=\hat{\bm{\mathsf{v}}}$, $\bm{\mathsf{u}}(s)=1/\tilde{L}\,\bm{\mathsf{u}}_p(s/\tilde{L})$, $\bm{\mathsf{n}}(s)=1/\tilde{L}^2\,\bm{\mathsf{n}}_p(s/\tilde{L})$, $\bm{\mathsf{m}}(s)=1/\tilde{L}\,\bm{\mathsf{m}}_p(s/\tilde{L})$, $\tilde{L}=L/l_p$ define a $(\mathtt{K})$ equilibrium $\bm{{q}}^m$ for $s\in[0,L]$. This immediately implies that $E(\bm{{q}}^m)=1/\tilde{L}\,E(\bm{{q}}^m_p)$. Moreover, since the matrix $\bm{\mathsf{E}}(s)$ in (Eq.~\ref{E1}) is given in terms of strains, forces and moments at the equilibrium by means of (Eq.~\ref{E2}), (Eq.~\ref{E3}), it is possible to obtain the scaling for the Jacobi fields as ${\text{det}[\hhm(0)]}=\tilde{L}^{9}\,{\text{det}[\hhm_p(0)]}$. Finally, defining $E_p=\beta E(\bm{{q}}^m_p)$ and $h_p=l_p^{3}({\beta}/(2\pi))^\frac{3}{2}/\sqrt{\text{det}[\hhm_p(0)]}$, we get \begin{equation}\label{SAn1} {\rrm}_{(\mathtt{non-iso})}\approx 2\,e^{-\frac{E_p}{\tilde{L}}}\frac{h_p}{{l_p}^{3}{\tilde{L}}^{\frac{9}{2}}}, \end{equation} where $E_p$ and $h_p$ have to be computed numerically, and the factor $2$ accounts for the contribution of both the minimizers. By contrast, a simple scaling argument is not present for a $(\mathtt{C})$ rod, therefore allowing for more complex behaviours. We show the results in Fig.\ref{fig67} for a specific choice of the parameters, in the range $L>L^f$ and $L>L^m$ respectively for $(\mathtt{f})$ and $(\mathtt{m})$, so that the only accounted minimizers for the computation of the cyclization probability densities are the circular and the teardrop solutions, and we can apply (Eq.~\ref{An1}) and (Eq.~\ref{SAn1}). The simulations show good agreement between the Laplace approximation and MC in the target small length domain. Even tough the second order expansion looses its quantitative power for larger lengths, the qualitative behaviour is captured and the error does not explode. We remind that looping is a rare event and MC simulations are usually expensive and unfeasible; by contrast, the method proposed in the present article is performing successfully which much higher efficiency. It is also important to underline that for the specific example considered the difference in $\rrf$ between $(\mathtt{K})$ and $(\mathtt{C})$ rods is only due to Jacobi fields, since the energy factor is the same, the circular minima having no extension and no shear deformations. The marginal case $(\mathtt{m})$ is more representative of the general behaviour where $(\mathtt{K})$ and $(\mathtt{C})$ minimizers are distinct solutions, which is true also for $(\mathtt{f})$ BCs for arbitrary (non-uniform, with non-straight intrinsic shape) elastic rods. In fact, in the short-length scale regimes, the possibility to exploit the additional degrees of freedom associated to extension and shear is crucial for minimizing the overall elastic energy, in the face of an increasingly penalizing bending contribution. This phenomenon allows the probability density to be remarkably higher than the $(\mathtt{K})$ case below the persistence length, remaining almost constant and even increasing in the range where for the $(\mathtt{K})$ rod (and therefore also for the WLC model) is exponentially vanishing. By contrast, for large lengths extension and shear become negligible. In addition, as a general statement, the Jacobi factor is fundamental to determine the peak of the density, in a domain where the energy is monotonically decreasing with length. On the other hand, the energy contribution dominates the system for smaller lengths. Finally, we clearly observe overall higher values for the marginal density compared to the full case because of the less restrictive BCs. \subsection{Isotropic polymers} \begin{figure*} \centering \subfigure[]{\includegraphics[width=.45\textwidth]{fig8.pdf}}\qquad \subfigure[]{\includegraphics[width=.44\textwidth]{fig9.pdf}} \subfigure[]{\includegraphics[width=.45\textwidth]{fig10.pdf}}\qquad \subfigure[]{\includegraphics[width=.45\textwidth]{fig11.pdf}} \caption{cyclization densities comparison between the path integral (PI) approximation and MC for an isotropic rod. For $(\mathtt{K})$ we set $\beta=1$, $k_1=k_2=0.5$, $k_3=10$; for the $(\mathtt{C})$ case, we also set $a_1=a_2=a_3=100$. The quantities are reported in non-dimensional form and the undeformed length of the rod is expressed in units of real persistence length $l_p\approx 0.5$. In panel (a) and (c) we address the $(\mathtt{f})$ case, reporting the values for $\rrf$ and displaying in red the zero order contribution. The behaviour for $(\mathtt{C})$ in the small length regime is shown in (c). In panel (b) and (d) the results for the marginal density $\rrm$ are reported, with a zoom window in $log_{10}$ scale; the two different zero order contributions for $(\mathtt{K})$ and $(\mathtt{C})$ rods are displayed in red. The behaviour for $(\mathtt{C})$ in the small length regime is shown in (d).} \label{fig891011} \end{figure*} \begin{figure*}[] \centering \subfigure[]{\includegraphics[width=.35\textwidth]{fig12.pdf}}\quad\qquad\qquad \subfigure[]{\includegraphics[width=.35\textwidth]{fig13.pdf}} \caption{Contour plots for an isotropic rod (with the same parameters already used) showing the ratio of $(\mathtt{C})$ to $(\mathtt{K})$ for the length $L^*$ at which the maximum of $\rrf$ occurs ($L^*(\mathtt{C})/L^*(\mathtt{K})$ in panel (a)) and for the value $\rrf^*$ at the maximum ($\rrf^*(\mathtt{C})/\rrf^*(\mathtt{K})$ in panel (b)) as a function of $k_1=k_2$ and $a_1=a_2=a_3$.} \label{fig1213} \end{figure*} Now we consider the isotropic case, i.e., $k_1=k_2$, $a_1=a_2$ and a $1$-parameter family of non-isolated circular or teardrop minima arises. Given the minimizer in the $y-z$ plane with $y\leq 0$ represented by $\bm{r}(s)=(0,r_2(s),r_3(s))$ and $\bm{R}(s)$ a counterclockwise planar rotation about the $x$ axis of an angle $\varphi(s)$, the $1$-parameter family of minimizers can be expressed as $\bm{r}(s;\theta)=\bm{Q}_{\theta}\bm{r}(s)$ and $\bm{R}(s;\theta)=\bm{Q}_{\theta}\bm{R}(s)\bm{Q}_{\theta}^T$, where $\bm{Q}_{\theta}$ is defined as the counterclockwise planar rotation about the $z$ axis of an angle $\theta\in [0,2\pi)$. Thus, taking the derivative of such minimizers with respect to $\theta$ and finally setting $\theta=0$, the zero mode can be easily recovered in the chosen parametrisation to be ${\bm{\mathsf{\psi}}}(s)=(0,\frac{1}{2}\sin{(\varphi)},\frac{1}{2}(\cos{(\varphi)}-1),-r_2,0,0)$. Moreover, the conjugate momentum of ${\bm{\mathsf{\psi}}}$ is derived in general (for both $(\mathtt{C})$ and $(\mathtt{K})$ rods) substituting the zero mode itself and its to-be-found moment as the unknowns of the Jacobi equations in Hamiltonian form (Eq.~\ref{JacHam}) computed on the minimizer associated to $\theta=0$ (recalling to multiply $\bm{\mathsf{E}}_{1,1}$ by $\frac{\beta}{2\pi}$ and $\bm{\mathsf{E}}_{2,2}$ by $\frac{2\pi}{\beta}$), and reads as $\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}}(s)=(0,\frac{\beta k_1}{2\pi}(\cos{(\varphi)}+1)\varphi ',-\frac{\beta k_1}{2\pi}\sin{(\varphi)}\varphi ',-\frac{\beta}{2\pi} n_2,0,0)$. At this point it is straightforward to apply the theory developed above for non-isolated minimizers, choosing $\bm{\mathsf{\chi}}$ to be a matrix with unit determinant such that the second column (i=2) corresponds to $\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^f}(L)$ and $\bm{\mathsf{X}}$ a matrix with determinant equal to $-1$ such that the fourth column (i=4) corresponds to $([{\bm{\mathsf{\psi}}}^m]_{1:3},[\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^m}]_{4:6})^T(L)$, according to (Eq.~\ref{inFMiso}). Consequently, the BCs for the Jacobi equation are well defined, the energy is computed, e.g., for the minimizer corresponding to $\theta=0$ as before, and (Eq.~\ref{finiso}) is analytical for $\rrf\approx 2\pi e^{-\pi^2 / \tilde{L}} h_{I}\,h_{O}$, where \begin{small} \begin{equation}\label{An2} {h_{O}}_{(\mathtt{iso})} = \frac{1}{l_p{\tilde{L}}^{3}} \sqrt{\frac{4}{b\,\nu_3}},\quad{\rho_f} _{(\mathtt{iso})}\approx2\pi e^{-\frac{\pi^2}{ \tilde{L}}}\frac{1}{{l_p}^{3}{\tilde{L}}^{\frac{13}{2}}}\sqrt{\frac{4 \pi}{a^2 b\,\nu_3}}, \end{equation} \end{small} with $a = 1 + ({2\pi}/{{\tilde{L}}})^2 (\eta_1+\eta_3)$ and all the other quantities have been defined previously. In particular, $h_{I}$ is the same as for the non-isotropic case and therefore the zero mode arises for the out-of-plane factor for which the above regularization is applied. The $(\mathtt{K})$ limit is recovered as before setting $a=b=1$. For the marginal density $\rrm$ numerics must be used, but in the $(\mathtt{K})$ case we can carry on the scaling argument in the variable $L$ as before, obtaining \begin{equation}\label{SAn2} {\rrm}_{(\mathtt{iso})}\approx 2\pi\,e^{-\frac{E_p}{\tilde{L}}}\frac{h_p}{{l_p}^{3}{\tilde{L}}^{5}}, \end{equation} for given $E_p=\beta E(\qqm_p)$, $h_p=l_p^{3}\sqrt{{[\bm{\mathsf{\mu}}_{{{\bm{\mathsf{\psi}}}_{ p}^{m}}}(0)]_i}/{]{\hhm_p(0)}[_{i,i}}}$ computed numerically. It is interesting to notice that formulas (Eq.~\ref{An1}), (Eq.~\ref{SAn1}), (Eq.~\ref{An2}) and (Eq.~\ref{SAn2}) scale differently with length as far as the second order correction term is concerned. The latter scalings naturally arise from the ones observed within simpler WLC models, see chapter $7$ in \cite{YAM00}. The comparison between Laplace and MC simulations for isotropic polymers is shown in Fig.\ref{fig891011}, (a) and (b), for the same parameters addressed in the non-isotropic case, but now sending $k_2\rightarrow k_1$. Once more time we only consider the contributions of the manifolds made of circular and teardrop minimizers, setting $L>L^f$ and $L>L^m$. The fact that now $k_2$ is ten times smaller than the same parameter adopted in Fig.\ref{fig67} implies that the overall trend of the density is shifted to the right in units of persistence length, allowing large effects of shear and extension compared to the more standard inextensible and unshearable models, as already discussed. We further observe that the approximation error is generally higher for $(\mathtt{C})$ rods and for marginal looping $(\mathtt{m})$, which is a consequence of the semi-classical expansion that depends on the stiffness values and boundary conditions. For the simple examples considered, there clearly exist more accurate formulas for the $(\mathtt{K})$ case in the literature, e.g., (Eq.~\ref{SAn2}) can be related to the WLC formula (7.68), pag. 266 in \cite{YAM00}. However, the power of the method explained above lies in its generality and ability to easily provide approximation formulas for a wide range of potentially realistic and complex problems in the short length scale regimes. By contrast, since the $(\mathtt{C})$ case represents itself a novelty, we believe that basic examples are still important to understand the underlying physical behaviour. It is natural to ask what happens for $L\leq L^f$ and $L\leq L^m$, respectively in $(\mathtt{f})$ and $(\mathtt{m})$, for $(\mathtt{C})$ rods (for $(\mathtt{K})$ the former analysis based only on circular and teardrop solutions is valid for all lengths). Due to the presence of the stable compressed solution in this range, the density diverges for vanishing length, and this is true both for isotropic and non-isotropic rods. In particular, for $(\mathtt{f})$ here we sum up the contributions coming from the compressed solution (Eq.~\ref{compr}) and the manifold of circular minimizers (Eq.~\ref{An2}); for $(\mathtt{m})$ only the compressed solution is present and we apply (Eq.~\ref{compr}). At the critical lengths $L^f$ and $L^m$ a conjugate point arises for the compressed solution (in $(\mathtt{m})$ the conjugate point arises also in the teardrop minimizer) and the Jacobi fields are singular, leading to an incorrect explosion of the probability density, which should be regularised. We do not address such regularisations, but in Fig.\ref{fig891011}, (c) and (d), we report the results for this length regime, together with MC simulations which connect our approximation formulas valid on the left and on the right of the singularities. Finally, in order to highlight the effect of shear and extension for larger lengths, in Fig.\ref{fig1213} we compare the $(\mathtt{K})$ and the $(\mathtt{C})$ cases in terms of the length and the value of the probability density at which the maximum of $\rrf$ occurs, the first increasing and the second decreasing in presence of extension and shear. \section{Conclusions} In the present article we addressed the problem of computing looping probabilities from a continuum perspective, for different choices of boundary conditions, with particular emphasis on extensible and shearable polymers, which are not generally treated in the standard literature of WLC-type models. In a first approximation DNA fits the WLC hypothesis of inextensibility and unshearability. However, contradictory results have been reported for DNA below the persistence length since the studies of Cloutier and Widom \cite{CW}, actually showing enhanced cyclization of short DNA molecules not explainable by WLC-type models. In a recent study \cite{BIO5} the authors conclude that ``determining whether the high bendability of DNA at short length scales comes from transient kinks or bubbles or stems from anharmonic elasticity of DNA requires improved computational methods and further studies''. Working in this direction, and being aware of the fact that DNA is in fact an extensible molecule \cite{DNAex}, our high cyclization predictions for small lengths in the presence of extension and shear aim to add a piece to the puzzle. Notice that this is achieved even under simple linearly elastic assumptions. Furthermore, birod models \cite{BIR, PRA} with sequence-dependent parameters are more accurate in capturing DNA conformations, but the theory devised here is general and can be applied analogously to this level of complexity, allowing the computation of different ring-closure probabilities without involving expensive MC simulations. In the future, in the wide context of end-to-end probabilities, the effect of external loadings will also be investigated. \section*{acknowledgement} We are grateful to Prof. John H. Maddocks for the fruitful discussions and insights, as well as to all the LCVMM group of Lausanne for the constant support. G.C. and R.S. acknowledge SCITAS computer facilities and grant SNF 200020-182184. \newpage \section{Introduction} In 1949, Kratky and Porod \cite{WLC} introduced the wormlike-chain (WLC) model for describing the conformations of stiff polymer chains. Soon after, the complete determination of the polymeric structure of DNA guided scientists towards the application of WLC-type models in the context of DNA statistical mechanics, allowing probabilistic predictions of relevant quantities of interest. Historically, the computations have been performed in terms of Fokker-Plank equations \cite{DAN, DIFF}, but also exploiting the point of view of path integrals \cite{PIC, FR1, FR2}, a technique inherited from Wiener's work \cite{W1, W2} and quantum mechanics \cite{BookFeynman}. These ideas were largely investigated by Yamakawa \cite{YAM0, YAM00, YAM1, YAM2, YAM3, YAM4, YAM6, YAM7}, who in particular considered the problem of computing ring-closure probabilities, now ubiquitous in molecular biology \cite{BIO3, BIO4, BIO5, BIO6}. Nowadays, for a homogeneous chain, the exact statistical mechanical theory of both the WLC and the helical WLC (with twist) is known \cite{WL1, WL2, WL3}, and the topic has been rigorously phrased over the special euclidean group SE(3) \cite{CHIR2}. In parallel, back in the early years of the 20th century, the Cosserat brothers Eugène and Fran\c cois formulated Kirchhoff’s rod theory using what are now known as directors \cite{COS}. However, the difficulties arising from the generality of the model, which includes the WLC as a particular constrained case, hindered its application to stochastic chains. Only quite recently, targeting a more realistic description of DNA, the mentioned framework has been partially or fully exploited both within new analytical studies \cite{MMK, ZC, NP, LUDT, LUD, CHIR1} and intense Monte Carlo (MC) simulations \cite{ALEX1, MCDNA, ALEX2, MCD}, the latter being only a partial solution because of time and cost. In this article, we aim to fill the gap between user-friendly but simplistic models (WLC) on one hand, and accurate but expensive simulations (MC) on the other one, still maintaining the analytical aspect which allows to draw conclusions of physical interest. This is achieved using \cite{LUDT, LUD} as a starting point for bridging the two historical lines of research, i.e. exploiting efficient (real) path integral techniques in the semi-classical approximation \cite{2020, PAP1, BookChaichian, BookSchulman, BookWiegel, MOR} (or Laplace method \cite{PIT}), and working within the special Cosserat theory of rods in $SE(3)$. Namely, for studying the end-to-end relative displacements of a fluctuating polymer at thermodynamic equilibrium with a heat bath, we describe the configurations of the chain in a continuum limit by means of framed curves over the special euclidean group. Thus, from an assumed Boltzmann distribution on rod configurations, a conditional probability can be expressed as the ratio of a Boltzmann weighted integral over all paths satisfying the desired end conditions, to the analogous weighted integral over all admissible paths (partition function). The resulting path integrals are finally approximated via a quadratic (semiclassical) expansion about a minimal energy configuration, for which the crucial assumption is that the energy required to deform the system is large with respect to the temperature of the heat bath. This means computing probabilities for length scales of some persistence lengths or less, which turns out to be of great relevance in biology. Although the present study is general and is applicable to various end-to-end statistics, we focus on the computation of ring-closure or cyclization probabilities for elastic rods, targeting three significant aspects. The first is the possibility of systematically distinguishing between the statistics provided by end positions alone (marginal looping) and the ones provided including also end orientations (full looping) \cite{2020}, for Kirchhoff as well as for Cosserat rods. We emphasise that although Kirchhoff rod theory \cite{AN1} generalises both Euler’s elastica theory to model deformations in three-dimensions, and the WLC model allowing arbitrary bending, twisting and intrinsic shapes of the rod, it does not allow extension or shearing of the rod centerline. This is indeed a prerogative of the Cosserat, more general framework, where the centerline displacement and the cross-section’s rotation are considered as independent variables. We show that these additional degrees of freedom are crucial in the analysis of polymer chains in short-length scale, or stiff, regimes, both in the full and marginal cases, where the system exploits extension and shear deformations for minimizing the overall elastic energy, in the face of an increasingly penalizing bending contribution. This allows the cyclization probability density to take high values even when the WLC model (and Kirchhoff) is vanishing exponentially. The second is addressing the ``perfect problem'' in the semi-classical context, where the symmetry of isotropy gives rise to a ``Goldstone mode'' \cite{G1} leading to a singular path integral, and requires a special treatment by suitably adapting (imaginary) quantum mechanical methods \cite{FADPOP, GHO, COL1, POLYA, JAR, BER} and functional determinant theories \cite{FORM, MCK, FAL}, which are novel in such a generality in the context of elastic rod. For simple models, an analysis in this direction is present in \cite{GUER}. The concepts of isotropy and non-isotropy can be roughly related to a circular shape rather than an elliptical shape for the cross section of the rod, and the two cases have two different mathematical descriptions in terms of Gaussian path integrals, which we discuss in detail in the course of this article. In particular, the effect of non-isotropy for semiflexible chain statistics has been addressed from a path integral point of view in \cite{LUD} for the planar case and in \cite{LUDT} for the three-dimensional case (and will be here taken up and simplified), but without resolving the singularity arising in the isotropic limit. The last significant aspect included in the present work is deriving approximated solution formulas that can always be easily evaluated through straightforward numerical solution of certain systems of Hamiltonian ODE, which in some particularly simple cases can even be evaluated completely explicitly. Versions of the solution formulas, involving evaluation of Jacobi fields at different equilibria and subject to different boundary conditions (BCs), are obtained for the two cases of full and marginal ring-closure probabilities. The efficiency aspect in computing looping probabilities, maintaining the same accuracy of MC in the biologically important range less than 1-2 persistence lengths, is fundamental. This is because MC simulation is increasingly intractable due to the difficulty of obtaining sufficiently good sampling with decreasing polymer length, which is the limit where the approximation is increasingly accurate. Contrariwise our approximations are increasingly inaccurate in longer length regimes where good MC sampling is easily achieved. Remarkably, the qualitative behaviour of the probability densities coming from Laplace approximation and from MC sampling are the same regardless of the length scale. We stress that the stiffness parameters expressing the physical properties of the polymer are allowed to vary along the material parameter of the curve, leading to a non-uniform rod which, in the context of DNA, would represent sequence-dependent variations. In addition, the model allows coupling between bend, twist, stretch and shear, as well as a non-straight intrinsic shape. Notwithstanding the latter generality, we prefer to illustrate our method with some basic examples of uniform and intrinsically straight rods and comparing it with a suitable MC algorithm, in order to highlight the contributions provided by the different choices of cyclization BCs in the presence of isotropy or non-isotropy, and to investigate the effect of shear and extension when moving from Kirchhoff to Cosserat rods. Finally, the results will be exposed under the hypothesis of linear elasticity, even tough the theory applies to more general energy functionals. The structure of the article is as follows. First, we give an overview of the statics of special Cosserat rods, with particular emphasis on equilibria and stability for the boundary value problems involved. In particular, the Hamiltonian formulation of the Euler-Lagrange and Jacobi equations provides a common theoretical framework for both Kirchhoff and Cosserat rods. Second, we present a preview of the examples that will be considered in the course of the article, namely in the context of linear elasticity. Therefore, we characterise the minimizers of the energy, distinguishing between the non isotropic and isotropic cases. The role of the continuous variational symmetries of isotropy and uniformity is explained. Then, we devote a section for describing the path integral formulation of fluctuating elastic rods as a model of polymers, introducing an appropriate parametrisation of the rotation group and giving the functional representations of full and marginal looping probability densities. Afterwards, the explicit approximated formulas for such densities are derived, initially in the case of non-isolated minimizers and thereafter in presence of non-isolation, for which a special theoretical analysis is performed. Moreover, we provide a MC algorithm for stochastic elastic rods, exploited to benchmark our results. The examples are finally investigated from the point of view of cyclization probabilities, with special focus on shear and extension contributions for Cosserat rods in the short-length scale regimes. Further discussion and conclusions follow. \section{Elastic rod equilibria and their stability} A comprehensive overview of the theory of elastic rods in the context of continuum mechanics can be found in \cite{ANT}. In particular, we follow the specific notation and Hamiltonian formulations introduced in \cite{HAM}. Briefly, a configuration of a Cosserat rod is a framed curve $\bm{q}(s)=(\bm{R}(s),\bm{r}(s))$ $\in SE(3)$ for each $s\in[0,L]$, which may be bent, twisted, stretched or sheared. The vector $\bm{r}(s)\in\mathbb{R}^3$ and the matrix $\bm{R}(s)\in SO(3)$ model respectively the rod centerline and the orientation of the material in the rod cross-section via a triad of orthonormal directors $\lbrace\bm{d}_i(s)\rbrace_{i=1,2,3}$ attached to the rod centerline, with respect to a fixed frame $\lbrace\bm{e}_i\rbrace_{i=1,2,3}$. As a matter of notation, the columns of the matrix $\bm{R}(s)$ in coordinates are given by the components of the vectors ${\bm{d}_j(s)}$ in the fixed frame $\lbrace\bm{e}_i\rbrace$, namely $\bm{R}_{i,j}(s)=\bm{e}_i\cdot\bm{d}_j(s),\,\,i,j=1,..,3$. Strains are defined as $\bm{u}(s)$, $\bm{v}(s)$ where $\bm{d}_i'=\bm{u}\times\bm{d}_i$, $\bm{r}'=\bm{v}$, with $\bm{u}$ the Darboux vector and the prime denoting the derivative with respect to $s$. Sans-serif font is used to denote components in the director basis (e.g. $\mathsf{u}_i=\bm{u}\cdot\bm{d}_i$), and we write $\bm{\mathsf{u}}=(\mathsf{u}_1,\mathsf{u}_2,\mathsf{u}_3)$, $\bm{\mathsf{v}}=(\mathsf{v}_1,\mathsf{v}_2,\mathsf{v}_3)$, etc. Physically, $\mathsf{u}_1$ and $\mathsf{u}_2$ represent the bending strains and $\mathsf{u}_3$ the twist strain. Analogously, $\mathsf{v}_1$ and $\mathsf{v}_2$ are associated with transverse shearing, whereas $\mathsf{v}_3$ with stretching or compression of the rod. In compact form, we have $\bm{\mathsf{u}}^{\times}(s)=\bm{R}(s)^T \bm{R}'(s)$, $\bm{\mathsf{v}}(s)=\bm{R}(s)^T \bm{r}'(s)$, where $\bm{\mathsf{u}}^{\times}$ is the skew-symmetric matrix or cross product matrix of $\bm{\mathsf{u}}$ having $(1,2)$, $(1,3)$ and $(2,3)$ entries respectively equal to $-\mathsf{u}_3$, $\mathsf{u}_2$ and $-\mathsf{u}_1$. The stresses $\bm{m}(s)$ and $\bm{n}(s)$ are defined as the resultant moment and force arising from averages of the stress field acting across the material cross-section at $\bm{r}(s)$. In the absence of any distributed loading, at equilibrium the stresses satisfy the balance laws ${\bm{{n}}}'=\bm{0}$, ${\bm{{m}}}'+\bm{{r}}'\times\bm{{n}}=\bm{0}$. Equilibrium configurations can be found once constitutive relations are introduced, which we do in a way that facilitates the recovery of the inextensible, unshearable limit tipically adopted in polymer physics. Namely, we consider a pair of functions $W,\,W^*:\mathbb{R}^3\times\mathbb{R}^3\times [0,L]\rightarrow\mathbb{R}$ that (for each $s\in[0,L]$) are strictly convex, dual functions under Legendre transform in their first two arguments, and with $\bm{0}\in\mathbb{R}^6$ their unique global minimum. If $\hat{\bm{\mathsf{u}}}(s)$ and $\hat{\bm{\mathsf{v}}}(s)$ are the strains of the unique energy minimizing configuration $\hat{\bm{q}}(s)$, then, $\forall\epsilon>0$ we introduce the Hamiltonian function $H=W^*(\bm{\mathsf{m}},\epsilon\bm{\mathsf{n}};s)+\bm{\mathsf{m}}\cdot\hat{\bm{\mathsf{u}}}+\bm{\mathsf{n}}\cdot\hat{\bm{\mathsf{v}}}$, and the constitutive relations are $\bm{\mathsf{u}}={\partial H}/{\partial \bm{\mathsf{m}}}=W_1^*(\bm{\mathsf{m}},\epsilon\bm{\mathsf{n}};s)+\hat{\bm{\mathsf{u}}}$, $\bm{\mathsf{v}}={\partial H}/{\partial\bm{\mathsf{n}}}=\epsilon W_2^*(\bm{\mathsf{m}},\epsilon\bm{\mathsf{n};s})+\hat{\bm{\mathsf{v}}}$, which can be inverted to obtain $\bm{\mathsf{m}}=W_1(\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}},\frac{\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}}{\epsilon};s)$, $\bm{\mathsf{n}}=\frac{1}{\epsilon}W_2(\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}},\frac{\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}}{\epsilon};s)$, where the Lagrangian $W(\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}},\frac{\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}}{\epsilon};s)$ defines the elastic potential energy of the system as $\int_0^L{W(\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}},\frac{\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}}{\epsilon};s)}\,\text{d} s$. Notice the use of the subscripts to denote partial derivatives with respect to the first or second component. The standard case of linear constitutive relations arises when $W^*(\bm{\mathsf{x}};s)=\frac{1}{2}\bm{\mathsf{x}}\cdot\bm{\mathcal{R}}(s)\bm{\mathsf{x}}$ and $W(\bm{\mathsf{y}};s)=\frac{1}{2}\bm{\mathsf{y}}\cdot\bm{\mathcal{P}}(s)\bm{\mathsf{y}}$ for $\bm{\mathsf{x}}$,$\,\bm{\mathsf{y}}\,\in\mathbb{R}^6$, where $\mathbb{R}^{6\times 6}\ni\bm{\mathcal{P}}^{-1}(s)=\bm{\mathcal{R}}(s)=\bm{\mathcal{R}}(s)^T>0$, with $\bm{\mathcal{P}}(s)$ a general nonuniform stiffness matrix and $\bm{\mathcal{R}}(s)$ the corresponding compliance matrix. For each $\epsilon>0$ and given $W$, $W^*$, we arrive at a well-defined Cosserat rod theory, where, e.g., the full potential energy of the system might include end-loading terms of the form $\bm{\lambda}\cdot(\bm{r}(L)-\bm{r}(0))$, $\bm{\lambda}\in\mathbb{R}^3$. The point of the above formulation is that the Hamiltonian and associated constitutive relations behave smoothly in the limit $\epsilon\rightarrow 0$, which imply the unshearability and inextensibility constraint on the strains ${\bm{\mathsf{v}}}(s)=\hat{\bm{\mathsf{v}}}(s)$, where $\hat{\bm{\mathsf{v}}}(s)$ are prescribed. This is precisely a Kirchhoff rod model, abbreviated as $(\mathtt{K})$, in contrast to $(\mathtt{C})$ for Cosserat. However, the $\epsilon\rightarrow 0$ limit of the $(\mathtt{C})$ Lagrangian is not smooth; rather the potential energy density for the $(\mathtt{K})$ rod is the Legendre transform of $W^*(\bm{\mathsf{m}},\bm{0};s)+\bm{\mathsf{m}}\cdot\hat{\bm{\mathsf{u}}}+\bm{\mathsf{n}}\cdot\hat{\bm{\mathsf{v}}}$ w.r.t. $\bm{\mathsf{m}}\in\mathbb{R}^3$, or $W^{(\mathtt{K})}({\bm{\mathsf{u}}}-\hat{\bm{\mathsf{u}}};s)-{\bm{\mathsf{n}}}\cdot\hat{\bm{\mathsf{v}}}$. In the case of linear elasticity for a $(\mathtt{C})$ rod with $\bm{\mathcal{P}}=\begin{small}\begin{pmatrix} \bm{\mathcal{K}} & \bm{\mathcal{B}} \\ \bm{\mathcal{B}}^T & \bm{\mathcal{A}} \end{pmatrix}\end{small}$ and $\bm{\mathcal{K}}$, $\bm{\mathcal{B}}$, $\bm{\mathcal{A}}$ in $\mathbb{R}^{3\times 3}$, the $(1,1)$ block of the compliance matrix is $\bm{\mathcal{R}}_{1,1}=(\bm{\mathcal{K}}-\bm{\mathcal{B}}\bm{\mathcal{A}}^{-1}\bm{\mathcal{B}}^T)^{-1}$ and $W^{(\mathtt{K})}({\bm{\mathsf{u}}}-\hat{\bm{\mathsf{u}}};s)=\frac{1}{2}(\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}})\cdot\bm{\mathcal{K}}^{(\mathtt{K})}(s)(\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}})$, with $\bm{\mathcal{K}}^{(\mathtt{K})}={\bm{\mathcal{K}}^{(\mathtt{K})}}^T=\bm{\mathcal{R}}_{1,1}^{-1}>0$. Uniform helical WLC models are recovered in the case of a uniform $(\mathtt{K})$ rod when $\hat{\bm{\mathsf{u}}}(s)$, $\hat{\bm{\mathsf{v}}}(s)$ and $\bm{\mathcal{K}}^{(\mathtt{K})}(s)$ are all taken to be constant. (For any uniform rod, $(\mathtt{C})$ or $(\mathtt{K})$, the Hamiltonian function is constant along equilibria). Linearly elastic $(\mathtt{K})$ rods are (transversely) isotropic when $\bm{\mathcal{K}}^{(\mathtt{K})}(s)=\text{diag}(k_1(s),k_2(s),k_3(s))$ with $k_1=k_2$ and $\hat{{\mathsf{u}}}_1=\hat{{\mathsf{u}}}_2=\hat{{\mathsf{v}}}_1=\hat{{\mathsf{v}}}_2=0$. Then $\mathsf{m}_3$ is constant on equilibria, and the potential energy reduces to a function of the square geometrical curvature $\kappa(s)$ of the curve $\frac{1}{2}\int_0^L{[k_1\kappa^2+k_3(\mathsf{u}_3-\hat{\mathsf{u}}_3)^2}]\,\text{d} s$ (where it should be noted that $\mathsf{u}_3(s)$ is still the twist of the $\lbrace\bm{d}_i\rbrace$ frame which is not directly related to the geometrical torsion of the Frenet framing of the rod centerline). The WLC model arises when $k_1(s)$ is constant and the twist moment $\mathsf{m}_3$ vanishes. There is an extensive literature concerning the study of equilibria of a given elastic rod. Numerically this involves the solution of a two-point boundary value problem (BVP), which can reasonably now be regarded as a straightforward well-understood procedure. Often coordinates on $SO(3)$ are introduced and the resulting system of second-order Euler Lagrange equations associated with the potential energy is solved numerically. We adopt an Euler parameters (or quaternions) parametrization of $SO(3)$, but solve the associated first-order canonical Hamiltonian system subject to appropriate (self-adjoint) two-point BCs, so that the inextensible, unshearable $(\mathtt{K})$ rod is a simple smooth limit of the extensible, shearable $(\mathtt{C})$ case. In this article we are primarly interested in the two specific BVPs, denoted respectively by $(\mathtt{f})$ and $(\mathtt{m})$: \begin{equation}\label{f} (\mathtt{f})\quad\bm{r}(0)=\bm{0},\,\,\bm{R}(0)=\mathbb{1},\,\,\bm{r}(L)=\bm{r}_L,\,\,\bm{R}(L)=\bm{R}_L, \end{equation} \begin{equation}\label{m} (\mathtt{m})\quad\bm{r}(0)=\bm{0},\,\,\,\bm{R}(0)=\mathbb{1},\,\,\,\bm{r}(L)=\bm{r}_L,\,\,\,\bm{m}(L)=\bm{0}. \end{equation} The BVP $(\mathtt{f})$ arises in modelling looping in $SE(3)$ including the particular case of cyclization where $\bm{r}_L=\bm{0}$ and $\bm{R}_L=\mathbb{1}$. The BVP $(\mathtt{m})$ arises in modelling looping in $\mathbb{R}^3$, where the value of $\bm{R}_L$ is a variable left free, over which one marginalises. In general, for rod two-point BVPs, equilibria with given BCs are non-unique. For isotropic or uniform rods, and for specific choices of $\bm{r}_L$ and $\bm{R}_L$ in $(\mathtt{f})$ and $(\mathtt{m})$, equilibria can arise in continuous isoenergetic families \cite{RING}, a case of primary interest here. As we assume hyper-elastic constitutive relations with \begin{equation}\label{energy} E(\bm{q})=\int_0^L{W(\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}},{\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}};s)}\,\text{d} s, \end{equation} stability of rod equilibria can reasonably be discussed dependent on whether an equilibrium is a local minimum of the associated potential energy variational principle. For $(\mathtt{C})$ rods classification of which equilibria are local minima has a standard and straightforward solution. The second variation $\delta^2E$ is a quadratic functional of the perturbation field $\bm{\mathsf{h}}=(\delta\bm{\mathsf{c}},\delta\bm{\mathsf{t}})$, where $\bm{\mathsf{q}}(s)=(\bm{\mathsf{c}}(s),\bm{\mathsf{t}}(s))\in\mathbb{R}^6$ is a given parametrisation of $SE(3)$ for the configuration variable in the director basis which will be specified later in the article, and reads as \begin{equation}\label{sec} \delta ^2 E=\int_0^L{\left({\bm{\mathsf{h}}'}\cdot\bm{\mathsf{P}}\bm{\mathsf{h}}'+2{\bm{\mathsf{h}}'}\cdot{\bm{\mathsf{C}}}\bm{\mathsf{h}}+\bm{\mathsf{h}}\cdot{\bm{\mathsf{Q}}}\bm{\mathsf{h}}\right)}\,\text{d}s, \end{equation}% where $\bm{\mathsf{P}}(s)$, ${\bm{\mathsf{C}}}(s)$ and ${\bm{\mathsf{Q}}}(s)$ are coefficient matrices in $\mathbb{R}^{6\times 6}$ computed at any equilibrium. The Jacobi equations are the (second-order) system of Euler-Lagrange equations for (Eq.~\ref{sec}), or equivalently the linearisation of the original Euler-Lagrange equations for the potential energy variational principle. One then solves a $6\times 6$ matrix valued system, namely an initial value problem for the Jacobi equations with initial conditions coinciding with the ones given later in the article when computing probability densities from Jacobi fields (shooting towards $s=0$, where in both $(\mathtt{f})$ and $(\mathtt{m})$ Dirichlet BCs are present; the case with Neumann BCs at both ends is more delicate \cite{NEU}). Provided that the determinant of the matrix solution does not vanish in $[0,L)$, then there is no conjugate point and the equilibrium is a local minimum \cite{JHMStab,ISO,HEL}. As described fully in \cite{JHMT}, the constrained case of $(\mathtt{K})$ is more subtle and a theory dating back to Bolza for isoperimetrically constrained calculus of variations must be applied \cite{BOLZA}. However, the Hamiltonian version of the Jacobi equations for rods (just like the Hamiltonian version of the Euler-Lagrange equilibrium equations) has a smooth limit as $\epsilon\rightarrow 0$, and the limit corresponds to the Hamiltonian formulation of the Bolza conjugate point conditions as described in \cite{ISO}. The Jacobi equations in first-order Hamiltonian form are written as \begin{equation}\label{JacHam} \begin{pmatrix} {{\bm{\mathsf{H}}'}} \\ {{\bm{\mathsf{M}}'}} \end{pmatrix} =\bm{J}{{\bm{\mathsf{E}}}}\begin{pmatrix} {{\bm{\mathsf{H}}}} \\ {{\bm{\mathsf{M}}}} \end{pmatrix}, \end{equation} with the Hamiltonian skew-symmetric matrix $\bm{J}=\begin{pmatrix} \mathbb{0} & \mathbb{1}\\ -\mathbb{1} & \mathbb{0} \end{pmatrix}\in\mathbb{R}^{12\times 12}$, $\bm{\mathsf{E}}(s)$ the symmetric matrix driving the system which will be detailed later on, and $\bm{\mathsf{M}}(s)\in\mathbb{R}^{6\times 6}$ the conjugate variable of the Jacobi fields $\bm{\mathsf{H}}(s)$ under the Legendre transform. In the following, we assume the existence and stability of the minimizers of the elastic energy (Eq.~\ref{energy}) $\bm{q}^f$ and $\bm{q}^m$ satisfying the BCs $(\mathtt{f})$ in (Eq.~\ref{f}) and $(\mathtt{m})$ in (Eq.~\ref{m}) respectively. Notice that the intrinsic configuration of the rod $\hat{\bm{q}}$ is itself a minimizer (global) satisfying \begin{equation}\label{hat} \bm{r}(0)=\bm{0},\,\,\,\bm{R}(0)=\mathbb{1},\,\,\,\bm{n}(L)=\bm{m}(L)=\bm{0}. \end{equation} Stability of equilibria is not the focus of this article, but we will show that the volume of certain Jacobi fields, i.e., the actual (positive) value of a Jacobi determinant, plays a central role in the evaluation formula for the quadratic path integrals that arise in our Laplace approximations to looping probabilities. The connection between Jacobi fields and quadratic imaginary path integrals is well known in the case that the coefficient matrix ${\bm{\mathsf{C}}}(s)$ in the cross-terms in (Eq.~\ref{sec}) vanishes (or is symmetric and so can be integrated away). By contrast, for elastic rods a non-symmetric ${\bm{\mathsf{C}}}(s)$ is typically present and the approach of Papadopoulos \cite{PAP1} is required to evaluate the quadratic path integrals, and as described in \cite{LUD, LUDT} a further Riccati transformation for the Papadopoulos solution formula is necessary to recover a Jacobi fields expression. Moreover, in \cite{2020} the latter studies are generalised for different choices of BCs on the paths, in particular for dealing with the partition function and solving the marginalised problem. The main contributions of this article are to demonstrate that the approach of \cite{LUD, LUDT} for conditional probability densities can be extended in two ways. First, isolated equilibria to BVP $(\mathtt{m})$ can be treated, in addition to the case of isolated equilibria to BVP $(\mathtt{f})$, and second, the case of non-isolated equilibria of both BVP $(\mathtt{f})$ and $(\mathtt{m})$ (as arises for isotropic rods) can be handled by appropriately generalising a particular regularization procedure \cite{MCK, FAL} within Forman's theorem in the field of functional determinants \cite{FORM}. Furthermore, the underlying physical phenomena arising from the different cases are discussed and explained within some guiding examples. \section{A preview of the examples considered} \begin{figure*} \subfigure[]{\includegraphics[width=.32\textwidth]{fig0.pdf}}\qquad\qquad \subfigure[]{\includegraphics[width=.32\textwidth]{fig1.pdf}} \caption{The thick lines represent the pairs of isolated minima for the non-isotropic case; the manifolds of minimizers for the isotropic case are displayed accordingly. In panel (a) the solutions for the $(\mathtt{f})$ case are the same for $(\mathtt{K})$ and $(\mathtt{C})$ rods. In panel (b) we underline the effect of shear and extension for the $(\mathtt{m})$ case, which modifies the red solutions $(\mathtt{K})$ into the green ones $(\mathtt{C})$.} \label{fig1} \end{figure*} The method developed in the present article will be applied, as a fundamental example, to a linearly elastic, uniform, with diagonal stiffness matrix, intrinsically straight and untwisted rod ($\bm{\mathcal{P}}(s)=\bm{\mathcal{P}}=$ diag $\lbrace k_1,k_2,k_3,a_1,a_2,a_3\rbrace$, $\hat{\bm{\mathsf{u}}}=\bm{0}$, $\hat{\bm{\mathsf{v}}}=(0,0,1)$). Neither intrinsic shear nor extension is present. Since we are primarily interested in ring-closure or cyclization probabilities, we look for minimizers of the energy satisfying the BCs reported in (Eq.~\ref{f}), (Eq.~\ref{m}) with $\bm{r}_L=\bm{0}$ and $\bm{R}_L=\mathbb{1}$. First, we consider a non-isotropic rod ($k_1\neq k_2$), further assuming w.o.l.o.g. that $k_1<k_2$. For the case of full looping $(\mathtt{f})$, there exist two circular, untwisted, isolated minima $\bm{{q}}^f$ lying on the $y-z$ plane characterised by $\bm{\mathsf{u}}^f=(\pm{2\pi}/{L},0,0)$ and $\bm{\mathsf{v}}^f=(0,0,1)$. In particular, the one having non-positive $y$ coordinate is given by $\bm{r}^f(s)=\frac{L}{2\pi}(0,\cos{({2\pi s}/{L})}-1,\sin{({2\pi s}/{L})})$ and the rotation matrix $\bm{R}^f(s)$ is a counterclockwise planar rotation about the $x$ axis of an angle $\varphi^f(s)={2\pi s}/{L}$, $s\in[0,L]$. Consequently, $\bm{\mathsf{u}}^f=({2\pi}/{L},0,0)$, $\bm{\mathsf{m}}^f=({2\pi k_1}/{L},0,0)$, $\bm{\mathsf{v}}^f=(0,0,1)$, $\bm{\mathsf{n}}^f=\bm{0}$ and the energy is simply computed as $E(\bm{{q}}^f)={2\pi^2 k_1}/{L}$. We observe that these solutions are special for the fact of being the same both for $(\mathtt{K})$ and $(\mathtt{C})$ rods, which is not the case in general. By contrast, there are no simple analytical expressions for the two planar and untwisted teardrop shaped isolated minimizers $\bm{{q}}^m$ involved in the marginal looping problem $(\mathtt{m})$, and elliptic functions or numerics must be used. For example, in the $(\mathtt{K})$ case, the rotation angle $\varphi^m(s)$ can be derived using elliptic functions in terms of the constant unknown force $\bm{n}^m=(0,n2,n3)$ \cite{AN1, AN2, AN3}. It is important to underline that here in $(\mathtt{m})$ the solutions for $(\mathtt{K})$ and $(\mathtt{C})$ rods are different, since the latter are characterised by $\bm{\mathsf{v}}^m=(0,\mathsf{v}_2^m(s)\neq 0,\mathsf{v}_3^m(s)\neq 1)$. The qualitative shapes of the minimal energy configurations are reported in Fig.\ref{fig1}. To be precise, among the equilibria satisfying the BCs for the $(\mathtt{f})$ and $(\mathtt{m})$ cases, there are also equilibria with figure eight centerlines, but in the present study their contributions will be neglected because of their higher elastic energy. Moreover, a detailed stability analysis should be carried out, and it is possible to show that the circle and teardrop solutions are stable, with exceptions for the $(\mathtt{C})$ rod in the limit of the undeformed length $L$ going to zero, where bifurcations occur. In particular, the ``compressed'' trivial solution $\bm{q}^c$, characterised by $\bm{r}^c=\bm{0}$, $\bm{R}^c=\bm{\mathbb{1}}$, $\bm{\mathsf{u}}^c=\bm{0}$, $\bm{\mathsf{m}}^c=\bm{0}$, $\bm{\mathsf{v}}^c=\bm{0}$, $\bm{\mathsf{n}}^c=(0,0,-a_3)$ with energy $E(\bm{{q}}^c)={a_3 L}/{2}$, starts to play an important role (this is not mentioned in \cite{LUD}). We will show that for the full $(\mathtt{C})$ case it exists $L^f>0$ such that the latter solution becomes stable and has lower energy than the circular minimizer $\bm{q}^f$ if $0<L<L^f$. In this regime the system will be mainly driven by the compressed solution (even if the circle remains stable). Moreover, for the marginal $(\mathtt{C})$ case, it exists $L^m>0$ such that the stable teardrop solution $\bm{q}^m$ ceases to exist in the interval $0<L<L^m$, merging with the compressed solution which becomes stable. In both the cases, this observation will have a strong impact on the trend of the cyclization probability densities, that is confirmed by MC simulations. In addition to the above statements, the isotropic case requires a more detailed analysis for the presence of a continuous symmetry. Namely, for a general linearly elastic (transversely) isotropic $(\mathtt{C})$ rod defined by $\bm{\mathcal{P}}(s)=\text{diag}(k_1(s),k_2(s),k_3(s),a_1(s),a_2(s),a_3(s))$ with $k_1=k_2$, $a_1=a_2$ and $\hat{{\mathsf{u}}}_1=\hat{{\mathsf{u}}}_2=\hat{{\mathsf{v}}}_1=\hat{{\mathsf{v}}}_2=0$, it is known \cite{RING} that for cyclization BCs $(\mathtt{f})$ in (Eq.~\ref{f}) and $(\mathtt{m})$ in (Eq.~\ref{m}) the equilibria are non-isolated and form a manifold obtained, starting from a known solution, by a rigid rotation of the rod of an angle $\theta$ about the $z$ axis and a subsequent rotation of the framing by an angle $-\theta$ about $\bm{d}_3(s)$, for $\theta\in[0,2\pi)$. As a consequence, in our particular examples, once selected e.g. the non-isotropic solution lying in the $y-z$ plane, $y\leq 0$ and characterized by the configuration $(\bm{R}(s),\,\,\bm{r}(s))$, $s\in[0,L]$, then we get an entire family of minimizers $\bm{R}(s;\theta)=\bm{Q}_{\theta}\bm{R}(s)\bm{Q}^T_{\theta}$, $\bm{r}(s;\theta)=\bm{Q}_{\theta}\bm{r}(s)$, where $\bm{Q}_{\theta}$ is defined as the counterclockwise planar rotation matrix about the $z$ axis of an angle $\theta\in[0,2\pi)$ (Fig.\ref{fig1}). As a side note for the $(\mathtt{f})$ example, being the circular solutions the same for $(\mathtt{K})$ and $(\mathtt{C})$ rods, the isotropy symmetry arises even if $a_1\neq a_2$. Furthermore, for a general linearly elastic uniform rod, for which the stiffness matrix $\bm{\mathcal{P}}$ and the intrinsic strains $\hat{\bm{\mathsf{u}}}$, $\hat{\bm{\mathsf{v}}}$ are independent of $s$, another continuous symmetry is present for the cyclization BCs $(\mathtt{f})$ in (Eq.~\ref{f}). In fact, starting from a known solution characterized by the configuration $(\bm{R}(s),\,\,\bm{r}(s))$, $s\in[0,L]$, it is possible to obtain a family of equilibria parametrised by $s^*\in[0,L)$ in the following way: select $s^*\in[0,L)$, rigidly translate the rod by $-\bm{r}(s^*)$, reparametrise the rod using the parameter $t\in[0,L]$ such that $s=t+s^*$ $(\text{mod}\,\,L)$, rigidly rotate the rod about the origin by means of $\bm{R}^T(s^*)$. However, in our uniform examples, the symmetry of uniformity is not playing any role, due to the circular centerline of the minimizers which is a fixed point of the transformation and, in the marginal case, to the impossibility of satisfying the condition $\bm{m}^m(L)=\bm{0}$ after the application of the symmetry. In the present article we will deal with only one symmetry parameter, namely $\theta\in[0,2\pi)$ associated to isotropic rods. Nevertheless, the theory can be applied to the uniformity symmetry alone and generalised to cases in which isotropy and uniformity allow the coexistence of two non-degenerate symmetry parameters $(\theta,\,s^*)$ generating a manifold of equilibria isomorphic to a torus, as it is the case of figure eight minimizers with $(\mathtt{f})$ cyclization BCs. Finally, notice that in the following theory there is no assumption either of uniformity of the rod, nor, in general, of a straight intrinsic shape. \section{Fluctuating elastic rods and the path integral formulation} Let us consider now an elastic rod at thermodynamic equilibrium with a heat bath in absence of external forces, assuming w.l.o.g. that $\bm{q}(0)=\bm{q}_0=(\mathbb{1},\bm{0})$. Then, given a prescribed $\bm{q}_L=(\bm{R}_L,\bm{r}_L)\in SE(3)$, we formulate the problem of computing a conditional probability density function (pdf) for the other end of the rod to satisfy at $s=L$ either $\bm{q}(L)=\bm{q}_L$, or the weaker condition $\bm{r}(L)=\bm{r}_L$. The first case gives rise to a conditional pdf $(\mathtt{f})$ over the space $SE(3)$, whereas the second one represents the $\mathbb{R}^3$-valued marginal $(\mathtt{m})$ over the final rotation variable, with no displacement constraint on $\bm{R}(L)$. If a polymer interacts with a solvent heat bath, the induced thermal motion gives rise to a stochastic equilibrium that we model making use of a Boltzmann distribution on rod configurations satisfying $\bm{q}(0)=\bm{q}_0$ \cite{LUD, LUDT}, of the form ${\mathcal{Z}^{-1}}{e^{-\beta E(\bm{q}(s))}}$, with $\beta$ the inverse temperature and $\mathcal{Z}$ the partition function of the system. A precise treatment of the previous expression requires the introduction of the path integral formalism \cite{BookFeynman, BookChaichian, BookSchulman, BookWiegel}. Namely, the $SE(3)$ and $\mathbb{R}^3$ densities $\rrf$ and $\rrm$ are respectively given as the ratios of infinite dimensional Wiener integrals \cite{2020}: \begin{equation}\label{dens} \rrf(\bm{q}_L,L|\bm{q}_0,0)=\frac{\mathcal{K}_f}{\mathcal{Z}},\quad\rrm(\bm{r}_L,L|\bm{q}_0,0)=\frac{\mathcal{K}_m}{\mathcal{Z}}, \end{equation} \begin{equation}\label{pathint} {\mathcal{K}_f}=\int\limits_{\bm{q}(0)=\bm{q}_0}^{\bm{q}(L)=\bm{q}_L}{e^{-\beta E(\bm{q})}\,\mathcal{D}\bm{q}},\,\,\,{\mathcal{K}_m}=\int\limits_{\bm{q}(0)=\bm{q}_0}^{\bm{r}(L)=\bm{r}_L}{e^{-\beta E(\bm{q})}\,\mathcal{D}\bm{q}}. \end{equation}% The limits of integration are dictated by the BCs (Eq.~\ref{f}) and (Eq.~\ref{m}) respectively and $\mathcal{Z}$ is a path integral over all paths with BCs given in (Eq.~\ref{hat}) that guarantees the normalisation condition: \begin{equation}\label{normex} \mathcal{Z} = \int\limits_{\bm{q}(0)=\bm{q}_0}{e^{-\beta E(\bm{q})}\,\mathcal{D}\bm{q}}, \end{equation} $\int_{SE(3)}{\rrf(\bm{q}_L,L|\bm{q}_0,0)}\,\text{d} \bm{q}_L=\int_{\mathbb{R}^3}{\rrm(\bm{r}_L,L|\bm{q}_0,0)}\,\text{d} \bm{r}_L=1$. The prescriptions $\bm{m}(L)=\bm{0}$ for $\mathcal{K}_m$ and $\bm{m}(L)=\bm{n}(L)=\bm{0}$ for $\mathcal{Z}$ account for Neumann natural BCs at $s=L$ and concern the minimizers. We stress that it is key that at this stage the model is an extensible, shereable rod, namely with $(\mathtt{C})$ energy (Eq.~\ref{energy}), otherwise the problem could not be expressed as simple BCs at $s=0$ and $s=L$. Moreover, to apply all the path integral machinery, we first have to deal with the rotation group $SO(3)$, being part of the configuration variable $\bm{q}(s)=(\bm{R}(s),\bm{r}(s))$, which gives rise to a manifold structure that should be treated carefully in order to recover eventually a ``flat space" formulation. For an explicit evaluation of the path integrals in (Eq.~\ref{pathint}) and (Eq.~\ref{normex}), in the following we introduce appropriate coordinates in $SE(3)$. As done originally by Feynman \cite{BookFeynman}, a path integral can be defined via a ``time slicing'' procedure, or ``parameter slicing'' in our case, which is to replace the infinite-dimensional integral $\mathcal{D}\bm{q}$ with the limit for $n\rightarrow\infty$ of $n$ iterated finite-dimensional integrals $\prod\limits_{j=1}^{n}{\text{d} \bm{q}_j}$. These have to be performed on the space of framed curves, whose measure can be chosen to be the product of the Lebesgue measure on the three-dimensional euclidean space $E(3)$ and of the Haar bi-invariant measure on $SO(3)$, which may be uniquely defined up to a constant factor \cite{BookSattinger, BookTung}. In order to avoid difficulty that can arise from the non simple connectivity of $SO(3)$, it is often convenient to consider instead its universal (double) covering $SU(2)$. Any matrix in $SU(2)$ can be parametrized by a quadruple of real numbers $\bm{\gamma}=(\gamma_1,\gamma_2,\gamma_3,\gamma_4)$ living on the unit sphere $S^3$ in $\mathbb{R}^4$, i.e. $\bm{\gamma}\cdot\bm{\gamma}=1$. The latter quadruple is know as a unit quaternion or a set of Euler parameters \cite{HAM}. Recalling that by Euler’s theorem each element of SO(3) is equivalent to a rotation of an angle $\varphi$ about a unit vector $\bm{w}$, the Euler parameters are expressed as a function of $\varphi$ and $\bm{w}$ as $\gamma_4=\cos{\left(\varphi/{2}\right)}$, $\gamma_i=w_i\sin{\left({\varphi}/{2}\right)}$, $i=1,2,3$. Hence $\bm{\gamma}$ and $-\bm{\gamma}$ encode the same rotation matrix and the correspondence from $SU(2)$ to $SO(3)$ is 2 to 1. Referring to \cite{LUDT}, for parametrising the group of proper rotations we restrict ourself to one hemisphere of the unit sphere $S^3$ in $\mathbb{R}^4$, and we introduce the matrices $\bm{B}_1$, $\bm{B}_2$ and $\bm{B}_3$ satisfying the algebra $\bm{B}_j\bm{B}_k=-\delta_{jk}\bm{\mathbb{1}}-\bm{\epsilon}_{ijk}\bm{B}_i$, where $\bm{\epsilon}_{ijk}$ is the total antisymmetric or Levi-Civita tensor and summation over equal indices is intended. Furthermore, given a unit quaternion $\bar{\bm{\gamma}}$, $\lbrace \bm{B}_1\bar{\bm{\gamma}},\bm{B}_2\bar{\bm{\gamma}},\bm{B}_3\bar{\bm{\gamma}},\bar{\bm{\gamma}}\rbrace$ is an orthonormal basis of $\mathbb{\bm{R}}^4$ and each quadruple of Euler parameters $\bm{\gamma}$ (hence each rotation) can be expressed in coordinates with respect to the latter basis. In particular, for one hemisphere of $S^3$, we consider the new variable $\bm{\mathsf{b}}=(\mathsf{b}_1,\mathsf{b}_2,\mathsf{b}_3)\in {B}_1^3$ living in the open ball of $\mathbb{R}^3$ such that $\bm{\gamma}(\bm{\mathsf{b}})=\sum\limits_{i=1}^3{\mathsf{b}_i\bm{B}_i\bar{\bm{\gamma}}}+\sqrt{1-\Vert \bm{\mathsf{b}}\Vert^2}\bar{\bm{\gamma}}$. Therefore, $\bm{\gamma}(\bm{\mathsf{b}})$ defines a $1$-to-$1$ parametrisation of $SO(3)$, adapted to the rotation expressed by the unit quaternion $\bar{\bm{\gamma}}$, meaning that $\bm{\gamma}(\bm{\mathsf{b}}=\bm{0})=\bar{\bm{\gamma}}$. To be precise, we should remark that the image of such a parametrisation does not include the elements lying on a maximal circle (which depends on $\bar{\bm{\gamma}}$) of the unit sphere in $\mathbb{R}^4$, since $SO(3)$ is not simply connected and rotations about a generic axis of a fixed angle are inevitably neglected. For Euler parameters, the infinitesimal measure is given by $\text{d} \bm{q}_j=\delta\left(1-\Vert\bm{\gamma}_j\Vert^2\right)\text{d} \bm{\gamma}_j\,\text{d} \bm{r}_j$, so that the Haar volume measure on $SO(3)$ becomes a surface measure on $S^3$ \cite{BookTung}. Thus, the parametrisation $\bm{\phi}=\bm{\gamma}(\bm{\mathsf{b}}):{B}_1^3\subseteq\mathbb{R}^3\rightarrow\mathcal{M}\subseteq\mathbb{R}^4,$ with $\mathcal{M}$ an hemisphere of $S^3$, naturally induces a metric tensor $\bm{\mathsf{g}}$ on the tangent space at each point of $\mathcal{M}$. Denoting the coordinate vectors as $\bm{\phi}_i=\frac{\partial\bm{\phi}}{\partial\mathsf{b}_i}$, $i=1,2,3$, the components of the metric tensor are given by ${\mathsf{g}}_{i,k}=\bm{\phi}_i\cdot\bm{\phi}_k$, $i,k=1,2,3$, and we get $\bm{\mathsf{g}}(\bm{\mathsf{b}})=\bm{\mathbb{1}}+{\bm{\mathsf{b}}\otimes\bm{\mathsf{b}}}/({1-\Vert\bm{\mathsf{b}}\Vert^2})$, $\text{d} \bm{q}_j=\sqrt{\det{[\bm{\mathsf{g}}(\bm{\mathsf{b}}_j)]}}\,\text{d} \bm{\mathsf{b}}_j\,\text{d} \bm{r}_j$ with the metric correction being equal to ${1}/{\sqrt{1-\Vert\bm{\mathsf{b}}_j\Vert^2}}$. Lastly, in order to deal with variables defined in the whole of $\mathbb{R}^3$, we introduce the Gibbs vector $\bm{\mathsf{c}}=\bm{\mathsf{b}}/(\sqrt{1-\Vert \bm{\mathsf{b}}\Vert^2})$. As a consequence, we have derived a $\bar{\bm{\gamma}}$-adapted parametrization of $SE(3)$ denoted by $\bm{\mathsf{q}}(s)=(\bm{\mathsf{c}}(s),\bm{\mathsf{t}}(s))\in\mathbb{R}^6$ as \begin{equation}\label{par} \bm{\gamma}(\bm{\mathsf{c}})=\frac{1}{\sqrt{1+\Vert \bm{\mathsf{c}}\Vert^2}}\left(\sum\limits_{i=1}^3{\mathsf{c}_i\bm{B}_i\bar{\bm{\gamma}}}+\bar{\bm{\gamma}}\right),\,\,\,\bm{\mathsf{t}}=\bm{R}(\bar{\bm{\gamma}})^T\bm{r}, \end{equation} with $\bm{\mathsf{c}}=(\mathsf{c}_1,\mathsf{c}_2,\mathsf{c}_3)\in\mathbb{\bm{R}}^3$ and $\bm{R}(\bar{\bm{\gamma}})$ the rotation matrix expressed by $\bar{\bm{\gamma}}$. In particular, exploiting the Feynman discrete interpretation of the path integral measure, \cite{BookFeynman} \begin{equation}\label{par2} \begin{split} \bm{\mathsf{g}}(\bm{\mathsf{c}})=\frac{\bm{\mathbb{1}}}{1+\Vert\bm{\mathsf{c}}\Vert^2}-\frac{\bm{\mathsf{c}}\otimes\bm{\mathsf{c}}}{\left(1+\Vert\bm{\mathsf{c}}\Vert^2\right)^2},\quad\qquad\\ \text{d} \bm{q}_j=\sqrt{\det{[\bm{\mathsf{g}}(\bm{\mathsf{c}}_j)]}}\,\text{d} \bm{\mathsf{c}}_j\,\text{d} \bm{\mathsf{t}}_j=\frac{1}{\left(1+\Vert\bm{\mathsf{c}}_j\Vert^2\right)^2}\,\text{d} \bm{\mathsf{c}}_j\,\text{d} \bm{\mathsf{t}}_j. \end{split} \end{equation} The latter results are implemented by choosing three different curves of unit quaternions $\bar{\bm{\gamma}}(s)$ to be the curves defined by the rotation component ${\bm{R}}(\bar{\bm{\gamma}})$ of the minimizers $\bm{q}^f$, $\bm{q}^m$ and $\hat{\bm{{q}}}$ respectively, which characterise the three different parametrisations involved in the computation of $\mathcal{K}_f$, $\mathcal{K}_m$ and $\mathcal{Z}$ in view of the semi-classical approximation. Then, replacing the configuration variable $\bm{q}(s)\in SE(3)$ with the sans-serif fonts $\bm{\mathsf{q}}(s)\in \mathbb{R}^6$, we can formally write the integrand and measure in (Eq.~\ref{pathint}) and (Eq.~\ref{normex}) as $e^{-\beta E(\bm{\mathsf{q}})}\sqrt{\det{[\bm{\mathsf{g}}(\bm{\mathsf{c}})]}}\,\mathcal{D}\bm{\mathsf{q}}$. The treatment of the metric factor relies on the introduction of real-valued ghost fields for exponentiating the measure, as can be found in \cite{GHO}. This means rewriting the factor as a Gaussian path integral in the ghost field $\bm{\mathsf{z}}(s)\in\mathbb{R}^3$ satisfying $\bm{\mathsf{z}}(0)=\bm{0}$ with energy $\frac{1}{2}\int_0^L{\bm{\mathsf{z}}^T\bm{\mathsf{g}}^{-1}(\bm{\mathsf{c}})\bm{\mathsf{z}}\,\text{d}s}$. After that, we consider the path integral expressions in the joint variable $\bm{\mathsf{w}}=(\bm{\mathsf{q}},\bm{\mathsf{z}})$, e.g., \begin{equation}\label{curved} \mathcal{K}_f=\int\limits_{\bm{\mathsf{w}}(0)=(\bm{\mathsf{q}}_0,\bm{0})}^{\bm{\mathsf{q}}(L)=\bm{\mathsf{q}}_L}{e^{-\beta\big[E(\bm{\mathsf{q}}(s))+\frac{1}{2}\int_0^L{\bm{\mathsf{z}}(s)^T\bm{\mathsf{g}}^{-1}(\bm{\mathsf{c}}(s))\bm{\mathsf{z}}(s)\,\text{d}s}\big]}\,\mathcal{D}\bm{\mathsf{w}}}. \end{equation} In the following, even if the theory could be given in principle for a general strain energy density $W$, in order to perform concrete computations we refer to the case of linear elasticity, where $W$ is a quadratic function of the shifted strains, driven by the stiffness matrix $\bm{\mathcal{P}}(s)$: \begin{equation}\label{energylin} E(\bm{\mathsf{q}})=\frac{1}{2}\int_0^L{ \begin{pmatrix} \bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}} \\ {\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}} \end{pmatrix}^T \begin{pmatrix} \bm{\mathcal{K}} & \bm{\mathcal{B}} \\ \bm{\mathcal{B}}^T & \bm{\mathcal{A}} \end{pmatrix} \begin{pmatrix} \bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}} \\ {\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}} \end{pmatrix}}\text{d} s. \end{equation} Moreover, we also refer to the particular looping case of ring-closure or cyclization, evaluating $\rrf$ at $\bm{q}_L=\bm{q}_0$ and the marginal $\rrm$ at $\bm{r}_L=\bm{0}$; the same conditions apply to the minimizers. \section{Looping probabilities in the case of isolated minimizers} Since the elastic energy functional (Eq.~\ref{energylin}) is nonquadratic in $\bm{\mathsf{q}}$, after the parametrisation we approximate $\mathcal{K}_f$, $\mathcal{K}_m$ and $\mathcal{Z}$ by means of a second-order expansion about a minimal energy configuration \cite{2020, PAP1, BookChaichian, BookSchulman, BookWiegel, MOR}, known as the semi-classical method, or, in our real-valued context, Laplace expansion \cite{PIT}. The present work follows the set-up of \citep{2020}. We further remind that such an approximation holds when the energy required to deform the system is large with respect to the temperature of the heat bath, i.e. in the short-length scale, or stiff, regimes. First, notice that there is no contribution to the result coming from the ghost energy when approximating path integrals of the kind of (Eq.~\ref{curved}) to second order in the joint variable $\bm{\mathsf{w}}$. This is a consequence of the structure of the metric tensor (Eq.~\ref{par2}), i.e. $\bm{\mathsf{g}}^{-1}(\bm{\mathsf{c}})=(1+\bm{\mathsf{c}}\cdot\bm{\mathsf{c}})(\bm{\mathbb{1}}+\bm{\mathsf{c}}\otimes\bm{\mathsf{c}})$, and therefore we can consider only the elastic energy (Eq.~\ref{energylin}) in the variable $\bm{\mathsf{q}}$. In fact, the minima $\bm{q}^f$ and $\bm{q}^m$ (here assumed to be isolated) encoded within the associated adapted parametrisations lead to the minimizers $\qqf$ and $\qqm$ (denoted generically by $\qqa$, $\alpha$ standing both for $f$ and $m$) characterised by $\bm{\mathsf{c}}^{\alpha}=\bm{0}$. In partcular, the Neumann natural BC $\bm{m}(L)=\bm{0}$ for $\bm{q}^m$ translates into $\frac{\partial W}{\partial\bm{\mathsf{c}}'}(L)=2[(\bm{\mathbb{1}}+\bm{\mathsf{c}}^{\times})/(1+\Vert\bm{\mathsf{c}}\Vert^2)\bm{\mathsf{m}}](L)=\bm{0}$ for $\qqm$. In the semi-classical approximation for $\mathcal{K}_f$ and $\mathcal{K}_m$ the energy is expanded about the associated $\qqa$ as $E(\bm{\mathsf{q}})\sim E(\qqa)+\frac{1}{2}\delta^2E(\bm{\mathsf{h}};\qqa)$, $\bm{\mathsf{q}}=\qqa+\bm{\mathsf{h}}$, being the first variation zero. The second variation $\delta^2E$ is reported in (Eq.~\ref{sec}), with $\bm{\mathsf{h}}=(\delta\bm{\mathsf{c}},\delta\bm{\mathsf{t}})$ the perturbation field describing fluctuations about the minimizer $\qqa$ and satisfying the linearised version of the parametrised BCs, i.e. $\bm{\mathsf{h}}(0)=\bm{\mathsf{h}}(L)=\bm{0}$ for $(\mathtt{f})$, or $\bm{\mathsf{h}}(0)=\bm{0}$, $\delta\bm{\mathsf{t}}(L)=\bm{0}$, $\delta\frac{\partial W}{\partial\bm{\mathsf{c}}'}(L)=2[\delta\bm{\mathsf{m}}-\bm{\mathsf{m}}^m\times\delta\bm{\mathsf{c}}](L)=\bm{0}$ for $(\mathtt{m})$. Analogously, for $\mathcal{Z}$ the energy is expanded about $\qqh$, being $\frac{\partial W}{\partial\bm{\mathsf{t}}'}(L)=[\hat{\bm{R}}^T\bm{R}\bm{\mathsf{n}}](L)=\bm{0}$ the associated Neumann natural BC arising from $\bm{n}(L)=\bm{0}$ in $\hat{\bm{q}}$ (in addition to the BC for the moment as described for $\qqm$). In this case, the linearised parametrised BCs are given by $\bm{\mathsf{h}}(0)=\bm{0}$, $\bm{\mathsf{\mu}}(L)=\bm{0}$, with $\bm{\mathsf{\mu}}(L)=(\delta\frac{\partial W}{\partial\bm{\mathsf{c}}'},\delta\frac{\partial W}{\partial\bm{\mathsf{t}}'})(L)=(2(\delta\bm{\mathsf{m}}-\hat{\bm{\mathsf{m}}}\times\delta\bm{\mathsf{c}}),\delta\bm{\mathsf{n}}-2\hat{\bm{\mathsf{n}}}\times\delta\bm{\mathsf{c}})(L)$. In the present case of linear elasticity, the second variation (Eq.~\ref{sec}) is characterised by $\bm{\mathsf{P}}$, related to the stiffness matrix $\bm{\mathcal{P}}$, and ${\bm{\mathsf{C}}}$, ${\bm{\mathsf{Q}}}$ which can be computed as follows in terms of strains, forces and moments of the minimizer involved, generically denoted by $\bar{\bm{q}}=({\bm{R}}(\bar{\bm{\gamma}}),\bar{\bm{r}})$. In elastic rod theory, the natural parametrisation for the variation field around $\bar{\bm{q}}$ is directly provided by the Lie algebra $so(3)$ of the rotation group in the director frame, namely $\delta\bm{R}={\bm{R}}(\bar{\bm{\gamma}})\delta\bm{\mathsf{\eta}}^{\times}$, where $\delta\bm{\mathsf{\eta}}^{\times}$ denotes the skew-symmetric matrix or cross product matrix of $\delta\bm{\mathsf{\eta}}\in\mathbb{R}^3$. In order to show the relation between $\delta\bm{\mathsf{\eta}}$ and the variation field $\delta\bm{\mathsf{c}}$, we use the formula $\delta\bm{\mathsf{\eta}}=2\left(\sum\limits_{i=1}^3{\bm{e}_i\otimes\bm{B}_i\bar{\bm{\gamma}}}\right)\delta\bm{\gamma}$ (which is substantially the relation between the Darboux vector and Euler parameters, see e.g. \cite{HAM}) with $\delta\bm{\gamma}=\frac{\partial\bm{\gamma}}{\partial\bm{\mathsf{c}}}\big|_{\bm{\mathsf{c}}=\bm{0}}\delta\bm{\mathsf{c}}=\sum\limits_{j=1}^3\bm{B}_j\bar{\bm{\gamma}}\delta\mathsf{c}_j$ referring to (Eq.~\ref{BMat}), (Eq.~\ref{par}) and we conclude that $\delta\bm{\mathsf{\eta}}(s)=2\,\delta\bm{\mathsf{c}}(s)$. With reference to \cite{NAD}, the second variation of the linear hyper-elastic energy (Eq.~\ref{energylin}) in the director variable $\bm{\mathsf{\omega}}=(\delta\bm{\mathsf{\eta}},\delta\bm{\mathsf{t}})$ is $\delta ^2 E=\int_0^L{[{\bm{\mathsf{\omega}}'}^T\bm{\mathcal{P}}\bm{\mathsf{\omega}}'+2{\bm{\mathsf{\omega}}'}^T{\bm{\mathcal{C}}}\bm{\mathsf{\omega}}+\bm{\mathsf{\omega}}^T{\bm{\mathcal{Q}}}\bm{\mathsf{\omega}}]}\,\text{d}s,$ where $\bm{\mathcal{P}}$ is the stiffness matrix and $\bm{\mathcal{C}}$, $\bm{\mathcal{Q}}$ are respectively given in terms of strains, forces and moments by (Eq.~\ref{Cmat}) and (Eq.~\ref{Qmat}). Finally, introducing the matrix $\bm{\mathcal{D}}=\begin{small}\begin{pmatrix} 2\mathbb{1} & \mathbb{0} \\ \mathbb{0} & \mathbb{1} \end{pmatrix}\end{small}$, we have that the second variation in the variable $\bm{\mathsf{h}}=(\delta\bm{\mathsf{c}},\delta\bm{\mathsf{t}})$ (Eq.~\ref{sec}) is given by $\delta ^2 E=\int_0^L{[{\bm{\mathsf{h}}'}^T\bm{\mathsf{P}}\bm{\mathsf{h}}'+2{\bm{\mathsf{h}}'}^T{\bm{\mathsf{C}}}\bm{\mathsf{h}}+\bm{\mathsf{h}}^T{\bm{\mathsf{Q}}}\bm{\mathsf{h}}]}\,\text{d}s$, with $\bm{\mathsf{P}}=\bm{\mathcal{D}}\bm{\mathcal{P}}\bm{\mathcal{D}}$, $\bm{\mathsf{C}}=\bm{\mathcal{D}}\bm{\mathcal{C}}\bm{\mathcal{D}}$ and $\bm{\mathsf{Q}}=\bm{\mathcal{D}}\bm{\mathcal{Q}}\bm{\mathcal{D}}$. The Jacobi equations in first order Hamiltonian form associated to the latter second variation functional are given in (Eq.~\ref{JacHam}) and are driven by the symmetric matrix $\bm{\mathsf{E}}(s)\in\mathbb{R}^{12\times 12}$ detailed in (Eq.~\ref{E1}). The Jacobi fields $\bm{\mathsf{H}}(s)\in\mathbb{R}^{6\times 6}$, together with the conjugate variable under the Legendre transform $\bm{\mathsf{M}}(s)\in\mathbb{R}^{6\times 6}$ represent the solutions of the Jacobi equations once prescribed appropriate initial conditions. The columns $\bm{\mathsf{h}}$ of $\bm{\mathsf{H}}$ and the ones $\bm{\mathsf{\mu}}$ of $\bm{\mathsf{M}}$ are related by $\bm{\mathsf{\mu}}=\bm{\mathsf{P}}\bm{\mathsf{h}}'+\bm{\mathsf{C}}\bm{\mathsf{h}}$. Notice that until now the formulation adopted is for the general $(\mathtt{C})$ rod with extension, shear and hence an invertible stiffness matrix $\bm{\mathcal{P}}$. The constrained inextensible and unshereable case $(\mathtt{K})$ requires the stiffness components $\bm{\mathcal{B}}$ and $\bm{\mathcal{A}}$ to diverge (as discussed in \cite{HAM, LUD, LUDT}), specifically as $\bm{\mathcal{B}}/{\epsilon}$ and $\bm{\mathcal{A}}/{\epsilon^2}$, for $\epsilon\rightarrow 0$. Switching to the Hamiltonian formulation, given a $(\mathtt{C})$ rod the compliance matrix $\bm{\mathcal{R}}$ (which is the inverse of $\bm{\mathcal{P}}$) has a smooth limit for $\epsilon\rightarrow 0$. Namely, for a $(\mathtt{K})$ rod we recover $\bm{\mathcal{R}}(s)=\begin{small}\begin{pmatrix} \bm{\mathcal{R}}_{1,1} & \bm{\mathcal{R}}_{1,2}=\bm{\mathbb{0}}\\ \bm{\mathcal{R}}_{2,1}=\bm{\mathbb{0}} & \bm{\mathcal{R}}_{2,2}=\bm{\mathbb{0}} \end{pmatrix}\end{small}$, with $\bm{\mathcal{R}}_{1,1}=(\bm{\mathcal{K}}-\bm{\mathcal{B}}\bm{\mathcal{A}}^{-1}\bm{\mathcal{B}}^T)^{-1}$. In conclusion, once prescribed a symmetric and positive definite matrix $\bm{\mathcal{K}}^{(\mathtt{K})}=\bm{\mathcal{R}}_{1,1}^{-1}$, there exists a sequence of positive definite and symmetric compliance matrices for the $(\mathtt{C})$ case converging smoothly to the $(\mathtt{K})$ case, implying that the expressions (Eq.~\ref{E2}) and (Eq.~\ref{E3}) for the blocks of the matrix $\bm{\mathsf{E}}(s)$ (Eq.~\ref{E1}) hold for both $(\mathtt{C})$ and $(\mathtt{K})$ rods. We emphasise that for the $(\mathtt{K})$ case $\delta\frac{\partial W}{\partial\bm{\mathsf{t}}'}$ is a basic unknown of the Jacobi equations and cannot be found using the relation $\bm{\mathsf{\mu}}=\bm{\mathsf{P}}\bm{\mathsf{h}}'+\bm{\mathsf{C}}\bm{\mathsf{h}}$, since the latter is not defined. The resulting path integrals arising from the semi-classical method are of the form, e.g. \begin{equation}\label{Gauss} \mathcal{K}_f\approx e^{-\beta E(\qqf)}\int\limits_{\bm{\mathsf{h}}(0)=\bm{0}}^{\bm{\mathsf{h}}(L)=\bm{0}}{e^{-\frac{\beta}{2}\delta^2 E(\bm{\mathsf{h}};\qqf)}\,\mathcal{D}\bm{\mathsf{h}}}, \end{equation} and similarly for $\mathcal{K}_m$ and $\mathcal{Z}$ but considering the different minimizers and linearised BCs. Then, applying the results derived in \cite{2020} for Gaussian path integrals, which are in turn extensions of the work of Papadopoulos \cite{PAP1}, the approximate form of the conditional probability density reads as \begin{equation}\label{fin} \rra\approx \left(\frac{\beta}{2\pi}\right)^{x(\alpha)} \frac{e^{-\beta E\left(\qqa\right)}}{\sqrt{\det{[\hha(0)]}}}, \end{equation} with $x(f)=3$, $x(m)=3/2$, and we are interested in the cyclization values $\rrf(\bm{q}_0,L|\bm{q}_0,0)$, $\rrm(\bm{0},L|\bm{q}_0,0)$. We denote by $\hha(s)$ the Jacobi fields computed at $\qqa$, solutions of the associated Jacobi equations (Eq.~\ref{JacHam}) with $\bm{\mathsf{E}}(s)$ reported in (Eq.~\ref{E2}), (Eq.~\ref{E3}) and initial conditions given at $s=L$ as \begin{equation}\label{inFM} \begin{split} \hhf(L)=\mathbb{0},\,\,\mmf(L)=-\mathbb{1};\quad\qquad\qquad\\ \hhm(L)= \begin{pmatrix} \mathbb{1}_{3\times 3} & \mathbb{0}_{3\times 3}\\ \mathbb{0}_{3\times 3} & \mathbb{0}_{3\times 3} \end{pmatrix},\,\,\mmm(L)=\begin{pmatrix} \mathbb{0}_{3\times 3} & \mathbb{0}_{3\times 3}\\ \mathbb{0}_{3\times 3} & -\mathbb{1}_{3\times 3} \end{pmatrix}. \end{split} \end{equation} In principle, denoting by $\hhh(s)$ $\in\mathbb{R}^{6\times 6}$ the Jacobi fields computed at $\hat{\bm{\mathsf{q}}}$ subjected to the initial conditions $\hhh(L)=\mathbb{1}$, $\mmh(L)=\mathbb{0}$ \cite{2020}, the numerator and denominator in (Eq.~\ref{fin}) should be respectively $e^{-\beta\left(E\left(\qqa\right)-E\left(\qqh\right)\right)}$ and $\sqrt{\det{[\hha\hhh^{-1}(0)]}}$, in order to include the contribution coming from the evaluation of the partition function $\mathcal{Z}$. However, the result simplifies since $E(\hat{\bm{\mathsf{q}}})=0$, being $\hat{\bm{\mathsf{q}}}$ the intrinsic configuration of the rod. At the same time $\bm{\mathsf{E}}_{1,1}$ is the zero matrix for this case, which implies $\mmh(s)=\bm{\mathbb{0}}\,\,\forall s$ (according to the initial conditions $\mmh(L)=\bm{\mathbb{0}}$) and consequently $\hhh(s)$ must satisfy a linear system whose matrix has zero trace. Thus, by application of the generalized Abel's identity or Liouville's formula, $\forall s$ we have that $\det[{{\hhh}}(s)]=\det[{{\hhh}}(L)]=\det[\bm{\mathbb{1}}]=1$. Furthermore, it is worth to mention that here the partition function computation is not affected by approximations, even if it apparently undergoes the semi-classical expansion. In fact, there exists a change of variables presented in \cite{LUD,LUDT} which allows an equivalent exact computation exploiting the specific BCs involved in $\mathcal{Z}$. In general, the latter change of variables is not applicable and the present method must be used, e.g. for non-linear elasticity or in the case of a linearly elastic polymer subject to external end-loadings, for which the shape of the energy leads to a non-trivial contribution of the partition function that must be approximated. \section{Looping probabilities in the case of non-isolated minimizers} In this section we consider non-isolated minimizers arising as a consequence of continuous symmetries of the problem. In particular, we provide a theory for one symmetry parameter, namely $\theta\in[0,2\pi)$ (as we want to deal with isotropic rods), but the same scheme can be suitably generalised to more symmetry parameters. The presence of a family of minimizers denoted by $\qqa(s;\theta)$ translates into a zero mode $\bm{\mathsf{\psi}}^{\alpha}(s;\theta)=\frac{\partial}{\partial\theta}\qqa(s;\theta)$ \cite{MOR} of the self-adjoint operator $\bm{\mathsf{S}}=-\bm{\mathsf{P}}\frac{d^2}{d s^2}+(\bm{\mathsf{C}}^T-\bm{\mathsf{C}}-\bm{\mathsf{P}}')\frac{d}{d s}+\bm{\mathsf{Q}}-\bm{\mathsf{C}}'$ associated to the second variation (Eq.~\ref{sec}), namely $\delta ^2 E=(\bm{\mathsf{h}},\bm{\mathsf{S}}\bm{\mathsf{h}})$, where $(\cdot,\cdot)$ is the scalar product in the space of square-integrable functions $L^2([0,L];\mathbb{R}^6)$. Consequently, we cannot proceed as before, for otherwise expression (Eq.~\ref{fin}) will diverge for the existence of a conjugate point at $s=0$. Thus, in evaluating expression (Eq.~\ref{pathint}) for $\mathcal{K}_f$ and $\mathcal{K}_m$, we adapt the parametrization to the minimizer corresponding to $\theta=0$, our choice of the gauge in applying the collective coordinates method, which amounts to a Faddeev-Popov-type procedure \cite{FADPOP}, widely used in the context of quantum mechanics for solitons or instantons \cite{COL1, BER, JAR, POLYA}, of inserting the Dirac delta transformation identity \begin{equation}\label{Fad-Pop} 1=\left\lvert\frac{\partial}{\partial\theta}F\right\rvert_{\theta=0}\int_0^{2\pi}{\delta(F(\theta))}\,\text{d}\theta,\,\,\,F(\theta)=\left(\bm{\mathsf{q}}-\qqa,\frac{\bm{\mathsf{\psi}}^{\alpha}}{\Vert\bm{\mathsf{\psi}}^{\alpha}\Vert}\right) \end{equation} within the path integral, in order to integrate over variations which are orthogonal to the zero mode. Once performed the semi-classical expansion as before about $\qqa$, exchanged the order of integration $\mathcal{D}\bm{\mathsf{h}}\leftrightarrow\text{d}\theta$ to get a contribution of $2\pi$, and having approximated to leading order both the metric tensor and the factor $\vert\partial/\partial\theta F\vert_{\theta=0}\approx \Vert\bm{\mathsf{\psi}}^{\alpha}(s;0)\Vert$, we are left with the computation of a ratio of Gaussian path integrals \begin{equation}\label{Isopathint} \frac{1}{\mathcal{Z}_g}\int{e^{-\pi(\bm{\mathsf{h}},\frac{\beta}{2\pi}\bm{\mathsf{S}}\bm{\mathsf{h}})}\delta\left[\left(\bm{\mathsf{h}},\frac{\bm{\mathsf{\psi}}^{\alpha}}{\Vert\bm{\mathsf{\psi}}^{\alpha}\Vert}\right)\right]\,\mathcal{D}\bm{\mathsf{h}}}, \end{equation} for the linearised parametrised BCs associated to (Eq.~\ref{f}) and (Eq.~\ref{m}) respectively. For notation simplicity, throughout this section $\bm{\mathsf{S}}$ stands for $\frac{\beta}{2\pi}\bm{\mathsf{S}}$ and $\hat{\bm{\mathsf{S}}}$ for $\frac{\beta}{2\pi}\hat{\bm{\mathsf{S}}}$, the latter operator driving the Gaussian path integral $\mathcal{Z}_g$ arising from the partition function $\mathcal{Z}$, in which the minimizer $\qqh$ is isolated. Notice that, since the argument of the delta distribution must vanish for $\theta=0$ according to (Eq.~\ref{Fad-Pop}), then the integration for the numerator is performed on the minimizer $\qqa(s;0)$ with associated zero mode $\bm{\mathsf{\psi}}^{\alpha}(s;0)$; in the following they will both be denoted simply by $\qqa$ and $\bm{\mathsf{\psi}}^{\alpha}$. Interpreting (Eq.~\ref{Isopathint}) as $\sqrt{\text{Det}(\hat{\bm{\mathsf{S}}})/{\text{Det}^{\star}({\bm{\mathsf{S}}})}}$, i.e., the square root of the ratio of the functional determinants for the operators $\hat{\bm{\mathsf{S}}}$ and ${\bm{\mathsf{S}}}$, the latter with removed zero eigenvalue (thus the $^{\star}$ sign) \cite{MCK, FAL}, we consider the following general strategy for its evaluation. Given the second variation operator ${\bm{\mathsf{S}}}$ acting on $\bm{\mathsf{h}}(s)\in\mathbb{R}^6$, with $s\in[0,L]$ and BCs determined by the square matrices $\bm{\mathsf{T}}_0$ and $\bm{\mathsf{T}}_L$ as $\bm{\mathsf{T}}_0\begin{small}\begin{pmatrix} \bm{\mathsf{h}}(0) \\ \bm{\mathsf{\mu}}(0) \end{pmatrix}\end{small}+\bm{\mathsf{T}}_L\begin{small}\begin{pmatrix} \bm{\mathsf{h}}(L) \\ \bm{\mathsf{\mu}}(L) \end{pmatrix}\end{small}=\bm{0}$, we state Forman's theorem \cite{FORM} in Hamiltonian form as \begin{equation}\label{For} \frac{\text{Det}({\bm{\mathsf{S}}})}{\text{Det}(\hat{\bm{\mathsf{S}}})}=\frac{\det{[\bm{\mathsf{T}}_0\bm{\mathsf{W}}(0)+\bm{\mathsf{T}}_L\bm{\mathsf{W}}(L)]}}{\det[{\bm{\mathsf{W}}(L)}]}, \end{equation} for $\bm{\mathsf{W}}(s)\in\mathbb{R}^{12\times 12}$ whose columns $ (\bm{\mathsf{h}},\bm{\mathsf{\mu}})^T$ solve the homogeneous problem ${\bm{\mathsf{S}}}\bm{\mathsf{h}}=\bm{0}$ (i.e., the Jacobi equations (Eq.~\ref{JacHam}) with the extra $\frac{\beta}{2\pi}$ factor, completed as $\bm{\mathsf{W}}'=\bm{J}\bm{\mathsf{E}}\bm{\mathsf{W}}$), and the trivial partition function contribution has already been evaluated. It is important to notice the freedom of choosing $\bm{\mathsf{W}}(0)$, $\bm{\mathsf{W}}(L)$ consistently; the latter statements are justified by the following considerations. Given two matrix differential operators $\bm{\mathsf{\Omega}}=\bm{\mathsf{G}}_0(s)\frac{\text{d}^2}{\text{d} s^2}+\bm{\mathsf{G}}_1(s)\frac{\text{d}}{\text{d} s}+\bm{\mathsf{G}}_2(s)$ and $\hat{\bm{\mathsf{\Omega}}}=\bm{\mathsf{G}}_0(s)\frac{\text{d}^2}{\text{d} s^2}+\hat{\bm{\mathsf{G}}}_1(s)\frac{\text{d}}{\text{d} s}+\hat{\bm{\mathsf{G}}}_2(s)$ with nonzero eigenvalues (with respect to the BCs), acting on $\bm{\mathsf{h}}(s)\in\mathbb{R}^d$, where $\bm{\mathsf{G}}_0$, $\bm{\mathsf{G}}_1$, $\hat{\bm{\mathsf{G}}}_1$, $\bm{\mathsf{G}}_2$, $\hat{\bm{\mathsf{G}}_2}\in\mathbb{R}^{d\times d}$, $\bm{\mathsf{G}}_0$ is invertible and $s\in[a,b]$, the results of Forman \cite{FORM} provide a simple way of computing the ratio of functional determinants $\text{Det}(\bm{\mathsf{\Omega}})/\text{Det}(\hat{\bm{\mathsf{\Omega}}})$, once prescribed the BCs $\bm{\mathsf{I}}_a\begin{small}\begin{pmatrix} \bm{\mathsf{h}}(a) \\ \bm{\mathsf{h}}'(a) \end{pmatrix}\end{small}+\bm{\mathsf{I}}_b\begin{small}\begin{pmatrix} \bm{\mathsf{h}}(b) \\ \bm{\mathsf{h}}'(b) \end{pmatrix}\end{small}=\bm{0}$ for $\bm{\mathsf{\Omega}}$ and $\hat{\bm{\mathsf{I}}}_a\begin{small}\begin{pmatrix} \bm{\mathsf{h}}(a) \\ \bm{\mathsf{h}}'(a) \end{pmatrix}\end{small}+\hat{\bm{\mathsf{I}}}_b\begin{small}\begin{pmatrix} \bm{\mathsf{h}}(b) \\ \bm{\mathsf{h}}'(b) \end{pmatrix}\end{small}=\bm{0}$ for $\hat{\bm{\mathsf{\Omega}}}$, being $\bm{\mathsf{I}}_a$, $\bm{\mathsf{I}}_b$, $\hat{\bm{\mathsf{I}}}_a$, $\hat{\bm{\mathsf{I}}}_b\in\mathbb{R}^{2d\times 2d}$. Namely \begin{equation}\label{For1} \frac{\text{Det}(\bm{\mathsf{\Omega}})}{\text{Det}(\hat{\bm{\mathsf{\Omega}}})}=\frac{\det{[\bm{\mathsf{I}}_a+\bm{\mathsf{I}}_b\bm{\mathsf{F}}(b)]}}{\sqrt{\det[{\bm{\mathsf{F}}(b)}]}}\frac{\sqrt{\det[{\hat{\bm{\mathsf{F}}}(b)}]}}{\det{[\hat{\bm{\mathsf{I}}}_a+\hat{\bm{\mathsf{I}}}_b\hat{\bm{\mathsf{F}}}(b)]}}, \end{equation} with $\bm{\mathsf{F}}(s)$ ($\hat{\bm{\mathsf{F}}}(s)$) in $\mathbb{R}^{2d\times 2d}$ the fundamental solution of the linear differential system $\bm{\mathsf{F}}'=\bm{\mathsf{\Gamma}}\bm{\mathsf{F}}$, $\bm{\mathsf{F}}(a)=\bm{\mathbb{1}}$ ($\hat{\bm{\mathsf{F}}}'=\hat{\bm{\mathsf{\Gamma}}}\hat{\bm{\mathsf{F}}}$, $\hat{\bm{\mathsf{F}}}(a)=\bm{\mathbb{1}}$) associated to the homogeneous problem $\bm{\mathsf{\Omega}}\bm{\mathsf{h}}=\bm{0}$ ($\hat{\bm{\mathsf{\Omega}}}\bm{\mathsf{h}}=\bm{0}$) and $\bm{\mathsf{\Gamma}}$ ($\hat{\bm{\mathsf{\Gamma}}}$) the matrix of first order reduction interpreting $\bm{\mathsf{h}}'$ as an independent variable \cite{MCK, FAL}. In particular, we specialize to general second variation operators for $s\in[0,L]$, $d=6$, and we make the choice $\bm{\mathsf{\Omega}}={\bm{\mathsf{S}}}=-{\bm{\mathsf{P}}}(s)\frac{\text{d}^2}{\text{d} s^2}+({\bm{\mathsf{C}}}^T(s)-{\bm{\mathsf{C}}}(s)-{\bm{\mathsf{P}}}'(s))\frac{\text{d}}{\text{d} s}+{\bm{\mathsf{Q}}}(s)-{\bm{\mathsf{C}}}'(s)$ computed in either $\bm{\mathsf{q}}^f$ or $\bm{\mathsf{q}}^m$ and $\hat{\bm{\mathsf{\Omega}}}={\hat{\bm{\mathsf{S}}}}$ computed in $\hat{\bm{\mathsf{q}}}$. Notice that, for notation convenience, throughout this section $\bm{\mathsf{P}}$, $\bm{\mathsf{C}}$ and $\bm{\mathsf{Q}}$ stand for $\frac{\beta}{2\pi}\bm{\mathsf{P}}$, $\frac{\beta}{2\pi}\bm{\mathsf{C}}$ and $\frac{\beta}{2\pi}\bm{\mathsf{Q}}$. Moreover, defining $\bm{\mathsf{Y}}(s)=\bm{\mathsf{F}}(s)\bm{\mathsf{Y}}(0)$ for a given non-singular matrix $\bm{\mathsf{Y}}(0)$, changing variables in Hamiltonian form by means of $\bm{\mathsf{Y}}=\bm{\mathsf{O}}\bm{\mathsf{W}}$, $\bm{\mathsf{O}}(s)=\begin{small}\begin{pmatrix} \bm{\mathbb{1}} & \bm{\mathbb{0}} \\ -{\bm{\mathsf{P}}}^{-1}{\bm{\mathsf{C}}} & {\bm{\mathsf{P}}}^{-1} \end{pmatrix}\end{small}$ being $\bm{\mathsf{W}}$ partitioned in $6$ by $6$ blocks as $\bm{\mathsf{W}}(s)=\begin{small}\begin{pmatrix} \bm{\mathsf{H}} & \bm{\mathsf{H}}^* \\ \bm{\mathsf{M}} & \bm{\mathsf{M}}^* \end{pmatrix}\end{small}$, and doing the same in terms of $\hat{\bm{\mathsf{F}}}$, it is easily shown that Forman's theorem (Eq.~\ref{For1}) for $\bm{\mathsf{S}}$, $\hat{\bm{\mathsf{S}}}$ becomes (Eq.~\ref{For}) multiplied by ${\det[{\hat{\bm{\mathsf{W}}}(L)}]}/{\det{[\hat{\bm{\mathsf{T}}}_0\hat{\bm{\mathsf{W}}}(0)+\hat{\bm{\mathsf{T}}}_L\hat{\bm{\mathsf{W}}}(L)]}}$, with the Hamiltonian verson of the BCs bein equal to $\bm{\mathsf{T}}_0=\bm{\mathsf{I}}_0\bm{\mathsf{O}}(0)$, $\bm{\mathsf{T}}_L=\bm{\mathsf{I}}_L\bm{\mathsf{O}}(L)$ and $\bm{\mathsf{W}}'=\bm{J}\bm{\mathsf{E}}\bm{\mathsf{W}}$ (the same is done for the ``hat'' term). Since the trace of $\bm{J}\bm{\mathsf{E}}$ is always zero, the so-called generalized Abel’s identity or Liouville’s formula implies that $\det[{\bm{\mathsf{W}}}]$ ($\det[{\hat{\bm{\mathsf{W}}}}]$) is constant. We further observe that for ${\hat{\bm{\mathsf{S}}}}$ the BCs on the paths (being the ones entering the path integral for the partition function) must be given by the matrices $\hat{\bm{\mathsf{T}}}_0=\begin{small}\begin{pmatrix} \bm{\mathbb{1}} & \bm{\mathbb{0}} \\ \bm{\mathbb{0}} & \bm{\mathbb{0}} \end{pmatrix}\end{small}$, $\hat{\bm{\mathsf{T}}}_L=\begin{small}\begin{pmatrix} \bm{\mathbb{0}} & \bm{\mathbb{0}} \\ \bm{\mathbb{0}} & \bm{\mathbb{1}} \end{pmatrix}\end{small}$, and choosing ${\hat{\bm{\mathsf{H}}}}(L)=\bm{\mathbb{1}}$, ${\hat{\bm{\mathsf{M}}}}(L)= \bm{\mathbb{0}}$ within $\hat{\bm{\mathsf{W}}}(L)$, the ``hat'' contribution reduces to $\text{det}[\hat{\bm{\mathsf{H}}}(0)]$, which is equal to $1$ by direct inspection (see previous section). The idea is now to compute expression (Eq.~\ref{For}) for the operator ${\bm{\mathsf{S}}}$ subject to carefully chosen perturbed BCs $\bm{\mathsf{T}}^{(\varepsilon)}_0$, in order to avoid the zero mode. This gives rise to a quasi-zero eigenvalue that can be found analytically using our extension to general second variation operators (including cross-terms) of the trick introduced in \cite{MCK}. Finally, by taking the limit for $\varepsilon\rightarrow 0$ in the ratio of the regularized expression (Eq.~\ref{For}) to the regularized quasi-zero eigenvalue, we recover the desired quantity ${\text{Det}^{\star}({\bm{\mathsf{S}}})}/{\text{Det}(\hat{\bm{\mathsf{S}}})}$. We anticipate here the results for the approximation formulas of the probability densities in the case of non-isolated minimizers, valid also for $(\mathtt{K})$ rods as detailed in the previous section (notice that the factor $\Vert\bm{\mathsf{\psi}}^{\alpha}\Vert$ simplifies out within the regularization procedure) \begin{equation}\label{finiso} \rra\approx2\pi\,e^{-\beta E(\qqa)}\sqrt{\frac{[\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^{\alpha}}(0)]_i}{]{\hha(0)}[_{i,i}}}, \end{equation} and we are interested in the cyclization values $\rrf(\bm{q}_0,L|\bm{q}_0,0)$, $\rrm(\bm{0},L|\bm{q}_0,0)$. In particular, $\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^{\alpha}}\in\mathbb{R}^6$ and $\hha\in\mathbb{R}^{6\times 6}$ are respectively the conjugate momentum of the zero mode and the Jacobi fields associated to ${\bm{\mathsf{S}}}^{\alpha}$, both computed by means of (Eq.~\ref{JacHam}) but reminding the contribution of $\frac{\beta}{2\pi}$. Moreover, here we denote with $[\cdot]_i$ the $i$-th component of a vector, with $]\cdot[_{i,i}$ the principal minor of a square matrix removing the $i$-th row and the $i$-th column, and the index $i$ depends on the choice of the boundary regularization, based on the non-zero components of $\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^{\alpha}}$. The appropriate ICs for $\hha$ are given at $s=L$ as: \begin{equation}\label{inFMiso} \begin{split} \hhf(L)=\bm{\mathbb{0}},\,\,\mmf(L)=\bm{\mathsf{\chi}};\qquad\qquad\quad\\ \hhm(L)=\begin{pmatrix} \bm{\mathsf{X}}_{1,1} & \bm{\mathsf{X}}_{1,2} \\ \bm{\mathbb{0}} & \bm{\mathbb{0}} \end{pmatrix},\,\,\mmm(L)=\begin{pmatrix} \bm{\mathbb{0}} & \bm{\mathbb{0}} \\ \bm{\mathsf{X}}_{2,1} & \bm{\mathsf{X}}_{2,2} \end{pmatrix}, \end{split} \end{equation} where $\bm{\mathsf{\chi}}$ is an arbitrary matrix with unit determinant such that the $i$-th column corresponds to $\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^f}(L)$ and $\bm{\mathsf{X}}=\begin{small}\begin{pmatrix} \bm{\mathsf{X}}_{1,1} & \bm{\mathsf{X}}_{1,2} \\ \bm{\mathsf{X}}_{2,1} & \bm{\mathsf{X}}_{2,2} \end{pmatrix}\end{small}\in\mathbb{R}^{6\times 6}$, partitioned in $3$ by $3$ blocks, is an arbitrary matrix with determinant equal to $-1$ such that the $i$-th column corresponds to $([{\bm{\mathsf{\psi}}}^m]_{1:3},[\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^m}]_{4:6})^T(L)$. We are now ready to explain how to regularize the functional determinants for ${\bm{\mathsf{S}}}^f$ and ${\bm{\mathsf{S}}}^m$ respectively, in order to get rid of the zero eigenvalue. Starting from the pure Dirichlet case, the BCs are given as ${\bm{\mathsf{T}}}_0^{(\varepsilon)}=\begin{small}\begin{pmatrix} \bm{\mathbb{1}} & \bm{\mathcal{E}} \\ \bm{\mathbb{0}} & \bm{\mathbb{0}} \end{pmatrix}\end{small}$, ${\bm{\mathsf{T}}}_L=\begin{small}\begin{pmatrix} \bm{\mathbb{0}} & \bm{\mathbb{0}} \\ \bm{\mathbb{1}} & \bm{\mathbb{0}} \end{pmatrix}\end{small}$, with $\bm{\mathcal{E}}$ the zero matrix with a non-zero diagonal entry $\varepsilon$ in position $i,i$ serving as a perturbation to avoid the zero mode. Then, choosing ${\bm{\mathsf{H}}}^f(L)$, ${\bm{\mathsf{M}}}^f(L)$ as given in (Eq.~\ref{inFMiso}), and applying the formulas for the determinant of a block matrix, from (Eq.~\ref{For}) we get ${\text{Det}^{(\varepsilon)}({\bm{\mathsf{S}}^f})}/{\text{Det}(\hat{\bm{\mathsf{S}}})}={\det{[\bm{\mathsf{H}}^f(0)+\bm{\mathcal{E}}\bm{\mathsf{M}}^f(0)]}}/{\det[{\bm{\mathsf{M}}^f(L)}]}=\varepsilon [\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^f}(0)]_i\,]{{\bm{\mathsf{H}}}^f(0)}[_{i,i}$. By construction the zero mode represents the $i$-th column of $\bm{\mathsf{H}}^f(s)$ and satisfies the linearised BC ${{\bm{\mathsf{\psi}}}^f}(0)=\bm{0}$, hence the last equality. On the other hand, for the marginalized case, the BCs are given by ${\bm{\mathsf{T}}}_0^{(\varepsilon)}$ as before and ${\bm{\mathsf{T}}}_L=\begin{small}\begin{pmatrix} \bm{\mathbb{0}} & \bm{\mathbb{0}} \\ \bm{\mathbb{1}}^{\bm{\mathbb{0}}} & \bm{\mathbb{1}}_{\bm{\mathbb{0}}} \end{pmatrix}\end{small}$, being $ \bm{\mathbb{1}}^{\bm{\mathbb{0}}}=\begin{small}\begin{pmatrix} \bm{\mathbb{0}} & \bm{\mathbb{0}} \\ \bm{\mathbb{0}} & \bm{\mathbb{1}} \end{pmatrix}\end{small}$, $\bm{\mathbb{1}}_{\bm{\mathbb{0}}}=\begin{small}\begin{pmatrix} \bm{\mathbb{1}} & \bm{\mathbb{0}} \\ {\bm{\mathbb{0}}} & {\bm{\mathbb{0}}} \end{pmatrix}\end{small}$ partitioned in $3$ by $3$ blocks. Then, choosing ${\bm{\mathsf{H}}}^m(L)$, ${\bm{\mathsf{M}}}^m(L)$ as given in (Eq.~\ref{inFMiso}), and applying the formulas for the determinant of a block matrix, from (Eq.~\ref{For}) we get ${\text{Det}^{(\varepsilon)}({\bm{\mathsf{S}}^m})}/{\text{Det}(\hat{\bm{\mathsf{S}}})}=-{\det{[\bm{\mathsf{H}}^m(0)+\bm{\mathcal{E}}\bm{\mathsf{M}}^m(0)]}}/{\det[{\bm{\mathsf{X}}}]}=\varepsilon [\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^m}(0)]_i\,]{{\bm{\mathsf{H}}}^m(0)}[_{i,i}$. By construction the zero mode represents the $i$-th column of $\bm{\mathsf{H}}^m(s)$ and satisfies the linearised BC ${{\bm{\mathsf{\psi}}}^m}(0)=\bm{0}$, hence the last equality. In addition, when computing $\text{det}[\bm{\mathsf{W}}^m(L)]$, we have used the determinant identity (Eq.~\ref{Id}) for $n=3$. The last step consists of finding the non-zero eigenvalue $\lambda^{\alpha}_{(\varepsilon)}$ associated to the eigenfunction $\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)}$ (arising from the zero mode $\bm{\mathsf{\psi}}^{\alpha}$) of the operator $\bm{\mathsf{S}}^{\alpha}$ with perturbed BCs. Since $(\bm{\mathsf{\psi}}^{\alpha},\bm{\mathsf{S}}^{\alpha}\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)})=\lambda^{\alpha}_{(\varepsilon)}(\bm{\mathsf{\psi}}^{\alpha},\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)})$, the left hand side can be rewritten as $(\bm{\mathsf{\psi}}^{\alpha},\bm{\mathsf{S}}^{\alpha}\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)})=(\bm{\mathsf{\psi}}^{\alpha},\bm{\mathsf{S}}^{\alpha}\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)})-(\bm{\mathsf{S}}^{\alpha}\bm{\mathsf{\psi}}^{\alpha},\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)})=[\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}}\cdot\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)}]_0^L-[\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)}}\cdot\bm{\mathsf{\psi}}^{\alpha}]_0^L=-(\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}}\cdot\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)})(0)=\varepsilon [\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}}(0)]_i [\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)}}(0)]_i$, where the second equality comes after integration by parts and the third and fourth ones are a consequence of the BCs. Finally, being $\lambda^{\alpha}_{(\varepsilon)}=\varepsilon [\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}}(0)]_i [\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)}}(0)]_i/(\bm{\mathsf{\psi}}^{\alpha},\bm{\mathsf{\psi}}^{\alpha}_{(\varepsilon)})$, then we have that $\text{Det}^{\star}(\bm{\mathsf{S}}^{\alpha})/\text{Det}({\hat{\bm{\mathsf{S}}}})=\lim_{\varepsilon\rightarrow 0}(\lambda^{\alpha}_{(\varepsilon)})^{-1}\text{Det}^{(\varepsilon)}(\bm{\mathsf{S}}^{\alpha})/\text{Det}({\hat{\bm{\mathsf{S}}}})=\Vert\bm{\mathsf{\psi}}^{\alpha}\Vert^2\,]{{{\bm{\mathsf{H}}^{\alpha}}}(0)}[_{i,i}/[\bm{\mathsf{\mu}}_{\bm{\mathsf{\psi}}^{\alpha}}(0)]_i$. We conclude with a technical remark. Namely we observe that a priori the solution formulas for isolated minimizers could be recovered applying Forman's theorem in the framework of functional determinants (as done here for the non-isolated case); however, we exploit the insightful connection with the more standard theory of path integrals via ``time slicing" and explore both possibilities to gain a deeper understanding of the topic. \section{A Monte Carlo algorithm for stochastic elastic rods} In this section we refer to the approach of \cite{MCD, ALEX2, MCDNA} for DNA MC simulations of J-factors, using the “half-molecule” technique \cite{ALEX1} for enhancing the efficiency. Namely we give a Monte Carlo sampling algorithm for fluctuating linearly elastic rods according to the Boltzmann distribution having partition function (Eq.~\ref{normex}), i.e. $\mathcal{Z}=\int_{\bm{q}(0)=\bm{q}_0}{e^{-\beta E(\bm{q})}\,\mathcal{D}\bm{q}}$ with energy (Eq.~\ref{energylin}), and we use the compact notation $\bm{\mathsf{u}}_{\Delta}=\bm{\mathsf{u}}-\hat{\bm{\mathsf{u}}}$, $\bm{\mathsf{v}}_{\Delta}=\bm{\mathsf{v}}-\hat{\bm{\mathsf{v}}}$ for the shifted strains. First of all, we need to rewrite the infinite-dimensional problem as a finite-dimensional one by means of a ``parameter slicing method". This is achieved, after parametrizing the configuration variable as $\bm{\mathsf{q}}(s)=(\bm{\mathsf{c}}(s),\bm{\mathsf{t}}(s))\in\mathbb{R}^6$, setting $\epsilon=\frac{L}{n}$ with $n$ a large positive integer and $s_j=j\epsilon$ for $j=0,...,n$. Moreover, by exploiting the change of variables $(\bm{\mathsf{c}}_j,\bm{\mathsf{t}}_j)\rightarrow(\bm{\mathsf{u}}_j,\bm{\mathsf{v}}_j)$ as presented in \cite{LUDT}, we get the following equality up to a constant factor for the discrete version of the partition function $\mathcal{Z}$ \begin{equation}\label{partfin} \begin{split} \int{e^{-\beta\epsilon\sum\limits_{j=0}^{n}{W(\bm{\mathsf{c}},\bm{\mathsf{t}})_j}}}\prod\limits_{j=1}^n\left(1+\Vert\bm{\mathsf{c}}_j\Vert^2\right)^{-2}\text{d}\bm{\mathsf{c}}_j\text{d}\bm{\mathsf{t}}_j\\ \sim\int{e^{-{\beta\epsilon}\sum\limits_{j=0}^{n-1}{W({\bm{\mathsf{u}}_{\Delta}},{\bm{\mathsf{v}}_{\Delta}})_j}}}\prod\limits_{j=0}^{n-1}\mathcal{J}(\bm{\mathsf{u}}_j)\text{d}\bm{\mathsf{u}}_j\text{d}\bm{\mathsf{v}}_j, \end{split} \end{equation} with $W_j=\frac{1}{2}\left[{\bm{\mathsf{u}}_{\Delta}}_j^T \bm{\mathcal{K}}_j{\bm{\mathsf{u}}_{\Delta}}_j+2{\bm{\mathsf{u}}_{\Delta}}_j^T \bm{\mathcal{B}}_j{\bm{\mathsf{v}}_{\Delta}}_j+{\bm{\mathsf{v}}_{\Delta}}_j^T \bm{\mathcal{A}}_j{\bm{\mathsf{v}}_{\Delta}}_j\right]$, $\mathcal{J}(\bm{\mathsf{u}}_j)=\left(1- {\epsilon^2}\Vert\bm{\mathsf{u}}_j\Vert^2/{4}\right)^{-\frac{1}{2}}$ and the subscript $j$ indicates that the associated term is evaluated in $s_j$. We observe that the Jacobian factor $\mathcal{J}$ can be neglected, as discussed in \cite{PL}, leading to the Gaussian distribution $\rho_{\mathcal{Z}}=e^{-{\beta\epsilon}\sum\limits_{j=0}^{n-1}{W({\bm{\mathsf{u}}_{\Delta}},{\bm{\mathsf{v}}_{\Delta}})_j}}/\int e^{-{\beta\epsilon}\sum\limits_{j=0}^{n-1}{W({\bm{\mathsf{u}}_{\Delta}},{\bm{\mathsf{v}}_{\Delta}})_j}}$ $\prod\limits_{j=0}^{n-1}\text{d}\bm{\mathsf{u}}_j\text{d}\bm{\mathsf{v}}_j$ which can be easily sampled by a direct MC method in order to get random instances of $\bm{\mathsf{u}}_j$, $\bm{\mathsf{v}}_j$, $j=0,...,n-1$, associated to a random framed curve with initial data $\bm{q}_0=(\bm{\mathbb{1}},\bm{0})$. Notice that, in the proposed uniform example with diagonal stiffness matrix, the Gaussian factorises and the sampling is simply performed componentwise in terms of independent univariate Gaussians. Since the conditional probability density is a function of the variables $\bm{R}_n=\bm{R}_L$, $\bm{r}_n=\bm{r}_L$, we need to reconstruct them from the sampled strains by discretization of the differential equations $\bm{\gamma}'(s)=\frac{1}{2}\sum\limits_{i=1}^3 [\bm{\mathsf{u}}(s)]_i\bm{B}_i\bm{\gamma}(s)$, $\bm{r}'(s)=\bm{R}(\bm{\gamma}(s))\bm{\mathsf{v}}(s)$, with $[\bm{\mathsf{u}}(s)]_i$ the $i$th component of $\bm{\mathsf{u}}$ and $\bm{R}(\bm{\gamma})$ the rotation matrix associated to the quaternion $\bm{\gamma}$. This is achieved, e.g., by application of the scalar factor method, derived in \cite{QUAT1} and discussed in \cite{QUAT2}, which is an efficient and precise one-step method for integrating the Darboux vector $\bm{\mathsf{u}}$, preserving the unit norm of the quaternion. Defining ${\delta_{\bm{\gamma}}}_j=\frac{\epsilon}{2}\sum\limits_{i=1}^3[\bm{\mathsf{u}}_j]_i\bm{B}_i\bm{\gamma}_j$, then we have that $\bm{\gamma}_{j+1}=(\bm{\gamma}_{j}+\tan{(\Vert{\delta_{\bm{\gamma}}}_j\Vert){\delta_{\bm{\gamma}}}_j/\Vert{\delta_{\bm{\gamma}}}_j\Vert})\cos{(\Vert{\delta_{\bm{\gamma}}}_j\Vert)}$ subject to the initial data $\bm{\gamma}_0=(0,0,0,1)$, and consequently $\bm{r}_{j+1}=\bm{r}_{j}+\epsilon\bm{R}(\bm{\gamma}_j)\bm{\mathsf{v}}_j$, $\bm{r}_0=\bm{0}$. In the spirit of \cite{MCD} for computing cyclization densities, we are now able to generate MC trajectories and assess whether or not $\bm{q}_n=(\bm{R}_n=\bm{R}(\bm{\gamma}_n),\bm{r}_n)$ is falling inside the given small region $\mathcal{R}_{\zeta,\xi}$ of $SE(3)$ centred in $(\bm{\mathbb{1}},\bm{0})$ parametrized as the Cartesian product $\mathcal{B}_{\zeta}\times\mathcal{B}_{\xi}$ of two open balls in $\mathbb{R}^3$, centred in $\bm{0}$, of radius $\zeta,\xi>0$ respectively. Namely, $(\bm{R}_n,\bm{r}_n)\in\mathcal{R}_{\zeta,\xi}$ if and only if $\Vert\bm{\mathsf{c}}(\bm{\gamma}_n)\Vert<\zeta$ and $\Vert\bm{r}_n\Vert<\xi$, with $\bm{\mathsf{c}}\in\mathbb{R}^3$ the same parametrization of $SO(3)$ presented above, adapted to $\bar{\bm{\gamma}}=(0,0,0,1)$. Notice that, since $\bm{\mathsf{c}}(\bm{\gamma}_n)=[\bm{\gamma}_n]_4^{-1}([\bm{\gamma}_n]_1,[\bm{\gamma}_n]_2,[\bm{\gamma}_n]_3)$ and $\Vert\bm{\gamma}_n\Vert=1$, the condition $\Vert\bm{\mathsf{c}}(\bm{\gamma}_n)\Vert<\zeta$ is equivalent to $\sqrt{[\bm{\gamma}_n]_4^{-2}-1}<\zeta$. Moreover, we have the following link between the probability of the set $\mathcal{R}_{\zeta,\xi}$ ($ \mathbb{P}(\mathcal{R}_{\zeta,\xi})$) computed using MC simulations and the conditional probability density defined in the theoretical framework \begin{equation}\label{link} \begin{split} &{|\lbrace\text{samples:}\,(\bm{R}_n,\bm{r}_n)\in\mathcal{R}_{\zeta,\xi}\rbrace|}\,/\,{|\lbrace\text{all samples}\rbrace|}\approx \mathbb{P}(\mathcal{R}_{\zeta,\xi})\\ &=\int_{\mathcal{R}_{\zeta,\xi}}{\rho_f(\bm{q}_L,L|\bm{q}_0,0)}\text{d}\bm{q}_L\approx |\mathcal{R}_{\zeta,\xi}|\,\rho_f(\bm{q}_0,L|\bm{q}_0,0), \end{split} \end{equation} where the notation $|\cdot |$ stands for the number of elements of a discrete set or the measure of a continuous set, and the accuracy of the approximation increases with $n\rightarrow\infty$, $|\lbrace\text{all samples}\rbrace |\rightarrow\infty$, $\zeta\rightarrow 0$, $\xi\rightarrow 0$. The set $\mathcal{R}_{\zeta,\xi}$ is measured by means of the product of the Haar measure and the Lebesgue measure for the $SO(3)$ and the $E(3)$ components. Thus, making use of the parametrisation, $|\mathcal{R}_{\zeta,\xi}|=\int_{\mathcal{R}_{\zeta,\xi}}{\text{d}\bm{q}_n}=\int_{\mathcal{B}_{\zeta}\times\mathcal{B}_{\xi}}{\left(1+\Vert\bm{\mathsf{c}}_n\Vert^2\right)^{-2}\,\text{d} \bm{\mathsf{c}}_n\,\text{d}\bm{r}_n}=8\pi^2\xi^3(\arctan{(\zeta)}-\zeta/(1+\zeta^2))/3$. Regarding the marginal $\rho_m(\bm{r}_0,L|\bm{q}_0,0)$, the method is applied only considering the condition on $\bm{r}_n$ for being inside the open ball $\mathcal{B}_{\xi}$ with measure $| \mathcal{B}_{\xi} |=4\pi\xi^3/3$, and neglecting all the details concerning the rotation component. More specifically, in order to enhance the efficiency of the algorithm, we refer to the approach adopted in \cite{MCD, ALEX2, MCDNA} for DNA MC simulations, using the “half-molecule” technique as developed by Alexandrowicz \cite{ALEX1}. In this technique, one computes $M$ random instances each of the first and second halves of the framed curve and then considers all first-half-second-half pairs in order to generate $M^2$ random curves, allowing a large sample size contributing for each density data point and providing the necessary accuracy to the estimation. In particular, we give here the specifications for the simulations reported in the following section. For the $(\mathtt{f})$ computations, $\sim 10^{15}$ samples were produced for each data point, choosing $n=200$ and $\zeta$, $\xi$ ranging from $2.5$ to $6.6$ \% of the parameter $L$. The estimated density value corresponds to the mean taken over $81$ ``boxes'', along with the standard deviation for these boxes defining the range of the bar for each MC data point. For the $(\mathtt{m})$ cases, $\sim 10^{13}$ samples were produced for each data point, choosing $n=200$ and $\xi$ ranging from $0.1$ to $4$ \% of the parameter $L$; $40$ different ``boxes'' were used for the final estimation. \section{Results and discussion for the examples considered} \subsection{A preliminary stability analysis} \begin{figure*} \centering \subfigure[]{ \includegraphics[width=.37\textwidth]{fig2.pdf}\qquad\qquad } \subfigure[]{ \includegraphics[width=.37\textwidth]{fig3.pdf} } \subfigure[]{ \includegraphics[width=.37\textwidth]{fig4.pdf}\qquad\qquad } \subfigure[]{ \includegraphics[width=.37\textwidth]{fig5.pdf} } \caption{Stability analysis for a non-isotropic $(\mathtt{C})$ rod with $k_1=0.5$, $k_2=5$, $k_3=10$ and $a_1=a_2=a_3=100$. Continuous lines represent quantities associated to stable solutions, dashed lines to unstable ones. In panels (a) and (b) the energies for the circular and teardrop equilibria are displayed in red, together with the compressed solution, in black, which becomes unstable after the bifurcation point $L^f$ or $L^m$. In panels (c) and (d) we report the values of $\det{[\bm{\mathsf{H}}(0)]}$ computed on the associated solutions for the $(\mathtt{f})$ and $(\mathtt{m})$ cases respectively, with conjugate points arising when the curves hit zero.} \label{fig2345} \end{figure*} We refer to a linearly elastic, uniform, with diagonal stiffness matrix, intrinsically straight and untwisted rod ($\bm{\mathcal{P}}(s)=\bm{\mathcal{P}}=$ diag $\lbrace k_1,k_2,k_3,a_1,a_2,a_3\rbrace$, $\hat{\bm{\mathsf{u}}}=\bm{0}$, $\hat{\bm{\mathsf{v}}}=(0,0,1)$), as presented above. For $(\mathtt{C})$ rods, cyclization problems $(\mathtt{f})$ and $(\mathtt{m})$ always admit a ``compressed'' trivial solution $\bm{q}^c$, characterised by $\bm{r}^c=\bm{0}$, $\bm{R}^c=\bm{\mathbb{1}}$, $\bm{\mathsf{u}}^c=\bm{0}$, $\bm{\mathsf{m}}^c=\bm{0}$, $\bm{\mathsf{v}}^c=\bm{0}$, $\bm{\mathsf{n}}^c=(0,0,-a_3)$, with energy $E(\bm{{q}}^c)=\frac{a_3 L}{2}$. Analysing the determinant of the associated Jacobi fields with BCs (Eq.~\ref{inFM}) by means of conjugate point theory, we observe that the latter solution is stable (i.e. a minimizer of the energy) in the range $0<L<L^f$ for the $(\mathtt{f})$ case, and in $0<L<L^m$ for the $(\mathtt{m})$ case, where $L^f={2\pi}/{a_3}\min{(\sqrt{k_1\,a_2},\,\,\sqrt{k_2\,a_1})}$ and $L^m=L^f/2$. Moreover, as already mentioned, for full looping $(\mathtt{f})$ there exist also circular solutions $\bm{q}^f$, which are stable for all $L>0$, with energy ${2\pi^2 k_1}/{L}$. (This is true except for $k_1>k_3$, $L<2\pi\sqrt{(k_1-k_3)/{a_1}}$, but in the present article we will not treat such an instability of the circular solution). Notice that if $k1\leq k2$ and $a_1=a_2=a_3$, then $E(\bm{q}^c)=E(\bm{q}^f)$ at $L^f={2\pi}\sqrt{k_1/a_3}$ and $E(\bm{q}^c)<E(\bm{q}^f)$ for $0<L<L^f$. For marginal looping $(\mathtt{m})$, the stable teardrop solution $\bm{q}^m$ ceases to exist in the interval $0<L<L^m$, merging with the compressed solution which becomes stable. We show the bifurcation diagrams in Fig.\ref{fig2345} for a non-isotropic $(\mathtt{C})$ rod. The isotropic case is totally analogous, except from the fact that an entire family of minimizers is involved and a conjugate point is always present due to the continuous symmetry. Observe that $E(\bm{q}^m)$ does not explode for small lengths, but instead reaches a maximum and decreases towards $E(\bm{q}^c)$. By contrast, for a $(\mathtt{K})$ rod the circular and teardrop solutions exist and are stable for all $L>0$, with energy diverging approaching $L=0$, and no compressed solution is present. Since in the $(\mathtt{C})$ case the compressed (isolated) solution is a minimizer for the short-length scale regimes, we evaluate analytically its contribution $\rho^c_{\alpha}$ to the cyclization probability density $(\mathtt{f})$ and $(\mathtt{m})$ for $0<L<L^f$ and $0<L<L^m$ respectively. Making use of (Eq.~\ref{fin}) with BCs (Eq.~\ref{inFM}) and setting the non-dimensional length $\tilde{L}=L/l_p$ for a given $l_p>0$, we get \begin{equation}\label{compr} \rho^c_{\alpha}\approx e^{-E_p\tilde{L}}\frac{1}{{l_p}^{3}{\tilde{L}}^{\frac{1}{x}}}\sqrt{\tau\,\csc(x\,\vartheta_1\,\tilde{L})^{\frac{2}{x}}\csc(x\,\vartheta_2\,\tilde{L})^{\frac{2}{x}}}, \end{equation} where $x=x(\alpha)$ with $x(f)=1$, $x(m)=2$ and $E_p=\beta\,l_p\,a_3/2$, $\vartheta_1=(l_p\,a_3)/(2\sqrt{k_1\,a_2})$, $\vartheta_2=(l_p\,a_3)/(2\sqrt{k_2\,a_1})$, $\tau=\tau(\alpha)$ with $\tau(f)=\beta^2\,k_3\,a_3\,E_p^4/\pi^6$, $\tau(m)=l_p^2\,\sqrt{\upsilon}\,E_p^3/{\pi^3}$, $\upsilon=a_1\,a_2/(k_1\,k_2)$. The latter formula is valid both for isotropic (setting $k_1=k_2$, $a_1=a_2$) and non-isotropic rods. In the following we focus on the contribution $\rho_{\alpha}$ to the cyclization probability density $(\mathtt{f})$ and $(\mathtt{m})$ coming from the circular and teardrop minimizers respectively. \subsection{Non-isotropic polymers} \begin{figure*} \subfigure[]{\includegraphics[width=.45\textwidth]{fig6.pdf}}\qquad \subfigure[]{\includegraphics[width=.45\textwidth]{fig7.pdf}} \caption{cyclization densities comparison between the path integral (PI) Laplace approximation (continuous lines) and MC (discrete points with standard deviation error bars) for a non-isotropic rod. For $(\mathtt{K})$ we set $\beta=1$, $k_1=0.5$, $k_2=5$, $k_3=10$; for the $(\mathtt{C})$ case, we also set $a_1=a_2=a_3=100$. The quantities are reported in non-dimensional form. In particular, the undeformed length of the rod is expressed in units of real persistence length $l_p\approx 0.9$, the harmonic average of $k_1$ and $k_2$. In panel (a) we address the $(\mathtt{f})$ case, reporting the values for $\rrf$ and displaying in red the zero order contribution. In panel (b) the results for the marginal density $\rrm$ are reported, with a zoom window in $log_{10}$ scale in order to underline the peculiar small length trend. In this case, $(\mathtt{K})$ and $(\mathtt{C})$ rods differ in zero order contribution of the energy, and two different red curves are displayed.} \label{fig67} \end{figure*} First, we consider a non-isotropic rod ($k_1\neq k_2$), further assuming w.o.l.o.g. that $k_1<k_2$. For the case of full looping $(\mathtt{f})$, there exist two circular, untwisted, isolated minimizers $\bm{{q}}^f$ lying on the $y-z$ plane with energy ${2\pi^2 k_1}/{L}$. The existence of a couple of reflected minima simply translates into a factor of 2 in front of (Eq.~\ref{fin}) and the semi-classical expansion is performed about one of them (e.g. about the one having non-positive $y$ coordinate). For this case (Eq.~\ref{JacHam}) is a constant coefficients Jacobi system, that we solve analytically together with the first set of BCs in (Eq.~\ref{inFM}), in order to obtain the approximated formula for the cyclization probability density $\rho_f(\bm{q}_0,L|\bm{q}_0,0)$ both for $(\mathtt{C})$ and $(\mathtt{K})$ rods. Setting the length scale $l_p=2\beta k_1$, which corresponds to the planar tangent-tangent persistence length for the same rod but constrained in two dimensions \cite{PL}, and the non-dimensional length $\tilde{L}=L/l_p$, we get $ \rrf\approx 2\,e^{-\pi^2 / \tilde{L}} h_{I}\,h_{O}$, where $h_{I}$ and $h_{O}$ are the in-plane (of the minimizer) and out-of-plane contributions \begin{small} \begin{equation}\label{Pop} {h_{I}}=\frac{1}{{l_p}^{2}{\tilde{L}}^{7/2}}\sqrt{\frac{\pi}{a^2}},\quad {h_{O}}_{(\mathtt{non-iso})} = \frac{1}{l_p{\tilde{L}}^{5/2}} \sqrt{\frac{8 \pi (1-\nu_3)}{b\,\nu_3(1-\cos\lambda)}}, \end{equation} \end{small} \begin{equation}\label{An1} {\rho_f}_{(\mathtt{non-iso})} \approx 2\,e^{-\frac{\pi^2}{\tilde{L}}}\frac{1}{{l_p}^{3}{\tilde{L}}^{6}}\sqrt{\frac{8 \pi^2 (1-\nu_3)}{a^2\,b\,\nu_3(1-\cos\lambda)}}, \end{equation} with $\lambda=2\pi\sqrt{(1-\nu_2)(1-\nu_3)}$, $a = 1 + ({2\pi}/{{\tilde{L}}})^2 (\eta_2+\eta_3)$, $b = 1 + ({2\pi}/{{\tilde{L}}})^2 (\omega_1-\eta_1)$, $\nu_2 = k_1/k_2$, $\nu_3 = k_1/k_3$, $\eta_1 = {k_1}/(a_1\,l_p^2)$, $\eta_2 = {k_1}/(a_2\,l_p^2)$, $\eta_3 = {k_1}/(a_3 \,l_p^2)$, $\omega_1 = {k_3}/(a_1\,l_p^2)$. The $(\mathtt{K})$ case is recovered setting $a=b=1$, and the density obtained disregarding the factor ${h_{O}}$ coincides with the cyclization probability density for planar rods given in \cite{LUD}. Notice that the in-plane and out-of-plane contributions are computed by performing two separated Gaussian path integrals for the in-plane and out-of-plane variation fields, exploiting the decomposition of the second variation in two distinguished terms \cite{LUDT}. Moreover, the expressions in (Eq.~\ref{Pop}), (Eq.~\ref{An1}) are valid under stability assumptions for $k_1<k_2$, $k_1\neq k_3$ and equal to the limit $k_3\rightarrow k_1$, i.e. $\nu_3\rightarrow 1$, if $k_3=k_1$. We further underline that (Eq.~\ref{An1}) diverges in the isotropic limit $k_2\rightarrow k_1$, i.e. $\nu_2\rightarrow 1$. In general, for computing the density $\rrm(\bm{0},L|\bm{q}_0,0)$ from (Eq.~\ref{fin}) together with the second set of BCs in (Eq.~\ref{inFM}), numerics must be used. In fact, for the case of marginal looping $(\mathtt{m})$, there are no simple analytical expressions for the two planar ($y-z$ plane) and untwisted teardrop shaped isolated minimizers $\bm{{q}}^m$. However, in the $(\mathtt{K})$ case there exists a scaling argument in the variable $L$, which allows to provide a qualitative expression. Namely, given the fact that we can compute numerically a $(\mathtt{K})$ equilibrium $\bm{{q}}^m_p$ for a given rod length $l_p$, characterised by $\bm{r}_p(s_p)$, $\bm{R}_p(s_p)$, $\bm{\mathsf{v}}_p(s_p)=\hat{\bm{\mathsf{v}}}$, $\bm{\mathsf{u}}_p(s_p)$ $\bm{\mathsf{n}}_p(s_p)$, $\bm{\mathsf{m}}_p(s_p)$ for $s_p\in[0,l_p]$, then for each $L>0$ it can be easily checked that $\bm{r}(s)=\tilde{L}\,\bm{r}_p(s/\tilde{L})$, $\bm{R}(s)=\bm{R}_p(s/\tilde{L})$, $\bm{\mathsf{v}}(s)=\,\bm{\mathsf{v}}_p(s/\tilde{L})=\hat{\bm{\mathsf{v}}}$, $\bm{\mathsf{u}}(s)=1/\tilde{L}\,\bm{\mathsf{u}}_p(s/\tilde{L})$, $\bm{\mathsf{n}}(s)=1/\tilde{L}^2\,\bm{\mathsf{n}}_p(s/\tilde{L})$, $\bm{\mathsf{m}}(s)=1/\tilde{L}\,\bm{\mathsf{m}}_p(s/\tilde{L})$, $\tilde{L}=L/l_p$ define a $(\mathtt{K})$ equilibrium $\bm{{q}}^m$ for $s\in[0,L]$. This immediately implies that $E(\bm{{q}}^m)=1/\tilde{L}\,E(\bm{{q}}^m_p)$. Moreover, since the matrix $\bm{\mathsf{E}}(s)$ in (Eq.~\ref{E1}) is given in terms of strains, forces and moments at the equilibrium by means of (Eq.~\ref{E2}), (Eq.~\ref{E3}), it is possible to obtain the scaling for the Jacobi fields as ${\text{det}[\hhm(0)]}=\tilde{L}^{9}\,{\text{det}[\hhm_p(0)]}$. Finally, defining $E_p=\beta E(\bm{{q}}^m_p)$ and $h_p=l_p^{3}({\beta}/(2\pi))^\frac{3}{2}/\sqrt{\text{det}[\hhm_p(0)]}$, we get \begin{equation}\label{SAn1} {\rrm}_{(\mathtt{non-iso})}\approx 2\,e^{-\frac{E_p}{\tilde{L}}}\frac{h_p}{{l_p}^{3}{\tilde{L}}^{\frac{9}{2}}}, \end{equation} where $E_p$ and $h_p$ have to be computed numerically, and the factor $2$ accounts for the contribution of both the minimizers. By contrast, a simple scaling argument is not present for a $(\mathtt{C})$ rod, therefore allowing for more complex behaviours. We show the results in Fig.\ref{fig67} for a specific choice of the parameters, in the range $L>L^f$ and $L>L^m$ respectively for $(\mathtt{f})$ and $(\mathtt{m})$, so that the only accounted minimizers for the computation of the cyclization probability densities are the circular and the teardrop solutions, and we can apply (Eq.~\ref{An1}) and (Eq.~\ref{SAn1}). The simulations show good agreement between the Laplace approximation and MC in the target small length domain. Even tough the second order expansion looses its quantitative power for larger lengths, the qualitative behaviour is captured and the error does not explode. We remind that looping is a rare event and MC simulations are usually expensive and unfeasible; by contrast, the method proposed in the present article is performing successfully which much higher efficiency. It is also important to underline that for the specific example considered the difference in $\rrf$ between $(\mathtt{K})$ and $(\mathtt{C})$ rods is only due to Jacobi fields, since the energy factor is the same, the circular minima having no extension and no shear deformations. The marginal case $(\mathtt{m})$ is more representative of the general behaviour where $(\mathtt{K})$ and $(\mathtt{C})$ minimizers are distinct solutions, which is true also for $(\mathtt{f})$ BCs for arbitrary (non-uniform, with non-straight intrinsic shape) elastic rods. In fact, in the short-length scale regimes, the possibility to exploit the additional degrees of freedom associated to extension and shear is crucial for minimizing the overall elastic energy, in the face of an increasingly penalizing bending contribution. This phenomenon allows the probability density to be remarkably higher than the $(\mathtt{K})$ case below the persistence length, remaining almost constant and even increasing in the range where for the $(\mathtt{K})$ rod (and therefore also for the WLC model) is exponentially vanishing. By contrast, for large lengths extension and shear become negligible. In addition, as a general statement, the Jacobi factor is fundamental to determine the peak of the density, in a domain where the energy is monotonically decreasing with length. On the other hand, the energy contribution dominates the system for smaller lengths. Finally, we clearly observe overall higher values for the marginal density compared to the full case because of the less restrictive BCs. \subsection{Isotropic polymers} \begin{figure*} \centering \subfigure[]{\includegraphics[width=.45\textwidth]{fig8.pdf}}\qquad \subfigure[]{\includegraphics[width=.44\textwidth]{fig9.pdf}} \subfigure[]{\includegraphics[width=.45\textwidth]{fig10.pdf}}\qquad \subfigure[]{\includegraphics[width=.45\textwidth]{fig11.pdf}} \caption{cyclization densities comparison between the path integral (PI) approximation and MC for an isotropic rod. For $(\mathtt{K})$ we set $\beta=1$, $k_1=k_2=0.5$, $k_3=10$; for the $(\mathtt{C})$ case, we also set $a_1=a_2=a_3=100$. The quantities are reported in non-dimensional form and the undeformed length of the rod is expressed in units of real persistence length $l_p\approx 0.5$. In panel (a) and (c) we address the $(\mathtt{f})$ case, reporting the values for $\rrf$ and displaying in red the zero order contribution. The behaviour for $(\mathtt{C})$ in the small length regime is shown in (c). In panel (b) and (d) the results for the marginal density $\rrm$ are reported, with a zoom window in $log_{10}$ scale; the two different zero order contributions for $(\mathtt{K})$ and $(\mathtt{C})$ rods are displayed in red. The behaviour for $(\mathtt{C})$ in the small length regime is shown in (d).} \label{fig891011} \end{figure*} \begin{figure*}[] \centering \subfigure[]{\includegraphics[width=.35\textwidth]{fig12.pdf}}\quad\qquad\qquad \subfigure[]{\includegraphics[width=.35\textwidth]{fig13.pdf}} \caption{Contour plots for an isotropic rod (with the same parameters already used) showing the ratio of $(\mathtt{C})$ to $(\mathtt{K})$ for the length $L^*$ at which the maximum of $\rrf$ occurs ($L^*(\mathtt{C})/L^*(\mathtt{K})$ in panel (a)) and for the value $\rrf^*$ at the maximum ($\rrf^*(\mathtt{C})/\rrf^*(\mathtt{K})$ in panel (b)) as a function of $k_1=k_2$ and $a_1=a_2=a_3$.} \label{fig1213} \end{figure*} Now we consider the isotropic case, i.e., $k_1=k_2$, $a_1=a_2$ and a $1$-parameter family of non-isolated circular or teardrop minima arises. Given the minimizer in the $y-z$ plane with $y\leq 0$ represented by $\bm{r}(s)=(0,r_2(s),r_3(s))$ and $\bm{R}(s)$ a counterclockwise planar rotation about the $x$ axis of an angle $\varphi(s)$, the $1$-parameter family of minimizers can be expressed as $\bm{r}(s;\theta)=\bm{Q}_{\theta}\bm{r}(s)$ and $\bm{R}(s;\theta)=\bm{Q}_{\theta}\bm{R}(s)\bm{Q}_{\theta}^T$, where $\bm{Q}_{\theta}$ is defined as the counterclockwise planar rotation about the $z$ axis of an angle $\theta\in [0,2\pi)$. Thus, taking the derivative of such minimizers with respect to $\theta$ and finally setting $\theta=0$, the zero mode can be easily recovered in the chosen parametrisation to be ${\bm{\mathsf{\psi}}}(s)=(0,\frac{1}{2}\sin{(\varphi)},\frac{1}{2}(\cos{(\varphi)}-1),-r_2,0,0)$. Moreover, the conjugate momentum of ${\bm{\mathsf{\psi}}}$ is derived in general (for both $(\mathtt{C})$ and $(\mathtt{K})$ rods) substituting the zero mode itself and its to-be-found moment as the unknowns of the Jacobi equations in Hamiltonian form (Eq.~\ref{JacHam}) computed on the minimizer associated to $\theta=0$ (recalling to multiply $\bm{\mathsf{E}}_{1,1}$ by $\frac{\beta}{2\pi}$ and $\bm{\mathsf{E}}_{2,2}$ by $\frac{2\pi}{\beta}$), and reads as $\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}}(s)=(0,\frac{\beta k_1}{2\pi}(\cos{(\varphi)}+1)\varphi ',-\frac{\beta k_1}{2\pi}\sin{(\varphi)}\varphi ',-\frac{\beta}{2\pi} n_2,0,0)$. At this point it is straightforward to apply the theory developed above for non-isolated minimizers, choosing $\bm{\mathsf{\chi}}$ to be a matrix with unit determinant such that the second column (i=2) corresponds to $\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^f}(L)$ and $\bm{\mathsf{X}}$ a matrix with determinant equal to $-1$ such that the fourth column (i=4) corresponds to $([{\bm{\mathsf{\psi}}}^m]_{1:3},[\bm{\mathsf{\mu}}_{{\bm{\mathsf{\psi}}}^m}]_{4:6})^T(L)$, according to (Eq.~\ref{inFMiso}). Consequently, the BCs for the Jacobi equation are well defined, the energy is computed, e.g., for the minimizer corresponding to $\theta=0$ as before, and (Eq.~\ref{finiso}) is analytical for $\rrf\approx 2\pi e^{-\pi^2 / \tilde{L}} h_{I}\,h_{O}$, where \begin{small} \begin{equation}\label{An2} {h_{O}}_{(\mathtt{iso})} = \frac{1}{l_p{\tilde{L}}^{3}} \sqrt{\frac{4}{b\,\nu_3}},\quad{\rho_f} _{(\mathtt{iso})}\approx2\pi e^{-\frac{\pi^2}{ \tilde{L}}}\frac{1}{{l_p}^{3}{\tilde{L}}^{\frac{13}{2}}}\sqrt{\frac{4 \pi}{a^2 b\,\nu_3}}, \end{equation} \end{small} with $a = 1 + ({2\pi}/{{\tilde{L}}})^2 (\eta_1+\eta_3)$ and all the other quantities have been defined previously. In particular, $h_{I}$ is the same as for the non-isotropic case and therefore the zero mode arises for the out-of-plane factor for which the above regularization is applied. The $(\mathtt{K})$ limit is recovered as before setting $a=b=1$. For the marginal density $\rrm$ numerics must be used, but in the $(\mathtt{K})$ case we can carry on the scaling argument in the variable $L$ as before, obtaining \begin{equation}\label{SAn2} {\rrm}_{(\mathtt{iso})}\approx 2\pi\,e^{-\frac{E_p}{\tilde{L}}}\frac{h_p}{{l_p}^{3}{\tilde{L}}^{5}}, \end{equation} for given $E_p=\beta E(\qqm_p)$, $h_p=l_p^{3}\sqrt{{[\bm{\mathsf{\mu}}_{{{\bm{\mathsf{\psi}}}_{ p}^{m}}}(0)]_i}/{]{\hhm_p(0)}[_{i,i}}}$ computed numerically. It is interesting to notice that formulas (Eq.~\ref{An1}), (Eq.~\ref{SAn1}), (Eq.~\ref{An2}) and (Eq.~\ref{SAn2}) scale differently with length as far as the second order correction term is concerned. The latter scalings naturally arise from the ones observed within simpler WLC models, see chapter $7$ in \cite{YAM00}. The comparison between Laplace and MC simulations for isotropic polymers is shown in Fig.\ref{fig891011}, (a) and (b), for the same parameters addressed in the non-isotropic case, but now sending $k_2\rightarrow k_1$. Once more time we only consider the contributions of the manifolds made of circular and teardrop minimizers, setting $L>L^f$ and $L>L^m$. The fact that now $k_2$ is ten times smaller than the same parameter adopted in Fig.\ref{fig67} implies that the overall trend of the density is shifted to the right in units of persistence length, allowing large effects of shear and extension compared to the more standard inextensible and unshearable models, as already discussed. We further observe that the approximation error is generally higher for $(\mathtt{C})$ rods and for marginal looping $(\mathtt{m})$, which is a consequence of the semi-classical expansion that depends on the stiffness values and boundary conditions. For the simple examples considered, there clearly exist more accurate formulas for the $(\mathtt{K})$ case in the literature, e.g., (Eq.~\ref{SAn2}) can be related to the WLC formula (7.68), pag. 266 in \cite{YAM00}. However, the power of the method explained above lies in its generality and ability to easily provide approximation formulas for a wide range of potentially realistic and complex problems in the short length scale regimes. By contrast, since the $(\mathtt{C})$ case represents itself a novelty, we believe that basic examples are still important to understand the underlying physical behaviour. It is natural to ask what happens for $L\leq L^f$ and $L\leq L^m$, respectively in $(\mathtt{f})$ and $(\mathtt{m})$, for $(\mathtt{C})$ rods (for $(\mathtt{K})$ the former analysis based only on circular and teardrop solutions is valid for all lengths). Due to the presence of the stable compressed solution in this range, the density diverges for vanishing length, and this is true both for isotropic and non-isotropic rods. In particular, for $(\mathtt{f})$ here we sum up the contributions coming from the compressed solution (Eq.~\ref{compr}) and the manifold of circular minimizers (Eq.~\ref{An2}); for $(\mathtt{m})$ only the compressed solution is present and we apply (Eq.~\ref{compr}). At the critical lengths $L^f$ and $L^m$ a conjugate point arises for the compressed solution (in $(\mathtt{m})$ the conjugate point arises also in the teardrop minimizer) and the Jacobi fields are singular, leading to an incorrect explosion of the probability density, which should be regularised. We do not address such regularisations, but in Fig.\ref{fig891011}, (c) and (d), we report the results for this length regime, together with MC simulations which connect our approximation formulas valid on the left and on the right of the singularities. Finally, in order to highlight the effect of shear and extension for larger lengths, in Fig.\ref{fig1213} we compare the $(\mathtt{K})$ and the $(\mathtt{C})$ cases in terms of the length and the value of the probability density at which the maximum of $\rrf$ occurs, the first increasing and the second decreasing in presence of extension and shear. \section{Conclusions} In the present article we addressed the problem of computing looping probabilities from a continuum perspective, for different choices of boundary conditions, with particular emphasis on extensible and shearable polymers, which are not generally treated in the standard literature of WLC-type models. In a first approximation DNA fits the WLC hypothesis of inextensibility and unshearability. However, contradictory results have been reported for DNA below the persistence length since the studies of Cloutier and Widom \cite{CW}, actually showing enhanced cyclization of short DNA molecules not explainable by WLC-type models. In a recent study \cite{BIO5} the authors conclude that ``determining whether the high bendability of DNA at short length scales comes from transient kinks or bubbles or stems from anharmonic elasticity of DNA requires improved computational methods and further studies''. Working in this direction, and being aware of the fact that DNA is in fact an extensible molecule \cite{DNAex}, our high cyclization predictions for small lengths in the presence of extension and shear aim to add a piece to the puzzle. Notice that this is achieved even under simple linearly elastic assumptions. Furthermore, birod models \cite{BIR, PRA} with sequence-dependent parameters are more accurate in capturing DNA conformations, but the theory devised here is general and can be applied analogously to this level of complexity, allowing the computation of different ring-closure probabilities without involving expensive MC simulations. In the future, in the wide context of end-to-end probabilities, the effect of external loadings will also be investigated. \section*{acknowledgement} We are grateful to Prof. John H. Maddocks for the fruitful discussions and insights, as well as to all the LCVMM group of Lausanne for the constant support. G.C. and R.S. acknowledge SCITAS computer facilities and grant SNF 200020-182184. \newpage
\section{Introduction} While radial-velocity (RV) surveys were the first to discover exoplanets \citep{mayorqueloz1995}, ground-based and space-based all-sky surveys have been extremely efficient at providing a large sample of diverse transiting extrasolar systems since early 2000. Pioneering surveys carried out with OGLE \citep{udalski2002}, WASP \citep{cameron2007}, and CoRoT \citep{borde2003,deleuil2018} have first revealed the diversity of transiting Jupiter-like planets, and in particular the radius inflation for the most close-in planets \citep{moutou2013,millholland2020}. Then, the more sensitive Kepler mission unveiled the large population of coplanar super-Earth planets \citep{latham2011,rowe2015} and their characteristics \citep{howard2012}, such as the bimodal radius distribution \citep{fulton2017} and compact multiple systems \citep{lissauer2011}. The time has then come to explore individual systems with great precision in order to prepare the atmospheric characterisation of exoplanets with space observatories such as the James Webb Space Telescope \citep{colon2020} and the ARIEL satellite \citep{tinetti2020}. In this respect, the ongoing Transiting Exoplanet Survey Satellite (TESS) programme \citep{ricker} is well-suited to discover transiting systems around the brightest host stars in the whole sky. Each transiting planet discovered by TESS is worth many of its counterparts orbiting fainter stars, as the precision in the parameters' measurement is greater.\\ TESS reaches a precision of 20~ppm for bright targets in 1~h and the main goal of the mission is the detection of small planets that transit bright stars \citep{ricker}. While millions of stars are accessible for photometry through the full-frame image mode scanning the whole sky every 30 min, a selection of 200,000 stars is monitored in a 2-min cadence. Based on the observing strategy and stellar catalogues, a simulation of the planet yield has been refined by \citet{sullivan2015} and \citet{barclay2018}, and it shows that more than 14,000 planets are to be discovered by TESS, 1250 of which are expected in the 2-min cadence mode. At the time of writing, after TESS has been observing for its primary 2-year mission and 6 months into its extended programme, there are 2453 TESS objects of interest (TOI) that are publicly available to the community and under scrutiny for analysis, complementary observations, and system's characterisation. The TESS follow-up programme (TFOP) coordination is a wide community effort to optimise the work on TESS transiting planet candidates. The present work is done in this context.\\ While planet validation can be done in multiple ways \citep[e.g.][]{deeg2009,morton2012,santerne2015}, the characterisation of the transiting candidates by complementary RV observations is the main avenue \citep[e.g.][]{queloz2009,weiss2014}, and it has the huge advantage of providing information on the planet mass in addition to the radius measured by the transit method. Mass determination is key to inform planet formation models, dynamical evolution, and atmospheric characterisation. The mass measurement of transiting planets by the RV method is also unaffected by the usual sky-projection limitation of RV planets (the measured quantity being M$\times$sin$i$), since the orbit inclination angle $i$ is precisely constrained by the transit measurement. The TESS mission objective of focussing on bright stars greatly improves the ability of RV complementary observations, even with modest-size telescopes, compared to the much fainter Kepler candidates - most of which are out of reach for precise RV mass measurements. \\ In this paper, we report the discovery of two Saturn-like planets of a similar size and orbiting similar host stars, with transits revealed by TESS and RV signatures subsequently measured by the SOPHIE spectrograph. In Section 2, we present the observational material. In Section 3, the planet model and parameters are described. In Section 4, we put these two planets in context and conclude. \begin{figure*} \centering \includegraphics[width=0.9\hsize]{moutou_f1a.pdf} \includegraphics[width=0.9\hsize]{moutou_f1b.pdf} \caption{PDC-SAP light curve of TOI-1296.01 (top) and TOI-1298.01 (bottom) obtained at a 2-min cadence.} \label{TOI1298-TESS} \end{figure*} \begin{table} \small \begin{center}{ \caption{Properties of TOI-1296 and TOI-1298 stars.\ The values derived from this study are below the horizontal line.\label{tab:stars} } \begin{tabular}{lcc} & TOI-1296 & TOI-1298 \\ \hline Gaia & 1650851223740149504 & 1647136729864424576 \\ 2MASS & J17070502+7014186 & J16051761+7011235 \\ TIC & 219854185 & 237104103 \\ RA & 17:07:05.018& 16:05:17.607 \\ DEC & +70:14:18.64& +70:11:23.46\\ Distance (pc) & 313.7$\pm$1.2 & 319.0$\pm$2.0 \\ $B$ & 12.32$\pm$0.20 & 12.15$\pm$0.14\\ $V$ & 11.37$\pm$0.10 & 11.89$\pm$0.16\\ TESS mag & 10.8$\pm$0.01& 10.96$\pm$0.01\\ $G_{\textrm{mag}}$ &11.2912$\pm$0.0003& 11.4038$\pm$0.0003\\ $J_{2M}$ & 10.15$\pm$0.018& 10.385$\pm$0.021\\ $H_{2M}$ & 9.837$\pm$0.017& 10.105$\pm$0.017\\ $K_{2M}$ & 9.742$\pm$0.016& 10.012$\pm$0.016\\ \hline Mass (M$_\odot$) & 1.17$\pm$0.14 & 1.44$\pm$0.10\\ Radius (R$_\odot$) &1.664$\pm$0.041 & 1.412$\pm$0.033 \\ log $g$ & 4.05$\pm$0.10& 4.39$\pm$0.08\\ $[$Fe/H$]$ & 0.44$\pm$0.04& 0.49$\pm$0.03 \\ $v$sin$i$ & 4.0$\pm$0.05 & 4.6$\pm$0.05 \\ $v_{tur}$& 1.224$\pm$0.059&1.165$\pm$0.048 \\ T$_{\rm eff}$ (K) & 5603$\pm$47& 5889$\pm$43 \\ Lbol (L$_\odot$) & 2.455$\pm$0.088 & 2.156$\pm$0.077 \\ Age (Gy) & 6.9$\pm$0.7 & 1.6$\pm$0.9 \\ \hline \end{tabular} }\end{center} \end{table} \section{Observations} \subsection{TESS photometry} TOI-1298 and TOI-1296 are both stars from the selected candidate target list, and they have been observed at a 30-minute cadence between mid-July 2019 and March 2020. Periodic transit events have been quickly identified and vetted by the TESS project. When the transit events had been detected, the high cadence mode was triggered and both stars were then observed at a 2-minute cadence over a time span of 106 days in sectors 23 to 26, from March 20 to July 4, 2020. For both systems, one transit was lost in an interruption of the time series during sector 26. TOI-1296b and TOI-1298b show 25 and 23 transits in total, respectively. The TESS light curves for both stars at 2-minute cadence are shown in Figure \ref{TOI1298-TESS}. The images of the aperture used in obtaining the precision photometry are shown in Figure \ref{imagettes}. The systematic error-corrected PDC-SAP light curves \citep{stumpe2012,stumpe2014,smith2012} were used through the Python package \texttt{lightkurve} \citep{lightkurve2018}. The transits show a periodicity of 3.944 days and a depth of 0.77\% for TOI-1296.01 and a period of 4.537 days and a depth of 0.42\% for TOI-1298.01. Preliminary vetting by the TESS project team has proven both events, TOI-1296.01 and TOI-1298.01, to be bona fide transiting planet candidates. For instance, no centroid displacement was observed, and the odd and even transit events have an identical depth within the measurement errors. The SPOC pipeline \citep{jenkins2016,twicken2018,Li:DVmodelFit2019}, as reported at MAST\footnote{https://exo.mast.stsci.edu}, clearly excludes instrumental false positives and the grazing binary scenario.\\ \subsection{Ground-based photometry} Since both transiting events are deep and have a short period, they are easily amenable to a detection from small ground-based observatories. Scheduled photometry has thus confirmed for both candidates that the transit was occurring on the main target of the TESS aperture, rejecting the background eclipsing binary astrophysical false positive scenario. We used the TESS Transit Finder, which is a customised version of the Tapir software package \cite[][]{Jensen:2013}, to schedule the observations. The photometric data were extracted using the AstroImage (AIJ) software package \cite[][]{Collins:2017}. For TOI-1296b, two full transits at the expected ephemeris were observed with 40-cm telescopes and four partial transits targeting the ingress were observed with 40 and 61-cm telescopes. The first full transit was observed at Acton Sky Portal observatory using the $r'$ filter on March 22, 2020. The ephemeris and transit depth were as expected. The second full transit was observed at Grand-Pra observatory with a 0.4-m telescope in the $g'$ filter on April 6, 2020. In the modelling, we also include the partial transits obtained at Las Cumbres observatories on March 27, 2020, and March 18, 2020, and at Adams Observatory on August 11, 2020 in the $B$ and $I_c$ filters. In March 2021, new full transits have been observed. They are not included in the present analysis. For TOI-1298b, three full transits and one partial transit were observed. The full transits are of low quality and were not used in this analysis, as they induced a bias in the results. The last ground-based transit was obtained by KeplerCam on February 27, 2020, and is shown in Figure \ref{TOI1298-keplercam}. It definitely confirms the transit to occur on the stellar host at the expected ephemeris. As it is not a full sequence, it is not included in the analysis either. More information on the ground-based photometric follow-up of those TOIs is available on the TFOP page\footnote{https://exofop.ipac.caltech.edu/tess/}. \begin{figure} \centering \includegraphics[width=0.9\hsize]{moutou_f2.pdf} \caption{Light curve of TOI-1298 obtained by KeplerCam, after normalisation by a straight line. The black-line model uses the posterior parameters of the system, as discussed in section 3.2. } \label{TOI1298-keplercam} \end{figure} \subsection{Reconnaissance spectroscopy} We obtained reconnaissance spectra of TOI-1296 and TOI-1298 with the Tillinghast Reflector Echelle Spectrograph \citep[TRES;][]{furesz} located at the Fred Lawrence Whipple Observatory (FLWO) in Arizona, USA. TRES is a fibre-fed spectrograph with a resolving power of $\sim$44,000. The spectra were reduced and extracted as described in \citet{buchhave2010}. Relative RVs were derived by cross-correlating each observed spectrum order-by-order against the highest signal-to-noise ratio (S/N) observed spectrum. The RVs for both candidates excluded velocity variations of an amplitude compatible with a binary companion and indicated that they were good targets suitable for precision-RV follow-up observations. More specifically, two measurements of TOI-1296 were obtained with TRES with a 6 day interval, an error of 38 m/s, and a non-significant velocity difference of 17 m/s. For TOI-1298, three TRES measurements were obtained within 55 days, with an $rms$ of 32 m/s and individual errors of 25 m/s. These few data points are not included in the global fit. The Stellar Parameter Classification \citep[SPC;][]{buchhave2012} tool was used to derive stellar parameters from the weighted average spectrum of S/N 35 and 55 for TOI-1296 and TOI-1298, respectively. SPC cross correlates an observed spectrum against a grid of synthetic spectra based on Kurucz atmospheric models \citep{kurucz1992}. The weighted average results derived with the effective temperature ($T_{\rm eff}$), metallicity ([M/H]), and surface gravity ($\log g$) and vsini as free parameters are, for TOI-1296, T$_{\rm eff}=5646\pm50$~K, log(g) = $4.19\pm0.10$, [M/H] = $0.50\pm0.08$, and vsini = $4.0\pm0.5$~km/s. For TOI-1298, the values are as follows: T$_{\rm eff}=5830\pm50$~K, log(g) = $4.29\pm0.10$, [M/H] = $0.46\pm0.08$, and vsini = $4.6\pm0.5$~km/s. \subsection{SOPHIE spectroscopy} High-resolution spectroscopy and RV measurements were performed at Observatoire de Haute Provence (France) for both stars with the SOPHIE (Spectrographe pour l’Observation des Ph\'enom\`enes des Int\'erieurs stellaires et des Exoplan\`etes) spectrograph \citep{perruchot2008, bouchy2013}. TOI-1296 was observed from June 2 to October 18, 2020, and TOI-1298 was observed from July 8 to October 26, 2020. The high-resolution mode was used for these observations, corresponding to a spectral resolution of 76,500. While the science target was observed in the main fibre, the sky background was observed in the secondary fibre. This allowed us to correct for potential contamination from the sky background, as is routinely done in this mode with fibre-fed spectrographs \citep{bonomo2010}. With regular spectral calibrations of the spectrograph through the night using the Fabry-P\'erot etalon, the instrumental drift was also corrected at a level smaller than 1 m/s, which is much better than the photon noise RV errors for these faint stars. Exposure times were about 1200~s and 1500~s per visit for TOI-1296 and TOI-1298, respectively. Signal-to-noise ratios of typically 20-30 per pixel were obtained at 550~nm, corresponding to photon noise uncertainties of about 3 m/s for both stars. One outlier measurement was removed from the data set for each star, corresponding to RV errors of 1.5 to 2 times the average error bars. The RVs were obtained by cross-correlating the extracted spectra with a binary mask corresponding to a G2 spectral type, which contains 3645 lines. There are 14 RV measurements for each time series. The bisector slope was also measured on the cross-correlation functions \citep{queloz2001}. The SOPHIE RVs are listed in Tables \ref{table.rvs1296} and \ref{table.rvs1298}.\\ The raw RV time series have a standard deviation of 28.4 and 28.9 m/s for TOI-1296 and TOI-1298, respectively, with a periodic signal. When folded at the period of the photometric transit, the sine wave signal is clearly detected, corresponding to semi-amplitudes of 35.0$\pm$3.5 and 34.4$\pm$2.5 m/s, respectively. After this signal is removed, the periodogram of the RV residuals does not show another signal for any of the systems. On the other hand, there is some variability observed in the bisector span time series at a level of 1.5 to 3$\sigma$, as shown in Figure \ref{BIS}: this figure both shows how the bisector of the line varies as a function of the RV for both stars (top panels) and as a function of the RV residuals when the best-fit planet model is removed. The colour scale indicates the rotation cycle, using the estimated rotation periods given in section 3.1. If the bisector span varies with time, which may be the indication of stellar activity, the correlations are weak. Moreover, this possible activity signal does not occur at the period corresponding to the planet orbital period. Pearson's coefficients are lower than 0.4 in all cases. The greatest correlation value of 0.39 is seen between the RV residuals and bisector span for TOI-1298 (bottom right panel). Stellar activity is thus excluded as the main source of the RV variations, while there may be some activity contribution to the RV residuals for TOI-1298. The RV signal in phase with the TESS ephemeris for both systems establishes the planetary nature of the transiting bodies. \begin{figure} \centering \includegraphics[width=\hsize]{moutou_f3.pdf} \caption{ Bisector span as a function of the RV for both stars, and as a function of the residuals after the planet models were modelled. The colours indicate the phase in a rotation cycle. } \label{BIS} \end{figure} \section{Results} \begin{figure} \centering \includegraphics[width=0.9\hsize]{moutou_f4a.pdf} \includegraphics[width=0.9\hsize]{moutou_f4b.pdf} \caption{Spectral energy distributions of TOI-1296 (top) and TOI-1298 (bottom). Red symbols represent the observed photometric measurements, where the horizontal bars represent the effective width of the passband. Blue symbols are the model fluxes from the best-fit Kurucz atmosphere model (black). } \label{fig:sed} \end{figure} \begin{figure} \centering \includegraphics[width=0.9\hsize]{moutou_f5.pdf} \caption{ HR diagram in luminosity as a function of effective temperature. The isochrones are from the CESAM2k models \citep{cesam}. Symbols show the measured position of TOI-1296 (blue) and TOI-1298 (red) in this diagram, the first one lying on the subgiant branch, and the second one on the main sequence. } \label{fig:hr} \end{figure} \subsection{Stellar parameters}\label{sec:stellarparams} For each star, all spectra not contaminated by the Moon and of sufficient quality were summed up in order to get a stellar template of a high S/N (total S/N of 90 and 110 for TOI-1296 and TOI-1298, respectively). We then used the method described in \citet{santos2013} and \citet{sousa2018}: from the measured equivalent widths of reference lines with ARES, stellar atmospheric parameters and chemical abundances were derived in the local thermodynamic equilibrium with the latest version of the MOOG code \citep{sneden1973} and a grid of Atlas 9 model atmospheres \citep{kurucz1993}. The effective temperature, log$g$, projected rotational velocity $v$sin$i$, turbulence velocity $v_{tur}$, and metallicity values [Fe/H] derived from this spectroscopic analysis are listed in Table \ref{tab:stars}. The derived spectroscopic parameters are in close agreement with those obtained from the TRES measurements. In particular, the large metallicity value is confirmed with both independent measurements. We performed an analysis of the broadband spectral energy distribution (SED) of the star together with the {\it Gaia\/} EDR3 parallaxes \citep[with no systematic correction; see, e.g.][]{StassunTorres:2021} in order to determine an empirical measurement of the stellar radius, following the procedures described in \citet{Stassun:2016} and \citet{Stassun:2017,Stassun:2018}. We obtained the $B_T V_T$ magnitudes from {\it Tycho-2}, the $JHK_S$ magnitudes from {\it 2MASS}, the W1--W4 magnitudes from {\it WISE}, the $G G_{\rm BP} G_{\rm RP}$ magnitudes from {\it Gaia}, and the near-ultraviolet (NUV) magnitudes from {\it GALEX}. Together, the available photometry spans the full stellar SED over the wavelength range 0.2--22~$\mu$m (see Figure~\ref{fig:sed}). We then performed a fit using Kurucz stellar atmosphere models, with $T_{\rm eff}$, [Fe/H], and $\log g$ adopted from the spectroscopic analysis (Table \ref{tab:stars}). The only additional free parameter is the extinction ($A_V$), which we restricted to the maximum line-of-sight value from the dust maps of \citet{Schlegel:1998}. The resulting fits for TOI-1296 and TOI-1298 are good (Figure~\ref{fig:sed}) with a reduced $\chi^2$ of 1.6 and 2.0, respectively, excluding the NUV flux which appears slightly in excess and could indicate modest chromospheric activity. The best-fit extinction values are $A_V = 0.05 \pm 0.05$ for TOI-1296 and $0.04 \pm 0.04$ for TOI-1298. Integrating the (unreddened) model SED gives the bolometric flux at Earth, $F_{\rm bol} = 7.81 \pm 0.27 \times 10^{-10}$ erg~s$^{-1}$~cm$^{-2}$ and $6.89 \pm 0.24 \times 10^{-10}$ erg~s$^{-1}$~cm$^{-2}$ for TOI-1296 and TOI-1298, respectively, which with the parallax directly gives the bolometric luminosity $L_{\rm bol} = 2.455 \pm 0.088$~L$_\odot$ and $2.156 \pm 0.077$~L$_\odot$, respectively. Taking the $F_{\rm bol}$ and $T_{\rm eff}$, together with the {\it Gaia\/} parallax, gives the stellar radius $R_\star = 1.664 \pm 0.041$~R$_\odot$ and $1.412 \pm 0.033$~R$_\odot$, respectively. We can also infer the ages of the systems using empirical activity-age relationships. In particular, the observed UV excess in Figure~\ref{fig:sed} via the empirical relations of \citet{Findeisen:2011} yields an activity index $\log R'_{\rm HK} = -5.49 \pm 0.1$ and $-5.57 \pm 0.1$, which implies a rotation period of $P_{\rm rot} = 54 \pm 5$~d and $38 \pm 3$~d for TOI-1296 and TOI-1298, respectively. There is no significant sign of these rotation periods in the TESS light curves. Adopting this activity with the empirical rotation-age relations of \citet{Mamajek2008} gives age estimates of 10~Gyr (TOI-1296) and 9.5~Gyr (TOI-1298). To better determine the stellar parameters of the two targets, we performed an optimisation using the stellar evolution code \textsc{CESAM2K} (\citealt{cesam}) within a Levenberg-Marquardt algorithm. We used the estimates of $T_{\rm eff}$, $\log g$, $[$Fe/H$]$, and $L_{\rm bol}$ derived in this study as observational constraints, and we considered the stellar mass, the age, the initial metallicity, and the initial helium abundance as free parameters of the fit. In the models, we used the OPAL 2005 equation of state (\citealt{rogers02}) and opacity tables. The nuclear reactions rates were computed using the NACRE compilation \citep{angulo99} and the LUNA revised rate for the $^{14}$N$(p,\gamma)^{15}$O reaction \citep{formicola04}. Convection was treated following the formalism of \cite{canuto96} with a solar-calibrated value of the mixing length parameter. Core overshooting was neglected. Microscopic diffusion was included by solving the equations of \cite{burgers69}, but the effects of radiative levitation were neglected. The atmosphere was described by Eddington’s grey law. We adopted the solar mixture of heavy elements of \cite{asplund09}. The optimal stellar parameters obtained for the two stars are given in Table \ref{tab:stars}, and the evolutionary tracks of the best models in the HR diagram are shown in Fig. \ref{fig:hr}. We found TOI-1296 to be in the subgiant phase, while TOI-1298 still lies on the main sequence, the optimal model having a fraction of hydrogen in the core of $X_{\rm c} = 0.51$. The error bars given in Table \ref{tab:stars} were obtained by using the inverse of the Hessian matrix. They correspond to internal error bars and do not account for the effects of systematics caused by our choice of input physics. \subsection{Data modelling} We performed a global modelling including all available data. The fitted parameters are as follows: $q_1$ and $q_2$ \citep{kipping2013}, the quadratic limb darkening coefficients for all light curves, the radius to semi-major axis ratio, the radius ratio, the orbit inclination, the mid-transit time, the orbital period, the semi-amplitude of RV variations, the systemic velocity, the stellar density, and a jitter term for the RV time series. Eccentricity was let free to vary, adding the fitted parameters $\sqrt{e}\cos\omega$ and $\sqrt{e}\sin\omega$. For TOI-1296b, Gaussian process regression was used for TESS data and all ground-based light curves, which were modelled simultaneously with SOPHIE data. For TOI-1298b, only TESS and SOPHIE data were used in the modelling. The TESS data included in the analysis are centred on the transit events, with a width of three times their duration. The priors used in the analysis are uniform for most of the parameters, except the stellar density for which a normal prior is used from the stellar mass and radius derived from the spectroscopic analysis and SED modelling, as discussed in section~\ref{sec:stellarparams}. The priors we imposed on the stellar density are the following: $0.358\pm0.052~\rm{g\;cm^{-3}}$ for TOI-1296 and $0.721\pm0.074~\rm{g\;cm^{-3}}$ for TOI-1298. For this global modelling, we used the \texttt{Juliet} package \citep{espinoza2019}. Within \texttt{Juliet}, we used the transit model \texttt{batman} \citep{kreidberg2015} and the RV model \texttt{radvel} \citep{fulton2018}. We used the approximate Matern kernel included in \texttt{celerite} \citep{foreman-mackey2017} for the photometric datasets, including both TESS data and ground-based light curves. Quadratic limb darkening was let free for each filter. We oversampled the TESS 30-minute cadence with a factor of 30, and the TESS 2-minute cadence with a factor of 3 \citep{kipping2010}. To sample from the posterior, we used the nested sampling code \texttt{dynesty} \citep{speagle2020}, with 500 live-points and a relative value of difference of the logarithm of the evidence less than $0.5$ as convergence criterium. \begin{table*} \renewcommand{\arraystretch}{1.25} \centering \caption{Posterior median and 68.3\% credible interval for the system's parameters from the \texttt{Juliet} analysis.}\label{table.juliet} \begin{tabular}{lccc} \hline Parameter & Units & TOI-1296 & TOI-1298\\ \hline Stellar mean density & [$\rm{g\;cm^{-3}}$] & 0.324$_{-0.048}^{+0.037}$ & 0.670 $\pm$ 0.062 \\ $q_1$ TESS & & 0.354$_{-0.075}^{+0.092}$ & 0.180$_{-0.076}^{+0.13}$ \\ $q_2$ TESS & & 0.300$_{-0.077}^{+0.087}$ & 0.44$_{-0.21}^{+0.29}$ \smallskip\\ Orbital period, P & [days] & $3.9443715 \pm 5.8\;10^{-6}$ & $4.537164 \pm 1.2\;10^{-5}$ \\ Mid-transit time, Tc & [BJD$_{\rm TDB}$] & 2458930.75532 $\pm$ 0.00019 & 2458929.58558 $\pm$ 0.00031 \\ Semi-major axis in stellar radii, $a/R_\star$ & & 6.44$_{-0.33}^{+0.24}$ & 9.00$_{-0.29}^{+0.25}$ \\ Semi-major axis, $a$ & [au] & 0.0497$_{-0.0028}^{+0.0023}$ & 0.0590 $\pm$ 0.0023 \\ Radius ratio, $R_{\mathrm{p}}/R_\star$ & & 0.07599$_{-0.00039}^{+0.00046}$ & 0.06119 $\pm$ 0.00053 \\ Impact parameter, $b$ & & 0.13 $\pm$ 0.11 & 0.16$_{-0.11}^{+0.13}$ \\ Orbital inclination, $i$ [degrees] & & 88.81$_{-1.0}^{+0.82}$ & 88.96$_{-0.86}^{+0.73}$ \\ $\sqrt{e}\cos{\omega}$ & & -0.12$_{-0.14}^{+0.18}$ & -0.05$_{-0.12}^{+0.14}$ \\ $\sqrt{e}\sin{\omega}$ & & 0.11$_{-0.17}^{+0.15}$ & 0.04$_{-0.15}^{+0.13}$ \\ Eccentricity, $e$ & & 0.055$_{-0.038}^{+0.061}$ & 0.032$_{-0.023}^{+0.034}$ \\ Argument of pericentre, $\omega$ & [degrees] & 137 $\pm$ 62 & 130 $\pm$ 92 \\ Radial velocity semi-amplitude, $K$ & [$\rm{m\;s^{-1}}$] & 34.8 $\pm$ 3.4 & 34.4 $\pm$ 2.5 \\ Systemic velocity, $\mu$ & [$\rm{km\;s^{-1}}$] & 25.3919 $\pm$ 0.0026 & -55.5587 $\pm$ 0.0025 \\ Jitter radial velocity, $\sigma_{\rm RV}$ & [$\rm{m\;s^{-1}}$] & 7.7$_{-2.3}^{+3.0}$ & 4.0$_{-3.8}^{+3.4}$ \smallskip\\ Planet mass, $M_{\rm p }$ & [M$_{\mathrm{Jup}}$] & 0.298 $\pm$ 0.039 & 0.356 $\pm$ 0.032 \\ Planet radius, $R_{\rm p}$ & [R$_{\mathrm{Jup}}$] & 1.231 $\pm$ 0.031 & 0.841 $\pm$ 0.021 \\ Planet mean density, $\rho_{\rm p}$ & [$\rm{g\;cm^{-3}}$] & 0.198 $\pm$ 0.031 & 0.743 $\pm$ 0.091 \\ Planet equilibrium temperature$^\dagger$, T$_{\rm eq}$ & [K] & 1562$_{-31}^{+43}$ & 1388 $\pm$ 24 \smallskip\\ \hline \end{tabular} \begin{list}{}{} \item {\bf{Notes.}} $^\dagger$ For zero albedo and full day-night heat redistribution. \end{list} \end{table*} For the system TOI-1296, the posterior distribution value for the stellar density we obtained, including all available data, is $0.324_{-0.048}^{+0.037}$~g/cm$^3$. With this good agreement on stellar density values, we safely adopted the radius and mass from the stellar characterisation using the SED modelling. The planet's mass and radius we derived are as follows: $M_{pl} = 0.298\pm0.039$~M$_{\mathrm{Jup}}$\ and $R_{pl} = 1.231\pm0.031$~R$_{\mathrm{Jup}}$. This corresponds to a planet's density $\rho_p$ of $0.198\pm0.031$~g/cm$^3$. The derived eccentricity is compatible with a circular orbit.\\ TOI-1298 was modelled in the same way. We obtain a posterior value of $0.670\pm0.062~\rm{g\;cm^{-3}}$, showing good agreement with the prior value of $0.721\pm0.074\rm{g\;cm^{-3}}$. The derived planet's mass is $0.356\pm0.032$~M$_{\mathrm{Jup}}$\ and the radius is $0.841\pm0.021$~R$_{\mathrm{Jup}}$, implying a density of $0.743\pm0.091$~g/cm$^3$. The eccentricity is not significantly different from 0. The posterior results are listed in Table~\ref{table.juliet} for TOI-1296 and TOI-1298 systems, while Figures \ref{TOI1296-fit} and \ref{TOI1298-fit} show the best fit to the data in both cases. \begin{figure*} \centering \includegraphics[width=1.0\hsize]{moutou_f6a.pdf} \includegraphics[width=1.0\hsize]{moutou_f6b.pdf} \includegraphics[width=0.49\hsize]{moutou_f6c.pdf} \includegraphics[width=0.49\hsize]{moutou_f6d.pdf} \caption{ Modelling of data obtained on TOI-1296b. (top) The TESS light curve in 30-minute and 2-minute cadence, and ExoFOP ground-based light curves; (bottom) The SOPHIE data series of RV versus time and folded RV data, together with the best-fit model (the time unit for the RV time series is BJD$_{UTC}$}). In all panels, blue data points with error bars show the observed data. Black lines and intervals in grey show the model median and the 68.3\% credible interval computed from 1000 random posterior samples. Grey lines show the maximum a posteriori transit model. The blue points associated with those grey lines are the data points corrected for the best-fit Matern kernel. For the ground-based light curves, the observatory name and filters used for observations label the relevant plot. \label{TOI1296-fit} \end{figure*} \begin{figure*} \centering \includegraphics[width=1.0\hsize]{moutou_f7a.pdf} \includegraphics[width=0.49\hsize]{moutou_f7b.pdf} \includegraphics[width=0.49\hsize]{moutou_f7c.pdf} \caption{Same as Figure \ref{TOI1296-fit}, but for TOI-1298b.} \label{TOI1298-fit} \end{figure*} We then fixed the transit parameters to the posterior maximum and let the time of individual transits vary to search for transit time variations. We used a normal prior with a width of 0.03 days with respect to the linear ephemeris of the fit, obtained in the global modelling. The resulting transit times are shown in Figure \ref{TTV} for both systems. It is intriguing that four negative outliers stand out for TOI-1298b at regular times, separated by 100 days. It may be due to an instrumental systematic noise, as no global pattern is seen at this period. We conclude that there is no significant detection of variable transit times for either of the systems. \begin{figure} \centering \includegraphics[width=0.95\hsize]{moutou_f8a.pdf} \includegraphics[width=0.95\hsize]{moutou_f8b.pdf} \caption{Deviation of individual transit times with respect to linear ephemeris, as a function of time (top) for TOI-1296b and (bottom) for TOI-1298b.} \label{TTV} \end{figure} \section{Discussion} The planets discovered by TESS around TOI-1296 and TOI-1298 both have short orbital periods of 3.94 and 4.54~days, respectively. They are both heavily irradiated by their host star with estimated equilibrium temperatures of about 1560 and 1390~K and incident fluxes of $\sim$ 7$\times$10$^8$ and 3$\times$10$^8$ erg/s/cm$^2$. The numerous transits revealed by TESS on these systems allowed for a precise radius for the planets, with a large difference between both values of 1.231$\pm0.031$ and 0.841$\pm0.021$ R$_{\mathrm{Jup}}$ \ for TOI-1296b and TOI-1298b, respectively. The measured radii of both planets correspond to the bulk of giant-planet radii in the same range of incident flux and thus may be explained by the effects of atmospheric circulation induced by stellar irradiation, as shown by \citet{tremblin2017}. Complementary observations with SOPHIE have established the planetary nature of the signal at this period and secured a mass measurement for both planets in circular orbits. Despite their different radius, both planets have similar masses, close to Saturn's mass. These two planets thus have particularly distinct bulk densities of 0.198 and 0.743~g/cm$^3$. The (slightly) more massive of the two has a much lower radius value. It is interesting to compare both stellar host stars. While TOI-1298 still lies on the main sequence, TOI-1296 has started evolving into the subgiant branch, with an enlarged stellar radius (1.66 R$_{\odot}$) and increased luminosity (2.455 L$_{\odot}$). These different evolutionary statuses of both stars may play a role in the radius inflation of the planet TOI-1296b as compared to TOI-1298b, for a mass in a close range, as postulated by \citet{lopez2016}. This type of possible trend between stellar evolution and reinflation of planets was also recently reported by several studies of individual systems such as HAT-P-65, HAT-P-66 \citep{hartman2016}, NGTS-13 \citep{grieves2021}, HD 221416 \citep{huber2019}, and HD 1397 \citep{brahm2019}. The rich harvest of precision transit photometry such as achieved by TESS allows for the discovery and accurate characterisation of large samples of planets that offer observational constraints to evolution models. In the present work, two more planets with 3\% precision on the radius have been presented and their significant difference in terms of their radius value also puts into questions the role of stellar evolution towards the giant branch in the evolution of the close-in planet radius. Figure \ref{fig:rprs} (bottom) locates the planets TOI-1296b and TOI-1298b in the mass-radius diagram and shows that, at their given mass, they encompass the whole range of observed planet radii. The top panel of Figure \ref{fig:rprs} shows the current distribution of planetary and stellar radii in the population of confirmed planets. For giant planets with a size between 0.5 and 0.8 R$_{\mathrm{Jup}}$\ there is no visible trend with respect to the stellar radius (cyan line). In contrast, for planets greater than 0.8 R$_{\mathrm{Jup}}$, there is a linear trend between the stellar and planetary radii, with a residual standard deviation of 0.2 R$_{\mathrm{Jup}}$. The radii of TOI-1296 and its giant planet are compatible with this trend within 1$\sigma$. The radius of TOI-1298b, on the other hand, being near the limit where the trend is no longer visible, seems to stand out of the population of small-sized giant planets where the radius does not depend on the stellar radius or lies in a radius valley in between the two populations mentioned above. It is out of the scope of this paper to investigate whether the paucity of planets in the lower right corner of this plot (stellar radii between 1.3 and 2 R$_\odot$ and planetary radius less than 1 R$_{\mathrm{Jup}}$) is an observational bias or directly relates with the evolutionary status of the host stars. No observational bias, however, directly comes into mind, as smaller planets are detected around large-radius stars. It thus appears that when giant planets are present around stars with radii larger than 1.5 R$_\odot$, then their radius increases with the stellar radius. As the process likely relies on received stellar irradiation, it can be related to atmospheric circulation \citep{tremblin2017}. The planet-star distance may explain the dispersion around the trend. The coefficients of this trend are such that R$_p$/R$_{\mathrm{Jup}}$\ = 0.77 + 0.37 $R_s$/$R_\odot$, where R$_p$ and R$_s$ are the planet and stellar radii, respectively. This loose correlation is similar to the one found between the planet radius and stellar age in \citet{hartman2016} (their Figure 12), and it possibly has the same origin. There is no doubt that current transit surveys and their follow-up will further unveil the properties of giant planets as the host star evolves, especially when the stellar radius can be precisely characterised with asteroseismology, as in \citet{huber2019}. The host stars are, moreover, enriched in heavy elements, with metallicities of $+$0.44$\pm$0.04 and $+$0.49$\pm0.03$. Figure \ref{fig:feh} shows the current distribution of stellar metallicity in the population of exoplanet hosts. This distribution shows a larger proportion of solar metallicity and a larger wing towards the low metallicity, as for field stars \citep{holmberg2007}. From Fig. 21 of \citet{holmberg2007}, we can see that less than 0.5\% of stars in the solar vicinity do indeed have a metallicity larger than 0.45. TOI-1296 and TOI-1298 thus stand out in the extreme wing of high metallicity. Stars of such metallic content have the largest odds to host a giant planet in short orbit as shown in early studies \citep{santos2004, fischer2005} and most recently by \citet{petigura2018}, who derived an occurrence rate of about three giant planets per 100 stars in the period range from 1-10 days for host stars as metal-rich as TOI-1296 and TOI-1298 (their Fig. 10a). This rate is about 10 times greater than for stars of solar metallicity, according to this study. The system of TOI-1296 looks similar to K2-97, an inflated hot Jupiter orbiting an evolved, metal-rich star and used as a benchmark for the reinflation process \citep{grunblatt2017}, and also to HATS-41 \citep{bento2018}, Kepler-91 \citep{barclay2015}, and HATS-54 \citep{espinoza2019}. On the other hand, the system TOI-1298 has similar properties as XO-7 \citep{crouzet2020} and WASP-21 \citep{bonomo2017}. With this work, we are adding two transiting systems in the most metal-rich bin, one of them being hosted by an evolved star. The large-density planet TOI-1298b and its host star is intermediate between Saturn and the most studied transiting system of HD 149026 \citep{sato2005}. HD 149026 is also metal rich, and its high-density planet likely has a massive core. It is also expected for TOI-1298b for its internal core and/or atmospheric composition to be extremely enriched, as shown in \citet{guillot2005}, \citet{fortney2006}, and \citet{baraffe2008}. From irradiated models of planetary internal structure presented in \citet{baraffe2008} with a mass of about 110 Earth masses and an age of 9.5 Gyr, the radius of TOI-1298b would be consistent with a relative content of heavy elements of 15 to 40\% (or 16 to 44 Earth masses). It is impossible to say whether this mass of heavy elements is concentrated in a core or mixed within the envelope due to our current knowledge of giant planet interiors, as described for instance in \citet{debras2019}. On the other extreme side, TOI-1296b is very fluffy with a density about 4 times smaller, while the stellar host is equivalently metal-rich. Within its mass range, TOI-1296b is one of the most inflated planets, as illustrated in Figure \ref{fig:rprs} (bottom). As it may be due to the reinflation of the planet, it may not automatically imply a low content in heavy elements. The tendency is indeed for high-metallicity stars to have high-metallicity planets \citep{moutou2013}. With reinflation, the new flux income from the stellar luminosity increase may alternatively explain the lower density, despite the presence of heavy elements in the planet atmosphere. The formation, internal structure, and evolution of such diverse planets remains to be precisely described. \begin{figure} \includegraphics[width=\hsize]{moutou_f9a.pdf} \includegraphics[width=\hsize]{moutou_f9b.pdf} \caption{ (Top) Planet radius as a function of stellar radius for all transiting giant planets. The two lines are linear fits for the populations of planets above (orange line, green dots) and below (cyan line, blue dots) the 0.8 R$_{\mathrm{Jup}}$\ threshold (see text), respectively. (Bottom) Planet radius as a function of planet mass for transiting giant planets. Small dots represent all confirmed giant planets above 0.5 R$_{\mathrm{Jup}}$\ from the NASA exoplanet archive\protect\footnotemark. The new planets in these parameter spaces are shown with the red symbols. Although of a similar mass, they differ significantly in radius.} \label{fig:rprs} \end{figure} \footnotetext{https://exoplanetarchive.ipac.caltech.edu/} \begin{figure} \includegraphics[width=0.9\hsize]{moutou_f10.pdf} \caption{Distribution of metallicity in planet host stars from the NASA exoplanet archive$^3$. The extreme properties of TOI-1296 and TOI-1298 are shown with arrows.} \label{fig:feh} \end{figure} \begin{table} \renewcommand{\arraystretch}{1.25} \centering \caption{SOPHIE RV and errors for TOI-1296.}\label{table.rvs1296} \begin{tabular}{lcc} \hline MJD & RV & $\sigma$\\ & km/s & m/s \\ \hline 2459003.49320&24.9370 &0.0090\\ 2459016.52095&25.0607&0.0057\\ 2459018.48719&24.9841&0.0062\\ 2459019.48308&25.0273&0.0047\\ 2459020.46828&25.0545&0.0056\\ 2459039.43075&25.0404&0.0053\\ 2459040.42127&25.0555&0.0036\\ 2459056.43518&25.0342&0.0056\\ 2459057.43562&25.0116&0.0033\\ 2459059.39879&25.0134&0.0052\\ 2459061.42214&24.9853&0.0052\\ 2459080.35443&25.0369&0.0053\\ 2459139.31406&25.0442&0.0050\\ 2459140.36151&24.9850&0.0048\\ 2459141.29465&25.0060&0.0052\\ \hline \end{tabular} \end{table} \begin{table} \renewcommand{\arraystretch}{1.25} \centering \caption{SOPHIE RV and errors for TOI-1298.}\label{table.rvs1298} \begin{tabular}{lcc} \hline MJD & RV & $\sigma$\\ & km/s & m/s \\ \hline 2459039.39641 & -56.0040 & 0.0054\\ 2459059.38347 & -55.9629 & 0.0050\\ 2459060.41331 & -55.9345 & 0.0054\\ 2459061.39563 & -55.9808 & 0.0045\\ 2459062.38681 & -56.0070 & 0.0060\\ 2459081.36504 & -55.9724 & 0.0045\\ 2459082.38186 & -55.9578 & 0.0055\\ 2459083.34692 & -55.9602 & 0.0049\\ 2459084.39174 & -56.0133 & 0.0060\\ 2459085.32123 & -56.0255 & 0.0072\\ 2459107.32167 & -56.0114 & 0.0072\\ 2459140.27286 & -55.9745 & 0.00423 \\ 2459141.26965 & -55.9561 & 0.0048\\ 2459149.29675 & -55.9368 & 0.0073 \\ \hline \end{tabular} \end{table} \begin{acknowledgements} { We are grateful to the anonymous referee who provided very useful criticism and suggestions. Funding for the TESS mission is provided by NASA's Science Mission Directorate. We acknowledge the use of public TESS data from pipelines at the TESS Science Office and at the TESS Science Processing Operations Center. Resources supporting this work were provided by the NASA High-End Computing (HEC) Program through the NASA Advanced Supercomputing (NAS) Division at Ames Research Center for the production of the SPOC data products. This paper includes data collected by the TESS mission that are publicly available from the Mikulski Archive for Space Telescopes (MAST). We acknowledge funding from the French National Research Agency (ANR) under contract number ANR-18-CE31-0019 (SPlaSH). SH acknowledges CNES funding through the grant 837319. This work was also supported by FCT - Funda\c{c}\~ao para a Ci\^encia e a Tecnologia through national funds and by FEDER through COMPETE2020 - Programa Operacional Competitividade e Internacionaliza\c{c}\~ao by these grants: UID/FIS/04434/2019; UIDB/04434/2020; UIDP/04434/2020; PTDC/FIS-AST/32113/2017 \& POCI-01-0145-FEDER-032113; PTDC/FIS-AST/28953/2017 \& POCI-01-0145-FEDER-028953; PTDC/FIS-AST/28987/2017 \& POCI-01-0145-FEDER-028987. PC thanks the LSSTC Data Science Fellowship Program, which is funded by LSSTC, NSF Cybertraining Grant \#1829740, the Brinson Foundation, and the Moore Foundation; her participation in the program has benefited this work. This work has been carried out within the framework of the NCCR PlanetS supported by the Swiss National Science Foundation. Finally, we thank J. Lissauer for his interest and advice. } \end{acknowledgements} \bibliographystyle{aa}
\section{INTRODUCTION}\label{se:intro} Since the early days of millimeter astronomy, we have made significant progress in our understanding of the physical mechanisms behind star formation in molecular clouds. Because molecular clouds in the interstellar medium are composed of partially ionized gas and dust, magnetic fields are unavoidable; however, their role in formation of stars remains not well understood. Although the past 25 years have produced significant advancement in the understanding of the role of magnetic fields in the star-formation process \citep[see review by][]{HullZhang2019}, it is just now that new observational facilities are giving us the required resolution, sensitivity, and mapping capabilities that are finally allowing us to study the magnetic field in significant greater detail. Perhaps where the role of magnetic field is least understood is in high mass star forming regions (HMSFR). The main two theorized formation pathways for high mass stars, or stars with masses $\ge 8 $ {\mbox{M$_{\odot}$}}, are either that there is a monolithic collapse from an initial massive dense core, which is regulated by non-thermal motions or turbulence \citep{McKee2003,Krumholz2007}, or that stars form from aggregates of smaller clumps (each with an initial mass of approximately the thermal Jeans mass) that compete for gas and dust accretion and may merge to produce larger proto-stellar cores \citep{Bonnell2004,Bonnell2007}. Because the magnetic field has been shown to be ubiquitous in the ISM, the dynamical evolution of the gas and dust in high mass star-forming regions will be inevitably influenced by magnetic fields. NGC6334 is a Giant Molecular Cloud (GMC) in the southern hemisphere. This GMC is located inside the Sagittarius-Carina spiral arm at a distance of about $1.3 \pm 0.3$ kpc \citep{Chibueze2014} and has an estimated line mass of $\sim 1000$ \mbox{M$_{\odot}$}\ pc$^{-1}$ with an extension of $\sim 10$ pc \citep{Andre2016}. The brightest regions studied in the millimeter and sub-millimeter are NGC6334I and NGC6334I(N) \citep{McCutcheon2000,Hunter2014,Hunter2017,Sadaghiani2020}, where both regions appear to harbor high mass star formation. Besides the large scale mapping of polarized dust emission done by Planck \citep{Planck_Collaboration2016}, the magnetic field in NGC6334I(N) has been mapped via polarized dust emission at angular resolutions from $\sim 4^{\prime}$ \citep{Li2006}, $\sim 20^{\prime \prime}$ \cite{Vaillancourt2011}, $\sim 14^{\prime \prime}$ \citep{Arzoumanian2021}, and $\sim 2^{\prime \prime}$ \citep{Zhang2014,Li2015} which found a field shape evolving from a clear pinch at the high density peaks at large scales to an ``hourglass'' shape at shorter scales. We follow the nomenclature used by \citet{HullZhang2019}, where we refer to cloud scales to structures $\sim$ 10 pc, clump scales $\sim 1$ pc, core scales between 0.1 to 0.01 pc, and envelope scales to structures $\sim$ 1000 au. In this paper, we present ALMA results of spectro-polarimetry and dust continuum polarimetry towards NGC6334I(N). This target was observed as part of the Magnetic fields in Massive star-forming Regions (MagMaR) survey that in total contains 30 sources. Details on the survey and source selection will be given in Sanhueza et al. (2021, in prep.). Early results on specific targets are presented in \citet{Fernandez-Lopez2021}; G5.89–0.39) and \citet{Sanhueza2021}; IRAS 18089-1732. The paper is organized as follows, Section \ref{se:obs} presents the observation setup including calibration and data reduction analysis, Section \ref{se:res} shows the results from polarized dust and CS emission, Section \ref{se:discussion} aggregates the analysis about the origin and ambiguities of the CS polarized emission, the magnetic field morphology and the strength estimation along with comparison to other high mass star forming regions. Finally, Section \ref{se:conc} presents the summary and conclusion from this work. \begin{figure*} \includegraphics[width=1.0\hsize]{f0.pdf} \smallskip \caption{ The Figure shows the total intensity dust emission at 1 mm from NGC6334I(N). The color scale is in mJy beam$^{-1}$, as indicated by the color bar. The contours correspond to the total intensity and are plotted at levels of 1.7, 8.8, 17.7, 35.3, 58.9, 117.8, 235.6, and 353.4 \,mJy\,beam$^{-1}$ with an rms for the primary beam corrected map of $\sigma = 1.1$ mJy beam$^{-1}$, where the beam is shown in the bottom-left corner as a solid, black ellipse. The main sources as reported by \citet{Hunter2014} are indicated by the segmented arrows. \label{fig:StkI} } \bigskip \end{figure*} \section{OBSERVATIONS}\label{se:obs} The NGC6334I(N) source is part of project 2018.1.00105.S, which was executed twice in session mode \citep[see chapter 8 in ][ for details about the session observing mode]{Cortes2021b}, during December 2018 and May 2019 under configuration C43-4 (providing baseline lengths from 15 to 783 m). The correlator was configured to yield full polarization cross correlations using Frequency Division Mode (or FDM giving $XX, XY, YX,$ and $YY$), and includes spectral windows to map the dust continuum and windows centered on major molecular line rotational transitions. The bandpass was calibrated using J1427-4206 for session 1 and J1924-2914 for session 2. The time dependant gain and the polarization instrumental terms were calibrated using J1717-3342 and J1751+0939, respectively. For calibration we used CASA version 5.4 and version 5.6 for imaging \citep{McMullin2007}. To image the continuum we manually extracted the line-free channels from each spectral window, which we later phase-only self-calibrated using a final solution interval of 60 seconds. These solutions were then applied to the CS and C$^{33}$S spectral windows before imaging the lines, which were binned to 2 {\mbox{km\,s$^{-1}$}} per channel. The statistics of the flat Stokes images, before debiasing, for both continuum and channel maps are shown in Table \ref{tab:stokesStats}. All of the Stokes parameters were imaged independently using the CASA task {\em tclean}, which yielded an angular resolution of approximately $0.5^{\prime \prime} \times 0.3^{\prime \prime}$, with a position angle of -78$^{\circ}$. The data were primary beam corrected and debiased pixel-by-pixel following \citet{Wardle1974,Hull2015}. Finally, we analyzed the data in the scope of the normalization issue discovered in ALMA data\footnote{See the ALMA knowledge base article at https://help.almascience.org/kb/articles/what-errors-could-originate-from-the-correlator-spectral-normalization-and-tsys-calibration}. A brief description can be found in appendix \ref{apx2}. \section{RESULTS}\label{se:res} \begin{figure*} \includegraphics[width=1.0\hsize]{f1.pdf} \smallskip \caption{The magnetic field morphology onto the plane of the sky in NGC6334I(N), as derived from the 1.3\,mm polarized dust emission is shown here. The blue line segments correspond to emission over $3\sigma = 50\,\mu$Jy in polarized intensity after debiasing. The line segments are normalized and plotted once per synthesized beam (coarser than Nyquist sampling by a factor of two in each dimension), where the beam size is $0^{\prime \prime}.5 \times 0^{\prime \prime}.3$; the beam is shown in the bottom-left corner as a solid, black ellipse. Gray scale shows the polarized intensity in mJy beam$^{-1}$, as indicated by the color bar, and is plotted starting from 600\,$\mu$Jy beam$^{-1}$. The contours correspond to the total intensity and are plotted at levels of 1.7, 8.8, 17.7, 35.3, 58.9, 117.8, 235.6, 353.4, and 471.2 \,mJy\,beam$^{-1}$ with an rms for the primary beam corrected map of $\sigma = 1.1$ mJy beam$^{-1}$. The purple oval encloses the 1b and 1c cores identified by \citet{Hunter2014} also corresponding to the region used to estimate the magnetic field strength onto the plane of the sky. The dotted circle represents the field of view of a single JCMT pointing in the data presented by \citet{Arzoumanian2021}. \label{fig:NGC6334IN_POL} } \bigskip \end{figure*} \subsection{Polarized Dust Continuum Emission} Figure \ref{fig:StkI} shows the total intensity (Stokes $I$) thermal dust continuum emission map from NGC6334I(N) along with the main sources identified by \citet{Hunter2014} from their Sub Millimeter Array (SMA) data. The total intensity dust emission map shows an elongated filament with two cores (1b and 1c) dominating the emission and, what appears to be, a cavity in the dust emission towards the southern part of the filament. In this work we focus on the magnetic field leaving the cores mass and density statistical analysis for further work (Cortes et al. in prep.). Figure \ref{fig:NGC6334IN_POL}, shows the magnetic field morphology onto the plane of the sky as derived from polarized dust emission. The magnetic field morphology is derived by assuming grain alignment by magnetic fields, where the polarization position angles are rotated by 90$^{\circ}$ to obtain the field direction. The field pattern covers most of the NGC6334I(N) filament showing a clear indication of an ``hourglass'' shape over the 1b and 1c cores (inside the purple oval in Figure \ref{fig:NGC6334IN_POL}). Additionally, to the south of the main two cores we see that the field is also pinched over the third brightest core in the region (1a), with the field smoothly connecting to the aforementioned ``hourglass'' component. A pinched field morphology in NGC6334I(N) has been suggested from cloud to core scales by \citet{Li2015}. In fact, \citeauthor{Li2015} traced an ``hourglass'' morphology with the SMA at core scales, which we reproduced here in Figure \ref{fig:jcmt} by using data from \citet{Zhang2014}. In this work we are further tracing the magnetic field morphology with ALMA from core to envelope scales. Note, we are referring to a pinched morphology instead of ``hourglass'' for the whole set of scales; we will discuss this in section \ref{sse:pattern}. Recently, observations with the James Clerk Maxwell Telescope (JCMT) of polarized dust emission at 850 $\mu$m revealed a detailed field morphology of NGC6334I(N) at clump scales \citep[14$^{\prime \prime}$ resolution, ][]{Arzoumanian2021}. To compare with ours, we show a zoomed map of the JCMT data (see Figure \ref{fig:jcmt}, left panel), where the pinched morphology is seen over a broader region encompassing both NGC6334I(N) and NGC6334I sources (NGC6334I is not covered by the ALMA data presented here) and outlined by translucent red lines. Over the NGC6334I(N) filament, the JCMT data shows a mostly uniform pattern covering the region mapped by ALMA (see yellow circle in Figure \ref{fig:jcmt}). Furthermore, \citeauthor{Arzoumanian2021} compared the JCMT data to Planck data, where pinching of the field is only seen at the North-East edge of the cloud at the scales traced by Planck. Although these new data show a slightly different scenario as the one proposed by \citet{Li2015}, the magnetic field appears to evolve coherently from clump to core-envelope scales (see section \ref{sse:pattern} for a discussion). To the SW of the filament, a cavity is seen in the dust emission traced by ALMA (see Figure \ref{fig:NGC6334IN_POL}). This cavity is well encircled by the field, which covers most of its perimeter. Magnetic fields along cavity walls produced by outflows have been seen in a number of low-mass star-forming regions \citep{Hull2017b,Maury2018, LeGouellec2019, Hull2020a}. Coincidentally, the blue lobe of the CS outflow, previously discovered by \citet{McCutcheon2000} and also reported here, appears to be co-spatial with the cavity. To ascertain the importance of the magnetic field in NGC6334I(N), we estimate its strength onto the plane of the sky component, B$_{\mathrm{pos}}$, using a number of variants of the Davis, Chandrasekhar, and Fermi method \citep[or DCF:][]{Davis1951,Chandrasekhar1953,Heitsch2001,Falceta2008}, by using the angle dispersion function method \citep[or ADF: ][]{Hildebrand2009,Houde2009,Houde2013b,Houde2016}, and by using a recently derived approach for DCF which considers magnetosonic perturbations instead of Alfven waves \citep{Skalidis2021}. We will discuss the applicability of such methods to regions such as NGC6334I(N) in section \ref{sse:disp}. The computations were executed by following \citet{Cortes2019} for the DCF\footnote{The modifications to DCF proposed by \citet{Skalidis2021} require to change $\delta \phi$ by $\sqrt{\delta \phi}$ and a change of $1/\sqrt{2}$ scaling factor and thus the practicalities of the computation are the same as with the regular DCF variants} variants and following \citet{Houde2009,Houde2016} for the dispersion function analysis. We obtained field-strength estimates by considering only the emission within the purple ellipse shown in Figure \ref{fig:NGC6334IN_POL} (see Table \ref{tab:B} for the results). This is justified because is within this region that we have obtained sufficient overlap between the polarized dust and CS emission tracing the hourglass shape of the magnetic field (see section \ref{se:cs54}). The B$_{\mathrm{pos}}$ estimates range between 1.4 and 23.6 mG, with an average of $\left< \mathrm{B_{pos}} \right> = 16$ mG. In contrast with previous works, here we estimate the field strength in a self-consistent manner by using parameter values derived directly from our data. For instance, we derive the velocity dispersion from our C$^{33}$S spectrum, which by being optically thin (see Section \ref{se:cs54}), it traces the turbulent motions inside the region. The column and volume densities are also derived directly from the Stokes $I$ dust and CS emissions; we compute all values within the same region used to derive the polarization position angle dispersion ($\delta \phi$). To derive column density from dust emission, we followed the standard approach \citep{Hildebrand1983} assuming a dust opacity of k$_{1.3 \textrm{mm}}$ = 0.01 cm$^{2}$ g$^{-1}$ \citep{Ossenkopf1994}, which assumes a gas to dust mass ratio of 100:1, and an average dust temperature of T$_{dust}$ = 50 K \citep{Sadaghiani2020}. We estimate the volume density by assuming a cylindrical ellipsoid as the geometrical shape of the purple ellipse in Figure \ref{fig:NGC6334IN_POL}, where the height of the cylinder is taken as the mean of the major and minor axes of the ellipse, which equals 3$\farcs$6, or 22 mpc at the distance of NGC6334I(N). We also use a mean molecular weight of $\mu=2.8$ which assumes that the gas has a 70\% H$_{2}$ content and it is not stratified \citep{Kirk2013}. As a result, the uncertainties in the magnetic field strength estimation result primarily from the assumptions behind the validity of the DCF method and the geometrical assumption used to compute the density. The dispersion angle analysis is discussed in Section \ref{sse:disp}. \begin{figure*} \includegraphics[ width=9cm, height=8cm]{f2a.pdf} \includegraphics[ width=9cm, height=8cm]{f2b.pdf} \smallskip \caption{The magnetic field morphology onto the plane of the sky in NGC6334 as derived from polarized dust continuum emission data are shown here. {\bf\em Left.}The map shows data obtained with the JCMT at 850 $\mu$m \citep{Arzoumanian2021}. The white line segments correspond to emission over $3\sigma = 6\,$ mJy. The line segments are normalized and plotted, approximately, once per beam, where the beam size is $14^{\prime \prime}$; the beam is shown in the bottom-left corner as a solid, black circle. Gray scale shows the polarized intensity in Jy beam$^{-1}$, as indicated by the color bar. The contours correspond to the total intensity are plotted at levels of 0.51, 2.55, 5.1, 10.2, and 17.0 \,Jy\,beam$^{-1}$. The translucent red lines outlines the proposed ``hourglass'' pinched morphology for the mangetic field onto the plane of the sky. {\bf\em Right.} Same as the left panel, but for SMA at 875 $\mu$m \citep{Zhang2014}. The white line segments correspond to emission debiased over $3\sigma$, with $\sigma \sim 8$ mJybeam$^{-1}$. The contours corresponds to step of 0.5 and 3 Jybeam$^{-1}$ and gray-scale bar indicates the polarized flux in mJybeam$^{-1}$. The SMA beam is 2.$^{\prime\prime}1 \times 2.^{\prime\prime}07$ at a positional angle of 20$^{\circ}$. The yellow circle shows the ALMA region of interest in both maps. \label{fig:jcmt} } \bigskip \end{figure*} \subsection{The polarized emission from CS ($J=5 \rightarrow 4$) and C$^{33}$S ($J=5 \rightarrow 4$)} \label{se:cs54} We detect CS ($J=5 \rightarrow 4$) emission, in total intensity, along the NGC6334I(N) filament across a velocity range from --40 to 20 {\mbox{km\,s$^{-1}$}}. Here, we focus primarily on the polarization properties of the emission and leave a detailed analysis of the gas kinematics to a future work (Cortes et al. in prep). We analyze the CS ($J=5 \rightarrow 4$) and C$^{33}$S ($J=5 \rightarrow 4$) spectra from the same region used to estimate the magnetic field strength from polarized dust emission (see Figure \ref{fig:NGC6334IN_CS_spectra} for the spectra). Because C$^{33}$S is an isotoplogue of the CS molecule, we can assume that both species are co-spatially located and thus we can use the C$^{33}$S emission, likely optically thin, to estimate the properties of the CS gas. To estimate the column density and optical depth of the lines, we used the MADCUBA software package to model the CS and C$^{33}$S line profiles \citep{Martin2019}; the model is shown in Figure \ref{fig:NGC6334IN_CS_spectra}, right panel. Under local thermodynamic equilibrium (LTE) conditions, the three spectral features of the classic asymmetric top methyl formate (CH$_{3}$OCHO) detected close to the C$^{33}$S line (see Figure \ref{fig:NGC6334IN_CS_spectra}) allow us to put a good constraint to the excitation temperature, which was found to be T$_{ex}=220 \pm 80$ K. Note, this temperature is likely probing a gas kinetic temperature, which is significantly higher than the assumed dust temperature, where the CS emission probably arises from a cooler layer than CH$_{3}$OCHO. Although this temperature seem high, it is not uncommon to find such excitation temperatures when a hot molecular core (HMC) has developed, which is the case in NGC6334I(N) 1b \citep{Hunter2014}. There, complex organic molecules such as methyl formate act as excellent thermometers for the gas temperature. For instance, in W43-Main MM1 \cite{Sridharan2014} found an excitation temperature close to 400 K when considering spectral features of methyl cyanide in their data. Assuming that the C$^{33}$S emission is thermalized to this temperature and a source size of $1^{\prime\prime}$ as derived from the fit to the integrated emission, we obtain a C$^{33}$S total column density $\mathrm{N_{C^{33}S}} = 1.0 \pm 0.1 \times 10^{15}$ cm$^{-2}$, with a peak optical depth of $\tau_{\mathrm{{C^{33}S}}} = 0.18 \pm 0.02$. Scaling the C$^{33}$S emission using the sulphur 32/33 relative abundance ratio reported by \citet{Chin1996} yields a CS total column density of $\mathrm{N_{CS}} = 2.9 \pm 1.1 \times 10^{17}$ cm$^{-2}$ with a peak optical depth of $\tau_{\mathrm{CS}} = 32 \pm 12$, and therefore strongly optically thick. For completeness, we modelled the CS emission with the parameters above, together with a foreground component under T=50~K that absorbs both the background line and continuum emission. We note the good agreement between the velocity fit of CS, C$^{33}$S, and CH$_{3}$OCHO of $-2.46 \pm 0.15$ {\mbox{km\,s$^{-1}$}}, $-2.3\pm0.16$ {\mbox{km\,s$^{-1}$}}, and $2.0\pm0.3$ {\mbox{km\,s$^{-1}$}}, with the absorption layer slightly blueshifted to $-3.4\pm0.2$ {\mbox{km\,s$^{-1}$}}. The errors are obtained from the model fit to the lines. \begin{deluxetable*}{cccccccccc} \centerwidetable \tablecolumns{10} \tablewidth{0pt} \tabletypesize{\scriptsize} \tablecaption{Statistics from Stokes Maps\label{tab:stokesStats}} \tablehead{\colhead{Tracer} & \colhead{Velocity} & \colhead{$I_{\mathrm{p}}\tablenotemark{\scriptsize a}$} & \colhead{$\sigma_{I}$\tablenotemark{\scriptsize b}} & \colhead{$Q_{\mathrm{p}}$} & \colhead{$\sigma_{Q}$} & \colhead{$U_{\mathrm{p}}$} & \colhead{$\sigma_{U}$} & \colhead{$V_{\mathrm{p}}$} & \colhead{$\sigma_{V}$} \\ \colhead{} & \colhead{({\mbox{km\,s$^{-1}$}})} & \colhead{(mJy beam$^{-1}$)} & \colhead{(mJy beam$^{-1}$)} & \colhead{(mJy beam$^{-1}$)} & \colhead{(mJy beam$^{-1}$)} & \colhead{(mJy beam$^{-1}$)} & \colhead{(mJy beam$^{-1}$)} & \colhead{(mJy beam$^{-1}$)} & \colhead{(mJy beam$^{-1}$)} } \startdata Dust & - & 307 & 0.5 & 6.1 & 0.05 & 2.7 & 0.04 & -0.25 & 0.023 \\ CS & -6.0 & 326 & 7 & 2.6 & 0.7 & -5.0 & 0.6 & 3.3 & 0.7 \\ CS & -4.0 & 136 & 5 & 10.0 & 0.6 & -4.8 & 0.5 & -2.1 & 0.6 \\ CS & -2.0 & 168 & 7 & 4.7 & 0.7 & -3.9 & 0.6 & 2.7 & 0.7 \enddata \tablenotetext{a}{The $p$ subscript indicates peak intensity and it applies to all of the Stokes parameters.} \tablenotetext{b}{The $\sigma$ rms was estimated by choosing a region devoid of emission where the rms was obtained using the CASA task {\em imstat}. } \end{deluxetable*} We detect polarized emission from the CS ($J=5 \rightarrow 4$) molecular line toward NGC6334I(N). The bottom-left panel of Figure \ref{fig:NGC6334IN_CS_spectra} shows the polarized intensity spectrum and Figure \ref{fig:NGC6334INCS} shows the channel maps. In the channel maps, we display the polarized CS emission as orange pseudo-vectors superposed on a coarsely plotted magnetic field morphology as inferred from polarized dust emission (shown as blue pseudo-vectors). Note, we are not applying a 90$^{\circ}$ rotation to the CS pseudo-vectors as we do to the polarized dust emission. The channel maps reveal good agreement between the hourglass magnetic-field morphology seen in the dust and the polarized CS emission observed as a function of velocity. For a more quantitative comparison between the field morphology and the polarized CS emission, we compute histograms of the differences in polarization position angles between the CS and the dust emission for different velocity channels (see Figure \ref{fig:diffHist}). The differences are calculated only at locations where the polarized CS emission overlaps with the polarized dust emission. Furthermore, we fit Gaussian profiles to histograms to derive probability density functions. All of the histograms are well centered around zero, within $\pm 10^{\circ}$ for the $\pm 4$ {\mbox{km\,s$^{-1}$}} range, with mostly symmetric Gaussian distributions suggesting that the CS polarized emission is correctly tracing the ``hourglass'' field morphology derived from dust (see Table \ref{tab:csDust} for the statistics). The best match is found at V$ = -2$ \mbox{km\,s$^{-1}$}\ where $\left<\Delta \theta \right> = 0^{\circ}$ and $\sigma_{\Delta \theta} = 6^{\circ}$ from the Gaussian fit. The V$_{\mathrm{lsr}}$ of NGC6334I(N) is about $\sim -3$ {\mbox{km\,s$^{-1}$}} and thus the best match is close to the systemic velocity of the source. Although there are deviations between the magnetic field and the CS position angles, these are observed at the line-wings of the line suggesting a departure from the ``hourglass'' where the emission from the outflow becomes dominant. The polarized CS emission also seems to trace the magnetic field morphology along the dust cavity: see channel maps $v = -10$ to $-2 $ \mbox{km\,s$^{-1}$}, which also show the blueshifted lobe of the CS outflow. We note that the CS outflow appears to be orthogonal to the symmetry axis of the ``hourglass'' magnetic field. We will explore this finding in upcoming work (Cortes et al. in prep.). Additionally, we present channel maps of polarized emission from C$^{33}$S($J=5 \rightarrow 4$) in Figure \ref{fig:NGC6334INC33S}. Although the number of independent detections of polarization in the C$^{33}$S maps is smaller than for CS, the agreement with the CS polarization position angle appears consistent across velocity space. \begin{figure*} \centering \includegraphics[width=\textwidth]{f3.pdf} \caption{The CS spectra from the selected region in NGC6334I(N) is shown here (see Figure \ref{fig:NGC6334IN_POL} for the region). {\bf a)} The panel shows the total intensity and self-absorbed CS$(J=5 \rightarrow 4)$ spectrum (blue) and the C$^{33}$S$(J=5 \rightarrow 4)$ spectrum (green). {\bf b)} The panel shows the CS debiased polarized intensity spectrum (black) with the fractional polarization of the CS emission superposed as circles with corresponding error bars. Note, we are not showing fractional polarization values for the range between -6 to -2 {\mbox{km\,s$^{-1}$}} because of the negative Stokes I due to self-absorption. {\bf c)} The best fit to the CS, C$^{33}$S, and CH$_{3}$OCHO transitions is superposed on the observed CS spectra. In the figure, we are also indicating additional molecular line transitions that might be present given the spectral range. We clearly detect some complex organics such as methyl formate (CH$_{3}$OCHO). {\bf d)} Same as (c) but for the C$^{33}$S emission. The model was obtained by assuming LTE conditions, a T$_\textrm{ex} = 220$ K for C$^{33}$S, and a foreground screen of 50 K continuum to model the dust emission. \label{fig:NGC6334IN_CS_spectra} } \end{figure*} The number of independent polarization detections in the CS channel maps is large enough that we can also estimate the field strength using the DCF technique in a number of those channels \citep[between --6 to --2 $\mbox{km\,s$^{-1}$}$; for an description of what can be considered to be a sufficient number of channels, see Appendix A in][]{Cortes2019}. Over this channel range, we obtain an average field strength estimate of $\sim$ 2 mG (see Table \ref{tab:B} for the channel-by-channel estimates). Polarized emission from molecular lines has a 90$^{\circ}$ ambiguity with respect to the ambient magnetic field direction \citep{Goldreich1981}. However, this does not affect the estimation method because $\delta \phi$ will not change if the data is rotated by 90$^{\circ}$. We will address the relation between the CS polarization pattern and the magnetic field in section \ref{sse:9deg}. \begin{figure*} \includegraphics[width=1.1\hsize]{f4.pdf} \smallskip \caption{Velocity channel maps of the CS$(J=5 \rightarrow 4)$ emission from NGC6334I(N) in the -12 to 10 {\mbox{km\,s$^{-1}$}} range. The velocity is indicated in \mbox{km\,s$^{-1}$}\ in the upper-right corner of each panel. We show the Stokes $I$ CS emission in gray scale, the inferred magnetic field from polarized dust emission as blue pseudo-vectors, and the larger than $3\sigma$ significance CS polarization angles as orange pseudo-vectors, with $\left<\sigma \right> = 780\,\mu$Jy beam$^{-1}$ is the mean rms polarized intensity emission noise when considering all channels in the range. Note, the blue pseudo-vectors corresponding to the polarized dust emission show the inferred magnetic field morphology, having been rotated by 90$^{\circ}$ relative to the polarization. However, the polarization position angles from the polarized CS emission have not been rotated. \label{fig:NGC6334INCS} } \bigskip \end{figure*} \section{DISCUSSION}\label{se:discussion} \subsection{The origin of the polarized CS emission} \label{sse:origin} Linearly polarized emission from molecular lines was first detected in CS emission by \citet{Glenn1997} towards the IRC +10216 evolved star. Since then, it has been detected towards a number of sources, particularly in high-mass star forming regions \citep{Girart1999b,Lai2003a,Cortes2005,Beuther2010,Hirota2020}, and toward evolved stars \citep{Vlemmings2012,Girart2013}. Linearly polarized emission from molecular lines is expected when the magnetic sub-levels are unevenly populated because of anisotropies in the medium. Initial models assumed that large velocity gradients resulting from the kinematics were the dominant source of anisotropy \citep{Goldreich1982,Deguchi1984}. However, anisotropies in the radiation field can also affect the level populations and may be due to a geometrical distribution of the gas that produces optical depths that are not the same in all directions, or from embedded sources such as a protostellar core (in the case of star-forming regions; \citealt{Cortes2005}) or a star (in the case of a circumstellar shell around evolved sources; \citealt{Vlemmings2012}). Although it is expected that the amount of polarized emission will decrease with increasing optical depth as a result of photon trapping, we nevertheless find significant amounts of polarized emission across the CS spectrum in NGC6334I(N) (between 2\% and $\sim$ 10\% within --20 to 20 {\mbox{km\,s$^{-1}$}}, see the bottom-left panel of Figure \ref{fig:NGC6334IN_CS_spectra}), for which our calculations show to be optically thick. \citet{Deguchi1984} performed multi-level calculations for the CS ($J=1\rightarrow 0$) and ($J=2\rightarrow1$) transitions and found linearly polarized emission at a level of $\sim 1$\% for $\tau \sim 10$ with a significant decrease in fractional polarization for increasing $\tau$. However, this computation is only one-dimensional and represents the best-case scenario where the optical depth is taken along the velocity gradient \citep[see Figure 3 in][]{Deguchi1984}. \citet{Cortes2005} also performed multilevel radiative transfer calculations for both CO ($J=1\rightarrow 0$) and ($J=2\rightarrow1$) transitions, but this time adding a blackbody to the computation in order to introduce anisotropies in the radiation field. They found increasing amount of polarization as the line becomes optically thin \citep[see Figure 7 in ][]{Cortes2005}. Recently, \citet{Lankhaar2020} presented a comprehensive quantum mechanical treatment of the alignment of the molecule's angular momentum by assuming only an anisotropic radiation field. Their treatment is fully three-dimensional, allowing for simulations of both radiative transfer and gas dynamics. Although they did not model CS emission in particular, their simple example of a collapsing spherical cloud produced polarization fractions for HCO$^{+}$ ($J=3 \rightarrow 2$) and ($J=2 \rightarrow 1$) at levels over 1\% for radial distances beyond 600 au ($\sim$ 3 mpc) for the ($J=3 \rightarrow 2$) and 900 au ($\sim$ 4.5 mpc) for the ($J=2 \rightarrow 1$) transition. However, all of these calculations find that polarized line emission significantly decreases with higher optical depths. A possible explanation to this may be related to interferometric filtering and missing flux. Fractional polarization with interferometers has to be analyzed with care because of spatial filtering effects \citep{LeGouellec2020}. The maximum recoverable angular scale for the configuration used to acquire these data is $\sim 5^{\prime\prime}$, which suggests that a significant fraction of the extended total intensity CS emission seen from the single dish \citep{McCutcheon2000} might be filtered-out by ALMA and thus the fractional polarization values presented here are over-estimated. This is because linearly polarized emission tend to be more compact than the total intensity emission. Estimating how far we are from the true fractional polarization will require sampling larger angular scales in full polarization mode, which the ALMA compact array (ACA) can do. We also see significant amounts of fractional polarization at higher velocities (polarization levels $\gtrsim 10\%$ at $v < -20$ and $v > 20$ {\mbox{km\,s$^{-1}$}}). It is likely that, in these velocity ranges where the CS emission is tracing the outflow, the CS emission might be optically thin and thus the values estimated might be closer to the ``true'' fractional polarization values. The large velocity gradient and the radiation field from the embedded protostars are, most likely, the sources of anisotropy necessary to produce the large polarization fractions that we see there \citep[see][Figure 7 for a CO computation]{Cortes2005}. We also note that strong polarization from CS is expected because of its large dipole moment ($\mu =$ 1.96 D) compared with, for example, that of CO ($\mu =$0.12 D), because of the $\mu^{2}$ dependence of the radiative rates. Thus, it seems that the combination of anisotropies in both the radiation field and the gas kinematics is causing the strong CS polarized emission that we see in NGC6334I(N), where filtering effect might explain the large fractional polarization values seen when comparing to radiative transfer calculations. Nonetheless, 3-dimensional modeling of polarized CS emission will be needed to further understand the emission detected here, which is beyond the scope of this work. Finally, if a foreground screen of molecular gas is present between the source and the telescope, some amount of linear polarization might be converted into circular polarization through anisotropic resonant scattering, or ARS \citep{Houde2013a}. The ARS will systematically corrupt the linear polarization position angle from the CS emission and change its relation respect to the ambient magnetic field. The ARS will manifest itself by the presence of statistical significant signal in Stokes $V$, which we do not detect. The peak emission is Stokes $V$ is about between -2.1 and 3.3 mJy beam$^{-1}$ with a fractional level between 0.6 to 1.0\% which is below the statistical uncertainty of $\sim$ 2\% that ALMA can measure \citep{Cortes2021b}. The morphology of the Stokes $V$ velocity channel maps are consistent with noise where the peaks alternate between positive and negative between channels which is inconsistent with a coherent conversion of linear to circular polarization by ARS (see Table \ref{tab:stokesStats} and Figure \ref{fig:StokesV} in Appendix \ref{apx1} for the Stokes $V$ channel maps). Thus, we conclude that polarized emission from CS is purely linear and its relation to the field is subject to the known 90$^{\circ}$ ambiguity (see next section for a discussion). \begin{deluxetable*}{c c c c c} \centerwidetable \tablewidth{0pt} \tablecolumns{5} \tablecaption{Polarization Angle Statistics \label{tab:csDust}} \tablehead{\colhead{Velocity} & \colhead{$\left< \Delta \phi \right>$\tablenotemark{\scriptsize a}} & \colhead{$\mathrm{std}(\Delta \phi)$\tablenotemark{\scriptsize b}} & \colhead{$\Delta \phi_{0}$\tablenotemark{\scriptsize c}} & \colhead{$\sigma_{\Delta \phi}$\tablenotemark{\scriptsize d}} \\ \colhead{(km s$^{-1}$)} & \colhead{($^{\circ}$)} & \colhead{($^{\circ}$)} & \colhead{($^{\circ}$)} & \colhead{($^{\circ}$)} } \startdata -12.0 & 8 & 25.9 & 21 & -11.5\\ -10.0 & 9 & 20.1 & 16 & \phd17.4\\ -8.0 & 10 & 18.0 & 11 & -17.4\\ -6.0 & 4 & 13.8 & \phantom{0}4 & -13.1\\ -4.0 & 2 & \phantom{0}9.0 & \phantom{0}1 & \phd-8.4\\ -2.0 & 1 & \phantom{0}7.5 & \phantom{0}0 & \phd6.4\\ \phantom{0}0.0 & 3 & 12.3 & 2 & \phd11.5\\ \phantom{0}2.0 & 0 & 14.4 & -2 & \phd7.6\\ \phantom{0}4.0 & -2 & 14.8 & -5 & \phd-10.1\\ \phantom{0}6.0 & -2 & 15.6 & -5 & -7.4\\ \phantom{0}8.0 & -8 & 19.0 & -6 & \phd6.2\\ 10.0 & -8 & 17.4 & -8 & \phd6.9\\ 12.0 & -2 & 13.5 & -4 & \phd8.7\\ 14.0 & -2 & 12.2 & -7 & \phd8.0 \enddata \tablenotetext{a}{Here $\left< \Delta \phi \right>$ represents the mean of the difference values between dust and CS polarization angles.} \tablenotetext{b}{Here $\mathrm{std}(\Delta \phi)$ corresponds to the standard deviation of the difference values between the dust and the CS polarization angles.} \tablenotetext{c}{Here $\Delta \phi_{0}$ corresponds to the center of a Gaussian fit to the distribution of polarization angle differences.} \tablenotetext{d}{Here $\sigma_{\Delta \phi}$ corresponds to the width of a Gaussian fit to the distribution of polarization angle differences.} \end{deluxetable*} \begin{figure*} \includegraphics[width=0.5\hsize]{f5a.pdf} \includegraphics[width=0.5\hsize]{f5b.pdf} \includegraphics[width=0.5\hsize]{f5c.pdf} \includegraphics[width=0.5\hsize]{f5d.pdf} \includegraphics[width=0.5\hsize]{f5e.pdf} \includegraphics[width=0.5\hsize]{f5f.pdf} \smallskip \caption{Histograms of differences in the polarization position angles of the dust and CS emission. We compute the differences inside the region used to estimate the field strength (see the purple ellipse in Figure \ref{fig:NGC6334IN_POL}). The panels are ordered as a function of velocity (from upper-left to lower-right), as indicated in legend in each plot. The best agreement is found at -2 and 2 {\mbox{km\,s$^{-1}$}} where Gaussian fits to the normalized histograms are shown in the two bottom panels. The fit parameters are listed in Table \ref{fig:diffHist}. \label{fig:diffHist} } \bigskip \end{figure*} \subsubsection{The 90$^{\circ}$ ambiguity in the position angle of the polarized CS emission} \label{sse:9deg} Linearly polarized emission from molecular lines has a 90$^{\circ}$ ambiguity in the orientation of the polarization position angle with respect to the ambient magnetic field direction \citep{Goldreich1981}. Thus, deriving the magnetic field morphology from the polarized CS emission has an additional degree of complexity versus the more straightforward method of deriving the field morphology from polarized dust emission. To interpret the relationship between the CS polarization angle and the orientation of the ambient magnetic field, we use the inferred field morphology from the dust emission and arguments about physical plausibility. We interpret the position angle from the polarized CS emission as being parallel to the magnetic field onto the plane of the sky because of the close agreement between the hourglass magnetic field morphology seen in the dust and the polarization pattern of the CS emission, as shown in Figure \ref{fig:diffHist} and Table \ref{tab:csDust}. The opposite case, i.e., where the CS polarization is perpendicular to the inferred magnetic field from the dust, would imply an unrealistically complex field morphology over the central region of NGC6334I(N): because of the close agreement between CS and dust, the twisting of the field lines would have to be perpendicular at almost all positions and velocities shown in the channel maps. Such a situation is unheard of and likely nonphysical, even under strong rotation, which we do not have evidence for at the scales traced by the CS polarized emission. Our interpretation that the CS polarization traces the inferred magnetic field shape is also supported by the C$^{33}$S($J=5 \rightarrow 4$) results, which agree well with the CS polarization, particularly at velocities of --4 and --2 {\mbox{km\,s$^{-1}$}}. These three independent polarization tracers show essentially the same result, which is a magnetic field morphology with an ``hourglass'' shape over the main cores in NGC6334I(N). \subsection{Tomography of magnetic fields} \label{sse:pattern} Hourglass magnetic field morphologies have long been predicted by magnetically regulated star formation models \citep[e.g.,][]{Mouschovias1976,Mouschovias1985}, and may be the result of ambipolar diffusion \citep{Mouschovias1991b}. This field morphology has been seen in a number of low- and high-mass star forming regions and at different length and mass scales \citep{Schleuning1998,Girart2006,Girart2009,Maury2018,Beltran2019}. In the magnetically regulated star formation scenario, a molecular cloud will initially be supported against gravitational collapse by the magnetic field, which is initially thought to be uniform. Because the neutrals are only weakly coupled to the charge carriers, which are held in place by the field, they will slowly diffuse past the magnetic field via ambipolar-diffusion. Because the field is frozen into the charge carriers, the field will be pinched attaining the hourglass shape. Alternatively, a self-gravitating core can also pull the field at the core center which will create an ``hourglass'' shape, but in this case ambipolar-diffusion might be a by-product of the process. Although the ``hourglass'' shape seen in NGC6334I(N) is clear, the exquisite sensitivity and resolution of the ALMA data allow us to see local deviations from which the ``hourglass'' is a simple model. The density regime traced by ALMA is likely showing the result of complex physics which is difficult to explain without detailed numerical modeling, outside the scope of this paper. Furthermore, a clear ``hourglass'' field morphology in NGC6334I(N) is not seen at all length-scales. From the envelope scales traced by ALMA, to the core scales imaged by the SMA, and to the clump scales traced by the JCMT, the hourglass appears to be the shape of the magnetic field when we also consider NGC6334I (see Figures \ref{fig:NGC6334IN_POL} and \ref{fig:jcmt}) . However, at the cloud scales traced by Planck \citep[see Figure 5 in ][]{Arzoumanian2021}, the field is only pinched at the North-East side of the cloud. Whether this is a projection effect or not is not clear from the Figure alone where a detailed analysis of the Planck data would be required. Even though we cannot state with certainty that we see an ``hourglass'' field morphology as the ubiquitous shape across all length scales in NGC6334, the pinching in the field seen from cloud to the envelope scales is quite remarkable suggesting that the magnetic field is strong in this region. Furthermore, the field pattern seems also preserved in velocity space from --10 to 4 {\mbox{km\,s$^{-1}$}} at the ALMA scales, which is a 14 {\mbox{km\,s$^{-1}$}} range, almost three times the 5.3 {\mbox{km\,s$^{-1}$}} full width at half maximum (FWHM) line-width of C$^{33}$S (our proxy for the turbulent motions). Besides tracing a pinched field shape through multiple orders of magnitude in spatial scales, we are also tracing the field at different densities as well \citep[from 10 to 10$^{7}$ cm$^{-3}$ when considering density estimates from ][]{Li2015, Arzoumanian2021}. The critical density for the CS ($J=5 \rightarrow 4$) transition is $9 \times 10^{6}$ cm$^{-3}$, which is obtained by assuming that the emission is optically thin. Because of the high optical depth estimated for the CS ($J=5 \rightarrow 4$) transition, that number density is most likely smaller as the line may be sub-thermally excited. \citet{Shirley2015} accounted for optical depth effects by computing the critical density considering photon trapping. Thus, the number density can be approximated to $n_{crit}^{thick} = n_{crit}^{thin}/\tau_{\nu_{jk}}$ when the optical depth is much larger than one, where $n_{crit}^{thick}$ is the optically thin critical density and $\tau_{\nu_{jk}}$ is the line optical depth. From this assumption we obtain $n_{\mathrm{CS}, crit}^{thick} = 2.8 \times 10^{5}$ cm$^{-3}$. Note, here the $n_{\mathrm{CS}, crit}^{thick}$ refers to the collisional partners involve in the excitation of the CS molecule which corresponds to H$_{2}$. Although an abuse of notation, we use CS in the subscript to indicate that the density is derived from the CS emission. Furthermore, \citet{Shirley2015} tabulated effective excitation densities for the CS molecule by considering a number of rotational transitions. The effective excitation density is an empirical quantity defined by considering a 1 K\,\mbox{km\,s$^{-1}$}\ integrated emission. This quantity also takes into account optical depth effects such as radiation trapping \citep[for a review, see][]{Evans1999}. For the CS ($J=5 \rightarrow 4$) transition, \citet{Shirley2015} obtains $n_{\mathrm{eff}} = 7.6\times10^{4}$ cm$^{-3}$, assuming a kinetic temperature of 50 K, the dust temperature which is a good estimation of the kinetic temperature in the region of interest (see purple oval in Figures \ref{fig:NGC6334IN_POL} and \ref{fig:NGC6334INCS}). Although these two estimates of the number density are close in value, detailed numerical radiative transfer modeling is required to obtained more accurate population numbers which we leave for future work. Nonetheless, the two criteria are reasonable approximations to the number density of the molecular hydrogen CS collisional partners under high optical depth conditions and thus we use the average as the estimate of the ``true'' number density, or $n_{\mathrm{CS}} \sim 2\times10^{5}$ cm$^{-3}$. A value of $n_{\mathrm{CS}} = 2\times10^{5}$ cm$^{-3}$ is $\sim$ 2 orders of magnitude less than the volume density estimated from the dust emission, which we calculated to be 4.2 $\times 10^{7}$ cm$^{-3}$. Thus, the polarized CS emission appears to be tracing the field at lower densities than the dust and at a level comparable with the JCMT observations. Therefore, within a single ALMA data-set we are not only tracing the ``hourglass'' shape as function of velocity, but also as a function of density: i.e., we are effectively performing magnetic field tomography. When we consider the evolution of the field morphology along these three axes (length-scale, velocity, and density), the striking coherence seen in the field structure strongly suggests that the magnetic field remains dynamically important from the diffuse to the high-density regime in NGC6334I(N). \begin{figure*} \includegraphics[width=1.1\hsize]{f6.pdf} \smallskip \caption{Same as Figure \ref{fig:NGC6334INCS}, but here we show the C$^{33}$S$(J=5 \rightarrow 4)$ emission. The total intensity C$^{33}$S emission is shown as a gray-scale. The polarized emission from CS is shown in orange pseudo-vectors while the polarized emission from C$^{33}$S is shown in semi-transparent green pseudo-vectors. The significance of the polarization pseudo-vectors is 3$\sigma$ after debiasing where the average channel map noise level, before debiasing, is $\left< \sigma \right> = 770 \mu$Jybeam$^{-1}$. \label{fig:NGC6334INC33S} } \bigskip \end{figure*} \subsection{The dispersion function analysis and the strength of the magnetic field} \label{sse:disp} \begin{figure*} \includegraphics[width=0.5\hsize]{f7a.pdf} \includegraphics[width=0.5\hsize]{f7b.pdf} \smallskip \caption{Dispersion analysis of the ALMA NGC6334I(N) data. {\bf Left.} The dispersion function calculated as $[1 - \left<\mathrm{cos( \Delta \phi ) } \right>]$ (in symbols) is plotted as a function of $l^{2}$ at the top. The ordered component is also shown using a broken curve. The least-squares fit of the Gaussian turbulence model is plotted in turquoise as a solid curve. At the middle we also plot the dispersion function, but as a function of $l$. At the bottom, the signal-integrated turbulence autocorrelation function $b^{2}(l)$ (in symbols), along with the autocorrelated Gaussian beam (segmented curve), and the ALMA dirty beam (solid turquoise curve) are plotted. From the fit to the data, we derive turbulence correlation length of $\delta = 0^{\prime \prime}.262 \pm 0^{\prime \prime}.008$, or $\sim$ 2 mpc, at the distance to NGC6334I(N), and $\left< B_{t}^{2} \right> / \left< B^{2} \right> = 0.29 \pm 0.01$ {\bf Right.} Same as the left panel, but using the integrated CS polarized emission data over the velocity interval -6 to -2 {\mbox{km\,s$^{-1}$}}. The analysis yields a turbulence correlation length of $\delta = 0^{\prime \prime}.42 \pm 0^{\prime \prime}.011$, or $\sim$ 2.6 mpc, and $\left< B_{t}^{2} \right> / \left< B^{2} \right> = 0.08 \pm 0.0013$. \label{fig:disp} } \bigskip \end{figure*} The DCF method does not consider the effects of finite angular resolution or integration along the line of sight, which at lower resolutions smooth out the polarized emission, reducing its dispersion, and therefore it might overestimates the field strength. Moreover, the effect of self-gravity in bending the field lines, which will affect the dispersion in the polarization position angle, is also not considered by DCF and its variants. Thus and because of the exquisite uv-coverage, resolution, and sensitivity of ALMA, local deviations in the position angle from the main field model, due to gravity, makes the applicability of the DCF method more challenging to the data. Here, we discuss how the different DCF variants used in this work attempt to correct the polarization position angle dispersion. To account for poor resolution in polarization maps, \citet{Heitsch2001} used the geometric mean between two modified DCF equations. The first modification attempts to address the small angle approximation by replacing the polarization angle dispersion by the dispersion of the tangent values of the position angle. The second modification attempts to deal with the case where the dispersion in the field lines is larger than the mean field. They do this by considering the 3-dimensional expansion of the field where all of the random components are assumed to be the same. This yields an equation also dependent on the dispersion of the tangent of the position angle values \citep[see equation 11 ][]{Heitsch2001}. Although consistent with their own simulations, their variant appears to underestimate the field strength when compared to other numerical results \citep{Falceta2008}. In our data, this method yielded an estimate which is a factor $\sim$ 10 smaller than the other estimates. It is likely that this is because local deviations from the ``hourglass'' main field morphology produced larger values when using the tangent function, which yields a larger dispersion and therefore a smaller estimate. In contrast, the modification proposed by \citet{Falceta2008} was implemented by assuming that $\delta B/B$ is a global relation and thus they modified DCF by taking the tangent of the dispersion angle instead of $\delta \phi$ \citep[see equation 9 in ][]{Falceta2008}. This was proposed to address larger angle dispersions due to an increasing turbulent component in the field. However, this will rapidly decrease the field strength as the tangent function quickly diverges for $\delta \phi > 60^{\circ}$. Recently, the DCF method was revisited and another correction was proposed which considers the compressible modes from small amplitude MHD waves (magnetosonic), instead of purely Alfven transverse waves \citep{Skalidis2021}. This method implements a substitution in the DCF equation in the form of $\delta \phi \rightarrow \sqrt{\delta \phi}$, which seem to improve the recovery of the field strength when applied to their numerical simulations. Although it is not clear if the dominant mode perturbing the main field component is transverse (Alfvenic) or compressible (small amplitude magnetosonic waves), this variant will yield estimates which are smaller in value than the original DCF. The three previously described DCF variants used simulations to test the proposed modifications. All of the simulations assumed ideal MHD, which might not be representative of the physical conditions in NGC6334I(N). In fact, ideal MHD may produce artificially tangled magnetic field morphologies which will affect the polarization position angle dispersion, particularly in the line of sight. Furthermore and because of the low ionization rates in dense molecular clumps ($\sim 10^{-7}$), non-ideal MHD effects, such as ambipolar diffusion, are unavoidable \citep{Hennebelle2019}. The ADF method provides a way to quantify the turbulent component in the field and to better estimate the value of $\delta \phi$. This is done by fitting a structure function of the polarization position angle data, by incorporating a turbulence model, and also by considering the effects of interferometric filtering \citep[for a summary of the technique see Section 2 of][]{Houde2016}. This analysis allow us to associate $\delta \phi = \left[\left< B_{t}^{2} \right> / \left< B^{2} \right> \right]^{1/2}$, where the quantity on the right-hand side is the ratio of turbulent to total magnetic energy, one of the quantities derived from the dispersion-function analysis. We can then use $\delta \phi$ to estimate the field strength in the plane of the sky via the usual DCF technique, which takes the form of \begin{equation} B_{\mathrm{pos}} \simeq \sqrt{4\pi\rho}\sigma(v) \left[ \frac{ \left< B_{t}^{2} \right> }{ \left< B^{2} \right> } \right]^{-1/2} \,\,, \end{equation} \noindent where $\sigma(v) = \Delta V / 2\sqrt{2\log{2}}$, $\Delta V$ is the FWHM line-width of the C$^{33}$S line, and $\rho$ is the volume density. By applying this analysis to the polarized dust emission data, considering the same region as before (see purple ellipse in Figure \ref{fig:NGC6334IN_POL}), we obtain a turbulence correlation length of $\delta = 0^{\prime \prime}.262 \pm 0^{\prime \prime}.008$, or $\sim$ 2 mpc, at the distance to NGC6334I(N), and $\left< B_{t}^{2} \right> / \left< B^{2} \right> = 0.23 \pm 0.01$, which we use to estimate a plane-of-sky magnetic field strength $B_{\mathrm{pos}}$ = 24 mG (see Figure \ref{fig:disp} and Table \ref{tab:B} for the results). Furthermore, we apply the same analysis to the CS polarized emission data considering a wide velocity range, and obtain a good fit between -6 to -2 {\mbox{km\,s$^{-1}$}}. In this interval, we find a turbulence correlation length of $\delta = 0^{\prime \prime}.42 \pm 0^{\prime \prime}.011$, or $\sim$ 2.6 mpc, and $\left< B_{t}^{2} \right> / \left< B^{2} \right> = 0.08 \pm 0.0013$, which yields a plane-of-sky magnetic field strength $B_{\mathrm{pos}}$ = 2.8 mG. Note, the analysis was applied to the integrated data between -6 to -2 {\mbox{km\,s$^{-1}$}}, but given the small differences in $\delta \phi$ within the interval, we used the same $\left< B_{t}^{2} \right> / \left< B^{2} \right>$ value to estimate $B_{\mathrm{pos}}$ at each velocity channel (see Table \ref{tab:B}). The differences in the field strength estimation is largely due to the differences in density used. That is, the dispersion analyses only contribute a factor of $\sim 1.7$ (lowering the dust estimate) while the densities increase the dust value by $\sim 14$. Recent work by \cite{Liu2021} analyzed ideal MHD simulations of proto-cluster formation at clump scales. They applied various statistical methods to synthetic magnetic field maps to study the applicability of the DCF method and the variants used here (including ADF). Because the magnetic morphology in NGC6334I(N) has an ``hourglass'' shape, it is likely that we are in the strong-field regime. Thus, \citeauthor{Liu2021} results suggests that the magnetic field strength estimates derived here are good to a factor of a few, again, subjected to the caveat of ideal MHD simulations. We have five estimates for the field strength onto the plane of the sky. Each of them originate from modifications to the DCF method that try to address finite resolutions, the polarization angle dispersion value due to a random component of the field, and the effect of a different perturbation mode. Because none of these methods used here consider all of the relevant physics in this region, e.g. self-gravity, the ``true'' value for the field strength remains unconstrained. We lack an actual measurement of the field strength such the one provided by the Zeeman effect. Although still contested \citep[see ][]{Jiang_2020}, results from Zeeman measurements show that the field strength will grow with density as a power law, or $\sim n^{2/3}$ \citep{Crutcher2019}. Thus, the DCF and its variants still give us a first order statistical approximation to the ``true'' magnetic field strength onto the plane of the sky. We quantify a final estimate by taking the average of all five estimates obtaining $\left< \mathrm{B_{pos}} \right> = 16 $ mG as the average magnetic field onto the plane of the sky at densities of $n = 4.2 \times 10^{7}$ cm$^{-3}$, and $\left< \mathrm{B_{pos}} \right> = 2$ mG at densities of $n = 2.0 \times 10^{5}$ cm$^{-3}$ when considering the polarized CS emission. \subsection{Comparison with other HMSFR} By comparing our results from NGC6334I(N) to other HMSFR, we seek to discover if there is a pattern in the physical conditions of regions where the magnetic field has a clear and distinctive shape, such as an ``hourglass'' morphology. Examples of similar magnetic field morphologies to NGC6334I(N) are cores like G240 where the ``hourglass'' magnetic field, appears as a ``textbook'' case for magnetic controlled star formation with a bipolar outflow closely aligned to both the rotation and magnetic field axes \citep{Qiu2014}. Note, the G240 mass, 95 {\mbox{M$_{\odot}$}}, is substantially larger than the $\sim$ 26 {\mbox{M$_{\odot}$}} of the combined 1b and 1c core masses in NGC6334I(N) as derived from our data inside the purple oval region shown in Figure \ref{fig:NGC6334IN_POL}. Another example is the massive core G31.41, with a mass comparable to NGC6334I(N) \citep[about 26 {\mbox{M$_{\odot}$}} from ][]{Beltran2019}, has also been shown to exhibit an ``hourglass'' magnetic field morphology from core \citep{Girart2009} to envelope scales \citep{Beltran2019}. However, the alignment between the outflow, rotation, and magnetic axes is less clear here when compared to G240. The length-scales where the ``hourglass'' shape is traced in these two sources are similar to what we see in NGC6334I(N). For instance, in G31.41 the field morphology is seen preserved through a scale range that matches the lower end in the NGC6334I(N) scales. The data obtained from G240 traces the field at the core scales also where the ``hourglass'' is seen in NGC6334I(N). However, not all HMSFRs show ``hourglass'' magnetic field morphologies. For instance, in the W43-Main molecular complex, the W43-MM1 \citep{Cortes2016,Arce2020} and W43-MM2 clumps \citep{Cortes2019} exhibit magnetic field morphologies that are primarily radial over their most massive cores, which is expected when gravity dominates the dynamics. W43-Main harbors some of the most massive protostars currently known \citep[$\gtrsim 100$ {\mbox{M$_{\odot}$}},][]{Cortes2016,Motte2018a,Cortes2019}, whereas the mass of the central cores in NGC6334I(N) are only about $\sim 26$ {\mbox{M$_{\odot}$}} in total when considering our data. However and because of the angular scales sampled by our ALMA data, we might be missing flux which might make NGC6334I(N) appear less massive than other regions. Nonetheless, this difference in core mass is not significant when comparing W43-Main with G240 where the core masses are comparable, but the field shapes are completely different. A totally different magnetic field morphology is seen in IRAS 180089-1732 where the field was found to have an spiral morphology \citep{Sanhueza2021}. Previous mapping of this source at clump scales appears to show the same field pattern \citep{Beuther2010} as seen by ALMA at envelope scales. In this case, the total core mass is estimated to be 75 {\mbox{M$_{\odot}$}} from the ALMA data, which is also comparable to G240 and in the lower range from the W43-Main estimates. Thus, it is also uncertain whether the core mass is a decisive factor to explain the differences in the field shape seen across these HMSFRs. High mass star forming cores are usually surrounded by {\hbox{H \small{II}}} regions which provide significant radiative feedback. It is possible that radiation pressure coming from {\hbox{H \small{II}}} regions may compress the field in conjunction with the effects of gravity, which the field may resist if strong enough \citep[e.g. see ][ for an example in the Carina nebula]{Li2006,Shariff2019}. For instance, W43-Main is part of a giant molecular complex which has at its center a large {\hbox{H \small{II}}} region powered by a number of O7 Wolf-Rayet stars, which appear to be not only ionizing the boundaries of W43-Main but also compressing the gas \citep{Blum1999,Motte2003}, while NGC6334 contains a group of smaller {\hbox{H \small{II}}} regions known as the ``Cat's Paw'' which seem distributed along the filament \citep{Russeil2016}. This also seems to be the case for G31.41, which is surrounded by both compact and extended {\hbox{H \small{II}}} regions (J. M. Girart private communication). In contrast, for G240 and IRAS 180089-1732, the situation seems unclear as the cores appear to be more isolated than NGC6334I(N), G31.41, and W43-Main. Although we note these differences, in this simple analysis we are certainly ignoring a number of other factors such as chemical diversity, stage of evolution, possible initial conditions, among many others. Thus, acquiring sufficient statistical cases is paramount to increase our understanding about how stars form in high mass star forming regions and what is the role of the magnetic field. As part of this MagMaR project, we have acquired a comprehensive sample that is sufficiently large to allow us to begin addressing these questions in future work. \section{SUMMARY AND CONCLUSIONS}\label{se:conc} We present ALMA observations of polarized dust, CS$(J=5 \rightarrow 4)$, and C$^{33}$S$(J=5 \rightarrow 4)$ emission towards NGC6334I(N). From these data we find: \begin{itemize} \item The magnetic field derived from the ALMA polarized dust emission data shows a clear ``hourglass'' morphology over the 1b, 1c, and possibly 1a cores. This shape is preserved from clump to envelope scales when considering both the SMA and JCMT data. \item We obtained polarized emission from CS and C$^{33}$S $J=5\rightarrow4$ transition. We modelled the total intensity for both the CS and C$^{33}$S lines using the MADCUBA software; we calculate optical depths of 32 and 0.1 for each line, respectively. \item The polarized emission from CS nicely traces the same magnetic field ``hourglass'' morphology inferred from the polarized dust emission within the -12 to 10 ${\mbox{km\,s$^{-1}$}}$ velocity range. We estimated a number density of 2 $\times 10^{5}$ cm$^{-3}$ as traced by the CS emission; 2 order of magnitude less than the $4.2\times10^{7}$ cm$^{-3}$ derived from dust emission. This allow us to obtain a tomographic view of the field in this region from a single dataset. \item We also report polarized emission from C$^{33}$S. While there are fewer independent detections of polarization, the polarized emission appears consistent with the CS results. \item We estimate the magnetic field strength onto the plane of the sky from both the dust and the CS data by using multiple methods. We obtain an average field strength estimate of $\left< \mathrm{B}_{\mathrm{pos}} \right> = 16$ mG from the dust and $\left< \mathrm{B}_{\mathrm{pos}} \right> \sim 2$ mG from the CS emission, when considering the -6 to -2 {\mbox{km\,s$^{-1}$}} velocity range. \end{itemize} \newpage
\section{Why Pfaffian?} Pfaffian functions were introduced in \cite{hovanskii1980class} where Khovanskii showed that the class has strong finiteness properties. For instance, Khovanskii exhibits an effective bound on the number of zeros in a system of equations involving Pfaffian functions. Later, the strong finiteness properties of this class of functions played an important role in model completeness results for o-minimal expansions of the real field \cite{wilkie1996model,MR1435773}. Any algebraic function is Pfaffian on a suitable domain, but there are two well-known ways to see that a transcendental function is \emph{not Pfaffian}: \begin{itemize} \item The function is differentially transcendental.\footnote{Sometimes this property is also called being hypertranscendental or transcendentally transcendental \cite{doi:10.1080/00029890.1989.11972282}. The Gamma-function is differentially transcendental by a classical theorem of H\"older \cite{holder1886ueber} and its restriction to $(0,\infty)$ is definable in an o-minimal expansion of the reals \cite{dries2000field}.} \item The function violates the strong finiteness properties of the class.\footnote{A popular example is provided by $\sin (x)$ with domain the real line. The violation of the finiteness principles of Khovanskii in this case also yields a violation of o-minimality. In fact, in any example known to the author, examples shown to be violating the finiteness principles of Khovanskii's theorem are strong enough violations to also yield a violation of o-minimality. Because of this, it is not surprising that there is no currently known function which is differentially algebraic, definable in an o-minimal expansion of the real field, and not Pfaffian.} \end{itemize} This manuscript introduces a third way of showing a function is not Pfaffian. Our work is based on a very simple idea - Pfaffian functions are built using solutions to certain order one differential equations, while solutions to higher order strongly minimal differential equations can not satisfy order one differential equations. For the notion of $\mathbb C$-Pfaffian, this summary gives nearly a complete indication of the proof that a solution to a higher order strongly minimal equation is not $\mathbb C$-Pfaffian. There are only slightly more complications to describe when considering if the real and imaginary parts of the function are Pfaffian. These complications can already be seen in the work of Macintyre \cite{macintyre2008some}, who shows that meromorphic functions whose derivatives are algebraic have real and imaginary parts which are Pfaffian. Our main result shows that no analog of Macintyre's theorem exists for higher order differential equations. Throughout, we will use Klein's $j$-function as a motivating example, often stating and explaining our results for the $j$-function before giving the more general result. Besides being a non-misleading example, the $j$-function was the original motivation for this manuscript. Restricted to its standard fundamental domain in the upper half plane, the real and imaginary parts of the $j$-function are definable in the o-minimal expansion of the real field given by the exponential and restricted analytic functions, $\mathbb R_{an, exp}$. As such, the point counting methods of Pila and Wilkie have been applied to certain definable sets associated with the $j$-function. Applying these methods has been a major part of the proof of various open conjectures in diophantine geometry and transcendence theory \cite{PilaAO}. There are several potential sources of ineffectivity in this general approach to the special points problems, but one important source comes from the Pila-Wilkie theorem itself. In general, it is known that the asymptotic bounds of the Pila-Wilkie theorem can not in general be improved (see e.g. page 2 of \cite{pila2006rational} and the discussion in the introduction of \cite{jones2015improving}). In the general o-minimal case, it isn't even entirely clear what sort of effectivity one has in mind\footnote{i.e. On what quantities associated with the definable set are the constants allowed to depend?} without some additional measure of complexity of the sets or functions involved. There are, however, improvements to the Pila-Wilkie theorem in important special cases. For instance, \cite[Conjecture 1.11]{pila2006rational} conjectures that for sets definable in $\mathbb R_{exp}$, the bound from the Pila-Wilkie theorem can be improved from $\mathcal O (h^{\epsilon})$ to $\mathcal O ( (\log h )^c )$ where the constant $c$ depends on the definable set. Numerous recent works have concentrated, in special cases, on these improved bounds or making the constants of the Pila-Wilkie theorem effective \cite{binyamini2020point, binyamini2017wilkie, binyamini2019complex, butler2012some, jones2012density, jones2020effective, pila2010counting, pila2006note}; each of these works uses the certain powerful finiteness results for Pfaffian functions (sometimes more or less restrictive cases) to obtain effectiveness where the constants depend on the \emph{complexity} of the Pfaffian chain for the functions defining the set. At the same time, attempts have been made to show that effective results from the Pfaffian setting apply to motivational examples coming from number theory \cite{jones2021pfaffian}. In the last section of \cite{binyamini2017wilkie}, Binyamini and Novikov isolate two classes of particular interest in diophantine applications, which may be amenable to their approach: elliptic functions and modular functions. The former is known to be amenable to Pfaffian techniques \cite{jones2021pfaffian, macintyre2008some} and is connected to special points conjectures around the Manin-Mumford conjecture, where the effectiveness results have concrete number theoretic consequences. The latter is connected to various number theoretic problems, e.g. the Andr\'e-Oort conjecture. Of it, Binyamini and Novikov write, \begin{displayquote} The modular category currently appears to be more challenging: we have no reason to believe that the j-function is Pfaffian (or definable from Pfaffian functions). \end{displayquote} In recent work, Binyamini gives an effective Pila-Wilkie result for \emph{Noetherian functions} \cite{binyamini2019density} in the o-minimal context, a setting which does include the j-function. The results in the Noetherian setting require a relatively compact domain and yield fewer uniformities than the Pfaffian setting. See \cite{jones2020effective} for some discussion of this point. See also \cite{binyamini2020point} for discussion of the difficulties when leaving the Pfaffian setting; this manuscript shows that for the desired applications to certain diophantine problems, the work was truly necessary as theorems from the Pfaffian setting can not apply. In the recent work of Armitage \cite{armitage2020pfaffian}, significant effort is required to obtain effective bounds for the zeros of polynomials involving the j-function on its natural (noncompact) domain. As Armitage mentions, it was previously unknown whether the real and imaginary parts of the j-function are Pfaffian. Our results in this manuscript confirm the suspicions of Binyamini and Novikov; the real and imaginary parts of the $j$-function can not be put into a Pfaffian chain. The main theorem of \cite{freitag2017strong} is the essential input to showing this result: \begin{thm} \label{strongj} As a definable set in a differentially closed field, the differential equation satisfied by the $j$-function: $$ \left(\frac{y''}{y'}\right)' -\frac{1}{2}\left(\frac{y''}{y'}\right)^2 + (y')^2 \cdot \frac{y^2-1968y+2654208}{y^2(y-1728)^2} = 0 $$ is strongly minimal. \end{thm} \begin{rem} The equivalent form of the previous theorem that we will use is stated purely in terms of transcendence: a the zero set of a differential equation, $X$, with coefficients in a differential field $K$ is strongly minimal if and only if (1) the equation is irreducible over $K^{alg}$ (as a polynomial in several variables) and (2) given any solution $f$ of $X$ and \emph{any differential field extension\footnote{In proofs, the robustness of this condition is often extremely useful, but we note that there has been significant recent work in showing that this condition follows from the considering only a very particular class of such extensions $F/K$ \cite{freitag2021bounding}.} $F$ of $K$}, $$\text{trdeg}_F \left( F\langle f \rangle \right) = \text{trdeg}_K \left( K \langle f \rangle \right) \text{ or } 0.$$ Here $K \langle f \rangle $ denotes the differential field extension of $K$ generated by $f$. \end{rem} Our main results show that functions which satisfy higher order strongly minimal differential equations can not have real and imaginary parts which algebraic over the elements of any Pfaffian chain. These results are especially pertinent because many of the number theoretic functions to which the Pila-Wilkie theorem has been applied have been shown to be strongly minimal in recent years. For these as well as various other strong minimality results on nonlinear higher order differential equations, see \cite{blazquez2020some, brestovski1989algebraic, casale2020ax, devilbiss2021generic, freitag2017strong, jaoui2019generic, nagloo2017algebraic, poizat1980c}. Besides results for specific equations, as \cite{devilbiss2021generic, jaoui2019generic} indicate, strong minimality is a pervasive condition for nonlinear differential equations of order at least two - it holds \emph{generically} both in the space of constant coefficient equations as well as the space of nonconstant equations. The general form of our results is given in Theorem \ref{mainthm}. Following this result we formulate the general problem of determining when a complex analytic function has Pfaffian real and imaginary part using notions from geometric stability theory interpreted in the theory of differentially closed fields. \section{Pfaffian} \begin{defn} Let $f_1, \ldots , f_l $ be real analytic functions on some domain $U \subseteq \mathbb R^n$. We will call $(f_1, \ldots , f_l)$ a \emph{Pfaffian chain} if there are polynomials $p_{ij}(u_1, \ldots , u_n , v_1, \ldots, v_i )$ with coefficients in $\mathbb R$ such that $$\pd{f_i}{x_j}= p_{ij} \left( \bar x, f_1 ( \bar x), \ldots , f_i (\bar x ) \right)$$ for $1 \leq i \leq l$ and $1 \leq j \leq n.$ \emph{We call a function Pfaffian} if it can be written as a $\mathbb R$-polynomial with real coefficients in the functions of some Pfaffian chain. \end{defn} We are interested mainly in the connection of the previous notion to certain differential algebraic properties, but the following complex version of the previous notion is more easily connected with our differential algebraic notions: \begin{defn} Let $f_1, \ldots , f_l $ be complex analytic functions on some domain $U \subseteq \mathbb C^n$. We will call $(f_1, \ldots , f_l)$ a \emph{$\mathbb C $-Pfaffian chain} if there are polynomials $p_{ij}(u_1, \ldots , u_n , v_1, \ldots, v_i )$ with coefficients in $\mathbb C$ such that $$\pd{f_i}{x_j}= p_{ij} \left( \bar x, f_1 ( \bar x), \ldots , f_i (\bar x ) \right)$$ for $1 \leq i \leq l$ and $1 \leq j \leq n.$ We call a function \emph{$\mathbb C$-Pfaffian} if it can be written as a polynomial with $\mathbb C$-polynomial in the functions of some $\mathbb C$-Pfaffian chain. \end{defn} Our results are insensitive to replacing functions which appear in Pfaffian chains to polynomial (or even algebraic) functions of elements in a Pfaffian chain. \section{Not Pfaffian} \subsection{The $j$-function isn't $\mathbb C$-Pfaffian} We begin by giving a quick and elementary argument for why the the $j$-function can not satisfy a differential equation of the form $j'(z) = f( z, j (z))$ where $f$ is a rational function with coefficients in $\mathbb C.$ Following this, we will show that the $j$-function is not $\mathbb C$-Pfaffian, which generalizes this fact. By $SL_2(\mathbb Z)$-invariance, $j(z)=j(z+1).$ It follows also that $j'(z)=j'(z+1)$. Suppose for a moment that there is a rational function with coefficients in $\mathbb C$ so that $j'(z) = f( z, j (z)).$ Now note that $f( z, j (z))=f( z+1, j (z+1)) = f( z+1, j (z)).$ But now since the $j$-function is not algebraic, this equality holds for a generic point $(x,y)$ in affine 2-space, and thus everywhere, so the rational function has the property that $f(x,y)=f(x+1,y)$. This implies that $f$ is only a function of $y$. So, now we have that $$j'(z)=f( j (z) ).$$ But we have that $f(j(z))$ is $SL_2(\mathbb Z)$-invariant, while $j'(z)$ is a quasi-modular form of weight $2.$ That is, $j'(z)$ has the property that if $$\alpha = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \in SL_2 (\mathbb Z)$$ then $j'(\alpha z) = (cz+d)^2 j'(z).$ Thus, it is impossible that $j'(z)=f( j (z) )$. Next we argue more generally that the $j$-function can not be $\mathbb C$-Pfaffian using Theorem \ref{strongj}. Let $U \subseteq \mathbb H$ be the standard fundamental domain for the $j$-function: $$U = \left\{ z \in \mathbb H \, : \, |z| \geq 1, -\frac{1}{2}<Re(z) \leq \frac{1}{2}, \text{ and if } Re(z)<0, \text{ then } |z|>1 \right\}$$ \begin{thm} The $j$-function is not algebraic over any $\mathbb C$-Pfaffian chain $(f_1, \ldots , f_l )$ on an open $V \subset U.$ \end{thm} \begin{proof} Let $(f_1, \ldots , f_l)$ be a Pfaffian chain on $V \subset V$ of minimal length such that $j(z)$ is algebraic over $\mathbb C ( z, f_1, \ldots , f_l ).$ If $j$ is algebraic over $(f_1, \ldots , f_{l-1}),$ we may shorten the chain contradicting the minimality of $l$. So, we can assume that $j(z)$ is transcendental and interalgebraic with $f_l$ over $\mathbb C ( z, f_1, \ldots , f_{l-1} ).$ By the Pfaffian condition, the field $F=\mathbb C (z, f_1, \ldots , f_{k-1})$ is a $\frac{d}{dz}$-differential field. Again, by the Pfaffian condition, $F(f_l)$ is a $\frac{d}{dz}$-differential field and is a transcendence degree one extension of $F$. Since $f_l$ is interalgebraic with $j$, $\text{tr.deg.} _F (F \langle j \rangle )=1.$ This is impossible by Theorem \ref{strongj}. \end{proof} One can see that there isn't anything special about the $j$-function in the above argument except that it satisfies a higher order strongly minimal differential equation. So, by the same argument as the previous proof: \begin{thm} Let $U \subseteq \mathbb C$ be a connected domain and let $f$ be analytic on $U$. If $f(z)$ is not algebraic and satisfies a strongly minimal differential equation of order two or more, then $f(z)$ is not $\mathbb C$-Pfaffian. \end{thm} \subsection{The real and imaginary parts can't be Pfaffian either} \begin{thm} The real and imaginary parts of the $j$-function are not algebraic over any Pfaffian chain $(f_1, \ldots , f_l )$ on an open $V \subset U.$ \end{thm} \begin{proof} Let $z=(x,y)$ denote the real and imaginary coordinates of the complex number $z$, and let $U$ be the domain as above. Suppose there is a Pfaffian chain of shortest length over which both $Re(j(x+iy))$ and $Im(j(x+iy))$ are algebraic. By the same reduction as in the previous subsection, we assume without loss of generality that the final element of the chain $(f_1, \ldots , f_l )$ is transcendental and interalgebraic with one of $Re(j(x+iy))$ or $Im(j(x+iy))$ over the earlier elements. Assume $f_l$ is interalgebraic with $Re(j(x+iy))$ (a similar argument will apply to the case of $Im(j(x+iy))$). To ease notation, we will simply assume that $f_l = Re(j(x+iy))$ and that $Im(j(x+iy))$ appears earlier in the chain. Again, our argument is not at all sensitive to interalgebraicity. Now view the $j$-function as a map $j: U \rightarrow \mathbb R^2.$ We have that $Re(j(x+iy))$ is interdefinable (even in the empty language) with $j(z)$ over $\mathbb R (x, y, f_1, \ldots , f_{l-1})$. Note that the reason for this is very simple - we have that $Im(j(x+iy))$ appears in the chain and $j(z) = \left(Re(j(x+iy)), Im(j(x+iy)) \right).$ By the Pfaffian condition, the field $F= \mathbb R (x, y, f_1, \ldots , f_{l-1})$ is a $\frac{d}{dx}$ and a $\frac{d}{dy}$-field. By the Pfaffian condition, with respect to the derivation\footnote{Note that there is nothing special about the $\frac{d}{dx}$ derivation here - one could equally well use $\frac{d}{dy}$.} $\frac{d}{dx}$, $$F \langle Re(j(x+iy)) \rangle = F \left( Re(j(x+iy)) \right)$$ and as previously, we can assume without loss of generality that this extension is not algebraic. That is: $$\text{tr.deg.} _F (F \langle Re(j(x+iy)) \rangle )=1.$$ By the interdefinability of $Re(j(x+iy))$ and $j(z)$, we have that the transcendence degree of the $\frac{d}{dx}$-field $F \langle j(z) \rangle$ over $F$ is one. By the $\mathbb C$-analyticity of $j(z)$, we have that $j(z)$ satisfies the same differential equation with respect to $\frac{d}{dx}$ as with respect to $\frac{d}{dz}$. Though we are regarding $j(z)$ as a function $\mathbb R^2 \rightarrow \mathbb R^2$, the differential equation is algebraic, and can be expressed by polynomial functions of the real and imaginary parts and their derivatives with respect to $x$ (the derivatives with respect to $y$ are definable from this by the Cauchy-Riemann equations). So, in the $\frac{d}{dx}$-field generated by $Re(j(x+iy))$ or equivalently $j(z)$, we have the functions $\frac{dj}{dz}$ and $\frac{d^2j}{dz^2}$ as functions $\mathbb R^2 \rightarrow \mathbb R^2$. The differential equation, being algebraic, is expressible by polynomial equalities in the real and imaginary parts of these functions. We now obtain a contradiction to Theorem \ref{strongj}, since the transcendence degree of the differential field generated by any solution to the differential equation satisfied by the $j$-function must be $0$ or $3$. \end{proof} \subsection{The general strongly minimal case} The analysis of the $j$-function in the previous two subsections used only two properties: \begin{itemize} \item The function is complex analytic on some open connected $U \subseteq \mathbb C$. \item The function satisfies an algebraic differential equation\footnote{One can actually assume that the function satisfies an equation and finitely many inequations so that the resulting definable set is strongly minimal. For instance, the system $x\cdot x'' - x' =0, \, x' \neq 0$ is one such system, see \cite{MMP} or \cite{poizat1980c} for a proof.} which is strongly minimal and of order $>1.$ \end{itemize} The argument of the previous subsection then gives: \begin{thm} Let $f(z)$ be an analytic function on some open connected $U \subseteq \mathbb C$. Let $f(z)$ be a non-algebraic solution to an order $h>1$ algebraic differential equation with coefficients in $\mathbb C(z)$ which is strongly minimal. Then one can not build a Pfaffian chain $(f_1, \ldots , f_l)$ with both $Re(f(z))$ and $Im(f(z))$ algebraic over $\mathbb C (z, f_1, \ldots , f_l ).$ \end{thm} In the theory of differentially closed fields, the definable closure of $a$ over a differential field $F$ is given by $\operatorname{dcl} (a/F) = F \langle a \rangle$, the differential field generated by $a$ over $F$. The algebraic closure, $\operatorname{acl} (a/F) = F \langle a \rangle ^{alg}$ consists of the algebraic closure (in the sense of fields) of the differential field generated by $a$ over $F.$ The next result generalizes the previous theorem in several ways: \begin{thm} \label{mainthm} Let $f(z)$ be a complex analytic function on some open connected subset $U \subset \mathbb C$ and $g(z), h(z) \in \operatorname{acl} (f(z) / \mathbb C (z) )$ such that $g(z)$ satisfies a strongly minimal differential equation over $\mathbb C (z) \langle h(z) \rangle $ with respect to $\frac{d}{dz}$ of order larger than one. Then one can not build a Pfaffian chain with both $Re(f(z))$ and $Im(f(z))$ algebraic over the elements in the chain. \end{thm} \begin{proof} The previous result is insensitive to replacing $f(z)$ with some function which is algebraic over $\mathbb C (z, f(z))$, because if $f(z)$ is algebraic over $\mathbb C (z, f_1, \ldots , f_l ),$ then so is any element of $\operatorname{acl} (f(z) /\mathbb C(z)).$ Similarly, if $h(z) \in \operatorname{acl} (f(z) / \mathbb C(z) )$, then if $h(z)$ is not Pfaffian, then $f(z)$ can not be Pfaffian. Since $h(z)$ is Pfaffian, we can assume that $h(z)$ appears earlier in the chain. Then the previous arguments apply with $\mathbb C(z) $ replaced by $\mathbb C(z) \langle h(z) \rangle$. \end{proof} \begin{rem} The previous theorem resolves negatively Question 1 of \cite{Bianconi2016Some}. For instance, the real and imaginary parts of the $j$-function are Noetherian, but on any open domain in $\mathbb C$, these functions can not appear in a Pfaffian chain, by the previous result. \end{rem} \subsection{Minimal analysis} \label{gst} Even the condition of strong minimality can be slightly weakened - for instance we could instead demand that $g(z)$ is a generic solution of a differential equation $X$ over $\mathbb C (z) \langle h(z) \rangle $ which has Lascar rank one and order larger than one. It is also sufficient to merely demand that $g(z)$ is almost internal to a Lascar rank\footnote{Lascar rank is notion also coming from model theory which has a concrete interpretation in differential fields in terms of transcendence (see e.g. \cite{MMP}). Lascar rank is bounded by Morley rank (in general), but the two can differ \cite{hrushovski1999lascar}.} one type of order greater than one. Theorem \ref{mainthm} might appear as an extremely special case not likely to be close to contributing to a general characterization of when a function which satisfies an algebraic differential equation has real and imaginary parts which are Pfaffian (similarly $\mathbb C$-Pfaffian). But in this subsection, we will explain why the result is perhaps closer than one might expect. We begin by giving some definitions from geometric stability theory \cite{GST}, and note that as before we are working in the theory of differentially closed fields of characteristic zero. Throughout the subsection, $p = \operatorname{tp}(a/A)$ will be assumed to be a stationary type. We say that a type is \emph{semiminimal} if it is \emph{almost internal} to a type of Lascar rank $1$. Recall that a stationary type $p = \operatorname{tp} (a/ A)$ is \emph{almost internal} to a minimal type $q$ over $B \supset A$ such that $a \mathop{\mathpalette\Ind{}} _A B$ and there is a sequence $(d_1, \ldots , d_n )$ of $B$-independent realizations of $q$ such that $\operatorname{acl} (Ba) = \operatorname{acl} (B d_1 \ldots d_n )$. The following is a well-known notion from geometric stability theory \cite{moosa2014some}. \begin{defn} An \emph{semiminimal analysis of $p = \operatorname{tp}(a/A)$} is a sequence $(a_0, \ldots , a_n)$ such that \begin{itemize} \item $a$ is interdefinable with $a_n$ over $A$, \item for each $i$, $a_i \in \operatorname{dcl} (A, a_{i+1} )$, \item for each $i$, $\operatorname{tp} (a_{i+1} /A a_i)$ is \emph{semiminimal}. \end{itemize} \end{defn} Every finite rank type has a semiminimal analysis, and it easily follows from Theorem \ref{mainthm} that if in some analysis of $p=\operatorname{tp} (a/ \mathbb C(z) )$, $(a_0, \ldots, a_n )$, we have a type $tp(a_{i+1} / \mathbb C(z) \langle a_i \rangle )$ which is internal to a strongly minimal type which has order greater than one, then the real and imaginary parts of $a$ are not Pfaffian. Due to the inductive nature of the definition of Pfaffian functions, the following problem can be seen to reduce to the special case of semiminimal types almost internal to types satisfying order one differential equations over differential fields generated by Pfaffian functions. \begin{problem} \label{open} Formulate in differential algebraic terms, necessary and sufficient conditions for the real and imaginary parts of a complex analytic function $f(z)$ to be Pfaffian in terms of the semiminimal analysis of $f(z)$. \end{problem} One can see that the problem must involve in some essential way the differential algebraic equations satisfied by the real and imaginary parts on the given domain, or directly on the domain of complex analytic function. After all, a nontrivial solution to $f'=f$ (a $\mathbb C$-multiple of $e^z$) can not have Pfaffian real and imaginary part on all of $\mathbb C$ (see e.g. \cite{macintyre2008some}). Restricting the domain to those imaginary values in $(-\pi , \pi)$, the complex exponential has real and imaginary parts which are polynomial over the real exponential and restricted trignometric functions, all of which are Pfaffian. The higher order strongly minimal case analyzed above is of a much different nature. For instance, it is robust under domain changes - one can see that the $j$-function can not have its real and imaginary parts in a Pfaffian chain even when restricting to any open subset of the upper half plane. \begin{defn} The type $\operatorname{tp} (a /A)$ \emph{admits no proper fibrations} if whenever $c \in \operatorname{dcl} (Aa) \setminus \operatorname{acl} (A)$, we must have $a \in \operatorname{acl} (Ac )$. Minimal types admit no proper fibrations, but there are other (semiminimal) examples, e.g. \cite[example 2.2]{moosa2014some}. \end{defn} \begin{prop} \label{moose} \cite[Proposition 2.3]{moosa2014some} Suppose that the stationary type $p = \operatorname{tp} (a/A)$ admits no proper fibrations. Then $p$ is semiminimal and one of two options occurs: \begin{enumerate} \item $p$ is almost internal to a non locally modular minimal type. \item $a$ is interalgebraic over $A$ with a finite tuple of independent realizations of a locally modular minimal type over $A$. \end{enumerate} \end{prop} By refining via fibrations, any finite rank type has a semiminimal analysis $a_0, \ldots , a_n$ in the above sense which is also \emph{reduced} in the sense that for each $i$, $\operatorname{tp} (a_{i+1} /A a_i)$ admits no proper fibrations. Then Problem \ref{open} reduces to the following question with two distinct subcases: \begin{question} Let $f(z)$ be a realization of a type $p$ which is $\mathbb C$-analytic on some domain $U \subset \mathbb C.$\footnote{There is always such a realization, by Seidenberg's embedding theorem \cite{seidenberg1958abstract}.} Suppose that $p$ satisfies one of the following: \begin{enumerate} \item Let $p$ be the generic type of some order one differential equation which is internal to the constants. \item Suppose that $p$ does not admit proper fibrations and is interalgebraic with a number of realizations of a locally modular type of order one. The order one type is known to be trivial and $\aleph _0$-categorical \cite{freitag2017finiteness}. \end{enumerate} When is $f(z)$ Pfaffian on $U$? When is $f(z)$ Pfaffian on some open $V \subset U$? \end{question}
\section{Introduction} Convolutional neural networks (CNNs) have been very successful in many computer vision tasks, such as image classification \citep{AlexNet, ResNet}, object detection \citep{FasterRcnn, Yolo} and instance segmentation \citep{MaskRcnn}. However, they sometimes fail to recognize an object captured from novel viewpoints which are not covered in the training data \citep{Engstrom2017, Alcorn2019}. One purpose of capsule networks is to overcome this problem \citep{capsule2011, Dynamic, Hinton2}. Compared with CNNs, capsule networks have the following two major distinctions. First, the basic unit of capsule networks is a capsule composed of a group of neurons, while the basic unit of CNNs is a single neuron. A capsule thus can potentially represent multiple properties of an object, such as thickness and scale. Second, a data-dependent routing procedure is conducted between two consecutive capsule layers, while the flow of information in conventional CNNs is data-independent. In the existing routing procedures, capsules produce predictions (termed votes) for the next-layer capsules. The input of a next-layer capsule is formulated as a weighted sum over all the votes it receives. Then its content may be computed from its input by a ``squashing'' function \citep{Dynamic} or by layer normalization \citep{Inverted}. Iterative routing procedures alternately update the capsule's content and the weights used for formulating the capsule's input through several iterations \citep{Dynamic, Hinton2}. In contrast, non-iterative routing procedures compute the weights and capsule's content with a straight-through process \citep{Karim2019, Choi2019}. By simplifying the iterations to a single forward-pass, non-iterative routing procedures release the computational burden of iterative routing procedures. We propose non-iterative cluster routing and apply it to capsule networks. In contrast to the existing routing procedures, in the proposed cluster routing, capsules produce vote clusters instead of individual votes for capsules of the next layer. A vote cluster comprises many votes, and each vote may be produced based on a different previous-layer capsule. A cluster's votes close to each other indicate that the same information is extracted from various previous-layer capsules. Thus the vote cluster's variance can be utilized to represent its confidence in the information it encodes. The input of a next-layer capsule is a weighted sum over the centroid of each vote cluster it receives, and the centroid that comes from a cluster with a smaller variance is assigned a larger weight. On several classification datasets, capsule networks with the proposed cluster routing achieve the best accuracy compared to the state-of-the-art capsule networks. Our capsule networks also preserve advantages of the previous types of capsule networks --- producing capsules with disentangled representation \citep{Dynamic, Choi2019} and generalizing well to images captured from novel viewpoints \citep{Hinton2, Karim2019}. We also show that the proposed capsule networks preserve 2D spatial information such as the rotational orientation of an input image through a reconstruction experiment, where we first rotate the capsule channels by a transformation $T$, then observe if the reconstructed object is rotated by the same transformation $T$. We outline the contributions of our work as the following: \begin{itemize} \item A novel non-iterative cluster routing is proposed for capsule networks. In the proposed cluster routing, capsules produce vote clusters instead of individual votes for next-layer capsules. The variance of a vote cluster is utilized to compute its confidence in the information it encodes. While computing a next-layer capsule's content, the vote cluster with smaller variance contributes more than other vote clusters. \item Compared with the state-of-the-art capsule networks, the proposed capsule networks achieve the best accuracy on the fashion-MNIST and SVHN datasets with the fewest parameters. On the smallNORB and CIFAR-10 datasets, the proposed capsule networks achieve the best accuracy with a moderate number of parameters. \item The proposed capsule networks produce capsules with disentangled representation, generalize well to images captured from novel viewpoints, and preserve 2D spatial information of an input image in the capsule channels. \end{itemize} \section{Related Works} \subsection{Capsule networks} Capsule networks were first introduced by Hinton et al. \citep{capsule2011}. More recently, they developed capsule networks with dynamic routing \citep{Dynamic} and EM (Expectation-Maximization) routing \citep{Hinton2}. Capsule networks with dynamic routing yielded disentangled representation of an image; capsule networks with EM routing generalized well to images captured at novel viewpoints. However, these routing methods can be improved from the perspective of computational complexity. Li et al. \citep{Li2018} approximated the routing procedure with a master branch and an aide branch. Chen et al. \citep{Chen2019} incorporated the routing procedure into the training process. Zhang et al. \citep{FREM} improved the routing efficiency by using weighted kernel density estimation. Ahmed et al. \citep{Karim2019} and Choi et al. \citep{Choi2019} computed the coupling coefficients with a straight-through process. In addition to the works on releasing computational complexity, Ribeiro et al. \citep{VB-Routing} replaced the EM algorithm in EM-routing with Variational Bayes, which improved both the classification accuracy and novel viewpoint generalization. Tsai et al. \citep{Inverted} imposed layer normalization as normalization and replaced the sequential iterative routing with concurrent iterative routing. Wang et al. \citep{Wang2018} interpreted the routing as an optimization problem that minimizes a combination of clustering-like loss and a Kullback-Leibler regularization term. Capsule networks were combined with other techniques. Lenssen et al. \citep{Lenssen2018} used group convolutions to boost the equivariance and invariance of capsule networks. Deliege et al. \citep{Deliege2018} embedded capsules in a Hit-or-Miss layer, which resulted in a hybrid data augmentation process and also detected potentially mislabeled images in the training data. Jaiswal et al. \citep{Jaiswal2018}, Saqur et al. \citep{Saqur2018} and Upadhyay et al. \citep{Upadhyay2018} combined capsule networks with generative adversarial networks \citep{Goodfellow2014} to synthesize images. Capsule networks were also extended to a wide range of applications. LaLonde and Bagci \citep{LaLonde2018} extended capsule networks to object segmentation by introducing a deconvolutional capsule network. Durate et al. \citep{Duarte2018} developed capsule-pooling and applied capsule networks to action segmentation and classification. Zhao et al. \citep{Zhao2019} applied capsules to point clouds for 3D shape processing and understanding. Zhou et al. \citep{Zhou2019} applied capsule networks to visual question answering tasks with an attention mechanism. \subsection{Attention mechanism} The routing procedure is close to the attention mechanism of the Transformer \citep{Transformer}, which produces data-dependent attention coefficients that capture the long-range interactions between inputs and outputs. Some capsule networks adopted the attention mechanism. Choi et al. \citep{Choi2019} and Karim et al. \citep{Karim2019} proposed attention-based routing procedures that compute the coupling coefficients between capsules without recurrence. Xinyi et al. \citep{Xinyi2018} used an attention module in a capsule graph network to focus on critical parts of the graphs. \section{Methods} \subsection{Capsule networks with dynamic routing} In contrast to a traditional neural network composed of artificial neurons, a capsule network comprises capsules. A capsule comprises a group of neurons that jointly represent an object or an object part. We present the classic dynamic routing capsule networks \citep{Dynamic} among various types of capsule networks. In dynamic routing capsule networks, a capsule is represented as a vector, and the capsule vector's length represents how active the capsule is. A capsule $\textbf{u}_{i} \in \mathbb{R}^D$ at the $l$th layer is transformed to make ``prediction vectors'' $\hat{\textbf{u}}_{j|i}$ for capsules of the $(l+1)$th layer, by multiplying with weight matrices $\textbf{W}_{ij}$, \begin{equation} \label{prediction} \qquad\qquad\;\;\hat{\textbf{u}}_{j|i} = \textbf{W}_{ij} \textbf{u}_{i}, \end{equation} where $i$ and $j$ are the indices of capsules of the $l$th and $(l+1)$ layer. A ``prediction vector'' is also named a vote for the next-layer capsules. The input $\textbf{s}_{j}$ to a next-layer capsule is a weighted sum over all votes it receives, as in Eq~\ref{input}. The capsule vector $\textbf{v}_{j}$ of a next-layer capsule is ``squashed'' from its input such that the capsule vector's length is between zero and one, as in Eq~\ref{squash}. The dynamic routing iteratively updates the weights $c_{ij}$, the weighted sum $\textbf{s}_{j}$ and the next-layer's capsule vector $\textbf{v}_{j}$ by the following equations, \begin{equation} \label{input} \qquad\qquad\;\textbf{s}_{j}^{(t)} = \sum c_{ij}^{(t)} \hat{\textbf{u}}_{j|i}, \end{equation} \begin{equation} \label{squash} \qquad\quad\textbf{v}_{j}^{(t)}\;\; = \frac{\| \textbf{s}_{j}^{(t)}\|}{1 + \| \textbf{s}_{j}^{(t)}\|} \cdot \frac{\textbf{s}_{j}^{(t)}}{\| \textbf{s}_{j}^{(t)}\|}, \end{equation} and \begin{equation} \qquad\;c_{ij}^{(t+1)} = \frac{\exp(b_{ij} + \sum_{r=1}^t \textbf{v}_{j}^{(r)} \cdot \hat{\textbf{u}}_{j|i})} {\sum_k \exp({b_{ik}} + \sum_{r=1}^t \textbf{v}_{k}^{(r)} \cdot \hat{\textbf{u}}_{k|i})}, \end{equation} where $t$ is the index of iteration, and $b_{ik}$ is the log prior probability. \begin{figure*} \centering \includegraphics[width=0.99\linewidth]{routing_revision4.png} \caption {Illustration of the proposed cluster routing. The left of the figure shows the routing connections between capsules of the $l$th and ($l$+1)th layer; the right of the figure shows the routing detail. In the box on the right, $3 \times 3$ capsules of the $l$th layer's $i$th channel are first concatenated into a large capsule $N(\textbf{u}_{i})$, then multiplied with each weight matrix of a weight cluster $\textbf{W}_{i}^{\{1, ..., K\}}$ to produce a vote cluster $\textbf{v}_{i}^{\{1, ..., K\}}$. Each vote cluster sends its centroid $\textbf{m}_{i}$ and agreement vector $\textbf{a}_{i}$ to a next-layer capsule of the $(l+1)$th layer. The agreement vector is computed based on the variance of the $K$ votes, and is utilized to represent the vote cluster's confidence in its centroid. A capsule of the $(l+1)$th layer gets input as a weighted sum over the centroids it receives, and larger weights are assigned to the centroid with larger corresponding agreement vector. The content of the $(l+1)$th layer's capsules are computed from their inputs by layer normalization, which is not shown in the figure for the purpose of clarity. } \label{routing} \end{figure*} \subsection{The proposed cluster routing} In contrast to the dynamic routing, the proposed cluster routing utilizes vote clusters instead of individual votes. A capsule $\textbf{u}_{i} \in \mathbb{R}^D$ at the $l$th layer is multiplied with each weight matrix of a weight cluster $\textbf{W}_{i}^{\{1, \cdots, K\}}$, resulting in a vote cluster $\hat{\textbf{u}}_{i}^{\{1, \cdots, K\}}$ for a capsule at the $(l+1)$th layer. To reduce clutter in the notation, from now on we omit the index $j$ for the next-layer capsules without introducing confusion. Then, for a cluster of weights $\textbf{W}_{i}^{\{1, \cdots, K\}}$, for $k \in \{ 1, \cdots, K\}$, Eq~\ref{prediction} becomes \begin{equation} \label{NoNeighbor} \qquad\qquad\;\;\hat{\textbf{u}}_{i}^k = \textbf{W}_{i}^k \textbf{u}_{i}. \end{equation} Each weight matrix $\textbf{W}_{i}^k$ in a weight cluster may attend to a specific and distinct location of the capsule vector $\textbf{u}_{i}$. It is supposed that after the training stage, if all vector locations represent the same object (or object part), each weight matrix will produce the same vote; if one vector location does not represent the same object as other vector locations, one or more votes will be different from others. Thus the agreement among these votes indicates if the capsule vector correctly represents a certain object. Furthermore, we can replace $\textbf{u}_{i}$ in Eq~\ref{NoNeighbor} by its neighborhood to increase the receptive field of each vote. In practice, we fix with the $3 \times 3$ neighborhood throughout this work and so we replace $\textbf{u}_{i}$ by the concatenation $N(\textbf{u}_{i}) \in \mathbb{R}^{9D}$ of its neighborhood. Then the $k$-th vote in the cluster is produced as follows, \begin{equation} \label{pre_prediction} \qquad\qquad\;\;\;\;\hat{\textbf{u}}_{i}^k = \textbf{W}_{i}^k N(\textbf{u}_{i}). \end{equation} A vote cluster, $\hat{\textbf{u}}_{i}^{\{1, \cdots, K\}}$, sends its centroid ${\bf m}_{i} = \frac{1}{K}{\sum_{k=1}^K \hat{\textbf{u}}_{i}^k}$ and an agreement vector ${\bf a}_{i}$ to the next-layer capsule. The agreement vector ${\bf a}_{i}$ is computed by applying the negative log to the votes' standard deviation as follows, \begin{equation} \label{sigma} {\bf a}_{i} = -\log\left(\sqrt{\frac{1}{K}{\sum_{k=1}^K (\hat{\textbf{u}}_{i}^k - {\bf m}_{i}^k) \circ (\hat{\textbf{u}}_{i}^k - {\bf m}_{i}^k)}}\,\,\right), \end{equation} where $\circ$ is the Hadamard (element-wise) product. Each of the $C$ capsule channels in the $l$th layer produces a vote cluster for the next-layer capsule. Centroids of these vote clusters are weighted summed as follows, \begin{equation} \qquad\quad\quad\quad\;\; {\bf s} = \sum_{i=1}^C {\bf c}_{i} \circ {\bf m}_{i}, \end{equation} where ${\bf c}_i = \exp({\bf a}_{i}) \oslash \sum_{j=1}^C\exp({\bf a}_{j})$ and $\oslash$ is the Hadamard division. We apply layer normalization \citep{layerNormalization} on the weighted sum $\bf s$, resulting in a capsule vector of the next layer as in \citep{Inverted}. Notice that the matrix product in Eq~\ref{pre_prediction} can be implemented by $D$ ``conv'' filters in popular deep learning libraries such as Tensorflow \citep{Tensorflow} and PyTorch \citep{Pytorch}. This is also used in Choi et al.'s work \citep{Choi2019}, where the authors name it as convolutional transform. This decreases the difficulty to program a capsule network with the proposed routing, and also accelerates the running speed because the ``conv'' operation in Tensorflow and Pytorch is highly optimized. \begin{table*} \caption{Comparison on different types of capsule networks. } \label{RoutingComparison} \begin{tabular*}{0.9\textwidth}{ccccc} \toprule & \pbox{3cm} {Dynamic Routing \\\citep{Dynamic} }& \pbox{3cm} {{EM routing} \\ \citep{Hinton2}} & \pbox{3cm}{Inverted dot- \\product attention \\ routing \citep{Inverted}} & \pbox{3cm}{The proposed \\ cluster routing}\\ \midrule Routing & sequential iterative & sequential iterative &concurrent iterative & non-iterative \\ \midrule Poses & vector & matrix &matrix & vector\\ Activations & n/a (norm of poses) & determined by EM &n/a & n/a\\ \midrule Non-linearity & Squash function & n/a &n/a & n/a\\ Normalization & n/a & n/a & Layer Normalization & Layer Normalization\\ \midrule Loss Function & Margin loss & Spread loss &Cross Entropy & Cross Entropy\\ \bottomrule \end{tabular*} \end{table*} \subsection{Comparisons with related works} Although our weight matrix is implemented using convolutional filters, the proposed capsule networks achieve non-linearity by the proposed cluster routing instead of the ReLU activation as in CNNs. Table~\ref{RoutingComparison} lists the differences among different types of capsule networks. The proposed cluster routing may remind the readers of the group normalization \citep{wu2018group} which also utilizes the mean and standard deviation of a group. Group normalization divides the output channels of a convolutional layer into several groups, and normalizes each group with the group's mean and standard deviation, which is similar to other normalization techniques such as batch normalization~\citep{ioffe2015batch}, instance normalization~\citep{ulyanov2016instance} and layer normalization~\citep{layerNormalization}. However, in contrast to the proposed cluster routing, the group normalization does not qualify as a routing algorithm, because it has no process similar to the following routing process: i) compute the data-dependent routing weights based on the agreement between votes; ii) compute the input of next-layer capsules as a weighted sum over the votes, where the routing weight are data-dependent. \section{Experiments} We evaluate the proposed capsule networks on the following tasks: classification, disentangled representation, generalization to images captured at novel viewpoints, and reconstruction from affine-transformed channels. We also visualize the routing weights $\bm{c}_i$, verifying that they are data-dependent as they should be. \subsection{Classification} \textbf{Network architectures} The proposed capsule networks' capacity is related to two hyperparameters, the number of a capsule vector's dimensions, $D$, and the number of a weight cluster's weight matrices, $K$. We design four variants of the proposed capsule networks by varying $D$ and $K$ while fixing the number of layers as five and the number of channels at each layer as four. The four variants are named \textit{M-variant1-4} as in Table~\ref{classificationTable}. During the experiments, we find that the proposed capsule networks also work well even if we use only one capsule channel at each layer. When using a single channel, we apply $N$ weight clusters on capsules of this single channel which produces $N$ vote clusters for a next-layer capsule. We also design four variants with a single channel at each layer, named \textit{S-variant1-4} as in Table~\ref{classificationTable}. Every \textit{M-variant} and \textit{S-variant} has 5 capsule layers, with a stride of 2 at the second and fourth layers. Each variant is trained for 300 epochs using cross-entropy loss with stochastic gradient descent. The initial learning rate is 0.1 with step decay at every 100 epochs, and the decay rate is 0.1. A batch size of 64 is used. \begin{table*} \caption{Test error rate comparisons with capsule networks literature and the baseline CNN. ($\cdot$) denotes ensemble size.} \label{classificationTable} \footnotesize \begin{tabular*}{0.99\textwidth}{lcrcrcrcr} \toprule \multirow{2}{*}{\textbf{Method}} & \multicolumn{2}{c}{\textbf{smallNORB}} & \multicolumn{2}{c}{\textbf{Fashion-MNIST}} & \multicolumn{2}{c}{\textbf{SVHN}} & \multicolumn{2}{c}{\textbf{CIFAR-10}} \\ & Error ($\%$) & Param & Error ($\%$) & Param & Error ($\%$) & Param & Error ($\%$) & Param \\ \midrule \pbox{4cm}{Inverted dot-product attention routing~\scriptsize{\citep{Inverted}}} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & 14.83 & 560K\\ Attention Routing~\scriptsize{\citep{Choi2019}} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & 11.39 & 9.6M\\ STAR-CAPS~\scriptsize{\citep{Karim2019}} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & 8.77 & $\simeq$318K\\ HitNet~\citep{HitNet} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & 7.7 & $\simeq$8.2M & 5.5 & $\simeq$8.2M & 26.7 & $\simeq$8.2M \\ DCNet~\scriptsize{\citep{DCNet}} & 5.57 & 11.8M & 5.36 & 11.8M & 4.42 & 11.8M & 17.37 & 11.8M \\ MS-Caps~\scriptsize{\citep{MS-Caps}} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & 7.3 & 10.8M & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & 24.3 & 11.2M \\ Dynamic~\scriptsize{\citep{Dynamic}} & 2.7 & 8.2M & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & 4.3 & $\simeq$1.8M & 10.6 & 8.2M \scriptsize{(7)} \\ Nair \textit{et al}.~\scriptsize{\citep{Nair}} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & 10.2 & 8.2M & 8.94 & 8.2M & 32.47 & 8.2M \\ FRMS~\scriptsize{\citep{FREM}} & 2.6 & 1.2M & 6.0 & 1.2M & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & 15.6 & 1.2M \\ MaxMin~\scriptsize{\citep{MaxMin}} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & 7.93 & $\simeq$8.2M & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & 24.08 & $\simeq$8.2M \\ KernelCaps~\scriptsize{\citep{KernelCaps}} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & 8.6 & $\simeq$8.2M & 22.3 & $\simeq$8.2M \\ FREM~\scriptsize{\citep{FREM}} & 2.2 & 1.2M & 6.2 & 1.2M & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & 14.3 & 1.2M \\ EM-Routing~\scriptsize{\citep{Hinton2}} & 1.8 & 310K & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & \multicolumn{1}{c}{-} & 11.9 & $\simeq$460K \\ VB-Routing~\scriptsize{\citep{VB-Routing}} & 1.6 & 169K & 5.2 & 172K & 3.9 & 323K & 11.2 & $\simeq$323k \\ Baseline CNN & 3.76 & 3.30M& 5.21& 3.38M & 3.30 & 3.38M & 7.90 & 3.38M\\ \midrule \textit{S-variant1} (N4K4D13) & 2.80$\pm$0.20 & 150K & 5.19$\pm$0.15 & 152K & 3.89$\pm$0.10 & 156K & 13.33$\pm$0.78 & 156K\\ \textit{S-variant2} (N4K4D16)& 2.58$\pm$0.32 & 217K & 5.07$\pm$0.13& 215K & 3.77$\pm$0.11 & 219K & 11.58$\pm$0.36 & 219K\\ \textit{S-variant3} (N8K8D16)& 1.93$\pm$0.22 & 672K& 4.79$\pm$0.13 & 686K & 3.47$\pm$0.07 & 686K & 8.58$\pm$0.15 & 686K\\ \textit{S-variant4} (N8K8D32)& \textbf{1.57}$\pm$0.13 & 2.53M & 4.68$\pm$0.01& 2.51M & \textbf{3.37}$\pm$0.03 & 2.55M & \textbf{7.37}$\pm$0.06 & 2.55M \\ \textit{M-variant1} (C4K5D6) & 2.98$\pm$0.24 & 150K & 5.17$\pm$0.07 & 146K & 3.94$\pm$0.07 & 154K & 12.16$\pm$0.30 & 154K\\ \textit{M-variant2} (C4K5D8) & 3.09$\pm$0.19 & 246K & 5.02$\pm$0.04 & 240K & 3.63$\pm$0.11 & 252K & 11.11$\pm$0.09 & 252K \\ \textit{M-variant3} (C4K8D16) & 1.92$\pm$0.12 & 1.32M & 4.84$\pm$0.07 & 1.30M & 3.56$\pm$0.07 & 1.34M& 8.55$\pm$0.12 & 1.34M\\ \textit{M-variant4} (C4K8D24)& 1.95$\pm$0.12 & 2.87M& \textbf{4.64}$\pm$0.03& 2.84M & 3.48$\pm$0.14 & 2.89M & 7.89$\pm$0.11 &2.89M \\ \bottomrule \end{tabular*} \label{results table} \end{table*} \textbf{Datasets and data augmentation} For each dataset, the hyperparameters for data augmentation are tuned by a validation set containing one-fifth of the training images. The models are then retrained with the full training set before testing. During the training stage, we add brightness and contrast jitter to an image to perturb its brightness and contrast. For a pixel at position $x$, its value $f(x)$ can be perturbed by $g(x)=\alpha f(x)+\beta$, where $\alpha$ and $\beta$ control contrast and brightness, respectively. In this context, adding random brightness and contrast with a factor of 0.2 to an image means that $\alpha$ is in the range [0.8, 1.2] and $\beta$ is in the range [$-0.2\frac{1}{N_x} \sum_x f(x)$, $0.2\frac{1}{N_x}\sum_x f(x)$], where $N_x$ is the total number of pixels and $\frac{1}{N_x}\sum_x f(x)$ is the mean value of all pixels. smallNORB \citep{smallnorb} comprises 5 classes of 96 $\times$ 96 stereo images. The training and test sets both have 24,300 images. Following the steps in \citep{Hinton2}, we downsample each image to $48 \times 48$ pixels and normalize it to zero mean and unit variance. During training, we add random brightness and contrast with a factor of 0.2, pad to $56 \times 56$, randomly shift with a factor of 0.2, and randomly cropped to $32 \times 32$. At test time, we take the center 32 $\times$ 32 crop. Fashion-MNIST \citep{fashionMnist} comprises 10 classes of 28 $\times$ 28 clothing items. The training and test sets have 60,000 and 10,000 images, respectively. During training, we add random brightness and contrast with a factor of 0.2, pad to 36 $\times$ 36, take random 32 $\times$ 32 crop, and apply random horizontal flips with probability 0.5. At test time, we pad the images to 32 $\times$ 32. SVHN \citep{svhn} comprises 10 digit classes of 32 $\times$ 32 real-world house numbers. We trained on the core training set only, consisting of 73,257 images, and tested on the 26,032 images of the test set. During training, we add random brightness and contrast with a factor of 0.2, pad to 40 $\times$ 40, and take random 32 $\times$ 32 crop. CIFAR-10 \citep{cifar10} comprises 10 classes of 32 $\times$ 32 real-world images. The training and test sets have 50,000 and 10,000 images, respectively. During training, we add random brightness and contrast with a factor of 0.2, pad to 40 $\times$ 40, take random 32 $\times$ 32 crop, and apply random horizontal flips with probability 0.5. ImageNet \citep{imagenet_cvpr09} comprises 1000 classes of real-world images. The training and validation sets have 1,281,167 and 100,000 images, respectively. During training, we resize each image to $256 \times 256$ pixels, take random 224 $\times$ 224 crop and apply random horizontal flips with probability 0.5. During validation, we take the center 224 $\times$ 224 crop. Following the previous Ahmed et al.'s work \citep{Karim2019}, the test set is not used. \textbf{Accuracy comparisons with the state-of-the-arts} The comparisons between the state-of-the-art capsule networks and the proposed \textit{M-variants} and \textit{S-variants} are listed in Table~\ref{classificationTable}. On the Fashion-MNIST and SVHN datasets, the proposed capsule networks achieve better accuracy than other types of capsule networks with fewer parameters: i) on Fashion-MNIST, \textit{M-variant1} achieves an error rate of 5.17\% with 146K parameters, and \textit{S-variant1} achieves an error rate of 5.19\% with 152K parameters; ii) on SVHN, \textit{M-variant2} achieves an error rate of 3.63\% with 252K parameters, and \textit{S-variant2} achieves an error rate of 3.77\% with 219K parameters. For the smallNORB dataset, \textit{S-variant4} achieves the best error rate of 1.57\% with a moderate size 2.53M. For the CIFAR-10 dataset, \textit{S-variant4} achieves the best error rate of 7.37\% with a moderate size 2.55M; \textit{M-variant4} achieves an error rate of 7.89\% with a moderate size 2.89M. \textbf{Classification accuracy on ImageNet} For the ImageNet dataset, we design a capsule network variant based on the \textit{M-variant4}. Similar to the STAR-CAPS variant designed for ImageNet in \citep{Karim2019}, this variant starts with a 7$\times$7 convolutional layer that outputs 64 channels, followed by a single bottleneck residual block with 256 output channels. Then the \textit{M-variant4} is added after the residual block. The Top-1 validation accuracy on ImageNet is 63.87\% and the Top-5 accuracy is 88.98\%, which outperforms the accuracy of 60.07\% and 85.66\% produced by the STAR-CAPS network \citep{Karim2019}. \textbf{Accuracy comparisons with the baseline CNN} We compare the variants \textit{M-variant4} and \textit{S-variant4} with a baseline CNN. The baseline CNN is designed as the following: 5 ReLU convolutional layers, layer normalization after the ReLU activation, 256 filters at each layer and 3.38M parameters in total. As shown in Table~\ref{results table}, the baseline CNN has more parameters, and achieves an higher error rate compared to either of the \textit{M-variant4} and \textit{S-variant4} networks. \textbf{Experiments on hyperparameters} For the \textit{M-variants}, we analyze the impact of the hyperparameters $K$ and $D$, while fixing the number of channels at each layer as four. As shown in Table~\ref{Ablation}, there is a clear trend that both larger $D$ and larger $K$ lead to higher accuracy on the CIFAR-10 dataset. \textbf{Ablation study} In the ablation experiment, we train the models from scratch with a constant routing weight $c_i=\frac{1}{C}$, which means the weight becomes data-independent. As shown in Table ~\ref{AblationNoA}, after removing the data-dependence, the proposed capsule networks' performance drop significantly, which demonstrates the data-dependence is crucial. \begin{table} \caption{Analysis of the hyperparameters $K$ and $D$ on the \textit{M-variants} using the CIFAR-10 dataset. Test error rate and the number of parameters are listed for each setting.} \label{Ablation} \begin{tabular}{ccccc} \toprule & D=6 & D=8 & D=16 & D=24\\ \midrule \multirow{2}{*}{K=5} & 12.16\% & 11.11\% & 9.06\% & 8.06\% \\ & 154K & 252K & 872K & 1.86M \\ \midrule \multirow{2}{*}{K=8} & 11.29\% & 10.24\% & 8.55\% & 7.89\% \\ & 226K & 375K & 1.34M & 2.89M \\ \bottomrule \end{tabular} \end{table} \begin{table} \caption{Ablation study on the proposed capsule network \textit{M-variants}, where each variant's name is abbreviated, e.g., \textit{M-v1}. We study the network's classification accuracy when the routing weights $c_i$ are data-dependent or data-independent. The CIFAR-10 dataset is used.} \label{AblationNoA} \begin{tabular}{ccccc} \toprule Data-dependent routing & \textit{M-v1} & \textit{M-v2} & \textit{M-v3} & \textit{M-v4}\\ \midrule Yes & 12.16 & 11.11 & 8.55 & 7.89\\% No & 35.48 & 33.97 & 33.48 & 32.96\\% \bottomrule \end{tabular} \end{table} \subsection{Generalization to novel viewpoints} We validate the proposed capsule networks' generalization ability to images captured at novel viewpoints using the smallNORB dataset. Following the experiments in \citep{Hinton2}, we train the proposed capsule networks on one-third of the training data containing azimuths of (300, 320, 340, 0, 20, 40) and test on the test data containing azimuths from 60 to 280; for elevation viewpoints, we train on the 3 smaller and test on the 6 larger elevations. The validation set consists of images captured at the same viewpoints as in training. For the networks to be compared, we measure their classification accuracy on images captured at novel viewpoints (test set) after matching their classification accuracy on familiar viewpoints (validation set). The following networks are compared in Table~\ref{viewpoints}: the baseline CNN model as in~\citep{Hinton2}, EM-routing capsule networks~\citep{Hinton2}, STAR-CAPS networks~\citep{Karim2019}, and capsule networks with the proposed cluster routing. The proposed capsule networks achieve the best accuracy of 86.9\% on novel azimuth viewpoints. On novel elevation viewpoints, the proposed capsule networks achieve an accuracy of 86.6\%, which is slightly lower than the EM-routing capsule networks while outperforming the baseline CNN. \begin{table*}[t] \footnotesize \caption{A comparison of the smallNORB test error rate on images captured at novel viewpoints when all models are matched on error rate for familiar viewpoints. We use the same baseline CNN as in Hinton et al.'s work \citep{Hinton2}.} \label{viewpoints} \begin{tabular}{lcccc|cccc} \toprule & \multicolumn4{c}{\textbf{Azimuth} \ (\%)} & \multicolumn{4}{c}{\textbf{Elevation} \ (\%)} \\ Model & CNN & EM & STAR-CAPS & Ours & CNN & EM & STAR-CAPS & Ours \\ $\#$Params & 4.2M & 316K & 318K & 246K & 4.2M & 316K & - & 246K \\ \midrule Familiar & 96.3 & 96.3 & 96.3 & 96.3 & 95.7 & 95.7 & - & 95.7 \\ Novel & 80.0 & 86.5 & 86.3 & 86.9 & 82.2 & 87.7 & - & 86.6 \\ \bottomrule \end{tabular} \end{table*} \subsection{Disentangled representation} Capsule networks with dynamic routing \citep{Dynamic} and capsule networks with attention routing \citep{Choi2019} produce capsules with disentangled representation --- each dimension of a last-layer capsule represents a digit's property, such as thickness, skew, and width. The proposed capsule networks also produce capsules with disentangled representation. Based on \textit{M-variant2}, we change the number of last-layer capsules to 10, such that each last-layer capsule represents a class of the MNIST dataset. For an input image, we mask out all capsule vectors of the last layer except the one representing the input image's class. This capsule vector is input to a decoder that reconstructs the input image. The decoder has the same architecture as in \citep{Dynamic}, which consists of 3 fully connected layers with 512, 1024, and 784 (784 is the total number of pixels of an MNIST image) neurons, respectively. As shown in Figure~\ref{disentangled}, the proposed capsule networks produce capsules with disentangled representation. \begin{figure*} \centering \includegraphics[width=\textwidth]{disentangled.png} \rotatebox{0}{\qquad\quad\quad(a) \parbox{4.7cm}{Attention routing} \quad(b) \parbox{5cm}{Dynamic routing } (c) \parbox{5cm}{Proposed cluster routing}} \caption{Dimension perturbations on capsules produced by capsule networks with attention routing \citep{Choi2019} (left), dynamic routing \citep{Dynamic} (middle), and the proposed clustering routing (right), respectively. Each row shows the reconstructed images when one dimension of the capsule representing the input digit is tweaked by intervals of 0.05 in the range [-0.25, 0.25]. All three capsule networks produce capsules with disentangled representation -- each dimension of a certain capsule represents a digit's property, such as thickness, skew, and width.} \label{disentangled} \end{figure*} \subsection{Reconstruction from affine-transformed channels} We design a 3-layer capsule network for this task, where the second layer has a stride of 2. The output channels of the last layer are input into a reconstruction network. The reconstruction network consists of one upsample layer and two convolutional layers with ReLU and Sigmoid activation. The Sigmoid convolutional layer outputs the reconstructed image in the range [0, 1]. We transform the last layer's output channels by a transformation $\textit{T}$ and observe the image reconstructed from the transformed channels. Ideally, the reconstructed image shall look like the input image transformed by the transformation $\textit{T}$. The layer normalization is not used due to the simplicity of the MNIST dataset. The network is trained to perform both classification and reconstruction tasks. The baseline CNN for this task has a similar architecture to the 3-layer capsule network. Table~\ref{NumberOfParameters} lists the architecture of the two networks in detail. A capsule network with dynamic routing \citep{Dynamic} (8.2M parameters) is also compared. For the dynamic routing network, we: i) transform the output channels of the second last capsule layer because each channel of the last layer contains only one capsule; ii) reconstruct the input image using three fully connected layers as in \citep{Dynamic}. We show randomly picked reconstructed images in Figure~\ref{CapsulecRecons}. A similar pattern for the baseline CNN was observed for about every 4 out of 5 test images, and similar patterns for the dynamic routing and cluster routing capsule networks were observed for every test image. As shown in Figure~\ref{CapsulecRecons}, the dynamic routing capsule network seems to be always trying to reconstruct the original image. It produces low-quality reconstructions for large rotations (rotation with a degree from $90^{\circ}$ to $270^{\circ}$), translations, and flips. The baseline CNN produces fine reconstructions for vertical flips, translations, scaling with a factor larger than 1, and gentle rotations $0^{\circ}$, $45^{\circ}$, $315^{\circ}$ (-$45^{\circ}$), but fails on large rotations and horizontal flip. The proposed capsule network produces fine reconstructions for almost all transformations except scaling with a factor less than 1. In short, the proposed capsule networks succeed in more transformation cases than the baseline CNN and the dynamic routing capsule network. The quantitative evaluation of reconstructed images is shown in Table~\ref{ReconstructionEvaluate}, using the mean square error (MSE). Capsule networks with the proposed cluster routing result in the lowest average MSE over the evaluated transformations. \begin{figure*} \centering \rotatebox{90}{\quad Proposed \quad\quad\parbox{1.5cm}{Baseline \\ CNN} \quad\quad\parbox{1.5cm}{Dynamic \\ routing}} \includegraphics[width=0.8\textwidth]{recons_all_methods.png} \caption{Reconstructed images from capsule channels output by the dynamic routing capsule network \citep{Dynamic} and the proposed capsule network, and reconstructed images from convolutional channels output by the baseline CNN. The first column shows groundtruth. The other columns show reconstructions from capsule channels (or convolutional channels) applied with the following affine transformations: 2-9 col: rotation with 0, 45, 90, ..., 315 degrees; 10-11 col: horizontal and vertical flip; 12-14 col: shifting 1, 2, 4 pixels; 15-19 col: scaling by a factor of 0.5, 0.75, 1.2, 1.5, 2.} \label{CapsulecRecons} \end{figure*} \begin{table*}[width=\textwidth] \caption{Evaluation of reconstructed images using the mean square error. The lower number denotes better performance. We evaluate various kinds of affine transformations, including rotations (R-0$^{\circ}$, R-45$^{\circ}$, $\dots$, R-315$^{\circ}$), horizontal and vertical flip (H-flip and V-flip), shifting 1, 2, 4 pixels (Shift-1, Shift-2, and Shift-4), and scaling by a factor of 0.5, 0.75, 1.2, 1.5, 2 (Scale-0.5, Scale-0.75, Scale-1.2, Scale-1.5, and Scale-2).} \label{ReconstructionEvaluate} \begin{tabular}{cccccccccccccccccccc} \toprule \multirow{2}{*}{Method} & R-0$^{\circ}$ & R-45$^{\circ}$ & R-90$^{\circ}$ & R-135$^{\circ}$ & R-180$^{\circ}$ & R-225$^{\circ}$ & R-270$^{\circ}$ & R-315$^{\circ}$ & H-flip\\ & V-flip & Shift-1 & Shift-2 & Shift-4 & Scale-0.5 & Scale-0.75 & Scale-1.2 & Scale-1.5 & Scale-2 & Average \\ \midrule \multirow{2}{*}{Dynamic routing} & 0.0176 & 0.0824 & 0.1186 & 0.1025 & 0.1012 & 0.0996 & 0.1197 & 0.0865 & 0.0830 \\& 0.0931 & 0.0488 & 0.0742 & 0.0912 & 0.0896 & 0.0886 & 0.0729 & 0.1712 & 0.2714 & 0.1007\\% \midrule \multirow{2}{*}{Baseline CNN} & 0.0025 & 0.0060 & 0.0234 & 0.0310 & 0.0431 & 0.0286 & 0.0223 & 0.0070 & 0.0238 \\& 0.0176 & 0.0632 & 0.1297 & 0.1337 & 0.0238 & 0.0645 & 0.0308 & 0.1096 & 0.0264 & 0.0437\\% \midrule \multirow{2}{*}{Proposed} & 0.0033 & 0.0047 & 0.0078 & 0.0077 & 0.0092 & 0.0089 & 0.0090 & 0.0053 & 0.0105 \\ & 0.0051 & 0.0616 & 0.1279& 0.1332 & 0.0221 & 0.0633 & 0.0329 & 0.1056 & 0.0275 & 0.0359\\ \bottomrule \end{tabular} \end{table*} \begin{table} \caption{Parameters of a proposed capsule network and a baseline CNN used for reconstructing images from affine-transformed channels. Each filter of the baseline CNN is of size $3 \times 3$. } \label{NumberOfParameters} \begin{tabular}{lllcccc} \toprule & Baseline CNN & Capsule network\\ & & (C4K4D32) \\ \midrule First layer & 960 (96 filters) & 5,120 \\ Second layer & 83,040 (96 filters) & 18,944 \\ Third layer & 13,840 (16 filters) & 18,944 \\ Linear classifier & 31,370 & 31,370\\ First recons layer & 4,640 (32 filters) & 4,640\\ Second recons layer & 289 (1 filter) & 289 \\ \midrule Total & 134,139 & 79,307\\ \bottomrule \end{tabular} \end{table} \subsection{Analysis of routing weights} \label{visualization} A data-dependent routing means that the routing weights $\bf{c}_i$ are dependent on the input image's visual content, unlike the weights matrices that are the same for any input. However, the reader may come up with a degenerate case where the proposed cluster routing may produce data-independent routing weights: suppose the weight matrices of a weight cluster are identical or very close to each other, the votes produced by this weight cluster will be identical or very close; then the routing weight for this vote cluster's centroid will always be almost 1, regardless of the input image's visual content. To examine if this degeneration happens, we visualize the routing weights. We decide the stride and padding at each capsule layer such that each channel of the last layer contains only one capsule, then visualize routing weights for the last-layer capsules. Figure~\ref{RoutingCoefficients} shows the routing weights for the four vote clusters that a last-layer capsule receives. It can be seen from Figure~\ref{RoutingCoefficients} that the proposed capsule networks produce routing weights of the same distribution for images from the same class, but routing weights of different distributions for images from different classes. This demonstrates that the degenerate case does not happen --- the proposed capsule networks use data-dependent routing weights. \begin{figure*} \includegraphics[width=\textwidth]{dim8capsule1_concate_and_dim2capsule2_concate.png} \caption{Visualization of routing weights used for last-layer capsules. Four bars show routing weights for the four vote clusters that a last-layer capsule receives. The left figure shows routing weights for the 8th dimension of the first channel's capsule; the right figure shows routing weights for the 2nd dimension of the second channel's capsule. Each channel of the last layer is designed to contain only a single capsule. } \label{RoutingCoefficients} \end{figure*} \section{Conclusion} We propose a non-iterative cluster routing algorithm for capsule networks. The proposed cluster routing adopts vote clusters instead of individual votes, and the variance of a vote cluster is used to compute its confidence in the information it encodes. A capsule vector is computed from the vote clusters it receives, where the vote cluster with larger confidence contributes more than other vote clusters. The experiments show that capsule networks with the proposed cluster routing achieve competitive performance on tasks including classification, disentangled representation, generalization to images obtained from novel viewpoints, and reconstructing images from affine-transformed channels. In the future, it will be interesting to explore whether some of the vote clusters can be pruned without affecting the performance. \bibliographystyle{cas-model2-names}
\section{Related Work} \label{sec:background} \begin{figure} \centering \includegraphics[width=0.44\textwidth]{pic/pima.png} \vspace*{-.3cm} \caption{Terminology used to describe rules. Using rule set generated on the diabetes data set as an example.\looseness=-1} \label{fig:pima} \vspace*{-.5cm} \end{figure} \begin{figure*} \centering \includegraphics[width=.9\textwidth]{pic/visual_factor.png} \vspace*{-.2cm} \caption{Part (1) includes four visual factors we identified that play a role in the process of human understanding a set of rules: a. Feature Alignment, b. Feature Ordering, and c. Rule Ordering which are strategies relevant to the \textit{Spatial Arrangement} of predicates; d. \textit{Predicate Encoding} includes the strategies of how to express the predicates in rules. Part (2) includes example combinations of different visual factors. \looseness=-1} \vspace*{-.5cm} \label{fig:visual_factor} \end{figure*} Rules are structured as logical statements such as those presented in Figure~\ref{fig:pima}. Rule intelligibility can be expected to degrade as rule complexity increases. Recently researchers identified a number of factors that influence complexity with different names~\cite{lage2019evaluation,lakkaraju2016interpretable, wang2017bayesian}. Some of the most common include: the total number of attributes used in the predicates contained in the rule list (dimensionality), the total number of rules (cardinality), the amount of overlap between rule-related subgroups (redundancy), the maximum number of predicates that a rule can include (maximum rule length), the number of distinct values each predicate can have (feature cardinality). While a complete investigation of how these factors impact rule understanding does not exist yet, some few empirical studies on rule structure exist. For example, empirical studies have been done to explore how human-interpretability and decision-making process can be influenced by different rule structures ~\cite{lakkaraju2016interpretable, subramanian1992comparison}, different levels of complexity~\cite{lage2019evaluation}, or both~\cite{huysmans2011empirical}. However, our focus is how visual representation may impact understanding of classification rules while keeping this information a fixed factor. \section{Visual Factors for Representation of Rule Sets} \label{section:factors} We now more systematically explore visual factors that can be used to design alternative visualizations of rule sets. In doing that, it is important to clarify the scope of our work in suggesting these factors. We focus exclusively on flat representations because not all rule algorithms produce hierarchical structures. Conversely, hierarchical rules can always be transformed into a list of rules. Visual factors for rules can be grouped into two main classes: \textbf{Spatial Arrangement} (how to position the rule components in the visual space, including the alignment of features and ordering of rule components) and \textbf{Predicate Encoding} (how to create visual representations of the values and conditions expressed in the rule's predicates). \looseness=-1 \textbf{Feature Alignment.} In a standard textual representation the features referenced in each predicate are \textit{unaligned}, that is, they have a different location. As shown in Figure~\ref{fig:visual_factor}-1:baseline, predicates using the same features (x, a, b, e) may be located in different horizontal positions. An alternative arrangement is to have the predicates \textit{aligned} into a tabular format as shown in Figure~\ref{fig:visual_factor}-1a. The unaligned arrangement is more compact but the aligned arrangement affords much easier comparison across the rules. \looseness=-1 \textbf{Feature Ordering.} Features and their corresponding predicates can also be ordered according to different criteria (e.g., alphabetically) (see Figure~\ref{fig:visual_factor}-1b). \looseness=-1 \textbf{Rule Ordering.} Rules can also be ordered according to relevant criteria. In the mock-up we show in Figure~\ref{fig:visual_factor}-1c, the rules can be ordered based on the consequent/outcome part of the rule. \textbf{Predicate/Outcome Encoding.} The predicates of a rule are logical statements over a set of features, each with an associated domain of values. They can be connected by logic $AND$ or $OR$ connectives. The outcome of a classification rule is also a predicate, typically with a single value of categorical or ordinal type. When confronted with the problem of visualizing predicates we have identified three main broad strategies as shown in Figure~\ref{fig:visual_factor}-1d: (1) \textit{Symbolic encoding} uses a mix of logical and textual symbols (this is the most common solution found in papers and software packages); (2) \textit{Graphical encoding} uses graphical representations rather than symbols. We propose a design that uses both position and color encoding to represent the values of the predicates; (3) \textit{Hybrid encoding} uses a mix of the two strategies above by integrating symbols and graphical encoding in one solution. We created a website\footnote{\url{https://rule-logic-vis.herokuapp.com/}} to present the rule visualization of all the visual factors we identified using rules at different complexity levels (note that the solutions presented in Figure~\ref{fig:visual_factor} are mock-ups, whereas those presented in the website correspond to those used in the study). \looseness=-1 In light of this characterization, the issue we address in this study, regarding how to represent the predicates, is how to balance the benefits of symbolic encoding and those of graphical encoding. In theory, symbolic encoding should be slower and more effortful than graphical encoding, especially as the number of rules increases. However, the unfamiliar nature of graphical encoding may slow down viewers due to increased uncertainty, less precision and lack of familiarity with the medium. To start addressing this question, we present an empirical study in Section~\ref{section:experiment} to gather evidence about how these strategies compare when used to perform complex tasks with lists of rules. \looseness=-1 \section{Experiment} \label{section:experiment} To better understand the impact of the identified visual factors, we designed a controlled experiment that aims at teasing out their effect on rule understanding. In this section we describe the design of the experiment and report the results. \subsection{Experiment Design} \subsubsection{Stimuli: Visual Representations and Rule Sets.} As described in Section~\ref{section:factors}, the ordering strategies can be applied to any given visual representation. Different ordering can be utilized to prioritize information that humans need for different purposes. So we do not test them in this study. Instead, we fixed the order of the rules and decided to sort by outcome. Similarly, we fixed the order of the features and opted to sort by frequency of features in the rule set; with frequency decreasing from left to right. The study we present is organized as a controlled experiment in which we compare conditions of the alignment strategy (aligned, unaligned) and the predicate encoding strategy (symbolic, graphical, hybrid). The main goal of the study is to understand the impact our interventions have with respect to the traditional representation of rules based on text. For this reason our study uses a standard textual list of rules as a \textit{control condition} and organizes the study around improvements over it. We include the following four conditions: \begin{itemize}[noitemsep,topsep=1pt] \item[(\texttt{SU})] \textbf{S}ymbolic encoding for predicates, \textbf{U}naligned features (baseline, control condition); \item[(\texttt{SA})] \textbf{S}ymbolic encoding for predicates, \textbf{A}ligned features; \item[(\texttt{GA})] \textbf{G}raphical encoding for predicates, \textbf{A}ligned features; \item[(\texttt{HA})] \textbf{H}ybrid encoding (graphical and symbolic) for predicates, \textbf{A}ligned features. \end{itemize} Having to choose a specific data type to cover, we opted for ordinal data (e.g., Low, Medium and High as feature values) since it covers useful properties of both categorical and quantitative data. \looseness=-1 For the purpose of this study we use two main data sets: a credit risk data set~\cite{fico} in the training phase to help the participants to familiarize with the tasks and concepts of the study; and a diabetes data set~\cite{smith1988using} for the actual study.\looseness=-1 To generate the rules, we used the algorithm proposed by Wang \textit{et al.}~\cite{wang2017bayesian}. For training, we generated a set of $6$ rules over $5$ features. As for testing, we created a rule set with an higher level of complexity ($18$ rules over $8$ features) in order to differentiate the effects of the tested visual factors. Each rule in the test set has a maximum of $3$ predicates in the antecedent. In a recent work~\cite{lakkaraju2016interpretable}, $9$ rules are considered for an evaluation of rule understanding. We also found in our pilot study that the size of our test rule set is neither too simple nor too complex for humans to understand. \looseness=-1 In designing the rules we also had to mitigate the effect of \textit{prior knowledge}. In one of our pilot studies, we tested the rules generated from a diabetes data set and found that the participants could predict the answer by using intuition and with little engagement with the visualization. To mitigate this effect, we changed the feature names (originally \textit{Age}, \textit{BMI}, etc.) into names of minerals (\textit{Magnesium}, \textit{Calcium}, etc.). The subjects were instructed to analyze the predictions of a model that used the mineral features to predict the level of risk of contracting a hypothetical disease. \looseness=-1 \subsubsection{Tasks} To simulate the process of humans understanding rule logic, we designed two sets of test tasks: one set for \textbf{Prediction Estimation (T1)} and one for \textbf{Prediction Characterization (T2)}. For T1 we asked the participants to answer questions like: \textit{``What is the most common prediction for rules containing conditions that match a person with a High value of \textit{Calcium}?''}. For T2 we asked questions like: \textit{``Considering only the rules that predict high risk, what is the most common value for Magnesium?''}. For both types of questions increased complexity progressively. With variations in complexity we created a total of $10$ test questions: $5$ for Task 1 and $5$ for Task 2. More details can be found in the Github page \footnote{\url{https://github.com/junyuanjun/rule_empirical_study}}. \looseness=-1 \subsubsection{Procedure.} We presented the 4 conditions outlined above to 4 separate groups of participants using a between-subjects design. The study was organized according to the following steps which were common to every group: (1) We started with a consent form and a collection of \textit{demographic information}; (2) We asked the participants to watch a 4-minute \textit{tutorial} video of basic ML concepts and how to read the rule visualizations, which is followed by a verification quiz. This was used as a pre-requisite to move on; (3) We described the tasks through a \textit{task introduction} page showing example tasks and asked them to perform a few simplified tasks resembling those used in the test; (4) In the \textit{test} stage, we first showed the visualization used in the test and described the test process. Then, for each task we asked the participants to answer 6 questions for each task type. Each question was posed as a choice in a multiple-choice test where only one out of three answers was right. For each question the participant also had to specify the confidence level associated to the answer using 5-point likert scale with $1$ being 'not confident at all' and $5$ being 'extremely confident'. The first question of each task type was used only for habituation to the task and was eliminated from the analysis. In the end, the participants had to report their overall subjective sense of effort in performing the tasks. \begin{table*} \centering \begin{tabular}{l| l l l | l l l| l l l | l l l } \hline \multirow{2}{*}{\textbf{Task}} & \multicolumn{3}{c|}{\textbf{Accuracy (0.00-1.00)}} & \multicolumn{3}{c|}{\textbf{Response Time (s)}} & \multicolumn{3}{c|}{\textbf{Confidence (1-5)}} & \multicolumn{3}{c}{\textbf{Subjective Effort (1-5)}}\\ & \texttt{SA}-\texttt{SU} & \texttt{GA}-\texttt{SU} & \texttt{HA}-\texttt{SU} & \texttt{SA}-\texttt{SU} & \texttt{GA}-\texttt{SU} & \texttt{HA}-\texttt{SU} & \texttt{SA}-\texttt{SU} & \texttt{GA-SU} & \texttt{HA-SU} & \texttt{SA-SU} & \texttt{GA-SU} & \texttt{HA-SU}\\ \hline \textbf{T1} & 0.03 & 0.02 & 0.02 & -18.40 & -19.35 & -18.63 & 0.25 & 0.21 & 0.18 & \multirow{2}{*}{-0.27} & \multirow{2}{*}{-0.03} & \multirow{2}{*}{-0.10}\\ \textbf{T2} & 0.00 & -0.02 & 0.01 & -7.44 & -11.49 & -9.90 & 0.12 & 0.05 & -0.08 \\ \hline \end{tabular} \vspace*{-.3cm} \caption{Absolute effect size for the comparison with the control condition (\texttt{SU}).}\vspace*{-.5cm} \label{table:cohens_d} \end{table*} \begin{figure} \centering \includegraphics[width=.45\textwidth]{pic/task1.png} \vspace*{-.2cm} \caption{Performance of Task 1. (A) shows the mean values and $95\%$ CI of accuracy, time, and confidence. (B) shows the absolute effect size as well as the confidence interval of the comparison between aligned conditions (\texttt{SA}, \texttt{GA}, \texttt{HA}) with the baseline (\texttt{SU}).} \vspace*{-.5cm} \label{fig:task1} \end{figure} \subsubsection{Performance Metrics} To evaluate the performance of rule reading tasks, we used the following four metrics: \begin{itemize}[noitemsep,topsep=1pt] \item \textit{Accuracy:} The number of correct answers over the total number of questions. \item \textit{Response Time (RT):} The time required to answer a question. \item \textit{Confidence:} The subjective confidence scores for each question from 1 to 5 (1: ``not confident at all'', 5: ``extremely confident''). \item \textit{Subjective Effort:} The subjective sense of effort scores collected in the end of the study (value ranging between 1-5, 1 being high effort and 5 being low effort). \end{itemize} \subsubsection{Participants.} We recruited our participants through the crowdsourcing platform Prolific. Our population sample consisted of 338 people from either the US or UK, with an approval rate of at least $99\%$. We paid each subject a total of \$4 USD for a test duration of about $25$min. \subsubsection{Hypotheses.} We developed the following hypotheses for the study. All the hypotheses, as well as the experimental design and the pre-planned analysis, can be found in our pre-registered study \footnote{\url{https://osf.io/79ujk}}. \begin{itemize}[noitemsep,topsep=.5pt] \item[\textbf{H1}] Response Time (RT): We expected alignment to have the strongest impact on speed. Therefore we expected unaligned representation (\texttt{SU}) to take substantially more time than feature-aligned representations (\texttt{SA}, \texttt{GA}, \texttt{HA}). As for the comparison between encodings we expected \texttt{HA} to have an advantage over \texttt{GA} and \texttt{HA} because it enables both symbolic and graphical reading of the conditions. We expected these differences to be less pronounced than the difference afforded by alignment. \looseness=-1 \item[\textbf{H2}] Accuracy: Our tasks are designed to focus more on efficiency than correctness. We did not expect any substantial differences in accuracy between the conditions. \item[\textbf{H3}] Confidence: We expected the control condition (\texttt{SU}) to have higher confidence scores due to the level of familiarity our subjects may have with this solution compared to the more unfamiliar ones we used in the other conditions. \item[\textbf{H4}] Subjective Effort: We expected the participants to assign to the baseline (\texttt{SU}) way higher effort scores than to the other conditions. We did not have specific expectations for \texttt{SA}, \texttt{GA} and \texttt{HA}. \end{itemize} \subsection{Results} The dropout rate for those who did not finish the study was $10\%$. In the complete replies we collected, we excluded the subjects who performed the tasks too fast ($<5$s per question) or too slow ($>100s$ per question for T1 or $>120s$ per question for T2) as stated in the pre-registration. Then we conducted the analysis based on these samples (n=73, 78, 75, 77 for \texttt{SU}, \texttt{SA}, \texttt{GA}, \texttt{HA}). All results are presented using absolute effect size and bootstrap $95\%$ confidence interval as suggested in~\cite{dragicevic2016fair}. We on purpose avoid the calculation of p-values to avoid dichotomous thinking~\cite{besanccon2019continued}. We use in their place the language of estimation driven by effect sizes and confidence intervals as suggested by Cumming in~\cite{cumming2013understanding}. For the analysis of the results, we use \texttt{SU} as a baseline, that is, the results of the other conditions will be presented in relation to the control case. An overview of the results is shown in Table~\ref{table:cohens_d}. \looseness=-1 \subsubsection{Task 1: Prediction Estimation} We provide the performance of Task 1 across visual conditions in Figure ~\ref{fig:task1}. Accuracy across all conditions is very similar and very close to $100\%$. And all the aligned conditions have extremely similar accuracy values with highly negligible differences. In terms of the efficiency, the response time with the control condition is substantially higher. The average response time for performing Task 1 with (\texttt{SU}) is over $40s$, while the response time with the other aligned conditions (\texttt{SA}, \texttt{GA}, \texttt{HA}) is less than $30s$. For this task, we observe that alignment has a stronger influence than encoding for that all the feature-aligned conditions result in similar amount of time reduction. As shown in Figure~\ref{fig:task1}B:Response Time, the participants with feature-aligned conditions (\texttt{SA}, \texttt{GA}, \texttt{HA}) spent around $19s$ less for Task 1 on average than the participants reading rules without feature alignment (\texttt{SU}). This is a large efficiency improvement considering that users with the baseline condition spend around $40s$ on average. When comparing the encoding strategies over the alignment (\texttt{SA}, \texttt{GA}, \texttt{HA}) we can see that the differences are way less pronounced. Out of the 3 conditions the Graphical encoding (\texttt{GA}) seems to have a slight advantage of $0.95s$ faster than Symbolic encoding (\texttt{SA}) and $0.72s$ faster than Hybrid encoding (\texttt{HA}). \looseness=-1 Alignment also leads to an improvement in subjective confidence. Symbolic encoding brings the most improvement around $6.25\%$ (0.25/4), while graphical encoding takes the second place around $5\%$ (0.2/4), hybrid encoding around $4.5\%$ (0.18/4). \looseness=-1 \subsubsection{Task 2: Prediction Characterization} In Figure ~\ref{fig:task2}, we provide the performance of Task 2 based on three measurements. Similarly, participants with all conditions reached a relatively high accuracy. The influence of visual encoding and feature alignment on accuracy is more pronounced in comparison to Task 2. The three feature aligned conditions have a similar level of accuracy as the control condition. \begin{figure} \centering \includegraphics[width=.45\textwidth]{pic/task2.png} \vspace*{-.3cm} \caption{Task 2 Performance. (A) shows the mean values and $95\%$ CI for each performance metric. (B) includes the absolute effect size and $95\%$ CI compared with \texttt{SU}.} \vspace*{-.45cm} \label{fig:task2} \end{figure} We also observe the efficiency improvement results from feature alignment and predicate encoding. It is clear that participants who perform Task 2 with feature-aligned rules require at least $5s$ less than with the baseline representation. Comparing the encoding strategies along with alignment, rules contain graphical encoding (\texttt{HA} and \texttt{GA}) lead to larger improvement in response time. More specifically, compared with the average response time from baseline (around $40s$), the aligned feature along with graphical encoding reduces the most, around $11.49s$; hybrid encoding (\texttt{HA}) results in $9.90s$ less; symbolic encoding (\texttt{SA}) leads to around $7.44s$ less. \looseness=-1 As for confidence, the difference is slight. Symbolic encoding (\texttt{SA}) leads to the highest subjective confidence on average with around $3\%$ (0.12/4) higher than the confidence from the baseline. Then graphical encoding (\texttt{GA}) and hybrid encoding (\texttt{HA}) strategies lead to around $1.25\%$ (0.05/4) more and $2\%$ (0.08/4) less confidence score compared with the baseline. \looseness=-1 In the end, subjects with the control condition (\texttt{SU)} report the highest subjective effort and subjects with other conditions report slightly less subjective effort. According to the overall subjective effort score, \texttt{SA} leads the most improvement around $6.68\%$ (0.27/4), then \texttt{HA} $2.5\%$ (0.1/4), \texttt{GA} $0.75\%$ (0.03/4). \section{Discussion} Our results partially confirm some of our hypotheses. Alignment clearly has a strong impact on performance. All designs that use feature alignment have substantial improvements in response time, with no substantial effects on accuracy, confidence or workload. The effect on response time is very large: around $20s$ improvement with aligned designs on T1 and about $10s$ improvement for T2. Such a large difference on a single inference task can have a substantial effect when considering how many of these single inferences will be carried out to make sense of a set of rules in a real-world setting. \looseness=-1 Contrary to our expectations, the unaligned design did not lead to higher confidence. This may be due to the fact that performing the assigned tasks with the control condition requires more time than with the other ones. If an effect of familiarity exists it is probably cancelled out by workload (time). More research is needed to understand how workload and familiarity interact. The effect of predicate encoding is way less pronounced than the effect of alignment. Across the two tasks graphical encoding with alignment (\texttt{GA}) seems to have a slight advantage in terms of response time over the other aligned designs (\texttt{SA}, \texttt{HA}). Such an advantage is more pronounced in Task 2 where \texttt{GA} has about a mean $4s$ improvement over \texttt{SA} and about $1.5s$ over \texttt{HA}. Regarding why such an improvement exist with \texttt{GA}, we do not have a definite explanation. Our original intuition was that the hybrid design (\texttt{HA}) would integrate the benefits of symbolic and graphical representations, but our results do not confirm this intuition. Including a symbolic representation in a predicate seems to slow down performance, even if slightly, maybe due to more time spent reading the symbols. \looseness=-1 Extrapolating from a single study is always difficult and we believe more studies in this space will be needed to build a more accurate understanding of the effect of visual factors on rule understanding. However, we feel confident for the conclusions based on what we have observed. The effect of alignment is extremely strong and we expect this effect to be easy to replicate and robust to many variations (e.g., different ways to encode the predicates). The effect of graphical encoding is less pronounced but not necessarily negligible. Equipped with this knowledge we feel confident in suggesting the use of aligned layouts with graphical representations (\texttt{GA} and \texttt{HA}). They speed up performance considerably without affecting accuracy and with very negligible effects on confidence. The only downside we think designers should be aware of is that the aligned designs require more space to be presented. Since they use space for alignment they tend to be substantially less compact than the standard design where alignment is not present. \looseness=-1 \section{Conclusion And Future Work} This work introduces a set of visual factors in terms of understanding classification rules. Our empirical study confirms the influence of two visual factors: feature alignment, and predicate encoding. The analysis of the study results reveal that feature alignment can improve the efficiency of rule understanding tasks while staying accurate. Moving forward, We are particularly interested in further investigating whether visual factors play a role in a more complex model interpretation process, and in the design of more effective visualizations to assist users to utilize rule information. \looseness=-1
\section{Introduction}\label{sec:intro} \subsection{Preliminaries} In machine learning literature \cite{jordan2015machine,mohri2018foundations}, the area of online learning \cite{shalev2011online} is heavily investigated in various fields from game theory \cite{chang,tnnls1}, control theory \cite{sw2,sw4,tnnls3}, decision theory \cite{tnnls4,freund1997} to computational learning theory \cite{comp1,comp2}. Because of the heavily utilized universal prediction perspective \cite{merhav}, it has been considerably applied in data and signal processing \cite{sw3,signal2,moon,signal1,sw5,gokcesu2018adaptive}, especially in sequential prediction and estimation problems \cite{gHierarchical,singer,ozkan,singer2} such as the problem of density estimation and anomaly detection \cite{gAnomaly,willems,coding1,coding2,gDensity}. Some of its most prominent applications are in multi-agent systems \cite{sw1,vanli,tekin2014distributed} and specifically in reinforcement learning problems \cite{auerExp,bandit1,bandit2,audibert,tekin2,gBandit,exptrade,auer,auerSelf,reinInt,mannucci2017safe}. In these types of applications, we encounter the fundamental dilemma of exploration-exploitation trade-off, which is most throughly studied in the multi-armed bandit problem \cite{cesa-bianchi}. To that end, study of the multi-armed bandit problem has received considerable attention over the years \cite{bandit2,cesa-bianchi,audibert,auer,auerExp,banditTNN,zheng,gBandit}, where the goal is to minimize or maximize some loss or reward, respectively, in a problem environment by sequentially selecting one of $M$ given actions \cite{cesabook}. The multi-armed bandit is widely considered to be the limited feedback version of the well studied prediction with expert advice \cite{signal2,signal1,singer,moon,singer2}. Due to the nature of the problem, only the loss of the selected arm is observed (while others remain hidden). The multi-armed bandit problem has attracted significant attention due to its applicability in a wide range of problem settings from online advertisement \cite{li2010contextual} and recommender systems \cite{tekin2014distributed,tang2014ensemble,luo2015nonnegative,li2011unbiased} to clinical trials \cite{hardwick1991bandit} and cognitive radio \cite{lai2008medium,gai2010learning}. \subsection{Adversarial Multi-armed Bandit Problem} We study the multi-armed bandit problem in an online setting, where we sequentially operate on a stream of observations from an adversarial environment \cite{huang2011adversarial}, i.e., we have no statistical assumptions on the loss sequence. To this end, we investigate the multi-armed bandit problem from a competitive algorithm perspective \cite{merhav,vural2019minimax,vovk,littlestone1994,neyshabouri2018asymptotically,vovk1998,gokcesu2020recursive}. In the competitive perspective, the performance is defined with respect to a competition class of arm selection strategies. For any sequence of losses, the goal of an algorithm is to achieve a cumulative loss that is as close to the cumulative losses of the arm selection sequences in the competition (e.g., for fixed bandit arm competitions, we compare against the bandit arm with the best cumulative loss) \cite{cesa2007}. The difference between the cumulative loss of the algorithm and the best arm selections on the same loss sequence is called 'regret' \cite{cesabook}. In the competitive algorithm perspective, one does not need to explicitly know the actions corresponding to each bandit arm available. Each bandit arm can either be separately running black-box algorithms that learn throughout time instead of some specific action. The only prior knowledge is on the number of the bandit arms (whatever they may be), so that an algorithm knows which arm corresponds to which action. In the competitive framework, the action at any time $t$ is decided upon observed sequential performances. The adversarial multi-armed bandit problem where the competition is against the best fixed arm has a regret lower bound of $\Omega(\sqrt{MT})$ for $M$ bandit arms in a $T$ round game \cite{cesa-bianchi}. When competing against the arm sequences in an arbitrary competition class (as opposed to the best fixed arm), the regret lower bound implies a minimax bound of $\Omega(\sqrt{W_*MT})$, where $W_*$ is the complexity of the competition arm sequence. This complexity can be dependent on either the number of switches in the sequence \cite{cesa-bianchi,auer,auerExp,audibert,doubling_trick}, the number of contextual regions \cite{willems1995context,sadakane2000implementing,willems1996context,csiszar2006context,dumont2014context,kozat2007universal,vanli2014comprehensive,ozkan2016online}, or any other complexity definition that implies a prior on the arm sequences \cite{comp2,gokcesu2020generalized}. With some alterations, these state of the art algorithms achieve an expected minimax regret upper bound $O(\sqrt{W_*MT})$ when $W_*$ is known a priori. They are also able to attain an expected regret upper bound of $O(W_*\sqrt{MT})$ when the complexity $W_*$ of the best arm sequence is not known a priori. They can also be utilized to achieve a regret bound of $O(\sqrt{WMT})$ when competing against the arm sequence with complexities upper bounded by $W$. However, they all lack in the aspect that they simply assume the losses are bounded (generally in the $[0,1]$ region). Because of the lack of adaptivity in their algorithms, their regret bounds may be in the order of $O(L^2\sqrt{WMT})$, where $L$ is an unknown upper bound on the losses. \subsection{Translation and Scale Invariant Regret Bounds} The search for fundamental regret bounds, i.e., translation and scale invariance, has been popular in the literature for a few decades, especially for the problem of prediction with expert advice. Against fixed competition, the most straightforward approach via the exponentially weighted average forecaster of \cite{littlestone1994,vovk1998} provides a zeroth order regret bound (the regret is dependent on the universal loss bound and the number of rounds). In one-sided games, when all losses have the same sign, \cite{freund1997} showed that the algorithm of \cite{littlestone1994} can obtain a first order regret bound (where the regret is dependent on the sum of the losses). A direct analysis on the signed games in \cite{allenberg2004} uncovers that weighted majority actually achieves the first order regret without a need for one-sidedness in the losses. These approaches are all scale invariant, however, they do not have translation or parameter-freeness (since some information about the losses are needed a priori). The work in \cite{cesa2007} solves these shortcomings by creating second order regret bounds (where the regret is dependent on the sum of squared losses) for signed games (thus improving upon the previous existing bounds), and simultaneously eliminating the need for any a priori knowledge. Their algorithm is translation, scale invariant and also parameter-free. However, their competition class is limited and mainly focused on fixed competition. Although, there exist variants in literature to deal with different applications, competing against arbitrary bandit arm selection sequences is nontrivial (because of the problem's nature) unless you treat each sequence as a bandit arm itself, which would be difficult to implement for a scenario with a large competition class. The approach in \cite{gokcesu2020generalized} addresses this issue by extending the second order regret bounds to a generalized framework that is able to arbitrarily compete against different choices of competitions in the problem of prediction with expert advice. However, their results are not applicable to the bandit setting because of the limited feedback. \subsection{Contributions and Organization} To this end, we improve upon the previous works to provide an algorithmic framework to compete against arbitrary bandit arm selection sequences with translation and scale invariant regret bounds. Much like \cite{gokcesu2020generalized}, our algorithmic framework can straightforwardly implement the desired competition class in a scalable and tractable manner. Since, in the competitive algorithm perspective, we do not need to explicitly know the actions (bandit arms) we are presented with, the only prior knowledge we need about the bandit arms is that there are $M$ options that we can select from, and what kind of bandit arm selection sequences we want to compete against (the competition class). Our algorithm sequentially selects the arm solely based on the past performances and is parameter-free. The organization of the paper is as follows. In Section \ref{sec:problem}, we first describe the bandit arm selection problem. Then, in Section \ref{sec:method}, we detail the methodology and our algorithmic framework. We provide the performance results and regret analysis in Section \ref{sec:regret}. We conclude with some important remarks in Section \ref{sec:conc}. \section{Problem Description}\label{sec:problem} In this paper, we study the adversarial multi-armed bandit problem where we have $M$ bandit arms such that $m\in\{1,\ldots,M\}$ and randomly select one of them at each round $t$. We select our bandit arms according to our selection probabilities \begin{align} q_t\triangleq[q_{t,1},\ldots,q_{t,M}],\label{eq:qt} \end{align} and our selection is $i_t\in\{1,\ldots,M\}$ randomly drawn from it such that \begin{align} i_t\sim q_t. \end{align} Based on our online selection \begin{align} \{i_t\}_{t\geq1},\enspace i_t\in\{1,2,\ldots,M\}, \end{align} we incur the loss of the selected arm \begin{align} \{{l_{t,i_t}}\}_{t\geq1}, \end{align} where we do not assume anything about the losses before selecting our bandit arm at time $t$. Because of the bandit setting, we do not observe the other losses $\{{l_{t,{m\neq i_t}}}\}_{t\geq1}$ (i.e., they are hidden). In a $T$ round game, we define $I_T$ as the row vector containing the user selections up to time $T$ as \begin{align} I_T=[i_1,\ldots,i_T], \end{align} and the loss sequence of $I_T$ as \begin{align} L_{I_T}=[l_{1,{i_1}},\ldots,l_{T,i_T}]. \end{align} Similarly, we define $S_T$ as the row vector representing a deterministic bandit arm selection sequence of length $T$ as \begin{align} S_T=[s_1,\ldots,s_T].\label{eq:St} \end{align} such that each $s_t\in\{1,2,\ldots,M\}$ for all $t$. In the rest of the paper, we refer to each such deterministic bandit arm selection sequence, $S_T$, as a competition. Hence, the loss sequence of the competition $S_T$ is \begin{align} L_{S_T}=[l_{1,{s_1}},\ldots,l_{T,s_T}]. \end{align} We denote the cumulative loss at time $T$ of $I_T$ by \begin{align} {C_{I_T}=sum(L_{I_T})=\sum_{t=1}^T l_{t,i_t}}, \end{align} and similarly the cumulative loss at time $T$ of $S_T$ by \begin{align} {C_{S_T}=sum(L_{S_T})=\sum_{t=1}^T l_{t,s_t}}. \end{align} Since we assume no statistical assumptions on the loss sequence, we define our performance with respect to a competition $S_T$ that we want to compete against. We use the notion of regret to define our performance against any competition $S_T$ as \begin{align} R_{S_T}&\triangleq C_{I_T}-C_{S_T}=\sum_{t=1}^T l_{t,i_t}-\sum_{t=1}^T l_{t,s_t},\label{RT1} \end{align} where we denote the regret accumulated in $T$ rounds against $S_T$ as $R_{S_T}$. Our goal is to create an algorithm with expected regret bounds against $S_T$ that depends on how hard it is to learn the competition $S_T$. \section{The Algorithm}\label{sec:method} \begin{algorithm}[!t] \caption{Generalized Algorithm for Bandit Arm Selection}\label{alg:framework} \small{\begin{algorithmic}[1] \FOR{$t=1$ \TO $T$} \FOR{$m\in\{1,\ldots,M\}$} \STATE $$q_{t,m}=(1-\epsilon_{t})p_{t,m}+\epsilon_{t}\frac{1}{M}$$ \ENDFOR \STATE Select $i_t\in\{1,\ldots,M\}$ with $q_t=[q_{t,1},\ldots,q_{t,M}]$ \STATE Receive $\phi_{t}=[\phi_{t,1},\ldots,\phi_{t,M}]$ \FOR{$\lambda_t\in\Omega_t$} \STATE $$z_{\lambda_t}=w_{\lambda_t}\exp(-\eta_{t-1}\phi_{t,\lambda_t(1)})$$ \ENDFOR \FOR{$\lambda_{t+1}\in\Omega_{t+1}$} \STATE $$w_{\lambda_{t+1}}=\sum_{\lambda_{t}\in\Omega_t}\Tau(\lambda_{t+1}|\lambda_t)z_{\lambda_t}^{\frac{\eta_{t}}{\eta_{t-1}}}$$ \ENDFOR \FOR{$m\in\{1,\ldots,M\}$} \STATE $$w_{t+1,m}={\sum_{\lambda_{t+1}(1)=m}w_{\lambda_{t+1}}}$$ \ENDFOR \FOR{$m\in\{1,\ldots,M\}$} \STATE $$p_{t+1,m}=\frac{w_{t+1,m}}{\sum_{m'=1}^{M}w_{t+1,m'}}$$ \ENDFOR \ENDFOR \end{algorithmic}} \end{algorithm} The design of our algorithm starts similarly with \cite{gokcesu2020generalized}, where we use equivalence classes \cite{gBandit} to efficiently combine the arm selection sequences $S_t$ at time $t$. \subsection{Universal Combination to Create Arm Probabilities} Our algorithm works by implicitly assigning a weight $w_{S_t}$ to each of the bandit arm sequences $S_t$. Using these weights, we create the arm weights $w_{t,m}$. We find the sequences among all the sequences that suggest arm $m$ at time $t$ and sum their weights to create the weight of the arm $m$ at time $t$, i.e., \begin{align} w_{t,m}\triangleq\sum_{S_t(t:t)=m}^{} w_{S_t},\label{wmt} \end{align} where $S_t(i\!:\!j)$ is the vector consisting of $i^{th}$ through $j^{th}$ elements of $S_t$, e.g., $S_t(t:t)=s_t$, which is the bandit arm selection of the sequence $S_t$ at time $t$. The sequences are combined according to their weights $w_{S_t}$ to intrinsically achieve the performance of the best sequence because of its universal perspective \cite{merhav}. By normalization, we construct the algorithmic probabilities, i.e., \begin{align} p_{t,m}=\frac{w_{t,m}}{\sum_{m'}w_{t,m'}},\label{pmt} \end{align} and selection probabilities $q_{t,m}$ are given by mixing $p_{t,m}$ with a uniform distribution (which was unnecessary in \cite{gokcesu2020generalized}) as \begin{align} q_{t,m}=(1-\epsilon_t)p_{t,m}+\epsilon_t\frac{1}{M},\label{qtm} \end{align} where $\epsilon_t$ is a time dependent parameter. \subsection{Equivalence Classes for Efficient Calculation} We point out that the construction of $p_{m,t}$ in \eqref{pmt} directly depends on $w_{S_t}$ in lieu of \eqref{wmt}. These weights are implicitly calculated with an equivalence class approach, where we mutually update certain arm sequence weights \cite{gBandit,gokcesu2020generalized}. To create the equivalence classes, we first define a class parameter $\lambda_t$ as \begin{align} \lambda_t=[m, \ldots],\label{lamt} \end{align} where the first parameter $\lambda_t(1)$ is arbitrarily set as the bandit arm selection $m$ at time $t$. Together with the omitted parameters in \eqref{lamt}, $\lambda_t$ determines the sequences that are included in its equivalence class, i.e., the equivalence class with parameters $\lambda_t$ includes all sequences $S_t$ whose behavior match with the parameters $\lambda_t$ as a whole. The parameters of $\lambda_t$ determine how many equivalence classes we have, and how many arm sequences each class represents. We define $\Omega_t$ as the vector space including all possible $\lambda_t$ vectors as \begin{align} \lambda_t\in\Omega_t, \enspace\forall\lambda_t.\label{omegat} \end{align} We point out that $\Omega_t$ may not necessarily represent all possible sequences at time $t$, but instead the sequences of our interest, which we want to compete against. We also define $\Lambda_t$ as the parameter sequence up to time $t$ for an arbitrary sequence as \begin{align} \Lambda_t\triangleq\{\lambda_1,\ldots,\lambda_t\},\label{Lamt} \end{align} where each sequence $S_t$ will correspond to only one $\Lambda_t$. We define $w_{\lambda_t}$ as the weight of the equivalence class parameters $\lambda_t$ at time $t$. The weight of an equivalence class is simply the summation of the implicit weights of the sequences whose behavior conforms with its class parameters $\lambda_t$, such that \begin{align} w_{\lambda_t}=\sum_{F_\lambda(S_t)=\lambda_t}^{}w_{S_t},\label{wlt} \end{align} where $F_\lambda(\cdot)$ is the mapping from sequences $S_t$ to the auxiliary parameters $\lambda_t$, which transforms the definition in \eqref{wmt} to \begin{align} w_{t,m}=\sum_{\lambda_t(1)=m}^{} w_{\lambda_t}.\label{wmt2} \end{align} Similar to \cite{gokcesu2020generalized}, we update the weights $w_{\lambda_t}$ using the following two-step approach. At first, we define an intermediate variable $z_{\lambda_t}$ (which incorporates the exponential performance update as in the exponential weighting algorithm \cite{cesabook}) such that \begin{align} z_{\lambda_t}\triangleq w_{\lambda_t}e^{-\eta_{t-1}\phi_{t,\lambda_t(1)}},\label{zlt} \end{align} where $\phi_{t,m}$ is a measure of the bandit arms performance, which we discuss more in the next section. Secondly, we create a probability sharing network among the equivalence classes (which also represents and assigns a weight to every individual sequence $S_t$ implicitly) at time $t$ as \begin{align} w_{\lambda_{t+1}}=\sum_{\lambda_t\in\Omega_t}\Tau(\lambda_{t+1}|\lambda_t)z_{\lambda_t}^{\frac{\eta_t}{\eta_{t-1}}},\label{wlt+} \end{align} where $\Tau(\lambda_{t+1}|\lambda_t)$ is the transition weight from the class parameters $\lambda_t$ to $\lambda_{t+1}$ such that $\sum_{\lambda_{t+1}\in\Omega_{t+1}}\Tau(\lambda_{t+1}|\lambda_t)=1$ (which is a probability distribution itself). The power normalization on $z_{\lambda_{t}}$ is necessary for adaptive learning rates \cite{gokcesu2020generalized}. A summary of the method is given in \autoref{alg:framework}. \section{Parameter Design and Regret Analysis}\label{sec:regret} In this section, we study the performance of our algorithm. We first provide a summary of some important notations and definitions, which will be heavily used. Then, we study the regret bounds by successively designing the learning rates $\eta_t$, the performance measures $\phi_{t,m}$ and the uniform mixture coefficients $\epsilon_{t}$. \subsection{Notations and Definitions}\label{secsec:not} \begin{enumerate} \item $q_{t,m}$ is the probability of selecting $m$ at $t$ as in \eqref{qtm}. \item $\mathbb{E}_{f_{t,m}}[x_{t,m}]$ is the convex sum of $x_{t,m}$ with the coefficients $f_{t,m}$, i.e., $\sum_{m=1}^{M}f_{t,m}x_{t,m}$. \item $\mathbb{E}_{f_{t}}[x]$ is the expectation of $x$ when $i_t$ is drawn from $f_t$. \item $\mathbb{E}[x]$ is the expectation of $x$ when $i_t$ is drawn from $q_{t,m}$. \item $\eta_t$ is the learning rate used in \eqref{zlt}. \item $\phi_{t,m}$ is the performance metric used in \eqref{zlt}. \item $d_t\triangleq \enspace\max_m\phi_{t,m}-\min_m\phi_{t,m}$. \item $v_t\triangleq \enspace\mathbb{E}_{p_{t,m}}\phi_{t,m}^2$. \item $D_t\triangleq\max_{1\leq t' \leq t}d_t,$. \item $V_t\triangleq\sum_{t'=1}^t v_t$. \item $e$ is Euler's number. \item $\log(\cdot)$ is the natural logarithm. \item $\lambda_t$ is an equivalence class parameter at time $t$ as in \eqref{lamt}. \item $\Omega_t$ is the set of all $\lambda_t$ at time $t$ as in \eqref{omegat}. \item $\Lambda_T\triangleq\{\lambda_t\}_{t=1}^T$ as in \eqref{Lamt}. \item $z_{\lambda_{t}}$ is as in \eqref{zlt}. \item $\Tau(\cdot|\cdot)$ is the transition weight used in \eqref{wlt+}. \item $\Tau(\{\lambda_t\}_{t=1}^T)\triangleq\prod_{t=1}^T\Tau(\lambda_t|\lambda_{t-1})$. \item $W(\Lambda_T)\triangleq \log(\max_{1\leq t\leq T}|\Omega_{t-1}|)-\log(\Tau(\Lambda_T))$, which corresponds to the complexity of a competition. \end{enumerate} \subsection{Performance Analysis} The performance analysis starts the same as in \cite{gokcesu2020generalized} with the difference $\phi_{t,m}\geq 0, \forall t,m$. Hence, we have the following. \begin{lemma}\label{thm:bound} When using \autoref{alg:framework}, we have \begin{align*} \sum_{t=1}^T\left(\mathbb{E}_{p_{t,m}}\phi_{t,m}-\phi_{t,\lambda_t(1)}\right)\leq& \frac{1}{2}\sum_{t=1}^T\eta_t\mathbb{E}_{p_{t,m}}\phi_{t,m}^2\\ &+\sum_{t=1}^T\left(1-\frac{\eta_t}{\eta_{t-1}}\right)d_t\\ &+\frac{\log(\max_{1\leq t\leq T}|\Omega_{t-1}|)}{\eta_{T-1}}\\ &-\frac{1}{\eta_{T-1}}\log(\Tau(\Lambda_T)), \end{align*} where $\Tau(\Lambda_T)=\Tau(\{\lambda_t\}_{t=1}^T)$; $\phi_{t,m}\geq 0$, for all $t,m$; $\eta_t$ is non-increasing with $t$. \begin{proof} The proof follows from \cite{gokcesu2020generalized}, where we use the inequality $e^{-x}\leq 1-x+\frac{1}{2}x^2$ for $x\geq 0$ (from Taylor series). \end{proof} \end{lemma} \autoref{thm:bound} provides us an upper bound on the cumulative difference on the performance variable $\phi_{t,m}$ (possibly related to the regret) in terms of the learning rates $\eta_t$. The selection of the learning rates drastically affects the upper bound and should be chosen with care. \subsection[Designing the Learning Rates]{Designing the Learning Rates $\eta_t$} Differently from \cite{gokcesu2020generalized}, we set the following learning rates \begin{align} \eta_t=\frac{\gamma}{\sqrt{V_t+D_t^2}},\label{etat} \end{align} which are non-increasing and $\gamma$ is a user-set parameter. \begin{lemma}\label{thm:ntphi2} When using \autoref{alg:framework}, $\eta_t$ as in \eqref{etat}, we have \begin{align*} \frac{1}{2}\sum_{t=1}^T\eta_t\mathbb{E}_{p_{t,m}}\phi_{t,m}^2\leq \gamma\sqrt{V_T}, \end{align*} where $\gamma$ is a user-set parameter. \begin{proof} From the definitions of $v_t$, $V_t$ and \eqref{etat}; we have \begin{align} \frac{1}{2}\sum_{t=1}^T\eta_t\mathbb{E}_{p_{t,m}}\phi_{t,m}^2=&\frac{1}{2}\sum_{t=1}^{T}\eta_t v_t,\\ \leq&\frac{\gamma}{2}\sum_{t=1}^{T}\frac{V_t-V_{t-1}}{\sqrt{V_t}},\\ \leq&\gamma\sum_{t=1}^{T}\sqrt{V_t}-\sqrt{V_{t-1}},\\ \leq&\gamma\sqrt{V_T}, \end{align} which concludes the proof. \end{proof} \end{lemma} \begin{lemma}\label{thm:ntdt} When using \autoref{alg:framework}, $\eta_t$ as in \eqref{etat}, we have \begin{align*} \sum_{t=1}^{T}\left(1-\frac{\eta_t}{\eta_{t-1}}\right)d_t\leq&\sqrt{V_T+D_T^2}. \end{align*} \begin{proof} From the definitions of $d_t$, $D_t$ and \eqref{etat}; we have \begin{align} \sum_{t=1}^{T}\left(1-\frac{\eta_t}{\eta_{t-1}}\right)d_t\leq&\sum_{t=1}^{T}\left(1-\frac{\eta_t}{\eta_{t-1}}\right)D_t,\\ \leq&\sum_{t=1}^{T}\left(1-\frac{\sqrt{V_{t-1}+D_{t-1}^2}}{\sqrt{V_t+D_t^2}}\right)D_t,\\ \leq&\sum_{t=1}^{T}\sqrt{V_t+D_t^2}-\sqrt{V_{t-1}+D_{t-1}^2},\nonumber\\ \leq&\sqrt{V_T+D_T^2}, \end{align} which concludes the proof. \end{proof} \end{lemma} \begin{theorem}\label{thm:bound2} With the learning rates in \eqref{etat}, we have the following for \autoref{alg:framework} \begin{align*} \sum_{t=1}^T\mathbb{E}_{p_{t,m}}\phi_{t,m}-\phi_{t,s_t} \leq&\frac{W(\Lambda_T)+\gamma}{\gamma}\sqrt{V_T+D_T^2}+{\gamma\sqrt{V_T}}, \end{align*} where $\gamma$ is a user-set parameter and $s_t\triangleq \lambda_{t}(1)$. \begin{proof} The proof comes from combining \autoref{thm:bound} with \autoref{thm:ntphi2} and \autoref{thm:ntdt} and the definition of $W(\Lambda_T)$. \end{proof} \end{theorem} \autoref{thm:bound2} provides us with a performance bound that is only dependent on a single parameter $\gamma$ which needs to be set at the beginning. However, this does not invalidate the truly online claim since $\gamma$ can be straightforwardly set based on the size of the competition class alone, which is something we naturally have access to at the design of the algorithm. \subsection[Designing the Performance Measures]{Designing the Performance Measures $\phi_{t,m}$} We set the performance measure $\phi_{t,m}$ as \begin{align} \phi_{t,m}=&\begin{cases} \frac{l_{t,m}-\psi_t}{q_{t,m}}, &m=i_t\\ 0, &m\neq i_t \end{cases},\label{phitm} \end{align} where $l_{t,i_t}$ is the incurred and observed loss at time $t$ from the selection $i_t$ (other losses are hidden because of the bandit setting), $q_{t,m}$ is the selection probability of the arm $m$ at time $t$ and $\psi_t$ is the minimum loss observed so far as \begin{align} \psi_t=&\min (\psi_{t-1},l_{t,i_t}).\label{psit} \end{align} To bound the expected regret, we need to bound both of the expectations of $V_t$ and $D_t^2$, which are given by the following results. \begin{lemma}\label{thm:EVT} For $\phi_{t,m}$ as in \eqref{phitm}, $\psi_t$ as in \eqref{psit} and $q_{t,m}$ as in \eqref{qtm}, the expectation of $V_T$ is bounded as follows: \begin{align*} \mathbb{E}[V_T]&\leq\frac{MT}{\theta}(A-B)^2, \end{align*} where $[B,A]$ is the range of losses $l_{t,m}$ for all $t,m$ and $\theta\leq 1-\epsilon_t, \forall t$. \begin{proof} From the definition of $v_t$, we have \begin{align} v_t&=\frac{p_{t,i_t}(l_{t,i_t}-\psi_t)^2}{q_{t,i_t}^2}.\label{Epvt} \end{align} From the arm selection probabilities $q_{t,m}$ in \eqref{qtm}, we have \begin{align} \frac{p_{t,m}}{q_{t,m}}\leq \frac{1}{1-\epsilon_t}\label{p/q} \end{align} Thus, combining \eqref{Epvt} and \eqref{p/q} gives \begin{align} v_t&\leq\frac{(l_{t,i_t}-\psi_t)^2}{(1-\epsilon_t)q_{t,i_t}}, \end{align} and its expectation is bounded as \begin{align} \mathbb{E}[v_t]&\leq\frac{M(A-B)^2}{(1-\epsilon_t)}\leq\frac{M(A-B)^2}{\theta}, \end{align} where $\theta\leq 1-\epsilon_t, \forall t$ and $B\leq l_{t,m}\leq A, \forall t,m$. Thus, \begin{align} \mathbb{E}[V_T]&=\mathbb{E}[\sum_{t=1}^{T}v_{t}]\leq\frac{MT}{\theta}(A-B)^2, \end{align} which concludes the proof. \end{proof} \end{lemma} \begin{lemma}\label{thm:EDT} For $\phi_{t,m}$ as in \eqref{phitm}, $\psi_t$ as in \eqref{psit} and $q_{t,m}$ as in \eqref{qtm}, the expectation of $D_T^2$ is bounded as follows: \begin{align} \mathbb{E}[D_T^2]\leq\frac{(A-B)^2}{\epsilon^2} \end{align} where $[B,A]$ is the range of losses $l_{t,m}$ for all $t,m$ and $\epsilon\leq \epsilon_t/M, \forall t$. \begin{proof} The proof is straightforward from the definition of $D_T$ \begin{align} D_T&=\max_{1\leq t \leq T}\frac{l_{t,i_t}-\psi_t}{q_{t,i_t}},\\ &\leq\frac{A-B}{\epsilon}, \end{align} which concludes the proof. \end{proof} \end{lemma} \begin{lemma}\label{thm:Epsit} For $\phi_{t,m}$ as in \eqref{phitm}, $\psi_t$ as in \eqref{psit} and $q_{t,m}$ as in \eqref{qtm}, we have the following expectation result \begin{align*} \sum_{t=1}^{T}\mathbb{E}[\psi_t-\min(l_{t,s_t},&\psi_{t-1})]\leq \frac{A-B}{\epsilon}, \end{align*} for any $\{s_t\}_{t=1}^T$ arm selection sequence, where $[B,A]$ is the range of losses $l_{t,m}$ for all $t,m$ and $\epsilon\leq \epsilon_t/M, \forall t$. \begin{proof} Given $\epsilon\leq {\epsilon_t}/{M}, \forall t$, we have \begin{align} \mathbb{E}[\psi_t|\psi_{t-1}]\leq \epsilon\min(l_{t,s_t},\psi_{t-1})+(1-\epsilon)\psi_{t-1} \end{align} Then, the expectation of both sides gives \begin{align} \mathbb{E}[\psi_t]\leq&\epsilon\mathbb{E}[\min(l_{t,s_t},\psi_{t-1})]+(1-\epsilon)\mathbb{E}[\psi_{t-1}],\\ \leq&\epsilon\mathbb{E}[\min(l_{t,s_t},\psi_{t-1})]\nonumber\\ &+(1-\epsilon)\epsilon\mathbb{E}[\min(l_{t-1,m_{t-1}},\psi_{t-2})]\nonumber\\ &+\ldots\nonumber\\ &+(1-\epsilon)^{t-2}\epsilon\mathbb{E}[\min(l_{2,m_2},\psi_1)]\nonumber\\ &+(1-\epsilon)^{t-1}\mathbb{E}[\psi_1]. \end{align} When summed for $t$ from $1$ to $T$, after rearranging, we get \begin{align} \sum_{t=1}^{T}\mathbb{E}[\psi_t]=&\sum_{t=2}^{T}\epsilon\left(\sum_{\tau=0}^{T-t}(1-\epsilon)^\tau\right)\mathbb{E}[\min(l_{t,s_t},\psi_{t-1})],\nonumber\\ &+\sum_{t=1}^{T}(1-\epsilon)^{t-1}\mathbb{E}[\psi_1].\label{TEpsit} \end{align} We define some intermediate variables. Let \begin{align} Q_t\triangleq\sum_{\tau=0}^{T-t}(1-\epsilon)^\tau, \end{align} Thus, they have a recursive relation as the following \begin{align} Q_{t-1}=(1-\epsilon)Q_t+1. \end{align} Together with \eqref{TEpsit}, we get \begin{align} \sum_{t=1}^{T}\mathbb{E}[\psi_t]=\sum_{t=2}^{T}\epsilon Q_t\mathbb{E}[\min(l_{t,s_t},\psi_{t-1})]+Q_1\mathbb{E}[\psi_1]. \end{align} Then, we arrive at the intended result by the following \begin{align} \sum_{t=1}^{T}&\mathbb{E}[\psi_t-\min(l_{t,s_t},\psi_{t-1})]\nonumber\\ =&\sum_{t=2}^{T}(\epsilon Q_t-1)\mathbb{E}[\min(l_{t,s_t},\psi_{t-1})]+Q_1\mathbb{E}[\psi_1]-l_{1,m_1},\nonumber\\ =&\sum_{t=2}^{T}(Q_t-Q_{t-1})\mathbb{E}[\min(l_{t,s_t},\psi_{t-1})]+Q_1\mathbb{E}[\psi_1]-l_{1,m_1},\nonumber\\ \leq&\sum_{t=2}^{T}(Q_t-Q_{t-1})B+Q_1A-B,\\ \leq&(Q_T-Q_1)B+Q_1A-B,\\ \leq& Q_1(A-B),\\ \leq& \frac{A-B}{\epsilon}, \end{align} which concludes the proof. \end{proof} \end{lemma} \subsection[Designing the Uniform Mixture Coefficient]{Designing the Uniform Mixture Coefficients $\epsilon_t$} We set the uniform mixture coefficients $\epsilon_t$ as the following \begin{align} \epsilon_t=\min\left(\frac{1}{2},\sqrt{\frac{M}{{t}}}\right).\label{et} \end{align} From \eqref{et}, the bounds $\theta$ and $\epsilon$ are given by \begin{align} \frac{1}{\theta}=&2,\\ \frac{1}{\epsilon}=&\sqrt{MT}, \end{align} when $T\geq 4M$ (for brevity, when $T$ is sufficiently large). Moreover, we also denote the true range with $D$ as \begin{align} D\triangleq A-B, \end{align} where $[B,A]$ is the range of losses $l_{t,m}$ for all $t,m$. \begin{lemma}\label{Tet} When $\epsilon_{t}$ is as in \eqref{et}, we have the following \begin{align*} \sum_{t=1}^{T}\epsilon_t\leq 2\sqrt{MT}. \end{align*} \begin{proof} Because of the minimum operation at \eqref{et}, we have \begin{align} \sum_{t=1}^{T}\epsilon_t\leq&\sum_{t=1}^{T}\sqrt{\frac{M}{t}},\\ \leq&\sqrt{M}\sum_{t=1}^{T}\frac{(\sqrt{t}-\sqrt{t-1})(\sqrt{t}+\sqrt{t-1})}{\sqrt{t}},\\ \leq&2\sqrt{MT}, \end{align} which concludes the proof. \end{proof} \end{lemma} \begin{corollary}\label{EsqVT} For $\epsilon_{t}$ as in \eqref{et}, we have \begin{align} \mathbb{E}[\sqrt{V_T}]\leq D\sqrt{2MT}, \end{align} where $D$ denotes the true range, i.e., $D\triangleq A-B$. \begin{proof} The proof comes from the concavity of the square-root, \autoref{thm:EVT} and $\theta=0.5$ (from \eqref{et}). \end{proof} \end{corollary} \begin{corollary}\label{EsqDT} For $\epsilon_{t}$ as in \eqref{et}, we have \begin{align} \mathbb{E}[\sqrt{V_T+D_T^2}]\leq D\sqrt{3MT} \end{align} where $D$ denotes the true range, i.e., $D\triangleq A-B$. \begin{proof} The proof comes from the concavity of the square-root, \autoref{thm:EVT}, \autoref{thm:EDT} and $\epsilon=1/\sqrt{MT}$ for large $T$ (from \eqref{et}). \end{proof} \end{corollary} \begin{corollary}\label{EsqphiT} For $\epsilon_{t}$ as in \eqref{et}, we have \begin{align} \sum_{t=1}^{T}\mathbb{E}[\psi_t-\min(l_{t,s_t},&\psi_{t-1})]\leq D\sqrt{MT}, \end{align} where $D$ denotes the true range, i.e., $D\triangleq A-B$. \begin{proof} The proof comes from \autoref{thm:Epsit} and $\epsilon=1/\sqrt{MT}$ for large $T$ (from \eqref{et}). \end{proof} \end{corollary} \subsection{Expected Regret Bound} \begin{theorem}\label{thm:regret} For $\eta_t$ as in \eqref{etat}, $\phi_{t,m}$ as in \eqref{phitm}, $\psi_t$ as in \eqref{psit}, $\epsilon_t$ as in \eqref{et} and $q_{t,m}$ as in \eqref{qtm}, we have the following expected regret \begin{align*} \sum_{t=1}^{T}&\mathbb{E}[l_{t,i_t}]-l_{t,s_t}\leq D\sqrt{MT}\left(3+\sqrt{3}+\frac{W_T}{\gamma}\sqrt{3}+\gamma\sqrt{2}\right), \end{align*} where $W_T=W(\Lambda_T)$ and $\gamma$ is user-set parameter. \begin{proof} We have from \eqref{qtm} \begin{align} \mathbb{E}_{q_{t}}[l_{t,i_t}-\psi_t|\psi_{t-1}]=&(1-\epsilon_t)\mathbb{E}_{p_{t}}[l_{t,i_t}-\psi_t|\psi_{t-1}]\nonumber\\ &+\epsilon_t\mathbb{E}_u[l_{t,i_t}-\psi_t|\psi_{t-1}], \end{align} where $\mathbb{E}_u[\cdot]$ is the expectation over uniform distribution. Hence, we have \begin{align} \mathbb{E}_{q_{t}}[l_{t,i_t}-\psi_t|\psi_{t-1}]\leq&\mathbb{E}_{p_{t}}[l_{t,i_t}-\psi_t|\psi_{t-1}]+\epsilon_t(A-B),\label{qtmptm} \end{align} where $B\leq l_{t,m}\leq A, \forall t,m$, i.e., $[B,A]$ is the true range of losses. Furthermore, \begin{align} \mathbb{E}&\left[\sum_{t=1}^{T}\mathbb{E}_{p_{t,m}}[\phi_{t,m}]-\phi_{t,s_t}\right]\\ =&\mathbb{E}\left[\sum_{t=1}^{T}\mathbb{E}_t\left[\mathbb{E}_{p_{t,m}}[\phi_{t,m}]-\phi_{t,s_t}\right]\right],\\ =&\mathbb{E}\left[\sum_{t=1}^{T}\mathbb{E}_{p_{t}}[l_{t,i_t}-\psi_t|\psi_{t-1}]-l_{t,s_t}+\min(l_{t,s_t},\psi_{t-1})\right],\nonumber\\ \geq&\mathbb{E}\left[\sum_{t=1}^{T}\mathbb{E}_{q_{t}}[l_{t,i_t}-\psi_t|\psi_{t-1}]-l_{t,s_t}\right]\nonumber\\ &+\mathbb{E}\left[\sum_{t=1}^{T}\min(l_{t,s_t},\psi_{t-1})-\epsilon_t(A-B)\right], \end{align} from \eqref{qtmptm}. Thus, together with \autoref{thm:bound2} \begin{align} \sum_{t=1}^{T}\mathbb{E}[l_{t,i_t}]&-l_{t,s_t}\nonumber\\ \leq& \sum_{t=1}^T \mathbb{E}[\psi_t-\min(l_{t,s_t},\psi_{t-1})]+(A-B)\sum_{t=1}^{T}\epsilon_t\nonumber\\ &+\mathbb{E}\left[\frac{W(\Lambda_T)+\gamma}{\gamma}\sqrt{V_T+D_T^2}+{\gamma\sqrt{V_T}}\right] \end{align} Using \autoref{Tet}, \autoref{EsqVT}, \autoref{EsqDT}, \autoref{EsqphiT}; we get \begin{align*} \sum_{t=1}^{T}\mathbb{E}[l_{t,i_t}]-l_{t,s_t}\leq& D\sqrt{MT}+2D\sqrt{MT}\nonumber\\ &+\frac{W(\Lambda_T)+\gamma}{\gamma}D\sqrt{3MT}+\gamma D\sqrt{2MT} \end{align*} Rearranging, we get \begin{align*} \sum_{t=1}^{T}&\mathbb{E}[l_{t,i_t}]-l_{t,s_t}\leq D\sqrt{MT}\left(3+\sqrt{3}+\frac{W_T}{\gamma}\sqrt{3}+\gamma\sqrt{2}\right), \end{align*} where $W_T=W(\Lambda_T)$, which concludes the proof. \end{proof} \end{theorem} \section{Discussions and Conclusion}\label{sec:conc} \begin{corollary} When $\gamma=\sqrt{{W}}$, the expected regret against a competition $\{s_t\}_{t=1}^T$ is bounded as \begin{align*} \sum_{t=1}^{T}&\mathbb{E}[l_{t,i_t}]-l_{t,s_t}\leq D\sqrt{MT}\left(5+4\sqrt{W}\right), \end{align*} where $W$ is an upper bound on our competing class such that $W(\Lambda_T)\leq W$. \begin{proof} The proof comes from putting $\gamma=\sqrt{W}$ in \autoref{thm:regret} with some loose bounding. \end{proof} \end{corollary} \begin{remark} Hence, we can achieve an expected regret bound of the following order \begin{align*} \mathbb{E}[R_T] \triangleq& \mathbb{E}\left[\sum_{t=1}^{T}l_{t,i_t}-l_{t,s_t}\right],\\ =& O\left(D\sqrt{WMT}\right), \end{align*} where $M$ is the number of bandit arms, i.e., $m\in\{1,\ldots,M\}$; $T$ is the time horizon, i.e., $t\in\{1,\ldots,T\}$; $W$ is an upper bound on our competition complexity, i.e., $W(\Lambda_T)\leq W$; and $D$ is the unknown range of the losses $l_{t,m}$, i.e., \begin{align*} D=\max_{t\in\{1,\ldots,T\}}\max_{m\in\{1,\ldots,M\}}l_{t,m}-\min_{t\in\{1,\ldots,T\}}\min_{m\in\{1,\ldots,M\}}l_{t,m}. \end{align*} \end{remark} \begin{remark} Our expected regret bound \begin{align*} \mathbb{E}[R_T] =O\left(D\sqrt{WMT}\right), \end{align*} is translation and scale invariant, hence, a fundamental regret bound \cite{cesa2007}. \begin{proof} Instead of the true loss $l_{t,m}$, let us observe an affine transform $\tilde{l}_{t,m}$ of it, i.e., \begin{align} \tilde{l}_{t,m}=\alpha l_{t,m}+\beta, \end{align} for some $\alpha>0$ and $\beta$. The expected regret bound for these affine transforms would be \begin{align} \mathbb{E}[\tilde{R}_T]=O\left(\alpha D\sqrt{WMT}\right), \end{align} because only the range $D$ would be affected. Since this regret is equal to the original regret times $\alpha$, it is translation and scale invariant. \end{proof} \end{remark} In conclusion, we have successfully created a completely online, generalized algorithm for the adversarial multi-armed bandit problem. With suitable design, it is possible to compete against a subset of the all possible bandit arm selection sequences that is appropriate for a given problem. By combining the similar sequences together in each step of the algorithm, and creating appropriate equivalence classes, we can compete against the sequences with minimal redundancy and in a computationally efficient manner. Our performance bounds are translation-free and scale-free of the bandit arm losses. \bibliographystyle{ieeetran}
\section{Introduction} Let $Z$ be a standard normal random variable; that is, assume \begin{equation} \label{eq:normal_density} \P(Z \le x) = \int_{-\infty}^x \frac{e^{-t^2/2}}{\sqrt{2\pi}} \,dt \qquad \text{for all $x \in \mathbf{R}$.} \end{equation} If $S_1,S_2,\ldots$ are random variables and $W$ is a normal random variable, we write $S_n \Rightarrow W$ to mean \[ \lim_{n\to\infty} \P(S_n \le x) = \P(W \le x) \qquad \text{for all $x \in \mathbf{R}$.} \] In this case, $S_n$ is said to \emph{converge in distribution} to $W$. The de Moivre--Laplace theorem, first published in 1738 \cite{DeM01} in a weak form, states that the binomial distribution may be approximated by the normal distribution. \begin{theorem}[de Moivre--Laplace] \label{thm:dl} Let $p \in (0,1)$, and $X_1,X_2,\ldots$ be independent and identically distributed random variables satisfying \[ \P(X_1 = 1) = p \quad\text{and}\quad \P(X_1 = 0) = 1-p. \] Then, \[ \frac{X_1+\cdots+X_n - np}{\sqrt{np(1-p)}} \Rightarrow Z. \] \end{theorem} Theorem~\ref{thm:dl} can be proved by direct computation using Stirling's formula \[ \lim_{n\to\infty} \frac{n!}{\sqrt{2\pi n}(n/e)^n} = 1; \] see \cite[Section 7.3]{Chu12} for details. The computation ``discovers" the formula \eqref{eq:normal_density} for the normal density without prior knowledge. Thus, Theorem~\ref{thm:dl} might be used to motivate the introduction of the normal distribution. Historically, Theorem~\ref{thm:dl} is the earliest instance of the celebrated Lindeberg--L\'evy central limit theorem (CLT). \begin{theorem}[central limit theorem] \label{thm:clt} If $X_1,X_2,\ldots$ are independent and identically distributed random variables satisfying $\E[X_1] = 0$ and $\E[X_1^2] = 1$, then \begin{equation} \label{eq:conv_z} \frac{X_1+\cdots+X_n}{\sqrt{n}} \Rightarrow Z. \end{equation} \end{theorem} To see that Theorem~\ref{thm:dl} follows from Theorem~\ref{thm:clt}, note that $(X_1-p)/\sqrt{p(1-p)}$ in Theorem~\ref{thm:dl} has mean zero and variance one. It is surprising that the convergence \eqref{eq:conv_z} is a \emph{universal} phenomenon observed from all random variables $X_1$ with finite variances, not just the Bernoulli ones. This explains the ubiquity of the ``bell-shaped" curve in the real world. Many proofs of Theorem~\ref{thm:clt} are known. The standard proof \cite[Theorem~3.4.1]{Dur19} uses \emph{characteristic functions}, which are essentially Fourier transforms. A related proof \cite[Subsection~2.2.3]{Tao12} uses the \emph{moment method}. There have been efforts to find elementary proofs of Theorem~\ref{thm:clt} that avoid characteristic functions. For instance, \cite{Tro59} replaced characteristic functions with certain linear operators on a function space. Another proof using the \emph{Stein method} \cite{Ste86} makes use of the identity \[ \E[f'(Z) - Zf(Z)] = 0 \] that holds for certain well-behaved $f$. The proof by \emph{Lindeberg swapping} \cite{Lin22} lets $Y_1,Y_2,\ldots$ to be independent standard normal random variables, and transform $(X_1+\cdots+X_n)/\sqrt{n}$ into $(Y_1+\cdots+Y_n)/\sqrt{n}$ by swapping $X_i$ for $Y_i$ one at a time. Note that once we finish swapping, we are left with a standard normal random variable. The last proof we would like to mention uses the \emph{Skorokhod representation}. If $(B_t)_{t\ge0}$ is a Brownian motion, the Skorokhod representation theorem \cite[Theorem~8.1.1]{Dur19} provides us with stopping times $T_1\le T_2\le \cdots$ such that $X_1+\cdots+X_n$ has the same distribution as $B_{T_n}$. The conclusion of the CLT follows from $T_n/n \to 1$ in probability. In this note, we prove the CLT (Theorem~\ref{thm:clt}) in a new way, by deriving it directly from de Moivre--Laplace theorem (Theorem~\ref{thm:dl}). In some sense, our proof is of similar spirit as the proof by Skorokhod embedding. However, our proof is more elementary in that, for example, we do not need to construct the Brownian motion and build the theory of stopping times. Section~\ref{sec:simple} is the crux of our proof. There we prove the CLT when $X_1$ is \emph{simple}, that is, when it has only finitely many possible values. Any proof of the CLT needs to deal with some measure theory, and Section~\ref{sec:gen} does that. There we generalize the result to all $X_1$ with finite variance. This step does not contain new idea, and might be considered routine in the eyes of experts. \section{CLT for Simple Random Variables} \label{sec:simple} Let us call a random variable with at mosts two possible values \emph{two-valued}. De Moivre--Laplace theorem tells us that the CLT (Theorem~\ref{thm:clt}) holds when $X_1$ is two-valued. Our task is to extend this result to when $X_1$ takes more than two values. We say that a random variable $Y$ is a \emph{finite mixture} of random variables $Y_1,\ldots,Y_n$ ($n \in \mathbf{N}$) if there is a random number $\theta \in \{1,\ldots,n\}$ independent from $Y_1,\ldots,Y_n$ such that $Y = Y_i$ on the event $\{\theta = i\}$. In short, we write $Y = Y_\theta$. \begin{lemma} \label{lem:mixture} Any simple mean-zero random variable $X$ has a distribution of a finite mixture of two-valued mean-zero random variables. \end{lemma} It would be instructive to try proving this before reading the proof. \begin{proof} If $X\equiv 0$, we can let $n=1$, $Y_1 \equiv 0$, and $\theta \equiv 1$. Otherwise, let $a, b > 0$ be the smallest numbers such that $\P(X=a) > 0$ and $\P(X=-b) > 0$. We proceed by induction on the number of possible values of $X$. If \[ a\P(X=a) \le b\P(X=-b), \] choose an event $B \subset \{X=-b\}$ such that $a\P(X=a) = b\P(B)$. (If needed, we may let $[0,1)$ be the underlying probability space.) Notice that $X$ is two-valued and mean-zero if conditioned on $\{X=a\} \cup B$. On the other hand, conditioned on $(\{X=a\} \cup B)^c$, we see that $X$ has less number of possible values, so by the induction hypothesis, it has a distribution of a finite mixture of two-valued mean-zero random variables. Combining the two parts, we conclude that $X$ also has a distribution of a finite mixture of two-valued mean-zero random variables. An analogous proof works when \[ a\P(X=a) > b\P(X=-b). \qedhere \] \end{proof} \begin{lemma}[CLT for simple random variables] \label{lem:clt_simple} The CLT (Theorem~\ref{thm:clt}) holds if $X_1$ is simple. \end{lemma} \begin{proof} By Lemma~\ref{lem:mixture}, we may assume $X_n = Y_{n,\theta_n}$ where \[ \{Y_{n,i}; n\in \mathbf{N}, i=1,\ldots,m\} \] ($m\in\mathbf{N}$) is an independent family of two-valued mean-zero random variables, $Y_{1,i},Y_{2,i},\ldots$ are identically distributed for $i=1,\ldots,m$, and $\theta_1,\theta_2,\ldots \in \{1,\ldots,m\}$ are i.i.d.\ and independent from $Y$'s. We may assume $\P(\theta_1=i) > 0$ for $i=1,\ldots,m$. Let $x \in \mathbf{R}$. Intuitively, we have \[ \P\Bigl(\frac{X_1+\cdots+X_n}{\sqrt{n}} \le x \Bigr) = \E\biggl[\P\Bigl(\frac{Y_{1,\theta_1}+\cdots+Y_{n,\theta_n}}{\sqrt{n}} \le x \Bigm| \theta_1,\ldots,\theta_n \Bigr) \biggr]. \] We instead choose the following more concrete formulation: \begin{equation} \label{eq:clt_cond} \P\Bigl(\frac{X_1+\cdots+X_n}{\sqrt{n}} \le x \Bigr) = \E\biggl[\P\Bigl(\frac{Y_{1,i_1}+\cdots+Y_{n,i_n}}{\sqrt{n}} \le x\Bigr)_{(i_1,\ldots,i_n) = (\theta_1,\ldots,\theta_n)}\biggr] \end{equation} where $p(i_1,\ldots,i_n)_{(i_1,\ldots,i_n)=(\theta_1,\ldots,\theta_n)}$ denotes $p(\theta_1,\ldots,\theta_n)$ for any function $p$. (See \cite[Theorem~20.3]{Bil12}.) If $i_1,i_2,\ldots \in \{1,\ldots,m\}$ satisfy \[ \lim_{n\to\infty} \frac{\bigl| \{k : 1\le k \le n \text{ and } i_k = i\} \bigr|}{n} = \P(\theta_1 = i) \] for $i=1,\ldots,m$, then \[ \frac{1}{\sqrt{n}} \sum_{\substack{k=1,\ldots,n \\ \theta_k = i}} Y_{k,i_k} = \frac{\sqrt{\E[Y_{1,i}^2]\P(\theta_1=i)}}{\sqrt{\E[Y_{1,i}^2]\P(\theta_1=i)n}} \sum_{\substack{k=1,\ldots,n \\ \theta_k = i}} Y_{k,i} \Rightarrow \sqrt{\E[Y_{1,i}^2]\P(\theta_1 = i)} Z \] for $i=1,\ldots,m$ by the de Moivre--Laplace theorem (Theorem~\ref{thm:dl}). Summing up for $i=1,\ldots,m$, we have \[ \frac{Y_{1,i_1} + \cdots + Y_{n,i_n}}{\sqrt{n}} \Rightarrow \sqrt{\sum_{i=1}^m \E[Y_{1,i}^2]\P(\theta_1=i)} \cdot Z = Z. \] By (a relatively easily proved version \cite[Theorem~6.1]{Bil12} of) the strong law of large numbers, we have \[ \lim_{n\to\infty} \frac{\bigl| \{k : 1\le k \le n \text{ and } \theta_k = i\} \bigr|}{n} = \P(\theta_1 = i) \qquad \text{with probability $1$} \] for $i=1,\ldots,m$. Thus, \[ \lim_{n\to\infty} \P\Bigl(\frac{Y_{1,i_1}+\cdots+Y_{n,i_n}}{\sqrt{n}} \le x\Bigr)_{(i_1,\ldots,i_n) = (\theta_1,\ldots,\theta_n)} = \P(Z\le x) \] with probability $1$. By \eqref{eq:clt_cond}, it follows that \begin{equation} \label{eq:conv_df_z} \lim_{n\to\infty} \P\Bigl(\frac{X_1+\cdots+X_n}{\sqrt{n}} \le x \Bigr) = \P(Z \le x). \end{equation} Since $x$ is arbitrary, we have \eqref{eq:conv_z}. \end{proof} \section{Generalization} \label{sec:gen} We are left with a measure-theoretic argument which is rather standard. A similar argument can be found in \cite[Subsection~2.2.1]{Tao12}. \newcommand{Y^{(\eta)}}{Y^{(\eta)}} \begin{proof}[Proof of Theorem~\ref{thm:clt}] Let $x \in \mathbf{R}$ be given, and let us show \eqref{eq:conv_df_z}. For brevity, let $S_n := (X_1+\cdots+X_n)/\sqrt{n}$. Let $\epsilon > 0$ be given, and let $\delta > 0$ be such that \[ \P(Z \le x+\delta) < \P(Z \le x) + \epsilon. \] Given $\eta > 0$, we can take an i.i.d.\ sequence $Y^{(\eta)}_1,Y^{(\eta)}_2,\ldots$ of simple random variables such that $\E[Y^{(\eta)}_1] = 0$, $\E[(Y^{(\eta)}_1)^2] = 1$, and \begin{equation} \label{eq:ey_close} \E[(X_i - Y^{(\eta)}_i)^2] \le \eta \qquad \text{for $i=1,2,\dots$.} \end{equation} Let us write $T_n := (Y^{(\eta)}_1+\cdots+Y^{(\eta)}_n)/\sqrt{n}$. By Lemma~\ref{lem:clt_simple}, \[ \lim_{n\to\infty} \P(T_n \le x + \delta) = \P(Z \le x+\delta) < \P(Z \le x) + \epsilon. \] By Chebyshev's inequality and \eqref{eq:ey_close}, we have \[ \P(|S_n-T_n|>\delta) \le \frac{1}{\delta^{2}n}\sum_{i=1}^n\E[(X_i-Y^{(\eta)}_i)^2] \le \frac{\eta}{\delta^2}. \] If we let $\eta := \delta^2\epsilon$, the right side is $\epsilon$, and thus \[ \begin{split} \P(S_n \le x) &\le \P(|S_n-T_n| > \delta) + \P(T_n \le x+\delta) \\ &< \P(Z\le x) + 2\epsilon \end{split} \] for all large $n$. By a similar argument, once can prove that \[ \P(S_n\le x) > \P(Z\le x) - 2\epsilon \] for all large $n$. Since $\epsilon$ is arbitrary, we have \eqref{eq:conv_df_z}. \end{proof} \section*{Acknowledgements} The author is supported in part by the National Research Foundation of Korea grants 2017R1A2B2001952 and 2019R1A5A1028324. The author would like to thank Yuval Peres for helpful suggestions.
\section{Introduction} \label{sec:introuction} In the world of data, the security and privacy of individuals have now become one of the major concerns. To avoid data misuse, several restrictions such as the General Data Protection Regulation (GDPR)~\cite{chassang2017impact}, Personal Data Protection Act (PDP)~\cite{azzi2018challenges}, and Cybersecurity Law of the People's Republic (CLPR) of China~\cite{qi2018assessing} have been introduced. These regulations are strictly practiced making data aggregation from distributed devices and regions almost impossible~\cite{yang2019federated}. To accommodate such restrictions along with the constraints placed by heterogeneous devices, improvised machine learning (ML) approaches were sought. Federated Learning~\cite{konevcny2016federated} and Split Learning~\cite{poirot2019split} are two such ML approaches that enable safeguarding the raw data and offload computations at the central server by pushing a part of the computation to the end devices. \par Federated learning (FL) leverages the distributed resources to train an ML model collaboratively. More precisely, in FL, multiple devices collaboratively offer resources to train the ML model while keeping the raw data to themselves, as in no raw data leaves the place of its origin~\cite{yang2019federated}. The main drawbacks of FL are two folds. Firstly, training a large ML model in resource-constrained end devices is difficult~\cite{li2020federated}. Secondly, all participating end devices and the server has the full trained model. This does not preserve the model privacy while training like in split learning~\cite{thapa2020splitfed}. To overcome these drawbacks, Split Learning (SL) enables model split and training the split model portions collaboratively at the client-side and the server-side separately~\cite{singh2019detailed}. The clients and the server never have access to the model updates (gradients) of each other's model portion once the training starts. This way, SL enables training large models in an environment with low-end devices such as internet-of-things and preserves the model's privacy while training. Also, it keeps the raw data to its origin (the analyst has no access to the raw data at all times). However, at a time, SL considers only one client and the server while training. This forces other clients to be idle and wait for their turn to train with the server~\cite{thapa2020splitfed}. \par To mitigate the drawback of FL having a lower level of model privacy while training and the inability of SL to train the ML model in parallel, specifically among the clients, the SplitFed learning (SFL) is recently proposed~\cite{thapa2020splitfed, splitbook}. SFL combines the best of the FL and SL. In this approach, an ML model is split between the client and the server (like in SL). In contrast to SL, multiple identical split of ML model, i.e., the client-side model portion, is shared across the clients. The server-side model portion is provided to the server. In each forward pass, all clients perform the forward propagation in parallel and independently. Then the activation vectors of the end layer (client-side model portion) are passed to the server. The server then processes the forward and backpropagation for its server-side model on the activation vectors. In backpropagation, the server returns the respective gradients of their activation vectors to the clients. Afterward, each client performs the backpropagation on the gradients they received from the server. After each forward and backward pass, all client-side models and server-side models aggregate their weights and form the one global model, specifically in SplitFedV1. The aggregation is done independently at the client-side (by using fed server) and server-side. In another version of the SFL called SplitFedV2, the authors changed the training setting for the server-side model. Instead of aggregating the server-side model at each epoch, the server keeps training one server-side model with the activation vectors from all the clients. Despite the improvements in SFL, model synchronization is needed at the client-side that is obtained through model aggregation and sharing. This is done to make the global model (joint client-side model and server-side model) consistent at the end of each epoch. However, the model synchronization brings the computation and communication overhead at the client-side. This would be significant if the number of clients grows significantly. In this regard, this paper studies the SFL without client-side model synchronization. The resulting model architecture is called \emph{Multi-head Split Learning} (MHSL). We summarize our contributions under two research questions stated in the following: \subsection{Our contributions} \begin{itemize} \item [\textbf{RQ1}] Can we allow splitfed learning without client-side model synchronization?\par We study the feasibility of MHSL. Our empirical studies on IID distributed MNIST and CIFAR-10 data among five clients find a similar result in MHSL and SFL. Moreover, SFL is slightly (1\%-2\%) better than MHSL on the MNIST. % For CIFAR-10, SFL is better by around 10\% than MHSL at the 20 global epoch. However, both SFL and MHSL performance is below 60\% (low), thus requires further studies to make any conclusion. \item [\textbf{RQ2}] Is there any effect on the overall performance if we change the number of layers at the client-side model portions?\par Performance of SFL and MHSL under different combinations of layers dispersed at the client-side, and the server-side behaved identically. No significant deviation in model convergence and their performance are observed for any of the client-side and the server-side model's combinations in our experiments. \end{itemize} \section{Experiment setup} \label{sec:setup} For the experiment purpose, we choose SplitFedV2 in this paper. This makes our analysis more focused on the split learning side. Moreover, we study if the federated learning part can be removed from the SFL, resulting in Multi-head Split Learning (MHSL). The overall architecture of MHSL is depicted in Figure~\ref{fig:SplitfedV2WCA}. The model $W$ is split into two portions; client-side model $W_c$ portion and server-side model $W_s$ portion. For the clients, their models are represented by $W_c^i$, where $i\in \{1,2,\dotsc, N\}$ is the client's label. The global model $W$ is formed by concatenating the $W_c$ and $W_s$, i.e., $[W_c W_s]$ once the training completes. \par \paragraph{\textbf{How the final full model is formed in Multi-head Split Learning?}} Unlike SFL, MHSL removes the fed server and the synchronization of $W_c^i$ at the end of each epoch. During the whole training, $W_c^i$ are trained independently by their clients with the server. But, at the end of the whole training, the global full model $W$ is constructed from any one $W_c^i$ and concatenating it with $W_s$. To enable this way of constructing the final trained model, we keep the test data the same over all clients and only keep the training data localized. Thus, if the test results for all clients are similar, then it is reasonable to pick any $W_c^i$ for the final full model. Our program is written using python 3.7.6 and PyTorch 1.2.0 library. The experiments are conducted in a system having a Tesla P100-PCI-E-16GB GPU machine. We observe the training and testing loss and accuracy at each global epoch (once the server trains with all the activation vectors received from all clients). We consider the client-level performance. All the clients were selected to participate at least once at a global epoch without repetition for the current setup. \begin{figure}[] \centering \setlength \fboxsep{0pt} \setlength\fboxrule{0.25pt} \fbox{\includegraphics[width=3.5in]{image/NFL_Splitfedv2.png}} \caption{Multi-head split learning architecture.} \label{fig:SplitfedV2WCA} \vskip-15pt \end{figure} \subsection{Dataset} \label{sec:Dataset} For our experiments, two widely used image datasets, namely, MNIST and CIFAR-10, are selected. Moreover, this dataset maintains the closeness of our results with the reported results in the original paper SplitFedV2. MNIST~\cite{lecun1998mnist} dataset consists of 60,000 images in the training dataset and 10,000 images in the test dataset. The dimension of each of the images in the MNIST dataset is 784 ($28\times28$) in grayscale. Another dataset used for experimentation is CIFAR-10 \cite{krizhevsky2009learning}, consisting of 50,000 images in the training set and 10,000 images in the test dataset. Each image corresponds to the dimension of 3072 ($32\times32$). For the summary, refer to Table~\ref{tab:dataset}. Both of the datasets have ten classes for prediction. For the experimentation, color random horizontal flipping, random rotation, normalization, and cropping on MNIST and CIFAR-10 are conducted to avoid the problem of over-fitting. In addition, for all our experiments, data is assumed to be uniformly and identically distributed amongst five clients. \begin{table} \caption{\label{tab:dataset}Datasets used in our experiment setup.} \footnotesize \centering \begin{tabular}{cccc} \hline Dataset & \multicolumn{2}{c} { Training samples Testing samples } & Image size \\ \hline MNIST & 60,000 & 10,000 & $28 \times 28$ \\ \hline CIFAR-10 & 50,000 & 10,000 & $32 \times 32$ \\ \hline \label{tab:dataset} \end{tabular} \vspace{-0.5cm} \end{table} \subsection{Models} ResNet-18~\cite{he2016deep} network architecture is used for the primary experimentation on the MNIST and CIFAR-10 datasets. The ResNet-18 network was selected because of the discrete ``blocks" structure in every layer of the architecture~\cite{he2016deep}, and it is a standard model for image processing. Resnet-18 blocks were used to split the Resnet-18 between the clients and server to form the client-side and server-side models. Each block performs an operation; an operation in block refers to passing an image through a convolution, batch normalization, and a ReLU activation excluding the last operation in the block. Resnet-18 in the experiment is initialized with a learning rate of 1e-4, and the mini-batch size of BN was set to 64 based on the initial experimentation~\ref{subsec:baseline}. In addition, the first convolutional layer kernel size was set to 7x7, remaining convolutional layers used 3x3 kernels as described in the model architecture Table~\ref{tab:model}. \begin{table} \caption{\label{tab:model}Model Architecture used in the experimental setup.} \footnotesize \centering \begin{tabular}{cccc} \hline Architecture & No. of parameters & Layers & Kernel size \\ \hline ResNet18~\cite{he2016deep} & $11.7$ million & 18 & $(7 \times 7),(3 \times 3)$ \\ \hline \label{tab:model} \end{tabular} \vspace{-0.5cm} \end{table} \section{Results} \label{sec:result} This section presents the empirical results on the MNIST and CIFAR-10 datasets. The results are divided into three parts. First, section~\ref{subsec:baseline} offers results obtained while training the centralized version of the Resnet-18 on the CIFAR-10 and MNIST datasets. In this section~\ref{subsec:baseline}, we compare the results of SplitFedV2 and MHSL on MNIST and CIFAR-10 datasets. For both datasets, we consider five clients to have comparable results, as shown in SplitFedv2 research~\cite{thapa2020splitfed}. In both the architecture, we have kept the initial layer inside the clients (as a client-side model portion), and the rest of the layers reside in the server (as a server-side model portion). Finally, in section~\ref{subsec:rq2}, we have presented our empirical results indicating the impact of the model split on the overall performance of the ResNet-18 model. \subsection{Baseline result} \label{subsec:baseline} For the baseline, MNIST and CIFAR-10 are subjected to ResNet-18 model architecture. For both the datasets, data-augmentation techniques are the same as discussed in the section~\ref{sec:Dataset}. Training of the ResNet-18 model is done in a centralized manner, i.e., the whole model resided in the server without any split, and all data are available to the server. The convergence curves of both the train and test accuracies for both datasets are shown in Figure~\ref{fig:baseline}. \begin{figure}[] \centering \setlength \fboxsep{0pt} \setlength\fboxrule{0.25pt} \subfigure[]{ \fbox{\includegraphics[width=0.45\columnwidth]{image/MNIST_Centralised.png}} } \hskip2pt \subfigure[]{ \fbox{\includegraphics[width=0.45\columnwidth]{image/CIFAR_Centralised.png}} } \caption{Train and test Accuracy of ResNet18 model on MNIST and CIFAR-10 in the centralized training.} \label{fig:baseline} \end{figure} \subsection{Experiment1: Corresponding to \textbf{RQ1}} \label{subsec:rq1} This section evaluated the impact of client-side aggregation by splitting the model on the first layer. The very first layer reside at the client-side (client-side model portion) and the remaining on the server-side (server-side model portion). Experimental results in terms of test accuracy on MNIST and CIFAR-10 dataset with and without client-side aggregation are shown in Figure~\ref{fig:rq1}. \begin{figure}[] \centering \setlength \fboxsep{0pt} \setlength\fboxrule{0.25pt} \subfigure[]{ \fbox{\includegraphics[width=0.45\columnwidth]{image/MNIST_RQ1.png}} } \hskip2pt \subfigure[]{ \fbox{\includegraphics[width=0.45\columnwidth]{image/CIFAR_RQ1.png}} } \caption{Test accuracy with client side aggregation (i.e., SFL) and without client-side aggregation (i.e., MHSL) on (a) MNIST and (b) CIFAR-10.} \label{fig:rq1} \end{figure} From the results in Figure~\ref{fig:rq1}(a), it is evident that results are similar for SFL and MHSL. For CIFAR-10, the performance for both SFL and MHSL are quite lower than the baseline, but the result is better in the case of MNIST. \subsection{Experiment2: Corresponding to RQ2} \label{subsec:rq2} This section evaluated the impact of the model split on the overall performance. Test accuracy on MNIST is shown in Figure~\ref{fig:rq2}. \begin{figure}[] \centering \setlength \fboxsep{0pt} \setlength\fboxrule{0.25pt} \subfigure[]{ \fbox{\includegraphics[width=0.45\columnwidth]{image/RQ2_MNIST_1.png}} } \hskip2pt \subfigure[]{ \fbox{\includegraphics[width=0.45\columnwidth]{image/RQ2_MNIST_2.png}} } \caption{Test accuracy of ResNet-18 on MNIST (a) with client-side aggregation (i.e., SFL) and (b) without client-side aggregation (i.e., MHSL).} \label{fig:rq2} \end{figure} \begin{table}[] \caption{Test Accuracy of ResNet-18 with the model split on different layers.} \label{tab:rq2_l} \resizebox{\textwidth}{!}{% \begin{tabular}{|l|r|r|r|r|r|r|r|r|r|} \hline \textbf{Split at layer} & \multicolumn{1}{l|}{\textbf{L1}} & \multicolumn{1}{l|}{\textbf{L2}} & \multicolumn{1}{l|}{\textbf{L3}} & \multicolumn{1}{l|}{\textbf{L4}} & \multicolumn{1}{l|}{\textbf{L5}} & \multicolumn{1}{l|}{\textbf{L6}} & \multicolumn{1}{l|}{\textbf{L7}} & \multicolumn{1}{l|}{\textbf{L8}} & \multicolumn{1}{l|}{\textbf{L9}} \\ \hline \textbf{Model with Client-Side Aggregation} & 98.54 & 98.46 & 98.56 & 98.54 & 98.37 & 98.21 & 97.84 & 98.13 & 98.25 \\ \hline \textbf{Model without Client-Side Aggregation} & 97.23 & 97.36 & 96.98 & 96.71 & 96.79 & 96.92 & 96.93 & 96.95 & 97.19 \\ \hline \end{tabular}% } \end{table} From Table~\ref{tab:rq2_l}, it is evident that SFL and MHSL show a comparable test performance. Overall, our empirical results (both under \textbf{RQ1} and \textbf{RQ2} demonstrate that Multi-head Split Learning (MHSL) is feasible, and there is no significant impact on the performance due to the model split at the various layers of the ResNet-18 model. \section{Conclusion and future works} \label{sec:conclusion} This paper studied SplitFed Learning (SFL) without client-side model synchronization called Multi-head Split Learning (MHSL). Our experiments with ResNet-18 on the MNIST dataset demonstrated that MHSL is feasible. In other words, our studies suggested that the fed server and the client-side model synchronization can be removed from SFL to reduce the communication and computation overhead at the client side. In addition, our experiments with different combinations of model portion size at the client-side and the server-side found a negligible effect on the overall performance. This suggests the possibility of dynamic allocation of layers to the clients based on the computation power without any significant loss in the model performance. This paper is the first step to find the feasibility of MHSL and the effect of the split network portion sizes to the overall performance. In the future, it will be interesting to see more exhaustive experiments and theoretical analysis on the convergence guarantee with the different models, various datasets, and under a larger number of clients in the experimental setup. Also, experimenting with the setup for non-IID data setup will be another research direction that can be explored. \begin{acknowledgments} This work was supported in part by the financial support of ADVANCE CRT PHD Cohort under Grant Agreement No.18/CRT/6222 and at the ADAPT SFI Research Centre at Munster Technological University. The ADAPT SFI Centre for Digital Media Technology is funded by Science Foundation Ireland through the SFI Research Centres Programme and is co-funded under the European Regional Development Fund (ERDF) through Grant 13/RC/2106. \end{acknowledgments} {\footnotesize
\section*[.]{..} \newtheorem{lemma}{Lemma} \newcommand\norm[1]{\left\lVert#1\right\rVert} \newcommand{\given}{\,\vert\,} \newtheorem{prop}{Proposition} \newtheorem{corollary}{Case}[prop] \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareFloatingEnvironment[name={Supplementary Figure},fileext=lof]{suppfigure} \pgfplotsset{compat=1.17} \begin{document} \title{ Optimal Ensemble Construction \\ for Multi-Study Prediction with Applications to COVID-19 Excess Mortality Estimation } \author{Gabriel Loewinger,$^{\dagger,1}$ Rolando Acosta Nunez,$^{\dagger}$ Rahul Mazumder$^{\ddag}$ and Giovanni Parmigiani$^{\dagger, \ast}$ \\[4pt] $^{\dagger}$\textit{Department of Biostatistics, Harvard School of Public Health, Boston, MA} \\[2pt] $^{\ddag}$\textit{MIT Sloan School of Management, Operations Research Center and MIT Center for Statistics, Cambridge, MA} \\[2pt] $^{\ast}$\textit{Department of Data Science, Dana Farber Cancer Institute, Boston, MA}} \renewcommand{\shorttitle}{Optimal Ensemble Construction} \maketitle \footnotetext[1]{To whom correspondence should be addressed. \textit{<EMAIL>}} \hypersetup{ pdfkeywords={First keyword, Second keyword, More}, } \begin{abstract}{ It is increasingly common to encounter prediction tasks in the biomedical sciences for which multiple datasets are available for model training. Common approaches such as pooling datasets and applying standard statistical learning methods can result in poor out-of-study prediction performance when datasets are heterogeneous. Theoretical and applied work has shown \textit{multi-study ensembling} to be a viable alternative that leverages the variability across datasets in a manner that promotes model generalizability. Multi-study ensembling uses a two-stage \textit{stacking} strategy which fits study-specific models and estimates ensemble weights separately. This approach ignores, however, the ensemble properties at the model-fitting stage, potentially resulting in a loss of efficiency. We therefore propose \textit{optimal ensemble construction}, an \textit{all-in-one} approach to multi-study stacking whereby we jointly estimate ensemble weights as well as parameters associated with each study-specific model via a unified optimization formulation. We establish that limiting cases of our approach yield existing methods such as multi-study stacking and pooling datasets before model fitting. We propose an efficient block coordinate descent algorithm to optimize the proposed loss function. We compare our approach to standard methods by applying it to a multi-country COVID-19 dataset for baseline mortality prediction. We show that when little data is available for a country before the onset of the pandemic, leveraging data from other countries can substantially improve prediction accuracy. Importantly, our approach outperforms multi-study stacking and other standard methods in this application. We further characterize the method's performance in data-driven simulations and other numerical experiments. Our method remains competitive with or outperforms multi-study stacking and other earlier methods across a range of between-study heterogeneity. } \end{abstract} \newpage \section{Introduction} \label{sec1} \subsection{Background} Statistical methods to leverage information from different studies and sources are critical for generating prediction algorithms that are replicable across populations and experimental settings. The increasing availability of biomedical databases in, for example, neuroimaging (OpenNeuro \citep{openneuro}), genetics (e.g., GWAS Catalogue \citep{gwas}), HIV (Stanford HIV database \citep{Ramon}) and cancer genomics \citep{ovarian, geo} has resulted in increased interest in the utilization of data from multiple sources when training prediction algorithms. This is further motivated by the observation that prediction performance assessed within-study (e.g., with cross validation) is often far more optimistic than the performance evaluated out-of-study \citep{Ma, Chang, Bernau}. Despite promising initial progress, much remains to be investigated on how to combine information across datasets or ``studies'' in a manner that promotes model generalizability. A simple, but at times powerful approach is to merge datasets before model fitting. This can fail to capture, however, the heterogeneity across datasets and can therefore perform poorly when studies are heterogeneous. In this case different models for each study may lead to better fits, and their ensemble to better out-of-study predictions \citep{Patil, Guan}. To account for the heterogeneity, one approach is to pre-process the studies with data harmonization techniques before model fitting \citep{combatMultiCenter, ZhangY}. While this is generally helpful, it can be insufficient, and potentially remove genuine signal \citep{Nygaard, combatLimits}. \subsection{Related Literature}\label{subs:previous} Multiple related sub-fields of transfer learning \citep{DA_TL_review} contain a rich body of methodologies geared towards the multi-study problem specifically as well as the ``dataset shift'' issue more generally. Broadly speaking, these methods aim to deal with variation in the distribution of the training and test dataset(s). ``Concept shift'' refers to changes in the conditional probability of labels given predictors, while ``covariate shift,'' describes discrepancies in the joint distribution of the covariates between training and test data. ``Hybrid shift'' describes the case when both concept and covariate shift occur \citep{DA_TL_review, Yang}. Our motivating application can be described as a multi-source transfer learning problem \citep{multiSourceTL, DA_TL_review}. These describe settings where the modeler has a small sample of labeled training data drawn from the distribution of interest, but seeks to enhance prediction performance through borrowing labeled data from other related studies, or ``domains.'' Typically these other auxiliary data sources share common covariates and outcomes. The distribution of these data are thought to be similar to the distribution of the data of the target study. This is closely related to multi-source domain adaptation which proposes strategies that use information from multiple datasets, but also leverage the covariates of the test set to tailor the model to the target domain \citep{DA_TL_review, domainAdptReview}. The domain generalization literature focuses on leveraging multiple datasets in model training to improve model generalizability, to enhance prediction performance on a new, unknown, but related, ``domain'' \citep{domGen_review}. Our methods are inspired both by this vast literature in transfer learning as well as related methods in ``multi-study'' statistics that aim to draw upon multiple data sources in inference \citep{jordan, ibrahim2020}, supervised prediction \citep{Loewinger, Guan, Ramchandran, ren}, and unsupervised learning \citep{multiStudyFactor, factorAnaly}. Previous work in this area proposed multi-study ensembling in conjunction with a generalization of stacking, an ensemble weight estimation method \citep{Breiman2}, as a flexible strategy to aggregate information from different studies \citep{Patil, Ramchandran, Loewinger, ren, Guan}. The approach involves two separate stages: A) training one or more models on each study separately, and B) constructing an ensemble prediction rule that is a weighted average of the predictions from each of the study-specific models. The ensemble weights are estimated in step B through ``multi-study stacking,'' (MSS) by regressing the outcome of all training studies against the predictions of each of these models, using all available training data sets. Heuristically, this method rewards cross-study prediction performance by determining the ensemble weight associated with a model fit on one study based upon how well that model predicts across all the training data sets. To formalize, we assume we have $K$ training studies and we denote the outcome vector of training study $k$ as $\mathbf{y}_k \in \mathbb{R}^{n_k}$, and its design matrix as $\mathbb{X}_k \in \mathbb{R}^{n_k \times (p + 1)}$. In addition to~$p$ predictors, $\mathbb{X}_k$ includes a column of ones for an intercept. We let $N = \sum_{k=1}^K n_k$. Multi-study stacking as originally proposed consists of two stages. In stage~A) we separately fit models $\mathbf{\hat{Y}}_k (\cdot)$ on data from the $k^{th}$ study, for every $k$. In stage~B) we compute predictions made by these models at the observed covariates of study $k'$ as $\mathbf{\hat{Y}}_k (\mathbb{X}_{k'})$ for every $k'$. Define $\mathbf{y}$ and $\hat{\mathbb{X}}$ as follows: \[ \mathbf{y} = \begin{bmatrix} \mathbf{y}_{1}\\ \vdots \\ \mathbf{y}_{K}\\ \end{bmatrix}_{N \times 1}~~~~~~~~ \mathbb{\hat{X}} = \begin{bmatrix} {\mathbf{\hat{Y}}_1} (\mathbb{X}_{1}) & {\mathbf{\hat{Y}}_2} (\mathbb{X}_{1}) & ... & {\mathbf{\hat{Y}}_K} (\mathbb{X}_{1})\\ \vdots & \vdots &\ddots & \vdots\\ \mathbf{\hat{Y}}_1 (\mathbb{X}_{K}) & {\mathbf{\hat{Y}}_2} (\mathbb{X}_{K}) & ... & {\mathbf{\hat{Y}}_K} (\mathbb{X}_{K})\\ \end{bmatrix}_{N \times K} \] We then fit a stacking regression to predict $\mathbf{y}$ given $\hat{\mathbb{X}}$ using, for example, non-negative least squares (NNLS) or Ridge regression, typically with an intercept term. The resulting coefficients serve as the weights of the ensemble prediction and are denoted by the $p+1$ dimensional vector~$\hat{\boldsymbol{w}}$. At data point $\mathbf{x}$ the prediction rule is $\mathbf{\hat{Y}}_{Stack} \left ( \mathbf{x} \right ) = \hat{w_0} + \sum_{k=1}^K \hat{w_k} \mathbf{\hat{Y}}_k \left ( \mathbf{x} \right)$. Theoretical work has described settings in which this type of ensembling is expected to outperform merging data sets before model fitting here labeled ``Trained-on-the-Merged dataset'' (ToM). For example \cite{Guan} compare the ToM approach to ensembling when the learner is either linear or Ridge regression, under a linear mixed effects data generating model where true regression coefficients vary with $k$. They show that when between-study heterogeneity, as measured by the variance of the random regression coefficients, is sufficiently high, ensembling is expected to outperform~ToM. Subsequent work generalized multi-study ensembling and formalized two approaches: {\it generalist stacking} (described above) for domain generalization settings, in which we aim to train models that generalize to an unseen study, and {\it specialist stacking} for multi-source transfer learning settings, in which we aim to tailor the ensemble to predict well on a target study for which labeled data is available at the time of model training \citep{ren}. For example, say we wish to engineer the ensemble to predict well on future data that follows the same distribution as data from training study $k^*$, where $k^* \in [K]$ and $[K]$ denotes the set $\{1,2,...,K\}$. This can be accomplished by regressing $\mathbf{y}_{k^*}$ onto $\hat{\mathbb{X}}_{k^*}$ where $\hat{\mathbb{X}}_{k^*} = \begin{bmatrix} {\mathbf{\hat{Y}}_1} (\mathbb{X}_{k^*}) & {\mathbf{\hat{Y}}_2} (\mathbb{X}_{k^*}) & ... & {\mathbf{\hat{Y}}_K} (\mathbb{X}_{k^*}) \end{bmatrix}_{n_{k^*} \times K}$. By setting up the stacking regression in this manner, specialist stacking estimates ensemble weights appropriate for data similar to training set $k^*$. Similar architecture for stacking in transfer learning settings has been proposed previously \citep{stacktrans}. \cite{ren} further proposed a ``no data reuse'' (NDR) specialist stacking procedure that excludes data used in stage~A from the stage~B stacking. Briefly, this is accomplished by dividing training data for the target study into $L$ folds. Taking $L=2$ for ease of explanation, let the data in the two folds be $\{\mathbf{y}_{k^*}^1, \mathbb{X}_{k^*}^1\}$ and $\{\mathbf{y}_{k^*}^2, \mathbb{X}_{k^*}^2\}$. Then train model $\mathbf{\hat{Y}}_{k^*}^1()$ on $\{\mathbf{y}_{k^*}^1, \mathbb{X}_{k^*}^1\}$ and a separate model, $\mathbf{\hat{Y}}_{k^*}^2()$, on $\{\mathbf{y}_{k^*}^2, \mathbb{X}_{k^*}^2\}$. Then when fitting the stacking regression, data reuse is avoided by using $\mathbf{\hat{Y}}_{k^*}^2()$ to make predictions on $\{\mathbf{y}_{k^*}^1, \mathbb{X}_{k^*}^1\}$ and vice-versa. Specifically, the stacking procedure involves regressing $\mathbf{y}_{k^*}$ onto $\hat{\mathbb{X}}_{k^*}$ where \[ \mathbf{y}_{k^*} = \begin{bmatrix} \mathbf{y}_{k^*}^1\\ \mathbf{y}_{k^*}^2\\ \end{bmatrix}_{n_{k^*} \times 1}~~~~~~~~ \mathbb{\hat{X}}_{k^*} = \begin{bmatrix} {\mathbf{\hat{Y}}_1} (\mathbb{X}_{k^*}^1) & {\mathbf{\hat{Y}}_2} (\mathbb{X}_{k^*}^1) & ... & {\mathbf{\hat{Y}}_{k^*}}^2 (\mathbb{X}_{k^*}^1) & ... & {\mathbf{\hat{Y}}_K} (\mathbb{X}_{k^*}^1)\\ {\mathbf{\hat{Y}}_1} (\mathbb{X}_{k^*}^2) & {\mathbf{\hat{Y}}_2} (\mathbb{X}_{k^*}^2) & ... & {\mathbf{\hat{Y}}_{k^*}}^1 (\mathbb{X}_{k^*}^2) & ... & {\mathbf{\hat{Y}}_K} (\mathbb{X}_{k^*}^2)\\ \end{bmatrix}_{n_{k^*} \times K} . \] In practice this is implemented with more than two folds. After the estimation of ensemble weights, a third stage is implemented in which a final model for study $k^*$, $\mathbf{{Y}}_{k^*}()$, is fit using $\{ \mathbf{y}_{k^*}, \mathbb{X}_{k^*} \}$ (i.e., all available data for that study). This model is then used in the final prediction rule, $\mathbf{\hat{Y}}_{Stack} \left ( \mathbf{x} \right ) = \hat{w}_0 + \sum_{k=1}^K \hat{w}_k \mathbf{\hat{Y}}_k \left ( \mathbf{x} \right)$ In this paper we propose a simpler version of no data reuse specialist stacking, which does not require splitting the data into folds, and is amenable to a simple optimization formulation. In stage A), this algorithm trains single-study learners on all studies except the target study $k^*$. In stage B), it only uses the target training data $\{\mathbf{y}_{k^*}, \mathbb{X}_{k^*}\}$ by regressing $\mathbf{y}_{k^*}$ onto the \[\begin{bmatrix} {\mathbf{\hat{Y}}_1} (\mathbb{X}_{k^*}) & ... & \mathbf{\hat{Y}}_{k^* - 1} (\mathbb{X}_{k^*}) & \mathbf{\hat{Y}}_{k^* + 1} (\mathbb{X}_{k^*}) & ... & {\mathbf{\hat{Y}}_K} (\mathbb{X}_{k^*}) \end{bmatrix}_{n_{k^*} \times {K-1}} \] matrix. Stage A) builds an ensemble that captures the heterogeneity of data distributions. Stage B) specializes the weights of the ensemble to perform well on the target study. We refer to this variant as "no-data-reuse specialist stacking" throughout the manuscript. \subsection{Optimal Ensemble Construction: \\ A general framework for simultaneous model parameter and model weight estimation} The multi-study ensembling procedures described above are flexible and easy to implement, but one potential shortcoming is that ensemble weights and study-specific model parameters are estimated separately in each stage. These approaches may therefore lose efficiency because the ensemble properties are ignored in stage A). The main thrust of this work is to integrate both stages into a single and explicit optimization framework. We propose a method based on multi-study ensembling and stacking that seeks to improve prediction performance by \emph{jointly} optimizing model parameters and ensemble weights. We term this ``all-in-one'' approach as \textit{optimal ensemble construction} (OEC). We formalize this below as a convex combination of the sum of study-specific model losses (e.g., study-specific mean square errors) and the stacking regression loss function. As an initial foray into this area, our work investigates linear models. We show that in this case the OEC yields standard stacking and the ToM as special cases of our framework. While we focus on linear models in this work, we note that our framework is general and may be applied to other predictive models as well. \subsection{Motivation: Counterfactual COVID-19 mortality estimation} Our work was initially motivated by the estimation of COVID-19 related mortality. International comparisons of COVID-19 specific death counts suffer from important limitations. For example, due to health systems heterogeneity, the criteria for what constitutes a COVID-19 death is different across countries \citep{karanikolos2020comparable}. In part, these criteria depend on the testing capacity of the jurisdiction, which can be sub-optimal in underdeveloped countries \citep{owidcoronavirus}. Hence, excess mortality is regarded as the gold-standard method of estimating the direct and indirect effects of the COVID-19 pandemic \citep{goldstandard} and is calculated by subtracting the number of deaths that would have been expected to occur in a locality (e.g., based on historical trends) from the number of observed deaths. In many countries, infrastructure to monitor mortality before and during a disaster is not yet fully established \citep{Karlinsky, fottrell2009dying}. Such countries may have limited data to estimate baseline mortality before the onset of a disaster, such as a pandemic, and hence the resulting estimates of excess mortality may be unreliable. For instance, \citet{Karlinsky} contacted officials in a host of countries to collect international mortality data to produce a database for the comparison and assessment of public health strategies. Many officials indicated that no data or very limited data was available prior to the onset of COVID-19. Although only a minority of nations world-wide provided any public data, \citet{Karlinsky} quoted responses from health officials in countries such as Argentina, China, India, Liberia and Vietnam to emphasize that many countries do not have the resources to collect sufficient mortality data. The following quote from a Liberian health official speaks volumes about this ongoing challenge~\citep{Karlinsky}: \begin{quote} \emph{``Unfortunately, we do not have a mechanism in place at the moment to capture routine mortality data in-country nation-wide...As you may also be aware, death or mortality registration or reporting is yet a huge challenge in developing countries...''} \end{quote} Even among countries that collected pre-pandemic data, samples were often limited to as little as one year of pre-pandemic data (e.g., South Africa) \citep{Karlinsky,financial}. Even further, some countries only provided quarterly or monthly data (e.g., Iran, Taiwan) which may not provide the temporal resolution needed for precise assessment of public health responses. This motivates the implementation of multi-study methods to borrow information across countries to create better baseline mortality estimates. Leveraging information from other countries' data may improve baseline mortality estimates on the target country because shared latent factors (e.g., geographic, health systems, weather patterns) may have similar impacts on mortality trends across countries. While these factors may not be comparable across all observed countries, there may exist clusters of countries across which borrowing information is useful. Identifying $a~priori$ which countries to borrow information from may not be reliable, as even natural heuristics such as geographic proximity may be unreliable. Thus we sought to develop methods that could identify which countries would provide auxiliary data that could improve the estimation of baseline mortality for a target country in a data-driven fashion. To this end, we compare the prediction capabilities of the proposed methods against conventional approaches by using a multi-country dataset of weekly death counts for 38 countries (\textit{i.e.}, $K=38$ studies) \citep{hmd}, where we aim to predict baseline mortality in a country of interest. \section{Methods} \label{sec2} \subsection{Notation and Problem Statement} We next build on the notation introduced earlier and specify distributional assumptions. We assume we have $K$ observed studies available for model training. The pair of outcomes and covariates for study $k$ is $\{ \mathbf{y}_k, \mathbb{X}_k \}$. The merged dataset has outcome variable $\mathbf{y} \in \mathbb{R}^N$ and design matrix $\mathbb{X} \in \mathbb{R}^{N \times (p+1)}$ where, $N = \sum_k n_k$. We assume that the outcome ${y}_{k,i}$ for observation $i$ in study $k$ is conditionally distributed as $y_{k,i} \given \mathbf{x}_{k,i} \sim f_{y_k \given x_k}(\mathbf{y}_k\given\mathbb{X}_k)$, and that marginally the covariates $\mathbf{x}_{k,i}$ are distributed as $\mathbf{x}_{k,i} \sim f_{x_k}(\mathbb{X}_k)$. We assume that the conditional distributions of the outcome given the covariates may differ across studies. We explore both settings where the marginal distributions of the covariates, $f_{x_k}(\mathbb{X}_k)$, differ across studies, and where they are approximately the same. In the two-stage multi-study stacking method discussed in Section~\ref{subs:previous}, we distinguish between the model {\it parameters} (e.g., the coefficients in a linear model) and the ensemble {\it weights} used to aggregate predictions from different models. We refer to statistical learning methods (e.g., linear models, as this is our focus here) to be fit on a single study as single study learners (SSL). We denote the model parameters associated with a fit to the $k^{th}$ study as ${\boldsymbol{\gamma}}_k\in \mathbb{R}^{p+1}$. For example, in the squared $\ell_2$ penalized linear regression setting, $\hat{{\boldsymbol{\gamma}}}_k$ is the solution to the following \begin{equation} \min_{\boldsymbol{\gamma}_k} \norm{ \mathbf{y}_k - \mathbb{X}_k \boldsymbol{\gamma}_k}^2_2 + \lambda \norm{\mathbb{D}_{p+1} \boldsymbol{\gamma}_k}_2^2, \label{eq:ssm} \end{equation} where $\mathbb{D}_{r} \in \mathbb{R}^{r \times r}$ is a diagonal matrix with the (1,1)-th location equal to zero and all other diagonal entries equal to one to prevent regularization of the intercept. We denote the estimates of model parameters obtained from a fit to the merged dataset as $\hat{{\boldsymbol{\gamma}}}^{\text{ToM}}$. For example, in the squared $\ell_2$ penalized linear regression setting, ${\boldsymbol{\gamma}}^{\text{ToM}}$ is a solution to: \begin{equation} \min_{\boldsymbol{\gamma}^{\text{ToM}}} \norm{ \mathbf{y} - \mathbb{X} \boldsymbol{\gamma}^{\text{ToM}}}^2_2 + \lambda \norm{\mathbb{D}_{p+1} \boldsymbol{\gamma}^{\text{ToM}}}_2^2 . \label{eq:tom} \end{equation} We refer to variations of two-stage multi-study methods as ``generalist'' or ``specialist'', depending on the goal. For specialist methods, we further indicate whether we used a ``no data reuse'' variation. We abbreviate the multi-study stacking generalist as MSS$^{\text{G}}$, the specialist as MSS$^{\text{S}}$ and the no data reuse specialist as MSS$^{\text{SN}}$. We denote the corresponding ensemble (stacking) weights associated with a model fit to study $k$ as ${w}_k^{\text{G}}$, ${w}_k^{\text{S}}$ or ${w}_k^{\text{SN}}$. We do not need to distinguish between model parameters for different MSS procedures because they are equal for all MSS methods; only ensemble weights, estimated in stage B), differ. We refer to the two-stage multi-study stacking methods collectively as MSS methods. Similarly, we collectively refer to the optimal ensemble approaches as OEC methods. \subsection{Optimal Ensemble Construction} We now introduce the OEC counterparts of MSS$^{\text{G}}$, MSS$^{\text{S}}$ and MSS$^{\text{SN}}$, which we refer to as OEC$^{\text{G}}$, OEC$^{\text{S}}$ and OEC$^{\text{SN}}$, respectively. We consider a single SSL per study. To avoid confusion with the two-stage multi-study stacking of section~\ref{subs:previous}, we denote the model parameters associated with the SSL fit to data from study $k$ as $\boldsymbol{\beta}_k^{\text{G}}$, $\boldsymbol{\beta}_k^{\text{S}}$, $\boldsymbol{\beta}_k^{\text{SN}} \in \mathbb{R}^{p+1}$ and the ensemble weights by $\alpha^{\text{G}}_k$, $\alpha^{\text{S}}_k$ and $\alpha^{\text{SN}}_k$, respectively. We also include ensemble intercepts that we do not constrain to be non-negative which we denote $\alpha_0^{\text{G}}$, $\alpha_0^{\text{S}}$, $\alpha_0^{\text{SN}}$. We denote the corresponding vectors, which include both the study-specific ensemble weights and the intercept, by $\boldsymbol{\alpha}^{\text{G}}, \boldsymbol{\alpha}^{\text{S}} \in \mathbb{R}^{p+1}$, and $\boldsymbol{\alpha}^{\text{SN}}\in \mathbb{R}^{p}$. We denote $\mathbb{B}^{\text{G}}$, $\mathbb{B}^{\text{S}} \in \mathbb{R}^{p+1 \times K}$ and $\mathbb{B}^{\text{SN}} \in \mathbb{R}^{p \times K}$ to be matrices of study-specific model coefficients. For example, column $k$ of $\mathbb{B}^{\text{G}}$ is equal to $\boldsymbol{\beta}_k^{\text{G}}$. The SN parameters $\boldsymbol{\alpha}^{\text{SN}}$ and $\mathbb{B}^{\text{SN}} \in \mathbb{R}^{p \times K}$ have dimension $p$ rather than $p+1$ as they do not contain components corresponding to study $k^*$, as we will further clarify later. Here we focus on the linear-linear OEC, where the optimal coefficients for SSL and the ensemble weights are given by solutions to the following joint optimization formulations. \paragraph{Generalist OEC~ (\text{OEC$^{\text{G}}$}):} We begin with the generalist OEC loss function, defined in the linear-linear case as \begin{align*} &\underset{ \boldsymbol{\alpha}^{\text{G}} \geq \mathbf{0}, ~\alpha_0^{\text{G}} } {\mbox{min}} ~~~ \underset{\mathbb{B}^{\text{G}}} {\mbox{min }} ~ \left\{ \eta~ \left[ \frac{1}{2N} \norm{\boldsymbol{y} - \alpha_0^{\text{G}} \mathbbm{1} - \sum_{k=1}^K \alpha_k^{\text{G}} \mathbb{X} \boldsymbol{\beta}_k^{\text{G}} }_2^2 + \frac{\mu}{2} \norm{\mathbb{D}_{K+1} \boldsymbol{\alpha}^{\text{G}} }_2^2 \right] \right. + \notag \\ & ~~~~~~~~~~~~ \qquad \qquad \quad (1-\eta) \left. \left[ \sum_{k=1}^K \frac{1}{2n_k} \norm{\boldsymbol{y}_k - \mathbb{X}_k \boldsymbol{\beta}_k^{\text{G}}}_2^2 + \frac{1}{2} \sum_{k=1}^K \lambda_k \norm{\mathbb{D}_{p+1} \boldsymbol{\beta}_k^{\text{G}} }_2^2 \right ] \right\} \tag{1} \label{eq:gen} \end{align*} where dimensions are as specified above, and where $\mu$ and $\lambda_k$'s are regularization parameters for the corresponding regression models. The top term in \eqref{eq:gen} is the loss for the (penalized) non-negative least squares regression used to calculate ensemble weights, and the bottom term in \eqref{eq:gen} is the sum of study-specific Ridge-regularized least squares loss functions. The overall objective function is a convex combination of these two terms---the weight $\eta$ controls whether the optimization procedure will seek better study-specific SSL fits (low $\eta$) or fits of the SSLs that better contribute to the ensemble as a whole (high $\eta$). \paragraph{Specialist OEC~ (\text{OEC$^{\text{S}}$}):} The OEC$^{\text{S}}$ formulation is similar except that only data from the target study, $k^*$, is included in the portion of the objective function involving ensemble weights. The resulting optimization formulation is \begin{align} &\underset{ \boldsymbol{\alpha}^{\text{S}} \geq \mathbf{0}, ~\alpha_0^{\text{S}} } {\mbox{min}} ~~~ \underset{\mathbb{B}^{\text{S}}} {\mbox{min }} ~ \left\{ \eta~ \left[ \frac{1}{2n_{k^*}} \norm{\boldsymbol{y}_{k^*} - \alpha_0^{\text{S}} \mathbbm{1} - \sum_{k=1}^K \alpha_k^{\text{S}} \mathbb{X}_{k^*} \boldsymbol{\beta}_k^{\text{S}} }_2^2 + \frac{\mu}{2} \norm{\mathbb{D}_{p+1} \boldsymbol{\alpha}^{\text{S}} }_2^2 \right] \right. + \notag \\ & ~~~~~~~~~~~~ \qquad \qquad \quad (1-\eta) \left. \left[ \sum_{k=1}^K \frac{1}{2n_k} \norm{\boldsymbol{y}_k - \mathbb{X}_k \boldsymbol{\beta}_k^{\text{S}}}_2^2 + \frac{1}{2} \sum_{k=1}^K \lambda_k \norm{\mathbb{D}_{K+1} \boldsymbol{\beta}_k^{\text{S}} }_2^2 \right ] \right\} \tag{2} \label{eq:spec} \end{align} \paragraph{No Data Reuse Specialist OEC~(\text{OEC$^{\text{SN}}$}):} Formulation~\eqref{eq:spec} can be modified to yield the OEC$^{\text{SN}}$ which does not include a study-specific learner for the target study, $k^*$ and determines parameters and weights by solving: \begin{align} &\underset{ \boldsymbol{\alpha}^{\text{SN}} \geq \mathbf{0}, ~\alpha_0^{\text{SN}} } {\mbox{min}} ~~~ \underset{ \boldsymbol{\mathbb{B}^{\text{SN}}}} {\mbox{min} }~~~ \left\{ \eta~ \left[ \frac{1}{2n_{k^*}} \norm{\boldsymbol{y}_{k^*} - \alpha_0^{\text{SN}} \mathbbm{1} - \sum_{k \neq k^*}^K \alpha_k^{\text{SN}} \mathbb{X}_{k^*} \boldsymbol{\beta}_k^{\text{SN}} }_2^2 + \frac{\mu}{2} \norm{\mathbb{D}_{K} \boldsymbol{\alpha}^{\text{SN}} }_2^2 \right] \right. + \notag \\ & ~~~~~~~~~~~~ \qquad \qquad \quad (1-\eta) \left. \left[ \sum_{k \neq k^*}^K \frac{1}{2n_k} \norm{\boldsymbol{y}_k - \mathbb{X}_k \boldsymbol{\beta}_k^{\text{SN}}}_2^2 + \frac{1}{2} \sum_{k \neq k^*}^K \lambda_k \norm{\mathbb{D}_{p} \boldsymbol{\beta}_k^{\text{SN}} }_2^2 \right ] \right\} \tag{3} \label{eq:zero} \end{align} The parameters $\boldsymbol{\beta}^{\text{SN}}_{k^*}$ and $\alpha^{\text{SN}}_{k^*}$ are not included in the objective function or the decision variables. Throughout, we denote by $\hat{\boldsymbol{\alpha}}$ and $\hat{\boldsymbol{\beta}}$, with appropriate subscripts and superscripts, solutions of these optimization problems. We obtain these estimates by applying the block coordinate descent method described in Supplemental Figure~\ref{suppFig:opt} to the corresponding optimization problem. The loss function associated with the OEC$^{\text{SN}}$ differs from the no data reuse specialist stacking objective proposed in \cite{ren}. We implemented this modification because the algorithm proposed by \cite{ren} does not lend itself to an OEC form that rules out data reuse. While the approach does properly exclude data reuse when implemented in a two-stage procedure, a direct generalization as a joint optimization approach would not prevent reuse because the different folds of the target study data, and the corresponding model coefficients, would be tied through the shared estimation of the ensemble weight $w_{k^*}$. Throughout the paper, we distinguish between $generalist$ and $specialist$, algorithms. For this reason, when fitting a model or ensemble to make predictions on some new, unseen dataset, (denoted here as study $K+1$), we compare the performances of MSS$^{\text{G}}$, OEC$^{\text{G}}$, and ToM. When we aim to make predictions on a new observation in a target study for which we have limited training data (study $k^*$), we compare the MSS$^{\text{S}}$ with the OEC$^{\text{S}}$ and the MSS$^{\text{SN}}$ with the OEC$^{\text{SN}}$. We also compare these last four methods to SSM, a model fit only to the training data of the target study, to examine whether borrowing information is beneficial for prediction performance. The main methodological question we examine here is whether jointly optimizing ensemble weights and linear model parameters improves prediction performance above two-stage multi-study stacking. We examine this for generalist and specialist multi-study stacking. The possible ensembling methods can be described by a $2\times 2$ table: OEC/MSS $\times$ specialist/generalist. For specialist stacking, we also examine performance with and without data reuse. \subsection{Connections between OEC and earlier methods} The following observations provide insight into the properties of the OEC framework, as they show that, if both the SSL and the ensemble weight component of the loss are linear models with no regularization on model parameters or ensemble weights, then the ToM, SSM and two-stage multi-study stacking methods are special cases. We present the results in the OEC$^{\text{G}}$, OEC$^{\text{S}}$ and OEC$^{\text{SN}}$ cases specifically. Proofs can be found in Supplemental section \ref{proofs}. The optimization problems corresponding to the OEC$^{\text{G}}$, OEC$^{\text{S}}$ and OEC$^{\text{SN}}$ with no regularization on model parameters or ensemble weights are: \paragraph{\text{OEC$^{\text{G}}$} ~Without~ Regularization} \begin{align} & \min_{\substack{\boldsymbol{\alpha}^{\text{G}} \geq \mathbf{0}, ~\alpha_0^{\text{G}} \\\mathbb{B}^{\text{G}} }} \left\{ \frac{\eta}{2N} \norm{\boldsymbol{y} - \alpha_0^{\text{G}} \mathbbm{1} - \sum_{k=1}^K \alpha_k^{\text{G}} \mathbb{X} \boldsymbol{\beta}_k^{\text{G}} }_2^2 + (1-\eta) \sum_{k=1}^K \frac{1}{2n_k} \norm{\boldsymbol{y}_k - \mathbb{X}_k \boldsymbol{\beta}_k^{\text{G}}}_2^2 \right\} \tag{4} \label{eq:genProp} \end{align} \paragraph{\text{OEC$^{\text{S}}$} ~Without~ Regularization} \begin{align} & \min_{\substack{\boldsymbol{\alpha}^{\text{S}} \geq \mathbf{0}, ~\alpha_0^{\text{S}} \\\mathbb{B}^{\text{S}} }} \left\{ \frac{\eta}{2n_{k^*}} \norm{\boldsymbol{y}_{k^*} - \alpha_0^{\text{S}} \mathbbm{1} - \sum_{k=1}^K \alpha_k^{\text{S}} \mathbb{X}_{k^*} \boldsymbol{\beta}_k^{\text{S}} }_2^2 + (1-\eta) \sum_{k=1}^K \frac{1}{2n_k} \norm{\boldsymbol{y}_k - \mathbb{X}_k \boldsymbol{\beta}_k^{\text{S}}}_2^2 \right\} \tag{5} \label{eq:specProp} \end{align} \paragraph{\text{OEC$^{\text{SN}}$} ~Without~ Regularization} \begin{align} & \min_{\substack{\boldsymbol{\alpha}^{\text{SN}} \geq \mathbf{0}, ~\alpha_0^{\text{SN}} \\\mathbb{B}^{\text{SN}} }} \left\{ \frac{\eta}{2n_{k^*}} \norm{\boldsymbol{y}_{k^*} - \alpha_0^{\text{SN}} \mathbbm{1} - \sum_{k \neq k^*} \alpha_k^{\text{SN}} \mathbb{X}_{k^*} \boldsymbol{\beta}_k^{\text{SN}} }_2^2 + (1-\eta) \sum_{k \neq k^*} \frac{1}{2n_k} \norm{\boldsymbol{y}_k - \mathbb{X}_k \boldsymbol{\beta}_k^{\text{SN}}}_2^2 \right\} \tag{6} \label{eq:snProp} \end{align} Proposition \ref{eta1_minus_prop} provides insights into the optimal solutions of the OEC by characterizing how these solutions relate to parameter estimates from earlier methods. \begin{prop}\label{eta1_minus_prop} \begin{corollary}\label{eta1_minus_prop_Gen} (OEC$^{\text{G}}$) Let $(\hat{\boldsymbol{\alpha}}^{\text{G}}(\eta), \hat{\mathbb{B}}^{\text{G}}(\eta))$ be optimal solutions to optimization problem \eqref{eq:genProp}. Then as $\eta \rightarrow 1-$, $(\hat{\boldsymbol{\alpha}}^{\text{G}}(\eta), \hat{\mathbb{B}}^{\text{G}}(\eta))$ will converge to the solutions of: $$\min_{\boldsymbol{\alpha}^{\text{G}}, \mathbb{B}^{\text{G}}} \sum_{k = 1}^K \frac{1}{2n_k} \norm{\boldsymbol{y}_k - \mathbb{X}_k \boldsymbol{\beta}_k^{\text{G}}}_2^2 ~~~~~~~~~\text{s.t.}~~~ \frac{1}{2N} \norm{\boldsymbol{y} -\alpha_0^{\text{G}} \mathbbm{1} - \mathbb{X} \sum_{k = 1}^K \alpha_k^{\text{G}} \boldsymbol{\beta}_k^{\text{G}}}_2^2 = f^*$$ where, $f^* = \min_{\boldsymbol{\alpha}^{\text{G}} \geq 0, \alpha_0^{\text{G}}, \mathbb{B}^{\text{G}}} \frac{1}{2N} \norm{\boldsymbol{y} -\alpha_0^{\text{G}} \mathbbm{1} - \mathbb{X} \sum_{k = 1}^K \alpha_k^{\text{G}} \boldsymbol{\beta}_k^{\text{G}}}_2^2$. \end{corollary} \begin{corollary}\label{eta1_minus_prop_Spec} (OEC$^{\text{S}}$) Let $(\hat{\boldsymbol{\alpha}}^{\text{S}}(\eta), \hat{\mathbb{B}}^{\text{S}}(\eta))$ be optimal solutions to optimization problem \eqref{eq:specProp}. Then as $\eta \rightarrow 1-$, $(\hat{\boldsymbol{\alpha}}^{\text{S}}(\eta), \hat{\mathbb{B}}^{\text{S}}(\eta))$ will converge to the solutions of: $$\min_{\boldsymbol{\alpha}^{\text{S}}, \mathbb{B}^{\text{S}}} \sum_{k = 1}^K \frac{1}{2n_k} \norm{\boldsymbol{y}_k - \mathbb{X}_k \boldsymbol{\beta}_k^{\text{S}}}_2^2 ~~~~~~~~~\text{s.t.}~~~ \frac{1}{2n_{k^*}} \norm{\boldsymbol{y}_{k^*} -\alpha_0^{\text{S}} \mathbbm{1} - \mathbb{X}_{k^*} \sum_{k = 1}^K \alpha_k^{\text{S}} \boldsymbol{\beta}_k^{\text{S}}}_2^2 = f^*$$ where, $f^* = \min_{\boldsymbol{\alpha}^{\text{S}} \geq 0, \alpha_0^{\text{S}}, \mathbb{B}^{\text{S}}} \frac{1}{2n_{k^*}} \norm{\boldsymbol{y}_{k^*} -\alpha_0^{\text{S}} \mathbbm{1} - \mathbb{X}_{k^*} \sum_{k = 1}^K \alpha_k^{\text{S}} \boldsymbol{\beta}_k^{\text{S}}}_2^2$. \end{corollary} \begin{corollary}\label{eta1_minus_prop_Zero} (OEC$^{\text{SN}}$) Let $(\hat{\boldsymbol{\alpha}}^{\text{SN}}(\eta), \hat{\mathbb{B}}^{\text{SN}}(\eta))$ be optimal solutions to optimization problem \eqref{eq:snProp} Then as $\eta \rightarrow 1-$, $(\hat{\boldsymbol{\alpha}}^{\text{SN}}(\eta), \hat{\mathbb{B}}^{\text{SN}}(\eta))$ will converge to the solutions of: $$\min_{\boldsymbol{\alpha}^{\text{SN}}, \mathbb{B}^{\text{SN}}} \sum_{k \neq k^*} \frac{1}{2n_k} \norm{\boldsymbol{y}_k - \mathbb{X}_k \boldsymbol{\beta}_k^{\text{SN}}}_2^2 ~~~~~~~~~\text{s.t.}~~~ \frac{1}{2n_{k^*}} \norm{\boldsymbol{y}_{k^*} -\alpha_0^{\text{SN}} \mathbbm{1} - \mathbb{X}_{k^*} \sum_{k \neq k^*} \alpha_k^{\text{SN}} \boldsymbol{\beta}_k^{\text{SN}}}_2^2 = f^*$$ where, $f^* = \min_{\boldsymbol{\alpha}^{\text{SN}} \geq 0, \alpha_0^{\text{SN}}, \mathbb{B}^{\text{SN}}} \frac{1}{2n_{k^*}} \norm{\boldsymbol{y}_{k^*} -\alpha_0^{\text{SN}} \mathbbm{1} - \mathbb{X}_{k^*} \sum_{k = 1}^K \alpha_k^{\text{SN}} \boldsymbol{\beta}^{\text{SN}}_k}_2^2$. \end{corollary} \end{prop} Case \ref{eta1_minus_prop_Gen} implies that in the generalist setting, when $\eta \rightarrow 1-$, optimal OEC$^{\text{G}}$ estimates will yield fitted values equal to those produced by the ToM linear model (without regularization): $\mathbb{X} \hat{\boldsymbol{\gamma}}^{\text{ToM}} = \hat{\alpha}_0^{\text{G}} \mathbbm{1} + \mathbb{X} \sum_{k} \hat{\alpha}_k^{\text{G}} \hat{\boldsymbol{\beta}}_k^{\text{G}}$ where $\hat{\boldsymbol{\gamma}}^{\text{ToM}} = \min_{\boldsymbol{\gamma}^{\text{ToM}}} \norm{\mathbf{y} - \mathbb{X} \boldsymbol{\gamma}^{\text{ToM}}}_2^2$. When $\mathbb{X}$ is of full rank, the equivalence can be stated in terms of the parameter estimates directly (and thus predictions made using these solutions): $\hat{\boldsymbol{\gamma}}^{\text{ToM}} = \hat{\alpha}_0^{\text{G}} + \sum_k \hat{\alpha}_k^{\text{G}} \hat{\boldsymbol{\beta}}^{\text{G}}$. Case \ref{eta1_minus_prop_Spec} states that in specialist settings, when $\eta \rightarrow 1-$, optimal OEC$^{\text{S}}$ solutions will yield fitted values equal to those produced by a linear model fit only to the target study, (i.e., study $k^*$): $\mathbb{X}_{k^*} \hat{\boldsymbol{\gamma}}_{k^*} = \hat{\alpha}_0^{\text{S}} \mathbbm{1} + \mathbb{X}_{k^*} \sum_{k} \hat{\alpha}_k^{\text{S}} \hat{\boldsymbol{\beta}}_k^{\text{S}}$ where $\hat{\boldsymbol{\gamma}}_{k^*} = \min_{\boldsymbol{\gamma}_{k^*}} \norm{\mathbf{y}_{k^*} - \mathbb{X}_{k^*} \boldsymbol{\gamma}_{k^*}}_2^2$. Similarly, Case \ref{eta1_minus_prop_Zero} states that $\mathbb{X}_{k^*} \hat{\boldsymbol{\gamma}}_{k^*} = \hat{\alpha}_0^{\text{SN}} \mathbbm{1} + \mathbb{X}_{k^*} \sum_{k \neq k^*} \hat{\alpha}_k^{\text{SN}} \hat{\boldsymbol{\beta}}_k^{\text{SN}}$. When $\mathbb{X}_{k^*}$ is of full rank it follows that $\hat{\boldsymbol{\gamma}}_{k^*} = \hat{\alpha}_0^{\text{S}} + \sum_k \hat{\alpha}_k^{\text{S}} \hat{\boldsymbol{\beta}}^{\text{S}} = \hat{\alpha}_0^{\text{SN}} + \sum_k \hat{\alpha}_k^{\text{SN}} \hat{\boldsymbol{\beta}}^{\text{SN}}$. We next characterize the optimal OEC solutions when $\eta$ is taken to the opposite extreme. \begin{prop}\label{eta0_prop} \begin{corollary}\label{eta0_prop_Gen} (OEC$^{\text{G}}$) Let $(\hat{\boldsymbol{\alpha}}^{\text{G}}(\eta), \hat{\mathbb{B}}^{\text{G}}(\eta))$ be optimal solutions to optimization problem \eqref{eq:genProp}. Then as $\eta \rightarrow 0+$, $(\hat{\boldsymbol{\alpha}}^{\text{G}}(\eta), \hat{\mathbb{B}}^{\text{G}}(\eta))$ will converge to a solution to the following: $$\min_{ \boldsymbol{\alpha}^{\text{G}} \geq \boldsymbol{0}, \alpha_0^{\text{G}}, \mathbb{B}^{\text{G}}} \norm{\boldsymbol{y} - \alpha_0^{\text{G}} \mathbbm{1} -\mathbb{X} \sum_{k = 1}^K \alpha_k^{\text{G}} \boldsymbol{\beta}_k^{\text{G}}}_2^2 ~~~\text{s.t.}~~ \sum_{k =1}^K \frac{1}{2n_k} \norm{\boldsymbol{y}_k - \mathbb{X}_k \boldsymbol{\beta}_k^{\text{G}}}_2^2 = g^*$$ where, $g^* = \min_{\mathbb{B}^{\text{G}}} \sum_{k=1}^K \frac{1}{2n_k} \norm{\boldsymbol{y}_k - \mathbb{X}_k \boldsymbol{\beta}_k^{\text{G}}}_2^2$. \end{corollary} \begin{corollary}\label{eta0_prop_Spec} (OEC$^{\text{S}}$) Let $(\hat{\boldsymbol{\alpha}}^{\text{S}}(\eta), \hat{\mathbb{B}}^{\text{S}}(\eta))$ be optimal solutions to to optimization problem \eqref{eq:specProp}. Then as $\eta \rightarrow 0+$, $(\hat{\boldsymbol{\alpha}}^{\text{S}}(\eta), \hat{\mathbb{B}}^{\text{S}}(\eta))$ will converge to a solution to the following: $$\min_{ \boldsymbol{\alpha}^{\text{S}} \geq \boldsymbol{0}, \alpha_0^{\text{S}}, \mathbb{B}^{\text{S}}} \norm{\boldsymbol{y}_{k^*} - \alpha_0^{\text{S}} \mathbbm{1} - \mathbb{X}_{k^*} \sum_{k = 1}^K \alpha_k^{\text{S}} \boldsymbol{\beta}_k^{\text{S}}}_2^2 ~~~\text{s.t.}~~ \sum_{k =1}^K \frac{1}{2n_k} \norm{\boldsymbol{y}_k - \mathbb{X}_k \boldsymbol{\beta}_k^{\text{S}}}_2^2 = g^*$$ where, $g^* = \min_{\mathbb{B}^{\text{S}}} \sum_{k=1}^K \frac{1}{2n_k} \norm{\boldsymbol{y}_k - \mathbb{X}_k \boldsymbol{\beta}_k^{\text{S}}}_2^2$. \end{corollary} \begin{corollary}\label{eta0_prop_zero} (OEC$^{\text{SN}}$) Let $(\hat{\boldsymbol{\alpha}}^{\text{SN}}(\eta), \hat{\mathbb{B}}^{\text{SN}}(\eta))$ be optimal solutions to optimization problem \eqref{eq:genProp}. Then as $\eta \rightarrow 0+$, $(\hat{\boldsymbol{\alpha}}^{\text{SN}}(\eta), \hat{\mathbb{B}}^{\text{SN}}(\eta))$ will converge to a solution to the following: $$\min_{ \boldsymbol{\alpha}^{\text{SN}} \geq \boldsymbol{0}, \alpha_0^{\text{SN}}, \mathbb{B}^{\text{SN}}} \norm{\boldsymbol{y}_{k^*} - \alpha_0^{\text{SN}} \mathbbm{1} - \mathbb{X}_{k^*} \sum_{k \neq k^*}^K \alpha_k^{\text{SN}} \boldsymbol{\beta}_k^{\text{SN}}}_2^2 ~~~\text{s.t.}~~ \sum_{k \neq k^*} \frac{1}{2n_k} \norm{\boldsymbol{y}_k - \mathbb{X}_k \boldsymbol{\beta}_k^{\text{SN}}}_2^2 = g^*$$ where, $g^* = \min_{\mathbb{B}^{\text{SN}}} \sum_{k \neq k^*} \frac{1}{2n_k} \norm{\boldsymbol{y}_k - \mathbb{X}_k \boldsymbol{\beta}_k^{\text{SN}}}_2^2$. \end{corollary} \end{prop} Proposition \ref{eta0_prop} shows that as $\eta \rightarrow 0+$, the optimal OEC solution yields fitted values equal to those of its MSS counterpart. For example, in the generalist case, as $\eta \rightarrow 0+$, we have $\hat{w}_0 \mathbbm{1} + \mathbb{X} \sum_k \hat{w}_k^{\text{G}} \hat{\boldsymbol{\gamma}} = \hat{\alpha}_0^{\text{G}} \mathbbm{1} + \mathbb{X} \sum_{k} \hat{\alpha}_k^{\text{G}} \hat{\boldsymbol{\beta}}_k^{\text{G}}$. If each $\mathbb{X}_k$ is full rank for $k \in [K]$, Proposition \ref{eta0_prop} states that MSS$^{\text{G}}$, MSS$^{\text{S}}$ and MSS$^{\text{SN}}$ are special cases of their corresponding OEC counterparts that arise when $\eta \rightarrow 0+$. For example, in the generalist case, if each of the $\mathbb{X}_k$ are full rank, then $\hat{\boldsymbol{w}}^{\text{G}} = \hat{\boldsymbol{\alpha}}^{\text{G}}$ and $\hat{\boldsymbol{\gamma}}_k = \hat{\boldsymbol{\beta}}_k^{\text{G}} ~\forall k \in [K]$. Together, these propositions demonstrate that in the linear-linear setting, without regularization, the OEC encompasses important special cases and earlier multi-study methods: MSS$^{\text{G}}$ is a special case of OEC$^{\text{G}}$, arising when $\eta \rightarrow 0+$, while pooling datasets with the ToM approach is a special case arising when $\eta \rightarrow 1-$. Similarly, MSS$^{\text{S}}$ is a special case of the OEC$^{\text{S}}$, arising when $\eta \rightarrow 0+$, while a study-specific model is obtained when $\eta \rightarrow 1-$. These propositions examine behavior at the extremes, and suggest that, for intermediate values of $\eta$, the OEC can be viewed as a trade-off between MSS$^{\text{G}}$ and pooling datasets together before model fitting (i.e., the ToM) in the generalist case. In the specialist case, the propositions suggest that the OEC can be framed as a trade-off between MSS$^{\text{S}}$ and only fitting a model on the target study. In our motivating application, we visualize this trade-off in the no data reuse specialist case by showing how predicted values of the OEC smoothly vary between the predictions of the study-specific model and the MSS$^{\text{SN}}$ as a function of $\eta \in (0,1)$. Across the range of $\eta$, the OEC allows for a spectrum of solutions that range in both the manner and degree to which information is borrowed from other sources. \section{Application: Counterfactual Mortality Prediction} \subsection{Data} We consider a data source recently developed by the Human Mortality Database, called the \textit{Short-term Mortality Fluctuations} (STMF) data series \citep{hmd}. The STMF data series provides weekly death counts and death rates for 38 countries, as outlined in Supplementary Table \ref{table:mortWeeks}. We denote the reported death rates for country $k$ at week $t$ by $\tilde{Y}_{t,k}$. STMF calculates it as the observed weekly death count, $C_{t,k}$ divided by an annual measure of population size $N_{l,k}$, that is: $\tilde{Y}_{t,k} = C_{t,k} / N_{l,k}$ when week $t$ occurs during year $l$. As a result, these death rates exhibit artificial discontinuities at the start of each calendar year, that are an artifact of changing the annual population size from $N_{l,k}$ to $N_{l+1,k}$. To avoid this, we followed the strategy outlined in \cite{us2012methodology}. We calculated the mid-year population size, $N_{l,k}$, (i.e., observed population counts taken on July 1 of year $l$) from the death rates and death counts provided by STMF. We then linearly interpolated population size by regressing the annual population estimates, $N_{l,k}$ against year, $l$, and used the regression fit to calculate weekly estimates of population size: $\hat{P}_{t,k} = \hat{\beta_0}^{\dagger} + \hat{\beta_1}^{\dagger} t$, where $\hat{\beta_0}^{\dagger}$ and $\hat{\beta_1}^{\dagger}$ were linear model coefficient estimates from this regression. Finally we calculated new annual death rates (per 1,000 individuals) as $Y_{k_t} = 1,000 \times 52 \times C_{t,k} / \hat{P}_{k,t}$. We only used test countries in the Northern hemisphere since the model was based on seasonal effects modeled by calendar date. There are only three countries from the southern hemisphere in STMF (Australia, New Zeland and Chile) a set too small to fit a model borrowing information across countries, thereby resulting in poor performance. We did, however, allow the OEC methods to leverage information from countries in the Southern hemisphere when training models tailored to countries in the Northern hemisphere. For any given test year, we required countries to have at least 2 years of data at that point to serve as auxiliary sources (i.e., countries from which we can borrow information for a given test country/year). We started testing at 2003 because prior to 2003 there was little data and excessive variability year-to-year in the number of training countries. \subsection{Study-specific models} It is common to model expected death counts as a function of seasonal and secular trends in mortality. We modeled annual death rates, $Y_{k,t}$, with the following linear model: \begin{equation} \mathbb{E}[{y}_{k,t} \given \mathbf{x}_{k,t}] = \gamma_{k,0} + \gamma_{k,1} t + \sum_{j=1}^2 \left[\gamma_{k,j + 1}\sin \left(\frac{2\pi j t}{52}\right) + \gamma_{k,j+3}\cos \left(\frac{2\pi j t}{52}\right)\right] \label{eq:lm} \end{equation} where ${\gamma}_{k,1}$ represents a linear effect of time to capture secular trends in mortality, and $\boldsymbol{\gamma}_{k,2:p}$ represents the effect of the Fourier basis function to capture seasonal changes. Model \eqref{eq:lm} can be represented in the familiar linear form, $\mathbb{E}[{y}_{k,t}\given \mathbf{x}_{k,t}] = \mathbf{x}_{k,t}^T \boldsymbol{\gamma}$, where the elements of $\mathbf{x}_{k,t}$ simply contain basis expansions of time. One could adopt, for example, a Poisson likelihood for the conditional distribution of the death counts given the covariates (i.e., basis expansions of time). However, weekly death counts were in the hundreds for all countries except Luxembourg and Iceland and most countries recorded weekly counts in the thousands. Since the counts were high, we expect a Gaussian to provide a good approximation to a Poisson distribution. Since we sought to borrow information across countries, we modeled rates instead of counts to make the outcome more comparable across the countries in the database. We opted for model \eqref{eq:lm} assuming ${y}_{k,t}\given \mathbf{x}_{k,t}$ follows a Gaussian distribution instead of a Poisson for computational convenience. In Supplementary Figures \ref{suppFig:mortalityOECLin_vs_countryNoLin}-\ref{suppFig:mortalityOECnoLin_vs_stackNoLin} we show the results of sensitivity analyses where we omit the linear effect of time $\gamma_{k,1} t$ from model~\eqref{eq:lm}. \subsection{Application: Problem Statement and Assessment of Methods} Excess mortality in country $k$, at week $t$, can be defined as the observed death count minus the rate expected in the counterfactual world in which COVID-19 never existed. Estimating excess deaths therefore requires a prediction of mortality in the counterfactual world where a disaster did not occur. In practice, this prediction is the expected death counts in a particular week given historical data (i.e., all data before the onset of the disaster). Unfortunately, prediction performance in such settings is unverifiable. Hence, to assess if our methods are useful for counterfactual prediction, we trained models and tested their performance on historical data where no pandemic occurred, so that a ground-truth was known. Heuristically, the rationale is that if the baseline model has high prediction accuracy on historical data, we expect it would also predict counterfactual mortality~well. We tested predictors generated using the OEC$^{\text{S}}$ and the OEC$^{\text{SN}}$ against their MSS$^{\text{S}}$ and MSS$^{\text{SN}}$ counterparts. We also implemented a SSM (which we refer to interchangeably as a ``country-specific model'' here), in which we did not borrow information from other countries. In all approaches, we used model \eqref{eq:lm} as the single-study learner. We sought to evaluate prediction performance for all countries meeting the inclusion criteria in the database across a range of training/testing years. We assessed our question first in the STMF dataset using a time-series hold-one-country-out testing procedure. That is, we trained models on a subset of historical data (i.e., a subset of years), made predictions on held out historical data and computed performance metrics (e.g., RMSE) to quantify the quality of the predictions. We tailored our approach to assess whether our method improved performance when there exists little pre-COVID-19 training data for the target country. Specifically, for each target country and year (from 2003-2019) we artificially assumed only having one year of training data from that target country in the database. We then made predictions of mortality in that country for the following year and compared those predictions to what was observed. Our approach is illustrated in Figure \ref{fig:cvFig1}. To fix ideas, say we are interested in making predictions for the Country~1 in 2014. We would use data from Country~1 in 2014 as a test set and trained a country-specific model on US data from only 2013 (i.e., simulating only having one year's worth of data). To analyze the performance when we borrowed information, we allowed the MSS$^{\text{S}}$, MSS$^{\text{SN}}$, OEC$^{\text{S}}$ and OEC$^{\text{SN}}$ to use data from any other country that had at least 100 weeks of training data prior to 2014 (e.g., 2011, 2012 and 2013). All data after the start of the test period was discarded and any country that did not have enough training data was not used as an auxiliary source. All approaches were compared based upon their prediction performance on US data from 2014. We repeated this procedure for every feasible year between 2003 and 2019 and for all countries (assuming the above inclusion criteria are met). The test period was set to an entire year to assess the performance of the method's estimation of both secular and seasonal trends as well as to mimic the long term predictions required for COVID-19 excess mortality estimation. \begin{figure}[h] \centering \begin{subfigure}[t]{1\textwidth} \centering \includegraphics[scale = 0.3]{figures/CV_Figures_1.pdf} \caption{ Example observed data. Countries have different amounts of data before the onset of COVID-19 that could be used for training and validation.} \end{subfigure} \hfill \vspace*{10mm} \begin{subfigure}[t]{1\textwidth} \centering \includegraphics[scale = 0.3]{figures/CV_Figures_2.pdf} \caption{Architecture of leave-one-country-out prediction experiments.} \end{subfigure} \caption{Illustration of the validation scheme. Country 1 is used as a test country. Year 2013 from country 1 is utilized for training and year 2014 is taken as a test set; other data from country 1 is discarded for training or testing purposes. Country 2 and country 4 are used in multi-study versions. Data after the test year is discarded. Country 5 and Country 3 are not utilized since they do not have data before the test year 2014. This prediction is repeated for each year and country that meet the criteria for inclusion.} \label{fig:cvFig1} \end{figure} \subsection{Multi-study Modeling and Parameter Tuning} We ran analyses both with and without a Ridge (squared $\ell_2$) penalty term on the country-specific model parameters and the ensemble weight parameters. The inclusion of a penalty was kept consistent across all methods that we implemented. This was to ensure that any gains in performance achieved through the OEC could not have been attained through simple regularization. We centered and scaled covariates prior to model fitting. We tuned $\eta$ in expression \eqref{eq:gen} using cross validation procedures specific to generalist and specialist settings. For the OEC$^{\text{S}}$ and OEC$^{\text{SN}}$, we tuned $\eta$ specifically for the target study. We divided the training set for study $k^*$ into $K$ folds (i.e., we set the number of folds to $K$, the number of training studies) and used each fold as a validation set. For OEC$^{\text{G}}$, we tuned $\eta$ with a $K$-fold cross validation procedure in which the folds were constructed to be study-balanced in order to encourage generalizability to an unseen study. The $\ell_2$ regularization parameter associated with ensemble weights, $\mu$, was tuned using a $K$-fold, study-balanced, cross validation scheme separately using the OEC$^{\text{G}}$ algorithm. We kept this tuning parameter fixed across all OEC algorithms. Similarly, we tuned the $\ell_2$ regularization parameter associated with the stacking regression again using a $K$-fold cross validation. We tuned study-specific model regularization parameters associated with the Ridge penalty using a within-study (i.e., within-country) $K$-fold cross validation scheme and kept these fixed across all methods implemented (i.e., ToM, SSM, and all OEC and MSS approaches). The $\ell_2$ regularization parameter associated with ToM algorithm was tuned using a hold-one-study-out cross validation (e.g., the $K^{th}$ fold merged all studies, $1,...,K - 1$, fit a single model and validated on study $K$). \subsection{Application Results: COVID-19} We present results by test-year for both the the OEC$^{\text{S}}$ and OEC$^{\text{SN}}$ in Figure~\ref{fig:covid_box1} and Supplemental Figure~\ref{suppFig:mortalityTogether100_OLS}. We present results from models fit both with study-specific Ridge penalties (Supplemental Table~\ref{table:covid_Ridge}) and without them (Table~\ref{table:covid_OLS}). Table~\ref{table:covid_OLS} only contains a subset of years (2010-2019) for purposes of visual presentation but a version of the table including all years (2003-2019) can be found in Supplemental Table~\ref{table:Fullcovid_OLS}. Although we fit the generalist methods ToM, OEC$^{\text{G}}$ and MSS$^{\text{G}}$, their performance was uniformly poor. This is not surprising given that this application involves transfer learning. As a result, we do not present these results here. The figures and tables demonstrate that borrowing information through two-stage stacking procedures (MSS$^{\text{S}}$ or MSS$^{\text{SN}}$) or their OEC counterparts (OEC$^{\text{S}}$ and OEC$^{\text{SN}}$) has strong benefits with or without regularization. Importantly, the OEC$^{\text{S}}$ substantially outperformed both a country-specific model and the MSS$^{\text{S}}$. The OEC$^{\text{SN}}$ outperformed the MSS$^{\text{SN}}$ but improvements were more modest than those comparing the OEC$^{\text{S}}$ and the MSS$^{\text{S}}$. The OEC$^{\text{SN}}$ and MSS$^{\text{SN}}$ substantially outperformed the OEC$^{\text{S}}$ and the MSS$^{\text{S}}$, respectively. We also present the results relative to a country-specific model to show the relative performance of the OEC and MSS methods in Supplemental Figure \ref{suppFig:mortalityTogether100_OLS}. \begin{figure}[h] \centering \includegraphics[width=0.95\linewidth]{figures/Mortality_Specialist_ZeroOut_OLS_Ridge_New_100.pdf} \caption{$RMSE_{OEC} / RMSE_{MSS}$. Performance of OEC methods relative to their multi-study stacking counterparts: values below 1.00 indicate OEC method produces superior performance relative to MSS version. The x-axis indicates the year of the last day in the test-set.} \label{fig:covid_box1} \end{figure} \begin{table}[h] \centering \begin{minipage}[t]{1.0\linewidth} \centering \begin{tabular}{l|rrrrrrrrrr} \toprule \toprule \multicolumn{1}{c}{\bfseries Method} \vline & \multicolumn{10}{c}{\bfseries Test Year} \\ & 2010 & 2011 & 2012 & 2013 & 2014 & 2015 & 2016 & 2017 & 2018 & 2019\\ \midrule \midrule MSS$^{\text{S}}$ & 0.98 & 0.92 & 0.97 & 0.91 & 0.92 & 0.94 & 0.95 & 0.90 & 0.97 & 0.92\\ OEC$^{\text{S}}$ & 0.60 & 0.72 & 0.76 & 0.70 & 0.62 & 0.84 & 0.63 & 0.72 & 0.59 & 0.61\\ MSS$^{\text{SN}}$ & 0.54 & 0.71 & 0.74 & 0.69 & 0.60 & 0.86 & 0.58 & 0.69 & 0.40 & 0.58\\ OEC$^{\text{SN}}$ & 0.53 & 0.71 & 0.74 & 0.68 & 0.60 & 0.86 & 0.57 & 0.70 & 0.38 & 0.52\\ \bottomrule \end{tabular} \end{minipage} \hfill \caption{Average $RMSE_{Method} / RMSE_{SSM}$. Performance of ensembling methods relative to a country-specific model that was fit without a country-specific Ridge penalty. Columns indicate test year.} \label{table:covid_OLS} \end{table} When training data is limited, including a linear term for time to capture secular trends in a country-specific model may introduce identifiability issues. This is because the model may struggle to distinguish between seasonal and secular trends when trained on a single year of data, even with regularization. While we showed that borrowing information alleviates this issue, we wanted to ensure the multi-study approach was still beneficial compared to a simpler model with no linear effect of time. In the supplemental section we present results from analyses using a model with no linear term \eqref{eq:lmSecular}. We are not aware of past analyses that only model mortality with seasonal trends, but we explored these results as a sensitivity analysis to further characterize how the OEC methods improve performance over MSS methods. First, we compared an OEC with a linear trend to a country-specific model with no linear trend (Supplemental Figure \ref{suppFig:mortalityOECLin_vs_countryNoLin}). The OEC$^{\text{SN}}$ consistently outperformed the simpler country-specific model, but the OEC$^{\text{S}}$ and two-stage specialist stacking did not. This may suggest that the country-specific model struggled with identifiability problems and that the OEC$^{\text{S}}$ and MSS$^{\text{S}}$ may place too large an ensemble weight on that target country's model. The MSS$^{\text{SN}}$ and OEC$^{\text{SN}}$ avoid this problem by only using the target data to calculate ensemble weights. This is consistent with previous reports about limitations of the data re-use approach MSS$^{\text{S}}$ \citep{ren}. We next compared the OEC$^{\text{S}}$ and OEC$^{\text{SN}}$ models fit with no linear trend to their MSS counterparts. In both, the design matrix only included Fourier basis terms. Results from this analysis can be found in Supplemental Figure \ref{suppFig:mortalityOECnoLin_vs_stackNoLin}. In this simpler modeling scheme as well, the OEC$^{\text{S}}$ and OEC$^{\text{SN}}$ approaches outperformed their MSS counterparts, suggesting that the OEC approach can improve the estimation of both seasonal and secular trends. Importantly, the OEC$^{\text{SN}}$ and OEC$^{\text{S}}$ performed comparably. This may suggest that the OEC$^{\text{SN}}$ yields the greatest benefit over OEC$^{\text{S}}$ when the modeling scheme is susceptible to problems related to identifiability or over-fitting. Finally, we compared OEC$^{\text{SN}}$ and OEC$^{\text{S}}$ models fit with no linear term for time to a country-specific model without a linear term for time (Supplemental Figure \ref{suppFig:mortalityOECnoLin_vs_countryNoLin}). These results demonstrate that also in the simpler modeling case, there are strong benefits to borrowing information with the OEC approach. The present work seeks to develop methods to improve prediction performance when training data for a target study (country) is limited. We conducted a sensitivity analysis to characterize how prediction performance varies as a function of the quantity of training data available for the target study. Supplemental Figure \ref{suppFig:mortalityTrainingMonths} shows that OEC$^{\text{S}}$ was associated with superior prediction performance compared to both a SSM and a MSS$^{\text{S}}$ when the target study had as much as three years of training data, although the benefit monotonically decreased as number of training observations increases. Importantly, borrowing information was never detrimental, on average, in any of the settings explored. We conclude the application with an example to demonstrate that the country-specific model and the MSS$^{\text{SN}}$ are special cases of the OEC$^{\text{SN}}$ that arise from limiting values of $\eta \in (0, 1]$ (Figure \ref{fig:convexCombo}). We selected the country and test year presented in the figure to show an example that yielded country-specific estimates and OEC$^{\text{SN}}$ estimates that were different enough to visually depict the effect of $\eta$ but did not overstate the utility of borrowing information with either MSS$^{\text{SN}}$ or OEC$^{\text{SN}}$. This test year exhibit a spike in mortality counts for three consecutive outlying weeks early in the year. This type of pattern occurred commonly across countries and years and is difficult for any modeling approach to capture. As $\eta \rightarrow 0$, the OEC predictions approach that of the MSS$^{\text{SN}}$. As $\eta \rightarrow 1$, the OEC$^{\text{SN}}$ predictions approach that of the country-specific model. \begin{figure}[H] \centering \centering \includegraphics[width=1\linewidth]{figures/eta-plot.pdf} \caption{Fitted values and predictions of OEC$^{\text{SN}}$ as a function of $\eta$. As $\eta \rightarrow 1$, the OEC$^{\text{SN}}$ predictions approach those of the country-specific model (SSM). When $\eta \rightarrow 0$, the OEC$^{\text{SN}}$ predictions approach those made by NDR Specialist Stacking (MSS$^{\text{SN}}$). We show $\eta \in [0,0.9]$ as a color gradient to zoom in on the most sensitive part of the tuning curve in this example. Gray lines indicate predictions for $\eta < 0.9$. Light (dark) gray points to the left (right) of the dotted vertical line are training (test) samples. Lines indicate fitted values (predictions) to the left (right) of the dotted vertical line.} \label{fig:convexCombo} \end{figure} \section{Data-driven simulations based on COVID-19 Mortality Application} \subsection{Design of Data-Driven Simulation Experiments} We next conducted data-driven simulations to explore the COVID-19 application in a setting where we could compare predictions against a ground-truth. We simulated data from a linear mixed effects model: $$y_{k,t} = \mathbf{x}_{k,t}^T {\boldsymbol{\theta}}_k + \epsilon_{k,t}$$ where ${\boldsymbol{\theta}}_k \perp \!\!\! \perp \boldsymbol{\epsilon}_k$, ${\boldsymbol{\theta}}_k \sim N_{p}(\boldsymbol{\mu}_{\theta}, \sigma^2_{\theta} {\Sigma}_{\theta})$ and $\mathbf{x}_{k,t} \in \mathbb{R}^{p+1}$ which includes a column of ones for an intercept. $\mathbf{x}_{k,t}$ includes only basis expansions of time and was constructed as described above in the COVID-19 application. We chose the parameters of the random effects distribution based on estimates from the COVID-19 data. Denoting by $\hat{\boldsymbol{\gamma}}_k$ the coefficient estimates from an OLS fit to all observed data (i.e., all years prior to 2020) from country $k$, we define $\boldsymbol{\mu}_{\theta}= \bar{\hat{\boldsymbol{\gamma}}} = \frac{1}{K} \sum_k \hat{\boldsymbol{\gamma}_k}$ to be the sample mean of each coefficient, averaged across country-specific estimates. To explore the impact of heterogeneity in model coefficients on prediction performance we choose multiple scenarios for $\sigma^2_{\theta}$. For ${\Sigma}_{\theta}$, we used the empirical covariance matrix from the application by setting ${\Sigma}_{\theta} = \hat{\Sigma}_{\gamma}$ where $\hat{\Sigma}_{\gamma} = \frac{1}{K-1}\sum_k (\hat{\boldsymbol{\gamma}}_k \hat{\boldsymbol{\gamma}}_k^T - K \bar{\hat{\boldsymbol{\gamma}}} \bar{\hat{\boldsymbol{\gamma}}}^T)$. We assumed that the residuals of study $k$ are distributed as $\boldsymbol{\epsilon}_{k} \sim N_{n_k}(\mathbf{0}, {\sigma}^{2}_{\epsilon_k} \mathbb{I})$. We selected the variance of the residuals, ${\sigma}^{2}_{\epsilon_k}$, by sampling with replacement from the vector of estimated residual variances from each of the country-specific models $[$ $\hat{\sigma}^2_{\epsilon_1},...,\hat{\sigma}^2_{\epsilon_K} ]^T$. This allowed us to realistically emulate the variability in noise associated with the observed COVID-19 data from each of the countries. The design matrix for study $k$, $\mathbb{X}_k$ is constructed as in the COVID-19 application from time (in weeks): it includes a linear effect for time and 4 terms that are Fourier basis expansions of time for seasonal trends. Including the column of ones for the intercept, $\mathbb{X}_k \in \mathbb{R}^{n_k \times 6}$. The test country was set to have 52 weeks of (weekly) training data ($n_{k^*} = 52$) and 52 weeks of test data. We drew $n_k$, the number of weeks of training data for $k \in [K] \setminus k^*$, from a discrete uniform: $n_k \sim \mbox{Unif}(104, 517)$. The parameters of the uniform were selected based upon the observed sample size in the real dataset and to ensure each study, for $k \in [K] \setminus k^*$, had at least twice as many weekly observations as the target country, $k^*$. Although the errors $\boldsymbol{\epsilon}_{k}$ are i.i.d, the basis functions used in the simulation scheme induces autocorrelation in the outcome $\mathbf{y}_k$, which we explored by inspection of the empirical autocorrelation function (ACF). We included a Ridge penalty in the stacking regression for the MSS methods. We included a Ridge penalty in the ensemble weighting component of the loss in the OEC methods as well. We assessed performance of the MSS and OEC methods with and without study-specific Ridge penalties. We present results with study-specific Ridge penalties in the supplement (Supplemental Figure \ref{fig:mortSims_Ridge}; Supplemental Table \ref{tab:mortSims_Ridge}). Results were comparable with and without the study-specific penalties. \subsection{Data-Driven Simulations Results} In almost all settings explored, the OEC and MSS approaches substantially outperformed simply using a country-specific model. The OEC$^{\text{S}}$ appears to perform better compared to the MSS$^{\text{S}}$ when the magnitude of between-study heterogeneity in true model coefficients, ($\sigma^2_{\theta}$) is lower. Conversely, the OEC$^{\text{SN}}$ performed better relative to the MSS$^{\text{SN}}$ approach when the $\sigma^2_{\theta}$ was higher. Both the OEC$^{\text{S}}$ and OEC$^{\text{SN}}$ performed better relative to their MSS counterparts for lower $K$, although the effect of $K$ on performance varied as a function of the magnitude of $\sigma^2_{\theta}$. Importantly, the OEC$^{\text{S}}$ and OEC$^{\text{SN}}$ almost never yielded worse average performance than their MSS counterparts and they often conferred substantial benefit. In the rare instances where the OEC exhibited worse average performance than its MSS counterpart, it was only by roughly $1 \%$. These results demonstrate 1) borrowing information is almost uniformly beneficial and 2) the OEC approaches almost always outperformed using a MSS method. \begin{figure}[!htbp] \centering \begin{subfigure}[t]{1\textwidth} \centering \includegraphics[width=1.0\linewidth]{figures/mortSims_Specialist_zero.pdf} \caption{Specialist} \end{subfigure} \hfill \begin{subfigure}[t]{1\textwidth} \centering \includegraphics[width=1.0\linewidth]{figures/mortSims_ZeroOut_zero.pdf} \caption{No Data Reuse} \end{subfigure} \caption{Performance of the OEC$^{\text{S}}$ and OEC$^{\text{SN}}$ compared to their MSS counterparts in data-driven simulations. Figures are zoomed in to easily visualize differences.} \end{figure} \begin{table}[h] \centering \begin{minipage}[t]{1.0\linewidth} \centering \begin{tabular}{r|rrrrr|rrrrr} \toprule \toprule \multicolumn{1}{c}{\footnotesize\bfseries Parameters} \vline & \multicolumn{5}{c}{\footnotesize\bfseries $\mathbf{OEC^{\text{S}}}$ vs. $\mathbf{MSS^{\text{S}}}$} \vline & \multicolumn{5}{c}{\footnotesize\bfseries $\mathbf{OEC^{\text{SN}}}$ vs. $\mathbf{MSS^{\text{SN}}}$} \\ & \multicolumn{5}{c}{\footnotesize\bfseries $\sigma^2_{\theta}$} \vline & \multicolumn{5}{c}{\footnotesize\bfseries $\sigma^2_{\theta}$} \\ $K$ & 0.25 & 0.5 & 1.0 & 2.0 & 4.0 & 0.25 & 0.5 & 1.0 & 2.0 & 4.0\\ \midrule \midrule 2 & 0.94 & 0.99 & 0.98 & 0.97 & 0.97 & 0.97 & 0.95 & 0.94 & 0.92 & 0.89\\ 5 & 0.93 & 0.94 & 0.95 & 0.97 & 0.99 & 1.00 & 1.00 & 1.00 & 1.00 & 0.98\\ 8 & 0.93 & 0.93 & 0.94 & 0.94 & 0.99 & 1.00 & 1.00 & 0.99 & 0.97 & 0.98\\ 25 & 0.94 & 0.92 & 0.95 & 0.95 & 0.98 & 1.00 & 1.00 & 1.00 & 0.98 & 0.98\\ 30 & 0.90 & 0.95 & 0.95 & 0.97 & 1.00 & 1.00 & 1.01 & 0.99 & 0.98 & 0.98\\ \bottomrule \end{tabular} \end{minipage} \caption{Average data-driven simulation performance: $RMSE_{OEC} / RMSE_{MSS}$. Columns indicate $\sigma^2_{\theta}$ and rows indicate $K$, number of studies. Monte carlo error was at most 0.002.} \label{tab:mortSims1} \end{table} \begin{table}[h] \centering \begin{minipage}[t]{0.75\linewidth} \centering \begin{tabular}{rr|rrrr} \toprule \toprule \multicolumn{2}{c}{\footnotesize\bfseries ~~~Parameters} \vline & \multicolumn{1}{c}{\footnotesize\bfseries $\mathbf{OEC^{\text{S}}}$} & \multicolumn{1}{c}{\footnotesize\bfseries $\mathbf{MSS^{ \text{S}}}$} & \multicolumn{1}{c}{\footnotesize\bfseries $\mathbf{OEC^{\text{SN}}}$} & \multicolumn{1}{c}{\footnotesize\bfseries $\mathbf{MSS^{ \text{SN}}}$ } \\ \multicolumn{1}{c}{\footnotesize\bfseries $K$} & \multicolumn{1}{c}{\footnotesize\bfseries ~~~~~$\sigma^2_{\theta}$} \vline & \multicolumn{4}{c}{\footnotesize ~~~~~vs. Study-Specific Model ~~~~~} \\ \midrule \midrule 2 & 0.25 & 0.91 & 0.96 & 0.82 & 0.85\\ 2 & 1.00 & 0.96 & 0.98 & 0.96 & 1.05\\ 2 & 4.00 & 0.96 & 0.98 & 1.06 & 1.24\\ \addlinespace 8 & 0.25 & 0.86 & 0.94 & 0.80 & 0.80\\ 8 & 1.00 & 0.88 & 0.94 & 0.81 & 0.82\\ 8 & 4.00 & 0.90 & 0.92 & 0.89 & 0.93\\ \addlinespace 30 & 0.25 & 0.83 & 0.92 & 0.81 & 0.81\\ 30 & 1.00 & 0.85 & 0.90 & 0.84 & 0.84\\ 30 & 4.00 & 0.90 & 0.89 & 0.89 & 0.91\\ \bottomrule \end{tabular} \end{minipage} \caption{Average data-drive simulation performance without regularization at different $K$ and $\sigma^2_{\theta}$. Performance of each method is $RMSE_{OEC^{\text{S}}} / RMSE_{SSM}$, where $SSM$ denotes a study-specific model, fit only on the target study. Monte carlo error was at most 0.0073. } \label{table:mortSims2_zero} \end{table} \section{General Simulations} \subsection{Design of Simulation Experiments} We next report on a second set of simulations whose goal is to characterize the performance of both the ``generalist'' and ``specialist'' algorithms, outside of a time series setting. We simulated datasets to characterize the effect of three features of multi-study settings on the performance of our proposed methods: 1) covariate-shift (heterogeneity in $f_{x_k}(\mathbb{X}_k)$ across studies), 2) concept-shift (heterogeneity in $f_{y_k \given x_k } (\mathbf{y}_k \given \mathbb{X}_k)$ across studies), and 3) study clusters across which (1) and (2) vary. We generated clusters as in \citep{Loewinger}: groups of studies that shared similar distributions, $f_{\mathbb{X}_k}(\mathbb{X}_k)$ and $f_{\mathbf{y}_k\given\mathbb{X}_k}(\mathbf{y}_k \given \mathbb{X}_k)$. To control both within and between-cluster heterogeneity in $f_{\mathbf{y}_k\given\mathbb{X}_k}(\mathbf{y}_k \given \mathbb{X}_k)$, we simulated $f_{y_k \given x_k }(\mathbf{y}_k \given \mathbb{X}_k)$ from a linear mixed effects model that included both cluster-specific and study-specific random effects: $$\mathbf{y}_{k} = \mathbb{X}_k (\boldsymbol{\theta}_k + \boldsymbol{\delta}_{c}) + \boldsymbol{\epsilon}_{k},$$ where study $k$ is in cluster $c$, $\boldsymbol{\delta}_{c} \in \mathbb{R}^{p+1}$ is a cluster-specific random effect and ${\boldsymbol{\theta}}_k \in \mathbb{R}^{p+1}$ is a study-specific random effect. We independently drew $\boldsymbol{\delta}_{c} \given \boldsymbol{\mu}_{\delta} \sim N_{p+1}(\boldsymbol{\mu}_{\delta}, \sigma^2_{\delta} \mathbb{I})$ and $\theta_{k,j} \sim \mbox{Unif}(-\sigma^2_{{\delta}}/20,~ \sigma^2_{{\delta}}/20)$ so that that random effects varied across studies within a cluster by a degree proportional to the between-cluster heterogeneity. The vector of random effects ${\boldsymbol{\delta}}_c$ is centered at the fixed effects, $\boldsymbol{\mu}_{\delta} \in \mathbb{R}^{p+1}$, where we independently drew $\mu_{\delta,j} \sim \mbox{Unif}(-2,2)$. We simulated the random effects to be independent of the error term: ${\boldsymbol{\theta}}_k \perp \!\!\! \perp \boldsymbol{\epsilon}_k$ and ${\boldsymbol{\delta}}_c \perp \!\!\! \perp \boldsymbol{\epsilon}_k$. As above, $\mathbb{X}_k$ includes a column of ones so that the model includes an intercept. We conditionally drew $\boldsymbol{\epsilon}_{ki} \given \sigma^2_{\epsilon_k} \sim N_{n_k}(0, \sigma^2_{\epsilon_k} \mathbb{I}_{n_k})$ where $\sigma^2_{\epsilon_k} \sim \mbox{Unif}(1,~2)$, inducing heterogeneity between studies in the variance of the residuals. We drew $n_k \sim \mbox{Unif}(150,~300)$ (discrete uniform). $n_{k^*} = 50$ (the training set for the target study). $n_{test} = 100$ (test set for each iteration). We selected these values to ensure that $n_k > n_{k^*}$. These sample size values were motivated by the ratio of $n_k / n_{k^*}$ observed in the application. We selected $K = 5$ since many multi-study settings encountered in practice have few training studies available. We selected $p = 20$ and set $10$ coefficients to 0, to model sparsity in the true model coefficients, as relevant in many prediction settings. We simulated the covariates so that the marginal distribution of the covariates, $f_{\mathbb{X}_k}(\mathbb{X}_k)$, differed across studies and clusters. We drew a vector of covariates for observation $i$ of study $k$ as $\mathbf{x}_{k,i} \given \boldsymbol{\mu}_{X_k} \sim N_p (\boldsymbol{\mu}_{X_k}, \Sigma_X)$ where $\Sigma_X$ is a covariance matrix that was randomly generated (i.e., varied across simulation iterations) but was held fixed across studies within an iteration and $\boldsymbol{\mu}_{X_k}$ was a study specific vector of covariate means. To induce covariate shift, we modeled the means of the covariates in study $k$ and cluster $c$ as $$\boldsymbol{\mu}_{X_k} = \boldsymbol{\zeta}_c + \boldsymbol{\tau}_k$$ where $ \boldsymbol{\zeta}_c, \boldsymbol{\tau}_k \in \mathbb{R}^{p}$. We drew cluster-specific covariate means, $\boldsymbol{\zeta}_c \given \tilde{\boldsymbol{\mu}} \sim N_p(\tilde{\boldsymbol{\mu}}, \sigma^2_X \mathbb{I})$ and we independently drew $\boldsymbol{\tau}_k \sim \mbox{Unif}(-0.05, 0.05)$. Therefore $\sigma^2_X$ controls the magnitude of heterogeneity across clusters in the means of the covariates. We independently drew $\tilde{\mu}_j \sim N(5, 10)$. Thus studies differed within and across clusters in the covariate distributions. We simulated sets of studies both with and without study clusters. In the ``no cluster'' case, we drew each training and test study to be in a separate cluster ($C=6$). In the ``cluster'' case, we generated three clusters with two studies per cluster ($C=3$). The test study was also generated as belonging to one of the same three clusters. We simulated 100 iterations for each set of simulation parameters, each iteration consisting of a set of training studies and a test set. Each iteration therefore produced an RMSE for each method. We show the distribution of these RMSEs across the 100 iterations in figures below. We used both Ridge regression and OLS as the single-study learners. We tuned model parameters as in the COVID-19-driven simulations. We present figures and results without study-specific Ridge penalties in Supplemental Section \ref{sims23_supplement}. \subsection{Results} We present results comparing each OEC approach to the corresponding two-stage stacking approach, to investigate whether jointly training an ensemble in this framework is superior to training the ensemble with MSS. We included a subset of the results in Table \ref{table:generalSims_v2} and the full version in Supplemental Table \ref{table:generalSims_v2_supplement_cvCF}. We also present the results relative to a common baseline in Supplemental Table~\ref{table:generalSims_full_cvCF}. \begin{figure}[h] \centering \begin{subfigure}[t]{1\textwidth} \centering \includegraphics[width=1.0\linewidth]{figures/sims23_generalist_merged_noCLust_oec_NoWspecTn_cvCF.pdf} \caption{No clusters} \end{subfigure} \hfill \begin{subfigure}[t]{1\textwidth} \centering \includegraphics[width=1.0\linewidth]{figures/sims23_generalist_merged_CLust_oec_NoWspecTn_cvCF.pdf} \caption{Clusters} \end{subfigure} \caption{Performance of the OEC$^{\text{S}}$ compared to MSS$^{\text{G}}$ and the ToM algorithm. Figures are zoomed in to easily visualize important differences.} \end{figure} \begin{table}[h] \centering \begin{minipage}[t]{1.0\linewidth} \centering \begin{tabular}{rrr|rr|rrrr} \toprule \toprule \multicolumn{3}{c}{\footnotesize\bfseries ~~~Parameters} \vline & \multicolumn{1}{c}{\footnotesize\bfseries $\mathbf{OEC^{\text{G}}}$} & \multicolumn{1}{c}{\footnotesize\bfseries $\mathbf{MSS^{\text{G}}}$} \vline & \multicolumn{1}{c}{\footnotesize\bfseries $\mathbf{OEC^{\text{S}}}$} & \multicolumn{1}{c}{\footnotesize\bfseries $\mathbf{MSS^{\text{S}}}$} & \multicolumn{1}{c}{\footnotesize\bfseries $\mathbf{OEC^{\text{SN}}}$} & \multicolumn{1}{c}{\footnotesize\bfseries $\mathbf{MSS^{\text{SN}}}$ } \\ \multicolumn{1}{c}{\footnotesize\bfseries $C$} & \multicolumn{1}{c}{\footnotesize\bfseries $\sigma^2_X$} & \multicolumn{1}{c}{\footnotesize\bfseries $\sigma^2_{\delta}$} \vline & \multicolumn{2}{c}{\footnotesize vs. ToM~~~~~} \vline & \multicolumn{4}{c}{\footnotesize ~~~~~vs. Study-Specific Model ~~~~~} \\ \midrule \midrule 3 & 0.01 & 0.01 & 0.99 & 1.00 & 0.87 & 0.99 & 0.84 & 0.84\\ 3 & 1.50 & 0.01 & 0.96 & 1.07 & 0.85 & 0.99 & 0.85 & 0.83\\ 3 & 0.01 & 1.00 & 0.98 & 0.99 & 0.94 & 0.99 & 0.89 & 0.85\\ 3 & 1.50 & 1.00 & 1.02 & 1.85 & 1.01 & 0.99 & 0.99 & 0.85\\ \addlinespace 6 & 0.01 & 0.01 & 1.00 & 0.99 & 0.89 & 0.98 & 0.86 & 0.85\\ 6 & 1.50 & 0.01 & 0.97 & 1.00 & 0.89 & 0.98 & 0.86 & 0.85\\ 6 & 0.01 & 1.00 & 1.06 & 0.99 & 1.01 & 0.99 & 1.03 & 1.75\\ 6 & 1.50 & 1.00 & 1.12 & 1.15 & 1.03 & 0.99 & 1.06 & 1.74\\ \bottomrule \end{tabular} \end{minipage} \caption{Average simulation performance with ($C = 3$) and without ($C = 6$) clustering at varying degrees of covariate-shift ($\sigma^2_{X}$) and variance of random effects ($\sigma^2_{\delta}$). Each section indicates the performance of the method (e.g., OEC$^{\text{G}}$) relative to a baseline of the ToM algorithm or a study-specific model respectively (e.g., RMSE$_{\text{OEC}^{\text{G}}}$ / RMSE$_{\text{ToM}}$, RMSE$_{\text{OEC}^{\text{S}}}$ / RMSE$_{\text{MSS}^{\text{S}}}$). Monte Carlo error was at most 0.003.} \label{table:generalSims_v2} \end{table} The OEC$^{\text{G}}$ outperformed the MSS$^{\text{G}}$ across all values of both $\sigma^2_X$ and $\sigma^2_{\delta}$, when there was clustering in the studies. The OEC$^{\text{G}}$ outperformed the ToM across all values of $\sigma^2_X$ and $\sigma^2_{\delta}$ except for very high levels of $\sigma^2_{\delta}$, where the two algorithms were comparable. When there was no clustering, the OEC$^{\text{G}}$ outperformed both the ToM and the MSS$^{\text{G}}$ at lower values of $\sigma^2_{\delta}$ and was comparable to both algorithms at higher values of $\sigma^2_{\delta}$. The OEC$^{\text{S}}$ exhibited superior performance compared to the MSS$^{\text{S}}$ in most settings explored. However, when at high levels of $\sigma^2_{\delta}$ and when the data exhibited no clustering, the algorithms performed comparably. The OEC$^{\text{SN}}$ tended to perform better when there was no clustering and there was higher variance of the random effects. When the data exhibited clustering, the MSS$^{\text{SN}}$ performed comparably or slightly better than its OEC counterpart in all settings explored. While covariate shift appeared to influence the relative performance of the methods in the generalist setting, it did not appear to explain much of the variability in performance of the OEC in the specialist case (i.e., OEC$^{\text{S}}$ and OEC$^{\text{SN}}$). At a fixed value of $\sigma^2_{\delta}$, the performance of the OEC$^{\text{G}}$ relative to the MSS$^{\text{G}}$ varied as a function of $\sigma^2_X$. It appeared the relative performance of the OEC$^{\text{G}}$ improved as a function of $\sigma^2_X$. However, it appears the OEC$^{\text{S}}$ performed better relative to its MSS counterpart when there were lower levels of covariate shift. These results demonstrate the benefits of an all-in-one approach. The OEC$^{\text{G}}$ often outperformed both MSS$^{\text{G}}$ and the ToM. While MSS$^{\text{G}}$ often performed well compared to the ToM, it suffers from cases where it is vastly outperformed by the ToM. For example, when $\sigma^2_{\delta}$ and $\sigma^2_{X}$ were high and there was clustering in the studies ($C = 3$), the generalist approach exhibited an average RMSE about $80\%$ higher than the ToM. This echos the frequent empirical observation as well as insights from analytical work comparing ToM and ensembling \citep{ren, Guan}. The OEC$^{\text{G}}$ approach however, does not suffer from cases where it is vastly outperformed by the standard benchmarks; indeed, the OEC$^{\text{G}}$ was comparable to the ToM in that simulation setting. The ToM modestly outperformed the OEC$^{\text{G}}$ on average when $\sigma^2_{\delta}$ was high and the studies did not exhibit clustering, but this appeared to be driven by outliers. The performance of the OEC$^{\text{S}}$ and OEC$^{\text{SN}}$ further demonstrate the utility of jointly estimating model parameters and ensemble weights. The OEC$^{\text{S}}$ strongly outperforms the study-specific model and the MSS$^{\text{S}}$ (by as much as about $15\%$). While the OEC$^{\text{SN}}$ performs comparably or slightly worse than the MSS$^{\text{SN}}$ method in some settings, it importantly never performs worse than a study-specific model. When studies do not cluster and $\sigma^2_X$ and $\sigma^2_{\delta}$ are high, the MSS$^{\text{SN}}$ method exhibits an RMSE about $75\%$ higher than a simple study-specific model. In these cases, OEC$^{\text{SN}}$ still remains superior to or competitive with the study-specific model and the MSS$^{\text{SN}}$. Taken together, these simulations demonstrate that the performance of the OEC was often comparable or superior to MSS in both generalist and specialist settings. Additionally, while MSS methods sometimes exhibited very poor performance compared to benchmark approaches, the OEC methods consistently outperformed these methods in these cases, highlighting the robustness of these approaches. \begin{figure}[H] \centering \begin{subfigure}[t]{1\textwidth} \centering \includegraphics[width=1.0\linewidth]{figures/sims23_specialist_Noclusts_oec_NoWspecTn_cvCF.pdf} \caption{No clusters} \end{subfigure} \hfill \begin{subfigure}[t]{1\textwidth} \centering \includegraphics[width=1.0\linewidth]{figures/sims23_specialist_clusts_oec_NoWspecTn_cvCF.pdf} \caption{Clusters} \end{subfigure} \caption{ Performance of the OEC$^{\text{S}}$ and OEC$^{\text{SN}}$ compared to their MSS counterparts. Figures are zoomed in to easily visualize differences.} \end{figure} \section{Discussion} \label{discussion} We propose and evaluate Optimal Ensemble Construction (OEC), a flexible approach that can be used to construct ensemble learners in domain generalization and transfer learning. OEC generalizes two-stage multi-study stacking in cases where the individual learners are finitely parameterized, by specifying an explicit loss function. OEC improved prediction performance of both specialist multi-study stacking (for transfer learning) and generalist multi-study stacking (for domain generalization). We observed the most consistent gains in the transfer learning setting. In our application, we showed how leveraging external sources of data through the OEC can be used to improve the accuracy of excess mortality estimation when countries do not have sufficient pre-disaster data. Even for countries that have sufficient training data, our method may prove useful when analyzing mortality (or any other vital statistics outcome) stratified by demographic indicators, or subregions of a country \citep{islam2021excess} since it is common to encounter small counts for the outcome when conducting analyses within substrata. In such cases, it may prove beneficial to borrow information from neighboring regions, or other demographic groups. More broadly, using multi-study methods in counterfactual estimation may be a promising area of future research in settings where data sources for counterfactual estimation are limited. The work also adds to the growing body of literature exploring the application of ensembling methods in COVID-19-related prediction problems. For example, ensembling techniques have proven useful for predicting cases \citep{covidEnsemble1, covidEnsemble2}. Recent work has proposed gradient boosted trees to directly estimate excess mortality during the COVID-19 pandemic based upon a large set of covariates such as COVID-19 case counts and demographic variables \citep{economist}. The authors proposed to use data from many countries during model training and motivated their methods by the need for excess mortality predictions in countries which have not made estimates available. They propose to pool data from different countries before fitting one global model to predict \textit{excess} mortality given a set of country-specific covariates. This differed from our method which generated an ensemble of country-specific models to predict \textit{baseline} mortality based upon historical mortality trends. Our method is not without its limitations. A disadvantage of combining the study-specific and ensemble weighting loss functions is that non-convexity arises from the resulting bilinear terms. As a result, the optimization approach implemented here is not guaranteed to converge to the global minimum and requires careful initialization. We found that initializing at MSS estimates yields consistently high prediction performance in practice and appeared to outperform other heuristics such as random restarts. Thus, the optimization procedure will always be more computationally expensive than multi-study stacking. However, in all the settings explored, the optimization procedure converged within a couple seconds and allowed for tuning over large grids of hyperparameter values. It is possible to obtain global solutions to the problems by using modern techniques in mixed integer programming~\citep{bertsimas2017certifiably}. Such techniques can deliver optimality certificates for the associated optimization problems but would likely be much slower compared to the methods we present here. The OEC method that we proposed here lend itself to future extensions. For example, we have introduced the OEC in the regularized linear-linear setting, but one could easily replace the linear models with other specifications (e.g., support vector machines) at either the SSL stage, the ensembling stage or both. Also, loss functions could be replaced by penalized negative log-likelihoods reflecting distributions other than the Gaussian. Similarly, while the propositions focus on the linear models case, analogous results can be shown for the broader class of generalized linear models. However, we keep the analysis focused on the linear case, empirically explored in the present work. In addition, some of the results above can be recast to account for models with regularization, but these generalizations require additional regularity conditions and may not provide further insight into the connections between the OEC and earlier multi-study methods. The methods presented here can complement many methods proposed in the rich literature of transfer learning, domain generalization and multi-task learning \citep{Zhang, Zhuang, Farahani}. A number of methods proposed in these bodies of work seek to jointly train ensembles using matrix decomposition methods of model parameters and matrix regularization schemes. Indeed, such methods can be used in conjunction with our framework since they focus on improving prediction performance through the model parameter estimation procedure, not the ensemble weighting scheme. In this sense, our work complements many cutting edge methods for multi-source data integration. In summary we propose a flexible generalization of multi-study stacking that yields improvements in prediction performance in both ``generalist'' and ``specialsit'' implementations. We hope the present work will be beneficial both methodologically, by complementing existing methods, as well as in improving excess mortality estimation in low counts settings. \section{Software and Reproducibility} \label{sec5} Code and instructions to reproduce analyses, figures and tables are available at: \url{https://github.com/gloewing/OEC}. This contains code to tune and fit penalized linear regression problems with all the methods assessed here. \section*{Acknowledgments} GCL was supported by the NIH, F31DA052153; T32 AI 007358. RA was supported by the NIH, T32ES007142. GP was supported by NSF-DMS grants 1810829 and 2113707. RM acknowledges partial research support from NSF-IIS-1718258. {\it Conflict of Interest}: None declared. \bibliographystyle{biorefs}
\section{Introduction} \label{intro} Topological Data Analysis (TDA) is rising field useful for the analysis of high-dimensional data structure \cite{carlsson:2009}. The popularly used tool in TDA is persistent homology, introduced by Edelsbrunner et al. in 2002 \cite{Edelsbrunner2002}, where snapshots of the topological structure of the data set are taken at many different scales and the results are compared from one scale to the next. Singular homology is, in general, hard to compute, and almost impossible to compute for real-world data but when the given topological space is approximated from finitely many points, simplicial homology, can instead be used as it is easily computable. Persistent homology is obtained by computing simplicial homology at different scales. Previous applications of TDA and persistent homology include 3D shape segmentation \cite{carriere:3Dshapes}, astrophysics \cite{cole_shiu,heydenreich2020,Xu2019}, biology and medicines \cite{McGuirl2020,Nicponski2020}, and neuroscience \cite{bendich2016, Sizemore:2019} to name a few. Popular representations of persistent homology include persistent diagrams and persistent barcodes. Persistent barcodes and persistent diagrams are mathematically equivalent and they demonstrate how the homological structures of the given data change according to scale. Although these are useful for data analysis, they are not necessarily compatible with typical machine learning workflows in their raw forms as they are designed as multisets and collections of intervals, respectively. One way to reconcile these persistent homology representations and machine learning algorithms is to vectorize the persistent diagrams or the persistent barcodes \cite{adams2015persistence}. There are several vectorization methods including the topological vector, persistence vector, and persistence images. These vectorization methods are, in general, more computationally efficient than kernel methods. The construction of the topology vectors and persistence vectors are straightforward and easy to implement. The persistence image is less straightforward (i.e. slower) to compute but delivers better classification results, in general. Another vectorization that we consider in this paper is the Betti sequence \cite{Umeda2017} which contains the Betti numbers of the homology groups of the simplicial complex built on the data set at all scales of the persistent homology. In this paper, we prove by example that the Betti sequence is unstable with respect to the 1-Wasserstein distance. In other words, a small change in a persistent diagram leads to a large change in the 1-Wasserstein norm of the Betti Sequence. To our knowledge, the instability of the Betti sequence, although mentioned in \cite{chung2020persistence}, has not yet been explicitly shown. In practice, such large change may not be significant if finer filtration intervals are chosen but to remedy the instability in the Betti sequence we propose a new stabilized version and prove its stability. In the stabilization, we adopt a similar Gaussian-smoothing approach as in \cite{johnson:2020,zielinski2018persistence}. In this paper, we show numerical examples that support our statement and show the validation of the proposed stabilization of the Betti sequence. This paper will be organized as follows: Section 2 will cover the background of persistent homology and its representations and it will cover the definition and instability of the Betti sequence. Section 3 will introduce our proposed stabilization of the Betti sequence and provide a proof of its stability. Section 4 will demonstrate the normalized cumulative Betti sequence on various data sets. Section 5 contains our concluding remarks. \section{Persistent Homology and Betti Sequence} The main persistent homology representations that we consider in this paper are the persistence diagram and the persistence barcode. Both are equivalent and each one can be recovered from the other while each can be used differently in terms of numerical manipulations. Let $X$ be a given topological space. Singular homology describes the homological structure of $X$ with the $n$-dimensional homology group $H_n$. The homology group, $H_n$ is defined by $H_n = Ker(\delta_n)/Im(\delta_{n+1})$, which is the quotient group of the kernel, $Ker(\delta_n)$, and image groups, $Im(\delta_{n+1})$, of the boundary map, $\delta_n$: $C_n(X) \rightarrow C_{n-1}(X)$ where $C_n(X)$ is the free abelian group whose basis is the set of singular $n$-simplices in $X$. Roughly speaking, the rank of the $n$-dimensional homology group $H_n$, called the $n$th Betti number, indicates how many $n$-dimensional holes are there in $X$. This information is useful in understanding the topological structure of $X$. However, computing $H_n$ is not easy as $X$ is an arbitrary topological space in general. In fact, it is not practical to use for $X$ from real-world applications. Thus, in order to use homological features of $X$ for data analysis, instead of using $X$ directly, we use a point cloud sampled from $X$. We use typical building algorithms to obtain the point cloud approximation of $X$, known as the simplicial complex $K$. There are various ways of constructing $K$ including the Vietoris-Rips complex, $V(\tau)$ where the non-negative real number $\tau$ is known as the filtration parameter. With the given value of $\tau$, $V(\tau)$ is constructed by gluing simplices whose pairwise distance is within $\tau$. However, it is not known which value of $\tau$ approximates $X$ best. For this reason, we construct $V$ for various $\tau$, which gives us the notion of {\it persistence}. The $n$th homology, $H_n$ corresponding to $V(\tau)$ can be defined similarly as above. Let $\beta_n$ be the Betti number for $H_n$. $\beta_0$ represents the number of connected components in $K$ and $\beta_n$ the number of $n$-dimensional cycles or holes. As we have the natural inclusion of $V(\tau_i) \hookrightarrow V(\tau_j) $, $\tau_i \le \tau_j$ and a homomorphism $H_n(V(\tau_i)) \rightarrow H_n(V(\tau_j))$, we have the relation between $\beta_n$ versus $\tau$, which generates the graph of the persistent barcodes in the considered $n$-dimension. On the persistent barcodes, an interval of filtration values corresponding to the same $\beta_n$ is known as a bar and indicates the $n$-dimensional hole structure of $K$. If we call the starting point of each bar the {\it birth} and the ending point the {\it death} we can create the persistent diagram multiset by considering all points of the form $(birth, death)$. Vectorizations of persistent diagrams and persistent barcodes and their stability are key aspects that we consider in this paper. \subsection{Definition of the Betti Sequence} As explained above, now we consider $K$ instead of $X$ by sampling finitely many distinct points from $X$. Recall the Betti number, $\beta_n$, is the rank of the $n$th dimensional homology group $H_n(K,R)$. More specifically, $\beta_0$ represents the number of connected components in $K$, $\beta_1$ the number of $1$-dimensional holes, etc. As we have the natural inclusion of our filtered simplicial complex $\{VR_{\tau_i}\}$, namely $i: VR_{\tau_i} \hookrightarrow VR_{\tau_j}$, $\tau_i \le \tau_j$, we have a homomorphism $H_n(VR_{\tau_i}) \rightarrow H_n(VR_{\tau_j})$. This defines a relationship between $\beta_n$ and $\tau$, which is used to generate the persistence barcode of dimension $n$. The Betti sequence, or Betti curve, originally defined in 2017, is the vectorization of Betti numbers obtained in persistent homology \cite{Umeda2017}. The Betti sequence uses the persistence barcode and a discretization of the filtration interval to define the vectorization. At each value of $\tau$ in the discretization, we count the number of generators existing at that filtration and that is our vector entry. We provide the formal definition of the Betti sequence below. \begin{definition} Given a persistence barcode of dimension $n$ with finitely many persistence intervals and a maximum filtration $\tau_{max} > 0$, let $\{\tau_i\}_{i =1}^{M}$ be equally spaced points in $[0,\tau_{max}]$. Let $\vec{v}_b = \left(v_i\right)^{M}_1$ be the vector whose entries $v_i$ count the number of persistence intervals in the barcode existing for the filtration value $\tau_i$. \end{definition} This definition suffers from the following flaw: persistence bars, if they fall entirely in between discretization values, are not counted at all and have no impact on the Betti sequence. Note that if the mesh size is exceedingly small then any bar which falls entirely in between the tau values is likely due to noise and their omission might not be an issue. However, if the mesh size is chosen poorly this could result in a major loss of information. We propose an alternate definition of the Betti sequence which agrees with the original definition in the limit as the mesh size goes to zero. \begin{definition} Given a persistence barcode of dimension $n$ with finitely many bars and a maximum filtration $\tau_{max} > 0$, divide the interval $[0,\tau_{max}]$ into $M$ equal subintervals of length $\Delta \tau = \frac{\tau_{max}}{M}$. Let $\vec{v}_b = \left(v_i\right)^{M}_1$ be the vector whose entries $v_i$ count the number of bars in the barcode that exist for at least one filtration value $\tau$ in the $i$th subinterval $\left(\tau_{i-1} , \tau_{i}\right)$ of the filtration interval $[0,\tau_{max}]$. \end{definition} This alternate definition has the added benefit of being easily translatable to the language of persistence diagrams making the study of the stability of the Betti sequence with respect to the p-Wasserstein metric possible. \subsection{Redefining the Betti Sequence via the Persistence Diagram} In order to discuss stability with respect to the Wasserstein metric, we need to redefine the Betti sequence in terms of the persistent diagram. Consider a persistent diagram $B$ with finitely many off-diagonal points. Then a bar on the corresponding persistent barcodes exists at some filtration value $\tau$ in the subinterval $\left( \tau_{i -1 }, \tau_{i}\right)$ if and only if its birth-death point on the persistent diagram falls in the shaded region, call it $D_i$, illustrated in Figures \ref{fig:shadedregion} and \ref{fig:shadedregion1} \begin{figure}[!htb] \minipage{0.99\textwidth} \begin{center} \begin{tikzpicture}[scale=0.5] \draw[black, thick] (0,0) -- coordinate (x axis mid) (8,0); \draw[black, thick] (0,0) -- coordinate (y axis mid) (0,8); \draw[black] (0,0) --(8,8); \node[below=0.3cm] at (x axis mid) {Birth}; \node[rotate=90, above=0.5cm] at (y axis mid) {Death}; \filldraw[color=white, fill=gray!20, ultra thin, dashed] (0,2) -- (2,2) -- (4,4) -- (4,8) -- (0,8) --(0,2) -- cycle; \draw[gray, thick, dashed] (0,2) -- (2,2); \draw[gray, thick, dashed] (2,2) -- (4,4); \draw[gray, thick, dashed] (4,4) -- (4,8); \draw[gray, thick, dashed] (0,2) -- (0,8); \filldraw[black] (2,0) circle (1pt) node[anchor=north] {\small $\tau_{i-1}$}; \filldraw[black] (0,2) circle (1pt) node[anchor=east] {\small $\tau_{i-1}$}; \filldraw[black] (4,0) circle (1pt) node[anchor=north] {\small $\tau_{i}$}; \filldraw[black] (0,4) circle (1pt) node[anchor=east] {\small $\tau_{i}$}; \filldraw[black] (8,8) circle (0.1pt) node[anchor = west] {\large $\Delta$}; \node at (2,4) {\large $D_i$}; \end{tikzpicture} \end{center} \endminipage\hfill \caption{The shaded region, $D_i$, of the persistence diagram corresponding to the filtration interval $[\tau_{i-1}, \tau_i]$ on a barcode. Here $\Delta$ is the diagonal.} \label{fig:shadedregion} \end{figure} \begin{figure}[!htb] \minipage{0.49\textwidth} \begin{tikzpicture}[scale=0.6] \draw[black, thick] (0,0) -- coordinate (x axis mid) (8,0); \draw[black, thick] (0,0) -- coordinate (y axis mid) (0,8); \draw[black] (0,0) --(8,8); \node[below=0.3cm] at (x axis mid) {Birth}; \node[rotate=90, above=0.5cm] at (y axis mid) {Death}; \filldraw [color=blue!60,fill=blue!10, ultra thin, dashed] (0,2) rectangle (2,4); \filldraw [color=white!60,fill=orange!10, ultra thin, dashed] (0,4) rectangle (2,8); \filldraw [color=white!60,fill=red!10, ultra thin, dashed] (2,4) rectangle (4,8); \filldraw[color=green, fill=green!10, ultra thin, dashed] (2,2) -- (4,4) -- (2,4) -- cycle; \draw[color=red!60, ultra thin, dashed] (4,4) -- (4,8); \draw[color=red!60, ultra thin, dashed] (2,4) -- (2,8); \draw[color=red!60, ultra thin, dashed] (2,4) -- (4,4); \draw[color=orange!60, ultra thin, dashed] (2,4) -- (2,8); \draw[color=orange!60, ultra thin, dashed] (0,4) -- (0,8); \draw[color=orange!60, ultra thin, dashed] (0,4) -- (2,4); \filldraw[black] (1,0) circle (1pt) node[anchor=north] {\small $\tau_{i-1}$}; \filldraw[black] (0,1) circle (1pt) node[anchor=east] {\small $\tau_{i-1}$}; \filldraw[black] (2,0) circle (1pt) node[anchor=north] {\small $\tau_{i}$}; \filldraw[black] (0,2) circle (1pt) node[anchor=east] {\small $\tau_{i}$}; \filldraw[black] (1,2) circle (1pt) node[anchor=south] {\small ($\tau_{i-1}, \tau_{i})$}; \filldraw[black] (8,8) circle (0.1pt) node[anchor = west] {\large $\Delta$}; \end{tikzpicture} \endminipage\hfill \caption{The shaded region, $D_i$, of the persistence diagram corresponding to the filtration interval $[\tau_{i+1}, \tau_i]$ on a barcode for four different cases. Here $\Delta$ is the diagonal.} \label{fig:shadedregion1} \end{figure} More precisely, a bar on a barcode exists at some filtration value $\tau$ in the subinterval $\left( \tau_{i -1 }, \tau_{i}\right)$ if and only if its birth-death point on the persistence diagram falls in one of the following four subregions of $D_i$: \begin{itemize} \item If the birth-death point lies in the red region, then the bar begins after $\tau_{i - 1}$ and ends after $\tau_{i}$. \item If the birth-death point lies in the orange region, then the bar begins before $\tau_{i - 1}$ and ends after $\tau_{i}$. \item If the birth-death point lies in the green region, then the bar begins after $\tau_{i - 1}$ and ends before $\tau_{i}$. \item If the birth-death point lies in the blue region, then the bar begins before $\tau_{i - 1}$ and ends before $\tau_{i}$. \end{itemize} Let us now make a precise description of the $D_i$ as a subset of $\mathbb{R}^2$ (with multiplicity). Let $D_i = K_i \setminus C_i$ where $$ K_{i} = \{ (b,d) \in \mathbb{R}^2 \, \vert \quad 0 < b < \tau_{i}, d > \tau_{i - 1} \} \hspace{0.1in} \hspace{0.2 in } $$ and $ C_{i} = \{ (b,d) \in \mathbb{R}^2 \, \vert \quad \tau_{i - 1} \leq b \leq \tau_{i}, \tau_{i -1} < d < b \} $$ \begin{definition} Let $B$ be a persistence diagram with finitely many off-diagonal points. The Betti sequence of $B$ is defined as $$\vec{v}\,(B) = \left(v_i\right)_{1}^N \in \mathbb{R}^N$$ where $v_i =| D_i \bigcap B|$ is the cardinality of the intersection of $D_i$, described above, and the persistence diagram $B$. \end{definition} \subsection{Instability of the Betti Sequence} Recall the definition of the $p$-Wasserstein distance between persistence diagrams \cite{wasserstein:1969}. \begin{definition}\label{wasserstein} The $p$-Wasserstein distance between persistence diagrams $X$ and $Y$ is \begingroup \small $$W_p(X,Y) = \left[ \inf_{\eta:X \to Y} \sum_{x \in X} || x - \eta(x)||_{\infty}^p \right]^{1/p}$$ \endgroup where $\eta:X \to Y$ is a partial matching of $X$ and $Y$. Note as $p \to \infty$ this distance becomes the {\it bottleneck distance}. \end{definition} \begin{theorem} Let $B$ and $B'$ be persistence diagrams containing only finitely many off-diagonal points. The Betti sequence is \textbf{not stable} with respect to the 1-Wasserstein distance. That is, there exists persistence diagrams $B$ and $B'$ such that there does not exist a non-negative constant $C$ such that $$ || \vec{v}\,(B) - \vec{v}\,(B') ||_{\infty} \leq C \cdot W_1(B,B') $$ \end{theorem} \begin{proof} We will prove by example. Let $B$ be a persistence diagram with finitely many off-diagonal points and with maximum filtration $\tau_{max}$. Suppose further, for diagram $B$, that the number of subintervals, $N$, of $[0, \tau_{max}]$ is fixed so that there exists exactly one birth-death point $x_i = (b_i,d_i)$ with $\tau_{i-1} < b_i,d_i < \tau_i$ in each of the non-overlapping parts of the regions $D_i$, described above, for $1 \leq i \leq N$ as seen in Figure \ref{fig:proofdiagram}. Fix an index $j$ and for any $\epsilon > 0$ let $d_j = \tau_{j} - \frac{\epsilon}{2}$. The Betti sequence vector, $\vec{v} \,(B)$, of this persistence diagram is then, by definition, given by the following $$\vec{v} \,(B) = \langle 1,...,1,1,1,...,1 \rangle^{T}$$ \begin{figure}[!htb] \minipage{0.49\textwidth} \centering \begin{tikzpicture}[scale=0.7] \draw[black, thick] (0,0) -- (4.5,0); \draw[black, thick] (0,0) -- (0,4.5); \draw[black, thick] (0,0) -- (4,4); \filldraw[color=gray, fill=gray!10, ultra thin, dashed] (0,0) -- (1,1) -- (0,1) -- cycle; \filldraw[color=gray, fill=gray!10, ultra thin, dashed] (1,1) -- (2,2) -- (1,2) -- cycle; \filldraw[color=gray, fill=gray!10, ultra thin, dashed] (2,2) -- (3,3) -- (2,3) -- cycle; \filldraw[color=gray, fill=gray!10, ultra thin, dashed] (3,3) -- (4,4) -- (3,4) -- cycle; \filldraw[black] (0.7,0.9) circle (1pt) node[anchor=south] {\tiny $(b_1,d_1)$}; \filldraw[black] (1.2,1.6) circle (1pt) node[anchor=south] {\tiny $(b_2,d_2)$}; \filldraw[black] (2.1,2.7) circle (1pt) node[anchor=south] {\tiny $(b_3,d_3)$}; \filldraw[black] (3.5,3.9) circle (1pt) node[anchor=south] {\tiny $(b_4,d_4)$}; \filldraw[black] (4.2,4.2) circle (0.7pt); \filldraw[black] (4.3,4.3) circle (0.7pt); \filldraw[black] (4.4,4.4) circle (0.7pt); \filldraw[black] (0,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{0}$}; \filldraw[black] (1,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{1}$}; \filldraw[black] (2,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{2}$}; \filldraw[black] (3,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{3}$}; \filldraw[black] (4,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{4}$}; \filldraw[black] (0,1) circle (0.6pt) node[anchor=east] {\tiny $\tau_{1}$}; \filldraw[black] (0,2) circle (0.6pt) node[anchor=east] {\tiny $\tau_{2}$}; \filldraw[black] (0,3) circle (0.6pt) node[anchor=east] {\tiny $\tau_{3}$}; \filldraw[black] (0,4) circle (0.6pt) node[anchor=east] {\tiny $\tau_{4}$}; \end{tikzpicture} \endminipage\hfill \minipage{0.49\textwidth} \centering \begin{tikzpicture}[scale=0.7] \draw[black, thick] (0,0) -- (4.5,0); \draw[black, thick] (0,0) -- (0,4.5); \draw[blue, ultra thick] (0.7,1) -- (0.9,1); \draw[blue, ultra thick] (1.2,2) -- (1.6,2); \draw[blue, ultra thick] (2.1,3) -- (2.7,3); \draw[blue, ultra thick] (3.5,4) -- (3.9,4); \filldraw[black] (0,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{0}$}; \filldraw[black] (1,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{1}$}; \filldraw[black] (2,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{2}$}; \filldraw[black] (3,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{3}$}; \filldraw[black] (4,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{4}$}; \draw[gray!40, thick, dashed] (1,0) -- (1,4.4); \draw[gray!40, thick, dashed] (2,0) -- (2,4.4); \draw[gray!40, thick, dashed] (3,0) -- (3,4.4); \draw[gray!40, thick, dashed] (4,0) -- (4,4.4); \end{tikzpicture} \endminipage\hfill \caption{Left: The persistence diagram where all persistence points exist in the non-overlapping regions of the $D_i$ (the shaded triangles). Right: The corresponding persistence barcode.} \label{fig:proofdiagram} \end{figure} Now consider another persistence diagram $B'$ with finitely many off-diagonal points with the same maximum filtration, $\tau_{max}$ and the same number of intervals, $N$. Suppose $B'$ is almost an exact copy of $B$ except that $d_j$ has been shifted by $\epsilon$ to become $d_j ' = d_j + \epsilon = \tau_{j} + \frac{\epsilon}{2}$. Then the persistence point $x_j = (b_j, d_j')$ is in $D_{j + 1}$ and the Betti sequence for $B'$ is $$\vec{v}\,(B') = \langle 1, ..., 1, 2, 1, ..., 1 \rangle^{T}$$ where $ v_{j} = 1, v_{j + 1} = 2$, and $v_{j + 2} = 1$. For the Betti sequence vectorization to be stable with respect to the 1-Wasserstein distance under the small perturbation of $\epsilon$ we need a non-negative constant $C$ such that $$|| \vec{v}\,(B) - \vec{v}\,(B') ||_{\infty} \leq C \cdot W_1(B,B')$$ Clearly, $|| \vec{v}\,(B) - \vec{v}\,(B') ||_{\infty} = 1$ and if we recall the definition of the 1-Wasserstein distance $$W_1(B,B') = \inf_{\eta:B \to B'} \sum_{x \in B} ||x - \eta(x)||_{\infty}$$ where $\eta$ is a partial matching of $B$ and $B'$, we know that $W_1(B,B') = || (b_j, d_j) - (b_j, d_j') ||_{\infty} = \epsilon$. Thus for stability we need a non-negative constant $C$ such that $1\leq C \cdot \epsilon \iff \frac{1}{\epsilon} \leq C$. However, as $\epsilon > 0$ can be made arbitrarily small, there does not exist such a constant $C$. Therefore the Betti sequence is unstable with respect to the 1-Wasserstein distance. \end{proof} \begin{remark} Similarly, it can be shown that the Betti sequence is unstable with respect to the Wasserstein distance with $p \rightarrow \infty$, i.e. with respect to the bottleneck distance. \end{remark} \section{Stablized Betti Sequence} We now propose a stabilized version of the Betti sequence inspired by the Gaussian smoothing techniques seen in \cite{ johnson:2020, zielinski2018persistence} and prove its stability with respect to the 1-Wasserstein distance. \begin{definition} Suppose $B$ is a persistence diagram with $M$ off-diagonal points $x_j = (b_j,d_j)$ and maximum filtration $\tau_{max}$. Divide the interval $[0, \tau_{max}]$ into $N$ equal subintervals of the form $[\tau_{i-1}, \tau_{i}]$ each of length $\Delta \tau$ as above. Let $\{ G_i ; \mu_i, \Sigma_i\}_{i = 1}^{N}$ be a collection of Gaussian distributions where $\mu_i$, the mean of $G_i$, is chosen to be $\langle \tau_{i-1},\tau_{i} \rangle^T$ and where $\Sigma_i$ is the covariance matrix for $G_i$. Define $w_i$ to be $w_i = \frac{1}{N}$ and note that each $w_i > 0$ and $\sum_{i = 1}^{N} w_i = 1$. Then the stable Betti Sequence vector is defined by \begingroup \small $$ \vec{v}^{\text{ s}} = \left( v_i^{\text{ s}} = w_i \sum_{j =1}^{M} p_i(x_j\,|\, \mu_i,\Sigma_i)\right)_{i = 1}^{N}$$ \endgroup where \begin{eqnarray} p_i(x_j \, | \, \mu_i,\Sigma_i) &=& \frac{\exp\left(-\frac{1}{2}(x_j - \mu_i)^T \Sigma_i^{-1}(x_j - \mu_i)\right)}{2\pi |\Sigma_i|^{1/2}} \nonumber \\ &=& \frac{\exp\left(-\frac{1}{2\Delta \tau} ||x_j - \mu_i||_2\right)}{2 \pi \Delta \tau} \nonumber \end{eqnarray} is the probability density function of Gaussian $G_i$ at $x_j$. Note that $|\Sigma_i|$ is the determinant of the covariance matrix, $\Sigma_i$. \end{definition} \begin{remark} The choice of $\Sigma_i$ is still an open question. Ideally, we would want to use a sharp Gaussian and so $\Sigma_i$ should be defined so that $p_i(x_j \,|\, \mu_i, \Sigma_i)$ is essentially the same for every persistence point $x_j$ in $D_i$ not ``near" the boundary of $D_i$. The choice of $\Sigma_i$ should be further studied in future work. \end{remark} \begin{theorem}\label{thm:stability} Let $B$ be a persistence diagram of finite size and $B'$ be the persistence diagram obtained by perturbing $B$ by an arbitrary $\epsilon > 0$ such that $W_1(B,B') \leq \epsilon$. Then there exists a non-negative constant $C < \infty$ for any $\epsilon$ such that $$||\vec{v}^{\text{ s}}(B) - \vec{v}^{\text{ s}}(B')||_{\infty} \leq C \cdot W_1(B,B')$$ \end{theorem} \begin{proof} Let $M$ be the number of off-diagonal points in $B$. Let $\eta: B \to B'$ be the partial matching that realizes the 1-Wasserstein distance between $B$ and $B'$. For a fixed $i \in \{1,...,N\}$ we have \begin{eqnarray} \Bigg|v_i^{\text{ s}}(B) - v_i^{\text{ s}}(B')\Bigg| &=& \Bigg|w_i \sum_{j = 1}^{M} \left(p_i(x_j\, | \, \mu_i, \Sigma_i) - p_i(\eta(x_j) \, | \, \mu_i,\Sigma_i)\right)\Bigg| \nonumber \\ &\leq& w_i \sum_{j = 1}^{M} \Bigg|p_i(x_j \, | \, \mu_i,\Sigma_i) - p_i(\eta(x_j) \, | \, \mu_i,\Sigma_i)\Bigg| \nonumber \end{eqnarray} As $p_i : \mathbb{R}^2 \to \mathbb{R}$ is continuously differentiable it is also Lipschitz continuous with Lipschitz constant $L_i$. We get \begin{eqnarray} w_i \sum_{j = 1}^{M} \Bigg|p_i(x_j\,| \, \mu_i,\Sigma_i) - p_i(\eta(x_j)\,| \, \mu_i,\Sigma_i)\Bigg| &\leq& w_i \sum_{j = 1}^{M} \Bigg|L_i(x_j - \eta(x_j))\Bigg| \nonumber \\ &=& w_i L_i \sum_{j = 1}^{M} \Bigg|x_j - \eta(x_j)\Bigg| \nonumber \\ &=& w_i L_i \cdot W_1(B, B') \nonumber \end{eqnarray} If we let $C = \max_{i \in [1,...,N]} w_i L_i$ we have the desired result. \end{proof} \begin{example} Returning to a simplified version of the example used to show that the Betti sequence was unstable, we will now show that Theorem \ref{thm:stability} is satisfied for this example. Let $B$ be the persistence diagram that contains two off-diagonal points: $x_1 = \left(0.25,0.5 - \frac{\epsilon}{2}\right)$ and $ x_2 = (0.75, 0.85)$ (see Figure \ref{fig:stablebetti}) for any $0 < \epsilon$. \begin{figure}[hbt!] \minipage{0.49\textwidth} \centering \begin{tikzpicture}[scale=1] \draw[black, thick] (0,0) -- (4.5,0); \draw[black, thick] (0,0) -- (0,4.5); \draw[black, thick] (0,0) -- (4,4); \filldraw[color=gray, fill=gray!10, ultra thin, dashed] (0,0) -- (2,2) -- (0,2) -- cycle; \filldraw[color=gray, fill=gray!10, ultra thin, dashed] (2,2) -- (4,4) -- (2,4) -- cycle; \filldraw[black] (1,1.95) circle (1pt) node[anchor=south] {\tiny $\left(0.25, 0.5 - \frac{\epsilon}{2}\right)$}; \filldraw[black] (2.8,3.4) circle (1pt) node[anchor=south] {\tiny $(0.75,0.8)$}; \draw[red, thick, dashed] (0,2) -- (2,2); \draw[red, thick, dashed] (2,2) -- (4,4); \draw[red, thick, dashed] (4,4) -- (4,4.4); \draw[red, thick, dashed] (0,2) -- (0,4.4); \draw[blue, thick, dashed] (0,0) -- (2,2); \draw[blue, thick, dashed] (2,2) -- (2,4.4); \draw[blue, thick, dashed] (0,0) -- (0,4.4); \filldraw[black] (4.2,4.2) circle (0.7pt); \filldraw[black] (4.3,4.3) circle (0.7pt); \filldraw[black] (4.4,4.4) circle (0.7pt); \filldraw[black] (0,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{0} = 0$}; \filldraw[black] (2,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{1} = 0.5$}; \filldraw[black] (4,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{2} = 1$}; \filldraw[black] (0,2) circle (0.6pt) node[anchor=east] {\tiny $\tau_{1} = 0.5$}; \filldraw[black] (0,4) circle (0.6pt) node[anchor=east] {\tiny $\tau_{2} = 1$}; \end{tikzpicture} \endminipage\hfill \minipage{0.49\textwidth} \centering \begin{tikzpicture}[scale=1] \draw[black, thick] (0,0) -- (4.5,0); \draw[black, thick] (0,0) -- (0,4.5); \draw[blue, ultra thick] (1,1) -- (1.8,1); \draw[blue, ultra thick] (2.8,2) -- (3.4,2); \filldraw[black] (0,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{0} = 0$}; \filldraw[black] (2,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{1} = 0.5$}; \filldraw[black] (4,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{2} = 1$}; \draw[gray!40, thick, dashed] (2,0) -- (2,4.4); \draw[gray!40, thick, dashed] (4,0) -- (4,4.4); \end{tikzpicture} \endminipage\hfill \caption[Stable Betti Sequence Example Persistence Diagram $B$]{Left, the persistence diagram $B$ with two persistence points $\left(0.25, 0.5 - \frac{\epsilon}{2}\right)$ and $(0.75, 0.8)$. The dashed blue lines outline the region $D_1$ used in the definition of the Betti sequence and the red dashed lines outline the region $D_2$. Right, its corresponding persistence barcode.}\label{fig:stablebetti} \end{figure} The stable Betti sequence for the persistence diagram $B$, using maximum filtration 1 and two subintervals, is easily computed as the vector $\vec{v}^S(B) = \langle v^S_1, v^S_2 \rangle ^T$ where $$ v^S_1 = \frac{1}{ 2\pi} \left[ \exp\left(- \frac{1}{16} - \frac{\epsilon^2}{4} \right) + \exp\left(- \frac{549}{400}\right) \right]$$ $$v^S_2 = \frac{1}{ 2\pi} \left[ \exp\left(- \frac{1}{16} - \frac{\epsilon^2}{4} \right) + \exp\left(- \frac{41}{400}\right) \right]$$ Now let $B'$ be the persistence diagram, pictured in Figure \ref{fig:stablebettiBprime}, that contains two off-diagonal points: $y_1 = \left(0.25,0.5 + \frac{\epsilon}{2}\right)$ and $y_2 = (0.75,0.8)$, for any $0 < \epsilon$. \begin{figure}[hbt!] \minipage{0.49\textwidth} \centering \begin{tikzpicture}[scale=1] \draw[black, thick] (0,0) -- (4.5,0); \draw[black, thick] (0,0) -- (0,4.5); \draw[black, thick] (0,0) -- (4,4); \filldraw[color=gray, fill=gray!10, ultra thin, dashed] (0,0) -- (2,2) -- (0,2) -- cycle; \filldraw[color=gray, fill=gray!10, ultra thin, dashed] (2,2) -- (4,4) -- (2,4) -- cycle; \draw[red, thick, dashed] (0,2) -- (2,2); \draw[red, thick, dashed] (2,2) -- (4,4); \draw[red, thick, dashed] (4,4) -- (4,4.4); \draw[red, thick, dashed] (0,2) -- (0,4.4); \draw[blue, thick, dashed] (0,0) -- (2,2); \draw[blue, thick, dashed] (2,2) -- (2,4.4); \draw[blue, thick, dashed] (0,0) -- (0,4.4); \filldraw[black] (1,2.05) circle (1pt) node[anchor=south] {\tiny $\left(0.25,0.5 +\frac{\epsilon}{2}\right)$}; \filldraw[black] (2.8,3.4) circle (1pt) node[anchor=south] {\tiny $(0.75,0.8)$}; \filldraw[black] (4.2,4.2) circle (0.7pt); \filldraw[black] (4.3,4.3) circle (0.7pt); \filldraw[black] (4.4,4.4) circle (0.7pt); \filldraw[black] (0,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{0}=0$}; \filldraw[black] (2,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{1}=0.5$}; \filldraw[black] (4,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{2}=1$}; \filldraw[black] (0,2) circle (0.6pt) node[anchor=east] {\tiny $\tau_{1}=0.5$}; \filldraw[black] (0,4) circle (0.6pt) node[anchor=east] {\tiny $\tau_{2}=1$}; \end{tikzpicture} \endminipage\hfill \minipage{0.49\textwidth} \centering \begin{tikzpicture}[scale=1] \draw[black, thick] (0,0) -- (4.5,0); \draw[black, thick] (0,0) -- (0,4.5); \draw[blue, ultra thick] (1,1) -- (2.1,1); \draw[blue, ultra thick] (2.8,2) -- (3.4,2); \filldraw[black] (0,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{0}=0$}; \filldraw[black] (2,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{1}=0.5$}; \filldraw[black] (4,0) circle (0.6pt) node[anchor=north] {\tiny $\tau_{2}=1$}; \draw[gray!40, thick, dashed] (2,0) -- (2,4.4); \draw[gray!40, thick, dashed] (4,0) -- (4,4.4); \end{tikzpicture} \endminipage\hfill \caption[Stable Betti Sequence Example Persistence Diagram $B'$]{Left, the persistence diagram $B'$ with two persistence points $\left(0.25, 0.5 + \frac{\epsilon}{2}\right)$ and $(0.75, 0.8)$. The dashed blue lines outline the region $D_1$ used in the definition of the Betti sequence and the red dashed lines outline the region $D_2$. Right, its corresponding persistence barcode.}\label{fig:stablebettiBprime} \end{figure} The stable Betti sequence for the persistence diagram $B'$, using maximum filtration 1 and two subintervals, is also easily computed as the vector $\vec{v}^{S} (B') = \langle v^S_1, v^S_2 \rangle ^T$ where $$ v^S_1 = \frac{1}{ 2\pi} \left[ \exp\left(- \frac{1}{16} - \frac{\epsilon^2}{4} \right) + \exp\left(- \frac{549}{400}\right) \right]$$ $$v^S_2 = \frac{1}{ 2\pi} \left[ \exp\left(- \frac{5}{16} + \frac{\epsilon}{2} - \frac{\epsilon^2}{4} \right) + \exp\left(- \frac{41}{400}\right) \right]$$ \bigskip Thus, we obtain $$ \vec{v}^S(B) - \vec{v}^S(B') = \begin{bmatrix} 0\\ \frac{1}{2\pi} \left[ \exp\left(- \frac{1}{16} - \frac{\epsilon^2}{4} \right) -\exp\left(- \frac{5}{16} + \frac{\epsilon}{2} - \frac{\epsilon^2}{4} \right)\right] \end{bmatrix}$$ Note that for all $0 < \epsilon$, the absolute value of the first entry in the vector above is less than or equal to that of the second entry in the vector. Thus we obtain $$ || \vec{v} - \vec{v} \, ' ||_{\infty} = \frac{1}{2\pi} \left[ \exp\left(- \frac{1}{16} - \frac{\epsilon^2}{4} \right) -\exp\left(- \frac{5}{16} + \frac{\epsilon}{2} - \frac{\epsilon^2}{4} \right)\right]$$ \begin{figure}[hbt!] \centering \includegraphics[width=0.6\textwidth]{stable_betti_example.png} \caption[Stable Interconnectivity Vector Example]{The plot of the ratio of the $L_{\infty}$-norm of the change in the stable Betti sequence to the 1-Wasserstein distance between persistence diagrams $B$ and $B'$.}\label{fig:stableexample} \end{figure} Recall, in order to satisfy Theorem \ref{thm:stability} we need \begin{align*} ||\vec{v}^S(B) - \vec{v}^S(B')||_{\infty} &\leq C \cdot W_1(B, B') \\ &= C ||\left(0.25, 0.5 - \frac{\epsilon}{2}\right) - \left(0.25, 0.5 +\frac{\epsilon}{2}\right)||_{\infty}\\ &= C \epsilon \end{align*} This means that we need to find a constant $C$ such that $$ \frac{1}{\epsilon}\cdot||\vec{v}^S(B) - \vec{v}^S(B')||_{\infty} \leq C$$ Figure \ref{fig:stableexample} contains the graph of the left hand side of the inequality above versus $\epsilon$. The graph attains a maximum value of approximately $ 0.116440243790144$ as $\epsilon$ goes to 0. Thus there exists $C$, say, $C = 0.2$, so that $$||\vec{v}^S(B) - \vec{v}^S(B')||_{\infty} \leq C \epsilon$$ and Theorem \ref{thm:stability} is satisfied. \end{example} \section{Numerical example} For the numerical experiments, we first consider four point clouds: a uniform lattice of points with a small uniform random coordinate perturbation of magnitude at most $1/N$ on $[0,1]^2$, a uniformly random distribution on $[0,1]^2$, points drawn from the Sierpinski triangle created by the {\it chaos game} \cite{barnsley:1988} and a uniformly random distribution with a square hole of $[0.15, 0.85]^2$ on $[0,1]^2$. A sample point cloud for each type is shown in Figure \ref{clouds}. \begin{figure}[hbt!] \centering \includegraphics[width=0.49\linewidth]{new_uniform_lattice.png} \includegraphics[width= 0.49\linewidth]{new_uniform_random.png} \includegraphics[width=0.49\linewidth]{new_sierpinski.png} \includegraphics[width=0.49\linewidth]{new_uniform_no_square.png} \caption{Top: a uniform lattice of points with a small uniform random coordinate perturbation of magnitude at most $1/N$ and a uniform random distribution on $[0,1]^2$. Bottom: points drawn from the Sierpinski triangle created by the chaos game and a uniformly random distribution with a square hole of $[0.15,0.85]^2$ removed on $[0,1]^2$.}\label{clouds} \end{figure} Figure \ref{new1} shows a sample persistence barcode and diagram for the uniform random data (left) and Sierpinski data (right) for both zero-dimensional (red) and one-dimensional homology (blue). We observe the difference in each barcode and diagram between the uniform and Sierpinski data. Here we note that the Sierpinski data is generated with the uniform random sampling within the chaos game. \begin{figure}[hbt!] \begin{center} \includegraphics[width=0.49\linewidth]{barcode_uniform.png} \includegraphics[width=0.49\linewidth]{diagram_uniform.png} \includegraphics[width=0.49\linewidth]{barcode_sierpinski.png} \includegraphics[width=0.49\linewidth]{diagram_sierpinski.png} \end{center} \caption{Persistence barcode and diagram. Top: Uniform data. Bottom: Sierpinski data. }\label{new1} \end{figure} We will show the instability of the original Betti sequence and compare the results with the stable Betti sequence. For the stable Betti sequence, in the absence of an ideal covariance matrix $\Sigma_i$ for each Gaussian $G_i$, we use the adapted Gaussian-smoothing approach as defined below: Consider the following set, $X_i$ $$ X_i = \{ x_j \vert \tau_{i} < b_j < \tau_i + \gamma \Delta \tau\ \} \cup \{ x_j \vert \tau_{i-1}-\gamma \Delta \tau < d_j < \tau_{i-1}\} $$ where $\gamma > 0$ is a positive constant. Since the instability we described above is induced near the domain boundary, we consider points outside $D_i$ but near the boundary of $D_i$. For the numerical example, we consider a sharp Gaussian such that all the points in $D_i \cup X_i$ participate in the Betti sequence. Since the instability is more sensitive to the lower indices of the Betti sequence, we choose the free parameter $\gamma$ as below (notice that if $\gamma = 0$, it reduces to the original Betti sequence) $$ \gamma = (N - i+1)/10, \quad i = 1, \cdots, N $$ Let ${\tilde D}_i$ be $X_i \cup D_i$ and $|{\tilde D}_i|$ be the cardinality of ${\tilde D}_i$. Then define a new stable Betti sequence $v^{new}(B)$ as $$ {\vec v}^{new}(B) = ( |{\tilde D}_1|, |{\tilde D}_2|, \cdots, |{\tilde D}_N|)^T $$ ${\vec v}^{new}(B)$ is the original Betti sequence with each domain extended by $\gamma \Delta \tau$, which can also be viewed as the Betti sequence Gaussian-smoothed with a sharp truncation near the domain boundary. Further, we define the cumulative Betti sequence, $ {\vec v}^{cum}(B)$ of $ {\vec v}(B)$ recursively as \begin{eqnarray} &&{\vec v}^{cum}_1(B) = {\vec v}_1(B) \nonumber \\ &&{\vec v}^{cum}_i(B) = {\vec v}_i(B) + {\vec v}^{cum}_{i-1}(B), \quad i \ge 2 \nonumber \end{eqnarray} Then the normalized cumulative vector $ {\hat v}^{cum}(B)$ is defined as $$ {\hat v}^{cum}(B) = \frac{ {\vec v}^{cum}(B) }{ || {\vec v}^{cum}(B) ||_\infty} $$ We first show the instability of the Betti sequence. Consider the interval, $(x,y) \in \Omega = [0, L_x] \times [0, L_y] := [0, 1+ \epsilon] \times [0,1+ \epsilon]$, where $\epsilon \ll 1$. We consider a uniform lattice of points with the total number of bins for the Betti sequence, $N = 20$, and the total number of data points, $225$. We rescale the lattice by mapping $\Omega$ to $\Omega \times 14/N$ while keeping the filtration interval $\Delta \tau = 1/N$. For this case, the shortest lattice interval becomes the same as the filtration interval $\Delta \tau = 1/N = 1/20$ when $\epsilon = 0$ and the corresponding normalized cumulative Betti sequence becomes $$ {\hat v}^{cum}(B) = <0, 1, 1, \cdots, 1> $$ because the shortest lattice interval coincides with the domain interval, $\Delta \tau$, in the persistent diagram. However, if $\epsilon < 0$, the shortest interval becomes less than $\Delta \tau$ and so the corresponding Betti sequence is $$ {\hat v}^{cum}(B) = <0.5, 1, 1, \cdots, 1> $$ Here note that if $\epsilon >0$ the birth of all the bars in the barcode remain in the second domain and the death of all the bars still remain in the second domain because the perturbation $\epsilon$ is chosen small enough. Thus if the perturbation $\epsilon$ is small enough, the first element of the Betti sequence has the value of $0$ or $0.5$ while the same element in the stable Betti sequence remains almost same under the small perturbation $\epsilon$. The left figure in Figure \ref{new4} shows the first element of the Betti sequence versus $\epsilon$, blue for the Betti sequence and red for the stable Betti sequence with the perturbation $ \epsilon \in (-10^{-8}, 10^{8})$ -- $100$ values of $\epsilon$ were chosen uniformly. The right figure shows the same plot for the uniform random data whose domain is also $[0, 1+\epsilon]\times[0, 1+\epsilon]$. As shown in the figure, the original Betti sequence fluctuated between $0$ and $0.5$ as expected in the left figure and it also fluctuates more than the stable Betti sequence in the right figure. \begin{figure}[hbt!] \begin{center} \includegraphics[width=0.4\linewidth]{Q1.png} \includegraphics[width=0.4\linewidth]{Q2.png} \end{center} \caption{$v_1$, the first element in the sequence, versus $\epsilon$. Blue: Betti sequence. Red: Stable Betti sequence. Left: Perturbed lattice with $\epsilon$. Right: Uniform random data.}\label{new4} \end{figure} Now in Figure \ref{new5} we show both original Betti sequence (blue) and stable Betti sequence (red) for the four cases shown in Figure \ref{clouds} with the fixed domain size $[0, 1]\times[0,1]$ and $N = 20$. We use $100$ samples for each case and plot all the Betti sequences. The figure shows that the stable Betti sequences yield more sharp patterns while maintaining similar vector structure overall. In addition, in each data set the stable Betti sequences are more homogeneous than the Betti sequences which is promising with regards to possible machine learning applications. \begin{figure}[hbt!] \begin{center} \includegraphics[width=0.49\linewidth]{Q4.png} \includegraphics[width=0.49\linewidth]{Q3.png} \includegraphics[width=0.49\linewidth]{Q5.png} \includegraphics[width=0.49\linewidth]{Q6.png} \end{center} \vskip -.2in \caption{The Betti sequence (blue) and stable Betti sequence (red) with fixed domain size, $[0,1]\times[0,1]$. Top: a lattice with a small perturbation and a uniform random data. Bottom: a Sierpinski data and a uniform random with a square hole. Each point sequence was computed with $N = 20$ and there were $225$ points in each data set.}\label{new5} \end{figure} \section{Concluding Remarks} Topological data analysis and its main tool, persistent homology, has recently gained attention in the scientific community and has proven to be highly useful in various applications. Recently, sizable research has been conducted to combine topological data analysis and machine learning. However, the representations of persistent homology, the persistence diagram and barcode, in their raw forms are not suitable to incorporate into a machine learning workflow and proper feature maps are necessary including vectorization methods. In this paper, we considered the Betti sequence, as a vectorization and showed by example its instability with respect to the 1-Wasserstein distance. In addition, we proposed a stable Betti sequence and proved its stability. With numerical examples, we devised a cumulative stable Betti sequence and showed that the stable Betti sequence was able to achieve a faithful representation of the Betti sequence in that it performs better with the smaller number of the filtration intervals at distinguishing data sets. Our future research will incorporate the proposed stable Betti sequence into machine learning algorithms to study its effectiveness in various applications. \section*{Acknowledgments} MJ was funded, in part, by the Doctoral Dissertation Fellowship of the Department of Mathematics at the University at Buffalo. JHJ has been supported by Samsung Science \& Technology Foundation under grant number SSTF-BA1802-02.
\section{Introduction} This paper is concerned with the numerical study of the integrable Davey-Stewartson (DS) I system written in the form \begin{equation} \label{DSIsys} \begin{array}{ccc} i \Psi_{t}+ \Psi_{xx}+\Psi_{yy}+2\left(\Phi+\left| \Psi \right|^{2}\right)\Psi & = & 0, \\ \Phi_{xx}-\Phi_{yy}+2\left| \Psi \right|_{xx}^{2} & = & 0, \end{array} \end{equation} where indices denote partial derivatives, and where $\Phi$ denotes a mean field. In the classification of Ghidaglia and Saut \cite{GS}, this is an elliptic-hyperbolic equation since the second order operator acting on $\Psi$ in the first equation of (\ref{DSIsys}) is elliptic whereas the one acting on $\Phi$ in the second equation of (\ref{DSIsys}) is hyperbolic. Davey-Stewartson systems are of importance in applications since they can be seen as simplifications of the Benney-Roskes \cite{BR} and Zakharov-Rubenchik \cite{ZR} systems, `universal' models for the description of the interaction of short and long waves. These equations have first appeared in the context of water waves \cite{DS,DR,AS,Lan} in particular in the study of the modulation of plane waves. DS systems also appear in ferromagnetism \cite{Leb}, plasma physics \cite{MRZ}, and nonlinear optics \cite{NM}. For more details on DS and its applications the reader is referred to \cite{KSDS,KSint} where a comprehensive list of references is given. Note that DS I is also interesting from a purely mathematical point of view, since it is a nonlinear dispersive partial differential equation, and since it is one of the few completely integrable equations in two spatial dimensions, see \cite{Fokas,FA}. Local existence results for Cauchy problems with small initial data were proven in \cite{HS,Chi,HH}, and without a smallness assumption in \cite{Hay}. The hyperbolic form of the second equation in (\ref{DSIsys}) makes it convenient to introduce characteristic coordinates \begin{equation} \xi=x-y,\quad \eta=x+y. \label{char} \end{equation} In these coordinates DS I (\ref{DSIsys}) takes the form of a non-local nonlinear Schr\"odinger (NLS) equation, \begin{equation} i\Psi_{t}+2(\partial_{\xi}^{2}+\partial_{\eta}^{2})\Psi+ [(\partial_{\xi}^{-1}\partial_{\eta}+\partial_{\eta}^{-1}\partial_{\xi}) |\Psi|^{2}]\Psi=0 \label{DSIchar}, \end{equation} where we have formally inverted the d'Alembert operator in the second equation of (\ref{DSIsys}). In order to do so, one has to specify boundary conditions at infinity, a problem analytically discussed in \cite{AMS} for the multiscales approach to the Kadomtsev-Petviasvili (KP) equation (for a numerical implementation see \cite{KSM}). In \cite{FS} it was shown that \emph{radiating boundary conditions} allow for stable localised traveling waves called \emph{dromions} which appear in the long-time behavior of the solutions to certain initial value problems for DS I. Another possibility applied in this context are vanishing boundary conditions for $\Phi$ in (\ref{DSIsys}) for $\xi,\eta\to-\infty$ (or $\xi,\eta\to\infty$). We define the operator $\partial_{\xi}^{-1}$ (as is standard for the KP equation) via its Fourier symbol, \begin{equation} \partial_{\xi}^{-1}=\mathcal{F}^{-1}_{\xi}\frac{1}{ik_{\xi}}=\frac{1}{2}\mathcal{P} \left(\int_{-\infty}^{\xi}-\int_{\xi}^{\infty}\right) \label{symbol}, \end{equation} where $\mathcal{P}$ denotes the principal value and $\mathcal{F_{\xi}}$ the Fourier transform in $\xi$ with $k_{\xi}$ being the dual Fourier variable, and likewise for $\partial_{\eta}^{-1}$. Note that a consequence of this definition is that for $f\in L^{1}(\mathbb{R})$, one has \begin{equation} (\partial_{\xi}^{-1} f(\xi))(+\infty) = -(\partial_{\xi}^{-1} f(\xi))(-\infty)=\frac{1}{2}\int_{-\infty}^{\infty}f(\xi)d\xi \label{vanish}. \end{equation} These \emph{trivial boundary conditions} will be the only ones studied in this paper. Numerical studies of DS I solutions have been mainly performed for radiating boundary conditions, see \cite{WW,NY1,NY2,BB,MFP}. In this paper we will perform a similar study, but for the trivial boundary conditions (\ref{symbol}). Since no explicit solitons are known for this case, we first construct localized stationary solutions numerically and show that they are also exponentially localized. We study the stability of these solutions, which we will also call dromions for simplicity. In \cite{KM,KMS} we have shown how to regularize terms of the type (\ref{symbol}) arising in the context of D-bar equations with a hybrid approach: we subtract a singular term for which the Fourier transform can be analytically found. The term is chosen in a way that what is left is smooth \emph{within finite numerical precision}, and that its Fourier transform can be numerically computed (we work here with \emph{double precision} which is roughly of the order of $10^{-16}$). Note that the terms treated in this way in \cite{KM,KMS} are less singular (they lead to cusps in the Fourier domain, but are bounded) than the simple poles considered here. Therefore, the regularization approach for DS I is more important than for DS II if high accuracy is to be achieved. We show that we can reach machine precision in the studied examples. Since we want to numerically study blow-up scenarios, an approach of high accuracy as presented here is crucial in order to obtain reliable results. With this approach, we first construct numerically localized stationary solutions to DS I and propose\\ \textbf{Main conjecture} (Part I):\\ \emph{The DS I equation has stationary solutions $\Psi(\xi,\eta,t)= Q_{\omega}(\xi,\eta)e^{i\omega t}$ for $\omega>0$, where $Q_{\omega}$ can be chosen to have values in $\mathbb{R}^{+}$. The solutions are exponentially localised.}\\ It is unknown whether these solutions are ground states for the energy (\ref{energyb}). Then we study the time evolution of localised perturbations of these stationary solutions and initial data from the Schwartz class $\mathcal{S}(\mathbb{R}^{2})$ of rapidly decreasing smooth functions with a single hump. We find\\ \textbf{Main conjecture} (Part II):\\ \emph{Initial data $\Psi(\xi,\eta,0)\in \mathcal{S}(\mathbb{R}^{2})$ with a single hump lead to one of the following 3 cases:\\ - if $\Psi(\xi,\eta,0)=Q_{\omega}(\xi,\eta)$, the DS I solution is stationary;\\ - if the mass $||\Psi(\xi,\eta,0)||_{2}^{2}<m_{Q} :=||Q||^{2}_{2}$ ($Q:=Q_{1}$), the solution is simply dispersed to infinity;\\ - if the mass $||\Psi(\xi,\eta,0)||_{2}^{2}>m_{Q}$, there is a blow-up of the $L^{\infty}$ norm of $\Psi$ at a finite time $t^{*}$ such that \begin{equation} \Psi(\xi,\eta,t) = \frac{Q(X,Y)}{L(t)}+\tilde{\Psi}(\xi,\eta,t) \label{conj}, \end{equation} where $X$, $Y$ are defined in (\ref{dyn}), where $||\tilde{\psi}||_{2}<\infty$ for all times, and where \begin{equation} L(t)\propto t^{*}-t. \label{L} \end{equation}} This means that as in the DS II case conjectured in \cite{KS}, the blow-up is of the type being unstable for standard NLS equations. The paper is organized as follows: in section 2 we give a brief overview on DS I equations. In section 3 we introduce the hybrid approach to compute the anti-derivatives in $\xi$ and $\eta$. Localized stationary solutions to DS I are numerically constructed in section 4. In section 5, we present the time evolution approach and test it at the example of the stationary solution. In section 6, we study the time evolution of these stationary solutions. General localized initial data are studied in section 7. Some concluding remarks are added in section 8. \section{Basic Facts} In this section we collect some basic facts on the DS I equation. We will always study the DS I equation in characteristic coordinates, i.e., in the form (\ref{DSIchar}) of a non-local NLS equation. Note that the sign of the nonlinearity is not important as in the case of the DS II equations, where it distinguishes a focusing and defocusing variant of the equation, see e.g., \cite{KSint}. For DS I, a change of sign of the nonlinearity can be compensated by a change of sign of either $\xi$ or $\eta$ and does not affect the behavior of the solutions otherwise. The DS I equation is completely integrable and thus has an infinite number of formally conserved quantities. In this paper, we will consider the $L^{2}$ norm and the \emph{energy} \begin{equation} E=\int_{\mathbb{R}^{2}}^{}d\xi d\eta\left\{|\Psi_{\xi}|^{2}+|\Psi_{\eta}|^{2} +\frac{1}{4}\left(\partial_{\eta}^{-1}|\Psi|^{2}\partial_{\xi}|\Psi|^{2}+ \partial_{\xi}^{-1}|\Psi|^{2}\partial_{\eta}|\Psi|^{2}\right)\right\} \label{energyb}. \end{equation} This form of the energy has been chosen in accordance to the definition of the anti-derivatives (\ref{symbol}). It can be shown by direct computation that the energy is conserved in this case. The DS I equation is expected to have stationary solutions of the form $\Psi(\xi,\eta,t)=Q_{\omega}(\xi,\eta)e^{i\omega t}$, where $\omega\in\mathbb{R}^{+}$, and where we get with (\ref{DSIchar}) the following equation for $Q$, \begin{equation} -\omega Q+2(\partial_{\xi}^{2}+\partial_{\eta}^{2})Q+ [(\partial_{\xi}^{-1}\partial_{\eta}+\partial_{\eta}^{-1}\partial_{\xi}) |Q|^{2}]Q=0 \label{Q}. \end{equation} We are interested in localized solutions to this equation. Note that if the solution $Q:=Q_{1}$ of (\ref{Q}) is known for $\omega=1$, the solution for arbitrary $\omega>0$ follows from $Q_{\omega}=\sqrt{\omega}Q(\sqrt{\omega}\xi,\sqrt{\omega}\eta)$. For the same reasons as for the standard NLS equation, $Q$ can be chosen to be real for localized solutions of this equation. Note that there is an explicit solution to (\ref{Q}) called dromion \cite{Kono}, which reads for $\omega=1$ \begin{equation} \tilde{Q} = \frac{1}{4\cosh \xi/2 \cosh\eta/2+e^{(\xi+\eta)/2}} \label{Qdrom}, \end{equation} if radiating boundary conditions at infinity are used, i.e., if $$\partial_{\xi}^{-1}\mapsto \widetilde{\partial}_{\xi}^{-1}+f(\eta),\quad \partial_{\eta}^{-1}\mapsto \widetilde{\partial}_{\eta}^{-1}+f(\xi),$$ where \begin{equation} f(\xi) = \frac{4}{4(1+e^{\xi})}+\frac{1}{4(1+2e^{\xi})} \label{f2}. \end{equation} It is remarkable that the dromions are exponentially decaying towards infinity in all directions in contrast to the lump solution, the localized stationary solution to DS II which has an algebraic decrease towards infinity. Furthermore, again in contrast to the lump, the dromion is not radially symmetric. Note that it is unknown whether there is an exponentially localised solution to (\ref{Q}) for trivial boundary conditions at infinity. Below we present some properties of DS I solutions: \begin{itemize} \item Translation invariance: with $\Psi(t,\xi,\eta)$ a solution to equation (\ref{DSIchar}), also $\Psi(t+t_{0},\xi+\xi_{0},\eta+\eta_{0})$ is a solution, where $t_{0}$, $\xi_{0}$, and $\eta_{0}$ are real constants. \item Galilei invariance: with $\Psi(t,\xi,\eta)$ a solution to equation (\ref{DSIchar}), $\Psi(t,\xi-v_{\xi}t,\eta-v_{\eta}t)\exp(\frac{i}{2}(v_{\xi}(\xi-tv_{\xi}/2)+v_{\eta}(\eta-tv_{\eta}/2)))$ with $v_{\xi}$, $v_{\eta}$ real constants is also a solution. Thus a stationary localized solution can be seen as a soliton to the equation after a Galilei transformation. \item Scaling invariance: with $\Psi(t,\xi,\eta)$ a solution to equation (\ref{DSIchar}), $\lambda \Psi(\lambda^{2}t,\lambda \xi,\lambda \eta)$ with $\lambda\in \mathbb{R}/\{0\}$ is also a solution. Note that the $L^{2}$ norm of $\Psi$ is invariant under these rescalings. Therefore NLS equations in 2D with a cubic nonlinearity are called $L^{2}$ critical. It is known that there can be a blow-up in finite time of the $L^{\infty}$ norm of the solution for smooth initial data with sufficiently large $L^{2}$ norm, see \cite{MR04,SS99}. There does not appear to be a theorem on whether DS I or DS II solutions can blow up for generic initial data of sufficient mass. \item Pseudo-conformal invariance: with $\Psi(t,\xi,\eta)$ a solution to (\ref{DSIchar}), also \[ \frac{1}{t}\Psi(1/t,\xi/t,\eta/t)\exp\left(i\frac{\xi^{2}+\eta^{2}}{t}\right) \] is a solution. This implies together with the translation invariance of DS I that a stationary localized DS I solution under a pseudo-conformal transformation becomes a solution with a blow-up in finite time. This has been used in the context of DS II by Ozawa \cite{ozawa} to construct an explicit blow-up solution. Note that due to the oscillatory terms, the solution will not be in $H^{1}$ after a pseudo-conformal transformation even if the original solution is in $L^{2}$ for all $t$. For standard $L^{2}$ critical NLS equations, this blow-up mechanism is unstable, see \cite{SS99} for references. \end{itemize} The generic blow-up mechanism for NLS solutions is self-similar, which means one uses the above scaling invariance in $\lambda$ with a time dependent factor $L(t)$ in a \emph{dynamic rescaling}, \begin{equation} X = \frac{\xi}{L(t)},\quad Y = \frac{\eta}{L(t)},\quad \tau = \int_{0}^{t}\frac{dt'}{L^{2}(t')}, \quad \psi(X,Y,\tau) = L(t)\Psi(\xi,\eta,t) \label{dyn}. \end{equation} The dynamically rescaled DS I equation (\ref{DSIchar}) then reads \begin{equation} i\psi_{\tau}+i\epsilon a(X \partial_{X}\psi+Y\partial_{Y}\psi+\psi)+2(\partial_{X}^{2}+\partial_{Y}^{2})\psi+ [(\partial_{X}^{-1}\partial_{Y}+\partial_{Y}^{-1}\partial_{X}) |\psi|^{2}]\psi=0 \label{DSIresc}, \end{equation} where $a = \partial_{\tau}\ln L$. In the case of a blow-up, the scaling factor $L(t)$ is chosen in a way to keep certain norms constant during the time-evolution, for instance the $L^{\infty}$ norm of $\psi$. If the blow-up is reached for a finite time $t^{*}$, then $\lim_{t\to t^{*}}L(t)=0$ and $\lim_{t\to t^{*}}\tau = \infty$. For $L^{2}$ critical NLS equations, it is expected that $\lim_{t\to t^{*}}a(t) = 0$. In this case, equation (\ref{DSIresc}) reduces to the equation for the stationary solution (\ref{Q}) in the limit which would indicate that the blow-up is self-similar with $Q$ giving the blow-up profile. Note, that the generic blow-up rate for $L^{2}$ critical NLS is given by (see \cite{MR04}) \begin{equation} L(t) \propto \sqrt{\frac{t^{*}-t}{\ln|\ln(t^{*}-t)|}}. \label{loglog} \end{equation} One of the questions to be addressed in this paper numerically is whether there is blow-up in DS I solutions, and whether it follows the behavior (\ref{loglog}) or the pseudoconformal rate as in DS II, see the conjecture in \cite{KS}. To this end we will trace the $L^{\infty}$ norm of $\Psi$ and the $L^{2}$ norm of $\Psi_{\xi}$. Both are proportional to $1/L(t)$ and can thus be used to identify the scaling factor $L(t)$. \section{Numerical approach for DS I} \label{Sec:HybNum} In this section we briefly describe the numerical approach for the DS I equation, in particular how the antiderivatives in (\ref{DSIchar}) are computed. We will concentrate here on functions in the Schwartz class $\mathcal{S}$ of smooth, rapidly decreasing functions. The Fourier transform of a 1D function $f(\xi)$ and its inverse are defined via \begin{align} \hat{f}(k_{\xi}) & = \mathcal{F}_{\xi}f:=\int_{\mathbb{R}}^{} e^{-i\xi k_{\xi}}f(\xi)d\xi, \label{Fx} \\ f(\xi) & =\mathcal{F}_{\xi}^{-1}f=\frac{1}{2\pi}\int_{\mathbb{R}}^{} e^{i\xi k_{\xi}}\hat{f}(k_{\xi}) dk_{\xi}. \nonumber \end{align} The 2D Fourier transform of a function $\Phi(\xi,\eta)$ is defined as \begin{align} \hat{\Phi}(k_{\xi},k_{\eta}) & = \mathcal{F}_{\xi\eta}\Phi:=\int_{\mathbb{R}^{2}}^{}\Phi(\xi,\eta) e^{-i(\xi k_{\xi}+\eta k_{\eta})} d\xi d\eta, \label{F} \\ \Phi(\xi,\eta) & =\mathcal{F}^{-1}_{\xi\eta}\Phi= \frac{1}{(2\pi)^{2}}\int_{\mathbb{R}^{2}}^{} e^{i(\xi k_{\xi}+\eta k_{\eta})}\hat{\Phi}(k_{\xi},k_{\eta}) dk_{\xi}dk_{\eta}. \nonumber \end{align} The basic idea of the Fourier spectral method, which we are going to apply here, is to express every function in terms of a Fourier series and approximate the latter via a truncated Fourier series. This is equivalent to approximating the Fourier transform (\ref{Fx}) via a \emph{discrete Fourier transform} which can be efficiently computed via a \emph{fast Fourier transform} (FFT). It is well known that the Fourier coefficients of an analytic periodic function decrease exponentially, and thus the numerical error due to the truncation of the series will also decrease exponentially, see for instance the discussion in \cite{trefethen}. Thus Fourier spectral methods show exponential convergence for analytic functions, sometimes called \emph{spectral convergence}. Here we only consider functions in the Schwartz class which can be efficiently treated as smooth periodic functions on sufficiently large tori within the chosen finite numerical precision (the function and all relevant derivatives have to vanish at the domain boundaries to the chosen numerical precision, here $10^{-16}$). Derivatives of a function $f(\xi)\in \mathcal{S}(\mathbb{R})$, i.e., $$f'(\xi)= \mathcal{F}_{\xi}^{-1}(ik_{\xi}\hat{f}(k_{\xi})),$$ can then be approximated as mentioned above by approximating the standard Fourier transform via a discrete Fourier transform. However, for the antiderivative $$\partial_{\xi}^{-1}f(\xi)= \mathcal{F}_{\xi}^{-1}\left(\frac{1}{ik_{\xi}}\hat{f}(k_{\xi})\right),$$ the singular Fourier symbol will not lead to an exponentially decreasing numerical error if the Fourier transform is approximated via an FFT. Thus we use a hybrid approach, a combination of numerical and analytical techniques, similar to the approach in \cite{KMS2} for the DS II equation. Concretely we write \begin{equation} \mathcal{F}_{\xi}^{-1}\left(\frac{1}{ik_{\xi}}\hat{f}(k_{\xi})\right) =\mathcal{F}_{\xi}^{-1}\left(\frac{\hat{f}(k_{\xi})-\hat{f}(0)\exp(-k_{\xi}^{2}/4)}{ik_{\xi}}\right) + \hat{f}(0)\frac{1}{2}\mbox{erf}(\xi), \label{dinv} \end{equation} where the \emph{error function} $\mbox{erf}(x)$ is defined as \begin{equation} \mbox{erf}(x)=\frac{2}{\sqrt{\pi}}\int_{0}^{x}\exp(-y^{2})dy \label{erf}. \end{equation} The error function can be computed to machine precision with the techniques of \cite{KShilbert} since the integral is essentially a Hilbert transform in Fourier space. But for simplicity we use the Matlab implementation of the error function here. The first term on the right hand side of (\ref{dinv}) is a smooth function if the limit \begin{equation} \lim_{k_{\xi}\to0}\frac{\hat{f}(k_{\xi})-\hat{f}(0)\exp(-k_{\xi}^{2})}{ik_{\xi}} = \hat{f}'(0) \label{limit} \end{equation} is taken into account via de l'Hospital's rule. Since $\hat{f}'(0)=\int_{\mathbb{T}}^{}i\xi f(\xi)d\xi$, this term can be computed again with Fourier techniques (just the sum of $\xi f(\xi)$ sampled on the collocation points). In this way the first term on the right hand side of (\ref{dinv}) is in the Schwartz class if $f(\xi)$ is. Thus it can be efficiently computed with Fourier techniques on a large enough torus. Note that a Gaussian was introduced in (\ref{dinv}) in order to have an integrand in the Schwartz class to ensure the rapid convergence of the numerical approach. Thus the first term in (\ref{dinv}) is computed to machine precision with Fourier techniques whereas the second is obtained with a Matlab algorithm with the same precision. We illustrate the efficiency of the algorithm for some examples: for a Gaussian $f(\xi) = \exp(-(\xi+1)^{2})$ we work with $N=2^{9}$ Fourier modes on the interval $10[-\pi,\pi]$. In this case the Fourier coefficients decrease to machine precision. Note that we have considered a shifted Gaussian here in order to have a non-vanishing derivative at the origin in (\ref{limit}). The difference between the error function (times the factor $\sqrt{\pi}/2$) is of the order of $10^{-16}$. If we consider with the same numerical parameters $f(\xi)=\sinh(\xi+1)/\cosh(\xi+1)^2$, the Fourier coefficients decrease to the order of $10^{-14}$, and the difference to the exact antiderivative $-\mbox{sech}(\xi+1)$ is of the same order. In the context of DS I, we are obviously mainly interested in the accurate numerical computation of the action of the operator $\partial_{\xi}^{-1}\partial_{\eta}+\partial_{\eta}^{-1}\partial_{\xi}$ on some function in $\mathcal{S}(\mathbb{R}^{2})$. To this end we simply apply the above approach in both dimensions. As an example we consider the dromion solution $\tilde{Q}_{2}$ for $\omega=2$ in the case of radiating boundary conditions, \begin{equation} |\tilde{Q}_{2}|^{2}=\frac{4}{(4\cosh(\xi)\cosh(\eta)+\exp(\xi+\eta))^{2}} \label{dromion2}. \end{equation} The action of the operator $\partial_{\xi}^{-1}\partial_{\eta}+\partial_{\eta}^{-1}\partial_{\xi}$ on the dromion can be obviously computed explicity. We work with $N_{\xi}=N_{\eta}=2^{9}$ Fourier modes in $\xi$ and $\eta$ respectively $\partial_{\xi}^{-1}\partial_{\eta}+\partial_{\eta}^{-1}\partial_{\xi}$ on $10[-\pi,\pi]\times 10[-\pi,\pi]$. The Fourier coeffcients of the function (\ref{dromion2}) can be seen on the left of Fig.~\ref{dromiontest}. They decrease to machine precision. The difference (denoted by err) between the numerically computed action of the operator $\partial_{\xi}^{-1}\partial_{\eta}+\partial_{\eta}^{-1}\partial_{\xi}$ on (\ref{dromion2}) and the exact expression can be seen on the right of the same figure. It is as expected of the same order ($10^{-15}$) as the highest Fourier coefficients. \begin{figure}[!htb] \includegraphics[width=0.49\hsize]{dromionfourier-eps-converted-to.pdf} \includegraphics[width=0.49\hsize]{dromiondiff-eps-converted-to.pdf} \caption{The Fourier coefficients of the function (\ref{dromion2}) on the left, and the difference of the numerically computed action of the operator $\partial_{\xi}^{-1}\partial_{\eta}+\partial_{\eta}^{-1}\partial_{\xi}$ on (\ref{dromion2}) and the exact expression on the right. } \label{dromiontest} \end{figure} \section{Localized stationary DS I solutions} In this section we numerically construct stationary localized solutions to DS I. This is done with the Fourier discretisation introduced in the previous section for equation (\ref{Q}) with $\omega=1$. The resulting algebraic equation is then iteratively solved with a Newton-Krylov method. The task is to find a localized solution to (\ref{Q}) where we restrict ourselves to $\omega=1$ without loss of generality. In Fourier space, equation (\ref{Q}) reads \begin{equation} (1 +2k_{\xi}^{2}+2k_{\eta}^{2})\hat{Q}= \mathcal{F}_{\xi\eta}\left([(\partial_{\xi}^{-1}\partial_{\eta}+\partial_{\eta}^{-1}\partial_{\xi}) |Q|^{2}]Q\right) \label{Qfourier}. \end{equation} As in the previous section, the Fourier transform is approximated via a discrete Fourier transform. This implies that (\ref{Qfourier}) leads to an $N_{\xi}N_{\eta}$ dimensional nonlinear equation system of the form $F(\{\hat{Q}\})=0$ for $\hat{Q}$ (in an abuse of notation, we denote the discrete Fourier transform as the standard Fourier transform). This system is solved iteratively with a Newton method, \begin{equation} \hat{Q}^{(n+1)} = \hat{Q}^{(n)} -\mbox{Jac}(F)^{-1}|_{\hat{Q}^{(n)}}F(\hat{Q}^{(n+1)}) \label{newton}. \end{equation} The action of the Jacobian on $F$ is computed with the Krylov subspace method GMRES \cite{gmres}. Note that the Jacobian has a finite dimensional kernel because of the translation invariance of the DS I equation. But the iteration converges nonetheless, just the maximum of the resulting solution $Q$ will in general not be at the origin. In the plots below we have shifted the maximum back to the origin. We use $N_{\xi}=N_{\eta}=2^{10}$ Fourier modes for $(\xi,\eta)\in 20[-\pi,\pi]\times 20[-\pi,\pi]$ and $Q^{(0)} = 6/(4\cosh(\xi/2)\cosh(\eta/2)+\exp((\xi+\eta)/2)) $ as the initial iterate, i.e., 6 times the dromion (\ref{Qdrom}) for radiating boundary conditions. The iteration is stopped once $||F||_{\infty}<10^{-10}$. The resulting solution can be seen in Fig.~\ref{dromionn}. \begin{figure}[!htb] \includegraphics[width=0.7\hsize]{dromion-eps-converted-to.pdf} \caption{Localized stationary solution to DS I (\ref{Q}) for $\omega=1$. } \label{dromionn} \end{figure} The solution is again not radially symmetric, but has a symmetry with respect to an exchange of $\xi$ and $\eta$ as can be clearly seen from the contour plot on the left of Fig.~\ref{dromioncontour}. The Fourier coefficents of the solution on the right of the same figure decrease to machine precision and thus indicate that the solutions is numerically well resolved. In fact the numerical parameters have been chosen in a way to ensure this. \begin{figure}[!htb] \includegraphics[width=0.49\hsize]{dromioncontour-eps-converted-to.pdf} \includegraphics[width=0.49\hsize]{dromionnfourier-eps-converted-to.pdf} \caption{Contour plot of the solution in Fig.~\ref{dromionn} on the left, and its Fourier coefficients on the right. } \label{dromioncontour} \end{figure} Note that the solution is much more peaked than the corresponding one (\ref{Qdrom}) for radiating boundary conditions which can be seen on the left of Fig.~\ref{dromion3}. In the middle of the same figure, we show the solution of Fig.~\ref{dromionn} and (\ref{Qdrom}) on the $\xi$-axis in one figure. Obviously the solution constructed in this section has a considerably larger maximum (which is why the initial iterate had to be chosen with a factor of 6). It is also more slowly decaying. However, it is also exponentially decaying as can be seen from the logarithmic plot on the right of Fig.~\ref{dromion3} on the $\xi$-axis. We only show the plot on the $\xi$-axis here, but the same behavior is observed for all values of $\eta$, and for the $\eta$-dependence for all values of $\xi$. Thus the stationary solutions to DS I are exponentially localized in contrast to the lumps of DS II which are algebraically decaying, and this not only for radiating boundary conditions. Therefore we will call this solution also dromion in the following even though it is not identical to classical one in (\ref{Qdrom}). Note that the numerical parameters in this section have been chosen in a way that both the solution and its Fourier coefficients decrease to machine precision. \begin{figure}[!htb] \includegraphics[width=0.32\hsize]{dromiontilde-eps-converted-to.pdf} \includegraphics[width=0.32\hsize]{dromion2Q-eps-converted-to.pdf} \includegraphics[width=0.32\hsize]{dromionx-eps-converted-to.pdf} \caption{Dromion solution (\ref{Qdrom}) for radiating boundary conditions on the left, the same solution on the $\xi$-axis (red) together with the stationary solution of Fig.~\ref{dromionn} (blue) in the middle, and a logarithmic plot of the solution of Fig.~\ref{dromionn} on the $\xi$-axis on the right. } \label{dromion3} \end{figure} \section{Time evolution} In this section we outline how the time integration of DS I is handled for the discretisation in the spatial coordinates explained in the previous sections. We discuss how the accuracy of the time integration is controlled and test the code for the example of the stationary solution of the previous section. We work on $R\times\mathbb{T}_\xi\times\mathbb{T}_\eta$ where $\mathbb{T}_\xi = \mathbb{R}/(2\pi L_\xi\mathbb{Z})$, $\mathbb{T}_\eta = \mathbb{R}/(2\pi L_\eta\mathbb{Z})$. After the FFT discretisation in $\xi$ and $\eta$ of the previous sections, the DS I equation (\ref{DSIchar}) becomes an $N_{\xi}N_{\eta}$ dimensional system of ordinary differential equations of the form (in an abuse of notation, we denote the $N_{\xi}\times N_{\eta}$ matrix obtained for $\Psi(\xi,\eta)$ with the same symbol) \begin{equation} \hat{\Psi}_{t}=\mathcal{L} \hat{\Psi}+ \mathcal{N}(\Psi) \label{DSIdisc}, \end{equation} where \begin{equation} \mathcal{L} = -2i(k_{\xi}^{2}+k_{\eta}^{2}),\quad \mathcal{N} = i\mathcal{F}_{\xi\eta}\left([(\partial_{\xi}^{-1}\partial_{\eta}+\partial_{\eta}^{-1}\partial_{\xi}) |\Psi|^{2}]\Psi\right) \label{LN}. \end{equation} The linear part proportional to $\mathcal{L}$ is diagonal and \emph{stiff} since it is quadratic in $k_{\xi}$ and $k_{\eta}$, which means that explicit time integration schemes are not efficient. For such cases there are many efficient time integration schemes, see for instance the references in \cite{etna,KR}. Since it was found in \cite{KR} that Driscoll's composite Runge-Kutta method \cite{Dri} is very efficient for DS equations, we apply it also here. We use the relative conservation of the mass to control the accuracy in the time integration. Because of unavoidable numerical errors, the numerically computed mass will depend on time even though it is a conserved quantity. Thus $\Delta = \log_{10}|1 - m/m_0|$, where $m_0$ is the initial mass and $m$ the computed mass can be used to control the accuracy of the temporal discretisation. Generally $\Delta$ overestimates the temporal resolution by two orders of magnitude. The relative mass conservation stays well below $10^{-12}$ throughout most of the runs and sharply increases close to the time $t^{*}$ of a potential finite time blow-up. Such a jump indicates a loss of precision, and we generally discard results with a value of $\Delta$ greater than $-3$. Note that we could also use the conserved energy (\ref{energyb}) to this end, but the anti-derivatives in (\ref{energyb}) make this quantity numerically problematic if resolution in Fourier space is lost near a blow-up. The effect is worse for the energy than for the DS I solution since in the latter, the anti-derivative $\partial_{\xi}^{-1}$ is multiplied with $\partial_{\eta}$ which has a smoothing effect in the space of Fourier coefficients. Thus the energy would underestimate the accuracy near a blow-up which is why we use only mass conservation in the following, where such problems do not appear. As an example we consider the dromion constructed in the previous section as initial data for DS I. We use $N_{t}=10^{3}$ time steps for $t\leq 1$. The relative conservation of the mass is always to the order of $10^{-15}$ (the relative energy conservation is of the same order since the solution is fully resolved in Fourier space during the whole computation). Note that the solution is not static, there is a harmonic time dependence. We show the difference between the initial data times $\exp(it)$ and the numerical DS I solution in Fig.~\ref{dromionerr}, on the left the $L^{\infty}$ norm of the difference between both solutions in dependence of time, on the right the modulus of the difference for $t=1$ (the difference is always denoted with `err'). \begin{figure}[!htb] \includegraphics[width=0.49\hsize]{dromiontdiff-eps-converted-to.pdf} \includegraphics[width=0.49\hsize]{dromiont1diff-eps-converted-to.pdf} \caption{Difference of the DS I solution for the initial data $\Psi(\xi,\eta,0)=Q(\xi,\eta)$ and $Qe^{it}$, on the left the $L^{\infty}$ norm of the difference in dependence of time, on the right the difference for $t=1$. } \label{dromionerr} \end{figure} It can be seen that the difference is during the whole computation of the order of $10^{-12}$ or better which is a remarkable result since it not only shows the accuracy of the time evolution code, but also of the dromion numerically constructed in the previous section. It also shows that the dromion can be stably evolved in time although, as we will show in the following section, it is unstable against perturbations. \section{Time evolution of the dromion} In this section we study localized perturbations of the dromion, mainly of the form \begin{equation} \Psi(\xi,\eta,0) = \mu Q,\quad \mu>0 \label{initial}. \end{equation} It is shown that perturbations with a mass smaller than the mass of the dromion are just dispersed, whereas perturbations with a mass larger than the dromion will have a blow-up in finite time. We first consider the case $\mu=0.9$ in (\ref{initial}) with $N_{\xi}=N_{\eta}=2^{10}$ Fourier modes and $(\xi,\eta)\in 20[-\pi,\pi]\times 20[-\pi,\pi]$, and with $N_{t}=5000$ time steps for $t\leq 5$. In this case the initial hump simply gets dispersed, it gets wider and flatter over time. The solution for $t=5$ can be seen on the left of Fig.~\ref{dromion09}. On the right of the same figure the $L^{\infty}$ norm of the solution appears to be decreasing monotonically. Note that since we approximate a situation on $\mathbb{R}^{2}$ with a setting on $\mathbb{T}^{2}$, radiation cannot escape to infinity and thus cannot leave the computational domain. Thus the solution cannot tend to zero even for longer times. However we do not find an indication of a stable structure in DS I solutions for trivial boundary conditions, in contrast to the result in \cite{FS} for radiative boundary conditions. \begin{figure}[!htb] \includegraphics[width=0.49\hsize]{dromion09t5-eps-converted-to.pdf} \includegraphics[width=0.49\hsize]{dromion09inf-eps-converted-to.pdf} \caption{Solution to DS I for the initial data $\Psi(\xi,\eta,0)=0.9Q$, on the left for $t=5$, on the right the $L^{\infty}$ norm in dependence of time. } \label{dromion09} \end{figure} Then we use the same numerical parameters for the initial data $\Psi(\xi,\eta,0) = Q- 0.1\exp(-\xi^{2}-\eta^{2})$. Note that the mass of these data is roughly $0.96 M_{Q}$ where $M_{Q}$ is the mass of the dromion and thus larger than the mass in Fig.~\ref{dromion09}. We show the solution for $t=5$ on the left of Fig.~\ref{dromionmgauss}. Again the initial hump gets just dispersed. This is also confirmed by the $L^{\infty}$ norm of the solution on the right of the same figure which after some initial oscillation appears to be monotonically decreasing. \begin{figure}[!htb] \includegraphics[width=0.49\hsize]{dromionmgausst5-eps-converted-to.pdf} \includegraphics[width=0.49\hsize]{dromionmgaussinf-eps-converted-to.pdf} \caption{Solution to DS I for the initial data $\Psi(\xi,\eta,0)=Q-0.1\exp(-\xi^{2}-\eta^{2})$, on the left for $t=5$, on the right the $L^{\infty}$ norm in dependence of time. } \label{dromionmgauss} \end{figure} The situation changes considerably if we consider perturbations of the dromion with larger mass. Here the $L^{\infty}$ norm appears to diverge in finite time which obviously cannot be captured numerically. However we will trace certain norms in this case and fit the found results to the self similar model (\ref{dyn}) for blow-up. This allows us to extend data from the region, where the numerical error is still controlled to essentially the full blow-up scenario, i.e., to identify the blow-up time $t^{*}$ as well as the blow-up rate. Nonetheless the numerical treatment of a blow-up is a delicate problem. In order to capture the phenomena, we need to make sure to have enough numerical resolution to get close enough to the blow-up in order to identify the mechanism. As before, we use $L_{\xi}=L_\eta=20$, but now with $N_{\xi}=N_{\eta}=2^{12}$ Fourier collocation points in each direction. High-index Fourier coefficients, which are used to estimate the space resolution, stay below machine precision throughout the run. In time we use two consecutive runs, one up to $\sim0.9t^{*}$, and a second one, with a much finer time step that runs beyond the $t^*$ as estimated from the first run. In Fig.~\ref{dromion11inf} we show on the left the $L^{\infty}$ norm of the solution which appears to indicate a finite time blow-up. On the right we trace the quantity $\Delta$ indicating the relative conservation of the computed mass. It can be seen to be conserved to better than $10^{-5}$ during the whole computation. \begin{figure}[!htb]\label{dromion11inf} \includegraphics[width=0.49\hsize]{DSIDrom_Max.png} \includegraphics[width=0.49\hsize]{DSIDrom_test.png} \caption{DSI solution close to blow-up for initial data $\Psi(\xi,\eta,0) =1.1Q $. On the left the evolution of the $L^{\infty}$ norm of the solution, on the right the conservation of mass $\Delta = \log_{10}(1-m(t)/m(0))$, which stays below $-14$ until we get close to the critical time. The fitted blow-up time is $t^* = 5.332$. } \end{figure} We show the solution close to the blow-up in Fig.~\ref{dromion11}. \begin{figure}[!htb]\label{dromion11} \includegraphics[width=0.7\hsize]{DSIDrom_final.png} \caption{DSI solution close to blow-up for initial data $\Psi(\xi,\eta,0) =1.1Q $. } \end{figure} To study the mechanism of the blow-up, we trace the $L^{\infty}$ norm of the solution as well as the $L^{2}$ norm of the $\xi$ derivative. The fitting of these norms is done for the last several thousand recorded time steps before we start losing temporal resolution. Further we use stabilization of the fit to more precisely judge the data cut off point. Concretely we fit the logarithm of the considered norms, for instance the $L^{\infty}$ norm according to $\ln ||\Psi||_{\infty}=a \ln (t^{*}-t)+b$ (and similarly for $||\Psi_{\xi}||_{2}$). The fitting is performed with the algorithm \cite{NM} implemented in Matlab as the command \emph{fminsearch}. For the example with the initial data $1.1Q$, the results can be seen in Fig.~\ref{Fig:DromBlow}. \begin{figure}[!htb] \includegraphics[width=0.49\hsize]{DSIDrom_blow.png} \includegraphics[width=0.49\hsize]{DSIDrom_u2x.png \caption{Blow-up rate for initial data $\Psi(\xi,\eta,0) = 1.1 Q$. On the left $||\Psi||_\infty$, the red lines have the form $a\log_{10}(t*-t) + b$, with values obtained by fitting the last several thousand points before we lose precision, $a_\infty = 1.13$, $a_{\Psi_x} = 2.18$ and $b_\infty = 1.2$, $b_{\Psi_x} = 10.0$ and $t^* = 0.5394$. } \label{Fig:DromBlow} \end{figure} The asymptotic profile of the solution appears to be a scaled dromion according to (\ref{dyn}) as can be seen from Fig.~\ref{dromion11fit}. The residual is of the order of 10\% of the maximum of the fitted solution which shows that one cannot get arbitrarily close to the blow-up numerically, but sufficiently to identify the asymptotic profile. \begin{figure}[!htb]\label{dromion11fit} \includegraphics[width=0.7\hsize]{DSIDrom_difference.png} \caption{Difference of the DS I solution close to blow-up for initial data $\Psi(\xi,\eta,0) =1.1Q $ and a scaled dromion.} \end{figure} \section{Gaussian initial data} In this section, we study more examples from the Schwartz class of functions with a single hump. Since the dromion is not radially symmetric, we concentrate here on standard Gaussians, i.e., initial data of the form \begin{equation} \Psi(\xi,\eta,0) = \kappa \exp(-\xi^{2}-\eta^{2}),\quad \kappa>0. \label{inigauss} \end{equation} Once more we find that initial data with a mass smaller than the dromion will be simply dispersed, whereas initial data with a larger mass will lead to a blow-up in finite time. First we consider the case $\kappa=3$ in (\ref{inigauss}) with a mass of roughly $0.65M_{Q}$. We use $N_{\xi}=N_{\eta}=2^{10}$ Fourier modes for $(\xi,\eta)\in 10[-\pi,\pi]\times10[-\pi,\pi]$ and $N_{t}=10^{3}$ time steps for $t\leq 1$. The solution for $t=1$ is shown on the left of Fig.~\ref{3gauss}. The initial hump is clearly dispersed. This is also confirmed by the $L^{\infty}$ norm of the solution on the right of the same figure which after some initial growing appears to decrease monotonically. \begin{figure}[!htb] \includegraphics[width=0.49\hsize]{3gausst1-eps-converted-to.pdf} \includegraphics[width=0.49\hsize]{3gaussinf-eps-converted-to.pdf} \caption{Solution to DS I for the initial data $\Psi(\xi,\eta,0)=3\exp(-\xi^{2}-\eta^{2})$, on the left for $t=1$, on the right the $L^{\infty}$ norm in dependence of time. } \label{3gauss} \end{figure} If we take initial data with a mass larger than the dromion, say $\kappa=4.5$ in (\ref{inigauss}) where the mass is roughly $1.45 M_{Q}$, we again seem to get a finite time blow-up. The solution for $t=0.1570$ in Fig.~\ref{5gauss} is already close to the blow-up. \begin{figure}[!htb]\label{5gauss} \includegraphics[width=0.7\hsize]{DSIGauss45_final.png} \caption{DS I solution close to blow-up for Gaussian initial data $\Psi(\xi,\eta,0) = 4.5e^{-\xi^2 -\eta^2}$.} \end{figure} The $L^{\infty}$ norm of the solution is monotonically increasing until numerical precision is lost. \begin{figure}[!htb] \includegraphics[width=0.46\hsize]{DSIGauss45_Max.png} \includegraphics[width=0.49\hsize]{DSIGauss45_test.png} \caption{DS I solution close to blow-up for Gaussian initial data $\Psi(\xi,\eta,0) = 4.5e^{-\xi^2 -\eta^2}$. Blow up time at $ t = 0.1583$} \label{Fig:Gauss} \end{figure} A fitting of the $L^{\infty}$ norm of the solution as well as the $L^{2}$ norm of $\Psi_{\xi}$ as before in Fig.~\ref{Fig:GaussBlow} indicates that the blow-up is generic, with blow-up rates \begin{equation*} ||\Psi||_{\infty} \sim |t^*-t|^{-1}, \quad ||\Psi_{\xi}||_{2}^{2} \approx |t^*-t|^{-2}. \end{equation*} \begin{figure}[!htb] \includegraphics[width=0.49\hsize]{DSIGauss45_blow.png} \includegraphics[width=0.49\hsize]{DSIGauss45_u2x.png \caption{Blow-up rate for initial data $\Psi = 4.5e^{-\xi^2-\eta^2}$, fitting the last several thousand points before we lose precision, $a_\infty = 1.28$, $a_{\Psi_x} = 2.45$ and $b_\infty = 0.65$, $b_{\Psi_x} = 9.08$ and $t* = 0.1583$.} \label{Fig:GaussBlow} \end{figure} The blow up is self-similar with the profile close to the blow-up being a dynamically rescaled dromion as can be seen from the difference between the solution at the final recorded time and rescaled dromion (according to (\ref{dyn}) in Fig.~\ref{Fig:GaussDiff}. The residual is of the order of $10\%$ which once more indicates a good agreement with the model. \begin{figure}[!htb] \includegraphics[width=0.7\hsize]{DSIGauss45_difference.png} \caption{Difference of the DS I solution close to blow-up for Gaussian initial data $\Psi(\xi,\eta,0) = 4.5e^{-\xi^2 -\eta^2}$ and a fitted (according to (\ref{dyn})) dromion. } \label{Fig:GaussDiff} \end{figure} \section{Conclusion} In this paper, we have presented a detailed numerical study of integrable DS I equations with trivial boundary conditions at infinity for initial data from the Schwartz class of rapidly decreasing smooth functions. As in \cite{KMS2} we have presented a hybrid approach based on a Fourier spectral method with an analytic (up to the use of the error function) regularisation of the singular Fourier symbols. With this approach, it was possible to identify a localized stationary solution to DS I which was shown to be exponentially localized as the analytically known dromion for radiative boundary conditions. Strong numerical evidence has been presented that the dromion is unstable against localized perturbations, and that perturbations leading to a smaller mass of the initial data than the dromion mass will be simply dispersed. Perturbations with a larger mass than the dromion will lead to blow-up in finite time. We presented numerical evidence that the blow-up is self-similar with the dromion as the asymptotic profile. The same behavior was observed for initial data from the Schwartz class with a single hump. An interesting question to be studied in the future is whether dromions also exist for non-integrable generalisations of DS I and DS II, and whether a blow-up is still observed in such cases. A first study of these questions for DS II was presented in \cite{KSDS} and should also be redone with the methods of \cite{KMS2}. .
\section{Introduction} It is now well established that the Universe at late times experienced the transition from the matter era to the accelerated expansion phase. Although the simplest explanation would be the consideration of the cosmological constant, the corresponding problem related to the quantum-field-theoretical calculation of its value, as well as the possibility of a dynamical nature, led to two main paths of constructing extended scenarios. The first is to maintain general relativity as the underlying theory of gravity, and consider new, exotic forms of matter that constitute the concept of dark energy \cite{Copeland:2006wr,Cai:2009zp,Bamba:2012cp}. The second is to construct extended or modified theories of gravity, that posses general relativity as a low-energy limit, but which in general provide the extra degrees of freedom that can drive the dynamical universe acceleration \cite{Nojiri:2010wj,Capozziello:2011et,Cai:2015emx,CANTATA:2021ktz}. Nevertheless, one can acquire an alternative explanation of the dark energy origin, through the cosmological application \cite{Fischler:1998st,Bak:1999hd,Horava:2000tb} of the holographic principle \cite{tHooft:1993dmi,Susskind:1994vu,Bousso:2002ju}. Based on the connection of the UV cutoff of a quantum field theory (related to the vacuum energy) with the largest distance of the theory (which is required for the applicability of the theory at large distances) \cite{Cohen:1998zx}, one can extract a vacuum energy of holographic origin, namely a form of holographic dark energy \cite{Li:2004rb,Wang:2016och}. The cosmological implications of holographic dark energy proves to be very interesting \cite{Li:2004rb,Wang:2016och,Horvat:2004vn,Huang:2004ai,Pavon:2005yx, Wang:2005jx, Nojiri:2005pu,Kim:2005at, Wang:2005ph, Setare:2006wh,Setare:2008pc,Setare:2008hm} and it proves to be in agreement with observations \cite{Zhang:2005hs,Li:2009bn,Feng:2007wn,Zhang:2009un,Lu:2009iv, Micheletti:2009jy}. Furthermore, the basic model has been extended in various ways \cite{Gong:2004fq,Saridakis:2007cy, Setare:2007we,Cai:2007us,Setare:2008bb,Saridakis:2007ns,Saridakis:2007wx, Jamil:2009sq, Gong:2009dc, Suwa:2009gm,Jamil:2010vr,BouhmadiLopez:2011xi,Malekjani:2012bw, Khurshudyan:2014axa, Landim:2015hqa,Pasqua:2015bfz, Jawad:2016tne,Pourhassan:2017cba,Saridakis:2017rdo,Nojiri:2017opc, Saridakis:2018unr, Oliveros:2019rnq,Kritpetch:2020vea,Saridakis:2020zol,Dabrowski:2020atl, daSilva:2020bdc, Anagnostopoulos:2020ctz, Mamon:2020spa, Bhattacharjee:2020ixg,Huang:2021zgj,Lin:2021bxv,Colgain:2021beg, Hossienkhani:2021emv,Nojiri:2021iko,Shekh:2021ule,Shaikh:2022ynt}. The basic expression in the construction of holographic dark energy is the one that connects the entropy of a system with geometrical quantities such as its radius. The standard one is the Bekenstein-Hawking entropy, which arises as the black-hole and cosmological application of the standard Boltzmann-Gibbs entropy. However, Kaniadakis has proposed a one-parameter generalization of the Boltzmann-Gibbs entropy, called Kaniadakis entropy \cite{Kaniadakis:2002zz,Kaniadakis:2005zk}. This results from a self-consistent and coherent relativistic statistical theory, in which the basic features of standard statistical theory are maintained. In such an extended statistical theory, the distribution functions are a one-parameter continuous deformation of the usual Maxwell-Boltzmann ones, and hence standard statistical theory is recovered in a particular limit. In the present work we will use Kaniadakis entropy in order to formulate Kaniadakis holographic dark energy, and study its cosmological implications. Although in the literature there were some first attempts towards this direction \cite{Moradpour:2020dfm,Jawad:2021xsr,Sharma:2021zjx} the resulting models were not correct. The reason for this failure was the fact that the authors used the Hubble horizon instead of the future event horizon in the basic holographic expression. Therefore, not only the resulting models could not recover usual holographic dark energy in the limit where Kaniadakis entropy becomes standard entropy, as it should, but in order to be able to describe the universe evolution one needs unacceptably large values of the Kaniadakis parameter, namely unacceptably large deviations from standard entropy. Hence, in this work we proceed to the consistent formulation of Kaniadakis holographic dark energy, which is indeed a well-defined extension of standard holographic dark energy, recovering it as a particular limit in the case where Kaniadakis entropy becomes standard Bekenstein-Hawking entropy. The plan of the manuscript is the following: In Section \ref{model} we formulate Kaniadakis holographic dark energy, we present the corresponding cosmological equations and we extract analytical relations for the dark energy density and equation-of-state parameters. Then in Section \ref{Cosmologicalevolution} we proceed to the study of the resulting cosmological behavior. Finally, in Section \ref{Conclusions} we discuss our results and we summarize. \section{Kaniadakis holographic dark energy} \label{model} In this section we proceed to the formulation of Kaniadakis holographic dark energy. The basic idea behind holographic dark energy is the inequality $\rho_{DE} L^4\leq S$, where $L$ is the largest distance of the theory and $S$ the entropy relation applied in a black hole of radius $L$ \cite{Li:2004rb,Wang:2016och}. In the case of standard Bekenstein-Hawking entropy $S_{BH}\propto A/(4G)=\pi L^2/G$, with $G$ the Newton's constant, the saturation of the above inequality gives standard holographic dark energy, namely $\rho_{DE}=3c^2 M_p^2 L^{-2}$, with $M_p$ the Planck mass and $c$ the model parameter. Hence, we can see that if instead of standard entropy we use a modified one, we will obtain a modified holographic dark energy. As we mentioned in the Introduction, Kaniadakis entropy is a one-parameter generalization of the classical entropy. It is given by \cite{Kaniadakis:2002zz,Kaniadakis:2005zk} \begin{eqnarray} S_{K}=- k_{_B} \sum_i n_i\, \ln_{_{\{{\scriptstyle K}\}}}\!n_i , \end{eqnarray} with $k_{_B}$ the Boltzmann constant, and where we have defined $\ln_{_{\{{\scriptstyle K}\}}}\!x=(x^{K}-x^{-K})/2K$. Kaniadakis entropy is characterized by the single dimensionless parameter $K$, which quantifies the deviation from the case of standard statistical mechanics. Hence, standard entropy is recovered in the limit $K\rightarrow0$, while $K$ can vary in the range $-1<K<1$. Additionally, in such a generalized statistical theory the distribution function reads as $ n_i= \alpha \exp_{_{\{{\scriptstyle K}\}}}[-\beta (E_i-\mu)] , $ where $\exp_{_{\{{\scriptstyle K}\}}}(x)= \left(\sqrt{1+K^2x^2}+K x\right)^{1/K}$, $\alpha=[(1-K)/(1+K)]^{1/2K}$, $1/\beta=\sqrt{1-K^2}\,\,k_{_{B}}\!T$, and the chemical potential $\mu$ can be fixed by normalization \cite{Kaniadakis:2002zz,Kaniadakis:2005zk}. Kaniadakis entropy can be expressed as \cite{Abreu:2016avj,Abreu:2017fhw,Abreu:2017hiy,Abreu:2018mti,Yang:2020ria, Abreu:2021avp} \begin{equation} \label{kstat} S_{K} =-k_{_B}\sum^{W}_{i=1}\frac{P^{1+K}_{i}-P^{1-K}_{i}}{2K}, \end{equation} where $P_i$ is the probability the system to be in a specific microstate and $W$ the total number of configurations. Let us apply Kaniadakis entropy in the black-hole framework, which will then be needed for the holographic application. Assuming that $P_i=1/W$, using the fact that Boltzmann-Gibbs entropy is $S\propto\ln(W)$, while the Bekenstein-Hawking entropy is given by $S_{BH}= A/(4G)$, we acquire $W=\exp\left[ A/(4G)\right]$ \cite{Moradpour:2020dfm}, where from now on we impose units in which the Boltzmann constant, the light speed, and the reduced Planck constant are set to $k_{_B}=c=\hbar=1$. Hence, inserting these into (\ref{kstat}) we find \begin{equation} \label{kentropy} S_{K} = \frac{1}{K}\sinh{(K S_{BH})}. \end{equation} As expected in the limit $K\rightarrow 0$ one recovers standard Bekenstein-Hawking entropy, i.e. $S_{K\rightarrow 0}=S_{BH}$. Since in reality one expects the above modified entropy to be close to the standard Bekenstein-Hawking value, we expect that $K\ll1$ (we remind that $-1<K<1$). Thus, it is justified to expand the above Kaniadakis entropy for small $K$, obtaining \begin{equation}\label{kentropy2} S_{K} = S_{BH}+ \frac{K^2}{6} S_{BH}^3+ {\cal{O}}(K^4). \end{equation} As one can see, the first term is the usual entropy, while the second term is the lowest-order Kaniadakis correction. It is now easy to extract the relation of Kaniadakis holographic dark energy. In particular, inserting (\ref{kentropy2}) into the inequality $\rho_{DE} L^4\leq S$, we obtain \begin{equation} \label{KHDE} \rho_{DE}= 3c^2 M_p^2 L^{-2}+ 3\tilde{c}^2K^2 M_p^6 L^2, \end{equation} with $c$ and $\tilde{c}$ constants. As mentioned above, for $K=0$ the above expression gives the usual holographic dark energy $\rho_{DE}=3c^2 M_p^2 L^{-2}$. In the following we absorb the constant $\tilde{c}$ inside the parameter $K$, by setting $3\tilde{c}^2K^2\equiv\tilde{K}^2$ and we drop the tildes for simplicity. We proceed by considering a flat homogeneous and isotropic Friedmann-Robertson-Walker (FRW) geometry with metric \begin{equation} \label{FRWmetric} ds^{2}=-dt^{2}+a^{2}(t)\delta_{ij}dx^{i}dx^{j}\,, \end{equation} with $a(t)$ the scale factor. As a next step, in any holographic dark energy scenario, one needs to determine the length $L$ that appears in the corresponding relations. In the case of standard holographic dark energy models it is well known that $L$ cannot be the Hubble horizon $H^{-1}$ (where $H\equiv \dot{a}/a$ is the Hubble function), since this choice leads to obvious inconsistencies \cite{Hsu:2004ri}, such as no acceleration. Thus, one must use the future event horizon \cite{Li:2004rb} \begin{equation} \label{futrhoriz} R_h\equiv a\int_t^\infty \frac{dt}{a}= a\int_a^\infty \frac{da}{Ha^2}. \end{equation} As we mentioned in the Introduction, in some recent attempts to construct Kaniadakis holographic dark energy the authors used (\ref{kentropy}) but then they considered the Hubble horizon to be $L$ \cite{Moradpour:2020dfm,Jawad:2021xsr,Sharma:2021zjx}. Thus, the obtained models do not have standard holographic dark energy and standard thermodynamics as a sub-case, and this is a serious disadvantage. One can verify that in a clear way by observing that in order to have reasonable observational results the authors demand $K$ values of the order of $10^3$, namely a huge deviation from standard Bekenstein-Hawking entropy, which is not observed (not mentioning the fact that the initial $K$ parameter of Kaniadakis entropy is bounded in $-1<K<1$). In the present work we desire to formulate Kaniadakis holographic dark energy in a consistent way, and hence we use as $L$ the future event horizon (\ref{futrhoriz}). In this way, as we will see, standard holographic dark energy is included as a sub-case, and can be obtained for $K\rightarrow0$. According to the above discussion, and using (\ref{KHDE}) with $L$ the $R_h$, the energy density of Kaniadakis holographic dark energy writes as \begin{equation} \label{KHDE2} \rho_{DE}= 3c^2 M_p^2 R_h^{-2}+ K^2 M_p^6 R_h^2. \end{equation} The Friedmann equations in a universe containing the dark energy and matter perfect fluids are \begin{eqnarray} \label{Fr1b} 3M_p^2 H^2& =& \ \rho_m + \rho_{DE} \\ \label{Fr2b} -2 M_p^2\dot{H}& =& \rho_m +p_m+\rho_{DE}+p_{DE}, \end{eqnarray} with $p_{DE}$ the pressure of Kaniadakis holographic dark energy, and $\rho_m$ and $p_m$ respectively the energy density and pressure of the matter sector. The equations close by considering the matter conservation equation \begin{equation}\label{rhoconserv} \dot{\rho}_m+3H(\rho_m+p_m)=0. \end{equation} It proves convenient to introduce the dark energy and matter density parameters through \begin{eqnarray} && \Omega_m\equiv\frac{1}{3M_p^2H^2}\rho_m \label{Omm}\\ &&\Omega_{DE}\equiv\frac{1}{3M_p^2H^2}\rho_{DE}. \label{ODE} \end{eqnarray} Using these definitions, relations (\ref{futrhoriz}),(\ref{KHDE2}),(\ref{ODE}) lead to \begin{equation}\label{integrrelation} \int_x^\infty \frac{dx}{Ha}=\frac{1}{a}\left( \frac{3H^2 \Omega_{DE}- \sqrt{9H^4 \Omega_{DE}^2 -12c^2 K^2M_p^4} }{2K^2M_p^4} \right)^{\frac{1}{2}}, \end{equation} where $x\equiv \ln a$. Note that solving the fourth-degree algebraic equation (\ref{KHDE2}) we have kept only the solutions that give positive $R_h$ and moreover with the usual limiting result for $K\rightarrow0$. Indeed, as one can see, in the limit $K\rightarrow0$ the above relation gives the standard holographic dark energy result $ \int_x^\infty \frac{dx}{Ha}= \frac{c}{aH\sqrt{\Omega_{DE}}}$. We focus on the physically interesting dust matter case, where the matter equation-of-state parameter is set to zero. Therefore, (\ref{rhoconserv}) leads to $\rho_m=\rho_{m0}/a^3$, where $\rho_{m0}$ is the matter energy density at the current scale factor $a_0=1$ (we use the subscript ``0'' to denote the present value of a quantity). Hence, substituting into (\ref{Omm}) leads to $\Omega_m=\Omega_{m0} H_0^2/(a^3 H^2)$, and then, using the Friedmann equation $\Omega_m+\Omega_{DE}=1$, we find \begin{equation}\label{Hrel2} \frac{1}{Ha}=\frac{\sqrt{a(1-\Omega_{DE})}}{H_0\sqrt{\Omega_{m0}}}. \end{equation} Inserting (\ref{Hrel2}) into (\ref{integrrelation}) leads to \begin{equation}\label{integrrelation2} \int^{\infty}_{x}\frac{dx}{H_{0}\sqrt{\Omega_{m0}}}\sqrt{a(1-\Omega_{DE})}=\frac {1}{a}\left( \frac{3H^2 \Omega_{DE}- \sqrt{9H^4 \Omega_{DE}^2 -12c^2 K^2M_p^4} }{2K^2M_p^4} \right)^{\frac{1}{2}}. \end{equation} In the following we use $x=\ln a$ as the independent variable, and therefore for a quantity $f$ we acquire $\dot{f}=f' H$, with primes denoting derivatives with respect to $x$. Differentiating (\ref{integrrelation2}) in terms of $x$ we obtain \begin{eqnarray}\label{Odediffeq} && \!\!\!\!\!\!\!\!\!\!\! \Omega_{DE}'=\Omega_{DE}(1-\Omega_{DE})\left \{3-\frac{2(\mathcal{A}-2K^{2}M_{p}^{4}\mathcal{B})}{\mathcal{A}}\left [1-\sqrt{3}\left (\frac{\Omega_{DE}}{\mathcal{A}\mathcal{B}}\right )^{\frac{1}{2}}\right ]\right \}, \end{eqnarray} with \begin{eqnarray}\nonumber \!\!\!\!\!\!\!\!\!\!\! \mathcal{A} &=&\frac{3\mathrm{e}^{-3x}H^{2}_{0}\Omega_{m0}\Omega_{DE}}{1-\Omega_{DE}}, \\ \nonumber \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \mathcal{B}&=&\frac{\mathcal{A}-\sqrt{\mathcal{A}^{2}-12c^{2}K^{2}M^{4}_{p}}}{ 2K^{2}M^{4}_{p}}. \end{eqnarray} Differential equation (\ref{Odediffeq}) determines the evolution of Kaniadakis holographic dark energy as a function of $x=\ln a$, in the case of flat spatial geometry and for dust matter. We mention that in the limit $K\rightarrow 0$ we have $\mathcal{B}|_{K\rightarrow 0}=\frac{3c^{2}}{\mathcal{A}}$, and hence (\ref{Odediffeq}) recovers the corresponding differential equation of usual holographic dark energy \cite{Li:2004rb}, i.e. $\Omega_{DE}'|_{K\rightarrow 0}= \Omega_{DE}(1-\Omega_{DE})\left(1+2\sqrt{\frac{3M_p^2\Omega_{DE}}{3 c^2 M_p^2}} \right)$, which, since the $x$-dependence is absent, accepts an analytic solution in an implicit form \cite{Li:2004rb}. We proceed by examining the behavior of the equation-of-state parameter $w_{DE}\equiv p_{DE}/\rho_{DE}$ of Kaniadakis holographic dark energy. From the conservation of the matter sector (\ref{rhoconserv}), and using the two Friedmann equations (\ref{Fr1b}),(\ref{Fr2b}), we deduce that the dark energy sector is conserved too, i.e. \begin{equation}\label{rhodeconserv} \dot{\rho}_{DE}+3H\rho_{DE}(1+w_{DE})=0. \end{equation} Differentiating (\ref{KHDE2}) gives $\dot{\rho}_{DE}=2M^{2}_{p}\left (-3c^{2}R^{-4}_{h}+K^{2}M^{4}_{p}\right )R_{h}\dot{R}_{h}$. In this expression we have that $\dot{R}_h=H R_h-1$, as it is found from (\ref{futrhoriz}), where $R_h$ can be further eliminated in terms of $\rho_{DE}$ according to (\ref{KHDE2}) as \begin{eqnarray} R_h=\left (\frac{\rho_{DE}-\sqrt{\rho^{2}_{DE}-12c^{2}K^{2}M^{8}_{p}}}{2K^{2}M^{6}_{p}} \right )^{1/2}\equiv \mathcal{C}. \end{eqnarray} Substituting all the above into (\ref{rhodeconserv}) we acquire \begin{eqnarray} \label{rhodeconserv2} 2M^{2}_{p}(H \mathcal{C}-1 )\left( \frac{-3c^{2}+K^{2}M^{4}_{p}\mathcal{C}^{4}}{\mathcal{C}^{3 }}\right )+3H\rho_{DE}(1+w_{DE})=0. \end{eqnarray} Therefore, inserting $H$ from (\ref{Hrel2}), and using definition (\ref{ODE}) after some algebra we find \begin{equation}\label{wDE} w_{DE}=-1-2\left (\frac{\Omega_{DE}}{3\mathcal{A}^{3}} \right )^{\frac{1}{2}}\left (\frac{-3c^{2}+K^{2}M^{4}_{p}\mathcal{B}^{2}}{\mathcal{B}^{\frac{3}{2}}}\right )\left [-1+\frac{\sqrt{3}}{3}\left (\frac{\mathcal{A}\mathcal{B}}{\Omega_{DE}} \right )^{\frac{1}{2}}\right ]. \end{equation} Hence, $w_{DE}$ as a function of $\ln a$ is known, as long as $\Omega_{DE}$ is known from (\ref{Odediffeq}). Note that for $K\rightarrow 0$ the above expression provides the standard holographic dark energy result, i.e. $w_{DE}|_{K\rightarrow 0}=-\frac{1}{3}-\frac{2}{3}\frac{\sqrt{\Omega_{DE}}}{c}$ \cite{Wang:2016och}, as expected. Additionally, we mention that in general $w_{DE}$ can be either quintessence-like or phantom-like, which is an advantage revealing the rich capabilities of the scenario at hand. Lastly, for convenience we can introduce the deceleration parameter \begin{equation} \label{qdeccel} q\equiv-1-\frac{\dot{H}}{H^2}=\frac{1}{2}+\frac{3}{2}\left(w_m\Omega_m+w_{DE} \Omega_{DE} \right), \end{equation} which in the case of dust matter is straightforwardly known as long as $\Omega_{DE}$ (and thus $w_{DE}$ from (\ref{wDE})) is known. We close this section by discussing the relation of Kaniadakis entropy with other extended entropies, and in particular with Tsallis one. As it is known, the non-extensive Tsallis entropy $S^{T}_q$, with $q$ the parameter which quantifies the deviation from Bekenstein-Hawking entropy \cite{Tsallis:1987eu,Tsallis:2012js}, is related to Kaniadakis one through \cite{Abreu:2017hiy,Moradpour:2020dfm,Nunes:2015xsa} \begin{equation} S_{K} =\frac{S^{T}_{1+K}+S^{T}_{1-K}}{2}. \end{equation} Concerning the other recently proposed generalized entropy by Barrow, namely $S^{B}_\Delta$, which arises from the intricate structure of the black-hole surface due to quantum-gravitational effects, with $\Delta$ the parameter that quantifies the deviation from usual entropy \cite{Barrow:2020tzx}, we mention that although mathematically one can extract the relation $ S_{K} =\frac{S^{B}_{\Delta}+S^{B}_{-\Delta}}{2}$, it cannot have a physical application since in Barrow entropy $0\leq\Delta\leq1$. \section{Cosmological evolution} \label{Cosmologicalevolution} In the previous section we formulated Kaniadakis holographic dark energy, and we provided the equations that determine the evolution of the corresponding dark energy density, equation-of-state and deceleration parameters. Hence, we can now proceed to a detailed investigation of the resulting cosmological behavior. Since equation (\ref{Odediffeq}) can be solved analytically only for $K=0$, in the general case we should resort to numerical elaboration. As long as we have the solution for $\Omega_{DE}(x)$ we can obtain its behavior in terms of the redshift $z$ through the simple relation $x\equiv\ln a=-\ln(1+z)$. Finally, we mention that Kaniadakis entropy is an even function, namely $S_{K}=S_{-K}$, and that is why all the above expressions of Kaniadakis holographic dark energy depend only on $K^2$. Thus, in the following we focus on the $K\geq0$ region. \begin{figure}[!] \centering \includegraphics[width=7.cm]{figHDEthermal.eps} \\ \includegraphics[width=7.cm]{figHDEwde.eps} \\ \includegraphics[width=7.cm]{figHDEq.eps} \caption{\it{ {\bf{Upper graph}}: The Kaniadakis holographic dark energy density parameter $\Omega_{DE}$ (blue-solid) and the matter density parameter $\Omega_{m}$ (red-dashed), as a function of the redshift $z$, for $K=0.1$ and $c=0.9$. {\bf{ Middle graph}}: The corresponding dark-energy equation-of-state parameter $w_{DE}$. {\bf{Lower graph}}: The corresponding deceleration parameter $q$. In all graphs we have set $\Omega_{DE}(x=-\ln(1+z)=0)\equiv\Omega_{DE0}\approx0.7$ in agreement with observations, and for convenience we have added a vertical dotted line marking the present time $z=0$. }} \label{HDEOmegas} \end{figure} We solve equation (\ref{Odediffeq}) numerically, imposing $\Omega_{DE}(x=-\ln(1+z)=0)\equiv\Omega_{DE0}\approx0.7$ and therefore $\Omega_m(x=-\ln(1+z)=0)\equiv\Omega_{m0}\approx0.3$ in agreement with observations \cite{Planck:2018vyg}. In the upper graph of Fig. \ref{HDEOmegas} we depict the evolution of the dark energy and matter density parameters in terms of the redshift. Additionally, in the middle graph we present the corresponding behavior of the dark-energy equation-of-state parameter as it arises from (\ref{wDE}). Finally, in the lower graph we show the deceleration parameter as it is given from (\ref{qdeccel}). We mention that for reader's convenience we have extended the evolution up to the far future, namely for $z\rightarrow-1$. As we observe, the scenario at hand can provide the required thermal history of the universe, i.e. the sequence of matter and dark energy epochs, and the universe results asymptotically to a complete dark-energy dominated phase. Moreover, from the middle graph of Fig. \ref{HDEOmegas} we can see that the value of $w_{DE}$ at present is around $-1$ in agreement with observational data. Note that in this specific example $w_{DE}$ in the future enters slightly inside the phantom regime, which as mentioned above is allowed by (\ref{wDE}) and shows the capabilities of the model. Finally, from the lower graph of Fig. \ref{HDEOmegas} we deduce that the transition from deceleration to acceleration is realized at $z\approx 0.6$, in agreement with observations. \begin{figure}[!h] \centering \includegraphics[width=10.5cm]{figHDEmultivarc.eps} \caption{\it{ The redshift-evolution of the equation-of-state parameter $w_{DE}$ of Kaniadakis holographic dark energy, for fixed $K=0.1$ and various values of $c$. We have imposed $\Omega_{DE0}\approx0.7$ and we have added a vertical dotted line marking the present time $z=0$. }} \label{HDEmultiwdec} \end{figure} Let us now study the effect of the model parameters $c$ and $K$ on the dark-energy equation-of-state parameter $w_{DE}$. In Fig. \ref{HDEmultiwdec} we depict $w_{DE}(z)$ for fixed $K=0.1$ and various values of $c$. As we can see, with $c$ decreasing $w_{DE}(z)$, as well as its present value $w_{DE}(z=0)$, acquire algebraically lower values, experiencing the phantom-divide crossing during the evolution. Note that for $c<0.9$ the value of $w_{DE}(z=0)$ lies in the phantom regime. Furthermore, in Fig. \ref{HDEmultiwdeK} we present $w_{DE}(z)$ for fixed $c=1$ and various values of $K$. Here we observe the interesting behavior that for increasing $K$, at earlier times $w_{DE}$ slightly decreases, in future times in increases, however at times around the present ones it remains almost unaltered. Concerning the asymptotic value of $w_{DE}$ in the far future, namely for $z\rightarrow-1$, as can be deduced from the figures, as well as form (\ref{wDE}), it depends on the combination of $K$ and $c$. In summary, we can see that the scenario of Kaniadakis holographic dark energy can lead to very interesting cosmological phenomenology, in which $w_{DE}$ can be quintessence-like, phantom-like, or cross the phantom divide before or after the present time. \begin{figure}[!h] \centering \includegraphics[width=10.5cm]{figHDEmultivarK.eps} \caption{\it{ The redshift-evolution of the equation-of-state parameter $w_{DE}$ of Kaniadakis holographic dark energy, for fixed $c=1$ and various values of $K$. We have imposed $\Omega_{DE0}\approx0.7$ we have added a vertical dotted line marking the present time $z=0$. }} \label{HDEmultiwdeK} \end{figure} \section{Conclusions} \label{Conclusions} In this work we formulated a holographic dark energy scenario based on Kaniadakis entropy. The latter is a generalization of Boltzmann-Gibbs entropy, arising form a coherent relativistic statistical theory and characterized by a single parameter $K$ that quantifies the deviations from standard expressions. Hence, by applying the usual steps of holographic dark energy, imposing the future event horizon as the IR cutoff, and using Kaniadakis extended entropy, we obtained Kaniadakis holographic dark energy in a consistent way, namely a one-parameter extension of usual holographic dark energy, possessing it as a particular limit, namely for $K\rightarrow0$. In order to investigate the cosmological application of Kaniadakis holographic dark energy we extracted the differential equation that determines the evolution of the effective dark energy density parameter $\Omega_{DE}$. Moreover, we provided analytical expressions for the corresponding equation-of-state parameter $w_{DE}$, as well as for the deceleration parameter. The scenario of Kaniadakis holographic dark energy proves to lead to interesting cosmological behavior. In particular, the universe exhibits the standard thermal history, i.e. the sequence of matter and dark-energy eras, while the transition to acceleration takes place at $z\approx0.6$. Concerning the dark-energy equation-of-state parameter we saw that it can have a rich behavior, being quintessence-like, phantom-like, or experience the phantom-divide crossing in the past or in the future, depending on the values of the two model parameters $c$ and $K$. In particular, for fixed $K$ decreasing $c$ leads to algebraically smaller $w_{DE}$ values, while for fixed $c$ by increasing $K$ we acquire smaller $w_{DE}$ values at higher redshifts, larger $w_{DE}$ values in the future, and almost unaltered values at present. Finally, in the far future dark energy dominates completely, and the asymptotic $w_{DE}$ value depends on $c$ and $K$. In conclusion, Kaniadakis holographic dark energy exhibits richer and more interesting behavior in comparison to usual holographic dark energy. Additionally, due to the consistent formulation, it possesses the latter as a limiting sub-case. Definitely, before one considers it as a successful candidate for the description of dark energy, there are necessary investigations that should be performed. In particular, one should confront the scenario with observational data from Supernova type Ia (SNIa), Baryon Acoustic Oscillation (BAO), Cosmic Microwave Background (CMB), and Hubble parameter observations, and extract constraints on the model parameters. Additionally, one should analyze in detail the phase-space behavior, in order to examine the global dynamics and the asymptotic, late-time evolution of the scenario. These investigations will be performed in separate projects. \begin{acknowledgments} The authors would like to acknowledge the contribution of the COST Action CA18108 ``Quantum Gravity Phenomenology in the multi-messenger approach''. The work is partially supported by the Ministry of Education and Science of the Republic of Kazakhstan, Grant AP08856912. \end{acknowledgments}
\section{Acknowledgements} Thank Shengyu Wang, Ping Yan and Wei Hong from JD Technology for the data processing contributions to this work. \section{Solution}\label{sec:basic} Given a standard name $a_i$ and an alias candidate $a'_j$, the task is to identify whether $a'_j$ is a true alias of the standard name $a_i$. With their associated user location records extracted, i.e. $\mathcal{C}_i$ and $\mathcal{C}'_j$, we should find an effective similarity metric between $\langle \mathcal{C}_i, \mathcal{C}'_j \rangle$, so that the true aliases can be identified by a threshold: \begin{equation}\label{eq:main} \hat{\mathbf{I}}[i,j] = \begin{cases} 1 & \text{, if $\kappa(\mathcal{C}_i, \mathcal{C}'_j) > \theta_\kappa$;} \\ 0 & \text{, otherwise} \end{cases},\;\; \forall i,j. \end{equation} $\theta_\kappa$ is the thresholdm, and the operator $\kappa(\cdot, \cdot)$ is the similarity metric. We study two metrics: 1)~$\kappa_{d}$, the distance-based similarity; and 2)~$\kappa_{p}$, the distribution-based similarity. \subsection{Distance-based Similarity} When the standard name and alias pair $\langle a_i, a'_j \rangle$ refer to the same POI, their geolocations should be the same or at least close to each other. Inspired by Figure~\ref{fig:intuition} that the geolocation of a POI name can be inferred from the POI name's mobility profile, we first extract the mobility profile $\langle \mathcal{C}_i, \mathcal{C}'_j \rangle$ for each pair, then compute the respective geolocation, finally the similarity is computed as the geolocation distance between the pair. Formally we have: \begin{equation} \kappa_{d}(\mathcal{C}_i, \mathcal{C}'_j; \psi) = \frac{1}{\textsc{GeoDis}(\psi(\mathcal{C}_i), \psi(\mathcal{C}'_j))} \end{equation} where $\textsc{GeoDis}(\cdot, \cdot)$ computes the geographical distance between two latitude-longitude ponits, and $\psi(\cdot)$ is the mobility profile based geolocation estimation function. We investigate two approaches to estimate the geolocation: overall centroid $\psi_g$ and local region centroid $\psi_l$. \subsubsection{Overall Centroid}\label{sec:basic:globalc} The overall centroid simply compute the centroid, i.e. the mean latitude-longitude values of all points in the mobility profile. E.g. for $\mathcal{C}_i$: \begin{equation} \psi_g(\mathcal{C}_i) = \textsc{Centroid}(\mathcal{C}_i). \end{equation} \subsubsection{local region Centroid}\label{sec:basic:localc} The overall centroid may bias towards the outliers far from the target geolocation. In this approach, we first capture a small local region where the points are gathering, and gets the centroid of only the points in this local region. In this paper, given a mobility profile, the local region is computed by finding the $d^l \times d^l$ window that covers \textit{maximum} number of points. Formally, the local region centroid for $\mathcal{C}_i$ is: \begin{gather} \psi_l(\mathcal{C}_i) = \textsc{Centroid}(\mathcal{C}_i \cap S(\mathcal{C}_i)), \\ \textbf{s.t.}\;\; S(\mathcal{C}_i) = \argmax_{S_k \in \mathbb{S}}{|\mathcal{C}_i \cap S_k|}; \nonumber \\ \text{and }\mathbb{S} = \Big\{[p_{.x}, p_{.x}+d^l]\times [p_{.y}, p_{.y}+d^l] \;\Big|\; p \in \mathbb{R}^2\Big\}, \nonumber \end{gather} with $\mathbb{S}$ denoting all $d^l \times d^l$ windows, and $S(\mathcal{C}_i)$ denoting the local region of $\mathcal{C}_i$. \subsection{Distribution-based Similarity}\label{sec:distr} For a POI, the users who receive packages there, who are typically working/living there, usually have similar mobility such as visiting the same one or more shops, bus stations, restaurants, etc., no matter if they write the standard name or an alias of the POI in their delivery address. Therefore, we can also identify the alias relationship by comparing the spatial distribution of the user locations, i.e. comparing the spatial distribution between $\langle \mathcal{C}_i, \mathcal{C}'_j \rangle$. To compare the spatial distribution, we first rasterize the city's bounding box into $N^g \times N^g$ grids, and convert the mobility profile into a density matrix $\mathbf{M}^g \in \mathbb{R}^{N^g \times N^g}$, with each entry counting the number of user location points in the grid. Then, the discrete distribution is further acquired by normalizing the density matrix. For example, the distribution $\mathbf{P}_i$ for $\mathcal{C}_i$ is: \begin{gather} \mathbf{M}^g_i[r,c] = \{p_k | p_k \in \mathcal{C}_i \text{ and $p_k$ is within grid-$r,c$}\}, \\ \mathbf{P}_i = \frac{\mathbf{M}^g_i}{\sum_{r,c}\mathbf{M}^g_i[r,c]}, \end{gather} and $\mathbf{P}'_j$ is computed analogously. Finally, the similarity metric between is formulated as the divergence between $\langle \mathbf{P}_i, \mathbf{P}'_j \rangle$: \begin{equation} \kappa_p(\mathcal{C}_i, \mathcal{C}'_j; \delta) = \frac{1}{\delta(\mathbf{P}_i, \mathbf{P}'_j)}, \end{equation} where $\delta(\cdot, \cdot)$ is the divergence function. We investigate two functions in this paper: Kullback–Leibler divergence $\delta_{kl}$ and Jaccard distance $\delta_{jcd}$. \subsubsection{Kullback–Leibler(KL) Divergence}\label{sec:basic:kl} KL Divergence is the relative entropy of two distributions: \begin{equation} \delta_{kl}(\mathbf{P}_i, \mathbf{P}'_j) = \sum_{r,c}\mathbf{P}_i[r,c]\cdot \log{\frac{\mathbf{P}_i[r,c]}{\mathbf{P}'_j[r,c]}}. \end{equation} \subsubsection{Jaccard Distance}\label{sec:basic:jcd} In our settings, Jaccard distance is computed by counting the overlapping portion of two distributions. $\mathbf{P}_i$ and $\mathbf{P}'_j$ are considered overlapping in entry $[r,c]$ if both of them are non-zero there. Formally: \begin{equation} \delta_{jcd}(\mathbf{P}_i, \mathbf{P}'_j) = \frac{\sum_{r,c}{\llbracket \mathbf{P}_i[r,c] \cdot \mathbf{P}'_j[r,c] \neq 0 \rrbracket \cdot (\mathbf{P}_i[r,c]+\mathbf{P}'_j[r,c])}}{\sum_{r,c}{(\mathbf{P}_i[r,c]+\mathbf{P}'_j[r,c])}}. \end{equation} where $\llbracket \cdot \rrbracket=1$ when the condition stands and $0$ otherwise. \section{Conclusion}\label{sec:conclusion} In this paper, we present a novel data mining approach to discover POI alias from large-scale e-commerce delivery addresses combined with users' GPS locations. The proposed method features POI names with its \textit{mobility profile}, and identifies the alias relationship by measuring mobility profile similarity. Two types of similarity metrics are investigated, namely distance-based similarity and distribution-based similarity. Experimental results on real-world data from Suzhou and Beijing, China, show that our method is able to achieve f1-score at $0.621$, which justifies the effectiveness and cross-city generalization of our proposed method. \section{Experiment}\label{sec:exp} \subsection{Data Descriptions} The experiment is conducted on the datasets of Suzhou, Jiangsu, China, and Daxing District, Beijing, China. Both datasets are collected during the year 2019. The POI entities include residential communities and office buildings. The details are as follows: \sstitle{Suzhou} We collect the dataset of up to ten districts in Suzhou. There are $14183$ POI entities. We collect the dataset of around $340,000$ users, with over $210$ million GPS location records and we acquire $4197$ labels in this region. \sstitle{Daxing district, Beijing} In Daxing, we perform alias discovery for $2212$ POI entities, and we acquire $693$ labels. The dataset covers $429, 000$ users with $355$ million GPS location records. \subsection{Experiment Settings} \subsubsection{Evaluation Metric} The delivery address contains province/city/district terms, so it is trivial that the POI names from different districts are not aliases. Therefore, we focus on the alias discovery within each district. For each district, given the inferred alias relationship matrix $\hat{\mathbf{I}} \in \mathbb{R}^{N\times M}$ according to Section~\ref{sec:probdef}, we compare it with the ground truth $\mathbf{I} \in \mathbb{R}^{N\times M}$. F1-score is chosen to balance the evaluation of precision and recall of the discovered aliases. \begin{gather} \mathsf{Precision} = \frac{\sum_{i,j}{\hat{\mathbf{I}}[i,j] \cdot \mathbf{I}[i,j]}}{\sum_{i,j} \hat{\mathbf{I}}[i,j]} \text{ ; }\mathsf{Recall} = \frac{\sum_{i,j}{\hat{\mathbf{I}}[i,j] \cdot \mathbf{I}[i,j]}}{\sum_{i,j} \mathbf{I}[i,j]} \nonumber \\ \mathsf{F}_1 = \frac{2 \cdot \mathsf{Precision} \cdot \mathsf{Recall}}{\mathsf{Precision}+\mathsf{Recall}} \end{gather} For Suzhou, we conduct cross-validation on districts. For each round, we select the labels of eight districts for model training and the rest two districts for evaluation. To investigate the generalization ability, we directly apply the model trained on the entire Suzhou dataset to Beijing for tests. \subsubsection{Baselines} We compare three text-based baselines T1-3, and the four proposed methods M1-4: \begin{itemize} \item \textbf{T1. Edit-Distance}, which computes the minimum number of edits needed to transform one string into the other. \item \textbf{T2. ESIM}~\cite{esim}, an effective short-sentence matching model. \item \textbf{T3. Sen-BERT}~\cite{sentence-bert}, which performs state-of-the-art results on sentence-pair regression tasks using BERT. \item \textbf{M1. Centroid}, which uses $\kappa_d(\cdot, \cdot; \psi_g)$ for Equation~\ref{eq:main}, as is described in Section~\ref{sec:basic:globalc}. \item \textbf{M2. LocCent}, which is detailed in Section~\ref{sec:basic:localc}. \item \textbf{M3. KL-Div}. The method in Section~\ref{sec:basic:kl}. \item \textbf{M4. Jaccard}, which is Section~\ref{sec:basic:jcd}. \end{itemize} For T1 and M1-4, we select the thresholds that reach the highest F1-scores for these methods. For M2, the local region size $d^l$ is empirically chosen as $640$ meters, and the partition size $N^g$ for M3\&4 is set as $50$. \subsection{Effectiveness} \begin{table}[htpb] \caption{Experiment Results: Compared to Baselines}\label{tab:res} \begin{tabular}{l*6c} \toprule & \multicolumn{3}{c}{\textbf{Suzhou}} & \multicolumn{3}{c}{\textbf{Suzhou $\rightarrow$ Beijing}} \\ \cmidrule(lr){2-7} Methods & Prec. & Rec. & F1 & Prec. & Rec. & F1 \\ \midrule T1. Edit-Dis & 1.000 & 0.2 & 0.333 & 1.0 & 0.086 & 0.158 \\ T2. ESIM & 0.154 & 0.325 & 0.209 & 0.165 & 0.229 & 0.192 \\ T3. Sen-BERT & 0.204 & 0.449 & 0.280 & 0.229 & 0.327 & 0.269 \\ \midrule M1. Centroid & 0.765 & 0.298 & 0.429 & 0.789 & 0.236 & 0.363 \\ M2. LocCent & 0.817 & 0.431 & \underline{\textbf{0.564}} & 0.774 & 0.323 & 0.456\\ M3. KL-Div & 0.838 & 0.324 & 0.468 & 0.893 & 0.266 & 0.410 \\ M4. Jaccard & 0.806 & 0.432 & \underline{\textbf{0.562}} & 0.853 & 0.331 & \underline{\textbf{0.477}} \\ \bottomrule \end{tabular} \end{table} \subsubsection{Compare with Baselines} Table~\ref{tab:res} gives the results of baselines and our model. From the results, we can see that: \begin{itemize} \item The text-based methods get extremely poor results, which implies that the aliases are hard to guess via plain text. \item We also observe that the deep learning-based methods T2\&3 are even out-performed by the simple edit distance (T1) in Suzhou. The result tells that most aliases have neither obvious text similarity nor semantic similarity. \item The proposed mobility profile based methods M1-4, although very straightforward, can outperform the methods T1-3 by a lot. The results validate our intuition of constructing mobility profiles for the POI names. \end{itemize} \subsubsection{Cross-city Generalization Capability} Since the labeled data requires a lot of human labor and is very precious, cross-city generalization ability is important: to avoid collecting the labels in target cities, we hope the model trained on the source city to work well the target cities. To validate the generalization capability, we first learn the model with the entire dataset and labels of Suzhou. Then, the model is directly applied to Daxing District, Beijing. The results are in the right part of Table~\ref{tab:res}. We can see that, although the proposed methods especially M2\&4 still work relatively well, their cross-city F1 scores drop down by a lot compared to their results within Suzhou. In comparison, the performances of T2\&3 do not are more stable. The reason is clear: all methods except T2\&3 simply select the optimal thresholds, which may change across cities, while the deep learning methods can extract much more latent features, making the model more robust on cross-city generalization tasks. \begin{figure}[htpb] \centering \includegraphics[width=\linewidth]{figures/exp-basic} \caption{Performance of Distribution-based Methods under Different $N^g$.} \label{fig:exp-basic} \end{figure} \subsubsection{Different Resolutions for Distribution-based Method} The choice of $N^g$ in Section~\ref{sec:distr} essentially determines the resolution of the density matrix and can affect the performance. We try a variety of $N^g$'s from $20$ to $500$ and get the results in Figure~\ref{fig:exp-basic}. The Jaccard distance is more effective in both single-city and cross-city tasks compared to KL Divergence. Since KL Divergence can be affected by zero-value entries, which arises as $N^g$ increases, the performance of KL Divergence drops down. When $N^g \leq 150$, Jaccard's F1 increases by $N^g$, with F1 at $0.621$ when $N^g=150$, since higher resolution helps distinguish the subtle differences of mobility profiles between neighbor POIs. However, when $N^g>150$, Jaccard's F1 decreases, because that the mobility profiles of the standard name and its true alias may not exactly overlap and are separated into different fine-grained entries, causing low Jaccard values for true aliases. \section{Introduction}\label{sec:intro} People may refer to a place by an alias rather than the standard name. Without specific background, the aliases are hard to guess from the plain text. The alias problem is very common in many scenarios, especially in countries with poor promotion of address standardization, where people are not familiar with the Road\&Numbers or postcodes of the places. To be user-friendly, the e-commerce and logistics platforms allow the user to write delivery address in any form as long as the local package couriers can recognize it. Therefore, aliases are very commonly used in delivery addresses, bringing a substantial challenge for smart package delivery, offline marketing, and precise sales analysis, as these businesses highly rely on the consistency of address information. Taking the precise grocery sales analysis scenario as an example. Figure~\ref{fig:motivation}a shows a residential community with standard name ``XiGuYaYuan''. To get the sales volume of the community for further promotions or offline advertising, the analyst counts all sales orders with delivery addresses containing ``XiGuYaYuan'' (i.e. the \textit{Semantic Result} in Figure~\ref{fig:motivation}b). This method fails to get the actual consumption of the community, as some users prefer to write the alias, i.e. ``LangShiLvZhou'' in delivery addresses, which motivates us to discover the alias relationship so that we can get the \textit{Actual Result} in Figure~\ref{fig:motivation}b by aggregating the volumes related to the standard name and aliases. \begin{figure}[t] \centering \includegraphics[width=\linewidth]{figures/motivation.pdf} \caption{Example of Alias Problem.} \label{fig:motivation} \vspace{-10pt} \end{figure} Traditional methods rely heavily on manually labeling an alias list for each place, which requires high-quality labor (e.g. local vendors) who are familiar with the city, or taking surveys. These methods cost laborious human efforts and are inefficient. \sstitle{Intuition} With the advances of mobile computing and location-based recommendation, user GPS locations are collected when the user is browsing the app, which provides us with a unique opportunity to discover the aliases. Figure~\ref{fig:intuition} explains the intuition, where three users have the standard name of POI-A, i.e. ``POI-A'' in their address. Since people usually have more than one frequent-visiting place, it is difficult to find the geolocation of POI-A by the location data of the single User1(shown in the upper map). In comparison, when we aggregate the GPS locations of all three users, POI-A reveals: as these users tend to appear around POI-A, the place where user GPS locations are gathering should be the geolocation of POI-A(pointed out in the bottom map). \begin{figure}[htpb] \centering \includegraphics[width=\linewidth]{figures/intuition.pdf} \caption{Intuition of Mobility Profile.} \label{fig:intuition} \end{figure} Following the intuition, for the users who write the alias of POI-A, their GPS locations should also gather around the geolocation of POI-A, i.e. they have {\em similar} GPS location distribution with those who write the standard name. To this end, for each POI name(either standard name or alias) in delivery address data, we first extract the GPS locations of users whose addresses contain the POI name, namely the {\em Mobility profile} of the POI name. Then, we compare the mobility profile similarity between the standard name and candidate aliases, and the alias candidates with high similarities regarded as true aliases. The contributions are summarized as follows: \begin{itemize} \item We propose to use {\em Mobility Profile}, i.e. the GPS locations of users associated with a delivery address, to discover the POI aliases, easing the laborious POI alias labeling efforts. To the best of our knowledge, it is the first work to use user location data for POI alias discovery. \item We comprehensively design a set of methods to model the mobility profile similarity, including the distance-based similarity, and distribution-based similarity. \item We conduct comprehensive experiments on the real-world delivery address data and user location data from JD logistics in Suzhou and Beijing, China to validate the effectiveness of the proposed framework. \end{itemize} \section{Overview}\label{sec:overview} \subsection{Preliminaries}\label{sec:overview:prelim} \begin{definition}[POI Names in User Delivery Addresses]\label{def:adr} A delivery address contains the province/city/district terms, and the detailed \underline{POI name}. Each user has a list of delivery addresses. \end{definition} \begin{definition}[POI Standard Name]\label{def:stand} Each POI is associated with a standard name. We denote the standard names of all POIs in a city as $\mathcal{A} = \{a_1, a_2, \cdots, a_N\}$. \end{definition} \begin{definition}[POI Alias]\label{def:alias} Each POI alias matches a POI standard name, and they both refer to the same real-world POI. We denote the aliases as $\mathcal{A}' = \{a'_1, a'_2, \cdots, a'_M\}$. \end{definition} \noindent Both \underline{standard names} and \underline{aliases} are called \underline{POI names} in this paper. \begin{definition}[Associated User Set]\label{def:tuidx} We associate each POI name with the users who write the POI name in his delivery addresses, and we have \textit{associated user sets} $\{\mathcal{U}_1, \mathcal{U}_2, \cdots, \mathcal{U}_N\}$ for the $N$ standard names, and $\{\mathcal{U}'_1, \mathcal{U}'_2, \cdots, \mathcal{U}'_M\}$ for the $M$ aliases. \end{definition} \begin{definition}[User Location Data]\label{def:gps} Under the authorization of the user, the e-commerce apps collect users' location information when browsing the app with certain actions(e.g. seeking for recommendations). We denote the location data of user $u$ as $L(u) = \{p_1, \cdots, p_k, \cdots\}$, with $p_k$ the GPS location in latitude-longitude. \end{definition} \begin{definition}[Mobility Profile]\label{def:profile} For each POI name, we construct its mobility profile as the GPS location points of the POI name's associated users. For $a_i$ with associated users $\mathcal{U}_i$: \begin{equation} \mathcal{C}_i = \bigcup_{u_k \in \mathcal{U}_i} L(u_k). \end{equation} As a result we have $\{\mathcal{C}_1, \mathcal{C}_2, \cdots, \mathcal{C}_N\}$ and $\{\mathcal{C}'_1, \mathcal{C}'_2, \cdots, \mathcal{C}'_M\}$ w.r.t the $N$ standard names and the $M$ aliases. \end{definition} \subsection{Problem Formulation}\label{sec:probdef} Given standard names $\mathcal{A} = \{a_1, a_2, \cdots, a_N\}$ and aliases $ \mathcal{A}' = \{a'_1, a'_2, \cdots, a'_M\}$, and user location data $L(\cdot)$, the task is to infer the alias relationship matrix $\hat{\mathbf{I}} \in \mathbb{R}^{N*M}$, with entry $\hat{\mathbf{I}}[i,j] = 1$ denoting $a'_j$ is inferred as an alias of $a_i$. \section{Pre-Processing} In the real-world delivery text dataset, due to the mistypes or different writing behavior, there exist many near-duplicate versions of the same POI name/alias. As these near-duplicate aliases essentially refer to the same alias and they are quite similar to each other, putting all of them to the alias list is not only redundant but also very noisy. Moreover, the near-duplicate aliases hinder the performance of mobility profile based solution, as it introduces the \textit{sparsity problem}: Very few people could write exactly the same abnormal address, i.e. such addresses usually associate with only a few users, which causes the mobility profile under-representative. By applying the two processes above(i.e. Text Cleaning \& Iterative Clustering), the number of unique aliases is reduced by a lot. For example, in Huqiu District, Suzhou, the number of unique aliases is reduced from over $10,000$ to about only $500$. \section{Related Works}\label{sec:related} \sstitle{Toponym Matching} Toponym matching is a common GIS problem that aims to match the POI names that refer to the same place. Most of the research works investigate the string similarity measurements, e.g. \cite{tpn-match-str1} tries to find appropriate string similarities for toponym matching. There are also some works like~\cite{tpn-match-deep1} that use deep learning models for matching. These methods assume matched toponyms to be similar in text or semantics. However, the POI aliases are hard to guess from plain text. Note that research work~\cite{poi-alias} leverages the geocoding APIs of web map services to match toponym pairs with close geolocations, which essentially takes advantage of the build-in alias dictionary of the APIs, whereas our work aims to construct such an alias dictionary for the cities.
\section{Introduction} \begin{figure}[b] \centering \includegraphics[width=1.2\linewidth,trim=5cm 6.5cm 1cm 1.5cm]{Overview-Fig01.pdf} \caption{Schematics of a quantum variational (QuVa) PDE solver. a set of variational parameters $\{\bar{\lambda}\}$ is optimised by the statistical results from the QP and pre-learned data from the CP by machine learning (ML) schemes.} \label{fig:intro} \end{figure} The investigation of solving a partial differential equation (PDE) has been studied for a long time because these problems ubiquitously occur in not only physics and mathematics but also other sciences, engineering, and technologies. To solve a general nonlinear PDE is in common considered as mathematically challenging problems in classical computation when the spanning dimensions are larger. There have been recently a few tactics of how to solve complex PDEs using deep-learning techniques \cite{PDE-DeepLearn}, however, one of the fundamental issues in the classical manner is that it will not be in principle feasible to compute and to memorise the results of very large matrix multiplications in classical processing (CP). For example, in a conventional finite difference method, the adjacent function values should be calculated and recorded in a memory for a number of additions and subtractions of these values to obtain derivative values to solve the PDE while quantum processing (QP) enables to perform a large matrix multiplication at once if quantum coherence is sufficiently maintained in the QP. One of the clear advantages in the CP is that it can easily manipulate and perform the optimisation algorithms while it is even a challenging task to design a desired quantum operator, which is corresponding to the target PDE function, only by using the set of one- and two-qubit gates (see Appendix \ref{BasicQI}). To overcome the disadvantage in the QP and to enhance the advantage in the CP, a hybrid (quantum-classical) algorithm might make a synergy between the performance of CP and QP. It is still, however, an open question whether this hybrid computing could fundamentally enhance computational power beyond conventional classical computation or not although several positive efforts have been recently tackled on the problems by quantum-enhanced solvers \cite{AndrewChild, Fontanela, GaussianProc20, Gaitan20, Garcia-Ripoll}. We here demonstrate a quantum variational (QuVa) PDE solver coped with machine learning (ML) schemes to overcome a few obstacles faced at the current stage of quantum algorithms. In Fig.~\ref{fig:intro}, the whole algorithm consists of the CP and QP parts and the set of possible solutions are given by iterative CP optimisations with QPs in a variational method. For instance, a target PDE is given by ${\cal F}_{tot} \, f (\bar{x})=0$ for equation function ${\cal F}_{tot}$, solution function $ f (\bar{x})$ and dimensional variable set $\{\bar{x}\}$. The set of variational parameters $\{ \bar{\lambda}\}$ embedded in an ansatz and the information on the target PDE are set at the beginning of the CP part. In the QP part of Fig.~\ref{fig:intro} (blue), after the parameters are injected in the QP, the ansatz state $\ket{\Psi}$ in system ($S$), control ($C$) and ancillary qubits ($A$) undergoes the designed QPs. The QP enables to obtain control-qubit measurement outcomes $\langle Z \rangle_C$ and to calculate an expectation value of the total quantum operator $ \hat{\cal{O}}^{tot} $ corresponding to the total PDE function ${\cal F}_{tot}$. The index $m$ denotes the number of QPs given by $\hat{\cal{O}}^{tot} = \sum_{l=1}^{m} \hat{\cal{O}}_l$ and the total expectation value $\langle \hat{\cal{O}}^{tot} \rangle$ is computed by the collection of the QP outcomes. Since the data set of $\langle \hat{\cal{O}}^{tot} \rangle$ is fabricated by the set of the parameters, ML methods are performed to determine the best set of variational parameters $\{ \bar{\lambda}\}$ in order to reduce the computational cost given by many quantum measurements in the QP. Finally, the processes are iteratively performed until we achieve a set of solution candidates to solve the target PDE. \section{Part-1 : Theory} \subsection{Mathematical representation of PDEs} Let us present a mathematical description of our QuVa PDE solver similar to the well-known method of discretised grid representation. We first define the $j$th-order differential equations (DEs) in a one-dimensional (1D) system with continuous function $ f (x)$ given by $\left( \sum_{i=0}^{j} c_i \left({\partial \over \partial x}\right)^i \right) f (x) = 0$ for equation coefficient $c_i$ in the $j$-th order. Then, a generalised $j$th-order PDE in $n$ variable dimensions is represented by \begin{eqnarray} && \left( \sum_{k=1}^{n} \sum_{i=0}^{j} c_{i,k} \left({\partial \over \partial x_k}\right)^i \right) f (x_1,..., x_n) \nonumber \\ && ~~~~~~~~~~= {\cal F}_{\partial} (x_1,..., x_n)\, f (x_1,..., x_n) = 0.~~~~~~~ \label{Eq1} \end{eqnarray} If we include a nonlinear effect in this PDE, the nonlinear function operator ${\cal F}_{NL}$ is inserted in the PDE such as \begin{eqnarray} {\cal F}_{tot} \, f (\bar{x}) = \left( {\cal F}_\partial + {\cal F}_{NL} \right) \, f (\bar{x}) = 0, \label{F_tot} \end{eqnarray} for the variable dimension set $\{ \bar{x}\}= \{ x_1,..., x_{n}\}$ ($n$ is the dimension number). In classical simulation, one may use the method of linearlisation to solve the nonlinear PDE. Alternatively, others may numerically find the solution function by an inverse matrix method or by minimising residual value $ Res (\bar{x}) = || {\cal F}_{tot} \, f (\bar{x})||^2 \approx 0$ where $ || \cdot ||$ is called the square norm. In quantum simulation, the continuous function $f (\bar{x})$ is discretised in a normalised vector form $\ket{\psi (\bar{x})}$ and we here consider only scaled $f(\bar{x})$ in a finite domain due to the limitation of quantum state representations such as \begin{eqnarray} f(\bar{x}) \rightarrow \ket{\psi_N (\bar{x})} = \sum_{g=0}^{2^N-1} {\cal C}_{g} \ket{g}, \end{eqnarray} where $g$ is represented in either a binary or decimal representation (e.g., $g=10_{(2)} = 2_{(10)}$) and $|{\cal C}_{g}| \le 1$. The quantum system state $ \ket{\psi_N (\bar{x})}$ is made in $N$ qubits, which indicate the number of grid points in the domain. For example, we can use the coefficient ${\cal C}_{g}$ representing the function value $f(x)$ at $x= g/2^N$ in a 1D problem (e.g., in the region of $0\le x \le 1$) and the state $\ket{g}$ is its basis vector at $x= g/2^N$ to form the normalised function vector $\ket{\psi_N (x)}$ with $N$ system qubits \cite{Michael18, Joo19}. When the total PDE operator ${\cal F}_{tot}$ in Eq.~(\ref{F_tot}) is reformed in total quantum operator $\hat{{\cal O}}^{tot}$, the total PDE becomes \begin{eqnarray} \hat{{\cal O}}^{tot} \, \ket{\psi_N (\bar{x})} = \left( \hat{{\cal O}}_\partial + \hat{{\cal O}}_{NL} \right) \, \ket{\psi_N (\bar{x}) } = \ket{\vec{0}}, \label{General_Quan_PDE01} \end{eqnarray} where $\hat{{\cal O}}_\partial$ corresponds to the differential function operator ${\cal F}_\partial$ on $f(\bar{x}) $ and $\hat{{\cal O}}_{NL}$ does to ${\cal F}_{NL}$ ($\ket{\vec{0}}$: null vector). The core task in the QP is to compute the expectation value $ \bra{\psi_N (\bar{x}) } \hat{{\cal O}}^{tot} \, \ket{\psi_N (\bar{x}) }$ efficiently and the relationship between the expectation value and a residual of PDE is shown as a necessary condition of the PDE solution in Appendix \ref{Append01}. Importantly, even for large $N$, we do not need to measure all the $N$ system qubits directly, which will in general requires exponential cost, but only to preform single control-qubit measurements statistically in each QP to calculate the expectation value of the $2^N \times 2^N$ matrix $\hat{\cal O}^{tot}$ \cite{Ekert_Oi} (see details in Appendix \ref{General-expectation-calculation}). Note that the number of variational parameters are commonly different from the equation dimension $n$ because a 1D system can be investigated by several variational parameters. The following subsections describe the method of mapping the mathematical derivatives to quantum operators. \subsection{Expectation value of quantum subtractor $\hat{A}^{\dag}$ for derivative operations} We now describe how to calculate the expectation value of a specific quantum operator named a quantum subtractor $\hat{A}^{\dag}$ equivalent to operator $\hat{A}$ also known as a quantum adder operator \cite{Adder}. The quantum subtractor (adder) mimics a shifting operation on the system qubits $ \ket{\psi(x)} = \hat{A}^{\dag} \ket{\psi(x+\delta L)}$ ($ \ket{\psi(x)} = \hat{A} \ket{\psi(x-\delta L)}$) for all the values of the function vector $ \ket{\psi(x)}$ where $\delta L$ is the unit grid space. Then, it has been known that the statistics of single-qubit measurements in a control qubit brings the expectation value of the quantum operator embeded on system qubits \cite{Ekert_Oi,OxfordError-mittigation,OxfordError-mittigation2} (see the details in Appendix \ref{General-expectation-calculation}). It is mathematically true that the translation operator with $\delta L$ is given by $\hat{A}^{\dag}$ on $\ket{\psi(x)}$ is defined by \begin{eqnarray} \hat{A}^{\dag} \ket{\psi(x)} = e^{-(\delta L)\, \partial_x}\, \ket{\psi(x)} = \ket{\psi(x-\delta L)} \,. \nonumber \\ \label{eq:Translate01} \end{eqnarray} A periodic boundary condition is applied here in normalised $\ket{\psi({x})}$ implies $\ket{\psi(0)} = \ket{\psi(1)}$ for $0\le x \le 1$ because we utilise an unitary operator to describe the quantum subtractor in the domain. In fact, the ideal translation operator could be implemented beyond the finite regions in a specific physical system as a non-unitary gate (e.g., a photon shift operation \cite{My-amp-paper}). \subsubsection{The 1st and 2nd derivative quantum operators} To calculate the expectation value of the quantum derivative operators, we adopt the concept of the finite difference method to represent quantum operators. More precisely, one can define the second derivative quantum operator given by \begin{eqnarray} \hat{\cal O}_{\partial^2} = {1 \over (\delta L)^2} \left( \hat{A} + \hat{A}^{\dag} -2 \hat{I} \right), \label{eq:2ndDerivative01} \end{eqnarray} since the second-order (2O) differential form is approximately given by \begin{eqnarray} {\partial^2 \over \partial x^2} \ket{\psi(x)} && \, \approx {1 \over (\delta L)^2} \left( \hat{A} + \hat{A}^{\dag} -2 \hat{I} \right) \ket{\psi(x)} = \hat{\cal O}_{\partial^2} \ket{\psi(x)}, \nonumber \\ \label{eq:2ndDerivative02} \end{eqnarray} where $\hat{I}$ is an identity operator. Similarly, the first derivative form is defined by \begin{eqnarray} {\partial \over \partial x} \ket{\psi(x)} &&\, \approx {1 \over \delta L} \Big( { \hat{I} - \hat{A}^{\dag}} \Big) \ket{\psi(x)} = \hat{\cal O}_{\partial^1} \ket{\psi(x)}, \label{eq:1stDerivative02} \end{eqnarray} with the first-order derivative quantum operator \begin{eqnarray} \hat{\cal O}_{\partial^1} ={1 \over \delta L} \Big( { \hat{I} - \hat{A}^{\dag}} \Big) \, . \label{eq:1stDerivative01} \end{eqnarray} For example, if a typical 2O DE with function $f (x)$ is represented by \begin{eqnarray} \left( \kappa_2 {\partial^2 \over \partial x^2} + \kappa_1 {\partial \over \partial x} + \kappa_0 \right) f (x) =0, \label{eq:2-order-PDE01} \end{eqnarray} for constants $\kappa_j$ ($j=0,1,2$), its discretised version is given by \begin{eqnarray} \hat{\cal O}_{\partial} \ket{\psi(x)} &=& \left( \kappa_2 \hat{\cal O}_{\partial^2}+ \kappa_1 \hat{\cal O}_{\partial^1} + \kappa_0 \hat{I} \right) \ket{\psi(x)} = \ket{\vec{0}}.~~~~~~~ \label{eq:2-order-PDE02} \end{eqnarray} \subsubsection{Expectation values of the derivative quantum operators} For a 1D system, we calculate the expectation value of the first derivative operator $\hat{\cal O}_{\partial^1}$ and the second one $\hat{\cal O}_{\partial^2}$ \begin{eqnarray} \langle \hat{\cal O}_{\partial^1} \rangle && \approx { 1 \over \delta L} \Big( 1 - \Re \left[\left< \hat{A}^{\dag} \right> \right] - \Im \left[\left< \hat{A}^{\dag} \right> \right] \Big), \label{eq:Expect01} \\ \langle \hat{\cal O}_{\partial^2} \rangle && \approx {2 \over \, (\delta L)^2} \left( \Re\left[\left< \hat{A}^{\dag} \right> \right] - 1 \right), \label{eq:Expect02} \end{eqnarray} where $\Im \left[ \, \right] $ and $\Re \left[ \, \right] $ are the imaginary and real part of the expectation value. Thus, a general form of 2O DEs is given with $\hat{\cal O}_{\partial} = \kappa_2 \hat{\cal O}_{\partial^2} + \kappa_1 \hat{\cal O}_{\partial^1} + \kappa_0 \hat{I}$ and its expectation value is given by \begin{eqnarray} \langle \hat{\cal O}_{\partial} \rangle && = \left( {2 \, \kappa_2 \over \, (\delta L)^2} - { \kappa_1 \over \delta L} \right) \, \Re\left[\left< \hat{A}^{\dag} \right> \right] \nonumber \\ &&~~~ - { \kappa_1 \over \delta L} \, \Im \left[\left< \hat{A}^{\dag} \right> \right] + \kappa_0 + { \kappa_1 \over \delta L} - {2 \, \kappa_2 \over \, (\delta L)^2} . \label{eq:Expect03} \end{eqnarray} In general, the higher-order derivatives are feasible in a similar approach using multiplying quantum adder and subtractor operators and it could be fit to the research area of relativistic quantum mechanics with high-order momentum operators. \subsection{Higher-dimensional PDE} For a multi-dimensional system, we expand the concept of the expectation values with multi-dimenson set $\{\bar{x}\}$ such as $\langle \hat{\cal O}_{\partial} (\bar{x}) \rangle$. As an example in a 2D system, the first- and second-order derivative operators are given by \begin{eqnarray} \hat{\cal O}_{\partial^2} (\bar{x}) && = \hat{\cal O}_{\partial^2} (x) \otimes \hat{I} (y) + \hat{I}(x) \otimes \hat{\cal O}_{\partial^2} (y) , \label{eq:2DLaplace01} \\ \hat{\cal O}_{\partial^1} (\bar{x}) && = \hat{\cal O}_{\partial^1} (x) \otimes \hat{I} (y) + \hat{I}(x) \otimes \hat{\cal O}_{\partial^1} (y) , \label{eq:2DLaplace02} \end{eqnarray} where $\delta x = \delta y = \delta L$ for ${\partial^2 / \partial x^2} + {\partial^2 / \partial y^2} \approx \hat{\cal O}_{\partial^2} (x,y)$ and ${\partial / \partial x} + {\partial / \partial y} \approx \hat{\cal O}_{\partial^1} (x,y)$ for $\{\bar{x}\} = \{x,y\}$. Thus, if we focus on the separation of variables in separable ansatz state $\ket{\Psi(\bar{x})} = \ket{\psi(x)} \otimes \ket{\phi(y)}$, the total expectation value for $\ket{\Psi(\bar{x})} $ is given by \begin{eqnarray} \langle \hat{\cal O}_{\partial} (\bar{x}) \rangle &&= \langle \hat{\cal O}_{\partial} (x) \rangle + \langle \hat{\cal O}_{\partial} (y) \rangle \nonumber \\ && = \sum_{j=x,y} \langle \kappa_{j2} \, \hat{\cal O}_{\partial^2} (j)\, + \kappa_{j1} \, \hat{\cal O}_{\partial^1} (j) \, + \kappa_{j0} \, \hat{I} \rangle,~~~~~~ \label{eq:2DExpect02} \end{eqnarray} in order to solve 2O PDEs. Thus, we enable to find the expectation values for each term independently and to add all together after the QP part. We will give more concrete examples in different 1D DEs and discuss the details of how to deal with the nonilnear and other operators in the following section. \section{Part-2: Differential equations in a 1D system} It is very crucial to choose an ansatz state in variational methods because it describes a trial function with a set of variational parameters $\{\bar{\lambda}\}$ in $N$ qubits $\ket{\psi^d_N (\bar{\lambda})}$ also called an ansatz system state with depth $d$ (see Appendix \ref{N-qubit ansatz states}). Ref.~\cite{Garcia-Ripoll} proposed a few types of ansatz states and we chose a real-value ansatz state with $\hat{R}^Y$ gates for ansatz states $\ket{\psi^{d}_N (x)}$, which implies that all the elements can cover positive and negative real values for real-value function $f(x)$. Note that $d$ represents the depth of quantum circuits to create the system state with $N$ qubits. This ansatz approach is commonly utilised as one of the excellent candidates to represent states for quantum chemistry in superconducting circuits \cite{IBM_QuanChem} and trapped ions \cite{Trap-ion}. \subsection{Simple 1D DEs with ${\kappa}_2 = 1$} Let us first fix ${\kappa}_2 = 1$ and ${\kappa}_1 = 0$ for the simplest DEs in Eq.~(\ref{eq:2-order-PDE01}) and this equation is called the Helmholtz equation given by $ \left( \partial^2 / \partial x^2 + \kappa_0 \right) \, f (x) = 0$. We consider that $ f (x)$ and $\ket{\psi^d_N (x)}$ are periodic real functions with an end-point restriction (e.g., $f (0) = f (1)$ and $\ket{\psi^d_N (0)} = \ket{\psi^d_N (1)}$). For the ansatz state $\ket{\psi^d_N (x)}$, the expectation value of the derivative operator $ \hat{\cal O}_{\partial} $ is simplified by \begin{eqnarray} \langle \hat{\cal O}_{\partial} \rangle &&= {2 \, \over \, (\delta L)^2} \, \Re \big[ \langle \hat{A}^{\dag} \rangle \big] + \kappa_0 - {2 \over \, (\delta L)^2} ,~~~ \label{eq:Expect04} \end{eqnarray} and we only need to calculate $\Re \big[ \langle \hat{A}^{\dag} \rangle \big]$ produced by measuring the control qubit statistically in the QP. For given $\kappa_0$ and $\delta L$, the statistical data of the control qubit measurement shows the landscape of $\Re \left[ \langle \hat{A}^{\dag} \rangle \right] $ with respect to the parameter set $\{\bar{\lambda}\}$. For a 2O DE given in Eq.~(\ref{eq:Expect03}), the total expectation value with $\kappa_2=1$ is similarly given by \begin{eqnarray} \langle \hat{\cal O}_{\partial} \rangle && = {1 \over \delta L} \left( {2 \over \delta L} - { \kappa_1} \right) \,\Re \big[ \langle \hat{A}^{\dag} \rangle \big] + \kappa_0 + { \kappa_1 \over \delta L} - {2 \over \, (\delta L)^2} .~~~~~~ \label{eq:Expect05} \end{eqnarray} Note that $ \Im \big[ \langle \hat{A}^{\dag} \rangle \big]$ vanished due to real-value ansatz $\ket{\psi^d_N (x)}$ and real number elements in $\hat{A}^{\dag}$. From Eq.~(\ref{eq:Expect05}), it shows that $\kappa_1$ and $\delta L$ change the scale of $ \langle \hat{A}^{\dag} \rangle $ and the rest part makes a shift of the landscape $\langle \hat{\cal O}_{\partial} \rangle$. Therefore, the case of this linear 2O DE requires the expectation value of $\hat{A}^{\dag}$ with fixed $\kappa_0$, $\kappa_1$ and $\delta L$ in the algorithm. \subsection{Generalised second-order nonlinear DEs} There are a variety of the nonlinear function operator ${\cal F}_{NL}$ in Eq.~(\ref{F_tot}), which could be represented by its quantum operator $\hat{\cal O}_{NL}$ once one finds how to implement it in quantum circuits. One of the well-known nonlinear operators is a self-interaction nonlinear term ${\cal F}_{NL} = \kappa_n | f ({x})|^2$ with nonlinearity strength $\kappa_n$ in Gross-Pitaevskii (GP) equation and is inspired by the quantum phenomena in Bose-Einstein condensation \cite{GP-equation}. Then, a generalised 2O nonlinear DE with ${\kappa}_2 = 1$ is written with general potential $V(x)$ by \begin{eqnarray} \left( {\partial^2 \over \partial x^2} \, + {\kappa}_1 {\partial \over \partial x} + \kappa_0 + V(x) + \kappa_{n} \left| f (x)\right|^2 \right) f (x) = 0 \, .~~~~~ \label{eq:2NDE02} \end{eqnarray} Let us first consider the expectation value of this nonlinear DE with $\ket{\psi^d_N (x)}$ given by \begin{eqnarray} \langle \hat{\cal O}^{tot} \, \rangle = \bra{\psi^d_N (x)} \left( \hat{\cal O}_{\partial} + \hat{\cal O}_{NL} \right) \ket{\psi^d_N (x)} , \label{eq:2-order-PDE06} \end{eqnarray} where $ \hat{\cal O}_{NL} = \hat{\cal V} + {\kappa}_{n} \, \hat{\rho}_D $ for potential part $\hat{\cal V} = \sum_{g=0}^{2^N-1} V_{g} \, \ket{g}\bra{g}$ and GP-type interaction $\hat{\rho}_D = \sum_{g =0}^{2^N-1} \left| {\cal C}^d_g \right|^2 \ket{g} \bra{g} $. Note that $V_g$ indicates the height of the potential at $x=g/2^N$. Thus, $\hat{\cal O}_{NL}$ is explicitly represented by the diagonal matrix \begin{eqnarray} \hat{\cal O}_{NL} = \sum_{g=0}^{2^N-1} \left( V_{g} +{\kappa}_{n} \left| {\cal C}^d_g \right|^2 \right) \ket{g}\bra{g}, \label{eq:F_N} \end{eqnarray} and then the expectation value of $\hat{\cal O}_{NL}$ with $\ket{\psi^d_N (x)}$ is written by \begin{eqnarray} \langle \hat{\cal O}_{NL} \rangle &&= \langle \hat{\cal V} \rangle + {\kappa}_{n} \langle \hat{\rho}_D \rangle \nonumber \\ &&= \sum_{g =0}^{2^N-1} V_{g} \left| {\cal C}^d_g \right|^2 + {\kappa}_{n} \sum_{g =0}^{2^N-1} \left| {\cal C}^d_g \right|^4. \label{eq:Expect-F_N} \end{eqnarray} Note that it is generally difficult to compute the second (nonlinear) term if we do not deal with all the elements of $\ket{\psi^d_N (x)}$ but do with the set of variational parameters. It is important to notify that the forms of $\hat{\cal V}$ and $\hat{\rho}_D$ are a $2^N \times 2^N$ diagonal matrices and can be represented by mixed states (e.g., $\hat{\rho}^{\chi}$ in Fig.~\ref{fig:03}(a)). Thus, we enable to build the expectation value calculator to obtain $\langle \hat{\cal V} \rangle$ and $\langle \hat{\cal \rho}_D \rangle$ through a controlled-SWAP quantum circuit (see details in Appendix \ref{General-expectation-calculation} and \ref{Overlap_fidelity}). Based on Eqs.~(\ref{eq:Expect05}) and (\ref{eq:Expect-F_N}), the total expectation value is given by \begin{eqnarray} \langle \hat{\cal O}^{tot} \, \rangle &=& {1 \over \delta L} \left( {2 \over \delta L} - { \kappa_1} \right) \,\Re \big[ \langle \hat{A}^{\dag} \rangle \big] + \langle \hat{\cal V} \rangle \nonumber \\ && + {\kappa}_{n} \langle \hat{\rho}_D \rangle + \kappa_0 + { \kappa_1 \over \delta L} - {2 \over \, (\delta L)^2} . \label{eq:Genreal_total_O} \end{eqnarray} We would like to emphasise that it is also feasible to investigate beyond the GP-type nonlinear term if we create the copies of the system state and extra controlled unitary gates in the QP \cite{Joo19}. \begin{figure}[b] \centering \includegraphics[width=0.95\linewidth,trim=2cm 8cm 2cm 0cm]{Mixed-Approach-v8.pdf} \caption{ Two equivalent quantum circuits for calculating the expectation value of $\hat{\rho}^{\chi}$ using a block-SWAP gate. (a) the desired mixed state $\hat{\rho}^{\chi}= \sum_g \chi_g \ket{g}\bra{g}$ is injected in $B$ while the mixed state $\hat{\rho}^{\chi}$ can be also made from pure state $\ket{\chi} = \sum_g \sqrt{\chi_g} \ket{g}$ prepared in $S_2$ if ancillary qubits are used through the artificial decoherence mechanism in (b). } \label{fig:03} \end{figure} \subsection{How to optimise the set of parameters with ML} Gaussian process regression (GPR) is a non-parametric Bayesian regression method. It is well known for providing reliable uncertainty estimates of a regression target. The uncertainty estimates can be used to design sample efficient optimisation algorithms, called Bayesian optimisation and root-finding algorithms as well~\cite{Bect12,Bichon}. A recent study shows that Gaussian process can be efficiently used to find a many-body entangled state as a ground state \cite{GaussianProc20}. In our method, GPR is used for sequentially collecting data, whereas Ref.~\cite{GaussianProc20} focuses on a new representation of the Gaussian process and its states. The goal of our QuVa PDE solver is to find candidates $\lbrace \bar{\lambda} \rbrace$ that makes $\langle \hat{Q}^{tot} \rangle$ close to 0, which is essentially a multi-dimensional root-finding problem. First, we set up the initial variational parameter set $\{ \bar{\lambda}\}$ randomly with fixed input parameters ($d$, $\kappa_2$, $\kappa_1$, $\kappa_0$, $V_g$ and $\kappa_n$) in the CP. Second, we iteratively obtain the the expectation values ($\langle \hat{A}^{\dag} \rangle$, $\langle \hat{\rho}^{\chi} \rangle$ and $\langle \hat{\rho}_D \rangle$) from the QPs and calculate $ \langle \hat{\cal O}^{tot} \rangle$ for each $ \ket{\psi^d_N (x)}$ given by the variational set in depth $d$. From the individual outcomes of $ \langle \hat{\cal O}^{tot}\rangle$, we then estimate the best next parameters $\{ \bar{\lambda}\}$, which maximises the acquisition function for the root-finding problem. The acquisition function evaluates the value of measuring $\langle \hat{O}^{tot} \rangle$ at given $\{ \bar{\lambda}\}$. There are two factors that makes the acquisition value high at the given $\{ \bar{\lambda}\}$. The first factor is when the GPR model estimates $\langle \hat{O}^{tot} \rangle$ close to zero, and the other factor is when the uncertainty estimate from the GPR model is high. The two factors has an exploration-exploitation trade-off, and the acquisition function balances the two factors \cite{Bect12,Bichon}. \section{Part-3: Demonstration for 1D nonlinear DE} \subsection{Expectation values with $ \ket{\psi^d_3 (x)}$} We demonstrate three examples of how to obtain the solution candidate sets of DEs using a three-qubit system state. For example, eight point values of function $f(x)$ for $0\le x \le 1$ can be represented in the system qubits \begin{eqnarray} f(x) \approx \ket{\psi_3 (x)} && = \sum_{g=0}^{7} {\cal C}_{g}\, \ket{g}. \end{eqnarray} It implies that the coefficient ${\cal C}_{000}$ represents the function value $f(x=0)$, ${\cal C}_{001}$ does $f(x=1/8)$, ${\cal C}_{010}$ does $f(x=1/4)$ and so on until ${\cal C}_{111}$ does $f(x=7/8)$ while we keep a periodic boundary condition such as $f(0) = f(1)$. As shown in Appendix \ref{N-qubit ansatz states}, the variational ansatz $\ket{\psi^d_3 (x)}$ with depth $d$ contains 8 function values with a specific parameter set $\{d, \bar{\lambda} \}$ and is written by \begin{eqnarray} \ket{\psi^d_3 (x)} && = \ket{\psi^d_3 (\bar{\lambda})} = \sum_{g =0}^{7} {\cal C}^d_g (\bar{\lambda}) \ket{g} = \sum_{jkl =0}^{1} {\cal C}^d_{jkl} (\bar{\lambda})\, \ket{j\, k\, l}, \nonumber \\ && \label{eq:Sol_01} \end{eqnarray} where fixed $g$ represents fixed location $x$ and ${\cal C}^d_{g}$ with fixed $\bar{\lambda}$ does the function value $f(x)$ at $x=g/8$. Based on Eq.~(\ref{eq:Expect04}) with $\delta L=1/(2^3) = 1/8$, the expectation value of the Helmholtz operator becomes \begin{eqnarray} \langle \hat{\cal O}^{tot} (\bar{\lambda}) \rangle = 128 \, \Re \left[ \langle \hat{A}^{\dag} \rangle \right] + (\kappa_0 - 128), \label{eq:Helm01} \end{eqnarray} and the solution condidate set is achieved by the ansatz states under the condition of $\langle \hat{\cal O}^{tot} (\bar{\lambda}) \rangle \approx 0$ from the data of $\Re \left[ \langle \hat{A}^{\dag} \rangle \right] $. Similarly, the expectation value of the 2O DE in Eq.~(\ref{eq:Expect05}) is equal to \begin{eqnarray} \langle \hat{\cal O}^{tot} (\bar{\lambda}) \rangle = {8} \left( {16} - { \kappa_1} \right) \, \Re \left[ \langle \hat{A}^{\dag} \rangle \right] + \left( \kappa_0 + { 8 \, \kappa_1 } - 128 \right). \nonumber \\ \label{eq:Helm02} \end{eqnarray} For the condition of $\kappa_2 = 1$ and $\kappa_1 = 16$, it is very unlikely to be solved using the three-qubit ansatz states because $\langle \hat{\cal O}^{tot} \rangle$ is then independent from $ \langle \hat{A}^{\dag} \rangle $. Thus, for this DE with $\kappa_1 \approx 16$, we need more system qubits due to the condition of $\kappa_1 \approx 2 \kappa_2 / \delta L$ in Eq.~(\ref{eq:Expect03}). For the generalised 2O DE, we assume a potential operator $\hat{\cal V}$ as a harmonic potential, which is proportional to $V_{max} (1-2x)^2$ with maximum height $V_{max}$ at $x=0,1$. Then, the potential operator for three qubits is given by \begin{eqnarray} \hat{\cal V} && = \sum_{g=0}^7 V_g \ket{g} \bra{g} = {4\,V_{max}\over 11} \sum_{g=0}^7 \left(1- {g\over 4} \right)^2 \ket{g} \bra{g}, \label{eq:Potential01} \end{eqnarray} where $x=g/8$ and the maximum potential height $V_{max}$. In Fig.~\ref{fig:03}(a), the desired mixed state $\hat{\rho}^{\chi}$ might be directly built in $A$ such as $\hat{\rho}^{\chi} = {\hat{\cal V} / V_{max}} $. If we put $\ket{\psi^d_3 (x)}$ in system mode $S$ and $\hat{\rho}^{\chi}$ in $A$, the expectation value of the potential operator is represented by \begin{eqnarray} \langle \hat{\cal V} \rangle && = V_{max} \langle \hat{\rho}^{\chi} \rangle. \label{eq:Potential03} \end{eqnarray} As shown in Fig.~\ref{fig:03}(b), the operator $\hat{\cal{V}}$ is alternatively implemented by the specific three-qubit state given by \begin{eqnarray} \ket{\chi_3}_{A1} = {1 \over 2\sqrt{11}} && \Big( 4 \ket{000} + 3 \ket{001} + 2 \ket{010} \nonumber \\ && + \ket{011} + \ket{101} + 2 \ket{110}+ 3 \ket{111} \Big),~~~~ \label{eq:Potential02} \end{eqnarray} by using a quantum circuit through the artificial decoherence (see details in Appendix \ref{Arti-decoh}). For the nonlinear part, if we prepare $\ket{\psi^d_3 (x)}$ in both modes ($S$ and $A1$) in Fig.~\ref{fig:03}(b), the state in mode $A1$ turns into the mixed state given by $\hat{\rho}_D =\sum_{g=0}^7 |{\cal C}^d_g|^2 \ket{g}\bra{g}$, and the expectation value is given by \begin{eqnarray} \langle \hat{\rho}_D \rangle && = \sum_{g=0}^7 \left| {\cal C}^d_g \right|^4. \label{eq:NL01} \end{eqnarray} Therefore, the three expectation values ($\langle \hat{A}^{\dag} \rangle$, $\langle \hat{\rho}^{\chi} \rangle$ and $\langle \hat{\rho}_D \rangle$) are individually calculated through the QPs and the total expectation value with a three-qubit system is given by \begin{eqnarray} \langle \hat{\cal O}^{tot} (\bar{\lambda}) \rangle &=& 8 \left( 16 - \kappa_1 \right) \, \Re \left[ \langle \hat{A}^{\dag} \rangle \right] \nonumber \\ && + \left( \kappa_0 + 8 \kappa_1 - 128 \right) + V_{max} \langle \hat{\rho}^{\chi} \rangle + {\kappa}_{n} \langle \hat{\rho}_D \rangle, \nonumber \\ && \label{eq:Demon01} \end{eqnarray} for the nonlinear strength ${\kappa}_{n}$. { \begin{widetext} \begin{figure}[t] \centering \includegraphics[width=0.45\linewidth,trim=1cm 0cm 0cm 0cm]{FigAnalyK1M1K08.png} \includegraphics[width=0.48\linewidth,trim=0cm 0cm 1cm 0cm]{FigNormalK1M1K08.png} \includegraphics[width=0.45\linewidth,trim=1cm 0cm 0cm 0cm]{AnalyFigK1eq3K0eq25Vmax32.png} \includegraphics[width=0.48\linewidth,trim=0cm 0cm 1cm 0cm]{FigNormalK13K025Poten.png} \includegraphics[width=0.45\linewidth,trim=1cm 0cm 0cm 0cm]{Fig14040Kn500.png} \includegraphics[width=0.48\linewidth,trim=0cm 0cm 1cm 0cm]{FigNormalNLKn500.png} \caption{Analytic and ML solutions for 1D 2O DE. The DE parameters are $\{ \kappa_2, \kappa_1,\kappa_0, V_{max}\} = \{1, -1, 8, 0 \}$ (top), $\{1, 3,25, 32\}$ (middle) and $\{1, 1, 40, 40\}$ with $\kappa_n = 500$ (bottom). Analytic solutions are depicted depending on the initial function value $f(0)$ in $0\le x \le 1$ with a periodic boundary condition $f(0)=f(1)$. To compare with discretised quantum solutions, the solid lines are given as normalised functions with 8 points based on the analytical solutions.On the right side, the best ML-aid solutions in red dashed lines approximately gives fidelity 0.92 with $\ket{\psi^2_3 (x)}$ ($p_c = 4$), 0.91 with $\ket{\psi^3_3 (x)}$ ($p_c=2$) and 0.88 with $\ket{\psi^1_3 (x)}$ ($p_c = 0.2$) from the green-solid solution functions. } \label{fig:2ODE} \end{figure} \end{widetext} } \subsection{ML-aided results} Finally, we demonstrate ML-aided solutions for a few different DEs given by the QuVa algorithm in Fig.~\ref{fig:intro}. The coefficients of the target DEs are given by $\kappa_j$ ($j=0,1,2$) and a number of system qubits is three with six variational parameters. Initially, we randomly choose 600 sets of the variational parameters $\{ \bar{\lambda} \}$ in the CP and put them into the QP to extract expectation value data $\langle \hat{\cal O}^{tot} \rangle$ for each DE and each depth. Then, a rough landscape of the total expectation value is plotted with respect to six parameters individually. Afterwards, we perform the regression and optimisation schemes to select the next best variational parameters to refine the landscape of $\langle \hat{\cal O}^{tot} \rangle$. With updating the set of ML parameters in the middle of the iterations over the next 600 additional runs for each depth, the solution candidate functions are carefully chosen by $\langle \hat{\cal O}^{tot} \rangle \le p_c$, which is a small value for each depth. As we discussed in Appendix \ref{Append01}, the results of the total expectation values are used for confirming the necessary condition to be the solutions of the target PDEs. We here show that the condidate sets with a three-qubit system successfully follow the pattern of analytical solutions of different DEs over 1200 data for each depth. In Fig.~\ref{fig:2ODE}, we plot analytic solutions from 2O DE in 1D and ML-aid solutions from our QuVa PDE solver. In the left side of Fig.~\ref{fig:2ODE}, it shows analytical solution functions with $\{ \kappa_2, \kappa_1,\kappa_0, V_{max}\} = \{1, -1, 8, 0 \}$ (top), $\{1, 3,25, 32\}$ (middle) and $\{1, 1, 40, 40\}$ with $\kappa_n = 500$ (bottom) and the boundary condition is $f(0)=f(1)$. Since the analytical solutions are in general not normalised, we simply find the function points $f(x_j)$ with $x_j=j/8$ ($j=0,1,2,...7$) and a normalisation condition is applied by $\sum_{j=0}^{7} |f(x_j)|^2 = 1$ corresponding to a discretised and normalised function. At the top of Fig.~\ref{fig:2ODE}, it turns out that the analytical solution functions of the no-potential 2O DE with different values of $f(0)>0$ (solid lines on the top left of Fig.~\ref{fig:2ODE}) become a single discretised function with the normalisation condition as shown in a blue curve at the top right side of Fig.~\ref{fig:2ODE} and the similar behaviours occur for $f(0)<0$ in the green curve of the top right of Fig.~\ref{fig:2ODE}. Interestingly, we see the tendency that reflected curves along the $x$-axis in the solutions between blue and green ones. For this simple 2O DE, the red dashed line shows one of ML-aid solver results in $\ket{\psi^2_3 (x)}$ with $\langle \hat{\cal O}^{tot} \rangle \le p_c=4$ from Eq.~(\ref{eq:Helm02}) and it approximately gives fidelity 0.92 with the discretised function with $f(0)<0$ (green solid line on the top right of Fig.~\ref{fig:2ODE}). For system ansatzs $\ket{\psi^d_3 (x)}$, a pattern of the solution function with $f(0)>0$ was not found in $\ket{\psi^d_3 (x)}$ ($d \le 3$) with high fidelity over 1200 data. It implies that it is difficult to predetermine the coefficient ${\cal C}_{000}$ corresponding to $f(0)$ in the variational ansatz. In the middle of Fig.~\ref{fig:2ODE}, the figures are depicted with harmonic potential term $V(x)$ and $\{ \kappa_2, \kappa_1,\kappa_0, V_{max} \} = \{1, 3,25, 32 \}$. For the potential case, the left side of the figures are shown with different $f(0)$ and a significant dip is shown in the middle of the analytical curves due to the effect of the harmonic potential centred at $x=1/2$ with $V_{max} = 32$ in the region of $0\le x \le 1$. For its discretised version on the right side, it shows that the fidelity is roughly 0.91 between $\ket{\psi^3_3}$ in the red dashed line and $f(x)$ with $f(0) = -0.19$ in the green solid one ($p_c = 2$). For the nonlinear case, the similar methods are applied with $\{ \kappa_2, \kappa_1,\kappa_0, V_{max}, \kappa_n \} = \{1, 1, 40, 40, 500\}$. The analytical curves show a rapid oscillation on the bottom left of Fig.~\ref{fig:2ODE} and its large nonlinearity brings a sensitive result depending on the value of $f(0)$. For fidelity, the bottom right curves show the fidelity approximately 0.88 between the ML-aid solution curve $\ket{\psi^1_3}$ and the discretised function with $f(0) = 0.54$ ($p_c = 0.2$). In general, the similar function patterns appear in different depths with large nonlinearity but it is highly limited to chase the rapid oscillating solutions with nine-point functions. \section{Summary and further discussions} In summary, we have described a ML-aided quantum variational (QuVa) solver for PDEs. It aims to provide a selected set of solution candidates to solve generalised PDEs. The main idea is that the expectation values of quantum operators give enough information about the solution functions of the target PDEs. The results are extracted from the data of measuring a few controlled qubits in the QPs with the support of ML techniques in the CP. We also demonstrated three examples of this solver for 1D 2O DE with a three-qubit ansatz and the fidelity is shown as higher than 0.88. One of the key advantages in this algorithm, we can recycle the expectation value data (e.g., $ \langle \hat{A}^{\dag} \rangle $ and $ \langle \hat{\rho} \rangle$) to find solutions of PDEs with different $\kappa_j$ because the landscapes of expectation values are independent from the PDE parameters. For some nonlinear PDEs, the separation of variables may not be applicable \cite{NonPDE}. For instance, an entangled ansatz state in 2D will be considered as $\ket{\Psi(x,y)} \ne \ket{\psi(x)} \otimes \ket{\phi(y)}$ in the QuVa method. In this case, we can keep utilising a generalised entangled ansatz $\ket{\Psi(x,y)}$ for Eqs.~(\ref{eq:2DLaplace01}) and (\ref{eq:2DLaplace02}) and additional conditional SWAP gates could be utilised for obtaining the expectation value $\bra{\Psi} \hat{\cal O}_{\partial^2} (x,y) \ket{\Psi}$ with highly entangled ansatzs in the QPs instead of using Eq.~(\ref{eq:2DExpect02}). In addition, there are many interesting nonlinear PDE problems in relativistic quantum dynamics and cosmology (e.g., Schr\"odinger-Newton equations \cite{Diosi84, Penrose2014,Howl}) that can be examined in the QuVa PDE solver. Although the QuVa solver is designed to solve a general PDE form, we would like to mention a few obstacles to solve some target PDEs in the current QuVa approach. From Eq.~(\ref{eq:Genreal_total_O}), this solver approach shows the limitation of finding a good solution to be $\langle \hat{O}^{tot} \rangle \approx 0$ because the range of expectation values are always $-1 \le \langle\hat{ A}^{\dag}\rangle , \, \langle \hat{\cal V} \rangle, \, \langle \hat{\rho}_D \rangle \le 1$. For example, in the simple 2O DE with $\langle \hat{\cal V} \rangle = \langle \hat{\rho}_D \rangle = 0$, the total expectation value $\langle \hat{\cal O}^{tot} \, \rangle$ is limited between $\kappa_0$ and $\kappa_0 - {2 \over \delta L} \left( {2 \over \delta L} - { \kappa_1} \right) $. Thus, this approach may not provide an appropriate solution if $\kappa_0 < 0$ and $\kappa_1 \le {2\over \delta L}$ although the ML schemes will provide candidates wtih a minimum of $\langle \hat{\cal O}^{tot} \, \rangle$. There are several interesting open questions beyond the scope of this paper based on the venue of computer sciences. We artificially fixed some crucial factors in the three-qubit demonstration (e.g.,how to choose the value of $p_c$ and what could be the optimal number of variational parameters and of the size of the initial data set in the QuVa solver). Thus, these investigations can guide us to prove the efficiency of the algorithm in the future. In addition, it will be important to study how to utilise the solution information of pre-learned data with the $N$-qubit system to investigate the solution of the other PDEs with a larger qubit system. \section*{Acknowledgements} This work is supported by Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education, Science and Technology (NRF-2021M3H3A1038085). JJ would like to acknowledge J. Huh and D. K. Park for useful comments and discussions.
\section{Introduction} This paper is motivated by the following question. \begin{qu}\label{q:main} Let $W$ be a closed smooth $n$-manifold and $W'$ a manifold which is homeomorphic but not diffeomorphic to $W$. To what extent does $W'$ support the same symmetries as $W$? If a Lie group $G$ acts on $W$, does $G$ also act on $W'$? How does the answer depend on the choice $W'$? \end{qu} Question \ref{q:main} is difficult in general, so it's reasonable to focus on particular classes of manifolds. When $W=S^n$, several structural results are known by the work of Hsiang--Hsiang \cite{hsiang,hsiang-hsiang}. For example, the standard smooth structure on $S^n$ is characterized as the unique smooth structure with a faithful action of $\SO(n+1)$. The current paper seeks to address Question \ref{q:main} when $W$ is either the $n$-dimensional torus $T^n$ or a hyperbolic $n$-manifold and $W'=W\#\Sigma$ for some exotic sphere $\Sigma$. \subsection*{Conventions} All manifolds are oriented. All actions preserve the orientation, unless stated otherwise. For the remainder of the paper, $G$ will denote a finite group. Throughout, we use $\Sigma$ to denote an exotic $n$-sphere, that is, a manifold which is homeomorphic but not diffeomorphic to the $n$-sphere $S^n$. We denote by $\Theta_n$ the group of homotopy $n$-spheres \cite{kervaire-milnor}. Note that every nontrivial element in $\Theta_n$ can be represented by an exotic $n$-sphere, as long as $n\geq 5$. The topological groups $\mathrm{Homeo}(X)$ and $\Diff(X)$ of homeomorphisms and diffeomorphisms of a compact smooth manifold $X$ are understood to be equipped with the compact-open and $C^{\infty}$-topology respectively. \subsection{Classifying actions on $W\#\Sigma$} Our first results classify (fixed-point) free actions $G\curvearrowright W\#\Sigma$ in certain cases. To state the classification, we introduce the notion of a \emph{standard action} $G\curvearrowright W\#\Sigma$ when $W$ is a smooth manifold. \subsection*{Standard actions} Assume $W$ is a compact smooth manifold, and fix a group $G<\Diff^+(W)$ of orientation-preserving diffeomorphisms. For any exotic sphere $\widehat\Sigma$, there is a smooth action of $G$ on $W\#\widehat\Sigma\#\cdots\#\widehat\Sigma$ obtained by performing the connected sum of $|G|$ copies of $\widehat\Sigma$ equivariantly along the $G$-orbit of a point in $W$ with trivial stabilizer. See Figure \ref{fig:standard-action}. We call an action $G\curvearrowright W\#\Sigma$ \emph{standard} if it is isomorphic (in the category of smooth oriented $G$-manifolds) to this construction. \begin{mainthm}[Actions on exotic $n$-tori]\label{thm:tori} Let $T^n=(S^1)^n$ denote the $n$-torus ($n\geq 5$), and let $\Sigma$ be an exotic $n$-sphere. Then any free action of a finite cyclic group on $T^n\#\Sigma$ is standard. \end{mainthm} By a similar approach we can also prove the following result for actions on $M\#\Sigma$ when $M$ is a $7$-dimensional hyperbolic manifold. \begin{thm}[Actions on exotic hyperbolic $7$-manifolds]\label{thm:hyperbolic} Let $M^7$ be a $7$-dimensional closed hyperbolic manifold, and let $\Sigma$ be an exotic $7$-sphere. Assume that the order of $G$ is odd. Then every free action of $G$ on $M\#\Sigma$ is standard. \end{thm} \begin{rmk} Combining Theorem \ref{thm:tori} and Theorem \ref{thm:hyperbolic} with rigidity results about flat and hyperbolic manifolds, one finds that (under the assumptions of Theorems \ref{thm:tori} and \ref{thm:hyperbolic}) any action $G\curvearrowright W\#\Sigma$ is ``standard with respect to an isometric action", i.e.\ the action $G\curvearrowright W$ in the definition of a standard action is isometric with respect to some locally symmetric metric on $W$. \end{rmk} Next we give several remarks that provide more context and motivation for Theorems \ref{thm:tori} and \ref{thm:hyperbolic}. \begin{figure} \labellist \pinlabel $W$ at 190 650 \pinlabel $G\cong\mathbb{Z}/3\mathbb{Z}$ at 145 740 \pinlabel $G$ at 390 740 \pinlabel $\widehat\Sigma$ at 334 695 \pinlabel $\widehat\Sigma$ at 480 760 \pinlabel $\widehat\Sigma$ at 495 655 \endlabellist \centering \includegraphics[scale=.6]{standard-action} \caption{An action $G\cong\mathbb{Z}/3\mathbb{Z}\curvearrowright W$ induces a ``standard" action $G\curvearrowright W\#\widehat\Sigma\#\widehat\Sigma\#\widehat\Sigma$. } \label{fig:standard-action} \end{figure} \begin{rmk}[Connection to Nielsen realization]\label{rmk:nielsen} For $G<\mathrm{SL}_n(\mathbb{Z})$, we say that $G$ is \emph{realized by diffeomorphisms} of $T^n\#\Sigma$ if there exists a solution to the following lifting problem \begin{equation}\label{eqn:nielsen-tori}\begin{xy} (0,0)*+{\Diff^+(T^n\#\Sigma)}="A"; (-20,-15)*+{G}="B"; (0,-15)*+{\mathrm{SL}_n(\mathbb{Z})}="C"; (13,-7.5)*+{\text{action on $\pi_1$}}="D"; {\ar@{-->}"B";"A"}?*!/_3mm/{}; {\ar@{^{(}->} "B";"C"}?*!/_3mm/{}; {\ar "A";"C"}?*!/_3mm/{}; \end{xy}\end{equation} If there exists a lift where $G$ acts freely on $T^n\#\Sigma$, then we say $G$ is realized \emph{freely}. As a corollary to Theorem \ref{thm:tori}, we can completely characterize the finite cyclic subgroups of $\mathrm{SL}_n(\mathbb{Z})$ that are realized freely on $T^n\#\Sigma$. By Theorem \ref{thm:tori}, if $\Sigma$ is not divisible by $|G|$ in $\Theta_n$, then $G$ does not act freely on $T^n\#\Sigma$. The converse is obvious, so we deduce: \begin{cor}[Nielsen realization for $T^n\#\Sigma$]\label{cor:nielsen-tori} Fix $d\ge1$ and a subgroup $G\cong\mathbb{Z}/d\mathbb{Z}$ of $\mathrm{SL}_n(\mathbb{Z})$. Then $G$ is realized freely on $T^n\#\Sigma$ if and only if $\Sigma$ is divisible by $d$ in $\Theta_n$. \end{cor} There is a similar corollary of Theorem \ref{thm:hyperbolic}, where we consider the lifting problem: \begin{equation}\label{eqn:nielsen-hyperbolic}\begin{xy} (10,0)*+{\Diff^+(M\#\Sigma)}="A"; (-20,-15)*+{G}="B"; (10,-15)*+{\Out^+(\pi_1(M\#\Sigma))}="C"; (23,-7.5)*+{\text{action on $\pi_1$}}="D"; {\ar@{-->}"B";"A"}?*!/_3mm/{}; {\ar@{^{(}->} "B";"C"}?*!/_3mm/{}; {\ar "A";"C"}?*!/_3mm/{}; \end{xy}\end{equation} We note that the homomorphisms \[\Diff^+(T^n\#\Sigma)\rightarrow\mathrm{SL}_n(\mathbb{Z})\>\>\>\text{ and }\>\>\>\Diff^+(M\#\Sigma)\rightarrow\Out^+(\pi_1(M\#\Sigma))\] in (\ref{eqn:nielsen-tori}) and (\ref{eqn:nielsen-hyperbolic}) are surjective; this is explained in the authors' previous work \cite[Thm.\ 1]{BT-hyperbolic}. This fact makes the Nielsen realization problem more interesting (if the homomorphism is not surjective, then certain subgroups obviously don't lift). This surjectivity is not true for $M\#\Sigma$ if we include orientation-reversing diffeomorphisms, as observed by Farrell--Jones \cite{FJ-nielsen}, and it's also not true for all exotic smooth structures on $T^n$ or $M$. For example, $\Diff^+(T')\rightarrow\mathrm{SL}_n(\mathbb{Z})$ is not surjective for $T'$ of the form \begin{equation}\label{eqn:surgery}T'=T^n\setminus\big(T^{k}\times\text{int}(D^{n-k})\big)\cup_f T^{k}\times D^{n-k},\end{equation} where $T^{k}\times D^{n-k}\subset T^n$ is a framed subtorus, $k\ge1$, and the gluing \[f:T^{k}\times S^{n-k-1}\rightarrow T^{k}\times S^{n-k-1}\] has the form $f=\id_{T^{k}}\times \phi$, where the isotopy class $[\phi]\in\pi_0\Diff(S^{n-k-1})\cong\Theta_{n-k}$ is nontrivial. The non-surjectivity of $\Diff^+(T')\rightarrow\mathrm{SL}_n(\mathbb{Z})$ in this case can be proved in a similar way to \cite[Thm.\ B]{BT-hyperbolic}. \end{rmk} \begin{rmk}[Connection to the Zimmer program] Another motivation for Theorem \ref{thm:tori} is the following question. \begin{qu}\label{q:zimmer} Let $T'$ be an exotic $n$-torus (i.e.\ $T'$ is homeomorphic, but not diffeomorphic, to $T^n$). Does there exist a smooth, faithful action of $\mathrm{SL}_n(\mathbb{Z})$ on $T'$? \end{qu} In general, the Zimmer program seeks to classify actions of lattices in Lie groups, like $\mathrm{SL}_n(\mathbb{Z})$, on smooth manifolds; see \cite{fisher1, fisher2}. There seems to be no ``obvious" action of $\mathrm{SL}_n(\mathbb{Z})$ on any exotic torus $T'$, so one might suspect that the answer to Question \ref{q:zimmer} is ``no". As evidence toward this, one can try to prove the following statement. \begin{prob}\label{prob:torus-realization} For an exotic $n$-torus $T'$, show that the natural homomorphism \[\Diff^+(T')\rightarrow\mathrm{SL}_n(\mathbb{Z})\] is not a split surjection. \end{prob} See \cite{KRH} for a result that addresses Problem \ref{prob:torus-realization} in the real-analytic category. As mentioned above, it is possible to use the methods of \cite[Thm.\ B]{BT-hyperbolic} to show that if $\Diff^+(T')\rightarrow\mathrm{SL}_n(\mathbb{Z})$ is surjective, then $T'$ is diffeomorphic to $T^n\#\Sigma$, for some $\Sigma\in\Theta_n$. Thus the most interesting case of Problem \ref{prob:torus-realization} is to show that $\Diff^+(T^n\#\Sigma)\twoheadrightarrow\mathrm{SL}_n(\mathbb{Z})$ is not split when $\Sigma\neq S^n\in\Theta_n$. To illustrate how Theorem \ref{thm:tori} could be useful in solving this problem, we note the following sample application of Corollary \ref{cor:nielsen-tori}, which could be the starting point for further analysis and lead to examples where $\Diff^+(T^n\#\Sigma)\twoheadrightarrow\mathrm{SL}_n(\mathbb{Z})$ does not split. \begin{cor}[Fixed point theorem] Let $\Sigma$ be a generator of $\Theta_7\cong\mathbb{Z}/28\mathbb{Z}$. For any splitting $\mathrm{SL}_7(\mathbb{Z})\rightarrow\Diff^+(T^7\#\Sigma)$ of the surjection $\Diff^+(T^7\#\Sigma)\rightarrow\mathrm{SL}_7(\mathbb{Z})$, every finite order element of $\mathrm{SL}_7(\mathbb{Z})$ acts with a fixed point on $T^7\#\Sigma$. \end{cor} \end{rmk} \begin{rmk}[Non-free actions] Understanding non-free actions of $\mathbb{Z}/d\mathbb{Z}$ on $T^n\#\Sigma$ is more subtle for a variety of reasons. One difficulty (which is related to our proofs) comes from the fact that topological rigidity (the Borel conjecture) is not generally true for crystallographic groups with torsion \cite{connolly-kozniewski, CDK}. Furthermore, it seems likely that there exist actions $\mathbb{Z}/d\mathbb{Z}\curvearrowright T^n\#\Sigma$ where $\Sigma$ is not divisible by $d$ in $\Theta_n$. For example, a generator $\Sigma$ of the subgroup $bP_{4k}<\Theta_{4k-1}$ of homotopy $4k-1$-spheres which bound a parallelizable manifold has an action of $\SO(2k-1)$ with a circle as the fixed set \cite[\S1]{hsiang}. If $G\cong\mathbb{Z}/d\mathbb{Z}\subset\SO(2k-1)$ acts on $T^{4k-1}$ with a 1-dimensional fixed set and the same normal representation, then one can construct an action of $G$ on $T^n\#\Sigma$ by an equivariant connected sum. If $k=2$, then $bP_{8}=\Theta_{7}$, so the generator $\Sigma\in bP_{8}$ is not divisible by any divisor $d>1$ of $|\Theta_7|=28$. \end{rmk} \begin{rmk}[Non-cyclic free actions] It is possible that Theorem \ref{thm:tori} can be extended to any finite $G$ (not just cyclic). The assumption $G=\mathbb{Z}/d\mathbb{Z}$ is used in two places in the proof of Theorem \ref{thm:tori}: (1) If $G\cong\mathbb{Z}/d\mathbb{Z}$ acts freely on $T^n$, then $T^n/G$ is parallelizable, and (2) for $k\gg0$ the the suspension $\Sigma^kT^n\rightarrow\Sigma^k(T^n/G)$ of the quotient map $T^n\rightarrow T^n/G$ splits (up to homotopy) as a map $S^{n+k}\vee X\rightarrow S^{n+k}\vee Y$ that is ``diagonal" (see Proposition \ref{prop:compatible-splitting} for a precise statement). This conclusion is obtained by a carefully constructed equivariant Whitney embedding of $T^n$ in $\mathbb{R}^{n+k}$. This makes special use of the fact that $G$ is cyclic, but a similar construction could exist more generally. \end{rmk} \begin{rmk} The assumption that $|G|$ is odd in Theorem \ref{thm:hyperbolic} could be avoided if the natural map $F:[M,\TopO]\twoheadrightarrow[M,\TopPL]$, which is surjective when $\dim M=7$, admits a splitting. Here the domain/codomain of $F$ can be interpreted as the group of concordance classes of smooth/PL structures on $M$, and the map $F$ is forgetful. One can show that $F$ splits if $H_4(M;\mathbb{Z}/2\mathbb{Z})$ is generated by embedded submanifolds with trivial normal bundle, but we do not know if this is ever the case. \end{rmk} \subsection{Asymmetric manifolds $W\#\Sigma$} Next we state our second main result. We say that an oriented smooth manifold $X$ is \emph{asymmetric} if $\Diff^+(X)$ does not contain a nontrivial finite subgroup. \begin{mainthm}[Asymmetric smoothings of hyperbolic manifolds]\label{thm:asymmetric} For every $n_0\geq 5$ and $d\ge1$, there exists $n\ge n_0$, a closed hyperbolic $n$-manifold $M$, and an exotic sphere $\Sigma\in\Theta_n$, so that $|\Isom(M)|\ge d$ and $M\#\Sigma$ is asymmetric. \end{mainthm} Theorem \ref{thm:asymmetric} answers Question 3 of \cite{BT-hyperbolic}. \begin{rmk}[Other results about asymmetric manifolds] The first examples of asymmetric aspherical manifolds were constructed by Conner--Raymond--Weinberger \cite{CRW}. These examples (some of which are solvmanifolds) are asymmetric in the topological category (i.e.\ $\Homeo(W)$ does not contain any nontrivial finite subgroup), and they are shown to be asymmetric by arranging that $\Out(\pi_1(W))$ is torsionfree. In the hyperbolic setting, Long--Reid \cite{LR-asymmetric} gave examples of asymmetric hyperbolic $n$-manifolds for each $n\ge2$ (see also \cite{belolipetsky-lubotzky}). These examples are shown to be asymmetric by arranging that $\Isom(M)\cong\Out(\pi_1(M))=1$. Theorem \ref{thm:asymmetric} exhibits a different phenomenon: these examples have many topological symmetries (in particular $\Out(\pi_1)$ may be arbitrarily large), but no smooth ones. \end{rmk} \begin{rmk}[Simplest instance of Theorem \ref{thm:asymmetric}] The simplest nontrivial instance of Theorem \ref{thm:asymmetric} is as follows. Let $M$ be a hyperbolic 7-manifold such that $\Isom(M)=\Isom^+(M)=\mathbb{Z}/7\mathbb{Z}$ acts freely on $M$ (such examples exist, as we recall below), and let $\Sigma$ be a generator of $\Theta_7\cong\mathbb{Z}/28\mathbb{Z}$. Then $M\#\Sigma$ is asymmetric. We could also deduce that this example is asymmetric using Theorem \ref{thm:hyperbolic}. \end{rmk} \begin{rmk}[Connection to Nielsen realization] Consider the lifting problem in (\ref{eqn:nielsen-hyperbolic}). The statement ``$M\#\Sigma$ is asymmetric" is equivalent to the statement ``no nontrivial subgroup of $\Out(\pi_1(M\#\Sigma))$ is realized by diffeomorphisms of $M\#\Sigma$." Thus Theorem \ref{thm:asymmetric} gives extreme examples of the non-realizability of the outer automorphism group by diffeomorphisms. This strengthens a result of Farrell--Jones \cite[Thm.\ 1]{FJ-nielsen} who gave examples where \[\Diff(M\#\Sigma)\rightarrow\Out(\pi_1(M\#\Sigma))\] is not surjective. On the other hand, the image of this homomorphism has index at most $2$ in $\Out(\pi_1(M\#\Sigma))$, so to produce asymmetric examples, one needs a different obstruction than the one found by \cite{FJ-nielsen}. \end{rmk} \subsection{Questions and problems}\label{sec:questions} One can view Theorems \ref{thm:tori} and \ref{thm:hyperbolic} as rigidity results for free actions on $W\#\Sigma$ when $W$ is locally symmetric and nonpositively curved. It is unclear in what generality such rigidity might hold. \begin{prob}\label{prob:non-standard} Give an example of a nonpositively curved locally symmetric $W$ and a free action $G\curvearrowright W\#\Sigma$ that is not standard. \end{prob} \begin{rmk}[Possible approach to Problem \ref{prob:non-standard}]\label{rmk:prob-nonstandard} Here is one possible source of examples. Let $M$ be hyperbolic. Fix a geodesic $\gamma\subset M$, an isometry $g\in\Isom^+(M)$ acting freely, and consider the orbit $\Gamma=\gamma\sqcup g(\gamma)\sqcup\cdots$. Use $\Gamma$ and $[f]\in\pi_0(\Diff(S^{n-2}))\cong\Theta_{n-1}$ to define a new smooth structure $M'$, similar to (\ref{eqn:surgery}). If $\Gamma$ is nullhomologous, then $M'$ is diffeomorphic to $M$, and one can use this to construct an action of $G=\langle g\rangle$ on $M'':=M\#(\widehat\Sigma^{\#|G|})$ such that $M''/G$ is not diffeomorphic to $M\#\Sigma$, which implies the action is not standard (c.f.\ Lemma \ref{lem:standard-actions}). It seems challenging to prove that such a construction exists. \end{rmk} We also propose the following weaker form of rigidity. \begin{deftn}[Divisibility property]\label{defn:divisibility} We say that a smooth manifold $W$ has the \emph{divisibility property} if $G$ acts freely on $W\#\Sigma$ only if $\Sigma$ is divisible by $|G|$ in $\Theta_n/I(W)$, where $I(W)=\{\Sigma\in\Theta_n: W\#\Sigma\cong W\}$ is the inertia group of $W$. \end{deftn} For example, $n$-tori have the divisibility property by Theorem \ref{thm:tori}. \begin{prob}\label{prob:divisibility} Give an example of an aspherical $n$-manifold $W$ that does not have the divisibility property. \end{prob} The approach to Problem \ref{prob:non-standard} suggested in Remark \ref{rmk:prob-nonstandard} would not solve Problem \ref{prob:divisibility}. \begin{rmk}It will be apparent in the course of our arguments that the divisibility property is related to the filtration \[F_0\subset F_1\subset\cdots\subset F_r=[W,\TopO]\] arising from the Atiyah-Hirzebruch spectral sequence, and whether or not any of the extensions \[0\rightarrow F_0\rightarrow F_k\rightarrow F_k/F_0\rightarrow 0\] do not split. Here $F_0\cong\Theta_n/I(W)$. \end{rmk} \subsection*{Section Outline.} In \S\ref{sec:standard} we give a characterization of standard actions; in \S\ref{sec:smoothing} we explain the necessary background from smoothing theory; and in \S\ref{sec:flat} we prove two results about flat manifolds. In \S\ref{sec:tori} -- \S\ref{sec:asymmetric} we prove the main theorems. \subsection*{Acknowledgements.} The second author thanks S.\ Cappell for telling him about \cite{CLW}, which inspired aspects of this project. \section{Standard actions}\label{sec:standard} The following lemma gives a characterization of standard actions that we will use to prove that actions are standard. \begin{lem}[Standard actions]\label{lem:standard-actions} Let $W$ be a closed smooth manifold, and fix $\Sigma\in\Theta_n$. A smooth, free, finite group action $G\curvearrowright W\#\Sigma$ is standard if and only if there exists a finite subgroup $G'<\Diff^+(W)$ that is conjugate to $G<\Diff^+(W)$ in $\Homeo^+(W)$, an exotic sphere $\widehat\Sigma\in\Theta_n$, and a diffeomorphism \[(W\#\Sigma)/G\cong (W/G')\#\widehat\Sigma.\] \end{lem} \begin{proof}[Proof of Lemma \ref{lem:standard-actions}] The forward direction is immediate from the definition of a standard action with $G=G'$. Conversely, assume that there exists $G,\widehat\Sigma$ and a diffeomorphism \[f:(W/G')\#\widehat\Sigma\rightarrow(W\#\Sigma)/G.\] On the one hand, the covering map $W\#\Sigma\rightarrow(W\#\Sigma)/G$ pulls back along $f$ to a covering \[p:X\rightarrow(W/G')\#\widehat\Sigma.\] On the other hand, there is a standard action $G'\curvearrowright W\#(\widehat\Sigma^{\#|G|})$ which defines a smooth covering space \[p':W\#(\widehat\Sigma^{\#|G|})\rightarrow (W/G')\#\widehat\Sigma.\] The lemma follows by showing that $X$ and $W\#(\widehat\Sigma^{\#|G|})$ are (smoothly) isomorphic covering spaces of $(W/G')\#\widehat\Sigma$. Since the smooth structure on a smooth cover of a smooth manifold is uniquely determined, it suffices to observe that $p$ and $p'$ are isomorphic in the topological category. This holds because both are topologically equivalent to the covering $W\rightarrow W/G'$. This holds for $p'$ by construction, and holds for $p$ by our assumption that $G\curvearrowright W\#\Sigma$ and $G'\curvearrowright W$ are topologically conjugate. \end{proof} \section{Background from smoothing theory} \label{sec:smoothing} In this section we recall the basic setup of smoothing theory and state the classification theorem for concordance classes of smooth structures, which is used in Sections \ref{sec:tori} and \ref{sec:asymmetric}. We also prove in Lemmas \ref{lem:concordance-tori} and \ref{lem:concordance-hyperbolic} a result about concordance classes of the smooth structures $T^n\#\Sigma$ and $M\#\Sigma$ ($M$ hyperbolic) that will be used in the proofs of the main theorems. \subsection*{Smooth structures} A \emph{smooth structure} or \emph{smoothing} of a topological manifold $W$ is a pair $(U,h)$ where $U$ is a smooth manifold and $h:U\rightarrow W$ is a homeomorphism (this in particular determines a smooth atlas on $W$ by push-forward). Two smooth structures $(U_0,h_0)$ and $(U_1,h_1)$ of $W$ are \emph{concordant} if there exists a smooth cobordism $V$ between $U_0$ and $U_1$ and a homeomorphism $V\to W\times [0,1]$ which restricts to $h_i$ on $U_i$, $i=0,1$. The set of concordance classes of smooth structures on $W$ is denoted by $S(W)$. In the following classification theorem \cite[Essay IV, Theorem 10.1]{kirby-siebenmann}, $\TopO$ denotes the homotopy fiber of the natural map $B\OO\rightarrow B\Top$, where $\OO=\colim \OO(n)$ is the infinite orthogonal group, and $\Top=\colim \Homeo(\mathbb{R}^n,0)$, with $\Homeo(\mathbb{R}^n,0)$ the topological group of homeomorphisms of $\mathbb{R}^n$ that fix the origin. We denote by $[W,\TopO]$ the set of homotopy classes of based maps; this is equivalent to the set of homotopy classes of unbased maps since $\TopO$ is an $H$-space under Whitney sum. \begin{thm}Let $W$ be a closed topological manifold of dimension $n\ge5$. Then a choice of a smooth structure $U\xrightarrow{h}W$ on $W$ determines a bijection $S(W)\xrightarrow{\cong} [W,\TopO]$ under which $(U,h)$ is sent to the homotopy class of the constant map. \end{thm} To compute $[W,\TopO]$, we use that $\TopO$ is in fact an infinite loop space \cite[p.216]{Boardman-Vogt}. This affords two different approaches: \begin{enumerate} \item For any $k\ge1$, if we write $\TopO=\Omega^kY$, then \[[W,\TopO]\cong[W,\Omega^kY]\cong[\Sigma^kW,Y].\] Thus information about the homotopy type of $\Sigma^kW$ (which can be simpler than that of $W$) can allow us to make conclusions about $[W,\TopO]$. \item We can view $[W,\TopO]$ as the $0$-th group of a cohomology theory. Then the Atiyah--Hirzebruch spectral sequence can be used to gain information about $[W,\TopO]$. We elaborate on this more below. \end{enumerate} \subsection*{Localization of $\TopO$.} For the proof of Theorem \ref{thm:asymmetric}, we will use the localization $\TopO_{(p)}$ of $\TopO$ at an odd prime $p$. The homotopy groups of the infinite loop space $\TopO_{(p)}$ are the $p$-torsion subgroups of $\Theta_n$: \[\pi_n\big(\TopO_{(p)}\big)=\Theta_n\otimes\mathbb{Z}_{(p)}\] When localized, the short exact sequence $0\rightarrow bP_{n+1}\rightarrow\Theta_n\rightarrow\Theta_n/bP_{n+1}\rightarrow0$ splits. In fact, there is a splitting on the level of spaces: \begin{thm}[Localization of $\TopO$]\label{thm:local-splitting} Let $p$ be an odd prime. Then there are infinite loop spaces $B=B(p)$ and $C=C(p)$, and infinite loop maps $\beta:B\to\TopO_{(p)}$ and $\alpha:C\to\TopO_{(p)}$ such that the map $B\times C\xrightarrow{\beta\times\alpha}\TopO_{(p)}\times\TopO_{(p)}\xrightarrow{\mathrm{multiplication}}\TopO_{(p)}$ is an equivalence of infinite loop spaces. Furthermore, the map $\beta$ induces an isomorphism from $\pi_n(B)$ onto $bP_{n+1}\otimes\mathbb{Z}_{(p)}$. \end{thm} This is proved in \cite[\S 5.]{lance-paper}. To compare the statement above to what appears in \cite{lance-paper}, one should note that $\PLO_{(p)}\simeq\TopO_{(p)}$ when $p$ is an odd prime because $\TopPL_{(p)}\simeq K(\mathbb{Z}/2\mathbb{Z},3)_{(p)}$ is contractible. (Localization preserves fibrations of simply connected spaces.) \subsection*{The Atiyah--Hirzebruch spectral sequence.} The infinite loop space $B=B(p)$ from Theorem \ref{thm:local-splitting} defines spectrum and also a cohomology theory $\mathbb E^*$. In particular, for any space $W$, $\mathbb E^0(W)=[W,B]$. When $W$ is a closed manifold, the groups $\mathbb E^*(W)$ can be computed using the Atiyah--Hirzebruch spectral sequence. This is a spectral sequence with $E_2$ page \[E_2^{p,q}=H^p(W;\pi_{-q}(B)),\] that converges to $\mathbb E^{p+q}(W)$. (For general $W$, the spectral sequence converges conditionally, but when $W$ is a closed manifold, the spectral sequence always converges.) \subsection*{Smooth structures $W\#\Sigma$.} View $W\#\Sigma$ as $(W\setminus \Int D^n)\cup_\phi D^n$, where $D^n$ is glued to $W\setminus\Int D^n$ along the common boundary $\partial D^n= S^{n-1}$ by $\phi\in\Diff(S^{n-1})$ whose isotopy class $[\phi]\in\pi_0(\Diff(S^{n-1}))\cong\Theta_n$ corresponds to $[\Sigma]$. From this point-of-view, there is a ``standard'' homeomorphism $\iota:W\#\Sigma\rightarrow W$, which is the identity on $W\setminus\Int D^n$ and $\rest{\iota}{D^n}$ is the cone of $\phi$ (which is a homeomorphism, but not generally a diffeomorphism). The map $W\rightarrow\TopO$ that classifies $(W\#\Sigma,\iota)$ can be obtained by a composition \[W\xrightarrow{c} S^n\xrightarrow{f}\TopO,\] where $c$ collapses the complement of $D^n\subset W$ to a point, and $f$ classifies $\Sigma\in S(S^n)\cong\pi_n(\TopO)$. The isomorphism $S(W)\cong[W,\TopO]$ is equivariant with respect to the obvious action of $\Homeo(W)$ on both sets. The following Lemmas \ref{lem:concordance-tori} and \ref{lem:concordance-hyperbolic} describe this action on the concordance classes represented by $W\#\Sigma$ for some $\Sigma\in\Theta_n$. \begin{lem}\label{lem:concordance-tori} Let $n\geq 5$ and fix $\Sigma\in\Theta_n$. Then, for any $h\in\Homeo^+(T^n)$, the smooth structures $(T^n\#\Sigma,\iota)$ and $(T^n\#\Sigma,h\circ\iota)$ are concordant. \end{lem} \begin{rmk} Lemma \ref{lem:concordance-tori} is not generally true if $T^n\#\Sigma$ is replaced by another smooth structure, such as those in (\ref{eqn:surgery}); c.f.\ \cite[\S4]{BT-hyperbolic}. \end{rmk} \begin{proof}[Proof of Lemma \ref{lem:concordance-tori}] The map $T^n\rightarrow\TopO$ that classifies $(T^n\#\Sigma,\iota)$ factors as \[T^n\xrightarrow{c} S^n\xrightarrow{f}\TopO\] where $c$ is the collapse map associated to an embedding $D^n\hookrightarrow T^n$, and the isotopy class $[f]\in\pi_n(\TopO)\cong\Theta_n$ corresponds to $\Sigma$. Then to prove the lemma, it suffices to show that the maps \[T^n\xrightarrow{c}S^n\xrightarrow{f}\TopO\>\>\>\text{ and }\>\>\>T^n\xrightarrow{h}T^n\xrightarrow{c}S^n\xrightarrow{f}\TopO\] are homotopic. Since $\Out(\pi_1(T^n))\cong\mathrm{GL}_n(\mathbb{Z})$ and maps to a $K(\mathbb{Z}^n,1)$ are determined by their effect on the fundamental group, $h$ is homotopic to a linear automorphism, and by a further isotopy we can obtain a homeomorphism $h'$ such that $h'(D^n)=D^n$. Then $f\circ c=f\circ c\circ h'$ is homotopic to $f\circ c\circ h$, as desired. \end{proof} We have a similar result for hyperbolic manifolds, with only a minor adjustment of the proof. \begin{lem}\label{lem:concordance-hyperbolic} Let $M$ be a closed hyperbolic $n$-manifold ($n\geq 5$) and $\Sigma\in\Theta_n$. Then, for any $h\in\Homeo^+(M)$, the smooth structures $(M\#\Sigma,\iota)$ and $(M\#\Sigma,h\circ\iota)$ are concordant. \end{lem} \begin{proof} As in the proof of Lemma \ref{lem:concordance-tori}, we consider the collapse map $c:M\rightarrow S^n$ induced by the inclusion of a disk $D^n\hookrightarrow M$, and we take the homotopy class $[f]\in\pi_n(\TopO)\cong\Theta_n$ corresponding to $\Sigma$, and we want to show that the maps \[M\xrightarrow{c}S^n\xrightarrow{f}\TopO\>\>\>\text{ and }\>\>\>M\xrightarrow{h}M\xrightarrow{c}S^n\xrightarrow{f}\TopO\] are homotopic. By Mostow rigidity, $\Out(\pi_1(M))\cong\Isom(M)$, and so $h$ is homotopic to an (orientation-preserving) isometry, and by a further isotopy we can obtain a homeomorphism $h'$ so that $h'(D^n)=D^n$. Then again we conclude that $f\circ c=f\circ c\circ h'$ is homotopic to $f\circ c\circ h$. \end{proof} \section{Two facts about flat manifolds} \label{sec:flat} Here we prove two structural results (Propositions \ \ref{prop:mapping-torus} and \ref{prop:parallelizable}) about flat manifolds with cyclic holonomy. These are used for the proof of Theorem \ref{thm:tori}. \begin{prop}[Cyclic holonomy implies mapping torus]\label{prop:mapping-torus} Fix $d\ge2$. Let $N$ be a flat manifold with a $G=\mathbb{Z}/d\mathbb{Z}$ cover $T^n\rightarrow N$. Then $N$ is diffeomorphic to a mapping torus $T^{n-1}\rightarrow N\rightarrow S^1$. \end{prop} Proposition \ref{prop:mapping-torus} includes the case when $N$ is a flat manifold with holonomy group $G=\mathbb{Z}/d\mathbb{Z}$ (but it also includes, the (easier) case that $N$ is itself the torus). For flat manifolds with holonomy $G=\mathbb{Z}/d\mathbb{Z}$ with $d$ prime, the proposition is proved in \cite[Thm.\ 3.6]{vasquez}. The general case is not much harder using an observation of \cite[Lem.\ 1]{cliff-weiss}. \begin{proof} The group $\Gamma=\pi_1(N)$ is a torsion-free subgroup of $\Isom^+(\mathbb{R}^n)\cong\mathbb{R}^n\rtimes\SO(n)$. Let $\mathbb{Z}^n<\Gamma$ be the subgroup corresponding to the given covering $T^n\rightarrow N$. There is a short exact sequence \begin{equation}\label{eqn:extension}1\rightarrow \mathbb{Z}^n\rightarrow\Gamma\xrightarrow{} G\rightarrow 1.\end{equation} Let $A$ denote $\mathbb{Z}^n$ with its $\mathbb{Z}[G]$-module structure coming from the above extension, and let $\xi\in H^2(G;A)$ denote the Euler class of the extension. We know that $\xi\neq0$ because otherwise $\Gamma$ would be isomorphic to $\mathbb{Z}^n\rtimes G$, which is not torsion-free. Denoting a generator of $G$ by $g$, consider the homomorphism $m:A\rightarrow A$ defined by multiplication by $1+g+\cdots+g^{d-1}\in\mathbb{Z}[G]$. Let $A'=\ker(m)$ and $A''=\im(m)$, so there is a short exact sequence of $\mathbb{Z}[G]$ modules: \[0\rightarrow A'\rightarrow A\rightarrow A''\rightarrow0.\] Consider the following portion of the associated long exact sequence in cohomology with coefficients \[H^2(G;A')\rightarrow H^2(G;A)\rightarrow H^2(G;A'')\] Recalling that $H^2(G;A)\cong A^G/\ker(m)$ (and similarly for any $\mathbb{Z}[G]$ module), we deduce that $H^2(G;A')=0$, so $H^2(G;A)\rightarrow H^2(G;A'')$ is injective. By construction $A''\cong\mathbb{Z}\oplus\cdots\oplus\mathbb{Z}$ is a trivial module, so $H^2(G;A'')\cong H^2(G;\mathbb{Z})\oplus\cdots\oplus H^2(G;\mathbb{Z})$. Since $\xi\neq0$, there is surjective composition $q:A\twoheadrightarrow A''\twoheadrightarrow\mathbb{Z}$ so that the image of $\xi$ under the induced homomorphism \[q_*:H^2(G;A)\hookrightarrow H^2(G;A'')\rightarrow H^2(G;\mathbb{Z})\] is nonzero. Set $B=\ker(q)$. This is a $\mathbb{Z}[G]$-submodule of $A$, which implies that $B$ is a normal subgroup of $\Gamma$. By construction, the extension \[1\rightarrow A/B\rightarrow\Gamma/B\rightarrow\Gamma/A\rightarrow 1\] does not split (its Euler class is $q_*(\xi)\neq0$). Here $\Gamma/A\cong G\cong\mathbb{Z}/d\mathbb{Z}$ and $A/B\cong\mathbb{Z}$, so the fact that $q_*(\xi)\neq0$ implies that this extension is central and $\Gamma/B\cong\mathbb{Z}$. Thus $\Gamma\cong B\rtimes\mathbb{Z}$, and one can see (e.g.\ from the structure of $\Isom(\mathbb{R}^n)$) that this isomorphism is realized topologically by a fibration $T^{n-1}\rightarrow N\rightarrow S^1$. \end{proof} \begin{prop}[Flat mapping torus is parallelizable]\label{prop:parallelizable} Let $M_f$ be a flat manifold that has the structure of a mapping torus $T^{n-1}\rightarrow M_f\rightarrow S^1$ whose monodromy $f$ is orientation-preserving and has finite order. Then $M_f$ is parallelizable. \end{prop} A version of this is proved by \cite{thorpe} with a different assumption. We give an alternate argument. \begin{proof}[Proof of Proposition \ref{prop:parallelizable}] To show $M_f$ is parallelizable, it suffices to construct an $n$-frame field on $\widetilde M_f\cong\mathbb{R}^n$ that is $\Gamma$-invariant, where $\Gamma=\pi_1(M_f)$. Write $\Gamma=\mathbb{Z}^{n-1}\rtimes_{f_*}\mathbb{Z}$, and decompose $\mathbb{R}^n$ accordingly as $\mathbb{R}^n=\mathbb{R}^{n-1}\times\mathbb{R}$. The group $\Gamma$ has a generating set $\gamma_1,\ldots,\gamma_{n-1},\eta$, where $\langle\gamma_1,\ldots,\gamma_{n-1}\rangle\cong\mathbb{Z}^{n-1}$ acts by translations of $\mathbb{R}^{n-1}\times\mathbb{R}$ that are trivial in the second factor, and $\eta$ acts on $(x,t)\in\mathbb{R}^{n-1}\times\mathbb{R}$ by $\eta(x,t)=(f_*(x)+\beta,t+\frac{1}{d})$, where $(\beta,f_*)\in\mathbb{R}^{n-1}\rtimes \SO(n-1)$. Define an orthonormal $n$-frame on $\mathbb{R}^n$ as follows. First define a frame along $\mathbb{R}^{n-1}\times0$ by choosing an orthonormal frame at the origin, and moving it along $\mathbb{R}^{n-1}$ by parallel transport. Choose this frame compatible with the decomposition $\mathbb{R}^n=\mathbb{R}^{n-1}\times\mathbb{R}$. Now let $\alpha_t$ be a path from the identity $I$ to $f_*$ in $\SO(n-1)$, defined for $t\in[0,1/d]$. Define a frame on $\mathbb{R}^{n-1}\times\{t\}$ by acting by $\alpha_t$ on the framing of $\mathbb{R}^{n-1}\times\{0\}$. This extends in an obvious way to a framing on $\mathbb{R}^{n-1}\times\mathbb{R}$ that is $\eta$-invariant. The resulting framing is $\gamma_i$-invariant for each $i$, since by construction it is constant on $\mathbb{R}^{n-1}\times\{t\}$ for each $t\in\mathbb R$. Since $\Gamma$ is generated by $\eta$ and the $\gamma_i$, the framing is $\Gamma$ invariant. \end{proof} \section{Actions on exotic tori (Theorem \ref{thm:tori})}\label{sec:tori} In this section we prove Theorem \ref{thm:tori}. We begin with a brief sketch of the argument, and then give the details in the following subsections. Fix $\Sigma\in\Theta_n$ and a suppose that $G\cong\mathbb{Z}/d\mathbb{Z}$ acts freely on $T^n\#\Sigma$ by orientation-preserving diffeomorphisms. \begin{itemize} \item \underline{Step 1} (rigidity). Let $(T^n\#\Sigma,\iota)$ denote the standard concordance class, where $\iota:T^n\#\Sigma\rightarrow T^n$ is the homeomorphism given by coning. First we show that $(T^n\#\Sigma,\iota)$ is in the image of a homomorphism \[\pi^*:[\overline T,\TopO]\rightarrow[T^n,\TopO],\] induced by a certain covering map $\pi:T^n\rightarrow\overline T$ (see Proposition \ref{prop:rigidity-tori}). The main ingredient is the geometric and topological rigidity of flat manifolds. \item \underline{Step 2} (splitting). We show that there are isomorphisms \begin{equation}\label{eqn:compatible-splitting}\begin{xy} (-25,0)*+{[T^n,\TopO]}="A"; (13,0)*+{[S^n,\TopO]\>\>\>\oplus\>\>\>A}="B"; (-25,-15)*+{[\overline T,\TopO]}="C"; (13,-15)*+{[S^n,\TopO]\>\>\>\oplus\>\>\>\bar{A}}="D"; (-10,0)*+{\cong}="E"; (-10,-15)*+{\cong}="F"; {\ar "C";"A"}?*!/_3mm/{\pi^*}; \end{xy}\end{equation} where $A$ and $\bar{A}$ are finite abelian groups. With respect to this splitting, the homomorphism $\pi^*$ is diagonal (see Corollary \ref{cor:splitting}). \end{itemize} Given Steps 1 and 2, the proof is completed as follows. The concordance class $(T^n\#\Sigma,\iota)$ belongs to the subgroup $[S^n,\TopO]\subset[T^n,\TopO]$. By Step 1, $(T^n\#\Sigma,\iota)$ is in the image of $\pi^*$, and by Step 2, this implies that $(T^n\#\Sigma)/G$ is diffeomorphic to $\overline T\#\widehat\Sigma$ for some $\widehat\Sigma\in\Theta_n$. Then we apply Lemma \ref{lem:standard-actions} to deduce that the action $G\curvearrowright T^n\#\Sigma$ is standard. \subsection{Step 1: rigidity} \begin{prop}\label{prop:rigidity-tori} Fix an exotic $n$-sphere $\Sigma$, and fix a finite subgroup $G<\Diff^+(T^n\#\Sigma)$ acting freely on $T^n\#\Sigma$. \begin{enumerate} \item[(i)] There exists an action $G'\curvearrowright T^n$ that is isometric with respect to some flat metric and a homeomorphism $T^n\#\Sigma\rightarrow T^n$ that is equivariant with respect to some isomorphism $G\cong G'$. \item[(ii)] Assume $n\geq 5$ and let $\pi:T^n\rightarrow T^n/G'$ denote the quotient map. Then the smooth structure $(T^n\#\Sigma,\iota)$ is in the image of the homomorphism \[\pi^*:[T^n/G',\TopO]\rightarrow[T^n,\TopO].\] \end{enumerate} \end{prop} \begin{proof} Use $\iota:T^n\#\Sigma\rightarrow T^n$ to view the action of $G$ on $T^n\#\Sigma$ as an action of $G$ on $T^n$ by homeomorphisms. By assumption, the action $G\curvearrowright T^n$ is free, so the quotient $T^n\rightarrow T^n/G$ is a covering map, and there is an exact sequence \[1\rightarrow\mathbb{Z}^n\rightarrow\pi_1(T^n/G)\rightarrow G\rightarrow1.\] The group $\pi_1(T^n/G)$ is the fundamental group of a flat manifold $\overline T$ by \cite[Thm.\ 1]{auslander-kuranishi}. Consider the corresponding extension of $\pi_1(\overline T)$. \[\begin{xy} (-60,0)*+{1}="A"; (-40,0)*+{\mathbb{Z}^n}="B"; (-20,0)*+{\pi_1(T^n/G)}="C"; (0,0)*+{G}="D"; (20,0)*+{1}="E"; (-60,-15)*+{1}="F"; (-40,-15)*+{\mathbb{Z}^n}="G"; (-20,-15)*+{\pi_1(\overline T)}="H"; (0,-15)*+{G}="I"; (20,-15)*+{1}="J"; {\ar"A";"B"}?*!/_3mm/{}; {\ar "B";"C"}?*!/_3mm/{}; {\ar "C";"D"}?*!/^3mm/{}; {\ar "D";"E"}?*!/^3mm/{}; {\ar"F";"G"}?*!/_3mm/{}; {\ar "G";"H"}?*!/_3mm/{}; {\ar "H";"I"}?*!/^3mm/{}; {\ar "I";"J"}?*!/^3mm/{}; {\ar@{=} "B";"G"}?*!/_3mm/{}; {\ar "H";"C"}?*!/^3mm/{\cong}; {\ar@{=} "I";"D"}?*!/^3mm/{}; \end{xy}\] By the Borel conjecture for flat manifolds \cite{farrell-hsiang}, the isomorphism $\pi_1(T^n/G)\cong\pi_1(\overline T)$ above is induced by a homeomorphism $h:T^n/G\cong\overline T$. By construction, this homeomorphism lifts to homeomorphism $\widetilde h:T^n\rightarrow T^n$, i.e.\ we have the following diagram \begin{equation}\label{eqn:covers} \begin{xy} (-10,0)*+{T^n}="A"; (15,0)*+{T^n}="B"; (-10,-15)*+{T^n/G}="C"; (15,-15)*+{\overline T}="D"; (-40,0)*+{T^n\#\Sigma}="E"; (-40,-15)*+{(T^n\#\Sigma)/G}="F"; (-55,-14.6)*+{U:=}="G"; {\ar"A";"B"}?*!/_3mm/{\widetilde h}; {\ar "B";"D"}?*!/_3mm/{\pi}; {\ar "A";"C"}?*!/^3mm/{}; {\ar "C";"D"}?*!/_3mm/{h}; {\ar "E";"A"}?*!/_3mm/{\iota}; {\ar "F";"C"}?*!/_3mm/{\overline\iota}; {\ar "E";"F"}?*!/_3mm/{}; \end{xy}\end{equation} The vertical maps are covering maps, and the homeomorphism $\widetilde h$ conjugates the given action of $G$ on $T^n$ to an isometric action $G'\curvearrowright T^n$. This proves $(i)$. To show $(ii)$, we conclude from Diagram (\ref{eqn:covers}) that the induced map \[\pi^*:S(\overline T)\cong[\overline T,\TopO]\xrightarrow{}[T^n,\TopO]\cong S(T)\] sends $(U,h\circ\overline\iota)$ to $(T^n\#\Sigma,\widetilde h\circ\iota)$. Indeed, $\pi^*$ sends an arbitrary element $(W,g)\in S(\overline T)$ to $(\widehat W,\widehat g)\in S(T)$, where $\widehat W$ is the pullback covering space with the smooth structure such that $\widehat W\rightarrow W$ is smooth; see the following diagram. \[\begin{xy} (-10,0)*+{\widehat W}="A"; (15,0)*+{T^n}="B"; (-10,-15)*+{W}="C"; (15,-15)*+{\overline T}="D"; {\ar"A";"B"}?*!/_3mm/{\widehat g}; {\ar "B";"D"}?*!/_3mm/{\pi}; {\ar "A";"C"}?*!/^3mm/{}; {\ar "C";"D"}?*!/^3mm/{g}; \end{xy}\] By Lemma \ref{lem:concordance-tori} $(T^n\#\Sigma,\widetilde h\circ\iota)$ is concordant to $(T^n\#\Sigma,\iota)$. Therefore, $(T^n\#\Sigma,\iota)$ is in the image of $\pi^*$. \end{proof} \subsection{Step 2: compatible splitting of the top cell} For an open embedding $e:X\hookrightarrow Y$ of manifolds, we denote $e':Y'\rightarrow X'$ the induced map of 1-point compactifications. Recall that a smooth $n$-manifold $X$ is \textit{stably parallelizable} if it can be smoothly embedded in $\mathbb{R}^{n+k}$, for some $k\geq 1$, with trivial normal bundle. The following lemma is well known. We give a proof which will be helpful in preparation for the Proposition \ref{prop:compatible-splitting}. \begin{lem}[Splitting the top cell]\label{lem:splitting} Let $W$ be a stably parallelizable closed $n$-manifold. Then for $k\ge n$, there is a homotopy equivalence $ S^{n+k}\vee Z_W\to \Sigma^kW$, where $Z_W$ is a finite $CW$-complex of dimension $< n+k$. \end{lem} \begin{proof} Give $W$ a cell structure with a single $n$-cell, and give $\Sigma^kW$ the induced cell structure, which has a single $(n+k)$-cell. Let $Z=(\Sigma^kW)^{(n+k-1)}$ be the $(n+k-1)$-skeleton. There is a cofiber sequence \[Z\xrightarrow{i} \Sigma^kW\xrightarrow{q} S^{n+k}\] Since $W$ is stably parallelizable, there is a framed Whitney embedding $j:W\times D^k\hookrightarrow\mathbb{R}^{n+k}$. The map \[p:S^{n+k}\xrightarrow{j'}\Sigma^k(W_+)\rightarrow\Sigma^kW\] is a right inverse to the map $q$ (up to homotopy) since the composition $q\circ p:S^{n+k}\rightarrow S^{n+k}$ has degree 1. {\it Claim.} The map $p\vee i: S^{n+k}\vee Z\rightarrow \Sigma^kW$ is a homotopy equivalence. {\it Proof of Claim.} Since the domain and codomain are simply connected, it suffices to show that $p\vee i$ is a homology equivalence by Whitehead's theorem \cite[Cor.\ 4.33]{hatcher}. It is easy to see that $p\vee i$ induces an isomorphism on $H_\ell$ for $\ell\le n+k-2$ since $Z$ is the $(n+k-1)$ skeleton; see e.g.\ \cite[Lem.\ 2.34(c)]{hatcher}. It remains to treat the cases $\ell=n+k-1$ and $\ell=n+k$. For $\ell=n+k$, the composition $S^{n+k}\vee Z\xrightarrow{p\vee i}\Sigma^kW\xrightarrow{q} S^{n+k}$ induces an isomorphism on $H_{n+k}$ (since $q\circ p$ has degree 1), and since each of these spaces has $H_{n+k}=\mathbb{Z}$, it follows that $(p\vee i)_*:H_{n+k}(S^{n+k}\vee Z)\rightarrow H_{n+k}(\Sigma^kW)$ is an isomorphism (and also that $q_*:H_{n+k}(\Sigma^kW)\rightarrow H_{n+k}(S^{n+k})$ is an isomorphism). For $\ell=n+k-1$, it suffices to show that $i_*:H_{n+k-1}(Z)\rightarrow H_{n+k-1}(\Sigma^kW)$ is injective. Considering the long-exact sequence of the pair $(\Sigma^kW,Z)$, it is equivalent to show that the homomorphism $H_{n+k}(\Sigma^kW)\rightarrow H_{n+k}(\Sigma^kW,Z)$ is surjective. This homomorphism can be identified with $q_*:H_{n+k}(\Sigma^kW)\rightarrow H_{n+k}(\Sigma^kW/Z)$, which we observed is an isomorphism in the preceding paragraph. This proves the claim, and finishes the proof of the lemma. \end{proof} \begin{prop}[Compatible splitting]\label{prop:compatible-splitting} Let $\pi:T^n\rightarrow Q$ be the quotient by a free action of $G=\mathbb{Z}/d\mathbb{Z}\curvearrowright T^n$. Fix $k\ge n$ and let $\Sigma^kT^n\simeq S^{n+k}\vee Z_{T^n}$ and $\Sigma^kQ\simeq S^{n+k}\vee Z_{Q}$ be splittings as in Lemma \ref{lem:splitting} (these exist by Proposition \ref{prop:parallelizable}). Then the map \begin{equation}\label{eqn:cross-term}S^{n+k}\hookrightarrow S^{n+k}\vee Z_{T^n}\xrightarrow{\simeq}\Sigma^kT^n\xrightarrow{\Sigma^k(\pi)}\Sigma^kQ\xrightarrow{\simeq} S^{n+k}\vee Z_Q\twoheadrightarrow Z_Q,\end{equation} where the fourth map is a homotopy inverse to the splitting of Lemma \ref{lem:splitting}, is homotopically trivial. \end{prop} We do not know a reason for Proposition \ref{prop:compatible-splitting} to be true for general covering spaces. A key property of $Q$ used in the proof below is that $Q$ is a mapping torus of a homeomorphism of a stably-parallelizable manifold. \begin{proof}[Proof of Proposition \ref{prop:compatible-splitting}] Set $G=\langle f\rangle$. Fix an equivariant embedding $T^{n-1}\hookrightarrow V$ into a $\mathbb{R}[G]$-module $V$; c.f.\ \cite{palais,mostow}. Without loss of generality, we can assume that the action $f\curvearrowright V$ is orientation-preserving (if not, replace $V$ by $V\oplus V$, for example). Let $f_t$ be a homotopy in $\SO(V)$ from $f$ to the identity. We assume this homotopy takes place for $t\in(0,\infty)$, with $f_t=\id$ for $t\le 1$ and $f_t=f$ for $t\ge2$. The map $F(v,t)=(f_t(v),t)$ is a homeomorphism of $V\times(0,\infty)$. Let $M_F$ be the mapping torus of $F$. We can view $M_F$ as a bundle \[V\rightarrow M_F\rightarrow \mathbb{R}^2\setminus\{0\}.\] Since the bundle is trivial near $0$, we can extend $M_F$ to a bundle $V\rightarrow \widehat M_F\rightarrow\mathbb{R}^2$. This latter bundle is trivial $\widehat M_F\cong V\times\mathbb{R}^2$ since $\mathbb{R}^2$ is contractible. By construction, $Q=M_f$ embeds in $M_F\subset \widehat M_F$. Now we lift to an equivariant embedding of $T^n$. Identify $\mathbb{R}^2\cong\mathbb{C}$, and consider the $d$-fold cover \[\phi:V\times\mathbb{C}\rightarrow V\times\mathbb{C}\>\>\>\text{ given by $\>\>\>(v,z)\mapsto(v,z^d)$.}\] This is a regular cover, branched over $V\times\{0\}$. The pre-image of $M_f$ under this cover is $M_{f^d}=M_{\id}=T^n$. Thus we have an embedding $T^n\hookrightarrow V\times\mathbb{R}^2$ that is equivariant with respect to the deck group actions of the coverings $\pi:T^n\rightarrow M_f$ and $\phi:V\times\mathbb{R}^2\rightarrow V\times\mathbb{R}^2$, and the quotient by these actions yields an embedding $Q=M_f\hookrightarrow V\times\mathbb{R}^2$. Since $T^n$ and $Q$ are stably parallelizable by Lemma \ref{prop:parallelizable}, the normal bundles of $T^n\subset V\times\mathbb{R}^2$ and $Q\subset V\times\mathbb{R}^2$ are trivial. Thus we have a commutative diagram in the category of $G$-spaces. \begin{equation*} \xymatrix{ T^n\times D^k\ar@{^{(}->}[r]^-{j_{T^n}}\ar[d]_{\pi} & V\times\mathbb{R}^2\ar[d]^{\phi}\\ Q\times D^k\ar@{^{(}->}[r]^-{j_{Q}} & V\times\mathbb{R}^2 } \end{equation*} We use collapse maps of the embeddings $j_{T^n},j_Q$ to get a commutative diagram \begin{equation}\label{eqn:compatible-splitting} \xymatrix{ S^{n+k}\ar[r]^{p_{T^n}}\ar[d]_{\phi'} & \Sigma^kT^n\ar[d]^{\Sigma^k(\pi)}\\ S^{n+k}\ar[r]^{p_Q} &\Sigma^kQ } \end{equation} For $W=T^n$ or $Q$, the maps $p_W:S^{n+k}\rightarrow\Sigma^kW$ are the maps that appear in the proof of Lemma \ref{lem:splitting}. In particular, the composition \begin{equation}\label{eqn:homotopically-trivial}S^{n+k}\xrightarrow{p_Q}\Sigma^kQ\simeq S^{n+k}\vee Z_Q\twoheadrightarrow Z_Q\end{equation} is homotopically trivial. Then the composition (\ref{eqn:cross-term}) is homotopically trivial because it factors through (\ref{eqn:homotopically-trivial}) by virtue of diagram (\ref{eqn:compatible-splitting}). \end{proof} We now use Proposition \ref{prop:compatible-splitting} to prove that there is a ``compatible splitting" of \[\pi^*:[Q,\TopO]\rightarrow[T^n,\TopO].\] Let $\pi:T^n\rightarrow Q$ be the quotient by a free action of $G=\mathbb{Z}/d\mathbb{Z}$. Let $u_Q:D^n\hookrightarrow Q$ be an embedded disk, chosen sufficiently small so that it lifts to an embedding $\tilde u:\sqcup_dD^n\hookrightarrow T^n$. Let $u_{T^n}:D^n\hookrightarrow T^n$ be an embedded disk that contains the image of $\tilde u$, so $\tilde u$ factors as $\sqcup_d D^n\xrightarrow{j} D^n\xrightarrow{u_{T^n}} T^n$. This leads to the following commutative diagram of spaces. \[\begin{xy} (40,0)*+{S^n}="A"; (0,0)*+{T^n}="B"; (40,-30)*+{S^n}="C"; (40,-15)*+{\bigvee_dS^n}="D"; (0,-30)*+{Q}="E"; {\ar"B";"A"}?*!/_3mm/{u_{T^n}'}; {\ar "B";"D"}?*!/^3mm/{\tilde u'}; {\ar "A";"D"}?*!/_3mm/{j'}; {\ar "D";"C"}?*!/_3mm/{\Delta}; {\ar "B";"E"}?*!/^3mm/{\pi}; {\ar "E";"C"}?*!/^3mm/{u_Q'}; \end{xy}\] Here the map $\Delta$ is the identity map on each $S^n$. The composition $\Delta\circ j':S^n\rightarrow S^n$ has degree $d$. Suspending this diagram and combining with Diagram (\ref{eqn:compatible-splitting}), we obtain \begin{equation}\label{eqn:splitting-diagram} \xymatrix{ S^{n+k}\ar[r]^{p_{T^n}}\ar[d]_{\mathrm{deg}=d} & \Sigma^kT^n_+\ar[r]^{u'_{T^n}}\ar[d] & S^{n+k}\\ S^{n+k}\ar[r]^{p_{Q}} & \Sigma^kQ_+\ar[r]^{u'_{Q}} & S^{n+k} } \end{equation} The composition $S^{n+k}\rightarrow S^{n+k}$ in each row is a degree-1 map. Recalling that $\TopO$ is an infinite loop space, let $Y$ be a space such that $\Omega^kY\simeq\TopO$. Apply $[-,Y]$ to Diagram (\ref{eqn:splitting-diagram}), and use the adjunction $[A,\Omega B]\cong[\Sigma A,B]$ to arrive at the following diagram. \begin{equation*} \xymatrix{ [S^n,\TopO]\ar[r]^{(u'_Q)^*} &[Q,\TopO]\ar[r]^{p^*_Q}\ar[d]^{\pi^*} & [S^n,\TopO]\ar[d]^{\mu_d}\\ [S^n,\TopO]\ar[r]^{(u'_{T^n})^*} &[ T^n,\TopO]\ar[r]^{p^*_{T^n}} &[S^n,\TopO] } \end{equation*} Here $\mu_d$ is multiplication by $d$. We have proved the following corollary. \begin{cor}\label{cor:splitting} The maps $(u'_Q)^*$ and $(u'_{T^n})^*$ are split injections, and there exist splittings $p_Q^*,p_{T^n}^*$ with the property that \begin{equation}\label{eqn:compatible}p_{T^n}^*\circ\pi^*=\mu_d\circ p_Q^*.\end{equation} \end{cor} \subsection{Finishing the proof of Theorem \ref{thm:tori}} In Proposition \ref{prop:rigidity-tori}(ii), we showed that the concordance class $((T^n\#\Sigma)/G,h\circ\overline\iota)\in S(\overline T)$ maps to $(T^n\#\Sigma,\iota)$ under $\pi^*$. By Corollary \ref{cor:splitting}, $U$ is concordant, hence diffeomorphic (by \cite[Essay I, Theorem 4.1]{kirby-siebenmann}) to $\overline T\#\widehat\Sigma$ for some $\widehat\Sigma\in\Theta_n$. By Proposition \ref{prop:rigidity-tori}(i), the action $G\curvearrowright T^n\#\Sigma$ is topologically conjugate to an isometric action on $T^n$. Therefore, we can apply Lemma \ref{lem:standard-actions} to conclude that the action of $G$ on $T^n\#\Sigma$ is standard. \section{Actions on exotic hyperbolic 7-manifolds (Theorem \ref{thm:hyperbolic})}\label{sec:hyperbolic} In this section we prove Theorem \ref{thm:hyperbolic}. The general strategy is similar to the proof of Theorem \ref{thm:tori}. Assuming that $G$ acts freely on $M\#\Sigma$, we find an isometric action $G'\curvearrowright M$ and show that $(M\#\Sigma,\iota)$ is in the image of the homomorphism \[\pi^*:[M/G',\TopO]\rightarrow[M,\TopO] \] induced by the quotient map $\pi:M\rightarrow M/G'$ (Proposition \ref{prop:rigidity-hyperbolic}). We would like to use this to show that $(M\#\Sigma)/G$ is diffeomorphic to $M\#\widehat\Sigma$ for some $\widehat\Sigma\in\Theta_n$. Here there is some difficulty, as we are not able to prove an analogue of the space-level splitting of Proposition \ref{prop:compatible-splitting}. Instead we study $\pi^*$ using the Atiyah--Hirzebruch spectral sequence. Our inability to resolve extension problems in the spectral sequence ultimately forces us to restrict to dimension 7. We argue in two steps. \subsection*{Step 1: rigidity} In this step we show that if $G$ acts freely on $M\#\Sigma$, then there exists a free, isometric action $G'\curvearrowright M$ such that if $\pi:M\rightarrow M/G'$ is the quotient map, then the smooth structure $(M\#\Sigma,\iota)$ is in the image of the homomorphism \[\pi^*:[M/G',\TopO]\rightarrow[M,\TopO].\] This statement is proved in two steps, which are stated in Proposition \ref{prop:rigidity-hyperbolic}. These statements, which do not use the assumption $\dim M=7$, will be used again for the proof of Theorem \ref{thm:asymmetric}. \begin{prop}\label{prop:rigidity-hyperbolic} Fix a closed hyperbolic $n$-manifold $M$, an exotic $n$-sphere $\Sigma$, and a finite subgroup $G<\Diff^+(M\#\Sigma)$ acting freely on $M\#\Sigma$. \begin{enumerate} \item[(i)] There exists a subgroup $G'<\Isom(M)$ and a homeomorphism $M\#\Sigma\rightarrow M$ that is equivariant with respect to some isomorphism $G\cong G'$. \item[(ii)] Denoting the quotient map $\pi:M\rightarrow M/G'$, then the smooth structure $(M\#\Sigma,\iota)$ is in the image of the homomorphism \[\pi^*:[M/G',\TopO]\rightarrow[M,\TopO].\] \end{enumerate} \end{prop} Proposition \ref{prop:rigidity-hyperbolic}(i) is similar to part of \cite[Thm.\ 1.5]{CLW}, which says that if $\Isom^+(M)$ acts freely on $M$, then every finite subgroup of $\Homeo^+(M)$ is conjugate into $\Isom^+(M)$. However, in Proposition \ref{prop:rigidity-hyperbolic}, we do not assume that the full group $\Isom^+(M)$ acts freely; nevertheless our proof of Proposition \ref{prop:rigidity-hyperbolic} is similar to the corresponding part of the proof of \cite[Thm.\ 1.5]{CLW}. \begin{proof}[Proof of Proposition \ref{prop:rigidity-hyperbolic}] Let $\iota:M\#\Sigma\rightarrow M$ be the standard homeomorphism defined in \S\ref{sec:smoothing}. We use $\iota$ to view the action of $G$ on $M\#\Sigma$ as an action of $G$ on $M$ by homeomorphisms. The induced homomorphism $G\rightarrow\Out(\pi_1(M))$ is injective by \cite{borel-isometry-aspherical}; denote the image $G'<\Out(\pi_1(M))$. By Mostow rigidity, $\Out(\pi_1(M))\cong\Isom(M)$, so $G'$ is a group of isometries of $M$. To prove the proposition, it suffices to show that the actions $G\curvearrowright M$ and $G'\curvearrowright M$ are topologically conjugate. {\it Claim.} $G'$ acts freely on $M$. {\it Proof of Claim.} The subgroup $G'<\Out(\pi_1(M))$ determines an extension \begin{equation}\label{eqn:universal-ext} \begin{xy} (-80,0)*+{1}="A"; (-60,0)*+{\pi_1(M)}="B"; (-30,0)*+{\Aut(\pi_1(M))}="C"; (0,0)*+{\Out(\pi_1(M))}="D"; (20,0)*+{1}="E"; (-80,-15)*+{1}="F"; (-60,-15)*+{\pi_1(M)}="G"; (-30,-15)*+{\Gamma}="H"; (0,-15)*+{G'}="I"; (20,-15)*+{1}="J"; {\ar"A";"B"}?*!/_3mm/{}; {\ar "B";"C"}?*!/_3mm/{}; {\ar "C";"D"}?*!/^3mm/{}; {\ar "D";"E"}?*!/^3mm/{}; {\ar"F";"G"}?*!/_3mm/{}; {\ar "G";"H"}?*!/_3mm/{}; {\ar "H";"I"}?*!/^3mm/{}; {\ar "I";"J"}?*!/^3mm/{}; {\ar@{=} "B";"G"}?*!/_3mm/{}; {\ar "H";"C"}?*!/_3mm/{}; {\ar@{^{(}->} "I";"D"}?*!/_3mm/{}; \end{xy}\end{equation} By Mostow rigidity, the extension in the top row in the Diagram (\ref{eqn:universal-ext}) is equivalent to the extension \[1\rightarrow\pi_1(M)\rightarrow N(\pi_1(M))\rightarrow\Isom(M)\rightarrow 1,\] where $N(\pi_1(M))$ denotes the normalizer in $\Isom(\mathbb H^n)$. Consequently, the group $\Gamma$ can be identified with the group of all lifts of isometries of $G'$ to the universal cover $\mathbb H^n$. Then $G'$ acts freely on $M$ if and only if $\Gamma$ is torsion-free. We prove the Claim by showing $\Gamma$ is torsion free. To show that $\Gamma$ is torsion free, we give another description of the extension of $G'$ in (\ref{eqn:universal-ext}). Recall that $G$ acts freely on $M$, so the quotient $M\rightarrow M/G$ is a covering map, which determines an extension \[1\rightarrow\pi_1(M)\rightarrow\pi_1(M/G)\rightarrow G\rightarrow 1.\] By construction, the homomorphism $G\xrightarrow{\cong} G'<\Out(\pi_1(M))$ that classifies this extension, induces an isomorphism of extensions \[\begin{xy} (-70,0)*+{1}="A"; (-50,0)*+{\pi_1(M)}="B"; (-20,0)*+{\pi_1(M/G)}="C"; (10,0)*+{G}="D"; (30,0)*+{1}="E"; (-70,-15)*+{1}="F"; (-50,-15)*+{\pi_1(M)}="G"; (-20,-15)*+{\Gamma}="H"; (10,-15)*+{G'}="I"; (30,-15)*+{1}="J"; {\ar"A";"B"}?*!/_3mm/{}; {\ar "B";"C"}?*!/_3mm/{}; {\ar "C";"D"}?*!/^3mm/{}; {\ar "D";"E"}?*!/^3mm/{}; {\ar"F";"G"}?*!/_3mm/{}; {\ar "G";"H"}?*!/_3mm/{}; {\ar "H";"I"}?*!/^3mm/{}; {\ar "I";"J"}?*!/^3mm/{}; {\ar@{=} "B";"G"}?*!/_3mm/{}; {\ar "C";"H"}?*!/_3mm/{\cong}; {\ar "D";"I"}?*!/_3mm/{\cong}; \end{xy}\] The group $\pi_1(M/G)$ is torsion-free because $M/G$ is a closed aspherical manifold. Thus $\Gamma$ is torsion free. This completes the proof of the Claim. It remains to obtain a homeomorphism $M\rightarrow M$ that conjugates the actions of $G$ and $G'$. By the Borel conjecture for hyperbolic manifolds \cite[Cor.\ 10.5]{FJ-borel-hyperbolic}, the isomorphism $\pi_1(M/G)\cong\Gamma\cong\pi_1(M/G')$ is induced by a homeomorphism $h:M/G\cong M/G'$. By construction, this homeomorphism lifts to an equivariant homeomorphism $\widetilde h:M\rightarrow M$, as desired. This completes the proof of $(i)$. In order to prove $(ii)$, we note from part $(i)$ that we have the a commutative diagram \begin{equation}\label{eqn:rigidity-hyperbolic} \begin{xy} (-10,0)*+{M}="A"; (15,0)*+{M}="B"; (-10,-15)*+{M/G}="C"; (15,-15)*+{M/G'}="D"; (-35,0)*+{M\#\Sigma}="E"; (-35,-15)*+{(M\#\Sigma)/G}="F"; {\ar"A";"B"}?*!/_3mm/{\widetilde h}; {\ar "B";"D"}?*!/_3mm/{\pi}; {\ar "A";"C"}?*!/^3mm/{}; {\ar "C";"D"}?*!/_3mm/{h}; {\ar "E";"A"}?*!/_3mm/{\iota}; {\ar "F";"C"}?*!/_3mm/{\overline\iota}; {\ar "E";"F"}?*!/_3mm/{}; \end{xy}\end{equation} As in the proof of Proposition \ref{prop:rigidity-tori}, from this diagram, we conclude that the homomorphism \[\pi^*:S(M/G')\cong[M/G',\TopO]\xrightarrow{}[M,\TopO]\cong S(M)\] sends $\big((M\#\Sigma)/G, h\circ\overline\iota)$ to $(M\#\Sigma,\widetilde h\circ\iota)$. By Lemma \ref{lem:concordance-hyperbolic}, the smooth structures $(M\#\Sigma,\widetilde h\circ\iota)$ and $(M\#\Sigma,\iota)$ are concordant, so $(M\#\Sigma,\iota)$ is in the image of $\pi^*$. \end{proof} \subsection*{Step 2: computation with the Atiyah--Hirzebruch spectral sequence} Consider the Atiyah--Hirzebruch spectral sequence for the cohomology theory $\mathbb{E}^*$ determined by the infinite loop space $\TopO$, so that $\mathbb{E}^0(M)=[M,\TopO]$. This spectral sequence has $E_2$-page \[E_2^{p,q}=H^p(M;\pi_{-q}(\TopO)).\] Recall that $\pi_k(\TopO)=\Theta_k$ if $k\neq 3$ and $\pi_3(\TopO)\cong\mathbb{Z}/2\mathbb{Z}$. In particular $\pi_k(\TopO)=0$ for $k\in\{0,1,2,4,5,6\}$. Thus the spectral sequence yields an exact sequence \[H^7(M;\Theta_7)\xrightarrow{c}[M,\TopO]\xrightarrow{q} H^3(M;\mathbb{Z}/2\mathbb{Z})\rightarrow0\] Identifying $H^7(M;\Theta_7)\cong\Theta_7$, the homomorphism $c$ is the map $\Sigma\mapsto(M\#\Sigma,\iota)$. (Aside: We will not need to interpret the homomorphism $q$, but it can be identified with the natural map $[M,\TopO]\rightarrow[M,\TopPL]$ that sends a smooth structure to its corresponding PL structure.) The map $\pi:M\rightarrow M/G'$ induces a map of spectral sequences and a commutative diagram \begin{equation*} \xymatrix{ \Theta_7\ar[r]^-{c}\ar[d]^{\cdot |G|} & [M/G',\TopO]\ar[d]^{\pi^*}\ar[d]^{\pi^*}\ar[r]^-{q} &H^3(M/G';\mathbb{Z}/2\mathbb{Z})\ar[d]^{\pi^*}\\ \Theta_7\ar[r]^-{c}&[M,\TopO]\ar[r]^-{q}&H^3(M;\mathbb{Z}/2\mathbb{Z}) } \end{equation*} The left vertical map is multiplication by $|G|$, which is the degree of the cover $\pi$. As $|G|$ is odd, the right vertical map is injective by a transfer argument \cite[Prop.\ 3G.1]{hatcher}. To complete the proof of Theorem \ref{thm:hyperbolic}, we note that by Step 1, $(M\#\Sigma,\iota)=\pi^*(x)$, where $x=((M\#\Sigma)/G,h\circ\overline\iota)$; c.f.\ Diagram (\ref{eqn:rigidity-hyperbolic}). Since $(M\#\Sigma)=c(\Sigma)$, we have $0=q(\pi^*(x))=\pi^*(q(x))$, which implies that $q(x)=0$ since the right vertical map is injective. Thus $x=c(\widehat\Sigma)$ for some $\Sigma\in\Theta_7$, i.e.\ $(M\#\Sigma)/G$ is concordant, hence diffeomorphic, to $(M/G')\#\widehat\Sigma$. By Proposition \ref{prop:rigidity-hyperbolic}(i), the action $G\curvearrowright M\#\Sigma$ is topologically conjugate to an isometric action on $M$. Therefore, we can apply Lemma \ref{lem:standard-actions} to conclude that the action of $G$ on $M\#\Sigma$ is standard. \qed \section{Asymmetric smoothings (Theorem \ref{thm:asymmetric})}\label{sec:asymmetric} Recall from Proposition \ref{prop:rigidity-hyperbolic} that if $M$ is a closed hyperbolic manifold and $G$ acts freely on $M\#\Sigma$, then the concordance class of $(M\#\Sigma,\iota)$ is in the image of a certain homomorphism \[\pi^*:[M/G',\TopO]\rightarrow[M,\TopO].\] We would like to use this to conclude that $M$ satisfies the divisibility property (Definition \ref{defn:divisibility}), similar to Step 2 in the proof of Theorem \ref{thm:tori}. If we could show this, then it would suffice to find $M$ and $\Sigma$ with the property that $\Sigma$ is not divisible by $|G|$ for any nontrivial group $G<\Isom^+(M)$. Unfortunately, we don't know how to prove that hyperbolic manifolds satisfy the divisibility property in general (it seems difficult to produce a geometric construction that would yield a version of Proposition \ref{prop:compatible-splitting} in the hyperbolic case). Instead, as in the proof of Theorem \ref{thm:hyperbolic}, we study $\pi^*$ using the Atiyah--Hirzebruch spectral sequence. Here the difficulty is (as usual) potentially nontrivial differentials and extension problems, but we show these issues can be avoided for a proper choice of $M,\Sigma$ and by localizing $\TopO$ at an odd prime. \begin{proof}[Proof of Theorem \ref{thm:asymmetric}]\ \subsection*{Step 1: the construction} Fix $n_0\geq 5$, $d\ge1$, and choose $n=4k-1\ge n_0$ and an odd prime $p$ such that the $p$-torsion subgroup of $bP_{n+1}$ is nontrivial and the $p$-torsion subgroup of $bP_{m+1}$ is trivial for $m<n$. This is possible because the set of primes that divide $|bP_{4k}|$ for some $k$ is infinite. For example, $|bP_{4k}|$ is divisible by $2^{2k-1}-1$ (see \cite[\S7]{kervaire-milnor}), and it is not difficult to show that if $s,t$ are relatively prime, then $2^s-1$ and $2^t-1$ are relatively prime. Let $\mathbb{Z}_{(p)}$ denote the set of rational numbers with denominator relatively prime to $p$. The group $(bP_{n+1})_{(p)}:=bP_{n+1}\otimes\mathbb{Z}_{(p)}$ is the $p$-torsion of $bP_{n+1}$. Since $bP_{n+1}$ is cyclic, $(bP_{n+1})_{(p)}\cong\mathbb{Z}/p^a\mathbb{Z}$ for some $a\ge1$. Choose a generator $\Sigma\in (bP_{n+1})_{(p)}$. Next choose a closed oriented hyperbolic $n$-manifold $M$ such that (i) $\Isom^+(M)=\Isom(M)$, (ii) $\Isom(M)$ is a $p$-group where every element has order divisible by $p^a$, and (iii) $\Isom(M)$ acts freely on $M$. Such examples exist by the construction of Belolipetsky--Lubotzky \cite[Thm.\ 1.1]{belolipetsky-lubotzky}; see also \cite[Thm.\ 6]{BT-hyperbolic}. \subsection*{Step 2: the computation.} Take $M$ and $\Sigma$ as in Step 1. We claim that $N=M\#\Sigma$ is asymmetric. Fix a finite order element $g\in\Diff^+(M\#\Sigma)$ and denote $G=\pair{g}$. Suppose for a contradiction that $g\neq\id_N$. By a result of Borel \cite{borel-isometry-aspherical}, the induced map $G\rightarrow\Out(\pi_1(N))\cong\Isom(M)$ is injective, so the order of $g$ is $p^b$ for some $b\ge a$. By Proposition \ref{prop:rigidity-hyperbolic} , there is a degree $|G|$ covering map $\pi:M\rightarrow\overline M$ and $x\in[\overline M,\TopO]$ such that $\pi^*(x)=(M\#\Sigma,\iota)$, where $\pi^*:[\overline M,\TopO]\rightarrow[M,\TopO]$. To explain the remainder of the argument, we consider the following commutative diagram. \begin{equation}\label{eqn:hyperbolic-diagram} \begin{xy} (-70,0)*+{[\overline M,\TopO]}="A"; (-70,-15)*+{[\overline M,\TopO_{(p)}]}="B"; (-70,-30)*+{[\overline M,B]}="C"; (-30,0)*+{[M,\TopO]}="D"; (-30,-15)*+{[M,\TopO_{(p)}]}="E"; (-30,-30)*+{[M,B]}="F"; (10,0)*+{[S^n,\TopO]}="G"; (10,-15)*+{[S^n,\TopO_{(p)}]}="H"; (10,-30)*+{[S^n,B]}="I"; (26,0)*+{\cong\Theta_n}="J"; (34,-15)*+{\cong\Theta_n\otimes\mathbb{Z}_{(p)}}="K"; (30,-30)*+{\cong bP_{n+1}\otimes\mathbb{Z}_{(p)}}="L"; {\ar"A";"B"}?*!/_3mm/{}; {\ar "B";"C"}?*!/_3mm/{}; {\ar "D";"E"}?*!/^3mm/{}; {\ar "E";"F"}?*!/^3mm/{}; {\ar "G";"H"}?*!/^3mm/{}; {\ar "H";"I"}?*!/^3mm/{}; {\ar "A";"D"}?*!/_3mm/{\pi^*}; {\ar "B";"E"}?*!/^3mm/{}; {\ar "C";"F"}?*!/_3mm/{0}; {\ar "G";"D"}?*!/^3mm/{(i')^*}; {\ar "H";"E"}?*!/^3mm/{}; {\ar "I";"F"}?*!/^3mm/{\cong}; \end{xy}\end{equation} In the top row, the map $i':M\rightarrow S^n$ is the collapse map induced by the inclusion of a disk $i:D^n\hookrightarrow M$. The vertical maps are induced by maps \[\TopO\rightarrow\TopO_{(p)}\to B\times C\twoheadrightarrow B.\] where the second arrow is a homotopy inverse to the equivalence of Theorem \ref{thm:local-splitting}. {\it Claim.} $[M,B]\cong H^n(M;\pi_n(B))\cong bP_{n+1}\otimes\mathbb{Z}_{(p)}$ and similarly for $\overline M$. {\it Proof of Claim.} We prove this using the Atiyah--Hirzebruch spectral sequence. As discussed in \S\ref{sec:smoothing}, this spectral sequence has $E_2$-page \[E_2^{i,-j}=H^i(M;\pi_j(B)),\] and converges to $\mathbb E^{i-j}(M)$, where $\mathbb E^*$ denotes the cohomology theory associated to the infinite loop space $B$. In particular, to determine, $[M,B]=\mathbb E^0(M)$, we focus on the terms $E_2^{i,-i}=H^i(M;\pi_i(B))$. By our choice of $p$, and from the fact that $M$ is a closed, oriented $n$-manifold, we have \[H^i(M;\pi_i(B))=\begin{cases}\mathbb{Z}/p^a\mathbb{Z}&i=n\\0&\text{else}\end{cases}\] Furthermore, by construction $\pi_k(B)=bP_{n+1}\otimes\mathbb{Z}_{(p)}$ is 0 for $k<n$, so the term $E_2^{n,-n}$ receives no nontrivial differentials, and the claim follows. The induced map \[H^n(\pi):H^n(\overline M;\pi_n(B))\cong\mathbb{Z}/p^a\mathbb{Z}\rightarrow\mathbb{Z}/p^a\mathbb{Z}\cong H^n(M;\pi_n(B))\] is multiplication by $\deg(M\xrightarrow{\pi}\overline M)=|G|$, so $H^n(\pi)$ is the zero map because $p^a$ divides $|G|$ by construction. This explains the arrow labeled ``0" in Diagram (\ref{eqn:hyperbolic-diagram}). Now we conclude. On the one hand, the image of $(M\#\Sigma,\iota)$ under $[M,\TopO]\rightarrow [M,B]$ is nonzero because $(M\#\Sigma,\iota)=(i')^*(\Sigma)$, and the ``right side" of Diagram (\ref{eqn:hyperbolic-diagram}) commutes. On the other hand, $(M\#\Sigma,\iota)$ is in the kernel of $[M,\TopO]\rightarrow[M,B]$ because $(M\#\Sigma,\iota)=\pi^*(x)$, and the ``left side" of Diagram (\ref{eqn:hyperbolic-diagram}) commutes. This contradiction implies that our finite order element $g\in\Diff(N)$ must have been trivial, and this completes the proof of Theorem \ref{thm:asymmetric}. \end{proof} \bibliographystyle{amsalpha}
\section{Introduction} The study on the differential effects of ethnicity requires researchers to have ethnic information available in a dataset. However, such information is usually not readily available\footnote{ Health care is one of the areas that must be studied for ethnic disparities in insurance plans, and researchers in this field should deal with the missing ethnic information~\citep{fiscella2006}. }. When only names are available in the dataset, one naturally wants to predict people's ethnicity based on their names, as names are usually highly correlated with their races. In fact, surname analysis has been used for many years to identify ethnicity\footnote{ See~\cite{fiscella2006} for a survey. }, but the application of deep learning can make it even simpler, as illustrated by~\cite{sood2018}. Herein, a novel approach to predict ethnicity from names is proposed and an R package is provided \texttt{rethnicity}\footnote{ https://github.com/fangzhou-xie/rethnicity }. The developed method achieves a good performance, is fast, and free. The rest of the article is organized as follows. Section~\ref{sec:methodology} describes the methodology of the package. Section~\ref{sec:data} discusses some of the model’s implementation details. Section~\ref{sec:feature} highlights the notable features unique to the package. Section~\ref{sec:comparison} compares its availability, accuracy, and performance against other solutions. Section~\ref{sec:application} presents an example as a code snippet that can be used to analyze racial differences in political donations. Finally, Section~\ref{sec:conclusion} concludes the study. \section{Methodology}\label{sec:methodology} This section introduces the methodology of the prediction method provided by the R package and the procedures used to develop it. \subsection{Undersampling for the Imbalanced Racial Distribution}\label{sec:methodology-undersampling} Most classification algorithms assume a relatively balanced dataset and equal misclassification cost~\citep{sun2009}. When applying them on imbalanced data, where the instances of some classes are significantly larger or smaller than other classes, the algorithm will mainly focus on the majority class and hence ignore the minority classes. One example is fraud detection, where most of the transactions are normal, but a few are fraudulent~\citep{fawcett1997}. This is also a concern in our application. An attempt is made to predict ethnic groups from people's names, which is a natural example of classifying imbalanced data\footnote{ The dataset from Florida Voter Registration~\citep{sood2017} was used in this study, and the predicted ethnic groups are defined in the U.S. context. The same methodology can be applied to build a classifier for another country or region if a proper dataset with both names and races is available. }. To overcome this problem, one important method is to oversample the minority class \citep{chawla2002,fernandez2018}. However, in this study, because abundant data points are available, the majority classes were undersampled to achieve a balanced dataset. This will also help reduce the training and testing time for the model owing to a large dataset\footnote{ Details in Section~\ref{sec:data-source}. }. Furthermore, first names are not only associated with gender, but also with race~\citep{fryer2004}. Hence, the dataset was grouped by both ethnicity and gender, and all the groups except for the smallest one were undersampled. Two different models were trained for classifying ethnicity. One was trained using only last names, while the other was trained on first names. Therefore, it is crucial to adjust the dataset based on both gender and race to avoid disproportionate classification errors on minority classes. \subsection{Character-level Dictionary}\label{sec:methodology-dictionary} Classic natural language processing (NLP) models consider ``tokens'' to be the building blocks of languages. This appears natural to humans because words and phrases are considered the smallest elements of language in our daily use. However, for algorithms to process sentences, there is a need to tokenize them, create a vocabulary, and then build a model based on the vocabulary. This process will become cumbersome as the size of the data increases and there is a need to retain an extremely large vocabulary, where some tokens are very common, while several are extremely infrequent~\citep{zipf1936}. Moreover, the vocabulary is usually built during model training, and out-of-vocabulary (OOV) tokens may exist during inference once the model is deployed. The usual practice is to map OOV tokens to an ``unknown'' token and consider tokens that are not seen in the training process to be similar. This will inevitably lead to information loss, as some tokens are extremely informative but also infrequent (e.g., \ special words or abbreviations with domain knowledge). To overcome this, efforts have been taken in the machine learning field to build models directly on characters, instead of tokens~\citep{zhang2015,sutskever2011}\footnote{These character-level models only consider 26 English letters (and some symbols). Recently,~\cite{xue2021} proposed a byte-based model, which is fully compliant with the UTF-8 standard and can deal with non-English texts. }. It is easier to enumerate all possible characters\footnote{ In the case of English, only 26 letters are needed in addition to symbols when necessary. A larger dictionary could be used by including upper-case letters. It is more efficient to use lower-case letters for classifying names, as upper-case letters will be fewer and the model may not have enough opportunities to learn from the upper-case letters. } and maintain a dictionary of those characters, rather than a dictionary consisting of distinct tokens. Hence, in this study, OOV problems are not a concern because all the characters have been kept in the dictionary. The other benefit of using a character-level dictionary is that it significantly reduces the size of the dictionary and the parameters needed in the model, as many, if not most, parameters in are needed in NLP for capturing the meaning of tokens~\citep{xue2021}. In this way, a model can be made lightweight without sacrificing accuracy and also gain some speed in the inference stage. \subsection{Bidirectional LSTM}\label{sec:methodology-bilstm} Long short-term memory~\citep[LSTM]{hochreiter1997} has been widely used in sequence modeling since its proposal\footnote{ Some of the most recent and exciting developments in LSTM include BERT~\citep{devlin2019} and its variants. }. Moreover,~\cite{graves2005} proposed bidirectional LSTM (BiLSTM), which captures the context even better than the unidirectional LSTM model\footnote{ BiLSTM uses both forward-and backward-passing LSTMs to capture the context of sequential data, which is one of the reasons it works well. Although BiLSTM cannot be used for real-time prediction, this is less of a concern for our name classification task. }. In this package, BiLSTM is used as the model architecture for predicting race from names. The model was built with 256 units of an embedding layer and four BiLSTM layers with 512 units each. The final output layer is a dense layer of four units (equal to the number of races for the classification problem) with softmax activation function\footnote{ The test accuracy is given in~\ref{sec:comparison-accuracy}. }\textsuperscript{,}\footnote{ Last name and full name models have the same architecture but differ in terms of the dataset used for training. }. The performance of the model in terms of accuracy is listed in Table~\ref{tab:teacher-model}. \subsection{Distillation of Knowledge}\label{sec:methodology-distillation} However, training models with a character-level dictionary might be more difficult than token-level dictionary models. This might be the only drawback of using a character-level dictionary. To overcome this difficulty, a large BiLSTM model with many parameters is trained for better accuracy. However, this trained model is extremely large and would be difficult to deploy in production. Therefore, ``model distillation'' is used to compress the information into a smaller model. To compress a model,~\cite{hinton2015} proposed the ``distillation'' technique for extracting information from large models and teaching a smaller model to achieve a similar prediction\footnote{ or for using the prediction of an ensemble of models to distill information into a single small model. }. To be more precise, the ``student'' model is trained to match the ``teacher'' model, and the knowledge is transferred from the teacher to the student. In this way, the student will ``learn'' the interclass relationship better than directly learning from the data. The distillation trick is applied on the trained large model to obtain a smaller model with the same architecture but fewer parameters and layers\footnote{ The architecture of the student model includes dense, BiLSTM, and dense layers. However, there are only 32 units for dense, 64 units each for the two layers of BiLSTM\@. }. The smaller model is compressed from the larger model and becomes the model used for inference in production\footnote{ The accuracy comparison is shown in Section~\ref{sec:comparison-accuracy}. }. Table~\ref{tab:student-model} shows the test accuracy of the student (smaller) model. \subsection{Export to C++} After training the teacher and student models, the student model is exported to C++ via \texttt{frugally-deep}\footnote{ \url{https://github.com/Dobiasd/frugally-deep} } project. Hence, the model is no longer dependent on the installation of \texttt{Keras} (or \texttt{tensorflow}). Subsequently, the model is loaded directly in C++ with very few dependencies\footnote{ The \texttt{frugally-deep} is a lightweight header-only C++ project that depends only on FunctionalPlus, Eigen, and Json projects, which are all header-only projects. }. To make the model callable from R, an interface must be developed using Rcpp~\citep{eddelbuettel2011}. This will provide a wrapper around the underlying C++ code for loading the model and run the prediction for the names. Additionally, the prediction can be parallelly done by multi-threading. These features will enable the names to be processed rapidly for the prediction of ethnicity. \section{Data and Preprocessing}\label{sec:data} \subsection{Name and Ethnicity Data}\label{sec:data-source} To train the ethnicity classification model using names, we need a dataset that includes names as well as individual-level racial information. Fortunately, the Florida Voter Registration Dataset~\citep{sood2017} is an excellent candidate for this purpose. However, the dataset contains names and races for almost 13 million people in Florida, and the racial distribution is naturally imbalanced. First, the names of Native Americans\footnote{ These names are defined in the Florida Voter Registration dataset as ``American Indian or Alaskan Native.’’ } and multi-racial names were dropped because these groups have little data. Furthermore, Asian or Pacific Islanders, Hispanic, Non-Hispanic Black, and Non-Hispanic White were defined as the four categories for the classification problem\footnote{ Henceforth, these groups will be referred to as Asian, Hispanic, Black, and White. }. Table~\ref{tab:name-freq} lists the frequency of names grouped by ethnicity and gender. The undersampling procedure discussed in Section~\ref{sec:methodology-undersampling} takes the smallest group, namely, Asian Male, and randomly selects samples for all other groups to eventually have the same group size. After undersampling, each race-gender group contains the same number (i.e., 104,632) of names. \begin{table}[ht] \centering \begin{tabular}{ccrr} \toprule Race & Gender & Count Before & Count After \\ \midrule Asian & Female & 131602 & 104632 \\ Asian & Male & 104632 & 104632 \\ Black & Female & 989142 & 104632 \\ Black & Male & 717118 & 104632 \\ Hispanic & Female & 1137594 & 104632 \\ Hispanic & Male & 925623 & 104632 \\ White & Female & 4419030 & 104632 \\ White & Male & 3963833 & 104632 \\ \bottomrule \end{tabular} \caption{Count of Names, Grouped by Ethnicity and Gender.}\label{tab:name-freq}% \end{table} \subsection{Character Encoding}\label{sec:data-encoding} For the characters to be processed by the algorithm, characters must be encoded using numeric values. Because a character-level dictionary is the focus of this study, \footnote{ The 26 lower-case English letters, a space character (`` ''), an empty character (``E''), and an unknown character (``U'') are considered. Hence, the size of the dictionary is 29 }, the dictionary is small and pre-defined. It is possible to map the characters from all names to a value in the dictionary. In practice, first, upper-case letters are mapped to their lower-case counterparts, then all the punctuation symbols to space, and, finally, all other characters to ``U'' (Unknown). Furthermore, to ensure that all input data are of equal length, ``E'' (Empty) is inserted for names shorter than the threshold, and the additional characters in the names longer than the threshold are trimmed\footnote{ The threshold is ten for each name component. In other words, for the last name model, the input length is ten. The full name model takes both the first and last names, each being ten, and the final length is thus 20. }. Subsequently, the input name is transformed into a vector of integers according to the mapping described in Section~\ref{sec:methodology-dictionary}. \subsection{Sequence Padding and Alignment}\label{sec:data-alignment} The number of characters in people’s names varies, as does their encoded numeric representation. However, the model will only accept input vectors of equal length. To achieve this, it is necessary to determine the expected length of a fixed number of input vectors and process the input data such that each string has the same length. Longer strings will be truncated and shorter ones will be padded\footnote{ This process is called ``padding'' and is the usual practice in the preprocessing of RNN models. }. Therefore, after padding the sequences at 10, all surnames will have the same length after the padding process. For example, consider the last name ``Smith.'' First, the last name is converted to lower case to obtain ``smith,'' and then five Empty (``E'') characters are added to get a vector of length ten. By contrast, for ``Christensen,'' the name is first converted into lower case, and then the last ``n'' is trimmed. For the model that leverages both the first and last names, special care must be taken. Because first names also vary in length, if both the first and last names is considered as a single string, the starting point of the last name will also vary\footnote{ This fact makes the full-name model insensitive to the names with first and last names from different ethnic groups, for example, the descendants of immigrants. Early models trained without adjusting the position of the last names tend to focus more on the first names instead of the last names and tend to predict ``Andrew Yang'' as White instead of Asian. Hence, there is a need to introduce an alignment procedure. }. The solution would be to pad the first and last names separately and then concatenate them into a single vector. This guarantees the same starting position for all last names across the sample. The first and last names are both padded with ten characters so that the total concatenated input for the full name model is 20, but the last name always starts at position 11. The alignment method allows the model to recognize the difference between the first and last names, and the accuracy is higher compared with the models trained without the alignment process. \section{Features of the Package}\label{sec:feature} In this section, several notable features of the package are presented. \subsection{Native in R}\label{sec:feature-native-in-r} The R community has incorporated mature deep learning libraries from Python~\citep{falbel2021,kalinowski2021} via \texttt{reticulate} package~\citep{ushey2021}. In essence, users need to install a separate Python environment with the required libraries (e.g.,~tensorflow), and then \texttt{reticulate} would provide the interface from R to Python so that neural networks can be developed in R. In practice, this could be problematic for researchers, as this approach heavily relies on another language (Python) and may cause issues while replicating the studies. Moreover, in most applied research, researchers only need to make inferences on the dataset at hand. Installing and maintaining these libraries\footnote{ The installation processes of these libraries and their dependencies are not trivial. Even after correct installation, they take up multiple gigabytes of storage. } are usually problematic, even for veterans. To ease the burden on users, the modeling processes and deployment are separated so that end-users would only need to install minimal dependencies on their machines. After training the teacher and distilling the student model, the student model is exported to C++ via \texttt{frugally-deep}. At this stage, the model is no longer dependent on any of the deep learning frameworks. Furthermore, to run the inference of this model in R, Rcpp is used to provide an interface to the C++ model and make it callable from R. The package is henceforth considered to be lightweight, without the need to refer to external languages (e.g.,~Python) by those who need to predict ethnicity from names. \subsection{Mature Dependencies}\label{sec:feature-dependency} The \texttt{torch} package~\citep{falbel2021a} aims to build the \texttt{PyTorch} package native to R, which is in sharp contrast to the approach of \texttt{tensorflow} and \texttt{keras} for R. However, this project is experimental and not ready for production. Additionally, this approach requires the installation of the massive \texttt{torch} package. Furthemore, such an installation might not be required for many people. For the \texttt{rethnicity} package, there are only three dependencies: \texttt{Rcpp}~\citep{eddelbuettel2011}, \texttt{RcppThread}~\citep{nagler2021}, and \texttt{RcppEigen}~\citep{bates2013}. They are all being well-tested, with mature packages published on CRAN and widely used by many other packages in the R community. In particular, \texttt{Rcpp} provides an interface to C++, \texttt{RcppThread} provides the multi-threading support for fast inference, and \texttt{RcppEigen} provides a fast and efficient matrix computation of the neural network\footnote{ Apart from these three packages, it also depends on \texttt{frugally-deep} and its dependencies. But these header-only dependencies are included in the package during installation, and there is no need to link against external packages. }. \subsection{High Performance}\label{sec:feature-performance} With the rise of empirical economics, economists often find themselves dealing with much larger datasets~\citep{einav2014}. Therefore, it is critical to have packages designed considering the performance requirements to process datasets as quickly as possible. In terms of predicting ethnicity/nationality from names, some good API services\footnote{For example, \texttt{nationalize.io} (\url{https://nationalize.io/}) and \texttt{NamePrism} (\url{https://www.name-prism.com/}).} exist. However, as is the case with most API services, they are rate-limited to make their service reliable and sustainable. This may create bottlenecks for researchers who have a large collection of names waiting to be predicted. The \texttt{rethnicity} package is built with this concern in mind. By leveraging C++ and multi-threading\footnote{ This is possible because the models exported by \texttt{frugally-deep} are thread-safe. }, the package could achieve extremely fast inference speeds. To illustrate this point, the inference speed between \texttt{rethnicity} and \texttt{ethnicolr} is compared in Section~\ref{sec:comparison-performance}. \section{Comparison with Existing Packages}\label{sec:comparison} \subsection{Availability}\label{sec:comparison-availability} Table~\ref{tab:comparison} shows the differences between \texttt{rethnicity} and other solutions for predicting ethnicity from names. The comparison is made on four aspects: cost, rate limit, dependencies, and language. \begin{table}[ht] \centering \begin{tabular}{ccccc} \toprule & Ethnicity & Ethnicolr & NamePrism & nationalize.io \\ \midrule Cost & free & free & free & paid \\ Rate Limit & No & No & Yes & Yes \\ Dependency & Low & High & N/A & N/A \\ Language & R & Python & API & API \\ \bottomrule \end{tabular} \caption{ Comparison across some publicly available services/packages for predicting ethnicity from names. \texttt{rethnicity} provides a free and light-weight package for the R community without rate-limiting. }\label{tab:comparison} \end{table} \texttt{NamePrism} is free but is rate-limited to 60 requests per minute. \texttt{nationalize.io} offers 1000 free requests each day and requires a subscription to their services for more names to be processed in a day. \texttt{ethnicolr} might be the most similar in scope as \texttt{rethnicity}, However, it is written in Python and requires the installation of TensorFlow to run the inference. The installation of tensorflow might be daunting for many who only want to run the inference on a name dataset they have. In general, this study aimed to develop a simple, easy, and free package for use in the R community with guaranteed accuracy and performance, which is achieved by the \texttt{rethnicity} package. \subsection{Accuracy}\label{sec:comparison-accuracy} Tables~\ref{tab:teacher-model} and~\ref{tab:student-model} present the prediction accuracy on the test data not included during the training process. Table~\ref{tab:teacher-model} shows the accuracy of the trained teacher model. , and Table~\ref{tab:student-model} shows the accuracy of the student model. Note that the full name model performs better than the one that only leverages last name information, for both teacher and student models. Additionally, the precision of the student model degrades compared to the teacher model but is still sufficiently high and close to that of the teacher. Moreover, if we compare the results within each ethnic group, the accuracy for each group is roughly balanced, and the performance is slightly better for the minority groups. This is the case for both teacher and student models. This suggests that the undersampling approach used in this study to adjust the imbalance (described in Section~\ref{sec:methodology-undersampling}) in the dataset works well. If the results are compared to \texttt{ethnicolr}~\citep{sood2018}, \texttt{rethnicity} shows significantly better results on the prediction of Asian, Hispanic, and black people, albeit the precision is lower for white people\footnote{ The accuracies in~\cite{sood2018} are disproportionately high for white people, which might suggest that the classifier tends to always predict white to minimize loss. Therefore, adjustments are performed for an imbalanced dataset. }. \begin{table}[ht] \begin{tabular}{rrrrrrrr} \toprule & \multicolumn{3}{c}{\bfseries Full name } & \multicolumn{3}{c}{\bfseries Lastname} & \\ \cmidrule(lr){2-4}\cmidrule(lr){5-7}\cmidrule(lr){8-8} & precision & recall & f1-score & precision & recall & f1-score & support \\ \cmidrule(lr){2-4}\cmidrule(lr){5-7}\cmidrule(lr){8-8} asian & 0.87 & 0.76 & 0.81 & 0.87 & 0.69 & 0.77 & 41861 \\ black & 0.74 & 0.77 & 0.76 & 0.65 & 0.80 & 0.72 & 41904 \\ hispanic & 0.86 & 0.87 & 0.86 & 0.84 & 0.85 & 0.85 & 41940 \\ white & 0.67 & 0.73 & 0.70 & 0.62 & 0.58 & 0.60 & 41707 \\ total & 0.79 & 0.78 & 0.78 & 0.74 & 0.73 & 0.73 & 167412 \\ \bottomrule \end{tabular} \caption{Accuracy on the test data for the teacher model before distillation.}\label{tab:teacher-model} \end{table} \begin{table}[ht] \begin{tabular}{rrrrrrrr} \toprule & \multicolumn{3}{c}{\bfseries Full name } & \multicolumn{3}{c}{\bfseries Lastname} & \\ \cmidrule(lr){2-4}\cmidrule(lr){5-7}\cmidrule(lr){8-8} & precision & recall & f1-score & precision & recall & f1-score & support \\ \cmidrule(lr){2-4}\cmidrule(lr){5-7}\cmidrule(lr){8-8} asian & 0.86 & 0.73 & 0.79 & 0.84 & 0.64 & 0.73 & 41861 \\ black & 0.70 & 0.76 & 0.73 & 0.61 & 0.75 & 0.67 & 41904 \\ hispanic & 0.83 & 0.87 & 0.85 & 0.80 & 0.84 & 0.82 & 41940 \\ white & 0.67 & 0.68 & 0.68 & 0.57 & 0.53 & 0.55 & 41707 \\ total & 0.77 & 0.76 & 0.76 & 0.70 & 0.69 & 0.69 & 167412 \\ \bottomrule \end{tabular} \caption{Accuracy on the test data for the student model after distillation.}\label{tab:student-model} \end{table} \subsection{Performance}\label{sec:comparison-performance} \begin{figure}[ht] \centering \resizebox{.7\linewidth}{!}{ \includegraphics[width=\linewidth]{time_comparison.png} } \caption{ Comparison of elapsed time between \texttt{rethnicity} and \texttt{ethnicolr}. At any given sample size, the inference is run five times and then the average running time is determined as the result for the elapsed time measurement. Moreover, a comparison is also made for different numbers of threads available to \texttt{rethnicity}. The default single-threaded inference speed is shown as ``rethnicity\_0'' in the plot. The performance for inference under two-thread, four-thread, and eight-thread pool is illustrated. }\label{fig:comparison-performance} \end{figure} The performance of the package is guaranteed by leveraging distillation for model compression, C++, and multi-threading for low overhead, as discussed in Sections~\ref{sec:methodology-distillation} and~\ref{sec:feature-performance}. However, considering speed, there is a need to rigorously test the performance and compare with it the \texttt{ethnicolr} package as a baseline. Figure~\ref{fig:comparison-performance} shows that the single-threaded performance is on par with that of \texttt{ethnicolr}, and the multi-threaded mode achieve further speeds. First, the distillation method successfully compresses the model and improves performance by having a smaller model. The inference speed of the single-threaded distilled model in \texttt{rethnicity} is roughly comparable to that of the multi-threaded larger model in \texttt{ethnicolr}. This suggests that the distillation closes the gap between the speedup led by multi-threading tensorflow\footnote{ Multi-threading is the default behavior for tensorflow, based on which \texttt{ethnicolr} is implemented. \texttt{frugally-deep}, on the other hand, only uses single-thread by default. }. Second, there is extremely little overhead for multi-threading, and the speedup is almost linear in terms of the number of threads being used. The \texttt{rethnicity} package clearly inherits the efficiency of the \texttt{RcppThread} package. In practice, more threads must be used to process a large dataset, depending on the size of the dataset and the total number of threads available in the machine. \section{Using the Package}\label{sec:application} \subsection{Code Snippet} The usage of the package is straightforward, as there is only one function provided\footnote{ More examples can also be found at the GitHub repository: \href{https://github.com/fangzhou-xie/rethnicity}{\tt https://github.com/fangzhou-xie/rethnicity}. }. \begin{lstlisting}[caption={Example of the \texttt{predict\_ethnicity} function.},captionpos=b] > predict_ethnicity(firstnames = "Samuel," lastnames = "Jackson") firstname lastname prob_asian prob_black prob_hispanic prob_white race 1 Samuel Jackson 0.01741119 0.8898849 0.006667824 0.0860361 black \end{lstlisting} There are only five arguments for the function \texttt{predict\_ethnicity}: \texttt{firstnames}, \texttt{lastnames}, \texttt{method}, \texttt{threads}, and \texttt{na.rm}. The \texttt{firstnames} argument accepts a vector of strings\footnote{ Character Vector in R. }, and is only required when \\ texttt{method = `fullname'}. \texttt{lastnames} also accepts a Character Vector and is needed for both \texttt{method = `fullname'} and \texttt{method = `lastname'}. \texttt{method} can only be either \texttt{`fullname'} or \texttt{`lastname'} to indicate whether working only with last names or both first and last names. \texttt{threads} can be chosen to have an integer greater than one to leverage multi-threading support for even faster Data processing\footnote{ Theoretically, one can choose a number to equal the number of threads in the machine. The more threads used, more the overhead introduced in parallel processing, and lesser the performance boost gained. }. Finally, there is a \texttt{na.rm} argument. This allows one to remove missing values from the input names\footnote{ For the last name model, only non-missing names are retained for processing and are returned. For the full name model, because it requires both first and last names, only names with both will be processed. }. Otherwise, an error is thrown if values are missing in the input data. This guarantees that the model has the correct input data and returns meaningful predictions. \subsection{DIME data} The DIME dataset offers rich information on the finance and ideology of political campaigns~\citep{bonica2014,bonica2019}. Following the practice of~\cite{sood2018}, this study also considered this dataset to illustrate one potential usage of the \texttt{rethnicity} package. All the donors in the dataset are considered, and their races are predicted using the full-name model, then the total amount of donation separated by the predicted race is aggregated, and finally, the ratio of donations across ethnicity is calculated. The results for 2000 and 2010 are listed in Table~\ref{tab:comparison-dime}. \begin{table}[ht] \centering \begin{tabular}{rrrrr} \toprule & \multicolumn{2}{c}{\bfseries rethnicity} & \multicolumn{2}{c}{\bfseries ethnicolr} \\ \cmidrule(lr){2-3}\cmidrule(lr){4-5} & 2000 & 2010 & 2000 & 2010 \\ \cmidrule(lr){2-2}\cmidrule(lr){3-3}\cmidrule(lr){4-4}\cmidrule(lr){5-5} asian & 6.29\% & 5.90\% & 2.00\% & 2.28\% \\ black & 20.83\% & 18.00\% & 8.93\% & 7.92\% \\ hispanic & 4.01\% & 4.44\% & 3.23\% & 3.31\% \\ white & 68.87\% & 71.66\% & 85.84\% & 86.49\% \\ \bottomrule \end{tabular} \caption{ Comparison of total donations grouped by predicted race from donors' names. The right half of the table is taken from \protect\cite{sood2018}. }\label{tab:comparison-dime} \end{table} Table\ref{tab:comparison-dime} shows that, \texttt{rethnicity} suggests higher ratios of political donation when compared with \texttt{ethnicolr} results. This agrees with the accuracies in Section~\ref{sec:comparison-accuracy} and the discussion on the imbalanced classification problem discussed in Section~\ref{sec:methodology-undersampling}, where \texttt{rethnicity} reduces the error for minority groups significantly. Without the adjustment, the prediction of white people will be disproportionately higher than that of minority groups, which underestimates the monetary contribution of minority groups for the elections. \section{Conclusion}\label{sec:conclusion} This study demonstrates the methodology and potential usage of the \texttt{rethnicity} package in R. It leverages different techniques to predict ethnicities. First, undersampling was used to adjust the imbalance in the racial distribution in the dataset. Second, a character dictionary was used to reduce the dictionary size and make it independent of training data. Third, BiLSTM was chosen as the architecture owing to its superior performance in capturing context. Fourth, after training the gigantic teacher model, the information was distilled by letting it instruct a much smaller student model. Finally, the student model was exported to C++ and then loaded via Rcpp. The model was trained using the Florida Voter Registration dataset using the voters' names, along with their identified ethnicity. After training the large model, a smaller student model was also trained and tested. The objective of building this package was to make the installation and usage easier for any user interested in predicting ethnicity from names for their research. The package is entirely native in R with only dependencies being several mature packages published on CRAN\@. Additionally, it achieves a high performance by delegating heavy computation to C++ with multi-threading. The aforementioned advantages are leveraged in the \texttt{rethnicity} package, which is free, fast, and available to the R community. It also achieves a good performance, particularly for ethnic minorities. The code snippet is provided as an example of how to use the package. Application to finance and ideology Data of political candidates is also illustrated. \section*{Conflict of Interest} We wish to confirm that there are no known conflicts of interest associated with this publication and there has been no significant financial support for this work that could have influenced its outcome. \section*{Acknowledgements}\label{}
\section{Preliminaries} \subsubsection*{Finite Automata} An \emph{NFA} is a quintuple $\A = (Q,\Sigma,\delta,I,F)$, where $Q$ is the finite set of states, $\Sigma$ is the finite alphabet, $\delta \subseteq Q \times \Sigma \times Q$ is the transition relation, $I \subseteq Q$ is the set of initial states, and $F \subseteq Q$ is the set of accepting states. We write $q \xrightarrow{a} r$ to denote that $(q,a,r) \in \delta$. A finite sequence $q_0 \xrightarrow{a_1} q_1 \xrightarrow{a_2} \cdots \xrightarrow{a_n} q_n$ is called a \emph{run}; it can be summarized as $q_0 \xrightarrow{a_1 \cdots a_n} q_n$. The NFA~$\A$ \emph{recognizes} the language $L(\A) := \{w \in \Sigma^* \mid \exists\, q_0 \in I \,.\, \exists\, f \in F \,.\, q_0 \xrightarrow{w} f\}$. The NFA~$\A$ is a \emph{DFA} if $|I| = 1$ and for every $q \in Q$ and $a \in \Sigma$ there is exactly one $q'$ with $q \xrightarrow{a} q'$. The NFA~$\A$ is a \emph{UFA} if for every word $w = a_1 \cdots a_n \in \Sigma^*$ there is at most one \emph{accepting} run for~$w$, i.e., a run $q_0 \xrightarrow{a_1} q_1 \xrightarrow{a_2} \cdots \xrightarrow{a_n} q_n$ with $q_0 \in I$ and $q_n \in F$. Clearly, any DFA is a UFA. \subsubsection*{Notation $\tO$ and $\tOmega$} We use the notation $\tO(f(n))$ and $\tOmega(f(n))$ to hide polylogarithmic factors; i.e., $\tO(f(n)) = f(n) \log^{O(1)} f(n)$ and $\tOmega(f(n)) = f(n) / \log^{O(1)} f(n)$. \section{UFA Complementation} \label{sec:complement} Given two finite automata $\A_1, \A_2$, recognizing languages $L_1, L_2 \subseteq \Sigma^*$, respectively, the \emph{state complexity} of union (or intersection, or complement, etc.) is how many states may be needed for an automaton that recognizes $L_1 \cup L_2$ (or $L_1 \cap L_2$, or $\Sigma^* \setminus L_1$, etc.). It depends on the type of automaton considered, such as NFAs, DFAs, or UFAs. The state complexity has been well studied for various types of automata and language operations, see, e.g., \cite{JirasekJS18} and the references therein for some known results. For example, it was shown in~\cite{HolzerK03} that complementing an NFA with $n$~states may require $\Theta(2^n)$ states. However, the state complexity for UFAs is not yet fully understood. It was shown only in~2018 by Raskin~\cite{Raskin18} that the state complexity for UFAs and complement is not polynomial: \begin{proposition}[\cite{Raskin18}] \label{prop:Raskin18} For any $n \in \N$ there exists a UFA~$\A$ with $n$~states and unary alphabet~$\Sigma$ (i.e., $|\Sigma|=1$) such that any NFA that recognizes $\Sigma^* \setminus L(\A)$ has at least $n^{(\log \log \log n)^{\Omega(1)}}$ states. \end{proposition} This super-polynomial blowup (even for unary alphabet and even if the output automaton is allowed to be ambiguous) refuted a conjecture that it may be possible to complement UFAs with a polynomial blowup~\cite{Colcombet15}. A non-trivial upper bound (for general alphabets and outputting a UFA) was shown by Jir{\'{a}}sek et al.~\cite{JirasekJS18}: \begin{proposition}[\cite{JirasekJS18}] \label{prop:Jirasek} Let $\A$ be a UFA with $n \ge 7$ states that recognizes a language $L \subseteq \Sigma^*$. Then there exists a UFA with at most $n \cdot 2^{0.786 n}$ states that recognizes the language $\Sigma^* \setminus L$. \end{proposition} An almost tight analysis \cite{IK21} of Jir{\'{a}}sek et al.'s construction yields a slight improvement: \begin{proposition}[\cite{IK21}] \label{prop:IK21} Let $\A$ be a UFA with $n \ge 0$ states that recognizes a language $L \subseteq \Sigma^*$. Then there exists a UFA with at most $\sqrt{n+1} \cdot 2^{n/2}$ states that recognizes the language $\Sigma^* \setminus L$. \end{proposition} In this section we improve the lower bound from \cref{prop:Raskin18}: \begin{theorem} \label{thm:complement} For infinitely many $N \in \N$ there is a UFA~$\A$ with $N$~states and alphabet $\Sigma = \{0,1\}$ and finite $L(\A) \subseteq \Sigma^*$ such that any NFA that recognizes $\Sigma^* \setminus L(\A)$ has at least $N^{\tOmega(\log N)}$ states. \end{theorem} Like \cref{prop:Raskin18}, the lower bound holds even for NFAs (not just UFAs) that recognize the complement language. Unlike \cref{prop:Raskin18}, the lower bound in \cref{thm:complement} uses a binary alphabet, i.e., $|\Sigma| = 2$. In the rest of the section we prove \cref{thm:complement}. The proof uses concepts and results from communication complexity, in particular a recent result from \cite{Balodis2021FOCS}. \subsection{Communication Complexity} \label{sub:com-com} Let $D = C_1 \lor \cdots \lor C_m$ be an $n$-variate boolean formula in disjunctive normal form (DNF). DNF~$D$ has \emph{width}~$k$ if every $C_i$ is a conjunction of at most $k$ literals. We call such~$D$ a \emph{$k$-DNF}. For conjunctive normal form (CNF) formulas the width and $k$-CNFs are defined analogously. DNF~$D$ is said to be \emph{unambiguous} if for every input $x \in \{0,1\}^n$ at most one of the conjunctions~$C_i$ evaluates to true, $C_i( x ) = 1$. For any boolean function $f : \{0,1\}^n \to \{0,1\}$ define \begin{itemize} \item $\C_1(f)$ as the least $k$ such that $f$ can be written as a $k$-DNF; \item $\C_0(f)$ as the least $k$ such that $f$ can be written as a $k$-CNF; \item $\UC_1(f)$ as the least $k$ such that $f$ can be written as an unambiguous $k$-DNF. \end{itemize} Note that $\C_0(f) = \C_1(\neg f)$. The following is a recent result~\cite{Balodis2021FOCS}: \begin{theorem}[{\cite[Theorem~1]{Balodis2021FOCS}}] \label{thm:Puzzle-I} For infinitely many~$n$ there exists a boolean function $f: \{0,1\}^n \to \{0,1\}$ with $\UC_1(f) = n^{\Omega(1)}$ and $\C_0(f) = \tOmega(\UC_1(f)^2)$. \end{theorem} In words, for infinitely many~$k$ there is an unambiguous $k$-DNF such that any equivalent CNF requires width~$\tOmega(k^2)$. The bound is almost tight, as every unambiguous $k$-DNF has an equivalent $k^2$-CNF; see~\cite[Section~3]{Goos15}. We need results on two-party communication complexity; see \cite{KushilevitzNisan} for the standard textbook. Consider a ``two-party'' function $F : X \times Y \to \{0,1\}$. A set $A \times B \subseteq X \times Y$ (with $A \subseteq X$ and $B \subseteq Y$) is called a \emph{rectangle}. Rectangles $R_1, \ldots, R_k$ \emph{cover} a set $S \subseteq X \times Y$ if $\bigcup_i R_i = S$. For $b \in \{0,1\}$, the \emph{cover number} $\Cov_b(F)$ is the least number of rectangles that cover $F^{-1}(b)$. The \emph{nondeterministic (resp., co-nondeterministic) communication complexity} of~$F$ is defined as $\Non_1(F) := \log_2 \Cov_1(F)$ (resp., $\Non_0(F) := \log_2 \Cov_0(F)$). Note that $\Non_0(F) = \Non_1(\neg F)$. The nondeterministic communication complexity can be interpreted as the number of bits that two parties, holding inputs $x \in X$ and $y \in Y$, respectively, need to communicate in a nondeterministic (i.e., based on guessing and checking) protocol in order to establish that $F(x,y) = 1$; see~\cite[Chapter~2]{KushilevitzNisan} for details. The following is a ``lifting'' theorem, which allows us to transfer lower bounds on the DNF width of a boolean function to the nondeterministic communication complexity of a two-party function. \begin{theorem}[{\cite[Theorem~4]{Goos15}}] \label{thm:lifting} For any $n \in \N$ there is a function $g : \{0,1\}^b \times \{0,1\}^b \to \{0,1\}$ with $b = \Theta(\log n)$ such that for any function $f : \{0,1\}^n \to \{0,1\}$ the function $F : \{0,1\}^{b n} \times \{0,1\}^{b n} \to \{0,1\}$ defined by \[ F((x_1, \ldots, x_n), (y_1, \ldots, y_n)) = f(g(x_1,y_1), \ldots, g(x_n,y_n)) \ \text{for } x_i,y_j \in \{0,1\}^b \] satisfies $\Non_0(F) = \Omega(\C_0(f) \cdot b)$ (and thus also $\Non_1(F) = \Omega(\C_1(f) \cdot b)$). \end{theorem} Finally, we need the following simple lemma: \begin{lemma} \label{lem:NFA-CC} If a two-party function $F: \{0,1\}^m \times \{0,1\}^m \to \{0,1\}$ admits an NFA with $s$~states, i.e., there is an NFA $\A$ with $s$~states and $L(\A) = \{x y \in \{0,1\}^{2 m} \mid F(x,y) = 1\}$, then $\Cov_1(F) \le s$. \end{lemma} \begin{proof} Let $\A = (Q,\Sigma,\delta,I,F)$ be an NFA with $L(\A) = \{x y \in \{0,1\}^{2 m} \mid F(x,y) = 1\}$. We show that $F^{-1}(1)$ is covered by at most $|Q|$ rectangles. Indeed, $F^{-1}(1)$ equals \[ \bigcup_{q \in Q} (\{x \in \{0,1\}^m \mid \exists\, q_0 \in I \,.\, q_0 \xrightarrow{x} q\}) \times (\{y \in \{0,1\}^m \mid \exists\, f \in F \,.\, q \xrightarrow{y} f\}) \,. \] (Alternatively, in terms of a nondeterministic protocol, the first party, holding $x \in \{0,1\}^m$, produces a run for~$x$ from an initial state to a state~$q$ and then sends the name of~$q$, which takes $\log_2 |Q|$ bits, to the other party. The other party then produces a run for~$y$ from $q$ to an accepting state.) \end{proof} \subsection{Proof of \texorpdfstring{\cref{thm:complement}}{Theorem~\ref{thm:complement}}} For $n \in \N$, let $f: \{0,1\}^n \to \{0,1\}$ be the function from \cref{thm:Puzzle-I}, i.e., $f$ has an unambiguous $k$-DNF with $k = n^{\Omega(1)}$ (hence, $\log n = O(\log k)$) and $\C_0(f) = \tOmega(k^2)$. Let $g: \{0,1\}^b \times \{0,1\}^b \to \{0,1\}$ with $b = \Theta(\log n)$ and $F: \{0,1\}^{b n} \times \{0,1\}^{b n} \to \{0,1\}$ be the two-party functions from \cref{thm:lifting}, with $F((x_1, \ldots, x_n), (y_1, \ldots, y_n)) = f(g(x_1,y_1), \ldots, g(x_n,y_n))$. The UFA~$\A$ from the statement of \cref{thm:complement} will recognize $F^{-1}(1)$. First we argue that $F$ has an unambiguous DNF of small width. Indeed, $g$ and $\neg g$ have unambiguous $2 b$-DNFs, which can be extracted from the deterministic decision tree of~$g$. By plugging these unambiguous $2 b$-DNFs for $g$ and~$\neg g$ into the unambiguous $k$-DNF for~$f$ (and ``multiplying out''), one obtains an unambiguous $2 b k$-DNF, say~$D$, for~$F$. Over the $2 b n$ variables of~$F$, there exist at most $(2(2 b n) + 1)^{2 b k}$ different conjunctions of at most $2 b k$ literals. So $D$ consists of at most $n^{O(b k)}$ conjunctions. From~$D$ we obtain a UFA~$\A$ that recognizes $F^{-1}(1) \subseteq \{0,1\}^{2 b n}$, as follows. Each initial state of~$\A$ corresponds to a conjunction in~$D$. When reading the input $x \in \{0,1\}^{2 b n}$, the UFA checks that the corresponding assignment to the variables satisfies the conjunction represented by the initial state. This check requires at most $O(b n)$ states for each initial state. Thus, $\A$ has at most $n^{O(b k)} = 2^{\tO(k)} =: N$ states in total. On the other hand, by \cref{thm:lifting}, we have $\Non_0(F) = \Omega(\C_0(f) \cdot b) = \tOmega(k^2)$. So by \cref{lem:NFA-CC} any NFA that recognizes $F^{-1}(0)$ has at least $2^{\tOmega(k^2)}$ states. Any NFA that recognizes $\{0,1\}^* \setminus L(\A)$ can be transformed into an NFA that recognizes $F^{-1}(0) = \{0,1\}^{2 b n} \setminus L(\A)$ by taking a product with a DFA that has $2 b n + 2$ states. It follows that any NFA that recognizes $\{0,1\}^* \setminus L(\A)$ has at least $2^{\tOmega(k^2)} / (2 b n + 2) = 2^{\tOmega(k^2)} = N^{\tOmega(\log N)}$ states. \qed \section{Separation of Regular Languages by UFAs} In~\cite[Conjecture~2]{Colcombet15}, Colcombet conjectured that for any NFAs $\A_1, \A_2$ with $L(\A_1) \cap L(\A_2) = \emptyset$ there is a polynomial-sized UFA~$\A$ with $L(\A_1) \subseteq L(\A)$ and $L(\A) \cap L(\A_2) = \emptyset$. Related \emph{separability} questions are classical in formal language theory and have attracted renewed attention; see, e.g, \cite{CzerwinskiL19} and the references therein. Separating automata have also been used recently to elegantly describe quasi-polynomial time algorithms for solving parity games in an automata theoretic framework; see \cite[Chapter~3]{automata-toolbox} and~\cite{CzerwinskiD19}. In this section we refute the above-mentioned conjecture by Colcombet, even when $L(\A_2) = \Sigma^* \setminus L(\A_1)$: \begin{theorem} \label{thm:separation} For any $N \in \N$ there are NFAs $\A_1, \A_2$ with $N$~states and alphabet $\Sigma = \{0,1\}$ and finite $L(\A_1)$ and $L(\A_2) = \Sigma^* \setminus L(\A_1)$ such that any UFA that recognizes $L(\A_1)$ has at least $N^{\Omega(\log N)}$ states. \end{theorem} Loosely speaking, in our construction, NFAs $\A_1, \A_2$ recognize \emph{(sparse) set disjointness} and its complement. For $n \in \N$ write $[n] := \{1, \ldots, n\}$ and define for $k \le n$ \begin{align*} \Disj^n_k\ &:=\ \{(S,T) \mid S \subseteq [n],\ T \subseteq [n],\ |S| = |T| = k,\ S \cap T = \emptyset\}\,. \end{align*} Define also $\enc{\Disj^n_k} := \{\enc{S} \enc{T} \mid (S,T) \in \Disj^n_k\}$ where $\enc{S} \in \Sigma^n = \{0,1\}^n$ is such that the $i$th letter of $\enc{S}$ is~$1$ if and only if $i \in S$, and similarly for $\enc{T}$. Note that $\enc{S}, \enc{T}$ each contain $k$ times the letter~$1$. To prove~\cref{thm:separation} it suffices to prove the following lemma. \begin{lemma} \label{lem:separation} For any $n \in \N$ let $k := \lceil \log_2 n \rceil$. There are NFAs $\A_1, \A_2$ with $n^{O(1)}$ states and alphabet $\Sigma = \{0,1\}$ and $L(\A_1) = \enc{\Disj^n_k}$ and $L(\A_2) = \Sigma^* \setminus \enc{\Disj^n_k}$. Any UFA that recognizes $\enc{\Disj^n_k}$ has at least $n^{\Omega(\log n)}$ states. \end{lemma} In the rest of the section we prove \cref{lem:separation}. We use known results from communication complexity to show that any UFA for $\enc{\Disj^n_k}$ needs super-polynomially many states. We will give a self-contained proof of the existence of polynomial-sized NFAs for $\enc{\Disj^n_k}$ and its complement, but the main argument also comes from communication complexity, as we remark below at the end of the section. \subsection{Communication Complexity} Recall from \cref{sub:com-com} the notions of rectangles and rectangles covering a set. For a two-party function $F : X \times Y \to \{0,1\}$, the \emph{partition number} $\Par_1(F)$ is the least number of \emph{pairwise disjoint} rectangles that cover~$F^{-1}(1)$. Note that $\Cov_1(F) \le \Par_1(F)$. The \emph{unambiguous communication complexity} of~$F$ is defined as $\Una_1(F) := \log_2 \Par_1(F)$. Note that $\Non_1(F) \le \Una_1(F)$. Denote by $M(F) \in \{0,1\}^{X \times Y}$ the \emph{communication matrix}, with entries $M(F)_{x,y} = F(x,y)$. Denote by $\rk(M)$ the rank over the reals of a matrix~$M$. The following lemma, the ``rank bound'', is often used for lower bounds on the \emph{deterministic} communication complexity (a concept we do not need here), but it holds even for unambiguous communication complexity: \begin{lemma} \label{lem:rank-bound} Let $F : X \times Y \to \{0,1\}$. Then $\rk(M(F)) \le \Par_1(F)$. \end{lemma} \begin{proof} For $k = \Par_1(F)$, let $A_1 \times B_1, \ldots, A_k \times B_k$ be pairwise disjoint rectangles that cover~$F^{-1}(1)$. Each $A_i \times B_i$ defines a rank-$1$ matrix $M(i) \in \{0,1\}^{X \times Y}$ with $M(i)_{x,y} = 1$ if and only if $x \in A_i$ and $y \in B_i$. It follows from the pairwise disjointness that $M(F) = \sum_{i=1}^k M(i)$. Hence $\rk(M(F)) \le \sum_{i=1}^k \rk(M(i)) = k = \Par_1(F)$. \end{proof} The following lemma and its proof are analogous to \cref{lem:NFA-CC}. \begin{lemma} \label{lem:UFA-CC} If a two-party function $F: \{0,1\}^m \times \{0,1\}^m \to \{0,1\}$ admits a UFA with $s$~states, i.e., there is a UFA $\A$ with $s$~states and $L(\A) = \{x y \in \{0,1\}^{2 m} \mid F(x,y) = 1\}$, then $\Par_1(F) \le s$. \end{lemma} \begin{proof} Let $\A = (Q,\Sigma,\delta,I,F)$ be a UFA with $L(\A) = \{x y \in \{0,1\}^{2 m} \mid F(x,y) = 1\}$. We show that $F^{-1}(1)$ is covered by at most $|Q|$ pairwise disjoint rectangles. Indeed, $F^{-1}(1)$ equals \[ \bigcup_{q \in Q} (\{x \in \{0,1\}^m \mid \exists\, q_0 \in I \,.\, q_0 \xrightarrow{x} q\}) \times (\{y \in \{0,1\}^m \mid \exists\, f \in F \,.\, q \xrightarrow{y} f\}) \] and the rectangles do not overlap, as $\A$ is unambiguous. \end{proof} \subsection{Proof of \texorpdfstring{\cref{lem:separation}}{Lemma~\ref{lem:separation}}} First we prove the statement on UFAs. Write $\binom{[n]}{k} := \{S \subseteq [n] \mid |S| = k\}$. Let $F : \binom{[n]}{k} \times \binom{[n]}{k} \to \{0,1\}$ be the two-party function with $F(S,T) = 1$ if and only if $(S,T) \in \Disj^n_k$. It is shown, e.g., in \cite[Example~2.12]{KushilevitzNisan} that the communication matrix $M(F)$ has full rank $\binom{n}{k}$. Let $F': \{0,1\}^n \times \{0,1\}^n \to \{0,1\}$ be such that $F'(x,y) = 1$ if and only if $x y \in \enc{\Disj^n_k}$. Then $M(F)$ is a principal submatrix of~$M(F')$, so $\binom{n}{k} \le \rk(M(F'))$. Using \cref{lem:rank-bound,lem:UFA-CC} it follows that any UFA, say~$\A$, that recognizes $\enc{\Disj^n_k}$ has at least $\binom{n}{k} \ge (\frac{n}{k})^k$ states. With $k := \lceil \log_2 n \rceil$, it follows that $\A$ has $n^{\Omega(\log n)}$ states. It is easy to see that there is an NFA, $\A_2$, with $n^{O(1)}$~states and $L(\A_2) = \Sigma^* \setminus \enc{\Disj^n_k}$. Indeed, we can assume that the input is of the form $\enc{S} \enc{T}$; otherwise $\A_2$ accepts. NFA~$\A_2$ guesses $i \in [n]$ such that $i \in S \cap T$ and then checks it. Finally, we show that there is an NFA, $\A_1$, with $n^{O(1)}$~states and $L(\A_1) = \enc{\Disj^n_k}$. We can assume that the input is of the form $\enc{S} \enc{T}$; otherwise $\A_1$ rejects. NFA~$\A_1$ ``hard-codes'' polynomially many sets $Z_1, \ldots, Z_\ell \subseteq [n]$. It guesses $i \in [\ell]$ such that $S \subseteq Z_i$ and $Z_i \cap T = \emptyset$ and then checks it. It remains to show that there exist $\ell = n^{O(1)}$ sets $Z_1, \ldots, Z_\ell \subseteq [n]$ such that for any $(S,T) \in \Disj^n_k$ there is $i \in [\ell]$ with $S \subseteq Z_i$ and $Z_i \cap T = \emptyset$. The argument uses the probabilistic method and is due to~\cite{Razborov90}; see also \cite[Example~2.12]{KushilevitzNisan}. We reproduce it here due to its elegance and brevity. Fix $(S,T) \in \Disj^n_k$. Say that a set $Z \subseteq [n]$ \emph{separates}~$(S,T)$ if $S \subseteq Z$ and $Z \cap T = \emptyset$. A random set $Z \subseteq [n]$ (each $i$ is in~$Z$ with probability~$1/2$) separates~$(S,T)$ with probability~$2^{-2 k}$. Thus, choosing $\ell := \left\lceil 2^{2 k} \ln \binom{n}{k}^2 \right\rceil = n^{O(1)}$ random sets~$Z \subseteq [n]$ independently, the probability that none of them separates~$(S,T)$ is \[ (1 - 2^{-2 k})^\ell \ < \ e^{-2^{-2 k} \ell} \ \le \ \binom{n}{k}^{-2}\,. \] By the union bound, since $|\Disj^n_k| < \binom{n}{k}^2$, the probability that there exists $(S,T) \in \Disj^n_k$ such that none of $\ell$ random sets separates~$(S,T)$ is less than~$1$. Equivalently, the probability that for all $(S,T) \in \Disj^n_k$ at least one of $\ell$ random sets separates~$(S,T)$ is positive. It follows that there are $Z_1, \ldots, Z_\ell \subseteq [n]$ such that each~$(S,T) \in \Disj^n_k$ is separated by some~$Z_i$. \qed The proof above is based on known arguments from communication complexity. Indeed, they show, for $k = \lceil \log_2 n \rceil$ and the function~$F$ from above, that $\Una_1(F) \in \Omega(\log^2 n)$ and $\Non_0(F) \in O(\log n)$ and $\Non_1(F) \in O(\log n)$. This gap is in a sense the largest possible, as $\Una_1(F) = O(\Non_0(F) \cdot \Non_1(F))$ holds for all two-party functions~$F$. We even have $\Det(F) = O(\Non_0(F) \cdot \Non_1(F))$, where $\Det(F) \ge \Una_1(F)$ is the \emph{deterministic} communication complexity \cite[Theorem~2.11]{KushilevitzNisan}. \section{Conclusions} In the main results, \cref{thm:complement,thm:separation}, we have obtained super-polynomial but quasi-polynomial lower bounds on UFA complementation and separation. These bounds are not known to be tight; indeed, in both cases the best known upper bound is exponential. At the same time, we have transferred techniques from communication complexity relatively directly. More concretely, both main theorems hinge on a finite language $\{x y \mid F(x,y) = 1\}$ where $F$ is a two-party function whose communication complexity is in a sense extreme. This suggests two kinds of opportunities for future work: \begin{itemize} \item Can other techniques from communication complexity improve the lower bounds further? Perhaps by somehow iterating a two-party function or via multi-party communication complexity? \item Can techniques for proving upper bounds on communication complexity be adapted to prove upper bounds on the size of automata? \end{itemize} \bibliographystyle{plain}
\section{Introduction} \begin{figure}[t] \centering \includegraphics[scale=0.41]{Figure2/visual_hori.pdf} \caption{Visualization of sample images (Kodim23 from Kodak dataset) reconstructed by BPG, VTM 9.0, and the proposed IVR networks. The adjacent quantizer parameters (QPs) are used in BPG and VTM 9.0 to evaluate the fineness of their variable-rate control. By adjusting $j$ and $\alpha$, the IVR networks match the rates of BPG and VTM 9.0 with the fineness of 0.0001 BPP. \label{fig:visual} \end{figure} Image compression aims to improve the efficiency of image storage and transmission by reducing data irrelevance and redundancy. In the past decades, many image compression standards have been proposed and widely used in the domain, such as JPEG~\cite{jpeg}, JPEG2000~\cite{jpeg2000}, AVC/H.264~\cite{AVC}, HEVC/H.265~\cite{HEVC}, etc. In recent years, with the development of deep learning and its advances shown in various computer vision applications~\cite{Druzhkov2016A,2019Deep}, more attention is paid to learned compression models via deep neural networks. Inspired by the deep learning based transform coding~\cite{transform}, learned compression methods were proposed to use an entropy model to approximate the distribution of the compressible latents with CNNs~\cite{balle2017variational,theis2017lossy}, showing promising performance comparable to those traditional image codecs. On the basis of the entropy model, the performance of learned compression methods was further improved by introducing hierarchical structures, better entropy estimation models, and more appropriate network architectures~\cite{balle2018variational,minnen2019joint,lee2019,cheng2020learned,lee2019hybrid}. These methods quickly outperformed BPG (the intra image compression of HEVC) in terms of PSNR and MS-SSIM, among which the state-of-the-art method~\cite{lee2019hybrid} is still competitive to the recent VTM 9.0 (intra) -- the latest reference software of the VVC/H.266 standard~\cite{VVC}. However, the aforementioned methods usually require training a set of separate networks for different compression rates, resulting in a high cost in model storage and training when multiple compression rates are desired in real applications. To reduce the cost, methods have been proposed to enable variable-rate control in a single network, by using a tuned loss function and additional hyperparameters (Lagrange multiplier and/or quantization step) to control the scale of the intermediate outputs or the latents~\cite{choi2019variable,yang2020variable,akbari2020learned}. While these methods significantly reduced the cost of model storage and training, they brought some performance degradation when applying fine rate control. There have been few works that achieve a good balance between the compression performance and the variable-rate control. In this paper, we propose an efficient interpolation variable-rate network to enable variable-rate control without sacrificing the performance. The approach inserts InterpCA modules into the Encoder and Decoder of a baseline compression network without any modifications to the entropy model, reducing the risk of performance decline. The minimal plug-in design also makes the InterpCA module applicable to most types of entropy-based networks. The module has two crucial hyperparameters: (i) a rate hyperparameter to bind different rates with different settings in the InterpCA for coarse variable-rate control; (ii) an interpolation hyperparameter to interpolate the values of these settings for fine variable-rate control. With these two parameters, the IVR network can be trained with a range of sparse interpolation values to reduce the training cost, yet retain the variable-rate control with thousands of times finer rates during inference. This design is the key to the fine variable-rate control of the IVR method. Besides, optimizations are also made on the baseline autoregressive and hierarchical structure~\cite{minnen2019joint}. In the IVR model, most of the uniform-noise-addition operations are replaced by the quantization operations for latents to reduce the difference between training and inference. This design increases the accuracy of the entropy estimation and therefore improves the performance without increasing the computational complexity. In addition, a Unet post-network is also introduced to the pipeline in a modular manner to enhance the reconstruction. Benefiting from these optimizations, the IVR method is the first variable-rate learned method that outperforms VTM 9.0 (intra) in PSNR and MS-SSIM. In particular, this paper has three major contributions: \begin{itemize}[leftmargin=15pt,itemsep=2pt,topsep=2pt] \item[$\bullet$] By analyzing the histogram of latents, the principle of variable rates in learned image compression is explored, which inspires our design of the efficient variable-rate image compression. \item[$\bullet$] An interpolation method named as InterpCA is proposed to enable the variable-rate control without performance degradation. The minimal plug-in design of the InterpCA module makes it compatible with most entropy-model based methods. \item[$\bullet$] Comprehensive comparison and ablation studies are conducted to analyze the feasibility of the approach and how each component contributes to the performance improvement. \end{itemize} \begin{figure*}[htbp] \begin{minipage}{0.7\textwidth} \centering \includegraphics[scale=0.3]{Figure2/Structure.pdf} \end{minipage} \makeatletter \newcommand\tablecaption{\def\@captype{table}\caption} \makeatother \begin{minipage}{0.28\textwidth} \renewcommand\arraystretch{1.25} \centering \setlength{\abovecaptionskip}{0pt \setlength{\belowcaptionskip}{10pt}% \scalebox{0.65}{ \begin{tabular}{c c} \hline Component & Symbol \\ \hline Input Image & $x$\\ Reconstruction & ${\hat{x}}$\\ Encoder & $f_e(x;\theta_e)$\\ Latent & $y$\\ Latent(noised) & ${\tilde y}$\\ Latent(quantized) & ${\hat y}$\\ Decoder & $f_d({\hat y};\theta_d)$\\ Hyper Encoder & $f_{he}({\hat y};\theta_{he})$\\ Hyper Latent & $z$\\ Hyper Latent(noised) & ${\tilde z}$\\ Hyper Latent(quantized) & ${\hat z}$\\ Hyper Decoder & $f_{hd}({\hat z};\theta_{hd})$\\ Context Model & $f_{cm}({\hat y_{mask}};\theta_{cm})$\\ Entropy Parameters & $f_{ep}(\cdot;\theta_{ep})$\\ Unet Post-network & $f_{u}(\cdot;\theta_{u})$\\ Post Reconstruction & ${\ddot{x}}$\\ \hline \end{tabular}} \label{tab:symbol} \end{minipage} \caption{IVR Network architecture. AE/AD: Arithmetic Encoding/Decoding. Interpolation CA: Interpolation Channel Attention. Convolution parameters are denoted as the number of filters$\times$kernel height$\times$kernel width $/$ downsampling or upsampling stride, where $\uparrow$ indicates upsampling and $\downarrow$ downsampling. Ignoring the Interpolation CA, the remaining network structure is consistent with the structure of Minnen's autoregressive and hierarchical framework~\cite{minnen2019joint}.} \label{fig:network} \vspace{-0.4cm} \end{figure*} \section{Related Work} \subsection{Learned Single Rate Image Compression} Initially, recurrent neural networks were utilized in some works~\cite{toderici2015variable,toderici2017full,johnston2018improved} to recursively compress residual information using a binary representation to encode the latents of each iteration. Then the entropy-based method was proposed by Ball{\'e} \emph{et al.}~\cite{balle2017variational} and Theis \emph{et al.}~\cite{theis2017lossy}, which is the basis for the learned image compression methods. The entropy-based method consists of an Encoder to transform an image to a latent, an entropy model to reduce the entropy of the latent, and a Decoder to reconstruct the image from the latent, which resembles an autoencoder~\cite{autoencoder} with an entropy model. A hierarchical prior network was adopted in~\cite{balle2018variational} to enhance the entropy model by estimating the zero-mean Gaussian distribution of the latent representations. Mentzer \emph{et al.}~\cite{mentzer2018conditional} directly modeled the entropy of the latent representation by using a 3D-CNN Context Model. Since those spatially adjacent representations of latents have high correlations, Minnen \emph{et al.}~\cite{minnen2019joint} and Lee \emph{et al.}~\cite{lee2019} utilized context-adaptive entropy model with none zero-mean Gaussian distribution. Cheng \emph{et al.}~\cite{cheng2020learned} proposed an attention module to enhance the reconstruction and discretized Gaussian mixture likelihoods to improve the entropy model. Lee \emph{et al.}~\cite{lee2019hybrid} jointly optimized both the image compression and the quality enhancement with a Gaussian mixture model. \subsection{Learned Variable Rate Image Compression} Conditional Convolutions were proposed by Choi \emph{et al.}~\cite{choi2019variable} to realize a variable-rate image compression using the two-stage training. In the first training stage, the coarse variable-rate control was achieved by varying the Lagrange multiplier in the conditional model. While the fine variable-rate control was realized by tuning the quantization bin size of the latents in the second training stage. Yang \emph{et al.}~\cite{yang2020variable} proposed a similarly modulated autoencoder with different Lagrange multipliers to realize a coarse variable-rate control. In~\cite{akbari2020learned}, a B-bit quantizer with multiple values was introduced to realize the variable-rate image compression. Besides, to further improve the performance, the residual between the original image and the reconstructed image was encoded by BPG. Tong Chen and Zhan Ma proposed a set of quality scaling factors embedded after the Encoder network to achieve variable rates~\cite{chen2020variable}. These methods have achieved variable rates, but they don't consider the balance between the compression performance and the fine variable rates, which is vital to guarantee a good compression performance. \section{Preliminary}\label{sec:s3} \subsection{Autoregressive and Hierarchical Structure} Figure~\ref{fig:network} shows the proposed IVR network architecture. If without the InterpCA (see Section~\ref{sec:IVR}), the rest parts in Figure~\ref{fig:network} compose the commonly used autoregressive and hierarchical framework~\cite{minnen2019joint} for image compression. The Encoder transforms the input image $x$ into a latent $y$ by a transformation $f_e(x;\theta_e)$, which is then quantized into ${\hat y}$ for the next transformation. ${\hat y}$ can be losslessly compressed by arithmetic encoding (AE) and transmitted into a string of bits, using a probability distribution $p_{\hat y}({\hat{y})}$. A hyper-network (Hyper Encoder $f_{he}({\hat y};\theta_{he})$ and Hyper Decoder $f_{hd}({\hat z};\theta_{hd})$) with the Context Model and the Entropy Parameters network~\cite{minnen2019joint}, is utilized to learn the probability distribution of ${\hat y}$. The Context Model generates rough probability distribution parameters using a linear $5\times5$ masked convolution. Then, outputs of the Context Model and the Hyper Decoder are concatenated to generate accurate probability distribution parameters $({\mu_y}, {\sigma_y})$ by the Entropy Parameters network. The learning goal of the entropy-based methods is to minimize the expected length of the bitstream as well as the expected distortion between the reconstructed and original images, leading to a Rate-Distortion (RD) optimization problem. This can be formulated as: \begin{equation} \begin{split} \mathbb{L} &= R+\lambda_j D \\ &=\mathbb{E}_{x\sim p_x}[-\log_2{p_{\hat y}({\hat{y})})}-\log_2{p_{\hat z}({\hat{z})})}]+\lambda_j \mathbb{E}_{x\sim p_x}{[d(x, \hat{x})]}, \end{split} \label{eq:loss1} \end{equation} where $\lambda_j$ is the $j$th Lagrange multiplier $\lambda$ that determines the desired rate-distortion trade-off, $R$ is referred to as the expected length of the compressed bitstream, and $D$ is the distortion measured by either Mean Squared Error (MSE) or MS-SSIM. Similar to the traditional image codecs, the entropy model uses lossless entropy encoding to generate the final bitstream (such as arithmetic~\cite{arithmatic}), or lossless decoding algorithms to restore the latent from the bitstream (such as Huffman coding~\cite{huffman}). When multiple compression rates are desired in the single rate structure, these methods~\cite{minnen2019joint,cheng2020learned,lee2019,lee2019hybrid} normally require training a set of separate networks with different $\lambda$ for different compression rates, resulting in a very high cost in model storage and training. \begin{figure}[h] \centering \vspace{-0.4cm} \includegraphics[scale=0.4]{Figure2/Conditional.pdf} \vspace{-0.4cm} \caption{Conditional Convolution in Choi's paper~\cite{choi2019variable}. $n$ is the number of $\lambda$, $ch$ is the output channel of the convolution, $X_i$ is the output of the convolution, $Y_i$ is the output of the module. FCN: Fully-Connected Network.} \label{fig:CC} \vspace{-0.2cm} \end{figure} \begin{figure}[htbp] \centering \subfigure[$m(\lambda_j)$]{\includegraphics[scale=0.35]{Figure1/Weight.pdf} \label{sfig:weight}} \subfigure[$b(\lambda_j)$]{\includegraphics[scale=0.35]{Figure1/bias.pdf} \label{sfig:bias}} \vspace{-0.4cm} \caption{The average values of $m(\lambda_j)$ and $b(\lambda_j)$ in different layers with different $\lambda$ in Conditional Convolution~\cite{choi2019variable}. The larger index corresponds to the rear layer of the network flow, \emph{e.g.}, the $4$ th layer in Decoder layers is the last layer of the network.} \label{fig:mask} \vspace{-0.2cm} \end{figure} \begin{figure}[htbp] \centering \vspace{-0cm} \subfigure[Histograms of $\hat y$]{\includegraphics[scale=0.36]{Figure1/Histgram_hori.pdf} \label{sfig:y}}\vspace{-0.4cm} \subfigure[Histograms of $\hat z$]{\includegraphics[scale=0.36]{Figure1/Histgramz_hori.pdf} \label{sfig:z}} \vspace{-0.4cm} \caption{Histograms of $\hat y$ and $\hat z$ in Single Rate Network (SinRN) with different $\lambda$ on Kodim01. The solid line represents the histogram distribution, and the dotted line represents the Laplace fitting distribution.} \label{fig:Histogram} \vspace{-0.2cm} \end{figure} \subsection{Conditional Convolution} The Conditional Convolutions~\cite{choi2019variable} realized the variable-rate control in an entropy-based single model. To figure out its principle, a detailed structure diagram is given in Figure~\ref{fig:CC}. Let $X_i$ be a 3-dimensional (3-D) feature map output of the $i$th convolution with channel $ch$, and $Y_i$ be a 3-D feature map output of the Conditional Convolution with the same channel $ch$ as $X_i$. \begin{equation} \begin{split} Y_i&= m(\lambda_j) \otimes X_i + b(\lambda_j)\\ &= softplus\big(FCN(Onehot(\lambda_j)\big) \otimes X_i + FCN(Onehot(\lambda_j))\\ &\textup{with}\quad\lambda_j\in\{\lambda_0, \lambda_1, ..., \lambda_{n-2}, \lambda_{n-1}\}, \end{split} \label{eq:lambja} \end{equation} where $j\in\{0,1,...,n-1\}$, and $n$ is the number of pre-defined Lagrange multiplier values to control the variable rates. $m(\lambda_j)$ and $b(\lambda_j)$ are the channel-wised mask weights and biases for $X_i$. In Choi's paper~\cite{choi2019variable}, all traditional Convolutions are replaced by the Conditional Convolutions to realize the coarse variable-rate control, while the fine variable-rate control was realized by tuning the quantization bin size of the latents. The compression performance on the Kodak dataset is wavy and incoherent (RD curves are shown in Figure~\ref{sfig:mse}), which leads to some performance degradation compared with Minnen's method~\cite{minnen2019joint}. \subsection{Analysis of Variable Rates} In the compression process, the entropy loss occurs in the Encoder to generate $\hat y$ and the process of Hyper compression is lossless to compress $\hat y$ with the AE~\cite{balle2018variational,minnen2019joint,lee2019,cheng2020learned,lee2019hybrid}. To verify the difference of variable rates in the Single Rate Networks (SinRNs), some experiments were conducted to display the distributions of latents with different $\lambda$ and Histograms of $\hat y$ and $\hat z$ are extracted and shown in Figure~\ref{fig:Histogram}. In the Histograms of $\hat y$, more values of input images are transformed to zero to reduce the whole entropy and the BPP of $\hat y$ decreases with the decrease of $\lambda$, so the SinRNs achieve different compression rates. Different from $\hat y$, the distributions of hyper-latents $\hat z$ remain nearly the same, indicating that the lossless Hyper compression might be independent of different compression rates. Meanwhile, Conditional Convolutions~\cite{choi2019variable} were reproduced to evaluate the function of $m(\lambda_j)$ and $b(\lambda_j)$, and their average values of different layers are diplayed in Figure~\ref{fig:mask}. Under fixed $\lambda$, the average weights decrease with the depth of the layers in Encoder Layers and HyperEncoder Layers, and increase with the depth of the layers in HyperDecoder Layers and Decoder Layers. Besides, the average weights are also affected by the value of $\lambda$. In particular, the average weights increase with $\lambda$ in the Encoder Layers and decrease in the other layers. Compared with the average weights of $m(\lambda_j)$, the average biases, most of which are valued around zero, do not exhibit apparent patterns. Considering this phenomenon, $b(\lambda_j)$ might be not necessary for Conditional Convolutions, whose removal could potentially help reduce the computational complexity. Similar to the situation of SinRNs, the Conditional Convolutions in the Encoder are controlled by $\lambda_j$ to produce $\hat y$ with different scaling coefficients, generating more zeros and realize a higher compression rate. Theoretically, as long as the set of $\lambda$ is large enough and there are enough parameters in the Fully-Connected Network (FCN), it is possible for the model to obtain the fine variable-rate control. However, as shown in Figure~\ref{fig:CC}, parameters in a row correspond to one $\lambda$ and they are independent of other rows of parameters during training and inference. If the set of $\lambda$ is large, each row of parameters may have fewer training iterations and be trapped in poor convergence, resulting in degraded compression performance. Additionally, the distributions of $\hat z$ are nearly the same as those in Figure~\ref{fig:Histogram}, hence the use of Conditional Convolutions might also bring performance degradation. Observing the red line ($\lambda=480$) and the green one ($\lambda=1000$) in Figure~\ref{sfig:weight}, if there exists another line between them, the model would be able to obtain an intermediate compression rate between $\lambda=480$ and $\lambda=1000$. Based on these analyses, an interpolation variable-rate method is therefore proposed in this paper for a good balance between the compression performance and the variable-rate control. \section{Proposed method} \label{sec:IVR} \subsection{Interpolation Variable Rate} To solve the none correlations of parameters in Conditional Convolutions, a newly-elaborated method named InterpCA is proposed to bind different values of $\lambda$ with different rates by introducing a rate hyperparameter $j$ and an interpolation hyperparameter $\alpha$. The compression network takes $j$ and $\alpha$ as input hyperparameters that determine the value of $\lambda_{j,\alpha}$ according to the following equation: \begin{equation} \begin{split} \lambda_{j,\alpha}&=\alpha \lambda_j+(1-\alpha) \lambda_{j+1}\\ &\textup{with} \quad {\lambda_j\ or\ \lambda_{j+1}} \in\{\lambda_0, \lambda_1, ..., \lambda_{n-2}, \lambda_{n-1}\}, \end{split} \label{eq:ivr} \end{equation} where $j\in\{0,1,...,n-2\}$, $\alpha\in[0,1]$ and $n$ is the number of pre-defined Lagrange multiplier values. Then, the loss function of Eq. (\ref{eq:loss1}) can be expressed as: \begin{equation} \mathbb{L} = R+\lambda_{j,\alpha} D. \label{eq:loss2} \end{equation} Figure~\ref{fig:ica} demonstrates the implementation of the InterpCAs, which are inserted behind each convolution layer in the Encoder $f_e(x;\theta_e)$ and the Decoder $f_d({\hat y};\theta_d)$. The output $X_i$ of each convolution layer can be transformed to $Y_i$ in the following way: \begin{equation} \begin{split} Y_i &=softplus\big(FCN(I_n(j,\alpha))\big) \otimes X_i\\ &\textup{with}\quad I_n(j,\alpha)=\alpha I_n[j]+(1-\alpha) I_n[j+1], \end{split} \label{eq:yi} \end{equation} where $I_n$ is a two-dimensional identity matrix showed, $\otimes$ denotes element-wised multiplication, $I_n[j/j+1]$ is the $j/j+1$ th row vector of $I_n$ (\emph{i.e.}, $Onehot(\lambda_{j/j+1)}$), and the output shape of $softplus$ is [Batchsize, 1, 1, $ch$]. \begin{figure}[h] \centering \vspace{-0.4cm} \includegraphics[scale=0.45]{Figure2/Interp.pdf} \caption{Interpolation channel attention (InterpCA). $n$ is the number of $\lambda$, $ch$ is the output channel of the convolution, $X_i$ is the output of convolution, $Y_i$ is the output of the module. In InerpCA, $j$ and $\alpha$ determine the final value of $\lambda$. Mask biases are not used in InterpCA.} \label{fig:ica} \vspace{-0.2cm} \end{figure} It is worth noting that the value range of $\alpha$ is different in training and inference. In each iteration of training, $j$ and $\alpha$ are randomly sampled within the value range (\emph{i.e.}, $\alpha\in\{0,0.5,1\}$) and then fed into the network. When $\alpha$ is equal to 0.5, $\lambda_{j,\alpha}$ is interpolated by $\lambda_j$ and $\lambda_{j+1}$ as $\lambda_{j,0.5}=(\lambda_j+\lambda_{j+1})/2$. In inference, $\alpha\in\{0,1/M,...,M-1/M,1\}$ is used to make full use of the correlations between the parameters in fully connected neural layers to realize nearly continuous rate control. Compared with existing methods, the InterpCA method has obvious advantages. One of the assets of the technique is its simplicity and efficiency, which helps most of the entropy-based SinRNs upgrade to the variable-rate network. Another advantage is that the rough range of interpolation hyperparameter enhances the robustness of the network and speeds up the convergence in training, and the superfine rate control could be realized by selecting an appropriate $M$ in inference. There are two reasons why InterpCA does not bring performance degradation. One is that inserting InterpCA into the Encoder and Decoder brings no change to the entropy model, and the other is that the InterpCA makes full use of the parameters in FCNs. \subsection{Improved Single Rate Network} Figure~\ref{fig:framwork} shows the operation diagrams of the improved SinRN. Compared with~\cite{minnen2019joint}, most of the uniform-noise-addition operations are replaced by the quantization operations for latents in training that reduce the difference between the training and inference. Similar to~\cite{Zhou_2019_CVPR_Workshops}, the probability $p_{\hat y}(\hat{y})$ of quantized latent ${\hat y}$ is modeled as Laplacian distributions: \begin{equation} p_{\hat{y}}(\hat{y}|{\hat z}, \theta_{hd}, \theta_{cm}, \theta_{ep})=\prod_{i=1}\Big(\int_{{\hat{y}_i}-\frac{1}{2}}^{{\hat{y}_i}+\frac{1}{2}} Lap(y;\mu_y, e^{\sigma_y})\, dy\Big). \label{eq:py1} \end{equation} To simulate the quantized process during training, we model each latent ${\tilde y}=y+U(-\frac{1}{2}, \frac{1}{2})$ as a Laplacian convolved with a unit uniform distribution. This ensures a good match between Encoder and Decoder distributions of both the quantized latents and continuous-valued latents subjected to additive uniform noise. The probability of ${\tilde y}$ is \begin{equation} p_{\tilde{y}}(\tilde{y}|{\tilde z}, \theta_{hd}, \theta_{cm}, \theta_{ep})=\prod_{i=1}\Big(\int_{{\tilde{y}_i}-\frac{1}{2}}^{{\tilde{y}_i}+\frac{1}{2}} Lap(y;\mu_y, e^{\sigma_y})\, dy\Big). \label{eq:py2} \end{equation} \begin{figure}[h] \centering \vspace{-0.4cm} \includegraphics[scale=0.3]{Figure2/Diagrams.pdf} \vspace{-0.4cm} \caption{Operational Diagrams of SinRN. $Q$ denotes the operation of quantization. $U$ denotes the operation of adding uniform noise. The relationships between other symbols and components are summarized in Figure~\ref{fig:network}.} \label{fig:framwork} \vspace{-0.2cm} \end{figure} For the hyper latent $z$, a set of channel-wise trainable parameters $(\mu_z, \sigma_z)$ are defined to learn the Laplacian distribution of the quantized latent ${\hat{z}}$ or noised latent ${\tilde{z}}$: \begin{equation} p_{\hat{z}}(\hat{z})=\prod_{i=1}\Big(\int_{{\hat{z}_i}-\frac{1}{2}}^{{\hat{z}_i}+\frac{1}{2}} Lap(z;\mu_z, e^{\sigma_z})\, dz\Big), \label{eq:pz1} \end{equation} \begin{equation} p_{\tilde{z}}(\tilde{z})=\prod_{i=1}\Big(\int_{{\tilde{z}_i}-\frac{1}{2}}^{{\tilde{z}_i}+\frac{1}{2}} Lap(z;\mu_z, e^{\sigma_z})\, dz\Big). \label{eq:pz2} \end{equation} Particularly, transforming $\tilde{z}$ to the Hyper Decoder in the training period helps improve the entropy estimation of $p_{\tilde y}(\tilde{y})$ because additional uniform noise is beneficial for learning the probability distribution of ${\tilde y}$. The Decoder $f_d$ transforms $\hat{y}$ into the reconstruction $\hat{x}$. Because both the compressed latent and the compressed hyper latent are compressed by AE, the full loss function of the IVR network reads \begin{equation} \begin{split} \mathbb{L} &= R_y+R_z+\lambda_{j,\alpha} D \\ &=\mathbb{E}_{x\sim p_x}[-\log_2{p_{\tilde y}({\tilde{y})})} -\log_2{p_{\tilde z}({\tilde{z})})}] +\lambda_{j,\alpha} \mathbb{E}_{x\sim p_x}{[d(x, \hat{x})]}. \end{split} \label{eq:loss3} \end{equation}\\ To further enhance the reconstruction like~\cite{lee2019hybrid}, a separable Unet post-network~\cite{Unet2015} shared by all rates is introduced to the model in this paper. Details of the Unet post-network are present in \textbf{\emph{Supplementary Materials}}. \section{Experiments} \subsection{Implementation Details} \noindent\textbf{Details For Training} $\quad$ The networks were trained on a body of color PNG images licensed under creative commons, about 30K images downloaded from CVPR workshop CLIC training dataset~\cite{clic} and the world wide web. The networks were optimized using Adam with a batch size of 8 and a patch size of $256\times256$ randomly extracted from the training dataset. There were multistage learning rates ($\{1e-4, 5e-5, 1e-5, 5e-6, 1e-6\}$) that changed with boundaries ($\{1600000, 2100000, 2300000, 2400000, 2500000\}$). The IVR network was optimized with two quality metrics, i.e., MSE and MS-SSIM. When optimized by MSE, $\lambda$ lain in $\{50, 160, 300, \\480, 710, 1000, 1350, 1780, 2302, 2915\}$ and $\alpha$ lain in $\{0, 0.5, 1.0\}$. Different from MSE, $\lambda$ lain in $\{1, 2, 3, 5, 8, 10, 15, 20, 25, 30\}$, when optimized by $1-MS-SSIM$. Finally, the IVR network was enhanced by the Unet post-network to achieve better performance. Additional details about the network are shown in Figure~\ref{fig:network}. \noindent\textbf{Details for Inference} $\quad$ We evaluated the compression performance on the commonly used 24 Kodak lossless images~\cite{kodak} with a size of 768 x 512 and 102 high-resolution CLIC validation images~\cite{clic}. For the IVR network, $M$ was set as 5 for drawing the whole RD curves and $M$ was set as 100/1000/1000 to evaluate the fine rate control at $j=8$. To evaluate the rate-distortion performance, the rate was measured by BPP, and the quality was measured by either PSNR or MS-SSIM, corresponding to the optimized distortion metric. \noindent\textbf{Details For VVC and HEVC} $\quad$ We used the official test model VTM 9.0~\cite{VTM9} with intra profile and BPG software~\cite{BPG} to test the performance. For both of them, YUV444 format was used as the configuration to maximize the compression performance. \begin{figure}[t] \centering \includegraphics[scale=0.26]{Figure1/Kodak_cond2.pdf} \caption{Ablation study of the IVR based on autoregressive and hierarchical structure~\cite{minnen2019joint} over the Kodak dataset. Three figures consist of the complete RD curves. IVR variants: "Proposed" is the baseline with InterpCA. "Proposed Single-rates" is the base SinRN. "Proposed w/o $\alpha$" represents the case without interpolation, which is realized by setting interpolation hyperparameter $\alpha$ to 1 in Eq.~\ref{eq:ivr}. "Proposed-hyper w/o $\alpha$" means the InterpCA is used in both Encoder/Decoder network and Hyper-Encoder/Decoder network with $\alpha=1$, which is similar to the case in~\cite{choi2019variable}.} \label{fig:ablation} \vspace{-0.3cm} \end{figure} \subsection{Ablation Study} To verify the effectiveness of the interpolation variable-rate method, three kinds of IVR variants are implemented, \emph{i.e.}, \emph{the Proposed}, \emph{the Proposed without $\alpha$} and \emph{the Proposed-Hyper without $\alpha$}. \emph{the Proposed} is the baseline with InterpCA. \emph{the Proposed without $\alpha$} represents the case without interpolation, which is realized by setting interpolation hyperparameter $\alpha$ to 1 in Eq.~\ref{eq:ivr}. \emph{the Proposed-Hyper without $\alpha$} means the InterpCA is used in both Encoder/Decoder network and Hyper-Encoder/Decoder network with $\alpha=1$, which is similar to the case in~\cite{choi2019variable}. Meanwhile, these variants are deployed in two of the most common structures: autoregressive and hierarchical structure~\cite{minnen2019joint}, and hierarchical structure~\cite{balle2018variational}. These networks were all optimized by MSE, and results are summarized in Figure~\ref{fig:ablation}, Figure~\ref{fig:woCM} and Table~\ref{table:minnenbdbr}. Figure~\ref{fig:ablation} illustrates that compared with the SinRN for fixed $\lambda$, the proposed IVR network has no performance degradation on the whole and is better at some points. The part A of Table~\ref{table:minnenbdbr} shows that the proposed model performs better than other IVR variants, saving 0.28\%, 2.28\%, 3.33\% bits (bits-saving is all measured by Bjøntegaard Delta Bit Rate (BDBR)~\cite{bdbr}) compared with SinRNs, \emph{the Proposed without $\alpha$ (n=1000)}, \emph{the Proposed-Hyper without $\alpha$ (n=1000)} on the Kodak dataset, respectively. The structure without $\alpha$ is equivalent to the Conditional Convolutions, the performance of \emph{the Proposed without $\alpha$ (n=1000)} deteriorates 1.93\% compared with the structure of 10 rates. This demonstrates that the compression performance decreases when using a large set of $\lambda$. When inserting Conditional Convolutions into the Hyper Encoder and the Hyper Decoder, the performance of \emph{Proposed-Hyper without $\alpha$} drops 1.13\% (n=10), 1.47\% (n=100) and 1.05\% (n=1000), respectively. That means that sharing a common set of parameters in the Hyper-autoencoder network is sufficient for different compression rates. \begin{table}[h] \begin{center} \caption{BD-Rate Gains against the SinRNs with and without the CM, corresponding to Part A and B respectively. Negative values in BDBR represent the bits saving.} \label{table:minnenbdbr} \vspace{-0.2cm} \renewcommand\arraystretch{1} \setlength{\abovecaptionskip}{0pt \setlength{\belowcaptionskip}{0pt}% \scalebox{0.8}{ \begin{tabular}{|c|c|p{1.5cm}<{\centering}|p{2cm}<{\centering}|} \hline ~&Methods & BDBR & BD-PSNR (dB)\\ \hline \multirow{7}*{A}&Proposed &-0.2898\% & 0.0107\\ ~&Proposed w/o $\alpha$ (n=10) & 0.0592\% & -0.0040\\ ~&Proposed w/o $\alpha$ (n=100) & 1.3114\% & -0.0609\\ ~&Proposed w/o $\alpha$ (n=1000) & 1.9872\% & -0.0937\\ ~&Proposed-Hyper w/o $\alpha$ (n=10) & 1.1857\% & -0.0580\\ ~&Proposed-Hyper w/o $\alpha$ (n=100) & 2.7815\% & -0.1185\\ ~&Proposed-Hyper w/o $\alpha$ (n=1000) & 3.0409\% & -0.1340\\ \hline \multirow{3}*{B}&Proposed w/o CM &-0.4740\% & 0.0193\\ ~&Proposed w/o (CM \& $\alpha$) (n=10) & 1.1733\% & -0.0482\\ ~&Proposed-Hyper w/o (CM \& $\alpha$) (n=10) & 1.6358\% & -0.0662\\ \hline \end{tabular}} \end{center} \vspace{-0.4cm} \end{table} Different from the part serial compression of the autoregressive and hierarchical structure~\cite{minnen2019joint}, the hierarchical structure~\cite{balle2018variational} could be speeded up in parallel completely, which is more likely to be used in practice. The RD curves in Figure~\ref{fig:woCM} and BDBRs in the part B of Table~\ref{table:minnenbdbr} demonstrate the same conclusions as the ablation study based on the autoregressive and hierarchical structure. The part B of Table~\ref{table:minnenbdbr} shows that the proposed model without CM saves bits up to 1.65\%, 2.11\% compared with \emph{the Proposed without CM and $\alpha$ (n=10)}, and \emph{the Proposed-Hyper without CM and $\alpha$ (n=10)}. This indicates interpolation variable-rate method has more advantages in the hierarchical structure. \begin{figure \centering \includegraphics[scale=0.38]{Figure1/Kodak_nocm_ablation.pdf}\vspace{-0.2cm} \caption{Ablation study of the IVR based on hierarchical structure~\cite{balle2018variational} over the Kodak dataset. "w/o CM" means the network is without the Context Model and the Entropy Parameters. Other variants are the same as Figure~\ref{fig:ablation}.} \label{fig:woCM} \vspace{-0.4cm} \end{figure} \begin{figure*}[!h] \centering \subfigure[PSNR on Kodak]{\includegraphics[scale=0.32]{Figure1/Kodak_MSE.pdf} \label{sfig:mse}} \subfigure[MS-SSIM on Kodak]{\includegraphics[scale=0.32]{Figure1/Kodak_MSSSIM.pdf}}\vspace{-0.4cm} \subfigure[PSNR on CLIC validation dateset]{\includegraphics[scale=0.32]{Figure1/CLIC_MSE.pdf}} \subfigure[MS-SSIM on CLIC validation dateset]{\includegraphics[scale=0.32]{Figure1/CLIC_MSSSIM.pdf}}\vspace{-0.4cm} \caption{RD curves aggregated over the Kodak and CLIC validation dataset. IVR-Unet (MSE) has a competitive rate-distortion performance on the Kodak image set as measured by PSNR (RGB) compared to all other methods. To our knowledge, this is the first learned variable-rate method that outperforms the VTM 9.0. MS-SSIM values converted to decibels $(-10log_{10}(1-MS-SSIM))$. The IVR-Unet (MS-SSIM) is slightly worse than~\cite{lee2019hybrid}.} \label{fig:RD} \vspace{-0.3cm} \end{figure*} \subsection{Rate Distortion Performance} Figure~\ref{fig:RD} demonstrates the rate-distortion performance on the Kodak and CLIC validation dataset, where the IVR is compared with other previous methods, including well-known compression standards such as BPG and VVC, as well as recent entropy-based learned compression methods, such as Minnen's~\cite{minnen2019joint}, Cheng's~\cite{cheng2020learned}, Lee's~\cite{lee2019hybrid} and Choi's~\cite{choi2019variable}. RD curves of Minnen's~\cite{minnen2019joint} and Cheng's~\cite{cheng2020learned} are from the released LaTex code~\cite{cheng2020learned} in arXiv. RD curves of Lee's~\cite{lee2019hybrid} and Choi's~\cite{choi2019variable} are obtained by contacting the author. Regarding the metric of PSNR, the IVR network with Unet outperforms all other previous methods, achieving the state-of-the-art performance of its kind as shown in Figure~\ref{fig:RD} and Table~\ref{table:bdbr}. By setting the BPG as the anchor, the improvements of SinRN save $4.71\%$ bits than Minnen's~\cite{minnen2019joint} (Quantized operations contribute about 3.5\% and the Laplacian distribution contributes about 1\%) and Unet post-network boosts the performance about $8.40\%$ bits-saving. Although the improvements of SinRN promote the performance smaller than that of Unet post-network, it does not increase the computational complexity relative to Minnen's~\cite{minnen2019joint}. Regarding the metric of MS-SSIM, it achieves a competitive performance among the learned image compression methods, which is only a little worse than Lee's~\cite{lee2019hybrid} and Cheng's~\cite{cheng2020learned}. It is also the first variable-rate image compression method that outperforms the ongoing compression method VTM 9.0 (intra) in both PSNR and MS-SSIM. The results on the CLIC validation dataset show the IVR method also works for high-resolution images, apart from low-resolution Kodak images. \begin{table} \begin{center} \caption{BD-Rate Gains of Proposed, Lee's~\cite{lee2019hybrid}, Cheng's~\cite{cheng2020learned}, VTM 9.0~\cite{VVC}, Minnen's~\cite{minnen2019joint}, against the BPG~\cite{BPG}. “/” represents that the method didn't evaluate the RD performance on the dataset in that column.}\vspace{-0.2cm} \label{table:bdbr} \renewcommand\arraystretch{1} \setlength{\abovecaptionskip}{0pt \setlength{\belowcaptionskip}{0pt}% \scalebox{0.8}{ \begin{tabular}{|c|p{1.5cm}<{\centering}|p{1.5cm}<{\centering}|p{1.5cm}<{\centering}<{\centering}|p{1.5cm}<{\centering}|} \hline &\multicolumn{2}{c|}{Kodak} & \multicolumn{2}{c|}{CLIC}\\ \cline{2-5} Methods & PSNR & MS-SSIM & PSNR & MS-SSIM\\ \hline Proposed + Unet & -21.25\% & -56.36\% & -36.09\% & -58.31\%\\ Proposed & -12.85\% & -52.71\% & -27.54\% & -54.26\% \\ Lee's~\cite{lee2019hybrid} & -20.75\% & -57.98\% & /& /\\ Cheng's~\cite{cheng2020learned} & -17.24\% & -57.38\% & /& /\\ VTM 9.0~\cite{VVC} & -20.76\% & -20.13\% & -35.69\%& -28.43\%\\ Minnen's~\cite{minnen2019joint} & -8.14\% & -47.948\% & /& /\\ \hline \end{tabular}} \end{center} \vspace{-0.4cm} \end{table} We verify the rate fineness of the IVR-Unet network by changing the parameters $M$ with $j$ set as 8. The results in Table~\ref{tab:fvr} illustrate that the variable-rate RD points start to appear a disorder until $M = 10000$. In reality, traditional image codecs provide hundreds of variable-rate RD points to meet the basic requirement of applications. Compared with that, considering that the length of the values of $j$ is 9, the IVR network obtains 9000 effective variable-rate RD points with a very fine PSNR interval of 0.001 dB at $M=1000$. Moreover, as shown in Figure~\ref{fig:visual}, the IVR network realizes a fine rate interval of 0.0001 BPP compared with the traditional image codecs. Except for the variable-rate control, Figure~\ref{fig:visual} also reveals that the IVR image compression method provides better reconstruction quality with fewer artifacts in terms of PSNR, MS-SSIM, and perception. \begin{table}[h] \renewcommand\arraystretch{1.25} \centering \setlength{\abovecaptionskip}{0pt \setlength{\belowcaptionskip}{0pt}% \caption{Fine variable-rate Test over the Kodak Dataset in IVR-Unet network (MSE).}\vspace{0.2cm} \label{tab:fvr} \scalebox{0.7}{ \begin{tabular}{|c |c c |c c |c c|} \hline $j=8$&\multicolumn{2}{c|}{M=100} & \multicolumn{2}{c|}{M=1000} & \multicolumn{2}{c|}{M=10000}\\ $\alpha$& BPP & PSNR(dB) & BPP & PSNR(dB) & BPP & PSNR(dB)\\ \hline \setlength{\parskip}{10em} 1 & 0.8023736 & 37.02175 & 0.8023736 & 37.02175 & 0.8023736 & 37.02175\\ $1-1/M$ & 0.8032523 & 37.02725 & 0.8024466 & 37.02241 & 0.8023781 & 37.02176\\ $1-2/M$ & 0.8040930 & 37.03298 & 0.8025299 & 37.02305 & 0.8023888 & 37.02185\\ $1-3/M$ & 0.8049592 & 37.03910 & 0.8026113 & 37.02374 & 0.8023969 & 37.02196\\ $1-4/M$ & 0.8058211 & 37.04532 & 0.8027042 & 37.02438 & 0.8024009 & 37.02206\\ $1-5/M$ & 0.8066999 & 37.05148 & 0.8027963 & 37.02463 & 0.8024107 & 37.02214\\ $1-6/M$ & 0.8076027 & 37.05822 & 0.8029035 & 37.02518 & 0.8024225 & 37.02213\\ \hline \end{tabular}} \vspace{-0.4cm} \end{table} \section{Conclusion} In this paper, we proposed an efficient IVR network for image compression by introducing an InterpCA module and using an improved SinRN. The original SinRN was optimized by replacing most of the uniform-noise-addition operations with quantization ones for more accurate entropy estimation, therefore bringing performance improvement without extra computational complexity. A modular Unet post-network was also introduced to the pipeline to further enhance the reconstruction. Most importantly, benefitting from the InterpCA module which was used in both Encoder and Decoder of the SinRN, the IVR network can provide fine variable-rate control without performance degradation. In addition, the minimal plug-in design of the InterpCA makes it compatible with most entropy-based methods. As illustrated in Table~\ref{tab:fvr}, the proposed IVR network obtained 9000 effective variable-rate points with a fine PSNR interval of 0.001 dB and a fine BPP interval of 0.0001, when $M=1000$. The RD curves in Figure~\ref{fig:RD} validated that the IVR network outperformed VTM 9.0 (intra) in both PSNR and MS-SSIM. To the best of our knowledge, this is the first variable-rate learned image compression method achieving such competitive performance. {\small \bibliographystyle{ref_fullname} \section{Introduction} \begin{figure}[t] \centering \includegraphics[scale=0.41]{Figure2/visual_hori.pdf} \caption{Visualization of sample images (Kodim23 from Kodak dataset) reconstructed by BPG, VTM 9.0, and the proposed IVR networks. The adjacent quantizer parameters (QPs) are used in BPG and VTM 9.0 to evaluate the fineness of their variable-rate control. By adjusting $j$ and $\alpha$, the IVR networks match the rates of BPG and VTM 9.0 with the fineness of 0.0001 BPP. \label{fig:visual} \end{figure} Image compression aims to improve the efficiency of image storage and transmission by reducing data irrelevance and redundancy. In the past decades, many image compression standards have been proposed and widely used in the domain, such as JPEG~\cite{jpeg}, JPEG2000~\cite{jpeg2000}, AVC/H.264~\cite{AVC}, HEVC/H.265~\cite{HEVC}, etc. In recent years, with the development of deep learning and its advances shown in various computer vision applications~\cite{Druzhkov2016A,2019Deep}, more attention is paid to learned compression models via deep neural networks. Inspired by the deep learning based transform coding~\cite{transform}, learned compression methods were proposed to use an entropy model to approximate the distribution of the compressible latents with CNNs~\cite{balle2017variational,theis2017lossy}, showing promising performance comparable to those traditional image codecs. On the basis of the entropy model, the performance of learned compression methods was further improved by introducing hierarchical structures, better entropy estimation models, and more appropriate network architectures~\cite{balle2018variational,minnen2019joint,lee2019,cheng2020learned,lee2019hybrid}. These methods quickly outperformed BPG (the intra image compression of HEVC) in terms of PSNR and MS-SSIM, among which the state-of-the-art method~\cite{lee2019hybrid} is still competitive to the recent VTM 9.0 (intra) -- the latest reference software of the VVC/H.266 standard~\cite{VVC}. However, the aforementioned methods usually require training a set of separate networks for different compression rates, resulting in a high cost in model storage and training when multiple compression rates are desired in real applications. To reduce the cost, methods have been proposed to enable variable-rate control in a single network, by using a tuned loss function and additional hyperparameters (Lagrange multiplier and/or quantization step) to control the scale of the intermediate outputs or the latents~\cite{choi2019variable,yang2020variable,akbari2020learned}. While these methods significantly reduced the cost of model storage and training, they brought some performance degradation when applying fine rate control. There have been few works that achieve a good balance between the compression performance and the variable-rate control. In this paper, we propose an efficient interpolation variable-rate network to enable variable-rate control without sacrificing the performance. The approach inserts InterpCA modules into the Encoder and Decoder of a baseline compression network without any modifications to the entropy model, reducing the risk of performance decline. The minimal plug-in design also makes the InterpCA module applicable to most types of entropy-based networks. The module has two crucial hyperparameters: (i) a rate hyperparameter to bind different rates with different settings in the InterpCA for coarse variable-rate control; (ii) an interpolation hyperparameter to interpolate the values of these settings for fine variable-rate control. With these two parameters, the IVR network can be trained with a range of sparse interpolation values to reduce the training cost, yet retain the variable-rate control with thousands of times finer rates during inference. This design is the key to the fine variable-rate control of the IVR method. Besides, optimizations are also made on the baseline autoregressive and hierarchical structure~\cite{minnen2019joint}. In the IVR model, most of the uniform-noise-addition operations are replaced by the quantization operations for latents to reduce the difference between training and inference. This design increases the accuracy of the entropy estimation and therefore improves the performance without increasing the computational complexity. In addition, a Unet post-network is also introduced to the pipeline in a modular manner to enhance the reconstruction. Benefiting from these optimizations, the IVR method is the first variable-rate learned method that outperforms VTM 9.0 (intra) in PSNR and MS-SSIM. In particular, this paper has three major contributions: \begin{itemize}[leftmargin=15pt,itemsep=2pt,topsep=2pt] \item[$\bullet$] By analyzing the histogram of latents, the principle of variable rates in learned image compression is explored, which inspires our design of the efficient variable-rate image compression. \item[$\bullet$] An interpolation method named as InterpCA is proposed to enable the variable-rate control without performance degradation. The minimal plug-in design of the InterpCA module makes it compatible with most entropy-model based methods. \item[$\bullet$] Comprehensive comparison and ablation studies are conducted to analyze the feasibility of the approach and how each component contributes to the performance improvement. \end{itemize} \begin{figure*}[htbp] \begin{minipage}{0.7\textwidth} \centering \includegraphics[scale=0.3]{Figure2/Structure.pdf} \end{minipage} \makeatletter \newcommand\tablecaption{\def\@captype{table}\caption} \makeatother \begin{minipage}{0.28\textwidth} \renewcommand\arraystretch{1.25} \centering \setlength{\abovecaptionskip}{0pt \setlength{\belowcaptionskip}{10pt}% \scalebox{0.65}{ \begin{tabular}{c c} \hline Component & Symbol \\ \hline Input Image & $x$\\ Reconstruction & ${\hat{x}}$\\ Encoder & $f_e(x;\theta_e)$\\ Latent & $y$\\ Latent(noised) & ${\tilde y}$\\ Latent(quantized) & ${\hat y}$\\ Decoder & $f_d({\hat y};\theta_d)$\\ Hyper Encoder & $f_{he}({\hat y};\theta_{he})$\\ Hyper Latent & $z$\\ Hyper Latent(noised) & ${\tilde z}$\\ Hyper Latent(quantized) & ${\hat z}$\\ Hyper Decoder & $f_{hd}({\hat z};\theta_{hd})$\\ Context Model & $f_{cm}({\hat y_{mask}};\theta_{cm})$\\ Entropy Parameters & $f_{ep}(\cdot;\theta_{ep})$\\ Unet Post-network & $f_{u}(\cdot;\theta_{u})$\\ Post Reconstruction & ${\ddot{x}}$\\ \hline \end{tabular}} \label{tab:symbol} \end{minipage} \caption{IVR Network architecture. AE/AD: Arithmetic Encoding/Decoding. Interpolation CA: Interpolation Channel Attention. Convolution parameters are denoted as the number of filters$\times$kernel height$\times$kernel width $/$ downsampling or upsampling stride, where $\uparrow$ indicates upsampling and $\downarrow$ downsampling. Ignoring the Interpolation CA, the remaining network structure is consistent with the structure of Minnen's autoregressive and hierarchical framework~\cite{minnen2019joint}.} \label{fig:network} \vspace{-0.4cm} \end{figure*} \section{Related Work} \subsection{Learned Single Rate Image Compression} Initially, recurrent neural networks were utilized in some works~\cite{toderici2015variable,toderici2017full,johnston2018improved} to recursively compress residual information using a binary representation to encode the latents of each iteration. Then the entropy-based method was proposed by Ball{\'e} \emph{et al.}~\cite{balle2017variational} and Theis \emph{et al.}~\cite{theis2017lossy}, which is the basis for the learned image compression methods. The entropy-based method consists of an Encoder to transform an image to a latent, an entropy model to reduce the entropy of the latent, and a Decoder to reconstruct the image from the latent, which resembles an autoencoder~\cite{autoencoder} with an entropy model. A hierarchical prior network was adopted in~\cite{balle2018variational} to enhance the entropy model by estimating the zero-mean Gaussian distribution of the latent representations. Mentzer \emph{et al.}~\cite{mentzer2018conditional} directly modeled the entropy of the latent representation by using a 3D-CNN Context Model. Since those spatially adjacent representations of latents have high correlations, Minnen \emph{et al.}~\cite{minnen2019joint} and Lee \emph{et al.}~\cite{lee2019} utilized context-adaptive entropy model with none zero-mean Gaussian distribution. Cheng \emph{et al.}~\cite{cheng2020learned} proposed an attention module to enhance the reconstruction and discretized Gaussian mixture likelihoods to improve the entropy model. Lee \emph{et al.}~\cite{lee2019hybrid} jointly optimized both the image compression and the quality enhancement with a Gaussian mixture model. \subsection{Learned Variable Rate Image Compression} Conditional Convolutions were proposed by Choi \emph{et al.}~\cite{choi2019variable} to realize a variable-rate image compression using the two-stage training. In the first training stage, the coarse variable-rate control was achieved by varying the Lagrange multiplier in the conditional model. While the fine variable-rate control was realized by tuning the quantization bin size of the latents in the second training stage. Yang \emph{et al.}~\cite{yang2020variable} proposed a similarly modulated autoencoder with different Lagrange multipliers to realize a coarse variable-rate control. In~\cite{akbari2020learned}, a B-bit quantizer with multiple values was introduced to realize the variable-rate image compression. Besides, to further improve the performance, the residual between the original image and the reconstructed image was encoded by BPG. Tong Chen and Zhan Ma proposed a set of quality scaling factors embedded after the Encoder network to achieve variable rates~\cite{chen2020variable}. These methods have achieved variable rates, but they don't consider the balance between the compression performance and the fine variable rates, which is vital to guarantee a good compression performance. \section{Preliminary}\label{sec:s3} \subsection{Autoregressive and Hierarchical Structure} Figure~\ref{fig:network} shows the proposed IVR network architecture. If without the InterpCA (see Section~\ref{sec:IVR}), the rest parts in Figure~\ref{fig:network} compose the commonly used autoregressive and hierarchical framework~\cite{minnen2019joint} for image compression. The Encoder transforms the input image $x$ into a latent $y$ by a transformation $f_e(x;\theta_e)$, which is then quantized into ${\hat y}$ for the next transformation. ${\hat y}$ can be losslessly compressed by arithmetic encoding (AE) and transmitted into a string of bits, using a probability distribution $p_{\hat y}({\hat{y})}$. A hyper-network (Hyper Encoder $f_{he}({\hat y};\theta_{he})$ and Hyper Decoder $f_{hd}({\hat z};\theta_{hd})$) with the Context Model and the Entropy Parameters network~\cite{minnen2019joint}, is utilized to learn the probability distribution of ${\hat y}$. The Context Model generates rough probability distribution parameters using a linear $5\times5$ masked convolution. Then, outputs of the Context Model and the Hyper Decoder are concatenated to generate accurate probability distribution parameters $({\mu_y}, {\sigma_y})$ by the Entropy Parameters network. The learning goal of the entropy-based methods is to minimize the expected length of the bitstream as well as the expected distortion between the reconstructed and original images, leading to a Rate-Distortion (RD) optimization problem. This can be formulated as: \begin{equation} \begin{split} \mathbb{L} &= R+\lambda_j D \\ &=\mathbb{E}_{x\sim p_x}[-\log_2{p_{\hat y}({\hat{y})})}-\log_2{p_{\hat z}({\hat{z})})}]+\lambda_j \mathbb{E}_{x\sim p_x}{[d(x, \hat{x})]}, \end{split} \label{eq:loss1} \end{equation} where $\lambda_j$ is the $j$th Lagrange multiplier $\lambda$ that determines the desired rate-distortion trade-off, $R$ is referred to as the expected length of the compressed bitstream, and $D$ is the distortion measured by either Mean Squared Error (MSE) or MS-SSIM. Similar to the traditional image codecs, the entropy model uses lossless entropy encoding to generate the final bitstream (such as arithmetic~\cite{arithmatic}), or lossless decoding algorithms to restore the latent from the bitstream (such as Huffman coding~\cite{huffman}). When multiple compression rates are desired in the single rate structure, these methods~\cite{minnen2019joint,cheng2020learned,lee2019,lee2019hybrid} normally require training a set of separate networks with different $\lambda$ for different compression rates, resulting in a very high cost in model storage and training. \begin{figure}[h] \centering \vspace{-0.4cm} \includegraphics[scale=0.4]{Figure2/Conditional.pdf} \vspace{-0.4cm} \caption{Conditional Convolution in Choi's paper~\cite{choi2019variable}. $n$ is the number of $\lambda$, $ch$ is the output channel of the convolution, $X_i$ is the output of the convolution, $Y_i$ is the output of the module. FCN: Fully-Connected Network.} \label{fig:CC} \vspace{-0.2cm} \end{figure} \begin{figure}[htbp] \centering \subfigure[$m(\lambda_j)$]{\includegraphics[scale=0.35]{Figure1/Weight.pdf} \label{sfig:weight}} \subfigure[$b(\lambda_j)$]{\includegraphics[scale=0.35]{Figure1/bias.pdf} \label{sfig:bias}} \vspace{-0.4cm} \caption{The average values of $m(\lambda_j)$ and $b(\lambda_j)$ in different layers with different $\lambda$ in Conditional Convolution~\cite{choi2019variable}. The larger index corresponds to the rear layer of the network flow, \emph{e.g.}, the $4$ th layer in Decoder layers is the last layer of the network.} \label{fig:mask} \vspace{-0.2cm} \end{figure} \begin{figure}[htbp] \centering \vspace{-0cm} \subfigure[Histograms of $\hat y$]{\includegraphics[scale=0.36]{Figure1/Histgram_hori.pdf} \label{sfig:y}}\vspace{-0.4cm} \subfigure[Histograms of $\hat z$]{\includegraphics[scale=0.36]{Figure1/Histgramz_hori.pdf} \label{sfig:z}} \vspace{-0.4cm} \caption{Histograms of $\hat y$ and $\hat z$ in Single Rate Network (SinRN) with different $\lambda$ on Kodim01. The solid line represents the histogram distribution, and the dotted line represents the Laplace fitting distribution.} \label{fig:Histogram} \vspace{-0.2cm} \end{figure} \subsection{Conditional Convolution} The Conditional Convolutions~\cite{choi2019variable} realized the variable-rate control in an entropy-based single model. To figure out its principle, a detailed structure diagram is given in Figure~\ref{fig:CC}. Let $X_i$ be a 3-dimensional (3-D) feature map output of the $i$th convolution with channel $ch$, and $Y_i$ be a 3-D feature map output of the Conditional Convolution with the same channel $ch$ as $X_i$. \begin{equation} \begin{split} Y_i&= m(\lambda_j) \otimes X_i + b(\lambda_j)\\ &= softplus\big(FCN(Onehot(\lambda_j)\big) \otimes X_i + FCN(Onehot(\lambda_j))\\ &\textup{with}\quad\lambda_j\in\{\lambda_0, \lambda_1, ..., \lambda_{n-2}, \lambda_{n-1}\}, \end{split} \label{eq:lambja} \end{equation} where $j\in\{0,1,...,n-1\}$, and $n$ is the number of pre-defined Lagrange multiplier values to control the variable rates. $m(\lambda_j)$ and $b(\lambda_j)$ are the channel-wised mask weights and biases for $X_i$. In Choi's paper~\cite{choi2019variable}, all traditional Convolutions are replaced by the Conditional Convolutions to realize the coarse variable-rate control, while the fine variable-rate control was realized by tuning the quantization bin size of the latents. The compression performance on the Kodak dataset is wavy and incoherent (RD curves are shown in Figure~\ref{sfig:mse}), which leads to some performance degradation compared with Minnen's method~\cite{minnen2019joint}. \subsection{Analysis of Variable Rates} In the compression process, the entropy loss occurs in the Encoder to generate $\hat y$ and the process of Hyper compression is lossless to compress $\hat y$ with the AE~\cite{balle2018variational,minnen2019joint,lee2019,cheng2020learned,lee2019hybrid}. To verify the difference of variable rates in the Single Rate Networks (SinRNs), some experiments were conducted to display the distributions of latents with different $\lambda$ and Histograms of $\hat y$ and $\hat z$ are extracted and shown in Figure~\ref{fig:Histogram}. In the Histograms of $\hat y$, more values of input images are transformed to zero to reduce the whole entropy and the BPP of $\hat y$ decreases with the decrease of $\lambda$, so the SinRNs achieve different compression rates. Different from $\hat y$, the distributions of hyper-latents $\hat z$ remain nearly the same, indicating that the lossless Hyper compression might be independent of different compression rates. Meanwhile, Conditional Convolutions~\cite{choi2019variable} were reproduced to evaluate the function of $m(\lambda_j)$ and $b(\lambda_j)$, and their average values of different layers are diplayed in Figure~\ref{fig:mask}. Under fixed $\lambda$, the average weights decrease with the depth of the layers in Encoder Layers and HyperEncoder Layers, and increase with the depth of the layers in HyperDecoder Layers and Decoder Layers. Besides, the average weights are also affected by the value of $\lambda$. In particular, the average weights increase with $\lambda$ in the Encoder Layers and decrease in the other layers. Compared with the average weights of $m(\lambda_j)$, the average biases, most of which are valued around zero, do not exhibit apparent patterns. Considering this phenomenon, $b(\lambda_j)$ might be not necessary for Conditional Convolutions, whose removal could potentially help reduce the computational complexity. Similar to the situation of SinRNs, the Conditional Convolutions in the Encoder are controlled by $\lambda_j$ to produce $\hat y$ with different scaling coefficients, generating more zeros and realize a higher compression rate. Theoretically, as long as the set of $\lambda$ is large enough and there are enough parameters in the Fully-Connected Network (FCN), it is possible for the model to obtain the fine variable-rate control. However, as shown in Figure~\ref{fig:CC}, parameters in a row correspond to one $\lambda$ and they are independent of other rows of parameters during training and inference. If the set of $\lambda$ is large, each row of parameters may have fewer training iterations and be trapped in poor convergence, resulting in degraded compression performance. Additionally, the distributions of $\hat z$ are nearly the same as those in Figure~\ref{fig:Histogram}, hence the use of Conditional Convolutions might also bring performance degradation. Observing the red line ($\lambda=480$) and the green one ($\lambda=1000$) in Figure~\ref{sfig:weight}, if there exists another line between them, the model would be able to obtain an intermediate compression rate between $\lambda=480$ and $\lambda=1000$. Based on these analyses, an interpolation variable-rate method is therefore proposed in this paper for a good balance between the compression performance and the variable-rate control. \section{Proposed method} \label{sec:IVR} \subsection{Interpolation Variable Rate} To solve the none correlations of parameters in Conditional Convolutions, a newly-elaborated method named InterpCA is proposed to bind different values of $\lambda$ with different rates by introducing a rate hyperparameter $j$ and an interpolation hyperparameter $\alpha$. The compression network takes $j$ and $\alpha$ as input hyperparameters that determine the value of $\lambda_{j,\alpha}$ according to the following equation: \begin{equation} \begin{split} \lambda_{j,\alpha}&=\alpha \lambda_j+(1-\alpha) \lambda_{j+1}\\ &\textup{with} \quad {\lambda_j\ or\ \lambda_{j+1}} \in\{\lambda_0, \lambda_1, ..., \lambda_{n-2}, \lambda_{n-1}\}, \end{split} \label{eq:ivr} \end{equation} where $j\in\{0,1,...,n-2\}$, $\alpha\in[0,1]$ and $n$ is the number of pre-defined Lagrange multiplier values. Then, the loss function of Eq. (\ref{eq:loss1}) can be expressed as: \begin{equation} \mathbb{L} = R+\lambda_{j,\alpha} D. \label{eq:loss2} \end{equation} Figure~\ref{fig:ica} demonstrates the implementation of the InterpCAs, which are inserted behind each convolution layer in the Encoder $f_e(x;\theta_e)$ and the Decoder $f_d({\hat y};\theta_d)$. The output $X_i$ of each convolution layer can be transformed to $Y_i$ in the following way: \begin{equation} \begin{split} Y_i &=softplus\big(FCN(I_n(j,\alpha))\big) \otimes X_i\\ &\textup{with}\quad I_n(j,\alpha)=\alpha I_n[j]+(1-\alpha) I_n[j+1], \end{split} \label{eq:yi} \end{equation} where $I_n$ is a two-dimensional identity matrix showed, $\otimes$ denotes element-wised multiplication, $I_n[j/j+1]$ is the $j/j+1$ th row vector of $I_n$ (\emph{i.e.}, $Onehot(\lambda_{j/j+1)}$), and the output shape of $softplus$ is [Batchsize, 1, 1, $ch$]. \begin{figure}[h] \centering \vspace{-0.4cm} \includegraphics[scale=0.45]{Figure2/Interp.pdf} \caption{Interpolation channel attention (InterpCA). $n$ is the number of $\lambda$, $ch$ is the output channel of the convolution, $X_i$ is the output of convolution, $Y_i$ is the output of the module. In InerpCA, $j$ and $\alpha$ determine the final value of $\lambda$. Mask biases are not used in InterpCA.} \label{fig:ica} \vspace{-0.2cm} \end{figure} It is worth noting that the value range of $\alpha$ is different in training and inference. In each iteration of training, $j$ and $\alpha$ are randomly sampled within the value range (\emph{i.e.}, $\alpha\in\{0,0.5,1\}$) and then fed into the network. When $\alpha$ is equal to 0.5, $\lambda_{j,\alpha}$ is interpolated by $\lambda_j$ and $\lambda_{j+1}$ as $\lambda_{j,0.5}=(\lambda_j+\lambda_{j+1})/2$. In inference, $\alpha\in\{0,1/M,...,M-1/M,1\}$ is used to make full use of the correlations between the parameters in fully connected neural layers to realize nearly continuous rate control. Compared with existing methods, the InterpCA method has obvious advantages. One of the assets of the technique is its simplicity and efficiency, which helps most of the entropy-based SinRNs upgrade to the variable-rate network. Another advantage is that the rough range of interpolation hyperparameter enhances the robustness of the network and speeds up the convergence in training, and the superfine rate control could be realized by selecting an appropriate $M$ in inference. There are two reasons why InterpCA does not bring performance degradation. One is that inserting InterpCA into the Encoder and Decoder brings no change to the entropy model, and the other is that the InterpCA makes full use of the parameters in FCNs. \subsection{Improved Single Rate Network} Figure~\ref{fig:framwork} shows the operation diagrams of the improved SinRN. Compared with~\cite{minnen2019joint}, most of the uniform-noise-addition operations are replaced by the quantization operations for latents in training that reduce the difference between the training and inference. Similar to~\cite{Zhou_2019_CVPR_Workshops}, the probability $p_{\hat y}(\hat{y})$ of quantized latent ${\hat y}$ is modeled as Laplacian distributions: \begin{equation} p_{\hat{y}}(\hat{y}|{\hat z}, \theta_{hd}, \theta_{cm}, \theta_{ep})=\prod_{i=1}\Big(\int_{{\hat{y}_i}-\frac{1}{2}}^{{\hat{y}_i}+\frac{1}{2}} Lap(y;\mu_y, e^{\sigma_y})\, dy\Big). \label{eq:py1} \end{equation} To simulate the quantized process during training, we model each latent ${\tilde y}=y+U(-\frac{1}{2}, \frac{1}{2})$ as a Laplacian convolved with a unit uniform distribution. This ensures a good match between Encoder and Decoder distributions of both the quantized latents and continuous-valued latents subjected to additive uniform noise. The probability of ${\tilde y}$ is \begin{equation} p_{\tilde{y}}(\tilde{y}|{\tilde z}, \theta_{hd}, \theta_{cm}, \theta_{ep})=\prod_{i=1}\Big(\int_{{\tilde{y}_i}-\frac{1}{2}}^{{\tilde{y}_i}+\frac{1}{2}} Lap(y;\mu_y, e^{\sigma_y})\, dy\Big). \label{eq:py2} \end{equation} \begin{figure}[h] \centering \vspace{-0.4cm} \includegraphics[scale=0.3]{Figure2/Diagrams.pdf} \vspace{-0.4cm} \caption{Operational Diagrams of SinRN. $Q$ denotes the operation of quantization. $U$ denotes the operation of adding uniform noise. The relationships between other symbols and components are summarized in Figure~\ref{fig:network}.} \label{fig:framwork} \vspace{-0.2cm} \end{figure} For the hyper latent $z$, a set of channel-wise trainable parameters $(\mu_z, \sigma_z)$ are defined to learn the Laplacian distribution of the quantized latent ${\hat{z}}$ or noised latent ${\tilde{z}}$: \begin{equation} p_{\hat{z}}(\hat{z})=\prod_{i=1}\Big(\int_{{\hat{z}_i}-\frac{1}{2}}^{{\hat{z}_i}+\frac{1}{2}} Lap(z;\mu_z, e^{\sigma_z})\, dz\Big), \label{eq:pz1} \end{equation} \begin{equation} p_{\tilde{z}}(\tilde{z})=\prod_{i=1}\Big(\int_{{\tilde{z}_i}-\frac{1}{2}}^{{\tilde{z}_i}+\frac{1}{2}} Lap(z;\mu_z, e^{\sigma_z})\, dz\Big). \label{eq:pz2} \end{equation} Particularly, transforming $\tilde{z}$ to the Hyper Decoder in the training period helps improve the entropy estimation of $p_{\tilde y}(\tilde{y})$ because additional uniform noise is beneficial for learning the probability distribution of ${\tilde y}$. The Decoder $f_d$ transforms $\hat{y}$ into the reconstruction $\hat{x}$. Because both the compressed latent and the compressed hyper latent are compressed by AE, the full loss function of the IVR network reads \begin{equation} \begin{split} \mathbb{L} &= R_y+R_z+\lambda_{j,\alpha} D \\ &=\mathbb{E}_{x\sim p_x}[-\log_2{p_{\tilde y}({\tilde{y})})} -\log_2{p_{\tilde z}({\tilde{z})})}] +\lambda_{j,\alpha} \mathbb{E}_{x\sim p_x}{[d(x, \hat{x})]}. \end{split} \label{eq:loss3} \end{equation}\\ To further enhance the reconstruction like~\cite{lee2019hybrid}, a separable Unet post-network~\cite{Unet2015} shared by all rates is introduced to the model in this paper. Details of the Unet post-network are present in \textbf{\emph{Supplementary Materials}}. \section{Experiments} \subsection{Implementation Details} \noindent\textbf{Details For Training} $\quad$ The networks were trained on a body of color PNG images licensed under creative commons, about 30K images downloaded from CVPR workshop CLIC training dataset~\cite{clic} and the world wide web. The networks were optimized using Adam with a batch size of 8 and a patch size of $256\times256$ randomly extracted from the training dataset. There were multistage learning rates ($\{1e-4, 5e-5, 1e-5, 5e-6, 1e-6\}$) that changed with boundaries ($\{1600000, 2100000, 2300000, 2400000, 2500000\}$). The IVR network was optimized with two quality metrics, i.e., MSE and MS-SSIM. When optimized by MSE, $\lambda$ lain in $\{50, 160, 300, \\480, 710, 1000, 1350, 1780, 2302, 2915\}$ and $\alpha$ lain in $\{0, 0.5, 1.0\}$. Different from MSE, $\lambda$ lain in $\{1, 2, 3, 5, 8, 10, 15, 20, 25, 30\}$, when optimized by $1-MS-SSIM$. Finally, the IVR network was enhanced by the Unet post-network to achieve better performance. Additional details about the network are shown in Figure~\ref{fig:network}. \noindent\textbf{Details for Inference} $\quad$ We evaluated the compression performance on the commonly used 24 Kodak lossless images~\cite{kodak} with a size of 768 x 512 and 102 high-resolution CLIC validation images~\cite{clic}. For the IVR network, $M$ was set as 5 for drawing the whole RD curves and $M$ was set as 100/1000/1000 to evaluate the fine rate control at $j=8$. To evaluate the rate-distortion performance, the rate was measured by BPP, and the quality was measured by either PSNR or MS-SSIM, corresponding to the optimized distortion metric. \noindent\textbf{Details For VVC and HEVC} $\quad$ We used the official test model VTM 9.0~\cite{VTM9} with intra profile and BPG software~\cite{BPG} to test the performance. For both of them, YUV444 format was used as the configuration to maximize the compression performance. \begin{figure}[t] \centering \includegraphics[scale=0.26]{Figure1/Kodak_cond2.pdf} \caption{Ablation study of the IVR based on autoregressive and hierarchical structure~\cite{minnen2019joint} over the Kodak dataset. Three figures consist of the complete RD curves. IVR variants: "Proposed" is the baseline with InterpCA. "Proposed Single-rates" is the base SinRN. "Proposed w/o $\alpha$" represents the case without interpolation, which is realized by setting interpolation hyperparameter $\alpha$ to 1 in Eq.~\ref{eq:ivr}. "Proposed-hyper w/o $\alpha$" means the InterpCA is used in both Encoder/Decoder network and Hyper-Encoder/Decoder network with $\alpha=1$, which is similar to the case in~\cite{choi2019variable}.} \label{fig:ablation} \vspace{-0.3cm} \end{figure} \subsection{Ablation Study} To verify the effectiveness of the interpolation variable-rate method, three kinds of IVR variants are implemented, \emph{i.e.}, \emph{the Proposed}, \emph{the Proposed without $\alpha$} and \emph{the Proposed-Hyper without $\alpha$}. \emph{the Proposed} is the baseline with InterpCA. \emph{the Proposed without $\alpha$} represents the case without interpolation, which is realized by setting interpolation hyperparameter $\alpha$ to 1 in Eq.~\ref{eq:ivr}. \emph{the Proposed-Hyper without $\alpha$} means the InterpCA is used in both Encoder/Decoder network and Hyper-Encoder/Decoder network with $\alpha=1$, which is similar to the case in~\cite{choi2019variable}. Meanwhile, these variants are deployed in two of the most common structures: autoregressive and hierarchical structure~\cite{minnen2019joint}, and hierarchical structure~\cite{balle2018variational}. These networks were all optimized by MSE, and results are summarized in Figure~\ref{fig:ablation}, Figure~\ref{fig:woCM} and Table~\ref{table:minnenbdbr}. Figure~\ref{fig:ablation} illustrates that compared with the SinRN for fixed $\lambda$, the proposed IVR network has no performance degradation on the whole and is better at some points. The part A of Table~\ref{table:minnenbdbr} shows that the proposed model performs better than other IVR variants, saving 0.28\%, 2.28\%, 3.33\% bits (bits-saving is all measured by Bjøntegaard Delta Bit Rate (BDBR)~\cite{bdbr}) compared with SinRNs, \emph{the Proposed without $\alpha$ (n=1000)}, \emph{the Proposed-Hyper without $\alpha$ (n=1000)} on the Kodak dataset, respectively. The structure without $\alpha$ is equivalent to the Conditional Convolutions, the performance of \emph{the Proposed without $\alpha$ (n=1000)} deteriorates 1.93\% compared with the structure of 10 rates. This demonstrates that the compression performance decreases when using a large set of $\lambda$. When inserting Conditional Convolutions into the Hyper Encoder and the Hyper Decoder, the performance of \emph{Proposed-Hyper without $\alpha$} drops 1.13\% (n=10), 1.47\% (n=100) and 1.05\% (n=1000), respectively. That means that sharing a common set of parameters in the Hyper-autoencoder network is sufficient for different compression rates. \begin{table}[h] \begin{center} \caption{BD-Rate Gains against the SinRNs with and without the CM, corresponding to Part A and B respectively. Negative values in BDBR represent the bits saving.} \label{table:minnenbdbr} \vspace{-0.2cm} \renewcommand\arraystretch{1} \setlength{\abovecaptionskip}{0pt \setlength{\belowcaptionskip}{0pt}% \scalebox{0.8}{ \begin{tabular}{|c|c|p{1.5cm}<{\centering}|p{2cm}<{\centering}|} \hline ~&Methods & BDBR & BD-PSNR (dB)\\ \hline \multirow{7}*{A}&Proposed &-0.2898\% & 0.0107\\ ~&Proposed w/o $\alpha$ (n=10) & 0.0592\% & -0.0040\\ ~&Proposed w/o $\alpha$ (n=100) & 1.3114\% & -0.0609\\ ~&Proposed w/o $\alpha$ (n=1000) & 1.9872\% & -0.0937\\ ~&Proposed-Hyper w/o $\alpha$ (n=10) & 1.1857\% & -0.0580\\ ~&Proposed-Hyper w/o $\alpha$ (n=100) & 2.7815\% & -0.1185\\ ~&Proposed-Hyper w/o $\alpha$ (n=1000) & 3.0409\% & -0.1340\\ \hline \multirow{3}*{B}&Proposed w/o CM &-0.4740\% & 0.0193\\ ~&Proposed w/o (CM \& $\alpha$) (n=10) & 1.1733\% & -0.0482\\ ~&Proposed-Hyper w/o (CM \& $\alpha$) (n=10) & 1.6358\% & -0.0662\\ \hline \end{tabular}} \end{center} \vspace{-0.4cm} \end{table} Different from the part serial compression of the autoregressive and hierarchical structure~\cite{minnen2019joint}, the hierarchical structure~\cite{balle2018variational} could be speeded up in parallel completely, which is more likely to be used in practice. The RD curves in Figure~\ref{fig:woCM} and BDBRs in the part B of Table~\ref{table:minnenbdbr} demonstrate the same conclusions as the ablation study based on the autoregressive and hierarchical structure. The part B of Table~\ref{table:minnenbdbr} shows that the proposed model without CM saves bits up to 1.65\%, 2.11\% compared with \emph{the Proposed without CM and $\alpha$ (n=10)}, and \emph{the Proposed-Hyper without CM and $\alpha$ (n=10)}. This indicates interpolation variable-rate method has more advantages in the hierarchical structure. \begin{figure \centering \includegraphics[scale=0.38]{Figure1/Kodak_nocm_ablation.pdf}\vspace{-0.2cm} \caption{Ablation study of the IVR based on hierarchical structure~\cite{balle2018variational} over the Kodak dataset. "w/o CM" means the network is without the Context Model and the Entropy Parameters. Other variants are the same as Figure~\ref{fig:ablation}.} \label{fig:woCM} \vspace{-0.4cm} \end{figure} \begin{figure*}[!h] \centering \subfigure[PSNR on Kodak]{\includegraphics[scale=0.32]{Figure1/Kodak_MSE.pdf} \label{sfig:mse}} \subfigure[MS-SSIM on Kodak]{\includegraphics[scale=0.32]{Figure1/Kodak_MSSSIM.pdf}}\vspace{-0.4cm} \subfigure[PSNR on CLIC validation dateset]{\includegraphics[scale=0.32]{Figure1/CLIC_MSE.pdf}} \subfigure[MS-SSIM on CLIC validation dateset]{\includegraphics[scale=0.32]{Figure1/CLIC_MSSSIM.pdf}}\vspace{-0.4cm} \caption{RD curves aggregated over the Kodak and CLIC validation dataset. IVR-Unet (MSE) has a competitive rate-distortion performance on the Kodak image set as measured by PSNR (RGB) compared to all other methods. To our knowledge, this is the first learned variable-rate method that outperforms the VTM 9.0. MS-SSIM values converted to decibels $(-10log_{10}(1-MS-SSIM))$. The IVR-Unet (MS-SSIM) is slightly worse than~\cite{lee2019hybrid}.} \label{fig:RD} \vspace{-0.3cm} \end{figure*} \subsection{Rate Distortion Performance} Figure~\ref{fig:RD} demonstrates the rate-distortion performance on the Kodak and CLIC validation dataset, where the IVR is compared with other previous methods, including well-known compression standards such as BPG and VVC, as well as recent entropy-based learned compression methods, such as Minnen's~\cite{minnen2019joint}, Cheng's~\cite{cheng2020learned}, Lee's~\cite{lee2019hybrid} and Choi's~\cite{choi2019variable}. RD curves of Minnen's~\cite{minnen2019joint} and Cheng's~\cite{cheng2020learned} are from the released LaTex code~\cite{cheng2020learned} in arXiv. RD curves of Lee's~\cite{lee2019hybrid} and Choi's~\cite{choi2019variable} are obtained by contacting the author. Regarding the metric of PSNR, the IVR network with Unet outperforms all other previous methods, achieving the state-of-the-art performance of its kind as shown in Figure~\ref{fig:RD} and Table~\ref{table:bdbr}. By setting the BPG as the anchor, the improvements of SinRN save $4.71\%$ bits than Minnen's~\cite{minnen2019joint} (Quantized operations contribute about 3.5\% and the Laplacian distribution contributes about 1\%) and Unet post-network boosts the performance about $8.40\%$ bits-saving. Although the improvements of SinRN promote the performance smaller than that of Unet post-network, it does not increase the computational complexity relative to Minnen's~\cite{minnen2019joint}. Regarding the metric of MS-SSIM, it achieves a competitive performance among the learned image compression methods, which is only a little worse than Lee's~\cite{lee2019hybrid} and Cheng's~\cite{cheng2020learned}. It is also the first variable-rate image compression method that outperforms the ongoing compression method VTM 9.0 (intra) in both PSNR and MS-SSIM. The results on the CLIC validation dataset show the IVR method also works for high-resolution images, apart from low-resolution Kodak images. \begin{table} \begin{center} \caption{BD-Rate Gains of Proposed, Lee's~\cite{lee2019hybrid}, Cheng's~\cite{cheng2020learned}, VTM 9.0~\cite{VVC}, Minnen's~\cite{minnen2019joint}, against the BPG~\cite{BPG}. “/” represents that the method didn't evaluate the RD performance on the dataset in that column.}\vspace{-0.2cm} \label{table:bdbr} \renewcommand\arraystretch{1} \setlength{\abovecaptionskip}{0pt \setlength{\belowcaptionskip}{0pt}% \scalebox{0.8}{ \begin{tabular}{|c|p{1.5cm}<{\centering}|p{1.5cm}<{\centering}|p{1.5cm}<{\centering}<{\centering}|p{1.5cm}<{\centering}|} \hline &\multicolumn{2}{c|}{Kodak} & \multicolumn{2}{c|}{CLIC}\\ \cline{2-5} Methods & PSNR & MS-SSIM & PSNR & MS-SSIM\\ \hline Proposed + Unet & -21.25\% & -56.36\% & -36.09\% & -58.31\%\\ Proposed & -12.85\% & -52.71\% & -27.54\% & -54.26\% \\ Lee's~\cite{lee2019hybrid} & -20.75\% & -57.98\% & /& /\\ Cheng's~\cite{cheng2020learned} & -17.24\% & -57.38\% & /& /\\ VTM 9.0~\cite{VVC} & -20.76\% & -20.13\% & -35.69\%& -28.43\%\\ Minnen's~\cite{minnen2019joint} & -8.14\% & -47.948\% & /& /\\ \hline \end{tabular}} \end{center} \vspace{-0.4cm} \end{table} We verify the rate fineness of the IVR-Unet network by changing the parameters $M$ with $j$ set as 8. The results in Table~\ref{tab:fvr} illustrate that the variable-rate RD points start to appear a disorder until $M = 10000$. In reality, traditional image codecs provide hundreds of variable-rate RD points to meet the basic requirement of applications. Compared with that, considering that the length of the values of $j$ is 9, the IVR network obtains 9000 effective variable-rate RD points with a very fine PSNR interval of 0.001 dB at $M=1000$. Moreover, as shown in Figure~\ref{fig:visual}, the IVR network realizes a fine rate interval of 0.0001 BPP compared with the traditional image codecs. Except for the variable-rate control, Figure~\ref{fig:visual} also reveals that the IVR image compression method provides better reconstruction quality with fewer artifacts in terms of PSNR, MS-SSIM, and perception. \begin{table}[h] \renewcommand\arraystretch{1.25} \centering \setlength{\abovecaptionskip}{0pt \setlength{\belowcaptionskip}{0pt}% \caption{Fine variable-rate Test over the Kodak Dataset in IVR-Unet network (MSE).}\vspace{0.2cm} \label{tab:fvr} \scalebox{0.7}{ \begin{tabular}{|c |c c |c c |c c|} \hline $j=8$&\multicolumn{2}{c|}{M=100} & \multicolumn{2}{c|}{M=1000} & \multicolumn{2}{c|}{M=10000}\\ $\alpha$& BPP & PSNR(dB) & BPP & PSNR(dB) & BPP & PSNR(dB)\\ \hline \setlength{\parskip}{10em} 1 & 0.8023736 & 37.02175 & 0.8023736 & 37.02175 & 0.8023736 & 37.02175\\ $1-1/M$ & 0.8032523 & 37.02725 & 0.8024466 & 37.02241 & 0.8023781 & 37.02176\\ $1-2/M$ & 0.8040930 & 37.03298 & 0.8025299 & 37.02305 & 0.8023888 & 37.02185\\ $1-3/M$ & 0.8049592 & 37.03910 & 0.8026113 & 37.02374 & 0.8023969 & 37.02196\\ $1-4/M$ & 0.8058211 & 37.04532 & 0.8027042 & 37.02438 & 0.8024009 & 37.02206\\ $1-5/M$ & 0.8066999 & 37.05148 & 0.8027963 & 37.02463 & 0.8024107 & 37.02214\\ $1-6/M$ & 0.8076027 & 37.05822 & 0.8029035 & 37.02518 & 0.8024225 & 37.02213\\ \hline \end{tabular}} \vspace{-0.4cm} \end{table} \section{Conclusion} In this paper, we proposed an efficient IVR network for image compression by introducing an InterpCA module and using an improved SinRN. The original SinRN was optimized by replacing most of the uniform-noise-addition operations with quantization ones for more accurate entropy estimation, therefore bringing performance improvement without extra computational complexity. A modular Unet post-network was also introduced to the pipeline to further enhance the reconstruction. Most importantly, benefitting from the InterpCA module which was used in both Encoder and Decoder of the SinRN, the IVR network can provide fine variable-rate control without performance degradation. In addition, the minimal plug-in design of the InterpCA makes it compatible with most entropy-based methods. As illustrated in Table~\ref{tab:fvr}, the proposed IVR network obtained 9000 effective variable-rate points with a fine PSNR interval of 0.001 dB and a fine BPP interval of 0.0001, when $M=1000$. The RD curves in Figure~\ref{fig:RD} validated that the IVR network outperformed VTM 9.0 (intra) in both PSNR and MS-SSIM. To the best of our knowledge, this is the first variable-rate learned image compression method achieving such competitive performance. {\small \bibliographystyle{ref_fullname}
\section{Introduction}\label{section_intro} In spectral graph theory, a lot of efforts have been made to study how various graph-theoretic operations affect the spectra of the adjacency matrix or Laplacian matrices (combinatorial or normalized) of an associated graph. In a recent paper of Guo\cite{guo2020partially}, an operation called tree-exchange is introduced for the family of invertible trees. A tree $T$ is called invertible if its adjacency matrix $A_T$ is invertible. Previously, Godsil\cite{godsil1985inverses} showed that for an invertible tree $T$, $A_T^{-1}$ can be viewed as the adjacency matrix of a signed graph $T^{-1}$ and this $T^{-1}$ always contains $T$ as a subgraph. The operation of tree-exchange transforms an invertible tree $T$ to another invertible tree $\tilde{T}$ based on how $T$ is embedded in $T^{-1}$. Guo proved (\cite{guo2020partially}Corollary 4.2) that by choosing an appropriate tree-exchange, the smallest positive eigenvalue of $A_T$ is smaller than the smallest positive eigenvalue of $A_{\tilde{T}}$. In this paper, we consider a type of operations called edge transfer: Suppose $T$ is a tree with edges $\{u,v\},\{v,w\}$, saying the edge $\{u,v\}$ is transferred from $v$ to $w$ means the removal of $\{u,v\}$ and the addition of $\{u,w\}$. In case $\{u,v\}$ had a weight, the new edge $\{u,w\}$ is assigned with the same weight. \begin{figure}[h] \centering \scalebox{0.5}{\input{fig_example_edge_transfer}} \caption{An example of edge-transfer.} \label{fig:example edge-transfer} \end{figure} We will apply appropriate edge transfer operations based on information encoded in the discrete Green's functions, which are the pseudoinverse (or the inverse) of the Laplacian (or its variations) of a graph. The concept of discrete Green's functions was first introduced in \cite{chung2000discrete}. In this paper, we consider the following types of graph-theoretic Laplacians and their associated discrete Green's functions: \begin{itemize} \item The combinatorial Laplacian $L=D-A$ where $D$ is the diagonal degree matrix and $A$ is the adjacency matrix. The Moore-Penrose pseudoinverse of $L$ is called the combinatorial Green's function and is denoted by $\mathbf{G}$. \item The normalized Laplacian $\mathcal{L}= D^{-1/2}LD^{-1/2}$. The Moore-Penrose pseudoinverse of $\mathcal{L}$ is called the normalized Green's function and is denoted by $\mathcal{G}$. \item The generalized Laplacian $L_t = tI+ L$ with an additional scalar $t>0$. The associated Green's functions $\mathbf{G}_t$ is the inverse of $L_t$. \end{itemize} Our main results illustrate the effect when an edge is transferred from a vertex to another with a lower diagonal value of the discrete Green's function. \begin{theorem}\label{main1} Let $T$ be a weighted tree having edges $\{u,v\},\{v,w\}$. Suppose $\mathbf{G}_T(w,w)\leq \mathbf{G}_T(v,v)$ and $T'$ is obtained by transfer the edge $\{u,v\}$ from $v$ to $w$, then (i) $\text{Tr}(\mathbf{G}_{T})>\text{Tr}(\mathbf{G}_{T'})$; (ii) if in addition $T$ is simple, $\text{Tr}(\mathcal{G}_{T})>\text{Tr}(\mathcal{G}_{T'})$. \end{theorem} The quantities $\text{Tr}(\mathbf{G})$ and $\text{Tr}(\mathcal{G})$ have both spectral and probabilistic interpretations. For any weighted graph, the trace of the combinatorial (normalized resp.) Green's function equals the reciprocal sum of nontrivial combinatorial (normalized) Laplacian eigenvalues. On the probabilistic side, $\text{Tr}(\mathcal{G})$ is known to be equal to the Kemeny's constant (\cite{kemeny}) \begin{align*} \kappa=\sum_vH(u,v)\pi_v, \end{align*} where $H(u,v)$ denotes the hitting time from $u$ to $v$ and $(\pi_v)$ is the stationary distribution of the random walk on the considered graph. It's well-known that $\kappa$ is independent of the choice of $u$. The Kemeny's constant is an important invariant of finite Markov chains and has many practical applications, see \cite{catral2010kemeny}, \cite{levene2002kemeny} and \cite{patel2015robotic}. For $\text{Tr}(\mathbf{G})$, we have a similar probabilistic interpretation (\cite{chung2021forest}Corollary 4.5) as well, \begin{align*} \sum_u\sum_v H(u,v)=\text{vol}\cdot n\text{Tr}(\mathbf{G}), \end{align*} where $\text{vol}$ denotes the volume and $n$ is the number of vertices of the considered graph. We also prove an analogue of Theorem \ref{main1} for the generalized Laplacian. \begin{theorem}\label{main2} Let $T$ be a weighted tree having edges $\{u,v\},\{v,w\}$ and $t>0$ a scalar. Suppose $\mathbf{G}_t(w,w)\leq \mathbf{G}_t(v,v)$ and $T'$ is obtained by transfer the edge $\{u,v\}$ from $v$ to $w$, then $\det(tI+L_T)>\det(tI+L_{T'})$. \end{theorem} We say an edge transfer operation is w.r.t. $\mathbf{G}_t$ for some $t\geq 0$ if the edge is only transferred from a vertex to another with smaller or equal diagonal values on $\mathbf{G}_t$. Here $\mathbf{G}_0:=\mathbf{G}$. As a consequence of our Theorem \ref{main1} and Theorem \ref{main2}, edge transfer operations w.r.t. discrete Green's functions are irreversible. We shall study the partial orders on trees arising from these edge transfer operations. Maximal elements will be determined and the minimal element is obviously the star graph. Surprisingly, the maximal elements include, besides the path graph, other claw-like trees. Based on our identification of the maximal and minimal elements, we give a simple proof that the path has the largest Kemeny's constant and the star has the smallest Kemeny's constant among simple trees of the same size. This result is also independently obtained in recent papers \cite{ciardo2020kemeny} and \cite{faught20211separation}. We also determine the weighted tree having the largest $\text{Tr}(\mathbf{G})$ among all trees sharing the same weight set. It's a path with larger weights assigned to edges nearer to either end. Examples will be given in Section.\ref{section_discussion} showing that Theorem \ref{main1} and Theorem \ref{main2} no longer generalizes to non-acyclic graphs, suggesting these inequalities are hard to obtain only with techniques from matrix analysis. Our paper is structured as follows: In Section \ref{section_pre} we present notations and some matrix-tree-theorem type results that we shall utilize in our proofs. Section \ref{section_proof_main1} and Section \ref{section_proof_main2} are devoted to prove Theorem \ref{main1} and Theorem \ref{main2} respectively. In Section \ref{section_partial_order} we study the partial orders arising from edge transfer operations. Finally in Section \ref{section_discussion}, we present some examples and open problems. \section{Preliminaries}\label{section_pre} In this section, we consider $\Gamma=(V,E)$ a connected weighted graph without loops, where $V$ and $E$ are its vertex set and edge set respectively. For each edge $e=(u,v)$ we denote its weight by $\omega(e)=\omega(u,v)>0$. It's required that $\omega(u,v)=0$ for $(u,v)\not\in E$. In this paper, each graph shall come with a total order on its vertex set for the purpose of its matrix representation. The adjacency matrix of $\Gamma$ is defined by \begin{align*} A(u,v):=\begin{cases} \omega(u,v)\quad \text{, if ${u,v}\in E$};&\\ 0\quad\text{, otherwise.} \end{cases} \end{align*} For each vertex $u$, we define its degree $d_u:=\sum_{v} \omega(u,v)$ and denote the matrix $D:=\text{Diag}[d_u]$. The volume of a subset $U\subset V$ refers to the quantity $\text{vol}(U):=\sum_{u\in U}d_u$. The Laplacian matrices and discrete Green's functions are defined in Section \ref{section_intro}. For technical details about their definitions, the readers are referred to \cite{chung2000discrete}. Our strategy for proofs of Theorem \ref{main1} and Theorem \ref{main2} is to interpret entries of discrete Green's functions as enumerations of rooted or unrooted forests. A $k$-forest is a graph that has $k$ connected components and no cycles. A $1$-forest is a tree. A rooted $k$-forest is a $k$-forest with a designated vertex in each component, called the roots. A rooted $1$-forest is called a rooted tree. A subgraph is said to be spanning if it contains all vertices of the ambient graph. For a considered graph, we use $\mathbb{F}_k$ to denote the set of spanning unrooted $k$-forests and $\mathbb{F}^*_k$ to denote the set of its spanning rooted $k$-forests. Also, for any subgraph $H$ of a weighted graph $\Gamma$, we define its weight by\begin{align*} \omega(H)&=\prod_{e\in E(H)}\omega(e). \end{align*} The following two formulas are Corollary 1.2 and Corollary 1.5 of \cite{chung2021forest} respectively. The first one can also be found in \cite{chebotarev2002forest} in a somewhat different form. \begin{lemma}\label{CGF_formula} For a weighted connected graph $\Gamma$, the combinatorial Green's function $\mathbf{G}$ satisfies \begin{align*} \mathbf{G}(u,v)=\frac{1}{n^2\tau}\Big(\sum_{\substack{T_1 \cup T_2 \in \mathbb{F}_2\\u,v\in T_1}}|T_2|^2\omega(T_1\cup T_2)-\sum_{\substack{T_1 \cup T_2 \in \mathbb{F}_2\\u\in T_1, v\in T_2}}|T_1||T_2|\omega(T_1\cup T_2)\Big), \end{align*} where $\tau:= \sum_{T\in \mathbb{F}_1} \omega(T)$ and $n=|\Gamma|:=|V|$. \end{lemma} \begin{lemma}\label{NGF_formula} If $\Gamma$ is a connected simple graph, we have \begin{align*} \mathcal{G}(u,v)=\frac{\sqrt{d_ud_v}}{\text{vol}^2(\Gamma)\tau}\Big(\sum_{\substack{T_1 \cup T_2 \in \mathbb{F}_2\\u,v\in T_1}}\text{vol}^2(T_2)-\sum_{\substack{T_1 \cup T_2 \in \mathbb{F}_2\\u\in T_1, v\in T_2}}\text{vol}(T_1)\text{vol}(T_2)\Big). \end{align*} \end{lemma} The following two formulas are proved for $\mathcal{L}_t:=tI+\mathcal{L}$ and its inverse in \cite{chung2010pagerank}. The proofs are similar for $L_t=tI+L$ and $\mathbf{G}_t$. Similar formulas can also be found in \cite{kelmans1967properties} and \cite{chung1996combinatorial}. \begin{lemma}\label{determinant_formula} For a weighted graph $\Gamma$ on $n$ vertices, we have \begin{align*} \det(tI+L)=\sum_{k=0}^n t^k \sum_{F\in \mathbb{F}^*_k} \omega(F). \end{align*} \end{lemma} \begin{lemma}\label{GGF_formula} For a weighted graph $\Gamma$ on $n$ vertices, we have \begin{align*} \mathbf{G}_t(u,v)=\frac{(-1)^{u+v}}{\det(tI+L)}\sum_{k=0}^n t^{k-1} \sum_{F\in \mathbb{F}^*_{k,u,v}} \omega(F), \end{align*}where $\mathbb{F}^*_{k,u,v}$ denotes the set of rooted $k$-forests with $u$ as one root and $v$ in the same component as $u$. \end{lemma} \section{Proof of Theorem \ref{main1}}\label{section_proof_main1} \begin{proof}[Proof of (i)] Keeping the notation as in the statement, we call $e_1:=\{u,v\}$ and $e_1':=\{u,w\}$. Also name the edge $\{v,w\}=:e_2$, call the three components of $T\backslash\{e_1,e_2\}$ containing $u,v,w$ resp. $V_1,V_2,V_3$. Denote $|V_i|=n_i,i=1,2,3$ as well. Firstly we examine the condition $\mathbf{G}_T(w,w)\leq \mathbf{G}_T(v,v)$. By Lemma \ref{CGF_formula}, for each vertex $r\in T$, we have \begin{align}\label{eq:main1_1} \mathbf{G}_T(r,r)=\frac{1}{n^2}\sum_{\substack{T_1\cup T_2\in \mathbb{F}_2(T)\\r\in T_1}}|T_2|^2\omega(T_1\cup T_2). \end{align} Each $2$-forest $\{T_1,T_2\}$ corresponds to an edge $e\in E(T)$ in the sense that $T_1\cup T_2=T\backslash e$. For a $2$-forest $\{T_1,T_2\}$ corresponding to an edge $e\neq e_2$, one can observe that both $v$ and $w$ are in the same component of $\{T_1, T_2\}$, hence there are exactly the same quantity counted towards the summands of $\mathbf{G}_T(w,w)$ and $\mathbf{G}_T(v,v)$ in (\ref{eq:main1_1}). For $\{T_1,T_2\}$ corresponding to $e_2$, there are $n_1+n_2$ (resp. $n_3$) vertices on the component not having $w$ (resp. $v$). So we have \begin{align*} \mathbf{G}_T(w,w)- \mathbf{G}_T(v,v)=\frac{1}{n^2}((n_1+n_2)^2-n_3^2)\omega(T\backslash e_2). \end{align*} Hence $\mathbf{G}_T(w,w)\leq \mathbf{G}_T(v,v)$ gives\begin{align}\label{eq:main1_2} n_1+n_2\leq n_3. \end{align} Now notice that for any edge $e\not\in \{e_1,e_1',e_2\}$, $T\backslash e$ and $T'\backslash e$ gives the same componentwise partition of $V$, i.e. two vertices $x,y$ are in the same component of $T\backslash e$ iff they are in the same component of $T'\backslash e$. As an example, see Figure \ref{fig:proof}. \begin{figure}[h] \centering \scalebox{0.5}{\input{fig_proof}} \caption{$T\backslash e$ and $T'\backslash e$ gives the same componentwise partition.} \label{fig:proof} \end{figure} The $2$-forests $T\backslash e_1$ and $T'\backslash e_1'$ also give the same componentwise partition. Therefore, in (\ref{eq:main1_1}), these $2$-forests contributes to the same quantity to $\mathbf{G}_T(r,r)$ and $\mathbf{G}_{T'}(r,r)$ and the difference are contributed by the $2$-forests $T\backslash e_2$ and $T'\backslash e_2$: \begin{align*} \mathbf{G}_{T}(r,r)-\mathbf{G}_{T'}(r,r)=\frac{1}{n^2}(\sum_{\substack{T_1\cup T_2\in \mathbb{F}_2(T)\\r\in T_1, e_2\not\in T_1\cup T_2}}|T_2|^2-\sum_{\substack{T'_1\cup T'_2 \in \mathbb{F}_2(T')\\r\in T'_1, e_2\not\in T'_1\cup T'_2}}|T'_2|^2)N, \end{align*} where $N:=\omega(T\backslash e_2)=\omega(T'\backslash e_2)>0$. Then we can compute $\mathbf{G}_{T}(r,r)-\mathbf{G}_{T'}(r,r)$ depending on which $V_i$ the vertex $r$ sits in: $\forall x\in V_1$, the component of $T\backslash e_2$ which doesn't contain $x$ is $V_3$, so $T\backslash e_2$ contributes $n^{-2}n_3^2N$ to $\mathbf{G}_{T}(x)$. On the other hand, the component of $T'\backslash e_2$ which doesn't contain $x$ is $V_2$, so $T'\backslash e_2$ contributes $n^{-2}n_2^2N$ to $\mathbf{G}_{T'}(x)$. Hence,\begin{align}\label{eq:main1_3} \Delta(x):=n^2N^{-1}(\mathbf{G}_{T}(x,x)-\mathbf{G}_{T'}(x,x))=(n_3^2-n_2^2). \end{align} Similarly we can compute\begin{align} \label{eq:main1_4}&\forall y\in V_2,\Delta(y)=n_3^2-(n_1+n_3)^2,\\ \label{eq:main1_5}&\forall z\in V_3,\Delta(z)=(n_1+n_2)^2-n_2^2. \end{align} Finally we have, using identities (\ref{eq:main1_3}), (\ref{eq:main1_4}) and (\ref{eq:main1_5}), \begin{align*} \Delta&:=n^2N^{-1}(\text{Tr}(\mathbf{G}_{T'})-\text{Tr}(\mathbf{G}_{T}))\\ &=\sum_{x\in V_1}\Delta(x)+\sum_{y\in V_2}\Delta(y)+\sum_{z\in V_3}\Delta(z)\\ &=n_1(n_3^2-n_2^2)+n_2(n_3^2-(n_1+n_3)^2)+n_3((n_1+n_2)^2-n_2^2)\\ &=n_1(n_3-n_2)+n_1^2(n_3-n_2)>0\text{, by (\ref{eq:main1_2})}, \end{align*}which concludes the proof. \end{proof} \begin{proof}[Sketched proof of (ii)] The procedure of the proof is the same as that of (i). The only difference is that, instead of counting cardinalities we count the volumes with hand-shaking-lemma such as $\text{vol}_T(V_1)=2|V_1|-1$. Precisely, for each vertex $r\in T$, define\begin{align*} Q_T(r):=\sum_{\substack{T_1\cup T_2\in \mathbb{F}_2(T)\\r\in T_1}}vol_T^2(T_2). \end{align*} Then Lemma \ref{NGF_formula} gives,\begin{align} \label{eq:main1_6}\mathcal{G}_T(r,r)=\frac{d_r}{vol_T^2(T)}Q_T(r). \end{align} Let write $N:=\text{vol}^{-2}_T(T)=\text{vol}^{-2}_{T'}(T')$. Similar to (\ref{eq:main1_3}), (\ref{eq:main1_4}) and (\ref{eq:main1_5}), we have\begin{align*} &\forall x\in V_{1}, Q_{T}(x)-Q_{T'}(x)=(2n_3-1)^2-(2n_2-1)^2=:\Delta_1,\\ &\forall y\in V_{2}, Q_{T}(y)-Q_{T'}(y)=(2n_3-1)^2-(2n_1+2n_3-1)^2=:\Delta_2,\\ &\forall z\in V_{3}, Q_{T}(z)-Q_{T'}(z)=(2n_1+2n_2-1)^2-(2n_2-1)^2=:\Delta_3. \end{align*} Finally above three identities and (\ref{eq:main1_6}) gives\begin{align*} \Delta&:=N^{-1}(\text{Tr}(\mathcal{G}_{T'})-\text{Tr}(\mathcal{G}_{T}))\\ &=\sum_{x\in V_1}d_x\Delta_1+\sum_{y\in V_2}d_y\Delta_2+\sum_{z\in V_3}d_z\Delta_3\\ &=\text{vol}_T(V_1)\Delta_1+\text{vol}_T(V_2)\Delta_2+\text{vol}_T(V_3)\Delta_3\\ &=(2n_1-1)\Delta_1+2n_2\Delta_2+(2n_3-1)\Delta_3, \end{align*} and this last expression can be expanded and checked to be positive through elementary methods. \end{proof} \section{Proof of Theorem \ref{main2}}\label{section_proof_main2} For simplicity, we assume that $T$ is simple, i.e. all edges have the unit weight $1$. We leave it to our readers to adapt this proof to the weighted case. Let's call the edge $e_1:=\{u,v\}$ and the edge $e_1':=\{u,w\}$. Name $e_2:=\{v,w\}$. Call the components of $T\backslash\{e_1,e_2\}$, containing $u,v,w$ respectively $V_1,V_2,V_3$. We shall be counting spanning forests of $T$ (and $T'$), which corresponds to cuts, i.e. subsets of edges, in the sense that a forest is the ambient tree with edges in a cut removed. We denote $\mathcal{K}_{e_2}^{e_1}$ to be the collection whose elements are cuts $K\subset E(T)$ s.t. $e_1\not\in K$ and $e_2\in K$. For a cut $K$, we write $K_i$ to be the cut restricted to $V_i$, i.e. \begin{align*} K_i:=\{e\in K; e\subset V_i\},i=1,2,3. \end{align*} Notice that any $K\in \mathcal{K}_{e_2}^{e_1}$ is uniquely determined by its restriction on $V_i$'s as\begin{align*} K=K_1\cup K_2\cup K_3\cup\{e_2\}. \end{align*}We shall use this correspondence between a $K$, cut of $T$ in $\mathcal{K}_{e_2}^{e_1}$, and a group of $K_i$, cuts of $V_i$, without further explanation. Also notice that a cut $K\subset E(T)$ induces a cut $K'\subset E(T')$, s.t. $K'\backslash \{e'_1\}=K\backslash \{e_1\}$ and $|K|=|K'|$, and this gives us a bijection between the cuts of $T$ and those of $T'$. We define, for $K\subset E(T)$ and $r\in V(T)$,\begin{align}\label{eq:main2_1} Q_T(K,r)=t^{|K|+1}\sum_{\substack{F\in F^*_{|K|+1,r,r}\\ E(F)=E(T)\backslash K}}\omega(F). \end{align}By Lemma \ref{determinant_formula} and double counting, as $\sum_{r\in V}Q_{T}(K,r)$ counts each rooted $(|K|+1)$-forest $F$, whose underlying subgraph is $T\backslash K$, $|K|+1$ times, we have \begin{align}\label{eq:main2_2} \det(tI+L_T)=\sum_{K\subset E(T)}\frac{1}{|K|+1}\sum_{r\in V(T)} Q_T(K,r). \end{align} Next, we can verify that when $K\not\in \mathcal{K}_{e_2}^{e_1}$, then two vertices $x,y$ are in the same component of $T\backslash K$ iff they are in the same component of $T'\backslash K'$. This implies $Q_T(K,r)=Q_{T'}(K',r),\forall r\in V(T)$ whenever $K\not\in \mathcal{K}_{e_2}^{e_1}$. For $K\in \mathcal{K}_{e_2}^{e_1}$, we denote the components of $V_i\backslash K_i$ as $V_{K_i,j}$ where $j=0,\dots,m_{K_i}$. Moreover, we require that $u\in V_{K_1,0}$, $v\in V_{K_2,0}$ and $w\in V_{K_3,0}$. We define\begin{align*} \Pi_{K_i}=\prod_{j=1}^{m_{K_i}}n_{K_i,j},\quad i=1,2,3; \end{align*}where $n_{K_i,j}:=|V_{K_i,j}|$. We point out here that $n_{K_i,j}$'s depends only on $K_i$ but not other information prescribed in $K$. Now We can check for a $K\in \mathcal{K}_{e_2}^{e_1}$, using arguments as in the derivation of (\ref{eq:main1_3}), (\ref{eq:main1_4}) and (\ref{eq:main1_5}),\begin{align*} &\forall x\in V_{K_1,0}, Q_{T'}(K',x)-Q_{T}(K,x)=(n_{K_2,0}-n_{K_3,0})\Pi_{K_1}\Pi_{K_2}\Pi_{K_3}t^{|K|+1},\\ &\forall y\in V_{K_2,0}, Q_{T'}(K',y)-Q_{T}(K,y)=n_{K_1,0}\Pi_{K_1}\Pi_{K_2}\Pi_{K_3}t^{|K|+1},\\ &\forall z\in V_{K_3,0}, Q_{T'}(K',z)-Q_{T}(K,z)=-n_{K_1,0}\Pi_{K_1}\Pi_{K_2}\Pi_{K_3}t^{|K|+1}. \end{align*} And for any $r\not \in V_{K_1,0}\cup V_{K_2,0}\cup V_{K_3,0}$,\begin{align*} Q_{T'}(K',r)-Q_{T}(K,r)=n_{K_1,0}(n_{K_2,0}-n_{K_3,0})\frac{1}{n(K,r)}\Pi_{K_1}\Pi_{K_2}\Pi_{K_3}t^{|K|+1}, \end{align*} where $n(K,r)$ is the size of the component of $T\backslash K$ where $r$ sits in. Summing up above equations, we conclude\begin{align*} \sum_{r\in V} (Q_{T'}(K',r)-Q_{T}(K,r))=(|K|+1)t^{|K|+1}n_{K_1,0}(n_{K_2,0}-n_{K_3,0})\Pi_{K_1}\Pi_{K_2}\Pi_{K_3}. \end{align*} In the context of equation (\ref{eq:main2_2}), we have\begin{align*} \Delta&:=\det(tI+L_{T'})-\det(tI+L_{T})=\sum_{K}\frac{1}{|K|+1} \sum_{r\in V}( Q_{T'}(K',r)-Q_{T}(K,r))\\ &=\sum_{K\in \mathcal{K}_{e_2}^{e_1}}t^{|K|+1}n_{K_1,0}(n_{K_2,0}-n_{K_3,0})\Pi_{K_1}\Pi_{K_2}\Pi_{K_3}\\ &=\sum_{K_1}\sum_{K_2}\sum_{K_3}t^{|K_1|+|K_2|+|K_3|+2}n_{K_1,0}(n_{K_2,0}-n_{K_3,0})\Pi_{K_1}\Pi_{K_2}\Pi_{K_3},\\ &\text{ since $|K|=|K_1|+|K_2|+|K_3|+1$}.\\ &=(\sum_{K_1}t^{|K_1|+2}n_{K_1,0}\Pi_{K_1})(\sum_{K_2}\sum_{K_3}t^{|K_2|+|K_3|}(n_{K_2,0}-n_{K_3,0})\Pi_{K_2}\Pi_{K_3}). \end{align*}As a consequence, our objective $\Delta<0$ is equivalent to \begin{align}\label{eq:main2_3} \sum_{K_2}\sum_{K_3}t^{|K_2|+|K_3|}(n_{K_2,0}-n_{K_3,0})\Pi_{K_2}\Pi_{K_3}<0. \end{align} Now we examine the condition $\mathbf{G}_{T,t}(w,w)\leq \mathbf{G}_{T,t}(v,v)$. Notice that by Lemma \ref{GGF_formula} and (\ref{eq:main2_1}), we have \begin{align}\label{eq:main2_4} \mathbf{G}_{T,t}(r,r)=\frac{1}{t\det(I+tL_T)} \sum_{K\subset E(T)} Q_T(r). \end{align} For a cut $K\subset E(T)$, if $e_2\not\in K$, then $v$ and $w$ are in the same component of $T\backslash K$, hence $Q_{T}(K,v)=Q_{T}(K,w)$. We can exhaust the cuts $K$ s.t. $e_2\in K$ by consider each element $K\in \mathcal{K}_{e_2}^{e_1}$ and $K\cup\{e_1\}$. For each $K\in \mathcal{K}_{e_2}^{e_1}$, we again check the difference,\begin{align*} &Q_{T}(K,w)-Q_{T}(K,v)=t^{|K|+1}(n_{K_1,0}+n_{K_2,0}-n_{K_3,0})\Pi_{K_1}\Pi_{K_2}\Pi_{K_3},\\ &Q_{T}(K\cup\{e_1\},w)-Q_{T}(K\cup\{e_1\},v)=t^{|K|+2}n_{K_1,0}(n_{K_2,0}-n_{K_3,0})\Pi_{K_1}\Pi_{K_2}\Pi_{K_3}. \end{align*}So using (\ref{eq:main2_4}), $\mathbf{G}_{T,t}(w,w)\leq \mathbf{G}_{T,t}(v,v)$ implies\begin{align*} 0&\geq \sum_K (Q_{T}(K,w)-Q_{T}(K,v)+Q_{T}(K\cup\{e_1\},w)-Q_{T}(K\cup\{e_1\},v))\\ &=\sum_{K_1}\sum_{K_2}\sum_{K_3}\Pi_{K_1}\Pi_{K_2}\Pi_{K_3} (t^{|K|+1}n_{K_1,0}+(t^{|K|+1}+t^{|K|+2}n_{K_1,0})(n_{K_2,0}-n_{K_3,0})), \end{align*}which implies, as a result of $|K|=|K_1|+|K_2|+|K_3|+1$, \begin{align*} 0&>\sum_{K_1}\sum_{K_2}\sum_{K_3}\Pi_{K_1}\Pi_{K_2}\Pi_{K_3} (t^{|K|+1}+t^{|K|+2}n_{K_1,0})(n_{K_2,0}-n_{K_3,0}))\\ &=(\sum_{K_1} t^{|K_1|+2}(1+tn_{K_1,0})\Pi_{K_1})(\sum_{K_2}\sum_{K_3}t^{|K_2|+|K_3|}(n_{K_2,0}-n_{K_3,0})\Pi_{K_2}\Pi_{K_3}), \end{align*}hence implying inequality (\ref{eq:main2_3}), concluding the proof. \section{Partial order of trees}\label{section_partial_order} In this section, unless otherwise stated, we only consider simple, i.e. unweighted, trees. We shall write $T_1\succeq_t T_2$ given that $T_2$ can be obtained by applying a series of (possibly zero) edge transfers w.r.t. $\mathbf{G}_t$ for a fixed $t\geq 0$. We shall abbreviate $\succeq_0$ as $\succeq$. \begin{corollary}\label{partial_order_exists} On the classes of trees of order $n$, $\succeq_t,(t\geq 0)$ is a partial order. \end{corollary} \begin{figure} \centering \scalebox{0.3}{\input{fig_Hasse_7_trees}} \caption{Hasse diagram of the partial order $\succeq$ on $7$-vertex trees} \label{fig:hasse} \end{figure} Figure \ref{fig:hasse} is an illustration of the Hasse diagram of $\succeq$ on $7$-vertex trees. It's obvious that the minimal element of $\succeq_t,(t\geq 0)$ is the star graph. In this section, we prove some properties related to $\succeq$ and determine the maximal elements w.r.t. $\succeq$. We start off by stating the following lemma, which is proved during the derivation of (\ref{eq:main1_2}).\begin{lemma}\label{differencing_lemma} Let $T$ be a tree on $n$ vertices and $e=\{u,v\}\in V(T)$. Suppose $n_1$ ($n_2$ resp.) is the size of the component of $T-e$ containing $u$ (resp. $v$), then $\mathbf{G}(u,u)-\mathbf{G}(v,v)=n^{-2}(n_2^2-n_1^2)$. \end{lemma} For each vertex $v$ inside a tree $T$, we call $\mathbf{G}_T(v,v)$ the Green's value of $v$. We can use above lemma to prove that the vertices with low Green's values are clustered together. \begin{lemma}\label{clustering_lemma}Let $T$ be a tree on $n$ vertices.\\ (1) Let $e_1=\{u,v\}$ and $e_2=\{v,w\}$ be edges in $T$, if $\mathbf{G}(v,v)\leq \mathbf{G}(u,u)$, then $\mathbf{G}(w,w)<\mathbf{G}(v,v)$.\\ (2) For any real number $t$, the subgraph induced by $\{v\in v(T)|\mathbf{G}(v,v)\leq t\}$ is connected. \end{lemma} \begin{proof} (1) Consider the subgraph $T\backslash\{e_1,e_2\}$ and call the components containing $u,v,w$ as $V_1,V_2,V_3$ resp., as well as write $|V_i|=n_i,i=1,2,3$. By Lemma \ref{differencing_lemma}, we know that $\mathbf{G}(v,v)\leq \mathbf{G}(u,u)$ means $n_1^2\geq (n_2+n_3)^2$. Therefore, $(n_1+n_2)^2>n_3^2$, which means $\mathbf{G}(w,w)<\mathbf{G}(v,v)$.\\ (2) Suppose on the contrary that $\{v\in v(T)|\mathbf{G}(v,v)\leq t\}$ isn't connected, consider a walk from one of its components to another, we can choose $v_1,v_2,\dots,v_k$ a path in $T$ s.t. $\mathbf{G}(v_1,v_1)\leq t$, $\mathbf{G}(v_k,v_k)\leq t$ and $\mathbf{G}(v_i,v_i)>t$ for all $i=2,\dots,k-1$. However, by part (1) we have $t<\mathbf{G}(v_{2},v_{2})<\mathbf{G}(v_{3},v_{3})<\dots<\mathbf{G}(v_{k},v_{k})$, a contradiction. \end{proof} The following characterization of the vertex of minimal Green's value is an easy corollary. \begin{lemma}\label{lemma_vertex_with_lowest_green's_value} A vertex $v\in T$ has the minimal Green's value $\mathbf{G}(v,v)$ iff $\forall e\in E(T)$ s.t. $v\in e$, the component of $T-e$ containing $v$ has no less vertices than the other component. Furthermore, there are at most two vertices $u,v$ having minimal Green's value and if there are two, they are adjacent to each other. \end{lemma} \begin{proof} By Lemma \ref{clustering_lemma}(2), if there's more than two vertices with minimal Green's value, we have a $P_3$ consisting of $u,v,w$ s.t. $\mathbf{G}(u,u)=\mathbf{G}(v,v)=\mathbf{G}(w,w)$ with minimal Green's value, contradicting Lemma \ref{clustering_lemma}(1). So there must be at most $2$ vertices with minimal Green's value and by Lemma \ref{clustering_lemma}(2) they must be adjacent. Now if $v$ is a vertex of minimal Green's value, by Lemma \ref{differencing_lemma}, $\forall e\in E(T)$ s.t. $v\in e$, the component of $T-e$ containing $v$ has no less vertices than the other component, as claimed. On the other hand, if $v$ isn't a vertex of minimal Green's value, let $w$ be a vertex of minimal Green's value and consider a path $v_0=w,v_1,\dots,v_{k-1}=:u,v_k=v$, by repeatedly applying Lemma \ref{clustering_lemma}(1) we have $\mathbf{G}(u,u)<\mathbf{G}(v,v)$. And by Lemma \ref{differencing_lemma}, the component containing $v$ in $T-e$ has less vertices than the other component, where $e=\{u,v\}$. \end{proof} For $n_1,n_2,n_3\in \mathbb{N}$, let $T_{n_1,n_2,n_3}$ be the "claw-like" tree on $n_1+n_2+n_3+1$ vertices obtained by adjointing one vertex to one of the leaves of each the path from $P_{n_1}$, $P_{n_2}$ and $P_{n_3}$. For example, we can tell from Figure \ref{fig:hasse} that $T_{2,2,2}$ is a maximal element of $\succeq$ on $7$-vertex trees. \begin{theorem}\label{determine_maximal_elements} The maximal elements w.r.t. $\succeq$ on $n$-vertex trees are $P_n$ and $T_{n_1,n_2,n_3}$'s satisfying $n_1+n_2+n_3=n-1$ and $\max\{n_1,n_2,n_3\}<\frac{n}{2}-1$. \end{theorem} \begin{proof} Assume $T$ is a maximal element w.r.t. $\succeq$ and let $u_0$ be a vertex of minimal Green's value for $T$. Write the components of $T-u_0$ as $V_i$ and $|V_i|=n_i$ where $i=1,\dots,k$. Clearly we have $\sum_{i=1}^k n_i=n-1$. Firstly, each $V_i$ must be a path $P_{n_i}$. Suppose not, then let $w\in V_i$ be a vertex with degree at least $3$. By Lemma \ref{clustering_lemma}, $w$ has only one neighbor with smaller (or equal) Green's value, which is the vertex precedes $w$ in the path from $u_0$ to $w$. Let $u,v$ be two neighbors of $w$ with larger Green's value. Consider the tree $T'$ obtained by replacing the edge $\{u,w\}$ by $\{u,v\}$, Lemma \ref{lemma_vertex_with_lowest_green's_value} guarantees that $u_0$ is still a vertex of minimal Green's value for $T'$, so by Lemma \ref{clustering_lemma}(1), considering the path in $T'$ from $u_0$ to $v$, $\mathbf{G}_{T'}(v,v)\geq \mathbf{G}_{T'}(w,w)$. Hence we see that $T'\succeq T$ contradicting the maximality. Next, we argue necessity of condition on $n_i$'s. Suppose there's $T'$ with vertices $\{u,v,w\}$ s.t. $\mathbf{G}_{T'}(v,v)\geq \mathbf{G}_{T'}(w,w)$ and a edge-transfer replaces $\{u,v\}$ with $\{u,w\}$ resulting $T$, then $\deg_{T}(w)\geq 3$, because $\mathbf{G}_{T'}(v,v)\geq \mathbf{G}_{T'}(w,w)$ guarantees $w$ isn't a leaf of $T'$. So $w=u_0$. Therefore, the only possible candidates for $T'$'s are trees $T_{ij}$ obtained by replacing the edge $\{v_i,u_0\}$ in $T$ by $\{v_i,v_j\}$, where $v_i$ is the only neighbor of $u_0$ in $V_i$. Hence $T$ being maximal is equivalent to $\mathbf{G}_{T_{ij}}(u_0,u_0)>\mathbf{G}_{T_{ij}}(v_j,v_j)$, which by Lemma \ref{differencing_lemma} is equivalent to $n_i+n_j>\frac{n}{2}$ for all $i\neq j$ in $\{1,\dots,k\}$. Now, if $k\geq 4$, then take the two smallest $n_i,n_j$ we must have $n_i+n_j\leq \frac{n-1}{2}\leq \frac{n}{2}$. So we must have $k=2,3$, in particular when $k=2$, $T$ is the path $P_n$. When $k=3$, we the condition $\min_{i\neq j}\{n_i+n_j\}>\frac{n}{2}$ is equivalent to $\max\{n_1,n_2,n_3\}<\frac{n}{2}-1$. \end{proof} We can use Lemma \ref{NGF_formula} to obtain closed formulas of $\text{Tr}(\mathcal{G})$ for $T_{n_1,n_2,n_3}$ and $P_{n_1+n_2+n_3+1}$ and compare them, consequently obtaining the following byproduct. Its proof only consists of computations so we leave it to curious readers. \begin{corollary}\label{extreme_kemeny_constant} Among all the trees of vertex size $n$, the star has the smallest Kemeny's constant $\text{Tr}(\mathcal{G})$ and the path has the largest. \end{corollary} Corollary 4.2 of \cite{ciardo2020kemeny} also reached the conclusion that the star minimizes Kemeny's constant among trees of a fixed size. Using techniques similar to \cite{ciardo2020kemeny}, Theorem 3.8 in \cite{faught20211separation} proved that the path maximizes the Kemeny's constant among trees of a fixed size. We can do slightly more for $\text{Tr}(\mathbf{G})$ under the setting of weight trees. Fix a multiset $W$ of $n-1$ positive numbers, we denote by $\mathbb{T}_W$ the collection of all weighted trees $T$ s.t. $\{\omega(e)| e\in E(T)\}=W$ as a multiset. As a corollary from our main theorems, $\succeq_t$ for any $t\geq 0$ is a partial order on $\mathbb{T}_W$ and obviously we have the following. \begin{corollary} The star graph $S_W$ with edge weights appears as in $W$ has the smallest $\text{Tr}(\mathbf{G})$ and the smallest $\det(tI+L),\forall t>0$ among all weighted trees in $\mathbb{T}_W$. \end{corollary} In fact, the partial order $\succeq$ on $\mathbb{T}_W$ is very similar with $\succeq$ on the class of simple trees: For any $T_1,T_2\in \mathbb{T}_W$ and $T'_i$ the simple tree having the same graph structure with $T_i$, we have $T_1\succeq T_2$ if and only if $T'_1\succeq T'_2$. Indeed, the possibility for an edge $\{u,v\}$ in $T_1$ to transfer from $v$ to $w$ is equivalent to $\mathbf{G}_{T_1}(v,v)\geq \mathbf{G}_{T_1}(w,w)$, which is equivalent to (\ref{eq:main1_2}), which is equivalent to $\mathbf{G}_{T'_1}(v,v)\geq \mathbf{G}_{T'_1}(w,w)$. \begin{corollary}\label{maximal_weighted_trees} For $W=\{\omega_1\geq \omega_2\geq \dots\geq \omega_{n-1}\}$, define $P_W$ to be the weighted path with vertex set $[n]$ and edge weights $\omega(e_i)=\omega_i$, where the edges are labelled as\begin{align*} \text{for even $n$: }e_1=\{1,2\}, e_3=\{2,3\}, \dots, e_{n-1}=\{\frac{n}{2},\frac{n}{2}+1\},\\ e_{n-2}=\{\frac{n}{2}+1,\frac{n}{2}+2\}, e_{n-4}=\{\frac{n}{2}+2,\frac{n}{2}+3\},\dots, e_{2}=\{n-1,n\}.\\ \text{for odd $n$: }e_1=\{1,2\}, e_3=\{2,3\}, \dots, e_{n-2}=\{\frac{n-1}{2},\frac{n+1}{2}\},\\ e_{n-1}=\{\frac{n+1}{2},\frac{n+3}{2}\}, e_{n-3}=\{\frac{n+3}{2},\frac{n+5}{2}\},\dots, e_{2}=\{n-1,n\}. \end{align*} Then $P_W$ maximize $\text{Tr}(\mathbf{G})$ among all elements in $\mathbb{T}_W$. \end{corollary} \begin{proof}[Sketched proof of Corollary \ref{maximal_weighted_trees}] By previous paragraph, it suffices to compare all weighted trees in $\mathbb{T}_W$ whose graph structure is $P_{n}$ or $T_{n_1,n_2,n_3}$ where $n_1+n_2+n_3+1=n$ and $\max\{n_1,n_2,n_3\}<\frac{n}{2}-1$. For an arbitrary $T\in \mathbb{T}_W$ s.t. the graph structure of $T$ is $T_{n_1,n_2,n_3}$, WLOG we can take $n_1\leq n_2\leq n_3$. Denote the unique vertex of $T$ having $3$ incident edges as $u_0$, $v$ the neighbor of $u_0$ which sits on the $n_1$-part of $T$ and $w$ the leaf of $T$ which sits on the $n_2$-part. Consider another weighted tree $T'\in \mathbb{T}_W$ obtained by transfer the edge $e_1:=\{u_0,v\}$ from $u_0$ to $w$. $T'$ is a path with an edge $e'_1:=\{v,w\}$ distinct from edges in $T$. Now, we can check, through Lemma \ref{CGF_formula} that for each $e\in E(T)\backslash e_1$, the quantity that $T'\backslash e$ contributes to $\text{Tr}(\textbf{G}_{T'})$ is more than that $T\backslash e$ contributes to $\text{Tr}(\textbf{G}_T)$ and the quantity that $T'\backslash e_1'$ contributes to $\text{Tr}(\textbf{G}_{T'})$ is more than that $T\backslash e_1$ contributes to $\text{Tr}(\textbf{G}_T)$. Therefore, $\text{Tr}(\mathbf{G}_{T'})>\text{Tr}(\mathbf{G}_T)$, meaning that the element maximizing $\text{Tr}(\mathbf{G})$ in $\mathbb{T}_W$ must be a weighted path. For weighted paths in $\mathbb{T}_W$, we can easily argue, using Lemma \ref{CGF_formula} again, that to maximize $\text{Tr}(\mathbf{G})$, the larger weight should be put closer to the two ends of the path. That is, we should assign the weights $w_1$ and $w_2$ to $\{1,2\}$ and $\{n-1,n\}$ respectively and then assign $w_3$ and $w_4$ to $\{2,3\}$ and $\{n-2,n-1\}$ respectively, and so on. This process gives us $P_W$, as wanted. \end{proof} We end this section with another corollary of Theorem \ref{determine_maximal_elements}. \begin{corollary}\label{maximum_inclusion} If $T$ is a maximal element for $\succeq$, then $T$ is maximal for $\succeq_t$, where $t$ is any positive number. \end{corollary} \begin{lemma}\label{maximum_inclusion_lemma} Let $v_i$ be one of the leaves of a path $P_i$ with length $l_i$ for $i=1,2$. If $l_2>l_1$, then $\mathbf{G}_{P_1,t}(v_1,v_1)>\mathbf{G}_{P_2,t}(v_2,v_2)$ where $t$ is any positive number. \end{lemma} \begin{proof} By an inductive argument we can assume that $l_2=l_1+1$. We may identify $P_1$ as a subgraph of $P_2$ s.t. $v_1$ is the only neighbor of $v_2$, and call $e_1:=\{v_1,v_2\}$. For each cut $K\subset E(P_1)$ of $P_1$, denote by $n_{K,i}$, $i=0,\dots,|K|$ the size of each component in $P_1\backslash K$ and particularly $n_{K,0}$ is the size of the component containing $v_1$. We apply Lemma \ref{GGF_formula} in the following computations. We first exhaust all the cuts of $P_2$ by consider each cut $K$ of $P_1$ and its augmentation $K\cup\{e_1\}$: \begin{align*} \mathbf{G}_{P_2,t}(v_2,v_2)&=\frac{\sum_{K\subset E(P_1)}t^{|K|}\prod_{i=1}^{|K|}n_{K,i}+\sum_{K\subset E(P_1)}t^{|K|+1}\prod_{i=0}^{|K|}n_{K,i}}{\sum_{K\subset E(P_1)}t^{|K|+1}\prod_{i=1}^{|K|}n_{K,i}(n_{K,0}+1)+\sum_{K\subset E(P_1)}t^{|K|+2}\prod_{i=0}^{|K|}n_{K,i}}\\ &<\frac{\sum_{K\subset E(P_1)}t^{|K|}\prod_{i=1}^{|K|}n_{K,i}+\sum_{K\subset E(P_1)}t^{|K|+1}\prod_{i=0}^{|K|}n_{K,i}}{\sum_{K\subset E(P_1)}t^{|K|+1}\prod_{i=0}^{|K|}n_{K,i}+\sum_{K\subset E(P_1)}t^{|K|+2}\prod_{i=0}^{|K|}n_{K,i}}\\ &=\frac{(1+t)\sum_{K\subset E(P_1)}t^{|K|}\prod_{i=1}^{|K|}n_{K,i}}{(1+t)\sum_{K\subset E(P_1)}t^{|K|+1}\prod_{i=0}^{|K|}n_{K,i}}=\mathbf{G}_{P_1,t}(v_1,v_1), \end{align*}as wanted. \end{proof} \begin{proof}[Proof of Corollary \ref{maximum_inclusion}] Firstly we observe this statement: Let $T$ be a tree and $e=\{v_1,v_2\}\in E(T)$. Denote the component of $T\backslash e$ containing $v_i$ as $T_i$. Then\begin{align}\label{eq:maximum_inclusion1} \mathbf{G}_{T,t}(v_1,v_1)>\mathbf{G}_{T,t}(v_2,v_2)\iff \mathbf{G}_{T_1,t}(v_1,v_1)>\mathbf{G}_{T_2,t}(v_2,v_2). \end{align}Indeed, for a cut $K_i\subset E(T_i)$, denote by $n_{K_i,j}$, $j=0,\dots,|K|$ the size of each component in $T_i\backslash K_i$ and particularly $n_{K_i,0}$ is the size of the component containing $v_i$. Now we can apply Lemma \ref{GGF_formula} to $\mathbf{G}_{T,t}(v_1,v_1)>\mathbf{G}_{T,t}(v_2,v_2)$ and notice that we only need to count the forests where $v_1,v_2$ are not adjacent, we have\begin{align*} \sum_{K_1}\sum_{K_2}t^{|K_1|+|K_2|+2}\prod_{j=1}^{|K_1|}n_{K_1,j}\prod_{j=0}^{|K_2|}n_{K_2,j}>\sum_{K_1}\sum_{K_2}t^{|K_1|+|K_2|+2}\prod_{j=0}^{|K_1|}n_{K_1,j}\prod_{j=1}^{|K_2|}n_{K_2,j}. \end{align*}We can reformulate above equation into\begin{align*} \frac{\sum_{K_1\subset E(T_1)}t^{|K_1|}\prod_{j=1}^{|K_1|}n_{K_1,j}}{\sum_{K_1\subset E(T_1)}t^{|K_1|+1}\prod_{j=0}^{|K_1|}n_{K_1,j}}>\frac{\sum_{K_2\subset E(T_2)}t^{|K_2|}\prod_{j=1}^{|K_2|}n_{K_2,j}}{\sum_{K_2\subset E(T_2)}t^{|K_2|+1}\prod_{j=0}^{|K_2|}n_{K_2,j}}, \end{align*}which is equivalent to, via Lemma \ref{GGF_formula}, $\mathbf{G}_{T_1,t}(v_1,v_1)>\mathbf{G}_{T_2,t}(v_2,v_2)$. Now by Theorem \ref{determine_maximal_elements}, a maximal element of $\succeq$ is either a path $P_n$, or a $T_{n_1,n_2,n_3}$, where $n_1+n_2+n_3=n-1$ and $\max\{n_1,n_2,n_3\}<\frac{n}{2}-1$. It's easy to check that $P_n$ is maximal for $\succeq_t$, hence we only prove for $T:=T_{n_1,n_2,n_3}$. Call the unique vertex of $T_{n_1,n_2,n_3}$ having degree $3$ as $u_0$ and $P_{n_i}$ the component of $T-u_0$ which is a path of length $n_i$, $i=1,2,3$. Suppose there's $T'$ with vertices $\{u,v,w\}$ s.t. $\mathbf{G}_{T'}(v,v)\geq \mathbf{G}_{T'}(w,w)$ and a edge-transfer replaces $\{u,v\}$ with $\{u,w\}$ resulting $T$, then $w$ must be $u_0$ in $T$, because $\mathbf{G}_{T',t}(w,w)\leq \mathbf{G}_{T',t}(v,v)$ guarantees $w$ isn't a leaf of $T'$. Therefore, the only possible candidates for $T'$'s are trees $T_{ij}$ obtained by replacing the edge $\{v_i,u_0\}$ in $T$ by $\{v_i,v_j\}$, where $v_i$ is the only neighbor of $u_0$ in the path $P_{n_i}$. As a result, $T_{n_1,n_2,n_3}$ being maximal iff $\forall i\neq j\in \{1,2,3\}$, $\mathbf{G}_{T_{ij},t}(u_0,u_0)>\mathbf{G}_{T_{ij},t}(v_j,v_j)$. Now we examine $\mathbf{G}_{T_{12},t}(u_0,u_0)>\mathbf{G}_{T_{12},t}(v_2,v_2)$ and the other cases are the same. Write $e=\{u_0,v_2\}$. By definition, $T_{12}\backslash e$ is the disjoint union of two path, $P_1$ with length $n_3+1$ containing $u_0$ as a leaf and $P_2$ with length $n_1+n_2$ containing $v_2$. Let's call the leaf in $P_2$ closer to $v_2$ as $l$. By Lemma \ref{maximum_inclusion_lemma} and the condition $n_3<\frac{n}{2}-1$, we have $\mathbf{G}_{P_2,t}(l,l)<\mathbf{G}_{P_1,t}(u_0,u_0)$. Furthermore, inductively apply Lemma \ref{maximum_inclusion_lemma} and (\ref{eq:maximum_inclusion1}), we can obtain $\mathbf{G}_{P_2,t}(v_2,v_2)<\mathbf{G}_{P_2,t}(l,l)$. So we have\begin{align*} \mathbf{G}_{P_2,t}(v_2,v_2)<\mathbf{G}_{P_2,t}(l,l)<\mathbf{G}_{P_1,t}(u_0,u_0), \end{align*}which is equivalent to, by (\ref{eq:maximum_inclusion1}), $\mathbf{G}_{T_{12},t}(u_0,u_0)>\mathbf{G}_{T_{12},t}(v_2,v_2)$, as wanted. \end{proof} \section{Final remarks}\label{section_discussion} In general, the partial orders $\succeq$ and $\succeq_t,(t>0)$ are not comparable, as examples in Figure \ref{fig:partial orders incomparable} show. In fact, one can check $T_2$ in Figure \ref{fig:partial orders incomparable} is a maximal element for $\succeq_1$. Hence, there are maximal elements for $\succeq_1$ but not maximal for $\succeq$, although Corollary \ref{maximum_inclusion} predicts the inclusion holds for the other direction. Hence we have the following problem. \begin{problem} Determine all the maximal elements of the partial order $\succeq_t,(t>0)$ on trees of size $n$. \end{problem} \begin{figure}[h] \centering \scalebox{0.5}{\input{fig_partial_orders_incomparable}} \caption{$T_1$ edge-transfers to $T_2$ w.r.t. $\mathbf{G}$ but $T_1\not\succeq_1 T_2$. $T_3$ edge-transfers to $T_4$ w.r.t. $\mathbf{G}_1$ but $T_1\not\succeq T_2$.} \label{fig:partial orders incomparable} \end{figure} Another natural problem is that how can we extend our results to graphs that are not trees. Certainly, edge transfer operations can be generalized to any weighted graph: To transfer the edge $\{u,v\}$ from $v$ to $w$, we can modify the edge-weights by adding the weight $\omega(u,v)$ to $\omega(u,w)$ and then deleting the edge $\{u,v\}$. \begin{figure}[h] \centering \scalebox{0.5}{\input{fig_counterexample_to_general_graph}} \caption{$\Gamma_1$ edge-transfers to $\Gamma_2$ w.r.t. $\mathbf{G}$ and $\Gamma_3$ edge-transfers to $\Gamma_4$ w.r.t. $(I+L)^{-1}$.} \label{fig:counterexample_to_general_graph} \end{figure} In Figure \ref{fig:counterexample_to_general_graph}, one can check $\Gamma_1$ edge-transfers to $\Gamma_2$ under the condition prescribed in Theorem \ref{main1} but $\text{Tr}(\mathbf{G}_{\Gamma_1})<\text{Tr}(\mathbf{G}_{\Gamma_2})$ and $\text{Tr}(\mathcal{G}_{\Gamma_1})<\text{Tr}(\mathcal{G}_{\Gamma_2})$. Also $\Gamma_3$ edge-transfers to $\Gamma_4$ under the condition prescribed in Theorem \ref{main2} and $\det(I+L_{\Gamma_3})<\det(I+L_{\Gamma_4})$. Hence the inequalities of Theorem \ref{main1} and Theorem \ref{main2} fails even for outerplannar graphs. However, we don't have any example showing edge transfer operations w.r.t. Green's functions are reversible, hence the next question. \begin{problem}\label{general_graph_problem} Generalize Corollary \ref{partial_order_exists}, i.e. prove that edge transfer operations w.r.t. Green's functions form partial orders, for a larger class of graphs. \end{problem} A good approach towards Problem \ref{general_graph_problem} could be, just like our main theorems, to define a quantity on graphs and show that permissible operations always decrease or increase this quantity. We have found examples showing a satisfactory quantity shouldn't be the spectral gap, the variance of Laplacian eigenvalues, or the non-increasing sequence of Green's values in lexicographic order. \medskip \noindent {\bf Acknowledgement.} The author would like to thank Fan Chung for many helpful suggestions.
\section{\label{Intro}Introduction} String theory on pp-wave background is being analysed extensively during the past several decades because they are endowed with a number of unique features \cite{Kowalski-Glikman:1984qtj,Chrusciel:1984gr,Figueroa-OFarrill:2001hal,Blau:2001ne,blau.m}. These pp-wave solutions appear as Penrose limits of various supergravity backgrounds in ten and eleven dimensions \cite{Blau:2002dy,Berenstein:2002jq,Sadri:2003pr}. They provide exact string theory backgrounds to all orders in $\alpha'$ as well as $g_s$ \cite{Amati:1988sa,Horowitz:1989bv}. In the context of AdS/CFT correspondence these backgrounds give rise to the so called BMN sector with large $R$-charge of the dual $\mathcal{N}=4$ superconformal theory in four dimensions \cite{Berenstein:2002jq}. The AdS/CFT correspondence is used to construct interacting string states from perturbative gauge theory \cite{Berenstein:2002jq}. Recently pp-wave backgrounds have been constructed from non-Abelian T-dual geometries of various supergravity theories. Non-Abelian T-duality has turned out to be a wonderful tool to construct new supergravity backgrounds from known ones. This is a nontrivial generalization of the conventional T-duality where a non-Abelian isometry group is used for dualization \cite{delaOssa:1992vci}. However, these non-Abelian T-dualities are not symmetries of the full string theory \cite{Giveon:1993ai}. They are used to relate the low energy supergravity theories among each other. Originally non-Abelian T-duality was formulated for the NS sector of supergravity theories. Subsequently, this formalism has been generalized to include the RR fields \cite{Sfetsos:2010uq}. This, in turn played a crucial role in relating different supergravity backgrounds among each other. Several examples of new supergravity backgrounds have also been constructed using the non-Abelian T-duality \cite{Itsios:2012zv,Itsios:2012dc,Macpherson:2014eza,Lozano:2011kb,Dimov:2015rie,Barranco:2013fza,Kooner:2014cqa,Dimov:2016rff}. Of particular interest in the present context is the impact of these developments in understanding several aspects of AdS/CFT correspondence \cite{Itsios:2013wd,Araujo:2015npa,Whiting,Lozano:2016kum,Lozano:2016wrs,Itsios:2017nou,Itsios:2017cew}. This has opened up the possibility of constructing several new CFT duals corresponding to these non-Abelian T-dual geometries. Relationships between a number of these dual geometries with the Penrose limits \cite{PenroseLimit} of some of the prevailing supergravity backgrounds have also been revealed \cite{Dimov:2016rff,Lozano:2016kum,Lozano:2016wrs}. An important development in this context is the non-Abelian T-dual of type-$IIB$ supergravity compactified on certain orbifolds of $AdS_5\times S^5$ \cite{Itsios:2017nou}. It has been shown that this geometry indeed admits plane wave solutions upon taking the Penrose limit along appropriate null geodesics \cite{Itsios:2017nou}. A candidate for the field theory dual of this geometry has also been proposed. These developments have further been generalized for the non-Abelian T-duals of the Klebanov-Witten background, which results in placing a stack of $D3$ branes near a conifold singularity. The corresponding supergravity background, $AdS_5\times T^{1,1}$, is obtained by blowing up the singularities of $AdS_5\times S^5$ orbifolds \cite{Klebanov:1998hh,Klebanov:1999tb}. An appropriate $SU(2)$ subrgoup of isometries of $T^{1,1}$ can be used to obtain the non-Abelian T-dual geometry \cite{Itsios:2017cew}. These dual goemetries also give rise to pp-wave solutions upon considering the Penrose limits along appropriate null geodesics \cite{Roychowdhury:2019kqr}. Placing a stack of $M$ fractional along with $N$ regular $D3$ branes at the conifold singularity gives rise to a $\mathcal{N}=1$ supersymmetric $SU(N+M)\times SU(N)$ gauge theory. The gravity dual is a nontrivial modification of the $AdS_5\times T^{1,1}$ background resulting the well-known Klebanov-Tseytlin geometry \cite{Klebanov:2000nc}. The goemetry admits non-Abelian isometries, an $SU(2)$ subgroup of which is used to construct a non-Abelian T-dual background. This gives rise to a new massive type-$IIA$ supergravity background \cite{Itsios:2012zv,Itsios:2013wd}. In the present work we will analyse the Penrose limits of this massive type-$IIA$ background in addition to the original Klebanov-Tseytlin background. We will show that, for the type-$IIA$ theory, the resulting background indeed admits a pp-wave solution. The plan of this paper is as follows. In the next section we will review the Klebanov-Tseytlin background and its non-Abelian T-dual. Subsequently we will analyse the Penrose limits and obtain pp-wave solution. We will discuss some aspects of the dual quiver theory before summarising the results. \section{Klebanov-Tseytlin Background} \label{original background} Placing a stack of $N$ regular and $M$ fractional branes at a conifold singularity modifies the spacetime geometry in a non-trivial way. The gravity dual of this non-conformal $SU(N+M)\times SU(N)$ gauge theory has been accomplished in a pioneering work by Klebanov and Tseytlin \cite{Klebanov:2000nc}. The geometry of the resulting supergravity background is given by \begin{eqnarray} \label{KT} ds^2 = H(r)^{-\frac{1}{2}} \ \eta_{\mu\nu} dx^\mu dx^\nu + H(r)^{\frac{1}{2}} \Big(dr^2 + r^2 ds_{T^{1,1}}^2\Big) \ . \end{eqnarray} Here we will use the conventions of \cite{Kruczenski:2003wz}. The warp factor is given by \begin{eqnarray} \label{h} H(r) = \frac{1}{r^4} \Bigg[R^4 + 2L^4 \Bigg(\ln\bigg(\frac{r}{r_0}\bigg) + \frac{1}{4}\Bigg)\Bigg] \ , \end{eqnarray} with $\eta_{\mu\nu}$ denoting the stranded $(3+1)$-dimensional Minkowski metric. The metric of $T^{1,1}$ is given by \cite{Klebanov:1999tb} \begin{eqnarray} \label{T 1,1} ds^2_{T^{1,1}}= \lambda_{1}^2\ d\Omega^2_{2} \big(\theta_{1},\phi_{1}\big) + \lambda_{2}^2\ d\Omega^2_{2} \big(\theta_{2},\phi_{2}\big) + \lambda^2\big(d\psi + \cos\theta_{1} d\phi_{1} + \cos\theta_{2} d\phi_{2}\big)^2 \ . \end{eqnarray} In the above, $d\Omega_2^2(\theta,\phi)$ denotes the round metric on a two-sphere. For $T^{1,1}$ the parameters $\lambda,\lambda_1,\lambda_2$ take the numerical values $\lambda_{1}^2=\lambda_{2}^2=\frac{1}{6}, \lambda^2=\frac{1}{9}$. In addition, we need to specify non-vanishing background fields in NS-NS and RR sectors. The background NS-NS two form field $B_2$ has the expression \begin{eqnarray} \label{KT B2} B_2 = \frac{T(r)}{6\sqrt{2}} \Big(\sin\theta_1 d\theta_1 \wedge d\phi_1 - \sin\theta_2 d\theta_2 \wedge d\phi_2\Big) \ , \end{eqnarray} with the corresponding field strengths \begin{eqnarray} H_3 = \frac{L^2}{3r} \Big(\sin\theta_1 dr \wedge d\theta_1 \wedge d\phi_1 - \sin\theta_2 dr \wedge d\theta_2 \wedge d\phi_2\Big) \ . \end{eqnarray} The non-vanishing RR fields strengths $F_3$ and $F_5$ are given respectively by \begin{eqnarray} F_3 = \frac{P}{18\sqrt{2}} \Big(d\psi + \cos\theta_{1} d\phi_{1} + \cos\theta_{2} d\phi_{2}\Big) \wedge \Big(\sin\theta_1 d\theta_1 \wedge d\phi_1 - \sin\theta_2 d\theta_2 \wedge d\phi_2\Big) \ , \end{eqnarray} and \begin{eqnarray} F_5= \big(1 + *_{10} \big) K(r) {\text{Vol}} \big(T^{1,1}\big) \ . \end{eqnarray} Here, $*_{10}$ denotes the Hodge dual with respect to the ten dimensional metric \eqref{KT}. For convenience, in the above we have used the notation \cite{Klebanov:2000nc} \begin{eqnarray} \label{KT B21} &P=& \frac{L^2}{ g_s} \ 2\sqrt{2} \ , \nonumber\\ &T(r)=& 2\sqrt{2} L^2 \ln\bigg(\frac{r}{r_0}\bigg) \ , \nonumber\\ &K(r)=& \frac{r^4}{30} \ H(r) \Bigg[1 - \frac{L^4}{2r^4 H(r)}\Bigg] \ . \end{eqnarray} The numbers $N$ of regular $D3$ branes, and $M$ of fractional $D3$ branes corresponds respectively to the flux of $F_5$ and $F_3$. It is important to note that, the constant $P$ is proportional to the number $M$ of fractional $D3$ branes. We will now consider the non-Abelian T-dual of the Klebanov-Tseytlin background. The non-Abelian T-duality with respect to an $SU(2)$ isometry has been obtained in \cite{Itsios:2012zv, Itsios:2013wd}. The corresponding metric of the T-dual geometry is given by \begin{eqnarray} \label{NATD-dual metric} &d\hat{s}^2_{\text{NATD}}=& H(r)^{-\frac{1}{2}} \ \eta_{\mu\nu} dx^{\mu} dx^{\nu} + H(r)^{\frac{1}{2}} \Big(dr^2 + \frac{1}{6} r^2 d\Omega_2^2 (\theta_1, \phi_1) \Big) \ \nonumber\\ && + \ \frac{1}{2r^2 \Delta \ H(r)^{\frac{1}{2}}} \Bigg[12 r^4 H(r) v_2^2 \sigma_{\hat{3}}^2 + 12 \Big(r^4 H(r) + 27 v_2^2\Big) dv_2^2 \nonumber\\ && \ + \ 9\Big(2r^4 H(r) + \mathcal{V}^2\Big) dv_3^2 + 108 \mathcal{V} v_2 \ dv_2 dv_3 \Bigg] \ , \end{eqnarray} where, the one form $\sigma_{\hat 3}$ is defined as \begin{equation} \sigma_{\hat{3}} = d\psi + \cos\theta_1 d\phi_1 \ , \end{equation} and the functions $\Delta$ and $\mathcal{V}$ are given by \begin{eqnarray} \label{delta, gamma} \Delta = 2r^4 H(r) + \mathcal{V}^2 + 54v_2^2 \ , \ \mathcal{V} = 6v_3 + 2\sqrt{2} L^2 \ln\bigg(\frac{r}{r_0}\bigg) \ . \end{eqnarray} The expression for the background NS-NS two form $\hat{B}_2$ and dilaton $\hat\Phi$ of the dual geometry are given by \begin{eqnarray} \label{NATD dila, b2} &\hat{B}_2& = \frac{L^2}{3} \ln\bigg(\frac{r}{r_0}\bigg) \sin\theta_1 d\theta_1 \wedge d\phi_1 + \frac{3\sqrt{2}}{\Delta} \ \mathcal{V} v_2 \sigma_{\hat{3}} \wedge dv_2 + \frac{1}{\sqrt{2}\Delta} \Big(2r^4 H(r) + \mathcal{V}^2\Big) \sigma_{\hat{3}} \wedge dv_3 \ ,\nonumber\\ &e^{-2\hat{\Phi}}& = \frac{1}{81 g_s^2} \ r^2 H(r)^{\frac{1}{2}} \ \Delta \ . \end{eqnarray} The field strengths corresponding to the RR sector are \begin{eqnarray} \label{NATD-dual RR} &\hat{F}_0=& - L^2 \ \frac{2\sqrt{2}}{9 g_s} \ , \nonumber\\ &\hat{F}_2=& \frac{1}{162\sqrt{2} \ g_s} \Bigg[\frac{r^4}{5} \ H(r) \bigg(1 - \frac{L^4}{2r^4 H(r)}\bigg) + L^2 \ 6\sqrt{2} \bigg(6v_3 + 2\sqrt{2} L^2 \ln\Big(\frac{r}{r_0}\Big) \bigg)\Bigg] \sin\theta_1 d\theta_1 \wedge d\phi_1 \nonumber\\ &&- \ L^2 \frac{4}{3 g_s} \ \frac{6v_3 + 2\sqrt{2} L^2 \ln\Big(\frac{r}{r_0}\Big) }{\Delta} \ v_2 \ \sigma_{\hat{3}} \wedge dv_2 + L^2 \ \frac{12}{ g_s} \frac{v_2^2}{\Delta} \ \sigma_{\hat{3}} \wedge dv_3 \ , \nonumber\\ &\hat{F}_4=& \frac{v_2}{18 \Delta \ g_s} \sin\theta_1 d\theta_1 \wedge d\phi_1 \wedge d\psi \wedge \Bigg[\Bigg(-18 \sqrt{2} L^2 \bigg(6v_3 + 2\sqrt{2} L^2 \ln\Big(\frac{r}{r_0}\Big) \bigg) \nonumber\\ && - \frac{3r^4}{5} \ H(r) \Big(1 - \frac{L^4}{2r^4 H(r)}\Big)\Bigg) v_2 dv_3 +\ 2 \Bigg(-2\sqrt{2} L^2 r^4 H(r) + \frac{r^4}{30} \bigg(6v_3 \nonumber\\ && + 2\sqrt{2} L^2 \ln\Big(\frac{r}{r_0}\Big) \bigg) H(r) \Big(1 - \frac{L^4}{2r^4 H(r)}\Big) - 54 \sqrt{2} L^2 v_2^2 \Bigg) dv_2 \Bigg] \ . \end{eqnarray} \section{The Penrose Limits} In this section we will study Penrose limits for both of the above backgrounds. We will first consider the original type-$IIB$ background. The Penrose limit along a suitable null geodesics for this background has already been studied in \cite{PandoZayas:2002dso}. Here we will first outline the main result of this work. Considering the motion of a massless particle in the $(r,\psi)$ plane of the background results the following geometry \begin{eqnarray} \label{pp in 2b} && ds^2 = 2 dudv + \frac{r^2}{\sqrt{1 + P \ln\Big(\frac{r}{r_0}\Big)}} \ dx_3^2 + \sqrt{1 + P \ln\Big(\frac{r}{r_0}\Big)} \ \Bigg[1 - \frac{\mu^2 r^2}{1 + P \ln\Big(\frac{r}{r_0}\Big)}\Bigg] dx^2 \nonumber\\ &&+ \sqrt{1 + P \ln\Big(\frac{r}{r_0}\Big)} \Bigg[dr_1^2 + r_1^2 d\phi_1^2 + dr_2^2 + r_2^2 d\phi_2^2\Bigg] - \frac{\mu^2}{\sqrt{1 + P \ln\Big(\frac{r}{r_0}\Big)}} \Big(r_1^2 + r_2^2\Big) du^2 . \ {~~} \end{eqnarray} The background gauge fields behave as \begin{eqnarray} \label{2b fields} &B_2 \sim& P \ln \Big(\frac{r}{r_0}\Big) \Big(dr_1 \wedge r_1 d\phi_1 - dr_2 \wedge r_2 d\phi_2\Big) \ , \nonumber\\ &F_3 \sim& P \dot{\psi} \ du \wedge \Big(dr_1 \wedge r_1 d\phi_1 - dr_2 \wedge r_2 d\phi_2\Big) \ , \nonumber\\ &F_5\sim& \Big(1 + \star\Big) \Big(1+ P \ln \Big(\frac{r}{r_0}\Big)\bigg) \dot{\psi} \ du \wedge dr_1 \wedge r_1 d\phi_1 \wedge dr_2 \wedge r_2 d\phi_2 \ . \end{eqnarray} It has been noted that \cite{PandoZayas:2002dso} this background leads to pp-wave upon setting $P=0$. As we have noted earlier, the constant $P$ is proportional to $M$. Thus, setting $P$ to zero amounts to removing the fractional $D3$ branes, there by restoring to the undeformed Klebanov-Witten background. This indicates that the deformed background does not support pp-wave upon taking Penrose limits. In appendix A, we consider an extensive study of Penrose limits along the remaining null geodesics. Some of these geometries become singular where as some other are smooth. Nevertheless none of these limits give rise to pp-wave solution. However as we will see in the following, this is not the case upon considering the non-Abelian T-duality. Thus, non-Abelian T-duality gives rise to new exactly solvable backgrounds that are absent in the original type $IIB$ configuration. In order to carry out the Penrose limit along appropriate null geodesics of the non-Abelian T-dual background, we will first rescale various quantities appropriately. Let us first consider the wrap factor $H(r)$. Introducing the parameter $\tilde r$ via $$\ln\tilde{r} = \ln r_0 - \frac{1}{4} - \frac{R^4}{2L^4} \ , $$ we can rewrite it as \begin{eqnarray} \label{re H} H(r) = \frac{2L^4}{r^4} \ln\bigg(\frac{r}{\tilde{r}}\bigg) \ . \end{eqnarray} We will now rescale the Minkowski coordinates $x^\mu \rightarrow L^2 x^\mu$ and the T-dual coordinates $v_{2,3} \rightarrow L^2 v_{2,3}$. In terms of these rescaled coordinates, the T-dual metric \eqref{NATD-dual metric} becomes \begin{eqnarray} \label{rescaled NATD-dual metric} &d\hat{s}^2_{\text{NATD}}=& L^2 \Bigg[\frac{1}{\sqrt{2}} \frac{r^2}{{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}}} \ \eta_{\mu\nu} dx^{\mu} dx^{\nu}+ \sqrt{2} \ \frac{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}}{r^2} \Big(dr^2 + \frac{1}{6} r^2 d\Omega_2^2 (\theta_1, \phi_1) \Big)\Bigg] \ \nonumber\\ && + \ \frac{L^2}{M} \Bigg[6 \sqrt{2} \ \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} \ v_2^2 \sigma_{\hat{3}}^2 + \Big(6 \sqrt{2} \ \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} + \frac{81 \sqrt{2}}{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}} \ v_2^2 \Big) dv_2^2 \nonumber\\ &&+ \bigg(9 \sqrt{2} \ \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} + \frac{9}{2\sqrt{2}} \ \frac{1}{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}} \ \Big(6v_3 + 2\sqrt{2} \ln\Big(\frac{r}{r_0}\Big) \Big)^2 \bigg) dv_3^2 \nonumber\\ && + \ \frac{27 \sqrt{2}}{ \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}} \ \bigg(6v_3 + 2\sqrt{2} \ln\Big(\frac{r}{r_0}\Big) \bigg)\ v_2 dv_2 dv_3 \Bigg] \ . \end{eqnarray} In the above, for easy reading we have introduced the notation $$M = 4 \ln\Big({\frac{r}{\tilde{r}}\Big)} + \bigg(6v_3 + 2\sqrt{2} \ln\Big(\frac{r}{r_0}\Big) \bigg)^2 + 54 v_2^2 \ . $$ After the rescaling, the NS-NS two form $\hat{B}_2$ and the dilaton $\hat\Phi$ becomes \begin{eqnarray} \label{rescaled NATD NS-NS sector} &\hat{B}_2=& \frac{L^2}{3} \ln\Big(\frac{r}{r_0}\Big) \sin\theta_1 d\theta_1 \wedge d\phi_1 + \frac{L^2}{M} \Bigg[3\sqrt{2} \bigg(6v_3 + 2\sqrt{2} \ln\Big(\frac{r}{r_0}\Big) \bigg) \ v_2 \ \sigma_{\hat{3}} \wedge dv_2 \nonumber\\ && + \bigg(2\sqrt{2} \ \ln\Big({\frac{r}{\tilde{r}}\Big)} + \frac{1}{\sqrt{2}} \bigg(6v_3 + 2\sqrt{2} \ln\Big(\frac{r}{r_0}\Big) \bigg)^2\bigg)\ \sigma_{\hat{3}} \wedge dv_3\Bigg] \ , \nonumber\\ &e^{-2\hat{\Phi}}=& \frac{L^6}{81 g_s^2} \ \sqrt{2} \ \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} \ M \ . \end{eqnarray} Similarly, the field strengths in the RR sectors becomes \begin{eqnarray} \label{rescaled NATD RR sector} &\hat{F}_ 0=& - L^2 \ \frac{2\sqrt{2}}{9 g_s} \ , \nonumber\\ &\hat{F}_ 2=& \frac{L^4}{162 \sqrt{2} \ g_s} \Bigg[\frac{2}{5} \ln\Big(\frac{r}{\tilde{r}}\Big) - \frac{1}{10} + 6\sqrt{2} \Bigg(6v_3 + 2\sqrt{2} \ln\Big(\frac{r}{r_0}\Big) \Bigg)\Bigg] \sin\theta_1 d\theta_1 \wedge d\phi_1 \nonumber\\ && + \ \frac{L^4}{g_s M} \frac{4}{3} \Bigg[-\Bigg(6v_3 + 2\sqrt{2} \ln\Big(\frac{r}{r_0}\Big)\Bigg) v_2 \ \sigma_{\hat{3}} \wedge dv_2 + 9 v_2^2 \ \sigma_{\hat{3}} \wedge dv_3\Bigg] \ , \nonumber\\ &\hat{F}_ 4=& \frac{L^6}{g_s M} \ v_2 \ \sin\theta_1 d\theta_1 \wedge d\phi_1 \wedge d\psi \wedge \Bigg[\Bigg(-\sqrt{2} \Bigg(6v_3 + 2\sqrt{2} \ln\Big(\frac{r}{r_0}\Big) \Bigg) - \frac{1}{15} \ln\Big(\frac{r}{\tilde{r}}\Big) \nonumber\\ && \ + \frac{1}{60} \Bigg) v_2 dv_3 + \Bigg(- \frac{4\sqrt{2}}{9} \ln\Big({\frac{r}{\tilde{r}}\Big)} + \frac{1}{9} \bigg(\frac{1}{15} \ln\Big(\frac{r}{\tilde{r}}\Big) - \frac{1}{60}\bigg) \bigg(6v_3 + 2\sqrt{2} \ln\Big(\frac{r}{r_0}\Big) \bigg) \nonumber\\ &&- 6\sqrt{2} v_2^2 \Bigg) dv_2 \Bigg] \ . \end{eqnarray} We will now consider the Penrose limits of the above T-dual background along appropriate null geodesics. Denoting the spacetime coordinates as $\{x^\mu\}$, the geodesic equation is expressed as \begin{eqnarray} \label{geo} \frac{d^2 x^\mu}{du^2} + \Gamma_{\nu \rho}^\mu \frac{dx^\nu}{du} \frac{dx^\rho}{du} = 0 \ . \end{eqnarray} Here we use $u$ to denote the affine parameter along the geodesic. We are interested to examine the motion along various isometry directions. Denote $x^\lambda$ one such isometry direction. Thus, we need to set the velocity and acceleration along any direction $x^\mu, \mu\neq\lambda$ zero: \begin{eqnarray} \frac{dx^\mu}{du} = 0 = \frac{d^2 x^\mu}{du^2} \ , \ {\rm for} \ \mu \neq \lambda \ . \end{eqnarray} Substituting the above in \eqref{geo}, we find that the geodesic equation for motion along an isometry direction takes the simple form \begin{eqnarray} \partial^\mu g_{\lambda \lambda} = 0 \ . \end{eqnarray} In additon to the above condition, we need to impose $ds^2=0$ in order to obtain null geodesics for our purpose. Let us now focus on various isometry directions of the T-dual geometry. A quick inspection of the rescaled geometry \eqref{rescaled NATD-dual metric} indicates that both $\psi$ and $\phi_1$ are isometry directions. Let us first consider the motion along $\psi$ direction. The geodesics equation for this case is \begin{equation}\label{mupsi} \partial_{\mu} g_{\psi \psi} = 0 \ . \end{equation} From \eqref{rescaled NATD-dual metric} we note the relevant component of the metric: \begin{eqnarray} \label{psi com} g_{\psi \psi} = \frac{L^2}{M} \ 6 \sqrt{2} \ \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} \ v_2^2 \ . \end{eqnarray} The metric component $g_{\psi\psi}$ depends upon $r,v_2$ and $v_3$. For $\mu=r$, the geodesic condition \eqref{mupsi} leads to $v_2=0$. Similarly, for $\mu = v_2, v_3$ we obtain $\{r = \tilde{r} , v_2 = 0\}$. However, for all the above values, the metric component $g_{\psi\psi}$ in \eqref{psi com} vanishes leading to singular geometries. In the following, we will no longer consider Penrose limits for such singular geometries. We will now consider motion along the $\phi_1$-direction. Consider the metric component $g_{\phi_1\phi_1}$ along the $\phi_1$-direction: \begin{eqnarray} \label{phi1 com} g_{\phi_1 \phi_1} = L^2 \ \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} \ \Bigg[\frac{1}{3\sqrt{2}} \sin^2\theta_1 + \frac{6 \sqrt{2}}{M} \ v_2^2 \cos^2\theta_1\Bigg] \ . \end{eqnarray} Let us analyse in detail the geodesic condition: $$ \partial_\mu g_{\phi_1\phi_1} = 0 \ . $$ For $\mu=r$, the above equation leads to $\{\theta_1 = (0, \pi), v_2 = 0\}$. For $\mu=\theta_1$, we find $\{ r = \tilde{r}, \theta_1 = (0, \frac{\pi}{2}, \pi)\}$. On the other hand, for $\mu = v_2, v_3$ we obtain $\{ r = \tilde{r}, \theta_1 = \frac{\pi}{2}, v_2 = 0\}$. The geodesic condition is trivially satisfied for all other values of $\mu$. Consider the values $r= \tilde{r}$, $\{\theta_1 = (0, \pi), v_2 = 0\}$. The metric component $g_{\phi_1\phi_1}$ in \eqref{phi1 com} vanishes for all these cases. Thus, they lead to singular geometries. We will not consider these geodesics any more. Finally, we will consider Penrose limit around $\theta_1 = \frac{\pi}{2}, v_2 = 0 = v_3$, keeping the $r$-coordinate constant, {\it i.e.}, $r= c$ for some constant $c \neq \tilde{r} \neq 0$. Consider the following expansion around this geodesic: \begin{eqnarray} &&x_i = \frac{y_i}{L} \ ; \ i =1, 2, 3, \ r = c + \frac{x}{L} \ , \ \theta_1 = \frac{\pi}{2} + \frac{z}{L} \ , \ t = ax^+ \ , \nonumber\\ &&\phi_1 = bx^+ + \frac{x^-}{L^2} \ , \ v_2 = \frac{v_2}{L} \ , \ v_3 = \frac{v_3}{L} \ \ . \end{eqnarray} Here, we keep the $\psi$-coordinate unchanged. In the above, $a$ and $b$ are some constant parameters. The null geodesic condition relates the parameters $a,b$ and $c$ as: \begin{equation}\label{abc} a^2 = \frac{b^2}{3c^2} \ln\Big(\frac{c}{\tilde{r}}\Big) \ . \end{equation} Using the above expansion we consider the leading terms of the T-dual metric in the limit $L\rightarrow \infty$. We find \begin{eqnarray} &ds^2=& \frac{1}{3\sqrt{2}} \sqrt{\ln\Big({\frac{c}{\tilde{r}}\Big)}} \ 2b dx^+ dx^- + \frac{1}{\sqrt{2}} \ \frac{c^2}{\sqrt{\ln\Big({\frac{c}{\tilde{r}}\Big)}}} \Big(dy_1^2 + dy_2^2 + dy_3^2\Big) + \frac{\sqrt{2}}{c^2} \sqrt{\ln\Big({\frac{c}{\tilde{r}}\Big)}} \ dx^2 \nonumber\\ && + \frac{1}{3\sqrt{2}} \sqrt{\ln\Big({\frac{c}{\tilde{r}}\Big)}} \ dz^2+ \frac{3}{\sqrt{2}} \ \frac{\sqrt{\ln\Big({\frac{c}{\tilde{r}}\Big)}}}{\ln\Big({\frac{c}{\tilde{r}}\Big)} + 2 \Big(\ln\Big(\frac{c}{r_0}\Big)\Big)^2 } \Big(dv_2^2 + v_2^2 d\psi^2\Big) + \frac{9}{2 \sqrt{2}} \frac{1}{\sqrt{\ln\Big({\frac{c}{\tilde{r}}\Big)}}}\ dv_3^2 \nonumber\\ && - \frac{b^2}{3\sqrt{2} c^2} \sqrt{\ln\Big({\frac{c}{\tilde{r}}\Big)}} \Bigg[\frac{x^2}{\ln\Big(\frac{c}{\tilde{r}}\Big)} + x^2 + c^2 z^2\Bigg] (dx^+)^2 - L \ \frac{2b^2x}{3c} \ln\Big(\frac{c}{\tilde{r}}\Big) \ (dx^+)^2 \ . \end{eqnarray} This contains a divergent term which can't be remove for any choice of the parameter $b$. Note that, from the null geodesic condition \eqref{abc}, setting $b=0$ is not allowed. Hence, motion along the isometric direction $\phi_1$ by keeping $r=$ constant does not lead to any smooth geometry. We can repeat similar analysis for motion along the isometry direction $\psi$. Recall that the ${\psi\psi}$ component of the T-dual metric is given as \begin{eqnarray} g_{\psi\psi} = \frac{L^2}{M} \ 6\sqrt{2} \ \sqrt{\ln\Big(\frac{r}{\tilde{r}}\Big)} \ v_2^2 \ . \end{eqnarray} The null geodesic condition \begin{equation} \partial_\mu g_{\psi\psi} = 0 \ , \end{equation} for $\mu = r$ leads to $v_2 = 0$, where as, for $\mu = v_2, v_3$ we obtain $\{r = \tilde{r}, v_2 = 0 \}$. However, the metric component $g_{\psi\psi}$ vanishes for all these values. Thus, we do not have a regular geometry for any of the above geodesics. To the end we will consider null geodesics for the motion of a particle carrying nonzero angluar momentum in the $(r,\phi_1)$ plane. We will subject our analysis to a small neighbourhood of $\theta_1 = \frac{\pi}{2}$ and $v_2 = v_3 = 0$. Consider the Lagrangian for a massless particle moving along this geodesic: \begin{eqnarray}\label{NATD lagrangian} \mathcal{L} = \frac{1}{2} g_{\mu\nu} \dot{X}^\mu \dot{X}^\nu \ . \end{eqnarray} Let $u$ be the affine parameter along the geodesic. The dots in the above equation correspond to derivative with respect to $u$. Substituting the explicit expression for the background metric \eqref{rescaled NATD-dual metric} in the above Lagrangian we find \begin{eqnarray}\label{NATD explict lag} \mathcal{L} = \frac{L^2}{2} \Bigg(- \frac{1}{\sqrt{2}} \frac{r^2}{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}} \ \dot{t}^2 + \frac{\sqrt{2}}{r^2} \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} \ \dot{r}^2 + \frac{1}{3\sqrt{2}} \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} \ \dot{\phi}_1^2\Bigg) \ . \end{eqnarray} We will now obtain the conserved quantities corresponding to the above system. Note that, the Lagrangian \eqref{NATD explict lag} does not depend on the generalized coordinates $t$ and $\phi_1$ explicitly. Denoting $- E L^2$ to be the conserved momentum associated with $t$, we find \begin{eqnarray} \label{NATD t} E = - \frac{1}{L^2}\frac{\partial \mathcal{L}}{\partial\dot{t}} = \frac{r^2}{\sqrt{2 \ln\Big({\frac{r}{\tilde{r}}\Big)}}} \ \dot{t} \ . \end{eqnarray} Similarly, let $- J L^2 $ be the conserved momentum associated with the generalized coordinate $\phi_1$. We find \begin{eqnarray} \label{NATD phi-1} J = - \frac{1}{L^2 }\frac{\partial \mathcal{L}}{\partial\dot{\phi}_1} = - \frac{1}{3\sqrt{2}} \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} \ \dot{\phi}_1 \ . \end{eqnarray} In addition, we will require the geodesic to be null. This gives rise to the condition: \begin{eqnarray} \dot{r}^2 + \frac{3r^2}{\ln\Big({\frac{r}{\tilde{r}}\Big)}} J^2 = E^2 \ . \end{eqnarray} We will now concentrate on obtaining the Penrose limit for a null geodesic carrying angular momentum $J$ around $x_i = 0 , i =1, 2, 3$ , $\theta_1 = \frac{\pi}{2}$ and $v_2 = v_3 = 0$. We redefine the coordinates as \begin{eqnarray} \label{NATD redefine} x_i = \frac{y_i}{L} \ ; \ i =1, 2, 3, \ \theta_1 = \frac{\pi}{2} + \frac{z}{L} \ , \ v_2 = \frac{v_2}{L} \ , \ v_3 = \frac{v_3}{L} \ . \end{eqnarray} We keep the $\psi$-coordinate unchanged, and redefine the string coupling as $g_s = L^3 \ \tilde{g}_s$, in order to keep the dilaton finite at the Penrose limit. Finally, we will consider the following expansion in the limit $L \rightarrow \infty$: \begin{eqnarray} \label{NATD expansion} dt = c_1 du , \ dr = c_2 du + c_3 \frac{dw}{L} \ , \ d\phi_1 = c_4 du + c_5 \frac{dw}{L} + c_6 \frac{dv}{L^2} \ . \end{eqnarray} We need to determine the coefficients $c_i$. Requiring the geodesic to be null determines the values of the coefficients $c_1, c_2$ and $c_4$ as follows: \begin{eqnarray} \label{NATD c-values} c_1 &=& \frac{E \sqrt{2}}{r^2} \ \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} \ , \cr \ c_2 &=& \Bigg[E^2 - \frac{3r^2}{\ln\Big({\frac{r}{\tilde{r}}\Big)}} J^2 \Bigg]^{\frac{1}{2}} , \cr \ c_4 &=& - \frac{3\sqrt{2}}{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}} \ J \ . \end{eqnarray} We now substitute the expansion \eqref{NATD expansion} in the T-dual metric \eqref{rescaled NATD-dual metric} and retain the leading terms. Apriory, this metric will contain divergent terms of order $L$ and $L^2$. Imposing the null geodesic condition automatically cancels the $\mathcal{O}(L^2)$ terms. It can be easily verified that the $\mathcal{O}(L)$ term is removed upon setting \begin{equation} c_2 c_3 + \frac{r^2}{6} c_4 c_5 = 0 \ . \end{equation} {Using the value of $c_2$ and $c_4$ from \eqref{NATD c-values} in the above equation we can express the coefficient $c_3$ in terms $c_5$ as } \begin{eqnarray} c_3 = \Bigg[E^2 - \frac{3r^2}{\ln\Big({\frac{r}{\tilde{r}}\Big)}} J^2 \Bigg]^{- \frac{1}{2}} \frac{r^2}{\sqrt{2 \ln\Big({\frac{r}{\tilde{r}}\Big)}}} \ J \ c_5 \ . \end{eqnarray} We will see later that the coefficient $c_5$ can be determined by requiring the background fields to satisfy the Einstein's equations. Finally, we need to determine the coefficient $c_6$. This is easily obtained by upon setting appropriate normalization for the cross term $du dv$ in the metric. We find \begin{equation} c_6 = - \frac{1}{J} \ . \end{equation} Substituting the above results in \eqref{rescaled NATD-dual metric}, and taking the limit $L\rightarrow\infty$, we find the pp-wave metric of the form \begin{eqnarray} \label{NATD penrose limit metric} &ds^2=& 2 du dv + \frac{1}{\sqrt{2}} \ \frac{r^2}{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}} \Big(dy_1^2 + dy_2^2 + dy_3^2\Big) + \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} \ \bigg(\frac{c_3^2 \sqrt{2}}{r^2} + \frac{c_5^2}{3\sqrt{2}}\bigg) dw^2 \nonumber\\ && + \ \frac{1}{3\sqrt{2}} \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} \ dz^2 + \frac{3}{\sqrt{2}} \ \frac{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}}{\ln\Big({\frac{r}{\tilde{r}}\Big)} + 2 \Big(\ln\Big(\frac{r}{r_0}\Big)\Big)^2 } \Big(dv_2^2 + v_2^2 d\psi^2\Big) \nonumber\\ &&\ + \frac{9}{2 \sqrt{2}} \frac{1}{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}}\ dv_3^2 - \frac{3\sqrt{2}}{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}} J^2 z^2 \ du^2 \ . \end{eqnarray} We will subsequently show that this is indeed a pp-wave solution by rewriting it in the standard Brinkmann form. Let us now consider the Penrose limit for the remaining background fields. In this limit, the NS-NS two-form field and dilaton takes the form \begin{eqnarray} \label{NS-NS} &\hat{B}_2 =& \frac{c_5}{3} \ln\Big({\frac{r}{r_0}\Big)} \ dz \wedge dw - 3 \ \frac{\ln\Big(\frac{r}{r_0}\Big)}{\ln\Big({\frac{r}{\tilde{r}}\Big)} + 2 \Big(\ln\Big(\frac{r}{r_0}\Big)\Big)^2} \ v_2 dv_2 \wedge d\psi + \frac{3J z}{\sqrt{\ln\Big(\frac{r}{\tilde{r}}\Big)}} \ du \wedge dv_3 \ , \nonumber\\ &e^{-2\hat{\Phi}}=& \frac{4 \sqrt{2} }{81 \ \tilde{g}_s^2} \ \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} \ \Bigg[\ln\Big({\frac{r}{\tilde{r}}\Big)} + 2 \Big(\ln\Big(\frac{r}{r_0}\Big)\Big)^2 \Bigg] \ . \end{eqnarray} The field strengths corresponding to the RR sector are given by \begin{eqnarray} \label{penrose limit RR} &\hat{F}_0=& 0 \ , \nonumber\\ &\hat{F}_2=& \frac{J}{54 \tilde{g}_s} \frac{1}{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}} \Bigg[\frac{2}{5} \ln\Big(\frac{r}{\tilde{r}}\Big) + 24 \ln\Big(\frac{r}{r_0}\Big) - \frac{1}{10}\Bigg] du \wedge dz \ , \nonumber\\ &\hat{F}_4=& \frac{2J}{3\tilde{g} _s \Big(\ln\Big({\frac{r}{\tilde{r}}\Big)} + 2 \Big(\ln\Big(\frac{r}{r_0}\Big)\Big)^2\Big)} \frac{1}{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}} \ v_2 \Bigg[- \ln\Big(\frac{r}{\tilde{r}}\Big) + \frac{1}{2} \ln\Big(\frac{r}{r_0}\Big) \Big(\frac{1}{15} \ln\Big(\frac{r}{\tilde{r}}\Big) \nonumber\\ &&-\frac{1}{60}\Big) \Bigg] du \wedge dz \wedge d\psi \wedge dv_2 \ . \end{eqnarray} For later use, we will also compute the field strength $\hat H_3$ corresponding to the NS-NS two-form $\hat B_2$: \begin{eqnarray} \label{h3} &\hat{H}_3=& \frac{1}{3} \Bigg[E^2 - \frac{3r^2}{\ln\Big({\frac{r}{\tilde{r}}\Big)}} J^2 \Bigg]^{\frac{1}{2}} \Bigg[c_5^{\prime} \ln\Big({\frac{r}{r_0}\Big)} + \frac{c_5}{r}\Bigg] du \wedge dz \wedge dw - 3v_2 \Bigg[E^2 - \frac{3r^2}{\ln\Big({\frac{r}{\tilde{r}}\Big)}} J^2 \Bigg]^{\frac{1}{2}} \nonumber\\ &&\frac{\ln\Big(\frac{r}{\tilde{r}}\Big) -\ln\Big(\frac{r}{r_0}\Big) - 2\Big(\ln\Big(\frac{r}{r_0}\Big)\Big)^2 }{r \Big(\ln\Big({\frac{r}{\tilde{r}}\Big)} + 2 \Big(\ln\Big(\frac{r}{r_0}\Big)\Big)^2\Big)^2} \ du \wedge dv_2 \wedge d\psi + \frac{3J}{\sqrt{\ln\Big(\frac{r}{\tilde{r}}\Big)}} \ du \wedge dv_3 \wedge dz \ . \nonumber\\ \end{eqnarray} Note that, in obtaining the above, we have used $dr=c_2 du$ where the expression for the coefficient $c_2$ is given by \eqref{NATD c-values}. As pointed out earlier, the metric obtained in \eqref{NATD penrose limit metric} is not in the standard {{Brinkmann}} form \cite{blau.m}. A formalism has been developed in \cite{Itsios:2017nou} in order to transform the line element to the Brinkmann form. Following \cite{Itsios:2017nou} consider a line element of the form \begin{eqnarray} \label{NATD line element} ds^2 = 2 dudv + \sum_i A_i (u) \ dx_i ^2 \ . \end{eqnarray} Now, replace the coordinates $x_i$ and $v$ as \begin{eqnarray} \label{transformation} x_i \rightarrow \frac{x_i}{\sqrt{A_i}} \ , \ v \rightarrow v + \frac{1}{4} \sum_i \frac{\dot{A_i}}{A_i} x_i^2 \ . \end{eqnarray} The line element in \eqref{NATD line element} now takes the Brinkmann form \begin{eqnarray} \label{Brinkmann line element} ds^2 = 2 dudv + \sum_i dx_i ^2 + \Big(\sum_i F_i (u) x_i ^2\Big) \ du^2 \ , \end{eqnarray} with the functions $F_i$ being \begin{eqnarray} \label{Fi definitions } F_i = \frac{1}{4} \frac{\dot{A_i^2}}{A_i^2} \ + \ \frac{1}{2} \frac{d}{du} \Big(\frac{\dot{A_i}}{A_i}\Big) \ . \end{eqnarray} For the case of our pp-wave metric \eqref{NATD penrose limit metric} we have \begin{eqnarray} \label{Ai} &&A_{y_{1}} = A_{y_{2}} = A_{y_{3}} = \frac{1}{\sqrt{2}} \ \frac{r^2}{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}} \ , \ A_w = \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} \ \bigg(\frac{c_3^2 \sqrt{2}}{r^2} + \frac{c_5^2}{3\sqrt{2}}\bigg) \ , \nonumber\\ &&A_z = \frac{1}{3\sqrt{2}} \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} \ ,\ A_{v_2} = \frac{3}{\sqrt{2}} \ \frac{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}}{\ln\Big({\frac{r}{\tilde{r}}\Big)} + 2 \Big(\ln\Big(\frac{r}{r_0}\Big)\Big)^2 } \ , \ A_{v_3} = \frac{9}{2 \sqrt{2}} \frac{1}{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}} \ . \nonumber\\ \end{eqnarray} Hence after making the following replacement \begin{eqnarray} \label{coordinate transformation} &&y_1 \rightarrow \frac{y_1}{\sqrt{A_{y_1}}} \ , \ y_2 \rightarrow \frac{y_2}{\sqrt{A_{y_2}}} \ , \ y_3 \rightarrow \frac{y_3}{\sqrt{A_{y_3}}} \ , \ w \rightarrow \frac{w}{\sqrt{A_{w}}} \ , \ z \rightarrow \frac{z}{\sqrt{A_{z}}} \ , \nonumber\\ && v_2 \rightarrow \frac{v_2}{\sqrt{A_{v_2}}} \ , \ v_3 \rightarrow \frac{v_3}{\sqrt{A_{v_3}}} \ \ \text{and} \nonumber\\ && v \rightarrow v + \frac{1}{4} \Bigg[\frac{\dot{A}_{y_{1}}}{A_{y_{1}}} \ y_1 ^2 + \frac{\dot{A}_{y_{2}}}{A_{y_{2}}} \ y_2 ^2 + \frac{\dot{A}_{y_{3}}}{A_{y_{3}}} \ y_3 ^2 + \frac{\dot{A}_w}{A_w} \ w ^2 + \frac{\dot{A}_z}{A_z} \ z ^2 + \frac{\dot{A}_{v_{2}}}{A_{v_{2}}} \ v_2^2 + \frac{\dot{A}_{v_{3}}}{A_{v_{3}}} \ v_3^2\Bigg] \ , \nonumber\\ \end{eqnarray} we find \begin{eqnarray} \label{metric brinkmann} &ds^2 =& 2 dudv + dy_1^2 + dy_2^2 + dy_3^2 + dw^2 + dz^2 + dv_2^2 + v_2^2 \ d\psi^2 + dv_3^2 \nonumber\\ &&+ \Bigg[F_{y_{1}} y_1^2 + F_{y_{2}} y_2^2 + F_{y_{3}} y_3^2 + F_w w^2 + F_z z^2 + F_{v_{2}} v_2^2 + F_{v_{3}} v_3^2 - \frac{3\sqrt{2}}{\sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}}} \ J^2 z^2 \Bigg]du^2 \ , \nonumber\\ \end{eqnarray} where the functions $F_i$ can be read from the expression \eqref{Fi definitions }. We will now express the background fields in the Brinkmann form. The dilaton $\hat\Phi$ and the NS-NS three form flux $\hat H_3$ are given as \begin{eqnarray} \label{NS-NS Brinkmann} &e^{-2\hat{\Phi}}=& \frac{4 \sqrt{2} }{81 \ \tilde{g}_s^2} \ \sqrt{\ln\Big({\frac{r}{\tilde{r}}\Big)}} \ \Bigg[\ln\Big({\frac{r}{\tilde{r}}\Big)} + 2 \Big(\ln\Big(\frac{r}{r_0}\Big)\Big)^2 \Bigg] \ , \nonumber\\ &\hat{H}_3=& \frac{2^{\frac{1}{4}}}{\sqrt{3}} \Bigg[E^2 - \frac{3r^2}{\ln\Big({\frac{r}{\tilde{r}}\Big)}} J^2 \Bigg]^{\frac{1}{2}} \Bigg[c_5^{\prime} \ln\Big({\frac{r}{r_0}\Big)} + \frac{c_5}{r}\Bigg] \Bigg[\frac{c_3^2 \sqrt{2}}{r^2} + \frac{c_5^2}{3\sqrt{2}} \Bigg]^ {- \frac{1}{2}} \frac{1}{\sqrt{\ln\Big(\frac{r}{\tilde{r}}\Big)}} \nonumber\\ &&\ du \wedge dz \wedge dw - \ \sqrt{2} v_2 \Bigg[E^2 - \frac{3r^2}{\ln\Big({\frac{r}{\tilde{r}}\Big)}} J^2 \Bigg]^{\frac{1}{2}} \ \frac{\ln\Big(\frac{r}{\tilde{r}}\Big) -\ln\Big(\frac{r}{r_0}\Big) - 2\Big(\ln\Big(\frac{r}{r_0}\Big)\Big)^2 }{r \Big(\ln\Big({\frac{r}{\tilde{r}}\Big)} + 2 \Big(\ln\Big(\frac{r}{r_0}\Big)\Big)^2\Big)} \nonumber\\ &&\ \frac{1}{\sqrt{\ln\Big(\frac{r}{\tilde{r}}\Big)}} \ du \wedge dv_2 \wedge d\psi + \frac{2 \sqrt{3} \ J}{\sqrt{\ln\Big(\frac{r}{\tilde{r}}\Big)}} \ du \wedge dv_3 \wedge dz \ . \end{eqnarray} Similarly, the expressions for the RR field strengths are found to be of the form \begin{eqnarray} \label{Brinkmann RR} &\hat{F}_0=& 0 \ , \nonumber\\ &\hat{F}_2=& \frac{2^{(- \frac{3}{4})}}{9\sqrt{3} \ \tilde{g}_s} \frac{J}{{\Big(\ln\Big({\frac{r}{\tilde{r}}\Big)\Big)^{\frac{3}{4}}}}} \Bigg[\frac{2}{5} \ln\Big(\frac{r}{\tilde{r}}\Big) + 24 \ln\Big(\frac{r}{r_0}\Big) - \frac{1}{10}\Bigg] du \wedge dz \ , \nonumber\\ &\hat{F}_4=& \frac{2^{ \frac{7}{4}}}{3\sqrt{3} \ \tilde{g}_s} \frac{J}{{\Big(\ln\Big({\frac{r}{\tilde{r}}\Big)\Big)^{\frac{5}{4}}}}} \ v_2 \Bigg[-\ln\Big(\frac{r}{\tilde{r}}\Big) + \frac{1}{2} \ln\Big(\frac{r}{r_0}\Big) \bigg(\frac{1}{15} \ln\Big(\frac{r}{\tilde{r}}\Big) \nonumber\\ &&-\frac{1}{60}\bigg) \Bigg] du \wedge dz \wedge d\psi \wedge dv_2 \ . \end{eqnarray} We will now verify that these fields indeed satisfy the Bianchi identities and the gauge field equation of motion. A quick inspection of the background fields in \eqref{NS-NS Brinkmann} -\eqref{Brinkmann RR} shows that the Bianchi identities \begin{eqnarray} \label{Bianchi 2a natd} &&d\hat{H}_3 = 0 \ , \ d\hat{F}_2 = \hat{F}_0 \hat{H}_3 \ , \ d\hat{F}_4 = \hat{H}_3 \wedge \hat{F}_2 \ \end{eqnarray} hold. The field strengths $\hat H_3, \hat F_2$ and $\hat F_4$ are all closed and both $\hat F_0$ as well as $\hat{H}_3 \wedge \hat{F}_2$ are indeed zero. Let us now inspect the type-$IIA$ supergravity equations for the gauge fields \begin{eqnarray} \label{Bianchi 2a natd1} &&d\Big(e^{-2\hat{\Phi}} \star \hat{H}_3\Big) - \hat{F}_2 \wedge \star \hat{F}_4 - \frac{1}{2} \hat{F}_4 \wedge \hat{F}_4 = \hat{F}_0 \star \hat{F}_2 \ , \nonumber\\ &&d\star \hat{F}_2 + \hat{H}_3 \wedge \star \hat{F}_4 = 0 \ , \nonumber\\ &&d\star \hat{F}_4 + \hat{H}_3 \wedge \hat{F}_4 = 0 \ . \end{eqnarray} The Hodge duals for the above background fields are \begin{eqnarray} \label{Hodge dual} &\star \ \hat{H}_3=& \frac{1}{7 !} \ du \wedge dy_1 \wedge dy_2 \wedge dy_3 \Bigg[ \frac{2^{\frac{1}{4}}}{\sqrt{3}} \ v_2 \bigg(E^2 - \frac{3r^2}{\ln\Big({\frac{r}{\tilde{r}}\Big)}} J^2 \bigg)^{\frac{1}{2}} \bigg(c_5^{\prime} \ln\Big({\frac{r}{r_0}\Big)} + \frac{c_5}{r}\bigg) \nonumber\\ &&\bigg(\frac{c_3^2 \sqrt{2}}{r^2} + \frac{c_5^2}{3\sqrt{2}} \bigg)^ {- \frac{1}{2}} \frac{1}{\sqrt{\ln\Big(\frac{r}{\tilde{r}}\Big)}} \ dv_2 \wedge d\psi \wedge dv_3 \nonumber\\ &&- \sqrt{2} \bigg(E^2 - \frac{3r^2}{\ln\Big({\frac{r}{\tilde{r}}\Big)}} J^2 \bigg)^{\frac{1}{2}} \ \frac{\ln\Big(\frac{r}{\tilde{r}}\Big) -\ln\Big(\frac{r}{r_0}\Big) - 2\Big(\ln\Big(\frac{r}{r_0}\Big)\Big)^2 }{r \Big(\ln\Big({\frac{r}{\tilde{r}}\Big)} + 2 \Big(\ln\Big(\frac{r}{r_0}\Big)\Big)^2\Big)^2} \nonumber\\ &&\ \frac{1}{\sqrt{\ln\Big(\frac{r}{\tilde{r}}\Big)}} \ dz \wedge dw \wedge dv_3 + \ v_2 \ \frac{2 \sqrt{3} \ J}{\sqrt{\ln\Big(\frac{r}{\tilde{r}}\Big)}} \ dw \wedge dv_2 \wedge d\psi \Bigg] \ , \nonumber\\ && \nonumber\\ &\star \ \hat{F}_2 =& \frac{1}{8!} \ \frac{2^{(- \frac{3}{4})}}{9\sqrt{3} \ \tilde{g}_s} \frac{J}{{\Big(\ln\Big({\frac{r}{\tilde{r}}\Big)\Big)^{\frac{3}{4}}}}} \ v_2 \Bigg[\frac{2}{5} \ln\Big(\frac{r}{\tilde{r}}\Big) + 24 \ln\Big(\frac{r}{r_0}\Big) - \frac{1}{10}\Bigg] du \wedge dy_1 \wedge dy_2 \wedge dy_3 \nonumber\\ &&\wedge \ dw \wedge d\psi \wedge dv_2 \wedge dv_3 \ , \nonumber\\ && \nonumber\\ &\star \ \hat{F}_4=& \frac{1}{6!} \ \frac{2^{ \frac{7}{4}}}{3\sqrt{3} \ \tilde{g}_s} \frac{J}{{\Big(\ln\Big({\frac{r}{\tilde{r}}\Big)\Big)^{\frac{5}{4}}}}} \ \Bigg[- \ln\Big(\frac{r}{\tilde{r}}\Big) + \frac{1}{2} \ln\Big(\frac{r}{r_0}\Big) \bigg(\frac{1}{15} \ln\Big(\frac{r}{\tilde{r}}\Big) -\frac{1}{60}\bigg) \Bigg] du \wedge dy_1 \nonumber\\ &&\wedge dy_2 \wedge dy_3 \wedge \ dw \wedge dv_3 \ . \end{eqnarray} In deriving the above, we have used $$ {\rm det}(g_{pp})= -v_2^2 \ , \ g^{vv} = - g_{uu} \ , g^{uv} = g^{vu} = 1 \ , \ g^{ij} = \delta^{ij} \Big(\text{only} \ g^{\psi \psi} = \frac{1}{v_2^2}\Big) \ . $$ It is straightforward to see that, the background fields \eqref{NS-NS Brinkmann}-\eqref{Brinkmann RR} together with \eqref{Hodge dual} indeed satisfy the gauge field equations for type-$IIA$ supergravity. Both $\star\hat H_3$ as well as $e^{-2\hat\Phi}\star\hat H_3$ are closed. Also, $\hat{F}_2 \wedge \star \hat{F}_4$ and $\hat{F}_4 \wedge \hat{F}_4$ vanish identically. Thus, the first of the equations in \eqref{Bianchi 2a natd1} is satisfied. Similarly, both $\star\hat F_2$ and $\star\hat F_4$ are exact forms. In addition, $\hat{H}_3 \wedge \hat{F}_4$ and $\hat{H}_3 \wedge \star \hat{F}_4$ vanish as well. Thus, the last two equations in \eqref{Bianchi 2a natd1} are also satisfied. It is interesting to note that the gauge field equations as well as the Bianchi identities hold irrespective of the value of the coefficient $c_5$. However, as we will see in the following, this is not the case with the Einstein's equations. For type-$IIA$ supergravity, the Einstein's equations are given as \begin{eqnarray} \label{Einstein eq natd} \hat{R}_{\mu\nu} + 2D_{\mu}D_{\nu}\hat{\Phi} = \frac{1}{4} \hat{H}_{\mu\nu}^2 + e^{2\hat{\Phi}} \Bigg[\frac{1}{2} (\hat{F}_2^2)_{\mu\nu} + \frac{1}{12} (\hat{F}_4^2)_{\mu\nu}- \frac{1}{4} g_{\mu\nu} \Big(\hat{F}_{0}^2 + \frac{1}{2} \hat{F}_{2}^2 + \frac{1}{4!}\hat{F}_{4}^2 \Big)\Bigg] \ . \end{eqnarray} Similarly, the dilation equations are \begin{eqnarray} \label{R eq natd} \hat{R} + 4D^2\hat{\Phi} - 4(\partial\hat{\Phi})^2 - \frac{1}{12}\hat{H}^2=0 \ . \end{eqnarray} In the appendix we have analysed these equations in detail. We find that the equation of motion for dilation \eqref{R eq natd} holds automatically. In addition, we observe that the Einstein's equations \eqref{Einstein eq natd} are trivially satisfied for all values of $\mu,\nu$ except for $\mu=\nu=u$. In this case we have the nontrivial condition \begin{eqnarray} \label{Einstein uu} \hat{R}_{uu} + 2D_{u}D_{u}\hat{\Phi} = \frac{1}{4} \hat{H}_{uu}^2 + e^{2\hat{\Phi}} \Bigg[\frac{1}{2} (\hat{F}_2^2)_{uu} + \frac{1}{12} (\hat{F}_4^2)_{uu} \Bigg] \ . \end{eqnarray} This equation involves the undetermined coefficient $c_5$. We can satisfy it by choosing $c_5$ suitably. \section{Gauge theory duals} \label{gauge theory} It is well known that the field theory dual to the Klebanov-Tseytlin geometry consists of a nonconformal $\mathcal{N}=1$ supersymmetric $SU(N+M)\times SU(N)$ gauge theory \cite{Klebanov:2000nc}. It describes the dynamics of $N$ regular and $M$ fractional $D3$ branes placed near a conifold singularity. The fractional $D3$ branes arise due to $D5$ branes wraping the vanishing two-cycle at conifold singularity. The nonconformal gauge theory has a nontrivial RG flow. Near UV the supergravity description is valid and the dual geometry is given by the Klebanov-Tseytlin background. As the theory is flown to IR it undergoes to a cascade of Seiberg dualities there by changing the number of $D3$ branes from $N$ to $N-M$ in each step, resulting a singular geometry at the end. However, for suitably chosen initial condition the conifold geometry gets deformed at IR by strong coupling effects there by leading to the Klebanov-Strassler background \cite{Klebanov:2000hb}. For the non-Abelian T-dual geometry of the Klebanov-Tseytlin background the field theory dual has been considered in \cite{Itsios:2012zv,Itsios:2013wd}. The existance of domain wall configurations play a key role in understanding the dual field theories. In the type-$IIB$ theory domain walls can be formed by wraping $D5$ branes on suitably chosen two cycles of the internal manifold. For the Klebanov-Tseytlin background \eqref{KT}-\eqref{KT B2} one such two cycle can be constructed upon the identification: $$\theta_1 = \theta_2, \phi_1 = 2\pi - \phi_2, \psi = \psi_0 \ , $$ with a constant $\psi_0$. This gives rise to the following two cycle $\Sigma_2$ for the T-dual background \eqref{rescaled NATD-dual metric}-\eqref{rescaled NATD RR sector}: \begin{eqnarray} \label{2 cycle} \Sigma_2 = \Big[\theta_1, \phi_1\Big], \ v_2 = v_3 = \psi = 0 \ . \end{eqnarray} Furthermore, it is possible to construct a three cycle $\Sigma_3$ in the T-dual geometry as \begin{eqnarray} \label{3 cycle} \Sigma_3 = \Big[\theta_1, \phi_1, \psi \Big], \ v_2 = v_3 = r = \text{constant} \ . \end{eqnarray} Following \cite{Itsios:2013wd} we will now analyse the construction of domain wall in the Klebanov-Tseytlin background and its T-dual. For the Klebanov-Tseytlin background we will consider the domain wall formed by a $D5$ brane extended along $\mathbb{R}^{1,2}\in\mathbb{R}^{1,3}$ of the $(1,3)$ Minkowski spacetime and wraping the compact directions parametrized by $\{\theta_2,\phi_2,\psi\}$. The dynamics of the low energy excitations are captured in terms of the corresponding Born-Infeld action on the world volume of the $D5$ brane. This gives rise to the corresponding effective tension. The non-Abelian T-duality is performed along an $SU(2)$ isometry parametrized by the coordinates $\{\theta_2,\phi_2,\psi\}$. Thus the $D5$ brane wraping the $SU(2)$ directions gives rise to a $D2$ brane extending along the $\mathbb{R}^{1,2}$ of the T-dual geometry. We will place this domain wall at the origin of the internal manifold: $$v_2 = v_3 = \theta_1 = \phi_1 = \psi = 0 \ . $$ Once again we can consider the corresponding Born-Infeld action and compute the effective tension for it. The effective tension of the domain wall in the Klebanov-Tesytlin background matches with the effective tension of the corresponding configuration in the T-dual geometry upto a constant factor \cite{Itsios:2013wd}. In addition, it has been shown that \cite{Itsios:2013wd} the central charge as well as entanglement entropy of both the theories match upto an RG independent coefficient. While T-duality maintains the essential features of the central charge and entanglement entropy, this is not the case for the four dimensional gauge coupling. The T-dual geometry gives rise to a very unusual behaviour for the gauge coupling. It has been demonstrated that $\nicefrac{1}{g^2}\sim \big(\ln r\big)^{\nicefrac{3}{2}}$, unlike the case for a conventional field theory where a logarithmic behaviour is observed. The Maxwell and Page charges of the $D$-branes in the theory also play a significant role in understanding the field theory dual. For the Klebanov-Tseytlin background we consider $D3$ and $D5$ brane charges \begin{eqnarray} \label{maxwell 2b} &Q_{\text{Max, D3}} =& \frac{1}{2k_{10}^2 T_{D3}} \int_{T^{1,1}} F_5 = \frac{K(r)}{27\pi} \ , \nonumber\\ &Q_{\text{Max, D5}} =& \frac{1}{2k_{10}^2 T_{D5}} \int_{\theta_2, \phi_2, \psi} F_3 = \frac{\sqrt{2} P}{9} \ , \end{eqnarray} and \begin{eqnarray} \label{page 2b} &Q_{\text{Page, D3}} =& \frac{1}{2k_{10}^2 T_{D3}} \int_{T^{1,1}} F_5 - B_2 \wedge F_3 = \frac{Q(r)}{27\pi} \ , \nonumber\\ &Q_{\text{Page, D5}} =& \frac{1}{2k_{10}^2 T_{D5}} \int_{\theta_2, \phi_2, \psi} F_3 - B_2 \wedge F_1 = \frac{\sqrt{2} P}{9} \ , \end{eqnarray} where $Q(r) = K(r) + PT(r)$ and we choose the normalization factor as described in \cite{Macpherson:2014eza}. For the T-dual background, the Maxwell and Page charges of $D6$ and $D8$ are given respectively as \begin{eqnarray} \label{maxwell 2a} &\hat{Q}_{\text{Max, D6}} =& \frac{1}{\sqrt{2} \pi^2} \int_{\theta_1, \phi_1} \hat{F}_2 = \frac{K(r)+Q(r)}{27\pi} \ , \nonumber\\ &\hat{Q}_{\text{Max, D8}} =& \sqrt{2} \int \hat{F}_0 = \frac{\sqrt{2} P}{9} \ , \end{eqnarray} and \begin{eqnarray} \label{page 2a} &\hat{Q}_{\text{Page, D6}} =& \frac{1}{\sqrt{2} \pi^2} \int_{\theta_1, \phi_1} \hat{F}_2 - \hat{B}_2 \hat{F}_0 = \frac{2 Q(r)}{27\pi} \ , \nonumber\\ &\hat{Q}_{\text{Page, D8}} =& \sqrt{2} \int \hat{F}_0 = \frac{\sqrt{2} P}{9} \ . \end{eqnarray} The above shows that, after dualization we find $D8$ branes for each of the $D5$ branes and twice the number of $D6$ branes for each of the $D3$ branes in the original background. It has been noticed in \cite{Itsios:2013wd} that the changes induced in the page charge of $D3$ brane in the Klebanov-Tseytlin background by a large gauge transformation of the NS-NS two from $B_2$ is the same as the changes in the Maxwell charge by a suitable change in the radial coordinate. Similar phenomenon is observed in the dual gauge theory, where the page charge of the $D6$ brane now undergoes a shift under the large gauge transformation. This suggests that the quiver theory corresponding to the T-dual geometry undergoes to a cascade of Seiberg dualities much the same way as the gauge theory corresponding to the original geometry. Since the change in $D6$ brane charge is twice the change in $D3$ charge, the T-dual theory undergoes a Seiberg duality by a change of $2M$ units of $D6$ brane charge for a change of $M$ units of the $D3$ brane charge in the Klebanov-Tseytlin background. We will now consider the Maxwell and Page charges for pp-wave background. Recall that the RR field strengths for this background in Brinkmann coordinates are given as \begin{eqnarray} \label{Brinkmann RR} &\hat{F}_0=& 0 \ , \nonumber\\ &\hat{F}_2=& \frac{2^{(- \frac{3}{4})}}{9\sqrt{3} \ \tilde{g}_s} \frac{J}{{\Big(\ln\Big({\frac{r}{\tilde{r}}\Big)\Big)^{\frac{3}{4}}}}} \Bigg[\frac{2}{5} \ln\Big(\frac{r}{\tilde{r}}\Big) + 24 \ln\Big(\frac{r}{r_0}\Big) - \frac{1}{10}\Bigg] du \wedge dz \ , \nonumber\\ &\hat{F}_4=& \frac{2^{ \frac{7}{4}}}{3\sqrt{3} \ \tilde{g}_s} \frac{J}{{\Big(\ln\Big({\frac{r}{\tilde{r}}\Big)\Big)^{\frac{5}{4}}}}} \ v_2 \Bigg[-\ln\Big(\frac{r}{\tilde{r}}\Big) \cr && + \frac{1}{2} \ln\Big(\frac{r}{r_0}\Big) \bigg(\frac{1}{15} \ln\Big(\frac{r}{\tilde{r}}\Big) -\frac{1}{60}\bigg) \Bigg] du \wedge dz \wedge d\psi \wedge dv_2 \ . \end{eqnarray} The Maxwell and page charge for various brane in type-$IIA$ theory is given by \begin{eqnarray} &\hat{Q}_{\text{Max, D6}} =& \frac{1}{\sqrt{2} \pi^2} \int \hat{F}_2 \ , \nonumber\\ &\hat{Q}_{\text{Max, D8}} =& \sqrt{2} \int \hat{F}_0 \ , \end{eqnarray} and \begin{eqnarray}\label{nocascad} &\hat{Q}_{\text{Page, D6}} =& \frac{1}{\sqrt{2} \pi^2} \int \hat{F}_2 - \hat{B}_2 \hat{F}_0 \ , \nonumber\\ &\hat{Q}_{\text{Page, D8}} =& \sqrt{2} \int \hat{F}_0 \ . \end{eqnarray} Since $\hat F_0$ is zero for our background, the $D8$ charges are all zero. Moreover, the Maxwell and Page charges for $D6$ branes are both equal. The Maxwell and Page charges for $D2$ brenes also vanish. We have \begin{eqnarray} \hat{Q}_{\text{Max, D2}} &=& \frac{1}{2k^2_{10} T_{D2}} \int_{c_6} \hat F_6 \ , \cr \hat{Q}_{\text{Page, D2}} &=& \frac{1}{2k^2_{10} T_{D2}} \int_{c_6} \bigg[\hat F_6 - \hat B_2 \wedge\hat F_4 + \frac{1}{2}\hat B_2 \wedge\hat B_2 \wedge\hat F_2 \nonumber\\ &&- \frac{1}{6}\ \hat F_0\hat B_2 \wedge\hat B_2 \wedge\hat B_2\bigg] \ . \end{eqnarray} For fixed $v_2$, both $\hat F_4$ and $\hat F_6$ are zero and $\hat F_0$ as well as $\hat B_2\wedge\hat F_2$ vanish for the pp-wave background. From \eqref{nocascad}, we find that there is no longer any cascading due to large gauge transformation of $\hat B_2$. This indicates that the quiver theory dual to the pp-wave geometry correspond to the end point of the cascade. \section{Conclusion} In this paper we have considered Penrose limits for the Klebaov-Tseytlin geometry and its non-Abelian T-dual around a suitable $SU(2)$ isometry. We have scrutinized various null geodesics in these geometries. A direct investigation of the Penrose limits for the Klebanov-Tseytlin geometry gives rise to singular geometries for most of the null geodesics. We found one smooth geometry with a nonvanishing scalar curvature. However upon taking the non-Abelian T-duality results a pp-wave solution around a suitably chosen null geodesic. The holographic dual of the T-dual background exhibits a cascade of Seiberg dualities under large gauge transformation of the NS-NS two form there by reducing the number of $D6$-branes in each step. However, an analysis of the Maxwell and Page chrages shows the absence of similar phenomenon for the pp-wave background. Thus, the holographic dual in this case appears to be the end point of the cascade of quivers corresponding to the T-dual geometry. The gauge coupling analysis shows that the quiver in the T-dual case is a non-conventional field theory. Further investigation is required to precisely identify the quiver and also the corresponding BMN sector and to establish a map between holographic quantities and field theory observables. It would also be interesting to explore the possibility of obtaining pp-wave geometries for the non-Abelian T-dual of Klebanov-Strassler background as well as backgrounds with AdS$_3$ factors. We hope to address some of these issues in future.
\section*{Introduction} Since the emergence of the novel coronavirus disease (COVID-19) and the consequent global pandemic, healthcare authorities have used different diagnostic technologies to rapidly and accurately detect infected cases. Among such diagnostic technologies, chest Computed Tomography (CT) scans have been widely used, providing informative images of the lung parenchyma. More importantly, CT scans are highly sensitive to the diagnosis of COVID-19 infection, particularly based on its specific abnormality pattern and infection distribution in the lung~\cite{Fang2020}. To analyze a CT scan, radiologists should review several 2D images (slices), jointly creating a 3D representation of the body. Consequently, the analysis of a CT scan requires careful review of all slices. Furthermore, the COVID-19 lung imaging manifestations are highly overlapped with those of the Community Acquired Pneumonia (CAP), making the diagnosis even more challenging for radiologists. The aforementioned issues have motivated the development of Artificial Intelligence (AI)-based diagnostic solutions using advancements in Deep Learning (DL) to analyze volumetric CT scans and provide diagnostic labels in a timely fashion~\cite{Mohammadi2021}. Despite the recent surge of interest and success of DL-based diagnostic solutions, such models commonly fail to achieve acceptable performances when there is heterogeneity in the data characteristics between the train and test sets, which is common when acquiring data from multiple imaging centers~\cite{Zhang2020}. Therefore, the necessity of developing a robust framework is of utmost importance to minimize the effect of the gap between the train and test sets and provide acceptable results on varied external datasets. In the case of CT scans, there are several factors contributing to the characteristics of the images among which, type of scanners, scanner manufacturers, and scanning protocols have the most influence on the quality and characteristics of the scans~\cite{Meyer2019,He2016}. Furthermore, the patients' clinical and surgical history can add more complexity and undesired artifacts to the CT scans that might have been blind to the trained model~\cite{Li2020}. Capitalizing on the above discussion, this study aims to develop a robust deep learning-based framework that can be generalized on varied external datasets with high flexibility to update itself upon receiving new external datasets. In this context, on the one hand, the paper introduces an automated two-stage classification framework based on Capsule Networks, which is tailored to robustly classify volumetric chest CT scans into one of the three target classes (COVID-19, CAP, or normal). The proposed Capsule Network-based framework integrates a scalable enhancement approach to boost its performance and robustness in the presence of gaps between the train and test sets regarding types of scanners, imaging protocols, and technical parameters. On the other hand, the paper introduces a unique test dataset, referred to as the SPGC-COVID dataset, which is available for public access through Figshare~\cite{Heidarian2021b}. SPGC-COVID dataset consists of COVID-19, CAP, and normal cases acquired with various imaging settings from different medical centers. The SPGC-COVID dataset contains four subsets, illustrated in Fig.~\ref{fig:testset}, including images with different slice thickness, radiation dose, and noise level. In addition to different technical parameters, the dataset consists of CT scans of patients who have heart diseases or have undergone heart surgery, besides having COVID-19 or CAP infections. The SPGC-COVID dataset was used as the test set in the 2021 Signal Processing Grand Challenge (SPGC) on COVID-19 diagnosis, which the authors organized as part of the 2021 IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP). The performance of our proposed Capsule Network-based framework is compared with state-of-the-art approaches of the COVID-19 grand challenge. The results demonstrate that our proposed framework outperforms all the submitted models by achieving the overall accuracy of $96.15\%$ ($95\%CI: [91.25-98.74]$), COVID-19 sensitivity of $96.08\%$ ($95\%CI: [86.54-99.5]$), CAP sensitivity of $92.86\%$ ($95\%CI: [76.50-99.19]$), normal sensitivity of $98.04\%$ ($95\%CI: [89.55-99.95]$), and the Area Under the ROC curve (AUC) of $0.992$. \begin{figure}[t!] \centering \includegraphics[width=0.9\linewidth]{test-sets.png} \caption{\small Overview of the SPGC-COVID dataset used in this study.} \label{fig:testset} \end{figure} \noindent \section*{Results} Our proposed framework adopts a two-stage architecture based on Capsule Networks (CapsNets)~\cite{hinton2018}, as shown in Fig.~\ref{fig:pipeline}, which is fed by a volumetric CT scan and provides the probability of the input scan belonging to one of the three target classes. In brief, the first stage identifies CT slices demonstrating infection and passes them to the second stage to be classified as one of the target classes. The output of the first stage is also used to filter normal cases, by applying a $3\%$ threshold on the involvement of the lung parenchyma (i.e., the ratio of the infectious slices in the whole volume). In addition to the proposed framework, four partially enhanced models are developed (based on the four test sets), and the final model aggregates the outputs of the partially enhanced models to provide the final predictions. The proposed enhancement approach extracts confidently predicted images from each test set in an unsupervised fashion, which are then used to update the model's parameters. \begin{table}[t!] \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline \textbf{Dataset} & \textbf{COVID-19} & \textbf{CAP} & \textbf{Normal} & \textbf{Age (Mean$\pm$ SD)} & \textbf{Gender} & \textbf{Imaging Center}\\ \hline Train & 171 & 60 & 76 & $50.78\pm16.84$ & $183M/124F$ & 1\\ \hline Test 1 & 15 & 0 & 15 & $40.97\pm14.38$ & $19M/11F$ & 1 \\ \hline Test 2 & 10 & 10 & 10 & $61.00\pm13.39$ & $25M/5F$& 2 \\ \hline Test 3 & 10 & 10 & 10 & $46.77\pm20.89$ & $15M/15F$& 1 \\ \hline Test 4 & 16 & 8 & 16 & $46.23\pm14.74$ & $25M/15F$ & Both \\ \hline \end{tabular} \caption{\small Number of cases, demographic data, and additional acquisition information for each dataset. Center 1 represents the Babak Imaging Center and Center 2 is the Tehran Heart Center. Both imaging centers are located in Tehran, Iran.} \label{tab:dataset-detail} \end{table} \begin{figure}[t!] \centering \includegraphics[width=1\linewidth]{framework.png} \caption{\small The pipeline of the proposed CapsNets-based framework.} \label{fig:pipeline} \end{figure} To evaluate the performance of the proposed model and the effectiveness of its unsupervised enhancement approach, we used the first three test sets to enhance the benchmark model and kept the fourth test set aside only for evaluation purposes. The results obtained by applying the enhanced ensemble model on all of the test sets are shown in Table~\ref{tab:result}. In this table, the Area Under the ROC curve (AUC) is calculated based on the micro average of the values obtained for each class. In addition, to further validate the obtained results, confidence intervals for the total accuracy and sensitivity are provided using the method introduced in~\cite{Agresti1998}. \begin{table}[t!] \centering \begin{tabular}{|c|c|c|c|c|c|} \hline \textbf{Test Set}& \textbf{Accuracy(\%)} & \textbf{\makecell{COVID-19\\Sensitivity(\%)}} & \textbf{\makecell{CAP\\Sensitivity(\%)}} & \textbf{\makecell{Normal\\Sensitivity(\%)}} & \textbf{\makecell{AUC\\ (micro)}}\\ \hline Test 1& 100 & 100 & NA & 100 & 1.000\\ \hline Test 2 & 86.67 & 80 & 90 & 90 & 0.952\\ \hline Test 3 & 100 & 100 & 100 & 100 & 1.000\\ \hline Test 4 & 97.50 & 100 & 87.50 & 100 & 0.999\\ \hline Total & 96.15(CI: [91.25-98.74]) & 96.08(CI: [86.54-99.5]) & 92.86(CI: [76.50-99.19]) & 98.04(CI: [89.55-99.95]) & 0.992\\ \hline \end{tabular} \caption{Result obtained by the proposed framework for different test sets. $95\%$ Confidence Intervals obtained for total performance using the significance level of $0.05$ are presented in parentheses.} \label{tab:result} \end{table} To elaborate the effect of the proposed unsupervised enhancement approach, we have provided the performance of the benchmark model (i.e., before enhancement) as well as the models enhanced by individual tests sets (i.e., before averaging the outputs) in Table~\ref{tab:ind-result}. Results shown in Table~\ref{tab:ind-result} imply that the probability of the input CT scan belonging to the target class in some misclassified cases have been on the thresholding edge (close to $0.5$) and could be corrected after incorporating the models enhanced over other test sets. \begin{table}[t!] \centering \begin{tabular}{ | m{4em} | m{5.2em} | m{5.2em}| m{5.2em} |m{5.2em}|m{5.2em}|m{5.2em}| } \hline Test Set & Sensitivity & Proposed & Enhanced \#1 & Enhanced \#2 & Enhanced \#3 & Benchmark \\ \hline Test1 &COVID-19 \hspace{35pt} Normal\hfill & \textbf{15/15} \hspace{35pt}\textbf{15/15} & 15/15 \hspace{35pt}15/15 & 15/15 \hspace{35pt}15/15 & 15/15 \hspace{35pt}15/15 & 15/15 \hspace{35pt}15/15 \\ \hline Test2 &COVID-19 \hspace{35pt} CAP \hspace{35pt} Normal\hfill & \textbf{8/10} \hspace{35pt}\textbf{9/10} \hspace{35pt}\textbf{9/10} & 8/10\hspace{35pt} 9/10 \hspace{35pt}9/10 & 8/10 \hspace{35pt}8/10 \hspace{35pt}9/10 & 8/10 \hspace{35pt}9/10 \hspace{35pt}9/10 & 8/10 \hspace{35pt}8/10 \hspace{35pt}9/10 \\ \hline Test3 &COVID-19 \hspace{35pt} CAP \hspace{35pt} Normal\hfill & \textbf{10/10} \hspace{35pt}\textbf{10/10} \hspace{35pt}\textbf{10/10} & 10/10\hspace{35pt} 10/10 \hspace{35pt}10/10 & 9/10 \hspace{35pt}10/10 \hspace{35pt}10/10 & 9/10 \hspace{35pt}10/10 \hspace{35pt}10/10 & 9/10 \hspace{35pt}10/10 \hspace{35pt}10/10 \\ \hline Test4 &COVID-19 \hspace{35pt} CAP \hspace{35pt} Normal\hfill & \textbf{16/16} \hspace{35pt}7/8 \hspace{35pt}\textbf{16/16} & 16/16\hspace{35pt} 6/8 \hspace{35pt}16/16 & 16/16 \hspace{35pt}7/8 \hspace{35pt}16/16 & 15/16 \hspace{35pt}\textbf{8/8} \hspace{35pt}16/16 & 15/16 \hspace{35pt}7/8 \hspace{35pt}16/16 \\ \hline \end{tabular} \caption{The ratio of correctly classified cases over total cases in the associated class obtained for the proposed model, the benchmark model, and the partially enhanced models.} \label{tab:ind-result} \end{table} In addition to the final patient-level predictions, we have evaluated the performance of the first stage on the validation set in detecting slices demonstrating infection to have a clearer insight into the internal components of the framework. The first stage achieved an accuracy of $93.41\%$, sensitivity of $91.04\%$, and specificity of $94.26\%$ in the binary (infectious \& non-infectious) classification task. As slice-level labels (i.e., binary labels indicating the existence of infection in a CT slice) are not available for test sets, the result on the validation set is only reported. Moreover, as mentioned earlier, the output of the first stage can be used to identify most normal cases before entering the next stage. We found that nearly all of the normal cases in the four test sets ($45/46$ cases) have been identified correctly by the thresholding mechanism applied on the output of the first stage, while none of COVID-19 and CAP cases have been misclassified as normal using this thresholding approach. In Fig.~\ref{fig:roc}, the ROC curves for COVID-19 and CAP cases against other classes (e.g., COVID-19 vs. CAP and Normal) are plotted. The associated AUC values are also provided. \begin{figure}[t!] \centering \includegraphics[width=0.55\linewidth]{roc_final_with_CI.JPEG} \caption{ROC curves for COVID-19 vs. others and CAP vs. others.} \label{fig:roc} \end{figure} \vspace{.1in} \noindent \textbf{Comparison:} We have compared our proposed framework with top six models~\cite{Chaudhary2021, Yang2021, Garg2021, Xue2021, Bougourzi2021, Bingyang2021} developed following the Signal Processing Grand Challenge (SPGC) on COVID-19 diagnosis, which was organized by the authors as part of the 2021 IEEE International Conference on Acoustics, Speech, \& Signal Processing (ICASSP). In the first phase of this SPGC, participants had access to the same train and validation sets as those used in this study to develop and evaluate their models. In the second phase, they have been provided with the first three test sets and had two weeks to submit their final models. Finally, the best-performing models based on the first three test sets have been evaluated on the fourth test set to determine the overall performances. Experimental results demonstrate that our proposed framework outperforms its counterparts proposed in the SPGC. Furthermore, it benefits from a scalable enhancement approach that can be integrated into most of the state-of-the-art models to improve their performance when testing on a heterogeneous dataset. In what follows, the six best-performing models from the SPGC COVID-19 are briefly described, followed by their corresponding performances on the entire test sets presented in Table~\ref{tab:comparison}. \begin{itemize} \item \textbf{Ref.~\cite{Chaudhary2021}:} In this model, slice-level predictions are acquired from an EfficientNet-based classifier~\cite{Tan2019} and a weighted majority voting is proposed to obtain the final patient-level labels. To train this classifier, the authors first trained two separate binary classifiers to detect slices demonstrating infection from COVID-19 and CAP cases. Then, they fed these models with unlabelled cases to provide the training set for the main classifier. Additionally, they only considered the middle slices (e.g., 80 middle slices) in a volumetric CT scan at the training phase. \item \textbf{Ref.~\cite{Yang2021}:} This model aggregates the output of six classifiers developed based on the 3D ResNet101 model~\cite{He2015}. One model in this proposed framework is a three-way classifier trained over all of the cases while the other five models are binary classifiers independently trained over COVID-19 and CAP cases using different combinations of train and validation sets. \item \textbf{Ref.~\cite{Garg2021}:} This model presents a feature extraction-based approach in which a modified pre-trained ResNet50 model classifies each slice into the target classes and the penultimate fully connected layer is extracted as the feature map. Next, a max-pooling layer followed by two fully connected layers are used to generate patient-level prediction from slice-level feature maps. The output of this model is then aggregated with two BiLSTM patient-level classifiers, which are fed by the same slice-level feature maps to provide the final patient-level labels. \item \textbf{Ref.~\cite{Xue2021}:} The pre-trained 3D Resnet50~\cite{Ebrahimi2020} is the backbone of this model. The authors first doubled the number of slices for each case using a 3D cubic interpolation method. Then, they extracted the lung area using a pixel-based segmentation approach, followed by classical image processing techniques such as pixel filling and border cleaning. Finally, a subset of slices is selected from each volumetric CT scan based on their lung area and an experimentally-set threshold, which are then resized into a ($224,224,224$) data, using a 3D cubic interpolation method, providing the patient-level input for training and evaluation purposes. \item \textbf{Ref.~\cite{Bougourzi2021}:} This model utilizes a two-stage framework in which the first stage is responsible for performing a multi-task classification to classify 2D slices into one of the target groups and identify the location of the slice in the sequence of CT images at the same time. The model at the first stage uses an ensemble of four popular CNN-based classifiers (i.e., ResneXt50~\cite{Xie2017}, DenseNet161~\cite{Huang2017}, Inception-V3~\cite{Szegedy2016}, and Wide-Resnet~\cite{Zagoruyko2016}), followed by an aggregation mechanism that divides the whole volumetric CT scan into 20 groups of slices and calculates the percentage of infected slices related to COVID-19 and CAP classes in each group. The values obtained for all groups are then concatenated and fed into a XG-boost classifier~\cite{Chen2016} in the second stage to generate patient-level predictions. \item \textbf{Ref.~\cite{Bingyang2021}:} The model proposed in this work initiates with a slice-level EfficientNet-B1 classifier~\cite{Tan2019} aiming to classify slices and generate feature maps (intermediate layers) to be used in the subsequent sequence classifier. In the sequence classifier, several weak classifiers are trained and the outputs are aggregated using an adaptive weighting mechanism to obtain the final patient-level results. To further enhance the performance of the model and cope with the imbalanced training set, a combination of weak and strong data augmentations are applied to the training cases, forcing the model to produce similar labels for both types of augmented images. Furthermore, to improve the robustness of the model when being tested on varied datasets, a K-Means clustering method ($K=3$)~\cite{macqueen1967} is adopted to develop a single classifier for each cluster of the data and aggregate the results via a majority voting approach. \end{itemize} In addition to the aforementioned models, we have further compared our proposed framework with another model, which has utilized the same train and test sets (excluding the 4th test set) to target the same classification task~\cite{Nicolas2021}. A brief description of this model is as follows: \begin{itemize} \item \textbf{Ref.~\cite{Nicolas2021}:} This model aims to introduce a robust training algorithm and classification framework, which is capable of being updated upon receiving new datasets to deal with the characteristic shifts in different test sets. First, it adopts a two-stage architecture similar to the COVID-FACT model proposed in reference~\cite{Heidarian2021} and trains the benchmark model in a self-supervised fashion~\cite{Jing2020} and the majority voting is adopted to obtain patient-level labels. The backbone model used in this study is DenseNet169~\cite{Huang2017} and strict slice preprocessing and sampling methods are applied to the training set. Such methods contain pixel-based approaches with some fixed thresholds used to extract lung areas and select the slices with the most visible lung area. Next, each test set is divided into four quarters, which are then used in an unsupervised updating process, in which quarters are passed to the model sequentially and confident predictions are selected to fine-tune the slice-level classifiers. A slice-level prediction is considered confident in this study if it achieves the probability of at least $0.9$ in agreement with the patient-level label. \end{itemize} Table~\ref{tab:comparison} illustrates the performance of seven automated models developed to tackle the same task as that of this study using the same train and test datasets. We have also compared the overall performance of our proposed framework with the aforementioned models using the statistical McNemar's test~\cite{McNemar1947} with the significance level of $0.05$. We tested the hypothesis that the models have the same proportion of errors on the entire test sets. The corresponding $p$-values are reported in Table~\ref{tab:comparison} and indicate that the hypothesis is rejected for almost all the models except the first one as the corresponding $p$-value is slightly more than $0.05$. In other words, there is a significant difference in the proportion of errors between our proposed framework and six of the aforementioned models while such difference is not significant in the case of the model proposed in Ref.~\cite{Chaudhary2021}. \begin{table}[t!] \centering \begin{tabular}{|c|c|c|c|c|c|} \hline Model & Accuracy(\%) & COVID-19 Sensitivity(\%) & CAP Sensitivity(\%) & Normal Sensitivity(\%) & \makecell{McNemar's test\\$p$-value}\\ \hline \textbf{Ref.~\cite{Chaudhary2021}} & 90 & 86.27 & 89.28 & 94.11 & 0.07681\\ \hline \textbf{Ref.~\cite{Yang2021}} & 88.46 & 86.27 & 89.28 & 90.19 & 0.03088\\ \hline \textbf{Ref.~\cite{Garg2021}} & 87.69 & 88.23 & 78.57 & 92.15 & 0.00739\\ \hline \textbf{Ref.~\cite{Xue2021}} & 85.38 & 84.31 & 82.14 & 88.23 & 0.00052\\ \hline \textbf{Ref.~\cite{Bougourzi2021}} & 84.61 & 90.19 & 60.71 & 92.15 & 0.00073\\ \hline \textbf{Ref.~\cite{Bingyang2021}} & 80.00 & 88.23 & 35.71 & 96.07 & 0.00005\\ \hline \textbf{Ref.~\cite{Nicolas2021}} & 72.22 & 65.71 & 85.00 & 71.43 & 0.00002\\ \hline \textbf{Proposed} & \textbf{96.15} & \textbf{96.08} & \textbf{92.86} & \textbf{98.04} & --\\ \hline \end{tabular} \caption{Results obtained by the models that utilized the same train and test sets. $P$-values for the McNemar's test with the significance level of $0.05$ are presented in the last column comparing the proportion of errors on the entire test sets obtained by our proposed framework and other models.} \label{tab:comparison} \end{table} \section*{Discussion} In this paper, we expanded the fully-automated framework developed in our previous study~\cite{Heidarian2021} to tackle the three-way classification task (i.e., identification of COVID-19, CAP, and Normal cases) based on volumetric CT scans acquired from multiple centers using different imaging protocols. We also proposed an unsupervised enhancement approach, which can enable all deep learning-based frameworks to be adapted with the heterogeneity in different test sets. In Table~\ref{tab:confident-slices}, the numbers of slices extracted from each test set to augment the train set are presented. The low number of normal slices demonstrates the high performance of the first stage in identifying slices with and without the evidence of infection. As another advantage of the proposed framework, we can mention the capability of the Capsule Network-based model to be trained using a relatively small dataset, which is of utmost importance in the field of Medical Image Processing, in particular the COVID-19 disease, where, typically, small annotated datasets are available. The other noteworthy advantage is that the model does not require any infection annotation, which is a challenging and time-consuming task. The only segmentation used in our study is the lung area segmentation (i.e., extracting the lung parenchyma using a pre-trained U-Net model~\cite{Hofmanninger2020}), which is a well-studied task and does not add much complexity to the model. \begin{table}[t!] \centering \begin{tabular}{|c|c|c|c|} \hline & COVID-19 & CAP & Normal\\ \hline \textbf{Test 1} & 595 & 0 & 4 \\ \hline \textbf{Test 2} & 382 & 563 & 3 \\ \hline \textbf{Test 3} & 427 & 341 & 2 \\ \hline \end{tabular} \caption{The number of slices extracted from each test set to augment the train set.} \label{tab:confident-slices} \end{table} We would like to highlight the effect of the suggested $3\%$ threshold used to identify normal cases based on the outcome of the first stage. As mentioned earlier, $3\%$ is a safe threshold to identify normal cases as it is extremely rare to observe less than $3\%$ involvement of the lung parenchyma in COVID-19 cases. However, it is possible that the number of slices identified as infectious in a normal case exceeds this $3\%$ threshold. This could happen mainly in those CT scans with a large slice-thickness and fewer slices (e.g., less than 100 slices). In such cases, a minor error (a few number of misclassified slices by the first stage) will mistakenly indicate a large involvement of the lung parenchyma. Such errors can be avoided by increasing the $3\%$ threshold or using an adaptive threshold (e.g., based on the slice-thickness and number of slices) when we are dealing with a fewer number of slices per patient. In this study, only one normal case has been misclassified and increasing the threshold to $6\%$ could remove the error while the other cases were not affected. The promising results and benefits of the first stage in identifying slices demonstrating infection indicate its significant potential to be used in other CT scan-related models to help identify normal cases and concentrate only on a subset of slices rather than the whole volume. Furthermore, we would like to highlight that the results shown in Table~\ref{tab:ind-result} demonstrate the incapability of the model enhanced based on a test set to improve the performance of the model on the same set. This is mainly because of the fact that the additional data used to update the benchmark model is constructed by the cases with the highest probability scores (whether correct or not) and incorporating them into the train set will force the model to further increase the corresponding probability scores while does not have much effect on other slices. As such, in the test phase, it is more reasonable to aggregate the outputs obtained by all enhanced models except the one associated with the target test set. It is also worth mentioning that due to the nature of the data (i.e., Medical Images), obtaining a large and diversified dataset from different countries is challenging. However, we will continue to expand the diversity of the dataset to perform more comprehensive investigations on the generalizability of our proposed framework on other test sets as well as determining the maximum level of the shift in image characteristics that can be compensated using our proposed framework. Finally, it is worth noting that it is possible to design more advanced techniques to select the cases and images from the new test sets using the metrics introduced in the field of Active Learning~\cite{Smailagic2018,Smailagic2020} through which the cases which bring more diversity to the training set and the associated feature maps are detected and used for training purposes. In addition to the enhancement techniques in the field of Active Learning, there have been recently several studies on using Generative Adversarial Networks (GANs) to cope with the data and domain shift in medical images~\cite{Tzeng2017,Pandey2020} where the labeled data is not available in the target domain. The main goal in such frameworks is to achieve a domain invariant image representation which can efficiently embed the important features of the image regardless of the imaging modality or imaging technique. Similarly in~\cite{Ahn2020}, an auto-encoder and feature augmentation-based approach is proposed to adapt the model with various imaging modalities obtained by different scanners. However, in this study, we are dealing with only one imaging modality (i.e., CT scan) and the level of characteristic shift between the images is lower compared to the images investigated in the aforementioned studies. Moreover, we could achieve high performances using a far less complicated mechanism. In conclusion, we have proposed an approach to update the model's parameters by extracting confident predictions from the test sets and utilize them to re-train the model in order to increase its capability and robustness in the presence of gaps between the imaging protocols and patients' clinical history. We showed that we can train different versions of the model based on different test sets and combine their outputs to generate the final predictions, which are more accurate and robust. \section*{Methods} In this section, we first introduce the datasets utilized in this study. We then describe the components of the two-stage Capsule Network-based classification framework, followed by a detailed description of the proposed unsupervised enhancement approach. \vspace{.1in} \noindent \textbf{Dataset}\\ \noindent In what follows, different datasets used in this study are described individually, followed by supplementary information about the demographic data, imaging protocols, acquisition settings, de-identification, and the labeling process. The utilized dataset consists of a training and a test set, where the training dataset is the COVID-CT-MD~\cite{Afshar2021a}, we introduced previously and is acquired from one imaging center using similar scanning parameters. The test dataset, the so-called SPGC-COVID, is comprised of four different sets each with specific characteristics to evaluate the robustness and generalizability of the DL model from different aspects. The SPGC-COVID dataset is publicly available on Figshare~\cite{Heidarian2021b}. An overview of different datasets and imaging centers is visualized in Fig.~\ref{fig:testset}. Different components of the utilized dataset are as follows: \begin{itemize}[noitemsep] \item \textbf{Train Set:} We used our in-house and publicly available dataset~\cite{Afshar2021a}, referred to as the ``COVID-CT-MD", as the training dataset which contains CT scans of COVID-19, CAP, and normal cases acquired by the ``SIEMENS, SOMATOM Scope" scanner using the standard radiation dose from Babak Imaging Center, Tehran, Iran. A subset of $55$ COVID-19, and $25$ CAP cases are analyzed by one radiologist (M.J.R.) to identify slices demonstrating infection. The labeled subset of the data contains $4,993$ slices demonstrating infection and $18,416$ slices without evidence of infection. $30\%$ of the cases in this set are randomly selected as the validation set. \item \textbf{The SPGC-COVID Test Set:} This dataset, which is released through this manuscript, comprises the following four different subsets: \begin{itemize}[noitemsep] \item \textbf{Test Set 1:} Low and Ultra-Low dose CT scans of COVID-19 and normal cases acquired from the same imaging center as that of the train set. This dataset is a subset of our in-house dataset of Low Dose CT scans~\cite{Afshar2021b} and is publicly available. \item \textbf{Test Set 2:} CT scans of COVID-19, CAP, and normal cases acquired in a different imaging center (Tehran Heart Center, Iran) using the ``SIEMENS SOMATOM Emotion 16" scanner and different scanning parameters. Some cases in this dataset have additional history of cardiovascular disease/surgeries with specific CT imaging findings, which are not available in the train set. \item \textbf{Test Set 3:} CT scans of COVID-19, CAP, and normal cases obtained by the same scanner and scanning protocol used to acquire the train set. Cases in this test set are not included in the COVID-CT-MD public dataset. \item \textbf{Test Set 4:} A combination of new CT scans of all three categories (i.e., COVID-19, CAP, Normal) obtained from the same centers as those of Test set 1 and 2, using the same acquisition settings and scanners. \end{itemize} \end{itemize} Additional statistical and demographic information about different train and test sets used in this study are provided in Table~\ref{tab:dataset-detail}. In Table~\ref{tab:dataset-detail}, Center 1 represents the Babak Imaging Center and Center 2 is the Tehran Heart Center. Both imaging centers are located in Tehran, Iran and use the Filtered Back Projection reconstruction method~\cite{Pontana2011} to obtain the CT images. Sample CT slices from the first three test sets are shown in Fig~\ref{fig:sample-ct}. Various scanning protocols and settings have been used to obtain the train and test datasets used in this study. The important parameters that contribute the most to the image quality and characteristics are presented in Table~\ref{tab:scan-protocol}. \begin{table}[t!] \centering \begin{tabular}{|c|c|c|c|c|c|} \hline Dataset & Slice Thickness (mm) & Reference Exposure (mAs) & kVp (kV) & Radiation (mSv) & \makecell{Number of Slices\\(per patient)}\\ \hline Train & $2$ & $50$ & $110-130$ & $\sim7$ & $68-195$ \\ \hline Test 1 & $2$ & $15-20$ & 110 & $\sim0.3-1.5$ & $126-169$ \\ \hline Test 2& $1.5-5$ & $25$ & $110-130$ & $\sim2$ & $53-221$ \\ \hline Test 3 & $2$ & $50$ & $100-110$ & $\sim7$ & $115-183$ \\ \hline Test 4 & $1.5-6$ & $15-25$ & $110-130$ & $\sim0.3-2$ & $52-224$ \\ \hline \end{tabular} \caption{\small Acquisition parameters used to obtain each dataset.} \label{tab:scan-protocol} \end{table} \begin{figure}[t!] \centering \includegraphics[width=0.5\linewidth]{ct-scans.png} \caption{\small Sample CT slices from the first three test sets. In Test set 1, the noise level is high. In Test 2, some cases reveal cardiovascular-related complications. In Test 3, the image quality and contrast are higher compared to other test sets.} \label{fig:sample-ct} \end{figure} \vspace{.1in} \noindent \textbf{\textit{De-identification:}} The data used in this study complies with the DICOM supplement 142 (Clinical Trial De-identification Profiles)~\cite{Committee2011}, which ensures that all personal information is removed or obfuscated, including names, UIDs, dates, times, comments, and center-related information. Some demographic and acquisition attributes related to the patients' gender and age, scanner type, and image acquisition settings have been preserved to provide useful information about the dataset. \vspace{.1in} \noindent \textbf{\textit{Labeling Process:}} Diagnosis of the cases scanned in Center 1 is obtained by finding the consensus between three experienced radiologists who have considered the following three main criteria to label the data: \begin{enumerate}[noitemsep] \item[(i)] RT-PCR test (if available); \item[(ii)] Imaging findings including Ground Glass Opacities (GGOs), consolidations, crazy paving pattern, bilateral and multifocal lung involvement, peripheral distribution, and lower lobe predominance of findings; \item[(iii)] Clinical symptoms of the COVID-19 infection, and; \item[(iv)] Epidemiology. \end{enumerate} For the cases acquired from Center 2, $(13/18)$ COVID-19 cases have positive RT-PCR test results and the remaining cases have been labeled by one experienced radiologist following the same aforementioned criteria. Slice-level labels are provided by one radiologist to identify and label slices with evidence of infection. A subset of $15$ random cases has been further reviewed by the two other radiologists to confirm the accuracy of the slice-level labels. \begin{figure}[t!] \centering \includegraphics[width=1\linewidth]{stages.png} \caption{\small a) The structure of the CapsNet binary classifier in stage 1. b) The structure of the three-way classifier in stage 2. $+$ sign denotes the residual addition.} \label{fig:stage1} \end{figure} \vspace{.1in} \noindent \textbf{Capsule Network-based Framework}\\ \noindent In this study, we have developed a two-stage framework similar to the model proposed in our previous study~\cite{Heidarian2021}, referred to as the ``COVID-FACT", as our benchmark model to classify volumetric CT scans into three target classes of COVID-19, CAP, and normal. We then use the unlabeled data from the test sets to boost the performance and robustness of the framework on the unseen cases. The pipeline of the proposed framework is shown in Fig.~\ref{fig:pipeline}. Different components of the proposed framework are described below: \begin{itemize} \item\textbf{Preprocessing:} Raw CT scans, typically, contain uninformative components and unwanted artifacts (e.g., metallic artifacts), which can negatively affect the performance of the DL model. In addition, image sizes may vary and pixel intensities may be in different ranges when the images are acquired by different scanners. As such, we first extracted the lung areas from the CT images to remove the insignificant and distracting components. In this regard, we used a well-trained U-net based segmentation model~\cite{Hofmanninger2020}, which is fine-tuned on COVID-19 cases to specify lung areas in the first step. We then down-sampled all images into the ($256\times256$) size to reduce the memory allocation and complexity without significant loss of information. Furthermore, we normalized each 2D image into the $[0,1]$ interval. \item\textbf{Stage 1:} The first stage performs the infection identification task, which aims to find slices with the evidence of infection (caused by CAP or COVID-19) for each patient. The identified slices will then be classified into one of the three target classes in the second stage. The input of Stage 1 is the normalized lung area as a 2D image and the output is the label indicating whether the input image demonstrates infection or not. The classification model used in this stage is based on the Capsule Networks (CapsNets)~\cite{hinton2018}, which have shown a superior discriminative capability compared to their CNN-based counterparts, especially when they are trained over small datasets~\cite{Afshar2021, Afshar2020, Heidarian2021a, Afshar2021c}. Each capsule layer consists of multiple capsules, which are groups of neurons represented by a vector. Capsule Network benefits from an iterative process, known as the ``Routing by Agreement", that aims to evaluate the agreement between the capsules in a lower layer on the existence of an object in the higher layer. Using the Routing by Agreement process, the model can recognize the relation between multiple instances in an image. Furthermore, CapsNets have lower time and space complexity compared to the conventional CNNs~\cite{Heidarian2021}. Such advantages make CapsNet-based models ideal in the case of COVID-19 where small annotated datasets are available and disease manifestations show specific spatial distributions in the lung. The detailed structure of the classification model in the first stage is shown in Fig.~\ref{fig:stage1}(a).\\ For the first stage, we adopted the same architecture as the model proposed in~\cite{Heidarian2021}. More specifically, the model in this stage uses a stack of four convolution layers, one batch normalization layer, and one max pooling layer to generate initial feature maps. Next, the output of the last convolution layer is reshaped to form the first capsule layer, followed by three consecutive capsule layers, as shown in Fig.~\ref{fig:stage1}(a). The last layer contains two capsules representing the two target classes (i.e., slices with and without the evidence of infection.) The length of each capsule represents the probability of the corresponding class being present. Different from COVID-FACT, residual connections are added between the convolution layers to transfer low-level features to the deeper layers. This modification further assists the model in identifying informative features. Additionally, we have added a dropout layer before the capsule layers to overcome the overfitting problems during the training. The labeled subset of the training dataset has been used to train this stage over $100$ epochs using the Adam optimizer with the learning rate of $1e-4$. To account for the imbalanced number of slices in each class, we have used a weighted loss function to increase the contribution of the minority group (i.e., slices demonstrating infection) to the final loss value and balance the influence of each class. The balanced loss function used to train Stage 1 is given by \begin{equation} \begin{split} loss & = w_1\times loss_1 + w_2 \times loss_2,\\ & w_1 = \frac{N_2}{N_1 + N_2},\\ & w_2 = \frac{N_1}{N_1 + N_2}, \end{split} \label{eq:loss} \end{equation} where $w_1$ and $w_2$ represent the weights corresponding to the loss value calculated for negative and positive samples, respectively. Term $loss_1$ denotes the loss associated with negative samples, while $loss_2$ is the loss associated with positive samples. Term $N_1$ represents the number of negative samples, and $N_2$ is the number of positive samples. \item\textbf{Stage 2:} The second stage takes the candidate slices from the previous stage and classifies them into one of the COVID-19, CAP, or normal cases. More specifically, we have used the slices demonstrating infection recognized by the first stage for all of the cases in the train set (with or without slice level labels) to train a three-way classification model. Stage 2 utilizes a CapsNet architecture similar to the one used in the first stage but with smaller dimensions and three capsules in the last layer to represent three target classes. The architecture of stage two is shown in Fig.~\ref{fig:stage1}(b). Similar to the first stage, we used a weighted loss function to cope with the imbalanced number of samples in some categories. At this stage, the loss weights associated with normal and CAP classes are set to $5$ and the weight for COVID-19 class is set to $1$. Note that as the normal cases are extremely rare at this stage, the weights are set differently compared to those calculated by Eq.~\ref{eq:loss}, to maintain the stability of the training process, while enforcing the model to pay more attention to the minority classes. We also used the binary cross-entropy loss function, which translates the three-way classification problem at hand into three binary classification tasks. In fact, the loss value is calculated separately for each binary label associated with a target class (i.e., COVID-19, CAP, normal). Finally, a majority voting mechanism is adopted to transfer slice-level predictions into patient-level ones and determine the final label. It is worth noting that an accurate model in the first stage detects only a few candidate slices from normal cases. We can then apply a thresholding mechanism on the output of the first stage to identify those cases with only a few identified infectious slices in the first stage and label them as normal. We have used a threshold of $3\%$ to specify normal cases immediately after the first stage. More specifically, if less than $3\%$ of the slices in a volumetric CT scan are classified as infectious, the corresponding CT scan is classified as a normal case. Based on~\cite{Yu2020}, the minimum lung lesion involvement in patients with COVID-19-related CT findings is $4\%$. In addition, the minimum percentage of slices demonstrating infection in our training dataset is $7\%$. In the case that the model in stage 1, misclassifies more than $3\%$ of slices for a normal case, there is still a chance to classify the slices as normal in the second stage. \end{itemize} \noindent \textbf{\textit{Unsupervised Enhancement:}} Unseen CT scans acquired by different scanners and scanning protocols contain heterogeneous characteristics leading to lower performance of a pre-trained model. To increase the robustness, we take advantage of the extra unlabeled samples that are available via the various test cases, and utilize this extra set of CT scans in an unsupervised fashion. In other words, inspired by the ideas from ``Active Learning~\cite{Smailagic2018,Smailagic2020, Budd2021}'', where different data samples are extracted to train the model in different stages, and ``Semi-Supervised Learning~\cite{cai2013, Schmarje2021}'', where a label is assigned to unlabelled cases based on a pre-defined metric, we developed an autonomous mechanism to extract and label a part of data in the test sets using a probabilistic selection criteria with reduced complexity. The selected sample and the assigned labels are then used to re-train and boost the initially trained model. More specifically, we selected those test cases for which the model generated the most confident results (i.e., high probability). Similarly, among the selected cases, those with high confidence in slice-level predictions are used. To define the confident results, the probability of a volumetric CT scan belonging to a specific target class is considered to be equal to the ratio of the slices belonging to that class over the total number of slices (all slices containing the lung lesion), which can be written as follows \begin{equation} P(\mathbb{X} \in \mathcal{C}_i) = \frac{n_{\mathcal{C}_i}}{\sum_{i=1}^{C}{n_{\mathcal{C}_i}}}, \end{equation} where $\mathbb{X} $ represents the input volumetric CT scan, $C$ represents the number of target classes, and $n_{\mathcal{C}_i}$ denotes the number of slices belonging to the target class $\mathcal{C}_i$. Then, we introduced a confidence threshold value and considered a prediction confident if the probability of the input CT scan belonging to any of the target classes is more than the pre-set threshold. In this study, we have used $80\%$ as the confidence threshold. A similar approach is used to extract confident slices and their corresponding labels. In this case, the probability of a slice belonging to a target class is determined by the output of the CapsNet classifier in Stage 2, which is the length ($L_2 Norm$) of capsules in the last layer. It is worth mentioning that for those normal cases, which are identified in the first stage using the described thresholding mechanism, we only select the slices which are misclassified as infectious with a high probability (e.g., more than the confidence threshold). Such slices will be labeled as normal in the enhancement phase. Following the aforementioned steps, we can obtain a set of slices and their corresponding labels to augment the training dataset aiming to make the model more aware of the new features available in the unseen datasets and achieving more robust feature maps. Therefore, for each test set, we obtained a set of confident slices and their associated labels which have been added to the train set to re-train the model of the second stage. It is worth noting that the first stage has been kept unchanged in this approach. Finally, after re-training the benchmark model based on the confident slices acquired from each test set, we have obtained several enhanced models (each related to one test set) and averaged the associated patient-level probability scores to achieve the final prediction. This aggregation mechanism depends on the target test set. More specifically, to apply the model on each test set, we take the average of the predictions obtained by the models enhanced over the other test sets. For instance, the model developed for the diagnosis of cases in Test set 1 takes the average of probability scores provided by the models enhanced on Test set 2 and 3. The main reason for using such an aggregation mechanism is that the enhancement based on a specific test set will further boost the probability scores of confidently predicted slices while having limited influence on other cases in the same set. As such, incorporating the model enhanced on a test set will not bring in any further improvement to the evaluation process of the same set. The results presented in Table~\ref{tab:ind-result} further support this discussion. It is worth noting that we used the first three test sets to enhance the benchmark model and kept the fourth test set aside for only evaluation purposes. As such, upon receiving new test datasets, we can aggregate the results of the enhanced models on the individual test sets (each representing a specific center or scanning protocol) to provide the classification results for the new cases. The unsupervised model enhancement described above along with the subsequent ensemble averaging make the entire framework a robust automated framework that can be easily improved and updated upon receiving new datasets from different imaging centers.
\section{Introduction} We are concerned with the problem of identifying the set of \emph{active} (or \emph{significant}) variables. This task appears in a wide variety of applied fields as genomics, functional MRI, neuro-imaging, astrophysics, among others. Such data is typically available on a large number of observation units, which may or may not contain a signal; the signal, when present, may be relatively faint and is dispersed across different observation units in an unknown fashion (i.e., the \emph{sparsity pattern} is unknown to the observer). A prototypical application is GWAS (\emph{genome-wide association studies}), where millions of genetic factors are examined for their potential influence on phenotypic traits. Although the number of tested genomic locations sometimes exceeds $10^5$ or even $10^6$, it is often believed that only a small set of genetic locations have tangible influences on the outcome of the disease or the trait of interest. This is well modeled by the stylized assumption of signal sparsity. Depending on pursued criteria the problem is termed in the literature as either \emph{variables selection}, (also termed as \emph{recovery of the sparsity pattern}), or \emph{multiple testing problem}. Commonly, the problems of variable selection and multiple testing are studied separately in the literature, although there are conceptual similarities and connections between them. In fact, a variable selection method determines the corresponding multiple testing procedure and vice versa, the difference lies merely in different criteria for inference procedures. \subsection{The observations model and the context} Suppose we observe a high-dimensional ($\mathbb{R}^n$-valued) vector $X=(X_1,\ldots,X_n) \sim \mathbb{P}_\theta$ such that $(X-\theta)/\sigma$ satisfies Condition \eqref{cond_nonnormal} (for some $\sigma>0$), where $\theta=(\theta_1,\ldots, \theta_n) \in \mathbb{R}^n$ is an unknown high-dimensional \emph{signal}. Actually, $ \mathbb{P}_\theta= \mathbb{P}^{n}_{\theta,\sigma}$, but we will omit the dependence on $n$ and $\sigma$ in the sequel. In other words, we observe \begin{align} \label{model} X_i=\theta_i+ \sigma \xi_i, \quad \quad i \in [n]\triangleq\{1,\ldots,n\}, \end{align} where $\xi=(\xi_1,\ldots, \xi_n)\triangleq (X-\theta)/\sigma$ is the ``noise'' vector and $\sigma>0$ is the known ``noise intensity''. We emphasize that we pursue a general \emph{distribution-free} setting: the distribution of $\xi$ is arbitrary, satisfying only Condition \eqref{cond_nonnormal} below. The purpose of introducing $\sigma$ is that certain extra information can be converted into a smaller noise intensity $\sigma$, a ``more informative'' model. For example, suppose we originally observed $X_{ij}$ with $\operatorname{E}_\theta X_{ij}=\theta_i$ and $\operatorname{Var}_\theta(X_{ij})=1$, such that $(X_{ij},j\in [m])$ are independent for each $i\in[n]$, for some $m=m_n \to \infty$ as $n\to\infty$. By taking $X_i=\frac{1}{m_n}\sum_{j=1}^{m_n} X_{ij}$, we obtain the model \eqref{model} with $\sigma^2=\frac{1}{m_n} \to 0$ as $n\to \infty$. We are interested in non-asymptotic results, which imply asymptotic ones if needed. Possible asymptotic regime is high-dimensional setup $n \to \infty$, the leading case in the literature for high dimensional models. Another possible asymptotics is $\sigma\to 0$, accompanying $n\to \infty$ or on its own. The general goal is (for now, loosely formulated) to select the \emph{active} (or \emph{significant}) coordinates $I_*(\theta)\subseteq[n]$ of the signal $\theta$, based on the data $X$. In the sequel, we will need to properly formalize the notion of \emph{active set} $I_*(\theta)$. In particular, in this paper we let $I_*(\theta)$ be not necessarily the support of $\theta$, $S(\theta)=\{i\in[n]: \theta_i \not= 0\}$. The main motivation for this is that we may want to qualify some relatively small (but non-zero) coordinates of $\theta$ as ``inactive'', with the threshold depending on the number of such coordinates. On the other hand, if the non-zero coordinates $\theta_i$ are allowed to be arbitrarily close (relative to the noise intensity $\sigma$) to zero, then it is clearly impossible to recover the signal support. So, even when relaxing the notion of active set, there are still principal limitations as no method should be able to distinguish between $|\theta_i|\asymp \sigma$ and $\theta_i=0$. These limitations will be quantified by establishing an appropriate lower bound. To make the problem feasible, one needs either to impose some kind of \emph{strong signal condition} on $\theta$ (typically done in the literature on variable selection), or somehow adjust (relax) the criterion that measures the procedure quality (typically done in the literature on the multiple testing). For example, certain procedures can control more tolerant criteria like FDR or NDR without any condition, but, as we show below, their sum can be controlled again only under some strong signal condition. \subsection{Variable selection and multiple testing in the literature} The standard, most studied situation in the literature is the particular case of \eqref{model}: \begin{align} \label{standard_model} X_i \overset{\rm ind}{\sim} \mathrm{N}(\theta_i,\sigma^2), \;\; i\in[n]; \quad I_*(\theta) = S(\theta) \triangleq\{i\in[n]: \theta_i \not=0\}, \end{align} where the support $S(\theta)$ plays the role of active coordinates of $\theta$, and $\theta$ is assumed to be \emph{sparse} in the sense that $\theta\in \ell_0[s]=\{\theta\in\mathbb{R}^n: |S(\theta)| \le s\}$ with $s=s_n=o(n)$ as $n\to \infty$. Considering the situation \eqref{standard_model} for now, there is a huge literature on the active set recovery problem studied from various perspectives. Let $\hat{I}= \hat{I}(X)\subseteq[n]$ be a data dependent selector of the active set, $\eta_I= (\eta_i(I),i\in[n])=\big(1\{i\in I\}, i\in[n]\big)$ be the binary representation of $I\subseteq [n]$. The historically first approach is via the probability of wrong recovery $\mathbb{P}_\theta(\hat{I} \not = S(\theta))$. The Hamming distance between $I_1$ and $I_2$ is $|\eta_{I_1} -\eta_{I_2}|\triangleq\sum_{i\in[n]} |\eta_i(I_1)-\eta_i(I_2)| =|I_1\backslash I_2|+|I_2\backslash I_1|$. One common measure of the quality of $\hat{I}$ is the expected Hamming loss (which we will call \emph{Hamming risk}) \vspace{2mm} \[ R_H(\hat{I},I_*)=\operatorname{E}_\theta |\eta_{\hat{I}}- \eta_{I_*}| =\operatorname{E}_\theta |\hat{I} \backslash I_*|+ \mathrm{E}_\theta |I_*\backslash \hat{I}| =R_{FP}(\hat{I},I_*)+R_{FN}(\hat{I},I_*), \] where $R_{FP}$ and $R_{FN}$ are the \emph{false positives} and \emph{false negatives} terms (in a way, Type I and Type II errors), respectively. Note that $\mathrm{P}_\theta \big(\hat{I} \not = I_*\big)= \mathrm{P}_\theta\big(|\eta_{\hat{I}}- \eta_{I_*}| \ge 1\big)\le \mathrm{E}_\theta |\eta_{\hat{I}}-\eta_{I_*}|= R_H(\hat{I},I_*)$, which means that the approach based on the Hamming risk provides stronger results. As is already well understood in many papers in related situations, in order to be able to recover $S(\theta)$, the non-zero signal $\theta_{S(\theta)}=(\theta_i, i\in S(\theta))$ has to satisfy some sort of \emph{strong signal condition}. If $\theta \in \ell_0[s]$ with polynomial sparsity parametrization $s = n^\beta$, $\beta\in (0,1)$ in the normal model \eqref{standard_model}, \cite{Donoho&Jin:2004} and \cite{Arias-Castro&Chen:2017} (see further references therein) express this condition in the form of the right scaling for the active coordinates $\theta_i^2 \gtrsim \sigma^2 \log(n)$, $i\in S(\theta)$, for the signal to be detectable. Actually, \cite{Donoho&Jin:2004} studied an idealized chi-squared model $Y_i\overset{\rm ind}{\sim} \chi^2_\nu(\lambda_i)$, $i\in[n]$, where $ \chi^2_\nu(\lambda_i)$ is a chi-square distributed random variable with $\nu$ degrees of freedom and non-centrality parameter $\lambda_i$. Squaring the both sides of \eqref{standard_model}, we arrive at the above chi-squared model with non-centrality parameters $\lambda_i = \theta_i^2$ and degree-of-freedom parameter $\nu=1$. Polynomial sparsity $s = n^\beta$ has been well investigated, especially in the normal model \eqref{standard_model}, with active coordinates $\theta_i^2 \gtrsim \sigma^2 \log(n)$, $i\in S(\theta)$. The situation with arbitrary signal sparsity $s$ is more complex: the right scaling for the active coordinates of $\theta\in\ell_0[s]$ becomes essentially (assuming $s=s_n \to \infty$ as $n \to \infty$) $\theta_i^2 \gtrsim \sigma^2 \log(n/s)$, $i\in S(\theta)$. A recent important reference on this topic is \cite{Butucea&Ndaoud&Stepanova&Tsybakov:2018}, see also \cite{Ingster&Stepanova:2014}, \cite{Butucea&Stepanova:2017}. More on this is in Section \ref{sec_discussion}. Inference on the active set can also be looked at from the multiple testing perspective. In classical multiple testing problem for the situation \eqref{standard_model}, one considers the following sequence of tests: \vspace{2mm} \[ H_{0,i}: \theta_i=0 \quad \text{versus} \quad H_{1,i}: \theta_i\neq 0, \quad i\in[n]. \] To connect to variable selection, notice that in multiple testing language, a variable selector $\hat{I}$ gives the multiple testing procedure which rejects the corresponding null hypothesis $H_{0,i}$, $i\in\hat{I}$, whereas $I_*(\theta)$ encodes which null hypothesis do not hold. Typically, in multiple testing framework, one is interested in controlling (up to some prescribed level) of a type I error. The most popular one is the so called \emph{False Discovery Rate} (FDR): $\text{FDR}(\hat{I}, I_*)=\operatorname{E}_\theta\frac{|\hat{I}\backslash I_*|}{|\hat{I}|}$ (with the convention $0/0=0$), the averaged proportion of errors among the selected variables; in multiple testing terminology, the expected ratio of incorrect rejections to total rejections. This criterion, introduced in \cite{Benjamini&Hochberg:1995}, has become very popular because it is ``tolerant'' and ``scalable'' in the sense that the more rejections are possible, the more false positives are allowed. It also delivers an adaptive signal estimator, see \cite{Abramovich&Benjamini&Donoho&Johnstone:2006}. Besides FDR, we will study other known multiple testing criteria: \emph{Non-Discovery Rate} (NDR), \emph{k-Family-wise Error Rate} (k-FWER) introduced by \cite{Lehmann&Romano:2005}, \emph{False Non-Discovery Rate} (FNR) introduced by \cite{Genovese&Wasserman:2002} and \emph{False Positive Rate} (FPR). The FDR, k-FWER and FPR have the flavor of type I error as they deal with the control of false positives, NDP and FNR have the flavor of type II error as they deal with the control of false negatives. A weak optimality of our results in relation to \cite{Butucea&Ndaoud&Stepanova&Tsybakov:2018} is discussed in Section \ref{sec_discussion}. In the multiple testing setting, most of theoretical studies rely on the fact that the null distribution is exactly known. In practice, it is often unreasonable to assume this, instead the null distribution is commonly (e.g., in genomics) implicitly defined as the ”background noise” of the measurements, and is adjusted via some pre-processing steps. The issue of finding an appropriate null distribution has been popularized by a series of papers by Efron, (see \cite{Efron:2008}-\cite{Efron:2009} and further references therein), where the concept of \emph{empirical null distribution} was introduced. A recent reference on this topic is \cite{Roquaine&Verzelen:2020}, see also further references therein. Our robust setting actually aligns well with the fact that the null hypothesis distribution is unknown, in fact, we avoid the problem of estimating the null distribution and obtain results that are robust over a certain (rather general) family of null distributions. \subsection{Multiple testing risk, strong signal condition again} In multiple testing setting, controlling type I error only is clearly not enough to characterize the quality of the procedures. For example, taking $\hat{I}=\varnothing$ gives the perfect FDR control: $\text{FDR}(\varnothing,I_*)=0$, but this is of course an unreasonable procedure. One needs to control also some type II error, for example, the so called \emph{Non-Discovery Rate} (NDR) $\text{NDR}(\hat{I},I_*)= \operatorname{E}_\theta\frac{|I_*\backslash \hat{I}|}{|I_*|}$ (or, the \emph{false Non-Discovery Rate} (FNR)). Again, if considered as the only criterion, the NDR can be easily controlled simply by taking another unreasonable procedure $\hat{I}=[n]$, yielding $\text{NDR}([n],I_*)=0$. Thus, it is relevant to control these errors together, see \cite{Arias-Castro&Chen:2017}, \cite{Rabinovich&Ramdas&Jordan&Wainwright:2017}, \cite{Salomond:2017}, \cite{Castillo&Roquain:2018} and further references in these papers. For example, a criterion to control is the \emph{multiple testing risk} $\text{MTR}(\hat{I},I_*)= \text{FDR}(\hat{I},I_*)+ \text{NDR}(\hat{I},I_*)$. Other choices of MTR are possible, as long as it is a combination of type I and type II errors. Apart from FDR+NDR, these are FDR+FNR, FPR+NDR and FPR+FNR. Relating the MTR to the Hamming risk $R_H$, notice that, the both MTR and $R_H$, although being different, always combine some sort of Types I and II errors, in essence controlling the \emph{false positives} and \emph{false negatives} simultaneously. Clearly, the MTR is a more mild criterion as it is always a proportion: $\text{MTR} \ll R_H$. It is desirable that $\text{MTR}$ is as small as possible, e.g., converging to zero as $n\to \infty$. However, as is shown in related settings in \cite{Ingster&Stepanova:2014}, \cite{Arias-Castro&Chen:2017}, \cite{Rabinovich&Ramdas&Jordan&Wainwright:2017}, \cite{Salomond:2017}, \cite{Butucea&Ndaoud&Stepanova&Tsybakov:2018}, \cite{Castillo&Roquain:2018}, this is in general impossible, which is not surprising because the same kind of principal limitation occurs for the Hamming risk in the case of variable selection. Again some sort of \emph{strong signal condition} is unavoidable. The Hamming risk $R_H$ is a more severe quality measure than MTR, so its convergence to zero should occur under a more severe strong/sparse signal condition. In some papers in related settings this difference is referred to as \emph{exact} and \emph{approximate} recovery of the active set. Yet another type of recovery, the so called \emph{almost full recovery} is studied in \cite{Butucea&Ndaoud&Stepanova&Tsybakov:2018}, this is the convergence of $R_H/|I_*|$ to zero. Below we introduce all these notions more precisely. \subsection{The scope} \label{sec_scope} In this paper, we generalize the standard normal setting \eqref{standard_model} to a more general setting \eqref{model} in that we pursue the \emph{robust} inference in the sense that the distribution of the error vector $\xi$ is unknown, but assumed to satisfy only certain condition, Condition \eqref{cond_nonnormal} below. In particular, the $\xi_i$'s can be non-normal, not identically distributed, of non-zero mean, and even dependent; their distribution may depend on $\theta$. Next, we generalize the notion of active set $I_*(\theta)$ that is now not necessarily the sparsity class $\ell_0(s)$ and not necessarily with all large non-zero coordinates. We propose to express strong signal conditions as a scale of classes $\{\Theta(K), K>0\}$ for the signal $\theta$, for the both problems simultaneously, variable selection and multiple testing problems. For the problem of determining the active set to be well defined, the parameter $\theta$ has to possess a \emph{distinct} set $I_*(\theta)$ of active coordinates, which is ensured by the condition $\theta\in\Theta(K)$ for some (sufficiently large) $K>0$. The sparsity is expressed by $|I_*(\theta)|$ and the strong signal condition by the fact that $\theta \in \Theta(K)$ for sufficiently large $K$ (depending on the constants from Condition \eqref{cond_nonnormal}). Varying the ``goodness'' of $\theta$ (combination \emph{sparsity}/\emph{strong signal}) exposes the so called \emph{phase transition} effect, separating the impossibility and possibility to recover the active set, shortly discussed in Section \ref{subsec_ phase_transition}. Finally, in this paper we address the new problem of \emph{uncertainty quantification} (UQ) for the active set $\eta_*=\eta_*(\theta)=\eta(I_*(\theta))$, this is to be distinguished from the uncertainty quantification for the parameter $\theta$. For the Hamming loss $|\cdot|$ on $\{0,1\}^n$, a confidence ball is $B(\hat{\eta},\hat{r})=\{\eta \in \{0,1\}^n: |\hat{\eta}-\eta| \le \hat{r}\}$, where the center $\hat{\eta}=\hat{\eta}(X):\mathbb{R}^n \mapsto \{0,1\}^n$ and radius $\hat{r}=\hat{r}(X): \mathbb{R}^n \mapsto \mathbb{R}_+ =[0,+\infty]$ are measurable functions of the data $X$. The goal is to construct such a confidence ball $B(\hat{\eta},C\hat{r})$ that for any $\alpha_1,\alpha_2\in(0,1]$ and some function $r(\eta_*(\theta))$, $r:\mathbb{R}^n\rightarrow \mathbb{R}_+$, there exist $C, c > 0$ such that \begin{align} \label{defconfball} \sup_{\theta\in\Theta_{\rm cov}}\mathbb{P}_\theta\big(\eta_*(\theta)\notin B(\hat{\eta},C\hat{r})\big)\le\alpha_1, \quad \sup_{\theta\in\Theta_{\rm size}}\mathbb{P}_\theta\big(\hat{r}\ge c r(\eta_*(\theta))\big)\le\alpha_2, \end{align} for some $\Theta_{\rm cov}, \Theta_{\rm size} \subseteq \mathbb{R}^n$. The function $r(\eta_*(\theta))$, called the \emph{radial rate}, is a benchmark for the effective radius of the confidence ball $B(\hat{\eta},C\hat{r})$. The first expression in \eqref{defconfball} is called \emph{coverage relation} and the second \emph{size relation}. To the best of our knowledge, there are no results on uncertainty quantification with the Hamming loss \eqref{defconfball} for the active set $\eta_*(\theta)$. It is desirable to find the smallest $r(\eta_*(\theta))$, the biggest $\Theta_{\rm cov}$ and $\Theta_{\rm size}$ such that \eqref{defconfball} holds and $r(\eta_*(\theta))\asymp R(\Theta_{\rm size})$, where $R(\Theta_{\rm size})$ is the optimal rate in estimation problem for $\eta_*(\theta)$. We derive some UQ results for the proposed selector $\hat{I}$. Typically, the so called \emph{deceptiveness} issue is pertinent to the UQ problem, meaning that the confidence set of the optimal size and high coverage can only be constructed for non-deceptive parameters (in particular, $\Theta_{\rm cov}$ cannot be the whole set $\mathbb{R}^n$). Being non-deceptive is expressed by imposing some condition on the parameter; for example, the EBR (excessive bias restriction) condition $\Theta_{\rm cov}=\Theta_{\rm ebr}\subset \mathbb{R}^n$, see \cite{Belitser:2017}--\cite{Belitser&Nurushev:2020}. Interestingly, there is no deceptiveness issue as such for our UQ problem. An intuition behind this is as follows: the problem of active set recovery is more difficult than the UQ-problem in a sense that solving the former problem implies solving the latter. Then the condition $\theta \in \Theta(K)$ for the parameter to have distinct active coordinates implies also that the parameter is non-deceptive. In our case, we will have $\Theta_{\rm cov}= \Theta_{\rm size} = \Theta(K)$ for some $K >0$. \subsection{Organization of the rest of the paper} In Section \ref{section_preliminaries} we introduce some notation, the generalized notion of active coordinates, and describe the criteria and procedures for variable selection and multiple testing. In Section \ref{main_results} we present the main results of the paper. In Section \ref{sec_discussion} we shortly discuss a weak optimality of our results and a phase transition effect. The proofs of the theorems are collected in Section \ref{proofs_theorems}, which, despite generality of the setting and results, we could keep completely self-contained and relatively compact. \section{Preliminaries} \label{section_preliminaries} \subsection{Notation} Denote the probability measure of $X$ from the model (\ref{model}) by $\mathbb{P}_\theta$, and by $\operatorname{E}_\theta$ the corresponding expectation. For the notational simplicity, we skip the dependence on $\sigma$ and $n$ of these quantities and many others. Denote by $1\{s\in S\}=1_S(s)$ the indicator function of the set $S$, by $|S|$ the cardinality of the set $S$, the difference of sets $S\backslash S_0 =\{s \in S:\, s\not\in S_0\}$. Let $[k]=\{1,\ldots,k\}$ and $[k]_0=\{0\} \cup [k]$ for $k\in\mathbb{N}=\{1,2,\ldots\}$. For $I\subseteq [n]$ define $I^c=[n] \backslash I$. If random quantities appear in a relation, this relation should be understood in $\mathbb{P}_{\theta}$-almost sure sense. For two nonnegative sequences $(a_l)$ and $(b_l)$, $a_l \lesssim b_l$ means $a_l \le cb_l$ for all $l$ (its range should be clear from the context) with some absolute $c>0$, and $a_l \asymp b_l$ means that $a_l \lesssim b_l$ and $b_l \lesssim a_l$. The symbol $\triangleq$ will refer to equality by definition, $\Phi(x) = \mathbb{P}(Z \le x)$ for $Z \sim \mathrm{N}(0,1)$. Throughout we assume the conventions: $|\varnothing|=0$, $\sum_{I\in\varnothing}a_I=0$ for any $a_I\in\mathbb{R}$ and $0\log(a/0)=0$ (hence $(a/0)^0=1$) for any $a>0$, in all the definitions whenever $0/0$ occurs we set by default $0/0 =0$. Introduce the function $\ell(x)=\ell_q(x)\triangleq x\log(qn/x)$, $x,q> 0$, increasing in $x\in [0,n]$ for all $q\ge e$. Finally, introduce the notation of ordered $\theta_{1}^2,\ldots, \theta_{n}^2$: $\theta_{[1]}^2\ge\theta_{[2]}^2\ge\ldots \ge \theta_{[n]}^2$, define additionally $\theta_{[0]}^2=\infty$ and $\theta_{[n+1]}^2=0$. Recall the binary representation of an $I\subseteq[n]$: \[ \eta_I=(\eta_i(I), i\in[n])=(\mathrm{1}\{i\in I\}, i\in[n]) \in \{0,1\}^n. \] Let $\check{\eta}=\eta_{\check{I}}$ be some data dependent selector (for some measurable $\check{I}=\check{I}(X)$) which is supposed to estimate \[ \eta_*=\eta_*(\theta)=\eta_{I_*}=(1\{i\in I_*\}, i\in[n]), \] for some ``true'' \emph{active set} $I_*=I_*(\theta)$. The Hamming distance between $\check{\eta}$ and $\eta_*$ is determined by \ the number of positions at which $\check{\eta}$ and $\eta_*$ differ: \begin{align} \label{def_hamming} |\check{\eta}-\eta_*|= \sum_{i=1}^n |\check{\eta}_i-\eta_i(I_*)| =\sum_{i=1}^n \mathrm{1}\{\check{\eta}_i\neq\eta_i(I_*)\} =|\check{I}\backslash I_*|+|I_*\backslash\check{I}|. \end{align} Now we give some definitions for the multiple testing framework. For a variable selector $\check{I}=\check{I}(X)\subseteq [n]$ (which is seen now as multiple testing procedure) and the active set $I_*$ (which is seen now as the set of the true null hypothesis), introduce the quantities characterizing the quality of the multiple testing procedure $\check{I}$. The convention $0/0=0$ is used in the following definitions. The \emph{false discovery proportion} (FDP) and \emph{false discovery rate} (FDR) are \begin{align*} \text{FDP}(\check{I})=\text{FDP}(\check{I},I_*) =\frac{|\check{I}\backslash I_*|}{|\check{I}|},\quad \text{FDR}(\check{I})=\text{FDR}(\check{I},I_*)=\operatorname{E}_\theta\text{FDP}(\check{I}). \end{align*} The \emph{false positive proportion} and \emph{false positive rate} are \begin{align*} \text{FPP}(\check{I})=\text{FPP}(\check{I},I_*) =\frac{|\check{I}\backslash I_*|}{n-|I_*|},\quad \text{FPR}(\check{I})=\text{FPR}(\check{I},I_*)=\operatorname{E}_\theta\text{FPP}(\check{I}). \end{align*} The \emph{non-discovery proportion} and \emph{non-discovery rate} are \begin{align*} \text{NDP}(\check{I})=\text{NDP}(\check{I},I_*) =\frac{|I_*\backslash \check{I}|}{|I_*|},\quad \text{NDR}(\check{I})=\text{NDR}(\check{I},I_*)=\operatorname{E}_\theta\text{NDP}(\check{I}). \end{align*} The \emph{false non-discovery proportion} and \emph{false non-discovery rate} are \begin{align*} \text{FNP}(\check{I})=\text{FNP}(\check{I},I_*) =\frac{|I_*\backslash \check{I}|}{n-|\check{I}|},\quad \text{FNR}(\check{I})=\text{FNR}(\check{I},I_*)=\operatorname{E}_\theta\text{FNP}(\check{I}). \end{align*} Introduce the \emph{multiple testing risks} (MTR) as all possible sums of the probabilities of type I and type II errors. The first $\mathrm{MTR}$ is the sum of the FDR and the NDR: \begin{align*} \text{MTR}_1(\check{I})=\text{MTR}_1(\check{I},I_*)=\text{FDR}(\check{I},I_*) +\text{NDR}(\check{I},I_*). \end{align*} The other MTR's are defined similarly: they are always the sums of two rates (out of 4) whose numerators must be the quantities $|\check{I}\backslash I_*|$ and $|I_*\backslash \check{I}|$. Apart from $\text{MTR}_1$, these are $\text{MTR}_2 =\text{FDR}+\text{FNR}$, $\text{MTR}_3=\text{FPR}+\text{NDR}$ and $\text{MTR}_4=\text{FPR}+\text{FNR}$. Finally introduce the \emph{k-family-wise error} (\text{k-FWER}) and \emph{k-family-wise non-discovery} (\text{k-FWNR}) rates: \begin{align*} \text{k-FWER}(\check{I},I_*)=\mathbb{P}_\theta(|\check{I}\backslash I_*|\ge k), \quad \text{k-FWNR}(\check{I},I_*)=\mathbb{P}_\theta(|I_*\backslash \check{I}|\ge k). \end{align*} In multiple testing settings, the k-FWER is the probability of rejecting at least $k$ true null hypotheses. The case $k=1$ reduces to the control of the usual FWER. \subsection{Criterion for selecting active variables} Consider for the moment the estimation problem of $\theta$ when we use the projection estimators $\hat{\theta}(I)= (X_i 1\{i\in I\}, i\in[n])$, $I \subseteq[n]$. The quadratic loss of $\hat{\theta}(I)$ gives a theoretical criterion \[ \mathcal{C}^{\rm th} _1(I)=\|\hat{\theta}(I) -\theta\|^2=\sum_{i\in I^c} \theta_i^2 + \sigma^2\sum_{i\in I}\xi_i^2. \] The best choice of $I$ would be the one minimizing $\mathcal{C}^{\rm th} _1(I)$. However, neither $\theta$ nor $\xi$ are observed. Substituting unbiased estimator $X_i^2 -\sigma^2$ instead of $\theta_i^2$, $i\in I^c$, leads to the quantity \[ \mathcal{C}^{\rm th}_2(I)=\sum_{i\in I^c} X_i^2 +\sigma^2 |I| + \sigma^2\sum_{i\in I}\xi_i^2 =\|X-\hat{\theta}(I)\|^2+\sigma^2 |I| + \sigma^2\sum_{i\in I}\xi_i^2 \] to minimize with respect to $I\subseteq [n]$, however still not usable in view of the term $\sigma^2\sum_{i\in I}\xi_i^2$. If instead of $ \sigma^2\sum_{i\in I}\xi_i^2$, we use its expectation $\sigma^2 |I|$, we arrive essentially at Mallows's $C_p$-criterion (and AIC in the normal case) \[ \mathcal{C}_{\rm Mallows}(I)=\|X-\hat{\theta}(I)\|^2+2\sigma^2 |I|. \] However, it is well known that the $C_p$-criterion leads to overfitting. An intuitive explanation is that using the expectation $\sigma^2 |I|$ as penalty in $\mathcal{C}_{\rm Mallows}(I)$ is too optimistic to control oscillations of its stochastic counterpart $\sigma^2\sum_{i\in I}\xi_i^2$. The next idea is to use some quantity $p(I)$ (instead of $|I|$) that majorizes $\sum_{i\in I}\xi_i^2$ in the more strict sense that for some $K, H_0,\alpha>0$ and all $M\ge 0$ \begin{align} \label{main_ineq} \mathbb{P}_\theta\Big(\sup_{I\subseteq[n]}\big(\sum_{i\in I}\xi_i^2- Kp(I)\big) \ge M\Big) \le H_0 e^{-\alpha M}. \end{align} \begin{remark} This idea is borrowed from the \emph{risk hull minimization method} developed by Golubev in several papers; see \cite{Cavalier&Golubev:2006} and references therein. \end{remark} Thus, in view \eqref{main_ineq}, using $K\sigma^2 p(I)$ instead of $\sigma^2\sum_{i\in I}\xi_i^2$, we obtain a more adequate criterion $\mathcal{C}_3(I)=\|X-\hat{\theta}(I)\|^2+ \sigma^2 |I|+K\sigma^2 p(I)$. Since typically $|I| \lesssim p(I)$, the second term can be absorbed into the third, and we finally derive the criterion \begin{align} \label{criterion_C} \mathcal{C}(I)=\|X-\hat{\theta}(I)\|^2+K\sigma^2 p(I), \end{align} for sufficiently large constant $K>0$. It remains to determine $p(I)$, preferably smallest possible, for which \eqref{main_ineq} holds. First we state an assumption. {\sc Assumption (A1).} For some $p_0(I)$ such that $p_0(I) \le C_\xi |I|$, for some $C_\xi>0$, $H_\xi,\alpha_\xi>0$ and any $M\ge 0$, \begin{align} \label{cond_nonnormal} \tag{A1} \sup_{\theta\in\mathbb{R}^n}\mathbb{P}_\theta\Big(\sum_{i\in I} \xi_i^2 \ge p_0(I) +M\Big) \le H_\xi e^{-\alpha_\xi M}, \quad I\subseteq [n]. \end{align} If the distribution of $\xi$ does not depend on $\theta$ (in some important specific cases), there is no supremum over $\theta\in\mathbb{R}^n$. For independent $\xi_i$'s, \eqref{cond_nonnormal} holds with $p_0(I) \asymp |I|$, so that indeed $p_0(I) \le C_\xi |I|$, $I\subseteq[n]$, for some $C_\xi>0$. \begin{remark} \label{rem_only_cond} For fixed constants $C_\xi, H_\xi, \alpha_\xi$, one can think of \eqref{cond_nonnormal} with $p_0(I)=C_\xi |I|$ as description of a class of possible measures, in the sequel denoted by $\mathcal{P}_A$, see Remark \ref{rem_uniformity} below. \end{remark} \begin{remark} Condition \eqref{cond_nonnormal} is of course satisfied for independent normals $\xi_i \overset{\rm ind}{\sim} \mathrm{N}(0,1)$ and for bounded (arbitrarily dependent) $\xi_i$'s. Recall that the $\xi_i$'s are not necessarily of zero mean, but for normals Condition \eqref{cond_nonnormal} is the weakest if $\mathrm{E}_\theta \xi_i =0$. In a way, Condition \eqref{cond_nonnormal} prevents too much dependence, but it still allows some interesting cases of dependent $\xi _{i}$'s. For example, one can show (in the same way as in \cite{Belitser&Nurushev:2020}) that this conditions is fulfilled for $\xi _{i}$'s that follow an autoregressive model AR(1) with normal white noise. \end{remark} Let $\eta= \sup_{I\subseteq[n]}\big(\sum_{i\in I}\xi_i^2- C_\xi |I| - \alpha_\xi^{-1}\big[|I|+ \log \tbinom{n}{|I|}\big]\big)$. By \eqref{cond_nonnormal} and the union bound, it is not difficult to derive \begin{align} \mathbb{P}_\theta(\eta \ge M) &\le \sum_{I\subseteq[n]} \mathbb{P}_\theta \Big(\sum_{i\in I} \xi_i^2 \ge C_\xi |I| +\alpha_\xi^{-1}\big[|I|+\log \tbinom{n}{|I|}\big]+ M\Big) \notag\\ \label{relation_eta} &\le H_\xi e^{-\alpha_\xi M} \sum_{I\subseteq[n]} e^{-|I|} \tbinom{n}{|I|}^{-1} = H_\xi e^{-\alpha_\xi M} \sum_{k=0}^n e^{-k} \le H_0 e^{-\alpha_\xi M}. \end{align} where $H_0=H_\xi/(1-e^{-1})$. As $\tbinom{n}{k} \le (\frac{en}{k})^k$, $k\in [n]$, we have \[ C_\xi |I| +\alpha_\xi^{-1}\big[|I|+\log \tbinom{n}{|I|}\big] \le (C_\xi +\alpha_\xi^{-1}) |I|+ \alpha_\xi^{-1} |I| \log \tfrac{en}{|I|} =\alpha_\xi^{-1} |I| \log \big( \tfrac{q_\xi n}{|I|}\big), \] where $q_\xi = e^{C_\xi \alpha_\xi+2}$. The last two displays imply the following relation (that we will need later): for appropriate $M_\xi>0$ and $q=e^2$ \begin{align} \label{ineq_for_later} \sup_{\theta\in\mathbb{R}^n} \sum_{I\subseteq[n]} \mathbb{P}_\theta \Big(\sum_{i\in I} \xi_i^2 \ge M_\xi |I| \log\big(\tfrac{q n}{|I|}\big) + M\Big) &\le H_0 e^{-\alpha_\xi M}. \end{align} Although we will use the relation \eqref{ineq_for_later} only for $q=e^2$, it is also implied by \eqref{cond_nonnormal} for any $q>1$ with appropriately chosen $M_\xi=M_\xi(q)$, certainly if $M_\xi(q) \ge \alpha_\xi^{-1}\big(\tfrac{\log q_\xi}{\log q}+1\big)$. In view of \eqref{relation_eta} with \eqref{ineq_for_later}, we see that under \eqref{cond_nonnormal}, the criterion \eqref{main_ineq} is satisfied with $p(I)=\ell_q(|I|)=|I| \log\big(\tfrac{q n}{|I|}\big)$. According to \eqref{criterion_C}, this motivates the definition of the so called \emph{preselector} \begin{align} \label{I_MAP} \tilde{I}=\tilde{I}(K)=\arg\min_{I\subseteq[n]}\Big\{\sum_{i \in I^c}X_i^2 +K \sigma^2 p(I)\Big\}, \end{align} where $p(I)=p_q(I)\triangleq\ell_q(|I|)=|I| \log\big(\tfrac{q n}{|I|}\big)$, for some $K>0$ and $q=e^2$. If $\tilde{I}$ is not unique, take, say, the one with the biggest sum $\sum_{i\in\tilde{I}}(n-i)$. \begin{remark} Actually, an interesting interplay between constants $K$ and $q$ is possible, making certain constant in the proofs sharper. But we fix the second constant $q=e^2$ in \eqref{I_MAP} for the sake of mathematical succinctness. \end{remark} Notice that if $X_i^2 > K \sigma^2\log \big(\tfrac{q n}{|\tilde{I}|+1}\big)$ (with $q=e^2$), then $i \in \tilde{I}$. On the other hand, if $i \in \tilde{I}$, then \begin{align*} X_i^2 &\ge K\sigma^2\big[\log (\tfrac{q n}{|\tilde{I}|})-(|\tilde{I}|-1) \log\big(1+\tfrac{1}{|\tilde{I}|-1}\big)\big]\\ &\ge K\sigma^2\big[\log(\tfrac{q n}{|\tilde{I}|})-\tfrac{|\tilde{I}|-1}{|\tilde{I}|}] \ge K\sigma^2\big[\log(\tfrac{q n}{|\tilde{I}|})-1] = K\sigma^2\log(\tfrac{en}{|\tilde{I}|}). \end{align*} Next, define the \emph{selector} $\hat{\eta}=(\hat{\eta}_i, i\in[n])$ (and respectively $\hat{I}$) of significant coordinates as \begin{align} \label{threshold} \hat{\eta}_i=\hat{\eta}_i(K)=\mathrm{1}\big\{X_i^2\ge K \sigma^2\log \big(\tfrac{q n}{|\tilde{I}|}\big)\big\}, \;\; \hat{I}=\hat{I}(K)=\{i\in[n]: \hat{\eta}_i=1\}. \end{align} Notice that the selector is always a subset of the preselector: $\hat{I}(K)\subseteq\tilde{I}(K)$. \begin{remark} We have already mentioned that this procedure can be related to the \emph{risk hull minimization} (RHM) method developed by Golubev. In principle, (almost) the same procedures can be derived as a result of the empirical Bayes approach with appropriately chosen prior, or as a result of the penalization strategy with appropriately chosen penalty, see \cite{Belitser&Nurushev:2020}. It is interesting that several methodologies deliver akin procedures. \end{remark} \subsection{The notion of active set} \label{subsec_conditions} Suppose we consider an arbitrary $\theta$ and would still like somehow divide all the entries of $\theta$ into the groups of \emph{active} and \emph{inactive} coordinates. Clearly, as active group, the traditional support set $S(\theta)=\{i\in[n]: \theta_i \not=0\}$ is not sensible for arbitrary $\theta$, because nonzero but smallish coordinates $\theta_i$ should possibly be assigned to the inactive group. For an arbitrary $\theta \in \mathbb{R}^n$, define the {\it active set} $I_*(A,\theta)=I_*(A,\theta,\sigma^2)$ as follows: with $q=e^2$, \begin{align} \label{oracle} I_*(A,\theta)=\arg\!\min_{I\subseteq[n]}r^2(I,\theta), \;\; \text{where} \;\; r^2(I,\theta)\triangleq\sum_{i\in I^c} \theta_i^2+A\sigma^2 |I| \log(\tfrac{qn}{|I|}) \end{align} and $I_*(A,\theta)$ is with the smallest sum $\sum_{i \in I_*(A,\theta)} i $ if the minimum is not unique. By the definition \eqref{oracle}, \[ r^2(\theta)\triangleq r^2(I_*(A,\theta),\theta)\le r^2(I,\theta) \quad \text{for any} \quad I\subseteq[n]. \] This implies that \begin{align} \label{property_I} \text{if} \quad \theta_i^2 \ge A\sigma^2\log \big(\tfrac{q n}{|I_*|+1}\big), \quad \text{then} \quad i\in I_*\subseteq [n], \end{align} where we denoted for brevity $I_*=I_*(A,\theta)$. Conversely, if $i \in I_*$, then \begin{align} \theta_i^2 &\ge A\sigma^2\big[\log (\tfrac{qn}{|I_*|})-(|I_*|-1)\log\big(1+\tfrac{1}{|I_*|-1}\big)\big] \notag\\ \label{property_Io} &\ge A\sigma^2\big[\log(\tfrac{qn}{|I_*|})-\tfrac{|I_*|-1}{|I_*|}] \ge A\sigma^2\big[\log(\tfrac{qn}{|I_*|})-1] = A\sigma^2\log(\tfrac{en}{|I_*|}). \end{align} We will use the last property later on. Also notice that $I_*$ depends on the product $A\sigma^2$ rather than just on $A$. If we consider the asymptotic regime $\sigma^2\to 0$, it is instructive to fix the product $A\sigma^2$ so that $A\to \infty$, which can be interpreted as if $\theta$ satisfies more and more stringent strong signal condition. \begin{remark} To get an idea what $I_*(A,\theta)$ means, suppose in \eqref{oracle} we had $A\sigma^2|I|\log(qn)$ instead of $A\sigma^2 |I| \log(\tfrac{qn}{|I|})$. Then active coordinates would have been all $i\in[n]$ corresponding to ``large'' $\theta_i^2 \ge A\sigma^2 \log(qn)$. The definition \eqref{oracle} does kind of the same, but the requirement for being active becomes slightly more lenient if there are more ``large'' coordinates. The function $x\log(qn/x)$ is increasing (in fact, for all $q\ge e$) for $x\in[1,n]$ slightly slower than $x\log(qn)$, creating the effect of ``borrowing strength'' via the number of active coordinates: the more such coordinates, the less stringent the property of being active becomes. \end{remark} The family $\mathcal{I}=\mathcal{I}(\theta)=\{I^{\rm vsp}_k(\theta),\, k\in[n]_0\}$, with $I^{\rm vsp}_k(\theta) = \{i\in[n]: \theta^2_i\ge \theta_{[k]}^2\}$, is called \emph{variable selection path} (VSP). It consists of at most $n+1$ embedded sets: \[ \varnothing=I^{\rm vsp}_0(\theta)\subseteq I^{\rm vsp}_1(\theta)\subseteq \ldots \subseteq I^{\rm vsp}_n(\theta)=[n]. \] Clearly, $I_*(A,\theta)=I^{\rm vsp}_{|I_*(A,\theta)|}(\theta)$, $\theta\in\mathbb{R}^n$. The function $g(A)=|I_*(A,\theta)|: \mathbb{R}_+ \mapsto \{0\}\cup\mathbb{N}$ is a non-increasing right continuous step function taking values $|S(\theta)|,\ldots, 0$, as $A$ increases from 0 to infinity. If some of $\theta_{[k]}$ coincide, the corresponding sets $I^{\rm vsp}_k(\theta)$ in the variable selection path $\mathcal{I}$ merge. Accounting for these merges, notice that the true support $S(\theta)$ is the last set in the variable selection path $\mathcal{I}(\theta)$. \begin{remark} \label{rem_properties} We state some further properties of the active set $I_*$ and the variable selection path $\mathcal{I}$. \begin{itemize} \item[(a)] The family $\{I_*(A,\theta), A\ge 0\}$ reproduces the variable selection path $\mathcal{I}$ \[ \{I_*(A,\theta), A\ge 0\}=\mathcal{I}(\theta). \] \item[(b)] For any $0\le A_1\le A_2$ and any $\theta\in\mathbb{R}^n$ , we have \[ \varnothing\subseteq I_*(A_2,\theta)\subseteq I_*(A_1,\theta)\subseteq S(\theta)\subseteq [n]. \] \item[(c)] If for some $I\subseteq[n]$, $\theta_i^2\ge A\sigma^2 \log(qn/|I|)$ for all $i\in I$ and $\theta_i^2\le A\sigma^2\log(q)$ for all $i\in I^c$, then $I_*(A,\theta)=I$. In particular, if $\theta_i^2\ge A\sigma^2 \log(qn/|S(\theta)|)$ for all $i \in S(\theta)$ and some $A>0$, then $I_*(A',\theta)=S(\theta)$ for all $A'\le A$. \end{itemize} \end{remark} \section{Main results} \label{main_results} In this section we present the main results. \subsection{Control of the preselector $\tilde{I}$} First, we establish the results on over-size and under-size control of the preselector $\tilde{I}=\tilde{I}(K)$ defined by \eqref{I_MAP}. Recall that $\ell(x)=\ell_q(x)=x\log(\tfrac{qn}{x})$, $x\ge 0$, $q=e^2$. \begin{theorem} \label{theorem_1} Let $\tilde{I}=\tilde{I}(K)$ be defined by \eqref{I_MAP}, $I_*(A,\theta)$ be defined by \eqref{oracle}, let $H_0$ be from \eqref{ineq_for_later}. Then for any $A_0$ there exist (sufficiently large) $K_0$ and constants $M_0,\alpha_0>0$ (depending on $A_0$) such that for any $M\ge 0$, \begin{align} \tag{i} \label{th1_i} \sup_{\theta\in\mathbb{R}^n}\mathbb{P}_\theta \big(\ell(|\tilde{I}(K_0)|)\ge M_0 \ell(|I_*(A_0,\theta)|) +M\big) \le H_0 e^{-\alpha_0 M}. \end{align} In particular, this implies that there exists $M_1>0$ such that for any $M\ge 0$ \begin{align} \tag{i'} \label{th1_i'} \sup_{\theta\in\mathbb{R}^n} e^{\alpha_0\ell(|I_*(A_0,\theta)|)} \mathbb{P}_{\theta} \big(|\tilde{I}(K_0)|\ge M_1 |I_*(A_0,\theta)|+M \big)\le H_0 e^{-\alpha_0M/2}. \end{align} For any $K_1>0$, $\delta\in[0,1)$, there exist $A_1,\alpha_1,\alpha'_1>0$ (depending on $\delta,K_1$) such that for any $M\ge 0$ \begin{align} \tag{ii} \label{th1_ii} \sup_{\theta\in\mathbb{R}^n} e^{\alpha'_1 \ell(|I_*(A_1,\theta)|)} \mathbb{P}_\theta\big(\ell(|\tilde{I}(K_1)|)\le \delta \ell(|I_*(A_1,\theta)|)-M\big) \le H_0 e^{-\alpha_1 M}. \end{align} In particular, this implies that there exist $A_1,\alpha'_1>0$ such that \begin{align} \tag{ii'} \label{th1_ii'} \sup_{\theta\in\mathbb{R}^n} e^{\alpha'_1 \ell(|I_*(A_1,\theta)|)} \mathbb{P}_\theta\big(|\tilde{I}(K_1)|\le \delta |I_*(A_1,\theta)|\big) \le H_0. \end{align} \end{theorem} \begin{remark} \label{rem_rem8} A couple of remarks are in order. \begin{itemize} \item[(a)] We can obtain another formulation of the property \eqref{th1_i} (and respectively \eqref{th1_i'}): for any sufficiently large $K_0$ (e.g., $K_0 > 2M_\xi$) there exist $A_0>0$ and constants $M_0, \alpha_0>0$ such that for any $M\ge 0$, \eqref{th1_i} holds. \item[(b)] We can also derive another formulation of the property \eqref{th1_ii} (and respectively \eqref{th1_ii'}): for any $A_1>0$ there exist (sufficiently small) $K_1>0$ and $\delta\in[0,1]$ such that for any $M\ge 0$, \eqref{th1_ii} holds. \item[(c)] Similarly to \eqref{th1_i'}, we could establish \eqref{th1_ii'} in the following form: \[ \sup_{\theta\in\mathbb{R}^n} e^{\alpha'_1\ell(|I_*(A_1,\theta)|)} \mathbb{P}_\theta \big(|\tilde{I}(K_1)|\le \delta |I_*(A_1)| -M\big) \le H_0 e^{-\alpha_1 M}. \] \end{itemize} \end{remark} From now on we fix some sufficiently large $K>0$ (such that, according to Remark \ref{rem_rem8}, there exists $A_0$ for which \eqref{th1_i} and \eqref{th1_i'} are fulfilled) and compute the corresponding preliminary selector $\tilde{I}(K)$. For this $K$, the properties \eqref{th1_i} and \eqref{th1_ii} (or, \eqref{th1_i'} and \eqref{th1_ii'}) of Theorem \ref{theorem_1} provide {\emph{separately} over-size and under-size control of $\tilde{I}$, with some $A_0(K)$ and $A_1(K)$, respectively. By analyzing the proof, we see that always $A_0(K) \le A_1(K)$. Hence $I_*(A_1,\theta) \subseteq I_*(A_0,\theta)$ (as it should be), forming a \emph{shell} $I_*(A_0,\theta) \backslash I_*(A_1,\theta)$ in the VSP. \begin{remark} If we fix some distribution of $\xi$ satisfying Condition \eqref{cond_nonnormal}, another way of defining $K$ is to think of it as the smallest constant $K_0$ such that there exists $A_0(K_0)$ (by (a) of Remark \ref{rem_rem8}) for which \eqref{th1_i} is fulfilled for some $H_0\le H'_0<\infty$ and $\alpha_0\ge \alpha'_0>0$. \end{remark} \subsection{Set of signals with distinct active coordinates} In the light of Theorem \ref{theorem_1}, we can say informally that $\tilde{I}$ ``lives in an inflated shell'' between $I_*(A_1(K),\theta)$ and $I_*(A_0(K),\theta)$, which can be thought of as \emph{indifference zone} for the selector $\tilde{I}=\tilde{I}(K)$. In general, the sets $I_*(A_1(K),\theta)\subseteq I_*(A_0(K),\theta)$ can be far apart, and $\tilde{I}$ may have too much room to vary. This means that the corresponding signal $\theta$ does not have distinct active and inactive coordinates, active coordinates as such are not identifiable. The values of the constants $A_0(K)$, $A_1(K)$ evaluated in the proof of the above theorem are of course far from being optimal as we use rather rough bounds in the course of our argument. However, the main message of Theorem \ref{theorem_1} is that constants exist such that \eqref{th1_i'} and \eqref{th1_ii'} are fulfilled. This motivates the following definition of the \emph{set of signals with distinctive active and inactive coordinates}. {\sc Definition.} Fix some $K,M_1,\delta >0$, and define $A_0(K)$ to be the biggest constant for which \eqref{th1_i'} holds with some $M'_1 \le M_1$ and $A_1(K)$ be the smallest constant for which \eqref{th1_ii'} is fulfilled with some $\delta' \ge \delta$. Introduce the set \begin{align} \label{def_Theta(K)} \Theta(K)=\{\theta\in\mathbb{R}^n: I_*(A_1(K), \theta) =I_*(A_0(K), \theta)\}. \end{align} In what follows, denote for brevity $I_*=I_*(A_1(K),\theta)$ and $I^*=I_*(A_0(K),\theta)$. Remember that the quantities $I_*$ and $I^*$ depend on $\theta$. The constants $A_0(K) = A_0(K,M_1,\delta)$ and $A_1(K) = A_1(K,M_1,\delta)$ (not depending on $\theta$) exist in view of Theorem \ref{theorem_1}. This is the main mission of Theorem \ref{theorem_1}. In essence, these constants are defined to be those which make the room between $I_*$ and $I^*$ (where $I_*=I_*(A_1(K),\theta) \subseteq I_*(A_0(K),\theta) =I^*$) as small as possible uniformly over $\theta\in\mathbb{R}^n$. Hence, imposing $I_*=I^*$ determines a subset of $\mathbb{R}^n$ for which we can provide simultaneous control for oversizing and undersizing of $\tilde{I}$ by Theorem \ref{theorem_1}. This means $\Theta(K)$ describes a set of signals with distinctive active and inactive coordinates: if $\theta\in\Theta(K)$, no indifference zone is allowed so that the active coordinates are well defined as $I_*=I_*(A_1(K),\theta)$. The above definition \eqref{def_Theta(K)} is still somewhat implicit, on the other hand it generalizes the traditional strong signal requirement. Indeed, in view of property (c) from Remark \ref{rem_properties}, if $\theta_i^2 \ge A_1(K)\sigma^2 \log(\tfrac{qn}{|S(\theta)|})$ for all $i \in S(\theta)$, then $I_*=I_*(A_1(K),\theta)=S(\theta)=I_*(A_0(K),\theta)=I^*$ (in fact, $I_*(A,\theta)=S(\theta)$ for all $A\in [0,A_1(K)]$), so that $\theta\in\Theta(K)$. \subsection{Results on active set recovery and multiple testing} Now we establish the control of all the introduced quality measures (FPR, NDR, the Hamming rate, etc.) for the proposed active set selector $\hat{I}$. As consequence, we derive that the procedure $\hat{I}$ matches (in a certain sense) the lower bound results from the previous section, establishing the optimality of the proposed procedure. \begin{theorem} \label{theorem_2} Let $\hat{\eta}$ and $\hat{I}=\hat{I}(K)$ be defined by \eqref{threshold}; $I^*=I_*(A_0(K))$, $I_*=I_*(A_1(K))$ and $\Theta(K)$ be defined by \eqref{def_Theta(K)} for sufficiently large $K>0$, and let $\eta_*=\eta_{I_*}$. Then there exist constants $H_1,H_2,\alpha_2,\alpha_3>0$ such that, uniformly in $\theta\in\mathbb{R}^n$, \begin{align} \label{th2_i} \textnormal{FPR}(\hat{I},I^*)&= \operatorname{E}_\theta \tfrac{|\hat{I}\backslash I^*|}{n-|I^*|} \le H_1 (\tfrac{n}{|I^*|\vee 1})^{-\alpha_2},\\ \label{th2_ii} \textnormal{NDR}(\hat{I},I_*)& =\operatorname{E}_\theta \tfrac{|I_*\backslash\hat{I}|}{|I_*|} \le H_2 (\tfrac{n}{|I_*|})^{-\alpha_3}. \end{align} Moreover, there exist $H_3,\alpha_4>0$ such that, uniformly in $\theta\in \Theta(K)$, \begin{align} \label{th2_iii} R_H(\hat{I},I_*)=\operatorname{E}_\theta | \hat{\eta} - \eta_*|= \operatorname{E}_\theta \big(|\hat{I}\backslash I_*|+|I_*\backslash \hat{I}|\big) &\le H_3 n (\tfrac{n}{|I_*|\vee 1})^{-\alpha_4}. \end{align} \end{theorem} From the above theorem, the next corollary follows immediately. It describes control of k-$\text{FWER}$, k-$\text{FWNR}$, the probability of wrong discovery, and the so called \emph{almost full recovery} (relation \eqref{almost_full_recovery} below). \begin{corollary} \label{col1} Uniformly in $\theta\in \mathbb{R}^n$, \begin{align*} \textnormal{k-FWER}(\hat{I}, I^*) &=\mathbb{P}_\theta(|\hat{I}\backslash I^*|\ge k) \le \tfrac{H_1}{k} (n-I^*)(\tfrac{n}{|I^*| \vee 1})^{-\alpha_2}, \\ \textnormal{k-FWNR}(\hat{I}, I_*) &=\mathbb{P}_\theta(|I_*\backslash \hat{I}|\ge k) \le \tfrac{H_2}{k} I_*(\tfrac{n}{|I_*|})^{-\alpha_3}. \end{align*} Uniformly in $\theta\in \Theta(K)$, $\mathbb{P}_\theta(\hat{I}\neq I_*)\le H_3 n (\tfrac{n}{|I_*|})^{-\alpha_4}$ and \begin{align} \label{almost_full_recovery} \tfrac{R_H(\hat{I},I_*)}{|I_*|}=\tfrac{1}{|I_*|} \operatorname{E}_\theta \big(|\hat{I}\backslash I_*| +|I_*\backslash \hat{I}|\big) \le H_3 (\tfrac{n}{|I_*|\vee 1})^{-(\alpha_4-1)}. \end{align} \end{corollary} The following result establishes the control of $\textnormal{FDR}(\hat{I})$ and $\textnormal{FNR}(\hat{I})$. \begin{theorem} \label{theorem_3} With the same notation as in Theorem \ref{theorem_2}, there exist constants $H_5,H_6,\alpha_5,\alpha_6>0$ such that, uniformly in $\theta\in\Theta(K)$, \begin{align} \label{th3_i} \textnormal{FDR}(\hat{I},I_*)&= \operatorname{E}_\theta \tfrac{|\hat{I}\backslash I_*|}{|\hat{I}|} \le H_5 (\tfrac{n}{|I_*|\vee 1})^{-\alpha_5},\\ \label{th3_ii} \textnormal{FNR}(\hat{I},I_*)&= \operatorname{E}_\theta \tfrac{|I_*\backslash \hat{I}|}{n-|\hat{I}|} \le H_6 (\tfrac{n}{|I_*|})^{-\alpha_6}. \end{align} \end{theorem} Theorems \ref{theorem_2} and \ref{theorem_3} imply the next corollary. \begin{corollary} \label{col2} For some constants $H_7,\alpha_7>0$, uniformly in $\theta\in \Theta(K)$, \[ \mathrm{MTR}_l(\hat{I},I_*) \le H_7 (\tfrac{n}{|I_*| \vee 1})^{-\alpha_7}, \quad l=1,\ldots, 4. \] \end{corollary} \begin{remark} \label{rem_unif2} In view of Remark \ref{rem_only_cond}, the results of Theorems \ref{theorem_1}, \ref{theorem_2} and Corollaries \ref{col1} and \ref{col2} hold also uniformly over all the measures $\mathbb{P}_\theta$ satisfying Condition \eqref{cond_nonnormal}. \end{remark} \begin{remark} \label{rem_alpha} Notice that all the powers $\alpha_i$'s in the above theorems and corollaries depend only on $K$ (also via $A_0=A_0(K)$ and $A_1=A_1(K)$) and the constants from Condition \eqref{cond_nonnormal}. Basically, the strong signal condition is reflected by the power $\alpha$'s: the stronger the signal, the bigger the $\alpha$. \end{remark} Notice that $\textnormal{FPR}$ and \textnormal{NDP} are controlled uniformly in $\theta\in \mathbb{R}^n$, whereas all the other quantities only in $\theta\in \Theta(K)$. As we already mentioned, the uniform control of either just Type I error or just Type II error is not much of a value, because this can always be achieved. It is a combination of the two types errors that one should try to control. The most natural choices of such combinations are the Hamming risk and the MTR's, studied in the present paper. Another possible direction in obtaining interesting results is simultaneous control of Type I error (say, $\textnormal{FDR}$) and some estimation risk (or posterior convergence rate in case of Bayesian approach). Such a route is investigated in \cite{Castillo&Roquain:2018}. We should mention that $\hat{I}$ could also be derived as a result of empirical Bayes approach with appropriately chosen prior, and similar results could be derived on optimal estimation and posterior convergence rate. Let us finally discuss possible asymptotic regimes. First, we note that asymptotics $n\to \infty$ is not well defined, unless we describe how the true signal $\theta\in\mathbb{R}^n$ itself evolves with $n$. Assume that $\theta \in \mathbb{R}$ evolves with $n \in \mathbb{N}$ in such a way that $\tfrac{|S(\theta)|}{n} \le p$ for some fixed $p\in [0,1)$. Then from the definition \eqref{oracle} of active coordinates $I_*$, \eqref{property_I} and \eqref{property_Io}, it follows that $\frac{|I_*|}{n}\le p$, but it could also $\frac{|I_*|}{n}\to 0$. This basically means that the signal is not getting ``less sparse'', in fact it can become ``more sparse'', making all the three criterions closer to zero. On the other hand, what can happen in this situation is that the signal is ``getting lost'' by spreading it over the bigger amount of coordinates. If, under growing dimension, we want the signal still to contain a certain portion of active coordinates, we need to make those coordinates more prominent, i.e., to strengthen the strong signal condition. The active coordinates should be increasing in magnitude when dimension is growing. This can also be attained by decreasing $\sigma^2$. Indeed, another observation is that if $\sigma^2 \to 0$, then $A\to \infty $ in the definition \eqref{oracle} of active coordinates $I_*$. One can interpret this as if the strong signal condition becomes more and more stringent. This in turn leads to $\alpha_4 \to \infty$ in \eqref{rel_optim1}. \subsection{Quantifying uncertainty for the variable selector $\hat{\eta}$} Here we construct confidence ball $B(\hat{\eta},\hat{r})$ with optimal properties. Let $B(\hat{\eta},\hat{r})=\{\eta \in \{0,1\}^n: |\hat{\eta}-\eta| \le \hat{r}\}$, $\hat{\eta}=\hat{\eta}(K)$ and $\tilde{I}=\tilde{I}(K)$ be given by \eqref{I_MAP}. Define \begin{align} \label{radius} \hat{r}=\hat{r}(\tilde{I})= n (\tfrac{n}{|\tilde{I}|\vee 1})^{-\alpha'_4}, \end{align} for some $\alpha'_4$ such that $0<\alpha'_4< \alpha_4$, with $\alpha_4$ from Theorem \ref{theorem_2}. The following theorem describes the coverage and size properties of the confidence ball based on $\hat{\eta}$ and $\hat{r}$. \begin{theorem} \label{theorem_uncertainty} With the same notation as in Theorem \ref{theorem_2}, let $\hat{r}$ be defined by \eqref{radius} and $ r_*=r_*(\theta)=n (\tfrac{n}{|I_*|\vee 1})^{-\alpha'_4}$. Then there exist constants $M'_1, H_7, H_8, \alpha_8, \alpha_{9}$ such that, uniformly in $\theta\in\Theta(K)$, \begin{align*} \mathbb{P}_{\theta}\big(\eta_*\notin B(\hat{\eta},\hat{r})\big) &\le H_7 (\tfrac{n}{|I_*|\vee 1})^{-\alpha_8},\\ \mathbb{P}_{\theta}\big(\hat{r}\ge M'_1 r_* \big) &\le H_8(\tfrac{n}{|I_*|\vee 1})^{-\alpha_{9}}. \end{align*} \end{theorem} According to the UQ-framework \eqref{defconfball}, we have $\Theta_{\rm cov}=\Theta_{\rm size} = \Theta(K)$ for some $K >0$, $r(\eta_*(\theta)) =r_*(\theta)=n (\tfrac{n}{|I_*|\vee 1})^{-\alpha'_4}$. Notice that, according to \eqref{rel_optim1}, the radius $\hat{r}$ is \emph{optimal}, in a weak sense as it is up to the constant $\alpha'_4<\alpha_4$. As we mentioned in Section \ref{sec_scope}, typically the so called \emph{deceptiveness} issue emerges in UQ problems. But in this case, interestingly, there is no deceptiveness issue as such for our UQ problem. A heuristic explanation is as follows: the problem of active set recovery is already more difficult than the UQ-problem in a sense that solving the former problem implies solving the latter. Basically, the condition $\theta \in \Theta(K)$ for the parameter to have distinct active coordinates implies also that the parameter is non-deceptive. \section{Discussion: weak optimality, phase transition} \label{sec_discussion} \subsection{Lower bounds} Define $\Theta_s(a)=\{ \theta\in \ell_0[s]: |\theta_i| \ge a, i\in S(\theta)\}$. Let $\Theta^+_s(a)$ be the version of $\Theta_s(a)$ when we put $\theta_i\ge a$ instead of $|\theta_i|\ge a$ in the definitions. Clearly, $\Theta^+_s(a)\subset\Theta_s(a)$. For $\theta\in\Theta_s(a)$, the traditional active set is $I_*(\theta)=S(\theta)$. To ensure strict separation from the inactive set, one typically imposes $a\ge \bar{a}_n >0$ for appropriate $\bar{a}_n$. The minimax lower bound over the class $\Theta_s(a)$ for the problem of the recovery of the active set $I_*(\theta)=S(\theta)$ in the Hamming risk for the normal means model was derived by \cite{Butucea&Ndaoud&Stepanova&Tsybakov:2018}. Precisely, under the normality assumption $\xi_i \overset{\rm ind}{\sim} \mathrm{N}(0,1)$, Theorem 2.2 from \cite{Butucea&Ndaoud&Stepanova&Tsybakov:2018} states: for any $s<n$, $s'\in(0,s]$, \[ r_H(\Theta^+_s(a)) \triangleq \inf_{\check{\eta}} \sup_{\theta \in \Theta^+_s(a)} \operatorname{E}_\theta |\check{\eta} -\eta_{S(\theta)}| \ge s' \Psi_+(s,a) -4s' \exp\big\{-\tfrac{(s-s')^2}{2s}\big\}, \] where $ \Psi_+(s,a) = (\tfrac{n}{s}-1) \Phi\big(-\tfrac{a}{2\sigma} - \tfrac{\sigma}{a} \log(\tfrac{n}{s}-1) \big) +\Phi\big(-\tfrac{a}{2\sigma} +\tfrac{\sigma}{a} \log(\tfrac{n}{s}-1) \big). $ If $a^2 \le 2 \sigma^2 \log(\tfrac{n}{s} -1)$ then by taking $s'=s/2$ in the above display we get \begin{align} \label{inconsistency} r_H(\Theta^+_s(a)) \ge \tfrac{s}{2}\Phi(0) - 2se^{-s/8} = s \big(\tfrac{1}{4} - 2e^{-s/8} \big)> 0.085 s \end{align} for $s\ge 20$. Expectedly, if $a^2 \le 2 \sigma^2 \log(\tfrac{n}{s} -1)$, it is impossible to achieve even consistency, so there is no point in considering this case. On the other hand, if $a^2> 2 \sigma^2 \log(\tfrac{n}{s} -1)$ and $n/s \ge 2.7$, then \[ \Phi\big(-\tfrac{a}{2\sigma} - \tfrac{\sigma}{a} \log(\tfrac{n}{s}-1) \big) \ge \Phi(-a/\sigma) \ge (2/\pi)^{1/2} e^{-4 a^2/\sigma^2}. \] Assuming further $\tfrac{a^2}{\sigma^2} \lesssim s$ (implying $s\gtrsim \log n$) and taking again $s'=s/2$, \begin{align} r_H(\Theta^+_s(a)) &\ge \tfrac{(n-s)}{2}\Phi\big(-\tfrac{a}{2\sigma} - \tfrac{\sigma}{a} \log(\tfrac{n}{s}-1) \big)- 2se^{-s/8} \notag\\ \label{lower_bound1} &\ge C_1(n-s)e^{-C_2 a^2/\sigma^2} - C_3 e^{-C_4 s} \ge C_5(n-s)e^{-C_6 a^2/\sigma^2}. \end{align} Assume that $a^2/\sigma^2 =A\log(\tfrac{en}{s})$ for some $A>2$ and $\log n \lesssim s \le n/2.7$. Then, under the normality assumption $\xi_i \overset{\rm ind}{\sim} \mathrm{N}(0,1)$, it follows from \eqref{lower_bound1} that for some $c_1, c_2>0$ (depending only on $A$) \begin{align} \inf_{\check{I}} \sup_{\theta \in \Theta_s(a)} \operatorname{E}_\theta\big(|\check{I}\backslash S(\theta)| &+|S(\theta)\backslash\check{I}|\big) =\inf_{\check{I}} \sup_{\theta \in \Theta_s(a)} \operatorname{E}_\theta |\eta_{\check{I}} - \eta_{S(\theta)}| \notag\\ \label{minimax_rate} &=r_H(\Theta_s(a)) \ge r_H(\Theta^+_s(a))\ge c_1n (n/s)^{-c_2}. \end{align} In view of \eqref{inconsistency} and \eqref{minimax_rate}, even in the simplest normal model with $\theta \in \Theta_s(a)$, we need a strong signal condition $a \ge \bar{a}_n=A\sigma^2\log(\tfrac{en}{s})$ with $A>2$, just to avoid inconsistency in recovering the active set $S(\theta)$. According to the terminology from \cite{Butucea&Ndaoud&Stepanova&Tsybakov:2018}, if $r_H(\Theta_s(a)) \to 0$ as $n\to\infty$, the \emph{exact recovery} of the active set $S(\theta)$ takes place; and \emph{almost full recovery} occurs if $r_H(\Theta_s(a))/s \to 0$ as $n\to\infty$ (assuming that $s>0$). The above lower bound \eqref{minimax_rate} reveals some sort of \emph{phase transition}. Indeed, the almost full recovery can occur if $s\ll n$ and the constant $A$ is sufficiently large, so that $c_2>1$, or, if $s\asymp n$ (but $s/n\le c<1$) and $c_2\to \infty$. The exact recovery is more difficult to fulfill, it can only occur if $n (n/s)^{-c_2}\to 0$ as $n\to\infty$. This is determined by the combination of two factors, the constant $c_2$ and the order of parameter $s$. The parameter $s$ describes the sparsity of the signal $\theta$ and the constant $c_2$ depends on $A$ which expresses the \emph{signal strength}. In view of property (c) from Remark \ref{rem_properties}, it follows that $\Theta_s(a(K)) \subseteq \Theta(K)$ for $a(K)=A_1(K)\sigma^2 \log(\tfrac{qn}{|S(\theta)|})$. Property (b) from Remark \ref{rem_properties} implies also that $I_*= I_*(A_1(K), \theta)\subseteq S(\theta)$ for all $\theta\in\mathbb{R}^n$. The last two facts and \eqref{minimax_rate} allow us to derive the following lower bound: \begin{align} &\inf_{\check{I}} \sup_{\theta \in \Theta(K)} \operatorname{E}_\theta \frac{|\check{I}\backslash I^*|+|I_*\backslash\check{I}|}{n (|I_*|/n)^{c_2}} \ge \inf_{\check{I}} \sup_{\theta \in \Theta(K)} \operatorname{E}_\theta \frac{|\check{I}\backslash I^*|+|I_*\backslash\check{I}|}{n(|S(\theta)|/n)^{c_2}} \notag \\ &\ge \inf_{\check{I}} \sup_{\theta \in \Theta_s(a(K))} \operatorname{E}_\theta \frac{|\check{I}\backslash S(\theta)|+|S(\theta)\backslash\check{I}|}{n(|S(\theta)|/n)^{c_2}} = \frac{r_H(\Theta_s(A_1(K)))}{n(s/n)^{c_2}}\ge c_1, \label{lb_Theta} \end{align} where the distribution $\mathbb{P}_\theta$ is taken to be the product normal as in \eqref{standard_model}, $\log n \lesssim s \le n/2.7$ and $A_1(K)>2$. The normalizing factor for the Hamming risk is thus $n (|I_*|/n)^{c_2}$. Recall that the bound \eqref{lb_Theta} is in the regime $A_1(K)>2$. Otherwise (i.e., when $A_1(K)\le2$), we have by \eqref{inconsistency} that \[ \inf_{\check{I}} \sup_{\theta \in \Theta(K)} \operatorname{E}_\theta \tfrac{|\check{I}\backslash I^*|+|I_*\backslash\check{I}|}{|I_*|} \ge 0.085. \] \begin{remark} \label{rem_uniformity} Notice that the measure $\mathbb{P}_\theta$ in the above lower bounds is the product normal measure \eqref{standard_model}. However, the same lower bounds trivially hold when, instead of $\sup_{\theta\in\Theta(K)}$, we take $\sup_{\mathbb{P}_\theta \in \mathcal{P}}$, where \[\mathcal{P}= \{ \mathbb{P}_\theta \in \mathcal{P}_A: \theta \in \Theta(K)\}, \quad \mathcal{P}_A=\{\mathbb{P}_\theta: \mathbb{P}_\theta \text{ satisfies \eqref{cond_nonnormal}}\}. \] This is because this normal measure is one of many that satisfy \eqref{cond_nonnormal}. Note that the constants $A_1(K), A_0(K)$ are then defined uniformly over $\mathcal{P}_A$. \end{remark} \begin{remark} Similarly to \eqref{lb_Theta}, it is easy to derive from \eqref{minimax_rate} that $ \inf_{\check{I}} \sup_{\theta \in \Theta(K)} \frac{\mathrm{MTR}_l(\check{I},I_*)}{(|I_*|/n)^{c_2}} \ge c_1$, $l=1,\ldots, 4$. But we conjecture that the right normalizing factor for the minimax MTR's should be $(|I_*|/n)^{c_2-1}$, this cannot be derived from \eqref{minimax_rate}. \end{remark} \subsection{Phase transition} \label{subsec_ phase_transition} Relating the lower bound \eqref{lb_Theta} with the results of the previous section, we claim that the selector $\hat{I}$ (and the corresponding $\hat{\eta}$) is \emph{optimal} in the following weak sense: \begin{align} \label{rel_optim1} c_1 \le \inf_{\check{I}} \sup_{\theta \in \Theta(K)} \frac{R_H(\check{I},I_*)}{n (|I_*|/n)^{c_2}}, \;\; \sup_{\theta \in \Theta(K)} \frac{R_H(\hat{I},I_*)}{n ((|I_*| \vee 1)/n)^{\alpha_4}} \le H_3. \end{align} In view of Remarks \ref{rem_uniformity}, the above relations hold also uniformly over all the measures $\mathbb{P}_\theta$ satisfying Condition \eqref{cond_nonnormal}. Admittedly, the optimality in \eqref{rel_optim1} is very weak as it up to constants $c_2$, $\alpha_4$, which differ in general. But this is the best we could achieve under the general robust setting of this paper. Constant $c_2$ in the lower bound is established for the normal submodel \eqref{standard_model} of our more general model \eqref{model}, whereas $\alpha_4$ is obtained uniformly for the general model \eqref{model} under Condition \eqref{cond_nonnormal} (thus determined by the constants from Condition \eqref{cond_nonnormal}). \begin{remark} We should emphasize that if we want to match of upper and lower bounds we would need to specify the error distribution (or severely restrict the choice). This problem seemingly interesting and challenging does not align with the main focus of the present paper, the robust setting. \end{remark} However, even these relatively loose lower and upper bounds in \eqref{rel_optim1} can demonstrate some sort of {\it phase transition} phenomenon, also in the general setting \eqref{model}. Precisely, the minimax Hamming $r_H$ risk (and MTR) can be either close to zero or not, depending on the combination of the signal sparsity $|I_*|$ and signal magnitude (how strong the signal is), reflected by the constants $c_2,\alpha_4$. The dependence of the normalizing factor on sparsity $|I_*|$ is only through the ratio $n/|I_*|$. The ``informativeness'' of the model (how ``bad'' the noise is) plays a role as well in that it determines how large $K$ must be in the set $\Theta(K)$ for the upper bound in \eqref{rel_optim1} to hold, which depends on the constants from Condition \eqref{cond_nonnormal}. \section{Proofs of the theorems} \label{proofs_theorems} \begin{proof}[Proof of Theorem \ref{theorem_1}] For any $a,b\in\mathbb{R}$, $(a+b)^2\le 2a^2+2b^2$, hence also $-(a+b)^2 \le -a^2/2+b^2$. Using these elementary inequalities, the definition \eqref{I_MAP} of $\tilde{I}(K)$, we derive that, for any $I, I_0\subseteq[n]$, \begin{align*} &\mathbb{P}_{\theta}(\tilde{I}(K)= I) \le\mathbb{P}_{\theta}\Big(\sum_{i\in I^c} X_i^2+ K\sigma^2 \ell(|I|) \le \sum_{i\in I_0^c} X_i^2+K\sigma^2 \ell(|I_0|) \Big) \notag\\ &= \mathbb{P}_{\theta}\Big( \sum_{i\in I\backslash I_0} \tfrac{X_i^2}{\sigma^2} -\sum_{i\in I_0\backslash I} \tfrac{X_i^2}{\sigma^2} \ge K[\ell(|I|)-\ell(|I_0|)] \Big)\notag\\ &\le \mathbb{P}_{\theta}\Big( \sum_{i\in I\backslash I_0} (\tfrac{2\theta_i^2}{\sigma^2} +2\xi_i^2) -\sum_{i\in I_0\backslash I} (\tfrac{\theta_i^2}{2\sigma^2}- \xi_i^2) \ge K(\ell(|I|)-\ell(|I_0|)) \Big) \notag\\ &= \mathbb{P}_{\theta} \Big(\sum_{i\in I\backslash I_0}2\xi_i^2 +\sum_{i\in I_0\backslash I} \xi_i^2 \ge \sum_{i\in I_0\backslash I}\tfrac{\theta_i^2}{2\sigma^2} -\sum_{i\in I\backslash I_0} \tfrac{2\theta_i^2}{\sigma^2} +K(\ell(|I|)-\ell(|I_0|)) \Big). \end{align*} In particular, for any $I, I_0$ such that $I_0 \subseteq I$, we have \begin{align} \label{I-I_0} \mathbb{P}_{\theta}(\tilde{I}(K)= I) \le \mathbb{P}_{\theta}\Big( \sum_{i\in I\backslash I_0}\xi_i^2 \ge \tfrac{K}{2}(\ell(|I|)-\ell(|I_0|)) -\sum_{i\in I\backslash I_0} \tfrac{\theta_i^2}{\sigma^2}\Big), \end{align} and for any $I, I_0$ such that $I \subseteq I_0$, we have \begin{align} \label{I_0-I} \mathbb{P}_{\theta}(\tilde{I}(K)= I) \le \mathbb{P}_{\theta}\Big(\sum_{i\in I_0\backslash I} \xi_i^2 \ge \sum_{i\in I_0\backslash I}\tfrac{\theta_i^2}{2\sigma^2} + K(\ell(|I|)-\ell(|I_0|))\Big). \end{align} Now we prove \eqref{th1_i}. For brevity, denote for now $I_*=I_*(A_0)=I_*(A_0,\theta)$. If $A_0|I \backslash I_*|\log(\tfrac{qn}{|I\cup I_*|})< \sum_{i\in I \backslash I_*}\tfrac{\theta_i^2}{\sigma^2}$ would hold for some $I\subseteq[n]$, then \begin{align*} r^2_{A_0}(I\cup I_*,\theta) &= \sum_{i \not\in I\cup I_*} \theta^2_i+A_0\sigma^2 |I\cup I_*| \log(\tfrac{qn}{|I\cup I_*|})\\ &\le \sum_{i \not\in I\cup I_*} \theta^2_i +A_0\sigma^2 |I \backslash I_*| \log(\tfrac{qn}{|I\cup I_*|})+A_0\sigma^2 |I_*|\log(\tfrac{qn}{|I_*|}) \\ &< \sum_{i \not\in I\cup I_*} \theta^2_i+\sum_{i\in I \backslash I_*} \theta_i^2 + A_0\sigma^2 |I_*| \log(\tfrac{qn}{|I_*|}) \\ &= \sum_{i \not\in I_*} \theta^2_i+A_0\sigma^2 |I_*| \log(\tfrac{qn}{|I_*|})=r^2_{A_0}(\theta), \end{align*} which contradicts the definition \eqref{oracle} of $I_*=I_*(A_0,\theta)$. Hence, \[ \sum_{i\in I \backslash I_*}\tfrac{\theta_i^2}{\sigma^2}\le A_0|I \backslash I_*|\log(\tfrac{qn}{|I\cup I_*|}) \le A_0 |I|\log(\tfrac{qn}{|I|})=A_0\ell(|I|). \] Using this and \eqref{I-I_0} with $I_0=I_*\cap I$ (so that $I\backslash I_0=I\backslash I_*$) yields \begin{align*} \mathbb{P}_{\theta}(\tilde{I}(K_0)= I) &\le \mathbb{P}_{\theta}\Big(\sum_{i\in I\backslash I_0}\xi_i^2 \ge (\tfrac{K_0}{2}-A_0)\ell(|I|) - \tfrac{K_0}{2}\ell(|I_0|)\Big) \\ &\le \mathbb{P}_{\theta}\Big(\sum_{i\in I}\xi_i^2 \ge (\tfrac{K_0}{2}-A_0)\ell(|I|) - \tfrac{K_0}{2}\ell(|I_*|)\Big). \end{align*} Let $\mathcal{J}=\{I\subseteq[n]: \ell(|I|) \ge M_0 \ell(|I_*(A_0)|)+M \}$, with $M_0=K_0/(2C_0)$ where $C_0=K_0/2-A_0-M_\xi>0$, which holds for any $K_0> 2(A_0+M_\xi)$. The last display and \eqref{ineq_for_later} imply that for any $\theta\in\mathbb{R}^n$ \begin{align*} \mathbb{P}_{\theta} \big(\tilde{I}(K_0) \in \mathcal{J} \big) &= \sum_{I\in \mathcal{J}} \mathbb{P}_{\theta}(\tilde{I}(K_0)= I) \\& \le \sum_{I\in \mathcal{J}} \mathbb{P}_{\theta}\Big(\sum_{i\in I}\xi_i^2 \ge (\tfrac{K_0}{2}-A_0)\ell(|I|) - \tfrac{K_0}{2}\ell(|I_*|)\Big)\\ &= \sum_{I\in \mathcal{J}} \mathbb{P}_{\theta}\Big(\sum_{i\in I}\xi_i^2 \ge M_\xi \ell(|I|)+C_0\ell(|I|) - \tfrac{K_0}{2}\ell(|I_*|)\Big)\\ &\le \sum_{I\subseteq[n]} \mathbb{P}_{\theta}\Big(\sum_{i\in I}\xi_i^2 \ge M_\xi \ell(|I|) + C_0M \Big) \le H_0 e^{-\alpha_0 M}, \end{align*} with $\alpha_0= C_0 \alpha_\xi$, thus ensuring the result of the assertion \eqref{th1_i} for any $\theta\in\mathbb{R}^n$. To prove \eqref{th1_i'}, let $M'_1=4(M_0+1)$. If $|I|\ge M'_1|I_*|+M$ and $|I_*|\le qn/(M'_1)^2$, \begin{align*} \ell(|I|) &=|I|\log\big(\tfrac{qn}{|I|}\big)\ge \tfrac{1}{2}\ell(|I|)+ \tfrac{1}{2}|I|\ge \tfrac{M'_1}{2}|I_*|\log\big(\tfrac{qn}{M'_1|I_*|}\big)+\tfrac{M}{2} \\ &\ge \tfrac{M'_1}{4}|I_*| \log\big(\tfrac{qn}{|I_*|}\big) +\tfrac{M}{2} =(M_0+1)\ell(|I_*|)+\tfrac{M}{2}. \end{align*} Hence, for $|I_*|\le qn/M_1^2$, by using \eqref{th1_i}, \begin{align*} \mathbb{P}_{\theta} \big(|\tilde{I}(K_0)|\ge M'_1 |I_*|+M\big) &\le \mathbb{P}_{\theta} \big(\ell(|\hat{I}(K_0)|)\ge (M_0+1)\ell(|I_*|)+\tfrac{M}{2}\big)\\ &\le H_0 e^{-\alpha_0\ell(|I_*|) -\alpha_0M/2}. \end{align*} If $|I_*|> qn/(M'_1)^2$ and $M''_1=(M'_1)^2/q$, then we trivially obtain \[ \mathbb{P}_{\theta} \big(|\tilde{I}|\ge M''_1 |I_*|+M\big) \le \mathbb{P}_{\theta} \big(|\tilde{I}|\ge M''_1 |I_*|\big) \le \mathbb{P}_{\theta} \big(|\tilde{I}|>n \big)=0. \] Hence the choice $M_1=\max\{M'_1, M''_1\}$ ensures the second relation \eqref{th1_i'}. Next, we prove the assertion \eqref{th1_ii}. For the rest of the proof, denote for brevity $I_*=I_*(A_1)$. Define $\mathcal{T}=\{I\in\mathcal{I}: \ell(|I|)\le \delta\ell(|I_*|)-M\}$, $\delta \in [0,1)$. If $I\in\mathcal{T}$, then $ \ell(|I|)\le \delta\ell(|I_*|) \le\ell(\delta |I_*|)$, implying that $|I| \le \delta |I_*|$, as $\ell(x)$ is increasing for $x\in[0,n]$. Hence, for any $I\in\mathcal{T}$, \begin{align} \label{relation_5} \ell(|I_*\cup I|)&= |I_*\cup I| \log(\tfrac{qn}{|I_*\cup I|}) \le |I_*|\log(\tfrac{qn}{|I_*\cup I |})+ |I|\log(\tfrac{qn}{|I_*\cup I|})\notag\\ &\le (1+\delta) |I_*|\log(\tfrac{qn}{|I_*|}) -M= (1+\delta) \ell(|I_*|)-M. \end{align} Next, by \eqref{property_Io} and the fact that $|I| \le \delta |I_*|$, we obtain that for any $I\in\mathcal{T}$, \begin{align} \label{relation_4} \sum_{i\in I_* \backslash I}\tfrac{\theta_{i}^2}{\sigma^2} &\ge |I_*\backslash I|A_1 \log(\tfrac{en}{|I_*|}) \ge A_1 (1-\delta)|I_*|\log(\tfrac{en}{|I_*|}) \ge \tfrac{A_1 (1-\delta)}{2}\ell(|I_*|) , \end{align} Denote for brevity $C_{A_1}=\tfrac{A_1(1-\delta)}{4}-K_1(1+\delta)$. Using the relation \eqref{I_0-I} with $I_0=I_*\cup I$ (so that $I_0\backslash I=I_*\backslash I$), the relations \eqref{relation_5}, \eqref{relation_4}, and \eqref{ineq_for_later}, we derive that \begin{align} \mathbb{P}_{\theta} & (\tilde{I}(K_1)\in\mathcal{T}) = \sum_{I \in \mathcal{T}} \mathbb{P}_{\theta}(\tilde{I}(K_1)=I) \notag \\ &\le \sum_{I \in\mathcal{T}} \mathbb{P}_{\theta}\Big(\sum_{i\in I_*\backslash I} \xi_i^2 \ge \sum_{i\in I_*\backslash I}\tfrac{\theta_i^2}{2\sigma^2} + K_1(\ell(|I|)-\ell(|I_*\cup I|))\Big) \notag\\ &\le \sum_{I \in\mathcal{T}} \mathbb{P}_{\theta}\Big(\sum_{i\in I_*\backslash I} \xi_i^2 \ge \big( \tfrac{A_1(1-\delta)}{4} -K_1(1+\delta)\big)\ell(|I_*|)+K_1[\ell(|I|)+M]\Big) \notag\\ \label{rel6} &= \sum_{I \in\mathcal{T}} \mathbb{P}_{\theta}\Big(\sum_{i\in I_*\backslash I} \xi_i^2 \ge C_{A_1}\ell(|I_*|)+K_1\ell(|I|)+K_1M\Big)\\ &\le \sum_{I \in\mathcal{T}} \mathbb{P}_{\theta}\Big(\sum_{i\in I_*\backslash I} \xi_i^2 \ge M_\xi \ell(|I_*|) +(C_{A_1}-M_\xi)\ell(|I_*|)+K_1M \Big) \notag\\ &\le \sum_{I\subseteq[n]} \mathbb{P}_{\theta}\Big(\sum_{i\in I} \xi_i^2 \ge M_\xi \ell(|I|) +(C_{A_1}-M_\xi)\ell(|I_*|) +K_1M\Big) \notag\\ &\le H_0 e^{-\alpha_\xi M-\alpha_\xi(C_{A_1}-M_\xi) \ell(|I_*|)} =H_0 e^{-\alpha_1 M-\alpha'_1\ell(|I_*|)}, \notag \end{align} where $\alpha_1=\alpha_\xi K_1$, $\alpha'_1= \alpha_\xi (C_{A_1}-M_\xi)$ and $A_1$ is assumed to be so large that $C_{A_1}>M_\xi$. This proves \eqref{th1_ii}. Finally, we establish \eqref{th1_ii'}. Define $\mathcal{T}'=\{I\in\mathcal{I}: |I|\le \delta|I_*|\}$, $\delta \in [0,1)$. The relations \eqref{relation_4}, \eqref{relation_5} are still valid for any $I\in\mathcal{T}'$. As before, we obtain \eqref{rel6} (with $M=0$ and $\mathcal{T}'$ instead of $\mathcal{T}$), which we now continue as follows: \begin{align*} \mathbb{P}_{\theta}(\tilde{I}(K_1)\in\mathcal{T}') &\le \sum_{I \in\mathcal{T}'} \mathbb{P}_{\theta}\Big(\sum_{i\in I_*\backslash I} \xi_i^2 \ge C_{A_1}\ell(|I_*|)+K_1\ell(|I|)\Big)\\ &\le \sum_{I \in\mathcal{T}'} \mathbb{P}_{\theta}\Big(\sum_{i\in I_*\backslash I} \xi_i^2 \ge M_\xi\ell(|I_*|)+(C_{A_1}-M_\xi)\ell(|I_*|)\Big)\\ &= \sum_{I\in[n]} \mathbb{P}_{\theta}\Big(\sum_{i\in I} \xi_i^2 \ge M_\xi \ell(|I|) + (C_{A_1}-M_\xi)\ell(|I_*|)\Big) \notag\\ &\le H_0 e^{-\alpha'_1 \ell(|I_*|)}, \end{align*} with $\alpha'_1=\alpha_\xi(C_{A_1}-M_\xi)$, $A_1$ is assumed to be so large that $C_{A_1}> M_\xi$. \end{proof} \begin{proof} [Proof of Theorem \ref{theorem_2}] First we prove \eqref{th2_i}. Consider the case $|I^*|\ge 1$. Let $B=\{|\tilde{I}|>M_1|I^*|\}$. Recalling that $I^*=I_*(A_0)$, by \eqref{property_Io}, $\theta_i^2 \le A_0 \sigma^2 \log(\tfrac{qn}{|I^*| \vee 1})$ for all $i\in (I^*)^c$. Using this, Condition \eqref{cond_nonnormal}, the definition \eqref{threshold}, property \eqref{th1_i'} of Theorem \ref{theorem_1}, we have that for $I^*=I_*(A_0)$ and $\hat{I}=\hat{I}(K)$ \begin{align} \label{relation_1} \textnormal{FPR}(\hat{I},I^*)&=\operatorname{E}_\theta\tfrac{|\hat{I}\backslash I^* |}{n-|I^*|} =\tfrac{1}{n-|I^*|}\sum_{i\in (I^*)^c}\operatorname{E}_\theta \hat{\eta}(X_i)(\mathrm{1}_{B} +\mathrm{1}_{B^c}) \notag\\ &\le \mathbb{P}_\theta(B)+\tfrac{1}{n-|I^*|} \sum_{i\in (I^*)^c}\mathbb{P}_\theta \big(\tfrac{2\theta_i^2}{\sigma^2} +2\xi_i^2\ge K\log (\tfrac{qn}{M_1|I^*|})\big )\notag\\ &\le \mathbb{P}_\theta(B)+\tfrac{1}{n-|I^*|}\sum_{i\in (I^*)^c} \mathbb{P}_\theta \big(\xi_i^2\ge(\tfrac{K}{2}-A_0) \log(\tfrac{qn}{|I^*|}) -\tfrac{K}{2}\log M_1 \big)\notag\\ &\le H_0 e^{-\alpha_0\ell(|I^*|)} + H'(\tfrac{n}{|I^*|})^{-\alpha'}, \end{align} for $K$ and $A_0$ such that $\tfrac{K}{2}-A_0>C_\xi$ and the property \eqref{th1_i'} of Theorem \ref{theorem_1} can be applied, where $\alpha'=\alpha_\xi(\tfrac{K}{2}-A_0)$ and $H'=H_\xi e^{\alpha_\xi K \log \sqrt{M_1}}$. Now we consider the case $|I^*|=0$ (i.e., $I^*=\varnothing$). Reasoning similarly to \eqref{relation_1}, now with $B=\{|\tilde{I}|>\log n \}$, we derive \begin{align} \textnormal{FPR}(\hat{I},I^*) &\le \mathbb{P}_\theta( B)+\tfrac{1}{n} \sum_{i\in [n]}\mathbb{P}_\theta \big(\tfrac{2\theta_i^2}{\sigma^2} +2\xi_i^2\ge K\log (\tfrac{qn}{\log n})\big ) \notag\\ &\le \mathbb{P}_\theta(B)+\tfrac{1}{n}\sum_{i\in [n]} \mathbb{P}_\theta \big(\xi_i^2\ge(\tfrac{K}{2}-A_0) \log(qn)-\tfrac{K}{2}\log\log n \big) \notag\\ \label{relation_2} &\le H'' n^{-\alpha''}, \end{align} The relations \eqref{relation_1} and \eqref{relation_2} establish \eqref{th2_i}. Next, we proof the assertion \eqref{th2_ii}. If $I_*=\varnothing$, the claim follows, assume $|I_*|\ge 1$. Denote $B_\delta = \{|\tilde{I}|\le \delta |I_*|\}$. Using Condition \eqref{cond_nonnormal}, the definition \eqref{threshold}, \eqref{property_Io}, property \eqref{th1_ii'} of Theorem \ref{theorem_1}, and the fact that $(a+b)^2\ge 2a^2/3-2b^2$ for any $a,b\in\mathbb{R}$, we have that for $I_*=I_*(A_1)$ and $\hat{I}=\hat{I}(K)$ \begin{align} \label{NDR} \textnormal{NDR}(\hat{I},I_*)&=\frac{1}{|I_*|}\operatorname{E}_\theta |I_*\backslash \hat{I}| =\frac{1}{|I_*|}\sum_{i\in I_*}\operatorname{E}_\theta (1\!-\!\hat{\eta}(X_i))\!\notag\\ &=\frac{1}{|I_*|}\sum_{i\in I_*}\!\mathbb{P}_\theta \Big(|\theta_i+\sigma \xi_i| <\sigma\big[K\log (\tfrac{qn}{|\tilde{I}|})\big]^{1/2}\Big) \notag\\ &\le\frac{1}{|I_*|}\sum_{i\in I_*}\mathbb{P}_\theta\Big(\tfrac{2}{3}\theta_i^2\!-\!2\sigma^2\xi_i^2 <\sigma^2K \log (\tfrac{qn}{|\tilde{I}|})\Big)\notag\\ &\le\frac{1}{|I_*|}\sum_{i\in I_*} \mathbb{P}_\theta\Big(\xi_i^2>\tfrac{A_1}{3}\log (\tfrac{en}{|I_*|}) -\tfrac{K}{2}\log (\tfrac{qn}{|\tilde{I}|})\Big) \notag\\ &\le \mathbb{P}_\theta(B_\delta)+\frac{1}{|I_*|}\sum_{i\in I_*} \mathbb{P}_\theta\Big(\xi_i^2>\tfrac{A_1}{6}\log (\tfrac{qn}{|I_*|}) -\tfrac{K}{2}\log (\tfrac{qn}{|\tilde{I}|}), B_\delta^c \Big) \notag\\ &\le H_0 e^{-\alpha'_1 \ell(|I_*|)} +\frac{1}{|I_*|}\sum_{i\in I_*} \mathbb{P}_\theta\big(\xi_i^2>(\tfrac{A_1}{6}-\tfrac{K}{2})\log (\tfrac{qn}{|I_*|}) +\tfrac{K}{2}\log \delta\big)\notag\\ &\le H_0 e^{-\alpha'_1 \ell(|I_*|)} +C_2(\tfrac{qn}{I_*})^{-\alpha'_3} \le H_2 (\tfrac{n}{|I_*|})^{-\alpha_3}, \end{align} for sufficiently large $A_1$ (such that $\tfrac{A_1}{6}-\tfrac{K}{2}>M_\xi$ and the property \eqref{th1_ii'} of Theorem \ref{theorem_1} can be applied), where $\alpha'_3=\alpha_\xi(\tfrac{A_1}{3}-\tfrac{K}{2}-M_\xi)$ and $C_2=H_\xi e^{-\alpha_\xi K \log \sqrt{\delta}}$. The relation \eqref{th2_ii} is proved. Since $I^*=I_*(A_0(K))=I_*(A_1(K))=I_*$ for $\theta\in\Theta(K)$, the assertion \eqref{th2_iii} follows from the relations \eqref{relation_1} and \eqref{NDR}: uniformly in $\theta\in \Theta(K)$, \begin{align*} \operatorname{E}_\theta \big(|\hat{I}\backslash I_*|+|I_*\backslash \hat{I}|\big) &\le (n-|I_*|)H_1 (\tfrac{n}{|I_*|\vee 1})^{-\alpha_2} + |I_*| H_2 (\tfrac{n}{|I_*|})^{-\alpha_3}\\ &\le H_3 n (\tfrac{n}{|I_*|\vee 1})^{-\alpha_4}. \qedhere \end{align*} \end{proof} \begin{proof}[Proof of Theorem \ref{theorem_3}] First, we proof assertion \eqref{th3_i}. Introduce the event $B_{\delta}=\{|\tilde{I}|< \delta |I_*|\}$. We argue along the same lines as in \eqref{relation_1} and \eqref{relation_2} for the two cases $|I_*|>0$ and $|I_*|=0$. For the case $|I_*|>0$, we use \eqref{th1_ii'} of Theorem \ref{theorem_1}, \eqref{th2_i} of Theorem \ref{theorem_2} and the fact that $I^*=I_*$ for $\theta\in \Theta(K)$ to derive \begin{align*} \textnormal{FDR}(\hat{I}) &=\operatorname{E}_\theta \tfrac{|\hat{I}\backslash I_*|}{|\hat{I}|} =\operatorname{E}_\theta\big[ \tfrac{|\hat{I}\backslash I^*|}{|\hat{I}|} (\mathrm{1}_{B_{\delta}^c}+\mathrm{1}_{B_{\delta}})\big] \le \tfrac{1}{\delta|I_*|}\operatorname{E}_\theta |\hat{I}\backslash I^*|+\mathbb{P}_\theta (B_\delta) \\ &\le \tfrac{1}{\delta|I_*|} H_1n \big(\tfrac{n}{|I^*|\vee 1}\big)^{-\alpha_2} + H_0 e^{-\alpha'_1\ell(|I_*|)} \le H_5 (\tfrac{n}{|I_*|})^{-\alpha_6}. \end{align*} The case $|I_*|=0$ is handled as follows. If $|\hat{I}|=0$, the claim holds. Assume $|\hat{I}|\ge 1$, then \begin{align*} \textnormal{FDR}(\hat{I}) \le \operatorname{E}_\theta |\hat{I}\backslash I^*| \le H_1 n n^{-\alpha_2} = H_1 n^{-(\alpha_2-1)}. \end{align*} Next, we prove assertion \eqref{th3_ii}. Introduce the event $B=\{|\tilde{I}|>M_1 |I^*|\}$. Consider two cases: the case $|I^*| \ge n/(2M_1)$ and the case $|I^*|<n/(2M_1)$. Suppose $|I^*| \ge n/(2M_1)$, then $\textnormal{FNR}(\hat{I})=\operatorname{E}_\theta \tfrac{|I_*\backslash \hat{I}|}{n-|\hat{I}|} \le 1 \le 2 M_1 \tfrac{|I^*|}{n}=2 M_1 \tfrac{|I_*|}{n}$ and \eqref{th3_ii} holds, as $I^*=I_*$ for $\theta\in\Theta(K)$. Now suppose $|I^*|<n/(2M_1)$. Then using the same reasoning as in \eqref{NDR}, Theorem \ref{theorem_1} and the fact that $I^*=I_*$ for $\theta\in\Theta(K)$, we again obtain \eqref{th3_ii}: \begin{align*} \textnormal{FNR}(\hat{I})&=\operatorname{E}_\theta \tfrac{|I_*\backslash \hat{I}|}{n-|\hat{I}|} =\operatorname{E}_\theta\big[ \tfrac{|I_*\backslash \hat{I}|}{(n-|\hat{I}|)} (\mathrm{1}_{B^c}+\mathrm{1}_{B})\big]\\&\le\tfrac{1}{n-M_1|I^*|} \operatorname{E}_\theta |I_*\backslash \hat{I}|+ \mathbb{P}_\theta(B) \le H_6 (\tfrac{n}{|I_*|})^{-\alpha_7}. \hfil \qedhere \end{align*} \end{proof} \begin{proof}[Proof of Theorem \ref{theorem_uncertainty}] We first establish the coverage property. Recall that $\hat{r}=\hat{r}(\tilde{I})= n (\tfrac{n}{|\tilde{I}|\vee 1})^{-\alpha'_4}$ and by \eqref{th2_iii} of Theorem \ref{theorem_2}, \begin{align} \label{th4_rel1} \sup_{\theta\in\Theta(K)} \operatorname{E}_\theta | \hat{\eta} - \eta_*| &\le H_3 n (\tfrac{n}{|I_*|\vee 1})^{-\alpha_4}. \end{align} Denote $B_{\delta}=\{|\tilde{I}|\le \delta |I_*|\}$. Now, by using the Markov inequality, property \eqref{th1_ii'} of Theorem \ref{theorem_1} and \eqref{th4_rel1}, we obtain, uniformly in $\theta\in\Theta(K)$, \begin{align*} \mathbb{P}_{\theta}\big(\eta_*\notin B(\hat{\eta},\hat{r})\big) &= \mathbb{P}_{\theta}\big(| \eta_*-\hat{\eta}|> \hat{r}, B^c_{\delta} \big)+ \mathbb{P}_{\theta}(B_{\delta}) \\ &\le \mathbb{P}_{\theta}(B_{\delta})+\mathbb{P}_{\theta}\big(| \eta_*-\hat{\eta}| > n (\tfrac{n}{ (\delta |I_*|) \vee 1})^{-\alpha'_4} \big)\\ &\le H_0 e^{-\alpha'_1 \ell(|I_*|)} + H_3 \delta^{\alpha'_4} (\tfrac{n}{|I_*| \vee 1})^{-(\alpha_4- \alpha'_4)} \le H_7 (\tfrac{n}{|I_*| \vee 1})^{-\alpha_7}, \end{align*} which proves the coverage property. It remains to prove the size property. Let $B= \{|\tilde{I}|\ge M_1|I^*|\}$. For any $M'_1> M_1^{\alpha'_4}\vee 1$, we have that, uniformly in $\theta\in\Theta(K)$ (so that $I^*=I_*$), \begin{align*} \mathbb{P}_{\theta}\big(\hat{r}\ge M'_1 r_*, B^c\big) \le \mathbb{P}_{\theta} \Big(n \big(\tfrac{n}{M_1 |I^*|\vee 1}\big)^{-\alpha'_4} \ge M'_1 n \big(\tfrac{n}{|I_*|\vee 1}\big)^{-\alpha'_4}\Big) =0. \end{align*} Using this, the property \eqref{th1_i'} of Theorem \ref{theorem_1} and the fact that $I^*=I_*$ for $\theta\in\theta(K)$, we derive that, uniformly in $\theta\in\Theta(K)$, \begin{align*} \mathbb{P}_{\theta}\big(\hat{r}\ge M'_1 r_*\big) &\le \mathbb{P}_{\theta}(B)+ \mathbb{P}_{\theta}\big(\hat{r}\ge M'_1 r_*, B^c\big) \\ &= \mathbb{P}_{\theta}(B) \le H_0 e^{-\alpha_0\ell(|I^*|)} \le H_8 (\tfrac{n}{|I^*| \vee 1 })^{-\alpha_8}, \end{align*} yielding the size property. \end{proof}
\section{Introduction}\label{sec:1intro} Optimal transport (OT) theory has experienced increased interest over the last few years, due to its wide range of applications in both theoretical and applied fields of mathematics~\cite{villani}. In particular, the recent efforts to overcome the high computational cost of the associated linear programming problem~\cite{cuturiSinkhorn}, has made OT an attractive choice to tackle problems involving a large number of distributions or other high dimensional objects, and requiring a high accuracy. Our work focuses on the discrete OT problem, where probability distributions are defined over the nodes of a finite graph. In traditional OT approaches, it is assumed that mass (or a fraction of it) at each point in the support of one of the probability measures can be sent to any of the elements in the support of the other probability measure. As a result, the transport plan is executed effectively in one step. However, we seek to explicitly consider the topology of the underlying graph, which naturally imposes some transportation constraints. This means that there may not be a direct link between two points in the support and additionally, one may need to account for channel and node capacities. Thus, our goal is to find a sequence of transport plans that move the mass from an initial distribution to a final one along the edges of a connected graph so that the cost of transportation is minimal and the capacity constraints are satisfied. Finding the amount of mass that needs to be sent through each edge to minimize the total cost of transportation, is a well-known problem called the \textit{minimum-cost flow problem} (MCFP). This problem has been widely studied~\cite{MCF1993,MCF2020}, and different algorithms have been proposed to solve it~\cite{kovacs}. More importantly, the Wasserstein distance can be rewritten as a MCFP when considering a complete bipartite graph~\cite{bassetti2} and this can be extended to more general graphs if one considers the shortest path distance as the cost to send a unit of resource from one node to the other. However, classical methods to solve this problem do not have a condition to discern between paths when the optimal flow is not unique, which leads to unpredictability of the output from the solver~\cite{solomon2}. To avoid that case, some algorithms introduce an additional term to the objective function so that it becomes strongly convex. These regularized OT methods, like the well-known Sinkhorn algorithm \cite{cuturiSinkhorn}, achieve uniqueness and significantly speed up the computation, compared to solving a large linear programming problem, but it is at the cost of finding an approximate solution of the original problem. Our approach is based on the resolution of the \textit{Wasserstein attraction} (WA) problem~\cite{PeyreGradientFlows}, which requires the computation of a \textit{Wasserstein barycenter} (WB) of two distributions at every iteration. Computing the WB yields an intermediate distribution, defined as the Fréchet mean of the two measures, which is the result of minimizing the sum of the (Wasserstein) distances between itself and each of the two distributions~\cite{cuturiFastWB}. However, the support of this resulting distribution can include any of the graph nodes. We expand the definition of the WB problem by adding constraints that ensure the mean obtained has the appropriate support and each node does not receive more mass than the amount available from its neighbors. This approach resembles what is called \textit{displacement interpolation}~\cite{villani}. However, displacement interpolation in the discrete-time case may require a small step size of the weight to avoid some of the mass moving over more that one node in a single step, which may lead to having many more iterations than necessary. Furthermore, certain nodes can receive more mass than the total obtainable from their neighboring nodes. In summary, the main differentiating factor between displacement interpolation and our proposal is the addition of the topology and capacity constraints imposed by a graph. In this regard, \cite{Haasler2021} recently studied this problem in the context of traffic planning, where edge capacity constraints are taken into account, and proposed a framework based on the Lagrangian dual problem to solve it, which resembles the Sinkhorn algorithm. Moreover, our proposed approach can be reformulated as a discrete gradient flow problem. Several papers work on discrete gradient flows over graphs (or other discrete domains) \cite{Chow2017ADS,erbar,Mielke2013GeodesicCO,Richemond2017OnWR}. However, such papers focus on the theoretical analysis of differential equations rather than the computational aspect with the regularized approximation of the Wasserstein metric (except for \cite{erbar} which provides a more in-depth discussion on the topic), and no additional constraints are considered on the elements of the graph. The closest works to our setting with constrained WB are \cite{PeyreGradientFlows,Cuturi2016ASD}. The former presents a framework to approximate gradient flows for Wasserstein metrics by computing discrete entropy-regularized flows, which are computed as \textit{JKO flows} (named after the authors in \cite{JKO}). It introduces the concept of Wasserstein attraction, which is used in our work. We expand on this concept by observing that our particular problem formulation allows us to write each iteration of the WA problem as the computation of a WB, which unlocks the use of powerful computational tools found in the literature to solve this problem. Additionally, as previously mentioned, we further generalize the definition of this regularized flow by including the supplemental constraints of the topology of a network and the node and edge capacity bounds, which are features not considered in~\cite{PeyreGradientFlows}. The latter work, \cite{Cuturi2016ASD}, complements~\cite{PeyreGradientFlows} while focusing on the dual formulation of Wasserstein variational problems. In the context of applications of JKO flows in OT, \cite{bunne2021} recently proposed a novel procedure for the computation of JKO flows, based on input convex neural networks. It is applied in the study of population dynamics, where it assumes that the dynamics of the model is parameterized by an energy function, which controls how the transport is executed at each step, from one state to the next. In our application, this role is performed by another Wasserstein distance function, instead of an energy one (in addition to further constraints), which also allows for an explicit computation of the JKO steps. The main contributions of this paper are threefold: first, we propose the mathematical formulation of a Wasserstein attraction-like problem to solve mass transport problems over networks by writing them as the computation of a WB problem with additional constraints. And second, we present a methodology to find an approximation of optimal discrete flows over networks based on Dykstra's projection algorithm and the computation of JKO flow proximal operators for the Kullback-Leibler divergence. Finally, to the best of our knowledge, there are no works related to water management systems under the Wasserstein distance framework, hence, we illustrate how this approach using WB can be implemented to model a supply-and-demand problem in the context of drinking water networks, where the network constraints are a crucial aspect inherent in their nature. In addition, we show how it can automatically adapt to dynamic changes on the network's topology and agents. Furthermore, since there is no known method that can be used for fair comparison that is able to generate a flow that minimizes the Wasserstein distances and takes into account the network constraints, we have opted to compare the performance of our method with the commercial solver CPLEX with explicit formulation of the constraints. The remainder of this article is structured as follows. In Section \ref{sec:2prob_st}, we provide the necessary background for our work, stating some basic definitions from discrete OT theory and present the formal statement of the problem we want to solve. In Section \ref{sec:3proposed_approach}, we give a quick review of Dykstra’s projection algorithm in the setting of optimization problems involving the Kullback-Leibler divergence and how it can be used to solve the WB problem. Then, we show the additional steps needed on the algorithm to enforce support constraints and capacity bounds on the network's links and nodes. With that, we present our proposed approach. In Section \ref{sec:4numerical_simulations}, we provide an illustrative example to showcase the performance of the scheme to solve a supply-and-demand problem in the context of flow optimization on drinking water networks. Finally, in Section \ref{sec:5conclusions}, we provide a summary and discuss future investigation directions. \subsection*{Notation} The column vector of all ones is denoted by $\boldsymbol{1}$ and $I$ is the identity matrix. The adjacency matrix of a graph is denoted by $A$, and we will write $\bar{A} = A+I$ when considering the connection of one node to itself. $\mathbb{R}_+$ and $\mathbb{R}_{++}$ refer to non-negative and strictly positive real values respectively. Given $x\in\mathbb{R}^n$, $\norm{x}$ stands for its Euclidean norm. Given two matrices $A,B\in\mathbb{R}^{n\times m}$, $\esc{A}{B} = \sum_{i,j}A_{ij}B_{ij}$. We define the support of a function (or vector) $\rho$ as $\textsc{supp}(\rho) = \{i \mid \rho(i)>0 \}$. We denote $\text{KL}(\pi|\xi)$ as the \textit{Kullback-Leibler divergence} between $\pi\in\mathbb{R}_+^{n\times n}$ and $\xi\in\mathbb{R}_{++}^{n\times n}$, defined as $$ \text{KL}(\pi|\xi) = \sum_{i,j=1}^n\pi_{ij}\ln\left(\frac{\pi_{ij}}{\xi_{ij}}\right) - \pi_{ij} + \xi_{ij}, $$ with the convention $0 \ln(0) = 0$. Finally, the indicator function of a set $\mathcal{C}$ is defined as $\iota_\mathcal{C}(x) = 0$ if $x\in \mathcal{C}$, and $\iota_\mathcal{C}(x) = +\infty$ otherwise. \section{Problem Statement: Discrete Flows and Wasserstein Attraction on Graphs}\label{sec:2prob_st} \subsection{Discrete Flows on Graphs}\label{sec:2.1} Consider a \textit{discrete}, \textit{finite}, \textit{fixed} and \textit{connected} graph \mbox{$\mathcal{G} = (V,E)$}, where $V$ is a set of $n$ nodes $V = (1,\cdots,n)$, and $E\subseteq V\times V$ is a set of directed edges so that $(j,i) \in E$ if and only if there is a link between the node $j \in V$ and node $i\in V$. Denote the probability simplex on $V$ as $\text{Prob}(V) = \Big\{\mu \in \mathbb{R}_+^n \mid \sum_{x\in V} \mu(x) =1\Big\}$. The set of edges $E$ has an associated weight function \mbox{$c : E \to \mathbb{R}_+$} where each edge $e\in E$ has a corresponding weight $c_e = c(e)$, i.e., the cost of sending a unit of mass using the edge $e$. Furthermore, endow the graph $\mathcal{G}$ with its natural metric $\mathsf{d}$ which measures the total weight of the shortest path between any two nodes in $\mathcal{G}$. We study the discrete flow (i.e., discretization in time) problem of optimally transporting an initial mass distribution $\mu \in \text{Prob}(V)$ to a target mass distribution $\nu \in \text{Prob}(V)$ using the graph $\mathcal{G}$. The associated weight of each edge allows us to define a cost matrix $C \in \mathbb{R}_{+}^{n\times n}$, where $[C]_{ji} = \mathsf{d}(j,i)$ indicates the cost of transporting a unit mass from node $j$ to node $i$. Moreover, we endow the space $\text{Prob}(V)$ of probability measures on $V$ with the \mbox{$1$-Wasserstein} distance between two probability distributions $\mu$ and $\nu$ on $\mathcal{G}$ as \begin{align*} W_1(\mu,\nu) & = \min_{\pi \in \Pi(\mu,\nu)} \sum_{x,y \in V} \mathsf{d}(x,y) \pi(x,y), \end{align*} where the minimizer (defined as the \textit{optimal transport plan}) is computed over all couplings on $V\times V$ with marginals $\mu$ and $\nu$, i.e., $\Pi(\mu,\nu) = \setb{\pi\in\mathbb{R}^{n\times n}_+ \,\,\big|\,\, \pi\boldsymbol{1} = \mu,\, \pi^\intercal\boldsymbol{1}=\nu}$. Our objective is to design a discrete flow $\{\rho_t\}_{t\geq 0}$ on $\mathcal{G}$, where $\rho_t \in \text{Prob}(V)$, by constructing a sequence of transport plans $\{\pi_t\}_{t\geq0}$ such that $\rho_0 = \mu$, $\rho_{t+1} = \pi_t \boldsymbol{1}$, $\rho_{t} = \pi_t^\intercal \boldsymbol{1}$ and $\lim_{t\to \infty} \rho_t = \nu$. Moreover, the transport cost at each iteration should be minimized and the desired sequence of transport plans is required to satisfy the following constraints imposed by the network: \begin{enumerate}[label=(\alph*)] \item\label{cons:a} A node can only send mass to its neighbors, i.e., $[\pi_{{t}}]_{ij} > 0 \ \ \text{if} \ \ [\rho_t]_j >0 \ \text{and} \ (j,i)\in E$. In other words, the flow should follow the sparsity pattern induced by the graph topology. Intuitively, a flow can only be assigned between two nodes if and only if there is an edge connecting them. Hence, for a transport plan $\pi_t$ it must hold that \mbox{$\textsc{supp}(\rho_{t+1}) \subseteq \{\textsc{supp}(\rho_t) \cup \{ j \mid (j,i)\in E \} \}$}. \item\label{cons:b} The mass sent over an edge cannot surpass the associated edge capacity, i.e., $\pi_t \leq \tilde{C}$, for a capacity matrix $\tilde{C} \in \mathbb{R}_{+}^{n\times n}$, where $[\tilde{C}]_{ij}$ is the capacity of the edge $(j,i) \in E$ (the inequality is understood element-wise). \item\label{cons:c} The mass at a node $i$ at some time instant $t \geq 0$ must not exceed its local storage capacity, i.e., $\rho_t \leq \rho$, for a vector of storage capacities $\rho \in \mathbb{R}_{+}^n$ (again, the inequality is understood entry-wise). \item\label{cons:d} The mass transported from a node $j$ to a node $i$ cannot exceed the mass held at node $j$, i.e., $[\pi_{{t}}]_{ij} \leq [\rho_t]_j$. \end{enumerate} \subsection{Wasserstein Attraction Flows} We formulate the dynamic transport problem described in Section \ref{sec:2.1} as a constrained Wasserstein attraction problem~\cite{PeyreGradientFlows}. Our main technical tool will be the JKO flow proximal operators which we introduce next. We first present the JKO flow proximal operator with respect to a functional $f$. For all $q \in \text{Prob}(V)$, \begin{align*} \text{Prox}^{W_1}_{\tau,f}(q) \triangleq \argmin_{p \in \text{Prob}(V)} \left\lbrace W_1(p,q) + \tau f(p) \right\rbrace, \end{align*} where $\tau$ is a step-size. Thus, starting from an initial distribution $\rho_0 = \mu$, the discrete JKO flow with respect to $f$ is defined as \begin{align}\label{eq:implGradSteps} \rho_{t+1} \triangleq \text{Prox}^{W_1}_{\tau,f}(\rho_{t}). \end{align} Wasserstein attraction refers to the flow generated by the implicit gradient steps in \eqref{eq:implGradSteps}, known as \textit{JKO stepping}, with respect to the potential function defined as $W_1(\rho_t,\nu)$ for some fixed distribution $\nu$. Informally, the potential function drives the flow to minimize its Wasserstein distance to a \textit{target} distribution. Thus, we define the WA discrete flow as \begin{align}\label{eq:nonreg_bar} \rho_{t+1} & = \text{Prox}^{W_1}_{\tau,W_1(\cdot,\nu)}(\rho_{t}) \nonumber \\ & = \argmin_{p \in \text{Prob}(V)} \left\lbrace W_1(p,\rho_t) + \tau W_1(p,\nu) \right\rbrace. \end{align} The WA defined in~\eqref{eq:nonreg_bar} has a precise optimization structure. However, the computation of each proximal operation is computationally intense~\cite{PeyreGradientFlows}. Moreover, the constraints imposed by the graph are not taken into account. In the next subsection, we describe our proposed approach for the efficient computation of the discrete WA, taking into account the constraints imposed by the network. \subsection{Approximate Wasserstein Attraction Flow on Graphs} Initially, we present the entropy-regularized discrete JKO flow for the WA problem following the ideas introduced in~\cite{PeyreGradientFlows}. The main contribution in~\cite{PeyreGradientFlows} is to replace the Wasserstein metrics with their entropy-regularized versions. \begin{defn} Given a cost matrix $C\in\mathbb{R}^{n\times n}_+$, the \textbf{discrete entropy-regularized Wasserstein distance} between $\mu,\nu \in \text{Prob}(V)$ is defined as \begin{equation}\label{eq:wass_dist} \mathcal{W}_\gamma(\mu,\nu) = \min_{\pi\in\Pi(\mu,\nu)} \esc{C}{\pi} + \gamma H(\pi), \end{equation} where $H(\pi) = \sum\pi_{ij}(\ln\pi_{ij}-1) = \esc{\pi}{\ln\pi - \boldsymbol{11^\top}}$ is the negative entropy and $\gamma\geq0$ is the regularization parameter. \end{defn} Now, we can define the approximate entropy-regularized WA flow as \begin{align}\label{eq:reg_bar} \rho_{t+1} & = \text{Prox}^{\mathcal{W}_\gamma}_{\tau,\mathcal{W}_\gamma(\cdot,\nu)}(\rho_{t}) \nonumber \\ & = \argmin_{p \in \text{Prob}(V)} \left\lbrace \mathcal{W}_\gamma(p,\rho_t) + \tau \mathcal{W}_\gamma(p,\nu) \right\rbrace. \end{align} Note $\mathcal{W}_\gamma(\cdot,\cdot)$ is a strictly convex and coercive function, therefore the operator in~\eqref{eq:reg_bar} is uniquely defined. Next, we state one important observation about the entropy-regularized WA flow in~\eqref{eq:reg_bar}. Without loss of generality, one can multiply the argument in the optimization problem~\eqref{eq:reg_bar} by a constant $\omega = 1/(1+\tau)$. Thus, we obtain \begin{align}\label{eq:reg_bar2} \rho_{t+1} & = \argmin_{p \in \text{Prob}(V)} \left\lbrace \omega \mathcal{W}_\gamma(p,\rho_t) + (1-\omega) \mathcal{W}_\gamma(p,\nu) \right\rbrace, \end{align} which is precisely the entropy-regularized Wasserstein barycenter between $\rho_{t}$ and $\nu$ \cite{cuturiFastWB}. Recall that for a finite set of probability distributions $\{\mu_i\}_{i=1}^m$ where \mbox{$\mu_i \in \text{Prob}(V)$}, the entropy-regularized Wasserstein barycenter is defined as \begin{align*} \mu \triangleq \argmin_{p \in \text{Prob}(V)} \sum_{i=1}^m \omega_i \mathcal{W}_\gamma(p,\mu_i), \end{align*} where $\omega_i \geq 0$ and $\sum_{i=1}^m \omega_i =1$. We interpret the Wasserstein attraction problem as the sequential computation of Wasserstein barycenters. This introduces an additional weight parameter that can be modified to give preference to one measure or the other. Such parameter consequently alters how the mass is transported across the graph. Approximate solutions to problems of the form~\eqref{eq:reg_bar2} can be efficiently computed by reformulating the entropy-regularized OT problem~\eqref{eq:wass_dist} as \begin{equation}\label{eq:IBP} W_\gamma(\mu,\nu) = \min_{\pi\in \Pi(\mu,\nu)} \text{KL}(\pi|\xi), \end{equation} where $\xi = e^{-C/\gamma}$ (entry-wise exponential)~\cite{IBP}. Note that~\eqref{eq:IBP} can be extended for higher dimensional arrays (such as the tuples $\boldsymbol{\pi} = (\pi_1,\ldots,\pi_m)$ introduced in the definition of the WB) by summing over the indices $(i,j,k,\ldots)$. Thus, following~\cite{IBP}, we can rewrite \eqref{eq:reg_bar2} as \begin{align}\label{eq:wasb_kl} \min_{\boldsymbol{\pi}\in \mathcal{C}_1\cap\mathcal{C}_2} \text{KL}_\omega(\boldsymbol{\pi}| \xi) {=} \omega \text{KL}(\pi_1|\xi) {+} (1{-}\omega)\text{KL}(\pi_2|\xi), \end{align} where \begin{equation}\label{eq:C1} \mathcal{C}_f = \setb{ \pi_1,\pi_2 \mid \pi_1\boldsymbol{1} = \rho_t, \pi_2\boldsymbol{1} = \nu}, \end{equation} \begin{equation}\label{eq:C2} \mathcal{C}_e = \setb{\pi_1,\pi_2 \mid \pi_1^\intercal \boldsymbol{1} = \pi_2^\intercal \boldsymbol{1} = p}. \end{equation} Finally, taking into account in Problem~\eqref{eq:wasb_kl} the constraints~\ref{cons:a},~\ref{cons:b},~\ref{cons:c} and \ref{cons:d} presented in Section~\ref{sec:2.1}, we can state our main contribution regarding the design of the entropy-regularized discrete WA flow. \begin{prob}\label{prob:prob_statement} Consider a discrete, finite, fixed and connected graph with $n$ vertices, $\Tilde{C}\in\mathbb{R}_+^{n\times n}$ the capacity matrix, and $\mu,\,\nu\in \text{Prob}(V)$ the initial and final distributions respectively. We design the sequence of probability measures $\{\rho_t\}_{t\geq 0}$ by finding, for each $t \geq 0$, the transport plan that solves the optimization problem \begin{subequations}\label{eq:prob_st} \begin{align} &\{\pi_t\} {=} \argmin_{\substack{\boldsymbol{\pi}\in\mathcal{C}_f \cap \mathcal{C}_e\\ \boldsymbol{\pi}\in\mathcal{C}_1 \cap\mathcal{C}_2 \cap \mathcal{C}_3 }} \omega \text{KL}(\pi_1|\xi) {+} (1{-}\omega)\text{KL}(\pi_2|\xi), \label{eq:prob_st_1}\\ \intertext{where} &\mathcal{C}_f = \setb{\boldsymbol{\pi}\in\mathbb{R}^{n\times n}_{+}{\times}\mathbb{R}^{n\times n}_{+} \mid \pi_1\boldsymbol{1} = \rho_t,\pi_2\boldsymbol{1} = \nu} \label{eq:prob_st_2}\\[3pt] &\mathcal{C}_e = \setb{\boldsymbol{\pi}\in\mathbb{R}^{n\times n}_{+}{\times}\mathbb{R}^{n\times n}_{+} \mid \pi_1^\intercal \boldsymbol{1} = \pi_2^\intercal\boldsymbol{1} = p} \label{eq:prob_st_3}\\ &\mathcal{C}_1 = \setb{\boldsymbol{\pi}\in\mathbb{R}^{n\times n}_{+}{\times}\mathbb{R}^{n\times n}_{+} \mid \pi_1 \leq \tilde C } \label{eq:prob_st_4}\\ &\mathcal{C}_2 = \setb{\boldsymbol{\pi}\in\mathbb{R}^{n\times n}_{+}{\times}\mathbb{R}^{n\times n}_{+} \mid \pi_1^\intercal \boldsymbol{1} \leq \rho,\pi_2^\intercal \boldsymbol{1} \leq \rho} \label{eq:prob_st_5}\\ &\mathcal{C}_3 = \bigg\{\boldsymbol{\pi}\in\mathbb{R}^{n\times n}_{+}{\times}\mathbb{R}^{n\times n}_{+} \mid [\pi_1^\intercal \boldsymbol{1}]_i {\leq} {\sum_{j : (j,i) \in E}} [\rho_t]_j \bigg\} \label{eq:prob_st_6} \end{align} \end{subequations} \end{prob} An important feature of the scheme presented, is that, unlike in the computation of the Wasserstein distance (or, for that matter, solving the MCFP), we do not compute the complete flow in a single step, which would also entail having to store the shortest path between each node (or at least the first step of each path). In this regard, our method not only does not need to store this additional information, but it is also \textit{memoryless}, in the sense that, at each step, the algorithm solves a new problem with initial and final distributions (hence it adapts to changes in the measures and parameters during the transport). Here lies the main difference between the flow we compute, which is discrete, and the one found by solving a MCFP, which is continuous. \section{Iterative Projections for the Computation of Transport Plans}\label{sec:3proposed_approach} Now that we have the necessary background on discrete OT and have introduced the problem we want to solve, we describe the approach that we propose. We will solve the regularized version of the WB problem, with the additional constraints~\eqref{eq:prob_st_4},~\eqref{eq:prob_st_5} and~\eqref{eq:prob_st_6}. To do so, we use a well-known algorithm for solving regularized OT problems called \textit{Dykstra's projection algorithm} \cite{Dykstra}, which, in our setting, is a generalization of the widely used Iterative Bregman Projections (IBP) algorithm \cite{IBP}. We use Dykstra's method because the convergence of IBP cannot be guaranteed in the presence of inequality constraints. In Section~\ref{sec:IBP_Dykstra}, we give some background on how this algorithm is used to compute the regularized WB. In Section~\ref{sec:cap_supp_constr}, we show how one can modify it to compute the WB with the added constraints, and finally, in Section~\ref{sec:descr_proposed_aproach}, we move on to the description of the proposed algorithm. \subsection{Computation of the WB Using Dykstra's Projection Algorithm} \label{sec:IBP_Dykstra} Dykstra's projection algorithm can be used to solve problems of the form \begin{equation*} \min_{\pi\in\cap_i\mathcal{C}_i} \text{KL}(\pi|\xi), \end{equation*} much like Problem \ref{prob:prob_statement} defined in Section \ref{sec:2prob_st}. It is based on the computation of the proximal operators for the KL divergence. This is done iteratively, cycling through each constraint set $\mathcal{C}_i$, and since $\mathcal{C}= \cap_i\mathcal{C}_i$ is a finite intersection of $L$ sets, we shall define, for every index $i$, $\mathcal{C}_{i+L} = \mathcal{C}_i$. Then, for each $k>0$ we compute \begin{equation*} \pi^{(k)} = \prox_{\iota_{\mathcal{C}_k}}^{\KL}\left(\pi^{(k-1)}\cdot q^{(k-L)}\right), \,\, q^{(k)} = q^{(k-L)}\frac{\pi^{(k-1)}}{\pi^{(k)}}, \end{equation*} with initial values $\pi^{(0)} = \xi \text{ and } q^{(0)} = q^{(-1)} = \ldots = q^{(-L+1)} = \boldsymbol{1}\boldsymbol{1}^\intercal$. The product and division of matrices are considered element-wise. We slightly abuse notation by omitting the step-size $\tau$ in the definition of the proximal operator, since we are multiplying the argument in the optimization problem \eqref{eq:reg_bar} by $\omega = 1/(1+\tau)$, as noted in Section \ref{sec:2prob_st}. The next propositions state how we can compute in closed form the proximal operator corresponding to each constraint in the WB problem~\eqref{eq:wasb_kl}. \begin{prop}[Proposition 1 in \cite{IBP}]\label{prop:prox_C1} The proximal operator of the indicator function $\iota_{\mathcal{C}_f}$, corresponding to the constraint set $\mathcal{C}_f$ in \eqref{eq:C1}, has the closed form \begin{equation}\label{eq:ProxC1} {\left[\prox_{\iota_{\mathcal{C}_f}}^{\KL_\omega}(\boldsymbol{\pi})\right]_l} {=} \prox_{\iota_{\{\pi_l\boldsymbol{1}{=}P_l\}}}^{\KL}\hspace*{-0.1cm}(\pi_l) {=} \text{diag}{\left(\frac{P_l}{\pi_l\boldsymbol{1}}\right)}{\pi_l}. \end{equation} \end{prop} \begin{prop}[Proposition 2 in \cite{IBP}]\label{prop:prox_C2} The proximal operator of the indicator function $\iota_{\mathcal{C}_e}$, corresponding to the constraint set $\mathcal{C}_e$ in \eqref{eq:C2}, has the closed form \begin{equation}\label{eq:ProxC2} \left[\prox_{\iota_{\mathcal{C}_e}}^{\KL_\omega}(\boldsymbol{\pi})\right]_l = \pi_l\text{diag}\left(\frac{p}{\boldsymbol{1}^\intercal\pi_l}\right), \end{equation} where ${p = \prod_{l=1}^m\left(\boldsymbol{1}^\intercal\pi_l\right)^{\omega_l}}$ (the products and exponentiation are considered element-wise), and $m=2$ in our case. \end{prop} \subsection{Capacity and Support Constrained WB} \label{sec:cap_supp_constr} In the context of networks, it is reasonable to restrict how much mass can be sent from one node to another, i.e. to add a capacity to the edges connecting the nodes. This constraint is imposed on each transport plan by defining a capacity matrix $\Tilde{C}\in\mathbb{R}^{n\times n}$ such that $[\Tilde{C}]_{ij}$ is the maximum mass that can be sent from node $i$ to node $j$. The following proposition concerns the computation of the proximal operator for the set $\mathcal{C}_1$ in~\eqref{eq:prob_st_4}. \begin{prop}[Section 5.2 in \cite{IBP}]\label{prop:prox_C3} The proximal map for the function $\iota_{\{\pi_1\leq \Tilde{C}\}}$ is defined as \begin{equation}\label{eq:proxC3} \prox_{\iota_{\{\pi_1\leq \Tilde{C}\}}}^{\KL}(\pi_1) = \min{\left(\pi_1,\Tilde{C}\right)}, \end{equation} with the minimum computed element-wise. \end{prop} We can also have capacity limits on some of the nodes, meaning that even though the optimal solution might send a certain amount of mass to one of these nodes, it may not be possible to hold that much quantity. This corresponds to the constraint set $\mathcal{C}_2$ in~\eqref{eq:prob_st_5}. We can adapt the results for partial transport problems in~\cite{IBP} for the computation of the projection on this set in closed form, as follows. \begin{prop}[Proposition 5 in \cite{IBP}]\label{prop:prox_C4} For the the indicator function $\iota_{\mathcal{C}_2}$, corresponding to the constraint set $\mathcal{C}_2$ in \eqref{eq:prob_st_5}, one has \begin{equation}\label{eq:proxC4} \begin{aligned} \left[\prox_{\iota_{\mathcal{C}_2}}^{\KL_\omega}(\boldsymbol{\pi})\right]_l &= \prox_{\iota_{\{\pi_l^\intercal\boldsymbol{1}\leq \rho\}}}^{\KL}(\pi_l)\\[5pt] &= \pi_l\emph{diag}\left(\min\left(\frac{\rho}{\pi_l^\intercal\boldsymbol{1}},\boldsymbol{1}\right)\right), \end{aligned} \end{equation} where the minimum and division of vectors are considered element-wise. \end{prop} \subsection{Description of the Proposed Approach} \label{sec:descr_proposed_aproach} Now, we can present the proposed algorithm to solve Problem \ref{prob:prob_statement}. We use Dykstra’s projection algorithm, and together with the support and capacity constraints, we can impose the additional restrictions that we introduced in the problem statement (Section \ref{sec:2prob_st}). Regarding the support constraint \eqref{eq:prob_st_6}, since nodes in $\textsc{supp}(\rho_t)$ can still send mass to non-neighboring nodes, our proposed fix is to take advantage of constraint $\eqref{eq:prob_st_4}$ and adapt it to circumvent this issue. We redefine the capacity matrix $\Tilde{C}$ for the transport plan $\pi_1$ from $\rho_t$ to $\rho_{t+1}$, such that for the nodes in the support of $\rho_t$, if there is no connection between one of them and another node, the ``link" between them has zero capacity, i.e., \begin{equation}\label{eq:cap_mat} [\Tilde{C}]_{ij} = \begin{cases} 0 \quad &\text{if } j \in \textsc{supp}(\rho_t) \text{ and } \Bar{A}_{ij} = 0, \\ [\Tilde{C}]_{ij} &\text{otherwise}.\end{cases} \end{equation} Algorithm \ref{alg:1} summarizes the proposed method. It is important to remark that our entropy-regularized approach does not allow the scheme to converge exactly to the target distribution $\nu$. Since the additional entropy term in the definition of the Wasserstein distance \eqref{eq:wass_dist} forces every node to send a small amount of mass to the rest, the solution obtained can be more or less diffused depending on the regularization strength $\gamma$. Moreover, we cannot guarantee the convergence of Algorithm \ref{alg:1} for a fixed weight $\omega$, and to our knowledge, there is no proof for it as of yet. However, if instead of taking fixed values for both $\gamma$ and $\omega$ we consider, at each step $t$, $\gamma(t), \, \omega(t)$ such that $\gamma(t),\,\omega(t)\to 0$ as $t\to+\infty$, we can ensure its convergence \cite{IBP}\cite{PeyreGradientFlows}. Despite that, in the simulations carried out in Section \ref{sec:4numerical_simulations}, we consider the weight $\omega$ to be both fixed and tending to zero since we have observed how, for a constant $\omega<1/2$, the mass reaches the target distribution as well. \algrenewcommand\algorithmicindent{1.0em}% \begin{algorithm}[t] \linespread{1.1}\selectfont \caption{Conceptual procedure of the proposed approach}\label{alg:1} \textbf{Input:} Initial and final distributions $\rho_0$ and $\nu$, adjacency matrix $A$, cost matrix $C$, vector of storage capacities $\rho$, regularization parameter $\gamma(t)$ and weight $\omega(t)$ depending on $t$ and such that $\gamma(t),\,\omega(t)\to 0$ as $t\to+\infty$, accuracy parameter $\varepsilon>0$ \begin{algorithmic}[1] \State $t = 0$ \While{$\frac{1}{2}\norm{\nu-\rho_t}_1 > \varepsilon$} \State Define the capacity matrix $\Tilde{C}$ as seen in \eqref{eq:cap_mat} \State Compute the WB $\rho_{t+1}$ with weights $\omega_1 = \omega(t)$ and \hspace*{\algorithmicindent}$\omega_2 = 1-\omega(t)$ and the additional support and capacity \hspace*{\algorithmicindent}constraints by using Dykstra’s projection algorithm \hspace*{\algorithmicindent}with initial conditions $\pi_1^{(0)} = \pi_2^{(0)} =e^{-\frac{C}{\gamma(t)}}$ \mbox{and the} \hspace*{\algorithmicindent}proximal operators defined on \eqref{eq:ProxC2}, \eqref{eq:ProxC1} and \eqref{eq:proxC4} \hspace*{\algorithmicindent}(with $\rho$) for both transport plans, and \eqref{eq:proxC3} only for \hspace*{\algorithmicindent}transport plan $\pi_1$ to enforce the capacity constraint \hspace*{\algorithmicindent}$\eqref{eq:prob_st_4}$ with capacity matrix $\Tilde{C}$ \State $t \gets t+1$ \EndWhile \end{algorithmic} \textbf{Output:} $\setb{\rho_t}_t$ \end{algorithm} We state the following lemma regarding the convergence of the computation of each intermediate distribution in the discrete flow. \begin{lem}\label{lemma:conv_prox} For each step $t$, let $\Tilde{C}$ be the capacity matrix defined in \eqref{eq:cap_mat} such that it verifies $\Tilde{C}^\intercal\boldsymbol{1}>\rho_t$, and let $\rho$ be the node capacity vector in the constraint set $\,\mathcal{C}_2$ such that $\rho_t < \rho$ (both inequalities are considered element-wise). Then, the iterative computation of the proximal steps in Propositions~\ref{prop:prox_C1}, \ref{prop:prox_C2}, \ref{prop:prox_C3} and \ref{prop:prox_C4} converges to the solution of~\eqref{eq:prob_st_1}. \end{lem} \begin{proof} The condition $\Tilde{C}^\intercal\boldsymbol{1}>\rho_t$ ensures that the mass defined by the initial distribution in the $t$-th step, $\rho_t$, can be moved or even kept still in some of the nodes in its support. Similarly, if $\rho$ verifies $\rho_t < \rho$, then the same initial distribution $\rho_t$ is a feasible solution. In particular, we have \begin{equation}\label{eq:lemma} \text{ri}(\mathcal{C}_f) \cap \text{ri}(\mathcal{C}_e) \cap \text{ri}(\mathcal{C}_1) \cap \text{ri}(\mathcal{C}_2) \cap \text{ri}(\mathcal{C}_3) \not=\varnothing, \end{equation} where $\text{ri}(\mathcal{C})$ is the relative interior of the set $\mathcal{C}$. Thus, by Proposition 3.1 in \cite{PeyreGradientFlows}, the iterative computation of proximal steps converges to the desired solution. \end{proof} \begin{rem} Note that the hypothesis in lemma \ref{lemma:conv_prox} can be changed, as long as \eqref{eq:lemma} holds true. \end{rem} \section{Case Study}\label{sec:4numerical_simulations} To show the effectiveness of the proposed approach, a simple case study of a drinking water network (DWN), is considered. Fig.~\ref{fig:DWN_small} depicts a basic topology of a drinking water transport network. Water is moved from the sources towards the network using manipulated actuators to fill retention tanks and/or supply water to demand sectors. The reader is referred to \cite{Ocampo-Martinez2013} for further details about this system. \begin{figure}[t] \centering \includegraphics[width=0.85\hsize]{DWN_small.pdf} \caption{Topology of the small DWN case study.} \label{fig:DWN_small} \end{figure} \begin{figure}[t] \centering \includegraphics[width=\hsize]{Example_small_DWN.pdf} \caption{Steps obtained for the small DWN case study.} \label{fig:Example_small_DWN} \end{figure} \begin{figure}[t] \centering \includegraphics[width=\hsize]{dist_small_DWN.pdf} \caption{(Left) Total variation distance between the distribution obtained at iteration $t$ ($\rho_t$) and the final distribution ($\nu$), and (right) cost of transportation for each iteration, for the example depicted in Fig. \ref{fig:Example_small_DWN} (for different weights).} \label{fig:tv_dist_small_DWN} \end{figure} Our objective is to find the (discrete) flow that moves the mass from an initial distribution (water provided by the treatment plants and reservoirs) to a target distribution (expected water in the reservoirs to cover the consumers' water demand) such that it follows the sparsity pattern and constraints induced by the network, and each step is the most cost-efficient (depending on the weight parameter $\omega$). Fig.~\ref{fig:Example_small_DWN} shows a simulation on the small network in Fig.~\ref{fig:DWN_small}, ignoring the pumps (which simply add an additional cost) and with no additional capacities on the edges and nodes, for simplicity. Here, we take advantage of the parameter $\omega$ to regulate how the water is transported. In particular, in the first step, we use a fairly high weight $\omega = 0.75$ in favor of the initial distribution so that the transportation is done more gradually. In the following steps, the weight is reduced to $\omega=0.1$, so that the demand is covered much faster. Fig.~\ref{fig:tv_dist_small_DWN} (left), shows the total variation distance between the intermediate distribution $\rho_t$ and the target measure $\nu$, for $\omega(t)$ tending to zero at different rates and also fixed at $\omega(t)=0.1$. In any case, we see how we eventually converge to the final distribution. For $\omega=0.1$, since it gives more weight to minimizing the distance to $\nu$ rather than the previous distribution, the mass advances faster until it covers the target in few iterations. Similarly, for $\omega(t)=1/t$, the weight decreases fast enough, and $\nu$ is covered in the same number of steps. For $\omega(t)=1/\ln t$, the decrease rate is slower, and it takes more iterations to cover the target, finally doing so in a single step. On the right plot, we have the Wasserstein distance of each step (the cost of transportation). We can reach the same conclusions we had with the total variation distance, but in particular, we notice how for $\omega(t)=1/\ln t$ the mass stays still until $\omega$ is small enough at the third iteration. Note how the memorylessness property of the proposed scheme is a useful feature to have in the context of DWN logistics, since it allows the algorithm to adapt to different changes as it advances (sudden peaks in demand, changes in the graph topology or other occurrences). To show the effectiveness of the proposed approach in a higher dimensional setup, a bigger version of a DWN, particularly the one corresponding to Barcelona (Spain) and its metropolitan area, is considered (see~\cite{Ocampo-Martinez2013} for a detailed illustration of the network). To perform the simulations, for the initial distribution $\rho_0$ we have taken the set of source nodes together with close to half of the total amount of tanks (selected at random), assigned them a value following a uniform distribution, and normalized the obtained vector so that $\rho_0\in \text{Prob}(V)$. The final distribution $\nu$ is computed following the same steps with the remaining tanks. For the nodes that are neither tanks nor sources, we have considered that those on the periphery have a retention capacity of $0.05$. For the weight parameter, we have tested it first with a small value $\omega = 0.1$ so that the final distribution is reached in fewer iterations, and then with a larger value $\omega=0.45$, so that the transport is slightly more gradual. Further below we also comment on the convergence when taking $\omega(t)=1/t$ and $\omega(t)=1/\ln t$. For comparison, the sequence $\setb{\rho_t}_{t\geq0}$ is found by solving Problem \ref{prob:prob_statement}, on one side with Algorithm \ref{alg:1}, using different values of the regularization parameter $\gamma$, and on the other, using the CPLEX solver, which uses the dual simplex algorithm with the default parameters (\texttt{MaxIter} $= 9.2234\times 10^{18}$, \texttt{TolFun} $= 10^{-6}$). Figure \ref{fig:method_comparison} shows on the top plot the total variation distance between the final distribution $\nu$ and the distribution obtained at every iteration with each method. We notice how with low regularization, the solution obtained is really close (in terms of the total variation distance) to the non-regularized solution obtained with CPLEX, as expected, but even with higher values of the regularization parameter ($\gamma = 1,\,10$), there are no noticeable differences, specially in the case with $\omega = 0.1$. However, with higher values ($\gamma=100$), even though the first iterations are close to the other results, the solution eventually becomes too diffused and is not valid in the setting of DWN. The bottom plot shows the running time of each iteration, i.e. the time elapsed to solve Problem \eqref{eq:prob_st} with the new distribution found in the previous step. As expected, the speed of convergence rapidly decreases as $\gamma \to 0$, which is a known issue with these kind of algorithms \cite{solomon2}. Nonetheless, having seen how with higher regularization, the results obtained are really close even to the CPLEX output, it would be safe to consider a small enough constant $\gamma$ instead of taking $\gamma(t)\to0$ as we do in Algorithm \ref{alg:1}, in exchange of higher performance speed and without losing too much accuracy. \begin{figure} \centering \includegraphics[width=\hsize]{method_comparison.pdf} \caption{Performance comparison between Algorithm \ref{alg:1} (using increasing values of the regularization parameter) and CPLEX, using $\omega = 0.1$ (left column) and $\omega = 0.45$ (right column). (Top) Total variation distance between the final distribution $\nu$ and the distribution obtained at iteration $t$ ($\rho_t$), (middle) cost of transportation for each iteration, and (bottom) time elapsed (in seconds) for each iteration (the plot is in logarithmic scale for visualization purposes).} \label{fig:method_comparison} \end{figure} Figure \ref{fig:convergence_graphs} shows the total variation distance between $\rho_t$ and $\nu$ at each iteration $t$, taking $\omega(t)=1/t$ (left) and $\omega(t) = 1/\ln t$ (right). As one might expect, since for $\omega(t) = 1/t$ the weight tends to zero at a higher rate, we reach the solution in fewer iterations than taking $\omega(t) = 1/\ln t$. Since the Barcelona DWN is highly connected to cover the whole city and metropolitan area and account for any incidents on the network, we have also carried out simulations in different graphs of similar dimensions (around $10^2$ nodes), shown in Figure \ref{fig:convergence_graphs} for comparison. In any case, we observe how the total variation distance eventually converges to zero, taking more steps for the case where the weight decreases slower ($\omega(t) = 1/\ln t$). \begin{figure}[t] \centering \includegraphics[width=\hsize]{convergence_graphs.pdf} \caption{Total variation distance between the final distribution ($\nu$) and the one computed at iteration t ($\rho_t$), with $\omega=1/t$ (left) and $\omega=1/\ln t$ (right), computed on different graphs, all of size $10^2$. $\gamma=10^{-1}$ for every case.} \label{fig:convergence_graphs} \end{figure} From the point of view related to the management of a DWN, the proposed approach opens new ways of improving existent management criteria in the sense of scalability and modularity of the control approaches \cite{Tedesco2018}, apart of adding robustness capabilities to the system. In any case, a straightforward comparison with existing methods for management and control of DWNs is nowadays not fair since our approach is presented as a proof of concept for the proposed objectives related to the case study, and then some additional design criteria should be considered. \section{Conclusions and Future Work}\label{sec:5conclusions} In this paper, we have presented a mathematical formulation to resolve discrete optimal flows over networks, based on the computation of constrained Wasserstein Barycenters. Using the entropically regularized approximation of the Wasserstein metric allows us to make use of Dykstra’s projection algorithm, which is easy to implement and is competitive in terms of performance speed since it only requires elementary operations such as matrix and vector products. Moreover, with this methodology, the solution obtained is unique. The scheme presented can be extended to consider more than two distributions and is able to adapt to different changes, thus, a new line of investigation could be to use the proposed approach to tackle problems involving decentralized or distributed models, where not all the information is available for every agent.
\section{Introduction} Recently, it has become apparent that non-Hermitian phenomena\cite{00018732.2021.1876991,PhysRevLett.120.146402,El-Ganainy2018} can be observed in single- or two-particle properties of correlated materials at equilibrium \cite{PhysRevB.98.035141,10.1093/ptep/ptaa059,Rausch_2021,PhysRevLett.121.026403,PhysRevB.99.201107,PhysRevB.101.085122,PhysRevLett.125.227204,Kozii_Fu,PhysRevLett.121.026403}. Ordinarily, non-Hermiticity has been connected to systems out-of-equilibrium experiencing gain and loss, e.g., photonic systems, open quantum systems\cite{Feng2017,El-Ganainy2018,Mirieaar7709}, mechanical systems\cite{PhysRevLett.125.118001,PhysRevB.100.054109}, and active matter\cite{PhysRevLett.123.205502,Sone2020}, leading to exciting phenomena, such as the emergence of exceptional points\cite{Heiss_2012,PhysRevB.99.041406}. Exceptional points are topologically protected band touchings, where the eigenvalues (energies) and the corresponding eigenvectors of the non-Hermitian Hamiltonian are equal. Furthermore, experiments have demonstrated the emergence of several spectacular properties at or close to exceptional points\cite{Zhou_2018,Ozdemir2019}, such as loss-induced transparency, unidirectional invisibility\cite{PhysRevLett.106.213901,Regensburger2012,Feng2013}, topological chirality\cite{PhysRevLett.86.787,Gao2015,Doppler2016,Xu2016,Yoon2018}, band merging\cite{Zhen2015}, and enhanced sensitivity\cite{Hodaei2017,PhysRevLett.112.203901,PhysRevLett.117.110802,Chen2017}. In correlated materials at equilibrium, non-Hermitian properties emerge due to the finite lifetime of quasiparticles in the single- or two-particle Green's functions\cite{PhysRevB.98.035141,10.1093/ptep/ptaa059,Rausch_2021,PhysRevLett.121.026403,PhysRevB.99.201107,PhysRevLett.125.227204,PhysRevB.103.125145,PhysRevB.99.121101,PhysRevB.100.115124,JPSJ.90.074703,PhysRevB.100.245205,PhysRevLett.126.176601}. Because Green's functions describe the material's response to an external perturbation and can be directly measured in experiments, the emergence of exceptional points is expected to affect experimental observations. For example, the single-particle Green's function can be observed in angle-resolved photoemission spectroscopy (ARPES) and tunneling experiments. It has been shown that exceptional points induce peaks in the observed spectral function. Furthermore, exceptional points have also been found in two-particle Green's functions, e.g., resulting in the appearance of Fermi arcs in the charge-structure factor \cite{Rausch_2021}. Notably, it has been demonstrated that the non-Hermitian Hamiltonian describing an open quantum system with loss and gain and the effective non-Hermitian Hamiltonian describing the single-particle Green's function are equivalent\cite{PhysRevLett.124.196401}. Thus, it should be possible to observe similar spectacular phenomena in the single-particle Green's function of strongly correlated materials as in photonic and open quantum systems. It has been shown that exceptional points can easily emerge in band structures of correlated materials hosting Dirac cones, where two noninteracting bands coalesce \cite{PhysRevB.98.035141,PhysRevB.99.201107}. In this situation, a small difference in the lifetime of the quasiparticles of these two bands will lead to a splitting of the Dirac cone and the emergence of two exceptional points connected by a Fermi arc. Even small correlation effects can induce this behavior. Thus, correlated systems hosting a Dirac point seem to be particularly interesting when studying non-Hermitian properties and exceptional points. One such type of material hosting Dirac cones and being correlated is that of a topological Kondo insulator. Here, Dirac cones emerge on the surface of the material. Furthermore, the Dirac cones are composed of weakly interacting conduction ($c$) electrons and strongly correlated $f$ electrons. Thus, the lifetimes of the bands forming the Dirac cones are different, satisfying the desired condition for exceptional points to appear. It has been shown that correlation effects are often stronger on the surface than in bulk due to the reduced coordination number \cite{PhysRevLett.114.177202,PhysRevB.93.235159}. Thus, one might expect that exceptional points emerge at the surface while the bulk is still insulating, which would make the observation easy. Moreover, Dirac cones on the surfaces of a 3D Kondo insulator exhibit a spin texture. This spin texture will be influenced by the exceptional points and can be used to detect them in experiments. Topological Kondo insulators thus seem to provide an exciting playground to study the emergence of exceptional points and the interplay between non-Hermitian properties induced by correlations and band topology. In this paper, we study non-Hermitian properties in a three-dimensional topological Kondo insulator. The noninteracting model hosts Dirac cones on each surface at $\vec k=(0,0)$, $\vec k=(\pi,0)$, and $\vec k=(0,\pi)$ of the surface Brillouin zone (BZ). Using dynamical mean-field theory (DMFT), we calculate a self-consistent self-energy of this model in a wide range of temperatures and study the emergence of exceptional points in the bulk and on the surface. We confirm that correlation effects are enhanced on the surface compared to the bulk, leading to the emergence of exceptional points pinned to the surface while the bulk is still insulating. However, contrary to previous studies \cite{PhysRevB.98.035141,PhysRevB.99.201107}, the Dirac cones themselves do not split and do not form exceptional points. Instead, we find that exceptional points are formed by hybridization between the states comprising the Dirac cones and other surface states. Finally, we analyze the impact of non-Hermiticity and exceptional points on the surface band structure and the surface spin texture. This paper is organized as follows: We introduce the model and the methods in the next section. This is followed by Sec. \ref{sec_bulk} describing our analysis of the bulk properties of this model. In Sec. \ref{sec_surface}, we show how non-Hermitian properties affect the surface band structure of the topological Kondo insulator, demonstrating the existence of exceptional points in the single-particle Green's function on the surface of the topological Kondo insulator. Finally, we summarize and conclude the paper. \section{Model and Methods} \label{sec_method} \subsection{Model Hamiltonian} To study the impact of non-Hermiticity on the single-particle properties of a topological Kondo insulator, we use the following model introduced in Refs.~\cite{PhysRevB.98.075104,PhysRevB.100.085124} \begin{eqnarray} H&=&H_0+H_{\mathrm{int}}\;,\\ H_0&=&\sum_{\vec k}\sum_{\sigma=\{\uparrow,\downarrow\}}\sum_{o=\{c,f\}}\epsilon^o_{\vec k}c^\dagger_{\vec k,\sigma,o}c_{\vec k,\sigma,o}\nonumber\\ &&+V\sum_{\vec k,\tau_1,\tau_2}c^\dagger_{\vec k,\tau_1,c}c_{\vec k,\tau_2,f}\sin k_x\sigma^x_{\tau_1\tau_2}\nonumber\\ &&+V\sum_{\vec k,\tau_1,\tau_2}c^\dagger_{\vec k,\tau_1,c}c_{\vec k,\tau_2,f}\sin k_y\sigma^y_{\tau_1\tau_2}\nonumber\\ &&+V\sum_{\vec k,\tau_1,\tau_2}c^\dagger_{\vec k,\tau_1,c}c_{\vec k,\tau_2,f}\sin k_z\sigma^z_{\tau_1\tau_2}\nonumber\\ &&+E_c\sum_{i,\sigma}n_{i,\sigma,c}\;,\\ \epsilon^c_{\vec k}&=&-2t\Bigl(\cos(k_x)+\cos(k_y)+\cos(k_z)\Bigr)\nonumber\\ &&+4t'\cdot\cos(k_x)\cos(k_y)\nonumber\\&&+4t'\cdot\cos(k_y)\cos(k_z)\nonumber\\&&+ 4t'\cdot\cos(k_x)\cos(k_z)\nonumber\\ &&+8t''\cdot\cos(k_x)\cos(k_y)\cos(k_z)\;,\\ \epsilon^f_{\vec k}&=&-0.1\epsilon^c_{\vec k}\;,\nonumber\\ H_{\mathrm{int}}&=&U\sum_i n_{i,\uparrow,f}n_{i,\downarrow,f}\;. \end{eqnarray} The operator $c^\dagger_{\vec k,\sigma,o}$ creates an electron with momentum $\vec k$, spin direction $\sigma$ in orbital $o\in\{c,f\}$. $\epsilon^o_{\vec k}$ describes the energy depending on the momentum for each orbital. $E_c$ is an energetical shift of the $c$ electrons. We include nearest-neighbor, next-nearest neighbor, and next-next-nearest neighbor hoppings on a cubic lattice and take the nearest-neighbor hopping $t$ as a unit of energy throughout this paper. The model respects inversion and time-reversal symmetry. We choose the parameters as $t'=t''=0.375t$ and $E_c=t$ resulting in a band structure similar to SmB$_6$. We find band inversions between the $c$ electrons and $f$ electrons at $(k_x, k_y,k_z)$=$(\pi,0,0)$, $(0,\pi,0)$, and $(0,0,\pi)$ in the Brillouin zone, identical to the situation in SmB$_6$. Due to the hybridization, $V$, between the $c$-electron band and the $f$-electron band, a gap opens in the bulk spectrum. Throughout this paper, we choose $V=0.8t$ and $U=16t$, which results in a strongly correlated insulating state at $T=0$. Thus, this model describes a strong topological Kondo insulator in 3D with inversion and time-reversal symmetry. We note that the results reported in this paper do not strongly depend on the choice of parameters as long as the model remains in the strong topological insulating phase. We note that at each momentum, the noninteracting model reads \begin{eqnarray} H_0&=&\sum_{i,j}\left(\epsilon^f c_{i,f}^\dagger c_{j,f}\delta_{ij}+\epsilon^c c_{i,c}^\dagger c_{j,c}\delta_{ij}\right.\\&&\left.+c_{i,f}^\dagger c_{j,c}\vec V\cdot \vec\sigma_{ij}+\text{h.c.}\right)\nonumber, \end{eqnarray} where $\vec V$ is a vector describing the hybridization between $c$ and $f$ electrons, and $i$, $j$ are spin indices. By rotating the spin quantization axis of the $c$- and the $f$-electron band in the direction of $\vec V$, only $\sigma_z$ appears in the rotated Hamiltonian, and the Hamiltonian is block-diagonal. Thus, regardless of the exact momentum dependence of $\epsilon^f_{\vec k}$, $\epsilon^c_{\vec k}$, and $\vec V_{\vec k}$, this Hamiltonian can be block diagonalized. \subsection{Dynamical Mean-Field Theory} To include correlation effects and calculate a self-consistent self-energy, we use DMFT\cite{RevModPhys.68.13}. DMFT maps each lattice site onto a quantum impurity model by calculating the local Green's function. DMFT calculates a frequency-dependent self-energy. Furthermore, DMFT can be easily extended to real-space DMFT, where each atom of a finite cluster or a slab is mapped onto its impurity model. This enables one to study models with open boundaries. In Sec. \ref{sec_bulk}, we perform calculations using DMFT for the bulk, where the self-energy of each atom is the same. The local Green's function is then calculated via integration over the whole BZ. In Sec. \ref{sec_surface}, we use real-space DMFT to analyze a slab of $20$ layers with open boundary conditions \cite{PhysRevB.93.235159,PhysRevB.98.075104}. By integrating over the slab's two-dimensional (2D) BZ, we calculate a local Green's function for each layer, map each layer onto its impurity model, and calculate the layer-dependent self-energy. To calculate the self-energy of a quantum impurity model, we use the numerical renormalization group (NRG)\cite{RevModPhys.80.395}, which is well suited for calculating real-frequency spectral functions and self-energies at low temperatures with high resolution around the Fermi energy for arbitrary interaction strengths. We note that we have used the same model and a combination of methods to study the magnetic properties of topological Kondo insulators\cite{PhysRevB.98.075104}. \subsection{Non-Hermitian properties in the single-particle Green's function} Single-particle properties of a correlated system are given by the retarded single-particle Green's functions, \begin{equation} G(\vec k,\omega)=\Bigl(\omega-H_0(\vec k)-\Sigma(\omega)\Bigr)^{-1}, \end{equation} where $\vec k$ is the momentum, $\omega$ the frequency, $\eta\rightarrow 0$ a convergence factor, $H_0$ the noninteracting tight-binding Hamiltonian, and $\Sigma(\omega)$ the retarded self-energy. $H_0$ and $\Sigma(\omega)$ are thereby in general matrices. Using DMFT, the self-energy is a momentum-independent diagonal matrix, ignoring nonlocal fluctuations. Thus, the Green's function can be written as \begin{equation} G(\vec k,\omega)=\left(\omega+i\eta-H_{\mathrm{eff}}(\vec k,\omega)\right)^{-1}, \end{equation} where $H_{\mathrm{eff}}(\vec k,\omega)=H_0(\vec k) + \Sigma(\omega)$ is an effective non-Hermitian Hamiltonian. The effective Hamiltonian is a non-Hermitian matrix because of the imaginary part of the self-energy corresponding to the lifetime of the particles. It may happen that this matrix is defective at certain points $(\vec k,\omega)$, i.e., the effective Hamiltonian cannot be diagonalized. At these points, $(\vec k,\omega)$, at least two eigenvalues and eigenstates of the effective Hamiltonian coalesce. We call these points exceptional points. The eigenvalues and eigenvectors of this effective Hamiltonian completely describe the single-particle Green's function. Away from the exceptional points, we can diagonalize the effective Hamiltonian as \begin{eqnarray} H_{\mathrm{eff}}\vert n_R\rangle&=&E_n\vert n_R\rangle,\\ \langle n_L\vert H_{\mathrm{eff}}&=&E_n\langle n_L\vert,\\ \langle n_L\vert m_R\rangle&=&\langle n_R\vert m_L\rangle=\delta_{nm}, \end{eqnarray} where $\vert n_L\rangle$ and $\vert n_R\rangle$ are the left- and right-eigenvectors of the non-Hermitian matrix $H_{\mathrm{eff}}$, respectively. $E_n$ is a complex-valued eigenvalue of the matrix. Furthermore, $\langle n_L\vert=\left(\vert n_L\rangle\right)^H$ and $\langle n_R\vert=\left(\vert n_R\rangle\right)^H$ hold, where the superscript $H$ is the Hermitian adjoint. Using these vectors, we can write the retarded Green's function as \begin{eqnarray} G_{ij}(\omega,\vec k)&=&\sum_n\langle i\vert n_R\rangle\frac{1}{\omega-E_n}\langle n_L\vert j\rangle, \end{eqnarray} where $i$ and $j$ are orbital and spin indices of the original model. Note that the eigenvectors and the eigenvalues depend on the momentum and the frequency. Besides being directly observable in ARPES and tunneling experiments, the single-particle Green's function also determines single-particle expectation values, such as the spin expectation value. In this paper, we will analyze the impact of non-Hermiticity in the spectral function and the impact on the spin expectation values that can be observed in spin-resolved ARPES. We can write the single-particle spectral function and expectation values using the left- and right-eigenvectors of the non-Hermitian matrix $H_{\mathrm{eff}}$, \begin{eqnarray} A_{ij}(\omega,\vec k)&=& -\frac{1}{\pi}\text{Im}\left(\sum_n\langle i\vert n_R\rangle\frac{1}{\omega-E_n}\langle n_L\vert j\rangle\right),\nonumber\\ \\ \langle\sigma^{x,y,z}\rangle(\omega,\vec k)&=&-\frac{1}{\pi}\text{Im}\sum_{ij} \left( \sigma^{x,y,z}_{ij}G_{ji}(\omega)\right),\nonumber\\ &=&-\frac{1}{\pi}\text{Im}\left(\sum_{ij} \sum_n\langle j\vert\sigma^{x,y,z}\vert i\rangle\right.\nonumber\\&&\quad\quad\quad\left.\times\langle i\vert n_R\rangle\frac{1}{\omega-E_n}\langle n_L\vert j\rangle\right),\nonumber\\ &=&-\frac{1}{\pi}\text{Im}\left( \sum_n\langle n_L\vert\sigma^{x,y,z}\vert n_R\rangle\right.\nonumber\\&&\quad\quad\quad\quad\quad\quad\times\left.\frac{1}{\omega-E_n}\right), \end{eqnarray} where $A_{ij}(\omega,\vec k)$ is the spectral function for orbitals $i$ and $j$ at frequency $\omega$ and momentum $\vec k$, and $\langle\sigma^{x,y,z}\rangle(\omega,\vec k)$ is the spin expectation value as observed in spin-resolved ARPES. $\sigma^{x,y,z}$ are the matrix representations of the spin operators for the noninteracting Hamiltonian $H_0$. We note that the eigenstates and eigenvalues depend via the effective Hamiltonian on the frequency $\omega$. Because the eigenstates of the effective Hamiltonian determine the spin direction of a photoelectron in ARPES at a specific frequency, we will later show the spin expectation values of the eigenstates. \section{bulk properties} \label{sec_bulk} \begin{figure}[t] \includegraphics[width=\linewidth]{Fig1.png} \caption{ Imaginary part of the bulk self-energy for different temperatures (a). Comparison between the imaginary part of the bulk and surface self-energy at $\omega=0$ (b). \label{Fig1}} \end{figure} \begin{figure}[t] \includegraphics[width=\linewidth]{Fig2.png} \caption{Momentum-resolved spectral functions in the bulk for three different temperatures, $T/t=0$ (a), $T/t=0.1$ (b), and $T/t=0.4$ (c). \label{Fig2}} \end{figure} \begin{figure*}[t] \includegraphics[width=0.32\linewidth]{Fig3a.png} \includegraphics[width=0.32\linewidth]{Fig3b.png} \includegraphics[width=0.32\linewidth]{Fig3c.png} \caption{Real part of the eigenvalues over the momentum of the effective Hamiltonian, $H_{\mathrm{eff}}(k_x,k_y,k_z=0,\omega=0)$, in the bulk for $T/t=0.0$ (a), $T/t=0.16$ (b), and $T/t=0.2$ (c). We show only a part of the BZ in (b) and (c) for better visibility of the non-Hermitian effect. \label{Fig3}} \end{figure*} \begin{figure}[t] \includegraphics[width=\linewidth]{Fig4.png} \caption{Real and imaginary part of the eigenvalues of the effective Hamiltonian for $\omega=0$ and $k_y=0.74$ and $k_z=0$ for different $k_x$ at $T/t=0.2$. This line of momenta goes through two exceptional points in the BZ. \label{Fig4}} \end{figure} In this section, we analyze the bulk properties of this model at finite temperatures. In particular, we demonstrate the appearance of exceptional points in the bulk spectrum around the Kondo temperature at which the system changes from insulating to metallic, which has also been shown for other $f$-electron systems in Ref.~\cite{PhysRevB.101.085122,PhysRevLett.125.227204}. We will show in Sec.~\ref{sec_surface} that exceptional points emerge at the surface of the material at a lower temperature than in the bulk. The imaginary part of the bulk self-energy for different frequencies and a comparison between the bulk and the surface self-energy at $\omega=0$ for different temperatures are shown in Fig. \ref{Fig1}. This imaginary part, which corresponds to an inverse lifetime of the quasiparticles, leads to the emergence of non-Hermitian properties in the single-particle Green's function. While the imaginary part vanishes at $\omega=0$ for $T=0$, it becomes large at finite temperatures. Furthermore, we see that the imaginary part of the self-energy is larger in magnitude on the surface than in the bulk, indicating that the surface is more strongly correlated than the bulk. This has also been found in a previous study \cite{PhysRevB.93.235159}. The effective Hamiltonian at the Fermi energy completely describes the single-particle properies of the material at the Fermi energy. We thus mainly focus on the properties of the effective Hamiltonian at $\omega=0$. Because the imaginary part of the self-energy vanishes at $T=0$ at the Fermi energy, the effective Hamiltonian at $T=0$ is just given by the noninteracting Hamiltonian, where energy levels are possibly shifted by the real part of the self-energy. In the current model, the hybridization between the $c$ and $f$ electrons leads to a gap at $\omega=0$ in the noninteracting Hamiltonian in the bulk. Thus, the effective Hamiltonian is gapped, and the system is insulating, as shown in Fig.~\ref{Fig2}. At high temperatures, on the other hand, the imaginary part of the self-energy becomes large. For a two-band model consisting of a noninteracting $c$-electron band and a correlated $f$-electron band, we can calculate the eigenvalues of the effective Hamiltonian in the limit of a very large imaginary part as \begin{eqnarray} H_{\mathrm{eff}}(\vec k,\omega=0)&=&\begin{pmatrix}\epsilon^c_k&V_k\\V_k^\star&\epsilon^f_k+\Sigma(\omega=0)\end{pmatrix}\\ \Rightarrow (E_1,E_2)&=&\left(\epsilon^c_k,\epsilon^f_k+\Sigma(\omega=0)\right)\quad\text{for Im}\Sigma\rightarrow\pm\infty.\nonumber \end{eqnarray} If the imaginary part of the self-energy becomes very large, the effect of the hybridization becomes negligible, and we find a unperturbed $c$ electron and a correlated $f$ electron. Thus, at high temperatures, when the imaginary part of the self-energy is large, the system becomes metallic with a Fermi surface given by the conduction electrons. The single-particle spectrum of the bulk consisting of four bands is shown in Fig.~\ref{Fig2} for three different temperatures. At $T=0$, the single-particle spectrum is gapped in the bulk. Because the imaginary part of the self-energy vanishes, $f$ and $c$ electrons can hybridize at the Fermi energy, $\omega=0$, and thus form a gap. With increasing temperature, the crossover from the insulating state at $T=0$ to a metallic state at high temperatures occurs. At high temperatures, $f$ electrons localize and thus cannot hybridize with the $c$ electrons at the Fermi energy. Thus, the $c$ electron bands span the gap, and the system becomes metallic. Recently, it has become clear that exceptional points appear in the single-particle spectrum close to the Fermi energy approximately around the Kondo temperature \cite{PhysRevB.101.085122}. Thus, we here analyze the energy eigenvalues of the effective Hamiltonian at the Fermi energy, $\omega=0$. Figure \ref{Fig3} shows the real part of the eigenvalues of the effective Hamiltonian for $k_z=0$ over $(k_x,k_y$). We see the existence of a gap at $\omega=0$. Because these eigenvalues completely determine the spectral function at $\omega=0$, we confirm that the system is insulating. Note that the gap size in Fig.~\ref{Fig3} appears larger than that in Fig.~\ref{Fig2}. The gap in Fig.~\ref{Fig2} appears smaller because the effective Hamiltonian changes with the frequency. Figure~\ref{Fig3}(b) shows the eigenvalues of the effective Hamiltonian for $T/t=0.16$ close to the Kondo temperature. While $H_0$ is the same as in Fig.~\ref{Fig3}(a), the self-energy has changed. The imaginary part of the $f$-electron self-energy results in the formation of "pockets" where the eigenvalues from the band below and above the Fermi energy approach each other. The momenta of these pockets are given by the minima of the hybridization along the lines of $\epsilon^c_{\vec k}=\epsilon^f_{\vec k}=0$ in the noninteracting Hamiltonian. Further increasing the temperature and thus the imaginary part in the self-energy leads to a merging of the pockets from below and above the Fermi energy, as shown in Fig. \ref{Fig3}(c). This merging leads to a line of momenta where the real part of the eigenvalues of the effective Hamiltonian is degenerate. Furthermore, at the edge of the pockets, the real and imaginary parts of two eigenvalues are equal, corresponding to an exceptional point in the effective Hamiltonian. The line inside the merged pockets, where the real parts of two eigenvalues are the same, is called a Fermi arc. Increasing the temperature above the Kondo temperature, the size of the pockets increases, and finally, pockets developing at different momenta merge. At this temperature, also the exceptional points merge and annihilate each other \cite{PhysRevB.98.035141}. To demonstrate the existence of these exceptional points, we show the eigenvalues of the bulk Hamiltonian along a straight line through the exceptional points at $k_z=0$ in Fig. \ref{Fig4}. We see that exactly at the same momentum, the real part and the imaginary part of the eigenvalues are the same. Thus, all bands are degenerate in the effective Hamiltonian at this point. We note that this cannot be an ordinary (Hermitian) degeneracy because the hybridization between the bands does not vanish at this momentum. Thus, this degeneracy originates in the non-Hermiticty induced by the imaginary part of the self-energy. \section{Non-Hermitian effects on the surface states} \label{sec_surface} \begin{figure}[t] \includegraphics[width=\linewidth]{Fig5.png} \caption{Real part of the eigenvalues of the effective Hamiltonian ($T/t=0.106$) for an open system consisting of $20$ layers focusing on $k_x\in[-1.5,1.5]$ and $k_y\in[-1.5,1.5]$ of the surface BZ. The bulk is still gapped at this temperature. Pockets in the band structure are visible at $(k_x,k_y)\approx(0,-0.9)$, $(-0.9,0)$, and $(0.9,0)$. The color is added for better visibility and corresponds to the distance from the origin. \label{Fig5}} \end{figure} \begin{figure}[t] \includegraphics[width=\linewidth]{Fig6.png} \caption{ Same as Fig.~\ref{Fig5} but for $T/t=0.11$.\label{Fig6}} \end{figure} \subsection{Energy spectrum of $H_{\mathrm{eff}}$} We now turn to the main results of this paper, i. e., how non-Hermiticity affects the surface states of a topological Kondo insulator. Previous calculations have shown that even a small difference in the lifetime of the particles forming a Dirac cone can result in the splitting of the Dirac cone and the formation of exceptional points connected by Fermi arcs \cite{PhysRevB.98.035141}. Thus, we next focus on the effect of non-Hermiticity on the surface states of this topological Kondo insulator. Due to the topology of this system, there are three protected Dirac cones on each surface with surface momentum $(k_x,k_y)=(0,0)$, $(\pi,0)$, and $(0,\pi)$. Furthermore, because the magnitude of the imaginary part of the self-energy at the surface is enhanced compared to the bulk, as shown in Fig. \ref{Fig1}, non-Hermitian effects can be expected to be stronger on the surface than in the bulk. We here ask whether the above scenario can apply for the surface Dirac states in the present system and how else non-Hermiticity affects the surface spectrum. In Fig.~\ref{Fig5}, we show the real part of the eigenvalues for a system with open boundaries in the $z$-direction consisting of $20$ layers at $T/t=0.106$. We here focus on the Dirac cone at the center of the surface BZ. We find a similar behavior for the Dirac cones located at $(k_x,k_y)$=$(\pi,0)$ and $(0,\pi)$. The structure of the eigenvalues in Fig.~\ref{Fig5} shows two notable features: a Dirac cone at $(k_x,k_y)$=$(0,0)$ and pockets in the eigenvalue structure of the effective Hamiltonian separated from the Dirac cone. The first observation is that the Dirac cone on the surface of this topological Kondo insulator is not strongly affected by the finite lifetime of the $f$ electrons at this temperature. This is contrary to the results in Ref.~\cite{PhysRevB.98.035141}, where the Dirac cone in the bulk of a 2D system splits by forming exceptional points. This difference can be explained in the following way: There is no effective hybridization between the lower and the upper part of the Dirac cone on the same surface. Analyzing the current model, we find that there would be a hybridization between the Dirac cone on the bottom surface and that on the top surface, but there is no hybridization between the two bands comprising the Dirac cone on the same surface. The hybridization between states on two different surfaces is too small to affect the results because of the distance between the surfaces. Thus, exceptional points cannot emerge within the Dirac cone because of the absence of hybridization between the surface states. The second notable feature is the appearance of pockets in the eigenvalue structure. These pockets, which are absent at $T=0$, are created by the non-Hermiticity similar to Fig.~\ref{Fig3}(b) in the bulk at $T/t=0.16$. The pockets in the eigenvalue spectrum with open boundaries appear at a much lower temperature than in the bulk, which can be explained by larger correlation effects on the surface. With increasing the temperature to $T/t=0.11$, as shown in Fig.~\ref{Fig6}, we see that the pockets from above and below the Fermi energy merge. The emergent structure points to the existence of exceptional points at the edges of the pockets, which can also be confirmed by showing the concrete level structure (see Fig.~\ref{Fig8}) and analyzing the eigenvectors of the effective Hamiltonian. Thus, exceptional points emerge on the surface of the topological Kondo insulator for much smaller temperatures and do not split the Dirac cone. \begin{figure}[t] \includegraphics[width=\linewidth]{Fig7.png} \caption{Real part of the eigenvalues of the effective Hamiltonian at $\omega=0$ and $T/t=0.106$. The color encodes the imaginary part of the eigenvalues. Furthermore, we include indices ($1$ or $2$) corresponding to the block of the block-diagonalized Hamiltonian, and mark degeneracies due to the absence of any hybridization by green circles and an 'H'. We also include the spin in the $y$-direction, $\langle \sigma^x\rangle$, of the surface states located on the bottom of the slab by blue arrows.\label{Fig7}} \end{figure} \begin{figure}[t] \includegraphics[width=\linewidth]{Fig8.png} \caption{Same as Fig.~\ref{Fig7} but for $T/t=0.11$. We mark a degeneracy in the real part due to non-Hermiticity by 'NH'. \label{Fig8}} \end{figure} \begin{figure}[t] \includegraphics[width=\linewidth]{Fig9.png} \caption{Same as Fig.~\ref{Fig7} but for $T/t=0.14$. \label{Fig9}} \end{figure} \subsection{Analysis of the degeneracies in the spectrum} A more detailed analysis of the eigenvalues including the spin expectation values of the eigenstates is shown in Figs. \ref{Fig7}-\ref{Fig9}. We show the real part of the eigenvalues close to the Fermi energy of the effective Hamiltonian at $\omega=0$ for different temperatures along the surface momentum from $(k_x,k_y)$=$(-\pi,0)$ via $(0,0)$ to $(\pi,\pi)$. Besides showing the real part of the eigenvalues, we also include the imaginary part as color. As explained above, the Hamiltonian can always be block-diagonalized. To better understand the effect of non-Hermiticity, we thus block-diagonalize the Hamiltonian and include an index corresponding to the block in Figs.~\ref{Fig7}-\ref{Fig9}. While bands with the same index lie in the same block, bands with different indices lie in separate blocks and thus do not couple. When taking into account energies of both blocks, all bands are degenerate. However, because of inversion and time-reversal symmetry in this model, degenerate surface states lie on opposite surfaces. Thus, by block-diagonalization, we can uniquely identify states on a specific surface of the topological insulator. Finally, we also include the spin expectation value in the $y$-direction, $\langle\sigma^y\rangle$, of these states as blue arrows. In Fig.~\ref{Fig7} at $T/t=0.106$, which is the same temperature as in Fig.~\ref{Fig5}, we see several band crossings. We see the Dirac cones at $(k_x,k_y)$=$(0,0)$ and $(-\pi,0)$ due to the topological properties. Analyzing the bands forming the Dirac cone at $(k_x,k_y)$=$(0,0)$ on the bottom surface of the slab, we see that both bands lie in different blocks of the block-diagonalized Hamiltonian. Thus, there is no hybridization between these states in the noninteracting and the effective Hamiltonian. As a hybridization between states is essential to form exceptional points, this explains why the Dirac cones do not split and do not form exceptional points in the presence of correlations, although they are made of particles with different lifetimes. We note that the possibility to block-diagonalize the Hamiltonian is completely general for a four-band model (consisting of two spinful bands) with inversion and time-reversal symmetry, as explained in the model section. Around $(k_x,k_y)$=$(-0.9,0)$ in Fig.~\ref{Fig7}, we see the appearance of the pockets at this temperature. The pockets are created by the band forming the lower part (block index $1$) of the Dirac cone at $(k_x,k_y)$=$(0,0)$, and a band originating from the bulk spectrum at $(0,0)$. We see that these bands have the same block index and thus hybridize with each other. Furthermore, we see that the band, forming the pocket above the Fermi energy at $(k_x,k_y)$=$(-0.9,0)$, crosses the band comprising the upper part of the Dirac cone at $(k_x,k_y)$=$(0,0)$ without hybridization. By analyzing the block indices of these bands, we see that these bands lie in different blocks and thus do not hybridize. In Fig.~\ref{Fig7}, we have marked Hermitian degeneracies due to the absence of hybridization by green circles and an 'H'. In Fig.~\ref{Fig8}, at $T/t=0.11$, the pockets from above and below the Fermi energy have merged and formed a point where the real parts of two eigenvalues are degenerate, denoted as 'NH' in this figure. Note that this non-Hermitian degeneracy is absent on the line from $(k_x,k_y)$=$(0,0)$ to $(\pi,\pi)$. Thus, when going around the center of the BZ, this line of real-part degeneracies has to end at some momenta, as visible in Fig.~\ref{Fig6}. These endpoints must be exceptional points. We have verified these exceptional points by confirming that the real and imaginary parts of the eigenstates are degenerate at these endpoints. We thus find exceptional points on the surface of the material emerging due to correlation effects. Further analyzing the imaginary part of the eigenstates forming the degeneracy at $(k_x,k_y)$=$(-0.9,0)$, we see that the imaginary parts of these bands are smaller in magnitude than that of the states comprising the Dirac cone at $(k_x,k_y)$=$(0,0)$, which will become important further below. At $T/t=0.11$ in Fig.~\ref{Fig8}, only the band contributing to the lower part of the Dirac cone at $(k_x,k_y)$=$(0,0)$ forms a non-Hermitian degeneracy. With increasing the temperature further to $T/t=0.14$, as shown in Fig.~\ref{Fig9}, the band contributing to the upper part of the Dirac cone also forms a non-Hermitian degeneracy at $(k_x,k_y)$=$(-1.74,0)$. While there is a degeneracy of the real part on the line of momenta from $(k_x,k_y)$=$(-\pi,0)$ to $(0,0)$ in the band with block index 2, it is absent on the line of momenta from $(k_x,k_y)$=$(0,0)$ to $(\pi,\pi)$, which points again to the existence of exceptional points. Besides these non-Hermitian degeneracies, there are several new Hermitian degeneracies between bands that do not hybridize. \subsection{Effect of the non-Hermiticity on the momentum-dependent spectral weight} \begin{figure}[t] \includegraphics[width=\linewidth]{Fig10.png} \caption{Surface spectral function for $\omega=0$ and the direction of the spin expectation values on the bottom of the slab as calculated from the Green's function for $T/t=0.01$. \label{Fig10}} \end{figure} \begin{figure}[t] \includegraphics[width=\linewidth]{Fig11.png} \caption{Same as Fig.~\ref{Fig10} but for $T/t=0.14$. We show the location of the exceptional points as red dots. We stress the two ring-like structures in the spectrum, visible as dark blue color, going around the origin of the BZ. \label{Fig11}} \end{figure} Finally, let us analyze the non-Hermitian effect directly on the single-particle Green's function as observable in ARPES. We show the spectral function of the single-particle Green's function at the Fermi energy for different temperatures in Fig.~\ref{Fig10} and \ref{Fig11}. We also include the spin expectation value as calculated from the Green's function. However, we only take into account electrons on the bottom surface of the slab by summing only over the lower half of the slab \begin{equation} \langle\vec \sigma\rangle=-\frac{1}{\pi}\text{Im}\sum_{ij<N/2}\vec \sigma_{ij}G_{ji}(\omega=0), \end{equation} where $i$ and $j$ are indices describing the orbital, spin, and layer of the system. For a system consisting of $N$ layers, we only sum over layers in the lower half of the system. We note that the spin expectation value of the full system vanishes as the top surface and the bottom surface have opposite spin expectation values. In Fig.~\ref{Fig10}, we show the spectral function at $T/t=0.01$. Clearly visible is the spectral weight created by the Dirac cones at $(k_x,k_y)$=$(0,0)$, $(\pi,0)$, and $(0,\pi)$. Focusing on the Dirac cone at $(k_x,k_y)$=$(0,0)$, we see that the spin rotates clockwise around the origin. Comparing with Fig.~\ref{Fig7}, we see that the Dirac cone is located slightly below the Fermi energy. The Fermi energy is located in the band forming the upper part of the Dirac cone, as shown in Fig.~\ref{Fig7}. The spin expectation value of this band (shown as an arrow in Fig.~\ref{Fig7}) exhibits a positive $\langle\sigma_y\rangle$ value for $k_x<0$ and a negative value for $k_x>0$, which explains the clockwise spin direction around $(k_x,k_y)$=$(0,0)$. This band mainly contributes to the spin expectation value seen in Fig.~\ref{Fig10}. With increasing the temperature to $T/t=0.14$, as shown in Fig.~\ref{Fig11}, the momenta with highest spectral weight (blue color) shift away from $(k_x,k_y)$=$(0,0)$. This is an interesting feature as we see in Fig.~\ref{Fig9} that the position of the Dirac cone does not change with increasing temperature. However, Fig.~\ref{Fig9} reveals the existence of bands crossing the Fermi energy at $(k_x,k_y)$=$(-1.74,0)$, $(-1,0)$, and $(0.75,0.75)$ due to non-Hermitian effects. Furthermore, the imaginary part of the bands forming the Dirac cone is much larger in magnitude than the imaginary part of the bands crossing the Fermi energy away from $(k_x,k_y)$=$(0,0)$. Thus, the spectral weight of the Dirac cone is smaller than that of the bands crossing the Fermi energy away from $(k_x,k_y)$=$(0,0)$. These bands create two rings around the center of the BZ in the spectral function, as shown in Fig.~\ref{Fig11}. In Fig.~\ref{Fig9}, we see that these bands have a large velocity compared to the bands comprising the Dirac cone. The situation described here is identical to the phenomenon called surface Kondo breakdown in Refs.~\cite{PhysRevLett.114.177202,PhysRevB.93.235159}. The heavy Dirac cone (small velocity) becomes invisible in the single-particle spectral function and is replaced by bands with large velocity. By analyzing the effective non-Hermitian Hamiltonian, we understand that the Dirac cone still exists at $(k_x,k_y)$=$(0,0)$ but is smeared out due to a large imaginary part. The light states are created by a non-Hermitian effect suppressing the hybridization between different surface states. Using the eigenstates of the effective non-Hermitian Hamiltonian describing the Green's function, as shown in Fig.~\ref{Fig9}, we can also understand the spin expectation values in Fig.~\ref{Fig11}. The spin direction of the band with the smaller imaginary part (longest lifetime) causing the degeneracy at $(k_x,k_y)$=$(-1,0)$ rotates clockwise, and the spin direction of the band with the smaller imaginary part creating the degeneracy at $(k_x,k_y)$=$(-1.74,0)$ rotates anticlockwise, as shown in Fig.~\ref{Fig9}. We thus understand the emergence of the two rings of high spectral weight in Fig.~\ref{Fig11}, where the spin direction rotates clockwise for the inner ring and anticlockwise for the outer ring. Finally, as noted above, the degeneracy in the real part that exists in the band with index $2$ between $(k_x,k_y)=(-\pi,0)$ and $(0,0)$ is absent on the line between $(k_x,k_y)=(0,0)$ and $(\pi,\pi)$. Thus, there are line segments in the BZ that end in exceptional points. In Fig.~\ref{Fig11}, we show these exceptional points as dark red dots. These exceptional points lie on the surface of the material. Furthermore, because the surface is more strongly correlated than the bulk, the bulk is still insulating and does not form non-Hermitian degeneracies. As expected from the analysis in Fig.~\ref{Fig9}, these points lie in the outer circle going around the center of the BZ. This ring exhibits variations of spectral weight depending on the momentum. These variations originate in the changes of the imaginary part of the band and the sudden change of the band structure at the exceptional points at which the band degeneracy suddenly vanishes. Furthermore, close to these exceptional points, the spin direction visible in the outer ring becomes very small and seems to end. We believe that these variations of spectral weight and the spin expectation values yield the necessary clues to identify exceptional points in the single-particle Green's function of correlated materials. \section{Conclusions} \label{sec_conclusions} We have analyzed non-Hermitian properties of a topological Kondo insulator in 3D. Using numerical calculations, we have confirmed that the crossover from localized $f$ electrons at high temperatures to hybridized $f$ electrons at low temperatures is a non-Hermitian effect accompanied by the appearance of exceptional points in the single-particle Green's function \cite{PhysRevB.101.085122}. Because correlation effects are stronger on the surface than in the bulk, exceptional points emerge on the surface while the bulk is still insulating. We found that the surface Dirac cones are stable against non-Hermitian effects, although comprised of particles with different lifetimes. This stability can be explained by the absence of hybridization between the states comprising the Dirac cone in this time-reversal and inversion symmetric system. Thus, exceptional points on the surface of the material form away from the Dirac cone by hybridization between different surface states. Notably, the emergence of exceptional points located on the surface is related to the surface Kondo breakdown investigated in previous studies \cite{PhysRevLett.114.177202,PhysRevB.93.235159}. While the states forming the Dirac cone acquire a large imaginary part and are smeared out, two new bands with a small imaginary part are created due to the non-Hermiticity of the effective Hamiltonian. These bands become visible in the single-particle spectral function. Furthermore, we have analyzed the spin texture arising due to the topological surface states and non-Hermiticity and found that the surface states inherited from the non-Hermiticity have opposite spin directions. In summary, we believe that topological Kondo insulators host an ideal platform to study non-Hermitian effects in correlated materials. These materials provide exceptional points at the surface while the bulk is insulating, and the states due to non-Hermiticity exhibit a spin texture that can be used to detect those states. Finally, our analysis based on the effective non-Hermitian Hamiltonian has been shown to be a powerful tool to detect and understand changes in the single-particle spectral function, such as the surface Kondo breakdown. \begin{acknowledgments} RP would like to thank Youichi Yanase for fruitful discussions. This work is supported by the WISE program, MEXT, and by the following JSPS KAKENHI grants No. 20J12265, No. JP18K03511, No. JP19H01838, No. JP21K13850, and No.~JP20H04627. Computer simulations were done on the supercomputer of Tokyo University at the ISSP. \end{acknowledgments}
\section{Introduction} Supercomputers are experiencing substantial changes. The new hardware resources, such as burst buffer, are emerging. As new resources are incorporated into the system, schedulers need to consider new resources in decision making process. At the same time, the hardware structures are changing rapidly. For example, the shared network structures, such as Dragonfly and fat tree, are widely adopted in new generation supercomputers. The changes in hardware structures complicate the scheduling problem, especially when the hardware becomes sharable. Sharing resources is one of the most effective methods to improve resource utilization, but it also brings many issues, such as resource fairness and resource contention. Without scheduling shared resource properly, system performance is suffered from resource contention and fairness will be hurt too. In order to fully utilize resources, schedulers are required to keep up with the changes in hardware. The substantial improvement in hardware drives users to submit more complex problems. For example, supercomputers having GPU attract deep learning projects, which require a massive number of threads to tolerate latencies. Supercomputers with burst buffer enable data-intensive applications, such as scientific simulations, to execute. Schedulers are responsible for monitoring and cooperating resources in a system to support rapid service to users. Without central control from schedulers, jobs could easily fail and the failure could propagate to the whole system. The hardware updates cause users to change their behavior to adapt to these changes. For example, the runtime variability brought by sharing network makes users more conservative in job runtime prediction \cite{Li1}. As supercomputers become more powerful, users tend to submit jobs more frequently. Schedulers need to detect the changes in user behavior and adjust scheduling policies in order to maintain good performance. In light of these challenges, studies in modern schedulers develop various methods to improve system efficiency and individual job performance. These goals of the methods can be roughly divided into groups: fairness, resource utilization, job performance. However, these goals are often conflicting. In this chapter, I review modern scheduling methods focusing on the applicability of the schedulers. In addition, an intelligent HPC job scheduling framework is proposed to address these issues. The remainder of this chapter is organized as follows. I first review the existing HPC scheduling algorithms. I then introduce the proposed intelligent HPC job scheduling framework. Finally, I conclude this chapter. \section{HPC Scheduling Algorithms}\label{HPC Scheduling Algorithms} \subsection{Scheduling Algorithms on Production Systems} Job scheduling in HPC is responsible for ordering jobs in waiting queue and allocating jobs to resources according to site policies and resource availability. In HPC, the well-known job schedulers include Slurm, Moab/TORQUE, PBS, and Cobalt. Similar to HPC job schedulers, cluster schedulers, such as Apollo, Mesos, Omega, and YARN, basically play the same role in a system. The main difference between HPC schedulers and cluster schedulers is that the infrastructures they served are different. HPC facilities are designed to serve big scientific and engineering applications that are impossible to run on other systems, while commercial clusters are inclined to serve big data applications. The scheduling algorithms used on both HPC systems and clusters are simple. The most widely adopted scheduling policies used on production HPC systems is FCFS (first-come first-served), which sorts waiting jobs in the order of their arrival times. For some leadership computing facilities, their main goals are enabling large jobs to run. Hence, jobs consuming more system resources have higher priorities to execute. For example, ALCF (Argonne Leadership Computing Facility) adopts a utility-based scheduling policy, named WFP, which favors large and old jobs in the queue \cite{Fan2}. Backfilling is a common strategy used in production HPC scheduling in order to enhance system utilization \cite{Tsafrir2007, Tsafrir2006}. The most widely used backfilling strategies are EASY backfilling and conservative backfilling. EASY backfilling allows waiting jobs to skip ahead under the condition that they do not delay the job at the head of the queue. Conservative backfilling has the stricter condition that jobs can be backfilled only if they do not delay the preceding jobs. Because clusters serve a different purpose than HPC systems, cluster schedulers concentrate on providing satisfactory service to all users by fair sharing the resources in a system. \subsection{Hierarchical Scheduling Framework vs. Distributed Scheduling} The ever-increasing HPC system scale poses a serious challenge to modern HPC scheduling. The current central scheduling model cannot keep up with the challenge of the increasing complexity of resource constraints. The emergence of hierarchical scheduling framework expands the traditional schedulers’ view beyond the single dimension of nodes. Flux is a good representative example of hierarchical schedulers \cite{Ahn}. In Flux, each job is an instance of the scheduling framework, which can launch many small and high-throughput sub-jobs. Therefore, it combats the issue of scalability that exists in many modern HPC schedulers. Resource management in Flux is operated at large granularity and it can move resources between child jobs. Because of the recursive feature of the hierarchical scheduling framework, it can be extended to schedule emerging resources with small changes. Besides the hierarchical scheduling framework, the distributed scheduler is another scheduling framework to overcome the problem of scalability \cite{Dogar}. In a distributed scheduler, each job waiting in the queue are assigned to a distributed scheduler, which has their own resources. The resource exchanges are done by communication between distributed schedulers. The advantage of distributed schedulers is their scalability, because they require even less computation and memory than hierarchical scheduler, but the downside is the inefficiency of using system resources due to the isolation of system resources. \subsection{Multi-Resource Scheduling} Multi-resource scheduling is a research topic in HPC scheduling that raises more attention in recent years. This is because increasing more resources are incorporated into the next-generation HPC systems \cite{Hung, Qiao1, Qiao2, Fan3, Fan7}. A large body of multi-resource scheduling focuses on power and compute resource scheduling \cite{Zhou, xu01, Topper, Patki, Mammela, Guzek}. This requires the trade-off between power and performance in decision making. For example, Wallace et al. addressed the power-aware scheduling problem in HPC by optimizing compute node utilization with the power constraint \cite{Wallace}. This solution prefers to compute node utilization over power constraint. In multi-resource cluster scheduling, fairness is more important than other factors. Dominant Resource Fairness (DRF) is a strategy to achieve fair allocation of various resources to users \cite{Ghodsi}. Although DRF maximizes resource fairness in a system and therefore obtains user satisfaction, much recent research found that fair sharing and high utilization are conflicting goals and aggressively using fair sharing have a negative effect on resource utilization. In order to address this challenge brought by fair sharing, some studies make tradeoffs between fairness and utilization. For example, Grandl et al. leveraged a multi-dimensional bin packing algorithm to improve resource utilization and then used a knob to balance resource utilization and fairness \cite{Grandl2014}. The advantage of using the bin packing algorithm is its speed, but it is also a greedy algorithm which allocates jobs in a one-by-one manner based on isolated job information. In an HPC system, a scheduler has more time to make scheduling decision but are required to make the best use of various resources compared to cluster scheduling. Therefore, multi-resource HPC scheduling demands more complicated scheduling methods. Optimization methods, especially multi-objective optimization methods, are leveraged to achieve better system performance in HPC scheduling \cite{Fan3, Fan4, Fan7}. \subsection{Energy-, Power-, Cooling-Aware Scheduling} Energy consumption in HPC and datacenters raise great attention in recent years. As HPC systems and datacenters become increasingly more powerful, one side effect is that the generated power cannot keep up with their consumption rate. For example, in 2014, data centers in the U.S. consumed 1.8\% of the total electricity consumption (70 billion kWh of energy). Because energy expense is becoming an increasingly dominant portion of the operation cost in HPC and data centers, data centers and HPC systems attempt to reduce energy consumption without hurting performance through more effective job scheduling strategies and more energy efficient hardware. The Dynamic Voltage and Frequency Scaling (DVFS) is technique widely studied in the literature \cite{Lee}, which adjusts power and speed settings on a computing device’s various processors, controller chips and peripheral devices to optimize resource allotment for tasks and maximize power saving when those resources are not needed. In addition, shutting down unused hardware is another effective way of lowering power consumption. However, this method comes at the cost of waste system resources. The time of turning on hardware resources can cause a delay in latency-critical jobs and tasks. Although, this approach is widely studied but it rarely used in real systems. In recent decades, usage of renewable and sustainable energy source to replace traditional energy, such as fossil fuels, is a hot topic. Renewable energy is energy that is collected from renewable resources, which are naturally replenished on a human timescale, such as sunlight, wind, rain, tides, waves, and geothermal heat. Although there is a great promotion in using renewable energy, renewable energy only contributed 19.3\% to humans' global energy consumption in 2017. Therefore, in recent years, HPC and data center facilities try to cut their traditional energy consumptions \cite{Pahlevan, Kong, Devabhaktuni, Garg, Goiri, Kliazovich}. Therefore, there is a research area focusing on maximizing resource consumptions from renewable energy so as to reduce energy consumption from traditional energy sources. Besides energy costs are fluctuating, the energy price is often low at night when the energy consumption is lowest in general, while the price is high during the daytime. In order to save energy costs, scheduling methods are developed to use more energy when the energy costs are low and decreasing energy consumption when the energy price is high \cite{xu01}. \subsection{HPC Failures and Scheduling} As the size of HPC systems increases drastically in recent years, failures in HPC systems increases accordingly. One of the most important factors of increasing application failures is the increase in application sizes. Any hardware failure can cause application failure \cite{Tang, Vinay, Kumar}. A large application using many resources in a system such as compute resource, the network resource is more likely to meet hardware failure than a small application \cite{Webb}. Aging is another factor that causes failures of HPC applications. For example, Zimmer et al. analyzed the relationship between GPU aging with the reliability of HPC jobs on Titan \cite{Zimmer}. The analysis presents that large applications (use more than 20\% of machine resources) encounter a higher level of application failures. Therefore, in their work, they replaced 50\% of aged GPUs and employed techniques to use low- failure GPUs to run large jobs through targeted resource allocation. By deploying the techniques in a real HPC system, Titan, they demonstrated the positive impacts of age-aware resource allocation policy. To tolerate failures in the HPC environment, applications can implement checkpoint technique, which pauses the application and then copies all the required data from the memory to reliable storage and then continues the execution of the application. In case of failure, the application could restart from the latest checkpoint from the stable storage and execute from there. Therefore, the checkpoint technique avoids the trouble of starting from scratch. Checkpointing uses many system resources, such as memory, network, and storage system. Therefore, the best checkpoint frequency raises much research interests in recent years \cite{Gomez, Fan8}. Frequent checkpointing introduces too many overheads to an application; however, if this application fails, it can be restarted from a very recent point. There are two checkpointing levels: global checkpointing and local checkpointing. Local checkpointing is light-weighted, which only copies memory within a node or a group, while global checkpointing copies the whole application’s memory and it requires global consistency. However, local checkpointing can only recover local hardware failures. If the cascading failures happened, the application has to roll back to the latest global checkpoint. Because checkpointing consumes resource times, it needs to be considered into scheduling. For example, when users make their runtime estimates on their jobs, if they use checkpoints, they need to take the time consumed by checkpoints into consideration. In addition, checkpointing operation consumes system resources, such as memory for local checkpointing and network, I/O and storage resources. When users reserve their resources at job submission, they need to estimate the additional resources consumed by checkpointing operations. \subsection{Backfilling and User Runtime Estimates} Backfilling is a common strategy used by production HPC facilities. The widely known backfilling strategies are EASY backfilling and conservative backfilling. EASY backfilling is the easiest to implement and it produces good scheduling results on production systems, and therefore it is the most widely used strategy. Besides these two backfilling strategies, there are some other strategies proposed to improve the performance of backfilling. One of the most effective methods is to improve user runtime estimates. User runtime estimate is the upper bound of a job’s runtime. If a job needs more than this upper bound, this job will be killed by the scheduler. This phenomenon is called underestimation. If a job finished before it reaches this upper bound, this user overestimates this job. The accuracy of user runtime estimate (defined as $\frac{Job\_Actual\_Runtime}{Job\_Runtime\_Estimate}$) is very important factors in scheduling, because all scheduling decisions are made based on user provided runtime estimates. However, user provided runtime estimates are proved to be very inaccurate. Based on the previous studies, the average accuracies of job runtime estimates on many production systems are less than 60\% \cite{Fan1}. Scheduling decisions made by on these inaccurate runtime estimates cause many scheduling performance problems, such as low resource utilization, backfilling and job priority issues. Therefore, it is crucial to provide more accurate runtime estimates. There are several methods in literature to improve user runtime estimates. With the widely used of machine learning algorithms in various scientific fields, there are several attempts to leverage machine learning algorithms to predict job runtimes \cite{Fan1,Gaussier}. The basic idea of these machine learning approaches is to extract features and make job runtime predictions from user inputs, such as job runtime estimates and job size, and historical job information, such as the job runtimes from the same user and project. For example, Gaussier et al. leveraged an online linear regression model to predict job runtime \cite{Gaussier}. Fan et al. extended Tobit model to balance runtime prediction accuracy and underestimation rate \cite{Fan1}. Improving runtime estimates is one way to enhance scheduling performance, optimizing backfilling is another effective way to improve system resource utilization. The traditional backfilling strategies (EASY backfilling and conservative backfilling) picks jobs to backfilled from the front of the queue. Once they find a job that fit the hole in the schedule, they will backfill this job immediately. However, this selection approach may miss the best matching jobs. In addition, to avoid jobs to be killed by systems due to underestimation, methods are used to correct prediction adaptively and this approach allows users to provide more accurate runtime estimates. \subsection{Scheduling Moldable and Malleable Jobs} Based on who decides the number of nodes and when it is decided, HPC jobs can be classified into four categories: rigid, evolving, moldable, and malleable. For rigid and evolving jobs, users decide how many nodes to be used. For rigid jobs, the decisions are made at submission, while for evolving jobs, users can change their node requests during execution. For moldable and malleable jobs, users specify a range of nodes a job can be run on and the scheduler decides how many nodes to be used. For moldable jobs, the scheduler makes decisions at submission. Malleable jobs are those which can dynamically shrink or expand resources on which they are executing at runtime. Executing moldable and malleable jobs can potentially improve system utilization and reduce average response time \cite{Fan9}. Executing those jobs are challenging for HPC systems and schedulers. At present, most HPC facilities do not support moldable and malleable jobs. First, the nature of HPC applications makes it difficult to change job size during execution. Most HPC applications have intensive communication between nodes, which makes dynamically changing job size very difficult \cite{Qiao1, Qiao2}. Second, this requires HPC schedulers to be adaptive and monitor system status. Therefore, enabling malleable jobs on HPC systems demands HPC schedulers to do more jobs in a very short time. Despite the forehead mentioned challenges, there are studies attempting to scheduling malleable jobs in order to improve system performance \cite{Gupta, Sadykov}. \subsection{Workflow Scheduling} Data-intensive data analysis applications often utilize a workflow that contains tens or even hundreds of tasks. Jobs are made of stages, such as map or reduce, lined by data dependencies. When a task has all the required input data ready, it will be allocated resources to execute. The input data is stored in file systems and is divided into multiple chunks, each of which is typically replicated three times across different machines. Therefore, executing these data-dependent tasks need to follow the strict order feed by users. In addition, choosing the location for each task is critical for efficiency in executing jobs. Schedulers prefer to execute tasks on the machines that have a copy of the input data, because local access of input data could save the time on transfer input on network. It is also beneficial to the whole systems, because it reduces the amount of data moved in a global network \cite{Jalaparti}. Therefore, there are some studies concentrating on improving data locality in scheduling \cite{Ahmad, Caniou, Masdari, Estrada}. For example, Quincy attempts to balance between latency and data locality of all runnable tasks \cite{Isard}. The data locality of MapReduce jobs can be improved by scheduling both map and reduce tasks of one job on the same rack. Corral achieves better data locality by coupling the placement of data and compute nodes. Data analysis applications are often delay-sensitive, which means it is crucial for meeting the deadlines of these workflows. Workflow scheduling problem is known to be NP-complete in general. Scheduling algorithms often utilize heuristics and optimization techniques to try to obtain a near optimal scheduling decision. Hadoop is a popular map-reduce implementation deal with independent map-reduce tasks. To meet deadline satisfaction, a large body of studies concentrate on giving higher priorities to time-sensitive tasks and delay other tasks or jobs in a system so as to reduce deadline violations of time-sensitive tasks. Delay scheduling meet the deadline via another approach, which allows time-sensitive tasks to wait for a certain amount of time and this increases the chance of finding a better allocation for time-sensitive tasks that can store data locally \cite{Zaharia}. Apache Oozie is a workflow scheduler for Hadoop jobs, which presents workflow tasks as Directed Acyclic Graphs (DAGs).Oozie combines multiple jobs sequentially into one logical unit of work, and gives the provision to execute tasks which are scheduled to run periodically. \section{Overview of Proposed Job Scheduling Framework} The challenges faced in today’s job scheduling in HPC and data centers demand more intelligent schedulers to make smarter scheduling decisions. Therefore, I extend the modern scheduling framework for job scheduling in HPC, which comprises of a resource manager, a job manager, a scheduling decision maker, a system performance monitor, and a job performance monitor. The functions of these models are explained as follows: \begin{enumerate} \item Resource manager: Unlike the traditional resource manager which only manages nodes, the next-generation resource managers are responsible to monitor the status of various schedulable resources in the HPC system, allocate resources to jobs, retrieve resource when job finished or failed, and report abnormal resource behaviors. \item Job manager: Upon job submission, a job manager records the job’s basic information (such as user name, project name) and its resource requirement (such as node requirement, the maximum time to run the job, and memory requirement). The job manager informs scheduling decision maker about the basic information of the incoming job and the scheduling decision maker orders jobs in the waiting queue based on user input and current status in the waiting queue. In addition, the job manager is responsible to monitor the job status changes and update the job status based on the information provided by the resource manager, scheduling decision maker and OS system. \item Scheduling decision maker: To meet the challenges in modern job scheduling in HPC, the next-generation decision maker needs to make smart scheduling decision based on the flexible requirement from the system administrators. Different HPC systems and data centers have their unique goals. For example, some systems aim to provide fast response time to time-sensitive applications, and the decision maker is supposed to adopt the scheduling algorithms that give high priorities to the time-sensitive applications and reserve a portion of system resources to meet the burst of the time-sensitive applications. If an HPC system concentrates on running big jobs, the scheduler needs to focus on assign big jobs to the allocation with minimal interference from other jobs. A scheduler used in a production system is supposed to be flexible to plugin other scheduling policies. \item System performance monitor: If a system focuses on optimizing its resource utilization, the system performance monitor is needed to monitor the current system status and record and analyze the system past performance. The purpose of monitoring and analysis is to alert system administrators and correct scheduling decisions if the system performance does not reach the expectation \cite{Fan5, Fan6}. \item Job performance monitor: The job performance monitor record and report abnormal job behaviors, such as abnormal exit from the system, and long job wait time and long job running time. The analysis can also be conducted on user or project based, so the system administrators can find what kind of user behavior or application source code can cause the degradation of job performance. \end{enumerate} In summary, an intelligent job scheduler is the trend in the future. The main difference of the intelligent job scheduler and the traditional job scheduler is that the intelligent job scheduler is capable of monitoring job and system status and therefore provide feedback to system administrators and schedulers itself to make adjustment accordingly. \section{Conclusion} Job scheduling in HPC systems and data centers is one of the active research fields which plays a crucial role in effective utilization HPC and data center resources and efficient execution of jobs. In this chapter, I reviewed the challenges faced by HPC job scheduling and the approaches adopted by schedulers to alleviate these problems. From the literature review, I found that the current HPC job scheduling framework is not smart to address various challenges. Therefore, I propose an intelligent HPC job scheduling framework to monitor the abnormal behaviors and performance in an HPC system and improve system and job performance dynamically. \balance \bibliographystyle{unsrt}
\section{Introduction} It is well-known that deep learning models are data-hungry. In natural language processing, language model pre-training has become a successful transfer learning approach to effectively reduce the requirement for task-specific labeled data \cite{devlin2018bert,liu2019roberta,yang2019xlnet,radford2019language, raffel2019exploring,brown2020language}. Via training on unsupervised large-scale text corpus, bi-directional language models such as BERT and XLNet are able to learn contextualized text representations that can then be fine-tuned on downstream tasks with small training data sizes, which have pushed the state of the art on a variety of natural language understanding benchmarks. \begin{table}[t] \begin{small} \begin{center} \begin{tabular}{l c c } \toprule \bf Model & \bf Setting & \bf SuperGLUE Avg. \\ \Xhline{\arrayrulewidth} Human & & 89.8 \\ \Xhline{\arrayrulewidth} Previous SOTA & \multirow{2}{*}{Supervised} & 89.3 \\ T5+UDG & & \bf 90.4 \\ \Xhline{\arrayrulewidth} GPT3 & Few-Shot & 71.8 \\ \Xhline{\arrayrulewidth} UDG & Unsupervised & \bf 78.1 \\ \bottomrule \end{tabular} \end{center} \end{small} \caption[caption]{SuperGLUE summary.} \vskip -0.1in \label{tab:superglue_summary} \end{table} \begin{figure*}[t] \centering \includegraphics[width=\textwidth]{main.png} \caption{Illustration of the UDG framework.} \label{fig:method} \vskip -0.1in \end{figure*} More recently, gigantic language models (GLM) such as GPT3 \cite{brown2020language} have been shown to be effective \textbf{few-shot learners}. As unsupervised training corpus and model size scaling up, the model is able to generate answers for an unseen NLP task with few-shot inference, based on a manually crafted input prompt consist of a task description and a few examples. Despite no fine-tuning is involved, the language model performs competitively against fine-tuned baselines on a wide range of tasks, whose success suggests a new paradigm of transfer learning in NLP. Yet the gaps between few-shot inference and state-of-the-art fine-tuned methods are still large on many tasks (for example 17.5 below prior state-of-the-art on SuperGLUE as shown in Table \ref{tab:superglue_summary}), urging for exploration of applications of giant language models beyond few-shot inference. Inspired by the few-shot capability of GPT3, we shift our focus towards utilizing GLMs for example creation instead of direct inference, and find that language models are also excellent \textbf{few-shot generators}. Similar to the few-shot inference paradigm, we query the model with a prompt with a few examples and a description of the desired label, and the model generates examples aligned with the label while resembling the given samples. Interestingly, we find no supervision is required for high-quality data creation and thus we only need to use unlabeled examples in our prompts. The dataset created by the model can then used to fine-tune any off-the-shelf model. This approach can therefore be treated as a \textit{zero-label} learning procedure, in which no human label is required throughout the whole process. It differs from the unsupervised learning procedure in that the downstream models still need to be trained with \textit{synthetic data}, however the training example creation requires no human labor. Following this procedure, we are able to establish a system trained using unlabeled training data only, and thus we refer to it as \textbf{Unsupervised Data Generation} (\textbf{UDG}). Experiments show that our unsupervised system performs competitively with strong supervised baselines and achieves new state-of-the-art few-shot learning results on text classification and the SuperGLUE language understanding benchmarks. The synthesized data can further be used for data augmentation purpose. When combined with existing labeled data we are able to achieve the first super-human SuperGLUE scores. These results suggest that few-shot training data creation is a promising alternative to few-shot inference with powerful language models. \section{Related Work} Data augmentation has traditionally been a popular technique for NLP model quality improvement, especially in low-resource regimes \cite{yu2018qanet,Wei19EDA} While traditionally simple heuristics like token-level modification has been applied to diversify training samples, more recently generative data augmentation has gained popularity due to the progress made in language modeling \cite{anabytavor2019data,papanikolaou2020dare,juuti-etal-2020-little,lee2021neural,kumar2021data}. However, they often require labeled examples to finetune generative models and heavy postprocessing for data cleaning. On the other hand, our method generates data in a fully unsupervised manner without finetuning the language model, showcasing a new zero-label learning paradigm. Our approach is also closely related to knowledge retrieval from large language models. These models are known to be good at memorizing facts from training data and capable of performing as open knowledge bases \cite{petroni2019language,wang2020language,roberts-etal-2020-much,carlini2021extracting}. The high quality of training examples created by our approach is to a large part guaranteed by the model's strong knowledge retrieval ability, which reduces the chance of erratic hallucinations irrelevant to the provided labels. \begin{table*}[t] \begin{center} \resizebox{\textwidth}{!}{% \begin{tabular}{l c c c c c c c c c} \toprule & & \bf IMDb & \bf Yelp-2 & \bf Yelp-5 & \bf Amazon-2 & \bf Amazon-5 & \bf DBpedia & \bf Avg. \\ \toprule XLNet & \multirow{2}{*}{Supervised} & \underline{96.80} & \underline{98.63} & \underline{72.95} & \underline{97.89} & \underline{68.33} & \underline{99.40} & \underline{89.00} \\ $\text{BERT}_{\text{LARGE}}$ & & 95.49 & 98.11 & 70.68 & 97.37 & 65.83 & 99.36 & 87.81 \\ \Xhline{\arrayrulewidth} UDA & \multirow{2}{*}{Few-Shot} & 95.80 & 97.95 & 67.92 & 96.50 & 62.88 & 98.91 & 86.66\\ Few-shot Inf. & & 90.38 & 88.79 & 48.75 & 92.63 & 44.21 & 82.46 & 74.54 \\ \Xhline{\arrayrulewidth} UDG & \multirow{2}{*}{Unsupervised} & 95.95 & 98.22 & 69.05 & 97.02 & 64.54 & 96.47 & 86.88\\ \enspace + NLA & & \bf 96.29 & \bf 98.38 & \bf 69.31 & \bf 97.24 & \bf 64.88 & \bf 99.21 & \bf 87.55 \\ \bottomrule \end{tabular} } \end{center} \caption[caption]{\textbf{Comparison of methods on text classification datasets (Accuracy)}. Results for XLNet are obtained from \cite{yang2019xlnet} while results for $\text{BERT}_{\text{LARGE}}$ and UDA are from \cite{xie2019unsupervised}. The best result for semi-supervised/few-shot setup is \textbf{bolded} while \underline{underline} signifies the overall best.} \vskip -0.1in \label{tab:text_classification} \end{table*} \section{Method} \subsection{Background: Few-shot Inference} Given a set of labeled data $\mathcal{L} = \{(x^i, y^i)\}_{i=1}^{n}$ for a specific downstream task, the most common approach in recent years has been \textbf{fine-tuning} that updates the weights of a pre-trained model according to $\mathcal{L}$ \cite{devlin2018bert, yang2019xlnet,raffel2019exploring}. While obtaining state-of-the-art performance on a wide range of tasks, fine-tuning requires extra update steps and non-trivial amounts of labeled data in the target task. On the other hand, \textbf{few-shot inference} is a more resource-efficient paradigm exhibited in the latest gigantic language models such as GPT3 \cite{radford2019language,brown2020language}. The idea is to utilize the language model to infer the correct label based on the task description and a few sample input-label pairs. In particular, the input to the model $M$ is a handcrafted ordered prompt consisted of a task description $T$, a small set of K examples $\mathcal{L_{\text{few}}} = \{(x^i, y^i)\}_{i=1}^{K} \subseteq \mathcal{L}$, and the query example $x_{q}$, and the model is expected to infer the correct label $y_q$ as the most probable next text sequence to the input prompt: \begin{equation} y_{q} = \argmax_{y} P_{M}(y| [T, \mathcal{L_{\text{few}}}, x_{q}] ). \end{equation} Since taking the argmax is intractable, $y_{q}$ is usually obtained through greedy decoding or beam search. Using much less task-specific data and no gradient update, few-shot inference can obtain performance comparable to fine-tuning methods (e.g. GPT3 performs similarly to fine-tuned BERT on SuperGLUE in Table \ref{tab:superglue}). In its extreme format, giant language models can also perform one-shot (K=1) or even zero-shot (K=0) inference. \subsection{Unsupervised Data Generation} Despite these interesting findings, few-shot inference using giant language models still underperforms state-of-the-art fine-tuned models on many tasks. In Table \ref{tab:superglue}, for instance, T5 largely outperforms GPT3 (89.3 vs 71.8) despite being much smaller in model sizes (11B vs 175B). One potential limitation is that a language model is never explicitly trained to directly conduct inference. Instead, it is trained as a text generator on unsupervised web corpus where inputs ($X$) and labels ($Y$) happen to coexist. Consequently, the few-shot inference method finds the proper prompt that `forces' the model to generate next text sequence $X_{\text{next}}$ which happens to be the label Y. However, this could be suboptimal since the labels often emerge prior to the inputs in real-world web documents. For example, in sentiment classification of IMDb movie reviews \cite{maas2011learning}, the actual review contexts appear after their corresponding rating scores. Therefore, few-shot inference can force the language model to generate on text distributions that are inconsistent with its training data. To this end, we propose to utilize language models to perform \textbf{few-shot generation}. Instead of generating and predicting the label Y, we let the model to generate the input X instead, decoupling generation from prediction. We aim to formulate the input prompts that are more likely to naturally exist in the training corpus. Specifically, the model is queried to generate $x_g$ corresponding to a pseudo label $\hat{y}_{g}$ with a prompt consisted of a small set of K \textit{unlabeled} examples $\mathcal{U} = \{x^i\}_{i=1}^{K}$ and a description of the desired label: \begin{equation} x_g \sim P_M(x| [T, \mathcal{U}, \text{Des}(\hat{y}_{g})] ), \end{equation} where $\text{Des}(\cdot)$ is a task-specific transformation function that maps a label class to natural language descriptions, as illustrated in Figure \ref{fig:method}. Different from few-shot inference, our method only requires unsupervised few-shot examples, a \textit{zero-label learning} setting. In addition, we use top-k sampling instead of search-based decoding to sample text from the language model. This allows us to generate a synthetic labeled dataset $\mathcal{L_{\text{syn}}} = \{(x_g^i, \hat{y}_g^i)\}_{i=1}^{n_s}$ with controllable size $n_s$. We then train task-specific models utilizing this synthetic dataset, either as standalone training data or additional auxiliary data. Unlike existing synthetic data generation systems, our method requires no fine-tuning step of the generative model and uses unsupervised data only, and therefore we refer to it as \textit{Unsupervised} Data Generation to emphasize its resource efficiency. We also hope to emphasize that it is not our intention to leverage the language model to perform generative tasks, but just to take advantage of it to synthesize ``labeled'' examples for downstream model training. \section{Experiments} \begin{table}[t] \begin{center} \begin{tabular}{l c c c c c} \toprule & K=0 & K=1 & K=4 & K=32 \\ \Xhline{\arrayrulewidth} \bf IMDb Acc. & 64.21 & 91.34 & 95.86 & 96.29 \\ \bf Yelp-2 Acc. & 67.34 & 90.27 & 98.22 & 98.38 \\ \bf Amz-5 Acc. & 47.35 & 58.79 & 62.14 & 64.88 \\ \bottomrule \end{tabular} \end{center} \caption[caption]{Ablation of number of examples in each prompt.} \vskip -0.1in \label{tab:ablation_K} \end{table} \subsection{Unsupervised Text Classification} We first apply the proposed UDG method on standard text classification tasks. \noindent \textbf{Experimental Setups.} We use six popular text classification benchmark datasets \cite{maas2011learning,zhang2015character}, including IMDb, Yelp-2, Yelp-5, Amazon-2 and Amazon-5 sentiment classification and DBPedia topic classification. We mainly follow the experimental settings in \citet{xie2019unsupervised} and use the corresponding unlabeled data for each task. We apply similar preprocessing steps to clean noisy web texts and truncate the input to 512 subword tokens. For each prompt, we sample $K=32$ unlabeled examples from the unlabeled data and fit as many examples as allowed by the length of the language model's context window (detailed templates shown in Figure \ref{fig:method} and Appendix \ref{sec:appendix_template}). This process is then repeated $n_c = \frac{n_s}{\text{\# Class}}$ times for each label class, where we set $n_c = 10\text{K}$ for sentiment classification tasks and 1000 for topic classification. We then utilize the language model to generate one example for each prompt, resulting in a synthetic labeled dataset of size $n_s$. We use an in-house language model, which is a variant of the one in \cite{adiwardana2020towards} but trained with larger data. We exploit top-k sampling with K=40 and temperature=1.0, and only apply basic post-processing to filter generated examples that are too short/long. Once we obtain the generated synthetic dataset $\mathcal{L_{\text{syn}}}$, it can be utilized as labeled training data for any task-specific training framework. Here, we choose the state-of-the-art semi-supervised learning framework Unsupervised Data Augmentation (UDA) \cite{xie2019unsupervised} as the backbone. We use $\text{BERT}_{\text{Large}}$ as our base model and follow the training protocol as described in the UDA paper to tune our hyper-parameters. In our experiment, we find some generated examples are noisy adn thus we additionally implement a \textit{Noisy Label Annealing (NLA)} technique to filter these examples during the training process (See Appendix \ref{sec:appendix_nla} for details). \begin{figure} \centering \includegraphics[width=0.6\columnwidth]{num_examples.png} \caption{Ablation of number of examples generated per label class.} \label{fig:ablation_ns} \vskip -0.1in \end{figure} \noindent \textbf{Results.} We compare models of trained using fully supervised, semi-supervised/few-shot and unsupervised settings in Table \ref{tab:text_classification}. We first compare few-shot inference using our giant language model with fine-tuned methods. Despite requiring no additional training costs, the few-shot inference paradigm performs significantly worse than supervised or even semi-supervised UDA, which utilizes similar amounts of labeled data. The gap is more evident on multi-way classification tasks such as Yelp-5 or DBpedia, where the model is required to predict complex labels beyond simple answers such as `True/False'. In contrast, the proposed few-shot generation paradigm obtains strong performance while using less supervision. When combined with NLA, our UDG framework consistently outperforms UDA and few-shot inference on all six tasks, achieving new state-of-the-art few-shot learning results. Besides, without using any label, our method outperforms fully supervised $\text{BERT}_{\text{LARGE}}$ on IMDb and Yelp-2 and is also competitive on other tasks. Since both UDA and our method rely on $\text{BERT}_{\text{LARGE}}$, we expect using XLNet may further boost our unsupervised performance, which we choose to leave for future work. \begin{table*}[t] \begin{center} \resizebox{\textwidth}{!}{% \begin{tabular}{l c c c c c c c c c c} \toprule & & \bf BoolQ & \bf CB & \bf COPA & \bf MultiRC & \bf ReCoRD & \bf RTE & \bf WiC & \bf WSC & \bf Avg. \\ \toprule Human & & 89.0 & 95.8/98.9 & 100.0 & 81.8/51.9 & 91.7/91.3 & 93.6 & 80.0 & 100.0 & 89.8 \\ \Xhline{\arrayrulewidth} $\text{BERT++}^{\text{a}}$ & \multirow{5}{*}{Sup.} & 79.0 & 84.8/90.4 & 73.8 & 70.0/24.1 & 72.0/71.3 & 71.7 & 69.6 & 64.4 & 71.5 \\ $\text{RoBERTa}^{\text{b}}$ & & 87.1 & 90.5/95.2 & 90.6 & 84.4/52.5 & 90.6/90.0 & 88.2 & 69.9 & 89.0 & 84.6 \\ $\text{T5}^{\text{c}}$ & & 91.2 & 93.9/96.8 & 94.8 & 88.1/63.3 & 94.1/93.4 & 92.5 & 76.9 & 93.8 & 89.3 \\ $\text{DeBERTa}^{\text{d}}$ & & 90.4 & 94.9/97.2 & 96.8 & \bf 88.2/63.7 & \bf 94.5/94.1 & \bf 93.2 & 76.4 & 95.9 & 89.9 \\ T5 + UDG & & \bf 91.4 & \bf 95.8/97.6 & \bf 98.0 & 88.3/63.0 & 94.2/93.5 & 93.0 & \bf 77.9 & \bf 96.6 & \bf 90.4 \\ \Xhline{\arrayrulewidth} $\text{GPT3}^{\text{e}}$ & \multirow{3}{*}{Few-Shot} &76.4 & 52.0/75.6 & \underline{92.0} & 75.4/30.5 & \underline{91.1/90.2} & 69.0 & 49.4 & 80.1 & 71.8 \\ $\text{iPET}^{\text{f}}$ & & \underline{81.2} & 79.9/88.8 & 90.8 & 74.1/31.7 & 85.9/85.4 & 70.8 & 49.3 & \underline{88.4} & 75.4 \\ $\text{ADAPET}^{\text{g}}$ & & 80.0 & 82.3/92.0 & 85.4 & 76.2/35.7 & 86.1/85.5 & 75.0 & 53.5 & 85.6 & 76.0 \\ \Xhline{\arrayrulewidth} UDG & Unsup. & 81.0 & \underline{86.2/92.4} & 80.4 & \underline{81.1/47.1} & 82.8/81.8 & \underline{80.7} & \underline{67.5} & 79.5 & \underline{78.1} \\ \bottomrule \end{tabular} } \end{center} \caption[caption]{\textbf{Comparison of single-model methods on SuperGLUE test scores.} Results obtained from the official SuperGLUE leaderboard\protect\footnotemark. The best result for semi-supervised/few-shot setup is \underline{underlined} while \textbf{bold} signifies the overall best. Model references: $^{\text{a}}$\citet{devlin2018bert} $^{\text{b}}$\citet{liu2019roberta} $^{\text{c}}$\citet{raffel2019exploring} $^{\text{d}}$\citet{devlin2018bert} $^{\text{e}}$\citet{brown2020language} $^{\text{f}}$\citet{schick2020s} $^{\text{g}}$\citet{tam2021improving}} \vskip -0.1in \label{tab:superglue} \end{table*} \noindent \textbf{Analysis.} We first examine the effect of data noisiness on model performance. As is the case for other data augmentation methods, few-shot generation using giant language models can produce examples that are inaccurate to the desired labels. To reduce the negative impact of these noisy labels, we utilize a simple NLA technique to filter out examples when the task-specific models disagree with the synthetic labels with high confidence levels. As shown in Table \ref{tab:text_classification}, NLA robustly improves UDG performance on all tasks, especially ones that are sensitive to noise such as DBpedia. A crucial difference distinguishing our work from existing data generation methods is that we directly query the pretrained language model without any fine-tuning nor supervision. To achieve this, the model needs to not only infer correct knowledge corresponding to the input pseudo label but also generate text with similar styles of the sample unsupervised examples. Thus, we compare the results when the language model uses different amounts of in-context examples in Table \ref{tab:ablation_K}. The model fails to generate high-quality data when no sample is given, indicating the importance of few-shot generation. On the other hand, including more unsupervised examples does improve the quality of synthetic dataset which leads to better performance. Finally, we evaluate the impact of the synthetic data sizes in Figure \ref{fig:ablation_ns}. Despite there is a diminishing return trend, we find the final performance to continuously improve with more generated data, showing that the language model can generate diverse examples. In addition, one key benefit of our method is that we can sample as much data as needed with no additional cost or supervision. This is particularly useful for tasks from low-resource domains with limited unsupervised data available. \subsection{Unsupervised Language Understanding} To evaluate the proposed framework in a more challenging and comprehensive setting, we extend it to perform on complex language understanding tasks. \noindent \textbf{Experimental Setups.} We use the SuperGLUE benchmark \cite{wang2019superglue} for general-purpose language understanding in English, which consists of 8 natural language understanding tasks. Tasks cover textual entailment (CB and RTE), question answering (BoolQ, MultiRC and ReCoRD), common sense reasoning (COPA), word sense disambiguation (WiC), and coreference resolution (WSC). We mainly follow the same generation protocol as described in the previous sections, with some minor changes in prompt templates and data post-processing steps for specific tasks. As before, we use K=32 unlabeled examples and generate using the same language model. For each task, we use all original labeled data as unsupervised examples for training data creation. For the downstream model, we use T5 \cite{raffel2019exploring} for fine-tuning on the created data. Different from the released T5 checkpoints that are pretrained on multi-task data, we pretrain our own models on unsupervised Colossal Clean Crawled Corpus (C4) data only and thus the combined framework remains unsupervised. For fair comparison with existing models, we pretrain and then fine-tune a T5-Large model using the created data set. Following \citet{raffel2019exploring}, we use a fine-tuning batch size of 8 with 512 sequence length. \footnotetext{\url{https://super.gluebenchmark.com/leaderboard}} \noindent \textbf{Results.} We compare models trained under different settings in Table \ref{tab:superglue}. The GPT3 model \cite{brown2020language} using the few-shot inference method outperform BERT++ with less supervision and no fine-tuning. However, despite containing much more model parameters, it performs worse than other fine-tuned fully supervised models and few-shot methods. On the other hand, our unsupervised framework using few-shot generation outperforms all few-shot learning systems without using any label, and thus it achieves new state-of-the-art results on this benchmark for methods that exploit little-to-no supervision. In particular, our performance gains largely come from natural language entailment tasks (CB and RTE) as well as word sense disambiguation, where GPT3 performs similarly to random guessing. This indicates that language models do contain language knowledge that few-shot inference fails to leverage. \subsection{UDG as Data Augmentation} In previous sections we only use the created examples as pseudo supervision to explore the limits of transfer learning using language models. Nonetheless, the synthetic data can be also treated as augmented data and combined with existing labeled data. To this end, we fine-tune the public T5-XXL checkpoint using both labeled data and generated data. As shown in Table \ref{tab:superglue}, our method combines well with existing labeled data and brings substantial improvements. This is particularly the case for tasks with small data sizes such as COPA and WSC. Moreover, the combined model outperforms not only prior methods but also the human baselines for the first time on this important NLP benchmark, setting a new milestone for natural language understanding with machine learning models. \section{Conclusion} In this paper, we propose a ``zero-label'' training procedure and show that language models are also few-shot example creators in that they can be used to generate high-quality synthetic data in a fully unsupervised manner. Through this, we demonstrate that NLP models can obtain strong results without any human annotated label. Our work illustrate a promising direction for future transfer learning research in NLP.
\section{The Great Divide} The goal of this paper is to articulate \textit{minimal primitivism about laws of nature }(MinP), a minimalist and primitivist view about laws, and to contrast it with some leading alternatives. MinP captures our conviction that the universe is governed by laws of nature in a way that does not presuppose a fundamental direction of time. Here we focus on laws of physics and particularly those suitable for being fundamental laws. To begin, let us list a few paradigm examples of candidate laws of physics: \begin{itemize} \item Newton's laws of motion \item The Schr\"odinger equation \item The Dirac equation \end{itemize} They are all dynamical laws concerning how physical systems evolve in time. Here are some other equations or principles that, for one reason or another, may be controversial examples as candidate laws of physics: \begin{itemize} \item The Einstein equation (of general relativity) \item The Wheeler-DeWitt equation \item Conservation laws \item Symmetry principles \item The principle of least action \item The Past Hypothesis (of a low-entropy boundary condition of the universe) \item Equations of motion in Wheeler-Feynman electrodynamics \end{itemize} In physics, a significant amount of work has been devoted to the discovery of its true fundamental laws: the basic principles that govern the world.\footnote{In this paper, we use ``fundamental laws'' and ``laws'' interchangeably unless noted otherwise.} The collection of all of these laws may be called the axioms of the final theory of physics or the Theory of Everything (TOE). The fundamental laws cannot be explained in terms of deeper principles \citep[p.18]{steven1992dreams}; from them we can derive theorems of great importance and explain all significant observable regularities. Some of the equations and principles in the above lists, with suitable adaptation, may be included in such a collection. In this paper, we assume that there are fundamental laws and they play important roles in scientific explanations. But what kind of things are fundamental laws? Most people believe that laws are different from material entities such as particles and fields, because, for one thing, laws seem to \textit{govern} the material entities. But what is this governing relation? What makes material entities respect such laws? What is the role of laws in scientific explanations? Such questions do not have straightforward answers, and they cannot be directly tested in experiments. They fall in the domain of metaphysics. The great divide in metaphysical debates about laws of nature is between Humeans, who think that laws are merely descriptions, and non-Humeans, who think that laws govern. Humeans maintain that laws merely describe how matter is distributed in the universe. In Lewis's version, laws are just certain efficient summaries of the distribution of matter in the universe, also known as the Humean mosaic. Nothing really enforces the patterns in the mosaic. A common theme in non-Humean views is that laws govern the distribution of matter. By appealing to the governing laws, the patterns are explained. How laws perform such a role is a matter of debate, and there are differences of opinion between reductionist non-Humeans such as \cite{ArmstrongWIALON} and primitivist non-Humeans such as \cite{MaudlinMWP}. One's metaphysical position can shape one's expectations about what physical laws should look like. It is sometimes assumed that the governing view of laws requires a fundamental direction of time: to govern, laws must be \textit{dynamical} laws that \textit{produce} later states of the world from earlier ones, in accord with the direction of time that makes a fundamental distinction between past and future. Call this conception of governing \textit{dynamic production}. It is suggested in \cite{MaudlinMWP} and discussed at length in \cite{loewer2012two}. For Maudlin, primitivism about laws and primitivism about the direction of time should be postulated together, with this package supporting a particular kind of explanation associated with dynamic production. This emphasis on dynamic production is not unique to Maudlin and is important to some other types of non-Humeans. Although we subscribe to the governing view and the primitivist view about laws of nature, we do not share the view that a fundamental direction of time is essential to either. In this paper, we propose a minimal primitivist view (MinP) about laws of nature that disentangles the governing conception from dynamic production. On our view, fundamental laws govern by constraining the physical possibilities of the entire spacetime and its contents.\footnote{Throughout this paper, for simplicity, we assume that spacetime is fundamental. This assumption is not essential to MinP. One can consider non-spatio-temporal worlds governed by minimal primitivist laws. For those worlds, one can understand MinP as suggesting that laws constrain the physical possibilities of the world, whatever non-spatio-temporal structure it may have. Indeed, if one regards time itself as emergent, one may find it natural to understand governing in an atemporal and direction-less sense. } They need not exclusively be dynamical laws, and their governance does not presuppose a fundamental direction of time. For example, they can take the form of global constraints or boundary condition constraints for spacetime as a whole; they can govern even in an atemporal world; they may permit the existence of temporal loops. Our minimal view captures the essence of the governing view without taking on extraneous commitments about the direction of time. Moreover, as a version of primitivism, our view requires no reduction or analysis of laws into universals, powers, or dispositions. Because of the minimalism and the primitivism, our view accommodates several candidate fundamental laws, such as the principle of least action, the Past Hypothesis, and the Einstein equation (which in its usual presentation is non-dynamical). It is also compatible with more controversial examples of fundamental laws in the Wheeler-Feynman theory of electrodynamics and retrocausal theories of quantum mechanics. The flexibility of MinP is a virtue. From our viewpoint, it is an empirical matter what forms the fundamental laws take on; one's metaphysical theory of laws should be open to accommodate the diverse kinds of laws entertained by physicists. It may turn out that nature employs laws beyond those expressible in the form of differential equations that admit (Cauchy) initial value formulations or can be given a dynamic productive interpretation. The metaphysics of laws should not stand in the way of scientific investigations. Our view encourages openness. The idea that fundamental laws produce later states of the world from earlier ones is related to causal fundamentalism, the idea that causation, or something like causation (such as dynamic production), is fundamental in the world.\footnote{Causal fundamentalism does not imply that everyday causality is metaphysically fundamental. For example, Maudlin's notion of dynamic production is different from everyday causality \cite[ch.5]{MaudlinMWP}. For some recent works on causal fundamentalism, physics, and everyday causality, see \cite{blanchard2016physics} and \cite{weaver2018fundamental}. } If causation is fundamental and asymmetric, then either it defines a direction of time or the direction of time itself is metaphysically fundamental (such that it has no deeper explanation). On MinP, temporally asymmetric relations such as causation and dynamic production are not constitutive of how laws govern. We do not think causal fundamentalism is true. Neither do we think there must be a fundamental direction of time. However, rejecting them is not part of our view about laws; agnosticism about them is sufficient for our purposes. On MinP, there can be but need not be fundamental causal relations, and there can be but need not be a fundamental direction of time. Even if they existed, they would not be essential to how laws explain. Hence, MinP carves out conceptual space for non-Humeans such as ourselves who believe that laws govern but do not demand causal fundamentalism, a fundamental direction of time, or dynamic production. This paper has been written by a philosopher of physics and a mathematical physicist. It is written for mathematicians, physicists, and philosophers who are interested in the nature of physical laws. Since the topic is deeply philosophical, the first few sections are intended as a non-technical introduction to some philosophical background. We start with a review of four leading approaches to laws of nature: Humean reductionism, Platonic reductionism, Aristotelian reductionism, and Maudlinian primitivism. Readers familiar with the philosophical literature on laws may skim the review. Next, we state the two central theses of MinP and suggest how minimal primitivist laws can explain natural phenomena without presupposing a fundamental direction of time. We illustrate MinP by providing interpretations of several types of candidate physical laws: dynamical laws, non-dynamical constraint laws, and probabilistic laws. Finally, we illustrate the key differences between MinP and the alternatives. Many working physicists, mathematicians, and philosophers of science may appreciate our view precisely because of its minimalism and primitivism. We also list some open questions for future work. \section{Some Existing Approaches} In this section, we survey some existing approaches to laws of nature.\footnote{This survey is by no means exhaustive of the rich literature on laws. For example, against the view that there are fundamental laws that are universally true, \cite{cartwright1994fundamentalism} advocates a patchwork view of laws where they are, at most, true \textit{ceteris paribus}. \cite{van1989laws} advocates a view where there are no laws of nature. See \cite{sep-laws-of-nature} for a more detailed survey. } We highlight the key motivations that underpin such approaches, the explanatory principles they employ, and the kinds of laws that they accommodate. \subsection{Humean Reductionism} A popular approach to laws in contemporary philosophical literature is that of Humean Reductionism. On this view, laws do not govern but merely describe by summarizing what actually happen in the world. Inspired by writings of Hume, Mill, and Ramsey, David Lewis pioneered the contemporary versions of this view. On Humean Reductionism, the fundamental ontology is that of a \textit{Humean mosaic}, a concrete example of which is a 4-dimensional spacetime occupied by particles and fields. At the fundamental level, laws of nature do not exist and do not move particles and fields around. There are no ``necessary connections'' forged by governing laws. Laws of nature are derivative of and ontologically dependent on the actual Humean mosaic. The laws are the way they are \textit{because of} what the actual trajectories of particles and histories of fields are, not the other way around, in contrast to the governing picture of laws. Laws are reducible to the Humean mosaic. \cite{lewis1986philosophical} calls this view \textit{Humean supervenience}.\footnote{Whether contemporary Humean position in the metaphysics of science represents the historical Hume has been debated. See for example \cite{strawson2015humeanism}.} Following Ramsey, Lewis proposes a ``best-system'' analysis of laws that shows how laws can be recovered from the Humean mosaic. The basic idea is that laws are certain regularities of the Humean mosaic. However, not any regularity is a law, since some are accidental.\footnote{For example, the regularity that all uranium spheres are less than one mile in diameter may be a law or a consequence of some law, but the regularity that all gold spheres are less than one mile in diameter is not a law or a consequence of a law. } Hence, one needs to be selective about which regularities to count as laws. Lewis suggests we pick those regularities in the best system of true sentences about the Humean mosaic. The strategy is to consider various systems (collections) of true sentences about the Humean mosaic and pick the system that strikes the best balance between various theoretical virtues, such as simplicity and informativeness. To get an intuitive grasp of this balancing act, consider an example. Let the Humean mosaic (the fundamental ontology) be a Minkowski spacetime occupied by massive, charged particles and an electromagnetic field. The locations and properties of those particles and the strengths and directions of the field at different points in spacetime is the matter distribution, which corresponds to the local matters of particular fact. Suppose the matter distribution is a solution to Maxwell's equations. Consider three systems of true statements (characterized below using the axioms of the systems) about this mosaic: \begin{itemize} \item System 1: \{Spacetime point $(x_1, y_1, z_1, t_1)$ has field strengths $E_1$ and $B_1$ with directions $\vec{v}_1$ and $\vec{v}_{1'}$ and is occupied by a particle of charge $q_1$; spacetime point $(x_2, y_2, z_2, t_2)$ has field strengths $E_2$ and $B_2$ with directions $\vec{v}_2$ and $\vec{v}_{2'}$ and is not occupied by a charged particle; ......\} \item System 2: \{``Things exist.''\} \item System 3: \{Maxwell's equations\} \end{itemize} System 1 lists all the facts about spacetime points one by one. It has much informational content but it is complicated. System 2 is just one sentence that says there are things but does not tell us what they are and how they are distributed. It is extremely simple but has little informational content. System 3 lists just four equations of Maxwellian electrodynamics. It has less information about the world than System 1 but has much more than System 2. It is more complicated than System 2 but much less so than System 1. System 1 and System 2 are two extremes; they have one virtue too much at the complete expense of the other one. In contrast, System 3 strikes a good balance between simplicity and informativeness. System 3 is the best system of the mosaic. Therefore, according to the best-system analysis, Maxwell's equations are the fundamental laws of this world. To emphasize, on Humean Reductionism, laws are descriptive of the Humean mosaic. Laws are not among the fundamental entities that push or pull things, enforce behaviors, or produce the patterns. Laws are just winners of the competition among systematic summaries of the mosaic. \cite{BeebeeNGCLN} calls it the ``non-governing conception of laws of nature.'' Laws are merely those generalizations which figure in the most economical true axiomatization of all the particular matters of fact that obtain. Despite the simplicity and appeal of Lewis's analysis, there is an obstacle. The theoretical virtue of simplicity is language-dependent. For example, suppose there is a predicate $F$ that applies to all and only the things in the actual spacetime. Then consider the following system: \begin{itemize} \item System 4: \{$\forall x F(x)$\} \end{itemize} This is informationally equivalent to System 1 and more informative than System 3, and yet it is simpler than System 3. If we allow competing systems to use predicate $F$, there will be a system (namely System 4) that is overall better than System 3. Given the best-system analysis, the actual laws of the mosaic would not be Maxwell's equations but ``$\forall x F(x)$.'' To rule out such systems, Lewis places a restriction on language. Suitable systems that enter into the competition can invoke predicates that refer to only natural properties. For example, the predicate ``having negative charge'' refers to a natural property, while the disjunctive predicate ``having negative charge or being the Eiffel Tower'' refers to a less natural property. Some properties are perfectly natural, such as those invoked in fundamental physics about mass, charge, spacetime location and so on. It is those perfectly natural properties that the axioms in the best system must refer to. The predicate $F$ applies to all and only things in the actual world, which makes up an ``unnatural'' set of entities. $F$ is not perfectly natural. Hence, System 4 is not suitable. The requirement that the axioms of the best system refers only to perfectly natural properties is an important element of Lewis's Humeanism. Over the years, Lewis and his followers have, in various ways, extended and modified the best-system analysis of laws on Humean Reductionism. Let us summarize some of the developments and call the updated view \textit{Reformed Humeanism about Laws}: \begin{description} \item[Reformed Humeanism about Laws] The fundamental laws are the axioms of the best system that summarizes the mosaic and optimally balances simplicity, informativeness, fit, and degree of naturalness of the properties referred to. The mosaic contains only local matters of particular facts, and the mosaic is the complete collection of fundamental facts. \end{description} Reformed Humeanism can accommodate various kinds of laws of nature. Without going into too much detail, we note the following features: \textit{1. Chance}. Although chance is not an element of the Humean mosaic, it can appear in the best system. Humeans can introduce probability distributions as axioms of the best system \citep{LewisSGOC}. This works nicely for stochastic theories such as the Ghirardi-Rimini-Weber (\citeyear{ghirardi1986unified}) theory of spontaneous localization. Humeans can evaluate the contribution of the probability distributions by using a new theoretical virtue called \textit{fit}. A system is more fit than another just in case it assigns a higher (comparative) probability than the other does the history of the universe. For certain mosaics, the inclusion of probability in the best system can greatly improve the informational content without sacrificing too much simplicity. Hence, fit can be seen as the probabilistic extension of informativeness. Humeans can also allow what is called ``deterministic chance'' \citep{loewer2001determinism}. Take a deterministic Newtonian theory of particle motion and add to it the Past Hypothesis and the Statistical Postulate \citep{albert2000time}, which can be represented as a uniform probabilistic distribution, conditionalized on a low-entropy macrostate of the universe at $t_0$. The Humean account of chance (both stochastic and deterministic) is arguably one of the simplest and clearest to date. \textit{2. Particular facts}. \cite{LewisNWTU} maintains that ``only the regularities of the system are to count as laws'' (p.367). However, there is no reason to limit the Humean account to laws about general facts. Physicists have entertained candidate physical laws about particular facts. For example, the Past Hypothesis is a candidate physical law about one temporal boundary of the universe (``$t_0$''). Such laws are uncommon, but conceptually we do not see any obstacle. If a particular place or a particular time in the universe is sufficiently significant, then it may be appropriate to have a physical law about the particular place or time. Other examples of such laws include Tooley's case of Smith's garden (\citeyear{tooley1977nature}) and the Aristotelian law about the center of the universe. \cite{callender2004measures} suggests that a Humean analysis can do away with Lewis's restriction to laws of general facts. In fact, this flexibility seems a significant advantage Humean Reductionism has over some other accounts of laws. \textit{3. Flexibility with respect to perfect naturalness}. For Lewis, perfect naturalness is a property of properties. Perfectly natural properties pick out the same set of things as Armstrong's theory of sparse universals (more on that in \S2.2). However, the chief motivation of Lewis's use of perfect naturalness is to rule out systems that use ``gruesome'' predicates. If that is the issue, then perhaps, as \cite{hicksschaffer} suggest, we can simply require that ``degree of naturalness'' of the predicates involved be a factor in the overall ranking of competing systems, and the best system should also optimally balance degree of naturalness of the predicates together with the rest of the theoretical virtues, such as simplicity, informativeness, and fit. The flexibility with respect to perfect naturalness also allows the best system to refer to non-fundamental properties such as entropy, as may be necessary if the Past Hypothesis is a fundamental law. \textit{4. Theoretical virtues}. Humeans do not provide a full account of the theoretical virtues. There are certain theoretical virtues scientists do and should consider significant. With that in mind, perhaps Humeans can leave them open-ended. As such, there is also some vagueness in how systems are compared and in some cases there may be vagueness about which system is best.\footnote{Another issue concerning theoretical virtues is how we should use them to compare different systems. As noted earlier, simplicity is language relative. \cite{cohen2009better} suggest that the comparisons should be relativized to languages. Their relativized account (called the Better Best System Account) perhaps can be used to support \cite{FodorSS}'s vision of the autonomy of the special sciences (e.g. biology, psychology, economics) from fundamental physics.} Reformed Humeanism is perhaps the most flexible view on the market for its accommodation with multiple kinds of candidate laws of physics. There is no problem with giving lawhood status to non-dynamical facts such as the principle of least action, the Einstein equation, or even a version of the Past Hypothesis that refers to a particular time ($t_0$) and a non-fundamental property (entropy). Because of its accommodation of the Past Hypothesis and deterministic chance, Reformed Humeanism also accommodates reductionism about the direction of time. The ingredients for such a reduction can all be interpreted as axioms of the best system summarizing the mosaic. Hence, Humeans can do away with a fundamental direction of time \citep{loewer2012two}. \subsection{Platonic Reductionism} With Humean Reductionism, nothing ultimately explains the patterns in the Humean mosaic. For illustration, suppose $F=ma$ is a fundamental law of our world. Humeans maintain that ``$F=ma$'' expresses a fundamental law in virtue of its being an axiom in the best system of the Humean mosaic. It merely summarizes what actually happens: the trajectories of all massive particles are solutions to $F=ma$. Those with a governing conception of laws may seek to find a deeper explanation. In virtue of what is every massive particle in the world behaving according to the same formula? What, if anything, enforces the pattern and makes sure nothing deviates from it? In other words, what provides the \textit{necessity} or \textit{oomph} that is usually associated with laws? \cite{DretskeLN}, \cite{tooley1977nature}, and \cite{ArmstrongWIALON} propose an intriguing answer based on a metaphysics of universals. The universals that they accept are in addition to things in the Humean mosaic. They are ``over and above'' the Humean mosaic. In traditional metaphysics, universals are repeatable entities that explain the genuine similarity of objects. Let us start with some mundane examples. Two cups are genuinely similar in virtue of their sharing a universal \textit{Being a Cup}. The universal is something they both instantiate and something that explains their genuine similarity. A cup is different from a horse because the latter instantiates a different universal \textit{Being a Horse}. Now, those universals are not fundamental, and they may be built from more fundamental universals about physical properties. Dretske, Tooley, and Armstrong use universals to provide explanations in science. For them, the paradigm examples are universals that correspond to fundamental physical properties, such as mass and charge. On their view, laws of nature hold because of a certain relation obtaining among such universals. This theory of laws has connection to Plato's theory of forms.\footnote{For an overview of Plato's theory of forms, see \cite{sep-plato}.} We thus call it \textit{Platonic Reductionism}.\footnote{In the literature it is sometimes called the DTA account of laws or the Universalist account of laws. Calling it Platonic \textit{reductionism} may be controversial. But see the discussion in \cite[appendix A1]{carroll1994laws}. } Consider again the world where $F=ma$ holds for every massive particle. In such a world, any particle with mass $m$ instantiates the universal \textit{having mass $m$}, any particle under total force $F$ instantiates the universal \textit{being under total force $F$}, and any particle with acceleration $F/m$ instantiates the universal \textit{having acceleration $F/m$}. The universals are multiply instantiated and repeated, as there are many particles that share the same universals. Those universals give unity to the particles that instantiate them. The theory also postulates, as a fundamental fact, that the universal \textit{having mass $m$} and the universal \textit{being under total force $F$} necessitate the universal \textit{having acceleration $F/m$}. Hence, if any particle instantiates \textit{having mass $m$} and \textit{being under total force $F$}, then it has to instantiate \textit{having acceleration $F/m$}. It follows that every particle has to obey $F=ma$.\footnote{We note that this example about $F=ma$ does not exactly fit in Armstrong's schema of ``All F's are G.'' See \cite[ch.7]{ArmstrongWIALON} for a strategy to accommodate ``functional laws.'' } This adds the necessity and the oomph that are missing in Humean Reductionism. With Platonic Reductionism, the regularity is explained by the metaphysical postulate of universals and the necessitation relation $N$ that hold among universals. Following \cite{hildebrand2013can}, we may summarize it as follows: \begin{description} \item[Necessitation] For all universals $F$ and $G$, $N(F,G)$ necessitates the regularity that all $F$s are $G$s. \end{description} A few clarificatory remarks: \textit{1. Universals}. (1) The appeal to universals is indispensable in this theory of laws. The theory is committed to a fundamental ontology of objects (particulars) and a fundamental ontology of universals. Hence, Platonic Reductionism is incompatible with nominalism about universals. (2) Defenders such as Armstrong appeal to a sparse theory of universals, where the fundamental universals correspond to the fundamental properties we find in fundamental physics. The sparse universals correspond to the perfect natural properties that Lewis invokes in his account. Consider Lewis's example of the predicate $F$ that corresponds to the property of all and only things in the actual world. For Armstrong,``$\forall x F(x)$'' does not express a fundamental law because objects with property $F$ are not genuinely similar, and $F$ is a property that does not correspond to one of the fundamental, sparse universals. \textit{2. Necessity}. (1) The necessity relation among universals is put into the theory by hand. It is a postulate that such a relation holds among universals and does necessitate regularities. (It is also postulated that the relation among universals is itself a universal.) To some commentators, it is unclear why the postulate is justified.\footnote{In a famous passage, \cite{LewisNWTU} raises this objection: ``Whatever N may be, I cannot see how it could be absolutely impossible to have N(F,G) and Fa without Ga...The mystery is somewhat hidden by Armstrong's terminology. He uses `necessitates' as a name for the lawmaking universal N; and who would be surprised to hear that if F `necessitates' G and a has F, then a must have G? But I say that N deserves the name of `necessitation' only if, somehow, it really can enter into the requisite necessary connections. It can't enter into them just by bearing a name, any more than one can have mighty biceps just by being called `Armstrong' '' (p.366). } In response, a defender of Platonic Reductionism may take the necessity relation simply as a primitive and accept it as unanalyzable (although this response would not satisfy the critics). (2) The $N$ relation, though called a \textit{necessity} relation, holds contingently among universals. Thus, if $N(F,G)$ holds in the actual world, then in some possible world $F$ is not connected to $G$ via $N$. $N$ is only nomologically necessary but metaphysically contingent. This has the consequence that laws of nature on Platonic Reductionism, while nomologically necessary, are metaphysically contingent. This respects a widespread judgment about the metaphysical contingency of laws. (In \S2.3 we see that Aristotelian Reductionism violates it.) (3) \cite{ArmstrongWIALON} makes room for probabilistic laws as follows: \begin{quotation} Irreducibly probabilistic laws are also relations between universals. These relations give (are constituted by) a certain objective probability that individual instantiations of the antecedent universal will \textit{necessitate} instantiation of the consequent universal. They give a probability of a necessitation in the particular case...Deterministic laws are limiting cases of probabilistic laws (probability 1). (p.172) \end{quotation} What is ``a probability of a necessitation?'' Conceptually, whether $F$ necessitates $G$ seems like a matter that does not admit of degree. What does this probability mean, and how does it relate to actual frequencies and why should it constrain our credences? Even if one accepts the intelligibility of the necessitation relation, one may be unwilling to accept the intelligibility of objective probability of a necessitation and one may be puzzled by how the probability of a necessitation can explain the regularities. This may be an instance of the general phenomenon that, it is difficult to give a unified and intelligible non-Humean account of probabilistic laws and non-probabilistic laws. It is much easier (if one sets aside the worry about the lack of governing) to do so on Humean Reductionism: just put them all in the best system. \textit{3. Explanation}. For those who are antecedently sympathetic to a theory of universals, Platonic Reductionism may offer an attractive metaphysical explanation of the patterns in nature. Its enlarged ontology provides extra explanatory resources. If two particles both have mass $m$, then there literally is something they have in common---the universal \textit{having mass $m$}. That the two particles move in the same way can be partly explained by their genuine similarity to each other---their shared universals. The relation that obtains among such universals, the necessitation relation $N$, exists over and above the mosaic (the trajectories of particles in spacetime). Since the state of affairs that $N$ obtains among universals of mass, force, and acceleration does not supervene on the objects, it can be said to \textit{govern} the objects. In contrast, on Humean Reductionism, at the fundamental level there is nothing that exists except the Humean mosaic. However, the explanation on Platonic Reductionism may not be transparent to those who are not sympathetic to a theory of universals. Because Platonic Reductionism analyzes laws in terms of universals and relations among them, it places certain restrictions on the forms of physical laws. If universals are repeatable entities with multiple locations in space or time, Platonic Reductionism does not seem compatible with laws that are about particular places or times. In our view, that is a problem as it limits physical laws to general facts. For example, the account seems incompatible with taking the Past Hypothesis to be a fundamental law even though we have good arguments for doing so. We return to this point in \S4.2. On Platonic Reductionism, it is unclear how we should think about the direction of time. Even though there is a strong connection between the necessitation relation $N$ and causation, it does not seem that the main defenders build the direction of time into the relation $N$. However, \cite{TooleyTTC} seems to think that the direction of time is reducible to the direction of causation, and causal facts are fundamental in his metaphysics. If that is the case, then causal fundamentalism is true and the direction of time is close to being fundamental. Perhaps that is an optional add-on to his theory of laws. Nevertheless, if Platonic Reductionism does not have room for treating the Past Hypothesis as a fundamental law, it may need to invoke a fundamental direction of time for worlds like ours. Perhaps Platonic Reductionism is best paired with a primitivism about the direction of time. \subsection{Aristotelian Reductionism} The view about laws to which we now turn is most commonly associated with contemporary defenders of dispositional essentialism. On this view, laws, even if they exist, do not govern the world in any metaphysically robust sense. Laws do not push or pull things around. Instead, the patterns we see are explained by the fundamental properties that objects instantiate. Those properties are the seats of metaphysical powers, necessity, and oomph. Those properties make objects, in a certain sense, ``active'' \citep[p.1]{ellis2001scientific}. Such properties are often called ``dispositions,'' and also sometimes called ``powers,'' ``capacities,'' ``potentialities,'' and ``potencies.''\footnote{For an overview of the metaphysics of dispositions, see \cite{sep-dispositions}.} Importantly, they are different from the universals in Platonic Reductionism or the natural properties in Humean Reductionism, which may be viewed as ``passive.'' If there are any laws (and there is an internal debate about this question among defenders of this fundamental dispositional ontology), they derive from or originate in the fundamental dispositions of material objects. Roughly speaking, objects with dispositions have characteristic behaviors (also called manifestation) in response to certain stimuli \citep[p.3]{BirdNM}. For example, a glass has a disposition to shatter when struck; an ice cube has a disposition to melt when heated; salt has a disposition to dissolve when put into water. On this view, fundamental properties are similarly dispositional: negatively charged particles have a disposition to attract positively charged particles; massive particles have a disposition to accelerate in a way that is proportional to the total forces on them and inversely proportional to their masses. Moreover, a dispositional essentialist holds that some properties have dispositional essences, i.e. their essences can be characterized in dispositional terms.\footnote{Some, such as \cite{BirdNM}, go further and claim that all perfectly natural properties in Lewis (1986)'s sense or all sparse universals in Armstrong (1983)'s sense have dispositional essences.} In contrast to Humean Reductionism and Platonic Reductionism, on this view the fundamental ontology is no longer ``passive'' but is ``active and reactive'' \cite[pp.1-2]{ellis2001scientific}. We confess that we do not fully understand such locutions. Perhaps the idea is that material objects move in virtue of the dispositions they possess and not in virtue of something outside (such as a law) that governs them. Among those who endorse a dispositionalist fundamental ontology, not everyone accepts that fundamental laws, which are usually taken to be universally valid and always true, arise from dispositions. For example, \cite{cartwright1983, cartwright1994nature} and \cite{mumford2004laws} deny the need for laws. Nevertheless, the dispositional essentialists need not abandon laws. They can maintain that laws supervene on or reduce to dispositions. Because of its Aristotelian roots \citep{ellis2014philosophy}, we call such a view \textit{Aristotelian Reductionism} about laws.\footnote{Many defenders of this view suggest that even though it has roots in Aristotle, it is not committed to many aspects of Aristotelianism.} \cite{BirdNM} characterizes it as follows: \begin{quotation} According to this view laws are not thrust upon properties, irrespective, as it were, of what those properties are. Rather the laws spring from within the properties themselves. The essential nature of a property is given by its relations with other properties. It wouldn’t be that property unless it engaged in those relations. Consequently those relations cannot fail to hold (except by the absence of the properties altogether, if that is possible). The laws of nature are thus metaphysically necessary. (p.2) \end{quotation} Aristotelian Reductionists maintain that (1) the metaphysical powers, necessity, and oomph reside in the fundamental dispositions; (2) laws are metaphysically derivative of the dispositions; (3) laws are metaphysically necessary. How are laws derived from dispositions? Bird proposes that we can derive laws from certain counterfactual conditionals associated with dispositional essences. A more recent approach is that of \cite{demarest2017powerful, demarestMC} and \cite{kimpton2017humean} that seek to combine a dispositional fundamental ontology with a best-system-analysis of lawhood. Here we focus on the approach of Demarest. She proposes that dispositions (she follows Bird and calls them potencies) do metaphysical work. They produce their characteristic behaviors, resulting in patterns in nature. Their characteristic behaviors, in different possible worlds, can be summarized in simple and informative axiomatic systems, and the best one contains the true laws of nature. That is like Humean Reductionism except that (1) Demerest's fundamental ontology includes potencies and (2) the summary is not of just the actual potencies but also merely possible ones. In this way, her proposal may be an elaboration of Bird's suggestion that we can derive laws from potencies, though she does not rely on counterfactuals. In her most recent work (\citeyear{demarestMC}), she proposes the following account: \begin{description} \item[Dynamic-Potency-BSA (DPBSA):] The basic laws of nature at $w$ are the axioms of the simplest, most informative, true systematization of all $w$-potency-distributions, where a $w$-potency-distribution is a possible distribution of potencies \textit{that is generated by a possible initial distribution of only potencies appearing in w.} (p.9, emphasis original) \end{description} In contrast to Humean Reductionism, here the patterns are ultimately explained by the potencies. How do potencies explain? Demarest provides this answer: \begin{quotation} I think the most promising solution is to appeal to production—dynamic, metaphysical dependence. According to my view, the fundamental ground includes spacetime and an initial arrangement of particles and potencies. And the subsequent behavior of the particles (further potency instantiations as well as trajectories through spacetime) is dynamically, metaphysically dependent upon that base. Since the potency-BSA systematizes those trajectories, the laws of nature are not fundamental, and do not govern, but rather depend upon the behavior of the particles and potencies. To summarize what (metaphysically) explains what: on my view, the initial distribution of particles and their potencies dynamically ground the subsequent behaviors of particles and subsequent property instantiations. And, all of the possible initial distributions and evolutions determine the (metaphysically inert) laws. \citep[pp.51-52]{demarest2017powerful} \end{quotation} The potencies at an earlier time explain how things move at a later time by dynamically producing, determining, or generating the patterns. We note that Demarest's view seems committed to a fundamental direction of time. The account of dynamic explanation presupposes a fundamental distinction between past and future, i.e. between the initial and the subsequent states of the world. The initial arrangement of particles and potencies metaphysically ground subsequent behaviors of particles. The commitment of a fundamental direction of time does not seem optional on her view. Moreover, the metaphysical framework of fundamental dispositions already seems committed to a fundamental direction of time, independently of the issue of laws. For example, it is natural to interpret the discussions by Ellis, Bird, Mumford as suggesting that the manifestation of a disposition cannot be temporally prior to its stimulus, which presupposes a fundamental direction of time.\footnote{In contrast, \cite{vetter2015potentiality} is open to a temporally symmetric metaphysics but assumes temporal asymmetry in her account of dispositions (which she calls potentialities).} Therefore, although Aristotelian Reductionism does away with the governing conception of laws, the view seems committed to a fundamental direction of time twice over. \subsection{Maudlinian Primitivism} In his book \textit{The Metaphysics Within Physics} (\citeyear{MaudlinMWP}), Maudlin develops and defends a primitivist view about laws.\footnote{\cite{carroll1994laws} seems to endorse a version of primitivism about laws, though recently \citep{carroll2018becoming} he distances his view from that of Maudlin and suggests a non-Humean reductive analysis of laws. } As a primitivist, he suggests that we should not analyze or reduce laws into anything else. Laws are metaphysically fundamental; they are primitive entities that do not supervene on other entities. To have a sufficiently explanatory metaphysical theory, our fundamental ontology needs to include not only spatiotemporal objects but also laws that govern them. Maudlin rejects any reduction or deeper analysis of laws. He characterizes his primitivism as follows: \begin{quotation} My analysis of laws is no analysis at all. Rather I suggest we accept laws as fundamental entities in our ontology. Or, speaking at the conceptual level, the notion of a law cannot be reduced to other more primitive notions. (p.18) \end{quotation} As a motivation for adopting primitivism over reductionism (especially Humean Reductionism), he writes: \begin{quotation} [Nothing] in scientific practice suggests that one ought to try to reduce fundamental laws to anything else. Physicists simply postulate fundamental laws, then try to figure out how to test their theories; they nowhere even attempt to analyze those laws in terms of patterns of instantiation of physical quantities. The practice of science, I suggest, takes fundamental laws of nature as further unanalyzable primitives. As philosophers, I think we can do no better than to follow this lead. (p.105) \end{quotation} Maudlin is also committed to primitivism about the direction of time: that the distinction between past and future is metaphysically fundamental and not reducible to anything else. There is in effect a fundamental arrow or orientation at every spacetime point that points to the future. Maudlin combines the two commitments into a metaphysical package: \begin{quotation} Let’s call the idea that both the laws of physics (as laws of temporal evolution) and the direction of time are ontological primitives \textit{Maudlin’s Non-Humean Package}. According to this package, the total state of the universe is, in a certain sense, derivative: it is the product of the operation of the laws on the initial state. (p.182) \end{quotation} There are several reasons that Maudlin is committed to both. They become clear as we consider how laws explain on his account. For Maudlin, laws produce or generate later states of the world from earlier ones. In this way, via the productive power of the laws, subsequent states of the world (and its parts) are explained by earlier ones and ultimately by the initial state of the universe. It is this productive explanation that is central to his account. Production is closely related to causation, and just like (paradigm cases of) causation it is time asymmetric. Future states are produced from earlier states but not vice versa. This, for example, allows Maudlin's account to vindicate a widespread intuition about Bromberger's flagpole. The shadow is produced by the circumstances and the length of the pole (together with the laws). Although we can deduce from the laws the pole length based on the circumstances and the shadow length, the pole length is not produced by them. Hence, given the laws, the pole length and the circumstances explain, but are not explained by, the shadow length. Similar productive explanations can be given in more complicated cases. The operation of the primitive laws depends on the primitive direction of time. Primitive laws act on past states to produce future states. Maudlin thinks that his package yields an attractive picture by being closer to our initial conception of the world: \begin{quotation} The universe started out in some particular initial state. The laws of temporal evolution operate, whether deterministically or stochastically, from that initial state to generate or produce later states. (p.174) \end{quotation} \begin{quotation} This sort of explanation takes the term initial quite seriously: the initial state temporally precedes the explananda, which can be seen to arise from it (by means of the operation of the law). (p.176) \end{quotation} \begin{quotation} The non-Humean package [described above] is, I think, much closer to the intuitive picture of the world that we begin our investigations with. Certainly, the fundamental asymmetry in the passage of time is inherent in our basic initial conception of the world, and the fundamental status of the laws of physics is, I think, implicit in physical practice. Both of the strands of our initial picture of the world weave together in the notion of a productive explanation, or account, of the physical universe itself. The universe, as well as all the smaller parts of it, is made: it is an ongoing enterprise, generated from a beginning and guided towards its future by physical law. (p.182) \end{quotation} This intuitive picture of the world require certain restrictions on the form of fundamental laws. They have to be, what Maudlin calls, \textit{fundamental laws of temporal evolution} (FLOTEs). Examples include Newton's $F=ma$, Schr\"odinger's equation, and Dirac's equation on our first list in \S1 but exclude most examples on our second list. Let us summarize Maudlin's metaphysical package as follows: \begin{description} \item[Maudlinian Primitivism] Fundamental laws are certain primitive facts in the world. Only dynamical laws (in particular, laws of temporal evolution) can be fundamental laws. They operate on the universe by producing later states of the universe from earlier ones, in accord with the fundamental direction of time. \end{description} Maudlin allows there to be primitive stochastic dynamical laws---those laws that involve objective probability such as the GRW collapse laws. Hence, dynamic production need not be deterministic. An initial state can be compatible with multiple later states, determining only an objective probability distribution over those states. Perhaps the objective probability can be understood as \textit{propensity}, with stochastic production implying variable propensities of producing various states, in proportion to their objective probabilities and in accord with the direction of time. However, even if deterministic production is an intelligible notion, it is not clear that stochastic production or propensity is as intelligible. (Recall the earlier point about ``probabilistic necessitation'' in Platonic Reductionism.) This may be another instance of the general phenomenon that objective probability (or chance) is conceptually murkier on non-Humean metaphysics than on Humean metaphysics. At first glance, Maudlin's view is intuitive. It is attractive to those who accept a fundamental direction of time. According to Maudlinian Primitivism, there is a fundamental distinction between past and future that is not reducible to entropic arrow of time, the distribution of matter in the universe, or special boundary conditions. This distinction picks out an initial state of the universe, in the literal sense of ``initial,'' that is earlier than any other states. Nonetheless, Maudlin is committed to a ``block universe'' picture of time on which all times (past, present, and future) are equally real. Maudlin rejects presentism, the moving spotlight view, the growing block view, and the shrinking block view. So it is not the same as those pictures where spacetime is ``dynamic'' or the present moment is metaphysically privileged. However, the view may not be as intuitive as it first seems. First, in relativistic spacetimes, there is no absolute simultaneity or a physically privileged notion of ``now.'' The fundamental distinction between past and future needs to be understood without referring to a preferred foliation and should not involve an objective present. For any spacetime event, it requires an objective fact about which light cone points to the past and which one points to the future. Second, we may wonder how dynamic production extends to spacetimes with no ``first'' moment of time, such as those with an ``initial'' singularity or without temporal boundaries. If there is no initial state, perhaps the oomph of dynamic production, though having no beginning, always comes from earlier states. Third, the very notion of dynamic production is a bit unclear. We return to this issue in \S3.2. If one believes in Maudlinian Primitivism and its associated principle of (dynamic) productive explanation, then one needs to place restrictions on the form of laws. They can only take the form of FLOTEs. We return to this issue in \S4.4. \section{Minimal Primitivism (MinP)} Having surveyed four existing approaches to laws, we propose our own view, which we call \textit{Minimal Primitivism} (MinP). \subsection{The View} According to MinP, fundamental laws are ontological primitives that are metaphysically fundamental.\footnote{\cite{bhogal2017minimal} proposes a ``minimal anti-Humeanism'' on which laws are ungrounded (true) universal generalizations. It may be a version of primitivism, but it is not as minimal as ours. For one thing, on Bhogal's view laws cannot be singular facts about particular times or places. However, Bhogal (p.447, fn.1) seems open to relax the requirement that laws have to be universal generalizations. It would be interesting to see how to extend Bhogal's view to do so. } They do not require anything else to exist. They are not analyzable into (relations among) universals, powers, or dispositions. They are not reducible to (or supervenient on) the Humean mosaic. Rather, if the Humean mosaic describes spacetime and its contents, then the mosaic is governed by the laws, in a metaphysically robust sense. For governing laws, we do not require them to dynamically produce or generate later states of the universe from earlier states, and neither do we presuppose a fundamental direction of time that distinguishes between past states and future ones. On MinP, laws govern by constraining the physical possibilities (often called nomological possibilities in the metaphysics literature). This places no in-principle demands on the form of fundamental laws. To summarize, the first part of our view is a metaphysical thesis: \begin{description} \item[Minimal Primitivism] Fundamental laws of nature are certain primitive facts about the world. There is no restriction on the form of the fundamental laws. They govern the behavior of material objects by constraining the physical possibilities. \end{description} Even though there is no metaphysical restriction on the form of fundamental laws, it is rational to expect them to have certain nice features, such as simplicity and informativeness. On Humean Reductionism, those features are metaphysically constitutive of laws, but on our view they are merely epistemic guides for discovering and evaluating the laws. At the end of the day, they are defeasible guides, and we can be wrong about the fundamental laws even if we are fully rational in scientific investigations. The second part of our view is an epistemic thesis: \begin{description} \item[Epistemic Guides] Even though theoretical virtues such as simplicity, informativeness, fit, and degree of naturalness are not metaphysically constitutive of fundamental laws, they are good epistemic guides for discovering and evaluating them. \end{description} Let us offer some clarifications: (1) \textit{Primitive facts}. Fundamental laws of nature are certain primitive facts about the world, in the sense that they are not metaphysically dependent on, reducible to, or analyzable in terms of anything else. Depending on one's metaphysical attitude towards mathematics and logic, there might be mathematical and logical facts that are also primitive in that sense. For example, arithmetical facts such as $2+3=5$ and the logical law of excluded middle may also be primitive facts that constrain the physical possibilities, since every physical possibility must conform to them. However, we do not think that fundamental laws of nature are purely mathematical or logical. Hence, we stipulate that fundamental laws of nature are not such kinds of primitive facts. (2) \textit{The governing relation}. We suggest that laws govern by constraining the physical possibilities. More precisely, laws govern by limiting the physical possibilities and constraining the actual world (history) to be one of them. In other words, the actual world (history) is constrained to be compatible with the laws. To use an earlier example, $F=ma$ governs by constraining the physical possibilities to exactly those that are compatible with $F=ma$. If $F=ma$ is a governing law of the actual world, then the actual world (history) is a possibility compatible with $F=ma$. This notion of constraint does not require a fundamental distinction between past and future, or one between earlier states and later states. What the laws constrain is the entire spacetime and its contents. In some cases, the constraint can be expressed in terms of differential equations that can be interpreted as determining future states from past ones. But not all constraints need be like that. We discuss this point in \S3.2.\footnote{For those metaphysically inclined, here are some formal details. Consider $w$, the complete history of a possible world describable in terms of matter in spacetime. Let $\Omega_w$ be the non-empty set of worlds that are physically possible (from the perspective of $w$). It is \textit{a priori} that $w \in \Omega_w$. Consider fact $L$, which may be Newton's equation of motion with Newtonian gravitation. Let $\Omega^L$ be the set of models generated by $L$. Now, suppose $L$ governs $w$. Then the following is true: \begin{description} \item[Equivalence] $\Omega^L = \Omega_w$ \end{description} Equivalence makes precise the idea that on MinP governing laws limit the physical possibilities. Since $w \in \Omega_w$, it follows that: \begin{description} \item[Constraint] $w \in \Omega^L$ \end{description} Constraint makes precise the idea that, on MinP, laws constrain the actual world. For MinP, we postulate that the above notions and derivations make sense. A few epistemological remarks: the fact that $\Omega^L = \Omega_w$ is knowable \textit{a posteriori}; consequently, the fact that $w \in \Omega^L$ is also knowable \textit{a posteriori}. A careful reader might raise a consistency worry here: what if a single world (history) $w$ is compatible with two different laws $L$ and $L'$ with non-empty overlap in their solution spaces, such that $w\in \Omega^L \cap \Omega^{L'}$? The worry is handled by the earlier postulates. Having $w\in \Omega^{L'}$ is not sufficient for $L'$ to be the governing law or for $\Omega^{L'}$ to be the set of physical possibilities. MinP assumes that, from the perspective each world, there is a single set of physical possibilities. Hence, for $w$, at most one of $ \Omega^L $ and $ \Omega^{L'}$ is equivalent to $\Omega_w$. Moreover, since $\Omega_w$ is non-empty, the laws that govern $w$ must be consistent with each other. } For a concrete example, consider the Hamiltonian equations of motion for $N$ point particles with Newtonian masses $(m_1, ..., m_N)$ moving in a 3-dimensional Euclidean space, whose positions and momenta are $(\boldsymbol{q_1}, ..., \boldsymbol{q_N}; \boldsymbol{p_1},...,\boldsymbol{p_N})$: \begin{equation}\label{HE} \frac{d \boldsymbol{q_i}(t)}{d t} = \frac{\partial H}{\partial \boldsymbol{p_i}} \text{ , } \frac{d \boldsymbol{p_i}(t)}{d t} = - \frac{\partial H}{\partial \boldsymbol{q_i}} \end{equation} where $H = H(\boldsymbol{q_1}, ..., \boldsymbol{q_N}; \boldsymbol{p_1},...,\boldsymbol{p_N})$ is specified in accord with Newtonian gravitation: \begin{equation}\label{H} H = \sum^{N}_{i} \frac{\boldsymbol{p_i}^2}{2m_i} + \sum_{1\leq j < k\leq N} \frac{G m_j m_k}{|\boldsymbol{q_j} - \boldsymbol{q_k}|} \end{equation} Suppose equations (\ref{HE}) and (\ref{H}) are the fundamental laws that govern our world $\alpha$. Let $\Omega^H$ denote the set of solutions to (\ref{HE}) and (\ref{H}). Let $\Omega_{\alpha}$ denote the set of physical possibilities of the actual world. Saying that (\ref{HE}) and (\ref{H}) govern our world entails that $\Omega^H = \Omega_{\alpha}$. Since $\alpha \in \Omega_{\alpha}$, we have $\alpha \in \Omega^H$, which means our world is constrained by (\ref{HE}) and (\ref{H}). In this example, the dynamical equations are time-reversible. For every solution in $\Omega^H$, its time reversal under $t \rightarrow -t$ and $\boldsymbol{p} \rightarrow - \boldsymbol{p}$ is also a solution in $\Omega^H$. Since the concept of governing in MinP does not presuppose a fundamental direction of time, two solutions that are time-reversal of each other can be identified as the same physical possibility.\footnote{If one prefers the representation where the set of physical possibilities contains each possibility exactly once, one can derive a quotient set $\Omega_{\alpha}^\ast$ from $\Omega_{\alpha}$ with the equivalence relation given by the time-reversal map. } We should not think of a law as necessarily equivalent to the set of possibilities it generates. The two can be different. For example, there are many principles and equations that can give rise to the same set of possibilities denoted by $\Omega^H$. But we expect laws to be simple. One way to pick out the set $\Omega^H$ is by giving a complete (and infinitely) long list of possible histories contained in $\Omega^H$. Another is by writing down simple equations, such as (\ref{HE}) and (\ref{H}), which express simple laws. Hence, the equivalence of physical laws is not just the equivalence of their classes of models. For two laws to be equivalent, it will require something more.\footnote{It is an interesting question, on MinP, what more is required and how to understand the equivalence of physical laws. We do not provide such an account as it is orthogonal to our main concerns in the paper. For a survey of the related topic of theoretical equivalence, see \cite{weatherall2019part1, weatherall2019part2}. } Humeans might object that our notion of governing is entirely mysterious \citep{BeebeeNGCLN}. The notion of governing seems derived from the notion of government and the notion of being governed. But laws of nature are obviously not imposed by human (or divine) agents. So isn't it mysterious that laws can govern? To that we reply that a better analogy for governing laws is not to human government, but to laws of mathematics and logic. Arithmetical truths such as $2+3=5$ and logical truths such as the law of excluded middle can also be said to constrain our world. That is, the actual world cannot be a world that violates those mathematical or logical truths. In fact, every possible world needs to respect those truths. In a similar way, laws of physics constrain our world. The actual world cannot be a world that violates the physical laws, and every physically possible world needs to respect those laws. Those modal claims reflect physical laws and mathematical laws. We can also make sense of the difference in scope between those laws. Mathematical laws are more general than physical laws, in the sense that the former are compatible with ``more models'' than the latter. In any case, mathematical laws and logical laws can also be said to govern the universe in the sense of imposing formal constraints. They generate a class of models and constrain the actual world to be one among them. There is also a difference in epistemic access. In some sense, we discover mathematical and logical laws \textit{a priori}, without the need for experiments or observations, but we discover physical laws \textit{a posteriori}, empirically. We do not claim that the analogy with mathematical and logical laws completely eliminate the mystery of how physical laws govern. However, we think it dispels the objection as previously stated, in terms of how something can govern the world without being imposed by an agent. If there is more to the mystery objection, it needs to be stated differently. On MinP, laws govern by constraining, and constraining is what they do. This provides the oomph behind scientific explanations. (We return to this shortly.) However, such an oomph is very minimal. It does not require dynamic production, and it does not require an extra process supplied by a mechanism or an agent. (3) \textit{Epistemic access}. On MinP, even though the Humean criteria for the best system are not metaphysically constitutive for lawhood, they are nonetheless excellent epistemic guides for discovering and evaluating them. Lewis is right that in scientific practice, in the context of discovery, we do aim to balance simplicity and informativeness (among other things). Regarding Epistemic Guides, one might ask in virtue of what those theoretical virtues are good guides for finding and evaluating laws. This is a subtle issue, and we are not prepared to give a complete answer here. Unlike Humeans, we cannot appeal to a reductive analysis of laws. We can offer an empirical justification: the scientific methodology works. In so far as those theoretical virtues are central to scientific methodology, they are good guides for discovering and evaluating laws, and we expect them to continue to work. Can they fail to deliver us the true laws? That is a possibility. However, if that turns out to be the case and if the true fundamental laws are complicated and messy, scientists would not be inclined to call them laws. We return to this point in \S3.2. (4) We now address several other questions that arise concerning MinP. \begin{itemize} \item According to MinP, can laws change with time? In particular, can fundamental laws be time dependent in such a way that different cosmic epochs are governed by different laws? In principle, we are open to that possibility. If there is scientific motivation to develop theories in which laws take on different forms at different times (or in different epochs), then that is sufficient reason to consider a set of laws that govern different times, or a single law that varies in form with time. As a toy example, if we have empirical or theoretical reasons to think that the laws of motion are different on the two sides of the Big Crunch, say Newtonian mechanics and Bohmian mechanics, then different sides of the Crunch can be governed by different laws, or by a single law with a temporal variation. \item According to MinP, can fundamental laws refer to non-fundamental properties, such as entropy? Most of the fundamental laws we discover refer only to fundamental properties. But it is reasonable to consider candidate fundamental laws that refer to non-fundamental properties. Our principle of Epistemic Guides allows for this, as long as the non-fundamental properties are not too unnatural (all things considered). In the case of the Past Hypothesis, for example, we may sacrifice fundamentality of the property involved but gain a lot of informativeness and simplicity if we invoke the property of entropy. The version of the Past Hypothesis that refers to entropy can still govern by constraining the physical possibilities. (Another strategy is to revise our definition of fundamental property such that any property mentioned by a fundamental law is regarded as fundamental, although it may be analyzable in terms of other fundamental properties. However, this may present a problem for certain views of fundamentality.) \item According to MinP, how are fundamental laws distinguished from non-fundamental laws? We prefer a reductionist picture where non-fundamental laws, when properly understood, are reducible to fundamental laws. We can distinguish them in terms of derivability: non-fundamental laws can be (non-trivially) derived from fundamental laws. For example, the ideal gas law is less fundamental than Newton's laws of motion, in the sense that the ideal gas law can be derived from them in suitable regime. However, derivability may not be sufficient for non-fundamental \textit{lawhood}, as other factors, such as counterfactual and explanatory robustness, may also be relevant. \item How does MinP compare to the other views in \S2? We discuss this in \S4. \end{itemize} \subsection{MinP and Explanation} On MinP, laws explain, but not by accounting for the dynamic production of successive states of the universe from earlier ones. They explain by expressing a hidden simplicity, given by compelling constraints that lie beneath complex phenomena. A fundamental direction of time is not required for our notion of explanation. (This type of explanation, sometimes called ``constraint explanation,'' has been explored in the causation literature by \cite{ben2018causation} and non-causal explanation literature by \cite{lange2016because}. Their accounts, with suitable modifications, may apply here. We leave a comparative analysis to future work.) In a world governed by Newtonian mechanics, particles travel along often complicated trajectories because that is implied by the simple fundamental law $F=ma$. Laws explain only when they can be expressed by simple principles or differential equations. It is often the case that the complicated patterns we see in spacetime can be derived from simple rules that we call laws. Fundamental laws need not be time-directed or time-dependent. They may govern purely spatial distribution of matter. For example, Gauss's law \begin{equation}\label{Gauss} \nabla \cdot \textbf{E} = \frac{\rho}{\epsilon_0} \end{equation} in classical electrodynamics---one of Maxwell's equations---governs the distribution of electric charges and the electric field in space. Often the explanation that laws provide involves deriving striking, novel, and unexpected patterns from simple laws. The relative contrast between the simplicity of the law and the complexity and richness of the patterns may indicate that the law is the correct explanation of the patterns. For a toy example, consider the Mandelbrot set in the complex plane, produced by the simple rule that a complex number $c$ is in the set just in case the function \begin{figure} \centerline{\includegraphics[scale=0.4]{Mandel_set.jpg}} \caption{The Mandelbrot set with continuously colored environment. Picture created by Wolfgang Beyer with the program Ultra Fractal 3, CC BY-SA 3.0, https://creativecommons.org/licenses/by-sa/3.0, via Wikimedia Commons} \end{figure} \begin{equation}\label{Mandel} f_c (z) = z^2 +c \end{equation} does not diverge when iterated starting from $z=0$. (For example, $c=-1$ is in this set but $c=1$ is not, since the sequence $(0,-1,0,-1,0,-1, ...)$ is bounded but $(0,1,2,5,26,677,458330, ...)$ is not. For a nice description and visualization, see \cite[ch.4]{roger1989emperor}.) Here, a relatively simple rule yields a surprisingly intricate and rich pattern in the complex plane, a striking example of what is called the fractal structure. Now regard the Mandelbrot set as corresponding to the distribution of matter over (a two-dimensional) spacetime, the fundamental law for the world might be the rule just described. What is relevant here is that given just the pattern we may not expect it to be generated by any simple rule. It would be a profound discovery in that world to learn that its complicated structure is generated by the aforementioned rule based on the very simple function $f_c (z) = z^2 +c $. On our conception, it would be permissible to claim that the simple rule expresses the fundamental law, even though it is not a law for dynamic production. The previous examples illustrate some features of explanation on MinP: \begin{enumerate} \item Laws explain by constraining the physical possibilities in an illuminating manner. \item Nomic explanations (explanations given by laws) need not be dynamic explanations; indeed, they need not involve time at all. \item Explanation by striking constraint can be especially illuminating when an intricate and rich pattern can be derived from a simple rule that expresses the constraint imposed by a law. \end{enumerate} On our view, more generally, there are two ingredients of a successful scientific explanation: a metaphysical element and an epistemic one. It must refer to the objective structure in the world, but it also must relate to our mind, remove puzzlement, and provide an understanding of nature. We suggest that a successful scientific explanation that fundamental laws provides should contain two aspects: (1) metaphysical fundamentality and (2) simplicity. The first aspect concerns the metaphysical status of fundamental laws: they should not be mere summaries of, or supervenient on, what actually happens; moreover, their truths should not depend on our actual practice or beliefs. This aspect is the \textit{precondition} for having a non-Humean account of scientific explanations. On MinP, the precondition is fulfilled by postulating fundamental laws as primitive (metaphysically fundamental) facts that constrain the world. The constraint provides the needed \textit{oomph} behind scientific explanations. Here lies the main difference between MinP and Humean Reductionism. (We return to this point in \S4.1.) The second aspect concerns how fundamental laws relate to us. Constraints, in and of themselves, do not always provide satisfying explanations. Many constraints are complicated and thus insufficient for understanding nature. What we look for in the final theory of physics is not just any constraint but simple, compelling ones that ground observed complexities of an often bewildering variety. The explanation they provide corresponds to insight or realization that leads us to say, ``Aha! Now I understand.'' Often, simplicity is related to elegance or beauty. As Penrose reminds us: \begin{quotation} Elegance and simplicity are certainly things that go very much together. But nevertheless it cannot be quite the whole story. I think perhaps one should say it has to do with \textit{unexpected} simplicity, where one imagines that things are going to be complicated but suddenly they turn out to be very much simpler than expected. It is not unnatural that this should be pleasing to the mind. \cite[p.268]{penrose1974role} \end{quotation} The sense of unexpected simplicity is illustrated in the toy example of the Mandelbrot set as well as the physical laws discovered by Newton, Schr\"odinger, and Einstein. Moreover, the second aspect of scientific explanation illuminates our principle of Epistemic Guides. It is obvious that fundamental laws should be empirically adequate and consistent with all phenomena. But why should we expect them to be simple? On our view, it can partly be answered by thinking about the nature of scientific explanations. If successful scientific explanations require simple laws, then laws should be simple to perform the explanatory role. One might press further and ask why laws should perform such roles and why scientific explanations can be successful. But they can be raised for any account of laws. We note that it is a difficult issue, one that may be related to Hume's problem of induction \citep{sep-induction-problem}. \subsection{Examples and Further Clarifications} To further clarify MinP, we discuss some examples of dynamical laws and non-dynamical constraint laws. On our view, there is no difficulty accommodating them, as they can be understood as laws that constrain physical possibilities. We also consider laws that involve intrinsic randomness, as they are less easy to accommodate on our view. We offer five interpretive options for further consideration. \subsubsection{Dynamical Laws} We take a dynamical law to be any law that determines how objects move or things change. (Here we focus on non-probabilistic laws and leave probabilistic ones to \S3.2.3.) Thus, our notion of dynamical laws is wider than Maudlin's notion of FLOTEs. \textit{Hamilton's Equations.} Consider classical mechanics for the $N$ particles, described by Hamilton's equations of motion (\ref{HE}) with a Hamiltonian specified in (\ref{H}). Hamilton's equations are differential equations of a particular type: they admit initial value formulations. An intuitive way of thinking about dynamical laws is to understand them as evolving the initial state of the world into later ones. However, this view is not entirely natural for such a system. The view requires momenta to be part of the intrinsic state of the world at a time; but it seems more natural to regard them as aspects of extended trajectories, spanning continuous intervals of time. Regarding governing as dynamic production leads to awkward questions about instantaneous states and whether they include velocities and momenta. The situation becomes even more complicated with relativistic spacetimes having no preferred foliation of equal-time hypersurfaces. If there is no objective fact about which events are simultaneous, there is no unique prior Cauchy surface that is responsible for the production of any later state. This seems to detract from the intuitive idea of dynamic production as a relation with an objective input, making it less natural in a relativistic setting.\footnote{Christopher Dorst raised a similar point in personal communication.} Instead of demanding that laws govern by producing subsequent states from earlier ones, we can regard laws as constraining the physical possibilities of spacetime and its contents. There is no difficulty accommodating the above example or any other type of dynamical laws. A dynamical law specifies a set of histories of the system and need not be interpreted as presupposing a fundamental direction of time. The histories the laws allow can often be understood as direction-less histories, descriptions of which events are temporally between which other events. A dynamical law such as (\ref{HE}) governs the actual world by constraining its history to be one allowed by (\ref{HE}). And MinP requires no privileged splitting of spacetime into space and time, as the physical possibilities can be stated in a completely coordinate-free way in terms of the contents of the 4-dimensional spacetime. \textit{Principles of Least Action.} Besides dynamical laws of Hamiltonian form, other kinds of equations and principles are often employed even for Hamiltonian systems. Consider, for example, Hamilton's principle of least action: this requires that for a system of $N$ particles with Cartesian coordinates $\boldsymbol{q}=(q_1, q_2, ..., q_N)$: \begin{equation}\label{PLA} \delta S = 0 \end{equation} where $S=\int^{t_2}_{t_1} L(\boldsymbol{q}(t), \boldsymbol{\dot{q}}, t) dt$, with $\boldsymbol{\dot{q}}=\boldsymbol{q}(t)/dt$, $\delta$ the first-order variation of $S$ corresponding to small variation in $\boldsymbol{q}(t)$, and $L$ the Lagrangian which is taken to be the kinetic energy minus the potential energy of the system of $N$ particles. While mathematically equivalent to Hamilton's equations, the principle of least action feels very different from a law expressing dynamic production. For those who take dynamic production to be constitutive of governing, the principle of least action cannot be the fundamental governing law. They would presumably need to insist that the universe is genuinely governed by some law of a form such as (\ref{HE}), with the principle of least action arising as a theorem. For us, we have no problem regarding the principle of least action as a candidate fundamental law, with no need for it to be derived from anything else. For a universe to obey the principle, its history must be one compatible with (\ref{PLA}). That is the sense in which it would govern our universe. \textit{Wheeler-Feynman Electrodynamics.} Physicists have also considered dynamical equations that cannot be reformulated in Hamiltonian form. On MinP, there is no prohibition against laws expressed by such equations. For example, \cite{wheeler1945interaction, wheeler1949classical} considered equations of motion for charged particles that involve both retarded fields ($F_{ret}$) and advanced ones ($F_{adv}$). On their theory, the trajectory of a charged particle depends on charge distributions in the ``past'' (corresponding to $F_{ret}$) as well as those in the ``future'' (corresponding to $F_{adv}$). Since the total field acting on particle $j$ is $F_{tot} = \sum_{k \neq j} \frac{1}{2}(^{(k)}F_{ret}+{}^{(k)}F_{adv})$, the equation of motion for particle $j$ of mass $m_j$, charge $e_j$, and spacetime location $q_j$ is \begin{equation} m_j \ddot{q}_j^{\mu} = e_{j}\sum_{k \neq j} \frac{1}{2}(^{(k)}F_{ret}^{\mu \nu} + {}^{(k)}F_{adv}^{\mu \nu}) \dot{q}_{j,\nu} \end{equation} with the dot the time derivative with respect to proper time, $^{(k)}F_{ret}$ the retarded field contributed by particle $k$, and $^{(k)}F_{adv}$ the advanced one. (For more details, see \cite{deckert2010electrodynamic} and \cite{lazarovici2018against}.) It is unclear how to understand the above equation in terms of dynamic production. In contrast, it is clear on MinP: the fundamental law corresponding to such equations can be regarded as a constraint on all trajectories of charged particles in spacetime. \textit{Retrocausal Quantum Mechanics.} There have been proposed reformulations of quantum mechanics that involve two independent wave functions of the universe: $\Psi_i(t)$ evolving from the ``past'' and $\Psi_f(t)$ evolving from the ``future.'' Some such proposals, motivated by a desire to evade no-go theorems or preserve time-symmetry, implement retrocausality or backward-in-time causal influences \citep{sep-qm-retrocausality}. Consider \cite{sutherland2008causally}'s causally symmetric Bohm model, which specifies an equation of motion governing $N$ particles moving in a 3-dimensional space under the influence of both $\Psi_i(t)$ and $\Psi_f(t)$: \begin{equation} \frac{d\boldsymbol{Q_j}(t)}{dt} = \frac{Re(\frac{\hbar}{2im_ja} \Psi_f^\ast \nabla_j \Psi_i)}{Re(\frac{1}{a}\Psi_f^\ast \Psi_i) } (Q (t), t) \end{equation} with $Q(t)= (\boldsymbol{Q_1}(t), ... , \boldsymbol{Q_N}(t)) \in \mathbb{R}^{3N}$ the configuration of the $N$ particles at time $t$, $m_j$ the mass of particle $j$, and $a$ the normalization factor. It is unclear whether Sutherland's theory is viable; it also has many strange consequences. Nevertheless, MinP is compatible with regarding the above equation, understood as a constraint of particle trajectories in spacetime, as expressing a fundamental law (even though we have other reasons to not endorse the theory). Similarly, MinP is compatible with \cite{goldstein2003opposite}'s model of two opposite directions of time. To reconcile relativity (Lorentz invariance) and non-locality, the model contains a macroscopic boundary-condition law on the ``future'' end of time and a microscopic dynamical equation acting on ``past'' data. Together, they constrain the particle trajectories in spacetime. \textit{The Einstein Equation.} In general relativity, the fundamental equation is the Einstein equation: \begin{equation}\label{EFE} R_{ab} - \frac{1}{2} R g_{ab} = k_0 T_{ab} + \Lambda g_{ab} \end{equation} where $R_{ab}$ is the Ricci tensor, $R$ is the Ricci scalar, $g_{ab}$ is the metric tensor, $T_{ab}$ is the stress-energy tensor, $\Lambda$ is the cosmological constant, $k_0 = 8\pi G/c^4$ with $G$ Newton's gravitational constant and $c$ the speed of light. Roughly speaking, the Einstein equation is a constraint on the relation between the geometry of spacetime and the distribution of matter (matter-energy) in spacetime. On MinP, we have no problem taking the equation itself as expressing a fundamental law of nature, one that constrains the actual spacetime and its contents. If equation (\ref{EFE}) governs our world in the minimal primitivist sense, then that is a fundamental fact that does not supervene on or reduce to the actual spacetime and its contents. There are ways of converting equation (\ref{EFE}) into FLOTEs that are suitable for a dynamic productive interpretation. (A famous example is the ADM formalism \citep{arnowitt62}.) However, they often discard certain solutions (such as spacetimes that are not globally hyperbolic). For non-Humeans who take dynamic production as constitutive for governing or explanations, those reformulations will be necessary. For them, the true laws of spacetime geometry should presumably be expressed by equations that describe the evolution of a 3-geometry in time. In contrast, on MinP there is no metaphysical problem for taking the original Einstein equation as a fundamental law. The Einstein equation is simple and elegant and is generally regarded as the fundamental law in general relativity. We prefer not to discard or modify it on metaphysical grounds.\footnote{Making a similar point, Callender (\citeyear[p.139]{callender2017makes}) writes: ``[The] ten vacuum Einstein field equations separate into six ``evolution'' equations $G_{ij}=0$ and four ``constraint equations,'' $G_{00}=0$ and $G_{0i}=0$, with $i=1,2,3.$ The latter impose nomic conditions across a spacelike slice. To decree that four of the ten equations that constitute Einstein's field equations are not nomic without good reason is unacceptable.''} The Einstein equation allows some peculiar solutions. A particularly striking class of examples are spacetimes with closed timelike curves (CTCs). For MinP, there would seem to be no fundamental reason why such a possibility should be precluded. But the possibility of CTCs is precluded by Maudlinian Primitivism, since they may lead to an event that dynamically produces itself \cite[p.175]{MaudlinMWP}. And it is hard to see how Demarest's version of Aristotelian Reductionism can allow them. Humean Reductionism should be compatible with CTCs, just as MinP is. It is unclear whether they are compatible with Platonic Reductionism. \subsubsection{Non-Dynamical Constraint Laws} The examples mentioned earlier are explicitly related to time. There are also important equations and principles that are not. For example, some purely spatial constraints on the universe may be thought of as physical laws. We call them non-dynamical constraint laws. The minimal notion of governing easily applies to them. In \S3.1 we considered two examples of such laws---(\ref{Gauss}) and (\ref{Mandel}). Here we consider a few more. \textit{The Past Hypothesis.} In the foundations of statistical mechanics and thermodynamics, followers of Boltzmann have proposed a candidate fundamental law of physics that Albert (2010) calls the Past Hypothesis (PH). It is a special boundary condition that is postulated to explain the emergent asymmetries of time in our universe, such as the Second Law of Thermodynamics. Here is one way to state it: \begin{description} \item[PH] At one temporal boundary of the universe, the universe is in a low-entropy state. \end{description} This statement of PH is vague. We may be able to make it more precise by specifying the low-entropy state in terms of the thermoydnamic properties of the universe or in terms of some geometrical properties \citep{penrose1979singularities}. Penrose's version in general relativity renders it as follows: the Weyl curvature $C_{abcd}$ vanishes at any ``initial'' singularity. Let us use $\Omega_{PH}$ to denote the set of worlds compatible with PH. If it is plausible that PH is a candidate fundamental law \citep{chen2020harvard}, then the metaphysical account of laws should make room for a boundary condition to be a fundamental law. On MinP, such an account is no problem. Together, PH and dynamical laws can govern the actual world by constraining it to be one among the histories compatible with all of them. They deem that the actual world (history) is a member of the intersection $\Omega^{PH} \cap \Omega^{DL}$, where the latter denotes the set of histories compatible with the dynamical laws. However, PH is not a governing law in the sense of dynamic production. So its fundamental lawhood is incompatible with Maudlinian Primitivism. And it is not a natural fit for Aristotelian Reductionism (but see \cite{demarest2019mentaculus} for a recent proposal for how they might fit). It is possible that the vagueness in PH cannot be eliminated. If PH (or something like it) turns out to be a fundamental law, then there can be vagueness in the fundamental laws. See \cite{chen2018NV} for a discussion of this possibility, called ``fundamental nomic vagueness.'' On MinP, fundamental nomic vagueness implies that there are vague fundamental facts. Whether fundamental nomic vagueness exists in our world is a subtle question. (It is related to the issue of whether the ontic quantum state of the universe is pure or impure \cite[sect.4]{chen2018NV}.) \textit{Conservation Laws and Symmetry Principles.} According to a traditional perspective, symmetries such as those of rotation, spatial translation, and time translation are properties of the specific equations of motion. By Noether's theorem, those symmetries yield various conservation laws as theorems rather than postulates that need to be put in by hand. On that perspective, symmetries and conservation laws can be regarded as ontologically derivative of the fundamental laws, and are compatible with all metaphysical views on laws. According to a more recent perspective, symmetries are fundamental. See for example: \cite{wigner1964symmetry, Wigner1985} and \cite{steven1992dreams}. \cite{lange2009laws} calls them \textit{metalaws}. For example, Wigner describes symmetries as ``laws which the laws of nature have to obey'' \cite[p.700]{Wigner1985} and suggest that ``there is a great similarity between the relation of the laws of nature to the events on one hand, and the relation of symmetry principles to the laws of nature on the other'' \cite[p.957]{wigner1964symmetry}. Here we do not take a firm stance on this perspective. Nevertheless, we note that it is compatible with MinP. If there is a symmetry principle $K$ that a fundamental law of nature $L$ must obey, then both $K$ and $L$ are fundamental facts, where $K$ constrains $L$ in the sense that the physical possibilities generated by $L$ are invariant under the symmetry principle $K$, and any other possible fundamental laws are also constrained by $K$. This introduces further ``modal'' relations in the fundamental facts beyond just the constraining of the spacetime and its contents by $L$. \subsubsection{Probabilistic Laws} Candidate fundamental physical theories can also employ probability measures and distributions. Such measures and distributions can be objective, and they may be called objective probabilities. The probabilistic postulates in physical theories may well be lawlike, even though the nature of those probabilities is a controversial matter. As mentioned earlier in \S2, Humean Reductionism can accommodate those probabilistic postulates as axioms in the best system achieving the optimal balance of a simple and informative summary. It is not so clear what objective probability means in the non-Humean accounts considered earlier. On MinP, the extension from non-probabilistic laws to probabilistic ones is also not straightforward. We propose several strategies for consideration, but which one is most promising depends on further interpretive questions about probabilities. There are two types of probabilistic postulates in physics: (1) stochastic dynamics and (2) probabilistic boundary conditions. We will start with the former as they are more familiar. Consider the GRW theory in quantum mechanics, a theory in which observers and measurements do not have a central place and in which the quantum wave function spontaneously collapses according to precise probabilistic rules. On the GRW theory, the wave function of the universe $\Psi(t)$ evolves unitarily according to the Schr\"odinger equation but is interrupted by random collapses. The probabilities of where and when the collapses occur are fixed by the theory. (For details, see \cite{ghirardi1986unified} and \cite{sep-qm-collapse}.) Another example is Nelson's stochastic mechanics that describes particle motion in accord with a stochastic differential equation. (See \cite{nelson1966derivation} and \cite{bacciagaluppi2005conceptual}.) For an example of a probabilistic boundary condition, consider Albert and Loewer's Mentaculus theory of statistical mechanics, where they postulate in addition to the dynamical equations (such as (\ref{HE}) and (\ref{H})) and PH, a probabilistic distribution of the initial microstate of the universe: \begin{description} \item[Statistical Postulate (SP)] At the temporal boundary of the universe when PH applies, the probability distribution of the microstate of the universe is given by the uniform one (according to the natural measure) that is supported on the macrostate of the universe (compatible with PH). \end{description} At first glance, it is not obvious what SP is intended to convey. One may understand it in terms of typicality: that we regard the initial probability distribution to pick out a measure of almost all or the overwhelming majority---a measure of typicality \citep{goldstein2001boltzmann, goldstein2012typicality}. On this way of thinking, SP says the following: \begin{description} \item[SP'] At the temporal boundary of the universe when PH applies, the initial microstate of the universe is typical inside the macrostate of the universe (according to the natural measure of typicality). \end{description} On the basis of SP', one can then explore what the theory says about typical histories and apply it to our universe. A similar probabilistic boundary condition appears in Bohmian mechanics, where one can interpret the initial probability distribution of particle configuration as representing a typicality measure: \begin{equation}\label{QEH} \rho_{t_0} (q) = |\Psi(q, t_0)|^2 \end{equation} where $t_0$ is when PH applies and $\Psi(q, t_0)$ is the wave function of the universe at $t_0$. Based on this measure, almost all worlds governed by Bohmian mechanics will exhibit the Born rule. (For more details, see \cite{durr1992quantum} and \cite{sep-qm-bohm}.) In fact, it is also possible to interpret stochastic dynamics as yielding a typicality measure: the GRW theory specifies a probability distribution over entire histories of the quantum states, and what matters is the behavior of ``almost all'' of those possible histories. Although we are sympathetic to the typicality interpretation of both stochastic dynamics and probabilistic boundary conditions, we do not insist on it here. Probability measures and typicality measures are not straightforwardly understandable in terms of MinP: it is not clear how they should be understood in terms of constraints. The difficulty is greater for stochastic dynamics. On the typicality approach, one has the option to regard the measures picked out by the probabilistic boundary conditions as referring to something methodological instead of nomological---how in practice one decides whether a law is supported or refuted by evidence. However, the probabilities in the stochastic dynamics are clearly nomological and not just a methodological principle of theory choice. Here we offer five interpretive options for how to understand probabilistic laws in MinP. \textit{Option 1: Humeanism.} Probabilistic laws are second-class citizens that supervene on the distribution of matter. On this interpretation, probability and typicality measures are given a Humean best-system analysis. This is compatible with taking the non-probabilistic laws as fundamental facts. This option is a Humean and non-Humean hybrid: it is Humean about probabilistic laws but non-Humean about other laws. We find this option, while viable, unsatisfactory as probabilistic laws and non-probabilistic laws seem on a par with respect to explaining patterns. Leaving the former supervenient on the mosaic renders the statistical patterns ultimately unexplained. The hybrid strategy goes against the non-Humean conviction that motivates our adoption of MinP. \textit{Option 2: Primitivism.} Probabilistic laws are primitive facts but they are not directly related to constraints. On this interpretation, they are fundamental irreducible facts in the world, but they do not simply constrain the world. They are somehow connected to frequencies and credences but not via constraint. But then how are they connected? This option needs to be developed further for evaluation. \textit{Option 3: Gradable Constraint.} Probabilistic laws are primitive facts that constrain the world, but their constraining admits of degree. This interpretation extends the concept of constraining from allowed / forbidden to degrees of constraints (between 0 and 1, inclusive), with the categorical ones (allowed / forbidden) taking the extreme values. This notion of degrees of constraint is not entirely clear. However, for those who are fine with probabilification (Platonic Reductionism) or propensities, perhaps this is also acceptable. This notion of degree of constraining is essentially propensity without a fundamental direction of time. \textit{Option 4: Typicality constraint.} Probabilistic laws are primitive facts about typicality that entail categorical constraint (which does not come in degree). If the right approach to probabilistic laws is in terms of typicality, and if typicality relates to categorical constraint, then we can relate both to the notion of constraint in MinP. A typicality statement is about particular kinds of behaviors that satisfy certain properties. We can regard such properties as imposing a constraint on possible histories. This makes typical histories the only physically possible histories. There are two potential problems. First, such a property may be complicated to specify and the complexity makes the statement a bad candidate for a law. Second, it seems to express too strong a requirement. We usually think that atypical histories are still physically possible. They are just expected not to happen. \textit{Option 5: Dual modalities.} Probabilistic laws are primitive facts about typicality, which is another kind of modality distinct from possibility. On this interpretation, there is a dualism between modal notions of possibility and typicality. Non-probabilistic laws govern by constraining the space of possibilities. Probabilistic laws govern by constraining which possibilities are typical. Neither is reducible to the other. Some worlds are possible but atypical. However, every typical world is possible. Both typicality and possibility should influence our expectations, and both play roles in scientific explanations. In this way, we may think of probabilistic laws as imposing a narrower kind of constraints on the world. The actual world must be a member of the physical possibilities delineated by non-probabilistic laws. The actual world must also be a member of the possibilities delineated by probabilistic laws. Those issues above have not been much explored in the literature, and there are many open problems here. We do not take a firm stance, merely noting the above five strategies, with the acknowledged qualifications and subtleties, may be available to a defender of MinP. The problem of probabilistic laws is difficult for all non-Humean accounts of laws. Solving it may turn on questions about the relation between probability and typicality, and their relation to physical possibility. \section{Comparisons} We have argued that MinP is a minimalist version of non-Humeanism about laws that is flexible enough to naturally accommodate the diverse kinds of laws entertained in physics. In this section, we highlight some differences between MinP and the alternatives. \subsection{Comparison with Humean Reductionism} Although MinP is a non-Humean view, in several respects it is similar to Humean Reductionism. First, neither requires a fundamental direction of time, and both permit a reductionist understanding of it. MinP shows that anti-reductionism about laws does not require anti-reductionism about the direction of time. Second, both views are flexible enough to accommodate the distinct kinds of laws entertained in physics, although Humean Reductionism might have an upper hand in understanding probabilistic laws. Third, both views highlight the importance of simplicity (and other super-empirical virtues) in laws and scientific explanations. We turn now to the key differences between the two. As mentioned earlier, the main differences are whether laws are reducible to the mosaic and whether laws depend on our practice and beliefs. Humean Reductionism answers Yes while MinP answers No to both. \textit{Ultimate explanation.} On Humean Reductionism, the patterns in the Humean mosaic have no ultimate explanation; after all, the mosaic grounds what the laws are. Many see this as a problem for the view. (For example, see \cite[p.40]{ArmstrongWIALON} and \cite[p.172]{MaudlinMWP} for further characterization of this worry.) \cite{loewer2012two} responds by distinguishing between scientific explanations and metaphysical ones. He argues that Humean laws can scientifically explain the patterns even though they do not metaphysically explain them. On Loewer's view, a scientific explanation just requires that the explanans be simple, unifying, and exemplifying other theoretical virtues. A mere summary of the mosaic, satisfying those theoretical virtues, can be such an explanation. In contrast, metaphysical explanations go deeper and require more. On MinP, suitable explanations of the patterns must not be merely summaries of the mosaic. On our view, fundamental laws are metaphysically fundamental facts that exist in addition to the mosaic. They govern the mosaic and explain its patterns by constraining it in an illuminating manner. Loewer's Humean scientific explanation, on our view, lacks the metaphysical element that provides the needed oomph. \textit{Non-supervenience.} Another metaphysical difference concerns non-supervenience. This has been much discussed in the literature (see for example \cite{carroll1994laws} and \cite{MaudlinMWP}). On MinP, since fundamental laws are primitive facts, there can be a physically possible world corresponding to an empty Minkowsi spacetime governed by the Einstein equation. However, on Humean Reductionism, that world is one where the simplest summary is just Special Relativity, and it is impossible to have such a world where the law is the Einstein equation \cite[pp. 67-68]{MaudlinMWP}. To allow two worlds with the same mosaic (empty Minkowski spacetime) but different laws (special relativity and general relativity) is to allow non-supervenience of the laws on the mosaic. To endorse non-supervenience is to endorse the view that the laws cannot be reduced to non-nomic things and properties. \textit{Objectivity and Mind-Independence.} We take it that a hallmark of metaphysical realism about something is to believe in its objectivity and deny its mind-dependence. As metaphysical realists, we think that we are fallible and can be wrong about the ultimate reality, including the fundamental laws of nature. This brings out an epistemological difference between MinP and Humean Reductionism. On Humean Reductionism, assuming that we are relying on the right theoretical virtues and have appropriate access to the mosaic, the best summaries will be the true laws. There is a certain sense that, in principle, we cannot be mistaken. On MinP, even if we rely on the correct theoretical virtues as our guide and rely on the correct scientific methodology, we can still be mistaken about what the true laws are. Epistemic guides are defeasible and fallible indicators for truth: they do not guarantee that we find the true laws (although we may be rational to expect to find them). There are fundamental, objective, and mind-independent facts about which laws govern the world, and we can be wrong about them. This is not a bug but a feature of MinP, symptomatic of the robust kind of realism that we endorse. For realists, this is exactly where they should end up; fallibility about the ultimate reality is a badge of honor! Moreover, if the best systematization is constitutive of lawhood, and if what counts as best dependent on us, then lawhood can become mind-dependent. In a passage about ``ratbag idealism,''\footnote{See also Gordon Belot's paper on ratbag idealism in this volume.} \cite{LewisHSD} discusses this worry and tries to offer a solution: \begin{quotation} The worst problem about the best-system analysis is that when we ask where the standards of simplicity and strength and balance come from, the answer may seem to be that they come from us. Now, some ratbag idealist might say that if we don't like the misfortunes that the laws of nature visit upon us, we can change the laws---in fact, we can make them always have been different---just by changing the way we think! (Talk about the power of positive thinking.) It would be very bad if my analysis endorsed such lunacy.... The real answer lies elsewhere: if nature is kind to us, the problem needn't arise.... If nature is kind, the best system will be \textit{robustly} best---so far ahead of its rivals that it will come out first under any standards of simplicity and strength and balance. We have no guarantee that nature is kind in this way, but no evidence that it isn't. It's a reasonable hope. Perhaps we presuppose it in our thinking about law. I can admit that \textit{if} nature were unkind, and \textit{if} disagreeing rival systems were running neck-and-neck, then lawhood might be a psychological matter, and that would be very peculiar. (p.479) \end{quotation} For Lewis, the solution is conditionalized on the hope that nature is kind to us in this special way: the best summary of the world will be far better than its rivals. That may be a generous assumption. Without a precise theory of which standards of simplicity and informativeness are permissible, and which are not, it is difficult to ascertain the assumption and determine what can be confirming evidence for it and disconfirming evidence against it. In contrast, on MinP, fundamental laws are what they are irrespective of our psychology and judgments of simplicity and informativeness. Even though the epistemic guides provide some guidance for discovering and evaluating them, they do not guarantee arrival at the true fundamental laws. Moreover, changing our psychology or judgments will not change which facts are fundamental laws. Hence, MinP respects our conviction about the objectivity and mind-independence of fundamental laws. In this paper, we mainly focused on fundamental laws. To be sure, they are related to the fundamental material ontology (fundamental entities and their properties). On MinP, we regard both fundamental laws and fundamental material ontology as metaphysical primitives and evaluate them in a package. In this respect, MinP is similar to Loewer's Package Deal Account (PDA), a descendent of Humean Reductionism that regards both as co-equal elements of a package deal \citep{loewer2020package, loewer2021fire}, but they also have significant differences. On PDA, we look for the best systematization in terms of a package of laws and (material) ontology; the package is supervenient on the actual world. Thus, fundamental laws and fundamental ontology enter the discussion in the same way, at the same place, and on the same level. MinP shares this feature, although fundamental ontology and fundamental laws are merely discovered by us and not made by us or dependent on us. On PDA, given the actual world (of which we have very limited knowledge), we evaluate different packages of laws + ontology, and we evaluate them based on our actual scientific practice. Hence, there will be some degree of relativism. Relative to different scientific practice or a different set of scientists, the judgement as to the actual laws + ontology would have been different. Consequently on PDA, fundamental laws and fundamental ontology are dependent on us in a significant way. On MinP, we may use the best package-deal systematization as a guide to discover the laws and ontology; given the actual world (of which we have very limited knowledge), we evaluate different packages of laws + ontology, and we evaluate them based on our actual scientific practice. Hence, there will be some degree of uncertainty. Relative to different scientific practice or a different set of scientists, the judgement as to the actual laws + ontology would have been different. Still, what they are is metaphysically independent of our belief and practice. We end this comparison with a quote from \cite{loewer2021fire}. Although we disagree with him on the metaphysics, we agree on how the enterprise of physics should be understood: \begin{quotation} The best way of understanding the enterprise of physics is that it begins, as Quine says, ``in the middle'' with the investigation of the motions of macroscopic material objects e.g., planets, projectiles, pendula, pointers, and so on. Physics advances by proposing theories that include laws that explain the motions of macroscopic objects and their parts. These theories may (and often do) introduce ontology, properties/relations, and laws beyond macroscopic ones with which it began and go onto to posit laws that explain their behaviors...... The ultimate goal of this process is the discovery of a theory of everything (TOE) that specifies a fundamental ontology and fundamental laws that that cover not only the motions of macroscopic objects with which physics began but also whatever additional ontology and quantities that have been introduced along the way. (pp. 30-31) \end{quotation} From our perspective, this is an excellent description of how fundamental laws and ontology are discovered---in a package. We leave its analysis for future work. \subsection{Comparison with Platonic Reductionism} MinP and Platonic Reductionism agree that there are governing laws that do not supervene on the Humean mosaic, but disagree on whether governing laws should be analyzed in terms of or are reducible to relations among universals. While Platonic Reductionism is ontologically committed to fundamental universals, MinP is not. We do not think that universals offer additional explanatory benefits. The motivating idea of Platonic Reductionism is that universals are properties that genuinely similar objects share, and it is partly in virtue of the universals shared by those objects that the objects behave in the same way everywhere and everywhen. However, it is really the necessitation relation $N$ that does the explanatory work in Armstrong's theory. It is crucial that the state of affairs $N(F,G)$ is understood as a universal. The metaphysics of $N$ is a complicated business, and in our opinion it seems to create more mystery than it dispels. In contrast, on MinP we maintain that there are fundamental laws that govern the world by constraining the physical possibilities. Explanation in terms of simple laws seems clear enough to vindicate the non-Humean intuition that there is something more than the mosaic that governs it. Moreover, MinP is compatible with various metaphysical views about properties such as realism and nominalism. We do not think that a realist attitude towards laws requires a realist attitudes towards properties. Platonic Reductionism places certain restrictions on the form of fundamental laws. On Platonic Reductionism, all laws need to be recast in the form of relations among universals, and it is unclear how to do so for the majority of laws in modern physics. Here we agree with \cite{wilson1987law}'s criticism that Armstrong's discussion is removed from concrete scientific practice and focuses mainly on schema of the ``All F's are G'' type. Consider a differential equation that expresses a candidate fundamental law such as (\ref{HE}). What are the universals that they actually relate? Assuming that velocity and acceleration are derived quantities, what are the universals that correspond to the derivatives on either side of the equations? Armstrong argues that universals must be instantiated in some concrete particulars. As Wilson observes (p.439), differential equations conflict with Armstrong's principle about the instantiation of universals, as the values of the derivatives are calculated from values possessed by non-actual states (those in the small neighborhood around the actual one) that are not instantiated. In contrast, MinP has no difficulty accommodating laws expressed by differential equations. Moreover, some candidate fundamental laws involve properties that do not seem to correspond to universals. For example, PH is a temporally restricted law that applies to only one moment in time. As such, it is a spatiotemporally restricted law that seems in tension with the approach involving universals (universal, repeatable, and multiply instantiated). \cite{tooley1977nature} considers an example of Smith's Garden, and there he seems open to accept spatiotemporally restricted laws if they are significant enough. But the tension needs a lot of work to remove, and we do not know if that is compatible with the metaphysics of universals that they are committed to. In contrast, spatiotemporally restricted laws can function perfectly as constraints on the universe that are about specific places or times. There is no in-principle obstacle of letting them be fundamental laws on MinP. \subsection{Comparison with Aristotelian Reductionism} There are several differences between MinP and Aristotelian Reductionism. Aristotelian Reductionists do not think that laws govern in a metaphysically robust sense.\footnote{However, \cite{BirdNM} talks about laws supervening on dispositions and allows that laws can still govern in a weaker sense.} In contrast, MinP vindicates the conviction that laws do so. Aristotelian Reductionism is committed to a fundamental ontology of dispositions. MinP is not. Most physicists today may be unfamiliar with the concept of fundamental dispositions. In contrast, physicists are familiar with the concept of fundamental laws and how they figure in various scientific explanations. Hence, MinP seems more science-friendly. It is natural to read dispositional essentialists such as Bird, Mumford, and Ellis as having an implicit commitment to a fundamental direction of time.\footnote{In a recent book, \cite{vetter2015potentiality} is open to the idea that there can be past-directed dispositions but still suggests that there is a temporal asymmetry: past-directed dispositions are trivial. } Demarest's account is more explicit in linking the dispositional essentialist ontology and the account of nomic explanations to that of dynamic metaphysical dependence, or what we call dynamic production. As discussed in \S3.3.1, we do not understand how dynamic production works even in simple cases such as Hamilton's equations and much less in relativsitic spacetimes. Requiring dynamic production presumably rules out theories that permit closed timelike curves, as well as purely spatial laws, or even worlds for which spacetime is emergent. In contrast, MinP is not committed to a fundamental direction of time, and MinP is entirely open to those possibilities (even though we may have other considerations, beyond the conception of laws, to not consider them). Finally, there are problems specific to accounts (such as Bird's) that analyze laws in terms of dispositions. \cite{BirdNM} lists four problems (p.211): (1) fundamental constants, (2) conservation laws and symmetry principles, (3) principles of least action, and (4) multiple laws relating distinct properties. Problem (1) arises because slight differences in the constants do not require the properties to be different; problem (2) because conservation laws and symmetry principles do not seem to be manifestations of dispositions; problem (3) because the principles seem to commit to the physical possibilities of alternate histories, something not allowed on dispositional essentialism; problem (4) because a third law relating two properties will not be the outcome of the dispositional natures of those properties. These problems may be solvable on Aristotelian Reductionism, and Demarest's version may be especially well posed to do that. In any case, such problems do not arise on MinP. \subsection{Comparison with Maudlinian Primitivism} MinP agrees with Maudlinian Primitivism that fundamental laws are metaphysically fundamental and that they govern. However, we disagree about how they do it. For Maudlin, dynamic production is essential, and every fundamental law needs to have the form of a dynamical law (in the narrow sense of a FLOTE) that can be interpreted as evolving later states of the universe from earlier ones. For laws to produce, they operate according to the fundamental direction of time, providing an intuitive picture close to our pre-theoretic conception of the world: ``the universe is generated from a beginning and guided towards its future by physical law'' (p.182). MinP is not committed to a fundamental direction of time; nor is it committed to dynamic production as how laws govern or explain. On MinP, explanation by simple constraint is good enough. Many candidate fundamental laws such as the Einstein equation are not (in and of themselves) FLOTEs that produce later states of the universe from earlier ones. For the same reason, the Past Hypothesis cannot be a Maudlinian law. And neither can a purely spatial constraint such as Gauss's law or the simple rule responsible for the Mandelbrot world. On MinP, all of these examples can be understood as fundamental laws that express simple constraints. Our difficulty with dynamic production is not just it precludes certain candidate fundamental laws. We also have difficulty understanding the notion itself. What does dynamic production mean and what are its relata? Does it relate instantaneous states or sets of instantaneous states of the universe? If it relates instantaneous states, we are unclear how to understand dynamic production even in paradigm examples of FLOTEs such as the one expressed by Hamilton's equations. (The initial data is not confined to a single moment in time, if we understand momentum as partly reducible to variations in positions over some time interval.) The notion becomes even less natural in relativistic settings. Moreover, on a simple understanding of dynamic production, the beginning of the universe does metaphysical work; it is what gets the entire productive enterprise started. However, for spacetimes with no temporal boundaries, it is unclear where to start the productive explanation. In contrast, constraints operate on the entire spacetime, regardless of whether there is an ``initial'' moment. Thus, MinP does not require a first moment in time. (Perhaps a more sophisticated understanding of dynamic production does not either.) \section{Conclusion} We suggest that MinP is an intelligible and attractive proposal for understanding fundamental laws of nature. It vindicates the non-Humean conviction that laws govern while remaining flexible enough to accommodate the variety of kinds of laws entertained in physics. MinP illuminates metaphysics but is not unduly constrained by it. \bigskip\bigskip \noindent{\it Acknowledgments.} For helpful discussions, we thank David Albert, Craig Callender, Christopher Dorst, Tyler Hildebrand, Barry Loewer, Kerry McKenzie, Shelly Yiran Shi, Nino Zangh\`i, and participants in the graduate seminar ``Rethinking Laws of Nature'' at the University of California San Diego in spring 2021. EKC received research assistance from Shelly Yiran Shi and is supported by an Academic Senate Grant from the University of California San Diego.
\section{Introduction} In systolic geometry, the systole of a Riemannian manifold is defined to be the shortest length of a noncontractible loop. Gromov's systolic inequality implies that systole is bounded from above by Riemannian volume. The optimal constant in a systolic inequality is usually called systolic volume in literature. Let $M$ be a closed $n$-dimensional manifold with nonzero simplicial volume. Gromov~\cite[Section 6.4.D]{gromov_filling_riemannian_manifolds_1983} proved that topological complexity of $M$ is represented by systolic volume. In this paper, we extend Gromov's result by relating systolic volume to triangulation complexity. Triangulation complexity of a closed manifold is defined to be the minimum number of simplices in a triangulation. Hence the triangulation complexity naturally represents how complicated a manifold is. Our result is a supplement to Gromov's work of establishing relations between systolic volume and other topological invariants. Let $M$ be a closed $3$-manifold. If $M$ is irreducible and not homeomorphic to $S^3, \mathbb{R}\mathbb{P}^3$ or $L(3, 1)$, the triangulation complexity coincides with the complexity defined by Matveev \cite{matveev_complexity}. In the following, we use $c(M)$ to denote the triangulation complexity of a closed $3$-manifold $M$. We refer to \cite{jaco_rubinstein_tillmann_complexity_13, jaco_rubinstein_tillmann_complexity_20, lackenby_purcell_complexity_21} for recent developments of triangulation complexity of 3-manifolds. The systolic volume of $M$, denoted by $\SR(M)$, is defined to be \begin{equation*} \inf_{\G} \frac{\vol_{\G}(M)}{\sys \pi_1(M, \G)^n} , \end{equation*} where the infimum is taken over all Riemannian metrics $\G$ on $M$. The systolic volume $\SR(M)$ is positive if $M$ is a closed essential $3$-manifold, see \cite[Theorem 0.1.A.]{gromov_filling_riemannian_manifolds_1983} for more details. Let $s_0$ be a sufficiently large positive number. \begin{theorem} \label{thm_main} Suppose that $M$ is a closed hyperbolic $3$-manifold with $\SR(M) \leqslant s_0$. There exists a positive constant $C(s_0)$ only depending on $s_0$, such that \begin{equation*} \SR(M) \geqslant C(s_0) \hspace{.11111em} \frac{c(M)}{\log^3{c(M)}} . \end{equation*} \end{theorem} The simplicial volume $\| M \|$ of a manifold of dimension $n$ is defined to be the minimum number of simplices in a cycle representing the fundamental class of real coefficients. For hyperbolic manifolds, there exists the following proportionality principle, \begin{equation} \nu_n \hspace{.11111em} \| M \| = \vol_{\hyp}(M) , \end{equation} where $\nu_n$ is a positive constant only depending on $n$. We refere to \cite{benedetti_petronio_hyperbolic_geometry} for more details about simplicial volume. A central theorem in systolic geometry is the following one of relating systolic volume to simplicial volume. \begin{theorem}[Gromov 1983, see {\cite[Section 6.4.D.]{gromov_filling_riemannian_manifolds_1983}} or {\cite[Section 3.C.3.]{gromov_systoles_notes_1996}}] \label{thm_Gromov_SR} Let $M$ be a closed $n$-dimensional manifold with non-zero simplicial volume. Then the systolic volume $\SR(M)$ of $M$ satisfies \begin{equation} \label{Gromov} \| M \| \leqslant C_n \SR(M) \hspace{.11111em} \log^n{ \left( C_n^{\prime} \hspace{.11111em} \SR(M) \right)} , \end{equation} where $C_n$ and $C_n^{\prime}$ are two positive constants only depending on $n$. \end{theorem} \begin{remark} In \cite[Section 6.4.D.]{gromov_filling_riemannian_manifolds_1983}, there is a typo of missing the exponent $n$ in the logarithm part of (\ref{Gromov}). In literature the estimate (\ref{Gromov}) in Theorem \ref{thm_Gromov_SR} is often written to be \begin{equation*} \SR(M) \geqslant C_n \frac{\| M \|}{\log^n{\| M \|}}, \end{equation*} where $C_n$ is a positive constant only depending on $n$. \end{remark} Theorem \ref{thm_Gromov_SR} builds a bridge between systolic geometry and hyperbolic geometry. We refer to \cite{guth_metaphors_systolic_10} for more explanation of this interplay. A mail tool used to prove Theorem \ref{thm_main} is the connection between triangulation and hyperbolic volume. The work of J{\o}rgensen and Thurston implies that any complete hyperbolic $3$-manifold admits a triangulation with the number of tetrahedra bounded from above by its volume. A detailed proof of this theorem is provided by Kobayashi and Rieck in \cite{kobayashi_rieck_hyperbolic_volume_2011}. The triangulation complexity of manifolds in higher dimensions is studied in \cite{francaviglia_frigerio_martelli_stable_complexity}. Let $M$ be a closed manifold of dimension $n$. The triangulation complexity of $M$, denoted $\sigma(M)$, is defined to be the minimum number of $n$-simplices in any triangulation of $M$. When $n = 3$, $\sigma(M)$ coincides with $c(M)$. \begin{theorem} \label{thm_02} Let $M$ be a closed hyperbolic manifold of dimension $n$ with $n \geqslant 4$. The triangulation complexity $\sigma(M)$ and systolic volume of $M$ is related by \begin{equation*} \SR(M) \geqslant D_n \frac{\sigma(M)}{\log^n{\sigma(M)}} , \end{equation*} where $D_n$ is a positive constant only depending on $n$. \end{theorem} \begin{remark} It is proved in \cite{francaviglia_frigerio_martelli_stable_complexity} that under assumptions of Theorem \ref{thm_02}, $\| M \| < \sigma(M)$ holds. Hence above theorem is indeed a generalization of Gromov's theorem (Theorem \ref{thm_Gromov_SR}). \end{remark} The embolic volume defined in terms of injectivity radius is another geometric quantitiy representing the topological complexity of manifolds. We refer to \cite[Section 11.2.3.]{berger_riemannian_geometry} for a general description. \begin{definition} \label{def_emb} The embolic volume of $M$, denoted $\emb(M)$, is defined to be \begin{equation*} \inf_{\G} \frac{\vol_{\G}(M)}{\inj(M, \G)^n}, \end{equation*} where the infimum is taken over all Riemannian metrics $\G$ on $M$. \end{definition} Embolic volume is positive for all compact $n$-manifolds $M$ ($n \geqslant 2$), see \cite[Section 7.2.4.]{berger_riemannian_geometry}. Note that on a Riemannian manifold $(M, \G)$, $\sys \pi_1(M, G) \geqslant 2 \inj(M, \G)$. Hence we always have $\emb(M) \geqslant \SR(M)$. Then for closed manifolds with nonzero simplicial volume, Theorem ~\ref{thm_Gromov_SR} implies that the embolic volume is related to simplicial volume. This result is proved by Katz and Sabourau \cite{katz_sabourau_entropy_systolically_05} by a different approach. Moreover, a direct corollary of Theorem \ref{thm_02} is that any closed hyperbolic $n$-manifold with $n \geqslant 4$ has \begin{equation} \label{emb_tri} \emb(M) \geqslant D_n \hspace{.11111em} \frac{\sigma(M)}{\log^n{(1 + \sigma(M))}}, \end{equation} where $D_n$ is the positive constant only depending on $n$. In this note, we also show that embolic volume of any closed $n$-manifold is related to its triangulation complexity. Compared with Katz and Sabourau's above result, our theorem is more general, since it also includes all closed manifolds with zero simplicial volume. \begin{theorem} \label{thm_03} Let $M$ be a closed $n$-dimensional manifold. Then there exists a positive constant $E_n$ only depending on $n$, such that \begin{equation} \emb(M) \geqslant E_n \hspace{.11111em} \sqrt{\sigma (M)}. \end{equation} \end{theorem} \subsection*{Organization} This short note is organized as follows: In Section 2, we discuss J{\o}rgensen and Thurston's theorem for hyperbolic 3-manifolds. Proof of Theorem ~\ref{thm_main} is given in this section. In section 3, triangulation complexity of hyperbolic manifolds in higher dimensions is concerned. Then we prove Theorem \ref{thm_02} in this section. Section 4 concerns embolic volume and triangulation complexity. Theorem \ref{thm_03} is proved in this section. \subsection*{Acknowledgement} This work is partly supported by Youth Scientists Fund of NSFC (award No. 11901261). Part of this work was done when the author was visiting Tianyuan Mathematical Center in Southwest China. The author wishes to thank Professor Bohui Chen for his invitation and support. \section{Triangulation and volume of hyperbolic 3-manifolds} We prove Theorem \ref{thm_main} in this section. The proof is based on J{\o}rgensen and Thurston's theorem of hyperbolic 3-manifolds. J{\o}rgensen and Thurston's work (\cite{thurston_notes_three-manifolds}, also see \cite{kobayashi_rieck_hyperbolic_volume_2011}) implies that triangualtion of a hyperbolic $3$-manifold is related to its volume. \begin{theorem}[J{\o}rgensen, Thurston] \label{JT_hyp} Let $M$ be a closed hyperbolic $3$-manifold, and $a_0$ be a positive constant. Assume that $\inj(M, \hyp) \geqslant a_0$. Then there exists a triangulation of $M$, with the number $t$ of tetrahedra satisfying \begin{equation*} t \leqslant K \hspace{.11111em} \vol_{\hyp} (M) , \end{equation*} where $K$ is a positive constant only depending on $a_0$. \end{theorem} \begin{proof} We briefly introduce outline of the proof. For more details, we refer to \cite[Chapter 5]{thurston_notes_three-manifolds} and \cite{kobayashi_rieck_hyperbolic_volume_2011}. Let $R = \frac{1}{2} \inj(M, \hyp)$. Assume that $X$ is a maximal set of points in $M$, so that any two points in $X$ with distance at least $R$. The set $X$ is maximal under inclusion. The Voronoi cell associated to $x_0 \in X$ is defined to be the the subset \begin{equation*} V(x_0) = \{ y \in M | dist(y, x_0) \leqslant dist(y, x), \, \text{for any} \, x \in X \, \text{and} \, x \neq x_0 \}. \end{equation*} For all Voronoi cells corresponding to points in $X$, the total number is bounded from above by a constant $v$ depending only on $a_0$. After triangulating each Voronoi cell, we get a triangulation of $M$ with the number $t$ of tetrahedra bounded from above by $K$, where the constant $K$ is a multiple of $v$. \end{proof} Another tool we need to use in the proof of Theorem ~\ref{thm_main} is Sabourau's finiteness theorem. Sabourau proved that there are only finitely many hyperbolic $3$-manifolds with bounded systolic volume. \begin{theorem}[see {\cite[Theorem B]{sabourau_systolic_volume_connected_sums}}] \label{Sabourau_07} For a sufficiently large positive number $s_0$, there are only finitely many hyperbolic $n$-manifolds ($n \geqslant 2$) $M$ with $\SR(M) \leqslant s_0$. \end{theorem} \begin{remark} Sabourau's theorem incudes the case of dimension $n = 3$. When $n \geqslant 4$, Theorem \ref{Sabourau_07} is a direct implication of Wang's finiteness theorem and Theorem \ref{thm_Gromov_SR}. The case of $n = 2$ is yielded by Theorem ~\ref{thm_Gromov_SR}, since area of a closed hyperbolic surface is proportional to its simplicial volume and thus proportional to genus. \end{remark} Let $M$ be a closed hyperbolic $3$-manifold. For a sufficiently large positive number $s_0$, according to Sabourau's theorem (see Theorem \ref{Sabourau_07}), there are only finitely many closed hyperbolic $3$-manifolds $X$ with $\SR(X) \leqslant s_0$. Then we know that the injectivity radii of all these hyperbolic $3$-manifolds have a common lower bound. Denote this lower bound by $\delta_0$. The constant $\delta_0$ is only depending on $s_0$. \vskip 10pt \noindent{\bf Proof of Theorem ~\ref{thm_main}:} \\ The triangulation complexity $c(M)$ of a closed hyperbolic $3$-manifold $M$ satisfies $c(M) \leqslant t$, so that we have \begin{align*} c(M) & \leqslant t \\ & \leqslant K \hspace{.11111em} \vol_{\hyp}(M) \\ & \leqslant K \hspace{.11111em} \nu_3 \| M \| \\ & \leqslant K \nu_3 C_3 \SR(M) \hspace{.11111em} \log^3{\left( C_3^{\prime} \hspace{.11111em} \SR(M) \right)} , \end{align*} where $\nu_3$, $C_3$ and $C_3^{\prime}$ are all fixed positive constants. Hence we have \begin{equation*} \SR(M) \geqslant C(s_0) \hspace{.11111em} \frac{c(M)}{\log^3{c(M)}} , \end{equation*} where $C(s_0)$ is a positive constant only depending on $s_0$. \hfill $ \square $ \section{Hyperbolic manifolds in higher dimensions} When $n \geqslant 4$, hyperbolic manifolds of dimension $n$ are different than $n = 3$. For example, there are only finitely many hyperbolic $n$-manifolds ($n \geqslant 4$) with bounded volume (see \cite{burger_gelander_lubotzky_mozes_counting_hyperbolic}), but this is not true in $n = 3$. We generalize J{\o}rgensen and Thurston's theorem to hyperbolic manifolds of dimension at least four. Then we prove Theorem~\ref{thm_02} in this section. \begin{proposition} \label{hyperbolic_n} Let $M$ be a closed hyperbolic manifold of dimension $n$, with $n \geqslant 4$. There exists a positive constant $K$ depending only on $n$, such that the manifold $M$ admits a triangulation with number $t$ of $n$-simplices is bounded from above by its volume as follows, \begin{equation} \label{tri_n} t \leqslant K_n \hspace{.11111em} \vol_{\hyp}(M). \end{equation} \end{proposition} \begin{proof} Let $M$ be a closed hyperbolic manifold of dimension $n \geqslant 4$. Set $R = \inj(M, \hyp)$. Suppose that $X \subset M$ is a maximal set of points with any two of them having distance at least $R$. We consider Voronoi cells corresponding to points in $X$. Recall that a Voronoi cell associated to $x \in X$ is \begin{equation*} V(x) = \{ y \in M | dist(x, y) \leqslant dist(x^{\prime}, y), \text{for any} \, x^{\prime} \in X \, \text{and} \, x^{\prime} \neq x \}. \end{equation*} For any two distinct points $p, q \in X$, $B(p, \frac{R}{2}) \cap B(q, \frac{R}{2}) = \emptyset $ since $dist(p, q) \geqslant R$. The total number of Voronoi cells is thus bounded by above by \begin{align*} \frac{\vol_{\hyp}(M)}{\vol_{\hyp}(B(x, \frac{R}{2}))} & = \frac{1}{\vol_{\hyp}(B(x, \frac{R}{2}))} \hspace{.11111em} \vol_{\hyp} (M) \\ & \leqslant \frac{1}{c_1 (n) e^{(n-1)R/2}} \hspace{.11111em} \vol_{\hyp}(M) \\ & \leqslant \frac{1}{c_1 (n)} \hspace{.11111em} \vol_{\hyp}(M), \end{align*} where $c_1 (n)$ is a positive constant depending only on $n$. Note that it is proved in \cite{belolipetsky_thomson_systoles_hyperbolic} there exist hyperbolic $n$-manifolds $M$ with the injectivity radius $R$ being arbitratrily small. Hence in the above estimate, $\frac{1}{\vol_{\hyp}(B(x, \frac{R}{2}))} \leqslant \frac{1}{c_1 (n)}$ cannot be improved. A triangulation of the hyperbolic manifold $M$ is obtained by triangulating each Voronoi cell $V(x)$ into $n$-simplices. Since two Voronoi cells $V(x)$ and $V(y)$ have a common face if and only if $B(y, R) \subset B(x, \frac{5}{2} R)$, the number of faces of any Voronoi cell $V(x)$ has upper bound of $\frac{\vol_{\hyp}(B(x, \frac{5}{2}R))}{\vol_{\hyp}(B(x, \frac{R}{2}))}$. Hence, the total number of faces for all Voronoi cells is finite and only depending on $n$. In the triangulation, maximal number of $n$-simplices in each Voronoi cell is uniformly bounded above by the number of its faces. Therefore, there exists a positive constant $K_n$, such that the total number of $n$-simplices in the triangulation obtained in the above is bounded above by $ K_n \hspace{.11111em} \vol_{\hyp} (M)$, where $K_n$ is a positive constant only depending on $n$. \end{proof} \noindent{\bf Proof of Theorem \ref{thm_02}:} Theorem \ref{thm_02} holds according to above Proposition \ref{hyperbolic_n} and Gromov's theorem (Theorem \ref{thm_Gromov_SR}). Let $M$ be a closed hyperbolic manifold with dimension at least $4$, and $t$ be the number of $n$-simplices in Proposition \ref{hyperbolic_n}. Then the triangulation complexity $\sigma(M)$ is bounded above as follows, \begin{align*} \sigma(M) & \leqslant t \\ & \leqslant K_n \hspace{.11111em} \vol_{\hyp} (M) \\ & = K_n \nu_n \| M \| \\ & \leqslant K_n \nu_n C_n \SR(M) \log^n{\left( C_n^{\prime} \SR(M) \right)} . \end{align*} Hence, \begin{align*} \SR(M) \geqslant D_n \hspace{.11111em} \frac{\sigma(M)}{\log^n{\sigma(M) } } , \end{align*} where $D_n$ is a positive constant only depending on $n$. \section{Embolic volume of compact manifolds} We prove Theorem \ref{thm_03} in this section. The proof is still based on the approach of packing balls. Embolic volume is defined in Definition \ref{def_emb}. Berger's embolic inequality (\cite{berger_embolic} or {\cite[Section 7.2.4.]{berger_riemannian_geometry}}) states that for any Riemannian metric $\G$ defined on a compact manifold of dimension $n$, \[ \inj(M, \G)^n \leqslant C \hspace{.11111em} \vol_{\G}(M) \] holds, where $C$ is a positive constant. Hence the embolic volume of compact $n$-manifolds is always positive. The relation between embolic volume and other topological invariants is described in \cite[Section 11.2.3.]{berger_riemannian_geometry}. On a closed manifold with nonzero systolic volume, we always have $\emb(M) \geqslant \SR(M)$. Hence Gromov's theorem (Theorem \ref{thm_Gromov_SR}) includes a relation between embolic volume and simplicial volume for closed manifolds with nonzero simplicial volume. Moreover, Katz and Sabourau \cite{katz_sabourau_entropy_systolically_05} uses a different method to show this result. Then the results in Theorem ~\ref{thm_main} and ~\ref{thm_02} also hold if the systolic volume is replaced by embolic volume. Let $E$ be a sufficiently large positive constant. In \cite{yamaguchi_homotopy_type_finiteness, grove_petersen_wu_geometric_finiteness, grove_petersen_wu_geometric_finiteness_erratum} the finiteness theorems are proved for compact $n$-manifolds $M$ with $\emb(M) \leqslant E$. Therefore, from this point of view, the embolic volume of compact manifolds works like volume of hyperbolic manifolds. Our theorem in this section provides more evidence to this viewpoint. The following local embolic inequality of Croke will be used in the proof of Theorem \ref{thm_03}. \begin{lemma}[see Croke \cite{croke_isoperimetric_80}] \label{croke} For a Riemannian metric $\G$ defined on compact $n$-dimensional manifold $M$, any metric ball $B(p, r)$ with center $p$ and radius $r \leqslant \frac{1}{2}\inj(M, \G)$ satisfies \begin{equation} \label{emb_loc} \vol(B(x, r)) \geqslant \alpha_n r^n , \end{equation} where $\alpha_n$ is a positive constant only depending on $n$. \end{lemma} \noindent{\bf Proof of Theorem \ref{thm_03}:} For a Riemannian metric $\G$ defined on $M$, let $\inj(M, \G)$ be injectivity radius. The distance function induced by $\G$ is denoted $dist_{\G}( , )$. Assume that $R = \frac{1}{5} \inj(M, \G)$. We say a subset $A \subset M$ is $R$-separated if $dist_{\G}(x, y) \geqslant R$ for all distinct $x, y \in A$. Now let $S$ be a maximal $R$-separated subset of $M$. Here the maximal is under inclusion relation. For $x_0 \in S$, denote by $V(x_0)$ the following Voronoi cell, \begin{equation*} V(x_0) = \{ y \in S | dist(y, x_0) \leqslant dist(y, x), \forall x \in S \, \text{and} \, x \neq x_0 \} . \end{equation*} We have $ B \left(x_0, \frac{R}{2} \right) \subset V(x_0) $. Hence the number of Voronoi cells $V(x_0)$ in $M$ is bounded from above by \[ \frac{\vol_{\G}(M)}{\vol_{\G} (B(x_0, \frac{R}{2})) } . \] We obtain a triangulation of $M$ by triangulating each Voronoi cell $V(x)$ into $n$-simplices. In order to let the triangulations on each face of $V(x)$ match, we choose the triangulation which induces a triangulation on each face symmetric with respect to combinatorial isomorphisms of any face. The combinatorial types of Voronoi cell $V(x)$ are determined by $R$ and $n$. Hence there are only finitely many such combinatorial types. We let $T$ be the maximal number of simplices in all Voronoi cell $V(x)$. Then the finiteness of combinatorial types of $V(x)$ implies that $T$ is a constant only depending on $R$ and $n$. In fact, two Voronoi cells $V(x)$ and $V(y)$ are adjacent, if and only if $B(x, \frac{R}{2}) \subset B(y, \frac{5R}{2})$. Therefore, the number $T$ has upper bound $\frac{\vol(B(y, \frac{5R}{2}))}{\inf_{x} \vol(B(x, \frac{R}{2}))}$, which is bounded above by $C_n \emb(M)$ according to Lemma \ref{croke}, where $C_n$ is a positive constant only depending on $n$, and the infimum is taken over all $x$ such that $B(x, \frac{R}{2}) \subset B(x, \frac{5}{2}R)$ holds. The number of $n$-simplices in the triangulation is equal to \begin{equation*} \frac{\vol_{\G}(M)}{\vol_{\G} (B(x_0, \frac{R}{2})) } \hspace{.11111em} T . \end{equation*} By using Croke's local embolic inequality (\ref{emb_loc}) again, we have \begin{align*} \frac{\vol_{\G}(M)}{\vol_{\G} (B(x_0, \frac{R}{2})) } \hspace{.11111em} T & \leqslant \frac{2^n}{\alpha_n^n} \frac{\vol_{\G}(M)}{R^n} \hspace{.11111em} T \\ & \leqslant \beta_n \emb(M, \G)^2 , \end{align*} where $\beta_n$ is a positive constant only depending on $n$. Therefore we find a triangulation on $M$ with the number of simplices bounded by $\beta_n \emb(M)^2$. \bibliographystyle{amsalpha}
\section{Introduction} \label{intro} \begin{figure} [h] \centering \includegraphics[width=0.5\columnwidth]{S12_Brownie_7151062-537_Moment.jpg} \includegraphics[width=0.5\columnwidth]{S13_Brownie_7151062-481_Moment.jpg} \caption{A real-word problem of aligning human motion from multimodal capture data \citep{torre2008motiondata} from the CMU Quality of Life Grand Challenge, which records human subjects cooking a variety of dishes. We propose a novel multiscale manifold framework to align such high dimensional time-series data.} \label{fig:dtw} \end{figure} Temporal alignment of time series is central to many real-world applications, including human motion recognition (see Figure~\ref{fig:dtw}) \citep{junejo2008activity_alignment}, temporal segmentation \citep{zhou2008aligned}, modeling the spread of Covid-19 \citep{covid-dtw}, and building view-invariant representations of activities \citep{junejo2008activity_alignment}. Dynamic time warping (DTW) \citep{sakoe1978dtw} is a widely-used classical approach to aligning time-series datasets. DTW requires an inter-set distance function, and often assumes both input data sets have the same dimensionality. DTW may also fail under arbitrary affine transformations of one or both inputs. Canonical time warping (CTW) \citep{zhou2009ctw} combines DTW by with canonical correlation analysis (CCA) \citep{anderson2003cca} to find a joint lower-dimensional embedding of two time-series datasets, and subsequently align the datasets in the lower-dimensional space. However, CTW fails when the two related data sets require nonlinear transformations. Manifold warping \citep{hoa-cj-mw}\citep{ham2003MA,wang2009generalMAframework} solved this by instead representing features in the latent joint manifold space of the sequences. Prior manifold warping methods however do not exploit the multiscale nature of most datasets, which our proposed algorithms exploit. In this paper, we propose a novel variant of dynamic time warping that uses a type of multiscale {\em wavelet} analysis \citep{mallat} on graphs, called {\em diffusion wavelets} \citep{dwt} to address this gap. In particular, we develop a multiscale variant of manifold warping called WOW (warping on wavelets), and show that WOW outperforms several warping algorithms, including manifold warping, as well as two other novel warping methods. \section{Dynamic Time Warping} \label{dtw} We give a brief review of dynamic time warping \citep{sakoe1978dtw}. We are given two sequential data sets $X= [ x_{1}^{T},\ldots,x_{n}^{T} ]^{T} \in \mathbb{R}^{n \times d} $, $Y=[ y_{1}^{T},\ldots,y_{m}^{T}]^{T} \in \mathbb{R}^{m \times d}$ in the same space with a distance function $dist:X \times Y \rightarrow \mathbb{R}$. Let $P=\{p_1,...,p_s\}$ represent an alignment between $X$ and $Y$, where each $p_k=(i,j)$ is a pair of indices such that $x_i$ corresponds with $y_j$. Since the alignment is restricted to sequentially-ordered data, we impose the additional constraints: \begin{eqnarray} p_{1} & = & (1,1) \label{eq:Wcontraint1} \\ p_{s} & = & (n,m) \label{eq:Wcontraint2} \\ p_{k+1}-p_{k} & = & (1,0)\: or\:(0,1)\: or\:(1,1) \label{eq:Wcontraint3} \end{eqnarray} A valid alignment must match the first and last instances and cannot skip any intermediate instance. Also, no two sub-alignments cross each other. We can also represent the alignment in matrix form $W$ where: \begin{equation} W_{i,j}= \left\{ \begin{array}{ll} 1 & \mbox{if $(i,j) \in P$} \\ 0 & \mbox{otherwise} \end{array} \right. \end{equation} To ensure that $W$ represents an alignment which satisfies the constraints in Equations \ref{eq:Wcontraint1}, \ref{eq:Wcontraint2}, \ref{eq:Wcontraint3}, $W$ must be in the following form: $W_{1,1}=1,W_{n,m}=1$, none of the columns or rows of $W$ is a $0$ vector, and there must not be any $0$ between any two $1$'s in a row or column of $W$. We call a $W$ which satifies these conditions a \emph{DTW matrix}. An optimal alignment is the one which minimizes the loss function with respect to the DTW matrix $W$: \begin{eqnarray} L_{\mbox{DTW}}(W) = \sum_{i,j}dist\left(x_i,y_j\right)W_{i,j} \end{eqnarray} A na\"{\i}ve search over the space of all valid alignments would take exponential time; however, dynamic programming can produce an optimal alignment in $O(nm)$. When $m$ is high-dimensional, as in Figure~\ref{fig:dtw}, or if the two sequences have varying dimensionality, DTW is not as effective, and we turn next to discussing a broad framework to extend DTW based on exploiting the manifold nature of many real-world datasets. \section{Mutiscale Manifold Learning} \label{dwt} Diffusion wavelets (DWT) \citep{dwt} extends the strengths of classical wavelets to data that lie on graphs and manifolds. The term {\em diffusion wavelets} is used because it is associated with a diffusion process that defines the different scales, allows a multiscale analysis of functions on manifolds and graphs. The diffusion wavelet procedure is described in Figure~\ref{fig:dwt}. The main procedure is as follows: an input matrix $T$ is orthogonalized using an approximate $QR$ decomposition in the first step. $T$'s $QR$ decomposition is written as $T= QR$, where $Q$ is an orthogonal matrix and $R$ is an upper triangular matrix. The orthogonal columns of $Q$ are the scaling functions. They span the column space of matrix $T$. The upper triangular matrix $R$ is the representation of $T$ on the basis $Q$. In the second step, we compute $T^2$. Note this is not done simply by multiplying $T$ by itself. Rather, $T^2$ is represented on the new basis $Q$: $T^2=(RQ)^2$. Since $Q$ may have fewer columns than $T$, due to the approximate QR decomposition, $T^2$ may be a smaller square matrix. The above process is repeated at the next level, generating compressed dyadic powers $T^{2^j}$, until the maximum level is reached or its effective size is a $1 \times 1$ matrix. Small powers of $T$ correspond to short-term behavior in the diffusion process and large powers correspond to long-term behavior. \begin{figure}[p] \center\footnotesize \begin{tabular}{|p{12cm}|} \hline\\ $\{\phi_j$, $T_j \}=DWT(T, \phi_0, QR, J, \varepsilon)$\\ $\,\, \textbf{INPUT}$:\\ $\,\,T$: Diffusion operator. \\ $\phi_0$: Initial basis matrix. \\ $QR$: A modified $QR$ decomposition.\\ $J$: Max step number\\ $\varepsilon$: Desired precision.\\ $\,\, // \textbf{OUTPUT}: \phi_j$: Diffusion scaling functions at scale $j$. $T_j=[T^{2^j}]_{\phi_j}^{\phi_j}$.\\%$\psi_j$: Wavelet functions at scale $j$. $For \,\,j=0\,\,\, to \,\,\, J-1 $\{$\\ $\,\,\,\,\,\,\,\,([\phi_{j+1}]_{\phi_j}$, $[T^{2^j}]_{\phi_j}^{\phi_{j+1}}) \leftarrow QR([T^{2^j}]_{\phi_j}^{\phi_j}, \varepsilon)$;\\ $\,\,\,\,\,\,\,\,[T^{2^{j+1}}]_{\phi_{j+1}}^{\phi_{j+1}}=([T^{2^j}]_{\phi_j}^{\phi_{j+1}} [\phi_{j+1}]_{\phi_j})^2$;\\ $\}$\\ \hline \end{tabular} \caption{\small Diffusion Wavelets construct multiscale representations at different scales. The notation $[T]_{\phi_a}^{\phi_b}$ denotes matrix $T$ whose column space is represented using basis $\phi_b$ at scale $b$, and row space is represented using basis $\phi_a$ at scale $a$. The notation $[{\phi_b}]_{\phi_a}$ denotes basis $\phi_b$ represented on the basis $\phi_a$. At an arbitrary scale $j$, we have $p_j$ basis functions, and length of each function is $l_j$. $[T]_{\phi_a}^{\phi_b}$ is a $p_b \times l_a$ matrix, $[{\phi_b}]_{\phi_a}$ is an $l_a \times p_b$ matrix.}\label{fig:dwt} \end{figure} An example of multiscale tree constructed by the diffusion wavelet procedure is shown in Figure~\ref{fig:dwt-quality-of-life}, which is one of the real-world domains that we study later in the paper. \begin{figure}[p] \centering \includegraphics[height = 12cm, width=0.45\columnwidth,keepaspectratio]{DWT-Results/dwt-tree-cmu.png} \caption{The diffusion wavelet procedure on a real-world CMU Quality of Life dataset (see Figure~\ref{fig:dtw}), where a subject is making brownies. The two sensor streams being aligned are an $87$-dimensional motion capture stream and a $11$-dimensional internal measurement unit system. The figure shows the diffusion wavelet tree constructed. The diffusion operator at each level is represented on the basis constructed at the previous level. The color values are scaled logarithmically.} \label{fig:dwt-quality-of-life} \end{figure} We introduce multiscale Laplacian eigenmaps~\citep{belkin01} and locality preserving projections (LPP)~\citep{he-lpp-03}. Laplacian eigenmaps construct embeddings of data using the low-order eigenvectors of the graph Laplacian as a basis~\citep{chung-laplacian-97}, which extends Fourier analysis to graphs and manifolds. Locality Preserving Projections (LPP) is a linear approximation of Laplacian eigenmaps. We review the multiscale Laplacian eigenmaps and multiscale LPP, based on the diffusion wavelets framework \citep{chang-aaai2013}. {\bf Notation:} $X= [x_1, \cdots, x_n]$ be an $p \times n$ matrix representing $n$ instances defined in a $p$ dimensional space. $W$ is an $n \times n$ weight matrix, where $W_{i,j}$ represents the similarity of $x_i$ and $x_j$ ($W_{i,j}$ can be defined by $e^{-\|x_i-x_j\|^2}$). $D$ is a diagonal valency matrix, where $D_{i,i}=\sum_j W_{i,j}$. $\mathcal{W}=D^{-0.5}WD^{-0.5}$. $\mathcal{L}= I- \mathcal{W}$, where $\mathcal{L}$ is the normalized Laplacian matrix and $I$ is an identity matrix. $XX^T= FF^T$, where $F$ is a $p \times r$ matrix of rank $r$. One way to compute $F$ from $X$ is singular value decomposition. $(\cdot)^+$ represents the Moore-Penrose pseudo inverse. \\\textbf{(1) Laplacian eigenmaps} minimizes the cost function \textbf{$\sum_{i,j}(y_i-y_j)^2\mathcal{W}_{i,j}$}, which encourages the neighbors in the original space to be neighbors in the new space. The $c$ dimensional embedding is provided by eigenvectors of $\mathcal{L}x= \lambda x$ corresponding to the $c$ smallest non-zero eigenvalues. The cost function for \emph{\textbf{multiscale Laplacian eigenmaps}} is defined as follows: given $X$, compute $Y_k=[y_k^1, \cdots, y_k^n]$ at level $k$ ($Y_k$ is a $p_k \times n$ matrix) to minimize $\sum_{i,j}(y_k^i-y_k^j)^2\mathcal{W}_{i,j}$. Here $k=1, \cdots, J$ represents each level of the underlying manifold hierarchy. \\\textbf{(2) LPP} is a linear approximation of Laplacian eigenmaps. LPP minimizes the cost function $\sum_{i,j}(f^Tx_i-f^Tx_j)^2\mathcal{W}_{i,j}$, where the mapping function $f$ constructs a $c$ dimensional embedding, and is defined by the eigenvectors of $X\mathcal{L}X^Tx= \lambda XX^Tx$ corresponding to the $c$ smallest non-zero eigenvalues. Similar to multiscale Laplacian eigenmaps, \emph{\textbf{multiscale LPP}} learns linear mapping functions defined at multiple scales to achieve multilevel decompositions. \subsection{The Multiscale Algorithms} \begin{figure}[t] \center\footnotesize \begin{tabular}{|p{12cm}|} \hline \begin{enumerate} \item {\bf Construct diffusion matrix $T$ characterizing the given data set:} \begin{itemize} \item {$T= I-\mathcal{L}$ \text{is an $n \times n$ diffusion matrix.}} \end{itemize} \item {\bf Construct multiscale basis functions using diffusion wavelets:} \begin{itemize} \item $\{\phi_j, T_j\}=DWT(T, I, QR, J, \varepsilon)$. \item {The resulting $[\phi_j]_{\phi_0}$ is an $n \times p_j$ matrix (Equation (\ref{equ:dp})).} \end{itemize} \item {\bf Compute lower dimensional embedding (at level $j$):} \begin{itemize} \item {The embedding $x_i \rightarrow y_i=$ row $i$ of $[\phi_j]_{\phi_0}$.} \end{itemize} \end{enumerate} \\\hline \end{tabular} \vskip 0.05in \begin{tabular}{|p{12cm}|} \hline \begin{enumerate} \item {\bf Construct relationship matrix $T$ characterizing the given data set:} \begin{itemize} \item {$T= (F^+X\mathcal{L}X^T(F^T)^+)^+$ \text{is an $r \times r$ matrix.}.} \end{itemize} \item {\bf Apply diffusion wavelets to explore the intrinsic structure of the data:} \begin{itemize} \item $\{\phi_j, T_j\}= DWT(T, I, QR, J, \varepsilon)$. \end{itemize} \begin{itemize} \item {The resulting $[\phi_j]_{\phi_0}$ is an $r \times p_j$ matrix (Equation (\ref{equ:dp})).} \end{itemize} \item {\bf Compute lower dimensional embedding (at level $j$):} \begin{itemize} \item { The embedding $x_i \rightarrow y_i= {((F^T)^+[\phi_j]_{\phi_0})}^T x_i$.} \end{itemize} \end{enumerate} \\\hline \end{tabular} \caption{Top: Multiscale Laplacian Eigenmaps; Bottom: Multiscale LPP.}\label{fig:alg} \end{figure} Multiscale Laplacian eigenmaps and multiscale LPP algorithms are shown in Figure~\ref{fig:alg}, where $[\phi_j]_{\phi_0}$ is used to compute a lower dimensional embedding. As shown in Figure~\ref{fig:dwt}, the scaling functions $[\phi_{j+1}]_{\phi_j}$ are the orthonormal bases that span the column space of $T$ at different levels. They define a set of new coordinate systems revealing the information in the original system at different scales. The scaling functions also provide a mapping between the data at longer spatial/temporal scales and smaller scales. Using the scaling functions, the basis functions at level $j$ can be represented in terms of the basis functions at the next lower level. In this manner, the extended basis functions can be expressed in terms of the basis functions at the finest scale using: {\small \begin{equation}\label{equ:dp} [\phi_j]_{\phi_0}= [\phi_j]_{\phi_{j-1}}[\phi_{j-1}]_{\phi_0} = [\phi_j]_{\phi_{j-1}}\cdots [\phi_1]_{\phi_0} [\phi_0]_{\phi_0}, \end{equation}}where each element on the right hand side of the equation is created by the procedure shown in Figure~\ref{fig:dwt}. In our approach, $[\phi_j]_{\phi_0}$ is used to compute lower dimensional embeddings at multiple scales. Given $[\phi_j]_{\phi_0}$, any vector/function on the compressed large scale space can be extended naturally to the finest scale space or vice versa. The connection between vector $v$ at the finest scale space and its compressed representation at scale $j$ is computed using the equation $[v]_{\phi_0}=([\phi_j]_{\phi_0})[v]_{\phi_j}$. The elements in $[\phi_j]_{\phi_0}$ are usually much coarser and smoother than the initial elements in $[\phi_0]_{\phi_0}$, which is why they can be represented in a compressed form. \section{Multiscale Manifold Alignment} \label{mma} We describe a general framework for transfer learning across two datasets called manifold alignment \citep{yunqian11,wang2009generalMAframework}. We are given the data sets $X$ and $Y$ of shapes $N_X \times D_X$ and $N_Y \times D_Y$, where each row is a sample (or instance) and each column is a feature, and a correspondence matrix $C^{(X,Y)}$ of shape $N_X\times N_Y$, where \begin{equation} \label{wxy} C_{i,j}^{(X,Y)} = \left\{ \begin{array}{ll} 1&:\text{$X_i$ is in correspondence with $Y_j$}\\ 0&:\text{otherwise} \end{array} \right.. \end{equation} Manifold alignment calculates the embedded matrices $F^{(X)}$ and $F^{(Y)}$ of shapes $N_X \times d$ and $N_Y \times d$ for $d\le min(D_X,D_Y)$ that are the embedded representation of $X$ and $Y$ in a shared, low-dimensional space. These embeddings aim to preserve both the intrinsic geometry within each data set and the sample correspondences among the data sets. More specifically, the embeddings minimize the following loss function: \begin{align} \label{man_loss1} L_{\mbox{MA}}\left(F^{(X)},F^{(Y)}\right) &= \frac{\mu}{2} \sum_{i=1}^{N_X}\sum_{j=1}^{N_Y} ||F_i^{(X)} - F_j^{(Y)}||_2^2 C_{i,j}^{(X,Y)}\nonumber\\ &+ \frac{1-\mu}{2} \sum_{i,j=1}^{N_X} ||F_i^{(X)}-F_j^{(X)}||_2^2 W_{i,j}^{(X)}\nonumber\\ &+ \frac{1-\mu}{2} \sum_{i,j=1}^{N_Y} ||F_i^{(Y)}-F_j^{(Y)}||_2^2 W_{i,j}^{(Y)}, \end{align} where $N$ is the total number of samples $N_X+N_Y$, $\mu\in[0,1]$ is the correspondence tuning parameter, and $W^{(X)},W^{(Y)}$ are the calculated similarity matrices of shapes $N_X\times N_X$ and $N_Y\times N_Y$, such that \begin{equation} W_{i,j}^{(X)} = \left\{ \begin{array}{ll} k(X_i,X_j) &:\text{$X_j$ is a neighbor of $X_i$}\\ 0 &:\text{otherwise} \end{array} \right. \end{equation} for a given kernel function $k(\cdot,\cdot)$. $W_{i,j}^{(Y)}$ is defined in the same fashion. Typically, $k$ is set to be the nearest neighbor set member function or the heat kernel \\$k(X_i,X_j)=\exp{\left(-|X_i-X_j|^2\right)}$. In the loss function of equation (\ref{man_loss1}), the first term corresponds to the alignment error between corresponding samples in different data sets. The second and third terms correspond to the local reconstruction error for the data sets $X$ and $Y$ respectively. This equation can be simplified using block matrices by introducing a joint weight matrix $W$ and a joint embedding matrix $F$, where \begin{equation} W = \left[ \begin{array}{cc} (1-\mu)W^{(X)} & \mu C^{(X,Y)} \\ \mu C^{(Y,X)} & (1-\mu)W^{(Y)} \end{array} \right] \end{equation} and \begin{equation} F = \left[ \begin{array}{c} F^{(X)}\\ F^{(Y)} \end{array} \right]. \end{equation} \subsection{Multiscale alignment} Given a fixed sequence of dimensions, $d_1 > d_2 > \ldots > d_h$, as well as two datasets, $X$ and $Y$, and some partial correspondence information, $x_i \in X_l \longleftrightarrow y_i \in Y_l$,the multiscale manifold alignment problem is to compute mapping functions, $\mathcal{A}_k$ and $\mathcal{B}_k$, at each level $k$ ($k = 1,2,\ldots,h$) that project $X$ and $Y$ to a new space, preserving local geometry of each dataset and matching instances in correspondence. Furthermore, the associated sequence of mapping functions should satisfy $span(\mathcal{A}_1) \supseteq span(\mathcal{A}_2) \supseteq \ldots \supseteq span(\mathcal{A}_h)$ and $span(\mathcal{B}_1) \supseteq span(\mathcal{B}_2) \supseteq \ldots \supseteq span(\mathcal{B}_h)$, where $span(\mathcal{A}_i)$ (or $span(\mathcal{B}_i)$)represents the subspace spanned by the columns of $\mathcal{A}_i$ (or $\mathcal{B}_i$). To apply diffusion wavelets to the multiscale alignment problem, the construction needs to be able to handle two input matrices $A$ and $B$ that occur in a generalized eigenvalue decomposition, $A \gamma= \lambda B \gamma$. The following theoretical result shows how to carry out such an extension \citep{wang13}. Given $X, X_l, Y, Y_l$, using the notation defined in Figure~\ref{fig:notationmsma}, the algorithm is given below as Algorithm 2. \begin{algorithm}[t] \caption{Multiscale Manifold Alignment (MMA)} \SetAlgoLined \begin{enumerate} \small \item {\bf Construct a matrix representing the joint manifold:} $T=F^+ZLZ^T(F^T)^+$. \item {\bf Use diffusion wavelets on the joint manifold:} $[\phi_k]_{\phi_0}= \mathcal{DWT}(T^+, \epsilon)$, where $\mathcal{DWT()}$ is the diffusion wavelets algorithm. \item {\bf Compute mapping functions for manifold alignment (at level $k$):}\\ $\left[% \begin{array}{c} \alpha_k\\ \beta_k\\ \end{array}% \right]=(F^T)^+[\phi_k]_{\phi_0}$ is a $(p+q) \times d_k$ matrix. \item{\bf At level $k$: apply $\alpha_k$ and $\beta_k$ to find correspondences between $X$ and $Y$:} For any $i$ and $j$, $\alpha_k^Tx_i$ and $\beta_k^Ty_j$ are in the same $d_k$ dimensional space. \end{enumerate} \end{algorithm} \begin{figure}[h] \center \begin{tabular}{|p{12cm}|} \hline \vskip 0.01in $x_i \in R^p$; $X=\{x_1, \cdots, x_m\}$ is a $p \times m$ matrix; \\ $X_l=\{x_1, \cdots, x_l\}$ is a $p \times l$ matrix. \\$y_i \in R^q$; $Y=\{y_1, \cdots, y_n\}$ is a $q \times n$ matrix;\\ $Y_l=\{y_1, \cdots, y_l\}$ is a $q \times l$ matrix . \\$X_l$ and $Y_l$ are in correspondence: $x_i \in X_l \longleftrightarrow y_i \in Y_l$. \\$W_x$ is a similarity matrix, e.g. $W_x^{i,j} = e^{-\frac{|| x_i - x_j||^2}{2\sigma^2}}$. \\$D_x$ is a full rank diagonal matrix: $D_x^{i,i}=\sum_j W_x^{i,j}$; \\$L_x= D_x- W_x$ is the combinatorial Laplacian matrix. \\$W_y$, $D_y$ and $L_y$ are defined similarly. \\\\$\Omega_1-\Omega_4$ are all diagonal matrices having $\mu$ on the top $l$ elements \\ of the diagonal (the other elements are 0s);\\ $\Omega_1$ is an $m \times m$ matrix; $\Omega_2$ and $\Omega_3^T$ are $m \times n$ matrices; \\ $\Omega_4$ is an $n \times n$ matrix \\$Z=\left(% \begin{array}{cc} X & 0 \\ 0 & Y \\ \end{array}% \right)$ is a $(p+q) \times (m+n)$ matrix.\\ $D=\left(% \begin{array}{cc} D_x & 0 \\ 0 & D_y \\ \end{array}% \right)$ and $L=\left(% \begin{array}{cc} L_x+\Omega_1 & -\Omega_2 \\ -\Omega_3 & L_y+\Omega_4 \\ \end{array}% \right)$ \\ are both $(m+n) \times (m+n)$ matrices. \\$F$ is a $(p+q)\times r$ matrix, where $r$ is the rank of $ZDZ^T$ \\ and $FF^T=ZDZ^T$. $F$ can be constructed by SVD. \\$(\cdot)^{+}$ represents the Moore-Penrose pseudoinverse. \\ \\At level $k$: $\alpha_k$ is a mapping from $x \in X$ to a point, \\ $\alpha_k^Tx$, in a $d_k$ dimensional space ($\alpha_k$ is a $p \times d_k$ matrix). \\At level $k$: $\beta_k$ is a mapping from $y \in Y$ to a point, \\ $\beta_k^Ty$, in a $d_k$ dimensional space \\ ($\beta_k$ is a $q \times d_k$ matrix). \\\hline \end{tabular} \caption{Notation used in this section.}\label{fig:notationmsma} \end{figure} \begin{theorem} The solution to the generalized eigenvalue decomposition $ZLZ^T\gamma = \lambda ZDZ^T\gamma$ is given by $((F^T)^+x, \lambda)$, where $x$ and $\lambda$ are eigenvector and eigenvalue of $F^+ZLZ^T(F^T)^+x= \lambda x$.\label{theorem:generalizedeigen} \end{theorem} {\bf Proof:} Using the notation summarized in Figure~\ref{fig:notationmsma}, $ZDZ^T= FF^T$, where $F$ is a $(p+q) \times r$ matrix of rank $r$ and can be constructed by singular value decomposition. It is obvious that $ZDZ^T$ is positive semi-definite. \\\textbf{Case 1:} when $ZDZ^T$ is positive definite: \\It can be seen that $r =p+q$. This implies that $F$ is a $(p+q) \times (p+q)$ full rank matrix: $F^{-1}=F^+$. \\$ZLZ^T\gamma = \lambda ZDZ^T\gamma$ $\Longrightarrow ZLZ^T\gamma= \lambda FF^T\gamma$ $\Longrightarrow ZLZ^T\gamma = \lambda F (F^T\gamma)$ \\$\Longrightarrow ZLZ^T(F^T)^{-1}(F^T\gamma)= \lambda F (F^T\gamma)$ $\Longrightarrow F^{-1}ZLZ^T(F^T)^{-1}(F^T\gamma)= \lambda (F^T\gamma)$ \\$\Longrightarrow$ Solution to $ZLZ^T\gamma = \lambda ZDZ^T\gamma$ is given by $((F^T)^+x, \lambda)$, where $x$ and $\lambda$ are eigenvector and eigenvalue of $F^+ZLZ^T(F^T)^+x= \lambda x$. \\\textbf{Case 2:} when $ZDZ^T$ is positive semi-definite but not positive definite: \\In this case, $r<p+q$ and $F$ is a $(p+q) \times r$ matrix of rank $r$. \\Since $ZD^{0.5}$ is a $(p+q) \times (m+n)$ matrix, $F$ is a $(p+q) \times r$ matrix, there exits a matrix $G$ such that $ZD^{0.5}=FG$. This implies $Z=FGD^{-0.5}$ and $GD^{-0.5}=F^+Z$. \\$ZLZ^T\gamma=\lambda ZDZ^T\gamma$ \\$\Longrightarrow FGD^{-0.5}LD^{-0.5}G^TF^T\gamma=\lambda FF^T\gamma$ $\Longrightarrow FGD^{-0.5}LD^{-0.5}G^T(F^T\gamma)=\lambda F(F^T\gamma)$ \\$\Longrightarrow (F^+F)GD^{-0.5}LD^{-0.5}G^T(F^T\gamma)=\lambda (F^T\gamma)$ \\$\Longrightarrow GD^{-0.5}LD^{-0.5}G^T(F^T\gamma)=\lambda (F^T\gamma)$ $\Longrightarrow F^+ZLZ^T(F^T)^+(F^T\gamma)=\lambda (F^T\gamma)$ \\$\Longrightarrow$ One solution to $ZLZ^T\gamma = \lambda ZDZ^T\gamma$ is $((F^T)^+x, \lambda)$, where $x$ and $\lambda$ are eigenvector and eigenvalue of $F^+ZLZ^T(F^T)^+x= \lambda x$. Note that eigenvector solution to Case 2 is not unique. \begin{theorem} At level $k$, the multiscale manifold alignment algorithm achieves the optimal $d_k$ dimensional alignment result with respect to the cost function $C(\alpha, \beta)$. \end{theorem} \textbf{\\Proof:} Let $T=F^+ZLZ^T(F^T)^+$. Since $L$ is positive semi-definite, $T$ is also positive semi-definite. This means all eigenvalues of $T \ge 0$, and eigenvectors corresponding to the smallest non-zero eigenvalues of $T$ are the same as the eigenvectors corresponding to the largest eigenvalues of $T^+$. From Theorem 1, we know the solution to generalized eigenvalue decomposition $ZLZ^T\gamma = \lambda ZDZ^T\gamma$ is given by $((F^T)^+x, \lambda)$, where $x$ and $\lambda$ are eigenvector and eigenvalue of $Tx= \lambda x$. Let columns of $P_X$ denote the eigenvectors corresponding to the $d_k$ largest non-zero eigenvalues of $T^+$. Then the linear LPP-like solution is given by $(F^T)^+P_X$. Let columns of $P_Y$ denote $[\phi_k]_{\phi_0}$, the scaling functions of $T^+$ at level $k$ and $d_k$ be the number of columns of $[\phi_k]_{\phi_0}$. In our multiscale algorithm, the solution at level $k$ is provided by $(F^T)^+P_Y$. From~\citep{dwt}, we know $P_X$ and $P_Y$ span the same space. This means $P_XP_X^T = P_YP_Y^T$. Since the columns of both $P_X$ and $P_Y$ are orthonormal, we have $P_X^TP_X = P_Y^TP_Y = I$, where $I$ is an $d_k$$\times$$d_k$ identity matrix. Let $Q = P_Y^TP_X$, then $P_X = P_XI = P_XP_X^TP_X = P_YP_Y^TP_X = P_Y(P_Y^TP_X) \Longrightarrow P_X= P_YQ$. $Q^TQ = QQ^T = I$ and $det(Q^TQ) = (det(Q))^2 = 1$, $det(Q) = 1$. So $Q$ is a rotation matrix. Combining the results shown above, the multiscale alignment algorithm at level $k$ and manifold projections with $d_k$ smallest non-zero eigenvectors achieve the same alignment results up to a rotation $Q$.\qed \section{Multiscale Dynamic Time Warping} \label{wow} \begin{algorithm}[t] \caption{Warping on Wavelets (WOW)} \SetAlgoLined \KwIn{ X,Y: two time-series data sets \\ d: latent space dimension \\ $\mu, \tau$: hyper-parameters as described in Algorithm 3.} \KwOut{ $F^{(X)},F^{(Y)}$: the embeddings of X and Y in the latent space \\ $W^{(X,Y)}$: the result DTW matrix that provides the alignment of X and Y} \Begin{ $t \leftarrow 0$ \\ $F^{\left(X\right),t}\leftarrow\mbox{MLE}\left(X,\tau \right)$ \\ $F^{\left(Y\right),t}\leftarrow\mbox{MLE}\left(Y,\tau \right)$ \\ \Repeat{convergence}{ $W = \left[ \begin{array}{cc} (1-\mu) W^{(X)} & \mu W^{(X,Y),t} \\ \mu (W^{(X,Y),t})^{T} & (1-\mu) W^{(Y)} \end{array} \right]$ \\ $\phi^{(Y),t+1},\phi^{(X),t+1}$ $\leftarrow \mbox{MMA}\left(F^{\left(X\right),t},F^{\left(Y\right),t},W,d,\mu, \tau \right)$\\ $F^{(X),t+1}\leftarrow F^{(X),t}\phi^{(X),t+1}$\\ $F^{(Y),t+1}\leftarrow F^{(Y),t}\phi^{(Y),t+1}$\\ $W^{\left(X,Y\right),t+1}\leftarrow\mbox{DTW}\left(F^{\left(X\right),t+1},F^{\left(Y\right),t+1} \right) $ \\ $t \leftarrow t+1$ } $F^{(X)} \leftarrow F^{(X),t}$; $F^{(Y)} \leftarrow F^{(Y),t}$; $W^{(X,Y)} \leftarrow W^{(X,Y),t}$ } \end{algorithm} Algorithm 2 describes a novel multiscale diffusion-wavelet based framework for aligning two sequentially-ordered data sets. MLE denotes the multi-scale Laplacian Eigenmaps algorithm described in Figure~\ref{fig:alg}. Also, MMA denotes the multi-scale manifold alignment method described in Section~\ref{mma} as Algorithm 1. We reformulate the loss function for WOW as: \begin{equation} \begin{array}{l} L_{\mbox{WOW}} (\phi^{(X)},\phi^{(Y)},W^{(X,Y)}) \\= ((1-\mu)\displaystyle\sum_{i,j\in X} ||F_{i}^{(X)}\phi^{(X)}-F_{j}^{(X)}\phi^{(X)}||^{2}W_{i,j}^{(X)} \\ +(1-\mu)\displaystyle\sum_{i,j\in Y}||F_{i}^{(Y)}\phi^{(Y)}-F_{j}^{(Y)}\phi^{(Y)}||^{2}W_{i,j}^{(Y)}\\ +\mu \displaystyle\sum_{i\in X,j\in Y}||F_{i}^{(X)}\phi^{(X)}-F_{j}^{(Y)}\phi^{(Y)}||^{2}W_{i,j}^{(X,Y)} ) \end{array} \end{equation} which is the same loss function as in linear manifold alignment except that $W^{(X,Y)}$ is now a variable. \begin{theorem} \label{thm3} Let $L_{\mbox{WOW},t}$ be the loss function $L_{\mbox{WOW}}$ evaluated at \\ $\prod_{i=1}^{t}\phi^{(X),i},\prod_{i=1}^{t}\phi^{(Y),i},W^{(X,Y),t}$ of Algorithm 2. The sequence $L_{\mbox{WOW},t}$ converges to a minimum as $t \rightarrow \infty$. Therefore, Algorithm 2 will terminate. \end{theorem} {\bf Proof:} At any iteration $t$, Algorithm 2 first fixes the correspondence matrix at $W^{(X,Y),t}$. Now let $L_{\mbox{WOW}}'$ equal $L_{\mbox{WOW}}$ above, except we replace $F_{i}^{(X)},F_{i}^{(Y)}$ by $F_{i}^{(X),t},F_{i}^{(Y),t}$ and Algorithm 2 minimizes over $\phi^{(X),t+1},\phi^{(Y),t+1}$ using mixed manifold alignment. Thus, \begin{equation} \begin{array}{l} \label {eqn:linearinequality} L_{\mbox{WOW}}'(\phi^{(X),t+1},\phi^{(Y),t+1},W^{(X,Y),t}) \\ \leq L_{\mbox{WOW}}'(I,I,W^{(X,Y),t}) \\ = L_{\mbox{WOW}}(\prod_{i=1}^{t}\phi^{(X),i},\prod_{i=1}^{t} \phi^{(Y),i},W^{(X,Y),t}) \\ = L_{\mbox{WOW},t} \end{array} \end{equation} since $F^{(X),t}=F^{(X),0}\prod_{i=1}^{t}\phi^{(X),i}$ and $F^{(Y),t}=F^{(Y),0}\prod_{i=1}^{t}\phi^{(X),i}$. We also have: \begin{equation} \begin{array}{l} L_{\mbox{WOW}}'(\phi^{(X),t+1},\phi^{(Y),t+1},W^{(X,Y),t}) \\ = L_{\mbox{WOW}}(\prod_{i=1}^{t+1}\phi^{(X),i},\prod_{i=1}^{t+1} \phi^{(Y),i},W^{(X,Y),t}) \\ \leq L_{\mbox{WOW},t} \end{array} \end{equation} Algorithm 2 then performs DTW to change $W^{(X,Y),t}$ to $W^{(X,Y),t+1}$. Using the same argument as in the proof of Theorem 2, we have: \begin{equation} \begin{array}{l} L_{\mbox{WOW}}(\prod_{i=1}^{t+1}\phi^{(X),i},\prod_{i=1}^{t+1} \phi^{(Y),i},W^{(X,Y),t+1}) \\ \leq L_{\mbox{WOW}}(\prod_{i=1}^{t+1}\phi^{(X),i},\prod_{i=1}^{t+1} \phi^{(Y),i},W^{(X,Y),t}) \\ \leq L_{\mbox{WOW},t}\\ \Leftrightarrow L_{\mbox{WOW},t+1} \leq L_{\mbox{WOW},t}. \end{array} \end{equation} \section{Warping on Mixed Manifolds} \label{wamm} We describe two additional novel variants of dynamic time warping, one called mixed-manifold warping (or WAMM), and the other called curve wrapping. \subsection{Low Rank Embedding of Datasets on Mixed Manifolds} \label{lre} \begin{figure \centering \includegraphics[scale=0.5]{figures/fig_2.png \caption{Manifold discovery is nontrivial when there are multiple intersecting manifolds on which the data potentially lies on. Popular manifold learning algorithms use nearest neighbor construction (on the left), which incorrectly creates \textit{short-circuits}, whereas a low rank reconstruction (on the right) that correctly differentiates the mixed manifolds.} \label{fig:synthetic} \end{figure} Traditional manifold learning methods, like LLE \citep{roweis2000lle} and Laplacian eigenmaps \citep{belkin2001laplacian_eigenmaps}, construct a discretized approximation to the underlying manifold by constructing a nearest-neighbor graph of data points in the original high-dimensional space. When data lies on a more complex mixture of manifolds, methods that rely on nearest neighbor graph construction algorithms are thus prone to creating spurious inter-manifold connections when mixtures of manifolds are present. These so-called \emph{short-circuit connections} are most commonly found at junction points between manifolds. Figure~\ref{fig:synthetic} shows an example of this phenomena using a noisy dollar sign data set. To deal with complex intersecting manifolds, we describe an alternative approach that uses a low-rank reconstruction of the data points that correctly identifies points that lie on mixed manifolds \citep{favaro,DBLP:conf/aaai/BoucherCMD15}. Given a dataset $X$, the first step is to construct a low-rank approximation by reconstructing each point as a linear combination of the other data points. Unlike LLE, which uses a nearest-neighbor approach to manifold construction that is prone to short-circuit errors such as shown in Figure~\ref{fig:synthetic}, our approach is based on a low-rank reconstruction matrix $R$ from minimizing the following objective function: \begin{algorithm} \caption{Warping on Mixed Manifolds (WAMM)} \SetAlgoLined \KwIn{ X,Y: two time-series data sets \\ d: latent space dimension \\ k: number of nearest neighbors used \\ $\tau$: hyper-parameter for low-rank embedding \\ $\mu$: hyper-parameter preserving correspondence vs local geometry factor} \KwOut{ $F^{(X)},F^{(Y)}$: the embeddings of X and Y in the latent space \\ $W^{(X,Y)}$: the result DTW matrix that provides the alignment of X and Y} \Begin{ Set $W^{(X,Y)}_{1,1}=W^{(X,Y)}_{n_{X},n_{Y}}=1$, and $0$ everywhere else $t \leftarrow 0$ \\ \Repeat{convergence}{ $W = \left[ \begin{array}{cc} (1-\mu) W^{(X)} & \mu W^{(X,Y),t} \\ \mu (W^{(X,Y),t})^{T} & (1-\mu) W^{(Y)} \end{array} \right]$ \\ $F^{(X),t+1},F^{(Y),t+1}\leftarrow\mbox{MLE}(F^{(X),t},F^{(Y),t},W,d,\mu, \tau)$\\ $W^{(X,Y),t+1}\leftarrow\mbox{DTW}(F^{(X),t+1},F^{(Y),t+1})$ \\ $t \leftarrow t+1$ } $F^{(X)} \leftarrow F^{(X),t}$; $F^{(Y)} \leftarrow F^{(Y),t}$; $W^{(X,Y)} \leftarrow W^{(X,Y),t}$ } \end{algorithm} In Algorithm 3, $\mbox{MLE(X,Y,W,d,$\mu$)}$ is a function that returns the embedding of $X,Y$ in a $d$ dimensional space using (mixed) manifold alignment with the joint similarity matrix $W$ and parameter $\mu$ described in the previous sections. To construct such an embedding, we introduce the MME (for mixed-manifold) embedding objective function: \begin{equation} \label{lra1} L_{\mbox{MLE}}(R, \tau) = \min_R \frac{1}{2} \frac{\tau}{2} ||X-XR||_F^2 + ||R||_*, \end{equation} where $\lambda>0$, $||X||_F=\sqrt{\sum_i \sum_j |x_{i.j}|^2}$ is the Frobenius norm, and $||X||_*=\sum_i \sigma_i(X)$ is the spectral norm, for singular values $\sigma_i$. \citep{favaro} prove the following theorem that shows how to minimize the objective function in Equation~\ref{lra1} using a relatively simple SVD computation. \begin{theorem} \label{lr1} Let $X = U \Sigma V^T$ be the singular value decomposition of a data matrix $X$. Then, the optimal solution to Equation~\ref{lra1} is given by \begin{equation} \hat{R} = V_1 (I - \frac{1}{\tau} \Lambda_1^{-2}) V_1^T \end{equation} where $U = [U_1 \ U2]$, $\lambda = \mbox{diag}(\Lambda_1 \ \Lambda_2)$, and $V = (V_1 \ V_2)$ are partitioned according to the sets $I_1 = \{i: \lambda_i > \frac{1}{\sqrt{\tau}}\}$, and $I_2 = \{i: \lambda_i \leq \frac{1}{\sqrt{\tau}}\}$. \end{theorem} We now describe a slight modification of our previous algorithm, low rank alignment (LRA) \citep{boucher-aaai2015}, to align two general datasets that may lie on a mixture of manifolds. This modification extends LRA in that the latter used a restricted version of MME where the parameter $\tau$ was set to unity. We now assume two data sets $X$ and $Y$ are given, along with the correspondence matrix $C^{(X,Y)}$ describing inter-set correspondences (see equation \ref{wxy}).The goal is to compute a low-dimensional {\em joint} embedding of two datasets $X$ and $Y$, trading off two types of constraints, namely preserving inter-set correspondences vs. intra-set geometries. The low-rank reconstruction matrices $R^{(X)},R^{(Y)}$ are calculated independently, and can be computed in parallel to reduce compute time. To develop the loss function, we define the block matrices $R,C\in\mathbb{R}^{N\times N}$ as \begin{equation} R = \left[ \begin{array}{cc} R^{(X)} & 0\\ 0 & R^{(Y)} \end{array} \right] \text{ and } C = \left[ \begin{array}{cc} 0 & C^{(X,Y)}\\ C^{(Y,X)} & 0 \end{array} \right] \end{equation} and $F\in\mathbb{R}^{N\times d}$ as \begin{equation} F = \left[ \begin{array}{cc} F^{(X)}\\ F^{(Y)} \end{array} \right]. \end{equation} We can write the loss function $L_{\mbox{MMA}}$ for multi-manifold alignment, trading off across-domain correspondence vs. preserving local multi-manifold geometry using a sum of matrix traces: \begin{align} \label{derive_trace} L_{\mbox{MMA}}(F, \mu) &= (1-\mu) tr((F - R F)^\top(F - R F)) \nonumber\\ & + \mu\sum_{k=1}^d\sum_{i,j=1}^N ||F_{i,k} - F_{j,k}||_2^2 C_{i,j} \nonumber\\ &= (1-\mu) tr\left(\left((I - R)F\right)^\top (I - R)F\right) \nonumber\\ & + 2\mu \sum_{k=1}^d F_{\cdot,k}^\top L F_{\cdot,k} \nonumber\\ &= (1-\mu) tr(F^\top(I - R)^\top(I - R)F) \nonumber\\ & + 2\mu ~ tr(F^\top L F). \end{align} We introduce the constraint $F^\top F=I$ to ensure that the minimization of the loss function $\mathcal{Z}$ is a well-posed problem. Thus, we have \begin{align} \label{losseqeig} L_{\mbox{MMA}}(F, \mu) & = \argmin_{F:F^\top F=I} (1-\mu) tr(F^\top M F) + 2\mu~ tr(F^\top L F), \end{align} where $M = (I - R)^\top(I - R)$. To construct a loss function from equation (\ref{losseqeig}), we take the right hand side and introduce the Lagrange multiplier $\Lambda$, \begin{align} \label{lagrange} \mathcal{L}(F,\mu, \Lambda) &= (1-\mu) tr(F^\top M F) + 2 \mu ~ tr(F^\top L F) \nonumber\\ & + \langle \Lambda,F^\top F-I\rangle. \end{align} To minimize equation (\ref{lagrange}), we find the roots of its partial derivatives, \begin{align} \frac{\partial\mathcal{L}}{\partial F} &= 2(1-\mu) M F + 4\mu L F - 2\Lambda F = 0 \nonumber\\ \frac{\partial\mathcal{L}}{\partial \Lambda} &= F^\top F - I = 0. \end{align} From this system of equations, we are left with the matrix eigenvalue problem \begin{equation} \label{eigprob} \left((1-\mu)M + 2 \mu L\right)F = \Lambda F ~~\text{ and }~~ F^\top F = I. \end{equation} Therefore, to solve equation (\ref{losseqeig}), we calculate the $d$ \emph{smallest} non-zero eigenvectors of the matrix \begin{equation} \label{eig_matrix} (1-\mu)M + 2 \mu L. \end{equation} This eigenvector problem can be solved efficiently because the matrix $M+L$ is guaranteed to be symmetric, positive semidefinite (PSD), and sparse. These properties arise from the construction, \begin{align} M + L &= \left[ \begin{array}{cc} \left(I-R^{(X)}\right)^2 & 0\\ 0 & \left(I-R^{(Y)}\right)^2 \end{array} \right]\nonumber\\ &+ \left[ \begin{array}{cc} D^{X} & -C^{(X,Y)}\\ \left(-C^{(X,Y)}\right)^\top & D^{Y} \end{array} \right], \end{align} where by construction $D=\left[\begin{array}{cc}D^{X} & 0\\0 & D^{Y}\end{array}\right]$ is a PSD diagonal matrix and $C^{(X,Y)}$ is a sparse matrix. \subsection{Curve Wrapping} Curve wrapping is another novel variant that imposes a Laplacian regularization. Since $X$ and $Y$ are points from a time series, we expect $x_{i}, x_{i+1}$ to be close to each other for $1\leq i < n$ and $y_{i}, y_{i+1}$ to be close to each other for $1\leq j < m.$ This leads us to define the following loss function \begin{equation} \begin{array}{l} L_{\mbox{CW}} (F^{(X)},F^{(Y)},W^{(X,Y)}) \\= ((1-\mu)\displaystyle\sum_{i=1}^{n-1} ||F_{i}^{(X)} -F_{i+1}^{(X)}||^{2}W_{i,i+1}^{(X)} \\ +(1-\mu)\displaystyle\sum_{i=1}^{n-1}||F_{i}^{(Y)}-F_{i+1}^{(Y)}||^{2}W_{i,i+1}^{(Y)}\\ +\mu \displaystyle\sum_{i\in X,j\in Y}||F_{i}^{(X)}-F_{j}^{(Y)}||^{2}W_{i,j}^{(X,Y)} ) \end{array} ,\end{equation} where we can take $W^X_{i,i+1},W^Y_{i,i+1}=1$ to be either just equal to one or $W^X_{i,i+1}=k^X(x_i,x_{i+1}), W^Y_{i,i+1}=k^Y(y_i,y_{i+1})$ for some appropriate kernel functions $k^X,k^Y.$ Let us define \[ W = \left[ \begin{array}{cc} (1-\mu)W^X & \mu W^{(X,Y)}\\ \mu \left(W^{(X,Y)}\right)^\top & (1-\mu)W^X \end{array} \right] \] and let $L_W$ be the Laplacian corresponding to the adjacency matrix $W$ \[ L_W = \text{diag}(W\cdot 1) - W. \] Let $F = (F_X,F_Y)^T.$ We can now express $L_{CW} (F^{(X)},F^{(Y)},W^{(X,Y)}) = F^T L F.$ More generally, we expect $x_{i}, x_{i+k}$ to be close to each for all $k\leq k_0,$ where $k_0$ is a small integer. This leads to a slightly different loss function than the above. \section{Experimental Results} \label{sec:experiments} \subsection{Synthetic data sets} \begin{figure} [t] \centering \includegraphics[height = 5cm, width=0.9\columnwidth,keepaspectratio]{swiss_twin_peaks_samples.jpg} \includegraphics[height = 5cm, width=.9\columnwidth,keepaspectratio]{synthetic_3d_manifolds_alignment_error.jpg} \caption{Top: A synthetic problem of aligning a swiss roll manifold with a twin peak manifold. The proposed WOW algorithm outperforms both previous methods, such as canonical time warping and manifold warping, as well as two alternative methods called curve wrapping and warping on mixed manifolds. } \label{fig:CTWillustration} \end{figure} We illustrate the proposed methods with a simple synthetic example in Figure~\ref{fig:CTWillustration} of aligning two sampled manifolds, a regular swiss roll and a broken swiss roll. In the reprted experiments, alignment error is defined as follows. Let $p^* = [(1,1), \ldots, (n,n)]$ be the optimal alignment, and let $p = [p1,\ldots, p_I]$ be the alignment output by a particular algorithm. The error$(p,p^*)$between $p$ and $p^*$ is computed by the normalized difference in area under the curve $x=y$ (corresponding to $p^*$) and the piece-wise linear curve obtained by connecting points in $p$. It has the property that $p \neq p^* \Rightarrow \mbox{error}(p,p^*) \neq 0$. \begin{figure} [t] \centering \includegraphics[height = 4cm, width=0.35\columnwidth,keepaspectratio]{digit-alignment-results/digit-alignment-problem.png} \includegraphics[height = 4cm, width=0.35\columnwidth,keepaspectratio]{digit-alignment-results/cwt-alignment.png} \includegraphics[height = 4cm, width=0.55\columnwidth,keepaspectratio]{digit-alignment-results/mw-linear-alignment-digits.png} \includegraphics[height = 4cm, width=.35\columnwidth,keepaspectratio]{digit-alignment-results/dwt-alignment-digit.png} \includegraphics[height = 4cm, width=.35\columnwidth,keepaspectratio]{digit-alignment-results/digit-alignment-plot.png} \includegraphics[height = 4cm, width=.35\columnwidth,keepaspectratio]{digit-alignment-results/digit-alignment-errors.png} \caption{A synthetic problem of aligning rotated digits.} \label{fig:CTWillustration2} \end{figure} Figure~\ref{fig:CTWillustration2} compares the performance of the proposed WOW algorithm against several other alignment algorithm on a synthetic rotated digit problem. The original problem is shown on the top left of the panel. The alignments produced by previous methods, such as canonical time-warping \citep{zhou2009ctw} and manifold (linear, nonlinear, and two-step) warping \citep{hoa-cj-mw}, are compared against the newly proposed WOW algorithm that uses diffusion wavelets. The bottom left plot shows the alignments produced by each method against the ground truth ($45$ degree line). The bottom right panel computes the alignment error measured in terms of the area difference under each alignment curve vs. the ground truth. \subsection{Real World Datasets} Table~\ref{tab:algm} summarizes the various proposed novel algorithms and real-world domains used to compare them. The three real-world datasets used to test these algorithms are COIL, the Columbia Object Image Library \citep{coil100}, Human activity recognition (HAR), and the CMU Quality of Life dataset \citep{torre2008motiondata}. \begin{table}[h] \centering \begin{tabular}{| c | c | c | c | } \hline Method/Domain & COIL & UCI HAR & Quality of Life \\ \hline WAMM & Figure~\ref{fig:coil-exp1} & Figure~\ref{fig:uci-har-expt} & Figure~\ref{fig:cmu-expt} \\ \hline WOW & Figure~\ref{fig:coil-exp1} & Figure~\ref{fig:uci-har-expt} & Figure~\ref{fig:cmu-expt} \\ \hline CW & Figure~\ref{fig:coil-exp1}& Figure~\ref{fig:uci-har-expt} & Figure~\ref{fig:cmu-expt} \\ \hline Two-step CW & Figure~\ref{fig:coil-exp1} & Figure~\ref{fig:uci-har-expt} & Figure~\ref{fig:cmu-expt} \\ \hline Manifold warping & Figure~\ref{fig:coil-exp1} & Figure~\ref{fig:uci-har-expt} & Figure~\ref{fig:cmu-expt} \\ \hline \end{tabular} \caption{Proposed Algorithms and Experimental Domains} \label{tab:algm} \end{table} Table~\ref{tab:hyper} lists the various hyper-parameters used in the above experiments. \begin{table}[h] \centering \begin{tabular}{| c | c | c | c | } \hline ~ & COIL & UCI HAR & CMU Quality of Life \\ \hline $\mu$ & 0.5 & 0.5 & 0.5 \\ \hline $\tau$ & 1 & 1 & 1 \\ \hline $d$ & 2 & 2 & 2 \\ \hline $k$ & 10 & 10 & 10 \\ \hline \end{tabular} \caption{Hyperparameter settings for various datasets} \label{tab:hyper} \end{table} \subsubsection{COIL-100 data set} \begin{figure} [h] \centering \includegraphics[width=1.0\columnwidth]{figures/DogAndCat.pdf} \caption{An example of a time-series alignment problem involving rotating objects.} \label{fig:coil} \end{figure} The Columbia Object Image Library (COIL100) \citep{coil100} corpus consists of different series of images taken of different objects on a rotating platform (Figure~\ref{fig:coil}). Each series has $72$ images, each $128\times128$ pixels. Figure~\ref{fig:coil-exp1} reports on experiments over 435 randomly chosen pairs of rotating objects from the COIL dataset, where WOW outperformed the other alignment methods. A paired T-test confirmed the hypothesis that WOW was indeed better to a significance of better than 99\%. \begin{figure} [t] \centering \includegraphics[height = 6cm, width=0.95\columnwidth,keepaspectratio]{COIL_alignment_error.jpg} \caption{WOW outperforms other alignment algorithms in aligning rotating pairs objects in the COIL vision dataset.} \label{fig:coil-exp1} \end{figure} \subsubsection{Human Activity Recognition} \begin{figure} [h] \centering \includegraphics[width=0.4\columnwidth]{har-setup.jpg} \caption{Human Activity Recognition using a Samsung smartphone.} \label{fig:har} \end{figure} The second real-world dataset involves recognition of human activities from recordings made on a Samsung smartphone \citep{uci-har} (see Figure~\ref{fig:har}). \footnote{A video of this experiment can be found at {\tt https://youtu.be/XOEN9W05\_4A}}. $30$ volunteers performed six activities (WALKING, WALKING UPSTAIRS, WALKING DOWNSTAIRS, SITTING, STANDING, LAYING) while wearing a smartphone (Samsung Galaxy S II) on the waist. Using its embedded accelerometer and gyroscope, 3-axial linear acceleration and 3-axial angular velocity measurements were captured at a constant rate of 50Hz. Figure~\ref{fig:uci-har-expt} compares the WOW algorithm against the curve warping, as well as with two varieties of manifold warping. The results shown are averaged over $100$ trials, where each trial consisted of taking a subject and activity at random, and aligning the $3$-D accelerometer readings with the gyroscope readings. A paired T-test showed the differences between WOW and the other methods were statistically significant at the 95\% or better level. \begin{figure}[p] \centering \includegraphics[height = 8cm, width=0.95\columnwidth,keepaspectratio]{UCI_har_alignment_errorbars.jpg} \caption{Experimental results on human activity recognition dataset showing mean alignment errors over 100 runs. } \label{fig:uci-har-expt} \end{figure} \subsubsection{CMU Quality of Life Dataset} Our third real-word experiment uses the kitchen data set \citep{torre2008motiondata} from the CMU Quality of Life Grand Challenge, which records human subjects cooking a variety of dishes (see Figure~\ref{fig:dtw}). The original video frames are NTSC quality (680 x 480), which we subsampled to 60 x 80. We analyzed randomly chosen sequences of 100 frames at various points in two subjects' activities, where the two subjects are both making brownies. As Figure~\ref{fig:cmu-expt} shows, WOW performs significantly better than the other methods, with a paired T-test showing significance better than 99\% with p-values near 0. \begin{figure}[p] \centering \includegraphics[height = 13cm, width=0.85\columnwidth,keepaspectratio]{CMU_Quality_of_Life_alignment_error.jpg} \caption{Mean alignment errors on CMU Quality of Life dataset of $25$ randomly chosen segments of $100$ video frames of two subjects making brownies.} \label{fig:cmu-expt} \end{figure} \section{Summary and Future Work} We introduced a novel multiscale time-series alignment framework called WOW, which combines dynamic time warping with diffusion wavelet analysis on graphs. WOW outperforms canonical time warping and manifold warping, two state of the art alignment methods, as well as other novel methods introduced in this paper, such as WAMM and curve wrapping. There are many directions for future work, including exploring faster variants of the proposed algorithms using distributed processors, combining our multiscale algorithms with nonlinear feature extraction methods using deep learning and related techniques, and doing more detailed experimental testing in additional domains. \newpage
\part{\@startsection{part}{1}% \z@{.7\linespacing\@plus\linespacing}{.8\linespacing}% {\LARGE\sffamily\centering}} \makeatother \renewcommand{\thepart}{\Roman{part}} \setcounter{tocdepth}{4} \makeatletter \def\l@section{\@tocline{1}{5pt}{0pc}{}{}} \makeatother \let\oldtocpart=\tocpart \renewcommand{\tocpart}[2]{\sc\large\oldtocpart{#1}{#2}} \let\oldtocsection=\tocsection \renewcommand{\tocsection}[2]{\bf\oldtocsection{#1}{#2}} \let\oldtocsubsubsection=\tocsubsubsection \renewcommand{\tocsubsubsection}[2]{\quad\oldtocsubsubsection{#1}{#2}} \title{Deformation cones of graph associahedra and nestohedra} \thanks{Partially supported by the French ANR grants CAPPS~17\,CE40\,0018, and CHARMS~19\,CE40\,0017.} \author{Arnau Padrol} \address[Arnau Padrol]{Institut de Math\'ematiques de Jussieu - Paris Rive Gauche, Sorbonne Universit\'e, Paris} \email{arnau.padrol@imj-prg.fr.} \urladdr{\url{https://webusers.imj-prg.fr/~arnau.padrol/}} \author{Vincent Pilaud} \address[Vincent Pilaud]{CNRS \& LIX, \'Ecole Polytechnique, Palaiseau} \email{<EMAIL>} \urladdr{\url{http://www.lix.polytechnique.fr/~pilaud/}} \author{Germain Poullot} \address[Germain Poullot]{Institut de Math\'ematiques de Jussieu - Paris Rive Gauche, Sorbonne Universit\'e,~Paris} \email{<EMAIL>} \urladdr{\url{https://webusers.imj-prg.fr/germain.poullot}} \begin{document} \begin{abstract} We give the facet description of the deformation cones of graph associahedra and nestohedra, generalizing the classical parametrization of the family of deformed permutahedra by the cone of submodular functions. When the underlying building set is made of intervals, this yields in particular to the construction of kinematic nestohedra generalizing the kinematic associahedra that recently appeared in the theory of scattering amplitudes. \end{abstract} \vspace*{-.4cm} \maketitle \vspace*{-.7cm} \tableofcontents \vspace*{-.7cm} \section*{Introduction} A \defn{deformation} of a polytope~$P$ is a polytope obtained from~$P$ by gliding its facets orthogonally to their normal vectors without passing a vertex. Equivalently, it is a polytope whose normal fan coarsens the normal fan of~$P$, or said differently, a Minkowski summand of a dilate of~$P$~\cite{Shephard, Meyer}. The deformations of~$P$ form a polyhedral cone under dilation and Minkowski addition, called the \defn{deformation cone} of~$P$~\cite{Postnikov}. The interior of the deformation cone of~$P$, called the \defn{type cone}~\cite{McMullen-typeCone}, contains those polytopes with the same normal fan as~$P$. When~$P$ is a rational polytope, it has an associated toric variety~\cite{CoxLittleSchenckToric}, and the type cone (here known as the \defn{numerically effective cone}, or shortly \defn{nef cone}) encodes its embeddings into projective space~\cite[Sect.~6.3]{CoxLittleSchenckToric}. Fundamental examples of deformations of polytopes are the \defn{deformed permutahedra} (\aka generalized permutahedra or polymatroids) studied in~\cite{Edmonds, Postnikov, PostnikovReinerWilliams}, which are classically parametrized by \defn{submodular functions}. Among the most famous deformed permutahedra are the classical \defn{associahedra} as constructed in~\cite{ShniderSternberg,Loday} (or even in~\cite{HohlwegLange}). Associahedra appear in several mathematical contexts, from their original definition in topology~\cite{Stasheff} to some recent appearances in the theory of scattering amplitudes in mathematical physics~\cite{ArkaniHamedBaiHeYan}. This paper focusses on some specific deformed permutahedra generalizing the associahedra, namely the graph associahedra and nestohedra. Graph associahedra were defined by M.~Carr and S.~Devadoss~\cite{CarrDevadoss} in connection to C.~De Concini and C.~Procesi's wonderful arrangements~\cite{DeConciniProcesi}. For a given graph~$\graphG$, the \defn{$\graphG$-associahedron}~$\Asso[\graphG]$ is a simple polytope whose combinatorial structure encodes the connected induced subgraphs of~$\graphG$ and their nested structure. More precisely, the $\graphG$-associahedron is a polytopal realization of the \defn{nested complex} of~$\graphG$, defined as the simplicial complex of all collections of \defn{tubes} (connected induced subgraphs) of~$\graphG$ which are pairwise \defn{compatible} (either nested, or disjoint and non-adjacent). As illustrated in \cref{fig:specialGraphAssociahedra}, the graph associahedra of certain special families of graphs coincide with well-known families of polytopes: complete graph associahedra are permutahedra, path associahedra are classical associahedra, cycle associahedra are cyclohedra, and star associahedra are stellohedra. Graph associahedra were extended to \defn{nestohedra}, which are simple polytopes realizing the nested complex of arbitrary \defn{building sets}~\cite{Postnikov, FeichtnerSturmfels}. Graph associahedra and nestohedra have been constructed in different ways: by successive truncations of faces of the standard simplex~\cite{CarrDevadoss}, as Minkowski sums of faces of the standard simplex~\cite{Postnikov, FeichtnerSturmfels}, or from their normal fans by exhibiting explicit inequality descriptions~\cite{Devadoss, Zelevinsky}. For a given building set, the resulting polytopes all have the same normal fan, called a \defn{nested fan}, whose rays are given by the characteristic vectors of the building blocks, and whose cones are given by the nested sets. In this paper, we describe all realizations of the nested fans by studying the deformation cone of the $\graphG$-associahedron for any graph~$\graphG$ (\cref{sec:typeConeGraphicalNestedFan}) and of the nestohedron of any building set (\cref{sec:typeConeNestedFan}). Our main contribution is a non-redundant facet description of these deformation cones, characterizing which of the wall-crossing inequalities are irreplaceable (\cref{thm:extremalExchangeablePairsGraphicalNestedFan,thm:extremalExchangeFramesNestedFan}). This requires a characterization of the pairs of exchangeable rays of the nested fan (\cref{prop:exchangeablePairsGraphicalNestedFan,prop:exchangeablePairsNestedFan}), which was surprisingly missing for arbitrary \mbox{building sets (\cref{rem:Zelevinsky}).} Our characterization enables to count the facets of the deformation cone and thus to determine when the deformation cone is simplicial. It turns out that the deformation cone of the $\graphG$-associahedron is simplicial if and only if~$\graphG$ is a disjoint union of paths (\ie the $\graphG$-associahedron is a Cartesian product of classical associahedra). In contrast, there is much more freedom for nestohedra of arbitrary building sets, and we show that the deformation cone of the nestohedron is always simplicial for an \defn{interval building set}, that is a building set whose blocks are some intervals of~$[n]$ (\cref{prop:simplicialTypeConeInterval}). As advocated in~\cite{PadrolPaluPilaudPlamondon}, the simpliciality of the deformation cone leads to an elegant description of all deformations of the polytope in the so-called kinematic space~\cite{ArkaniHamedBaiHeYan}. Generalizing the kinematic associahedra of~\cite{ArkaniHamedBaiHeYan}, we thus define the \defn{kinematic nestohedra} of arbitrary interval building sets (\cref{prop:kinematicNestohedraInterval}). \begin{figure} \capstart \begin{adjustbox}{center} \begin{tabular}{c@{\;}c@{\;}c@{\;}c} permutahedron & associahedron & cyclohedron & stellohedron \\ \includegraphics[scale=.6]{permutahedron} & \includegraphics[scale=.6]{associahedron} & \includegraphics[scale=.6]{cyclohedron} & \includegraphics[scale=.6]{stellohedron} \\ \includegraphics[scale=.6]{permutahedronTubings} & \includegraphics[scale=.6]{associahedronTubings} & \includegraphics[scale=.6]{cyclohedronTubings} & \includegraphics[scale=.6]{stellohedronTubings} \\[.1cm] complete graph & path & cycle & star \end{tabular} \end{adjustbox} \caption{Some classical families of polytopes as graph associahedra. Illustration from~\cite{MannevillePilaud-compatibilityFans}.} \label{fig:specialGraphAssociahedra} \end{figure} \section{Geometric preliminaries} \label{sec:preliminaries} We first briefly recall basic notions of polytopes and fans, and the definition of the type cone of~\cite{McMullen-typeCone}, following the presentation of~\cite{PadrolPaluPilaudPlamondon}. \subsection{Fans and polytopes} \label{subsec:fansPolytopes} A (polyhedral) \defn{cone} is the positive span of finitely many vectors or equivalently, the intersection of finitely many closed linear half-spaces. The \defn{faces} of a cone are its intersections with its supporting hyperplanes. The \defn{rays} (resp.~\defn{facets}) are the faces of dimension~$1$ (resp.~ codimension~$1$). A cone is \defn{simplicial} if its rays are linearly independent. A (polyhedral) \defn{fan}~$\Fan$ is a set of cones such that any face of a cone of~$\Fan$ belongs to~$\Fan$, and any two cones of~$\Fan$ intersect along a face of both. A fan is \defn{essential} if the intersection of its cones is the origin, \defn{complete} if the union of its cones covers~$\R^n$, and \defn{simplicial} if all its cones are simplicial. In a simplicial fan, we say that two maximal cones are \defn{adjacent} if they share a facet, and that two rays are \defn{exchangeable} if they belong to two adjacent cones but not to their common facet. We will say that the fan \defn{realizes} the simplicial complex consisting of the subsets of rays spanning cones. A \defn{polytope} is the convex hull of finitely many points or equivalently, a bounded intersection of finitely many closed affine half-spaces. The \defn{faces} of a polytope are its intersections with its supporting hyperplanes. The \defn{vertices} (resp.~\defn{edges}, resp.~\defn{facets}) are the faces of dimension~$0$ (resp.~dimension~$1$, resp.~codimension~$1$). The \defn{normal cone} of a face~$F$ of a polytope~$P$ is the cone generated by the normal vectors of the facets of~$P$ containing~$F$. Said differently, it is the cone of vectors~$\b{c}$ such that the linear form~$\b{x} \mapsto \dotprod{\b{c}}{\b{x}}$ on~$P$ is maximized by all points of the face~$F$. The \defn{normal fan} of~$P$ is the set of normal cones of all its faces. \subsection{Type cone} \label{subsec:typeCone} Fix an essential complete simplicial fan~$\Fan$ in~$\R^n$. Let~$\b{G}$ be the $N \times n$-matrix whose rows are (representative vectors of) the rays of~$\Fan$. For any height vector~$\b{h} \in \R^N$, we define the polytope \( P_\b{h} \eqdef \set{\b{x} \in \R^n}{\b{G}\b{x} \le \b{h}}. \) The following classical statement characterizes the height vectors~$h$ for which the fan~$\Fan$ is the normal fan of this polytope~$P_\b{h}$. \begin{proposition}[\cite{GelfandKapranovZelevinsky,ChapotonFominZelevinsky}] \label{prop:characterizationPolytopalFan} Let~$\Fan$ be an essential complete simplicial fan in~$\R^n$. Then the following are equivalent for any height vector~$\b{h} \in \R^N$: \begin{enumerate} \item The fan~$\Fan$ is the normal fan of the polytope~$P_\b{h} \eqdef \set{\b{x} \in \R^n}{\b{G}\b{x} \le \b{h}}$. \item For any two adjacent maximal cones~$\R_{\ge0}\b{R}$ and~$\R_{\ge0}\b{R}'$ of~$\Fan$ with~$\b{R} \ssm \{\b{r}\} = \b{R}' \ssm \{\b{r}'\}$, we have \( \sum_{\b{s} \in \b{R} \cup \b{R}'} \coefficient[{\b{s}}][\b{R}][\b{R}'] \, h_{\b{s}} > 0, \) where \( \sum_{\b{s} \in \b{R} \cup \b{R}'} \coefficient[{\b{s}}][\b{R}][\b{R}'] \, \b{s} = \b{0} \) is the unique linear dependence among the rays of~$\b{R} \cup \b{R}'$ such that~$\coefficient[{\b{r}}][\b{R}][\b{R}'] + \coefficient[{\b{r}'}][\b{R}][\b{R}'] = 2$. \end{enumerate} \end{proposition} Following \cite{McMullen-typeCone}, we define the \defn{type cone} of~$\Fan$ as the cone~$\typeCone(\Fan)$ of polytopal realizations of~$\Fan$. Based on \cref{prop:characterizationPolytopalFan} it can be parametrized as \begin{align*} \typeCone(\Fan) & \eqdef \set{\b{h} \in \R^N}{\Fan \text{ is the normal fan of } P_\b{h}} \\ & = \Bigset{\b{h} \in \R^N}{\sum_{\b{s} \in \b{R} \cup \b{R}'} \coefficient[{\b{s}}][\b{R}][\b{R}'] \, \b{h}_{\b{s}} > 0 \; \begin{array}{l} \text{for any adjacent maximal} \\ \text{cones~$\R_{\ge0}\b{R}$ and~$\R_{\ge0}\b{R}'$ of~$\Fan$} \end{array}}. \end{align*} Note that~$\typeCone(\Fan)$ is an open polyhedral cone (dilations preserve normal fans) and contains a lineality subspace of dimension~$n$ (translations preserve normal fans). Its closure $\ctypeCone(\Fan)$ consists of all polytopes whose normal fan coarsens~$\Fan$, and is called the \defn{deformation cone}. Its faces are the deformation cones of the coarsenings of~$\Fan$. Having into account the lineality, we will say that the type cone is \defn{simplicial} when it has precisely $N-n$ facets. When the type cone is simplicial, it naturally defines alternative polytopal realizations of the fan~$\Fan$ in the non-negative orthant parametrized by non-negative vectors, akin to the realizations of the kinematic associahedra introduced in~\cite{ArkaniHamedBaiHeYan}. See~\cite[Sec.~1.4]{PadrolPaluPilaudPlamondon} for details. \begin{proposition}[{\cite{PadrolPaluPilaudPlamondon}}] \label{prop:simplicialTypeCone} Assume that the type cone~$\typeCone(\Fan)$ is simplicial and let~$\b{K}$ be the $(N-n) \times N$-matrix whose rows are the inner normal vectors of the facets of~$\typeCone(\Fan)$. Then, for any positive vector~${\b{p} \in \R_{>0}^{N-n}}$, the polytope \( R_\b{p} \eqdef \set{\b{z} \in \R^N}{K\b{z} = \b{p} \text{ and } \b{z} \ge 0} \) is a realization of the fan~$\Fan$. Moreover, the polytopes~$R_\b{p}$ for~$\b{p} \in \R_{>0}^{N-n}$ describe all polytopal realizations of~$\Fan$ (up to translation). \end{proposition} \section{Type cones of graphical nested fans} \label{sec:typeConeGraphicalNestedFan} In this section, we study graphical nested fans, postponing the study of arbitrary nested fans to \cref{sec:typeConeNestedFan}. While the graphical case is significantly simpler than the general case, some proof ideas presented here will be transported to \cref{sec:typeConeNestedFan}. This section is thus useful both to the readers only interested in the graphical case and as a prototype for the general case. \subsection{Graphical nested complex and graphical nested fan} \label{subsec:graphicalNestedComplexGraphicalNestedFan} We start with the definitions and properties of the nested complex of a graph, using material from~\cite{CarrDevadoss, Postnikov, FeichtnerSturmfels, Zelevinsky, MannevillePilaud-compatibilityFans}. \para{Graphical nested complex} Let~$\graphG$ be a graph with vertex set~$\ground$. A \defn{tube} of~$\graphG$ is a non-empty subset of vertices of~$\graphG$ whose induced subgraph is connected. The set of tubes of~$\graphG$ is denoted by~$\tubes$. The (inclusion) maximal tubes of~$\graphG$ are its \defn{connected components}~$\connectedComponents(\graphG)$. Two tubes~$\tube, \tube'$ of~$\graphG$ are \defn{compatible} if they are either nested (\ie $\tube \subseteq \tube'$ or~$\tube' \subseteq \tube$), or disjoint and non-adjacent~(\ie~${\tube \cup \tube' \notin \tubes}$). Note that any connected component of~$\graphG$ is compatible with any other tube of~$\graphG$. A \defn{tubing} on~$\graphG$ is a set~$\tubing$ of pairwise compatible tubes of~$\graphG$ containing all connected components~$\connectedComponents(\graphG)$. Examples are illustrated in \cref{fig:exmNestedGraphical}. The \defn{nested complex} of~$\graphG$ is the simplicial complex~$\nestedComplex(\graphG)$ whose faces are~$\tubing \ssm \connectedComponents(\graphG)$ for all tubings~$\tubing$~on~$\graphG$. If~$\tubing \ssm \{\tube\} = \tubing' \ssm \{\tube'\}$ for two maximal tubings~$\tubing$ and~$\tubing'$ and two tubes~$\tube$ and~$\tube'$, we say that~$\tubing$ and $\tubing'$ are \defn{adjacent} and that~$\tube$ and~$\tube'$ are~\defn{exchangeable}. \begin{figure}[h] \capstart \centerline{\includegraphics[scale=.5]{exmNestedGraphical}} \caption{Some incompatible tubes (left and middle), and a maximal tubing (right).} \label{fig:exmNestedGraphical} \end{figure} \vspace{-.3cm} \para{Graphical nested fan and graph associahedron} Let~$(\b{e}_v)_{v \in \ground}$ be the canonical basis of~$\R^\ground$. We consider the subspace~${\HH \eqdef \bigset{\b{x} \in \R^\ground}{\sum_{v \in K} x_v = 0 \text{ for all } K \in \connectedComponents(\graphG)}}$ and let~$\pi : \R^\ground \to \HH$ denote the orthogonal projection onto~$\HH$. The \defn{$\b{g}$-vector} of a tube~$\tube$ of~$\graphG$ is the projection~$\gvector{\tube} \eqdef \pi \big( \sum_{v \in \tube} \b{e}_v \big)$ of the characteristic vector of~$\tube$. We set~$\gvectors{\tubing} \eqdef \set{\gvector{\tube}}{\tube \in \tubing}$ for a tubing~$\tubing$ on~$\graphG$. \enlargethispage{.8cm} Note that by definition, $\gvector{\varnothing} = \b{0}$ and $\gvector{K} = \b{0}$ for all connected components~$K \in \connectedComponents(\graphG)$. The vectors~$\gvector{\tube}$ with~$\tube \in \tubes$ support a complete simplicial fan realization of the nested complex. See~\cref{fig:graphicalNestedFans}. \begin{figure}[b] \capstart \centerline{\includegraphics[scale=.55]{graphicalNestedFans}} \caption{Two graphical nested fans. As the fans are $3$-dimensional, we intersect them with the sphere and stereographically project them from the direction~$(-1,-1,-1)$.} \label{fig:graphicalNestedFans} \end{figure} \begin{theorem}[\cite{CarrDevadoss, Postnikov, FeichtnerSturmfels, Zelevinsky}] \label{thm:graphicalNestedFan} For any graph~$\graphG$, the set of cones \[ \nestedFan[\graphG] \eqdef \set{\R_{\ge 0} \, \gvectors{\tubing}}{\tubing \text{ tubing on } \graphG} \] is a complete simplicial fan of~$\HH$, called the \defn{nested fan} of~$\graphG$, realizing the nested complex~$\nestedComplex(\graphG)$. \end{theorem} The following statement is proved in~\cite{CarrDevadoss, Devadoss, Postnikov, FeichtnerSturmfels, Zelevinsky}. For a subset~$U \subseteq \ground$, denote by~$\triangle_U \eqdef \conv\set{\b{e}_u}{u \in U}$ the face of the standard simplex~$\triangle_\ground$ corresponding to~$U$. \begin{theorem}[\cite{CarrDevadoss, Devadoss, Postnikov, FeichtnerSturmfels, Zelevinsky}] For any graph~$\graphG$, the nested fan~$\nestedFan[\graphG]$ is the normal fan of the graph associahedron~$\Asso[\graphG]$. It can be constructed as \begin{enumerate}[(i)] \item the intersection of~$\HH$ with the hyperplanes~$\dotprod{\gvector{\tube}}{\b{x}} \le -3^{|\tube|}$ for all tubes~$\tube \in \tubes$~\cite{Devadoss}, \item the Minkowski sum~$\sum_{\tube \in \tubes} \triangle_{\tube}$ of the faces of the standard simplex given by all tubes of~$\graphG$~\cite{Postnikov}. \end{enumerate} \end{theorem} \begin{example} For instance, \begin{enumerate}[(i)] \item the complete graph associahedron is the classical \defn{permutahedron}, see \eg \cite{Ziegler-polytopes, Hohlweg}, \item the path associahedron is the classical \defn{associahedron} of~\cite{ShniderSternberg,Loday}. \end{enumerate} \end{example} \subsection{Exchangeable tubes and $\b{g}$-vector dependences} \label{subsec:exchangeableTubes} The next statement \mbox{follows from~\cite{MannevillePilaud-compatibilityFans, Zelevinsky}.} \begin{proposition} \label{prop:exchangeablePairsGraphicalNestedFan} Let~$\tube, \tube'$ be two tubes of~$\graphG$. Then \begin{enumerate}[(i)] \item The tubes~$\tube$ and~$\tube'$ are exchangeable in~$\nestedFan[\graphG]$ if and only if $\tube'$ has a unique neighbor~$v$ in~$\tube \ssm \tube'$ and $\tube$ has a unique neighbor~$v'$ in~$\tube' \ssm \tube$. \item For any adjacent maximal tubings~$\tubing, \tubing'$ on~$\graphG$ with $\tubing \ssm \{\tube\} = \tubing' \ssm \{\tube'\}$, both~$\tubing$ and~$\tubing'$ contain the tube~$\tube \cup \tube'$ and the connected components of~$\tube \cap \tube'$. \item The linear dependence between the $\b{g}$-vectors of~$\tubing \cup \tubing'$ is given by \[ \gvector{\tube} + \gvector{\tube'} = \gvector{\tube \cup \tube'} + \sum_{\tube[s] \in \connectedComponents(\tube \cap \tube')} \gvector{\tube[s]}. \] In particular, it only depends on the exchanged tubes~$\tube$ and~$\tube'$, not on the tubings~$\tubing$ and~$\tubing'$. \end{enumerate} \end{proposition} \begin{proof} Points~(i) and~(ii) were proved in~\cite{MannevillePilaud-compatibilityFans}. Point~(iii) follows from the fact that \[ \sum_{v \in \tube} \b{e}_v + \sum_{v \in \tube'} \b{e}_v = \sum_{v \in \tube \cup \tube'} \b{e}_v + \sum_{v \in \tube \cap \tube'} \b{e}_v = \sum_{v \in \tube \cup \tube'} \b{e}_v + \sum_{\tube[s] \in \connectedComponents(\tube \cap \tube')} \sum_{v \in \tube[s]} \b{e}_v. \qedhere \] \end{proof} For instance, the two tubes on the left of \cref{fig:exmNestedGraphical} are exchangeable, while the two tubes on the middle of \cref{fig:exmNestedGraphical} are not. \subsection{Type cone of graphical nested fans} \label{subsec:typeConeGraphicalNestedFans} As a direct consequence of \cref{prop:exchangeablePairsGraphicalNestedFan}, we obtain the following (possibly redundant) description of the type cone of the graphical nested fan~$\nestedFan[\graphG]$. \begin{corollary} \label{coro:typeConeGraphicalNestedFan} For any graph~$\graphG$, the type cone of the nested fan~$\nestedFan[\graphG]$ is given by \[ \typeCone(\nestedFan[\graphG]) = \set{\b{h} \in \R^{\tubes}}{\begin{array}{l} \b{h}_{K} = 0 \text{ for any connected component } K \in \connectedComponents(\graphG) \text{ and}\\ \b{h}_{\tube} + \b{h}_{\tube'} > \b{h}_{\tube \cup \tube'} + \sum_{\tube[s] \in \connectedComponents(\tube \cap \tube')} \b{h}_{\tube[s]} \text{ for any exchangeable tubes } \tube, \tube' \end{array}}. \] \end{corollary} We denote by~$\b{f}_{\tube}$ for~$\tube \in \tubes$ the canonical basis of~$\R^{\tubes}$ and by \[ \b{n}(\tube, \tube') \eqdef \b{f}_{\tube} + \b{f}_{\tube'} - \b{f}_{\tube\cup \tube'} - \sum_{\tube[s] \in \connectedComponents(\tube \cap \tube')} \b{f}_{\tube[s]} \] the inner normal vector of the inequality of the type cone~$\typeCone(\nestedFan[\graphG])$ corresponding to an exchangeable pair~$\{\tube, \tube'\}$ of tubes of~$\graphG$. Thus $\b{h} \in \typeCone(\nestedFan[\graphG])$ if and only if $ \dotprod{\b{n}(\tube, \tube')}{\b{h}} > 0$ for all exchangeable tubes~$\tube,\tube' \in \tubes$. \begin{example} For instance, \begin{enumerate}[(i)] \item for the complete graph~$\graphG[K]_n$, the type cone~$\typeCone(\nestedFan[{\graphG[K]_n}])$ is formed by all strict submodular functions, \ie functions~$\b{h} : 2^{[n]} \to \R$ such that~$\b{h}_{\varnothing} = 0 = \b{h}_{[n]}$ and~${\b{h}_{A} + \b{h}_{B} > \b{h}_{A \cap B} + \b{h}_{A \cup B}}$ for any~$A, B \subseteq [n]$. The inequalities~$\b{h}_{U \ssm \{v\}} + \b{h}_{U \ssm \{v'\}} > \b{h}_{U} + \b{h}_{U \ssm \{v,v'\}}$ for~$v,v' \in \ground$ and~$\{v,v'\} \subseteq U \subseteq \ground$ clearly imply all submodular inequalities. The closure of the type cone~$\typeCone(\nestedFan[{\graphG[K]_n}])$ is the set of deformed permutahedra (or generalized permutahedra) studied by A.~Postnikov in~\cite{Postnikov} and E.-M.~Feichtner and B.~Sturmfels in~\cite{FeichtnerSturmfels}. \item for the path~$\graphG[P]_n$, the type cone~$\typeCone(\nestedFan[{\graphG[P]_n}])$ is formed by the functions ${\b{h} : \set{[i,j]}{1 \le i \le j \le n} \mapsto \R}$ such that~$\b{h}_{[1,n]} = 0 = \b{h}_{\{i\}}$ for all~$i \in [n]$ and~$\b{h}_{[i,j]} + \b{h}_{[k,\ell]} > \b{h}_{[i,\ell]} + \b{h}_{[k,j]}$ for all~$1 \le i \le j \le n$ and~$1 \le k \le \ell \le n$ such that~$i < k$, $j < \ell$ and~$k \le j+1$ (where~$\b{h}_{[k,j]} = 0$ if~$k = j+1$). \end{enumerate} \end{example} \begin{example} \label{exm:typeConeGraphicalNestedFan} Consider the graphical nested fans illustrated in \cref{fig:graphicalNestedFans}. The type cone of the left fan lives in~$\R^{13}$, has a linearity space of dimension~$3$ and $19$ facet-defining inequalities (given below). In particular, it is not simplicial. Note that as in \cref{fig:graphicalNestedFans}, we express the $\b{g}$-vectors in the basis given by the maximal tubing containing the first three tubes below. \bigskip \centerline{$ \begin{array}{r|c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c} \text{tubes} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeA1}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeA2}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeA3}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeA4}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeA5}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeA6}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeA7}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeA8}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeA9}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeA10}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeA11}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeA12}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeA13}} \\[.6cm] \text{$\b{g}$-vectors} & \compactVectorT{1}{0}{0} & \compactVectorT{0}{1}{0} & \compactVectorT{0}{0}{1} & \compactVectorT{0}{1}{-1} & \compactVectorT{1}{-1}{1} & \compactVectorT{1}{-1}{0} & \compactVectorT{1}{0}{-1} & \compactVectorT{-1}{1}{0} & \compactVectorT{-1}{0}{1} & \compactVectorT{-1}{0}{0} & \compactVectorT{0}{-1}{1} & \compactVectorT{0}{-1}{0} & \compactVectorT{0}{0}{-1} \\[.6cm] \text{facet} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & -1 & 1 \\ \text{defining} & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 1 & 0 & -1 & 0 \\ \text{inequalities} & -1 & 1 & 0 & -1 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & -1 & -1 & 1 & 0 \\ & 0 & 0 & 0 & 0 & 0 & -1 & 1 & 0 & 0 & 0 & 0 & 1 & -1 \\ & -1 & 1 & -1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ & -1 & 0 & 0 & 0 & 1 & -1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ & 0 & 1 & -1 & 0 & 0 & 0 & 0 & -1 & 1 & 0 & 0 & 0 & 0 \\ & 0 & 0 & -1 & 0 & 1 & 0 & 0 & 0 & 1 & 0 & -1 & 0 & 0 \\ & 0 & 0 & 0 & 0 & 1 & -1 & 0 & 0 & 0 & 0 & -1 & 1 & 0 \\ & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & -1 & 1 & 0 & 0 & 0 \\ & 0 & 0 & 1 & 0 & -1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & -1 & 0 & 1 & 0 & 0 \\ & 1 & 0 & 0 & 0 & 0 & 0 & -1 & 0 & 0 & 0 & 0 & 0 & 1 \\ & 1 & 0 & 0 & 0 & -1 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ & 1 & -1 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ & 0 & 0 & 0 & 1 & 0 & 0 & 0 & -1 & 0 & 1 & 0 & 0 & -1 \\ & 0 & 0 & 0 & 1 & 0 & 1 & -1 & 0 & 0 & 0 & 0 & 0 & 0 \\ & 0 & -1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\[.2cm] \end{array} $} \bigskip \noindent The type cone of the right fan lives in~$\R^{11}$, has a linearity space of dimension~$3$ and $12$ facet-defining inequalities (given below). In particular, it is not simplicial. Note that as in \cref{fig:graphicalNestedFans}, we express the $\b{g}$-vectors in the basis given by the maximal tubing containing the first three tubes~below. \[ \begin{array}{r|c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c@{\;\,}c} \text{tubes} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeB1}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeB2}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeB3}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeB4}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeB5}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeB6}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeB7}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeB8}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeB9}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeB10}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{tubeB11}} \\[.6cm] \text{$\b{g}$-vectors} & \compactVectorT{1}{0}{0} & \compactVectorT{0}{1}{0} & \compactVectorT{0}{0}{1} & \compactVectorT{1}{-1}{1} & \compactVectorT{1}{-1}{0} & \compactVectorT{-1}{1}{0} & \compactVectorT{-1}{0}{1} & \compactVectorT{-1}{0}{0} & \compactVectorT{0}{-1}{1} & \compactVectorT{0}{-1}{0} & \compactVectorT{0}{0}{-1} \\[.6cm] \text{facet} & -1 & 1 & -1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \text{defining} & 1 & -1 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ \text{inequalities} & 0 & 1 & -1 & 0 & 0 & -1 & 1 & 0 & 0 & 0 & 0 \\ & 1 & 0 & 0 & -1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ & 0 & 0 & -1 & 1 & 0 & 0 & 1 & 0 & -1 & 0 & 0 \\ & 0 & 0 & 0 & 1 & -1 & 0 & 0 & 0 & -1 & 1 & 0 \\ & 0 & 0 & 0 & 0 & 0 & 1 & -1 & 0 & 1 & 0 & 0 \\ & 0 & 0 & 0 & 0 & 0 & 0 & 1 & -1 & -1 & 1 & 0 \\ & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & -1 & 1 \\ & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & -1 & 0 \\ & 0 & 0 & 1 & 0 & 0 & 0 & -1 & 1 & 0 & 0 & 0 \\ & 0 & 0 & 1 & -1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\[.2cm] \end{array} \] \end{example} \begin{example} \label{exm:constructionsGraphicalNestedFan} We can exploit \cref{coro:typeConeGraphicalNestedFan} to show that certain height functions belong to the type cone of~$\nestedFan[\graphG]$ and recover some classical constructions of the graph associahedron. \begin{enumerate}[(i)] \item Consider the height function~$\b{h} \in \R^{\tubes}$ given by~$\b{h}_{\tube} \eqdef -3^{|\tube|}$. Then for any exchangeable tubes~$\tube$ and~$\tube'$, we have \[ \qquad\qquad \dotprod{\b{n}(\tube, \tube')}{\b{h}} = - 3^{|\tube|} - 3^{|\tube'|} + 3^{|\tube \cup \tube'|} + \sum_{\tube[s] \in \connectedComponents(\tube \cap \tube')} 3^{|\tube[s]|} \ge - 2 \cdot 3^{|\tube \cup \tube'|-1} + 3^{|\tube \cup \tube'|} > 0. \] Therefore, the height function~$\b{h}$ belongs to the type cone~$\typeCone(\nestedFan[\graphG])$. The corresponding polytope~$P_\b{h} \eqdef \bigset{\b{x} \in \R^\ground}{\dotprod{\gvector{\tube}}{\b{x}} \le \b{h}_{\tube} \text{ for } \tube \in \tubes}$ is the graph associahedron constructed by S.~Devadoss's in~\cite{Devadoss}. \item Consider the height function~$\b{h} \in \R^{\tubes}$ given by~$\b{h}_{\tube} \eqdef -|\bigset{\tube[s] \in \tubes}{\tube[s] \subseteq \tube}|$. Then for any exchangeable tubes~$\tube$ and~$\tube'$, we have \[ \qquad\qquad \dotprod{\b{n}(\tube, \tube')}{\b{h}} = |\bigset{\tube[s]\in\tubes}{\tube[s] \not\subseteq \tube \text{ and } \tube[s] \not\subseteq \tube' \text{ but } \tube[s] \subseteq \tube \cup \tube'}| > 0 \] since~$\tube \cup \tube'$ fulfills the conditions on~$\tube[s]$. Therefore, the height function~$\b{h}$ belongs to the type cone~$\typeCone(\nestedFan[\graphG])$. The corresponding polytope~${P_\b{h} \eqdef \bigset{\b{x} \in \R^\ground}{\dotprod{\gvector{\tube}}{\b{x}} \le \b{h}_{\tube} \text{ for } \tube \in \tubes}}$ is the graph associahedron constructed by A.~Postnikov's in~\cite{Postnikov}. \end{enumerate} \end{example} Note that many inequalities of \cref{coro:typeConeGraphicalNestedFan} are redundant. In the remaining of this section, we describe the facet-defining inequalities of the type cone of the graphical nested fans. We say that an exchangeable pair~$\{\tube, \tube'\}$ of tubes of~$\graphG$ is \begin{itemize} \item \defn{extremal} if its corresponding inequality in \cref{coro:typeConeGraphicalNestedFan} defines a facet of~$\typeCone(\nestedFan[\graphG])$, \item \defn{maximal} if~${\tube \ssm \{v\} = \tube' \ssm \{v'\}}$ for some neighbor~$v$ of~$\tube'$ and some neighbor~$v'$ of~$\tube$. \end{itemize} We can now state our main result on graphical nested complexes. \begin{theorem} \label{thm:extremalExchangeablePairsGraphicalNestedFan} An exchangeable pair is extremal if and only if it is maximal. \end{theorem} \begin{proof} We treat separately the two implications: \para{\bf Extremal $\implies$ maximal} Consider an exchangeable pair~$\{\tube, \tube'\}$ of tubes of~$\graphG$. By \cref{prop:exchangeablePairsGraphicalNestedFan}, $\tube'$ has a unique neighbor~$v$ in~$\tube \ssm \tube'$ and $\tube$ has a unique neighbor~$v'$ in~$\tube' \ssm \tube$. Therefore, $\tube \ssm \tube'$ and~$\tube' \ssm \tube$ are both connected. Assume that $\{\tube, \tube'\}$ is not maximal, for instance that~$\tube \ssm \tube' \ne \{v\}$, and let $w\ne v$ be a non-disconnecting node of $\tube \ssm \tube'$. By \cref{prop:exchangeablePairsGraphicalNestedFan}, $\tilde \tube \eqdef \tube \ssm \{w\}$ and $\tube'$ are exchangeable, and $\tilde \tube' \eqdef (\tube \cup \tube') \ssm \{w\}$ and $\tube$ are exchangeable as well. Moreover, we have \begin{align*} \b{n}(\tilde \tube, \tube') + \b{n}( \tube, \tilde \tube') & = \Big( \b{f}_{\tilde \tube} + \b{f}_{\tube'} - \b{f}_{\tilde \tube\cup \tube'} - \sum_{\tube[s] \in \connectedComponents(\tilde \tube \cap \tube')} \b{f}_{\tube[s]} \Big) + \Big( \b{f}_{\tube} + \b{f}_{\tilde \tube'} - \b{f}_{\tube\cup \tilde \tube'} - \sum_{\tube[s] \in \connectedComponents(\tube \cap \tilde \tube')} \b{f}_{\tube[s]} \Big) \\ & = \b{f}_{\tube} + \b{f}_{\tube'} - \b{f}_{\tube\cup \tube'} - \sum_{\tube[s] \in \connectedComponents(\tube \cap \tube')} \b{f}_{\tube[s]} =\b{n}(\tube, \tube'), \end{align*} as $\tilde \tube \cup \tube' = \tilde \tube'$, $\tilde \tube \cap \tube' = \tube \cap \tube'$, $\tube \cup \tilde \tube' = \tube \cup \tube'$ and $\connectedComponents(\tube \cap \tilde \tube') = \connectedComponents(\tilde \tube) = \tilde \tube$. Therefore $\b{n}(\tube, \tube')$ defines a redundant inequality and $\{\tube, \tube'\}$ is not an extremal exchangeable pair. The proof is symmetric if~$\tube' \ssm \tube \ne \{v'\}$. \para{\bf Maximal $\implies$ extremal} Let $\{\tube, \tube'\}$ be a maximal exchangeable pair. To prove that $\{\tube, \tube'\}$ is extremal, we will construct a vector $\b{w} \in \R^{\tubes}$ such that $\dotprod{\b{n}(\tube, \tube')}{\b{w}}< 0$, but $\dotprod{\b{n}(\tilde \tube, \tilde \tube')}{\b{w}}>0$ for any other maximal exchangeable pair $\{\tilde \tube, \tilde \tube'\}$. This will show that the inequality induced by~$\{\tube, \tube'\}$ is not redundant. Define $\alpha(\tube,\tube') \eqdef \set{\tube[s] \in \tubes}{\tube[s] \not\subseteq \tube \text{ and } \tube[s] \not\subseteq \tube' \text{ but } \tube[s] \subseteq \tube \cup \tube'}$. Note that~$\alpha(\tube,\tube')$ is non-empty since it contains~$\tube \cup \tube'$. Define three vectors~$\b{x}, \b{y}, \b{z} \in \R^{\tubes}$~by \begin{align*} \b{x}_{\tube[s]} & \eqdef -|\bigset{\tube[r] \in \tubes \ssm \alpha(\tube, \tube')}{\tube[r] \subseteq \tube[s]}|, \\ \b{y}_{\tube[s]} & \eqdef -|\bigset{\tube[r] \in \alpha(\tube, \tube')}{\tube[r] \subseteq \tube[s]}|, \\ \b{z}_{\tube[s]} & \eqdef \begin{cases} -1 & \text{if } \tube \subseteq \tube[s] \text{ or } \tube' \subseteq \tube[s], \\ 0 & \text{otherwise}, \end{cases} \end{align*} for each tube~$\tube[s] \in \tubes$. We will prove below that their scalar products with~$\b{n}(\tilde \tube, \tilde \tube')$ for any maximal exchangeable pair $\{\tilde \tube, \tilde \tube'\}$ satisfy the following inequalities \[ \renewcommand{\arraystretch}{1.3} \begin{array}{l|ccc} & \dotprod{\b{n}(\tilde \tube, \tilde \tube')}{\b{x}} & \dotprod{\b{n}(\tilde \tube, \tilde \tube')}{\b{y}} & \dotprod{\b{n}(\tilde \tube, \tilde \tube')}{\b{z}} \\ \hline \text{if } \{\tube, \tube'\} = \{\tilde \tube, \tilde \tube'\} & = 0 & = |\alpha(\tube, \tube')| & = -1 \\ \text{if } \alpha(\tilde \tube, \tilde \tube') \not\subseteq \alpha(\tube,\tube') & \ge 1 & \ge 0 & \ge -1 \\ \text{otherwise} & = 0 & \ge 1 & \ge 0 \end{array} \renewcommand{\arraystretch}{1} \] It immediately follows from this table that the vector $\b{w} \eqdef \b{x} + \delta \b{y} + \varepsilon \b{z}$ fulfills the desired properties for any~$\delta, \varepsilon$ such that~$0 < \delta \cdot |\alpha(\tube, \tube')| < \varepsilon < 1$. To prove the inequalities of the table, observe that for any maximal exchangeable pair~$\{\tilde \tube, \tilde \tube'\}$, \begin{itemize} \item $\dotprod{\b{n}(\tilde \tube, \tilde \tube')}{\b{x}} = |\alpha(\tilde \tube, \tilde \tube') \ssm \alpha(\tube, \tube')|$, \item $\dotprod{\b{n}(\tilde \tube, \tilde \tube')}{\b{y}} = |\alpha(\tilde \tube, \tilde \tube') \cap \alpha(\tube, \tube')|$, \item $\dotprod{\b{n}(\tilde \tube, \tilde \tube')}{\b{z}} \ge -1$ since~$\b{z}_{\tilde \tube} = -1$ or~$\b{z}_{\tilde \tube'} = -1$ implies~$\b{z}_{\tilde \tube \cup \tilde \tube'} = -1$, \item $\dotprod{\b{n}(\tilde \tube, \tilde \tube')}{\b{z}} \ge 0$ when $\{\tube, \tube'\} \ne \{\tilde \tube, \tilde \tube'\}$ but $\alpha(\tilde \tube, \tilde \tube') \subseteq \alpha(\tube,\tube')$. Indeed $\alpha(\tilde \tube, \tilde \tube') \subseteq \alpha(\tube,\tube')$ implies~$\tilde \tube \cup \tilde \tube' \subseteq \tube \cup \tube'$. If~$\tube \subseteq \tilde \tube$, then~$\tube \subseteq \tilde \tube \subsetneq \tilde \tube \cup \tilde \tube' \subseteq \tube \cup \tube'$, which implies that~${\tube = \tilde \tube}$ by maximality of~$\tube$ in~$\tube \cup \tube'$. Similarly, $\tube' \subseteq \tilde \tube$ implies $\tube' = \tilde \tube$. Hence, if~$\b{z}_{\tilde \tube} = -1$, then by definition~$\tube \subseteq \tilde \tube$ or~$\tube' \subseteq \tilde \tube$, which implies that~$\tilde \tube \in \{\tube, \tube'\}$. Similarly~$\b{z}_{\tilde \tube'} = -1$ implies~${\tilde \tube' \in \{\tube, \tube'\}}$. Hence, $\b{z}_{\tilde \tube} = -1 = \b{z}_{\tilde \tube'}$ implies~$\tilde \tube = \tilde \tube'$ (impossible since~$\tilde \tube$ and~$\tilde \tube'$ are exchangeable) or~$\{\tube, \tube'\} = \{\tilde \tube, \tilde \tube'\}$ (contradicting our assumption). Therefore, at most one of~$\b{z}_{\tilde \tube}$ and~$\b{z}_{\tilde \tube'}$ equals to~$-1$, and if exactly one does, then~$\b{z}_{\tilde \tube \cup \tilde \tube'} = -1$. We conclude that~$\dotprod{\b{n}(\tilde \tube, \tilde \tube')}{\b{z}} \ge 0$. \qedhere \end{itemize} \end{proof} The following statement reformulates \cref{thm:extremalExchangeablePairsGraphicalNestedFan}. \begin{corollary} \label{coro:extremalExchangeablePairsGraphicalNestedFan} The extremal exchangeable pairs for the nested fan of~$\graphG$ are precisely the pairs of tubes~${\tube[s] \ssm \{v'\}}$ and~${\tube[s] \ssm \{v\}}$ for any tube~$\tube[s] \in \tubes$ and distinct non-disconnecting vertices~$v,v'$~of~$\tube[s]$. \end{corollary} We derive from \cref{thm:extremalExchangeablePairsGraphicalNestedFan,coro:extremalExchangeablePairsGraphicalNestedFan} the irredundant facet description of the type cone~$\typeCone(\nestedFan[\graphG])$. \begin{corollary} \label{coro:facetDescriptionTypeConeGraphicalNestedFan} For any graph~$\graphG$, the type cone of the nested fan~$\nestedFan[\graphG]$ is given by the following irredundant facet description \[ \typeCone(\nestedFan[\graphG]) = \set{\b{h} \in \R^{\tubes}}{\begin{array}{l} \b{h}_{K} = 0 \text{ for any connected component } K \in \connectedComponents(\graphG) \text{, and}\\ \b{h}_{\tube[s] \ssm \{v'\}} + \b{h}_{\tube[s] \ssm \{v\}} > \b{h}_{\tube[s]} + \b{h}_{\tube[s] \ssm \{v, v'\}} \text{ for any tube } \tube[s] \in \tubes \\ \text{and distinct non-disconnecting vertices } v, v' \in \tube[s] \end{array}}. \]\end{corollary} \begin{example} For instance, \begin{enumerate}[(i)] \item for the complete graph~$\graphG[K]_n$, all the inequalities~$\b{h}_{U \ssm \{v\}} + \b{h}_{U \ssm \{v'\}} > \b{h}_{U} + \b{h}_{U \ssm \{v,v'\}}$ for~${v,v' \in \ground}$ and~$\{v,v'\} \subseteq U \subseteq \ground$ are facet defining inequalities of~$\typeCone(\nestedFan[{\graphG[K]_n}])$. \item for the path~$\graphG[P]_n$, only the inequalities $\b{h}_{[i,j-1]} + \b{h}_{[i+1,j]} > \b{h}_{[i,j]} + \b{h}_{[i+1,j-1]}$ for~$1 \le i < j \le n$ are facet defining inequalities of~$\typeCone(\nestedFan[{\graphG[P]_n}])$ (where~$\b{h}_\varnothing = 0$ by convention). \end{enumerate} \end{example} We derive from \cref{coro:extremalExchangeablePairsGraphicalNestedFan} the number of facets of the type cone~$\typeCone(\nestedFan[\graphG])$. For a tube~$\tube$ of~$\graphG$, we denote by~$\nonDisconnecting(\tube)$ the number of non-disconnecting vertices of~$\tube$. In other words, $\nonDisconnecting(\tube)$ is the number of tubes covered by~$\tube$ in the inclusion poset of all tubes of~$\graphG$. \begin{corollary} \label{coro:numberFacetsTypeConeGraphicalNestedFan} The type cone~$\typeCone(\nestedFan[\graphG])$ has~$\sum\limits_{\tube[s] \in \tubes} \binom{\nonDisconnecting(\tube[s])}{2}$ facets. \end{corollary} The formula of \cref{coro:numberFacetsTypeConeGraphicalNestedFan} can be made more explicit for specific families of graph associahedra discussed in the introduction and illustrated in \cref{fig:specialGraphAssociahedra}. \begin{proposition} The number of facets of the type cone~$\typeCone(\nestedFan[\graphG])$ is: \begin{itemize} \item $2^{n-2}\binom{n}{2}$ for the permutahedron (complete graph associahedron), \item $\binom{n}{2}$ for the associahedron (path associahedron), \item $3\binom{n}{2} - n$ for the cyclohedron (cycle associahedron), \item $n-1+2^{n-3}\binom{n-1}{2}$ for the stellohedron (star associahedron). \end{itemize} \end{proposition} \begin{proof} For the permutahedron, choose any two vertices~$v,v'$, and complete them into a tube by selecting any subset of the~$n-2$ remaining vertices. For the associahedron, choose any two vertices~$v,v'$, and complete them into a tube by taking the path between them. For the cyclohedron, choose the two vertices~$v,v'$, and complete them into a tube by taking either all the cycle, or one of the two paths between~$v$ and~$v'$ (this gives three options in general, but only two when~$v,v'$ are neighbors). For the stellohedron, choose either~$v$ as the center of the star and~$v'$ as one of the $n-1$ leaves, or $v$~and~$v'$ as leaves of the star and complete them into a tube by taking the center and any subset of the $n-3$ remaining leaves. \end{proof} To conclude on graphical nested fans, we characterize the graphs~$\graphG$ whose nested fan has a simplicial type cone. \begin{proposition} \label{prop:simplicialTypeConeGraphicalNestedFan} The type cone~$\typeCone(\nestedFan[\graphG])$ is simplicial if and only if~$\graphG$ is a disjoint union~of~paths. \end{proposition} \begin{proof} Observe first that the graphical nested fan~$\nestedFan[\graphG]$ has~$N = |\tubes| - |\connectedComponents(\graphG)|$ rays and dimension~$n = |\ground|-|\connectedComponents(\graphG)|$. Moreover, any tube~$\tube$ with~$|\tube| \ge 2$ has two non-disconnecting vertices when it is a path, and at least three non-disconnecting vertices otherwise (the leaves of an arbitrary spanning tree of~$\tube$, or any vertex if it is a cycle). Therefore, each tube of~$\tubes$ which is not a singleton contributes to at least one extremal exchangeable pair. We conclude that the number of extremal exchangeable pairs is at least \[ |\tubes| - |\ground| = (|\tubes| - |\connectedComponents(\graphG)|) - (|\ground|-|\connectedComponents(\graphG)|) = N - n, \] with equality if and only if all tubes of~$\graphG$ are paths, \ie if and only if~$\graphG$ is a collection of paths. Hence, $\typeCone(\nestedFan[\graphG])$ is simplicial if and only if~$\graphG$ is a disjoint union of paths. \end{proof} As already observed in~\cite{PadrolPaluPilaudPlamondon}, combining \cref{prop:simplicialTypeCone,prop:simplicialTypeConeGraphicalNestedFan} unables to recover all kinematic associahedra of~\cite[Sect.~3.2]{ArkaniHamedBaiHeYan}. \begin{proposition} \label{prop:kinematicAssociahedra} For any~$\b{p} \in \R^{\binom{[n]}{2}}$, the polytope defined by \[ R_\b{p}(n) \eqdef \bigset{\b{z} \in \R^{\set{[i,j]}{1 \le i \le j \le n}}}{\b{z}_{[i,j-1]} + \b{z}_{[i+1,j]} - \b{z}_{[i,j]} + \b{z}_{[i+1,j-1]} = \b{p}_{[i,j]} \text{ for } 1 \le i < j \le n} \] is an associahedron whose normal fan is~$\nestedFan[{\graphG[P]_n}]$. Moreover, the polytopes~$R_\b{p}(n)$ for~${\b{p} \in \R_{>0}^{\building^\star}}$ describe all polytopal realizations of~$\nestedFan[{\graphG[P]_n}]$ (up to translations). \end{proposition} \section{Type cones of arbitrary nested fans} \label{sec:typeConeNestedFan} In this section, we describe the type cones of arbitrary nested fans. We follow the same scheme as in \cref{sec:typeConeGraphicalNestedFan}, even if the general situation is significantly more intricate (\cref{rem:differencesGraphicalExchangeables,rem:differencesGraphicalExchangeRelation} highlight some of the complications of the general case). \subsection{Nested complex and nested fan} \label{subsec:nestedComplexNestedFan} We first recall the definitions of arbitrary building sets, nested complexes, nested fans and nestohedra, following~\cite{Postnikov, FeichtnerSturmfels, Zelevinsky, Pilaud-removahedra}. \para{Building sets} A \defn{building set}~$\building$ on a ground set~$\ground$ is a set of non-empty subsets of~$\ground$ such that \begin{itemize} \item if~$B,B' \in \building$ and~$B \cap B' \ne \varnothing$, then~$B \cup B' \in \building$, and \item $\building$ contains all singletons~$\{v\}$ for~$v \in \ground$. \end{itemize} We denote by~$\connectedComponents(\building)$ the set of \defn{connected components} of~$\building$, defined as the (inclusion) maximal elements of~$\building$. We denote by~$\elementary(\building)$ the set of \defn{elementary blocks} of~$\building$, defined as the blocks~$B \in \building$ such that~$|B| > 1$, and $B = B' \cup B''$ implies~$B' \cap B'' = \varnothing$ for any~$B', B'' \in \building \ssm \{B\}$. For instance, consider the building set~$\building_\circ$ on~$[9]$ defined by \[ \building_\circ \eqdef \{1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 25, 123, 456, 789, 1234, 1235, 1456, 2456, 12345, 12456, 123456\} \] (since all labels have a single digit, we can abuse notation and write $123$ for $\{1,2,3\}$). Its connected components are $\connectedComponents(\building_\circ) = \{123456, 789\}$, and its elementary blocks are $\elementary(\building_\circ) = \{14, 25, 123, 456, 789\}$, which are represented in \cref{fig:exmNested}. \begin{remark} \label{rem:elementary} If~$B \in \building$ is elementary, then the maximal blocks of~$\building$ strictly contained in~$B$ are disjoint. Conversely, if there exist two disjoint maximal blocks~$M, N \in \building$ strictly contained in~$B \in \building$, then~$B$ is elementary. Otherwise, there would be~$B', B'' \in \building \ssm \{B\}$ such that $B = B' \cup B''$ and $B' \cap B'' \ne \varnothing$. By maximality, $M$ and~$N$ are not strict subsets of~$B'$ and~$B''$, hence $M$ and~$N$ intersect both~$B'$ and~$B''$. Since~$M \cap B' \ne \varnothing$, we have~$M \cup B' \in \building$. As $M \subseteq M \cup B' \subseteq B$, we obtain again by maximality of~$M$ that~$M = M \cup B'$ or $M \cup B' = B$. In the former case, we have~$\varnothing \ne B' \cap N \subseteq M \cap N$ contradicting our assumption on~$M$ and~$N$. In the latter case, we have~$N \subseteq B' \ssm M$ contradicting the maximality of~$N$. \end{remark} \begin{example} \label{exm:graphicalBuildingSet} For a graph~$\graphG$ with vertex set~$\ground$, the set~$\tubes$ of all tubes of~$\graphG$ is a \defn{graphical building set}. The blocks of~$\connectedComponents(\tubes)$ are the vertex sets of the connected components~$\connectedComponents(\graphG)$ of~$\graphG$, and the blocks of~$\elementary(\tubes)$ are the edges of~$\graphG$. \end{example} \begin{remark} \label{rem:hypergraphs} Note that not all building sets are graphical building sets. It was in fact proved in~\cite[Prop.~7.3]{Zelevinsky} that a building set is graphical if and only if for any~$B \in \building$ and~$\c{C} \subset \building$, if~$B \cup \bigcup \c{C} \in \building$, then there is~$C \in \c{C}$ such that~$B \cup C \in \building$. However, arbitrary building sets can be interpreted using hypergraphs~\cite{Berge} instead of graphs. More precisely, a hypergraph~$\hypergraph$ on~$\ground$ defines a building set~$\building\hypergraph$ on~$\ground$ given by all non-empty subsets of~$\ground$ which induce connected subhypergraphs of~$\hypergraph$ (a path in~$\hypergraph$ is a sequence of vertices where any two consecutive ones belong to a common hyperedge of~$\hypergraph$). Conversely, a building set~$\building$ on~$\ground$ is the building set of various hypergraphs on~$\ground$, all containing the hypergraph with hyperedge set~$\elementary(\building)$. See \cite{DosenPetric} for details. \end{remark} \para{Nested complex} Given a building set~$\building$, a \defn{$\building$-nested set}~$\nested$ is a subset of~$\building$ such that \begin{itemize} \item for any~$B,B' \in \nested$, either~$B \subseteq B'$ or~$B' \subseteq B$ or~$B \cap B' = \varnothing$, \item for any~$k \ge 2$ pairwise disjoint~$B_1,\dots,B_k \in \nested$, the union~$B_1 \cup \dots \cup B_k$ is not in~$\building$, and \item $\nested$ contains~$\connectedComponents(\building)$. \end{itemize} These are the original conditions that appeared for instance in~\cite{Postnikov}. In this paper, we prefer to use the following convenient reformulation, similar to that of~\cite{Zelevinsky}: $\nested \subseteq \building$ is a $\building$-nested set if and only if~$\connectedComponents(\building) \subseteq \nested$ and the union~$\bigcup \nested[X]$ of any subset~$\nested[X] \subseteq \nested$ does not belong to~$\building \ssm \nested[X]$. It is known that all inclusion maximal nested sets have~$|V|$ blocks. The \defn{$\building$-nested complex} is the simplicial complex~$\nestedComplex(\building)$ whose faces are $\nested \ssm \connectedComponents(\building)$ for all $\building$-nested sets~$\nested$. It is a simplicial sphere of dimension~$|\ground| - |\connectedComponents(\building)|$. Note that it is convenient to include~$\connectedComponents(\building)$ in all $\building$-nested sets as in~\cite{Postnikov} for certain combinatorial manipulations, but to remove $\connectedComponents(\building)$ from all $\building$-nested sets as in~\cite{Zelevinsky} when defining the $\building$-nested complex. If~$\nested \ssm \{B\} = \nested' \ssm \{B'\}$ for two maximal $\building$-nested sets~$\nested$ and~$\nested'$ and two building blocks~$B$ and~$B'$, we say that~$\nested$ and $\nested'$ are \defn{adjacent} and that~$B$ and~$B'$ are~\defn{exchangeable}. For instance, \cref{fig:exmNested}\,(middle) represents the two adjacent maximal $\building_\circ$-nested sets \[ \nested_\circ \eqdef \{3, 4, 5, 7, 8, 14, 789, 12345, 123456\} \quad\text{and}\quad \nested'_\circ \eqdef \{3, 4, 5, 7, 8, 25, 789, 12345, 123456\}. \] \begin{figure} \capstart \centerline{\includegraphics[scale=.9]{exmNested}} \caption{The elementary blocks of a building set~$\building_\circ$ (left), two adjacent maximal $\building_\circ$-nested sets (middle), and the corresponding frame (right).} \label{fig:exmNested} \end{figure} \begin{example} For a graph~$\graphG$, a set of tubes of~$\building\graphG$ is nested if and only if its tubes are pairwise compatible in the sense of \cref{subsec:graphicalNestedComplexGraphicalNestedFan} (either nested or non-adjacent). The $\building\graphG$-nested complex is thus the nested complex of~$\graphG$ introduced in \cref{subsec:graphicalNestedComplexGraphicalNestedFan}. Note that, in contrast to the graphical nested complexes, not all nested complexes are flag (\ie clique complexes of their graphs). \end{example} For a $\building$-nested set~$\nested$ and~$B \in \nested$, we call \defn{root} of~$B$ in~$\nested$ the set~$\rootset{B}{\nested} \eqdef B \ssm \bigcup_{C} C$ where the union runs over~$C \in \nested$ such that~$C \subsetneq B$. The $\building$-nested set~$\nested$ is maximal if and only if all~$\rootset{B}{\nested}$ are singletons for~$B \in \nested$. In that case, we abuse notation writing~$\rootset{B}{\nested}$ for the only element of this singleton. For instance, in the maximal $\building_\circ$-nested sets~$\nested_\circ$ and~$\nested'_\circ$ represented in \cref{fig:exmNested}\,(middle), we have $\rootset{14}{\nested_\circ} = 1 = \rootset{12345}{\nested'_\circ}$ and $\rootset{12345}{\nested_\circ} = 2 = \rootset{25}{\nested'_\circ}$. \para{Nested fan and nestohedron} We still denote by~$(\b{e}_v)_{v \in \ground}$ the canonical basis of~$\R^\ground$. We consider the subspace~${\HH \eqdef \bigset{\b{x} \in \R^\ground}{\sum_{v \in B} x_v = 0 \text{ for all } B \in \connectedComponents(\building)}}$ and let~$\pi : \R^\ground \to \HH$ denote the orthogonal projection onto~$\HH$. The \defn{$\b{g}$-vector} of a building bloc~$B$ of~$\building$ is the projection~$\gvector{B} \eqdef \pi \big( \sum_{v \in B} \b{e}_v \big)$ of the characteristic vector of~$B$. We set~$\gvectors{\nested} \eqdef \set{\gvector{B}}{B \in \nested}$ for a $\building$-nested set~$\nested$. Note that by definition, $\gvector{K} = \b{0}$ for all connected components~$K \in \connectedComponents(\building)$. The vectors~$\gvector{B}$ with~$B \in \building$ support a complete simplicial fan realization of the nested complex. See~\cref{fig:nestedFans}. \begin{theorem}[\cite{Postnikov, FeichtnerSturmfels, Zelevinsky}] \label{thm:nestedFan} For any building set~$\building$, the set of cones \[ \nestedFan[\building] \eqdef \set{\R_{\ge 0} \, \gvectors{\nested}}{\nested \text{ nested set of } \building} \] is a complete simplicial fan of~$\HH$, called the \defn{nested fan} of~$\building$, which realizes the nested complex~$\nestedComplex(\building)$. \end{theorem} \begin{figure}[h] \capstart \centerline{\includegraphics[scale=.55]{nestedFans}} \caption{Two nested fans. As the fans are $3$-dimensional, we intersect them with the sphere and stereographically project them from the direction~$(-1,-1,-1)$.} \label{fig:nestedFans} \end{figure} Again, the $\building$-nested fan is always the normal fan of a polytope, as shown in~\cite{Postnikov, FeichtnerSturmfels, Zelevinsky}. We still denote by ~$\triangle_U \eqdef \conv\set{\b{e}_u}{u \in U}$ the face of the standard simplex~$\triangle_\ground$ corresponding to a subset~$U$ of~$\ground$. \begin{theorem}[\cite{Postnikov, FeichtnerSturmfels, Zelevinsky}] For any building set~$\building$, the nested fan~$\nestedFan[\building]$ is the normal fan of the nestohedron~$\Nest$. It can be constructed as \begin{enumerate}[(i)] \item the intersection of~$\HH$ with the hyperplanes~$\dotprod{\gvector{B}}{\b{x}} \le -3^{|B|}$ for all~$B \in \building$~\mbox{\cite{Devadoss, Pilaud-removahedra},} \item the Minkowski sum~$\sum_{B \in \building} \triangle_B$ of the faces of the standard simplex given by all blocks of~$\building$~\cite{Postnikov}. \end{enumerate} \end{theorem} \para{Restrictions and contractions} Following~\cite{Zelevinsky}, we describe a structural decomposition of links in nested complexes. For any~$U \subseteq \ground$, define \begin{itemize} \item the \defn{restriction} of~$\building$ to~$U$ as the building set~$\building_{|U} \eqdef \set{B \in \building}{B \subseteq U}$, \item the \defn{contraction} of~$U$ in~$\building$ as the building set~$\building_{/U} \eqdef \set{C \subseteq \ground \ssm U}{C \in \building \text{ or } C \cup U \in \building}$. \end{itemize} \begin{proposition}[{\cite[Prop.~3.2]{Zelevinsky}}] \label{prop:links} For $U \in \building \ssm \connectedComponents(\building)$, the link~$\set{C \subseteq \building \ssm \{U\}}{C \cup \{U\} \in \nestedComplex(\building)}$ is isomorphic to the Cartesian product~$\nestedComplex(\building_{|U}) \times \nestedComplex(\building_{/U})$. \end{proposition} In particular, two building blocks $B$ and~$B'$ in~$U$ (resp.~in~$\ground \ssm U$) are exchangeable in~$\nestedComplex(\building)$ if and only if they are exchangeable in~$\nestedComplex(\building_{|U})$ (resp.~in~$\nestedComplex(\building_{/U})$). Slightly abusing notation when~$\building$ is clear from the context, we define the \defn{connected components} of~$U$ as~$\connectedComponents(U) \eqdef \connectedComponents(\building_{|U})$. For instance, for the building set~$\building_\circ$ whose elementary blocks are represented in \cref{fig:exmNested}\,(left) and $U = \{1, 2, 4, 5, 7, 8\}$, we have~${\building_\circ}_{|U} = \{1, 2, 4, 5, 7, 8, 14, 25\}$ so that~$\connectedComponents(U) = \{14, 25, 7, 8\}$. Note that the definition of building sets implies that \begin{itemize} \item for any~$U \subseteq \ground$, the connected components $\connectedComponents(U)$ define a partition of~$U$, \item for any~$U, U' \subseteq \ground$ such that~$U \cap U' = \varnothing$ and there is no~$B \in \building$ with~$B \subseteq U \sqcup U'$ and~$U \cap B \ne \varnothing \ne U' \cap B$, we have~$\connectedComponents(U \sqcup U') = \connectedComponents(U) \sqcup \connectedComponents(U')$. \end{itemize} \subsection{Exchangeable building blocks and exchange frames} \label{subsec:exchangeableBuildingBlocks} We now provide an analogue of \cref{prop:exchangeablePairsGraphicalNestedFan} characterizing the exchangeable blocks for arbitrary building sets. The situation is however much more technical, as highlighted in \cref{rem:differencesGraphicalExchangeables,rem:differencesGraphicalExchangeRelation}. We start with two useful lemmas. \begin{lemma} \label{lem:minimalElementContainingBlock} For any $\building$-nested set~$\nested$ and any block~$B \in \building \ssm \connectedComponents(\building)$, the set~$\bigset{C \in \nested}{B \subsetneq C}$ admits a unique (inclusion) minimal element~$M$. Moreover, if $B \notin \nested$, then~$M$ is also the unique (inclusion) maximal element of~$\bigset{C \in \nested}{\rootset{C}{\nested} \cap B \ne \varnothing}$. \end{lemma} \begin{proof} Let~$\nested[X] \eqdef \bigset{C \in \nested}{B \subsetneq C}$ and~$\nested[Y] \eqdef \bigset{C \in \nested}{\rootset{C}{\nested} \cap B \ne \varnothing}$. Note first that neither~$\nested[X]$ not~$\nested[Y]$ are empty since $\varnothing \ne B \notin \connectedComponents(\building)$. Since all elements of~$\nested[X]$ contain~$B$ and~$\nested$ is a \mbox{$\building$-nested} set, $\nested[X]$ forms a chain by inclusion, and thus admits unique inclusion minimal element~$M$. Moreover, any building block in~$\nested[Y]$ intersects~$B$ so that~$\bigcup \nested[Y] = B \cup \bigcup \nested[Y]$ is in~$\building$. Hence, $\nested[Y]$ admits a unique maximal element~$M' \eqdef \bigcup \nested[Y]$. By definition, $B \subseteq M'$. If~$B \notin \nested$, then~$B \ne M'$ since~$M' \in \nested[Y] \subseteq \nested$. Hence, $M' \in \nested[X]$. Moreover, for any~$C \in \nested$ such that~$C \subsetneq M'$, we have~$C \cap \rootset{M'}{\nested} = \varnothing$ so that~$B \not\subseteq C$ and~$C \notin \nested[X]$. We conclude that~$M' = M$. \end{proof} \begin{lemma} \label{lem:upperBlocksExchange} If~$\nested$ and~$\nested'$ are two adjacent maximal $\building$-nested sets with~$\nested \ssm \{B\} = \nested \ssm \{B'\}$, then $\set{C \in \nested}{B \subsetneq C} = \set{C' \in \nested'}{B' \subsetneq C'}$. \end{lemma} \begin{proof} Assume for instance that there is~$C \in \nested \cap \nested'$ such that~$B \subsetneq C$ but~$B' \not\subseteq C$. We then claim that~$\nested \cup \nested'$ would be a $\building$-nested set, contradicting the maximality of~$\nested$ and~$\nested'$. Consider a subset~$\nested[X]$ of~$\nested \cup \nested'$ whose union~$\bigcup \nested[X]$ is in~$\building$. If~$B \notin \nested[X]$, then~$\nested[X] \subseteq \nested'$, hence $\bigcup \nested[X]$ is in~$\nested[X]$ as~$\nested'$ is a $\building$-nested set. Similarly, if~$B' \notin \nested[X]$, then~$\bigcup \nested[X]$ is in~$\nested[X]$. Assume now that both~$B$ and~$B'$ belong to~$\nested[X]$. Define~$\nested[Y] \eqdef \{C\} \cup \nested[X] \ssm \{B\}$. Note that $\nested[Y] \subseteq \nested'$ since~$B \notin \nested[Y]$. Moreover, $\bigcup \nested[Y] = C \cup \bigcup \nested[X]$ belongs to~$\building$ since~$C$ and~$\bigcup \nested[X]$ both belong to~$\building$ and intersect~$B$. Hence, $\bigcup \nested[Y]$ is in~$\nested[Y]$ since~$\nested'$ is a $\building$-nested set. Note that~$\bigcup \nested[Y] \ne C$ since~$B' \not\subseteq C$ and~$B' \in \nested[Y]$. Therefore~$\bigcup \nested[Y]$ is in~$\nested[X]$, and thus~$\bigcup \nested[X] = \bigcup \nested[Y]$ is in~$\nested[X]$. \end{proof} For two adjacent maximal $\building$-nested sets~$\nested$ and~$\nested'$ with~$\nested \ssm \{B\} = \nested \ssm \{B'\}$, we say that \begin{itemize} \item the unique minimal element~$P$ of $\bigset{C \in \nested}{B \subsetneq C} = \bigset{C' \in \nested'}{B' \subsetneq C'}$ is the \defn{parent}, \item the vertices~$v \eqdef \rootset{P}{\nested'}$ and~$v' \eqdef \rootset{P}{\nested}$ are the \defn{pivots}, and \item the triple $(B, B', P)$ is the \defn{frame} \end{itemize} of the exchange between~$\nested$ and~$\nested'$. Note that the parent is well-defined by \cref{lem:minimalElementContainingBlock,lem:upperBlocksExchange}. We call an \defn{exchange frame} a triple~$(B, B', P)$ which is the frame of an exchange between two adjacent maximal $\building$-nested sets. For instance, for the two adjacent maximal $\building_\circ$-nested sets~$\nested_\circ$ and~$\nested'_\circ$ represented in \cref{fig:exmNested}\,(middle), we have~$B = 14$, $B' = 25$, $P = 12345$, $v = 1$ and $v' = 2$. The corresponding exchange frame is illustrated in \cref{fig:exmNested}\,(right). We are now ready to characterize the pairs of exchangeable building blocks for arbitrary building sets. For three blocks~$B, C, P \in \building$, we abbreviate the conditions~$B \cap C \ne \varnothing$ and $C \subseteq P$ but~$C \not\subseteq B$ into the short notation~$\leaving{B}{C}{P}$. The following statement generalizes \cref{prop:exchangeablePairsGraphicalNestedFan}\,(i). \begin{proposition} \label{prop:exchangeablePairsNestedFan} Two blocks~$B, B' \in \building$ are exchangeable in~$\nestedFan[\building]$ if and only if there exist a block~$P \in \building$, and some vertices~$v \in B \ssm B'$ and~$v' \in B' \ssm B$ such that \begin{itemize} \item $B \subsetneq P$ and~$B' \subsetneq P$, and \item $v' \in C$ for any~$\leaving{B}{C}{P}$ while $v \in C'$ for any~$\leaving{B'}{C'}{P}$. \end{itemize} \end{proposition} \begin{proof} Assume first that~$B$ and~$B'$ are exchangeable. Let~$\nested$ and~$\nested'$ be two adjacent maximal $\building$-nested sets such that~$\nested \ssm \{B\} = \nested \ssm \{B'\}$. Let~$P$ be the parent and $v,v'$ be the pivots of this exchange. Note that~$v \in B$ (by \cref{lem:minimalElementContainingBlock}) but $v \notin B'$ (by definition, since~$B' \in \nested'$ and~$B' \subsetneq P$). Similarly, $v' \in B' \ssm B$. Consider now a building block~$C$ such that~$\leaving{B}{C}{P}$. By definition, $B \subsetneq B \cup C \subseteq P$ and~$B \cup C \in \building$. If~$B \cup C = P$, then~$v' = \rootset{P}{\nested}$ belongs to~$B \cup C$ and thus to~$C$. If~$B \cup C \ne P$, then~$P$ is the inclusion minimal element of~$\set{D \in \nested}{B \cup C \subsetneq D}$. Since~$B \cup C \notin \nested$ by minimality of~$P$ in~$\set{D \in \nested}{B \subsetneq D}$, we obtain by \cref{lem:minimalElementContainingBlock} that~$v' = \rootset{P}{\nested}$ belongs to~$B \cup C$ and thus to~$C$. Similarly, $v \in C'$ for any~$\leaving{B'}{C'}{P}$. Conversely, consider~$B, B' \in \building$ so that there is~$P \in \building$, $v \in B \ssm B'$ and~${v' \in B' \ssm B}$ satisfying the conditions of \cref{prop:exchangeablePairsNestedFan}. Let~$U \eqdef P \ssm \{v,v'\}$, and~$\nested[M]$ denote an arbitrary maximal $\building_{|U}$-nested set. Let~$\nested \eqdef \nested[M] \cup \{B\}$ and~$\nested' \eqdef \nested[M] \cup \{B'\}$. Consider a subset~$\nested[X]$ of~$\nested$ whose union~$\bigcup \nested[X]$ is in~$\building$. If~$B \notin \nested[X]$, then~$\nested[X] \subseteq \nested[M]$, hence~$\bigcup \nested[X]$ is in~$\nested[X]$ since~$\nested[M]$ is a $\building_{|U}$-nested set. If~$B \in \nested[X]$, since $B \cap \bigcup \nested[X] \ne \varnothing$ and~$\bigcup \nested[X] \subseteq P$ but~${v' \notin \bigcup \nested[X]}$, the conditions of \cref{prop:exchangeablePairsNestedFan} ensure that~$\bigcup \nested[X] \subseteq B$, so that~$\bigcup \nested[X] = B$ is in~$\nested[X]$. Hence, $\nested$ is a $\building_{|P}$-nested set. It is moreover maximal since~${|\nested| = |\nested[M] \cup \{B, P\}| = |\nested[M]| + 2 = |U| + 2 = |P|}$. By symmetry, $\nested'$ is a maximal $\building_{|P}$-nested set. Since~$\nested \ssm \{B\} = \nested' \ssm \{B'\}$, we obtain that~$B$ and~$B'$ are exchangeable in~$\nestedComplex(\building_{|P})$, hence in~$\nestedComplex(\building)$ by \cref{prop:links}. The parent of this exchange is~$P$ and the pivots are $v$ and~$v'$. \end{proof} \begin{remark} \label{rem:differencesGraphicalExchangeables} For the graphical nested fans, \cref{prop:exchangeablePairsGraphicalNestedFan}\,(i) ensures that if~$B$ and~$B'$ are exchangeable, then $B \cup B'$ is always a block and is the only possible parent (note however that $B$ and $B'$ are not necessarily exchangeable when~$B \cup B'$ is a block). In contrast to the graphical case, for a general building set, \begin{itemize} \item the same exchangeable blocks may admit several possible parents and pivots, \item the set of parents does not necessarily admit a unique (inclusion) minimal element, \item $B \cup B'$ is not always a block when~$B$ and~$B'$ are exchangeable. In other words, $B$ and~$B'$ can be exchangeable even if~$\{B,B'\} \cup \connectedComponents(\building)$ is a $\building$-nested set. \end{itemize} For instance, in the building set~$\building_\circ$ of \cref{fig:exmNested}\,(left), the blocks $B = 14$ and $B' = 25$ are simultaneously compatible and exchangeable. They are exchangeable with parent~$12345$ and pivots~$(1,2)$ or with parent~$12456$ and pivots~$(4,5)$. \end{remark} \begin{remark} Observe also that it follows from the definitions that \begin{itemize} \item it suffices to check the condition of \cref{prop:exchangeablePairsNestedFan} for~$C$ and~$C'$ elementary blocks of~$\building$, \item if~$B$ and~$B'$ are exchangeable, then~$B \not\subseteq B'$ and~$B' \not\subseteq B$, \item if $(B, B', P)$ is an exchange frame and ${B \cup B' \subseteq P' \subseteq P}$, then $(B, B', P')$ is also an exchange frame (using the same pivots), \item if~$B$ and~$B'$ are exchangeable and~$B \cup B'$ is a block (in particular if~$B \cap B' \ne \varnothing$), then~$(B, B', B \cup B')$ is an exchange frame. \end{itemize} \end{remark} We now apply \cref{prop:exchangeablePairsNestedFan} to identify some exchange frames that will play an important role in the description of the type cone of the $\building$-nested fan. \begin{proposition} \label{prop:maximalExchanges} If~$B, B', P \in \building$ are such that~$B$ and~$B'$ are two distinct blocks of~$\building$ strictly contained in~$P$ and inclusion maximal inside~$P$, then~$(B, B', P)$ is an exchange frame. \end{proposition} \begin{proof} Consider~$C \in \building$ such that~$\leaving{B}{C}{P}$. Since~$B \cap C \ne \varnothing$, we have~$B \cup C \in \building$. Since~$C \subseteq P$ and~$C \not\subseteq B$, we have~$B \subsetneq B \cup C \subseteq P$. By maximality of~$B$ in~$P$, we obtain that~$B \cup C = P$. Hence, $\leaving{B}{C}{P}$ implies~$B' \ssm B \subseteq C$ and similarly~$\leaving{B'}{C'}{P}$ implies~$B \ssm B' \subseteq C'$. Therefore, choosing any~$v \in B \ssm B'$ and~$v' \in B' \ssm B$, we obtain that $B, B', P, v, v'$ satisfy the conditions of \cref{prop:exchangeablePairsNestedFan}, and thus~$(B, B', P)$ is an exchange frame. \end{proof} We call \defn{maximal exchange frames} the exchange frames defined by \cref{prop:maximalExchanges}. For~$P \in \building$, we will denote by~$\maximalBlocks(P)$ the maximal blocks of~$\building$ strictly contained in~$P$. \subsection{$\b{g}$-vector dependences} \label{subsec:gvectorDependences} We now describe the exchange relations in the $\building$-nested fan~$\nestedFan[\building]$. We first need to observe that certain building blocks are forced to belong to any two adjacent maximal nested sets with a given frame, generalizing \cref{prop:exchangeablePairsGraphicalNestedFan}\,(ii). \begin{proposition} \label{prop:forcedBlocks} For two adjacent maximal $\building$-nested sets~$\nested$ and~$\nested'$ with~$\nested \ssm \{B\} = \nested' \ssm \{B'\}$ and parent~$P$, all connected components of~$\connectedComponents(B \cap B')$ and of~$\connectedComponents \big(P \ssm (B \cup B'))$ belong to~$\nested \cap \nested'$. \end{proposition} \begin{proof} Even if we discuss separately the elements of $\connectedComponents(B \cap B')$ from that of~$\connectedComponents(P \ssm (B \cup B'))$, the reader will see a lot of similarities in the arguments below. We first consider~$K \in \connectedComponents(B \cap B')$ and prove that~$\nested \cup \{K\}$ is a $\building$-nested set, which proves that~$K \in \nested$ by maximality of~$\nested$. Indeed, let us consider a subset~$\nested[X]$ of~$\nested \cup \{K\}$ whose union~$\bigcup \nested[X]$ is in~$\building$, and prove that~$\bigcup \nested[X]$ is in~$\nested[X]$. We assume that~$K \in \nested[X]$, since otherwise~$\nested[X] \subseteq \nested$ so that~$\bigcup \nested[X]$ is in~$\nested[X]$ as~$\nested$ is a $\building$-nested set. Assume now that~$B \in \nested[X]$ and define~$\nested[Y] \eqdef \nested[X] \ssm \{K\}$. Since~$K \subseteq B \in \nested[X]$, we have~$\bigcup \nested[Y] = \bigcup \nested[X]$ in~$\building$, thus in~$\nested[Y] \subset \nested[X]$ since~$\nested[Y] \subseteq \nested$ and~$\nested$ is a $\building$-nested set. It remains to consider the case when~$\nested[X] \subseteq (\nested \cap \nested') \cup \{K\}$. Assume now that~$\bigcup \nested[X] \not\subseteq B$ and define~$\nested[Y] \eqdef \{B\} \cup \nested[X] \ssm \{K\}$. Since~$K \subseteq B$, we have $\bigcup \nested[Y] = B \cup \bigcup \nested[X]$ which belongs to~$\building$ since~$B$ and~$\bigcup \nested[X]$ both belong to~$\building$ and intersect~$K$. Hence, $\bigcup \nested[Y]$ is in~$\nested[Y]$ since~$\nested[Y] \subseteq \nested$ and~$\nested$ is a $\building$-nested set. Note that~$\bigcup \nested[Y] \ne B$ by our assumption that~$\bigcup \nested[X] \not\subseteq B$. Therefore, $\bigcup \nested[Y]$ is in~$\nested[X]$, and thus~$\bigcup \nested[X] = \bigcup \nested[Y]$ is in~$\nested[X]$. By symmetry, we obtain that~$\bigcup \nested[X]$ is in~$\nested[X]$ if~$\bigcup \nested[X] \not\subseteq B'$. Assume finally that~$\bigcup \nested[X] \subseteq B \cap B'$. Then all the elements of~$\nested[X]$ are in~$B \cap B'$. Since~$K \in \nested[X]$ is a connected component of~$B \cap B'$ and~$\bigcup \nested[X]$ is in~$\building$, this implies that~$\bigcup \nested[X] = K \in \nested[X]$. We now consider~$K \in \connectedComponents(P \ssm (B \cup B'))$ and prove that~$\nested \cup \{K\}$ is a $\building$-nested set, which proves that~$K \in \nested$ by maximality of~$\nested$. Indeed, let us consider a subset~$\nested[X]$ of~$\nested \cup \{K\}$ whose union~$\bigcup \nested[X]$ is in~$\building$, and prove that~$\bigcup \nested[X]$ is in~$\nested[X]$. We assume that~$K \in \nested[X]$, since otherwise~$\nested[X] \subseteq \nested$ so that~$\bigcup \nested[X]$ is in~$\nested[X]$ as~$\nested$ is a $\building$-nested set. Assume now that~$\bigcup \nested[X] \not\subseteq P$ and define~$\nested[Y] \eqdef \{P\} \cup \nested[X] \ssm \{K\}$. Since~$K \subseteq P$, we have $\bigcup \nested[Y] = P \cup \bigcup \nested[X]$ which belongs to~$\building$ since~$P$ and~$\bigcup \nested[X]$ both belong to~$\building$ and intersect~$K$. Hence, $\bigcup \nested[Y]$ is in~$\nested[Y]$ since~$\nested[Y] \subseteq \nested$ and~$\nested$ is a \mbox{$\building$-nested} set. Note that~$\bigcup \nested[Y] \ne P$ by our assumption that~$\bigcup \nested[X] \not\subseteq P$. Therefore, $\bigcup \nested[Y]$ is in~$\nested[X]$, and thus~$\bigcup \nested[X] = \bigcup \nested[Y]$ is in~$\nested[X]$. Assume now that~${\bigcup \nested[X] \subseteq P \ssm (B \cup B')}$. Then all elements of~$\nested[X]$ are in~$P \ssm (B \cap B')$. Since~$K$ is a connected component of~$P \ssm (B \cap B')$ and~$\bigcup \nested[X]$ is in~$\building$, this implies that~${\bigcup \nested[X] = K \in \nested[X]}$. Assume finally that~$\bigcup \nested[X]$ is contained in~$P$ and intersects~$B$ or~$B'$. If~$B' \cap \bigcup \nested[X] \ne \varnothing$, then~${\leaving{B'}{\bigcup \nested[X]}{P}}$, thus~$v \eqdef \rootset{P}{\nested} \in \bigcup \nested[X]$ by \cref{prop:exchangeablePairsNestedFan}. Hence in both cases~$B \cap \bigcup \nested[X] \ne \varnothing$, thus~${\leaving{B}{\bigcup \nested[X]}{P}}$, and thus~$v' \eqdef \rootset{P}{\nested} \in \bigcup \nested[X]$ by \cref{prop:exchangeablePairsNestedFan}. Therefore, there is~$C \in \nested[X] \ssm \{K\} \subseteq \nested$ containing~$v'$. Since~$v' = \rootset{P}{\nested}$, we obtain that~$P \subseteq C$, and hence $P=C$ because $C\subseteq \bigcup \nested[X] \subseteq P$. Thus~$K \subseteq C$ and~$\bigcup \nested[X] = \bigcup \nested[Y]$ where~$\nested[Y] \eqdef \nested[X] \ssm \{K\}$. Hence, $\bigcup \nested[Y]$ is in~$\nested[Y]$ since~$\nested[Y] \subseteq \nested$ and~$\nested$ is a $\building$-nested set. We conclude that~$\bigcup \nested[X] = \bigcup \nested[Y]$ is in~$\nested[X]$. We obtained that all blocks of~$\connectedComponents(B \cap B')$ and of~$\connectedComponents \big(P \ssm (B \cup B'))$ belong to~$\nested$, and thus also to~$\nested'$ by symmetry. \end{proof} We are now ready to describe the exchange relations in the $\building$-nested fan. The main message here is that these relations only depend on the frames of the exchanges, generalizing \cref{prop:exchangeablePairsGraphicalNestedFan}\,(iii). \begin{proposition} \label{prop:exchangeRelation} For two adjacent maximal $\building$-nested sets~$\nested$ and~$\nested'$ with~$\nested \ssm \{B\} = \nested' \ssm \{B'\}$ and parent~$P$, the unique (up to rescaling) linear dependence between the $\b{g}$-vectors of~$\nested \cup \nested'$ is \begin{equation} \label{eq:exchangeRelation} \gvector{B} + \gvector{B'} + \sum_{K \in \connectedComponents(P \ssm (B \cup B'))} \gvector{K} = \gvector{P} + \sum_{K \in \connectedComponents(B \cap B')} \gvector{K}. \end{equation} In particular, the $\b{g}$-vector dependence only depends on the exchange frame~$(B,B',P)$. \end{proposition} \begin{proof} \cref{eq:exchangeRelation} is a valid linear dependence since it holds at the level of characteristic vectors, and~$\gvector{C} \eqdef \pi \big( \sum_{v \in C} \b{e}_v \big)$ where~$\pi$ is the orthogonal projection from~$\R^\ground$ to~$\HH$. Since all building blocks involved in \cref{eq:exchangeRelation} belong to~$\nested \cup \nested'$ by \cref{prop:forcedBlocks}, we conclude that \cref{eq:exchangeRelation} is the unique (up to rescaling) linear dependence between the $\b{g}$-vectors of~$\nested \cup \nested'$. \end{proof} \begin{remark} \label{rem:differencesGraphicalExchangeRelation} For the graphical nested fans studied in \cref{subsec:exchangeableTubes}, the parent of the exchange of~$B$ and~$B'$ is always~${B \cup B'}$ and we recover the $\b{g}$-vector relation of \cref{prop:exchangeablePairsGraphicalNestedFan}\,(iii). In contrast to the graphical case, for an arbitrary building set, \begin{itemize} \item the sum on the left of \cref{eq:exchangeRelation} is empty only when~$P = B \cup B'$, \item \cref{eq:exchangeRelation} depends on the exchange frame~$(B, B', P)$, not only on the exchangeable building blocks~$B$ and~$B'$. \end{itemize} For instance, the $\b{g}$-vector relation of the exchange between the two adjacent maximal $\building_\circ$-nested sets~$\nested_\circ$ and~$\nested'_\circ$ represented in \cref{fig:exmNested}\,(middle) is $\b{g}_{14} + \b{g}_{25} + \b{g}_3 = \b{g}_{12345}$. Another $\b{g}$-vector relation for the same exchangeable blocks~$B = 14$ and~$B' = 25$ is~$\b{g}_{14} + \b{g}_{25} + \b{g}_6 = \b{g}_{12456}$. \end{remark} \begin{remark} \label{rem:Zelevinsky} The $\b{g}$-vector dependences were already studied in~\cite{Zelevinsky}. Namely, our \cref{prop:forcedBlocks,eq:exchangeRelation} are essentially Proposition 4.5 and Equation~(6.6) of~\cite{Zelevinsky}. Our versions are however more precise since we obtained in \cref{prop:exchangeablePairsNestedFan} a complete characterization of the exchangeable building blocks of~$\building$, which was surprisingly missing in the literature. \end{remark} Note that while the $\b{g}$-vector dependence only depends on the exchange frame, different frames may lead to the same $\b{g}$-vector dependence. In the next two statements, we describe which of the maximal exchange frames lead to the same $\b{g}$-vector dependence. Remember that we denote by~$\maximalBlocks(P)$ the maximal blocks of~$\building$ strictly contained in a block~$P \in \building$. \begin{proposition} \label{prop:mutualizedExchange1} For an elementary block~$P \in \elementary(\building)$, all exchange frames~$(B, B', P)$ for~$B \ne B'$ in~$\maximalBlocks(P)$ lead to the same $\b{g}$-vector dependence~$\sum_{B \in \maximalBlocks(P)} \gvector{B} = \gvector{P}$. \end{proposition} \begin{proof} Observe first that~$(B, B', P)$ is indeed an exchange frame by \cref{prop:maximalExchanges}. We thus apply \cref{prop:exchangeRelation} to describe the corresponding $\b{g}$-vector dependence. Observe first that the sum on the right of \cref{eq:exchangeRelation} is empty because~$B \cap B' = \varnothing$ by \cref{rem:elementary} since~$P$ is elementary and~${B, B' \in \maximalBlocks(P)}$. The result thus follows from the observation that~$\connectedComponents(P \ssm (B \cup B')) = \maximalBlocks(P) \ssm \{B, B'\}$ which we prove next. Let us consider~${K \in \connectedComponents(P \ssm (B \cup B'))}$ and prove that~$K \in \maximalBlocks(P) \ssm \{B, B'\}$. Consider~$L \in \building$ such that~$K \subseteq L \subsetneq P$. If~${L \cap B \ne \varnothing}$, then~$L \cup B \in \building$ and~$B \subsetneq L \cup B \subseteq P$, so that~$L \cup B = P$ by maximality of~$B$, contradicting the elementarity of~$P$. Hence, $L \subseteq P \ssm (B \cup B')$, so that~$K = L$ by maximality of~$K$ in~$P \ssm (B \cup B')$. We conclude that~$K \in \maximalBlocks(P) \ssm \{B, B'\}$. Conversely, let us consider~$C \in \maximalBlocks(P) \ssm \{B, B'\}$ and prove that~$C \in \connectedComponents(P \ssm (B \cup B'))$. Since~$P$ is elementary and~$B, B', C \in \maximalBlocks(P)$, the block $C$ is disjoint from~$B$ and~$B'$ by \cref{rem:elementary}. Hence, ${C \subseteq P \ssm (B \cup B')}$ and thus~$C \in \connectedComponents(P \ssm (B \cup B'))$ by maximality~of~$C$. \end{proof} \begin{proposition} \label{prop:mutualizedExchange2} If~$(B_1, B'_1, P)$ and~$(B_2, B'_2, P)$ are two distinct maximal exchange frames with the same $\b{g}$-vector dependence, then $P$ is elementary. \end{proposition} \begin{proof} Since the exchange relations given by \cref{eq:exchangeRelation} for the exchange frames~$(B_1, B'_1, P)$ and~$(B_2, B'_2, P)$ coincide, $B_2$ and~$B'_2$ belong to~$\{B_1, B'_1\} \cup \connectedComponents(P \ssm (B_1 \cup B'_1))$. Since~$(B_1, B'_1, P)$ and~$(B_2, B'_2, P)$ are distinct exchange frames, we can assume for instance that~$B_2$ does not belong to~$\{B_1, B'_1\}$. Hence, $B_2$ belongs to~$\connectedComponents(P \ssm (B_1 \cup B'_1))$, thus~$B_1 \cap B_2 = \varnothing$, and therefore~$P$ is elementary by \cref{rem:elementary} since it contains two disjoint maximal blocks. \end{proof} \subsection{Type cone of nested fans} \label{subsec:typeConeNestedFans} As a consequence of \cref{prop:exchangeRelation}, we obtain the following redundant description of the type cone of the nested fan~$\nestedFan[\building]$. \begin{corollary} \label{coro:typeConeNestedFan} For any building set~$\building$, the type cone of the nested fan~$\nestedFan[\building]$ is given by \[ \typeCone(\nestedFan[\building]) = \set{\b{h} \in \R^{\tubes}}{\begin{array}{l} \b{h}_{B} = 0 \text{ for } B \in \connectedComponents(\building) \text{ and for any exchange frame } (B, B', P) \\ \b{h}_B + \b{h}_{B'} + \sum_{K \in \connectedComponents(P \ssm (B \cup B'))} \b{h}_K > \b{h}_P + \sum_{K \in \connectedComponents(B \cap B')} \b{h}_K \end{array}}. \] \end{corollary} We denote by~$\b{f}_B$ for~$B \in \building$ the canonical basis of~$\R^{\building}$ and by \[ \b{n}(B,B',P) \eqdef \Big( \b{f}_B + \b{f}_{B'} + \sum_{K \in \connectedComponents(P \ssm (B \cup B'))} \b{f}_K \Big) - \Big( \b{f}_P + \sum_{K \in \connectedComponents(B \cap B')} \b{f}_K \Big) \] the inner normal vector of the inequality of the type cone~$\typeCone(\nestedFan[\building])$ corresponding to an exchange frame~$(B, B', P)$ of~$\building$. Thus $\b{h} \in \typeCone(\nestedFan[\building])$ if and only iff $\dotprod{\b{n}(B, B', P)}{\b{h}} > 0$ for all exchange frames~$(B, B', P)$ of~$\building$. \begin{example} \label{exm:typeConeNestedFan} Consider the nested fans illustrated in \cref{fig:nestedFans}. The type cone of the left fan lives in~$\R^8$, has a linearity space of dimension~$3$ and $5$ facet-defining inequalities (given below). In particular, it is simplicial. Note that as in \cref{fig:graphicalNestedFans}, we express the $\b{g}$-vectors in the basis given by the maximal tubing containing the first three tubes below. \medskip \centerline{$ \begin{array}{r|c@{\qquad}c@{\qquad}c@{\qquad}c@{\qquad}c@{\qquad}c@{\qquad}c@{\qquad}c} \text{blocks} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockA1}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockA2}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockA3}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockA4}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockA5}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockA6}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockA7}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockA8}} \\[.6cm] \text{$\b{g}$-vectors} & \compactVectorT{1}{0}{0} & \compactVectorT{0}{1}{0} & \compactVectorT{0}{0}{1} & \compactVectorT{1}{-1}{0} & \compactVectorT{-1}{1}{0} & \compactVectorT{-1}{0}{1} & \compactVectorT{0}{-1}{1} & \compactVectorT{0}{0}{-1} \\[.6cm] \text{facet} & 1 & -1 & 0 & 0 & 1 & 0 & 0 & 0 \\ \text{defining} & 0 & 0 & 0 & 0 & 1 & -1 & 1 & 0 \\ \text{inequalities} & 1 & 0 & 0 & -1 & 0 & 0 & 1 & 1 \\ & 0 & 1 & -1 & 0 & -1 & 1 & 0 & 0 \\ & -1 & 0 & 1 & 1 & 0 & 0 & -1 & 0 \\[.2cm] \end{array} $} \medskip \noindent The type cone of the right fan lives in~$\R^8$, has a linearity space of dimension~$3$ and $7$ facet-defining inequalities (given below). In particular, it is not simplicial. \[ \begin{array}{r|c@{\qquad}c@{\qquad}c@{\qquad}c@{\qquad}c@{\qquad}c@{\qquad}c@{\qquad}c} \text{blocks} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockB1}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockB2}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockB3}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockB4}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockB5}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockB6}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockB7}} & \raisebox{-.4cm}{\includegraphics[scale=.6]{blockB8}} \\[.6cm] \text{$\b{g}$-vectors} & \compactVectorT{1}{0}{0} & \compactVectorT{0}{1}{0} & \compactVectorT{0}{0}{1} & \compactVectorT{1}{-1}{0} & \compactVectorT{-1}{1}{0} & \compactVectorT{-1}{0}{0} & \compactVectorT{0}{-1}{1} & \compactVectorT{0}{0}{-1} \\[.6cm] \text{facet} & 1 & -1 & 0 & 0 & 1 & 0 & 0 & 0 \\ \text{defining} & 0 & 1 & -1 & 0 & 0 & 0 & 1 & 0 \\ \text{inequalities} & 1 & 0 & 0 & -1 & 0 & 0 & 1 & 1 \\ & 0 & 0 & 0 & 0 & 1 & -1 & 1 & 1 \\ & -1 & 0 & 1 & 1 & 0 & 0 & -1 & 0 \\ & 0 & 0 & 1 & 0 & -1 & 1 & -1 & 0 \\ & 0 & 0 & 0 & 1 & 0 & 1 & -1 & -1 \\[.2cm] \end{array} \] \medskip \end{example} \begin{example} \label{exm:constructionsNestedFan} We can exploit \cref{coro:typeConeNestedFan} to show that certain height functions belong to the type cone of~$\nestedFan[\building]$ and recover some classical constructions of the nestohedron, generalizing \cref{exm:constructionsGraphicalNestedFan}. \begin{enumerate}[(i)] \item Consider the height function~$\b{h} \in \R^\building$ given by~$\b{h}_B \eqdef -3^{|B|}$. Then for any exchange frame~$(B, B', P)$ of~$\building$, we have \begin{align*} \qquad\qquad \dotprod{\b{n}(B, B')}{\b{h}} & = - 3^{|B|} - 3^{|B'|} - \sum_{K \in \connectedComponents(P \ssm (B \cup B'))} 3^{|K|} + 3^{|P|} + \sum_{K \in \connectedComponents(B \cap B')} 3^{|K|} \\ & \ge - 2 \cdot 3^{|B \cup B'|-1} - 3^{|P \ssm (B \cup B'))|} + 3^{|P|} > 0. \end{align*} Therefore, the height function~$\b{h}$ belongs to the type cone~$\typeCone(\nestedFan[\building])$. The corresponding polytope~$P_\b{h} \eqdef \bigset{\b{x} \in \R^\ground}{\dotprod{\gvector{B}}{\b{x}} \le \b{h}_B \text{ for } B \in \building}$ was constructed in~\cite{Pilaud-removahedra}, generalizing the graph associahedra of~\cite{Devadoss}. \item Consider the height function~$\b{h} \in \R^\building$ given by~$\b{h}_B \eqdef -|\bigset{C \in \building}{C \subseteq B}|$. Then for any exchange frame~$(B, B', P)$ of~$\building$, we have \[ \qquad\quad\; \dotprod{\b{n}(B, B', P)}{\b{h}} = |\set{C \in \building}{C \not\subseteq B, \; C \not\subseteq B' \text{ and } C \not\subseteq P \ssm (B \cup B') \text{ but } C \subseteq P}| > 0 \] since~$P$ fulfills the conditions on~$C$. Therefore, the height function~$\b{h}$ belongs to the type cone~$\typeCone(\nestedFan[\building])$. The corresponding polytope~${P_\b{h} \eqdef \bigset{\b{x} \in \R^\ground}{\dotprod{\gvector{B}}{\b{x}} \le \b{h}_B \text{ for } B \in \building}}$ is the nestohedron constructed by A.~Postnikov's in~\cite{Postnikov}. \end{enumerate} \end{example} \enlargethispage{.1cm} Note that many inequalities of \cref{coro:typeConeNestedFan} are redundant. In the remaining of this section, we describe the facet-defining inequalities of~$\typeCone(\nestedFan[\building])$. We say that an exchange frame~$(B, B', P)$~is \begin{itemize} \item \defn{extremal} if its corresponding inequality in \cref{coro:typeConeNestedFan} defines a facet of~$\typeCone(\nestedFan[\building])$, \item \defn{maximal} if~$B$ and~$B'$ are both maximal building blocks in~$P$ as in \cref{prop:maximalExchanges}. \end{itemize} We can now state our main result on nested complexes, generalizing \cref{thm:extremalExchangeablePairsGraphicalNestedFan}. \begin{theorem} \label{thm:extremalExchangeFramesNestedFan} An exchange frame is extremal if and only if it is maximal. \end{theorem} \begin{proof} We treat separately the two implications: \para{\bf Extremal $\implies$ maximal} Consider an exchange frame~$(B, B', P)$ of~$\building$, and fix pivot vertices~$v,v'$ satisfying the conditions of \cref{prop:exchangeablePairsNestedFan}. We assume that this frame is not maximal, and prove that it is not extremal by showing that the normal vector~$\b{n}(B, B', P)$ of the corresponding inequality of the type cone~$\typeCone(\nestedFan[\building])$ is a positive linear combination of normal vectors of some other exchange frames. By symmetry, we can assume that there is~$M \in \building$ such that~$B \subsetneq M \subsetneq P$ and we can assume that~$M$ is maximal for this property. We decompose the proof into two cases, depending on whether~$B' \subseteq M$ or $B' \not\subseteq M$. \medskip \para{Case~1: $B' \subseteq M$} Observe first that: \begin{itemize} \item $(B, B', M)$ is an exchange frame, since $(B, B', P)$ is an exchange frame and ${B \cup B' \subseteq M \subseteq P}$, \item $(M, W, P)$ is an exchange frame for any connected component~$W$ of~$P \ssm (B \cup B')$ containing a vertex~$w \in P \ssm M$. Indeed, we just check the conditions of \cref{prop:exchangeablePairsNestedFan} for~$v \in M \ssm W$ and~$w \in W \ssm M$: \begin{itemize} \item for any~$\leaving{M}{C}{P}$, we have~$w \in P \ssm M \subseteq C$ by maximality of~$M$. \item for any~$\leaving{W}{C'}{P}$, we have~$C' \subseteq P$ and~$C' \not\subseteq W$, hence~$C' \cap (B \cup B') \ne \varnothing$ since~$W$ is a connected component of~$P \ssm (B \cup B')$. Assume for instance that~$C' \cap B \ne \varnothing$ (the proof for~$C' \cap B' \ne \varnothing$ is symmetric). Since~$C' \cap W \ne \varnothing$, we obtain that~$\leaving{B}{C'}{P}$ and thus $v' \in C'$ by \cref{prop:exchangeablePairsNestedFan}. We therefore obtain that~$\leaving{B'}{C'}{P}$ and thus~$v \in C'$ by \cref{prop:exchangeablePairsNestedFan} again. \end{itemize} \end{itemize} We claim that these two exchange frames enable us to write \[ \b{n}(B, B', P) = \b{n}(B, B', M) + \b{n}(M, W, P). \] Proving this identity amounts to check that \begin{equation} \label{eq:connectedComponents1} \connectedComponents(P \ssm (B \cup B')) \sqcup \connectedComponents(M \cap W) = \connectedComponents(M \ssm (B \cup B')) \sqcup \connectedComponents(P \ssm (M \cup W)) \sqcup \{W\}. \end{equation} For this, we distinguish two subcases, depending on whether or not~$M$ and~$W$ intersect. \para{Subcase 1.1: $M \cap W = \varnothing$} See \cref{fig:extremalImpliesMaximal}\,(left). First, we claim that either~$C \cap M = \varnothing$ or~$C \subseteq M$ for any~$C \in \building$ with~$C \subseteq P \ssm (B \cup B')$. Indeed, if~$C \cap M \ne \varnothing$, then~$C \cap W = \varnothing$ since~$M \cap W = \varnothing$ and~$W$ is a connected component of~$P \ssm (B \cup B')$. Hence~$C \cup M \in \building$ and $B \subsetneq C \cup M \subsetneq P$, and thus~$C \subseteq M$ by maximality of~$M$. We therefore obtain that \[ \connectedComponents(P \ssm (B \cup B')) = \connectedComponents(M \ssm (B \cup B')) \sqcup \connectedComponents(P \ssm (M \cup W)) \sqcup \{W\}. \] This shows \cref{eq:connectedComponents1} since~$M \cap W = \varnothing$. \para{Subcase 1.2: $M \cap W \ne \varnothing$} See \cref{fig:extremalImpliesMaximal}\,(middle). As~$M \cup W \in \building$ and~$B \subsetneq B \cup W \subseteq P$ and~$W \not\subseteq M$, we have~${P = M \cup W}$ by maximality of~$M$. Since~$W \in \connectedComponents(P \ssm (B \cup B'))$, we have \[ \connectedComponents(P \ssm (B \cup B')) = \connectedComponents(P \ssm (B \cup B' \cup W)) \sqcup \{W\} = \connectedComponents(M \ssm (B \cup B' \cup W)) \sqcup \{W\} \\ \] Moreover, by maximality of~$W$, we obtain that there is no block of~$\building$ contained in~$M \ssm (B \cup B')$ and meeting both~$M \cap W$ and~$M \ssm (B \cup B' \cup W)$. Hence \[ \connectedComponents(M \cap W) \sqcup \connectedComponents(M \ssm (B \cup B' \cup W)) = \connectedComponents(M \ssm (B \cup B')). \] Combining these two identities proves \cref{eq:connectedComponents1} since~$P = M \cup W$. \begin{figure}[t] \centerline{ \begin{tabular}{c@{\qquad}c@{\qquad}c} \begin{tikzpicture}[every path/.style={draw, rounded corners=1ex, thick}] \draw[green] (0, 2.5) rectangle (4, 0) node[pos=0, xshift=1.5ex, yshift=-1.5ex] {$P$}; \draw[purple] (.1, .1) rectangle (2.9, 1.9) node[pos=0, xshift=1.6ex, yshift=1.5ex] {$M$}; \draw[red] (.2, 1.8) rectangle (1.7, .8) node[pos=0, xshift=1.5ex, yshift=-1.5ex] {$B$}; \draw[blue] (1.3, 1.2) rectangle (2.8, .2) node[pos=1, xshift=-1.5ex, yshift=1.5ex] {$B'$}; \draw[orange] (3, 1.3) rectangle (3.9, 2.4) node[pos=1, xshift=-1.6ex, yshift=-1.5ex] {$W$}; \node[label={[label distance=-1.7ex] 180:{\red $v$}}] at (1.2, 1.3) {\red $\star$}; \node[label={[label distance=-1.5ex] 0:{\blue $v\smash{'}$}}] at (1.8, .7) {\blue $\star$}; \node[label={[label distance=-1.7ex] 180:{\orange $w$}}] at (3.6, 1.5) {\orange $\star$}; \end{tikzpicture} & \begin{tikzpicture}[every path/.style={draw, rounded corners=1ex, thick}] \draw[green] (0, 2) -- (0, 0) -- (3, 0) -- (3, 1.2) -- (4, 1.2) -- (4, 2.5) -- (2.1, 2.5) -- (2.1, 2) -- cycle; \node[green, right] at (0, 2.2) {$P = M \cup W$}; \draw[purple] (.1, .1) rectangle (2.9, 1.9) node[pos=0, xshift=1.6ex, yshift=1.5ex] {$M$}; \draw[red] (.2, 1.8) rectangle (1.7, .8) node[pos=0, xshift=1.5ex, yshift=-1.5ex] {$B$}; \draw[blue] (1.3, 1.2) rectangle (2.8, .2) node[pos=1, xshift=-1.5ex, yshift=1.5ex] {$B'$}; \draw[orange] (2.2, 1.3) rectangle (3.9, 2.4) node[pos=1, xshift=-1.6ex, yshift=-1.5ex] {$W$}; \node[label={[label distance=-1.7ex] 180:{\red $v$}}] at (1.2, 1.3) {\red $\star$}; \node[label={[label distance=-1.5ex] 0:{\blue $v\smash{'}$}}] at (1.8, .7) {\blue $\star$}; \node[label={[label distance=-1.7ex] 180:{\orange $w$}}] at (3.6, 1.5) {\orange $\star$}; \end{tikzpicture} & \begin{tikzpicture}[every path/.style={draw, rounded corners=1ex, thick}] \draw[green] (0, 2) -- (0, 0) -- (4, 0) -- (4, 1.3) -- (3, 1.3) -- (3, 2) -- cycle; \node[green, right] at (0, 2.2) {$P = M \cup B'$}; \draw[purple] (.1, .1) rectangle (2.9, 1.9) node[pos=0, xshift=1.6ex, yshift=1.5ex] {$M$}; \draw[red] (.2, 1.8) rectangle (1.7, .8) node[pos=0, xshift=1.5ex, yshift=-1.5ex] {$B$}; \draw[blue] (1.3, 1.2) rectangle (3.9, .2) node[pos=1, xshift=-1.5ex, yshift=1.5ex] {$B'$}; \draw[orange] (1.5, 1) rectangle (2.8, .4) node[pos=1, xshift=-1.5ex, yshift=2ex] {$W$}; \node[label={[label distance=-1.7ex] 180:{\red $v$}}] at (1.2, 1.3) {\red $\star$}; \node[label={[label distance=-1.5ex] 0:{\blue $v\smash{'}$}}] at (1.8, .7) {\blue $\star$}; \node[label={[label distance=-1.7ex] 180:{\blue $w$}}] at (3.6, 1) {\blue $\star$}; \end{tikzpicture} \\[.1cm] Case 1.1 & Case 1.2 & Case 2 \end{tabular} } \caption{Illustrations for the case analysis of the proof of \cref{thm:extremalExchangeFramesNestedFan}.} \label{fig:extremalImpliesMaximal} \end{figure} \medskip \para{Case~2: $B' \not\subseteq M$} See \cref{fig:extremalImpliesMaximal}\,(right). Observe that: \begin{itemize} \item $(M, B', P)$ is an exchange frame. Indeed, we just check the conditions of \cref{prop:exchangeablePairsNestedFan} for~$v \in M \ssm B'$ and an arbitrary~$w \in B' \ssm M$: \begin{itemize} \item for any~$\leaving{M}{C}{P}$, we have~$w \in P \ssm M \subseteq C$ by maximality of~$M$. \item for any~$\leaving{B'}{C'}{P}$, we have~$v \in C'$ by \cref{prop:exchangeablePairsNestedFan}. \end{itemize} \item $(B, W, M)$ is an exchange frame for the connected component~$W$ of~$M \cap B'$ containing~$v'$. Indeed, we just check the conditions of \cref{prop:exchangeablePairsNestedFan} for~$v \in B \ssm W$ and~$v' \in W \ssm B$: \begin{itemize} \item for any~$\leaving{B}{C}{M}$, we have~$\leaving{B}{C}{P}$ and thus $v' \in C$ by \cref{prop:exchangeablePairsNestedFan}. \item for any~$\leaving{W}{C'}{M}$, we have~$\leaving{B'}{C'}{P}$ and thus~$v \in C'$ by \cref{prop:exchangeablePairsNestedFan}. \end{itemize} \end{itemize} We claim that these two exchange frames enable to write \[ \b{n}(B, B', P) = \b{n}(M, B', P) + \b{n}(B, W, M). \] Proving this identity amounts to check that \begin{equation} \label{eq:connectedComponents2} \connectedComponents(P \ssm (B \cup B')) \sqcup \connectedComponents(M \cap B') \sqcup \connectedComponents(B \cap W) = \connectedComponents(B \cap B') \sqcup \connectedComponents(P \ssm (M \cup B')) \sqcup \connectedComponents(M \ssm (B \cup W)) \sqcup \{W\}. \end{equation} To prove this, we observe that: \begin{itemize} \item Since~$W$ contains~$v'$, \cref{prop:exchangeablePairsNestedFan} ensures that there is no block of~$\building$ contained in~$M \cap B'$ and meeting both~$B$ and~$B' \ssm (B \cup W)$. Since~$W \in \connectedComponents(M \cap B')$, we thus obtain \[ \connectedComponents(M \cap B') = \connectedComponents((M \cap B') \ssm (B \cup W)) \sqcup \connectedComponents(B \cap B' \ssm W) \sqcup \{W\}. \] \item As~$W \in \connectedComponents(M \cap B')$, there is no block of~$\building$ contained in~$B \cap B'$ and meeting both~$B \cap W$ and~$B \cap B' \ssm W$, henc \[ \connectedComponents(B \cap W) \sqcup \connectedComponents(B \cap B' \ssm W) = \connectedComponents(B \cap B'). \] \item There is no block of~$\building$ contained in~$M \ssm (B \cup W)$ and meeting both~$M \ssm (B \cup B')$ and~$(M \cap B') \ssm (B \cup W)$ (such a block~$C$ would satisfy~$\leaving{B'}{C}{P}$ and~$v \notin C$, contradicting \cref{prop:exchangeablePairsNestedFan}). Hence \[ \connectedComponents(M \ssm (B \cup B')) \sqcup \connectedComponents((M \cap B') \ssm (B \cup W)) = \connectedComponents(M \ssm (B \cup W)). \] \end{itemize} Combining these three identities proves~\eqref{eq:connectedComponents2} since $P = M \cup B'$ by maximality of~$M$. \para{\bf Maximal $\implies$ extremal} Let~$(B, B', P)$ be a maximal exchange frame. To prove that $(B, B', P)$ is extremal, we will construct a vector $\b{w} \in \R^{\building}$ such that ${\dotprod{\b{n}(B, B', P)}{\b{w}} < 0}$, but ${\dotprod{\b{n}(\tilde B, \tilde B', \tilde P)}{\b{w}} > 0}$ for any maximal exchange frame~$(\tilde B, \tilde B', \tilde P)$ with~$\b{n}(B, B', P) \ne \b{n}(\tilde B, \tilde B', \tilde P)$. This will show that the inequality induced by~$(B, B', P)$ is not redundant. Remember from \cref{prop:mutualizedExchange1,prop:mutualizedExchange2} that, as~$(B, B', P)$ and~$(\tilde B, \tilde B', \tilde P)$ are maximal exchange frames, $\b{n}(B, B', P) \ne \b{n}(\tilde B, \tilde B', \tilde P)$ if and only if~$P \ne \tilde P$, or~$P = \tilde P$ is not an elementary block. Define $\alpha(B, B', P) \eqdef \set{C \in \building}{C \not\subseteq B, \; C \not\subseteq B' \text{ and } C \not\subseteq P \ssm (B \cup B') \text{ but } C \subseteq P}$. Define three vectors~$\b{x}, \b{y}, \b{z} \in \R^{\building}$ by \begin{align*} \b{x}_C & \eqdef -|\bigset{D \in \building \ssm \alpha(B, B', P)}{D \subseteq C}|, \\ \b{y}_C & \eqdef -|\bigset{D \in \alpha(B, B', P)}{D \subseteq C}|, \\ \b{z}_C & \eqdef \begin{cases} -1 & \text{if } B \subseteq C \text{ or } B' \subseteq C, \\ 0 & \text{otherwise}, \end{cases} \end{align*} for each bock~$C \in \building$. We will prove below that their scalar products with~$\b{n}(\tilde B, \tilde B', \tilde P)$ for any maximal exchange frame $(\tilde B, \tilde B', \tilde P)$ satisfy the following inequalities \[ \renewcommand{\arraystretch}{1.3} \begin{array}{l|ccc} & \dotprod{\b{n}(\tilde B, \tilde B', \tilde P)}{\b{x}} & \dotprod{\b{n}(\tilde B, \tilde B', \tilde P)}{\b{y}} & \dotprod{\b{n}(\tilde B, \tilde B', \tilde P)}{\b{z}} \\ \hline \text{if } \b{n}(B, B', P) = \b{n}(\tilde B, \tilde B', \tilde P) & = 0 & = |\alpha(B, B', P)| & = -1 \\ \text{if } \alpha(\tilde B, \tilde B', \tilde P) \not\subseteq \alpha(B, B', P) & \ge 1 & \ge 0 & \ge -1 \\ \text{otherwise} & \ge 0 & \ge 1 & \ge 0 \end{array} \renewcommand{\arraystretch}{1} \] It immediately follows from this table that the vector $\b{w} \eqdef \b{x} + \delta \b{y} + \varepsilon \b{z}$ fulfills the desired properties for any~$\delta, \varepsilon$ such that $0 < \delta \cdot |\alpha(B, B', P)| < \varepsilon < 1$. The equalities of the table are immediate. To prove the inequalities, observe that for any maximal exchange frame~$(\tilde B, \tilde B', \tilde P)$, \begin{itemize} \item $\dotprod{\b{n}(\tilde B, \tilde B', \tilde P)}{\b{x}} \ge |\alpha(\tilde B, \tilde B', \tilde P) \ssm \alpha(B, B', P)|$, \item $\dotprod{\b{n}(\tilde B, \tilde B', \tilde P)}{\b{y}} \ge |\alpha(\tilde B, \tilde B', \tilde P) \cap \alpha(B, B', P)|$, \item $\dotprod{\b{n}(\tilde B, \tilde B', \tilde P)}{\b{z}} \ge -1$. Indeed, observe that~$\b{z}_{\tilde P} = -1$ as soon as~$\b{z}_{\tilde K} = -1$ for some ${\tilde K \in \{\tilde B, \tilde B'\} \sqcup \connectedComponents(\tilde P \ssm (\tilde B \cup \tilde B'))}$. This already implies that~$\dotprod{\b{n}(\tilde B, \tilde B', \tilde P)}{\b{z}} \ge -1$ except if~$\b{z}_{\tilde K} = \b{z}_{\tilde K'} = \b{z}_{\tilde K''} = -1$ for three distinct ${\tilde K, \tilde K', \tilde K'' \in \{\tilde B, \tilde B'\} \sqcup \connectedComponents(\tilde P \ssm (\tilde B \cup \tilde B'))}$. But since~$\tilde B$ and~$\tilde B'$ are the only intersecting blocks among~$\{\tilde B, \tilde B'\} \sqcup \connectedComponents(\tilde P \ssm (\tilde B \cup \tilde B'))$, the only option (up to permutation) is that~$\tilde K = \tilde B$ and~$\tilde K' = \tilde B'$ both contain~$B$ (resp.~$B'$), $K''$ contains~$B'$ (resp.~$B$), while none of the other blocks of~$\{\tilde B, \tilde B'\} \sqcup \connectedComponents(\tilde P \ssm (\tilde B \cup \tilde B'))$ meets~${B \cup B'}$. This implies that~$\b{z}_{\tilde P} = -1 = \b{z}_{L}$ for some~$L \in \connectedComponents(\tilde B \cap \tilde B')$, and thus~$\dotprod{\b{n}(\tilde B, \tilde B', \tilde P)}{\b{z}} \ge -1$. \item $\dotprod{\b{n}(\tilde B, \tilde B', \tilde P)}{\b{z}} \ge 0$ when~$\b{n}(B, B', P) \ne \b{n}(\tilde B, \tilde B', \tilde P)$ but $\alpha(\tilde B, \tilde B', \tilde P) \subseteq \alpha(B, B', P)$. Indeed, $\alpha(\tilde B, \tilde B', \tilde P) \subseteq \alpha(B, B', P)$ implies that~$\tilde P \subseteq P$. Let ${\tilde K \in \{\tilde B, \tilde B'\} \sqcup \connectedComponents(\tilde P \ssm (\tilde B \cup \tilde B'))}$. If~$B \subseteq \tilde K$, then~$B \subseteq \tilde K \subsetneq \tilde P \subseteq P$ which implies that~$B = \tilde K$ and~$P = \tilde P$ by maximality of~$B$ in~$P$. Similarly, $B' \subseteq \tilde K$ implies~$B' = \tilde K$ and~$P = \tilde P$. Hence, if~${\b{z}_{\tilde K} = -1}$, then by definition~$B \subseteq \tilde K$ or~$B' \subseteq \tilde K$, which implies that~$\tilde K \in \{B, B'\}$. Hence, if~${\tilde K \ne \tilde K'}$ are two distinct blocks of~$\{\tilde B, \tilde B'\} \sqcup \connectedComponents(\tilde P \ssm (\tilde B \cup \tilde B'))$ such that $\b{z}_{\tilde K} = -1 = \b{z}_{\tilde K'}$, then~$(B, B', P) = (\tilde K, \tilde K', \tilde P)$ and moreover either~$\{B, B'\} = \{\tilde K, \tilde K'\}$, or $\tilde K \cap \tilde K' = \varnothing$, so that~$P$ is elementary by \cref{rem:elementary} since it has two disjoint maximal blocks. In both cases, we obtain~${\b{n}(B, B', P) = \b{n}(\tilde B, \tilde B', \tilde P)}$ by \cref{prop:mutualizedExchange2}, contradicting our assumption. Therefore, at most one of~$\b{z}_{\tilde K}$ for ${\tilde K \in \{\tilde B, \tilde B'\} \sqcup \connectedComponents(\tilde P \ssm (\tilde B \cup \tilde B'))}$ equals to~$-1$, and if exactly one does, then~$\b{z}_{\tilde P} = -1$. We conclude that~$\dotprod{\b{n}(\tilde B, \tilde B', \tilde P)}{\b{z}} \ge 0$. \qedhere \end{itemize} \end{proof} We derive from \cref{thm:extremalExchangeFramesNestedFan} the facet description of the type cone~$\typeCone(\nestedFan[\building])$. Remember that we denote by~$\maximalBlocks(P)$ the maximal blocks of~$\building$ strictly contained in a block~$P \in \building$. \begin{corollary} \label{coro:facetDescriptionTypeConeNestedFan} The inequalities \begin{itemize} \item $\sum_{B \in\maximalBlocks(P)} \b{h}_{B} > \b{h}_P$ for any elementary block~$P$ of~$\building$, \item $\b{h}_B + \b{h}_{B'} + \sum_{K \in \connectedComponents(P \ssm (B \cup B'))} \b{h}_K > \b{h}_P + \sum_{K \in \connectedComponents(B \cap B')} \b{h}_K$ for any block~$P$ of~$\building$ neither singleton nor elementary, and any two blocks~$B \ne B'$ in~$\maximalBlocks(P)$, \end{itemize} provide an irredundant facet description of the type cone~$\typeCone(\nestedFan[\building])$. \end{corollary} \begin{corollary} \label{coro:numberFacetsTypeConeNestedFan} The number of facets of the the type cone~$\typeCone(\nestedFan[\building])$ is \[ |\elementary(\building)| + \sum_P \binom{\maximalBlocks(P)}{2} \] where the sum runs over all blocks~$P$ of~$\building$ which are neither singletons nor elementary blocks. \end{corollary} \begin{proposition} \label{prop:simplicialTypeConeNestedFan} The type cone~$\typeCone(\nestedFan[\building])$ is simplicial if and only if all blocks of~$\building$ with at least three distinct maximal strict subblocks are elementary. \end{proposition} \begin{proof} Recall that the nested fan~$\nestedFan[\building]$ has dimension~$|\ground| - |\connectedComponents(\building)|$ and has~$|\building| - |\connectedComponents(\building)|$ rays. Hence, the type cone~$\typeCone(\nestedFan[\building])$ is simplicial if and only if it has~$|\building| - |\ground|$ facets. The statement thus immediately follows from \cref{coro:numberFacetsTypeConeNestedFan}. \end{proof} \subsection{Interval building sets} \label{subsec:intervalBuildingSets} An \defn{interval building set} is a building set on~$[n] \eqdef \{1, \dots, n\}$ whose blocks are some intervals of~$\preccurlyeq$. We call \defn{interval nested fan} and \defn{interval nestohedron} the nested fan and nestohedron of an interval building set. Examples are illustrated~in~\cref{fig:intervalNestedFans}. \begin{figure} \capstart \centerline{\includegraphics[scale=.55]{intervalNestedFans}} \caption{Four interval nested fans. The bottom left one is the Pitman-Stanley fan, the bottom right one is the sylvester fan. As the fans are $3$-dimensional, we intersect them with the sphere and stereographically project them from the direction~$(-1,-1,-1)$.} \label{fig:intervalNestedFans} \end{figure} \begin{example} There are two particularly relevant examples of interval nestohedra: \begin{itemize} \item the classical associahedron of~\cite{ShniderSternberg,Loday} for the building set with all intervals of~$[n]$, \item the Pitman-Stanley polytope of~\cite{PitmanStanley} for the building set with all singletons~$\{i\}$ and all intervals~$[i]$~for~${i \in [n]}$. \end{itemize} Note that, by definition, any interval nested fan coarsens the associahedron nested fan. \end{example} \begin{proposition} \label{prop:simplicialTypeConeInterval} For any interval building set~$\building$, the type cone~$\typeCone(\nestedFan[\building])$ is simplicial. \end{proposition} \begin{proof} Assume that~$\building$ has a non-elementary block~$[i,j]$, with at least three distinct maximal strict subblocks~$[a,b]$, $[c,d]$ and~$[e,f]$. Since~$[a,b]$, $[c,d]$ and~$[e,f]$ are pairwise non nested, we can assume up to permutation that~$a < c < e$ and~$b < d < f$. Since~$[i,j]$ is not elementary, $[a,b] \cap [c,d] \ne \varnothing$ and thus~$[a,b] \cup [c,d] = [a,d]$ is a block of~$\building$. This contradicts the maximality of~$[a,b]$ since ${[a,b] \subsetneq [a,d] \subsetneq [i,j]}$ as~$b < d < f \le j$. \end{proof} \begin{remark} Note that there are building sets~$\building$ for which the type cone~$\typeCone(\nestedFan[\building])$ is simplicial, but which are not (isomorphic to) interval building sets. See \eg \cref{fig:nestedFans}\,(left). \end{remark} We now translate the facet description of \cref{coro:facetDescriptionTypeConeNestedFan} to the specific case of interval building sets. We need a few additional notations. Consider an interval building set~$\building$ on~$[n]$. For~${1 \le i < j \le n}$, define \[ \ell(i,j) \eqdef \min\nolimits \set{k \in [i+1,j]}{[k,j] \in \building} \qquad\text{and}\qquad r(i,j) \eqdef \max\nolimits \set{k \in [i,j-1]}{[i,k] \in \building}. \] Note that~$\ell(i,j)$ and~$r(i,j)$ are well-defined since~$\building$ contain all singletons. Observe that~${[i, r(i,j)]}$ and~$[\ell(i,j), j]$ are maximal strict subblocs of~$[i,j]$. Therefore, \begin{itemize} \item if~$[i,j] \in \building$ is elementary, then we have~$r(i,j) < \ell(i,j)$ and the maximal strict subblocks of~$[i,j]$ are the intervals~$[s_{k-1}(i,j), s_k(i,j)-1]$ for~${k \in [p]}$ where the sequence ${s_0(i,j) < s_1(i,j) < \dots < s_p(i,j)}$ is defined by the boundary conditions~$s_0(i,j) \eqdef i$ and ${s_1(i,j) = r(i,j)+1}$ and ${s_p(i,j) \eqdef j+1}$, and the induction~$s_k(i,j) \eqdef r(s_{k-1}(i,j), j+1)+1$. \item if~$[i,j] \in \building$ is not elementary, we have~$\ell(i,j) \le r(i,j)$ so that \[ \qquad [i, r(i,j)] \cup [\ell(i,j), j] = [i,j] \qquad\text{and}\qquad [i, r(i,j)] \cap [\ell(i,j), j] = [\ell(i,j), r(i,j)]. \] Thus $[i, r(i,j)]$ and~$[\ell(i,j), j]$ are the only maximal strict subblocks of~$[i,j]$. Moreover, the connected components of~$[i, r(i,j)] \cap [\ell(i,j), j] = [\ell(i,j), r(i,j)]$ are the intervals ${[t_{k-1}(i,j), t_k(i,j)-1]}$ for~${k \in [q]}$~where the sequence ${t_0(i,j) < t_1(i,j) < \dots < t_q(i,j)}$ is defined by the boundary conditions~$t_0(i,j) \eqdef \ell(i,j)$ and~$t_q(i,j) \eqdef r(i,j)+1$, and the induction~${t_k(i,j) \eqdef r(t_{k-1}(i,j), r(i,j)+1) + 1}$. \end{itemize} Using these notations, the following statement is just a translation of \cref{coro:facetDescriptionTypeConeNestedFan}. \begin{proposition} \label{prop:facetDescriptionTypeConeNestedFanInterval} Consider an interval building set~$\building$ on~$[n]$ and let~$\building^\star \eqdef \building \ssm \set{\{i\}}{i \in [n]}$ denote the blocks which are not singletons. Then the inequalities \begin{itemize} \item $\sum_{k \in [p]} \b{h}_{[s_{k-1}(i,j), s_k(i,j)-1]} > \b{h}_{[i,j]}$ for all~$[i,j] \in \building^\star$ with~$r(i,j) < \ell(i,j)$, \item $\b{h}_{[i, r(i,j)]} + \b{h}_{[\ell(i,j), j]} > \b{h}_{[i,j]} + \sum_{k \in [q]} \b{h}_{[t_{k-1}(i,j), t_k(i,j)-1]}$ for all~$[i,j] \in \building^\star$ with~${\ell(i,j) \le r(i,j)}$, \end{itemize} provide an irredundant facet description of the type cone~$\typeCone(\nestedFan[\building])$. \end{proposition} \begin{example} For instance \begin{itemize} \item for the building set containing all intervals of~$[n]$, we have~$\ell(i,j) = i+1$ and~$r(i,j) = j-1$, so that the facet defining inequalities of the type cone are~$\b{h}_{[i,j-1]} + \b{h}_{[i+1,j]} > \b{h}_{[i,j]} + \b{h}_{[i+1,j-1]}$ for all~$1 \le i < j \le n$ (with the convention that~$\b{h}_{[i+1,j-1]} = 0$ for~$i+1=j$), \item for the building set containing all singletons~$\{i\}$ and all intervals~$[i]$ for~$i \in [n]$, we have $r(1,j) = j-1 < j = \ell(1,j)$, so that the facet defining inequalities of the type cone are~$\b{h}_{[j-1]} + \b{h}_{\{j\}} > \b{h}_{[j]}$ for all~$1 < j \le n$. \end{itemize} \end{example} We finally combine \cref{prop:simplicialTypeCone,prop:facetDescriptionTypeConeNestedFanInterval} to define kinematic nestohedra for interval building sets, similar to the constructions of~\cite{ArkaniHamedBaiHeYan, BazierMatteDouvilleMousavandThomasYildirim, PadrolPaluPilaudPlamondon} for associahedra, cluster associahedra and gentle associahedra. \begin{proposition} \label{prop:kinematicNestohedraInterval} Consider an interval building set~$\building$ on~$[n]$ and let~$\building^\star \eqdef \building \ssm \set{\{i\}}{i \in [n]}$ denote the blocks which are not singletons. Then for any~$\b{p} \in \R_{>0}^{\building^\star}$, the polytope~$R_\b{p}(\building) \subseteq \R^\building$ defined as the intersection of the positive orthant~$ \set{\b{z} \in \R^{\building}}{\b{z} \ge 0}$ with the hyperplanes \begin{itemize} \item $\b{z}_{K} = 0$ for~$K \in \connectedComponents(\building)$, \item $\sum_{k \in [p]} \b{z}_{[s_{k-1}(i,j), s_k(i,j)-1]} - \b{z}_{[i,j]} = \b{p}_{[i,j]}$~for~$[i,j] \in \building^\star$ with~$r(i,j) < \ell(i,j)$, \item $\b{z}_{[i, r(i,j)]} + \b{z}_{[\ell(i,j), j]} - \b{z}_{[i,j]} - \sum_{k \in [q]} \b{z}_{[t_{k-1}(i,j), t_k(i,j)-1]} = \b{p}_{[i,j]}$ for~$[i,j] \in \building^\star$ with~${\ell(i,j) \le r(i,j)}$, \end{itemize} is a nestohedron whose normal fan is the nested fan~$\nestedFan[\building]$. Moreover, the polytopes~$R_\b{p}(\building)$ for ${\b{p} \in \R_{>0}^{\building^\star}}$ describe all polytopal realizations of~$\nestedFan[\building]$ (up to translations). \end{proposition} \addtocontents{toc}{\vspace{.1cm}} \section*{Acknowledgments} The graphical part of the present paper appeared in a preliminary version of our paper with Yann Palu and Pierre-Guy Plamondon~\cite{PadrolPaluPilaudPlamondon} as an illustration of the limits of our method based on the simpliciality of the type cone. We later realized during the master project of Germain Poullot that, although many complications appear, the main results and techniques leading to the description of the type cone can be extended from graph associahedra to arbitrary nestohedra. We are grateful to Yann Palu and Pierre-Guy Plamondon for encouraging us to separate this part from~\cite{PadrolPaluPilaudPlamondon} to write the present paper. \bibliographystyle{alpha}
\section{Supplementary information}\\ \begin{figure} \label{fig1} \begin{center} \includegraphics[height=16cm,width=17cm]{Sfig1.eps} \caption{\textbf{IMFs and Hilbert spectrum of EEG data:} A) constructed IMFs from the original experimental EEG data on rat; B) we have shown the plot of instantaneous frequency (x-axis) versus instantaneous phase (y-axis) and time (z-axis) for data of 12 epochs for a particular animal and state but this is a general observation for all states.} \end{center} \end{figure} \begin{figure} \label{fig2} \begin{center} \includegraphics[height=12cm,width=17cm]{Sfig2.eps} \caption{\textbf{MF-DFA approach:} The plots of q order scaling parameters (clockwise from left) fluctuation function, $F_q$ versus scale (or segment length), the hurst exponent, $H_q$, the mass exponent, $t_q$, and the fractal dimension, $D_q$ versus singularity exponent, $h_q$, for the wake, NREM and REM states. This is the result of a trial dataset of 12 epochs to show consistency in trend. } \end{center} \end{figure} \end{document}
\section{Introduction} From disaster preparedness to response and recovery needs, availability and quality of environmental datasets have gained significant importance in recent years with increased impact of natural disasters. Rainfall datasets have been an important component in many climate modeling applications such as flood forecasting \citep{sit2021short}, water quality \citep{jha2007water}, wastewater management \citep{cahoon2017rainfall}, along with other data products. Since spatial and temporal distributions of rain exert importance in such modeling efforts, the quality and availability of precipitation maps hold the utmost importance in advancing climate change research. Using Quantitative Precipitation Estimation (QPE), radar-acquired rainfall data could be four-dimensional. The first three dimensions reflect spatial coordinates on earth, the latitude, longitude and altitude. The fourth dimension here is temporal resolution. A three-dimensional rainfall data could be acquired by surpassing, or aggregating, the altitude component into each data point for the whole region. The temporal resolution of rainfall products affects the accuracy of modeling efforts \citep{atencia2011effect}. In an attempt to rectify the problem of low-quality rainfall products, this paper proposes a convolutional neural networks (CNNs) based deep learning architecture to increase the temporal resolution of rainfall products. The proposed CNN model, which will be referred to as TempNet throughout this paper, is compared with a baseline method that uses optical flow calculations. Along with the baseline method to compare, the proposed CNN produces an intermediate 2D rain map between two temporally consecutive rain maps. In other words, if two rain maps are given for \(t_{0} \) and \(t_{10} \), both the baseline method and the CNN-based model will produce a rain map for \(t_{5} \). The task of interpolating a 2D map between two 2D maps is not unique to rainfall products. The same problem has been a topic of interest in the field of computer vision also. Subsequently, various studies presented neural networks based approaches for video frame interpolation \citep{niklaus2017video, niklaus2017video2, liu2017video, jiang2018super}. On the other hand literature on temporal interpolation of rainfall datasets is rather limited. At the time of this writing, only study that presented a method for such problem was \citep{seo2015correcting} that used advection correction in order to generate rainfall maps with 1-min resolution from 5-min ones. The rest of this paper is structured as follows; in section 2, the overview of the methodology is presented. In section 3, the results for both the baseline method and the TempNet are presented and discussed. Finally, in section 4, the conclusions are summarized with final remarks. \section{Methodology} \label{gen_inst} This section describes the methodology employed in this paper. In the following subsection, we start by describing the dataset used. We, then, provide details about the optical flow baseline and the CNN-based TempNet neural network architecture proposed in the study. Finally we describe how the TempNet was trained. \subsection{Dataset} The dataset used in this paper is a rainfall event dataset; namely, IowaRain presented by Sit et al. \citep{sit2021iowarain, seo2019pilot}. IowaRain consists of 288 rainfall events from 2016 to 2019. Each rainfall event is formed by a set of temporally consecutive 2D rain maps, or snapshots, for each timestamp with a minute element that is divisible by 5. \begin{figure} \centering \includegraphics[scale=0.10]{data_fig2.jpg} \caption{An example sequence of 2D Rainfall Maps and how a set of input and output pairs are built from that sequence.} \label{datafig} \end{figure} The IowaRain dataset chronologically provides 64, 67, 76, and 81 events for each year in [2016, 2019]. In order to do the dataset separation in a fashion closer to 70/30 split, we decided to use the rainfall events for 2019 as the test set and all the rainfall events before 2019 as the training set, making our set lengths 207 and 81 for training and test sets respectively. To prepare the dataset for training and testing, we formed a dataset entry for each snapshot \(t_{s} \) in a rain event that has another snapshot coming right after (\(t_{s+5} \)) and right before (\(t_{s-5} \)) it. Each dataset entry consists of the \(t_{s-5} \) and \(t_{s+5} \) as the input and \(t_{s} \) as the output (Figure \ref{datafig}). Then in order to augment the dataset for better training, we form additional dataset entries by reversing the order of snapshots in the event and double the number of dataset entries for the training dataset. The final dataset entries sum up to 35,258 and 6,725 snapshots for training and test sets, respectively. \subsection{Optical Flow} In order to form a baseline method that is comparable to the model we propose, we selected to use a simple optical flow based temporal interpolation method. This method depends on the optical flow calculation between two 2D rain maps and creating an intermediate frame between those rain maps that is at the same distance to both rain maps temporally. There are many optical flow calculation algorithms in the computer vision literature. In this paper, we employed the Gunnar-Farneback optical flow \citep{farneback2003two}. Gunnar-Farneback optical flow calculates pixel intensities for each pixel in the scene. For the rain map case, that would mean calculating the changes for each of the measurements for 0.5km x 0.5km areas that form the 2D rain map. Once the optical flow is calculated, the next step is to transfer every measurement depending on their motion vectors in calculated optical flow, and their location in the first and second frame. For comparison purposes, the optical flow between input snapshots was calculated for each of the entries in the test dataset. Then, color propagation was done using those calculations in order to estimate each intermediate frame. Once all the estimations were done for the testing dataset, performance metrics, reported in the next section, were calculated using estimated and actual snapshots. The entirety of the baseline method was implemented using NumPy \citep{harris2020array} numeric computing library and the Gunnar-Farneback optical flow implementation in the OpenCV \citep{bradski2000opencv} library. \subsection{TempNet} In order to explore how the temporal resolution of 2D rain maps could be improved, we proposed a CNN-based neural network architecture, TempNet. Albeit simple, the TempNet provides a fast but effective alternative to the optical flow based color transfer method we described in the previous subsection. \begin{figure} \centering \includegraphics[scale=0.13]{arch_fig.jpg} \caption{Architecture scheme for the TempNet.} \label{archfig} \end{figure} CNNs typically are used with images, and since images are represented with three color channels in most applications, a CNN that processes an input image typically has three filters. The dataset we employed, on the other hand, by its nature, has only one channel, which is hourly rainfall measurements. Thus a CNN that works on a single channel of input was built. However, since the neural network expects two 2D rain map as input, we had to use two different series of convolutional layers to learn the pattern over them first. Then the difference of those convolutional layers’ outputs was added to the first frame in a skip connection fashioned architectural design choice that was introduced to improve the convergence of neural networks over the training data \citep{he2016deep}. Finally, that summation was fed to another series of convolutional layers to output the intermediate frame between two input frames (Figure \ref{archfig}). The network described here was trained using L1 Loss (also known as Mean absolute error) as the cost function and Adam \citep{kingma2014adam} as the optimizer with the help of a Reduce-on-Plateau learning rate scheduler over the training loss. The network was trained on the training dataset described in the Dataset subsection on NVIDIA Titan V GPUs using the PyTorch numeric computing library \citep{paszke2019pytorch}. As for hyperparameters, batch size of 32, the initial learning rate of 1e-3, and the number of epochs of 50 without early stop were used. \begin{figure} \centering \includegraphics[scale=0.07]{fig.jpg} \caption{Change in epoch time, training loss and test loss over 50 epochs of training.} \label{resfig} \end{figure} \section{Results \& Discussions} This section defines performance metrics and presents results using those metrics for both the optical flow based interpolation method and the TempNet. The loss changes (L1 Loss) over both training and test datasets during 50 epochs of training are given in Figure \ref{resfig} along with epoch times. As the figure suggests, the performance of the network steadily increases over epochs and gets stabilized after the 40th epoch. It is worth noting that the costs reported in Figure 3 are averaged over the respective datasets, and they are for normalized values. We report three metrics for both methods, namely Mean Absolute Error (MAE), Non-Zero Loss (NZL), and Ground Non-Zero Loss (GNZL). MAE reports the mean of the absolute values of the differences between estimated and actual 2D rain maps in the test dataset. NZL reports the MAE but only for non-zero values over estimated and actual 2D rain maps. GNZL, on the other hand, reports MAE for non-zero values in the actual 2D rain maps. Table \ref{restab} summarizes the best training TempNet model’s performance over the test dataset as well as the optical flow based baseline’s performance using the metrics mentioned above. \begin{table}[h] \caption{Performances of two methodologies} \centering \begin{tabular}{llll} \toprule & \textbf{MAE} & \textbf{NZL} & \textbf{GNZL} \\ \midrule \textbf{Optical Flow} & 0.851 & 3.182 & 3.622 \\ \textbf{TempNet} & \textbf{0.743} & \textbf{2.750} & \textbf{2.930} \\ \bottomrule \end{tabular} \label{restab} \end{table} As Table \ref{restab} suggests, TempNet significantly outperforms the optical flow based baseline interpolation method for all of the metrics defined above by significant margins. Thus for a more accurate temporal resolution increase, TempNet offers a better solution than calculating optical flow. Beyond accuracy, one upside of using TempNet is the runtime. Since calculating optical flow and building the new frame out of two sequential frames need work over individual pixels or measurements, parallelization is challenging and, consequently, time-consuming. Conversely, the same task takes a trivial amount of time on both GPUs and CPUs using TempNet once the training is done compared to the baseline method’s runtime. We did some tests to understand the visual performance of the TempNet by increasing the temporal resolution of some events in the test dataset by three iterations, meaning increasing the temporal resolution from 5-minutes to 0.7-minutes. After visualizing the actual and generated rain maps with a rainfall map color scheme \citep{demir2018floodss}, even though we were able to see that the TempNet was not able to carry all the information regarding the rainfall in specific areas, it was still able to represent most accumulated rainfalls clearly. Alternatively, the baseline method would just visually average two input frames but not so accurately per the metrics. \section{Conclusions} In this study, we presented a CNN-based temporal resolution improvement model, TempNet, and compared it to an optical flow based baseline method. Preliminary results clearly show that TempNet outperforms the baseline model according to various metrics as well as in a runtime test. We consider this work as a significant step towards creating better rainfall maps for hydrological modeling needs such as flood forecasting \citep{xiang2021regional, sit2019decentralized} and climate change modeling \citep{rolnick2019tackling, sit2020comprehensive}.
\section{Introduction} The discovery of the first hot Jupiter 51 Peg b (\citealt{Mayor}) has opened the doors for the conceptually new branch of studies. Over 25 years of research significantly expanded our understanding of the nature of exoplanet populations. According to current estimates, most stars are likely to host planets (e.g., \citealt{Mulders}). The growth in observational data motivated fundamental work, which ultimately led to the development of the planet population synthesis method, designed to reconcile theory and observations (\citealt{IdaLin,Mordasini1,Mordasini2, Benz}). Recent realizations of the population synthesis consider more complicated migration models (\citealt{Alessi}), pebble accretion (\citealt{Chambers}), planet-planet interaction (\citealt{Alibert2}), and alternative scenarios for planetary formation through disk instability (\citealt{Forgan, Forgan2, Muller}). Another crucial improvement is to investigate the effect of stellar (\citealt{Alibert1}) and disk (\citealt{Mordasini3}) properties on planetary statistics and follow the long-term evolution (\citealt{Emsenhuber1, Emsenhuber2,Schlecker, Burn}). The above steps are aimed to provide an opportunity to directly compare observable and synthetic exoplanet populations and make predictions for the growth of the number of detected exoplanets. However, close-in planets are likely to be a subject of significant migration after the dissipation of a protoplanetary disk, which raises the need to take into account star-planet and planet-planet interaction to reproduce the observed population of exoplanets correctly (\citealt{Juric1,Emsenhuber2,Ahuir}). Various studies approached this idea from different points of view. The relative motion between the planet and the magnetized ambient wind induces star-planet magnetic interaction. Depending on the configuration of a star-planet system and the magnetic field strengths (stellar and planetary), the interaction may be either unipolar (\citealt{Laine1, Laine2}) or dipolar (\citealt{Strugarek1,Strugarek2,Strugarek3}). The first attempt to consider both regimes of magnetic interaction within one model was made by \cite{Strugarek4}. Aside from magnetic interaction, many different mechanisms responsible for planetary migration have been proposed, including planetary obliquity tides (\citealt{Millholland}), Kozai migration (\citealt{Naoz,Attia}), the gravitational interaction between hot Jupiter and its atmospheric outflows (\citealt{Kurbatov}), migration inside a disk cavity (\citealt{Debras}), secular planet-planet interaction (\citealt{Wu, Laskar,BolmontRaymond, PuLai, Becker}), and many others. Among various mechanisms, tidal interaction plays a critical role in its impact on the dynamics of the most massive close-in planets, hot Jupiters (e.g. \citealt{Ahuir}). The presence of a gravitational perturber causes large-scale equilibrium flows on the stellar surface and dynamical interior oscillations. The energy of such deformations dissipates under the effect of various factors, which leads to a redistribution of angular momentum in a star-planet system followed by planetary migration. The tidal response can thus be decomposed into two components: an equilibrium (non-wavelike) tide and a dynamical (wavelike) tide (\citealt{Zahn1,Zahn2,Zahn3}). The dynamical waves are able to propagate both in radiation and in convection zones, depending on the type of a wave. The corresponding tides are called the gravity waves and the inertial waves, respectively. Numerous studies provided prescriptions for tidal dissipation rates. Equilibrium tides have been extensively studied by \cite{Zahn2,Zahn3, Hansen1, Hansen2}. Inertial wave dissipation can be estimated using a frequency-averaged formalism developed by \cite{Ogilvie1}. The processes governing gravity wave dissipation depend on the amplitude of the ``primary'' waves. Three different regimes are possible, namely linear (\citealt{Goodman}), nonlinear (\citealt{Kumar,BarkerOgilvie1,Weinberg,Essick}), and strongly nonlinear (\citealt{Goodman,Ogilvie00,BarkerOgilvie, Barker1, Barker}). It is worth mentioning that the strength of tidal interaction can also be expressed in terms of so-called overlap integrals (\citealt{IP,PI, IPch,ChPI,ChIP}). The corresponding dissipation rates satisfy and complement the results obtained with other techniques. The aforementioned methodological approaches must be constrained by the empirical estimates. There are several ways to derive the information about star-planet interaction from the observations. The most straightforward one is the detection of the orbital decay rate through transit-timing variation. However, WASP-12b remains the only planet to date for which the orbital decay has been confirmed (\citealt{Maciejewski,Yee,Turner}). Secondly, magnetic and tidal interaction affects the outer layers of a star. The atmospheric changes induce stellar activity, which can be observed in extreme cases (\citealt{Cuntz}). Thirdly, angular momentum exchange caused by the planetary migration can enhance stellar rotation rates (\citealt{BolmontMathis,Penev,Arevalo}), leading to biases in gyrochronological ages (\citealt{Gallet}) and anomalies in the rotation period distribution of young stellar clusters (\citealt{GalletBolmont}). Planetary engulfment influences stellar rotation even more dramatically. For example, \cite{Qureshi} attributes the observed bimodality in spin-period distributions of young stellar clusters to a fraction of stars consuming a planet at the early times. Finally, the planetary merger can be accompanied by a bright optical or/and UV/X-ray transient, as shown by \cite{Metzger}. Such events can be detected even at Mpc distances, making them a potentially useful tool to test star-planet interaction models. In the present study, we follow the orbital evolution of hot Jupiters around solar-type pre-main sequence (hereafter PMS) and main sequence (MS) stars. To do so, we apply tidal dissipation prescriptions from \cite{Barker}, hereafter B20, to the stellar evolutionary models computed with the MESA code (\citealt{MESA1,MESA2,MESA3,MESA4,MESA5}). In our model, we consider equilibrium tide, inertial waves, and gravity waves. The corresponding tidal dissipation rates are subsequently used to obtain the orbital tracks for hot Jupiters with different masses and initial positions. The orbital tracks are eventually converted into the infall diagram plotted for a star with a given mass, initial rotation period, and metallicity. Based on the initial distribution of stellar and planetary parameters, hot Jupiter occurrence rate, and star formation history, we derive the statistics of planetary mergers within the Galactic thin disk. In particular, we estimate the rates of events that may be observed through the bright optical transients and transit-timing variation. The present paper updates the results obtained for hot Jupiter population in the previous works by \cite{Metzger} and \cite{Popkov}. Our model advances the studies by \cite{GalletBolmont1,BolmontGallet,Rao}, as we include gravity wave dissipation which plays the key role in shaping the distribution of planets engulfed by their host stars. At the same time, we confined ourselves to considering tidal interaction only. In future work, we will improve our simulations by taking into account other processes, like magnetic interaction (\citealt{Ahuir}) and photo-evaporation (\citealt{Rao1}). This paper is structured as follows. In Sec.~\ref{sec:model}, we emphasize the main features of our model. In Sec.~\ref{sec:orbit}, we investigate the impact of the initial conditions (stellar and planetary mass, semi-major axis, stellar rotation period, and metallicity) on the orbital evolution. Our modeling of the Milky Way hot Jupiter population is described in Sec.~\ref{sec:populaton}. The results are presented in Sec.~\ref{sec:results} and discussed in Sec.~\ref{sec:discussion}. Finally, we summarize our work in Sec.~\ref{sec:conclusion}. \section{Model description} \label{sec:model} In the present section, we describe the methods we use to simulate the orbital evolution of hot Jupiters. We start with the stellar model and then dwell on the prescriptions for orbital migration and infall scenarios. \subsection{Stellar model} \label{subsec:stellar} \label{sec:star} \begin{table} \centering \caption{Parameters used in the present wind braking model\label{tab1}} \begin{tabular}{cc} \hline Parameter & Value\\ \hline $K$ & $1.5 \times 10^{30}$ erg \\ $m$ & $0.22$ \\ $p$ & $2.3$ \\ $\chi$ & $14$ \\ $\mathrm{Ro_{sat}}$ & $0.14$ \\ $\alpha_\mathrm{MLT}$ & $1.82$ \\ \hline \end{tabular} \end{table} In the present work, the star is assumed as a spherically-symmetric uniformly rotating body. We study orbital evolution of planets around stars with masses in the range of 0.6 to 1.3 $M_{\odot}$ during the MS phase at ages less than the Galactic age (14 Gyr). We use a step of 0.1 $M_{\odot}$ in the range [0.6; 0.9] ${M_{\odot}}$ and a step of 0.05 $M_{\odot}$ in the range [0.9; 1.3] ${M_{\odot}}$. Our grid contains 8 initial rotation periods (${P_\mathrm{rot,init}}$ = 2, 2.5, 3, 3.5, 4.5, 5.5, 8, and 12 days). We compute our stellar models with the evolution code MESA r11701 and prescriptions from \cite{Gossage}. Their study provides an opportunity to extend the MIST prescriptions (\citealt{Dotter,Choi}), allowing to implement various magnetic braking laws. Few changes are made with respect to the original framework. Firstly, we disable Type 2 opacity to achieve a more realistic age of the MS termination for the solar model. Secondly, we adopt the expression for protoplanetary disk dissipation timescale from \cite{GalletBolmont}: \begin{equation} \tau_\mathrm{disk} = 10^{0.17} \; \left(\frac{P_{\rm rot,init}}{ {\rm days}}\right)^{0.86} \; \left(\frac{M_{*}}{M_{\odot}}\right)^{1.55}\, {\rm Myr}, \label{eq:disk} \end{equation} where $M_{*}$ is the stellar mass and $P_{\rm rot,init}$ --- the initial stellar rotation period. The symbol $\odot$ denotes the solar value. \begin{figure} \includegraphics[width=\columnwidth]{RotationEvolution.pdf} \caption{Evolution of the rotation period as a function of time after disk dissipation for all solar mass models with [Fe/H] = 0.0 dex.} \label{fig1_F} \end{figure} Following \cite{Rebull}, stellar rotation is held constant within the disk lifetime, as accretion and contraction compensate the magnetic wind braking and other braking processes. After disk dissipation, the total angular momentum of an isolated star decreases due to the wind torque parametrized according to the braking model from \cite{Matt, Amard}: \begin{equation} \Gamma_\mathrm{wind} = - \Gamma_{0} \left(\frac{\tau_\mathrm{cz}}{\tau_\mathrm{cz\odot}}\right)^{p} \; \left(\frac{\Omega_{*}}{\Omega_{\odot}}\right)^{p+1},\; \mathrm{Ro} > \mathrm{Ro}_\mathrm{sat}, \label{eq:braking1} \end{equation} \begin{equation} \Gamma_\mathrm{wind} = - \Gamma_{0} \chi^{p} \left(\frac{\Omega_{*}}{\Omega_{\odot}}\right), \; \mathrm{Ro} < \mathrm{Ro}_\mathrm{sat}, \label{eq:braking2} \end{equation} where \begin{equation} \Gamma_{0} = K \left(\frac{R_{*}}{R_{\odot}}\right)^{3.1}\; \left(\frac{M{*}}{M_{\odot}}\right)^{0.5} \; \gamma^{-2m}, \label{eq:braking3} \end{equation} \begin{equation} \gamma = \sqrt {1 + 193\left(\frac{\Omega_{*}}{\omega_\mathrm{crit}}\right)^2}, \label{eq:braking4} \end{equation} $\omega_\mathrm{crit} = \sqrt{\frac{GM_*}{R_*^3}}$; $R_{*}$ and $\Omega_{*}$ are the stellar radius and angular rotation rate, respectively. $\mathrm{Ro}$ is the Rossby number, defined as \begin{equation} \mathrm{Ro} = \frac{2\pi}{\Omega_{*}\tau_\mathrm{cz}}, \label{eq:braking5} \end{equation} with $\tau_\mathrm{cz}$ the convective turnover timescale at one half a pressure scale height above the bottom of the outermost convection zone. This quantity is derived in the same manner as in \cite{Gossage}: \begin{equation} \tau_\mathrm{cz}(r) = \alpha_\mathrm{MLT}H_\mathrm{P}(r)/v_\mathrm{c}(r), \label{eq:braking6} \end{equation} where $\alpha_\mathrm{MLT}$ is the convective mixing length parameter, $H_\mathrm{P}(r)$ is the scale height, and $v_\mathrm{c}(r)$ is the convective velocity. The adopted parameters of the wind braking model are given in Table~\ref{tab1}. Fig.~\ref{fig1_F} illustrates the spin evolution of solar mass stars with different initial periods of rotation. The rotation periods of stars with the same mass converge into the single $P_\mathrm{rot}(\mathrm{age})$ dependence, allowing to define the gyrochronological ages of the isolated MS stars based on their angular frequency measurements. \subsection{Migration model} \label{subsec:migration} Our simulations are based on the assumption that the only way a star-planet system can lose its angular momentum is due to the magnetic wind braking. Thus we begin with the following expression: \begin{equation} \frac{\d L_{*}}{\d t} + \frac{\d L_\mathrm{pl}}{\d t} = \Gamma_\mathrm{wind}, \label{eq:orbit1} \end{equation} where $L_{*}$ and $L_\mathrm{pl}$ are the stellar angular momentum and the angular momentum of the planetary orbit, respectively: \begin{equation} L_{*}= \Omega_{*} I_{*}, \label{eq:orbit2} \end{equation} \begin{equation} L_\mathrm{pl}= n \,M_\mathrm{pl}\, a^2. \label{eq:orbit3} \end{equation} \begin{equation} n= \sqrt{\frac{G M_{*}}{a^3}}. \label{eq:orbit4} \end{equation} \noindent $I_{*}$ is the stellar moment of inertia, $n$ is the orbital angular frequency, $a$ is the semi-major axis, and $M_\mathrm{pl}$ is the planetary mass. In the present study, we focus on the dynamics of a star-planet system composed of a spherically-symmetric uniformly rotating star and a point-mass planet on a circular equatorial orbit. In eq.(\ref{eq:orbit3}), we neglect planetary spin. This is a reasonable assumption as the planet's amount of spin angular momentum is negligible compared with the orbital angular momentum. We note, though, that the planetary spin can affect close-in systems through the obliquity-driven tides (\citealt{Millholland}). However, this possibility is beyond the scope of the present research. Given that hot Jupiter rotation is typically synchronized within a relatively short timescale (\citealt{Guillot}), we expect that only stellar tides are significant in the context of the orbital migration of hot Jupiters (the same conclusion was reached in \cite{Matsumura}). Angular momentum transfer establishes the relationship between orbital migration and spin evolution in the star-planet system. Combining eqs.(\ref{eq:orbit1})~--~(\ref{eq:orbit4}), we obtain the expression for the derivative of the stellar angular rotation rate: \begin{equation} \frac{\d \Omega_{*}}{\d t} = \frac{1}{I_{*}} \left(\Gamma_\mathrm{wind} - \Omega_{*} \frac{\d I_{*}}{\d t} - \frac{1}{2} M_\mathrm{pl} \sqrt{\frac{G M_{*}}{a}} \frac{\d a}{\d t} \right). \label{eq:orbit5} \end{equation} Tidally induced planetary migration impacts the host's spin, which, in turn, modifies its internal structure through rotationally-driven mixing and centrifugal deformation. However, given that this effect is relatively small, we assume no feedback on the stellar structure caused by the angular momentum exchange. The planetary migration rate is determined by the tidal quality factor $Q'$, which characterizes the efficiency of tidal energy dissipation. The tidal quality factor is proportional to the ratio of the maximum energy stored in the tide to the amount of energy dissipated over one tidal period. The value of $Q'$ depends on the tidal forcing frequency $\omega_\mathrm{t} = 2|n - \Omega_{*}|$ and stellar properties, including rotation. The evolution of the semi-major axis of the planet in the case of circular and aligned orbits is given by (B20): \begin{equation} \frac{1}{a}\frac{\d a}{\d t} = \frac{\Omega_{*} - n}{|\Omega_{*} - n|}\frac{9n}{2} \left(\frac{M_\mathrm{pl}}{M_{*}} \right) \left(\frac{R_{*}}{a} \right)^5 \frac{1}{Q'}. \label{eq:orbit7} \end{equation} Eq.(\ref{eq:orbit7}) outlines the region of the inward migration located inside the corotation radius $a_\mathrm{cor}$ (where $n = \Omega_{*}$). If the planet is located outside $a_\mathrm{cor}$, it migrates away from the host star. Eq.(\ref{eq:orbit7}) also shows that the migration rate anticorrelates with the tidal quality factor $Q'$. High stellar angular rotation rate provides rapid migration, especially for close-in planets. Eqs.(\ref{eq:orbit5}) and (\ref{eq:orbit7}) govern our star-planet simulations. The computation is interrupted after a hot Jupiter merges with the host star. We assume that the coalescence occurs when the orbital frequency raises above $\omega_\mathrm{crit}$. We independently treat the phase of the orbital evolution when the planet gets captured by the $n = 2 \Omega_{*}$ limit during the phase of stellar contraction. As noted in subsection~\ref{subsec:tide}, inertial waves are no longer active inside the corresponding orbital radius, which significantly slows down the migration in contrast to the outer region. Taking into account that gravity wave dissipation does not operate during PMS (which is shown in Fig.~\ref{fig2_F}), the planet located under the $n = 2 \Omega_{*}$ limit is not able to approach the stellar surface within the short timescale. As the star contracts, the $n = 2 \Omega_{*}$ limit crosses the orbit enabling inertial wave excitation and thus promoting rapid planetary migration until the planet returns below the limit. The hot Jupiter stays on the edge of the inertial wave excitation region and migrates inwards as the star spins up. This scenario is reviewed in \cite{BolmontGallet,Rao}. In order to speed up the computation in the situation described above, we substitute $n = 2 \Omega_{*}$ into eqs. (\ref{eq:orbit4}) and (\ref{eq:orbit5}). The differential equation describing the evolution of stellar rotation takes the form: \begin{equation} \frac{\d \Omega_{*}}{\d t} = \frac{1}{I_{*}} \left( \frac{\Gamma_\mathrm{wind} - \Omega_{*} \frac{\d I_{*}}{\d t}}{1-\frac{2}{3}\frac{I_\mathrm{pl}}{I_{*}}} \right), \label{eq:orbit8} \end{equation} with $I_\mathrm{pl} = M_\mathrm{pl} \; a^2$ and $a = \left( \frac{GM_{*}}{(2\Omega_{*})^2} \right)^{1/3}$. Eq.(\ref{eq:orbit8}) reduces the number of differential equations to one, which significantly simplifies calculations. When the planet is able to unbind from the $n = 2 \Omega_{*}$ limit, we return to the standard system of differential equations, represented by eqs.(\ref{eq:orbit5}) and (\ref{eq:orbit7}). \subsection{Tidal dissipation} \label{subsec:tide} In the following subsection, we briefly outline the prescriptions from B20 that we use to derive the tidal quality factor $Q'$. The common approach to study tidal interactions is to decompose the potential of the perturbing body into a Fourier series and separately explore the tidal response to every mode of perturbation. Similarly to B20, we focus on the $l = m = 2$ mode related to the most important tidal component, particularly for circular and aligned orbits considered in this research. The tidal quality factor representing the dissipation of equilibrium tide is given by the expression: \begin{equation} \frac{1}{Q'_\mathrm{eq}} = \frac{16\pi G}{3(2l+1)R_{*}^{2l+1}|A|^{2}}\frac{D_\mathrm{v}}{|\omega_\mathrm{t}|}, \label{eq:tide_eq1} \end{equation} with $A^2 = 6\pi/5$ and $D_\mathrm{v}$ the viscous dissipation of equilibrium tide calculated by integrating over the radial extent of each convective region: \begin{equation} D_\mathrm{v} = \frac{1}{2}\omega_\mathrm{t}^2 \int r^{2}\mu(r) D_\mathrm{l}(r)\d r, \label{eq:tide_eq2} \end{equation} where $\mu(r) = \rho(r)\nu_\mathrm{E}(r)$. Here $\rho(r)$ is the density and $\nu_\mathrm{E}(r)$ is the effective turbulent viscosity. \cite{Duguid1,Duguid2,VidalBarker1,VidalBarker} reported the existence of three different regimes of tidal dissipation with frequency-independent, intermediate, and quadratic scaling laws for $\nu_\mathrm{E}(r)$, respectively. The quadratic law is relevant to high-frequency tidal forcing valid for close-in planets, which is why we assume the only scaling law for the effective turbulent viscosity: \begin{equation} \nu_{E}(r) = \frac{25}{\sqrt{20}}\left(\frac{\omega_\mathrm{c}}{\omega_\mathrm{t}}\right)^2 u_\mathrm{c} l_\mathrm{c}, \label{eq:tide_eq3} \end{equation} with $u_\mathrm{c}$ the convective velocity, $l_\mathrm{c}$ the mixing-length, and $\omega_\mathrm{c} = u_\mathrm{c}/l_\mathrm{c}$ the convective frequency. Such approximation allows one to make the integrand in eq.~(\ref{eq:tide_eq2}) $\omega_\mathrm{t}$-independent, thus speeding up the computation and providing an opportunity to conduct a large number of simulations. The function $D_\mathrm{l}(r)$ is defined by the components of equilibrium tidal displacement vector \mbox{\boldmath$\xi$} (eqs. (21), (22) in B20) which is obtained by solving the ordinary differential equation with boundary conditions given by eqs. (16)--(18) in B20. Inertial wave dissipation is estimated within the framework of the frequency-averaged formalism described in \cite{Ogilvie1}. The above-mentioned work provided the commonly accepted prescription which was subsequently applied in \cite{Mathis} to calculate the dissipation rates based on a simplified homogeneous two-layer stellar model with radiative core and convective envelope. Using the same approach, B20 derived relations for a more complex heterogeneous model adopted in the present paper. Following B20, the tidal quality factor for inertial wave dissipation can be evaluated from the equation: \begin{equation} \frac{1}{Q'_\mathrm{iw}} = \frac{32\pi^2 G}{3(2l+1)R_{*}^{2l+1}|A|^{2}}(E_\mathrm{l} + E_\mathrm{l-1} + E_\mathrm{l+1}), \label{eq:tide_iw1} \end{equation} with the parameters $E_\mathrm{l}$,$E_\mathrm{l-1}$, and $E_\mathrm{l+1}$ specified by eqs.~(31)--(33) in B20. We note that inertial waves can only be excited when the tidal frequency $\omega_\mathrm{t}$ is in the range $\mathrm{[-2\Omega_{*},2\Omega_{*}]}$. The quantities $E_\mathrm{l}$,$E_\mathrm{l-1}$, and $E_\mathrm{l+1}$ are proportional to the squared angular velocity $\Omega_{*}^2$, which explains fast planetary migration around rapidly rotating stars, see Sec.~\ref{sec:orbit}. In this work, we dwell on a strongly nonlinear gravity wave dissipation regime. Gravity waves are launched near radiative/convective boundary, increase their amplitude while propagating toward stellar center due to geometric focusing, overturn the background stratification, and break. Such interaction results in effective energy release, as all the energy stored in the primary waves is absorbed by stellar interior, providing the dominant mechanism for planetary migration. The corresponding tidal quality factor is estimated from: \begin{equation} \frac{1}{Q'_\mathrm{gw}} = \frac{2 [\Gamma(\frac{1}{3})]^2}{3^{\frac{1}{3}}(2l+1)(l(l+1))^{\frac{4}{3}}} \frac{R_{*}}{G M_{*}^2} \mathcal{G} |\omega_\mathrm{t}|^{\frac{8}{3}}, \label{eq:tide_gw1} \end{equation} where \begin{equation} \mathcal{G} = \sigma_\mathrm{c}^2 \rho_\mathrm{c} r_\mathrm{c}^5 \bigg|\frac{\d \,N^2}{\d \,\ln\,r}\bigg|_{r=r_\mathrm{c}}^{-\frac{1}{3}}. \label{eq:tide_gw2} \end{equation} Subscript $c$ refers to radiative/convective interface, $N$ is the buoyancy frequency, and the parameter $\sigma_\mathrm{c}$ depends on the derivative of the dynamical tide radial displacement (see eq.(43) in B20). The feasibility of a strongly nonlinear regime is determined by the initial amplitude of primary waves, which correlates with the tidal frequency and the planetary mass. For stars with radiative core, B20 proposed wave-breaking criterion (a similar criterion is derived in \cite{Ogilvie00,BarkerOgilvie}): \begin{equation} A_\mathrm{nl}^2 = \frac{3^{2/3}54\sqrt{6}[\Gamma(\frac{1}{3})]^2}{25\pi(l(l+1))^{\frac{4}{3}}} \frac{\mathcal{G} C^5}{\rho_0} \left(\frac{M_\mathrm{pl}}{M_{*}}\right)^2 \left(\frac{R_{*}}{a}\right)^6 |\omega_\mathrm{t}|^{-13/3} \gtrsim 1, \label{eq:tide_gw3} \end{equation} with $\rho_0$ the central density and $C$ the slope of the buoyancy frequency profile near center of the star. For the typical hot Jupiter masses, condition (\ref{eq:tide_gw3}) is satisfied at late ages of the MS. Given that the star has already lost most of its angular momentum due to magnetic wind braking, it is useful to assume a non-rotating configuration while calculating gravity wave dissipation ($\omega_\mathrm{t} = 2n$). The latter justifies neglecting the rotational effects on the tidal quality factor $Q'_\mathrm{gw}$, investigated in \cite{IPch}. Finally, the wave-damping criterion can be transformed into the expression for either the critical semi-major axis $a \gtrsim a_\mathrm{crit}(M_{*},M_\mathrm{pl},t)$, or the critical planetary mass $M_\mathrm{pl} \gtrsim M_\mathrm{crit}(M_{*},a,t)$ ($a_\mathrm{crit}$ is not related to $\omega_\mathrm{crit}$ from subsection~\ref{subsec:stellar}). When the condition (\ref{eq:tide_gw3}) is not satisfied, we assume no gravity wave dissipation. In reality, dissipation below the critical amplitude is still expected due to linear and weakly nonlinear damping. However, the efficiency of the relevant processes is markedly reduced compared with the fully damped regime implemented in this work. For stars possessing convective core, B20 used WKB theory to derive the criterion for wave breaking to occur (see eq. (53) in B20). However, when applied to close-in objects, eq. (53) of B20 gives the critical mass value exceeding $\mathrm{13\;M_\mathrm{J}}$ before the terminal-age main sequence (TAMS). Thus we do not consider gravity wave dissipation in stars with convective cores. Our assumption is confirmed by the results presented in B20. The absence of gravity wave dissipation is one explanation for the survival of the most massive hot Jupiters, which are typically found around F-stars with convective cores (\citealt{BarkerOgilvie0, BarkerOgilvie}). \begin{figure} \includegraphics[width=\columnwidth]{Tides2.pdf} \caption{Tidal quality factor as a function of time after disk dissipation ($M_{*}$ = 1.0$ \; M_{\odot}$, [Fe/H] = +0.2 dex, $\tau_\mathrm{disk}$ = 6.4 Myr, $P_\mathrm{orb}$ = 1 day, $P_\mathrm{rot}$ = 5.5 days). Stellar rotation and planetary orbital separation are held constant. Lines, from top to bottom, represent equilibrium tide, inertial waves, and gravity waves, respectively. Red, black, magenta, and blue squares (from left to right) correspond to the initiation of gravity wave dissipation for a planet with $M_\mathrm{pl}$ = 0.3 $M_\mathrm{J}$, 1 $M_\mathrm{J}$, 3 $M_\mathrm{J}$, and 10 $M_\mathrm{J}$, respectively.} \label{fig2_F} \end{figure} Fig.~\ref{fig2_F} compares the tidal quality factors due to each tidal mechanism as a function of time after disk dissipation. From now on, our reference model corresponds to [Fe/H] = +0.2 dex since hot Jupiters are found to orbit metal-rich stars preferentially. The mean metallicity of the hot Jupiter hosts is enhanced by around 0.2 dex relative to the field star population (\citealt{Petigura}). Chemical abundances are scaled according to the solar chemical mixture by \cite{Asplund}. It is clear that, when enabled, the dynamical tide dissipation makes a leading contribution. Equilibrium tide dissipation, in turn, is much weaker. However, its occurrence does not depend on the fulfillment of any conditions. Another important note concerns the dependence of the beginning of gravity wave dissipation on planetary mass, represented by the colored squares in Fig.~\ref{fig2_F}. More massive planets induce gravity waves with higher amplitude, which is why they are able to overturn the stratification and break a few billion years earlier. As a result, the duration of the rapid phase of migration is longer, with more distant planets merging with the host star before the TAMS. The dissipation of inertial waves is more intense during the PMS and remains almost constant on the MS. If both inertial and gravity waves dissipate, the resulting tidal quality factor is expressed by: \begin{equation} \frac{1}{Q'} = \frac{1}{Q'_\mathrm{eq}} + \frac{1}{Q'_\mathrm{iw}} + \frac{1}{Q'_\mathrm{gw}} \label{eq:tide} \end{equation} \subsection{Types of mergers} \label{subsec:merger} We follow the classification by \cite{Metzger}, who divided planet-star mergers into three categories, depending on the ratio between planetary and stellar mean densities $\rho_\mathrm{pl}/\rho_{*}$. If the relative density is high ($\rho_\mathrm{pl}/\rho_{*}>5$), interaction occurs without tidal disruption or Roche lobe overflow, leading to a very bright transient. This case is called direct impact. However, we show in subsection~\ref{subsec:density} that hot Jupiters are the planets with comparatively low mean densities. At the same time, the studied stars have high mean densities, as we consider evolutionary stages before main-sequence termination. As a result, direct impacts do not occur in our simulations. In the case of average relative densities ($1<\rho_\mathrm{pl}/\rho_{*}<5$), tidal forces destroy the planet, which is called tidal disruption. Such events are accompanied by the bright transients lasting for weeks or months with the peak luminosity (\citealt{Popkov}): \begin{equation} L_\mathrm{peak} = 9.5 \times 10^{36} \; \frac{M_\mathrm{pl}}{M_\mathrm{J}}\; {\rm erg}\; {\rm s^{-1}}, \label{eq:luminosity} \end{equation} where $M_\mathrm{J}$ is the Jupiter mass. Finally, if the planet has a lower density than the star ($\rho_\mathrm{pl}/\rho_{*}<1$), the corresponding interaction is called stable accretion. Stable accretion proceeds on a long timescale with no significant bright events (\citealt{Valsecchi,Jackson}), but might result in spin-up and chemical enrichment of stellar outer layers. \subsection{Density of hot Jupiters} \label{subsec:density} In subsection~\ref{subsec:merger}, we discuss the impact of hot Jupiter density on the outcome of a star-planet interaction. To obtain density as a function of a planetary mass, we select from the NASA Exoplanet Archive all close systems ($\mathrm{1\;{\rm day} < P_\mathrm{orb} < 10\;{\rm days}}$) with a hot Jupiter ($\mathrm{0.3\;M_\mathrm{J} < M_\mathrm{pl} < 10\;M_\mathrm{J}}$) orbiting a solar-type star ($\mathrm{0.6\; M_{\odot} < M_{*} < 1.3 \;M_{\odot},\; 4500\; K < T_\mathrm{eff} < 7000\; {\rm K},\; log\; g > 4.0}$), for which both planetary mass and radii estimates are available. The computed density ($\rho_\mathrm{pl} = \frac{M_\mathrm{pl}}{4/3\pi R_\mathrm{pl}^3)}$) is plotted against mass of the planet in Fig.~\ref{fig3_F}. The data is binned and cleaned as we remove the points lying outside $\mathrm{3\sigma}$ range with respect to the corresponding bin. The mass--density dependence is subsequently fitted with the following expression: \begin{equation} \rho_\mathrm{pl} = 0.18 \; \left(\frac{M_\mathrm{pl}}{M_\mathrm{J}}\right)^{1.14}\; {\rm g}\; {\rm cm^{-3}}. \label{eq:density} \end{equation} Fig.~\ref{fig3_F} shows that the majority of hot Jupiters has a lower density than the mean density of the Sun ($\mathrm{\rho_{\odot} = 1.4 \; {\rm g}\; {\rm cm^{-3}}}$), thus most of the mergers do not produce bright transients. \begin{figure} \includegraphics[width=\columnwidth]{M_Rho.pdf} \caption{Mass--density diagram. The planetary mass is given in Earth masses. Green points represent the initial sample taken from \url{https://exoplanetarchive.ipac.caltech.edu/}. Red points with error bars represent bins. Black solid line corresponds to the best fit, expressed by eq.(\ref{eq:density}).} \label{fig3_F} \end{figure} \section{Orbital evolution} \label{sec:orbit} In this section, we investigate the effect of various factors on the orbital evolution of hot Jupiters. We start with varying the parameters associated with the planets and then move on to stellar properties. \subsection{Impact of the initial semi-major axis} \label{subsec:axis} Fig.~\ref{fig4_F} illustrates the secular evolution of a star-planet system composed of a solar-mass star with a median initial rotation and a hot Jupiter with $M_\mathrm{pl} = 3\;M_\mathrm{J}$. We consider five initial orbital periods: $P_\mathrm{orb,init}$ = 2, 2.5, 3, 4, and 5 days. Colored solid lines represent the planetary migration, while colored dashed and dotted lines correspond to the dynamics of the corotation radius and the $n = 2 \Omega_{*}$ limit, respectively. In all five cases, the planet is initially located in the region of inward migration. Three of the most distant planets are able to excite the inertial waves inside the host star. As the star spins up, these planets cross the corotation radius, reversing migration from inward to outward. Hot Jupiters with $P_\mathrm{orb,init}$ = 2 and 2.5 days, in turn, are initially located in the region of slow migration where only equilibrium tide operates. Subsequently, they cross the $n = 2 \Omega_{*}$ limit, significantly enhancing the migration rates. However, only the planet with $P_\mathrm{orb,init}$ = 2 days is located close enough to be captured by the $n = 2 \Omega_{*}$ limit. In all five cases, the planet gets into the equilibrium tide region after the star has lost most of its angular momentum due to the wind braking. Unlike the models from \cite{BolmontGallet}, our stellar evolutionary tracks do not reveal a rapid decrease of the stellar radius at 20 Myr. Besides, the equilibrium tide dissipation computed using the prescriptions from B20 is too weak to result in the engulfment of the closest hot Jupiter within the first billion years, in contrast to Fig. 8 of \cite{BolmontGallet}. The initiation of gravity wave dissipation shown by the black circles serves as a turnaround point in the context of the orbital evolution for all hot Jupiters, except for the furthest one, eventually leading to the coalescence with the host star. One can see that the wave-breaking criterion becomes satisfied at almost the same age for all star-planet systems with the same planetary mass. This is due to the robust dependence of $A_\mathrm{nl}^2$ on $C$ expressed by eq.(\ref{eq:tide_gw3}). The quantity $C$, which characterizes the strength of the stratification at the center of a star, increases throughout stellar evolution on the MS. The latter is shown in Fig. 10 of B20. Five billion years of gravity wave dissipation is enough for a planet represented by red color to merge with the star. Hot Jupiters shown in green and magenta require roughly a billion years to do so. The planet represented by blue color falls onto the star within the first thousand years since the beginning of gravity wave breaking. \begin{figure} \includegraphics[width=\columnwidth]{OrbitalEvolution_a.pdf} \caption{Secular evolution of hot Jupiters with $M_\mathrm{pl} = 3\;M_\mathrm{J}$ around a solar-mass star with $P_\mathrm{rot,init}$ = 5.5 days and [Fe/H] = +0.2 dex. Black solid and dashed lines indicate the corotation radius and the $n = 2 \Omega_{*}$ limit of an isolated star, respectively. Gray dotted line represents stellar surface. Colored solid lines correspond to the orbital period evolution of the planets. From top to bottom: $P_\mathrm{orb,init}$ = 5, 4, 3, 2.5, 2 days. Colored dotted and dashed lines represent the corotation radius and $n = 2 \Omega_{*}$ limit of a star in the presence of a corresponding planet, respectively. Black circles indicate the starting time of gravity wave dissipation, black crosses restrict the phase of the orbital evolution when hot Jupiter is captured on the $n = 2 \Omega_{*}$ limit.} \label{fig4_F} \end{figure} \subsection{Impact of planetary mass} \label{subsec:plmass} Fig.~\ref{fig5_F} demonstrates the effect of planetary mass on the secular evolution of a star-planet system formed by a star with the same properties as in subsection~\ref{subsec:axis}. The left panel represents the population of hot Jupiters with $M_\mathrm{pl} = 1\;M_\mathrm{J}$. As opposed to the case of massive planets with $M_\mathrm{pl} = 7\;M_\mathrm{J}$, shown on the right, the inertial waves do not induce rapid migration. Less massive hot Jupiters are not captured on the $n = 2 \Omega_{*}$ limit and undergo slow tidal evolution. As a result, they are located close to the initial orbit at the beginning of gravity wave dissipation. \begin{figure*} \begin{multicols}{2} \includegraphics[width=\linewidth]{OrbitalEvolution_c.pdf}\par \includegraphics[width=\linewidth]{OrbitalEvolution_b.pdf}\par \end{multicols} \caption{Secular evolution of hot Jupiters with different masses. Designations and stellar properties are the same as those in Fig.~\ref{fig4_F}. Left panel corresponds to $M_\mathrm{pl} = 1\;M_\mathrm{J}$, right panel corresponds to $M_\mathrm{pl} = 7\;M_\mathrm{J}$.} \label{fig5_F} \end{figure*} On the contrary, the right panel of Fig.~\ref{fig5_F} indicates that inertial waves strongly influence the dynamics of close planets with $M_\mathrm{pl} = 7\;M_\mathrm{J}$. The planets shown in blue and magenta attach to the $n = 2 \Omega_{*}$ limit and migrate effectively before zero-age main sequence (ZAMS). More massive hot Jupiters are able to spin up the host star to a higher angular velocity. Consequently, these planets leave the $n = 2 \Omega_{*}$ limit closer to the stellar surface, leading to early engulfment without the impact of gravity waves. Note that initially the closest planet merges with the host star later than the second closest hot Jupiter. Such change of order happens because the distant planet is able to deposit more angular momentum into the stellar spin, forcing the $n = 2 \Omega_{*}$ limit to move lower. Another essential feature concerns the dissipation of gravity waves. According to Fig.~\ref{fig5_F}, gravity waves provide the infall of more distant planets compared to low-mass hot Jupiters. First of all, this is due to the fact that the migration rate, expressed by eq.(\ref{eq:orbit7}), correlates linearly with planetary mass. Secondly, as reported in subsection \ref{subsec:tide}, the dissipation of gravity waves begins earlier for massive hot Jupiters, meaning that such objects have more time to merge before the TAMS. To investigate the fate of hot Jupiter depending on its location in the parameter space, we perform our simulations with 30 planetary masses uniformly spaced in the range [0.3,13.6] $M_\mathrm{J}$ and 60 initial positions uniformly spaced in the range [0.02,0.10] AU. For every engulfment, we determine the type, age of the system, luminosity of event (for bright transients), and luminosity of the star. The results are plotted in Fig.~\ref{fig6_F}. This so-called infall diagram reproduces the main information reported in the first two subsections of the present section. The overall infall region, shown by blue and green markers, widens with increasing planetary mass. The mergers occurring without gravity waves, represented by blue triangles, correspond to the planets with $M_\mathrm{pl} \gtrsim 5\;M_\mathrm{J}$ initially located inside the [0.02,0.04] AU interval. Most of the infall region in the parameter space is occupied by coalescences accompanied by gravity wave dissipation, represented by green circles. \begin{figure} \includegraphics[width=\columnwidth]{M10R55.pdf} \caption{Infall diagram for a solar-mass star with $P_\mathrm{rot,init}$ = 5.5 days and [Fe/H] = +0.2 dex. The depicted mergers are prior to the end of the main sequence of the host.} Red crosses correspond to the no-infall region. Orange diamonds indicate the intermediate outcome (no infall, but the planet reduces the semi-major axis by more than 20 \% during the gravity wave dissipation phase). Green circles mark the infall due to gravity waves. Blue triangles indicate the infall proceeding before the initiation of gravity wave breaking. \label{fig6_F} \end{figure} \subsection{Impact of the initial stellar rotation rate} \label{subsec:rotation} Stellar spin is another significant factor governing the tidal evolution of a star-planet system. Fig.~\ref{fig7_F} demonstrates the migration around a solar-mass star with the initial rotation period of 3 and 12 days. The planets orbiting fast rotators, shown in the left panel, undergo rapid migration under the dissipation of inertial waves. Those located outside the corotation radius move far enough from the host star to remain stable against tidal inspiral by the TAMS. Hot Jupiters initially lying inside the region of inward migration merge with the star through the dissipation of equilibrium tide. Thus, the contribution of gravity waves to secular evolution around fast rotators is substantially reduced in favor of dominating inertial waves. Conversely, the coalescence with a slow rotator is a direct consequence of gravity wave dissipation. The right panel reveals no migration around the star with $P_\mathrm{rot,init}$ = 12 days until the wave-breaking criterion is satisfied, which highlights the unimportance of equilibrium tides when modeling the migration around slow rotators. In this way, star-planet mergers occur toward the end of the evolution on the MS, in contrast to the case of a rapid rotator. To investigate the impact of stellar rotation in detail, we refer the reader to Fig.~\ref{ap1} in Appendix A, which contains the infall diagrams obtained for every solar-mass model. Note that extremely fast initial rotation leads to the coalescence of the most massive hot Jupiters with the PMS stars. In the absence of gravity waves, the infall region is outlined by the initial location of the corotation radius. The importance of gravity waves in the context of orbital decay gradually increases with decreasing initial spin. Finally, the overall infall region reaches the maximum for the models with slow rotation ($P_\mathrm{rot,init}$ = 8, 12 days). \begin{figure*} \begin{multicols}{2} \includegraphics[width=\linewidth]{OrbitalEvolution_ar.pdf}\par \includegraphics[width=\linewidth]{OrbitalEvolution_br.pdf}\par \end{multicols} \caption{Secular evolution of hot Jupiters with $M_\mathrm{pl} = 3\;M_\mathrm{J}$ around solar-mass stars with different initial spin. Designations are the same as those in Fig.~\ref{fig4_F}. Left panel corresponds to $P_\mathrm{rot,init}$ = 3 days, right panel corresponds to $P_\mathrm{rot,init}$ = 12 days.} \label{fig7_F} \end{figure*} \subsection{Impact of stellar mass} \label{subsec:stmass} \begin{figure} \includegraphics[width=\columnwidth]{RotationEvolution1.pdf} \caption{Evolution of the rotation period as a function of time after disk dissipation for isolated stars with $M_\mathrm{*} = 0.8, 1.0, 1.2 \; M_\mathrm{\odot}$. Stellar models correspond to [Fe/H] = +0.2 dex.} \label{fig8_F} \end{figure} For stars possessing radiative core, the contribution of gravity waves depends on stellar mass. Fig.~\ref{ap2} shows infall diagrams for a 0.8 $M_\mathrm{\odot}$ star. The distribution of planets unstable against orbital decay around fast rotators is slightly different from what is illustrated in Fig.~\ref{ap1} for a 1.0 $M_\mathrm{\odot}$ star. The corresponding variation is related to the initial position of the corotation radius for a given orbital period. The fate of planets orbiting median and slow rotators is more sensitive to mass of the host. First of all, one can see the absence of dissipation of gravity waves produced by low-mass hot Jupiters in a 0.8 $M_\mathrm{\odot}$ star. The critical planetary mass required for gravity wave damping within the first 14 Gyr increases sharply with decreasing stellar mass. Accordingly, we do not expect gravity wave breaking in stars with $M_* \leq 0.6 \; M_\mathrm{\odot}$. Even if the planet is above the critical mass limit, it does not have enough time to merge from the initial separation of more than 0.05 AU as the phase of active migration begins too late. Secondly, as demonstrated in Fig.~\ref{fig8_F}, low-mass stars spin up to a higher angular velocity before ZAMS. Thus, inertial waves dissipate more effectively and prevail over gravity waves. It means that hot Jupiters initially located outside the corotation radius migrate far enough to remain stable while the closest hot Jupiters manage to merge before the starting time of gravity wave breaking. This feature is observed in Fig.~\ref{ap2}, as the fraction of planets unaffected by gravity waves is higher than in the diagrams computed for the solar-mass model. In stars with convective cores, the whole picture changes dramatically, which is revealed for a 1.2 $M_\mathrm{\odot}$ star in Fig.~\ref{ap3}. As noted in subsection~\ref{subsec:tide}, these stars do not exhibit gravity wave dissipation during the MS stage. The latter is the main factor coming into play. The upper two diagrams on the right in Fig.~\ref{ap3} demonstrate the offset in the distribution of decaying planets orbiting median rotators toward massive hot Jupiters. The infall region corresponding to slow rotators is separated into two distinct parts. The part related to a smaller semi-major axis represents hot Jupiters migrating under the dissipation of equilibrium tide only. The right part refers to a hot Jupiter population initially located above the $n = 2 \Omega_{*}$ limit, hence being able to excite inertial waves. Rapid migration driven by the dynamical tide allows the planets to get closer to the stellar surface before ZAMS. Consequently, these hot Jupiters manage to fall onto the host star due to the dissipation of equilibrium tide. \subsection{Impact of metallicity} \label{subsec:metallicity} Stellar chemical composition strongly affects the population of planetary systems. Metal-rich stars possess protoplanetary disks with high dust to gas ratio. For such disks, solid accretion is enhanced, which is the necessary condition for the formation of close-in giant planets. Thereby, hot Jupiters are more common around stars with high abundance. The latter has confirmation both at theoretical and observational levels. For instance, applying population synthesis calculations, \cite{Mordasini3} confirmed the excess in the metallicity of hot Jupiter hosts. This result was later reproduced by \cite{Alessi}. Moreover, \cite{Mordasini3} showed that, at low metallicities, Jovian planets cannot form inside the ice line. The above findings agree well with observational trends (\citealt{Santos,Fischer,Adibekyan,Petigura}). Another important factor affected by metallicity is the efficiency of Type I migration which plays a critical role in shaping the initial distribution of planets in the mass--separation diagram (\citealt{Mordasini2}). In the present study, we focus on the metallicity effect on hot Jupiter migration after the disk dissipation. In particular, we find that the engulfment is more likely in metal-rich systems. This feature is especially pronounced for median rotators with $P_\mathrm{rot,init}$ between 3.5 and 5.5 days. As reported in subsection~\ref{subsec:rotation}, planets orbiting rapid rotators undergo the most intensive migration under the dissipation of inertial waves at early ages. In contrast, systems with slow rotators decay through gravity wave dissipation at late ages of the MS. The transition between these two specific regimes of star-planet dynamics is sensitive to the chemical composition of the host star, which is demonstrated in Fig.~\ref{fig9_F}. One can see that the solar-metallicity model, shown on the top, is marginally affected by gravity waves, compared with the metal-rich model depicted on the bottom. At the same time, metal-poor stars engulf their planets earlier, which opens up an opportunity for some of the most massive planets, depicted in magenta on the top, to merge with the host star before ZAMS. In order to explain in detail the reasons for this variation, we plotted the tidal quality factors for solar-mass models corresponding to three different metallicities in Fig.~\ref{fig10_F}. First of all, it is worth mentioning that, for a given age, the tidal dissipation rates lie within an order of magnitude for all three models spanning the metallicity range of typical hot Jupiter hosts. The dissipation of equilibrium tide is more effective in stars with low abundance, which is why some of the most massive hot Jupiters are able to merge with the solar-metallicity star before ZAMS. The dynamical tides are generally stronger in metal-rich stars. However, the difference in tidal quality factor for inertial waves is negligible during the phase of early migration. Consequently, metallicity does not seem to impact star-planet systems formed by a rapid rotator significantly. The enhancement of gravity wave dissipation, in turn, has a stronger effect on the infall diagrams computed for the median and slow rotators. The influence of metallicity is manifested through the quantity $\mathcal{G}$, expressed by Eq.(\ref{eq:tide_gw2}). This quantity characterizes the buoyancy frequency profile at the interface between the radiative and convective regions where gravity waves are launched. The conditions at the interface depend on the parameter $f_\mathrm{ov}$ ($f_\mathrm{ov}$ determines the efficiency of overshoot mixing, see \cite{Choi}) which is linked to metallicity. According to the adopted prescriptions from \cite{Gossage}, $f_\mathrm{ov}$ is set to 0.016, 0.011, and 0.010 in the models with [Fe/H] = 0.0, +0.2, and +0.4 dex, respectively. Probably, the biggest contribution arises from the fact that the MS duration is longer for metal-rich stars, which is reflected in a planet having more time to merge under the dissipation of gravity waves. In a star-planet system composed of a solar-mass star and hot Jupiter with $M_\mathrm{pl}$ = 5 $M_\mathrm{J}$, the associated phase of intensive planetary migration proceeds 4.2, 5.5, and 6.0 Gyr in a model with [Fe/H] = 0.0, +0.2, and +0.4 dex, respectively. The increase in time results in the extension of the infall region observable in the bottom panel of Fig.~\ref{fig9_F}. \begin{figure} \includegraphics[width=\columnwidth]{Z0.pdf} \includegraphics[width=\columnwidth]{Z1.pdf} \caption{Infall diagrams for solar-mass stars of two different metallicites. Top panel refers to [Fe/H] = 0.0 dex, bottom panel refers to [Fe/H] = +0.4 dex. $P_\mathrm{rot,init}$ = 3.5 days for both panels. Designations are the same as those in Fig.~\ref{fig6_F}. Magenta squares correspond to the infall before ZAMS.} \label{fig9_F} \end{figure} \begin{figure} \includegraphics[width=\columnwidth]{TidesEQ.pdf} \includegraphics[width=\columnwidth]{TidesIW.pdf} \includegraphics[width=\columnwidth]{TidesGW.pdf} \caption{Tidal quality factor as a function of time for solar-mass models of three metallicities. $\tau_\mathrm{disk}$ = 4.3 Myr. We have assumed the orbital period $P_\mathrm{orb}$ = 1 day and the rotation period $P_\mathrm{rot}$ = 3.5 days (both quantities are held constant). From top to bottom: tidal quality factors for equilibrium tide, inertial waves, and gravity waves. Blue, green, and red lines correspond to [Fe/H] = 0.0, +0.2, +0.4 dex, respectively. Squares correspond to the initiation of gravity wave dissipation for a planet with $M_\mathrm{pl}$ = 5 $M_\mathrm{J}$} \label{fig10_F} \end{figure} \section{Modeling hot Jupiter population} \label{sec:populaton} In order to derive statistics of planet-star mergers, one needs to set the model of the initial hot Jupiter population. Here we describe the initial distributions of stellar and planetary properties we use to obtain total coalescence rates in the Galaxy. We consider the single value of stellar metallicity [Fe/H] = +0.2 dex in accordance with the mean metallicity of the hot Jupiter hosts (\citealt{Petigura}). \subsection{Stellar initial mass function, initial spin distribution} \label{subsec:imf} The distribution of stellar mass is based on stellar initial mass function (IMF) from \cite{Kroupa}: \begin{equation} P(M < M_{*} < M + \d M) \propto \begin{cases} M^{-1.3}, & M \leq 0.5 M_{\odot}\\ M^{-2.3}, & M > 0.5 M_{\odot} \end{cases}. \label{eq:st_mass} \end{equation} We select stars lying in the mass range of 0.6 to 1.3 ${M_{\odot}}$ to create a synthetic population of hot Jupiter hosts. To parametrize the initial spin distribution, we address the NGC 2362 sample by \cite{Irwin} providing the rotation period measurements. Applying eq. (\ref{eq:disk}), we found that out of 134 objects within the mass range specified above, 64 have disk dissipation timescale below 5 Myr, the cluster's age according to \cite{Moitinho}. The initial rotation period of these objects is recalculated using a set of our MESA models of solar metallicity stars. We exclude the extremely rapid rotators with the initial rotation period lower than two days since our grid does not allow definite estimates of their initial spin by interpolating between the grid $\log \; P_\mathrm{rot, init}$ values. The remaining 118 stars are selected to obtain the initial spin distribution plotted in red in Fig.~\ref{fig11_F}. The raw data from \cite{Irwin} is shown in blue. As expected, recalculation of the initial period leads to a slight offset toward higher periods. The presented distribution is fitted by a Gaussian function: \begin{equation} p(\log \; P_\mathrm{rot,init}) \propto \exp\left(-\frac{(\log \;P_\mathrm{rot,init} - \zeta_*)^2}{2\sigma_*^2}\right), \label{eq:pdistribution} \end{equation} with $\zeta_* = 0.81$, $\sigma_* = 0.24$. Again, when simulating the initial rotation period, we exclude stars with the fastest rotation rates ($P_\mathrm{rot,init} < 2$ days). As demonstrated in subsection~\ref{subsec:rotation}, these objects do not make a significant contribution to the total number of mergers. \begin{figure} \includegraphics[width=\columnwidth]{RotationDistribution.pdf} \caption{Distribution of the initial rotation period based on the NGC 2362 sample. Blue histogram: raw data from~\protect\cite{Irwin}. Red histogram: distribution obtained after calculating the initial period of stars that passed disk dissipation lifetime. Black solid line corresponds to the fit.} \label{fig11_F} \end{figure} At the same time, we consider stars with extremely low rotation rates ($P_\mathrm{rot,init} > 12$ days). Such hosts represent the case of virtually zero rotation described by our models with $P_\mathrm{rot,init} = 12$ days. This approximation is justified since low stellar spin practically does not affect the orbital evolution of hot Jupiters. Indeed, the migration driven by the inertial wave dissipation is negligibly small in the planetary systems formed by a slow rotator. In contrast, the dissipation of equilibrium tide and gravity waves depends on the tidal forcing frequency determined by the orbital period rather than the rotation period, when $P_\mathrm{orb} \ll P_\mathrm{rot}$. \subsection{Star formation history and spatial distribution of star-planet systems} \label{subsec:sfh} The star formation rate (SFR) history of the inner disk is taken from \cite{Haywood}: \begin{equation} SFR(\tau) = \begin{cases} 3\;M_{\odot}/ {\rm yr}, & \tau \leq 7 \times 10^9\;{\rm yr;}\\ 0\;M_{\odot}/{\rm yr}, & 7 \times 10^9\;{\rm yr} < \tau \leq 9.5 \times 10^9\;{\rm yr};\\ 10\;M_{\odot}/{\rm yr}, & 9.5 \times 10^9\;{\rm yr} < \tau \leq 12.5 \times 10^9\;{\rm yr}, \end{cases}, \label{eq:sfr} \end{equation} where $\tau$ is the lookback Galactic time ($\tau = 0$ corresponds to the present epoch). Eq. (\ref{eq:sfr}) indicates the presence of two distinct epochs of star formation activity related to the Galactic thin and thick disk, separated by the quenching phase. In the present study, we consider the thin disk population only, as the planet-metallicity correlation for Jovian-mass planets ($\Gamma_\mathrm{z} \propto 10^{3.4 \;\mathrm{ [Fe/H]}}$ taken from \cite{Petigura}) applied for the typical thick disk metallicity ([Fe/H] = -0.7 dex, see \cite{Gilmore}) reduces hot Jupiter occurrence rate within the Galactic thick disk by a factor of 200. For the same reason, taking into account a significant offset between the inner and outer thin disk abundances revealed in \cite{Snaith}, we decided to neglect hot Jupiter population of the outer thin disk. Thereby we adopt only the first line of eq. (\ref{eq:sfr}) to define the total number of simulated stars and their ages. Simulated star-planet systems are distributed inside the inner ($R < 10$ kpc) thin disk according to the exponential law derived by \cite{Juric}: \begin{equation} p(R,Z) \propto \exp \left(-\frac{R}{L} - \frac{Z}{H} \right) \label{eq:loc} \end{equation} with $H = 300$ pc, $L = 2600$ pc. For every system, we derive the distance adopting $R_{\odot} = 8 $ kpc, $H_{\odot} = 25$ pc. To calculate the apparent magnitude of bright transients and stars in decaying systems we assume the extinction of 1.8 mag per kpc (\citealt{Whittet}). \subsection{Initial distribution of hot Jupiter mass and orbital period} \label{subsec:planet} \begin{figure} \includegraphics[width=\columnwidth]{Distribution1.pdf} \caption{Distribution of hot Jupiter mass. Green histogram represents the observed planetary sample from \url{https://exoplanetarchive.ipac.caltech.edu/} Black solid line corresponds to the fit.} \label{fig12_F} \end{figure} The distribution of planetary mass, shown in Fig.~\ref{fig12_F}, is based on the hot Jupiter sample taken from the NASA Exoplanet Archive imposing the same restrictions as in subsection~\ref{subsec:density}, except we do not require the availability of planetary radii measurements. The established range of hot Jupiter mass extends from $0.3 \; M_\mathrm{J}$ to $10 \; M_\mathrm{J}$. We refer to \cite{Schlaufman}, who found evidence supporting the idea that more massive objects are formed via gravitational instability rather than core accretion, which underlines their belonging to the population of brown dwarfs. To keep the fraction of hot Jupiters with $M_\mathrm{pl} > 3\;M_\mathrm{J}$ close to the observed value, we approximate the distribution with the following piecewise continuous function: \begin{equation} p\left(\log \frac{M_\mathrm{pl}}{M_\mathrm{J}}\right) \propto \begin{cases} \exp\left(-\frac{(\log \frac{M_\mathrm{pl}}{M_\mathrm{J}} - \zeta_\mathrm{pl})^2}{2\sigma_\mathrm{pl}^2}\right), & \log\; \frac{M_\mathrm{pl}}{M_\mathrm{J}} \leq 0.3\\ \left(\log \frac{M_\mathrm{pl}}{M_\mathrm{J}}\right)^{\beta}, & \log \frac{M_\mathrm{pl}}{M_\mathrm{J}} > 0.3 \end{cases}, \label{eq:pl_mass} \end{equation} where $\zeta_\mathrm{pl} = -0.068$, $\sigma_\mathrm{pl} = 0.28$ , and $\beta = -1.5$. We considered two different distribution of the initial orbital period. The first one (hereafter D1) is from \cite{Petigura}: \begin{equation} p(\log \;P_\mathrm{orb, init}) \propto P_\mathrm{orb, init}^{\alpha}, \label{eq:orb1} \end{equation} with $\alpha = 0.9$. The above relation is sharper than the power law from \cite{Cumming} (with $\alpha = 0.26$). We find it more reliable since its calibration involved more diverse planetary sample. We assume that the distribution of Jovian-mass planets is spaced in orbital period within the interval [1 day, 10 days]. Another distribution (hereafter D2) of the initial hot Jupiter position is uniform with respect to the logarithm of the initial orbital period. Such distribution is commonly used by various authors. For instance, it was applied by \cite{Collier} to recover the sharp upper-left boundary in the mass--separation diagram within the framework of a model with a constant tidal quality factor. The second distribution is meant to provide an upper bound for our statistical estimates. The fraction of FGK stars hosting a hot Jupiter is fixed at a 1\% level. We neglect the variation of hot Jupiter occurrence rate with stellar mass. In future studies, we will take into account the chemical evolution in the Galaxy and the associated variation of the hot Jupiter occurrence rate with the lookback Galactic time. In total, we simulate 52 million star-planet systems each of which is represented by a set of parameters, namely stellar mass, initial period of stellar rotation, planetary mass, initial orbital period, age, and galactocentric cylindrical coordinates. The outcome of the orbital evolution is obtained applying the precomputed grid of models. In particular, we determine the closest grid values of stellar and planetary mass, the logarithm of the initial period of stellar rotation, and the initial orbital period with respect to the parameters of the simulated star-planet system. The fate of the corresponding grid model is subsequently defined as the outcome of the performed simulation. \section{Results} \label{sec:results} The final results of the hot Jupiter population modeling are reported in Table~\ref{tab2}. One can see that switching from sharp (D1) to uniform (D2) log period distribution increases the total amount of infalls by the factor of two. Accordingly, the overall engulfment ratio ranges between 11 and 21\%. The green dashed histogram in Fig.~\ref{fig13_F} shows the engulfment ratio for every planetary mass bin in the case of the D1 distribution. As expected, more massive planets have a higher infall probability reaching 30\% for hot Jupiters with $M_\mathrm{pl} \simeq 10\;M_\mathrm{J}$. The shift toward massive planets is even more pronounced when we consider the completed mergers, depicted by the orange histogram. Only a negligible fraction of hot Jupiters, 1.5--3.0\%, is already engulfed by their host stars, meaning that the initial hot Jupiter occurrence rate must be close to the observed one. The same applies to the distribution of planetary mass when neglecting photoevaporation. Fig.~\ref{fig14_F} demonstrates the infall region in the mass--initial separation plane. On the left panel, corresponding to the total number of events, all the unstable systems populate the distinct area restricted by 0.04 AU for low-mass hot Jupiters and 0.06 AU for massive hot Jupiters. We note that the colored map is not tied to any particular initial distribution of planetary parameters. Another interesting detail is the presence of a domain occupied by massive planets where the engulfment ratio is close to unity. Thereby, almost every hot Jupiter belonging to that area in the parameter space merges with the host FGK star, no matter what its mass or rotation rate is. To clarify the degree of influence of stellar parameters on the outcome of our simulations, in Fig.~\ref{fig15_F}, we plot the infall probability for every stellar mass considered in the present work. The most prominent feature is the sharp decrease in the engulfment ratio corresponding to the onset of the convective core at 1.15 $M_{\odot}$. At the same time, the stars with mass above 1.15 $M_{\odot}$ have short TAMS ages, which is reflected in a relatively high fraction of the completed infalls demonstrated in green. Another noticeable drop of mergers characterizes the stars with mass below 0.9 $M_{\odot}$. This drop is related to the reduced contribution of gravity waves resulting from the MS lifetimes exceeding 14 Gyr. In addition, the coalescences with the low-mass stars do not produce transients, represented by red diamonds. Since the mean stellar density decreases during the MS stage, the condition $\rho_\mathrm{pl}/\rho_{*}>1$ required for tidal disruption is more typical for the late ages of stellar evolution. However, with a decrease in the contribution of gravity waves, characteristic of stars with $M_* \leq 0.8 M_{\odot}$ (see subsection~\ref{subsec:stmass}), the average age of mergers is shifted toward lower values leading to the absence of bright events. After averaging the number of mergers over the Galactic lookback time from -50 Myr to 50 Myr, we obtain the infall rates varying between 340 and 650 events per million years, depending on the initial distribution of planetary separation. The majority of these events follow the stable accretion scenario that does not result in a significant luminosity enhancement. According to our estimates, only 20-36 coalescences per million years are accompanied by a transient, half of which are powerful enough to be observed with the Large Synoptic Survey Telescope (LSST) having the limiting magnitude in g-band equal to $+24.8^{\mathrm{m}}$ for point sources \footnote{(\url{https://smtn-002.lsst.io/})}. Another important goal was to calculate the number of systems undergoing orbital decay intense enough to be detected. Given that the currently achieved precision of the best transit-timing observations following a single observing season is on the order of a few seconds (\citealt{Collier}), we select the infalls driven by the gravity waves, for which the cumulative shift in transit times $T_\mathrm{shift}$ exceeds 5 seconds over a 10-year baseline $T_\mathrm{dur}$. To find out which systems meet this criterion, we derive the expression, combining eqs. (55), (57), and (59) from B20: \begin{equation} T_\mathrm{shift} \approx 225\mathrm{s} \left( \frac{1 \,\mathrm{Myr}}{\tau_\mathrm{\alpha}}\right)\left( \frac{T_\mathrm{dur}}{10\,\mathrm{yr}}\right)^2, \label{eq:decay} \end{equation} with $\tau_\mathrm{\alpha}$ the orbital decay timescale. Substituting $T_\mathrm{dur} = 10 \, \rm yrs$ and $T_\mathrm{shift} = 5\, \rm s$ in eq. (\ref{eq:decay}) results in $\tau_\mathrm{\alpha} = 45 \,\rm Myr$. We purposely filter out the mergers induced by equilibrium tide dissipation as they are expected to proceed on much lower timescales. In addition, we choose only the decaying systems with stars brighter than $+12^{\mathrm{m}}$, $+13^{\mathrm{m}}$, and $+16^{\mathrm{m}}$, corresponding to the limiting magnitudes of TESS (\citealt{TESS}), PLATO (\citealt{PLATO}), and Kepler (\citealt{Kepler}), respectively. Our estimates are given in Table~\ref{tab2}. The number of decaying systems is computed by averaging over the Galactic lookback time between -200 Myr and 200 Myr. \begin{table} \centering \caption{Statistics of planetary mergers \label{tab2}} \begin{tabular}{|c||c|c|} \hline Quantity & \multicolumn{2}{c}{Value} \\ \hline Distribution & D1 & D2 \\ \hline\hline Total number of hot Jupiters & $5.2 \times 10^7$ & $5.2 \times 10^7$ \\ Total number of infalls & $5.7 \times 10^6$ (11\%) & $1.1 \times 10^7$ (21\%) \\ Infalls to date & $8.0 \times 10^5$ (1.5\%) & $1.6 \times 10^6$ (3.0\%)\\ Stable accretion& $5.5 \times 10^6$ & $1.0 \times 10^7$\\ Tidal disruption& $1.8 \times 10^5$ & $3.0 \times 10^5$ \\ Present-day infall rate & 340 $\pm$ 20 $\mathrm{Myr^{-1}}$ & 650 $\pm$ 30 $\mathrm{Myr^{-1}}$\\ Rate of transients & 20 $\pm$ 5 $\mathrm{Myr^{-1}}$ & 36 $\pm$ 6 $\mathrm{Myr^{-1}}$ \\ Rate of transients with $m_\mathrm{app} < 24.8$ & 10 $\pm$ 4 $\mathrm{Myr^{-1}}$ & 18 $\pm$ 4 $\mathrm{Myr^{-1}}$ \\ Decays\tablefootnote{Details are given in Section~\ref{sec:results}} with $m_\mathrm{*, app} < 12$ & 0.8 $\pm$ 0.6 & 1.2 $\pm$ 0.8 \\ Decays with $m_\mathrm{*, app} < 13$ & 2.4 $\pm$ 1.8 & 3.7 $\pm$ 1.2 \\ Decays with $m_\mathrm{*, app} < 16$ & 22 $\pm$ 5 & 41 $\pm$ 7 \\ \hline \end{tabular} \end{table} \begin{figure} \includegraphics[width=\columnwidth]{InfallRatePlanet.pdf} \caption{Engulfment ratio as a function of planetary mass. Green shaded bars represent the total number of infalls, the orange bars represent the number of infalls to date. Figure corresponds to the D1 distribution.} \label{fig13_F} \end{figure} \begin{figure*} \begin{multicols}{2} \includegraphics[width=\linewidth]{GlobalInfallDistribution22.pdf}\par \includegraphics[width=\linewidth]{GlobalInfallDistribution33.pdf}\par \end{multicols} \caption{Engulfment ratio distribution in the mass--separation diagram. Left panel corresponds to the total number of infalls (including mergers that have not happened yet). Right panel corresponds to the number of infalls that took place before the present epoch (based on the current system age).} \label{fig14_F} \end{figure*} \begin{figure} \includegraphics[width=\columnwidth]{InfallRateStar5.pdf} \caption{Engulfment ratio as a function of stellar mass. Blue circles denote the overall infalls, green squares denote the infalls occurred before the present epoch, red diamonds denote the infalls accompanied by transients. Figure corresponds to the D1 distribution.} \label{fig15_F} \end{figure} \section{Discussion} \label{sec:discussion} As demonstrated in our work, gravity wave damping is the efficient mechanism driving the migration of close-in planets around the MS stars possessing radiative core. Its implementation results in a transformation of the present-day distribution of planets concerning the initial one. Thus, the conclusion from \cite{Heller} that the tidal migration is negligible compared with the migration inside the disk may only be valid for stars with the convective core. Regarding the orbital evolution around fast rotators, our study is consistent with the findings of \cite{Ahuir} concerning the population of 'young migrators.' Specifically, we verified that the fate of massive planets around rapidly rotating stars is determined by the initial separation with respect to the corotation radius, as the planets located outside undergo intense outward migration, making them stable even after the initiation of gravity wave breaking. As predicted by the corresponding authors, the inclusion of gravity waves modifies the dynamics of 'old migrators,' providing the decrease in the occurrence of hot Jupiters with the decreasing orbital period in agreement with the observational statistics. We showed in subsection~\ref{subsec:metallicity} that the effectiveness of the dynamical tide dissipation is enhanced in metal-rich stars, which is not consistent with \cite{BolmontGallet}. This discrepancy can be explained by the different tidal quality factor calculation techniques. We recall that \cite{BolmontGallet} simulated the secular evolution of a star-planet system relying on the homogeneous two-layer stellar model, according to which the structural part of the inertial wave dissipation depends on the stellar radius and mass aspect ratios, corresponding to the interface between the radiation and convection zones (\citealt{Mathis}). At the same time, our tidal quality factor estimates take into account both the relative sizes of layers and the physical conditions inside them. Regarding the impact of metallicity, two main effects were found. Firstly, the infall probability correlates with metal abundance. Secondly, on average, metal-rich stars undergo coalescence with hot Jupiters closer to the end of the MS lifetime. These two features are caused by the increased contribution of gravity waves and the reduced dissipation of equilibrium tide, demonstrated in Fig.~\ref{fig10_F}. Combining the above two effects, we cannot support the idea, suggested by \cite{BolmontGallet}, that the observed trends in hot Jupiter occurrence with metallicity result from metal-poor stars engulfing planets more frequently than metal-rich stars. We are convinced that the predominance of metal-rich systems with hot Jupiter is entirely due to the effects associated either with the planetary formation or the migration inside the protoplanetary disk. Based on our results, we cannot be confident about the role of tidal migration in the origin of the upper inner edge in the mass--separation diagram declared by \cite{Bailey,Collier}. The right panel of Fig.~\ref{fig14_F} illustrates the engulfment ratio related to the mergers completed before the present day. Only the population of hot Jupiters with $M_\mathrm{pl} \geq 3\;M_\mathrm{J}$ and $a_\mathrm{init} \leq 0.04$ AU is significantly affected by the infalls. However, it is not enough to make the boundary on the mass--separation plane as sharp and well-defined as observed today. One possible way to achieve this within our simulations is to take into account the correlation of the hot Jupiter occurrence rate with stellar mass. In future, we will address this problem in detail by tracing the evolution of the hot Jupiter population. Our estimates of the present-day infall rate are several orders of magnitude lower than in \cite{Metzger}. One order of magnitude is supposed to be attributed to the impracticability of a steady-state rate of planetary mergers used in the above work. The remaining discrepancy is a product of the extrapolation approach applied by \cite{Metzger} in comparison with the present research. We recall that, in this study, we do not treat the Galaxy as a whole. Instead, we focus on the inner thin disk where the mean stellar metallicity is higher, and so is the frequency of the hot Jupiter formation. In addition, we limit ourselves to studying stars in the mass range between 0.6 and 1.3 $M_{\odot}$ as the main contributors to the total number of coalescences due to gravity waves. The difference in the considered range of stellar and planetary parameters is also the main reason for the inconsistency between our findings and the values from \cite{Popkov}. It turned out that, within the same planetary and stellar mass intervals, our engulfment ratio is formally equal to their results obtained with $Q_* \sim 10^6$ (Popkov, A.V., private communication). The rate of transients, given in Table~\ref{tab2}, is two orders of magnitude lower than in \cite{Popkov}. We believe that this is due to the two reasons. The first one, again, is associated with the choice of the explored range in the parameter space. Another reason is in the planetary density functions adopted in both studies. \cite{Popkov} calibrated their mass--density function using a large sample of Jupiters spanning the whole range of the orbital separation. In contrast, our reference sample is composed of hot Jupiters, which generally have a lower density than the population of warm and cold Jupiters. Comparing the Galactic velocity dispersions of the hot Jupiter host and field star samples from Gaia Data Release 2, \cite{Hamer} inferred that the stars hosting hot Jupiters are systematically younger. Their evaluated constraint on the tidal quality factor ($Q_* < 10^7$) is in good agreement with the value mentioned in the previous paragraph, although the main conclusion about the destruction of the majority of the initial hot Jupiter population during the MS lifetime contradicts the findings of the present paper. The origin of this discrepancy may be in uncertainties in the initial occurrence rate and distribution of hot Jupiters in the mass--separation diagram. If we assume a trend in hot Jupiter occurrence rate with stellar mass in favor of more massive hosts within each of F, G, and K spectral types (discussed by \cite{Johnson}), the average MS lifetime of the hot Jupiter host sample will be significantly shorter compared to the field star sample. This potentially may lead to the same bias as observed by \cite{Hamer}. Another explanation may reside in the impact of the initial stellar rotation on the planetary formation. One of the manifestations of this effect may be the lack of planets around rapidly rotating stars, discovered by \cite{McQuillan}. If we increase the initial number of hot Jupiters orbiting slow and median rotators by the cost of (partially) ignoring rapid rotators, the fraction of infalls will increase. It will increase even further if we reduce the number of hot Jupiters with $P_\mathrm{orb, init} > 5$ in accordance with the distribution of planets detected by the Kepler telescope (\citealt{Santerne}). The derived rate of transients makes a discovery of a bright event highly unlikely. To prove this, we calculated the size of the region within which the overall rate of transients is equal to one event per year, assuming the observability of every tidal disruption event from any distance. After scaling the present-day SFR in the Galaxy with SFR density of 0.01915 $M_{\odot} \rm / yr / Mpc^3$ (\citealt{Brinchmann}), multiplied by the rate of the Galactic transients, we obtained the radius of 100 Mpc, exceeding the distance to the Virgo Cluster. Thus, the detection of a transient produced by hot Jupiter is beyond the capabilities of LSST. However, this does not negate the feasibility of a planetary infall detection. As discussed by \cite{Popkov}, the majority of transients correspond to the ingestions of close-in planets by the expanding massive MS stars, having non-tidal nature. Thus, if direct impact or tidal disruption is ever to be observed, most likely, it would be related to a merger of Earth or Neptune mass planet. Nonetheless, the theory of tidal interaction in a star-planet system can be constrained via the measurement of the orbital decay rate through precise transit timing. Our results indicate that the detection of the orbital decay with TESS is sufficiently challenging. At least a few decaying systems can be discovered within the first decade of the observation at PLATO. The second decade will increase this number by about four times. Finally, if the large-scale survey with the facility having the same capacities as Kepler is ever to be launched, the sample of the identified decaying systems will grow substantially. We note that the estimates of the number of decays might be somewhat underestimated. Firstly, we do not take into account the infalls driven by equilibrium tide. This is largely justified because, as noted in Sec.~\ref{sec:results}, the observation of such decays is significantly more challenging, given the low dissipation rates of the non-wavelike tide (demonstrated in Fig.~\ref{fig2_F}). Secondly, the mergers with the evolved stars can potentially make a significant contribution. Besides, including the stars with mass outside the analyzed range will undoubtedly provide additional decays. We remind the reader that the only confirmed decaying planetary system to date, WASP-12, is composed of a star with mass lying above the adopted interval from 0.6 to 1.3 $M_{\odot}$. At last, applying a more realistic interstellar extinction will expand the observed stars' sample by those located above the Galactic plane. \section{Summary and conclusions} \label{sec:conclusion} In this paper, we study the orbital evolution of hot Jupiters around solar-mass stars following the tidal prescriptions from \cite{Barker}, describing the dissipation of equilibrium tide, inertial waves, and gravity waves. These prescriptions are applied to the models of the rotating FGK stars computed with the MESA code to obtain the tidal dissipation rates, which are subsequently used to simulate the dynamics of a star-planet system until the host's main sequence termination. We vary stellar and planetary parameters to understand the principles underlying the evolution of the hot Jupiter population after the dissipation of the protoplanetary disk. Special attention is paid to the investigation of the possibility of a star-planet coalescence since the infall factor is the one that shapes the orbital architecture of Jovian planets in the most straightforward and observable way. In particular, we find that: \begin{itemize} \item gravity waves substantially expand the infall region up to 0.06 AU by incorporating those planets that do not get captured on the $n = 2 \Omega_{*}$ limit; \item the initiation of gravity wave breaking induced by low-mass planets is shifted toward late ages. As a result, the high fraction of systems composed of a hot Jupiter with $M_\mathrm{pl} \leq 3\;M_\mathrm{J}$ remains stable throughout the MS stage; \item the contribution of gravity waves is determined by the host star's initial spin. For planets orbiting fast rotators, inertial wave dissipation is the key mechanism driving the migration of hot Jupiters. On the contrary, the coalescence with slow rotator occurs mainly due to the activity of gravity waves; \item the transition between regimes of inertial wave domination and gravity wave domination depends on stellar metallicity. Metal-rich stars are favored in terms of tidal migration under the dissipation of gravity waves; \item generally, fast rotators engulf their planets earlier than slow rotators; \item the impact of gravity wave dissipation is especially noticeable against the background of stars possessing a convective core. In the present study, we assume that such stars do not undergo gravity wave dissipation before the TAMS. The latter reduces the infall probability; \item for stars with radiative core, the impact of gravity waves sharply decreases with decreasing stellar mass. \end{itemize} We are interested in improving our model by implementing more mechanisms essential in the context of the evolution of a star-planet system. Firstly, photoevaporation needs to be taken into account. As shown by \cite{Rao1}, mass loss by close-in planets with $M_\mathrm{pl} \leq 2.5\;M_\mathrm{J}$ results in the obliteration at early ages. Thus, low-mass hot Jupiters captured on the $n = 2 \Omega_{*}$ limit may be destroyed before the tidal interaction leads to their engulfment. Secondly, we would like to explore the effect of magnetic interaction on the dynamics of a star-planet system. Depending on stellar and planetary magnetic field strengths and star-planet separation, this type of interaction occurs in two different regimes, namely unipolar and dipolar. \cite{Strugarek4} demonstrated that, when enabled, unipolar regime forces the effective drag reducing the migration timescale by several orders of magnitude. The combination of tidal interaction and dipolar magnetic interaction has been extensively studied by \cite{Ahuir}. It was found that even though the tidal effect dominates in systems with a high planetary mass, one should consider both mechanisms to explain the observed properties of the planetary population. Another important step would be to investigate the probability of gravity wave breaking to take place on the edge of radiation zone in stars with convective cores (Ivanov, P.B., private communication). This would require the development of another wave-damping criterion, one of the promising areas of our research. Finally, we are aimed to expand our model by considering the orbital evolution around the evolved stars. The latter is expected to significantly increase the estimated number of decaying systems as the efficiency of both equilibrium (\citealt{Mustill}) and dynamical tide (\citealt{Barker}) dissipation is enhanced in giant stars. The above steps would allow us to reproduce the key statistical patterns of the observed population of Jovian planets from the initial distribution in the mass--separation diagram. In the present study, we focus on estimating the rate of hot Jupiter infalls in the Milky Way galaxy. The considered range of stellar mass extends from 0.6 to 1.3 $M_{\odot}$. Adopting the distributions of stellar and planetary properties, mentioned in Sec.~\ref{sec:populaton}, we obtain the following results: \begin{itemize} \item 11 -- 21\% of the initial hot Jupiter population merge with the host star within the main sequence lifetime (or 14 Gyr); \item 1.5 -- 3.0\% of the initial hot Jupiter population is already engulfed; \item the present-day infall rate in the Galaxy is 340 -- 650 events per million years. The frequency of transients is 20 -- 36 events per million years, which makes it unlikely to observe transients involving hot Jupiter in the Virgo Cluster; \item the number of decaying systems composed of the MS star with $m_\mathrm{app}$ < 12, 13, 16 (resp. TESS, PLATO, and Kepler limiting magnitudes) and hot Jupiter for which the predicted cumulative shift in transit times is greater than 5 s after 10 years is 0.8 -- 1.2, 2.4 -- 3.7, and 22 -- 41, respectively. \end{itemize} The main uncertainty of our approach arises from the initial distribution of star-planet separation. In this study, we employed the power law from \cite{Petigura} based on the hot Jupiter observations and the commonly used uniform distribution in log period, although it is not necessarily the best option. We note that the current population of Jovian planets is modified regarding the initial one due to star-planet interaction (including tides). However, we showed that the most significant migration falls on the phase of gravity wave dissipation close to the end of the MS, while the majority of the observed planetary systems currently do not exhibit gravity wave breaking (\citealt{Barker}). Anyway, the detailed study of the orbital evolution needs to be coupled with the finding of the planet population synthesis approach. We hope that our research draws special attention to the population synthesis of hot Jupiters, encouraging more efforts in this field. Collaboration between different studies will pave a path toward the comprehensive picture of exoplanetary systems. \section*{Acknowledgements} The work on the orbital evolution code is supported by the Theoretical Physics and Mathematics Advancement Foundation ``BASIS''. We acknowledge the support provided by the Ministry of Science and Higher Education of the Russian Federation grant 075-15-2020-780 (N13.1902.21.0039) in the implementation of the hot Jupiter population modeling. Special thanks to Prof. Sergei Popov for coordinating the work and comments on the manuscript. I am grateful to Drs. Pavel Ivanov and Louis Amard for the fruitful discussion. I would also like to thank Prof. Bill Paxton and the MESA community for making this work possible. Finally, we acknowledge Dr. Adrian Barker for tidal interaction prescriptions, and Dr. Seth Gossage for MESA extension. \textit{Software}: \textbf{MESA} r11701 \citealt{MESA1,MESA2,MESA3,MESA4,MESA5} \section*{Data Availability} The data underlying this article will be shared on reasonable request to the corresponding author \bibliographystyle{mnras}
\section{Introduction} We study the problem of globally maximizing a black-box function $f(\mathbf{x})$ with an input domain $\mathcal{X}=[0,1]^{D}$, where the function has some special properties: (1) It is hard to calculate its first and second-order derivatives, therefore gradient-based optimization algorithms are not useful; (2) It is too strong to make additional assumptions on the function such as convexity; (3) It is expensive to evaluate the function, hence some classical global optimization algorithms such as evolutionary algorithms (EA) are not applicable. Bayesian optimization (BO) is a popular global optimization method to solve the problem described above. It aims to obtain the input $\mathbf{x}^{*}$ that maximizes the function $f$ by sequentially acquiring queries that are likely to achieve the maximum and evaluating the function on these queries. BO has been successfully applied in many scenarios such as hyper-parameter tuning ~\citep{snoek2012practical,klein2017fast}, automated machine learning~\citep{nickson2014automated,yao2018taking}, reinforcement learning~\citep{brochu2010tutorial,marco2017virtual,wilson2014using}, robotics~\citep{calandra2016bayesian,berkenkamp2016bayesian}, and chemical design~\citep{griffiths2017constrained,negoescu2011knowledge}. However, most problems described above that have been solved by BO successfully have black-box functions with low-dimensional domains, typically with $D\leq 20$~\citep{frazier2018tutorial}. Scaling BO to high-dimensional black-box functions is challenging because of the following two reasons: (1) Due to the curse of dimensionality, the global optima is harder to find as $D$ increases; and (2) computationally, vanilla BO is extremely time consuming on functions with large $D$. As global optimization for high-dimensional black-box function has become a necessity in several scientific fields such as algorithm configuration~\citep{hutter2010automated}, computer vision~\citep{bergstra2013making} and biology~\citep{gonzalez2015bayesian}, developing new BO algorithms that can effectively optimize black-box functions with high dimensions is very important for practical applications. A large class of algorithms for high-dimensional BO is based on the assumption that the black-box function has an effective subspace with dimension $d_{e}\ll D$~\citep{djolonga2013high,wang2016bayesian,moriconi2019high,nayebi2019framework,letham2020re}. Therefore, these algorithms first embed the high-dimensional domain $\mathcal{X}$ to a space with the embedding dimension $d$ pre-specified by users, do vanilla BO in the embedding space to obtain the new query, and then project it back and evaluate the function $f$. These algorithms are time efficient since BO is done in a low-dimensional space. \citet{wang2016bayesian} proves that if $d\geq d_{e}$, then theoretically with probability $1$ the embedding space contains the global optimum. However, since $d_{e}$ is usually not known, it is difficult for users to set a suitable $d$. Previous work such as \citet{eriksson2021high} shows that different settings of $d$ will impact the performance of embedding-based algorithms, and there has been little work on how to choose $d$ heuristically. \citet{letham2020re} also points out that when projecting the optimal point in the embedding space back to the original space, it is not guaranteed that this projection point is inside $\mathcal{X}$, hence algorithms may fail to find an optimum within the input domain. We develop a new algorithm, called VS-BO (Variable Selection Bayesian Optimization), to solve issues mentioned above. Our method is based on the assumption that all the $D$ variables (elements) of the input $\mathbf{x}$ can be divided into two disjoint sets $\mathbf{x}=\{\mathbf{x}_{ipt},\mathbf{x}_{nipt}\}$: (1) $\mathbf{x}_{ipt}$, called important variables, are variables that have significant effects on the output value of $f$; (2) $\mathbf{x}_{nipt}$, called unimportant variables, are variables that have no or little effect on the output. Previous work such as \citet{hutter2014efficient} shows that the performance of many machine learning methods is strongly affected by only a small subset of hyperparameters, indicating the rationality of this assumption. We propose a robust strategy to identify $\mathbf{x}_{ipt}$, and do BO on the space of $\mathbf{x}_{ipt}$ to reduce time consumption. In particular, our method is able to learn the dimension of $\mathbf{x}_{ipt}$ automatically, hence there is no need to pre-specify the hyperparameter $d$ as embedding-based algorithms. Since the space of $\mathbf{x}_{ipt}$ is axis-aligned, issues caused by the space projection no longer exist in our method. We theoretically analyze the computational complexity of VS-BO, showing that our method can decrease the computational complexity of both steps of fitting the Gaussian Process (GP) and optimizing the acquisition function. We formalize the assumption that some variables of the input are important while others are unimportant and derive the regret bound of our method. Finally, we empirically show the good performance of VS-BO on several synthetic and real problems. \section{Related work} The basic framework of BO has two steps for each iteration: First, GP is used as the surrogate to model $f$ based on all the previous query-output pairs $\left(\mathbf{x}^{1:n},y^{1:n}\right)$: \begin{align*} y^{1:n}\sim \mathcal{N}\left(\mathbf{0},K(\mathbf{x}^{1:n},\Theta)+\sigma^{2}_{0}\mathbf{I}\right), \end{align*} Here $y^{1:n}=[y^{1},\dots , y^{n}]$ is a $n$-dimensional vector, $y^{i}=f(\mathbf{x}^{i})+\epsilon^{i}$ is the output of $f$ with random noise $\epsilon^{i}\sim\mathcal{N}(0,\sigma_{0}^{2})$, and $K(\mathbf{x}^{1:n},\Theta)$ is a $n\times n$ covariance matrix where its entry $K_{i,j}=k(\mathbf{x}^{i},\mathbf{x}^{j},\Theta)$ is the value of a kernel function $k$ in which $\mathbf{x}^{i}$ and $\mathbf{x}^{j}$ are the i-th and j-th queries respectively. $\Theta$ and $\sigma_{0}$ are parameters of GP that will be optimized each iteration, and $\mathbf{I}$ is the $n\times n$ identity matrix. A detailed description of GP and its applications can be found in \citet{williams2006gaussian}. Given a new input $\mathbf{x}'$, we can compute the posterior distribution of $f(\mathbf{x}')$ from GP, which is again a Gaussian distribution with mean $\mu(\mathbf{x}'\mid \mathbf{x}^{1:n}, y^{1:n})$ and variance $\sigma^{2}(\mathbf{x}'\mid \mathbf{x}^{1:n})$ that have the following forms: \begin{align*} & \mu(\mathbf{x}'\mid \mathbf{x}^{1:n}, y^{1:n})=\mathbf{k}(\mathbf{x}',\mathbf{x}^{1:n})[K(\mathbf{x}^{1:n},\Theta)+\sigma^{2}_{0}\mathbf{I}]^{-1}(y^{1:n})^{\top} \\ &\sigma^{2}(\mathbf{x}'\mid \mathbf{x}^{1:n})=k(\mathbf{x}',\mathbf{x}',\Theta)-\mathbf{k}(\mathbf{x}',\mathbf{x}^{1:n})[K(\mathbf{x}^{1:n},\Theta)+\sigma^{2}_{0}\mathbf{I}]^{-1}\mathbf{k}(\mathbf{x}',\mathbf{x}^{1:n})^{\top} \end{align*} Here, $\mathbf{k}(\mathbf{x}',\mathbf{x}^{1:n})=[k(\mathbf{x}',\mathbf{x}^{1},\Theta),\dots , k(\mathbf{x}',\mathbf{x}^{n},\Theta)]$ is a $n$-dimensional vector. The second step of BO is to use $\mu$ and $\sigma$ to construct an acquisition function $acq$ and maximize it to get the new query $\mathbf{x}^{new}$, on which the function $f$ is evaluated to obtain the new pair $(\mathbf{x}^{new},y^{new})$: \begin{align*} \mathbf{x}^{new} = \text{argmax}_{\mathbf{x}'\in \mathcal{X}}\; acq(\mu(\mathbf{x}'\mid \mathbf{x}^{1:n}, y^{1:n}),\sigma(\mathbf{x}'\mid \mathbf{x}^{1:n})). \end{align*} A wide variety of methods have been proposed that are related to high-dimensional BO, and almost all of them are based on some extra assumptions on intrinsic structures of the domain $\mathcal{X}$ or the function $f$. As mentioned in the previous section, a considerable body of algorithms is based on the assumption that the black-box function has an effective subspace with a significantly smaller dimension than $\mathcal{X}$. Among them, REMBO~\citep{wang2016bayesian} uses a randomly generated matrix as the projection operator to embed $\mathcal{X}$ to a low-dimensional subspace. SI-BO~\citep{djolonga2013high}, DSA~\citep{ulmasov2016bayesian} and MGPC-BO~\citep{moriconi2019high} propose different ways to learn the projection operator from data, of which the major shortcoming is that a large number of data points are required to make the learning process accurate. HeSBO~\citep{nayebi2019framework} uses a hashing-based method to do subspace embedding. Finally, ALEBO~\citep{letham2020re} aims to improve the performance of REMBO with several novel refinements. Another assumption is that the black-box function has an additive structure. \citet{kandasamy2015high} first develops a high-dimensional BO algorithm called Add-GP by adopting this assumption. They derive a simplified acquisition function and prove that the regret bound is linearly dependent on the dimension. Their framework is subsequently generalized by \citet{li2016high,wang2017batched} and \citet{rolland2018high}. As described in the previous section, our method is based on the assumption that some variables are more ``important" than others, which is similar to the axis-aligned subspace embedding. Several previous works propose different methods to choose axis-aligned subspaces in high-dimensional BO. \citet{li2016high} uses the idea of dropout, i.e, for each iteration of BO, a subset of variables are randomly chosen and optimized, while our work chooses variables that are important in place of the randomness. \citet{eriksson2021high} develops a method called SAASBO, which uses the idea of Bayesian inference. SAASBO defines a prior distribution for each parameter in the kernel function $k$, and for each iteration the parameters are sampled from posterior distributions and used in the step of optimizing the acquisition function. Since those priors restrict parameters to concentrate near zero, the method is able to learn a sparse axis-aligned subspaces (SAAS) during BO process. Similar to vanilla BO, the main drawback of SAASBO is that it is very time consuming. While traditionally it is assumed that the function $f$ is very expensive to evaluate so that the runtime of BO itself does not need to be considered, previous work such as \citet{ulmasov2016bayesian} points out that in some application scenarios the runtime of BO cannot be neglected. \citet{spagnol2019bayesian} proposes a similar framework of high-dimensional BO as us; they use Hilbert Schmidt Independence criterion (HSIC) to select variables, and use the chosen variables to do BO. However, they do not provide a comprehensive comparison with other high-dimensional BO methods: their method is only compared with the method in \citet{li2016high} on several synthetic functions. In addition, they do not provide any theoretical analysis. \begin{algorithm} \caption{VS-BO} \begin{algorithmic}[1] \State \textbf{Input}: $f(\mathbf{x})$, $\mathcal{X}=[0,1]^{D}$, $N_{init}$, $N$, $N_{vs}$ \State \textbf{Output}: Approximate maximizer $\mathbf{x}^{max}$ \State Initialize the set of $\mathbf{x}_{ipt}$ to be all variables in $\mathbf{x}$, $\mathbf{x}_{ipt}=\mathbf{x}$, and $\mathbf{x}_{nipt}=\emptyset$ \State Uniformly sample $N_{init}$ points $\mathbf{x}^{i}$ and evaluate $y^{i}=f(\mathbf{x}^{i})$, let $\mathcal{D}=\{(\mathbf{x}^{i},y^{i})\}_{i=1}^{N_{init}}$ \State Initialize the distribution $p(\mathbf{x}\mid \mathcal{D})$ \For {$t=N_{init}+1,N_{init}+2,\ldots N_{init}+N$} \If {mod($t-N_{init}$, $N_{vs}$) = 0} \State Variable selection to update $\mathbf{x}_{ipt}$ and let $\mathbf{x}_{nipt}=\mathbf{x}\setminus \mathbf{x}_{ipt}$ (Algorithm~\ref{alg:VS_detail}) \State Update $p(\mathbf{x}\mid \mathcal{D})$, then derive the conditional distribution $p(\mathbf{x}_{nipt}\mid \mathbf{x}_{ipt},\mathcal{D})$ \EndIf \State Fit a GP to $\mathcal{D}_{ipt}:=\{(\mathbf{x}_{ipt}^{i},y^{i})\}_{i=1}^{t-1}$ \State Maximize the acquisition function to obtain $\mathbf{x}_{ipt}^{t}$. \State Sample $\mathbf{x}_{nipt}^{t}$ from $p(\mathbf{x}_{nipt}\mid \mathbf{x}_{ipt}^{t},\mathcal{D})$ \State Evaluate $y^{t}=f(\mathbf{x}^{t})+\epsilon^{t}=f(\{\mathbf{x}_{ipt}^{t},\mathbf{x}_{nipt}^{t}\})+\epsilon^{t}$ and update $\mathcal{D}=\mathcal{D}\cup \{(\mathbf{x}^{t},y^{t})\}$ \EndFor \State\Return $\mathbf{x}^{max}$ which is equal to $\mathbf{x}^{i}$ with maximal $y^{i}$ \end{algorithmic} \label{alg:VSBO} \end{algorithm} \section{Framework of VS-BO} Given the black-box function $f(\mathbf{x}): \mathcal{X}\to\mathbb{R}$ in the domain $\mathcal{X}=[0,1]^{D}$ with a large $D$, the goal of high-dimensional BO is to find the maximizer $\mathbf{x}^{*}=\text{argmax}_{\mathbf{x}\in \mathcal{X}}f(\mathbf{x})$ efficiently. As mentioned in the introduction, VS-BO is based on the assumption that all variables in $\mathbf{x}$ can be divided into important variables $\mathbf{x}_{ipt}$ and unimportant variables $\mathbf{x}_{nipt}$, and the algorithm uses different strategies to decide values of the variables from two different sets. The high-level framework of VS-BO (Algorithm~\ref{alg:VSBO}) is similar to \citet{spagnol2019bayesian}. For every $N_{vs}$ iterations VS-BO will update $\mathbf{x}_{ipt}$ and $\mathbf{x}_{nipt}$ (line 8 in Algorithm~\ref{alg:VSBO}), and for every BO iteration $t$ only variables in $\mathbf{x}_{ipt}$ are used to fit GP (line 11 in Algorithm~\ref{alg:VSBO} ), and the new query of important variables $\mathbf{x}_{ipt}^{t}$ is obtained by maximising the acquisition function (line 12 in Algorithm~\ref{alg:VSBO}). Unlike \citet{spagnol2019bayesian}, VS-BO learns a conditional distribution $p(\mathbf{x}_{nipt}\mid \mathbf{x}_{ipt},\mathcal{D})$ from the existing query-output pairs $\mathcal{D}$ (line 5, 9 in Algorithm~\ref{alg:VSBO}). This distribution is used for choosing the value of $\mathbf{x}_{nipt}$ to make $f(\mathbf{x})$ large when $\mathbf{x}_{ipt}$ is fixed. Hence, once $\mathbf{x}_{ipt}^{t}$ is obtained, the algorithm samples $\mathbf{x}_{nipt}^{t}$ from $p(\mathbf{x}_{nipt}\mid \mathbf{x}_{ipt}^{t},\mathcal{D})$ (line 13 in Algorithm~\ref{alg:VSBO}), concatenates it with $\mathbf{x}_{ipt}^{t}$ and evaluates $f(\{\mathbf{x}_{ipt}^{t},\mathbf{x}_{nipt}^{t}\})$. Compared to \citet{spagnol2019bayesian}, our method is new on the following three aspects: First, we propose a new variable selection method that takes full advantage of the information in the fitted GP model, and there is no hyperparameter that needs to be pre-specified in this method; Second, we develop a new mechanism, called VS-momentum, to improve the robustness of variable selection; Finally, we integrate an evolutionary algorithm into the framework of BO to make the sampling of unimportant variables more precise. The following subsections introduce these three points in detail. \begin{algorithm} \caption{Variable Selection (line 8 in Algorithm~\ref{alg:VSBO})} \begin{algorithmic}[1] \State \textbf{Input}: $\mathcal{D}=\{(\mathbf{x}^{i},y^{i})\}_{i=1}^{t}$ \State \textbf{Output}: Set of important variables $\mathbf{x}_{ipt}$ \State Fit a GP to $\mathcal{D}$ and calculate important scores of variables $IS$ where $IS[i]$ is the important score of the i-th variable \State Sort variables according to their important scores, $[\mathbf{x}_{s(1)},\dots, \mathbf{x}_{s(D)}]$, from the most important to the least \For{$m=1,2,\ldots D$} \Comment{Stepwise forward selection} \State Fit a GP to $\mathcal{D}_{m}:=\{(\mathbf{x}_{s(1):s(m)}^{i},y^{i})\}_{i=1}^{t-1}$ where $\mathbf{x}_{s(1):s(m)}^{i}$ is the $i$-th input with only the first $m$ important variables, let $L_m$ to be the value of final negative marginal log likelihood \If{$m<3$} \State \textbf{continue} \ElsIf {$L_{m-1}-L_{m}\leq 0$ or $L_{m-1}-L_{m}<\frac{L_{m-2}-L_{m-1}}{10}$} \State \textbf{break} \EndIf \EndFor \State\Return $\mathbf{x}_{ipt}=\{\mathbf{x}_{s(1)},\dots, \mathbf{x}_{s(m-1)}\}$ \end{algorithmic} \label{alg:VS_detail} \end{algorithm} \subsection{Variable selection} The variable selection step in VS-BO (Algorithm~\ref{alg:VS_detail}) can be further separated into two substeps: (1) calculate the importance score ($IS$) of each variable (line 3 in Algorithm~\ref{alg:VS_detail}), and (2) do the stepwise-forward variable selection~\citep{derksen1992backward} according to the importance scores. For step one, we develop a gradient-based $IS$ calculation method, called Grad-IS, inspired by \citet{paananen2019variable}. Intuitively, if the partial derivative of the function $f$ with respect to one variable is large on average, then the variable ought to be important. Since the derivative of $f$ is unknown, VS-BO instead estimates the expectation of the gradient of posterior mean from a fitted GP model, normalized by the posterior standard deviation: \begin{align*} IS &=\mathbb{E}_{\mathbf{x}\sim Unif(\mathcal{X})}\left[\frac{\nabla_{\mathbf{x}}\mathbb{E}_{p(f(\mathbf{x})\mid \mathbf{x}, \mathcal{D})}\left[f(\mathbf{x}) \right]}{\sqrt{Var_{p(f(\mathbf{x})\mid \mathbf{x}, \mathcal{D})}\left[f(\mathbf{x}) \right]}} \right] = \mathbb{E}_{\mathbf{x}\sim Unif(\mathcal{X})}\left[\frac{\nabla_{\mathbf{x}}\mu(\mathbf{x}\mid \mathcal{D})}{\sigma(\mathbf{x}\mid \mathcal{D})} \right] \\ &\approx\frac{1}{N_{is}}\sum_{k=1}^{N_{is}}\frac{\nabla_{\mathbf{x}}\mu(\mathbf{x}^{k}\mid \mathcal{D})}{\sigma(\mathbf{x}^{k}\mid \mathcal{D})}\quad \mathbf{x}^{k} \stackrel{i.i.d}{\sim}Unif(\mathcal{X}). \end{align*} Here, both $\nabla_{\mathbf{x}}\mu(\cdot\mid \mathcal{D})$ and $\sigma(\cdot\mid \mathcal{D})$ have explicit forms. Both the Grad-IS and Kullback-Leibler Divergence (KLD)-based methods in \citet{paananen2019variable} are estimations of $\mathbb{E}_{\mathbf{x}\sim Unif(\mathcal{X})}\left[\frac{\nabla_{\mathbf{x}}\mathbb{E}_{p(f(\mathbf{x})\mid \mathbf{x}, \mathcal{D})}\left[f(\mathbf{x}) \right]}{\sqrt{Var_{p(f(\mathbf{x})\mid \mathbf{x}, \mathcal{D})}\left[f(\mathbf{x}) \right]}} \right]$. Since the KLD method only calculates approximate derivatives around the chosen points in $\mathcal{D}$ that are always unevenly distributed, it is a biased estimator, while our importance score estimation is unbiased. Each time the algorithm fits GP to the existing query-output pairs, the marginal log likelihood (MLL) of GP is maximized by updating parameters $\Theta$ and $\sigma_{0}$. VS-BO takes negative MLL as the loss and uses its value as the stopping criteria of the stepwise-forward selection. More specifically, VS-BO sequentially selects variables according to the important score, and when a new variable is added, the algorithm will fit GP again by only using those chosen variables and records a new final loss (line 6 in Algorithm~\ref{alg:VS_detail}). If the new loss is nearly identical to the previous loss, the loss of fitted GP when the new variable is not included, then the selection step stops (line 9 in Algorithm~\ref{alg:VS_detail}) and all those already chosen variables are important variables. Consider the squared exponential kernel, a common kernel choice for GP, which is given by \begin{align*} k(\mathbf{x},\mathbf{x}',\Theta=\{\rho^{2}_{1:D},\alpha_{0}^{2}\}) = \alpha_{0}^{2}\exp\left( -\frac{1}{2}\sum_{i=1}^{D}\rho_{i}^{2}(\mathbf{x}_{i}-\mathbf{x}'_{i})^2 \right), \end{align*} where $\rho_{i}^{2}$ is the inverse squared length scale of the $i$-th variable. On the one hand, when only a small subset of variables in $\mathbf{x}$ are important, the variable selection is similar to adding a $L_{0}$ regularization for GP fitting step. Let $\mathbf{\rho}=[\rho^{2}_{1},\dots , \rho^{2}_{D}]$, the variable selection step chooses a subset of variables and specifies $\rho_{i}^{2}=0$ when $i$-th variable is in $\mathbf{x}_{nipt}$, leading $\norm{\mathbf{\rho}}_{0}$ to be small. Therefore, fitting GP by only using variables in $\mathbf{x}_{ipt}$ is similar to learning the kernel function with sparse parameters. On the other hand, when in the worst case every variable is equally important, $\mathbf{x}_{ipt}$ is likely to contain nearly all the variables in $\mathbf{x}$, and in that case VS-BO degenerates to vanilla BO. \subsection{Momentum mechanism in variable selection} The idea of VS-momentum is to some extent similar to momentum in the stochastic gradient descent~\citep{loizou2017momentum}. Intuitively, queries obtained after one variable selection step can give extra information on the accuracy of this variable selection. If empirically a new maximizer is found, then this variable selection step is likely to have found real important variables, hence most of these variables should be kept at the next variable selection step. Otherwise, most should be removed and new variables need to be added. More specifically, we say that the variable selection at iteration $t+N_{vs}$ is in an accurate case when $\max_{k\in \{t+1,\dots, t+N_{vs}\}}y^{k}>\max_{k\in \{1,\dots, t\}}y^{k}$, otherwise it is in an inaccurate case. In the accurate case, VS-BO first uses recursive feature elimination (RFE) based algorithm to remove redundant variables in $\mathbf{x}_{ipt}$ that is selected at $t$, then it adds new variables into the remaining only if the loss decreases evidently (Figure~\ref{fig:momentum}a). In the inaccurate case, variables selected at $t$ will not be considered at $t+N_{vs}$ unless they still obtain very high important scores at $t+N_{vs}$ (marked by the blue box in Figure~\ref{fig:momentum}b). New variables are added via stepwise-forward algorithm. The details of variable selection with momentum mechanism are described in section A of the appendix. \begin{figure} \centering \includegraphics[width=0.90\textwidth]{momemtum_2.png} \caption{Momentum mechanism in VS-BO. (a) Accurate case, RFE is first used to remove redundant variables, and then new variables are added. (b) Inaccurate case, most variables are removed except those that are considered very important in both variable selection steps (blue box). New variables are then added.} \label{fig:momentum} \end{figure} \subsection{Sampling for unimportant variables} We propose a method based on Covariance Matrix Adaptation Evolution Strategy (CMA-ES) to obtain the new value of unimportant variables for each iteration. CMA-ES is an evolutionary algorithm for numerically optimizing a function. For each generation $k$, the algorithm samples new offsprings from a multivariate Gaussian distribution $\mathcal{N}\left(m^{(k-1)},(\sigma^{(k-1)})^2\right)$ and updates $m^{(k-1)}$ and $(\sigma^{(k-1)})^2$ based on these new samples and their corresponding function values. Details of this algorithm can be seen in \citet{hansen2016cma}. Using the same approach as CMA-ES, VS-BO uses the initialized data $\{(\mathbf{x}^{i},y^{i})\}_{i=1}^{N_{init}}$ to initialize the multivariate Gaussian distribution $p(\mathbf{x}\mid \mathcal{D})$ (line 5 in Algorithm~\ref{alg:VSBO}), and for every $N_{vs}$ iterations, it updates the distribution based on new query-output pairs (line 9 in Algorithm~\ref{alg:VSBO}). Because of the property of Gaussian distribution, the conditional distribution $p(\mathbf{x}_{nipt}\mid \mathbf{x}_{ipt},\mathcal{D})$ is easily derived which is also a multivariate Gaussian distribution. Therefore, $\mathbf{x}_{nipt}^{t}$ can be sampled from the Gaussian distribution $p(\mathbf{x}_{nipt}\mid \mathbf{x}_{ipt}^{t},\mathcal{D})$ (line 13 in Algorithm~\ref{alg:VSBO}) when $\mathbf{x}_{ipt}^{t}$ is obtained. Compared to BO, it is much faster to update the evolutionary algorithm and obtain new queries, although these queries are less precise than those from BO. VS-BO takes advantage of the strength of these two methods by using them on different variables. Important variables are crucial to the function value, therefore VS-BO uses the framework of BO on them to obtain precise queries. Unimportant variables do not effect the function value too much so there is no need to spend large time budget to search for extremely precise queries. Hence, they are determined by CMA-ES to reduce runtime. In addition, when the variable selection step is inaccurate, VS-BO degenerates to an algorithm that is similar to CMA-ES rather than random sampling, therefore this sampling strategy may help improve the robustness of the performance of the whole algorithm. \section{Computational complexity analysis} From the theoretical perspective, we prove that running BO by only using those important variables is able to decrease the runtime of both the step of fitting the GP and maximizing the acquisition function. Specifically, we have the following proposition: \begin{prop}\label{prop:complexity} Suppose the cardinality of $\mathbf{x}_{ipt}$ is $p$ and the Quasi-Newton method (QN) is used for both fitting the GP and maximizing the acquisition function. Under the choice of commonly used kernel functions and acquisition functions, if only variables in $\mathbf{x}_{ipt}$ is used, then the complexity of each step of QN is $\mathcal{O}(p^2+pn^2+n^3)$ for fitting the GP and $\mathcal{O}(p^2+pn+n^2)$ for maximizing the acquisition function, where $n$ is the number of queries that are already obtained. \end{prop} The proof is in section B of the appendix. Note that the method for fitting the GP and maximizing the acquisition function under the framework of BoTorch is limited-memory BFGS, which is indeed a QN method. Since the complexity is related to the quadratic of $p$, selecting a small subset of variables (so that $p$ is small) can decrease the runtime of BO. Figure~\ref{fig:runtime_compare_branin} empirically shows that compared to vanilla BO, VS-BO can both reduce the runtime of fitting a GP and optimizing the acquisition function, especially when $n$ is not small. \section{Regret bound analysis} Let $\mathbf{x}^{*}$ be one of the maximal points of $f(\mathbf{x})$. To quantify the efficacy of the optimization algorithm, we are interested in the cumulative regret $R_{N}$, defined as: $R_{N}=\sum_{t=1}^{N}\left[f(\mathbf{x}^{*})-f(\mathbf{x}^{t})\right]$ where $\mathbf{x}^{t}$ is the query at iteration $t$. Intuitively, the algorithm is better when $R_{N}$ is small, and a desirable property is to have no regret: $\lim_{N\to\infty}R_{N}/N=0$. Here, we provide an upper bound of the cumulative regret for a simplified VS-BO algorithm, called VS-GP-UCB (Algorithm~\ref{alg:VS_GP_UCB} in the appendix). Similar to \citet{srinivas2009gaussian}, for proving the regret bound we need the smoothness assumption of the kernel function. In addition, we have the extra assumptions that the $D-d$ variables in $\mathbf{x}$ are unimportant (for convenience we index unimportant variables from $d+1$ to $D$ without loss of generality), meaning the absolute values of partial derivatives of $f$ on those $D-d$ variables are in general smaller than those on important variables. Formally, we have the following assumption: \begin{assumption} \label{assump:derivative} Let $\mathcal{X}\subset[0,1]^{D}$ be compact and convex, $D\in \mathbb{N}$, and $f$ be a sample path of a GP with mean zero and the kernel function $k$, which satisfies the following high probability bound on the derivatives of $f$ for some constants $a,b>0$, $1>\alpha\geq 0$: \begin{align*} P(\sup_{\mathbf{x}\in \mathcal{X}}\abs{\frac{\partial f}{\partial \mathbf{x}_j}}>L) \leq a\exp\left(-\left(\frac{L}{b}\right)^2\right), j=1,\dots , d \end{align*} And: \begin{align*} P(\sup_{\mathbf{x}\in \mathcal{X}}\abs{\frac{\partial f}{\partial \mathbf{x}_j}}> L) \leq a\exp\left(-\left(\frac{L}{\alpha b}\right)^2\right), j=d+1,\dots , D, \end{align*} \end{assumption} In VS-GP-UCB, the values of unimportant variables are fixed in advance (line 4 in Algorithm~\ref{alg:VS_GP_UCB}), denoted as $\mathbf{x}^{0}_{[d+1:D]}$, and the important variables are queried at each iteration by maximizing the acquisition function upper confidence bound (UCB)~\citep{auer2002using} with those fixed unimportant variables (line 6 in Algorithm~\ref{alg:VS_GP_UCB}). We have the following regret bound theorem of VS-GP-UCB: \begin{theorem} \label{thm:regret} Let $\mathcal{X}\subset[0,1]^{D}$ be compact and convex, suppose Assumption \ref{assump:derivative} is satisfied, pick $\delta\in (0,1)$, and define \begin{align*} \beta_{t}= 2\log\frac{8\pi^{2}t^{2}}{3\delta} + 2(D-d)\log\left(\alpha Dt^{2}b\sqrt{\log\left(\frac{8Da}{\delta}\right)}+1\right) + 2d\log\left( Dt^{2}b\sqrt{\log\left(\frac{8Da}{\delta}\right)}\right). \end{align*} Running the VS-GP-UCB, with probability $\geq 1-\delta$, we have: \begin{align*} \frac{R_{N}}{N} = \frac{\sum_{t=1}^{N}r_{t}}{N}\leq 2\sqrt{C_1 \frac{\beta_{N}\gamma_{N}}{N}} + \frac{\pi^{2}}{3N} + \alpha b\sqrt{\log\left(\frac{8Da}{\delta}\right)}(D-d), \end{align*} \end{theorem} Here, $\gamma_{N}:=\max_{A\subset \mathcal{X}: |A|=N}\mathbf{I}(\mathbf{y}_{A};\mathbf{f}_{A})$ is the maximum information gain with a finite set of sampling points $A$, $\mathbf{f}_{A}=[f(\mathbf{x})]_{\mathbf{x}\in A}$, $\mathbf{y}_{A}=\mathbf{f}_{A} + \epsilon_{A}$, and $C_1=\frac{8}{\log\left(1+\sigma_{0}^{-2}\right)}$. The proof of Theorem \ref{thm:regret} is in section C of the appendix. \citet{srinivas2009gaussian} upper bounded the maximum information gain for some commonly used kernel functions, for example they prove that by using SE kernel with the same length scales ($\rho_{i}=\rho_{0}$ for all $i$), $\gamma_{N}=\mathcal{O}\left((\log N)^{D+1}\right)$ so that $\lim_{N\to\infty}(\beta_{N}\gamma_{N})/N=0$. However, every variable is equally important in the SE kernel with the same length scales, which does not obey Assumption \ref{assump:derivative}. We hypothesize that by using SE kernel of which the length scales are different such that Assumption \ref{assump:derivative} is satisfied, the statement that $\lim_{N\to\infty}(\beta_{N}\gamma_{N})/N=0$ is also correct, although we do not have proof here. \citet{li2016high} also derives a regret bound for its dropout algorithm (Lemma 5 in \citet{li2016high}). Compared to the regret bound in \citet{srinivas2009gaussian} (Theorem 2 in \citet{srinivas2009gaussian}), both \citet{li2016high} and our work have an additional residual in the bound, while ours contains a small coefficient $\alpha$. In the case when $\alpha\to 0$, the bound in Theorem \ref{thm:regret} is the same as that in theorem 2 of \citet{srinivas2009gaussian} and there is no regret. These results show the necessity of the variable selection since it can help decrease the value of $\alpha$. In addition, compared to fixing unimportant variables in VS-GP-UCB, sampling from the CMA-ES posterior may further decrease the residual value. \section{Experiments} We compare VS-BO to a broad selection of existing methods: vanilla BO, REMBO and its variant REMBO Interleave, Dragonfly, HeSBO and ALEBO. The details of implementations of these methods as well as hyperparameter settings are described in section D of the appendix. \begin{figure}[!ht] \centering \includegraphics[width=0.99\textwidth]{synthetic_result_iter.png} \caption{Performance of BO methods on Branin, Hartmann6 and Styblinski-Tang4 test functions. For each test function, we do 20 independent runs for each method. We plot the mean and 1/8 standard deviation of the best maximum value found by iterations.} \label{fig:sythentic_result_iter} \end{figure} \subsection{Synthetic problems} We use the Branin ($d_{e}=2$), Hartmann6 ($d_{e}=6$) and Styblinski-Tang4 ($d_{e}=4$) functions as test functions. Previous high-dimensional BO work extends these functions to high dimension by adding unrelated variables, while in our work we present a harder test setting that has not been tried before by adding both unrelated and unimportant (but not totally unrelated) variables. For example, in the Hartmann6 case with the standard Hartmann6 function $f_{Hartmann6}(\mathbf{x}_{[1:6]})$ we first construct a new function $F_{hm6}(\mathbf{x})$ by adding variables with different importance, $F_{hm6}(\mathbf{x})=f_{Hartmann6}(\mathbf{x}_{[1:6]})+0.1f_{Hartmann6}(\mathbf{x}_{[7:12]})+0.01f_{Hartmann6}(\mathbf{x}_{[13:18]})$, and we further extend it to $D=50$ by adding unrelated variables; see section D for full details. The dimension of effective subspace of $F_{hm6}$ is $18$, while the dimension of important variables is only $6$. We hope that VS-BO can find those important variables successfully. For each embedding-based methods we evalualte both $d=4$ and $d=6$. Figures~\ref{fig:sythentic_result_iter} and ~\ref{fig:sythentic_result_time} show performance of VS-BO as well as other BO methods on these three synthetic functions. When the iteration budget is fixed (Figure~\ref{fig:sythentic_result_iter}), the best value in average found by VS-BO after $200$ iterations is the largest or slightly smaller than the largest in all three cases. When the wall clock time or CPU time budget for BO is fixed (Figure~\ref{fig:sythentic_result_time}), results show that VS-BO can find a large function value with high computational efficiency. Figure~\ref{fig:sythentic_f_chosen} shows that VS-BO can accurately find all the real important variables and meanwhile control false positives. We also test VS-BO on the function that has a non-axis-aligned subspace, and results in Figure~\ref{fig:rotation_compare_iter} show that VS-BO also performs well. Vanilla BO under the framework of BoTorch can also achieve good performance for the fixed iteration budget, however, it is very computationally inefficient. For embedding-based methods, the results reflect some of their shortcomings. First, the performance of these methods are more variable than VS-BO; for example, HeSBO with $d=6$ performs very well in the Styblinski-Tang4 case but not in the others; Second, embedding-based methods are sensitive to the choice of the embedding dimension $d$, they perform especially bad when $d$ is smaller than the dimension of important variables (see results of the Hartmann6 case) and may still perform not well even when $d$ is larger (such as ALEBO with $d=6$ in the Styblinski-Tang4 case), while VS-BO can automatically learn the dimension. One advantage of embedding-based methods is that they may have a better performance than VS-BO within a very limited iteration budget (for example 50 iterations), which is expected since a number of data points are needed for VS-BO to make the variable selection accurate. \subsection{Real-world problems} We compare VS-BO with other methods on two real-world problems. First, VS-BO is tested on the rover trajectory optimization problem presented in \citet{wang2017batched}, a problem with a $60$-dimensional input domain. Second, it is tested on the vehicle design problem MOPTA08~\citep{jones2008large}, a problem with $124$ dimensions. On these two problems, we evaluate both $d=6$ and $d=10$ for each embedding-based method, except we omit ALEBO with $d=10$ since it is very time consuming. The detailed settings of these two problems are described in section D of the appendix. \begin{figure} \centering \includegraphics[width=0.88\textwidth]{real_problem_iter.png} \caption{Performance of BO methods on the rover trajectory and MOPTA08 problems. We do 20 independent runs on the rover trajectory problem and 15 on the MOPTA08 problem. We plot the mean and 1/4 standard deviation of the best maximum value found by iterations. Curves of vanilla BO and ALEBO with $d=6$ do not reach the maximum iteration since they are time consuming and cannot run the maximum within the wall clock time budget (3600 seconds for the rover trajectory problem for each run and 4800 seconds for the MOPTA08 problem).} \label{fig:real_result_iter} \end{figure} Figures~\ref{fig:real_result_iter} and ~\ref{fig:real_result_time} show the performance of VS-BO and other BO methods on these two problems. When the iteration budget is fixed (Figure~\ref{fig:real_result_iter}), VS-BO and vanilla BO have a better performance than other methods on both problems. When the wall clock or CPU time is fixed (Figure~\ref{fig:real_result_time}), Dragonfly and VS-BO reach the best performance on the rover trajectory problem, and Dragonfly performs the best on MOPTA08 problem while VS-BO has the second best performance. Vanilla BO is computationally inefficient so it does not have good performance with the fixed runtime. The left column of Figure~\ref{fig:real_F_permutation} shows the frequency of being chosen as important for each variable when VS-BO is used. Since there is no ground truth of important variables in real-world cases, we use a sampling experiment to test whether those more frequently-chosen variables are more important. Specifically, we sample the first $5$ variables that have been chosen most frequently by a Sobol sequence and fix the values of other variables with the values in the best query we have found (the query having the highest function value). We then calculate the function values of this set of samples. Likewise, we also sample the first $5$ variables that have been chosen least frequently and evaluate the functions. The right column of Figure~\ref{fig:real_F_permutation} shows that the variance of function values from the first set of samples is significantly higher than that from the second, especially on the MOPTA08 problem, indicating that those frequently selected variables indeed have more significant effect on the function value. \section{Conclusion} We propose a new method, VS-BO, for high-dimensional BO that is based on the assumption that variables of the input can be divided to two categories: important and unimportant. Our method can assign variables into these two categories with no need for pre-specifying any crucial hyper-parameter and use different strategies to decide values of the variables in different categories to reduce runtime. The good performance of our method on synthetic and real-world problems further verify the rationality of the assumption. We show the computational efficiency of our method both theoretically and empirically. In addition, information from the variable selection improves the interpretability of BO model: VS-BO can find important variables so that it can help increase our understanding of the black-box function. We also notice that in practice vanilla BO under the framework of BoTorch usually has a good performance if the runtime of BO does not need to be considered, especially when the dimension is not too large ($D<100$). However, this method is usually not considered as a baseline to compare with in previous high-dimensional BO work. We also find some limitations of our method when running experiments. First, when the dimension of the input increases, it becomes harder to do variable selection accurately. Therefore, embedding-based methods are still the first choice when the input of a function has thousands of dimensions. It might be interesting to develop new algorithms that can do variable selection robustly even when the dimension is extremely large. Further, Grad-IS might be invalid when variables are discrete or categorical, therefore new methods for calculating the importance score of these kinds of variables are needed. These are several directions for future improvements of VS-BO. It is also interesting to do further theoretical study such as investigating the bounds on the maximum information gain of kernels that satisfy Assumption \ref{assump:derivative}. \begin{comment} \section{Submission of papers to NeurIPS 2021} Please read the instructions below carefully and follow them faithfully. \subsection{Style} Papers to be submitted to NeurIPS 2021 must be prepared according to the instructions presented here. Papers may only be up to {\bf nine} pages long, including figures. Additional pages \emph{containing only acknowledgments and references} are allowed. Papers that exceed the page limit will not be reviewed, or in any other way considered for presentation at the conference. The margins in 2021 are the same as those in 2007, which allow for $\sim$$15\%$ more words in the paper compared to earlier years. Authors are required to use the NeurIPS \LaTeX{} style files obtainable at the NeurIPS website as indicated below. Please make sure you use the current files and not previous versions. Tweaking the style files may be grounds for rejection. \subsection{Retrieval of style files} The style files for NeurIPS and other conference information are available on the World Wide Web at \begin{center} \url{http://www.neurips.cc/} \end{center} The file \verb+neurips_2021.pdf+ contains these instructions and illustrates the various formatting requirements your NeurIPS paper must satisfy. The only supported style file for NeurIPS 2021 is \verb+neurips_2021.sty+, rewritten for \LaTeXe{}. \textbf{Previous style files for \LaTeX{} 2.09, Microsoft Word, and RTF are no longer supported!} The \LaTeX{} style file contains three optional arguments: \verb+final+, which creates a camera-ready copy, \verb+preprint+, which creates a preprint for submission to, e.g., arXiv, and \verb+nonatbib+, which will not load the \verb+natbib+ package for you in case of package clash. \paragraph{Preprint option} If you wish to post a preprint of your work online, e.g., on arXiv, using the NeurIPS style, please use the \verb+preprint+ option. This will create a nonanonymized version of your work with the text ``Preprint. Work in progress.'' in the footer. This version may be distributed as you see fit. Please \textbf{do not} use the \verb+final+ option, which should \textbf{only} be used for papers accepted to NeurIPS. At submission time, please omit the \verb+final+ and \verb+preprint+ options. This will anonymize your submission and add line numbers to aid review. Please do \emph{not} refer to these line numbers in your paper as they will be removed during generation of camera-ready copies. The file \verb+neurips_2021.tex+ may be used as a ``shell'' for writing your paper. All you have to do is replace the author, title, abstract, and text of the paper with your own. The formatting instructions contained in these style files are summarized in Sections \ref{gen_inst}, \ref{headings}, and \ref{others} below. \section{General formatting instructions} \label{gen_inst} The text must be confined within a rectangle 5.5~inches (33~picas) wide and 9~inches (54~picas) long. The left margin is 1.5~inch (9~picas). Use 10~point type with a vertical spacing (leading) of 11~points. Times New Roman is the preferred typeface throughout, and will be selected for you by default. Paragraphs are separated by \nicefrac{1}{2}~line space (5.5 points), with no indentation. The paper title should be 17~point, initial caps/lower case, bold, centered between two horizontal rules. The top rule should be 4~points thick and the bottom rule should be 1~point thick. Allow \nicefrac{1}{4}~inch space above and below the title to rules. All pages should start at 1~inch (6~picas) from the top of the page. For the final version, authors' names are set in boldface, and each name is centered above the corresponding address. The lead author's name is to be listed first (left-most), and the co-authors' names (if different address) are set to follow. If there is only one co-author, list both author and co-author side by side. Please pay special attention to the instructions in Section \ref{others} regarding figures, tables, acknowledgments, and references. \section{Headings: first level} \label{headings} All headings should be lower case (except for first word and proper nouns), flush left, and bold. First-level headings should be in 12-point type. \subsection{Headings: second level} Second-level headings should be in 10-point type. \subsubsection{Headings: third level} Third-level headings should be in 10-point type. \paragraph{Paragraphs} There is also a \verb+\paragraph+ command available, which sets the heading in bold, flush left, and inline with the text, with the heading followed by 1\,em of space. \section{Citations, figures, tables, references} \label{others} These instructions apply to everyone. \subsection{Citations within the text} The \verb+natbib+ package will be loaded for you by default. Citations may be author/year or numeric, as long as you maintain internal consistency. As to the format of the references themselves, any style is acceptable as long as it is used consistently. The documentation for \verb+natbib+ may be found at \begin{center} \url{http://mirrors.ctan.org/macros/latex/contrib/natbib/natnotes.pdf} \end{center} Of note is the command \verb+\citet+, which produces citations appropriate for use in inline text. For example, \begin{verbatim} \citet{hasselmo} investigated\dots \end{verbatim} produces \begin{quote} Hasselmo, et al.\ (1995) investigated\dots \end{quote} If you wish to load the \verb+natbib+ package with options, you may add the following before loading the \verb+neurips_2021+ package: \begin{verbatim} \PassOptionsToPackage{options}{natbib} \end{verbatim} If \verb+natbib+ clashes with another package you load, you can add the optional argument \verb+nonatbib+ when loading the style file: \begin{verbatim} \usepackage[nonatbib]{neurips_2021} \end{verbatim} As submission is double blind, refer to your own published work in the third person. That is, use ``In the previous work of Jones et al.\ [4],'' not ``In our previous work [4].'' If you cite your other papers that are not widely available (e.g., a journal paper under review), use anonymous author names in the citation, e.g., an author of the form ``A.\ Anonymous.'' \subsection{Footnotes} Footnotes should be used sparingly. If you do require a footnote, indicate footnotes with a number\footnote{Sample of the first footnote.} in the text. Place the footnotes at the bottom of the page on which they appear. Precede the footnote with a horizontal rule of 2~inches (12~picas). Note that footnotes are properly typeset \emph{after} punctuation marks.\footnote{As in this example.} \subsection{Figures} \begin{figure} \centering \caption{Sample figure caption.} \end{figure} All artwork must be neat, clean, and legible. Lines should be dark enough for purposes of reproduction. The figure number and caption always appear after the figure. Place one line space before the figure caption and one line space after the figure. The figure caption should be lower case (except for first word and proper nouns); figures are numbered consecutively. You may use color figures. However, it is best for the figure captions and the paper body to be legible if the paper is printed in either black/white or in color. \subsection{Tables} All tables must be centered, neat, clean and legible. The table number and title always appear before the table. See Table~\ref{sample-table}. Place one line space before the table title, one line space after the table title, and one line space after the table. The table title must be lower case (except for first word and proper nouns); tables are numbered consecutively. Note that publication-quality tables \emph{do not contain vertical rules.} We strongly suggest the use of the \verb+booktabs+ package, which allows for typesetting high-quality, professional tables: \begin{center} \url{https://www.ctan.org/pkg/booktabs} \end{center} This package was used to typeset Table~\ref{sample-table}. \begin{table} \caption{Sample table title} \label{sample-table} \centering \begin{tabular}{lll} \toprule \multicolumn{2}{c}{Part} \\ \cmidrule(r){1-2} Name & Description & Size ($\mu$m) \\ \midrule Dendrite & Input terminal & $\sim$100 \\ Axon & Output terminal & $\sim$10 \\ Soma & Cell body & up to $10^6$ \\ \bottomrule \end{tabular} \end{table} \section{Final instructions} Do not change any aspects of the formatting parameters in the style files. In particular, do not modify the width or length of the rectangle the text should fit into, and do not change font sizes (except perhaps in the \textbf{References} section; see below). Please note that pages should be numbered. \section{Preparing PDF files} Please prepare submission files with paper size ``US Letter,'' and not, for example, ``A4.'' Fonts were the main cause of problems in the past years. Your PDF file must only contain Type 1 or Embedded TrueType fonts. Here are a few instructions to achieve this. \begin{itemize} \item You should directly generate PDF files using \verb+pdflatex+. \item You can check which fonts a PDF files uses. In Acrobat Reader, select the menu Files$>$Document Properties$>$Fonts and select Show All Fonts. You can also use the program \verb+pdffonts+ which comes with \verb+xpdf+ and is available out-of-the-box on most Linux machines. \item The IEEE has recommendations for generating PDF files whose fonts are also acceptable for NeurIPS. Please see \url{http://www.emfield.org/icuwb2010/downloads/IEEE-PDF-SpecV32.pdf} \item \verb+xfig+ "patterned" shapes are implemented with bitmap fonts. Use "solid" shapes instead. \item The \verb+\bbold+ package almost always uses bitmap fonts. You should use the equivalent AMS Fonts: \begin{verbatim} \usepackage{amsfonts} \end{verbatim} followed by, e.g., \verb+\mathbb{R}+, \verb+\mathbb{N}+, or \verb+\mathbb{C}+ for $\mathbb{R}$, $\mathbb{N}$ or $\mathbb{C}$. You can also use the following workaround for reals, natural and complex: \begin{verbatim} \newcommand{\RR}{I\!\!R} \newcommand{\Nat}{I\!\!N} \newcommand{\CC}{I\!\!\!\!C} \end{verbatim} Note that \verb+amsfonts+ is automatically loaded by the \verb+amssymb+ package. \end{itemize} If your file contains type 3 fonts or non embedded TrueType fonts, we will ask you to fix it. \subsection{Margins in \LaTeX{}} Most of the margin problems come from figures positioned by hand using \verb+\special+ or other commands. We suggest using the command \verb+\includegraphics+ from the \verb+graphicx+ package. Always specify the figure width as a multiple of the line width as in the example below: \begin{verbatim} \usepackage[pdftex]{graphicx} ... \includegraphics[width=0.8\linewidth]{myfile.pdf} \end{verbatim} See Section 4.4 in the graphics bundle documentation (\url{http://mirrors.ctan.org/macros/latex/required/graphics/grfguide.pdf}) A number of width problems arise when \LaTeX{} cannot properly hyphenate a line. Please give LaTeX hyphenation hints using the \verb+\-+ command when necessary. \begin{ack} Use unnumbered first level headings for the acknowledgments. All acknowledgments go at the end of the paper before the list of references. Moreover, you are required to declare funding (financial activities supporting the submitted work) and competing interests (related financial activities outside the submitted work). More information about this disclosure can be found at: \url{https://neurips.cc/Conferences/2021/PaperInformation/FundingDisclosure}. Do {\bf not} include this section in the anonymized submission, only in the final paper. You can use the \texttt{ack} environment provided in the style file to autmoatically hide this section in the anonymized submission. \end{ack} \end{comment} \bibliographystyle{plainnat}
\section{Introduction} Recently, Automatic Speech Recognition (ASR) has achieved remarkable success, which can be attributed to two complementary aspects: 1) designing more effective and larger deep neural networks for ASR, and 2) training on a large amount of data~\cite{chan2016listen,watanabe2017hybrid,amodei2016deep}. However, in practice, unlike the commonly used languages (e.g. English and Chinese) with sufficient training data, many other languages (e.g. Swahili, Tamil) have only low-resource data due to the scarcity of audios and the huge labor resources consumed in transcription. In this way, the aforementioned data-driven mechanism is impractical for low-resource languages and thus suffers from unsatisfactory performance. To resolve this learning difficulty in the low-resource domain, many efforts have been devoted to leveraging unlabeled data. One mainstream research paradigm is unsupervised pre-training, or representation learning, which has achieved great success in natural language processing~\cite{devlin2018bert,peters2018deep} and received increasing attention in speech recognition~\cite{oord2018representation,schneider2019wav2vec}. As a representation in this line, wav2vec~\cite{schneider2019wav2vec} and wav2vec 2.0~\cite{baevski2020wav2vec} apply unsupervised contrastive pre-training and show promising results. To utilize linguistic information, some works~\cite{chiu2021innovative,shin2019effective} also aim to build language models to rescore the $N$-best hypotheses generated by acoustic models. The most recent approach~\cite{yi2021efciently} even cascaded the pre-trained wav2vec 2.0 and BERT into a single model for low-resource ASR. However, there leave two critical challenges on how to integrate the acoustic model and language model to utilize the contextual information of speech and text. 1) Representation discrepancy: the acoustic model focuses more on local dependencies of the speech sequence, while the language model aims at capturing long-term semantic information of texts. It is desired to explore an effective model to fuse and leverage the two kinds of representation. 2) Embedding inconsistency: The language model applies a token embedding layer during pre-training but previous methods~\cite{yi2021efciently} simply replace the embedding layer with the features generated by the acoustic model, which may result in the catastrophic forgetting problem~\cite{goodfellow2013empirical}. To tackle the above challenges, in this work, we make the first attempt to successfully integrate the well-trained acoustic model and language model for low-resource speech recognition. Towards this end, we introduce a new framework that incorporates the two kinds of pre-trained models for cooperative acoustic and linguistic representation learning by exploiting complementary contextual information of both speech and text. First, to solve representation discrepancy, unlike the previous works~\cite{yi2021efciently,yu2021non} that simply connect the acoustic model and the language model by treating them as an encoder and a decoder, we consider them as two encoders that provide two different representations. Specifically, we propose a Representation Aggregation Module, a plug-in component to better exploit and fuse the acoustic and linguistic information. We design and evaluate several representation aggregation mechanisms, including Gated Acoustic-Guided Attention, Gated Linguistic-Guided Attention, and Gated Cross-Modal Attention. The experimental results show the proposed Gated Cross-Modal Attention is the most effective method for representation aggregation. Second, to fill the gap of embedding inconsistency, we introduce an Embedding Attention Module to incorporate the acoustic features into BERT by a gated attention process, which not only preserves the capability of BERT but also takes advantage of acoustic information. Moreover, as BERT requires audio transcripts as input to create word embedding, it may be easy to overfit when using ground truth transcripts. On the other hand, it is also hard to converge when using transcripts predicted by the acoustic model. To facilitate the cooperation of the two encoders, we propose a sampling strategy with decay to randomly select the ground truth and generated transcripts for smooth training. We adopt pre-trained wav2vec 2.0~\cite{baevski2020wav2vec} and BERT~\cite{devlin2018bert} as the encoders to provide acoustic and linguistic representations respectively for their flexible pre-training then fine-tuning paradigm as well as excellent local contextual modeling ability. Accordingly, we denominate our method as Wav-BERT. We evaluate our method on several datasets with diverse languages from the public IARPA BABEL dataset~\cite{gales2014speech} and AISHELL-1 corpus~\cite{bu2017aishell}. The experimental results demonstrate that our Wav-BERT significantly outperforms the existing approaches on low-resource ASR. Furthermore, our exhaustive ablation studies demonstrate the effectiveness of the proposed mechanisms for cooperative acoustic and linguistic representations learning. We hope this work will be useful for the community on the way to explore different pre-trained models for low-resource ASR. \section{Related Work} \subsection{Low resource speech recognition} To tackle the low-resource ASR task, transfer learning ASR~\cite{Kunze2017TransferLF} and multilingual transfer learning ASR~\cite{Dalmia2018SequenceBasedML,Watanabe2017LanguageIE,Toshniwal2018MultilingualSR} are explored via using different source languages to improve the performance of low-resource languages. Meta-learning approaches~\cite{Finn2017ModelAgnosticMF,Nichol2018OnFM} are also adopted for low-resource ASR~\cite{Hsu2019MetaLF,xiao2020adversarial} to obtain fast adaptation ability to new tasks with only a few data through meta-learning a model initialization from training tasks. In addition, recent works utilize unsupervised pre-training~\cite{Schneider2019wav2vecUP,Chung2019GenerativePF} and semi-supervised learning~\cite{Kahn2019SelfTrainingFE,Li2019SemisupervisedTF} to exploit a large amount of unlabeled data to learn general representations for low-resource adaptation. Among them, Wav2vec 2.0~\cite{baevski2020wav2vec} achieved excellent results through self-supervised learning, which learns powerful and contextual acoustic representations of a large speech audio corpus by solving contrastive tasks that require identifying the true quantized latent speech representations for masked time steps. Then it shows strong feasibility of ultra-low resource speech recognition with even only 10 minutes of labeled data. \begin{figure*} \centering \includegraphics[width=1.0\linewidth, clip]{pic/model_fusion_v2.pdf} \caption{Comparison of the architectures of different approaches to fuse BERT into the ASR model. (a) Rescoring methods use BERT to rescore $N$-best hypotheses generated by wav2vec 2.0 ASR~\cite{shin2019effective}. (b) Cascade methods directly cascade the BERT decoder on the top of the wav2vec 2.0 encoder through Length Alignment module~\cite{yi2021efciently}. (c) Adapter-BERT inserts adapter modules in each BERT layer~\cite{NEURIPS2020_7a6a74cb}. (d) Our Wav-BERT introduces a Representation Aggregation Module for aggregate acoustic and linguistic representation and an Embedding Attention Module to incorporate acoustic information into text embedding.} \label{fig:model_fusion} \end{figure*} \subsection{Speech recognition with BERT} To use the linguistic information from BERT~\cite{devlin2018bert} for improving ASR performance, some works~\cite{chiu2021innovative,shin2019effective,wang2019bert} use BERT to re-rank the N-best hypotheses generated by the ASR model. Besides, knowledge distillation~\cite{futami2020distilling} is explored to use BERT as a teacher model to guide ASR model training. Moreover, some recent works~\cite{yi2021efciently,yu2021non,winata2020adapt} further combine BERT with the ASR model into a unified model and train the model in an end-to-end way. But Yi~\emph{et al. } and Yu~\emph{et al. } both simply connect BERT and the ASR model in series without considering the contextual information of speech and text~\cite{yi2021efciently,yu2021non}. Winata~\emph{et al. }~\cite{winata2020adapt} modified mBERT model into an auto-regressive decoder and insert a cross-attention layer in each mBERT layer, but the deep bidirectional information of pre-trained BERT cannot be fully utilized in the auto-regressive mode. \section{Preliminaries} Here we briefly introduce the architectures of acoustic and linguistic encoders in our framework. \noindent\textbf{Wav2vec 2.0.} We adopt wav2vec 2.0~\cite{baevski2020wav2vec} as our acoustic encoder because of its effectiveness and efficiency. It has two stages: (i) contrastive pre-training to learn representations of speech and (ii) fine-tuning to adapt the learned representations on labeled data with connectionist temporal classification(CTC) loss~\cite{Graves2006ConnectionistTC} for downstream speech recognition tasks. In this work, we aim to utilize the public pre-trained model and mainly focus on the fine-tuning stage. The architecture of wav2vec 2.0 contains a feature encoder, a context network with a transformer and a quantization module. During fine-tuning, the quantization module is removed and a randomly initialized linear projection layer is attached on top of the context network. \noindent\textbf{BERT.} BERT~\cite{devlin2018bert} is employed as our linguistic encoder since it is one of the most popular text pre-training approaches and has shown remarkable performance in many downstream natural language processing tasks. It also consists of two steps: (i) self-supervised pre-training to learn deep bidirectional linguistic representations from a large text corpus and (ii) fine-tuning to adapt to downstream tasks using labeled data. BERT consists of an embedding table, a multi-layer bidirectional Transformer encoder, and an additional output layer for fine-tuning. \subsubsection{Inference} \label{sec:infer} For inference, we first feed the result $Y_{CTC_1}$ into BERT encoder; then select the one with higher confidence from the two outputs $Y_{CTC_2}$ and $Y_{CE}$ as our final output. \section{Wav-BERT} \begin{figure*} \centering \includegraphics[width=1.0\linewidth,clip]{pic/overview_v6.pdf} \caption{Our Wav-BERT framework, which is composed of two main parts: 1) Representation Aggregation Module that combines a Gated Acoustic-Guided Attention (Left) and a Gated Linguistic-Guided Attention (Right) to construct a Gated Cross-Modal Attention. 2) Embedding Attention Module that includes a Gated Attention and a "Sampling with Decay" mechanism. } \label{fig:overview} \end{figure*} \label{sec:out_method} \subsection{Motivation} \label{sec:model_fusion} To transfer the knowledge learned on the abundance of high-resource language data for low-resource speech recognition, many efforts have been devoted to unifying acoustic and linguistic representation learning. We first categorize previous methods and then introduce our solution. As shown in Figure~\ref{fig:model_fusion} (a), one simplest way to fuse BERT into an acoustic model in speech recognition is rescoring~\cite{chiu2021innovative,shin2019effective}. It uses BERT as a language model to calculate the pseudo-log-likelihood scores of text sentences for reranking the $N$-best hypotheses generated by the acoustic model. However, this process is time-consuming as it needs to iteratively mask each word in the sentence for inference and then sum up the scores of all masked words. It also requires tuning many hyper-parameters by repetitive experiments, e.g. beam size, balanced weights of the language and acoustic models. Recently, some works~\cite{yi2021efciently,yu2021non} directly cascade the decoder BERT on the top of the acoustic encoder, as illustrated by Figure~\ref{fig:model_fusion} (b). However, such a simple cascade often cannot well fuse the contextual information of speech and text. Inspired by AB-Net~\cite{NEURIPS2020_7a6a74cb}, we design Adapter-BERT that inserts cross-attention adapters in each BERT layer with the Mask-Predict algorithm~\cite{ghazvininejad2019mask} to fully utilize the bidirectional information of the input sequence, as shown in Figure~\ref{fig:model_fusion} (c). Nevertheless, the adapters in each layer of BERT will affect the pre-trained parameters of BERT, causing catastrophic forgetting. Moreover, the Mask-Predict decoding suffers from low inference speed. To solve the representation discrepancy and embedding inconsistency between speech and text, in this work, we introduce Wav-BERT, a cooperative acoustic and linguistic learning framework that fuses and leverages the contextual information of speech and text from the representation level to the embedding level, as shown in Figure~\ref{fig:model_fusion} (d). We first present an independent Representation Aggregation Fusion Module for acoustic and linguistic representation aggregation, without inserting it in any pre-trained model to avoid destroying the parameters of pre-trained models. Then, an Embedding Attention Module is introduced to better combine acoustic and linguistic embedding instead of simply replacement. \subsection{Our Wav-BERT} The architecture of our Wav-BERT is illustrated in Figure~\ref{fig:overview}. Specifically, wav2vec 2.0 encoder takes raw waveform $X$ as input and outputs acoustic representation $H_A$, which is then fed into a linear projection layer with CTC loss~\cite{Graves2006ConnectionistTC} ($L_{ctc_1}$) and the Representation Aggregation Module respectively. For the input of BERT encoder, we employ ``Sampling with Decay" mechanism to sample from the masked ground truth $Y^r$ or wav2vec 2.0 CTC output $Y_{CTC_1}$ with probability $p$ and $1-p$, so as to narrow the gap between training and inference. Next, word embedding $E$ and acoustic embedding $H_A$ are fed into the Gate Attention to model the conditional information from the wav2vec 2.0 encoder side. Through the subsequent BERT transformer layers, we get the linguistic representation $H_L$. Finally, the Representation Aggregation Module takes linguistic representation $H_L$ as well as acoustic representation $H_A$ as input, generating the CTC output $Y_{CTC_2}$ and cross-entropy (CE) output $Y_{CE}$, supervised by the CTC ($L_{ctc_2}$) and CE ($L_{ce}$) criterion respectively. Simultaneously, the conditional masked language model (CMLM) objective ($L_{cmlm}$)~\cite{NEURIPS2020_7a6a74cb} is also attached on BERT encoder followed by a feed-forward layer to supervise the BERT output $Y^m$. Overall, the objective of our framework is defined as: \begin{small} \end{small} where $\mu_{1}$, $\mu_{2}$, $\mu_{3}$ and $\mu_{4}$ are the corresponding loss weights. \subsubsection{Representation Aggregation Module} \label{sec:rep_agg} To solve representation discrepancy, we first design several representation aggregation mechanisms, such as Gated Acoustic-Guided Attention, Gated Linguistic-Guided Attention. In our Representation Aggregation Module, we combine a Gated Acoustic-Guided Attention (Left) and a Gated Linguistic-Guided Attention (Right) to construct a Gated Cross-Modal Attention for better exploiting and aggregating the acoustic and linguistic representations. Specifically, Gated Cross-Modal Attention Module takes acoustic representation $H_A$ generated by wav2vec 2.0 as well as linguistic representation $H_L$ generated by BERT as input and feeds them as the query, key, and value vector respectively to a multi-head attention, which can be formulated as: \begin{align} C_{A} &= \mbox{ATT}(Q_{H_A}, K_{H_L}, V_{H_L}), \\ C_{L} &= \mbox{ATT}(Q_{H_L}, K_{H_A}, V_{H_A}), \end{align} where $Q_{H_A}$ means passing $H_A$ as query vector, $K_{H_L}$ as well as $V_{H_L}$ means passing $H_L$ as key and value vector respectively. $C_{A}$ is the acoustic guided context feature generated by attention which tend to focus on the values in the linguistic representation $H_L$ related to acoustic representation $H_A$. Vice versa, $C_{L}$ is the linguistic guided context feature to focus on the values in the $H_A$ related to $H_L$. Next, the context feature $C_{A}$ and acoustic representation $H_A$ are fed into a gated weighting layer to automatically capture the most important information between context and acoustic representation, and generating acoustic-guided linguistic representation $H_{AGL}$, which can be formulated as: \begin{align} & \Phi_A = \mbox{sigmoid}(W_{1}[C_A;H_A] + B_{1}), \\ & H_{AGL} = H_A + \Phi_{A} C_{A}, \end{align} where $W_{1}$ as well as $B_{1}$ are model parameters and $\Phi_A $ is the gated weight. Similarly, the context feature $C_{L}$ and linguistic representation $H_L$ are fed into another gated weighting layer to weigh the expected importance $\Phi_L$ and generate linguistic-guided acoustic representation $H_{LGA}$, which can be formulated as: \begin{align} & \Phi_L = \mbox{sigmoid}(W_{2}[C_L;H_L] + B_{2}), \\ & H_{LGA} = H_L + \Phi_{L} C_{L}, \end{align} where $W_{2}$ as well as $B_{2}$ are model parameters and $\Phi_L $ is the gated weight. We then feed $H_{AGL}$ and $H_{LGA}$ to a feed-forward layer followed by residual connection respectively and get aggregation representation $\mathcal{H}_A$ as well as $\mathcal{H}_L$. Finally, two linear projection layers are attached on the top of Representation Aggregation Module to get the $Y_{CTC_2}$ and $Y_{CE}$. As the sequence length of $Y_{CTC_2}$ is determined by acoustic representation $H_A$, we use CTC criterion to align the acoustic frames of $Y_{CTC_2}$ to the ground truth tokens. On the other hand, the sequence length of $Y_{CE}$ is determined by linguistic representation $H_L$, so we use CE criterion to align the text sequence of $Y_{CE}$ to the ground truth transcript. The different aggregation mechanisms including Gated Acoustic Guided Attention, Gated Linguistic-Guided Attention and Gated Cross-Modal Attention are evaluated and compared in Table~\ref{tab:ablation_fea_agg}. \subsubsection{Embedding Attention Module} \label{sec:embed_fusion} Recent works~\cite{yi2021efciently, yu2021non} directly connect the BERT on the top of the acoustic encoder and simply replace the embedding layer with the acoustic features generated by the acoustic encoder, causing the catastrophic forgetting problem. To fill the gap of embedding inconsistency, we propose the Embedding Attention Module and insert it behind the embedding layer of BERT to incorporate the acoustic information into the word embedding instead of simply replacing them. We first introduce a Gated Attention operation in this module. As shown in Figure~\ref{fig:overview}, word embedding ${E}$ generated by embedding layer is fed to a self-attention layer followed by a feed-forward layer to capture higher level linguistic embedding $E_L$. Then, a multi-head self-attention followed by a gated weighting layer takes $E_L$ as the query vector and acoustic embedding $H_A$ generated by wav2vec 2.0 as the key vector as well as value vector to fuse the linguistic embedding and acoustic embedding. Thus, as a conditional masked language model, BERT can learn to predict the masked word under the conditional acoustic information and provided enhanced linguistic representation. Furthermore, for the input of the embedding layer of BERT, it is easy to overfit when using ground truth transcripts while it is hard to converge when using transcripts predicted by wav2vec2.0 encoder. To solve this issue, we propose a "Sampling with Decay" mechanism by feeding BERT either the masked ground truth transcript $Y^r$ or the predicted CTC result $Y_{CTC_1}$ with a certain probability during training. The probability $p$ of selecting from $Y^r$ decreases linearly as the number of training steps increases. Through the Embedding Attention Module with "Sampling with Decay" mechanism, we further integrate the acoustic and linguistic information from the embedding level to facilitate better fusion between wav2vec 2.0 encoder and BERT encoder. Table~\ref{tab:ablation_embed_fusion} verifies the effectiveness of each component of our proposed Embedding Attention Module. \section{Experiments} \begin{table}[] \setlength\tabcolsep{2pt} \centering \tiny \caption{Results of low resource ASR on IARPA BABEL in terms of CER (\%).} \begin{tabular}{@{}l|c|llll@{}} \toprule {Method} & {Pre-trained} & {Vi} & {Sw} & {Ta} & {Avg} \\ \hline Mono-BLSTMP~\cite{Cho2018MultilingualSS} & \multirow{3}{*}{-} &54.3 & 33.1 & 55.3 & 47.6 \\ Multi-BLSTMP~\cite{Cho2018MultilingualSS} & {} &41.0 & - & 48.5 & 44.8 \\ Multi-BLSTMP+ VGG~\cite{Cho2018MultilingualSS} &{} & 37.4 & - & 45.5 & 41.5 \\ \hline \hline wav2vec 2.0~\cite{baevski2020wav2vec} &\multirow{4}{*}{\tabincell{c}{wav2vec 2.0 \\ (Base)}} & 21.8 & 15.5 & 29.3 & 22.2 \\ wav2vec 2.0 w/ 4-gram~\cite{baevski2020wav2vec} &{} & 21.1 & 14.9 & 29.9 & 22.0 \\ XLSR-Monolingual~\cite{conneau2020unsupervised} &{} & 25.2 & 26.8 & 36.0 & 29.3 \\ XLSR-10~\cite{conneau2020unsupervised} &{} & 21.7 & 16.6 & 30.5 & 22.9 \\ \hline BERT rescoring~\cite{shin2019effective} &\multirow{3}{*}{\tabincell{c}{w/ mBERT}} & 21.3 & 15.3 & 29.1 & 21.9 \\ Adapter-BERT~\cite{NEURIPS2020_7a6a74cb} &{} & 22.5 & 17.6 & 29.8 & 23.3 \\ w2v-cif-bert~\cite{yi2021efciently} &{} & 24.1 & 21.5 & 41.9 & 29.2 \\ \textbf{our Wav-BERT} &{} & \textbf{19.5} & \textbf{14.8} & \textbf{28.8} & \textbf{21.0} \\ \hline \hline XLSR-10~\cite{conneau2020unsupervised} &\multirow{2}{*}{\tabincell{c}{wav2vec 2.0 \\ (Large) }} & 19.9 & 14.9 & 28.6 & 21.1 \\ XLSR-53~\cite{conneau2020unsupervised} &{} & 21.8 & 21.3 & \textbf{27.4} & 23.5 \\ \hline \textbf{our Wav-BERT w/ XLSR-53} &{w/ mBERT} & \textbf{19.3} & \textbf{13.8} & 28.0 & \textbf{20.4} \\ \bottomrule \end{tabular} \label{tab:sota_babel} \end{table} In this section, we first illustrate the implementation details of our Wav-BERT. Then we introduce two low-resource speech recognition datasets containing several languages as well as the comparison results among our approach and baseline methods. Furthermore, we conduct ablation studies to validate the effectiveness of each main component of our Wav-BERT and present some case studies for perceptual comparison. \noindent\textbf{Implementation Details.} For our proposed Representation Aggregation Module and Embedding Attention Module, the heads and embedding dimensions of all multi-head attention are set to 8 and 768 respectively. Meanwhile, the inner-layer dimension of the position-wise feed-forward is set to 2048. Regarding optimization details, we train our model as well as baselines based on wav2vec 2.0 Base for 200K steps with one GeForce RTX 3090 GPU, setting max tokens and update frequency to 640000 and 4 correspondingly. As for experiments using XLSR-53~\cite{conneau2020unsupervised}, three GeForce RTX 3090 GPUs are used with max tokens as 480000 and update frequency as 4. We use the three-stage learning rate policy with the initial learning rate as 5e-5, and set each stage ratio to 0.05, 0.45 and 0.5. Besides, we set the weight $\mu_{1}$, $\mu_{2}$, $\mu_{3}$ and $\mu_{4}$ for each loss to 0.5 for training. Other optimizer settings are the same as wav2vec 2.0~\cite{baevski2020wav2vec}. In terms of the "Sampling with Decay" policy, languages in IARPA BABEL start from 100K steps to 200K steps, while in AISHELL-1 it starts from 40k steps to 100k steps, all with $p$ decreasing from 90\% to 10\%. \noindent\textbf{Datasets.} IARPA BABEL~\cite{gales2014speech} is an open-source multilingual corpus of conversational telephone speech. For low resource evaluation, we randomly select 3 kinds of languages with few data: Swahili (Sw), Tamil (Ta) and Vietnamese (Vi). We adopt the same setup as~\cite{conneau2020unsupervised} and use the dev folder of the BABEL dataset as our test set since "eval" data are not released. We re-sample audios of all languages to 16kHz. AISHELL-1~\cite{bu2017aishell} is an open-source and high-quality Mandarin speech corpus, and is widely used in the speech community, which contains 178 hours of Mandarin speech data. Although the data is in Chinese, a common used language, the quantity is small. Thus, it can also verify our Wav-BERT for low-resource data. Moreover, there are many latest state-of-the-art methods on this dataset to be compared. For a fair comparison, we use the official wav2vec 2.0 (Base/Large) model, XLSR-53, and mBERT models as the initial encoders. All model checkpoint download links are described in the appendix. \subsection{Results on IARPA BABEL} \begin{table}[] \setlength\tabcolsep{3pt} \centering \scriptsize \caption{Results of ASR on AISHELL-1 in terms of CER(\%).} \begin{tabular}{@{}l|c|ll@{}} \toprule \multirow{2}{*}{Method} & \multirow{2}{*}{Pre-trained}& \multicolumn{2}{c}{AISHELL-1} \\ \cline{3-4} & & dev & test \\ \hline Kaldi chain~\cite{yu2021non} & \multirow{11}{*}{-} & - & 7.5 \\ Kaldi nnet3~\cite{yu2021non} & & - & 8.6 \\ LAS~\cite{shan2019component} & & - & 10.6 \\ ESPnet (Transformer)~\cite{karita2019comparative} & & 6.0 & 6.7 \\ SA-T~\cite{tian2019self} & & 8.3 & 9.3 \\ SAN-M~\cite{gao2020san} & & 5.7 & 6.5 \\ CAT~\cite{an2019cat} & & - & 6.3 \\ LFML~\cite{chen2019listen} & & 6.2 & 6.7 \\ LASO~\cite{bai2021fast} & & 5.9 & 6.9 \\ NAR-Transformer~\cite{song2020non} & & 5.6 & 6.3 \\ Wenet~\cite{zhang2020unified} & & - & 4.7 \\ \hline \hline LASO with BERT~\cite{bai2021fast} & \multirow{2}{*}{BERT} & 5.3 & 6.1 \\ NAR-BERT-ASR~\cite{yu2021non} & & 4.9 & 5.5 \\ \hline \hline wav2vec 2.0~\cite{baevski2020wav2vec} &\multirow{3}{*} {wav2vec 2.0} & 7.9 & 8.4 \\ wav2vec 2.0 (cn)~\cite{baevski2020wav2vec} & & 5.2 & 5.8 \\ wav2vec 2.0 (cn) w/ 4-gram~\cite{baevski2020wav2vec} & & 4.5 & 4.9 \\ \hline \hline BERT rescoring~\cite{shin2019effective} & & 4.2 & 4.5 \\ Adapter-BERT~\cite{NEURIPS2020_7a6a74cb} & wav2vec 2.0 & 6.9 & 7.3 \\ w2v-cif-bert~\cite{yi2021efciently} & w/ BERT & 5.6 & 6.3 \\ \textbf{our Wav-BERT w/ wav2vec 2.0} & & \textbf{3.8} & \textbf{4.0} \\ \textbf{our Wav-BERT w/ wav2vec 2.0 (cn)} & & \textbf{3.6} & \textbf{3.8} \\ \bottomrule \end{tabular} \label{tab:sota_aishell} \end{table} Table~\ref{tab:sota_babel} reports the results on IARPA BABEL in terms of character error rate (CER), where our Wav-BERT achieves state-of-the-art performance on all low-resource languages. We find some interesting points comparing the results. First, the performance of the methods without pre-training is quite bad, which indicates that the conventional end-to-end models are impractical for low-resource languages due to the limited data. Second, the pre-training models like wav2vec 2.0 and XLSR largely improve the recognition accuracy thanks to the powerful acoustic representation learned from the huge amount of high-resource language data. Third, in addition to the pre-trained acoustic model, other methods also utilize a pre-trained language model like mBERT while the results change slightly or even become worse. One of the reasons is that the methods that construct adapters in BERT (ADapter-BERT) or simply combine BERT with wav2vec 2.0 (w2v-cif-bert) inevitably suffer from the embedding inconsistency problem and fail to make the best use of pre-trained linguistic representation. As for our Wav-BERT, it effectively facilitates the cooperation of the pre-trained acoustic and language models by the proposed fusion modules from representation level to embedding level. As a result, it can consistently improve the ASR results for different low-resource languages. Moreover, when the pre-trained model (e.g. wav2vec 2.0) becomes larger, the performance of our Wav-BERT will be also improved while it requires more GPU resources to tune the whole model. \subsection{Results on AISHELL-1} \begin{table}[] \setlength\tabcolsep{3.5pt} \centering \scriptsize \caption{Results of different components in Representation Aggregation Module for ASR on IARPA BABEL and AISHELL-1 named CN in terms of CER(\%).} \begin{tabular}{@{}l|llccl@{}} \toprule {Method} & {Vi} & {Sw} & {CN-dev} & {CN-test} & {Avg} \\ \hline {Gated Cross-Modal Attention} & \textbf{19.5} & \textbf{14.8} & \textbf{3.8} & \textbf{4.0} & \textbf{10.5} \\ w/o Gated Weighting & 19.6 & 14.9 & 3.9 & 4.2 & 10.7 \\ \hline Gated Acoustic-Guided Attention & 20.4 & 15.0 & 4.4 & 4.7 & 11.1 \\ Gated Linguistic-Guided Attention & 25.6 & 18.3 & 5.7 & 6.4 & 14.0 \\\bottomrule \end{tabular} \label{tab:ablation_fea_agg} \end{table} \begin{table}[] \centering \scriptsize \caption{Results of different components in Embedding Attention Module for ASR on IARPA BABEL and AISHELL-1 named CN in terms of CER(\%).} \begin{tabular}{@{}l|llccl@{}} \toprule {Method} & {Vi} & {Sw} & {CN-dev} & {CN-test} & {Avg} \\ \hline Embedding Replacement & 21.1 & 15.4 & 6.0 & 6.4 & 12.2 \\ \hline {our Embedding Attention} & \textbf{19.5} & \textbf{14.8} & \textbf{3.8} & \textbf{4.0} & \textbf{10.5} \\ w/o Sampling with Decay & 22.0 & 15.7 & 5.7 & 6.2 & 12.4 \\ w/o Gated Attention & 20.7 & 15.3 & 4.1 & 4.3 & 11.1 \\ \bottomrule \end{tabular} \label{tab:ablation_embed_fusion} \end{table} \begin{table*}[ht] \setlength\tabcolsep{3pt} \centering \tiny \caption{Predicted examples on AISHELL-1 test set generated by Wav2vec 2.0, BERT rescoring, w2v-cif-bert and our Wav-BERT. The differences words are marked with pronunciation. The wrong words are marked in red. The translations of the sentences are also provided.} \begin{tabular}{@{}l|llll@{}} \toprule {Method} & {Predicted example with translation} \\ \hline \raisebox{-.5\height}{wav2vec 2.0~\cite{baevski2020wav2vec}} & \raisebox{-.5\height}{\includegraphics[scale=2]{pic/case2_1.pdf}} \\ & Wenzhou aunt Nian and banpai pretended to be their daughter and got married successfully. \\ \hline \raisebox{-.5\height}{BERT rescoring~\cite{shin2019effective}} & \raisebox{-.5\height}{\includegraphics[scale=2]{pic/case2_2.pdf}} \\ & More than half of Wenzhou's old aunt pretended to be her daughter and successfully cheated many young people into marriage.. \\ \hline \raisebox{-.5\height}{w2v-cif-bert~\cite{yi2021efciently}} & \raisebox{-.5\height}{\includegraphics[scale=2]{pic/case2_3.pdf}} \\ & Wenzhou aunt year and half a hundred pretending to be daughters have successfully cheated into marriage, and there are many young people. \\ \hline \raisebox{-.5\height}{\textbf{our Wav-BERT}} & \raisebox{-.5\height}{\includegraphics[scale=2]{pic/case2_4.pdf}} \\ & Wenzhou aunt is more than half a hundred years old, pretending to be her daughter, and has successfully cheated many young people into marriage. \\ \bottomrule \end{tabular} \label{tab:case_study} \end{table*} Table~\ref{tab:sota_aishell} reports the comparison results on AISHELL-1. In addition to the baselines mentioned above, we also report more latest works for comparison. The data quantity of this dataset is larger than that of IARPA BABEL, so all the methods perform much better. It also accounts for that the performance distance between the methods with pre-trained models and those without pre-trained models becomes small. During the methods without pre-trained models, wenet~\cite{zhang2020unified} achieves the best results due to its advanced CTC-Conformer~\cite{graves2006connectionist,gulati2020conformer} architecture, better attention rescoring decoding strategy and larger training epoch number. With the pre-trained language model of BERT, NAR-BERT-ASR~\cite{yu2021non} stacked a decoder initialized by a pre-trained BERT model on the top of the transformer encoder and achieves competitive results on AISHELL-1. Regarding methods using the pre-trained acoustic model, the official wav2vec 2.0 Base model that pre-trained on 960 hours of Librispeech corpus achieves great results as the model learned good representations of speech. Furthermore, we also collect and use 1960 hours of public Mandarin speech data to pre-train a wav2vec 2.0 (cn) model, which obtains better performance on AISHELL-1 evaluation. In conclusion, our Wav-BERT not only improves the performance of both wav2vec 2.0 and wav2vec 2.0 (cn) models, but also outperforms other state-of-the-art methods unifying wav2vec 2.0 and BERT. It further demonstrates the generalization of Wav-BERT on different low-resource ASR datasets with different data sizes. \subsection{Comparison of model fusion methods} As illustrate in Section~\ref{sec:model_fusion}, there are many different model fusion methods to fuse the pre-trained wav2vec 2.0 and BERT. We compare our Wav-BERT with these methods and report the results in Table~\ref{tab:sota_babel} and Table~\ref{tab:sota_aishell}. First, by using BERT to rescore $N$-best hypotheses generated by wav2vec 2.0 with CTC beam search, rescoring~\cite{shin2019effective} (Figure~\ref{fig:model_fusion} (a)) is slightly better than wav2vec 2.0, but its inference process is time-consuming. Second, w2v-cif-bert~\cite{yi2021efciently} uses CIF to connect wav2vec 2.0 and BERT in a cascade way and replace word embedding with acoustic embedding as input for BERT. It is better than wav2vec 2.0 in AISHELL-1 but worse in BABEL for the reason that the mBERT is not as well trained as the bert-base-chinese model, resulting in a more severe catastrophic forgetting problem after replacing its input. Third, Adapter-BERT that inserts adapter modules into each BERT layer and tunes it on the training data, has an inconspicuous improvement or even performance degradation since the insertion of adapters affects the pre-trained representation of BERT. Finally, our Wav-BERT significantly surpasses other methods, which indicates that our model can effectively exploit the acoustic and linguistic information through the multi-level hierarchical fusion. Besides, our cooperative learning methods can also help the pre-trained encoders to avoid catastrophic forgetting of pre-training information so that the whole model can converge faster and better. \subsection{Ablation Studies} \subsubsection{Representation Aggregation Module} To investigate the effectiveness of our Representation Aggregation Module, we present results for Gated Linguistic-Guided Attention, Gated Acoustic-Guided Attention, removing gated weighting in Table~\ref{tab:ablation_fea_agg}. We can find that the effect of gated weighting, while small, is still existent, which can automatically measure the importance of the acoustic and linguistic representation while aggregating those two kinds of representation. Compared with Gated Cross-Modal Attention, Gated Acoustic-Guided Attention and Gated Linguistic-Guided Attention increases the average CER by 0.6\% and 3.5\% respectively, which indicates that the attention in each direction plays an important role in our Representation Aggregation Module while Gated Acoustic-Guided Attention makes a greater contribution since speech recognition task is more dependent on acoustic information. \subsubsection{Embedding Attention Module} The results in Table~\ref{tab:ablation_embed_fusion} further verify the effectiveness of our Embedding Attention Module. First, we report the result of Embedding Replacement that simply replaces the original word embedding with the acoustic embedding as the input of BERT like previous works~\cite{yu2021non}. As expected, the performance is poor especially on AISHELL-1, which indicates that such simple replacement methods will be affected by the embedding inconsistency problem. In contrast, we solve this challenge by the proposed Embedding Attention Module including the sampling mechanism and Gated Attention, so that the performance is largely improved. Second, when turning off "Sampling with Decay" or Gated Attention, the average CER increased by 1.9\% and 0.6\% respectively. It demonstrates that the "Sampling with Decay" mechanism effectively alleviates the embedding inconsistency of BERT between inference and training. Mover, the Gated Attention effectively provides additional acoustic information to the input of BERT, facilitating it to capture more reliable linguistic representation. \subsection{Case Studies} We further present some case studies in Table~\ref{tab:case_study}, to illustrate the importance of acoustic and linguistic information for speech recognition. We provided some transcript examples obtained from the baseline methods and our Wav-BERT with the same input from AISHELL-1 test set. The pronunciations of the keywords and the English translation of the whole sentence are also provided. As can be observed, all the baseline methods predict one or two wrong words with similar pronunciation as the wrong words, which leads to an unreasonable sentence. On the contrary, thanks to the cooperative learning of acoustic and linguistic information, our Wav-BERT can successfully recognize the whole sentence without any word error. \section{Conclusion} In this work, based on the powerful wav2vec 2.0 and BERT models, we introduce cooperative acoustic and linguistic representation learning for low-resource speech recognition. To solve the representation discrepancy and embedding inconsistency challenges, we design a Representation Aggregation Module and an Embedding Attention Module to facilitate the cooperation of the two pre-trained models and thus boost the representation learning. Extensive experimental results demonstrate that our proposed Wav-BERT can significantly improve low-resource ASR performances in different languages. In future work, we will investigate more effective modules to infuse more types of knowledge, and apply our framework to more pre-trained models to promote the development of low-resource speech tasks. \section*{Acknowledgement} This work was supported in part by National Key R\&D Program of China under Grant No. 2020AAA0109700, National Natural Science Foundation of China (NSFC) under Grant No.U19A2073 and No.61976233, Guangdong Province Basic and Applied Basic Research (Regional Joint Fund-Key) Grant No.2019B1515120039, Guangdong Outstanding Youth Fund (Grant No. 2021B1515020061), Shenzhen Fundamental Research Program (Project No. RCYX20200714114642083, No. JCYJ20190807154211365). \section{Datasets} Both IARPA BABEL dataset~\cite{gales2014speech} and AISHELL-1~\cite{bu2017aishell} are open-source and high-quality speech datasets, and are widely used in the speech community. Among them, AISHELL-1 can be downloaded for free here\footnote{\url{https://www.openslr.org/33/}}, For each speaker in it, around 360 utterances(about 26 minutes of speech) are released. Table~\ref{tab:aishell} provides a summary of all subsets in the corpus. As for IARPA BABEL, it can be purchased through LDC\footnote{\url{https://www.ldc.upenn.edu/}}(eg. Vietnamese Language Pack\footnote{\url{https://catalog.ldc.upenn.edu/LDC2017S01}}). Table~\ref{tab:babel} summarizes the amount of data in hours for the language used in our experiments on the "Full Language Pack" (FLP) condition. Researchers can easily reproduce or compare our results with the same languages. \begin{table}[h] \centering \caption{AISHELL-1 dataset statistics.} \begin{tabular}{l|l|l|l} \toprule Subset & Duration(hrs) & Male & Female \\ \hline Training & 150 & 161 & 179 \\ \hline Development & 10 & 12 & 28\\ \hline Test & 5 & 13 & 7 \\ \hline \end{tabular} \label{tab:aishell} \end{table} \begin{table}[h] \centering \caption{IARPA BABEL dataset statistics.} \begin{tabular}{l|l|l} \toprule Language & Train(hrs) & Eval(hrs) \\ \hline Vietnamese & 87.72 & 11.00 \\ \cline{1-3} Swahili & 44.39 & 10.65 \\ \cline{1-3} Tamil & 69.35 & 11.68 \\ \bottomrule \end{tabular} \label{tab:babel} \end{table} \section{Ours Wav-BERT Model} Our model checkpoint described in Sec 5 can be downloaded \href{https://drive.google.com/drive/folders/1lISXln7nzeOiuWPuyHOo_jBgtWKH77jS?usp=sharing}{here}. With limited storage space, thus we only upload the model using wav2vec 2.0 Base. \section{Pre-trained Models} We use different pre-trained acoutic and language models in our experiment described in Sec 5. All of them are open-source except the wav2vec 2.0~\cite{baevski2020wav2vec} pre-trained in Chinese by ourselves. For pre-trained language models, the bert-base-chinese model can be download here~\footnote{\url{https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-chinese.tar.gz}}, and the multilingual mBERT can be download here~\footnote{\url{https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-multilingual-uncased.tar.gz}}. For pre-trained acoustic models, the official wav2vec 2.0 pre-trained on English can be download here~\footnote{\url{https://dl.fbaipublicfiles.com/fairseq/wav2vec/wav2vec_small.pt}}, and the XLSR-53~\cite{conneau2020unsupervised} model can be downloaded here~\footnote{\url{https://dl.fbaipublicfiles.com/fairseq/wav2vec/xlsr_53_56k.pt}}. Besides, though the wav2vec 2.0(cn) pre-trained on 1,960 hours of Chinese data cannot open-source, both the used training code and datasets are open-source, which means researchers still can reproduce our results. In details, we base on the Fairseq framework~\footnote{\url{https://github.com/pytorch/fairseq}}~\cite{ott2019fairseq} to pre-train our model 8 GeForce RTX 3090 GPUs with max tokens and update frequency setting to 1400000 and 8 respectively, consuming about one week to train 400K steps. Besides, the used datasets are DiDiSpeech~\cite{guo2021didispeech}, PVTC~\footnote{\url{https://www.pvtc2020.org/index.html}}, ST-CMDS~\footnote{\url{http://www.openslr.org/38/}}, aidatatang~\footnote{\url{http://www.openslr.org/62/}}, AISHELL-1, AISHELL-3~\cite{shi2020aishell}, MAGICDATA~\footnote{\url{http://www.openslr.org/68/}}, MagicDataSpeech~\footnote{\url{https://www.biendata.xyz/competition/magicdata/}}, Primewords~\footnote{\url{http://www.openslr.org/47/}} and Thchs~\footnote{~\url{http://www.openslr.org/18/}}. \section{Baselines} We describe some baseline methods below, which are reproduced by ourselves or experimented with the open-source code. \begin{enumerate} \item Wav2vec 2.0 w/ 4-gram: For each language, results from the trained wav2vec 2.0 model with beam search, are rescored by the 4-gram language model. Specifically, the 4-gram model is trained by transcripts in the training set of each language, using the KenLM~\cite{heafield2011kenlm} framework. And the beam size for beam search is set to 50. \item BERT rescoring~\cite{chiu2021innovative,shin2019effective}: For each language, results from the trained wav2vec 2.0 model with beam search, are rescored by the fine-tuned language model(mBERT or bert-base-chinese model). Specifically, the linguistic decoder is fine-tuned by transcripts in the training set of each language using masked language model(MLM) objective~\cite{devlin2018bert} of BERT. In rescoring stage, we mask each word in the sentence once at a time, then sum all the log-likelihoods of the masked words from each masked input instance. Finally rescoring the sentence with both the likelihoods from acoustic and language model. Besides, considering it is time-consuming, the beam size for beam search is set to 5. \item Adapter-BERT: This method is inspired by AB-Net~\cite{NEURIPS2020_7a6a74cb}, cross-attention adapters are inserted to each BERT layer to unify the wav2vec 2.0 and BERT model. Output from the feed-forward layer at the last of BERT is supervised by the cross-entropy criterion. In inference, the Mask-Predict algorithm~\cite{ghazvininejad2019mask} is adopted. \item Embedding Replacement: Inspired by previous work~\cite{yu2021non}, we use similar architecture as it but replace the acoustic encoder with wav2vec 2.0 and keep our Representation Aggregation Module. We use position embeddings as query vector and acoustic representation from wav2vec 2.0 as key and value vector to attention block followed by 3 self-attention block, which is the same as ~\cite{yu2021non}, generating aligned acoustic representation $H_{pos}$. Then $H_{pos}$ is used as the input of BERT, replacing the word embedding. Finally, Representation Aggregation Module takes both the $H_{pos}$ and linguistic representation from BERT as input, just the same as our Wav-BERT. It is worth mention that the length of the position embedding is set to 60, considering it cost too much GPU memory for a larger value. \end{enumerate} \section{More Implementation Details} Most of the significant experiment details are described in Sec 5. Aiming to let researcher reproduce our result more easily, we describe more details below. About the data augmentation, mask probability and mask channel probability are set to 0.65 and 0.5 respectively the same as setting in wav2vec 2.0~\cite{baevski2020wav2vec} for 100 hour training data. Besides, we use adam optimizer, setting adam betas and adam eps to (0.9,0.98) and 1e-08 individually. In data preprocessing, we use feature normalize for wav2vec 2.0 Base model but not for the XLSR-53 model, keeping consistent with the pre-training setting. Also, we filter some samples whose length of speech shorter than 0.5 seconds as well as number of subwords less than 1 or bigger than 512 in training set. Regarding the training time, training our Wav-BERT model with wav2vec 2.0 Base model spends less than 2 days, and 5 days with the XLSR-53 model. Finally, the number of parameters in our model with wav2vec 2.0 Base is about 380M, and 600M with XLSR-53, which is slightly different with different languages.
\section{Introduction} Study of dynamical systems is one of the most fundamental disciplines in mathematics and applied sciences. It has been well recognised that numerical methods for differential equations, which incorporate structural knowledge of the original problem, lead to qualitatively better (long-time) numerical results and has been one of the most inspiring research disciples in the past decades \cite{Hairer}. With emerging the fourth paradigm of scientific discovery \cite{4ParaD} learning algorithms, such as neural networks, has gained a high attention and interest from the development and application point of view \cite{DDbook,Montans19}. Data-driven methods allow, essentially, to learn and explore dynamical systems from data alone \cite{Toth20,Bondesan19,Yang20}. Incorporation of prior knowledge of the dynamical system into data-driven method results in use of less training data samples. In addition to that, structure-preserving neural networks generalize better than a regular neural networks and produce qualitatively better predictions \cite{Sam19,SympNets,PoisNets,Zhong20,Bertalan19}. Dynamical system view of deep learning has recently also gained a significant recognition \cite{Weinan17,Chen18,celledoni21}. Structure-preserving, in particular, Hamiltonian dynamics inspired neural network architectures have been put forward to improve stability of feed-forward propagation \cite{Haber17,Chang18} and to address the problem of exploding and vanishing gradients in deep learning \cite{Galimberti21,MacDonald21}, where non-vanishing gradients are achieved by design, while exploding gradients can be controlled through regularization or avoided for special neural network architectures. Neural network architectures for learning dynamical systems have also been derived from structure-preserving numerical integrators \cite{Chen20,Zhu20,Tong20}, such as symplectic Euler and Verlet numerical methods \cite{Hairer}. Deep learning based integrators may provide competitive alternatives to conventional numerical integrators by allowing use of larger time steps \cite{Kadupitiya20}. In addition to \cite{MacDonald21}, volume-preservation is also considered in \cite{NICE}, where $\mathrm{NICE}$ may be considered as one of the most known efficient framework for learning bijective transformations of continuous probabilities. In this work the emphasis is on learning volume-preserving dynamics with locally-symplectic neural networks $\mathrm{LocSympNets}$. This work has been inspired by the recent work on symplecticity-preserving neural networks for learning Hamiltonian dynamics: $\mathrm{SympNets}$ \cite{SympNets}, and volume-preserving numerical methods based on local Hamiltonian structure and symplectic splitting methods \cite{Feng95}. Construction of volume-preserving numerical methods relies on the theorem by Feng \& Shang \cite{Feng95}, which demonstrates that the right hand side vector field of a volume-preserving dynamical system can be split into sum of locally Hamiltonian vector fields. Thus, compositions of symplectic numerical integrator flow maps applied to each individual subsystem of the Hamiltonian dynamics leads to volume-preserving numerical methods. In general, such numerical methods are implicit, while $\mathrm{SympNets}$ are explicit maps with separable Hamiltonian structure and are also able to learn nonseparable Hamiltonian dynamics, as was demonstrated in \cite{SympNets} for double-pendulum problem and with the proof of the universal approximation theorem. The manuscript is organised as follows. In Section \ref{sec:VPodes} we describe volume-preserving dynamics and discuss properties of the Hamiltonian systems. Local Hamiltonian description of volume-preserving dynamics is shown. Locally-symplectic neural networks $\mathrm{LocSympNets}$ are presented in Section \ref{sec:VolNets}. Section \ref{sec:NumResults} contains numerical results of learning linear and nonlinear dynamics. Conclusions and future work is discussed in Section \ref{sec:Conclusions}. \section{Volume-preserving dynamics}\label{sec:VPodes} In this work we are concerned with learning dynamical systems \begin{equation}\label{eq:ODE} \der{y}{t} = f(y), \end{equation} where $y: [0,+\infty) \to \mathbb{R}^n$ is the time dependent function in $n$-dimensional phase space $\Omega \subset \mathbb{R}^{n}$. With $\der{y}{t}$ we denote ordinary derivative with respect to time variable $t \geq 0$. Dynamical system \eqref{eq:ODE} is said to be volume-preserving if \begin{equation}\label{eq:div} \nabla \cdot f(y) = 0, \end{equation} where $\nabla$ denotes the gradient operator, while $\nabla \cdot$ denotes divergence of the vector field $f$. Examples of volume-preserving dynamics include all linear systems with $\Tr(A)=0$, where $A$ is the system's matrix, and Euler equations for the motion of a free rigid body \cite{Hairer}. A special case of \eqref{eq:ODE}, when the system is of even dimension $n=2d$, is the canonical Hamiltonian dynamics \begin{align} \der{q}{t} &= \nabla_p H(q,p), \label{eq:Hamq}\\ \der{p}{t} &= -\nabla_q H(q,p), \label{eq:Hamp} \end{align} where $q,p: [0,+\infty) \to \mathbb{R}^d $ are time dependent functions, commonly describing position and momentum, respectively, in $2d$-dimensional phase space $\Omega_H \subset \mathbb{R}^{2d}$. The Hamiltonian $H(q,p)$ is the first integral of the system \eqref{eq:Hamq}--\eqref{eq:Hamp}, or simply a conserved quantity, i.e., \begin{equation} \label{eq:dH} \der{H}{t} = \nabla_q H^T \der{q}{t} + \nabla_p H^T \der{p}{t} = 0, \end{equation} which in the context of classical mechanics describes the total energy of the system. A special case is the separable Hamiltonian \begin{equation}\label{eq:sepH} H(q,p) = K(p) + U(q), \end{equation} where $K$ and $U$ are kinetic and potential energies, respectively. It easy to see that the right hand side vector field of \eqref{eq:Hamq}--\eqref{eq:Hamp} is divergence-free \eqref{eq:div}. It is worth to mention that apart from the energy conservation \eqref{eq:dH} the Hamiltonian dynamics \eqref{eq:Hamq}--\eqref{eq:Hamp} is also time-reversible, if the property $H(q,p)=H(q,-p)$ holds, i.e., the dynamics is invariant under the transformation $(t,p) \to (-t,-p)$. The Hamiltonian dynamics \eqref{eq:Hamq}--\eqref{eq:Hamp} can also be written in the general form: \begin{equation} \label{eq:HamJ} \der{z}{t} = J \nabla_z H(z), \quad J = - J^T, \end{equation} where $z=(q,p)^T\in\mathbb{R}^{2d}$ and $J$ is a skew-symmetric matrix. In the case of the canonical Hamiltonian dynamics \eqref{eq:Hamq}--\eqref{eq:Hamp} the matrix $J$ is nonsingular with inverse $J^{-1}=-J$ and is in the following form: \begin{equation} \label{eq:J} J = \begin{pmatrix} 0 & I_d \\ -I_d & 0 \end{pmatrix}, \end{equation} where $I_d\in \mathbb{R}^{d \times d}$ is $d$-dimensional identity matrix. \subsection{Symplecticity of Hamiltonian dynamics} The Hamiltonian dynamics \eqref{eq:Hamq}--\eqref{eq:Hamp} is also known to be symplectic \cite{Arnold}. To define symplecticity we introduce the flow map $\phi_t:\Omega_H\to\mathbb{R}^{2d}$ of the Hamiltonian system, which advances the solution at time $t$, i.e., for any given initial condition $(q(0),p(0))^T=(q_0,p_0)^T\in\Omega_H$ $\phi_t(q_0,p_0)=(q(t),p(t))^T$, where $(q(t),p(t))^T$ is the solution of the Hamiltonian system \eqref{eq:Hamq}--\eqref{eq:Hamp}. The flow map $\phi_t$ exists as long as the solution exists to the system of differential equations. It is easy to check that the flow map is continuous function of $t$ and $\phi_0$ is the identity map, i.e., $\phi_0(q_0,p_0)=(q_0,p_0)^T$ for all $(q_0,p_0)^T\in\Omega_H$. Since the Hamiltonian system \eqref{eq:Hamq}--\eqref{eq:Hamp} is invariant to a translation of time, then $\phi_{t} \circ \phi_{s} = \phi_{t+s}$ for all $s,t,t+s\geq 0$ as long the solution exists. In addition, if the solution exists for all $t\in\mathbb{R}$, then clearly $\phi_{t} \circ \phi_{-t} = \phi_0$. Hence, the inverse of the flow map is $\phi_t^{-1}=\phi_{-t}$ and the set $\Phi = \left\{\phi_t\, \left| \right. t\in\mathbb{R} \right\}$ of all such flow maps forms a one-parameter continuous group of transformations on $\mathbb{R}^{2d}$ with the commutative group operation being composition of maps. Clearly all the discussion above applies to the flow map $\varphi_t:\Omega\to\mathbb{R}^{n}$ of the dynamical system \eqref{eq:ODE}. Introduction of the flow maps $\phi_t$ and $\varphi_t$ are not only useful for studying dynamical systems, but also to construct numerical methods \cite{Hairer} as well as structure-preserving neural networks \cite{SympNets}, which we discuss in more detail in Section \ref{sec:VolNets}. We proceed by deriving the variational equation for the Hamiltonian dynamics \eqref{eq:Hamq}--\eqref{eq:Hamp} in the form \eqref{eq:HamJ} by differentiating the Jacobian of the flow map $Y(t)=\frac{\partial \phi_t(z_0)}{\partial z_0 }$ with respect to time, i.e., \begin{equation} \label{eq:var} \der{Y(t)}{t} = J \nabla_{z_0z_0} H(z_0) Y(t), \end{equation} for all $z_0=(q_0,p_0)^T\in\Omega_H$, where $J$ is given in \eqref{eq:J} and $\nabla_{z_0z_0} H(z_0)$ is symmetric Hessian matrix of the Hamiltonian $H(z_0)$. The variational equation \eqref{eq:var} describes the propagation of variations of the initial condition $z_0$ along the dynamics in time. Recently the variational equation \eqref{eq:var} has attracted great attention in deep learning community and has inspired the definition and construction of stable neural networks \cite{Haber17,Chang18}. Assuming that the Hamiltonian is twice continuously differentiable with respect to $q$ and $p$ on $\Omega_H$, then by the Poincar\'{e} theorem \cite{Hairer} the variational equation \eqref{eq:var} will imply symplecticy of the Hamiltonian dynamics defined as follows. \begin{definition} The flow map $\phi_t$ of canonical Hamiltonian system \eqref{eq:Hamq}--\eqref{eq:Hamp} is symplectic if \begin{equation} \label{eq:symp} \frac{\partial \phi_t(z_0)}{\partial z_0 }^T J^{-1} \frac{\partial \phi_t(z_0)}{\partial z_0 } = J^{-1} \end{equation} holds for any value of $t$ and $z_0=(q_0,p_0)^T\in\Omega_H$ for which the map is defined. \end{definition} Computing the derivative of \eqref{eq:symp} we find that \begin{align*} \frac{\mathrm{d}}{\mathrm{d} t} \left( Y^T J^{-1} Y \right) &= \der{Y}{t}^T J^{-1} Y + Y^T J^{-1} \der{Y}{t} \\ &= Y^T \nabla_{z_0z_0} H(z_0)^T J^T J^{-1} Y(t) + Y^T J^{-1} J \nabla_{z_0z_0} H(z_0) Y(t) \\ &= - Y^T \nabla_{z_0z_0} H(z_0) Y(t) + Y^T J \nabla_{z_0z_0} H(z_0) Y(t) = 0, \end{align*} where the result follows from the variational equation \eqref{eq:var} and the properties of skew-symmetric and symmetric matrices. Since the relation \eqref{eq:symp} holds when $t=0$ (due to the identity map $\phi_0$) the relation holds for all $t$ for which the flow map $\phi_t$ is defined. \subsection{Volume preservation} From the symplecticity of Hamiltonian dynamics \eqref{eq:Hamq}--\eqref{eq:Hamp} it is easy to see that by computing the determinant of both sides of the equation \eqref{eq:symp} and from the flow map property $\phi_0 = \mathrm{Id}$, the symplecticity implies volume preservation in phase space $\Omega_H$, i.e., \begin{equation}\label{eq:VolDet} \det \left( \frac{\partial \phi_t(z_0)}{\partial z_0 } \right) = 1, \quad \forall \, t, \, z_0. \end{equation} Under volume preservation by the flow map $\phi_t$ (or $\varphi_t$) we understand that for any bounded subset $U\subset \Omega_H$ for which $\phi_t(U)$ exists, volumes and orientations of $U$ and $\phi_t(U)$ are the same, i.e., \begin{equation} \int_U \, \mathrm{d} z_0 = \int_{\phi_t(U)} \, \mathrm{d} z. \end{equation} From the change of variables rule under the integral sign, for the transformation to be volume-preserving, the determinant identity \eqref{eq:VolDet} must hold. Then differentiating \eqref{eq:VolDet} with respect to $t$ and applying Abel-Liouville-Jacobi-Ostrogradskii identity \cite{Hairer} we can show that \eqref{eq:VolDet} holds if the vector field of a dynamical system is divergence-free. The contrary is not always the case, i.e., volume-preserving dynamics may not be symplectic, especially when dynamical system \eqref{eq:ODE} is of odd dimension. In this case we can consider local Hamiltonian description of the volume-preserving dynamics \eqref{eq:ODE}, which we describe in the following section. \subsection{Local Hamiltonian description} Volume-preserving dynamics \eqref{eq:ODE} can be described by local Hamiltonian functions as stated in the following theorem by Feng \& Shang \cite{Feng95}. \begin{theorem} Every divergence-free vector field $f:\mathbb{R}^n\to\mathbb{R}^n$ can be written as the sum of $n-1$ vector fields \begin{equation} f = f_{1,2} + f_{2,3} + \dots + f_{n,n-1}, \end{equation} where each of $f_{k,k+1}$ is Hamiltonian in the variables $(y_k,y_{k+1})$, i.e., there exist functions $H_{k,k+1}:\mathbb{R}^n\to\mathbb{R}$ such that \begin{equation} f_{k,k+1} = \left(0, \dots, 0, \pd{H_{k,k+1}}{y_{k+1}}, -\pd{H_{k,k+1}}{y_{k}}, 0, \dots, 0 \right)^T. \end{equation} \end{theorem} In geometric numerical integration the result of the theorem has been used to construct volume-preserving numerical methods by splitting dynamical system \eqref{eq:ODE} into $n-1$ subsystems: \begin{equation}\label{eq:ykODE} \der{\bar{y}}{t} = f_{k,k+1}(\bar{y}), \end{equation} where each subsystem is solved by a symplectic numerical method \cite{Hairer,Feng95,Xue14}. We say that the flow map $\psi_\tau$, where $\tau>0$ is the time step, of a numerical method is symplectic if it satisfies the symplecticity condition \eqref{eq:symp}. For example, \eqref{eq:ykODE} could be solved with the symplectic Euler method \cite{Hairer}: \begin{align} \bar{y}_k^{n+1} &= \bar{y}^n_k + \tau \pd{H_{k,k+1}}{\bar{y}_{k+1}}(\bar{y}^{n}_{1}, \dots,\bar{y}^{n}_{k-1}, \bar{y}^{n+1}_{k}, \bar{y}^n_{k+1},\bar{y}^{n}_{k+2}, \dots,\bar{y}^{n}_{n}), \label{eq:SE1}\\ \bar{y}_{k+1}^{n+1} &= \bar{y}^n_{k+1} - \tau \pd{H_{k,k+1}}{\bar{y}_{k}}(\bar{y}^{n}_{1}, \dots,\bar{y}^{n}_{k-1}, \bar{y}^{n+1}_{k}, \bar{y}^n_{k+1},\bar{y}^{n}_{k+2}, \dots,\bar{y}^{n}_{n}),\label{eq:SE2}\\ \bar{y}_{i}^{n+1} &= \bar{y}^n_{i}, \quad \forall \, i\neq k,k+1, \label{eq:SE3} \end{align} which becomes an explicit method if the Hamiltonian function $H_{k,k+1}$ is separable \eqref{eq:sepH} in $(y_k,y_{k+1})$ variables. Since the numerical flow map $\psi^{k,k+1}_\tau$ of \eqref{eq:SE1}--\eqref{eq:SE3} is symplectic in $(y_k,y_{k+1})$ variables, the method is volume-preserving, which follows from the calculation: \[ \det \left( \frac{\partial \psi^{k,k+1}_\tau(y_0)}{\partial y_0 } \right) = \det \left( \frac{\partial \psi^{k,k+1}_\tau({y_0}_k,{y_0}_{k+1})}{\partial ({y_0}_k,{y_0}_{k+1}) } \right) = 1, \quad \forall \, \tau, \, y_0. \] Then different compositions of symplectic numerical flow maps $\psi^{k,k+1}_\tau$, e.g., \begin{equation}\label{eq:compos} \varphi_\tau \approx \psi^{1,2}_\tau \circ \psi^{2,3}_\tau \circ \dots \circ \psi^{k,k+1}_\tau \circ \dots \circ \psi^{n-1,n}_\tau, \end{equation} are volume-preserving and approximate the analytical flow map $\varphi_t$ with accuracy depending on the method's \eqref{eq:compos} approximation order and the choice of the time step $\tau$. Such approach has inspired to construct locally-symplectic neural networks $\mathrm{LocSympNets}$ for learning volume-preserving dynamical systems by applying and combining symplecticity-preserving neural network modules for each individual subsystem \eqref{eq:ykODE}, see the following section. \section{Volume-preserving neural networks}\label{sec:VolNets} In this section we describe volume-preserving neural networks. We proceed by recalling and summarising symplecticity-preserving and Hamiltonian dynamics inspired neural networks. \subsection{Symplectic neural networks} Recently in article \cite{SympNets} several symplecticity preserving neural network architectures $\mathrm{SympNets}$ were put forward illustrating their high abilities for learning Hamiltonian dynamics. Such network architectures are build relying on the fact that the composition of symplectic maps is also a symplectic map. Thus, the neural networks are compositions of symplecticity-preserving modules, e.g., of gradient modules: \begin{align}\label{eq:Up} \begin{split} Q &= q + h W^T \mbox{diag}(w) \underline{\sigma}(Wp+b), \\ P &= p, \end{split} \end{align} and \begin{align}\label{eq:Low} \begin{split} Q&= q, \\ P &= p - h W^T \mbox{diag}(w) \underline{\sigma}(Wq+b), \end{split} \end{align} which are refereed to as {\it Up} and {\it Low} modules in \cite{SympNets}, respectively. In modules \eqref{eq:Up}--\eqref{eq:Low} $(q,p)^T$ and $(Q,P)^T$ of dimension $2d$ are input and output values, respectively, $h$ is a free input parameter and can be taken to be equal to time step $\tau$. $W\in\mathbb{R}^{m\times d}$ and $w\in\mathbb{R}^m$ are weight matrix and vector, respectively, where $m$ specifies the width of the neural network, and $b\in\mathbb{R}^m$ is a bias vector. With $\mbox{diag}(w)\in\mathbb{R}^{m\times m}$ we define a diagonal matrix containing the weight vector $w$ components. $\sigma$ is a differentiable activation function defined in the vectorial form, i.e., $\underline{\sigma}(x)=(\sigma(x_1),\sigma(x_2),...,\sigma(x_m))^T$, where $x\in\mathbb{R}^m$. Identifying modules \eqref{eq:Up}--\eqref{eq:Low} as maps $\mathcal{M}_{Up}^h$ and $\mathcal{M}_{Low}^h$, i.e., \begin{equation}\label{eq:SympMaps} (Q,P)^T=\mathcal{M}_{Up}^h(q,p), \quad (Q,P)^T=\mathcal{M}_{Low}^h(q,p), \end{equation} it is easy to verify that both maps \eqref{eq:SympMaps} satisfy equation \eqref{eq:symp}, i.e., \begin{equation*} \frac{\partial \mathcal{M}_{Up,Low}^h(q,p)}{\partial (q,p) }^T J^{-1} \frac{\partial \mathcal{M}_{Up,Low}^h(q,p)}{\partial (q,p) } = J^{-1}, \end{equation*} for all $h$, $\sigma$, $W$, $w$ and $b$, with $J$ matrix \eqref{eq:J}. An alternating composition of modules \eqref{eq:Up}--\eqref{eq:Low} leads to symplecticity-preserving neural networks $\mathrm{G-SympNet}$, see \cite{SympNets}, and satisfy the universal approximation theorem if the activation function $\sigma$ is sigmoidal, as proven in \cite{SympNets}. Importantly, such modules \eqref{eq:Up}--\eqref{eq:Low} simultaneously approximate a function and its derivative. A particular composition of gradient modules \eqref{eq:Up}--\eqref{eq:Low}, which bears the resemblance with symplectic Euler method, leads to the residual type neural network with layer equations in the following form: \begin{align}\label{eq:SympNets} \begin{split} q_{j+1} & = q_j + h W_{p,j}^T \mbox{diag}(w_{p,j}) \underline{\sigma_p}\left( W_{p,j} p_j + b_{p,j}\right),\\ p_{j+1} & = p_j - h W_{q,j}^T \mbox{diag}(w_{q,j}) \underline{\sigma_q}\left( W_{q,j} q_{j+1} + b_{q,j}\right), \end{split} \end{align} where the index $j=0,1,...,L-1$ refers to the feature values in the $j$'s layer of the network. Thus, in total we have a network composed of $2L$ number of modules with $j=0$ indicating the input data $(q_0,p_0)^T$, while with the index $L$ indicating the output data $(q_L,p_L)^T$. For learning Hamiltonian dynamics with the network \eqref{eq:SympNets}, where for a given state $(q_0,p_0)^T$ we predict the state $(q_L,p_L)^T$ after a time interval $\tau$, we can set $h=\tau$ or $h=\tau/L$. This approach allows us to use $\tau$ as an additional input to the network and train with different values of $\tau$, i.e., with irregularly sampled data. Hamiltonian system inspired neural networks, such as \eqref{eq:SympNets}, in general, with applications to classification problems, have been put forward by several authors \cite{Haber17,Chang18,Galimberti21} to address the questions regarding stable deep learning, exploding and non-vanishing gradient problems. In \eqref{eq:SympNets} authors also proposed activation modules with $W_{q,p}=I_d$ and $b_{q,p}=0$. In combination with symplectic linear modules authors constructed neural networks $\mathrm{LA-SympNet}$, which showed superior performance over the gradient networks \eqref{eq:SympNets} in their chosen examples. Arguing for stable deep neural networks authors in \cite{Haber17,Chang18} considered Hamiltonian modules with $\mbox{diag}(w)=I_m$ and the leapfrog network, e.g., with $W_{p}=I_d$, $b_{p}=0$ and the linear activation function $\sigma_p$. In our experiments with $\mbox{diag}(w)=I_m$ for such simple example as mathematical pendulum we observed poor performance compared to the method \eqref{eq:SympNets}. This may be explained by looking at the eigenvalues of the system matrix $J \nabla_{z_0z_0} H(z_0)$ in the variational equation \eqref{eq:var}. Imposing $\mbox{diag}(w)=I_m$ leads to matrix $J \nabla_{z_0z_0} H(z_0)$ having purely imaginary eigenvalues \cite{Chang18}, which may guaranty the stability in the feed-forward propagation, but may be in contradiction with an actual Hamiltonian dynamics, where the eigenvalues of $J \nabla_{z_0z_0} H(z_0)$ are not always purely imaginary for all $z_0$ and $H(z_0)$. Recently alternative Hamiltonian neural network architectures inspired by time-varying Hamiltonian systems were put forward in \cite{Galimberti21}, which guaranty non-vanishing gradient by design, while exploding gradients can be either controlled by introducing regularization or avoided completely. In contrast to learning the flow map of the dynamics, alternatively the Hamiltonian itself can be learned, see \cite{Sam19}. \subsection{Locally-symplectic neural networks} Based on the symplectic gradient modules \eqref{eq:Up}--\eqref{eq:Low} in this work we propose locally-symplectic neural network modules for subsystems \eqref{eq:ykODE} to learn volume-preserving dynamics \eqref{eq:ODE}. We proceed by defining a projection operator for the state variable $y$, i.e., \begin{equation}\label{eq:ProjY} \hat{y}^k = \proj_k y = (y_1, \dots, y_{k-1},y_{k+1},\dots,y_n)^T \in \mathbb{R}^{n-1}, \quad k=1,\dots,n, \end{equation} and a projection operator for the weight matrix $W\in\mathbb{R}^{m \times n-1}$, i.e., \begin{equation}\label{eq:ProjW} \hat{W}^k = \proj_k W = (W_{1k}, \dots, W_{mk})^T \in \mathbb{R}^{m}, \quad k=1,\dots,n-1. \end{equation} Then the locally-symplectic modules are defined as follows: \begin{align}\label{eq:LocUp} \begin{split} Y_k &= y_k + h {\hat{W}^k}\,^T \mbox{diag}(w) \underline{\sigma}(W \hat{y}^k + b), \\ Y_i &= y_i, \quad \forall \, i\neq k, \end{split} \end{align} and \begin{align}\label{eq:LocLow} \begin{split} Y_i &= y_i, \quad \forall \, i\neq k+1,\\ Y_{k+1} &= y_{k+1} - h {\hat{W}^k}\,^T \mbox{diag}(w) \underline{\sigma}(W \hat{y}^{k+1} + b), \end{split} \end{align} where $k=1,\dots,n-1$, $W\in\mathbb{R}^{m\times n-1}$, $w\in\mathbb{R}^m$ and $b\in\mathbb{R}^m$. Notice that in both modules \eqref{eq:LocUp}--\eqref{eq:LocLow} projections of the weight matrix $W$ are with the same index $k$ and in the special case when $n=2$ we recover symplectic gradient modules \eqref{eq:Up}--\eqref{eq:Low}. In addition, not excluding other components of $y$ in $\hat{y}^k$ we ensure necessary coupling between different components of the system \eqref{eq:ODE}. Similarly to symplectic gradient modules \eqref{eq:Up}--\eqref{eq:Low} we will refer to both modules \eqref{eq:LocUp}--\eqref{eq:LocLow} as $Up$ and $Low$ modules for variable pair $(y_k,y_{k+1})$. Thus, we identify both modules \eqref{eq:LocUp}--\eqref{eq:LocLow} as maps $\mathcal{V}_{k,Up}^h$ and $\mathcal{V}_{k,Low}^h$, i.e., \begin{equation}\label{eq:LocMaps} Y=\mathcal{V}_{k,Up}^h(y), \quad Y=\mathcal{V}_{k,Low}^h(y). \end{equation} We can prove the following proposition. \begin{proposition} Maps $\mathcal{V}_{k,Up}^h$ and $\mathcal{V}_{k,Low}^h$ are symplectic with respect to variable pair $(y_k,y_{k+1})$ and volume-preserving. \end{proposition} \begin{proof} The Jacobian of the map $\mathcal{V}_{k,Up}^h$ with respect to variable pair $(y_k,y_{k+1})$ is \[ \pd{\mathcal{V}_{k,Up}^h(y)}{(y_k,y_{k+1})} = \begin{pmatrix} 1 & h {\hat{W}^k}\,^T \mbox{diag}(w) \mbox{diag}(\underline{\sigma'}(W \hat{y}^k + b))\hat{W}^k \\ 0 & 1 \end{pmatrix} =: \begin{pmatrix} 1 & A \\ 0 & 1 \end{pmatrix}, \] where $\displaystyle A = h \sum_{i=1}^{m} w_i \sigma'(W \hat{y}^k + b)_i \left(\hat{W}_i^k\right)^2 \in\mathbb{R}$ is scalar and the symplecticity condition \eqref{eq:symp}: \[ \begin{pmatrix} 1 & A \\ 0 & 1 \end{pmatrix}^T \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} 1 & A \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}, \] is automatically satisfied. Volume preservation follows from the determinant properties and the fact that all diagonal elements of the Jacobian matrix $\pd{\mathcal{V}_{k,Up}^h(y)}{y}$ are equal to one, which completes the proof, since the proof for the map $\mathcal{V}_{k,Low}^h$ is identical. \end{proof} Notice the importance of the weight vector $w$, which allows for scalar $A$ to take positive and negative values, if monotone activation function $\sigma$ is used. As already stated earlier, when $n=2$, the locally-symplectic modules \eqref{eq:LocUp}--\eqref{eq:LocLow} coincide with the symplectic gradient modules \eqref{eq:Up}--\eqref{eq:Low}. Unfortunately, when $n>2$ and objective is to learn Hamiltonian dynamics, then modules \eqref{eq:LocUp}--\eqref{eq:LocLow} may not be suited, since they are not symplectic with respect to variables $q$ and $p$, i.e., the Jacobian matrices $\pd{\mathcal{V}_{k,Up}^h(y)}{y}$ and $\pd{\mathcal{V}_{k,Low}^h(y)}{y}$ do not satisfy symplecticity condition \eqref{eq:symp} when dimension $n$ is even. In that case symplectic neural networks, such as $\mathrm{SympNets}$ \cite{SympNets}, are better suited and should be used. Similarly to symplectic gradient networks \eqref{eq:SympNets} we consider composition of modules \eqref{eq:LocUp}--\eqref{eq:LocLow}: \begin{align}\label{eq:LocSympNets} \begin{split} Y_k &= y_k + h {\hat{W_1}^k}\,^T \mbox{diag}(w_1) \underline{\sigma}_1(W_1 \hat{y}^k + b_1), \\ Y_{k+1} &= y_{k+1} - h {\hat{W_2}^k}\,^T \mbox{diag}(w_2) \underline{\sigma}_2(W_2 \hat{Y}^{k+1} + b_2), \\ Y_i &= y_i, \quad \forall \, i\neq k, k+1, \end{split} \end{align} with the combined map \begin{equation}\label{eq:CombUpLow} \mathcal{V}_{k}^h = \mathcal{V}_{k,Low}^h \circ \mathcal{V}_{k,Up}^h. \end{equation} Then locally-symplectic volume-preserving neural networks $\mathrm{LocSympNets}$ are constructed of module \eqref{eq:CombUpLow} compositions through index $k$, i.e., \begin{equation}\label{eq:LSNet} \mathrm{LocSympNets}^h = (\mathcal{V}_{1}^h \circ \mathcal{V}_{2}^h \circ\dots \circ \mathcal{V}_{n-1}^h) \circ (\mathcal{V}_{1}^h \circ \mathcal{V}_{2}^h \circ\dots \circ \mathcal{V}_{n-1}^h) \circ {\dots} \circ (\mathcal{V}_{1}^h \circ \mathcal{V}_{2}^h \circ\dots \circ \mathcal{V}_{n-1}^h). \end{equation} If we repeat the composition $\mathcal{V}_{1}^h \circ \mathcal{V}_{2}^h \circ\dots \circ \mathcal{V}_{n-1}^h$ $K$-times, then the total number of network layers is $L = 2 (n-1)K$. $\mathrm{LocSympNets}$ can be exceptionally deep, but recall that in each module \eqref{eq:LocUp}--\eqref{eq:LocLow} we only update one component of $y$. Alternative compositions of \eqref{eq:LSNet} can also be explored. In the following section we consider numerical experiments where we train $\mathrm{LocSympNets}$ \eqref{eq:LSNet} to learn volume-preserving dynamics \eqref{eq:ODE}. Note that the network \eqref{eq:LSNet} contains parameters $K,m\in\mathbb{N}$. \section{Numerical results} \label{sec:NumResults} In this section we provide numerical examples for learning volume-preserving linear and nonlinear dynamics with $\mathrm{LocSympNets}$ \eqref{eq:LSNet}, in particular, semi-discretized linear advection equation and Euler equations of motion for rigid-body dynamics. All calculations are performed in PyTorch\footnote{\url{https://pytorch.org/}}, which provides flexible and efficient platform for designing and testing neural networks. In all examples mean squared error (MSE) loss function is considered and minimised with batch Adam optimisation method \cite{Adam}. We consider Adam with standard parameter values and learning rate $\eta=0.001$, unless stated otherwise. We use batch Adam, since our training data sets and problem sizes are small. For linear problems we consider linear activation function with bias $b$ set to zero. For nonlinear problems we consider sigmoid activation function. Comparable results were also obtained with the Swish activation function \cite{Swish}. For the linear problem the number of epochs were significantly smaller compared to the nonlinear problem considering the increased complexity of the problem. All problems were tested with different number of network layers and width parameter $m$. In general, objectively good results were only observed when $K>1$. In addition, exponential decay scheduling of the learning rate was also investigated and in some cases improved convergence was observed, but manual tuning of decay rate is required. All training, validation and testing data were obtained by solving differential equations numerically to high precision with adaptive step size $5(4)$ order Runge-Kutta method, provided by the SciPy\footnote{\url{https://www.scipy.org/}} library and {\it solve$\_$ivp} solver. \subsection{Linear problems} Linear dynamical system \begin{equation}\label{eq:VolODE} \der{y}{t} = Ay, \end{equation} where $y\in\mathbb{R}^n$ and $A\in\mathbb{R}^{n \times n}$, is volume preserving if $\Tr(A)=0$, and has general solution in the following form: \[ y(t) = e^{At}y_0, \] for any initial condition $y_0\in\mathbb{R}^n$. Thus, the flow map $\varphi_t = e^{At}$. Since $\Tr(A)=0$, it is easy to see that \[ \det\left( \frac{\partial \varphi_t(y_0)}{\partial y_0} \right) = \det\left( e^{At} \right) = e^{\Tr(A)t} = 1. \] For a fixed time step $\tau$, the matrix exponential $e^{A \tau}$ can be found (learned) from given dynamics data considering multivariate linear regression, i.e., \begin{equation}\label{eq:LinReg} e^{A \tau} = \left(\sum_{i=1}^{N} Y_i X_i^T \right) \left(\sum_{i=1}^{N} X_i X_i^T \right)^{-1}, \end{equation} where $X_i\in\mathbb{R}^n$ and $Y_i\in\mathbb{R}^n$ are i-$th$ input and output vectors, respectively, in the training data set of $N$ samples, such that \[ Y_i = e^{A \tau} X_i. \] As long as the matrix on the right hand side in \eqref{eq:LinReg} is invertible, the linear regression problem has a unique solution. Thus, it may seam even not necessary to consider locally-symplectic neural networks \eqref{eq:LSNet} for learning volume-preserving linear systems \eqref{eq:VolODE}. Despite that, neural networks \eqref{eq:LSNet} provide a different interpretation for the matrix $e^{A \tau}$ compared to the linear regression problem \eqref{eq:LinReg}, i.e., neural networks \eqref{eq:LSNet} are learning matrices $B_1,B_2,\dots$ in the Taylor series expansion with respect to $\tau$ of the matrix exponential: \[ e^{A \tau} = I + \tau B_1 + \frac{\tau^2}{2!} B_2 + \frac{\tau^3}{3!} B_3 + \dots, \] which follows from the composition of the volume-preserving modules \eqref{eq:LocMaps} with $h=\tau$. Without the proof we state that $\Tr(B_1)=0$, which follows from the construction \eqref{eq:LSNet}, and the neural network will aim to learn $B_1=A, \, B_2=A^2, \dots$, if training data is provided with different time step $\tau$ values. It is important to state that by construction we do not obtain that $B_2=B_1^2, \, B_3=B_1^3, \dots$ Closer investigation of these properties is required and left for future work. To demonstrate the neural network \eqref{eq:LSNet} capabilities of learning linear volume-preserving dynamics we consider semi-discretized advection equation \begin{equation}\label{eq:SemiAdv} \der{u_i}{t} = -c \frac{u_{i+1}-u_{i-1}}{2 \Delta_x}, \quad i=0,\dots,n-1, \end{equation} where $c\in\mathbb{R}$ is the constant wave speed, $u_i(t)$ is time-dependent grid function, $n$ is the number of grid points (or the dimension of the system) and $\Delta_x=\frac{2}{n}$ is the grid size in the domain $[-1,1]$. We solve \eqref{eq:SemiAdv} with periodic boundary conditions, i.e., $u_{n+1}=u_1$. In the limit, when $\Delta_x \to 0$, we recover advection equation $u_t + c u_x = 0$ with travelling wave solutions $u(t,x)=v(x-ct)$, where $u(0,x)=v(x)$. Note that the finite difference approximation \eqref{eq:SemiAdv} is conservative but dispersive \cite{LeVeque}, as can be seen in Figure \ref{fig:AdvSol}. If the objective is to learn the actual travelling wave solutions of the advection equation from training data provided by the semi-discretized equation \eqref{eq:SemiAdv}, then larger value of $n$ should be considered. In our experiments $n=35$ and $c=1$. For training data we consider $N=60$ randomly generated initial conditions from the normal distribution with mean zero and variance one, i.e., $u_i(0)\sim \mathcal{N}(0,1)$, $i=0,\dots,n-1$. Then the semi-discretized equations \eqref{eq:SemiAdv} are solved to collect output data after time instance $\tau=0.01$. In addition to the training data, we also collected $M=20$ random initial conditions with their respective outputs to validate learning capabilities of the neural network during the training by evaluating prediction accuracy at each epochs. Then the testing is performed by predicting a (dispersive) travelling wave solution of the semi-dicretized advection equation \eqref{eq:SemiAdv} with Gaussian initial condition \[ u_i(0) = e^{-10(-1+i\Delta_x)^2}, \quad i=0,\dots,n-1. \] In Figure \ref{fig:AdvSol} we plot predicted output by the volume-preserving neural network ($K=2$ and $m=n$) at time $t=4$ and compare to the exact solution of \eqref{eq:SemiAdv}, after training for $20000$ epochs, see Figure \ref{fig:AdvLoss}. Predicted solution is indistinguishable from the exact solution. To measure the difference between both solutions we consider $L_2$ grid norm: \[ \| u \|_2 = \sqrt{\Delta_x \sum_{i=0}^{n-1} |u_i|^2}, \] which is equal to $5.3\times 10^{-6}$ in our experiment when $t=4$. In Figure \ref{fig:AdvLoss} we plot the MSE loss function and the accuracy of the network predictions on the validation dataset at each epochs. We are able to achieve high accuracy and demonstrate that volume-preserving neural networks \eqref{eq:LSNet} are capable of learning linear dynamics \eqref{eq:VolODE}. \begin{figure} \centering \subfigure[]{\label{fig:AdvSol} \includegraphics[trim=0cm 0cm 1.5cm 1.5cm,clip=true,width=0.49\textwidth]{advection_sol.png}} \subfigure[]{\label{fig:AdvLoss} \includegraphics[trim=0cm 0cm 1.5cm 1.5cm,clip=true,width=0.49\textwidth]{advection_loss.png}} \caption{(a) Predicted and exact solution of the semi-discretized advection equation \eqref{eq:SemiAdv} at $t=4$ with $n=35$ and $c=1$. (b) Loss function and networks prediction accuracy on validation dataset at each epochs.}\label{fig:Advection} \end{figure} \subsection{Rigid body dynamics} In this section we learn nonlinear dynamics of Euler equations of the motion of a free rigid body \cite{Hairer}: \begin{align}\label{eq:RBody} \begin{split} \der{y_1}{t} &= a_1 y_2 y_3, \quad a_1 = \frac{I_2-I_3}{I_2 I_3}, \\ \der{y_2}{t} &= a_2 y_3 y_1, \quad a_2 = \frac{I_3-I_1}{I_3 I_1}, \\ \der{y_3}{t} &= a_3 y_1 y_2, \quad a_3 = \frac{I_1-I_2}{I_1 I_2}, \end{split} \end{align} where the state vector $y=(y_1,y_2,y_3)^T\in\mathbb{R}^3$, i.e., $n=3$, describes the angular momentum in the body frame. $I_{1,2,3}>0$ are the principal components of inertia. It is easy to see that the rigid body dynamics \eqref{eq:RBody} is volume preserving, as well as has two quadratic conserved quantities: the kinetic energy \begin{equation}\label{eq:KinEn} H(y_1,y_2,y_3) = \frac{1}{2} \left( \frac{y_1^2}{I_1} + \frac{y_2^2}{I_2} + \frac{y_3^2}{I_3} \right) \end{equation} and an invariant \begin{equation}\label{eq:Iinv} I(y_1,y_2,y_3) = y_1^2 + y_2^2 + y_3^2. \end{equation} Thus, the solution of \eqref{eq:RBody} lies on the intersection of the sphere \eqref{eq:Iinv} with the ellipsoid given by \eqref{eq:KinEn}. In what follows without loss of generality we set $I_1 =2$, $I_2=1$ and $I_3=\frac{2}{3}$. We further split this section in two parts. In the first part we train volume-preserving neural networks \eqref{eq:LSNet} to learn a single solution trajectory of \eqref{eq:RBody}, while in the second part we learn the whole dynamics of \eqref{eq:RBody}. \subsubsection{Learning a single trajectory} To learn a single solution trajectory of \eqref{eq:RBody} we consider an initial condition $y_0=(\cos(1.1),0,\sin(1.1))^T$ and time step $\tau=0.1$. We collect $N=120$ training data points, i.e., from time interval $[0,12]$, followed by $M=40$ solution values to form the validation dataset on the time interval $[12,16]$ of the same trajectory. The testing is performed by predicting further states for $t > 16$. \begin{figure} \centering \includegraphics[trim=0cm 0cm 0cm 0cm,clip=true,width=0.8\textwidth]{rigidbody_solk2m16.png} \caption{Exact and predicted by the volume-preserving neural network \eqref{eq:LSNet} with $K=2$ and $m=16$ solutions of the rigid body problem \eqref{eq:RBody}.}\label{fig:RB_sol} \end{figure} In Figure \ref{fig:RB_sol} we plot exact solution on time interval $[0,50]$ together with the predicted solution by the volume-preserving neural network \eqref{eq:LSNet} with $K=2$ and $m=16$. Both solutions are indistinguishable. To obtain such accuracy 200000 epochs for training was required, see Figure \ref{fig:RB_SingleLoss}. Figure \ref{fig:RB_SingleLoss} illustrates the loss function value together with networks prediction accuracy on the validation dataset. Tests with more epochs did not gave a significant improvement in the predictions. We also considered experiments with different width values $m$, but $m=16$ gave qualitatively the best results. We could not obtain good results with $K=1$, as can be seen in Figure \ref{fig:RB_LossK1}, where we are not able to achieve necessary accuracy necessary for long time predictions. \begin{figure} \centering \subfigure[]{\label{fig:RB_LossK1} \includegraphics[trim=0cm 0cm 1.5cm 1.5cm,clip=true,width=0.49\textwidth]{rigidbody_lossk1m16.png}} \subfigure[]{\label{fig:RB_LossK2} \includegraphics[trim=0cm 0cm 1.5cm 1.5cm,clip=true,width=0.49\textwidth]{rigidbody_lossk2m16.png}} \caption{Loss function and networks prediction accuracy on validation dataset at each epochs. (a) Neural network \eqref{eq:LSNet} with $K=1$ and $m=16$. (b) Neural network \eqref{eq:LSNet} with $K=2$ and $m=16$.}\label{fig:RB_SingleLoss} \end{figure} To further investigate network's generalization capabilities we considered long-time predictions by the trained network of Figures \ref{fig:RB_sol} and \ref{fig:RB_LossK2}, with the initial condition $y_0=(\cos(1.1),0,\sin(1.1))^T$ on time interval $[0,1000]$, see Figure \ref{fig:RB_LongSim}. Figure \ref{fig:RB_LongSol} illustrates predicted solution plotted on the unit sphere, where the dot indicates the initial condition. Figure \ref{fig:RB_LongGE} demonstrates linear grows in absolute global error, i.e., the mean squared error between exact and predicted solution at each time $t$. Linear grows in global error is expected, as it is also common in structure-preserving numerical methods \cite{Hairer}. Importantly, the neural network was able to learn and preserve to high accuracy both constrains \eqref{eq:KinEn}--\eqref{eq:Iinv}. Note, that the volume-preserving neural networks \eqref{eq:LSNet} do not preserve these constraints by construction. The absolute relative errors in both invariants on the whole time interval $[0,1000]$ are below $1\%$, see Figures \ref{fig:RB_LongHE}--\ref{fig:RB_LongIE}. \begin{figure} \centering \subfigure[]{\label{fig:RB_LongSol} \includegraphics[trim=2.5cm 1cm 0.5cm 2cm,clip=true,width=0.4\textwidth]{rigidbody_sollongk2m16.png}} \subfigure[]{\label{fig:RB_LongGE} \includegraphics[trim=0cm 0cm 0cm 0cm,clip=true,width=0.58\textwidth]{rigidbody_gek2m16.png}} \subfigure[]{\label{fig:RB_LongHE} \includegraphics[trim=0cm 0cm 1.5cm 1.5cm,clip=true,width=0.49\textwidth]{rigidbody_hek2m16.png}} \subfigure[]{\label{fig:RB_LongIE} \includegraphics[trim=0cm 0cm 1.5cm 1.5cm,clip=true,width=0.49\textwidth]{rigidbody_iek2m16.png}} \caption{(a) Predicted solution with volume-preserving neural network \eqref{eq:LSNet} ($K=2$ and $m=16$). The dot indicates the initial condition $y_0=(\cos(1.1),0,\sin(1.1))^T$. (b) Absolute global error. (c) Absolute relative error in time of the kinetic energy \eqref{eq:KinEn}. (c) Absolute relative error in time of the invariant \eqref{eq:Iinv}.}\label{fig:RB_LongSim} \end{figure} \subsubsection{Learning the whole dynamics} In the previous section we learned a single trajectory of the rigid body dynamics \eqref{eq:RBody}. In this section we demonstrate network's \eqref{eq:LSNet} capabilities of learning the whole dynamics. We can achieve that by considering training data from multiple trajectories or irregularly sampled one time step data. We can consider irregularly sampled data with constant or randomly chosen time steps. To keep the presentation concise we have chosen to consider sampled training data of $N=300$ randomly chosen initial conditions on the unit sphere, see Figure \ref{fig:RB_RandIC}, with constant time step $\tau=0.1$. Similarly, $M=100$ random initial conditions are chosen to form the validation dataset. Figure \ref{fig:RB_RandIC} illustrates randomly chosen initial conditions in spherical polar coordinates $(\phi,\theta)$, where dots and diamonds indicate initial conditions for the training and validation dataset, respectively, while the contour lines indicate $z$ values in Cartesian coordinates. \begin{figure} \centering \subfigure[]{\label{fig:RB_RandIC} \includegraphics[trim=0cm 0cm 1.5cm 0cm,clip=true,width=0.49\textwidth]{rigidbody_ic_n300m100.png}} \subfigure[]{\label{fig:RB_RandLoss} \includegraphics[trim=0cm 0cm 1.5cm 1.5cm,clip=true,width=0.49\textwidth]{rigidbody_rand_lossk3m60.png}} \caption{(a) Randomly chosen initial conditions to form training data (dots) and validation data (diamonds). (b) Loss function and networks prediction accuracy on validation dataset at each epochs.}\label{fig:RB_RandICLoss} \end{figure} For learning the whole dynamics we require more complex network ($K=3$ and $m=60$), more training data and more epochs to acquire necessary accuracy, see Figure \ref{fig:RB_RandLoss}, which illustrates the mean square loss function and networks prediction accuracy on validation dataset over one million epochs. To reduce large oscillations in the loss function, e.g., see Figure \ref{fig:RB_LossK2}, in this experiment we have considered exponential decay scheduling for the learning rate $\eta$, such that the initial learning rate is $\eta=10^{-2}$ and the final value is $\eta=10^{-6}$. Significant accuracy is already achieved after 10000 epochs, but that is not sufficient for very accurate predictions. The testing is performed as follows. We consider $J=12$ initial conditions on the unit sphere defined with spherical polar angle values: \begin{equation}\label{eq:ICond} \phi_i = \frac{1+2j}{2}\Delta, \quad \theta_i = -\frac{1+2j}{4}\Delta, \quad \Delta=\frac{\pi}{J}, \quad j=0,\dots,J-1. \end{equation} For each initial condition \eqref{eq:ICond} predictions by the volume-preserving neural network \eqref{eq:LSNet} are illustrated in Figure \ref{fig:RB_RandSol}, where dots indicate the initial values \eqref{eq:ICond} on the unit sphere. Predicted solution trajectories are shown for four different time intervals $t\in[0,T_{end}]$, i.e., when $T_{end}=10,100,200,400$. Notice a very good agreement with the exact solution, depicted with the solid line, for $t\in[0,100]$ and qualitatively good results over the whole time interval $[0,400]$. As time progresses predicted trajectories gradually deviate from the analytical closed orbits. In contrast to the single trajectory learning example above absolute relative errors (not shown) of both conserved quantities \eqref{eq:KinEn}--\eqref{eq:Iinv} grow linearly. Over the time interval $[0,400]$ the absolute relative errors are below $5\%$. Thus, predictions are only valid for relatively short times. This can be expected, since \eqref{eq:LSNet} does not exactly preserve both invariants and predictions are sensitive to particular weight and bias values of the neural network. Additional experiments did not suggest that more complex network or more training data is required, but rather more epochs in training to achieve greater accuracy. Thus, more research in this direction is required. \begin{figure} \centering \subfigure[]{\label{fig:RB_RandSolt10} \includegraphics[trim=2.5cm 1cm 0.5cm 2cm,clip=true,width=0.49\textwidth]{rigidbody_rand_solk3m60t10.png}} \subfigure[]{\label{fig:RB_RandSolt100} \includegraphics[trim=2.5cm 1cm 0.5cm 2cm,clip=true,width=0.49\textwidth]{rigidbody_Rand_solk3m60t100.png}} \subfigure[]{\label{fig:RB_RandSolt200} \includegraphics[trim=2.5cm 1cm 0.5cm 2cm,clip=true,width=0.49\textwidth]{rigidbody_rand_solk3m60t200.png}} \subfigure[]{\label{fig:RB_RandSolt400} \includegraphics[trim=2.5cm 1cm 0.5cm 2cm,clip=true,width=0.49\textwidth]{rigidbody_rand_solk3m60t400.png}} \caption{Predicted 12 solution trajectories of the rigid body problem \eqref{eq:RBody} by the volume-preserving neural network \eqref{eq:LSNet} with $K=3$ and $m=16$, and time step $\tau=0.1$. Dots indicate the initial conditions \eqref{eq:ICond}. (a) $T_{end}=10$. (b) $T_{end}=100$. (c) $T_{end}=200$. (d) $T_{end}=400$. }\label{fig:RB_RandSol} \end{figure} \section{Conclusions and future work} \label{sec:Conclusions} In this work we proposed locally-symplectic volume-preserving neural networks $\mathrm{LocSympNets}$ for learning volume-preserving dynamics, which construction stems from recently proposed symplectic neural networks and symplectic Euler splitting numerical methods. We showed that the volume-preserving neural network \eqref{eq:LSNet} modules are locally symplectic and their composition is volume preserving. Numerical validation of the proposed neural networks were performed considering linear semi-discretized advection equation and nonlinear Euler equations of the rigid body. For linear dynamics learning objectives of the network, which follows from the construction, were discussed. While performance of \eqref{eq:LSNet} for linear dynamics is not optimal compared to multivariate linear regression problem, but $\mathrm{LocSympNets}$ incorporates more dynamics data and allows for training with nonconstant time steps, if desired. For the rigid body dynamics two learning objectives were considered, i.e., learning a single trajectory and the whole dynamics. Neural networks \eqref{eq:LSNet} performed exceptionally well when learning a single trajectory was required, since network was able to preserve both conserved quantities up to high relative accuracy in long-time predictions. For learning the whole dynamics example of irregular training data was considered. The volume-preserving neural network was able to learn dynamics and make very accurate short-time predictions for arbitrary initial condition. For future work we consider the following tasks. \paragraph{Analysis} In this work the proof of the universal approximation theorem was not provided. We plan to investigate if the proof of the symplectic neural networks presented in \cite{SympNets} can be extended to the proposed locally-symplectic volume-preserving neural networks \eqref{eq:LSNet}. \paragraph{Linear systems} For learning linear systems we plan to investigate the trained matrices $B_1, B_2,\dots $, and how they are linked to training data and the system's matrix $A$, and establish optimal $K$ and $m$ parameter values with respect to system's dimension $n$ and when nonconstant time step $\tau$ values are considered. \paragraph{Activation functions} The choice of using sigmoid function as the activation function was motivated by its use in \cite{SympNets}. Very good results, not shown, were also obtained with Swish activation function and further investigation in this direction is required, either from theoretical or numerical point of view. \paragraph{Comparison to other methods} We plan to compare our approach to other volume-preserving neural networks and investigate if local Hamiltonian structure consideration is crucial, in particular, in long-time predictions. \paragraph{Training} Current results demonstrate that optimizer Adam requires too many epochs to achieve desirable accuracy, which limits the full exploration of \eqref{eq:LSNet} and its application to higher dimensional problems. Large number of epochs was also reported in \cite{SympNets} for learning Hamiltonian dynamics. Thus, more research in faster converging optimization algorithms is still needed. \section*{Acknowledgements} J.~Baj\={a}rs acknowledges support from lzp-2020/2-0267 grant. \bibliographystyle{unsrt}
\section{Introduction} Social media applications are a major forum for people to express their opinions and information. By interacting with such applications, users build complex networks that favor the dissemination of information~\cite{Al-Garadi:2018}. Indeed, social media has become an important source of information for a large fraction of the world population~\cite{Shearer:2018, Statista:2020, Newman:2019Reuters}. It has been shown to play an important role in social mobilization and political engagement ~\cite{Resende:2019, Munoz:2017}, notably during major political events~\cite{Pierri:2020}. Instagram has observed a surge in popularity in recent years~\cite{Whashington:2020}, particularly among the youth. The use of Instagram for consuming news has doubled since 2018, and the platform is set to overtake Twitter as a news source~\cite{Newman-Reuters-b:2020}. Not a surprise, political personalities are increasingly leveraging Instagram to reach the population at scale. Understanding how users interact with each other is paramount to uncover how information is disseminated in the platform and how the online debate impacts our society~\cite{Conover:2012, Gorkovenko:2017, Pierri:2020, Tanase:2020, Resende:2019, Alizadeh:2019, Gorrell:2020}. Prior studies of user behavior on Instagram mainly focused on user engagement based on content type~\cite{Reece:2017, Jaakonm:2017, Garret:2019, Kao:2019, Kim:2020, Weerasinghe:2020}, general characteristics of comments associated with political messages~\cite{Trevisan:2019, Zarei:2019} and the impact of the posted content on marketing contexts~\cite{Jaakonm:2017, Yang:2019, Kang:2020}. The literature lacks an investigation of the networks that emerge from users' interactions, in particular around political contents, networks that play key roles in information dissemination. In Instagram jargon, a \emph{profile} is followed by a set of \emph{followers}. A profile with a large number of followers is called an \emph{influencer}. Influencers post content, i.e., \emph{posts}, containing a photo or a video. Followers or any registered user in the case of public profiles can view the profile's posts and comment on them, becoming \emph{commenters}. We here refer to users who comment on the same post as \emph{co-commenters}, and to the interactions that occur among multiple users (often more than two) when they comment on the same post as {\it co-interactions}. Co-commenters may form {\it communities} that arise either naturally (i.e., based on common interests on specific topics) or driven by hidden efforts (e.g., ad-campaign or coordinated behavior). By feeding the discussions, communities may favor the spread of specific ideas or opinions while also contributing to increase the visibility of particular influencers. Thus, revealing how such communities emerge and evolve over time is key to understanding information dissemination on the system. Studying communities of co-commenters is however challenging. First, users may become co-commenters incidentally because of the high popularity of some posts and/or influencers. Equally, very active commenters naturally become co-commenters of many other users as a side effect of their great frequency of commenting activity. All these cases are expected to happen, especially given the frequent heavy tail nature of content and user popularity in social media \cite{Ahn:2007}. Conversely, we are interested in finding the true group behavior, driven by users' interests or peer influence~\cite{Burke:2009, Wilson:2009, Kwon:2014}. Moreover, often happening in large volumes, those incidental co-interactions may lead to the formation of networks of co-interactions with lots of sporadic, uninteresting or weak edges. Investigating the aforementioned communities by looking at the entire networks may be quite misleading, as a lot of sporadic and weak edges may mask the actual group behavior. In contrast, we want to focus on the underlying strong topological structure composed of edges representing {\it salient} co-interactions,\footnote{We use the terms salient co-interactions and salient edges interchangeably.} that is, co-interactions that cannot be rooted in independent users' behavior. We here refer to such structure as the {\it network backbone}. Uncovering the network backbone as well as the communities that compose it and investigating how they evolve over time are thus important steps to understand the dynamics of the online debate, ultimately shedding light on factors driving information dissemination on Instagram. In this paper, we face the aforementioned challenges to investigate the structural and temporal dynamics of communities formed around salient co-interactions of users on Instagram. Our ultimate goal is to understand the important properties of these communities, with a focus on political content. We model co-commenters' activity as a network where nodes represent commenters and edge weights indicate the number of posts on which both users commented. To filter out uninteresting edges and reveal the underlying network backbone, we employ a reference probabilistic network model in which edges are built based on the assumption that commenters behave independently from each other. Our model takes into account mainly two factors: the popularity of posts, and commenters' engagement towards each influencer. By contrasting the network observed in real data with our reference model, we filter out edges whose weights are within the expected range under the assumption of independent users' behavior, thus uncovering the network backbone representing the group behavior we are interested in. Next, we extract communities using the Louvain algorithm \cite{Blondel_2008}, that we characterize in terms of topological structure, textual properties of comments and discussions carried out, highlighting how community membership and topics of discussion evolve over time. We build our study on a large dataset of Instagram comments, including approximately $1.8$ $million$ unique commenters on $36\,824$ posts by $320$ influencers in two countries (Brazil and Italy). The dataset covers two months surrounding major elections that took place in each country. For each country, we selected popular political figures as well as top influencers in other categories (e.g., athletes, celebrities, musicians), aiming to identify differences that characterize the political discussions from other (general) discussions. We track all influencers' posts, recording all comments (and commenters) associated with those posts. We study each week in isolation to construct consecutive temporal snapshots of co-commenter networks and observe how communities evolve over time. In sum, in this paper, we tackle three research questions (RQs), which lead to new contributions as follows: \begin{itemize}[leftmargin=*] \setlength{\itemindent}{0em} \item[]\textbf{RQ1:} What are the characteristics of the network backbones emerging from \emph{salient co-interactions} on Instagram? By extracting the network backbones, we show that the salient edges of the co-commenters network build better-defined communities than those found in the original (complete) networks, highlighting the need to uncover the network backbone before studying such communities. More specifically, the communities have proportionally more nodes, more edges and are more dense, indicating a more correlated behavior among commenters of the same community. \item[]\textbf{RQ2:} What are the distinguishing properties of the communities that compose such backbones, notably communities formed around political content? We characterize the properties of the communities and find that, in politics, multiple communities engage with the same influencer but are typically driven by different topics. Communities in politics tend to be more engaged in online discussions than non-political counterparts. Comments in politics tend to be longer, richer in emojis, hashtags and uppercase words (indicating assertive and emotional content), and tend to carry a more negative tone than other categories. \item[]\textbf{RQ3:} How do community properties evolve over time? Aiming to shed light on how information propagates on Instagram through co-commenters' networks, we notice a heating up in political debate and large variations on community membership in weeks preceding elections. Both are reduced after the election day. Yet, top commenters remain consistently active and preserve their community memberships over successive weeks. Moreover, we observe a great diversity in discussed topics over time for communities in politics. Whereas some topics attract attention only momentarily (e.g., racism), others, centered around more fundamental political subjects (e.g., rallies, particular candidates and political ideologies), remain consistently active. \end{itemize} This study extends our preliminary work \cite{Ferreira:2020}, where we discussed the emergence of communities around political discussions on Instagram. We extend it by providing a much broader characterization of the communities, covering not only basic topological and temporal properties but also textual properties of the content posted by communities, e.g., topics, sentiment and psycholinguistic properties. As such, we offer a deep analysis of political discussions on Instagram, which helps to understand content propagation during electoral periods. The remainder of this article is organized as follows: Section~\ref{sec:related} summarizes related work, while Section~\ref{sec:methodology} presents our methodology to extract the network backbone and analyze co-commenter communities. Section~\ref{sec:dataset} describes our dataset, and Sections~\ref{sec:rq1}-\ref{sec:rq3} present our main results. Finally, Section~\ref{sec:discussion} discusses our findings, offers conclusions and directions for future work. \section{Related work} \label{sec:related} We characterize political discussions on Instagram by analyzing user interactions from a network perspective. Three bodies of work are related to our effort: i) studies on online discussions in social media; ii) efforts to model interactions among groups of users (i.e., co-interactions); and iii) methods to extract network backbones. \subsection{Online discussions in social media applications} Several social media applications have been largely studied as platforms for political debate. For example, Nguyen ~\cite{Nguyen:2018} presented a literature review of the role of Twitter on politics, notably as a platform to help politicians win elections and foster political polarization. Indeed, many studies have already argued for the increasing polarization in political orientation~\cite{Gruzd:2014, Vergeer:2015}, whereas others have explored the benefits that politicians can have from using Twitter to reach their supporters~\cite{Chi:2010}. Gorkovenko et al.~\cite{Gorkovenko:2017} studied user behavior on Twitter during live political debates, finding that people often use the platform to share their opinions, make provocative statements, and inform others. Badawy et al.~\cite{Badawy:2018}, in turn, found evidence of the use of Twitter for political manipulation. In a different direction, Caetano et al.~\cite{Caetano:2018} identified four groups of politically engaged users on Twitter during the 2016 US presidential campaign, namely advocates for both main candidates, bots and regular users, characterizing properties of each group. Online discussions have also been studied in the context of other platforms. For example, Tanase et al. \cite{Tanase:2020} studied the political debate around the \textit{Brexit} on Facebook, analyzing messages that generated higher engagement from users. In~\cite{fabricio}, the authors developed a system to detect political ads on Facebook and used it to present evidence of misuse during the Brazilian 2018 elections. WhatsApp has also been analyzed as an important platform for political debate and information dissemination, notably for the spread of fake news during political elections \cite{Resende:2019, Josemar:2019}. Considering Instagram, in particular, the literature on user behavior and interactions is reasonably recent and somewhat restricted. Some authors have analyzed user engagement~\cite{Kang:2020, Yang:2019, Kim:2020, trevisan2021debate} and properties of the textual content shared by Instagram users~\cite{Zhan:2018, Arslan:2019}, but with no particular focus on political discussions. Closer to our present effort, Zarei et al.~\cite{Zarei:2019} analyzed user engagement of twelve Instagram profiles, including profiles of politicians, searching for \emph{impersonators} -- i.e., users who simulate others' behavior to perform specific activities, such as spreading fake news. Mu\~{n}oz et al.~\cite{Munoz:2017} studied image content posted by candidates during the US 2016 primary elections, highlighting combined factors that attract user engagement, whereas Trevisan et al.~\cite{Trevisan:2019} performed a quantitative study of the political debate on Instagram, highlighting that politicians' profiles tend to have significantly more interactions than others. To the best of our knowledge, we are the first to analyze political discussions on Instagram from a network perspective. As such, we complement those previous efforts by providing an orthogonal and broader analysis of the dynamics of communities of co-commenters who engage in and drive political discussions. Our present effort builds on a preliminary work~\cite{Ferreira:2020} where we focused on identifying the structure emerging from the co-commenter network, offering a novel methodology for backbone extraction in this kind of network. We here greatly extend our prior effort by offering a much more thorough characterization of the content and temporal properties of communities extracted from the backbones. \subsection{Modeling interactions among groups of users} A plethora of phenomena related to in-person and online human interactions have been analyzed using concepts of complex networks. Many of these interactions occur among two or more entities simultaneously -- referred here as {\it co-interactions}. Co-interactions constitute an important substructure for some complex systems, exhibiting a slew of properties relevant to the study of the (often global) phenomenon of interest \cite{Benson2:2018, Meng:2018}. Some recent studies have empirically analyzed co-interactions through the lens of {\it higher-order networks}, including \textit{motif} (or graphlet) representations, \textit{multilayer} networks, \textit{simplices} and \textit{hypergraphs}~\cite{Meng:2018, Benson:2018, Liu:2019}. In their most basic form, these structures are represented by different motifs (e.g., triangular motifs, star, structural hubs, etc)~\cite{Benson:2016b, Rossi:2018}. Some studies focused on characterizing many of these networks \cite{Zhao:2010,Benson2:2018}, while others analyzed the relationship between motifs and some specific phenomena of interest on a particular network \cite{Adamic:2008,Kuvsen:2020}. Focusing on revealing communities emerging from co-interactions, which is our present goal, some approaches are concentrated at uncovering communities that are based on particular structural patterns, specifically, on motifs \cite{Pizzuti:2017, Yin:2017, Tsourakakis:2017, Huang:2019}. Conversely, we here aim at uncovering communities of co-commenters who may be driving the online discussions. These communities are not necessarily specific structural patterns, but rather tightly connected subgraphs with respect to the rest of the network. Hence, we focus on the densest and most uniform flavor of co-interaction, where all individuals interact with each other in a motif known as clique~\cite{Battiston:2020}. To do so, we model such co-interactions by projecting them into a weighted and undirected graph, similar to other works present in the literature. For example, Giglietto et al.~\cite{Giglietto:2020} analyzed posts on Facebook focusing on identifying inauthentic behavior by modeling the network of link co-sharing, formed by entities (pages, groups, and verified public profiles) which shared the same content frequently in a short period of time. Cruickshank et al.~\cite{Cruickshank:2020} analyzed interactions among topics on Twitter by modeling a sequence of networks from co-occurrences of hashtags used by Tweeter users. Aiming to reveal coordinated behavior on Twitter, Pacheco et al.~\cite{Pacheco:2020} proposed a set of network models that capture different patterns of co-interactions among users. Examples of patterns include using similar hashtags, sharing the same images or chronological use of the platform. The authors focus on the top 1\% edges as being the most representative. Other works adopt broader definitions of interaction, e.g., users co-retweeting, using the same hashtags or URLs, mentioning the same accounts, or joining the same \textit{conversation} when reply chains with a common root tweet at the same time \cite{Hanteer:2018, Weber:2020}. Yet, they still apply a fixed weight threshold across all edges. Thus, as part of our proposal to model co-interactions that occur among Instagram users as they comment on the same post, we must tackle the challenges of using the projected network, notably the presence of a potentially large number of weak and possibly irrelevant edges. Specifically, we adopt an approach that reveals edges in the projected network that, in fact, unveil how the discussion takes place on Instagram. In contrast to prior work \cite{Giglietto:2020, Pacheco:2020, Nobre:2020, Hanteer:2018, Weber:2020}, we remove those co-interactions formed by chance, due to the frequent heavy tail nature of the content and user popularity in social media \cite{Ahn:2007}. To address this challenge, we propose a generative model to filter such noisy edges out of the network, thus retaining only {\it salient} edges in the network backbone. In the next section, we review prior works focused on this task, distinguishing our method from existing alternatives. \subsection{Network backbone extraction} Network backbone extraction consists of removing edges of a network to retain a clearer image of fundamental structures governing the network~\cite{Coscia:2017}. As several network models and algorithms assume that edges faithfully represent the interactions under study, backbone extraction is a necessary step to avoid that spurious, weak and sporadic edges blur and impair the investigation~\cite{Slater:2009, Newman:2018}. Some of the simplest methods of backbone extraction explore topological metrics and global properties of the graph. They typically propose to select the most important edges for the study \cite{Leao2018, Hanteer:2018, Pacheco:2020, Giglietto:2020, Nobre:2020}. Examples include the use of K-core searches for dense subgraphs~\cite{Sariyuce:2016, Savic:2019} and the removal of edges based on a global threshold $\tau$, either applied directly to edge weights~\cite{Ferreira:2018, Namaki:2011, Yan:2018} or to more sophisticated metrics such as the neighborhood overlap of a pair of nodes~\cite{Brandao:2017, Ferreira:2019}. These methods are particularly adequate when the concept of salient edge is well-defined by the problem context, e.g., large edge weight \cite{Ferreira:2018, Yan:2018}. However, threshold-based approaches may lead to misleading interpretations and introduce bias in the analyzes, since setting the $\tau$ threshold appropriately depends on the context and therefore can be quite complex \cite{Tsur:2017}. Other methods are based on local probability distributions, i.e., distributions specific to each edge or subset of edges. For instance, Serrano et al.~\cite{Serrano:2009} propose the \textit{disparity filter} method, based on the assumption that an edge is salient if two nodes are connected with a disproportionately high weight compared to the weights connecting them to their other neighbors. In other words, salient edges are those that have weights that deviate significantly from the null hypothesis that the weights of all edges incident to a given node are uniformly distributed. Edge weights are compared to the reference model and $p$-values are used to determine how much an edge differs from it. \textit{Noise Corrected} \cite{Coscia:2017} is another local backbone extraction method, based on the assumption that the salience of an edge results from collaboration between the nodes. Unlike the disparity filter, this method is able to preserve peripheral-peripheral connections by estimating the expectation and variance of edge weights using a binomial distribution. It considers the propensity of the origin node and the destination node to emit and receive edges. To be regarded as salient, an edge must exceed its expected weight considering the connection strength of its nodes. Finally, other methods to extract the network backbone make use of a reference model describing how the network should be built under certain assumptions -- e.g., interactions occur by chance, based on independent behavior \cite{Jacobs:2015} or uniform weight distribution over edges incident to a node~\cite{Slater:2009}. The general idea is to keep only edges that deviate enough (in a probabilistic sense) from these assumptions. For example, under the assumption of independent behavior, the authors of~\cite{Silva:2014} propose to filter out edges whose weights are below the $95^{th}$ percentile of the edge weight distribution defined by the reference model. We here employ a generative model to extract the backbones from co-commenters networks. This method was originally proposed in a preliminary version of this work \cite{Ferreira:2019}. In contrast to the aforementioned methods, our model considers the fundamental elements and structure of the target domain (influencers, commenters and posts). Specifically, it takes into account \textit{post popularity} and \textit{user activity level} as factors to model independent user behavior on a per-edge basis, keeping only edges that deviate significantly from it. As such, our method relies on a fine-grained local reference model to keep only salient edges, thus revealing the network backbone. \section{Methodology} \label{sec:methodology} In this section we formally define the network of co-commenters on Instagram and describe the probabilistic network model used as reference to uncover salient interactions. We then describe how we extract communities from the network backbone and present the techniques employed to characterize these communities \subsection{Network of co-commenters} \label{sec:netw} We model the dynamics of interactions among users who comment on the same Instagram post as a sequence of snapshots of fixed time window $w$, where each snapshot aggregates posts of a selected set of influencers and their associated comments. We here consider $w$ equal to one week as a reasonable period to cover discussions around posts. Given a time window $w$, we take the corresponding set of posts $P_w$, whose creation times fall within $w$, to create a weighted and undirected graph $G_w=(V_w,E_w)$. Vertices in set $V_w$ correspond to users who commented in at least two posts in $P_w$. We choose to disregard commenters whose activities were concentrated on a single post, and thus reflect sporadic behavior.\footnote{Note that, by doing so, commenters who commented multiple times on a {\it single} post, but did not comment on other posts, are removed.} On Instagram, commenters can also reply directly to another user's comment. In our problem, we are interested in finding users with similar behavior or interested in a similar topic or influencer. As such, we build our network uniquely based on the appearance of commenters in a post's comments and neglect whether they are answering to previous comments. This is also supported by our observation that, in many cases, commenters engage in discussion on specific topics without using the \emph{reply to comment} feature. Let $P_w(c) \subseteq P_w$ be the set of posts on which user $c$ commented. An edge $e_{cd} = (c,d)$ is added to set $E_w$ if $P_w(c) \cap P_w(d) \neq \emptyset$, i.e., commenters $c$ and $d$ commented at least once on the same post. Thus, edges link co-commenters. The weight $\gamma({cd})$ of edge $e_{cd}$ is defined as the number of posts on which $c$ and $d$ commented together, i.e., $\gamma({cd}) = |P_w(c) \cap P_w(d)| \in \{1,2,\ldots,|P_w|\}$. Aiming at characterizing similarities and differences in discussions across different themes (political or not) and countries (Brazil and Italy), we build separate networks $\mathcal{G}=\{G_1, G_2 ... G_n\}$, where $n$ is the total number of time windows $w$, for each scenario. By definition, each post $p$ in $P_w$ generates a clique (i.e., a complete subgraph) in the graph. Thus, the final network $G_w$ is the superposition of all the cliques generated by the posts in $P_w$. As such, $G_w$ results in a complex network with a large number of vertices and edges, many of which may be the result of independent behavior of different commenters, i.e., not a reflection of actual discussions. For example, a very popular post leads to a large clique in the graph. Yet, many co-interactions captured by this clique are likely a side effect of the popularity of the post, or of the influencer who created it. Similarly, a user who is very active will likely co-occur as a commenter with many others. That is, such co-interactions are to some extent {\it expected} given users' activity and post popularity. Thus, to analyze interactions among co-commenters, we filter out such expected edges and focus on those whose frequencies of occurrence are large enough to allow us reject, with some confidence, the assumption of independent behavior. That is, we focus on salient edges that most probably reflect real online discussions, forming the underlying fundamental network backbone. \begin{figure*}[!t] \centering \subfloat[Raw Data]{\includegraphics[width=1\columnwidth]{fig/toy_interactions.eps}\label{Fig:toy_fig_1}}\hspace{0.32cm} \subfloat[Original Network $G_w$]{\includegraphics[width=0.45\columnwidth]{fig/toy_complete.eps}\label{Fig:toy_fig_2}\vspace{1.4cm}}\hspace{0.4cm} \subfloat[Network Backbone $B_w$]{\includegraphics[width=0.42\columnwidth]{fig/toy_backbone.eps}\label{Fig:toy_fig_3}\vspace{1.4cm}} \caption{Illustration of the backbone extraction process in a simplistic graph. The isolated vertices are removed from the final $B_w$ used in our analysis.} \label{Fig:toy_fig} \end{figure*} \subsection{Network backbone extraction} \label{sec:back} A fundamental question that arises when studying complex networks is how to quantify the statistical significance of an observed network property~\cite{Coscia:2017, Newman:2018}. To that end, reference models are often used to determine whether networks display certain features to a greater extent than expected under a null hypothesis (e.g., independent behavior)~\cite{Burke:2009, Wilson:2009, Kwon:2014}. A reference (or {\it null}) model matches some of the features of a graph and satisfies a collection of constraints, but is otherwise taken to be an unbiased random structure. It is used as a baseline to verify whether the object in question displays some non-trivial features (i.e., features that would not be observed as a consequence of the constraints assumed). An appropriate reference model behaves according to a reasonable null hypothesis for the behavior of the system under investigation. One strategy to build a reference model is by employing generative growing networks \cite{Easley:2010, Newman:2018}. We here employ a reference generative model $\widehat{G}_w$ for each network $G_w$ that is based on the hypothesis that commenters during $w$ behave independently from each other~\cite{Ferreira:2020}. That is, edge weights in $\widehat{G}_w$ are defined under a generative process in which commenters act independently from each other, although their interactions with influencers' posts (i.e., which post each user comments on) are not identically distributed. We can then observe which edges of the real network $G_w$ do not behave in accordance with the reference model $\widehat{G}_w$ -- i.e., reflect interactions that significantly deviate from an independent behavior. Such edges will compose the network {\it backbone}. Intuitively, we want to highlight co-interactions that occurred more often than what would be expected if commenters behaved independently. Our null model takes as input the popularity of each post (number of unique commenters) and the engagement of commenters towards each influencer (number of posts by the influencer each commenter writes on). Using these statistics, comments are randomly assigned to commenters while preserving: i) the set of influencers on which each commenter writes a comment; ii) the popularity of each post, and iii) the engagement of each commenter towards each influencer. The model assigns commenters to each post using independent and identically distributed (i.i.d.) draws from a distribution where the probability is proportional to the commenter's engagement towards the target influencer. By doing so, we prevent the backbone from being dominated by very active commenters or by those engaged in highly popular posts. More specifically, let $I_w$ be the set of all influencers who wrote posts in $P_w$. Let $\mathcal{C}_p \subseteq V_w$ be the set of unique commenters in post $p \in P_w$ and $\{\mathcal{{P}}_w^i\}_{i \in I_w}$ be a partitioning of $P_w$ based on the influencer $i \in I_w$ who created the post. We define the engagement of commenter $c \in V_w$ towards influencer $i$ (measured by the total number of posts in $\mathcal{P}_w^i$ commented by $c$) as \begin{equation} x_i(c) = \sum_{p \in \mathcal{P}_w^i} \mathds{1}\{c \in \mathcal{C}_p\}, \end{equation} where $\mathds{1}\{.\}$ is the identity function. We then define $c$'s \textit{relative engagement} towards $i$ w.r.t.\ other commenters as: \begin{equation} f_i(c) = \frac{x_i(c)}{\sum_{d \in V_w} x_i(d)} = \frac{x_i(c)}{\sum_{p \in \mathcal{P}_w^i} |\mathcal{C}_p|}. \end{equation} In this way, we can describe in details the three steps of the generative process to build our reference model~$\widehat{G}_w$: \begin{enumerate} \item For each post $p \in P_w$, we consider a random assignment of each of the $|\mathcal{C}_p|$ (unique) commenters to a commenter $c \in V_w$ with probability $f_i(c)$, where $i$ is the author of $p$. Specifically, under the assumption of independent behavior, we consider each such assignment as a Bernoulli random variable with parameter $f_i(c)$. The probability that commenter $c$ is not assigned to $p$ is thus a Binomial random variable, with 0 successes in $|C_p|$ experiments. Conversely, under the assumption of independent behavior, the probability that $c$ has commented (at least once) on a post $p \in \mathcal{P}_i$ is $r_p(c)=1-(1-f_i(c))^{|\mathcal{C}_p|}$. \item For each pair of commenters $c$ and $d$, we denote by $r_p(c,d)$ the probability that both get assigned to post $p$ and by $r_p(d|c)$ the probability that $d$ gets assigned to $p$ given that $c$ is assigned to $p$. The conditional probability $r_p(d|c)$ is necessary because, strictly speaking, although we are drawing commenters independently, when $c$ is drawn, it decreases the number of chances $d$ has for being drawn (since $|\mathcal{C}_p|$ is fixed). Hence, $r_p(c,d) = r_p(c) \times r_p(d|c).$ We approximate $r_p(c,d)\approx r_p(c)\times r_p(d)$, for each $p \in P$. Intuitively, this approximation works well when $|\mathcal{C}_p|$ is large (as in the case of most influencers' posts), because drawing $c$ decreases by only one the number of draws that can be used to draw $d$. Then, for each post $p\in P_w$, our model defines a distribution over the set of vertices corresponding to $\mathcal{C}_p$, where the value of the random variable $\widehat{\Gamma}_p{(c,d)} \in \{0,1\}$ indicates the existence of an edge between commenters $c$ and $d$, and is given by a Bernoulli trial with parameter $r_p(c,d)$, i.e.\ $\widehat{\Gamma}_p{(c,d)} \sim \textrm{Bernoulli} (r_p(c,d))$. \item The reference model $\widehat{G}_w=(\widehat{V}_w, \widehat{E}_w)$ is composed by the superposition of all the edges created for all $p \in P_w$. Hence, an edge $\widehat{e}_{cd} \in \widehat{E}_w$ will have a weight distribution described by a random variable $\widehat{\Gamma}{(c,d)} = \sum_{p \in P_w} \widehat{\Gamma}_p{(c,d)}$. Therefore, it will be a sum of Bernoulli random variables with distinct probabilities \cite{Wang:1993}, which follows a Poisson Binomial distribution with parameters $ r_1(c,d), r_2(c,d),\ldots,$ $ r_{|P_w|}(c,d) $. \end{enumerate} We can then compare the reference model $\widehat{G}_w$ with the observed network ${G}_w$ to extract the backbone $B_w$ of the latter. We do so by keeping in $B_w$ only edges of ${G}_w$ whose weights have values exceeding the ones expected in $\widehat{G}_w$ by a large margin. Specifically, for each edge $\widehat{e}_{cd}$ we compute the $(1-\alpha)^{th}$ percentile, denoted by $\widehat{\gamma}_{1-\alpha}(c,d)$, of the distribution of edge weight $\widehat{\Gamma}(c,d)$, and compare it with the observed edge weight ${\gamma}{(c,d)}$. We keep edge $e_{cd}$ if ${\gamma}{(c,d)} > \widehat{\gamma}_{1-\alpha}{(c,d)}$. Intuitively, we keep only edges between co-commenters who interacted much more often than expected under the assumption of independent behavior. That is, edges for which the chance of such frequency of interactions being observed under the independence assumption is below $\alpha$. We here set $\alpha$ = 5\%, as done in prior studies \cite{Serrano:2009, Kobayashi:2019}. Note that, after filtering out edges, isolated vertices are also removed. At the end, we extract from the network $G_w$ its backbone $B_w= (V^b_w, E^b_w)$ where $V^b_w \subseteq V_w$ and $E^b_w \subseteq E_w$. Note that the $(1-\alpha)^\textrm{th}$ percentile is computed separately for each edge $e_{cd} \in E_w$ from random variable $\widehat{\Gamma}(c,d)$. For such a Poisson binomial distribution, there is a closed form for computing a given percentile~\cite{Hong:2013}, which, however, is expensive to compute. Instead, we here use the Refined Normal Approximation (RNA)~\cite{Hong:2013}, a method that proved very good performance with low computational complexity. \subsection{Backbone extraction exemplified} We illustrate how the backbone is extracted from a given input network $G_w$ by means of the toy example shown in Figure~\ref{Fig:toy_fig}. Figure~\ref{Fig:toy_fig_1} shows a total of five influencers, each with a different number of posts ($P1$, $P2$, etc), and each post with associated commenters ($A$, $B$, etc). Posts have different popularity, and commenters have different activity levels and engagement towards each influencer. The projected graph $G_w$ is depicted in Figure \ref{Fig:toy_fig_2}, whereas the extracted backbone $B_w$ is shown in Figure \ref{Fig:toy_fig_3}. In both networks, line thickness is proportional to the edge weight. The question that arises is: {\it why did we extract only the edges shown in Figure \ref{Fig:toy_fig_3} to compose the network backbone?} Recall that our model selects as salient edges those that have weights large enough so that we can reject the assumption of independent user behavior. Thus, for each edge in $G_w$, we ask ourselves: is there enough evidence to reject the assumption of independent behavior? If so, the edge is kept; otherwise, it is removed. Let’s illustrate our decisions regarding four groups of edges, focusing first on edges incident to commenters $A$, $B$, $C$. Note that all three commenters commented on posts only by influencers $1$ and $5$ and they commented on {\it all} posts by both influencers. These commenters are thus quite active, and the popularity of these posts is actually high, considering the population of users who commented on them. As such, it is possible that $A$, $B$ and $C$ are driven by their individual interests on these two influencers, and, as such, most probably would comment in most (if not all) posts by them. Thus, based on the observed data, we cannot reject the assumption of independent user behavior when considering co-interactions among $A$, $B$ and $C$ and the corresponding edges are not kept as part of the network backbone in Figure ~\ref{Fig:toy_fig_3}. For example, the edge $e_{AB}$ has weight ${\gamma}{(A,B)} = 9$ which is below or equal to the $95^{th}$ percentile of the corresponding edge weight distribution $\widehat{\gamma}_{0.95}{(A,B)} = 9$. The same reasoning applies to commenter $X$, who only commented on posts by influencer $1$. Thus, the co-interactions of $X$ with $A$, $B$ and $C$ are {\it not} considered salient and the corresponding edges are not kept. Let’s consider now the edges incident to commenters $J$, $K$ and $L$. These users co-comment with low frequency in posts by influencers $2$ ($P2$ and $P3$), $3$ ($P3$) and $4$ ($P5$). These posts are the most popular posts by such influencers, receiving comments from several other users as well. It is therefore expected that commenters active on these posts will have several co-commenters, as we can observe in Figure ~\ref{Fig:toy_fig_2}. However, when it comes to $J$, $K$ and $L$, the weights of these edges are small, as the co-interactions are somewhat sporadic. Moreover, note that the posts on which these users commented are among the most popular ones by the corresponding influencers, attracting most of their commenters. For example, $P2$ by influencer $2$ received comments by 9 out of all 10 users who commented on her posts. Co-interactions built around such highly popular post are {\it not} considered salient as one cannot tell whether commenters are truly interacting with each other or simply reacting independently to a quite attractive content. From an operational perspective, recall that, when building the reference model $\widehat{G}_w$ we do need to assign commenters to comments associated with each post. In the case of such very popular posts, most if not all potential commenters are assigned, thus raising the chance of the edge being added to $\widehat{G}_w$, and thus of the edge being considered expected under the assumption of independent behavior. We now turn our attention to the edges incident to two groups of commenters: i) $D$, $E$, $F$ and $X$; and ii) $G$, $H$, $I$. In both cases, the commenters co-interact on posts by influencers $2$, $3$ and $4$, and the co-interactions occur very often on different posts by these influencers. However, unlike the case of $A$, $B$ and $C$, discussed above, there are other users who also commented on the same posts. Compared to these other commenters, $D$, $E$, $F$, and $X$ (as well as $G$, $H$, $I$) clearly stand out as frequent co-commenters. That is, taking the overall behavior of the commenters of these posts, we find that the co-interactions among $D$, $E$, $F$, and $X$ (as well as $G$, $H$, $I$) are more frequent than expected if these users were being driven by independent behavior. For example, the weight of edge $e_{DE}$ is ${\gamma}{(D,E)} = 12$ which is larger than the $95^{th}$ percentile of the corresponding edge weight distribution $\widehat{\gamma}_{0.95}{(D,E)} = 10$. We consider this evidence strong enough to reject the assumption of independent behavior. The same holds for the other aforementioned commenters. As consequence, the corresponding edges are maintained in the backbone (see Figure ~\ref{Fig:toy_fig_3}). Finally, we note that all isolated nodes are removed from the final network backbone (see, for example, nodes $A$, $B$, $C$, $K$, $J$, and $L$, no longer present in Figure~\ref{Fig:toy_fig_3}). \subsection{Community detection} \label{sec:communities} Once extracted the backbone $B_w$, our next step consists of identifying communities in $B_w$. Qualitatively, a community is defined as a subset of vertices such that their connections are denser than connections to the rest of the network. To extract communities from $B_w$, we adopt the widely used Louvain algorithm~\cite{Blondel_2008,Newman:2004}. The goal of the Louvain algorithm is to maximize the {\it modularity} of the communities. Given the backbone $B_w = (V^b_w, E^b_w)$, the modularity is defined as: $$ Q={\frac {1}{2M}}\sum \limits _{c,d \in V^b_w}{\bigg [}\gamma({cd})-{\frac {k({c})k({d})}{2M}}{\bigg ]}\delta (\ell({c}),\ell({d}))$$ \noindent where $\gamma(c,d)$ is edge weight between vertices $c$ and $d$ ($e_{cd} \in E^b_w$); $k(c)$ and $k(d)$ are the sums of the weights of the edges attached to $c$ and $d$, respectively, in $B_w$; $M$ is the sum of all edge weights in $B_w$ ; $\ell({c})$ and $\ell({d})$ are the communities assigned to $c$ and $d$; and $\delta({\ell({c}),\ell({d})})=1$ if $\ell({c})=\ell({d})$, $0$ otherwise. Intuitively, the modularity captures how much densely connected the vertices within a community are, compared to how connected they would be in a random network with the same degree sequence. Modularity is defined in the range of -0.5 to +1, and modularity scores of 0.5 or higher are considered strong evidence of well-shaped communities. The Louvain method is a heuristic that operates by finding first small communities optimizing modularity locally on all vertices. Then, each small community is merged into one meta-vertex and the first step is repeated. The final number of communities is the result of an optimization procedure. We refer the reader to~\cite{Blondel_2008} for a detailed description of the Louvain algorithm. \subsection {Community characterization} Once communities are extracted, we characterize them in terms of the textual properties of the content shared by their members as well as their temporal dynamics. \subsubsection{Content properties} We analyze the discussions carried out by each community by focusing on the textual properties of the comments shared by its members. In particular, we employ three complementary textual analysis approaches. First, we perform sentiment analysis using SentiStrength,\footnote{\url{http://sentistrength.wlv.ac.uk/index.html}} a lexical dictionary labeled by humans with multi-language support, including Portuguese and Italian. Given a sentence, SentiStrength classifies its sentiment with a score ranging from -4 (extremely negative) to +4 (extremely positive)~\cite{Thelwall:2010}. SentiStrength has been widely applied to analyze the sentiment of social media content, notably short texts (e.g., tweets), for which identifying sentiment is usually harder~\cite{Ribeiro:2016, Thelwall:2017}. We noticed a high frequency of emojis in the comments. To improve SentiStrenght's ability to recognize them, we incorporate its emoji dictionary with the labeled emoji dataset provided in \cite{Novak:2015}. We also observed the presence of informal writing, slang abbreviations, and wrong work variation could impact our conclusions. Then, we pre-process the comments keeping only comment words with regular words in the country language. To this end, we used Brazilian and Italian dictionaries in Hunspell\footnote{\url{https://github.com/hunspell/hunspell}} format and matched the words found in the comment against them. Second, we use \emph{Term Frequency - Inverse Document Frequency} (TF-IDF)~\cite{Jones:1972} to reveal terms that characterize each community. TF-IDF is traditionally used to describe \emph{documents} in a collection with their most representative terms. Given a particular term and a document, the TF-IDF is computed as the product of the frequency of the term in the given document ($TF$) and the inverse of the frequency at which the term appears in distinct documents ($IDF$). Whereas $TF$ estimates how well the given term describes the document, $IDF$ captures the term's capacity to discriminate the document from others. To apply TF-IDF in our context, we represent each community as a {\it document} consisting of all comments of the community members. We pre-process the comments to remove emojis, stopwords, hashtags, punctuation and mentions to other users, perform stemming, as well as remove the overall top-1\% most popular terms and rare terms (less than 10 occurrences).\footnote{The former are words whose frequency is extremely high and would not help to characterize the communities, while the latter are mostly typing errors or grammar mistakes.} Each community is then represented by a vector $d$ with dimension equal to the number of unique terms in the collection. The element $d[i]$ is the TF-IDF of term $i$. We here use a modified version of $IDF$, called probabilistic inverse document frequency~\cite{Baeza:1999}, which is more appropriate when the number of documents is small (as is our case). It is defined as $IDF(i)=\log \frac{N-n_i}{n_i}$, where $N$ is the total number of communities and $n_i$ is the number of communities using the term $i$. We manually evaluate the terms with large TF-IDF of each community searching for particular subjects of discussion. Last, we delve deeper into community contents using LIWC~\cite{Tausczik:2010}, a lexicon system that categorizes text into psycholinguistic properties. LIWC organizes words of the target language as a hierarchy of categories and subcategories that form the set of LIWC attributes. Examples of attributes include linguistic properties (e.g., articles, nouns and verbs), affect words (e.g., anxiety, anger and sadness) and cognitive attributes (e.g., insight, certainty and discrepancies). The hierarchy is customized for each language, with 64 and 83 attributes for Portuguese and Italian, respectively. We apply LIWC to each comment of each community to quantify the fraction of words that falls into each attribute. We search for statistical differences across communities based on the average frequencies of their respective attributes. We first use Kruskal's non-parametric test to select only attributes for which there is a significant difference across communities~\cite{Kruskal:1952}. Then, we rank attributes with significant differences to select the most discriminative ones using the Gini Coefficient \cite{Yitzhaki:1979}. \subsubsection{Community temporal dynamics} \label{sec:metho_tempo} Finally, we analyze how communities evolve over time, in terms of their memberships as well as main topics of discussion. To analyze the dynamics of community membership we use two complementary metrics: persistence and normalized mutual information. \textit{Persistence} captures the extent to which commenters remain in the backbone across consecutive time windows. The persistence at window $w$+$1$ is given by the fraction of commenters in $B_w$ who are present in $B_{w+1}$. If persistence is equal to 1, all commenters in $w$ are still present in $w$+$1$ (plus eventually others). Yet, the membership of individual communities may have changed as members may switch communities. We also use the \emph{Normalized Mutual Information} (NMI) metric \cite{Shannon:2001} to measure changes in community membership from window $w$ to $w+1$. Given two sets of partitions $X$ and $Y$ defining community assignments for vertices, the mutual information of $X$ and $Y$ represents the informational overlap between $X$ and $Y$. Let $P(x)$ be the probability that a vertex picked at random is assigned to community $x$ in $X$, and $P(x,y)$ the probability that a vertex picked at random is assigned to both $x$ in $X$ and $y$ in $Y$. Let $H(X)$ be the Shannon entropy for $X$ defined as $H(X)=-\sum_x P(x) \log P(x)$. The NMI of $X$ and $Y$ is defined as: \begin{equation} NMI(X,Y)=\frac{\sum_x \sum_y P(x,y)\log \frac{P(x,y)}{P(x)P(y)}}{\sqrt{H(X)H(Y)}} \end{equation} NMI ranges from 0 to 1 where 0 implies that all commenters changed their communities and 1 implies that all commenters remained in the same community. We compute NMI at each time window $w$+$1$ by taking the sets of communities identified in windows $w$ and $w$+$1$, considering only members who persisted from the backbone $B_w$ to the backbone $B_{w+1}$. We also analyze how the topics of discussion of each community evolve over time. To that end, we focus on the most representative terms used by each community, as captured the the TF-IDF metric, to investigate to what extent communities use the same lexicon over consecutive time windows. We start by first generating, for each time window, the vector representation of each identified community (as described in the previous section). Given the large size of the vocabulary, we consider only the top-100 words with the highest TF-IDF scores in each document, zero-ing other entries in the TF-IDF vectors. Next, we need to match the communities found in week $w$+$1$ to the communities found in week $w$ so as to be able to follow users commenting on the same topics across windows. Rather than doing so by using the structural information, we match them based on the topics or, more precisely, on the set of terms they used in each window. Specifically, we use the cosine similarity \cite{Baeza:1999} of the TF-IDF vectors\footnote{The similarity between communities $c_j$ and $c_k$ is defined as $sim(c_j,c_k) = d_j \times d_k$, where $d_j$ and $d_k$ are the TF-IDF vector representations of communities $c_j$ and $c_k$, respectively. Note that $sim(c_j,c_k)$ ranges from $0$ (maximum dissimilarity) to $1$ (maximum similarity).} to compute the pairwise similarity between all pairs of communities in windows $w$ and $w$+$1$, matching each community $c^{w}_j$ in window $w$ with the most similar one in window $w$+$1$, provided that this similarity exceeds a given criterion of significance. The criterion we adopt consists of comparing the similarity between two communities $c^{w}_j$ and $c^{w+1}_k$ and the similarity between $c^{w}_j$ and an ``average" community in window $w$+$1$ Let $\mathbf{d}_j^{w}$ be the TF-IDF vector representation of community $j$ in window $w$, we use {\it all} comments associated with window $w$+$1$ to compute its TF-IDF vector $\mathbf{d}_*^{w+1}$ using the term frequencies in the complete {\it document} (i.e., all comments) but the IDF values previously computed considering individual communities in $w$+$1$. In practice, the cosine similarity between the TF-IDF vectors $\mathbf{d}_j^{w}$ and $\mathbf{d}_*^{w+1}$ gives us a significance threshold for matching the communities, i.e., when $\textrm{sim}(\mathbf{d}^{w}_j, \mathbf{d}^{w+1}_k) > \textrm{sim}(\mathbf{d}^{w}_j, \mathbf{d}^{w+1}_*)$, the similarity between $c^{w}_j$ and $c_k^{w+1}$ is larger than the similarity between $c^w_j$ and an ``average community'' in window $w+1$. In case no community $c^{w+1}_k$ satisfies that condition, we deem that no match was found for $c^{w}_j$. Instead, if we find a match, it means that we have a significant mapping between two communities in different windows. \section{Dataset} \label{sec:dataset} \begin{itemize} \item It is not clear how the authors identified influencers for the Brazilian Instagram sphere: Didn't we say that we used Hypeauditor for influencers? For the politicians we made it manually like for Italy. We listed all congressmen, senators, presidents, political parties and focus on the 80 most popular among them. How does define popular here? \end{itemize} We now describe the dataset used in our study, which consists of over 39 million comments produced by over 1.8 million unique commenters, participating in discussions triggered by 320 top influencers over two countries (Brazil and Italy). \begin{table*}[t] \centering \scriptsize \renewcommand{\arraystretch}{0.9} \caption{Dataset Overview (weekly snapshots including election dates are shown in bold in the respective country).} \input{table_characterization} \label{tab:charact} \end{table*} \subsection{Dataset crawling} \label{subsec:crawling} We collected data from Instagram profiles in Brazil and Italy. Our collection targets electoral periods to capture the political debate taking place on the social network. For Brazil, we focus on Instagram posts submitted during the national general elections of October $7^{th}$ (first round) and October $28^{th}$ (second round), 2018. Our dataset covers 10 weeks (from September $2^{nd}$ until November $10^{th}$, 2018) which includes weeks before and after the election dates. Similarly, for Italy we observed the European elections held on May $26^{th}$, 2019, collecting data published from April $7^{th}$ to June $15^{th}$ (also 10 weeks). We monitor posts shared by selected profiles (see below), gathering all comments associated with those posts. We use a custom web crawler to scrape data from Instagram that relies on the Instaloader library\footnote{\url{https://instaloader.github.io}}. We performed the crawling in September 2019. Given a profile $i$, the crawler looks for posts $i$ created during the predefined period. For each post, the crawler downloads all comments associated with it. As the interest in posts on Instagram tends to decrease sharply with time~\cite{Trevisan:2019}, we expect that our dataset includes almost all comments associated with posts created during the period of analysis. We focus only on \emph{public} Instagram profiles and posts, collecting all visible comments they received. We performed the crawling respecting Instagram rate policies to avoid overloading the service. We did not collect any sensitive information of commenters, such as display name, photos, or any other metadata, even if public. For each country, we monitor two groups of influencers: \begin{itemize} \item \emph{Politics}: the most popular Brazilian and Italian politicians and official political profiles. We manually enumerated political leaders (e.g., congressmen, senators, governors, ministers, president) of all political parties and looked for their profiles on Instagram. We have kept only those having a large number of followers (larger than 10\,000 followers) and excluded those with minimal activity. To perform our analysis we kept the top-80 profiles, ranked by number of followers. In total, the Brazilian politics profiles created 14\,149 posts and received more than 8 million comments by 575\,612 unique commenters during the monitored period. Similarly, the Italian profiles created 8\,922 posts, which received more than 1.9 million comments by 94\,158 distinct commenters. \item \emph{General}: non-political influencers used as a control group. We rely on the HypeAuditor\footnote{\url{https://hypeauditor.com/}} rank to obtain the list of most popular profiles for the Sport, Music, Show, and Cooking categories in each country. Similarly to the \textit{Politics} group, we pick $80$ profiles for each country. The Brazilian {\it general} profiles created 7\,565 posts and received 15 million comments by 295\,753 distinct commenters during the monitored period. Similarly, the Italian general profiles created 6\,421 posts and received 14 million comments carried out by 897\,421 commenters. \end{itemize} \subsection{Data pre-processing} \label{sec:preproc} We consider only commenters who commented on more than one post when building the network for a given period $w$. This step removes 70--85\% of the commenters. We observe that 95\% of removed commenters commented less than three times when considering the complete dataset. Results presented in the following refer to the dataset after removing these occasional commenters. To build the network of co-commenters, we aggregate posts by considering 7-day intervals, always starting on Monday and ending on Sunday. We call each of such snapshot a \emph{week} for simplicity. We separate our data by country (Brazil and Italy) and category of influencers (general and politics). We then use comments observed on posts created in the given internal to build the co-commenter network. Notice that the periods covered by our data in Brazil and Italy are not coincident -- each case covers $10$ weeks in total around the respective election days. In sum, our data pre-processing generates $40$ networks, one for each of the $10$ weekly-snapshots of the 2 countries, for 2 distinct categories of influencers. \subsection{Dataset overview} \label{subsec:overview} Table~\ref{tab:charact} presents an overview of our dataset, showing the numbers of posts and distinct commenters per week. Election weeks are shown in bold. In Brazil, elections were on Sunday of the $5^{th}$ and $8^{th}$ weeks ($1^{st}$ and $2^{nd}$ rounds, respectively), whereas the election in Italy took place on Sunday of the $7^{th}$ week. Focusing first on politics, we observe that the number of posts tends to steadily increase in the weeks preceding elections, reach a (local) maximum on the week(s) of the election, and drop sharply in the following. Interestingly, the largest number of commenters appears on the week immediately after the elections. Manual inspection reveals this is due to celebrations by candidates and supporters. Regarding the general category, we observe that the number of posts and commenters is rather stable, with a slight decrease in the last two weeks for Italy due to the approaching of summer holidays. \begin{figure*}[t] \begin{center} \begin{subfigure}{0.37\textwidth} \includegraphics[width=\columnwidth]{fig/dist_comments_post_BR.eps} \caption{Brazil.} \label{fig:trends_br} \end{subfigure} \qquad \begin{subfigure}{0.37\textwidth} \includegraphics[width=\columnwidth]{fig/dist_comments_post_IT.eps} \caption{Italy.} \label{fig:trends_it} \end{subfigure} \caption{Distributions of number of comments per post (notice the log scale in $y$-axis).} \label{fig:trends} \end{center} \end{figure*} We complement the overview with Figure~\ref{fig:trends}, which shows the distributions of the number of comments per post during each week. We use boxplots to ease visualization. The black stroke represents the median. Boxes span from the 1\textsuperscript{st} to the 3\textsuperscript{rd} quartiles, whiskers mark the 5\textsuperscript{th} and the 95\textsuperscript{th} percentiles. For politics, the median is a few tens of comments per post, while general posts receive 10 times as much (notice the log $y$-axes). Recall that the number of distinct commenters is similar on both cases (see Table~\ref{tab:charact}), thus commenters are more active in the general profiles. Yet, posts of the main political leaders attract thousands of comments, similar to famous singers or athletes (holding for both countries). Considering time evolution, the number of comments on politics increases by an order of magnitude close to elections, with a sharper increase in Brazil. \section{Structural analysis} \label{sec:rq1} We describe the network structure emerging from our data. We first illustrate characteristics of the original and network backbones. Then, we characterize the communities and highlight insights emerging from the co-commenters backbones. \subsection{The network backbones} \label{sec:res_backbone} We first show an example of network backbone, using the \nth{1} week of the Brazilian Politics scenario as case study. \begin{figure*}[!t] \begin{center} \begin{subfigure}[t]{0.3\textwidth} \includegraphics[width=\columnwidth]{fig/Dist_Edge_Weight.eps} \caption{Probability distribution of edge weights $\gamma({cd})$ in the original graph ${G}_P$.} \label{fig:graph_charact_edges_backbone} \end{subfigure} \hspace{0.2cm} \begin{subfigure}[t]{0.3\textwidth} \includegraphics[width=\columnwidth]{fig/2018-09-02-null_model_example.eps} \caption{Actual edge weight $\gamma({cd})$ compared with null model edge weight $\hat{\gamma}_{95}({cd})$.} \label{fig:graph_charact_weight} \end{subfigure} \hspace{0.2cm} \begin{subfigure}[t]{0.3\textwidth} \includegraphics[width=\columnwidth]{fig/Analysis_Percentile_Criteria.eps} \caption{Fraction of edges included in the backbone ${B}_P$, separately for different values of $\gamma$.} \label{fig:graph_charact_actual_vs_null} \end{subfigure} \caption{Network characteristics for posts of influencers for Brazil - Politics (Week 1).} \label{fig:graph_charact} \end{center} \end{figure*} Figure~\ref{fig:graph_charact_edges_backbone} depicts the histogram of the edge weights in the original graph ${G}_P$. Notice that 82\% of edges have weight equal to 1, i.e., the majority of co-commenters co-comment in a single post. Higher weights are less frequent (notice the log scale on the $y$-axis). Yet, some co-commenters interact on more than 20 posts. In the following, we assess whether these weights are expected -- i.e., their weights agree with the assumption of independent user behavior. The scatter plot in Figure~\ref{fig:graph_charact_weight} compares the observed weight in ${G}_P$ and the \nth{95} percentile of weight estimated by our reference model $\hat{G}_P$. Colors represent the number of edges, and lighter colors indicate larger quantities. Most edges have very low value for both observed and estimated weights -- notice the lightest colors for weights 1 and 2 in the bottom left corner. We are interested in the edges in which weights exceed the \nth{95} percentile of the expected weight -- i.e., those above the main diagonal. The fraction of edges over the diagonal is higher for larger weight values. This indicates that co-commenters interacting on many posts deviate from the expectation. Figure~\ref{fig:graph_charact_actual_vs_null} digs into that by showing the percentage of edges that are included in the network backbones separately by observed edge weight. If the null model held true, 5\% of the edges would be included (those exceeding the \nth{95} percentile) -- highlighted by the red dotted line. But in ${G}_P$, edges weights do not always follow the null hypothesis of independent behavior, especially for edges with large weights. It is also important to remark that ${G}_P$ edge weights are integer numbers, and our generative model provides discrete distributions. Therefore, the computation of percentiles is critical since the same value can refer to a \emph{range} of percentiles. This causes a rounding issue that is critical for low values. Filtering weights \emph{greater than} or \emph{greater or equal to} particular values results in significant differences for low weights. Figure~\ref{fig:graph_charact}c illustrates it by reporting the fraction of edges that would be included in the backbone in the two cases. Using \emph{greater than} corresponds to a conservative choice since we include only edges for which the expected weight is strictly higher than the \nth{95} percentile (orange curve). Notice how the number of edges in the backbone is reduced for low weights. Conversely, \emph{greater or equal to} would preserve more edges, including those whose weight possibly corresponds to a lower percentile (blue curve). We here maintain a \emph{conservative} choice and keep edges whose actual weight is strictly greater than the \nth{95} percentile. \begin{table}[t] \footnotesize \centering \caption{Characteristics of the original network ${G}_P$ and network backbone ${B}_P$ for Brazil - Politics (Week 1).} \label{tab:backbone_example} \begin{tabular}{|c|c|c|c|c|} \toprule \textbf{Network} & \textbf{\# Nodes} & \textbf{\# Edges} & \textbf{\# Comm} & \textbf{Modularity} \\ \midrule Original & 37 k & 74.09 M & 6 & 0.22 \\ Backbone & 26 k (70.7\%) & 1.06 M (1.4\%) & 19 & 0.59 \\ \bottomrule \end{tabular} \end{table} Table~\ref{tab:backbone_example} describes the resulting network backbone ${B}_P$ after filtering, comparing it with the original graph ${G}_P$. We focus on week 1 here, but results are consistent for all weeks. Our approach discards 98.6 \% of the edges -- i.e., the vast majority of them is not salient. We remove 29\% of nodes, which remain isolated in ${B}_P$. To highlight the benefits of the approach, we include the number of communities and the modularity in the original and backbone graphs. The Louvain algorithm identifies only 6 communities with very low modularity in the original graph. On the backbone, it identifies more communities, and modularity increases from $0.22$ to $0.59$. Table~\ref{tab:backbone_time} summarizes the main characteristics of the network backbones obtained on each week for Brazil, Politics. Focusing on the first four columns, notice that we still include the majority of nodes, with percentages ranging from 68\% to 95\%. Considering edges, the percentage is always low (0.6--2.6\%). The fourth column reports the fraction on edges in the backbone having weight larger than 1. Remind that, by design, a random behavior would lead to 5\% of edges in the backbone, while here we observe up to 19\%, despite our conservative filtering criteria. Results are rather stable and consistent over time. \subsection{Communities of commenters} \label{sec:res_communities} We now study the communities obtained from the backbone graphs. The last two columns of Table~\ref{tab:backbone_time} show that we obtain from $19$ to $32$ communities, depending on the week. Modularity values are high (always above $0.5$), meaning that the community structure is strong. \begin{table}[t] \footnotesize \centering \caption{Breakdown of backbone and communities over different weeks for Brazil, Politics. In bold, the weeks of the elections.} \label{tab:backbone_time} \begin{tabular}{|c|r|r|r||r|r|} \toprule \textbf{Week} & \textbf{\% Nodes} & \textbf{\% Edges} & \makecell{ \textbf{\% Edges} \\ ${\gamma}{(cd)}>1$ } & \textbf{\# Comm} & \textbf{Mod.} \\ \midrule 1 & 70.69 & 1.40 & 11.43 & 19 & 0.59 \\ 2 & 93.36 & 2.11 & 12.19 & 27 & 0.64 \\ 3 & 73.81 & 1.01 & 4.75 & 20 & 0.52 \\ 4 & 93.63 & 2.23 & 15.10 & 32 & 0.69 \\ \bf 5 & \bf 94.30 &\bf 2.65 & \bf 19.36 & \bf 17 & \bf 0.61 \\ 6 & 91.49 & 2.36 & 19.37 & 31 & 0.66 \\ 7 & 94.05 & 1.87 & 15.45 & 31 & 0.66 \\ \bf 8 & \bf 95.40 & \bf 2.13 & \bf15.29 & \bf 27 & \bf 0.64 \\ 9 & 68.01 & 0.62 & 4.06 & 24 & 0.59 \\ 10 & 71.33 & 1.11 & 7.21 & 29 & 0.61 \\ \bottomrule \end{tabular} \end{table} We summarize results for the other scenarios in Table~\ref{tab:sum_backbone_networks}, reporting only average values across the 10 weeks. First, focusing on Politics and comparing Brazil and Italy (first two rows), we observe similar percentages of nodes in the network backbones. For Italy a larger fraction of edges are retained, potentially because of the smaller volume of profiles and comments (see Section~\ref{sec:dataset}). For Brazil, we obtain a larger number of communities with higher values of modularity than in Italy. \begin{table}[b] \centering \footnotesize \caption{Networks backbone and identified communities for Brazil (BR) and Italy (IT). We show average values over the 10 weeks.} \label{tab:sum_backbone_networks} \begin{tabular}{|c|c|c|c||c|c|} \toprule \textbf{Scenario} & \textbf{\% Nodes} & \textbf{\% Edges} & \makecell{ \textbf{\% Edges} \\ ${\gamma}{(cd)}>1$ } & \textbf{\# Comm} & \textbf{Mod.} \\ \midrule BR Politics & 84.61 & 1.81 & 12.42 & 26 & 0.62 \\ IT Politics & 87.33 & 3.39 & 21.79 & 11 & 0.44 \\ \midrule BR General & 65.35 & 0.82 & 8.83 & 81 & 0.79 \\ IT General & 60.03 & 2.23 & 12.57 & 48 & 0.72 \\ \bottomrule \end{tabular} \end{table} Moving to the General scenarios (\nth{3} and \nth{4} rows), we notice that fewer nodes and edges are in the backbones compared to Politics. Interestingly, we identify more and stronger communities. We root this phenomenon in the heterogeneity of the General scenarios that include influencers with different focuses, potentially attracting commenters with different interests. Manual inspection confirms the intuition -- i.e., we find some communities interested in sports, others on music, etc. For politics, instead, we find a more tangled scenario. Even if communities are rather strong, some of them include profiles commenting on politicians of different parties and embracing different topics. Next, we evaluate communities in the Politics scenario. \subsection{Analysis of political communities} \label{sec:res_insights} We now focus on Politics and show how the activity of commenters spreads across political profiles of different parties. Here we focus on the election week for both countries to better capture the peak of the political debate on Instagram. We first focus on the main political leaders of the two countries and study how the communities of co-commenters distribute their interests among their posts. We consider six politicians in each country. Figure~\ref{fig:hetmaps} shows how the commenters of each community are spread among posts of each politician using a heatmap. Columns represent politicians and rows represent communities. The color of each cell reflects the fraction of the comments of the community members that are published on the posts of the politician. \begin{figure}[!t] \begin{center} \begin{subfigure}[t]{\columnwidth} \centering \includegraphics[width=0.95\columnwidth]{fig/BR-politics-top-Log.eps} \caption{Brazil (1st round)} \label{fig:hetmaps_br} \end{subfigure} \begin{subfigure}[t]{\columnwidth} \centering \vspace{5mm} \includegraphics[width=0.99\columnwidth]{fig/IT-politics-top-Log.eps} \caption{Italy} \label{fig:hetmaps_it} \end{subfigure} \caption{Distribution of comments among political leaders for each community during the main election weeks.} \label{fig:hetmaps} \end{center} \end{figure} \begin{figure*}[!h] \begin{center} \begin{subfigure}{0.85\textwidth} \includegraphics[width=\columnwidth]{fig/dendogram_BR_politics.eps} \caption{Brazil.} \label{fig:dendo_br} \end{subfigure} \begin{subfigure}{0.85\textwidth} \includegraphics[width=\columnwidth]{fig/dendogram_IT_politics.eps} \caption{Italy.} \label{fig:dendo_it} \end{subfigure} \caption{Dendogram of political influencers clustered according to commenter communities. Influencers are colored according to their political coalition. } \label{fig:dendo} \end{center} \end{figure*} To gauge similarity of profiles, the top of the heatmaps report a dendrogram that clusters politicians based on the communities of their commenters. We define as similarity metric of politicians the Pearson correlation among the activity of communities on their posts. In other words, we compare them by computing the correlation between the corresponding columns of the heatmap. Hence, two politicians that receive comments from the same communities have high similarity. Looking at the Brazilian case (Figure~\ref{fig:hetmaps_br}), we notice that most communities are interested in a single candidate - Jair Bolsonaro (jairmessiasbolsonaro), with the large majority of comments focused on his posts. This behavior is expected given his large number of followers and popularity. Indeed, communities $1-9$ comment almost uniquely on Bolsonaro. Focusing on the dendrogram on the top of the figure, Bolsonaro has the highest dissimilarity from the others, i.e., he is the first candidate to be separated from others. Other clusters reflect accurately the candidates' political orientation. Left-leaning candidates (Ciro Gomes, Fernando Hadaad and Luiz Inacio Lula\footnote{Haddad replaced Lula, who was barred by the Brazilian Election Justice.}) are close, as well as the ones leaning towards the right-wing parties (Alvaro Dias, Cabo Daciolo and Jair Bolsonaro). Similar considerations hold for the Italian case (Figure~\ref{fig:hetmaps_it}). Communities $1-10$ focus on Matteo Salvini (matteosalviniofficial). He is the only one for which we identify multiple and well-separated communities. The other right-wing leaders have communities active almost exclusively on their posts, e.g., communities $13$ and $14$ for Silvio Berlusconi and Giorgia Meloni. Other leaders (e.g., Matteo Renzi and Nicola Zingaretti for the Democratic Party and Luigi Di Maio for the Five Star Movement) share a large fraction of commenters in community $11$. This suggests these commenters are almost equally interested in the three leaders. Indeed, looking at the dendrogram, these last three profiles are close to each other. Matteo Salvini (leader of the most popular party) has the maximum distance from others. Similar to the Bolsonaro's case, Salvini is a single leader who polarizes communities, thus well-separated from others. We now broaden the analysis to all politicians. We label each politician according to his/her political \textit{coalition} using available public information.\footnote{Differently from e.g., the US or UK, in both Brazil and Italy the political system is fragmented into several parties that form coalitions during and after elections~\cite{Ferreira:2019}.} For Brazil, we rely on the Brazilian Superior Electoral Court,\footnote{\url{http://divulgacandcontas.tse.jus.br/divulga/\#/estados/2018/2022802018/BR/candidatos}} while for Italy we use the official website of each party. Rather than reporting the activity of each community on all politicians, we show only the dendrograms that cluster them, following the same methodology used in Figure~\ref{fig:hetmaps}. Figure~\ref{fig:dendo} shows the results, where the party leaders/candidates shown in Figure~\ref{fig:hetmaps} are marked in bold. Politicians of the same parties appear close, meaning that their posts are commented by the same communities. For Brazil, the higher splits of the dendrogram roughly create two clusters, for left and right-wing parties. In Italy, we can identify three top clusters, reflecting the tri-polar system. Less expected are the cases in which politicians from distant political leanings attract the interest of the same communities and are close in the dendrogram. For example, in Italy, we find the profile of Monica Cirinn\`{a} (left-wing) very close to Angelo Ciocca (right-wing). Manual inspection reveals a considerable number of disapproving comments to posts of the first politician that are published by commenters supporting the second. The same happens for Vladimir Luxuria, whose some supporters disapprove Marco Bussetti's posts (and vice-versa). The structure of the backbone graph reflects the presence of profiles that bridge communities. In sum, our methodology uncovers the structure of communities, which reflect people's engagement to politicians over the spectrum of political orientation. Most communities are well-shaped around single profiles, but sub-communities emerge too, possibly around particular topics, as we will check next. In some cases, commenters cross the expected political divide, commenting on profiles from different political orientations. \section{Textual properties of discussions}\label{sec:rq2} We now focus on how the communities differ in terms of textual, sentiment and psychological properties of comments. \subsection{Political communities' interests} We now look into how communities in politics are attracted by different posts. Since communities differ in the number of members and in the number of comments they post, we consider a relative \emph{activity index} of the community in a post, given by the fraction of the community's comments going to the post. We use data from the week of the main elections in Brazil (week 5). Figure~\ref{fig:Activity}a quantifies, for each post, the two most active communities. The $x$-axis reports the index for the community with the highest activity on the post, while the $y$-axis reports the index for the second most active community in the post. We observe that, in all cases, the most active community leaves less than 7\% of its comments in a unique post (see the $x$-axis). Given there are $2\,144$ posts in this snapshot, even a relative activity of 1\% could be considered highly concentrated attention, suggesting that communities are built around specific posts. In $\approx 40$\% of the posts, the relative activity of the second most active community ($y$-axis) is very low compared to the most active one. We quantify this in Figure~\ref{fig:Activity}b, which reports the ratio between the relative activity of the first and the second most active communities. We observe that, in the 55\% of cases, the most active community has at least 10 times higher index than the second one -- notice the x-axis log-scale. Hence, we have strong shreds of evidence that communities are attracted by specific posts. \begin{figure*}[!t] \begin{center} \begin{subfigure}{0.35\textwidth} \centering \includegraphics[width=0.95\columnwidth]{fig/scatter-activity.eps} \caption{Index of activity of the 1$^\textrm{st}$ and $2^\textrm{nd}$ most active communities. Each point represents a post.} \label{fig:Activity1} \end{subfigure} \hspace{0.3cm} \begin{subfigure}{0.35\textwidth} \centering \vspace{0.15cm} \includegraphics[width=\columnwidth]{fig/ratio-activity.eps} \caption{Ratio between the index of the 1$^\textrm{st}$ and 2$^\textrm{nd}$ most active community on posts.} \label{fig:Activity2} \end{subfigure} \caption{Activity of communities on posts.} \label{fig:Activity} \end{center} \end{figure*} Figure~\ref{fig:examples} shows posts that attracted high interest from communities $3$ and $7$, which we use as running examples along with communities $10$ and $11$. Community $3$ comments mostly on posts related to public events Bolsonaro promoted via Instagram (as in Figures~\ref{fig:examples}a and Figures~\ref{fig:examples}b), while community $7$ comments on posts where the candidate tries to show his proximity with black people to debunk his associations with racism (Figures~\ref{fig:examples}c and Figures~\ref{fig:examples}d). \begin{figure*}[!t] \begin{center} \begin{subfigure}{0.20\textwidth} \centering \includegraphics[width=\columnwidth]{fig/Manifestation-SP.eps} \caption{\href{https://www.instagram.com/p/BoXpvV6Hrkk}{Community 3 - Post about a rally in São Paulo.\\ \url{www.instagram.com/p/BoXpvV6Hrkk}}} \label{fig:manifest_1} \end{subfigure} \hspace{0.3cm} \begin{subfigure}{0.20\textwidth} \centering \includegraphics[width=\columnwidth]{fig/Manifestation-ES.eps} \caption{\href{https://www.instagram.com/p/BoXMwvwn6xj}{Community 3 - Post about a rally in Vitória.\\ \url{www.instagram.com/p/BoXMwvwn6xj}}} \label{fig:manifest_2} \end{subfigure} \hspace{0.3cm} \begin{subfigure}{0.20\textwidth} \centering \includegraphics[width=\columnwidth]{fig/Post-Religion-Racism-2.eps} \caption{\href{https://www.instagram.com/p/BomRItfH9p8}{Community 7 - Post discussing racism.\\ \url{www.instagram.com/p/BomRItfH9p8}}} \label{fig:racism_1} \end{subfigure} \hspace{0.3cm} \begin{subfigure}{0.20\textwidth} \centering \includegraphics[width=\columnwidth]{fig/Post-Religion-Racism-3.eps} \caption{\href{https://www.instagram.com/p/Boe7fQcHfJB}{Community 7 - Another post discussing racism. \\ \url{www.instagram.com/p/Boe7fQcHfJB}}} \label{fig:racism_2} \end{subfigure} \caption{Examples of posts by Jair Bolsonaro (jairmessiasbolsonaro) in which two communities show high interest.} \label{fig:examples} \end{center} \end{figure*} \subsection{Properties of communities' comments} We now take all communities found in each week and extract properties of the comments of their members, namely: i) Average comment length (in characters); ii) Fraction of comments that include at least one mention; iii) Average number of hashtags per comment; iv) Fraction of comments with at least one uppercase word; v) Average number of comments per commenter; vi) Average number of emojis per comment; and vii) Fraction of replies among comments. Together these metrics capture important aspects of the communities' behavior. For example, the comment length, the number of emojis per comment and the use of uppercase words (commonly associated with a high tone) can describe the way the communities interact on Instagram. Mentions, the use of hashtags and replies are strongly associated with engagement, information spreading and direct interaction of commenters, respectively. We study the communities by applying Principal Component Analysis (PCA) to vectors that represent communities using the seven previously described metrics. PCA is a well-known method for dimensionality reduction in multivariate analysis. It projects the data along its principal components (PCs), i.e., axes that capture most of the variance in the data~\cite{Tipping:1999}. Figure~\ref{Fig:PCA} shows the representation obtained for each community using the two principal components, where the color represents the pair country-scenario. The 2-D representations of communities for both politics scenarios are more tightly clustered and overlapping than for the general scenario. This behavior suggests that, when considering the given features, communities on politics are more homogeneous than the communities on the general scenario. To understand which metrics best distinguish the communities in Figure~\ref{Fig:PCA}, we study the \emph{loading scores} for the two principal components. The loading score quantifies the contribution of each metric to a principal component. The largest the score (in absolute value) the more the metric contributes to the component (positively or negatively). \begin{figure*}[t] \centering \subfloat[PCA]{\includegraphics[width=0.8\columnwidth]{fig/PCA_All.eps}\label{Fig:PCA}} \subfloat[Description of the 2 first principal components]{\includegraphics[width=0.85\columnwidth]{fig/Explainability.eps}\label{Fig:Explain}} \caption{(a) 2-D representation of communities based on seven metrics using PCA. (b) Description of the two principal components in terms of the original metrics; the bar represents the loading scores for the components (positive or negative).} \end{figure*} In Figure~\ref{Fig:Explain} bars represent the magnitude of loading scores for each metric for the PC 1 (left) and PC 2 (right). The PC 1 (left) can be associated with lengthy comments, high usage of uppercase, emojis, replies and hashtags, and a low number of comments per commenter. From Figure~\ref{Fig:PCA}, we see that high values for PC 1 is more common for communities in the politics scenarios. Conversely, most communities of the general scenario have negative $x$ coordinates, thus pointing to the opposite behavior. A less clear picture emerges for PC 2. Large values for PC 2 are associated with high number of replies, mentions and comments per commenter (see Figure~\ref{Fig:Explain}, right plot). For the politics scenario in Figure \ref{Fig:PCA}, communities are concentrated in the $y \in [-2,3]$ range, with those for Italy being slightly more positive than those from Brazil. In the general scenario, however, points are spread out along the $y$ axis. We conclude that commenters of politics influencers exhibit a more homogeneous behavior than commenters of other influencers. Particularly, commenters on politics leave larger comments and use higher tone. They also often rely on typical online social mechanisms, such as replies, mentions and emojis. \subsection{Sentiment analysis} \label{sec:sentiment} Although communities grow around particular posts and influencers, their members do comment on posts from other influencers. Here, we analyze whether there is a difference between the sentiment expressed in comments across influencers. As explained in Section~\ref{sec:rq2}, we use SentiStrength to extract the sentiment of each comment. SentiStrength provides an integer score ranging from -4 (strongly negative) to +4 (strongly positive). Score 0 implies a neutral sentiment. We here consider as \emph{negative}, \emph{neutral} and \emph{positive} comments with scores smaller than 0, equal to 0, and greater than 0, respectively. We notice that many comments contain misspelled words and informal writing that we want to remove to prevent bias in our analysis. To this end, we use Brazilian and Italian dictionaries in Hunspell format and match the words found in the comment against them. After filtering the non-existent words, we also filter out 11\% (4\%) of the total comments for Brazil (Italy) that we discard for this analysis. Table~\ref{tab:fraction-comments} shows fraction of positive, neutral and negative comments. We notice that positive comments are generally more common (between 49\% and 65\%), followed by neutral comments (between 25\% and 33\%). Negative comments are the minority in our data, but they are more prevalent in the politics scenarios for both countries. \begin{table}[!b] \footnotesize \centering \caption{Fraction of sentiment captured in comments using SentiStrenght.} \begin{tabular}{cccc} \toprule \multicolumn{1}{|c|}{\multirow{2}{*}{\textbf{Scenario}}} & \multicolumn{3}{c|}{\textbf{Sentiment}} \\ \cmidrule{2-4} \multicolumn{1}{|c|}{} & \multicolumn{1}{c|}{\textbf{Negative}} & \multicolumn{1}{c|}{\textbf{Neutral}} & \multicolumn{1}{c|}{\textbf{Positive}} \\ \midrule \multicolumn{1}{|c|}{BR Politics} & \multicolumn{1}{c|}{0.12} & \multicolumn{1}{c|}{0.26} & \multicolumn{1}{c|}{0.62} \\ \multicolumn{1}{|c|}{IT Politics} & \multicolumn{1}{c|}{0.18} & \multicolumn{1}{c|}{0.33} & \multicolumn{1}{c|}{0.49} \\ \hline \multicolumn{1}{|c|}{BR General} & \multicolumn{1}{c|}{0.07} & \multicolumn{1}{c|}{0.32} & \multicolumn{1}{c|}{0.61} \\ \multicolumn{1}{|c|}{IT General} & \multicolumn{1}{c|}{0.10} & \multicolumn{1}{c|}{0.25} & \multicolumn{1}{c|}{0.65} \\ \bottomrule \end{tabular} \label{tab:fraction-comments} \end{table} \begin{figure}[!t] \begin{subfigure}{0.9\columnwidth} \centering \includegraphics[width=0.9\columnwidth]{fig/Fig-11.eps} \caption{Brazil (week 5)} \label{Fig:sentiment_BR} \end{subfigure} \begin{subfigure}{0.9\columnwidth} \centering \includegraphics[width=0.9\columnwidth]{fig/Fig-12.eps} \caption{Italy (week 7)} \label{Fig:sentiment_IT} \end{subfigure} \caption{Contrastive sentiment score (difference between fraction of positive and negative comments) of communities towards political leaders during the main election week.} \label{Fig:sentiment} \end{figure} We now analyze how the communities' sentiment varies towards profiles of different politicians. More specifically, we compute the breakdown of positive, neutral and negative comments of each community on posts of each influencer. To summarize differences, we report in Figure~\ref{Fig:sentiment_BR} and Figure~\ref{Fig:sentiment_IT} a \emph{contrastive score} calculated as the difference between the fractions of positive and negative comments for the particular community and influencer. We ignore cases where a community has made less than 100 comments on a given influencer's posts to ensure that samples are representative. These cases are marked as white cells in the heatmaps.\whiteColor{\ref{tab:political-words}} \begin{table*}[!h] \centering \scriptsize \caption{Example of words with the highest TF-IDF for some communities in the politics scenario in the main election week.} \label{tab:political-words} \begin{tabular}{|c|c|c|c|} \toprule \textbf{Scenario} & \textbf{Comm.} & \textbf{Key Words} & \textbf{Context} \\ \midrule BR & 3 & \begin{tabular}[c]{@{}c@{}}`Anapolis', `Orla', `Righteousness', `Constant', \\ `Natal', `Paulista', `Spontaneous', \\ `JB17', `Gesture', `Avenue' \end{tabular} & \begin{tabular}[c]{@{}c@{}}It refers to several places \\where pro-Bolsonaro rallies took \\ place during the election campaign.\end{tabular} \\ \hline BR & 7 & \begin{tabular}[c]{@{}c@{}}`Nazi', `Jew', `Hitler', \\ `Black People', `Anonymity', `Bozonazi', \\`Distrust', `Jerusalem', `Homosexual' \end{tabular} & \begin{tabular}[c]{@{}c@{}}It refers to Bolsonaro's posts about \\ specific social groups in an attempt to show \\ he has no prejudice against such groups.\end{tabular} \\ \hline BR & 10 & \begin{tabular}[c]{@{}c@{}}`Manuela', `Haddad, `Scammer', \\ `Lulalivre', `Birthday', `Guilherme', \\ `Dilma', `Gratefulness', `Lula'\end{tabular} & \begin{tabular}[c]{@{}c@{}}It refers to left-wing names, \\ such as Fernando Haddad, his \\ deputy Manuela, Dilma Rousseff and Lula (ex-presidents).\end{tabular} \\ \hline BR & 11 & \begin{tabular}[c]{@{}c@{}}`Ciro', `Experience', `Political Activism', \\ `Polarization', `Brazil', `Second Round', \\`Turn', `Prepared', `Project' \end{tabular} & \begin{tabular}[c]{@{}c@{}}It refers to the center-left candidate \\ Ciro Gomes who arrived close to \\reach the second round of the elections.\end{tabular} \\ \midrule IT & 3 & \begin{tabular}[c]{@{}c@{}}`Gooders', `Big ciao'', `Captain', \\`Crime', `Good night', `Polls', \\ `Never Give Up', `Electorate', `Lampedusa', `Riace' \end{tabular} & \begin{tabular}[c]{@{}c@{}}General Salvini's jargon, \\as well as places related to \\the arrival of immigrants in Europe (e.g., Lampedusa). \end{tabular} \\ \hline IT & 4 & \begin{tabular}[c]{@{}c@{}} `Monetary', `Elite', `Unity', `Budget',\\ `Fiscal', `Colonial', `Equalize', \\`Yellow Vests', `Masonic', `Store', `IVA', \end{tabular} & \begin{tabular}[c]{@{}c@{}}Generic taxes and monetary issues.\end{tabular} \\ \hline IT & 10 & \begin{tabular}[c]{@{}c@{}}`Consumption', `Fuel', `Insurance', `Traffic',\\ `Helpless', `Vehicular', `Taxes', `Redundancy', \\`Veterinary', `Animal rights', `Cats', `Abuse', `Cruelty', `Breeding'\end{tabular} & \begin{tabular}[c]{@{}c@{}} A combination of terms related\\ to taxes, vehicles and animals' rights.\end{tabular} \\ \hline IT & 11 & \begin{tabular}[c]{@{}c@{}}`5S', `Toninelli (ex-Transport Minister)', `Corruption',\\ `Zingaretti (PD's leader)', `Calenda (ex-PD politician)', \\`Honesty', `Election list', `Coalition', `Budget', `Growth' \end{tabular} & \begin{tabular}[c]{@{}c@{}}Debate on Five Stars Movement (a government\\ party at the time) and Democratic \\Party (the main opposition party at the time)\end{tabular} \\ \bottomrule \end{tabular} \end{table*} In Figure~\ref{Fig:sentiment_BR} we consider the six political leaders already used for Figure~\ref{fig:hetmaps}. We focus on the week of the first election round in Brazil (week 5). Predominantly, communities make positive comments on the profiles in which they are more active, i.e., their ``referring candidate''. More negative comments are seen on ``opposing candidates''. For instance, communities 1 to 9, highly active on Jair Bolsonaro's posts, display a more positive contrastive score on them. Analogously, communities 10 to 12, mostly formed by commenters very active on the profiles of left-wing influencers such as Ciro Gomes (cirogomes) and Fernando Haddad (fernandohaddadoficial), tend to write negative comments on their opponents, such as Jair Bolsonaro. This behavior appears on all weeks and suggests that communities in politics tend to promote their central influencers while trying to demote others. Considering the Italian case, we observe similar results in Figure~\ref{Fig:sentiment_IT}. Communities exhibit positive contrastive scores towards candidates in general, but with higher scores for the referring candidate. \subsection{Main topics of discussion} \label{sec:res_textual} We now turn our attention to the analysis of the main topics around discussions. As before, we focus on politics, during the election weeks. To summarize the overall behavior of each community, we group together all their respective comments in one document. As explained in Section \ref{sec:rq2}, the documents build a corpus on which we then use the TF-IDF metric to identify the most representative words of each document (i.e., community), henceforth called \emph{top words}. We show in Table~\ref{tab:political-words} the top-10 words (translated to English) for communities yielding the most interesting observations. We manually inspect the comments and related posts, providing a reference context as the last column of the table. The manual inspection suggests that these words give a good overview of what the communities discuss. Matching with Figure~\ref{fig:examples}, communities 3 and 7 for Brazil are associated with rallies in different locations in the country, and with debunking Bolsonaro's prejudice against ethnic and racial groups. The terms highlighted by TF-IDF reflect quite accurately the respective topics, reporting locations of rallies and words linked to racism and Nazism. Similarly, the top words for communities 10 and 11 are focused on the names of the candidates whose profiles they mostly comment on. For Italy, community 3 reflects the typical jargon used by Salvini's supporters. Community 4 debates on taxes and monetary issues. Community 10's comments refer to provoking posts that mix taxes, car costs and animals' rights. Last, community 11 seems to debate over the left-wing party (the main opposition party at the time) and the 5-Stars movement (the governing party at the time). In a nutshell, the TF-IDF is instrumental to analyze what the communities are discussing. The analysis demonstrates that communities are well-formed around the topics they discuss, even if they have been built solely on the network of commenters' interactions. \subsection{Psycholinguist properties} In this section, we study the psycholinguistic properties of comments, aiming at finding similarities and differences in the way commenters of communities communicate. We rely on the Linguistic Inquiry and Word Count (LIWC) tool to calculate the degree at which various categories of words (called attributes in the LIWC terminology) are used in a text (see Section~\ref{sec:rq2}). For example, attribute \emph{Home} includes the words ``Kitchen'' and ``Landlord, and attribute \emph{Family} ``Daughter'', ``Dad'' and ``Aunt''. For each community, we run LIWC on the comments and compute the average frequency of the attributes. We then look for statistical differences between communities based on the average values of the attributes. For Brazil, we identify 62 attributes (from the 64 available in LIWC's Portuguese dictionary) for which differences across communities are statistically significant\footnote{We used the Kruskal non-parametric test to select attributes with a significant difference between the distribution of community comments considering $ p-value = 0.01 $.}. For Italy, we identify 77 (from 83 available in the LIWC Italian dictionary). From those, we select the five attributes that exhibit the largest variability across communities in terms of Gini index and use them characterize the psycholinguistic of communities. Figure~\ref{Fig:Liwc_politics} shows heatmaps for the top-five attributes found for the Brazilian (top) and Italian (bottom) politics scenarios. The heatmap cells in a column indicate the relative deviation of the given attribute for the given community from the other communities. In other words, each column (attribute) is z-score normalized -- i.e., $z = (x - mean)/std$. Thus, each value gets subtracted the average of the column, then divided by the standard deviation of the column. The results show how communities are different in terms of the LIWC selected attributes. For instance, for Brazil, Politics, communities 6, 10, 3 and 7 frequently use words regarding \emph{death}, but seldom words related to health. Communities 2, 5 and 4 show positive scores on almost all attributes. Community 13 focuses mostly on \emph{health}. In Italy, community 6 is very focused on \emph{religion} (commenters debated Salvini's post that depicts a Rosary). Communities 3, 4, 6, 7, 8 and 9 adopt attributes \emph{we} representing words and verbs in the first person plural (e.g., we, our and us). This kind of word is used used in phrases aiming at aggregating the community towards the same goal. Community 12 and 13 exhibit some hate speech \emph{}. In summary, LIWC is a useful tool to analyze the content of Instagram comments, complementing the TF-IDF analysis with information on the topics being debated. We find that communities debate on different topics and using different lexicon. \whiteColor{\ref{fig:Activity}} \begin{figure}[!t] \centering \subfloat[Brazil, Politics.]{\includegraphics[width=.88\columnwidth]{fig/BR-Liwc.eps}\label{Fig:Liwc_BR_politics}} \qquad \subfloat[Italy, Politics.]{\includegraphics[width=.88\columnwidth]{fig/IT-Liwc.eps}\label{Fig:Liwc_IT_politics}} \\ \caption{ Top 5 LIWC attributes and their relative difference between communities.}\label{Fig:Liwc_politics} \end{figure} \section{Temporal analysis} \label{sec:rq3} In this section, we focus on the dynamics of communities during the 10 weeks of observation. First, we analyze the community membership, studying to what extent commenters persist in the network backbone and are found in the same communities across weeks. Next, we characterize the dynamics of the content, i.e., the topics that these communities are engaged in. \subsection{Community membership persistence} We start our analysis by studying the persistence of commenters inside the network backbone and to what extent these commenters end up in the same community week by week. We also want to check if the most engaged commenters exhibit a different behavior -- i.e., tend to persist more than those who are less engaged. To this end, we perform a separate analysis selecting the top-1\% and top-5\% commenters in terms of number of comments in week $w$ and $w+1$. Then, we compute the persistence and NMI score (see Section~\ref{sec:metho_tempo}), restricting to these commenters and comparing the results with those obtained with the full set of commenters. \begin{figure}[!t] \centering \subfloat[Brazil - Politics.]{\includegraphics[width=0.49\columnwidth]{fig/BR-politics-Temporal_Analysis.eps}\label{Fig:Temp_BR_politics}\hspace{0.1cm}} \subfloat[Italy - Politics.]{\includegraphics[width= 0.49\columnwidth]{fig/IT-politics-Temporal_Analysis.eps}\label{Fig:Temp_IT_politics}} \\ \vspace{0.5cm} \subfloat[Brazil - General.]{\includegraphics[width= 0.49\columnwidth]{fig/BR-general-Temporal_Analysis.eps}\label{Fig:Temp_BR_general}\hspace{0.1cm}} \subfloat[Italy - General.]{\includegraphics[width= 0.49\columnwidth]{fig/IT-general-Temporal_Analysis.eps}\label{Fig:Temp_IT_general}} \caption{Temporal evolution of commenters in communities. Blue: top 1\%, Orange: top 5\%, Green: all commenters.}\label{Fig:General_NMI_Pers} \end{figure} We report results in Figure~\ref{Fig:General_NMI_Pers} separately by country and for Politics and General. Considering Politics (Figures~\ref{Fig:General_NMI_Pers}a and \ref{Fig:General_NMI_Pers}b), we note that the persistence in Brazil is moderately high, regardless the subset of commenters. Around 50-60\% of commenters remain in the backbone week after week until the first round of elections (week 5). Since then, we observe a decrease (also due to the drop of commenters in general) until the second round election (week 8), followed by a significant drop after. This trend shows that commenters were very engaged in the election period, mostly in the first round when the debate included more politicians, senators, congressmen and governors. In the second round, fewer candidates faced -- yet people were consistently engaged before finally plumbing two weeks after elections. These results corroborate the first intuition we observed in Table~\ref{tab:charact} -- where the number of commenters varied over time. Since persistence is similar for all subsets of commenters, we can conclude that all commenters in the backbone are persistently engaged. That is, the backbone members are quite stable. Considering the membership of commenters within the same community, the NMI shows that the top-1\% and top-5\% most active commenters (blue and orange curves) are considerably more stable in their communities during the whole time. When considering all commenters in the backbone, the NMI is significantly lower. This is due to the birth and death of new communities, centered around specific topics, where the debate heats up and cools down. These dynamics attract new commenters that afterward disappear or change community. For Italy, Politics (Figure~\ref{Fig:General_NMI_Pers}b) different considerations hold. The constant persistence suggests a stable engagement of commenters in the backbone. We just observe a sudden drop the week after the election, where the interest in the online debate vanished. On the other hand, the NMI is rather low, revealing more variability in community membership, even if we restrict our attention to the most active commenters. Despite commenters in the backbone tending to be the same (persistence is typically above 0.5), they mix among different communities. Considering the low modularity of communities for this scenario (see Table \ref{tab:sum_backbone_networks}), we conclude that the community structure is weaker in this case, indicating overlapping among communities that favor membership changes. This result is also visible from the dendrogram in Figure~\ref{fig:dendo}, where we observe that influencers receive comments from similar communities making the latter also more clustered. Moving to General (Figures~\ref{Fig:General_NMI_Pers}c and \ref{Fig:General_NMI_Pers}d), we observe slightly lower persistence than in Politics, but more stable over time. NMI instead often results higher for General than Politics, reflecting better separation between communities, which persist over time. More in detail, for Brazil (Figure \ref{Fig:General_NMI_Pers}c) we observe that persistence and NMI are high and stable -- especially for the most active users. This suggests that the most engaged commenters have diverse, specific and stable interests. Indeed, here there is no exogenous event that pushes a temporal dynamic, like elections do for politics. Again, this result reflects the high heterogeneity of posts and influencers in the General category. Moving to Italy, Figure \ref{Fig:General_NMI_Pers}d shows that persistence is small and varies over time. Here the lower popularity of Instagram in Italy than in Brazil may play a role, coupled with the smaller number of comments (see Table~\ref{tab:charact}). However, NMI is high and stable. We conclude that although many users do not persist in the backbone, the remaining are very loyal to their interests. \subsection{Topic persistence} \begin{figure}[t] \centering \subfloat[Brazil - Politics.]{\includegraphics[width=0.8\columnwidth]{fig/tf_idf_time_series_BR.eps}\label{Fig:TF-IDF_Temp_BR}\hspace{0.1cm}}\\ \subfloat[Italy - Politics.]{\includegraphics[width= 0.8\columnwidth]{fig/tf_idf_time_series_IT.eps}\label{Fig:TF-IDF_Temp_IT}} \caption{Example of how communities' comments change over time. We set weeks 5 and 7 as reference, being the election weeks in Brazil and Italy, respectively. }\label{Fig:TF-IDF_temporal} \end{figure} We now discuss how the topics discussed by communities evolve over time. To that end, we take as reference weeks 5 for Brazil and 7 for Italy in the political scenario, being the weeks of elections in each country. We compute the cosine similarity between the communities in the reference weeks (illustrated in Table \ref{tab:political-words}) and the communities extracted in all other weeks, for each country. That is, for a given week, we identify whether there exists a document/community that is significantly similar to those found in the reference week, following the steps presented in Section \ref{sec:metho_tempo}. Figures~\ref{Fig:TF-IDF_temporal} show examples for both scenarios. In weeks 5 and 7 for Brazil and Italy, respectively, the cosine similarity is 1 since the documents are compared with themselves. Focusing on Brazil first, we observe a very distinct behaviors among the picked-up examples. Remember that communities 3 and 7 are focused, mainly, on Bolsonaro's profile and comment on posts related to \textit{rallies} and \textit{racism}, respectively. In both cases, we can observe that discriminating terms for these communities are momentary and sporadic, with some communities using terms about \textit{rallies} that appear in some weeks, still with a very similarity low. Conversely, the set of significant terms representing community 10 and related to candidate Fernando Haddad. At last, consider community 11, focused on Ciro Gomes. Again, we can observe that terms used by his community in the election week were used in some communities earlier, exhibiting high similarity. However, immediately after the first round (week 5) when Ciro Gomes lost, the similarity drops significantly. Indeed, Ciro Gomes was excluded from the run-off and the online debate (and community) suddenly vanished. In Italy (Figure \ref{Fig:TF-IDF_temporal}b) we observe a similar behavior. Community 3, mostly consisting of Salvini’s supporters, use a very specific jargon and are always present. Community 4 debates around taxes and monetary issues, which already debated during week 3. The same considerations hold for community 10, in which the fight between democrats and five stars supporters heats more frequently. In summary, people commenting in politics are more volatile than those commenting on general topics, with debates suddenly growing and cooling down. Some sets of terms remain ``alive'' throughout the observation period, while other include communities born around short events such as rallies, which take place on a specific date. \section{Discussion on main findings and conclusions} \label{sec:discussion} Our work contributes with a deep analysis of interactions on Instagram. Here, we discuss the major findings of our analysis and put them in perspective of the relevant literature in the field. Among key insights, we can mention: \begin{itemize} \item We introduced a reference probabilistic network model to select salient interactions of co-commenters on Instagram. We found that most users have at least one interaction that deviates from the reference model, similarly to previous work on user behavior on online social networks~\cite{Burke:2009, Wilson:2009, Kwon:2014}. Our model allows us to extract better quality information and thus better understand how the political debate evolves on Instagram. \item Commenters exhibiting salient interactions build strong communities, often co-interacting on posts from different influencers. Hambrick et al.~\cite{Hambrick:2014} analyzed tweets about the 2012 London Summer Games, finding that communities are born around viral posts. In politics, we reveal that multiple communities emerge around different subsets of posts of the same influencer, and this behavior seems to be guided by the discussed topics on Instagram as well. \item Comments produced by political communities tend to be longer, richer in emojis, hashtags and uppercase words, indicating assertive and emotional content than communities around other topics. Kim et al.\cite{Kim:2020} analyzed multiple categories of Influencers (outside politics) finding that such textual features are not very discriminative across the categories. We confirm their findings on our baseline of non-politicians, however finding remarkable differences for Influencers on politics. \item We compared the use of hashtags and mentions across categories of influencers. Previous works~\cite{Trevisan:2019, Yang:2019, Kang:2020} associated these aspects to information spreading strategies. We concluded that such strategies are even more prominent on politics. \item We show a predominance of positive sentiment, confirming findings of \cite{Zhan:2018, Arslan:2019}. We observe also larger percentages of negative comments on politics, a phenomenon also studied by Kuvsen et al.\cite{kuvsen:2018} for dissemination of information during the 2016 Austrian elections. However, here we also find that communities built around a specific politician tend to leave negative comments on profiles associates to opposite political spectra. \item In weeks preceding elections, we noticed a heating up in political debate and large variations on community membership, which is reduced after the election day. Recurrent behaviors on Instagram had so far been evaluated only in other context, such as cyberbullying~\cite{Cheng:2020, Gupta:2020, Cheng:2021}. \item We observe a large variety diversity in discussed topics over time for communities in politics. Whereas some topics attract attention only momentarily (e.g., racism), others, centered around more fundamental fundamental political subjects (e.g., rallies, particular candidates and political ideologies), remain consistently active over time. The rapid decline of communities around specific topics has been observed on Twitter as well~\cite{moody2019analysis}. \end{itemize} Our analyses open up a number of potential avenues for further exploration. One possibility is extending the study to other platforms, such as Facebook and Twitter, with a similar network structure, which could reveal distinguishing patterns. In particular, it would be interesting to compare the dynamics of discussions around posts by the same person on different platforms, to shed lights on the role of different social media platforms in current society. Another interesting future work is the evaluation of the role of commenters on each community -- e.g., considering topological and activity-related attributes to determine commenters' importance. Similarly, another interesting direction is the investigation of the role of vertices in the backbone (and in particular communities) as part of information dissemination campaigns, notably misinformation campaigns. \section*{Acknowledgement} The research leading to these results has been funded by the SmartData@PoliTO Center for Big Data technologies at Politecnico di Torino, Brazilian National Council for Scientific (CNPQ), Technological Development and Brazilian Coordination for the Improvement of Higher Education Personnel (CAPES) and Minas Gerais State Foundation for Research Support (FAPEMIG). \bibliographystyle{elsarticle-num}
\section{Introduction} The interest in data analytics applications in enterprises grows as studies show it leads to an increase in productivity \cite{muller2018effect}. Within enterprises, numerous large datasets are available \cite{foorthuis2020algorithmic}. However, their current software is unable to process them for new insights. Like a recommender system that advises sales employees for their outlet visit schedule by modeling historic data. The HEINEKEN Company is the most global brewer with breweries in more than 70 countries. With global support, these local subsidiaries build and exchange successful recommender systems. These systems with domestic impact quickly gather interest from other subsidiary brewers. However, its international and decentralized structure also comes with diversity in data sources and information technology. Meeting the expected demand from subsidiaries for recommender systems requires a scalable approach in development and operations that decentralizes the ownership of the system. Growing the data engineering team is expensive and demanding with the shortage of data talent \cite{zhang2021ai}. Furthermore, studies show that increasing team size does not linearly increase the software efforts and quality \cite{pieterse2006software,pendharkar2007empirical}. To enable scaling is vital to achieve efficiency in the design, development, and operations of recommender systems. Immature infrastructure in production causes long-term costs expressed as technical debt \cite{cunningham1992wycash,sculley2015hidden}. With the risk of bringing organizations to a stand-still. To stimulate delivery velocity and prevent technical debt while scaling the recommender system, this efficiency requires to be included from the initial design. This talk discusses a software engineering method for scalable recommender systems, two applications, and its learnings. \section{Approach} Compared to software engineering technical debt is a larger challenge for recommender systems as code is accompanied by datasets and machine learning models. We draw from experience in addressing this challenge with a Machine Learning Operations (MLOps) method. MLOps is the combination of machine learning and development operations (DevOps). The goal of the MLOps practices is to bring machine learning applications into production with attention to reproducibility, reliability, and efficiency \cite{lwakatare2020devops}. There are two main variants of this MLOps life cycle with either three (excluding data management) or four stages. We choose the four-stage life cycle (fig.~\ref{figure:mlops-lifecycle}) since proper data management is essential for successful recommender systems \cite{hulsebos2019sherlock}. \begin{figure*}[ht] \centering \includegraphics[scale=0.3]{supplements/mlops-lifecyle.png} \caption{Machine Learning Operations life cycle.} \Description{Machine Learning Operations life cycle in four phases: data management, modeling, development and operations.} \label{figure:mlops-lifecycle} \end{figure*} The MLOps method is executed five best practices: \begin{itemize} \item \textbf{Pipeline automation:} Removing manual actions and delays by automating actions and connecting services in pipelines. For example by releasing solutions with a continuous integration and continuous deployment pipeline. \item \textbf{Data availability:} Access to validated datasets via a feature store and indexed in a data catalog to ensure reproducible machine learning. \item \textbf{Exchangeable artifacts:} All machine learning models, code, and configurations are version controlled, descriptive, and PEP8 consistent. Solution patterns with documentation are available for common architecture artifacts, like integrating external systems. Code scripts are preferred over notebooks in production. Notebooks have upsides for experimenting, but these do not exceed the advantages of regular scripts. \item \textbf{Observability:} Deep understanding of the system components to ensure performance and identify root causes of issues. Metrics, events, logs, and traces are collected and accessible to the product team, not only engineers. \item \textbf{Policy-based security:} Releases are separated into four environments: development, testing, acceptance, and production. Authorization to these environments is managed with Attribute Based Access Control (ABAC) with control plane and data plane functions. Secrets are stored in environment-specific key vaults. \end{itemize} This MLOps method and practices are a shared responsibility of both data scientists and data engineers. Committing to the same method enables the \textit{“You build it, you run it”}-principle by Werner Vogels \cite{o2006conversation}. Advantageous for delivery velocity and quality of the applications. \section{Applications} We selected two cloud native applications on the Azure platform to present: a self-service ML workspace deployment and a recommender system. These are intertwined, as the ML workspace is the engine of the recommender system. Together these applications are designed globally to support local analytics demand in a scalable form with distributed ownership. \subsection{Self-service ML workspace deployment} An Azure ML workspace is a cloud workbench for machine learning development and deployment. It empowers the data scientist with a self-service environment that contains various MLOps features and abstracts away technical complexities like containerization. Requesting and delivering a new ML workspace was a manual and time-consuming process. With straightforward technology, this is effectively automated (fig.~\ref{fig:arch-workspace}). The request submitted via ServiceNow is sent to the HTTP endpoint of the Azure Logic App. ServiceNow is familiar software for the end-users. In Logic App the configuration details are parsed and sent via a REST API to an Azure DevOps Release pipeline. Using an Azure Resource Manager (ARM) template with the configuration the ML workspace is deployed in the designated Azure environment within minutes. \begin{figure}[ht] \centering \includegraphics[scale=0.4]{supplements/workspace.png} \caption{The architecture of the pipeline to automatically deploy an Azure ML workspace.} \Description{The architecture consisting of a ServiceNow and Azure resources.} \label{fig:arch-workspace} \end{figure} \subsection{Recommender system} The recommender system has a decoupled architecture, consisting of various solution patterns (fig.~\ref{fig:arch-recsys}). Data is extracted from upstream services (e.g. SAP or Salesforce) and stored in the Azure data lake. The ML workspace provides functionality for both model research, running pipelines as recommender engine, and tracking performance. The Azure Data Factory pipeline first triggers the ML pipeline and subsequently pushes the data to a downstream service (dashboard, external system API, or internal API). All the steps of this recommendation process are scheduled or triggered on data events. With localization in mind, the configurations are stored in separate yaml files. All resources templates and configurations are stored and deployed as infrastructure as code from individual Azure DevOps repositories. \begin{figure*}[ht] \centering \includegraphics[scale=0.4]{supplements/recommender-system.png} \caption{The architecture of a recommender system with Azure resources.} \Description{The architecture consisting of various Azure Cloud and DevOps resources.} \label{fig:arch-recsys} \end{figure*} \section{Learnings} Analyzing the practical case with the implementation of MLOps generates learnings. The engineering bottlenecks for scaling recommender systems are diversity in data sources and information technology with subsidiaries. This challenge is successfully diminished by engineering a culture that fosters self-service, automation, and collaboration. The ML workspace deployment application is an effective example of self-service and automation. This deployment capability is expanded from a few engineers to all data colleagues by the implementation of a pipeline of connected services. As a result, valuable engineering time is freed up and the delivery time of an ML workspace to its end-users is reduced from weeks to minutes. Conveniently onboarding data scientists to the ML workspace with central knowledge resources further contributes to a higher velocity. The presented recommender system is designed with internal solution patterns, automated deployment of resources, centrally available datasets, and accessible observability. This decreases the engineering time per subsidiary use case while keeping the agility to effectively incorporate local specifications. By dealing with the diversity in data sources and information technology early and with solution patterns, it is possible to reuse many recommender system artifacts across subsidiaries. Substantially reducing the collective technical debt of the organization. From our experience, resulting in scaling recommender systems faster to multiple countries. The success of a local recommender system is determined by multiple KPIs, including revenue, savings, usage, and user valuation. The attention for standardization, exchangeable artifacts, and available datasets leads to more collaboration between colleagues across teams or country borders. By promoting a culture of self-service, automation, and collaboration, the HEINEKEN Company is better qualified to support its subsidiaries with recommender systems or other analytics requests. \section{Conclusion} Meeting the local demand of recommender systems in enterprises requires efficient engineering with minimal technical debt. This talk described an MLOps method and two corresponding applications. We learned that a culture with self-service, automation, and collaboration is key to enable an enterprise to scale recommender systems with shared ownership. We believe that these engineering principles are valuable to other enterprises with similar data-driven ambitions and challenges. Additionally, we think that these are not bounded to recommender systems, but applicable for scaling various types of machine learning applications globally. \begin{acks} This talk stands on the shoulders of talented people (at The HEINEKEN Company). Their ideas, code, and feedback shaped our thoughts and contributed to this work. \end{acks} \section{Speaker Bio} \textbf{Maurits van der Goes} is currently a Data Engineer in the Global Analytics team at The HEINEKEN Company, where he specializes in their MLOps infrastructure for e.g. information filtering pipelines in sales, marketing, logistics, and finance. Earlier at RTL Netherlands, he developed the first news recommender system for major Dutch website RTL Nieuws. Maurits graduated from Delft University of Technology with a Masters in Complex IT Systems Engineering and Management. His graduation research was on a team-formation recommender system that he developed at a digital platform for self-managing teams. \bibliographystyle{ACM-Reference-Format}
\section{Time Series Anomaly Detection} \label{sec:anomaly} In this section, we introduce Merlion's specific univariate and multivariate anomaly detection models, provide algorithmic details on Merlion's post-processing and ensembling modules for anomaly detection, and describe the metrics used for experimental evaluation in \S\ref{sec:experiments_uni_anom} and \S\ref{sec:experiments_multi_anom}. \subsection{Models} \label{sec:anom_models} Merlion contains a number of models that are specialized for univariate time series anomaly detection. These fall into two groups: forecasting-based and statistical. Because forecasters in Merlion predict the value of a specific univariate in a general time series, they are straightforward to adapt for anomaly detection. The anomaly score is simply the residual between the predicted and true time series value, optionally normalized by the underlying forecaster's predicted standard error (if it produces one). For univariate statistical methods, we support Spectral Residual \citep{spectral_residual}, as well as two simple baselines WindStats and ZMS. WindStats divides each week into windows (e.g.\ 6 hours), and computes the anomaly score $s_t = (x_t - \mu(t)) / \sigma(t)$, where $\mu(t)$ and $\sigma(t)$ are the historical mean and standard deviation of the window in question (e.g.\ 12pm to 6pm on Monday). ZMS computes $k$-lags $\Delta^{(k)}_t = x_{t} - x_{t-k}$ for $k = 1, 2, 4, 8, \ldots$, and computes the anomaly score $s_t = \max_k (\Delta^{(k)}_t - \mu^{(k)}) / \sigma^{(k)}$, where $\mu^{(k)}$ and $\sigma^{(k)}$ are the mean and standard deviation of each $k$-lag. In addition to models that are specialized for univariate anomaly detection, we support both statistical methods and deep learning models that can handle both univariate and multivariate anomaly detection. The statistical methods include Isolation Forest \citep{isolation_forest} and Random Cut Forest \cite{random_cut_forest}, while the deep learning models include an autoencoder \citep{autoencoder}, a Deep Autoencoding Gaussian Mixture Model (DAGMM, \cite{dagmm}), a LSTM encoder-decoder \citep{lstmed}, and a variational autoencoder \citep{vae}. A full list can be found in the API documentation. \subsection{Post-Processing} \label{sec:post_process} Merlion supports two key post-processing steps for anomaly detectors: calibration and thresholding. Calibration is important for improving model intepretability, while thresholding converts a sequence of continuous anomaly scores into discrete labels and reduces the false positive rate. \subsubsection{Calibration} \label{sec:calibration} All anomaly detectors in Merlion return anomaly scores $s_t$ such that $\abs{s_t}$ is positively correlated with the severity of the anomaly. However, the scales and distributions of these anomaly scores vary widely. For example, Isolation Forest \citep{isolation_forest} returns an anomaly score $s_t \in [0, 1]$ where $-\log_2(1 - s_t)$ is a node's depth in a binary tree; Spectral Residual \citep{spectral_residual} returns an unnormalized saliency map; DAGMM \citep{dagmm} returns a negative log probability. To successfully use a model, one must be able to interpret the anomaly scores it returns. However, this prevents many models from being immediately useful to users who are unfamiliar with their specifc implementations. Calibration bridges this gap by making all anomaly scores interpretable as z-scores, i.e.\ values drawn from a standard normal distribution. Let $\Phi: \mathbb{R} \to [0, 1]$ be the cumulative distribution function (CDF) of the standard normal distribution. A calibrator $C: \mathbb{R} \to \mathbb{R}$ converts a raw anomaly score $s_t$ into a calibrated score $z_t$ such that $\P[\abs{z_t} > \alpha] = \Phi(\alpha) - \Phi(-\alpha) = 2 \Phi(\alpha) - 1$, i.e.\ $\abs{z_t}$ follows the same distribution as the absolute value of a standard normal random variable. If $F_s: \mathbb{R} \to [0, 1]$ is the CDF of the absolute raw anomaly scores $\abs{s_t}$, we can compute the recalibrated score as \[C(s_t) = \mathrm{sign}(s_t) \Phi^{-1}((1 + F_s(\abs{s_t})) / 2) \] Notably, this is also the optimal transport map between the two distributions, i.e.\ the mapping which transfers mass from one distribution to the other in a way that minimizes the $\ell_1$ transportation cost \citep{villani2003topics}. In practice, we estimate the calibration function $C$ using the empirical CDF $\hat{F}_s$ and a monotone spline interpolator \citep{pchip} for intermediate values. This simple post-processing step dramatically increases the intepretability of the anomaly scores returned by individual models. It also enables us to create ensembles of diverse anomaly detectors as discussed in \S\ref{sec:anom_ensemble}. This functionality is enabled by default for all anomaly detection models. \subsubsection{Thresholding} \label{sec:thresholding} The most common way to decide whether an individual timestamp $t$ as anomalous, is to compare the anomaly score $s_t$ against a threshold $\tau$. However, in many real-world systems, a human is alerted every time an anomaly is detected. A high false positive rate will lead to fatigue from the end users who have to investigate each alert, and may result in a system whose users think it is unreliable. A common way to circumvent this problem is including additional automated checks that must pass before a human is alerted. For instance, our system may only fire an alert if there are {\em two} timestamps $t_1, t_2$ within a short window (e.g.\ 1 hour) with a high anomaly score, i.e.\ $\abs{s_{t_1}} > \tau$ {\em and} $\abs{s_{t_2}} > \tau$. Moreover, if we know that anomalies typically last 2 hours, our system can simply suppress all alerts occurring within 2 hours of a recent one, as those alerts likely correspond to the same underlying incident. Often, one or both of these steps can greatly increase precision without adversely impacting recall. As such, they are commonplace in production systems. Merlion implements all these features in the user-configurable \texttt{AggregateAlarms} post-processing rule, and by default, it is enabled for all anomaly detection models. \subsection{Ensembles} \label{sec:anom_ensemble} Because both time series and the anomalies they contain are incredibly diverse, it is unlikely that a single model will be the best for all use cases. In principle, a heterogenous ensemble of models may generalize better than any individual model in that ensemble. Unfortunately, as mentioned in \S\ref{sec:calibration}, constructing an ensemble is not straightforward due to the vast differences in anomaly scores returned by various models. However, because we can rely on the anomaly scores of all Merlion models to be interpretable as z-scores, we can construct an ensemble of anomaly detectors by simply reporting the mean {\em calibrated} anomaly score returned by each individual model, and then applying a threshold (a la \S\ref{sec:thresholding}) on this combined anomaly score. Empirically, we find that ensembles robustly achieve the strongest or competitive performance (relative to the baselines considered) across multiple open source and internal datasets for both univariate (Table \ref{tab:uni_anom_full_results}) and multivariate (Table \ref{tab:multi_anom_full_results}) anomaly detection. \subsection{Evaluation Metrics} \label{sec:anom_eval} The key challenge in designing an appropriate evaluation metric for time series anomaly detection lies in the fact that anomalies are almost always windows of time, rather than discrete points. Thus, while it is easy to compute the pointwise (PW) precision, recall, and F1 score of a predicted anomaly label sequence relative to the ground truth label sequence, these metrics do not reflect a quantity that human operators care about. \cite{xu2018unsupervised} propose {\em point-adjusted} (PA) metrics as a solution to this problem: if any point in a ground truth anomaly window is labeled as anomalous, all points in the segment are treated as true positives. If no anomalies are flagged in the window, all points are labeled as false negatives. Any predicted anomalies outside of anomalous windows are treated as false positives. Precision, recall, and F1 can be computed based on these adjusted true/false positive/negative counts. However, the disadvantage of PA metrics is that they are biased to reward models for detecting long anomalies more than short ones. \cite{hundman2018detecting} propose {\em revised point-adjusted} (RPA) metrics as a closely related alternative: if any point in a ground truth anomaly window is labeled as anomalous, {\em one} true positive is registered. If no anomalies are flagged in the window, {\em one} false negative is recorded. Any predicted anomalies outside of anomalous windows are treated as false positives. These metrics address the shortcomings of PA metrics, but they do penalize false positives more heavily than alternatives. Merlion's \texttt{TSADMetric} enum supports all 3 classes of evaluation metrics (PW, PA, and RPA), as well as the mean time to detect an anomaly. By default, we evaluate RPA metrics, but users may manually specify alternatives if their application calls for it. \section{Architecture and Design Principles} \label{sec:architecture} \begin{figure}[t] \centering \includegraphics[width=\columnwidth]{figures/architecture.pdf} \caption{Architecture of modules in Merlion.} \label{fig:architecture} \end{figure} At a high level, Merlion's module architecture is split into five layers: the data layer loads raw data, converts it to Merlion's \texttt{TimeSeries} data structure, and performs any desired pre-processing; the modeling layer supports a wide array of models for both forecasting and anomaly detection, including autoML for automated hyperparameter tuning; the post-processing layer provides practical solutions to improve the interpetability and reduce the false positive rate of anomaly detection models; the next ensemble layer supports transparent model combination and model selection; and the final evaluation layer implements relevant evaluation metrics and pipelines that simulate the live deployment of a model in production. Figure \ref{fig:architecture} provides a visual overview of the relationships between these modules. \subsection{Data Layer} Merlion's core data structure is the \texttt{TimeSeries}, which represents a generic multivariate time series $T$ as a collection of \texttt{UnivariateTimeSeries} $U^{(1)}, \ldots, U^{(d)}$, where each \texttt{UnivariateTimeSeries} is a sequence $U^{(i)} = (t_1^{(i)}, x_1^{(i)}), \ldots, (t_{n_i}^{(i)}, x_{n_i}^{(i)})$. This formulation reflects the reality that individual univariates may be sampled at different rates, or contain missing data at different timestamps. For example, a cloud computing system may report its CPU usage every 10 seconds, but only report the amount of free disk space once per minute. We allow users to initialize \texttt{TimeSeries} objects directly from \texttt{pandas} dataframes, and we implement standardized loaders for a wide range of datasets in the \texttt{ts\_datasets} package. Once a \texttt{TimeSeries} has been initialized from raw data, the \texttt{merlion.transform} module supports a host of pre-processing operations that can be applied before passing a \texttt{TimeSeries} to a model. These include resampling, normalization, moving averages, temporal differencing, and others. Notably, multiple transforms can be composed with each other (e.g.\ resampling followed by a moving average), and transforms can be inverted (e.g.\ the normalization $f(x) = (x - \mu) / \sigma$ is inverted as $f^{-1}(y) = \sigma y + \mu$). \subsection{Models} Since no single model can perform well across all time series and all use cases, it is important to provide users the flexibility to choose from a broad suite of heterogenous models. Merlion implements many diverse models for both forecasting and anomaly detection. These include statistical methods, tree-based models, and deep learning approaches, among others. To transparently expose all these options to an end user, we unify all Merlion models under two common API's, one for forecasting, and one for anomaly detection. All models are initialized with a \texttt{config} object that contains implementation-specific hyperparameters, and support a \texttt{model.train(time\_series)} method. Given a general multivariate time series $T = (U^{(1)}, \ldots, U^{(d)})$, forecasters are trained to predict the values of a single target univariate $U^{(k)}$. One can then obtain a model's forecast of $U^{(k)}$ for a set of future time stamps by calling \texttt{model.forecast(time\_stamps)}. Analogously, one can obtain an anomaly detector's sequence of anomaly scores for the time series $T$ by simply calling \texttt{model.get\_anomaly\_score(time\_series)}. The handling of univariate vs.\ multivariate time series is implementation-specific (e.g.\ some algorithms look for an anomaly in any of the univariates, while others may look for anomalies in specific univariates). Notably, forecasters can also be used for anomaly detection by treating the residual between the true and predicted value of a target univariate $U^{(k)}$ as an anomaly score. These forecast-based anomaly detectors support both \texttt{model.forecast(time\_stamps)} and \texttt{model.get\_anomaly\_score(time\_series)}. For models that require additional computation, we implement a \texttt{Layer} interface that is the basis for the autoML features we offer. \texttt{Layer} is used to implement additional logic on top of existing model definitions that would not be properly fitted into the model code itself. Examples include seasonality detection and hyperparameter tuning (see \S\ref{sec:automl} for more details). The \texttt{Layer} is an interface that implements three methods: \texttt{generate\_theta} for generating hyperparameter candidates $ \theta $, \texttt{evaluate\_theta} for evaluating the quality of $\theta$'s, and \texttt{set\_theta} for applying the chosen $\theta$ to the underlying model. A separate class \texttt{ForecasterAutoMLBase} implements \texttt{forecast} and \texttt{train} methods that leverage methods from the \texttt{Layer} class to complete the forecasting model. Finally, all models support the ability to condition their predictions on historical data \texttt{time\_series\_prev} that is distinct from the data used for training. One can obtain these conditional predictions by calling \texttt{model.forecast(time\_stamps, time\_series\_prev)} or \texttt{model.get\_anomaly\_score(time\_series, time\_series\_prev)}. \subsection{Post-Processing} All anomaly detectors have a \texttt{post\_rule} which applies important post-processing to the output of \texttt{model.get\_anomaly\_score(time\_series)}. This includes {\em calibration} (\S\ref{sec:calibration}), which ensures that anomaly scores correspond to standard deviation units and are therefore interpretable and consistent between different models, and {\em thresholding} (\S\ref{sec:thresholding}) rules to reduce the number of false positives. One can directly obtain post-processed anomaly scores by calling \texttt{model.get\_anomaly\_label(time\_series)}. \subsection{Ensembles and Model Selection} Ensembles are structured as a model that represents a combination of multiple underlying models. For this purpose we have a base \texttt{EnsembleBase} class that abstracts the process of obtaining predictions $Y_1, \ldots, Y_m$ from $m$ underlying models on a single time series $T$, and a \texttt{Combiner} class that then combines results $Y_1, \ldots, Y_m$ into the output of the ensemble. These combinations include traditional mean ensembles, as well as model selection based on evaluation metrics like sMAPE. Concrete implementations implement the \texttt{forecast} or \texttt{get\_anomaly\_score} methods on top of the tools provided by \texttt{EnsembleBase}, and their \texttt{train} method automatically handles dividing the data into train and validation splits if needed (e.g.\ for model selection). \subsection{Evaluation Pipeline} \label{sec:evaluation} When a time series model is deployed live in production, training and inference are usually not performed in batch on a full time series. Rather, the model is re-trained at a regular cadence, and where possible, inference is performed in a streaming mode. To more realistically simulate this setting, we provide a \texttt{EvaluatorBase} class which implements the following evaluation loop: \begin{enumerate} \item Train an initial model on recent historical training data. \item At a regular interval (e.g.\ once per day), retrain the entire model on the most recent data. This can be either the entire history, or a more limited window (e.g.\ 4 weeks). \item Obtain the model's predictions (forecasts or anomaly scores) for the time series values that occur between re-trainings. Users may customize whether this should be done in batch, streaming, or at some intermediate cadence. \item Compare the model's predictions against the ground truth (actual values for forecasting, or labeled anomalies for anomaly detection), and report quantitative evaluation metrics. \end{enumerate} We also provide a wide range of evaluation metrics for both forecasting and anomaly detection, implemented as the enums \texttt{ForecastMetric} and \texttt{TSADMetric}, respectively. Finally, we provide scripts \texttt{benchmark\_forecast.py} and \texttt{benchmark\_anomaly.py} which allow users to use this logic to easily evaluate model performance on any dataset included in the \texttt{ts\_datasets} module. We report experimental results using these scripts in \S\ref{sec:experiments}. \section{Experiments} \label{sec:experiments} In the experiments section, we show benchmark results generated by using Merlion with popular baseline models across several time series datasets. The purpose of this section is not to obtain state-of-the-art results. Rather, most algorithms listed are strong baselines. To avoid the possible risk of label leaking through manual hyperparameter tuning, for all experiments, we evaluate all models with a single choice of sensible default hyperparameters and data pre-processing, regardless of dataset. \subsection{Univariate Forecasting} \label{sec:experiments_uni_forecast} \subsubsection{Datasets and Evaluation} We primarily evaluate our models on the M4 benchmark \citep{makridakis2018m4, m42018m4}, an influential time series forecasting competition. The dataset contains $100,000$ time series from diverse domains including financial, industry, and demographic forecasting. It has sampling frequencies ranging from hourly to yearly. Table \ref{tab:m4} summarizes the dataset. We additionally evaluate on three internal datasets of cloud KPIs, which we describe in Table \ref{tab:uni_forecast_internal_data}. For all datasets, models are trained and evaluated in the offline batch prediction setting, with a pre-defined prediction horizon equal to the size of the test split. To mitigate the effect of outliers, we report both the mean and median sMAPE for each method. \begin{table} \small \centering \begin{tabular}{r|c|c|c|c|c|c} \toprule M4 & Hourly & Daily & Weekly & Monthly & Quarterly & Yearly\\ \midrule \# Time Series & 414 & 4,227 & 359 & 48,000 & 24,000 & 23,000 \\ Real Data? & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\ Availability & Public & Public & Public & Public& Public& Public\\ \midrule Prediction Horizon & 6 & 8 & 18 & 13 & 14 & 48\\ \bottomrule \end{tabular} \caption{Summary of M4 dataset for univariate forecasting.} \label{tab:m4} \end{table} \begin{table} \small \centering \begin{tabular}{r|c|c|c} \toprule & Int\_UF1 & Int\_UF2 & Int\_UF3 \\ \midrule \# Time Series & 21 & 6 & 4 \\ Real Data? & \cmark & \cmark & \cmark \\ Availability & Internal & Internal & Internal \\ \midrule Train Split & First 75\% & First 25\% & First 25\%\\ \bottomrule \end{tabular} \caption{Summary of internal datasets for univariate forecasting.} \label{tab:uni_forecast_internal_data} \end{table} \subsubsection{Models} We compare ARIMA (AutoRegressive Integrated Moving Average), Prophet \citep{prophet}, ETS (Error, Trend, Seasonality), and MSES (the previous production solution, \cite{mses_apidoc}). For ARIMA, Prophet and ETS, we also consider our autoML variants that perform automatic seasonality detection and hyperparameter tuning, as described in \S\ref{sec:automl}. These are implemented using the \texttt{merlion.models.automl} module. \if 0 \begin{table} \small \centering \begin{tabular}{r|c|c|c|c|c|c} \toprule & \multicolumn{2}{c}{M4$\_$Hourly} & \multicolumn{2}{|c|}{M4$\_$Daily} & \multicolumn{2}{c}{M4$\_$Weekly} \\\midrule & sMAPE & RMSE & sMAPE & RMSE & sMAPE & RMSE \\ \midrule ARIMA & 15.39 & \textbf{245.1} & 3.449 &237.8 & 9.433 & 419.6\\ AutoSARIMA & \textbf{13.61} & 451.4 & 3.299 & 221.5 & \textbf{8.299} & \textbf{391.0} \\ Prophet & 18.08 & 450.59 &11.67 &706.6 & 19.98 & 777.2 \\ AutoProphet & 16.49 &443.0 &11.67 &706.5 &20.01 &775.86 \\ MSES & 32.45 & 1491 & 5.869 & 409.9 &16.53 & 742.2 \\ ETS & 19.23 & 483.6 & \textbf{3.069} & \textbf{206.0} & 9.324 & 407.9 \\ \bottomrule \end{tabular} \begin{tabular}{r|c|c|c|c|c|c} \toprule & \multicolumn{2}{c}{M4$\_$Monthly} & \multicolumn{2}{|c|}{M4$\_$Quarterly} & \multicolumn{2}{c}{M4$\_$Yearly} \\ \midrule & sMAPE & RMSE & sMAPE & RMSE & sMAPE & RMSE \\ \midrule AutoSARIMA & \textbf{14.26} & - & 10.51 & 694.0 & 17.16 & 12899 \\ Prophet & 20.64 & 918.4 & 24.53 & 1408 & 30.23 & 2143 \\ AutoProphet & 20.43 & 899.6 &24.62 & 1413 & 30.24 & 2143 \\ MSES & 25.40 & 1313 & 19.03 & 1208& 21.64 & 1484 \\ ETS & 13.73 & \textbf{709.9} & \textbf{10.33} & \textbf{671.3} & \textbf{15.96} & \textbf{1086}\\ \bottomrule \end{tabular} \caption{sMAPE and RMSE achived by univariate forecasting models on M4 datasets. All models were evaluated without retraining. Best results are in \textbf{bold}.} \label{tab:uni_forecast_result} \end{table} \begin{table} \small \centering \begin{tabular}{r|c|c|c|c|c|c} \toprule & \multicolumn{2}{c}{Int\_UF1} & \multicolumn{2}{|c|}{Int\_UF2} & \multicolumn{2}{c}{Int\_UF3} \\\hline & sMAPE & RMSE & sMAPE & RMSE & sMAPE & RMSE \\ \hline ARIMA & 16.52 & 8.649 & 56.46 & - & 4.987 & - \\ AutoSARIMA & \textbf{15.98} & \textbf{8.827} & \textbf{17.45} & - & \textbf{3.427} & - \\ Prophet &56.07 & 25.00 & 30.93 & - & 72.55 & - \\ AutoProphet & 56.43 & 24.91 & 26.35 &- & 69.32 & - \\ MSES & 33.51 & 18.94 & 32.30 & - & 3.882 & - \\ ETS & 21.65 & 12.00 & 19.41 & - &3.547 & - \\ \bottomrule \end{tabular} \caption{sMAPE and RMSE achived by univariate forecasting models on internal datasets. All models were evaluated without retraining. Best results are in \textbf{bold}.} \label{tab:uni_forecast_result} \end{table} \fi \begin{table} \small \centering \begin{tabular}{r|c|c|c|c|c|c} \toprule & \multicolumn{2}{c}{M4$\_$Hourly} & \multicolumn{2}{|c|}{M4$\_$Daily} & \multicolumn{2}{c}{M4$\_$Weekly} \\\hline sMAPE& Mean & Median & Mean & Median & Mean & Median \\ \hline MSES & 32.45 & 16.89 & 5.87 & 3.97 & 16.53 & 9.96 \\ ARIMA & 33.54 & 19.27 & 3.23 & 2.06 & 9.29 & 5.38 \\ Prophet & 18.08 & 6.92 & 11.67 & 5.99 & 19.98 & 11.26 \\ ETS & 42.95 & 19.88 & \textbf{3.04} & 2.00 & 9.00 & 5.17 \\ \midrule AutoSARIMA & \textbf{13.61} & \textbf{4.73} & 3.29 & 2.00 & \textbf{8.30} & \textbf{5.09} \\ AutoProphet & 16.49 & 6.20 & 11.67 & 5.98 & 20.01 & 11.63 \\ AutoETS & 19.23 & 5.33 & 3.07 & \textbf{1.98} & 9.32 & 5.15 \\ \bottomrule \end{tabular} \begin{tabular}{r|c|c|c|c|c|c} \toprule & \multicolumn{2}{c}{M4$\_$Monthly} & \multicolumn{2}{|c|}{M4$\_$Quarterly} & \multicolumn{2}{c}{M4$\_$Yearly} \\\hline sMAPE& Mean & Median & Mean & Median & Mean & Median \\ \hline MSES & 25.40 & 13.69 & 19.03 & 9.53 & 21.63 & 12.11 \\ ARIMA & 17.66 & 10.41 & 13.37 & 8.27 & 16.37 & 10.34 \\ Prophet & 20.64 & 11.00 & 24.53 & 12.81 & 30.23 & 19.24 \\ ETS & 14.32 & 8.37 & 11.08 & 6.94 & 16.43 & 11.43 \\ \midrule AutoSARIMA & 14.26 & \textbf{7.17} & 10.51 & \textbf{5.44} & 17.16 & 9.48 \\ AutoProphet & 20.43 & 10.42 & 24.62 & 12.87 & 30.23 & 19.24 \\ AutoETS & \textbf{13.73} & 7.41 & \textbf{10.33} & 5.77 & \textbf{15.96} & \textbf{9.18} \\ \bottomrule \end{tabular} \caption{Mean and Median sMAPE achived by univariate forecasting models on M4 datasets. All models were evaluated without retraining. Best results are in \textbf{bold}.} \label{tab:uni_forecast_result_public} \end{table} \begin{table} \small \centering \begin{tabular}{r|c|c|c|c|c|c} \toprule & \multicolumn{2}{c}{Int\_UF1} & \multicolumn{2}{|c|}{Int\_UF2} & \multicolumn{2}{c}{Int\_UF3} \\\hline sMAPE& Mean & Median & Mean & Median & Mean & Median \\ \hline MSES & 33.50 & 32.60 & 32.30 & 14.45 & 3.882 & 3.771 \\ ARIMA & 24.00 & 19.42 & 25.89 & 24.40 & 5.94 & 6.15\\ Prophet & 56.07 & 42.10 & 30.93 & 38.54 & 72.55 & 78.27 \\ ETS & 17.02 & 16.36 & 25.10 & 24.19 & 3.55 & 3.32 \\ \midrule AutoSARIMA & \textbf{15.98} & \textbf{15.10} & \textbf{17.45} & \textbf{9.98} & 3.42 & 3.41 \\ AutoProphet & 56.43 & 41.99 & 26.35 & 24.19 & 69.32 & 78.37 \\ AutoETS & 21.65 & 20.15 & 19.41 & 12.67 & \textbf{3.15} & \textbf{2.94} \\ \bottomrule \end{tabular} \caption{Mean and Median sMAPE achived by univariate forecasting models on internal datasets. All models were evaluated without retraining. Best results are in \textbf{bold}.} \label{tab:uni_forecast_result_internal} \end{table} \begin{table} \small \centering \begin{tabular}{r|c} \toprule ARIMA $\to$ AutoSARIMA & $5.03$ ($p=0.010$) \\ Prophet $\to$ AutoProphet & $1.01$ ($p=0.035$) \\ ETS $\to$ AutoETS & $2.96$ ($p=0.039$) \\ \bottomrule \end{tabular} \caption{Average reduction (improvment) in sMAPE achieved by applying autoML. $p$-value is from a 2-sided paired sample $t$-test. Our autoML module improves all 3 models at significance level $p = 0.05$. } \label{tab:automl_results} \end{table} \subsubsection{Results} Table \ref{tab:uni_forecast_result_public} and \ref{tab:uni_forecast_result_internal} respectively show the performance of each model on the public and internal datasets. Table \ref{tab:automl_results} shows the average improvement achieved by using the autoML module. For ARIMA, we find a clear improvement by using the AutoML module for all datasets. While the improvement is statistically significant for Prophet and AutoETS overall, the actual change is small on most datasets except M4\_Hourly and Int\_UF2. This is because many of the other datasets don't contain well-defined seasonalities; additionally, Prophet already has some pre-defined seasonality detection (daily, weekly, and yearly), but these datasets contain time series with hourly seasonalities. While there is no clear winner across all datasets, AutoSarima and AutoETS consistently outperform other methods. The overall performance of AutoSarima is slightly better than AutoETS, but AutoSarima is much slower to train. Therefore, we believe that AutoETS is a good ``default'' model for new users or early exploration. \subsection{Multivariate Forecasting} \label{sec:experiments_multi_forecast} \subsubsection{Datasets and Evaluation} \begin{table} \small \centering \begin{tabular}{r|c|c|c|c} \toprule & Power Grid & Seattle Trail & Solar Plant & Int\_MF \\ \midrule \# Time Series & 1 & 1 & 1 & 21\\ \# Variables & 10 & 5 & 405 & 22 \\ Real Data? & \cmark & \cmark & \cmark & \cmark\\ Availability & Public & Public & Public & Internal\\ Data Source & Energy Demand & Trail Traffic & Power Generation & Cloud KPIs \\ \midrule Train Split & First 70\% & First 70\% & First 70\% & First 75\% \\ Granularity & 1h & \xmark & 30min & 10s\\ \midrule Reference & \cite{energy_consumption_dataset} & \cite{seattle_dataset} & \cite{solar_power_dataset} & -- \\ \bottomrule \end{tabular} \caption{Summary of multivariate forecasting datasets.} \label{tab:multi_forecast_data} \end{table} We collect public and internal datasets (Table \ref{tab:multi_forecast_data}) and train models on a training split of the data. For some datasets, we resample the data with given granularities. For each time series, we train the models on the training split to predict the {\em first} univariate as a target sequence. While we don't re-train the model, we use the evaluation pipeline described in \S\ref{sec:evaluation} to incrementally obtain predictions for the test split using a rolling window. We predict time series values for the next 3 timestamps, while conditioning the prediction on the previous 21 timestamps. We obtain these 3-step predictions at every timestamp in the test split, and evaluate the quality of the prediction using sMAPE where possible, and RMSE otherwise. \subsubsection{Models} The multivariate forecasting models we use are based on the autoregression and tree ensemble algorithms. We compare VAR \citep{multi-var}, GB Forecaster based on the Gradient Boosting algorithm \citep{multi-ke2017lightgbm} and RF Forecaster based on the Random Forest algorithm \citep{multi-ho1995random}. We discuss the implementation details of these models in \S\ref{sec:forecast_models}. For the GB Forecster and RF Forecaster, we use our proposed autoregression strategy to enable them to forecast for an arbitrary prediction horizon. \subsubsection{Results} Table \ref{tab:multi_forecast_result} reports the performance of each model. We find that our proposed autogression-based tree ensemble model GB Forecaster achieves the best results on three of the four datasets and is competitive with the best result on the fourth. While the VAR model shows competitive performance on some datasets, it is not as robust. For example, the Seattle Trail dataset has large outliers (several orders of magnitude larger than the mean) that dramatically impact the performance of VAR. For this reason, we believe that GB Forecaster is a good ``default'' model for new users or early exploration. \begin{table} \small \centering \begin{tabular}{r|c|c|c|c|c} \toprule & Power Grid & Seattle Trail & Solar Plant & \multicolumn{2}{c}{Int\_MF} \\ \midrule & sMAPE & RMSE & RMSE & sMAPE & sMAPE \\ & (1 TS) & (1 TS) & (1 TS) & (mean) & (median) \\ \midrule VAR & \textbf{1.131} & 968048 & 10.30 & 22.11 & 17.87 \\ GB Forecaster & 1.705 & \textbf{41.66} & \textbf{3.712} & \textbf{14.05} & \textbf{12.18} \\ RF Forecaster & 3.256 & 44.20 & 4.633 & 23.25 & 19.82\\ \bottomrule \end{tabular} \caption{Performance of multivariate forecasting models. All models were evaluated without retraining. Best results are in \textbf{bold}. We report RMSE instead of sMAPE for the Seattle Trail and Solar Plant datasets because a large portion of the data values (13\% and 55\% respectively) are equal to 0, making them unsuitable for sMAPE. 1 TS means that there is only one time series in the dataset.} \label{tab:multi_forecast_result} \end{table} \subsection{Univariate Anomaly Detection} \label{sec:experiments_uni_anom} \subsubsection{Datasets and Evaluation} \begin{table} \small \centering \begin{tabular}{r|c|c|c|c} \toprule & Int\_UA & NAB & AIOps & UCR \\ \midrule \# Time Series & 26 & 58 & 29 & 250 \\ Real data? & \cmark & 47/58 real & \cmark & Mixed \\ Availability & Internal & Public & Public & Public \\ Data Source & Cloud KPIs & Various & Cloud KPIs & Various \\ \midrule Train split & First 25\% & First 15\% & First 50\% & First 30\% \\ Supervised? & No & No & Train labels & Test labels \\ Threshold & 4.0 & 3.5 & -- & -- \\ \midrule Reference & -- & {\footnotesize \cite{nab}} & {\footnotesize \cite{aiops_challenge}} & {\footnotesize \cite{UCRArchive2018}} \\ \bottomrule \end{tabular} \caption{Summary of univariate anomaly detection datasets.} \label{tab:uni_anom_data} \end{table} We report results on four public and internal datasets (Table \ref{tab:uni_anom_data}). For the internal dataset and the Numenta Anomaly Benchmark (NAB, \cite{nab}), we choose a single (calibrated) detection threshold for all time series and all algorithms. For the AIOps challenge \citep{aiops_challenge}, we use the labeled anomalies in the training split of each time series to choose the detection threshold that optimizes F1 on the training split; for the UC Riverside Time Series Anomaly Archive \citep{UCRArchive2018}, we choose the detection threshold that optimizes F1 on the test split. This is because the dataset is incredibly diverse (so a single threshold doesn't apply to all time series), and there are no anomalies present in the training split. Table \ref{tab:uni_anom_data} summarizes these datasets and evaluation choices. We use the evaluation pipeline described in \S\ref{sec:evaluation} to evaluate each model. After training an initial model on the training split of a time series, we re-train the model unsupervised either daily or hourly on the full data until that point (without adjusting the calibrator or threshold). We then {\em incrementally} obtain predicted anomaly scores for the full time series, in a way that simulates a live deployment scenario. We also consider batch prediction, where the initial trained model predicts anomaly scores for the entire test split in a single step, without any re-training. Note that the UCR dataset does not contain timestamps; we treat it as if it is sampled once per minute, but this is an imperfect assumption. We consider only batch prediction and ``daily'' retraining for this dataset for efficiency reasons. \subsubsection{Models} We evaluate two classes of models: forecast-based anomaly detectors and statistical methods. For forecast-based methods, we use ARIMA, AutoETS, and AutoProphet (as described in \S\ref{sec:experiments_uni_forecast}). For statistical methods, we use Isolation Forest \citep{isolation_forest}, Random Cut Forest \citep{random_cut_forest}, and Spectral Residual \citep{spectral_residual}, as well as two simple baselines WindStats and ZMS (\S\ref{sec:anom_models}). We also consider an ensemble of AutoETS, RRCF, and ZMS (using the algorithm described in \S\ref{sec:anom_ensemble}). \subsubsection{Results} \begin{table} \small \centering \begin{tabular}{r|cccc|c} \toprule {} & Int\_UA & NAB & AIOps & UCR & $\Delta$ F1 (vs. best) \\ \midrule ARIMA & $\bm{0.531}$ & $0.395$ & $0.227$ & $0.313$ & $0.148 \pm 0.099$ \\ AutoETS & $0.296$ & $0.350$ & $0.097$ & $0.334$ & $0.245 \pm 0.042$ \\ AutoProphet & $0.343$ & $0.323$ & $0.310$ & $0.418$ & $0.166 \pm 0.062$ \\ \midrule Isolation Forest & $0.436$ & $0.244$ & $0.347$ & $0.461$ & $0.142 \pm 0.111$ \\ Random Cut Forest & $0.248$ & $0.337$ & $0.314$ & $\bm{0.568}$ & $0.148 \pm 0.132$ \\ Spectral Residual & $0.340$ & $0.153$ & $0.338$ & $0.469$ & $0.189 \pm 0.150$ \\ WindStats (baseline) & $0.225$ & $0.247$ & $0.324$ & $0.306$ & $0.239 \pm 0.114$ \\ ZMS (baseline) & $0.486$ & $0.290$ & $0.340$ & $0.427$ & $0.129 \pm 0.094$ \\ \midrule Ensemble (ours) & $0.500$ & $\bm{0.548}$ & $\bm{0.396}$ & $0.476$ & $\bm{0.034 \pm 0.044}$ \\ \bottomrule \end{tabular} \caption{F1 scores achieved by univariate anomaly detection models. All models were evaluated using batch prediction, daily re-training, and hourly re-training; we report the best F1 achieved by any of the re-training schedules. We also report the average gap (over datasets) in F1 between each model and the best model. Best results are in \textbf{bold}.} \label{tab:uni_anom_full_results} \end{table} \begin{table} \small \centering \begin{tabular}{r|cc} \toprule {} & Daily & Hourly \\ \midrule ARIMA & $0.162$ ($p = 0.001$) & $0.227$ ($p < 0.001$) \\ AutoETS & $0.088$ ($p = 0.017$) & $0.058$ ($p = 0.325$) \\ AutoProphet & $0.028$ ($p = 0.013$) & -- \\ \midrule Isolation Forest & $0.006$ ($p = 0.779$) & $0.019$ ($p = 0.567$) \\ Random Cut Forest & $0.024$ ($p = 0.396$) & $0.033$ ($p = 0.337$) \\ Spectral Residual & $-0.090$ ($p = 0.075$) & $-0.109$ ($p = 0.004$) \\ WindStats (baseline) & $0.044$ ($p = 0.098$) & $0.017$ ($p = 0.145$) \\ ZMS (baseline) & $0.005$ ($p = 0.929$) & $0.011$ ($p = 0.872$) \\ \midrule Ensemble (ours) & $0.147$ ($p = 0.023$) & $0.183$ ($p = 0.009$) \\ \bottomrule \end{tabular} \caption{Average change in F1 (relative to no re-training) achieved by re-training models both daily and hourly. $p$-value is from a 2-sided paired sample $t$-test. Re-training makes a significant improvement for the forecasting models (first block) and the ensemble. However, the statistical models (second block) benefit only marginally (if at all).} \label{tab:uni_anom_retrain} \end{table} Table \ref{tab:uni_anom_full_results} reports the revised point-adjusted F1 score achieved by each model on each dataset. We report the best F1 score achieved by any of the 3 re-training schedules (for efficiency reasons, we only consider batch prediction and daily re-training for AutoProphet). We find that our proposed ensemble of AutoETS, RRCF, and ZMS achieves the best performance on two of the four datasets, and the second-best on the others; overall, it has the smallest average gap in F1 score relative to the best model for each dataset (along with the smallest variance in this gap). For this reason, we believe that it is a good ``default'' model for new users or early exploration. Table \ref{tab:uni_anom_retrain} examines the impact of the re-training schedule for each model, averaged across all datasets. We find that daily and hourly re-training of forecasting-based models and our proposed ensemble can greatly improve their anomaly detection performance. However, in practice, the ideal re-training frequency may require some experimentation to choose. Interestingly, the impact of frequent re-training is unclear for most statistical models. \subsection{Multivariate Anomaly Detection} \label{sec:experiments_multi_anom} \subsubsection{Datasets and Evaluation} The evaluation setting for multivariate anomaly detection is nearly identical to that for univariate anomaly detection. Table \ref{tab:multi_anom_data} describes the multivariate time series anomaly detection datasets in this epxeriment. Note that we treat anomaly detection on all these datasets as a fully unsupervised learning task. The main difference from the univariate setting is that we consider only batch predictions and weekly retraining (rather than batch predictions, daily re-training, and hourly retraining) for efficiency reasons. \begin{table} \small \centering \begin{tabular}{r|c|c|c|c} \toprule & SMD & SMAP & MSL & Int\_MA \\ \midrule \# Time Series & 28 & 1 & 1 & 20 \\ \# Variables & 38 & 25 & 55 & 5 \\ Real data? & \cmark & \cmark & \cmark & \cmark \\ Availability & Public & Public & Public & Internal \\ Data Source & Cloud KPIs & Satellite Data & Mars Rover & Cloud KPIs \\ \midrule Train split & First 50\% & First 25\% & First 45\% & First 50\% \\ Supervised? & No & No & No & No \\ Threshold & 3.0 & 3.5 & 3.0 & 3.5 \\ \midrule Reference & {\footnotesize \cite{smd}} & {\footnotesize \cite{hundman2018detecting}} & {\footnotesize \cite{hundman2018detecting}} & -- \\ \bottomrule \end{tabular} \caption{Summary of multivariate anomaly detection datasets.} \label{tab:multi_anom_data} \end{table} \subsubsection{Models} We consider two classes of models: statistical methods and deep learning models. For statistical methods, we evaluate Isolation Forest \citep{isolation_forest} and Random Cut Forest \citep{random_cut_forest} as in \S\ref{sec:experiments_uni_anom}. For deep learning approaches, we evaluate an autoencoder \citep{autoencoder}, a Deep Autoencoding Gaussian Mixture Model (DAGMM, \cite{dagmm}), a LSTM encoder-decoder \citep{lstmed}, and a variational autoencoder \citep{vae}. We also consider an ensemble of a Random Cut Forest and a Variational Autoencoder (using the algorithm described in \S\ref{sec:anom_ensemble}). \subsubsection{Results} \begin{table} \small \centering \begin{tabular}{r|cccc|c} \toprule {} & SMD & SMAP & MSL & Int\_MA & $\Delta$ F1 (vs. best) \\ \midrule Isolation Forest & $0.388$ & $0.211$ & $0.226$ & $0.252$ & $0.129 \pm 0.025$ \\ Random Cut Forest & $\bm{0.500}$ & $0.108$ & $0.312$ & $0.313$ & $0.091 \pm 0.110$ \\ \midrule Autoencoder & $0.264$ & $\bm{0.357}$ & $0.355$ & $\bm{0.357}$ & $0.065 \pm 0.114$ \\ DAGMM & $0.191$ & $0.037$ & $0.135$ & $0.182$ & $0.262 \pm 0.067$ \\ LSTM Encoder-Decoder & $0.344$ & $\bm{0.357}$ & $\bm{0.381}$ & $0.301$ & $0.053 \pm 0.074$ \\ Variational Autoencoder & $0.318$ & $0.187$ & $\bm{0.381}$ & $0.322$ & $0.097 \pm 0.093$ \\ \midrule Ensemble (ours) & $0.403$ & $0.291$ & $0.357$ & $0.341$ & $\bm{0.051 \pm 0.038}$ \\ \bottomrule \end{tabular} \caption{F1 scores achieved by multivariate anomaly detection models. All models were evaluated using batch prediction and weekly re-training; we report the best F1 achieved by any of the re-training schedules. We also report the average gap (over datasets) in F1 between each model and the best model. Best results are in \textbf{bold}.} \label{tab:multi_anom_full_results} \end{table} \begin{table} \small \centering \begin{tabular}{r|c} \toprule {} & Weekly \\ \midrule Isolation Forest & $0.006$ ($p = 0.796$) \\ Random Cut Forest & $0.036$ ($p = 0.130$) \\ \midrule Autoencoder & $-0.075$ ($p = 0.352$) \\ DAGMM & $0.057$ ($p = 0.032$) \\ LSTM Encoder-Decoder & $0.001$ ($p = 0.970$) \\ Variational Autoencoder & $0.020$ ($p = 0.286$) \\ \midrule Ensemble (ours) & $-0.032$ ($p = 0.499$) \\ \bottomrule \end{tabular} \caption{Average change in F1 (relative to no re-training) achieved by re-training models weekly. $p$-value is from a 2-sided paired sample $t$-test. The changes are not statistically significant at $p = 0.05$ for any models besides DAGMM.} \label{tab:multi_anom_retrain} \end{table} Table \ref{tab:multi_anom_full_results} reports the revised point-adjusted F1 score achieved by each model. While there is no clear winner across all datasets, our proposed ensemble consistently achieves a small gap in F1 score relative to the best model for each dataset. The LSTM encoder-decoder achieves a similar average gap, but it has a larger variance. Therefore, we believe the ensemble to be a good ``default'' model for new users or early exploration, as it robustly obtains reasonable performance across multiple datasets. Finally, like the univariate case, Table \ref{tab:multi_anom_retrain} shows that the impact of re-training is ambiguous for all the multivariate statistical models considered (first block), as well as the deep learning models (second block). \section{Time Series Forecasting} \label{sec:forecast} In this section, we introduce Merlion's specific univariate and multivariate forecasting models, provide algorithmic details on Merlion's autoML and ensembling modules for forecasting, and describe the metrics used for experimental evaluation in \S\ref{sec:experiments_uni_forecast} and \S\ref{sec:experiments_multi_forecast}. \subsection{Models} \label{sec:forecast_models} Merlion contains a number of models for univariate time series forecasting. These include classic statistcal methods like ARIMA (AutoRegressive Integrated Moving Average), SARIMA (Seasonal ARIMA) and ETS (Error, Trend, Seasonality), more recent algorithms like Prophet \citep{prophet}, our previous production algorithm MSES \citep{mses_apidoc}, and a deep autoregressive LSTM \citep{HochSchm97}, among others. The multivariate forecasting models we use are based on autoregression and tree ensemble algorithms. For the autoregression algorithm, we adopt the Vector Autoregression model (VAR, \cite{multi-var}) that captures the relationship between multiple sequences as they change over time. For tree ensembles, we consider Random Forest (RF, \cite{multi-ho1995random}) and Gradient Boosting (GB, \cite{multi-ke2017lightgbm}) as the base models. However, without appropriate modifications, tree ensemble models can be unsuitable for the general practice of time series forecasting. First, their output is a fixed-length vector, so it is not straightforward to obtain their forecasts for arbitrary prediction horizons. Second, these multivariate forecasting models often have incompatible data workflows or APIs that make it difficult to directly apply them for univariate prediction. To overcome these obstacles, we propose an autoregressive forecasting strategy for our tree ensemble models, RF Forecaster and GB Forecaster. For a $d$-variable time series, these models forecast the value of all $d$ variables in the time series for time $t_k$, and they condition on this prediction to autoregressively forecast for time $t_{k+1}$. We thus enable these models to produce a forecast for an arbitrary prediction horizon, similar to more traditional models like VAR. Additionally, all our multivariate forecasting models share common APIs with the univariate forecasting models, and are therefore universal for both the univariate and the multivariate forecasting tasks. A full list of supported models can be found in the API documentation. \subsection{AutoML and Model Selection} \label{sec:automl} The AutoML module for time series forecasting models is slightly different from autoML for coventional machine learning models, as we consider not only conventional hyper-parameter optimization, but also the detection of some characteristics of time series. Take the $\mathrm{SARIMA}(p,d,q) \times (P, Q, D)_m$ model as an example. Its hyperparameters include the autoregressive parameter $p$, difference order $d$, moving average parameter $q$, seasonal autoregressive parameter $P$, seasonal difference order $D$, seasonal moving average parameter $Q$, and seasonality $m$. While we use SARIMA as a motivating example, note that automatic seasonality detection can directly enhance other models like ETS and Prophet \citep{prophet}. Meanwhile, choosing the appropriate (seasonal) difference order can yield a representation of the time series that makes the prediction task easier for any model. Typically, we first analyze the time series to choose the seasonality $m$. Following the idea from the theta method \citep{assimakopoulos2000theta}, we say that a time series has seasonality $m$ at significance level $a$ if \[ |r_m| > \Phi^{-1}(1-a/2)\sqrt{\frac{1+2\sum^{m-1}_{i=1}r_i^2}{n}}, \] where $r_k$ is the lag-$k$ autocorrelation, $m$ is the number of periods within a seasonal cycle, $n$ is the sample size, and $\Phi^{-1}$ is the quantile function of the standard normal distribution. By default, we set the significance at $a = 0.05$ to reflect the 95\% prediction intervals. Next, we select the seasonal difference order $D$ by estimating the strength of the seasonal component with the time series decomposition method \citep{cleveland1990stl}. Suppose the time series can be written as $y = T + S + R$, where $T$ is the smoothed trend component, $S$ is the seasonal component and $R$ is the remainder. Then, the strength of the seasonality \citep{wang2006characteristic} is \[ F_S = \max\left(0, 1- \frac{\mathrm{Var}(R)}{\mathrm{Var}(S+R)}\right). \] Note that a time series with strong seasonality will have $F_S$ close to $1$ since $\mathrm{Var}(R)$ is much smaller than $\mathrm{Var}(S+R)$. If $F_S$ is large, we adopt the seasonal difference operation. Thus, we choose $D$ by successviely decomposing the time series and differencing it based on the detected seasonality until $F_S$ is relatively small. We can then choose the difference order $d$ by applying successive KPSS unit-root tests to the seasonally differenced data. Once $m$, $D$, and $d$ are selected, we can choose the remaining hyperparameters $p$, $q$, $P$, and $Q$ by minimizing the AIC (Akaike Information Criterion) via grid search. Because the parameter space is exponentially large if we exhastively enumerate all the hyperparameter combinations, we follow the step-wise search method of \citet{hyndman2008automatic}. To further speed up the training time of the autoML module, we propose the following approximation strategy: we obtain an initial list of candidate models that achieve good performance after relatively few optimization iterations; we then re-train each of these candidates until model convergence, and finally select the best model by AIC. \subsection{Ensembles} \label{sec:forecast_ensemble} Ensembles of forecasters in Merlion allow a user to transparently combine models in two ways. First, we support traditional ensembles that report the mean or median value predicted by all the models at each timestamp. Second, we support automated model selection. When performing model selection, we divide the training data into train and validation splits, train each model on the training split, and obtain its predictions for the validation split. We then evaluate the quality of those predictions using a user-specified evaluation metric like sMAPE or RMSE (\S\ref{sec:forecast_eval}), and return the model that achieved the best performance after re-training it on the full training data. These features are useful in many practical scenarios, as they can greatly reduce the amount of human intervention needed when deploying a model. \subsection{Evaluation Metrics} \label{sec:forecast_eval} There are many ways to evaluate the accuracy of a forecasting model. Given a time series with $n$ observations, let $y_t$ denote the observed value at time $t$ and $\hat{y}_t$ denote the corresponding predicted value. Then the forecasting error $e_t$ at time $t$ is $y_t-\hat{y}_t$. Error measures based on absolute or squared errors are widely used, and they are formuated as \[\text{MAE}=\frac{1}{n}\sum^n_{t=1}|e_t|\quad \text{and} \quad \text{RMSE} = \sqrt{\frac{\sum^n_{t=1}e_t^2}{n}},\] respectively. Unfortunately, these measures cannot be compared across time series that are on different scales. To achive scale-independence, one alternative approach is to use percentage errors based on the observed values. One typical measure is sMAPE \citep{makridakis2000m3}, defined as: \[\text{sMAPE} = \frac{1}{n}\sum^n_{t=1}\frac{|e_t|}{|y_t|+|\hat{y}_t|}*200(\%),\] Unfortunately, sMAPE has the disadvantage of being ill-defined if $y_t$ and $\hat{y}_t$ are both close to zero. To address this issue, one alternative measure is MARRE, which is defined as \[\text{MARRE}=\frac{1}{n}\frac{\sum^n_{t=1}|e_t|}{|\max(y_t) - \min(y_t)|}.\] However, MARRE is not always suitable for non-stationary time series, where the scale of the data may evolve over time. Merlion's \texttt{ForecastMetric} enum supports all the above classes of evaluation metrics, as well as others detailed in the API documentation. By default, we evaluate forecasting results by sMAPE, but users may manually specify alternatives if their application calls for it. \section{Introduction} Time series are ubiquitous in monitoring the behavior of complex systems in real-world applications, such as IT operations management, manufacturing industry and cyber security~\citep{hundman2018detecting,Mathur2016,Audibert2020}. They can represent key performance indicators of computing resources such as memory utilization or request latency, business metrics like revenue or daily active users, or feedback for a marketing campaign in the form of social media mentions or ad clickthrough rate. Across all these applications, it is important to accurately forecast the trends and values of key metrics (e.g.\ predicting quarterly sales or planning the capacity required for a server), and to rapidly and accurately detect anomalies in those metrics (e.g.\ an anomalous number of requests to a service can indicate a malicious attack). Indeed, in software industries, anomaly detection, which detects unexpected observations that deviate from normal behaviors and notifies the operators timely to resolve the underlying issues, is one of the critical machine learning techniques to automate the identification of issues and incidents for improving IT system availability in AIOps (AI for IT Operations) \citep{dang2019aiops}. Given the wide array of potential applications for time series analytics, numerous tools have been proposed \citep{alibi-detect, kats, seabold2010statsmodels, gluonts_jmlr, law2019stumpy, random_cut_forest, greykite, prophet, pmdarima}. However, there are still many pain points in today’s industry workflows for time series analytics. These include inconsistent interfaces across datasets and models, inconsistent evaluation metrics between academic papers and industrial applications, and a relative lack of support for practical features like post-processing, autoML, and model combination. All of these issues make it challenging to benchmark diverse models across multiple datasets and settings, and subsequently make a data-driven decision about the best model for the task at hand. This work introduces Merlion, a Python library for time series intelligence. It provides an end-to-end machine learning framework that includes loading and transforming data, building and training models, post-processing model outputs, and evaluating model performance. It supports various time series learning tasks, including forecasting and anomaly detection for both univariate and multivariate time series. Merlion's key features are \begin{itemize} \item Standardized and easily extensible framework for data loading, pre-processing, and benchmarking for a wide range of time series forecasting and anomaly detection tasks. \item A library of diverse models for both anomaly detection and forecasting, unified under a shared interface. Models include classic statistical methods, tree ensembles, and deep learning methods. Advanced users may fully configure each model as desired. \item Abstract \texttt{DefaultDetector} and \texttt{DefaultForecaster} models that are efficient, robustly achieve good performance, and provide a starting point for new users (\S\ref{sec:experiments}). \item AutoML for automated hyperaparameter tuning and model selection (\S\ref{sec:automl}). \item Practical, industry-inspired post-processing rules for anomaly detectors that make anomaly scores more interpretable, while also reducing the false positive rate (\S\ref{sec:post_process}). \item Easy-to-use ensembles that combine the outputs of multiple models to achieve more robust performance (\S\ref{sec:anom_ensemble}). \item Flexible evaluation pipelines that simulate the live deployment \& re-training of a model in production (\S\ref{sec:evaluation}), and evaluate performance on both forecasting (\S\ref{sec:forecast_eval}) and anomaly detection (\S\ref{sec:anom_eval}). \item Native support for visualizing model predictions. \end{itemize} \input{related.tex} \input{architecture.tex} \input{forecast.tex} \input{anomaly.tex} \input{experiments.tex} \section{Conclusion and Future Work} We introduce Merlion, an open source machine learning library for time series, which is designed to address many of the pain points in today's industry workflows for time series anomaly detection and forecasting. It provides unified, easily extensible interfaces and implementations for a wide range of models and datasets, an autoML module that consistently improves the performance of multiple forecasting models, post-processing rules for anomaly detectors that improve interpretability and reduce the false positive rate, and transparent support for ensembles that robustly achieve good performance on multiple benchmark datasets. These features are tied together in a flexible pipeline that quantitatively evaluates the performance of a model and a visualization module for more qualitative analysis. We continue to actively develop and improve Merlion. Planned future work includes adding support for more models including the latest deep learning models and online learning algorithms, developing a streaming platform to facilitate model deployment in a real production environment, and implementing advanced features for multivariate time series analysis. We welcome and encourage any contributions from the open source community. \section*{Acknowledgements} We would like to thank a number of leaders and colleagues from Salesforce who have provided strong support, advice, and contributions to this open-source project. \vskip 0.2in
\section{INTRODUCTION} \begin{comment} Recent advances in Millimeter Wave (mmWave) radar sensing technology have made it a great tool in autonomous vehicles \cite{HawkEye} and search/rescue in high risk areas \cite{mobisys20smoke}. For example, in the areas of fire with smoke and toxic gas and hence low visibility, it is impossible to utilize optical sensors such as LiDAR and camera to find a safe route, and any time delay can potentially cost lives in those rescue scenes. To construct maps in those heavy smoke and dense fog environments, mmWave radar has been shown as an effective sensing tool \cite{mobisys20smoke,HawkEye}. However it is challenging to use mmWave radar signals for object imaging and reconstruction, as their signals are usually of low resolution, sparse, and highly noisy due to multi-path and specularity. A few recent work \cite{HawkEye, superrf,mobisys20smoke} have made some progress in generating 2D images based on mmWave radar. In this paper, we move one step further to tackle a more challenging problem: reconstructing 3D object shapes based on raw sparse and low-resolution mmWave radar signals. \end{comment} The advantage of Millimeter Wave (mmWave) radar in object sensing in low visibility environment has been actively studied recently in applying it in autonomous vehicles \cite{HawkEye} and search/rescue in high risk areas \cite{mobisys20smoke}. However further application of mmWave radar in object imaging and reconstruction is quite difficult due to the characteristics of mmWave radar signals such as low resolution, sparsity, and high noise due to multi-path and specularity. Recent work \cite{HawkEye, superrf,mobisys20smoke} attempt to design deep learning systems to generate 2D depth images based on mmWave radar signals. 3DRIMR \cite{sun20213drimr} further introduces a design that generates 3D object shapes based on mmWave radar, but the end results are still not satisfactory. In this paper, we introduce DeepPoint, a deep learning model that generates 3D objects in dense and smooth point clouds based on the union of multiple rough and sparse input point clouds, which are directly converted from the 2D depth images generated by the Stage 1 of 3DRIMR which takes raw radar data as input. The training of DeepPoint follows conditional GAN architecture, and it significantly outperforms the original 3DRIMR design. The 3DRIMR \cite{sun20213drimr} architecture consists of two stages, and each has a generator network. Stage 1's generator network $\bf{G_{r2i}}$ takes 3D radar intensity data as input and generates 2D depth images; Stage 2's generator network $\bf{G_{p2p}}$ takes as input a set of multiple 2D depth images and outputs the 3D shape of the object in the format of point cloud. Each stage's generator network is jointly trained with a separate discriminator network, using conditional GAN architecture. The design rationale for 3DRIMR architecture is to combine the advantages of Convolutional Neural Network (CNN)'s convolutional operation and the efficiency of point cloud representation of 3D objects, as the former can capture detailed local neighborhood structure of a 3D object, and the latter is more efficient and of higher resolution than 3D shape representation via voxelization. Even though 3DRIMR has shown promising results, its Stage 2's generator network design is still not quite satisfactory. Specifically, the edges of generated 3D objects are still blurry and the points of an object's point cloud tend to evenly distributed in space which do not give a clear sharp shape structure. DeepPoint introduced in this paper replaces the Stage 2 of the original 3DRIMR, and it significantly outperforms 3DRIMR both quantitatively and visually. \begin{comment} , a deep neural network architecture (based on conditional GAN) that takes as input raw mmWave radar sensing signals scanned from multiple different viewpoints of an object, and it outputs the 3D shape of the object in the format of point cloud. The architecture consists of two generator networks in two stages. In Stage 1, generator network $\bf{G_{r2i}}$ takes 3D radar intensity data as inputs and generates 2D depth images. In Stage 2, generator network $\bf{G_{p2p}}$ takes as input a set of four 2D depth images (results from Stage 1) of the object (from four different viewpoints) and generates a dense smooth 3D point cloud of the object. Generator $\bf{G_{r2i}}$ is jointly trained with a discriminator network $\bf{D_{r2i}}$, which fuses 3D radar intensity data and 2D depth images (either generated or ground truth images). In addition, generator $\bf{G_{p2p}}$ is jointly trained with a discriminator network $\bf{D_{p2p}}$. 3DRIMR architecture is designed to combine the advantages of Convolutional Neural Network (CNN)'s convolutional operation and the efficiency of point cloud representation of 3D objects. Convolutional operation can capture detailed local neighborhood structure of a 3D object, and point cloud format of 3D objects is more efficient and of higher resolution than 3D shape representation via voxelization. Specifically, $\bf{G_{r2i}}$ applies 3D convolution operation to 3D radar intensity data to generate depth images. Generator $\bf{G_{p2p}}$ represents a 3D object in point cloud format (unordered point set hence convolutional operation not applicable), so that it can process data highly efficiently (in terms of computation and memory) and can express fine details of 3D geometry. In addition, because commodity mmWave radar sensors (e.g., TI's IWR6843ISK \cite{iwr6843}) usually have good resolution along range direction even without time consuming Synthetic Aperture Radar (SAR) operation, a 2D depth image generated by $\bf{G_{r2i}}$ can give us high resolution depth information from the viewpoint of a radar sensor. Therefore, we believe that combining multiple such 2D depth images from multiple viewpoints can give us high resolution 3D shape information of an object. Our architecture design takes advantage of this observation by using multiple 2D depth images of an object from multiple viewpoints to form a raw point cloud and uses that as input to generator $\bf{G_{p2p}}$. \end{comment} Our major contributions are as follows: \begin{enumerate} \item DeepPoint, a novel generator network that can generate smooth and dense point cloud representation of a 3D object based on the union of multiple rough and sparse point clouds directly converted from the 2D depth images derived from raw mmWave radar sensor data. The generator network utilizes a sequence of DeepPoint blocks or layers to extract essential features of those input point clouds of an object when observed from various viewpoints, even though those input point clouds may contain many incorrect points due to the imperfect generation process of 3DRIMR's Stage 1. \item Novel designs such as a conditional GAN architecture design for the training of DeepPoint, an optimally chosen number of layers and skip connection. Those designs have resulted in the performance improvement over the original 3DRIMR. \item An improved 3DRIMR system implementation that can conduct fast 3D object reconstruction by using a commodity mmWave radar sensor, instead of a slow full-scale SAR scan. The whole system takes advantage of convolutional operation and point cloud based neural network for efficient 3D shape generation with detailed geometry. \end{enumerate} In the rest of the paper, we briefly discuss related work and preliminaries in Sections \ref{sec_related} and \ref{sec_background}. Then we discuss the design of DeepPoint model in Section \ref{sec_design}. Experiment results are given in Section \ref{sec_imp}. Finally the paper concludes in Section \ref{sec_conclusion}. \section{RELATED WORK}\label{sec_related} Frequency Modulated Continuous Wave (FMCW) Millimeter Wave (mmWave) radar sensing has been an active research area in recent years, especially in applications such as person/gesture identification \cite{vandersmissen2018indoor,yang2020mu}, car detection/imaging \cite{HawkEye}, and environment sensing \cite{mobisys20smoke, superrf}. Usually Synthetic Aperture Radar (SAR) is used in data collection for high resolution, e.g., \cite{mamandipoor201460,national2018airport,ghasr2016wideband,sheen2007near}. This paper is built on our recent work \cite{sun20213drimr} on applying mmWave radar for 3D object reconstruction, in which we proposed 3DRIMR system. The deep neural network model proposed in this paper completely replaces the model in the Stage 2 of 3DRIMR, and this new model significantly outperforms the original 3DRIMR. There have been a few recent work on mmWave radar based imaging, mapping, and 3D object reconstruction \cite{HawkEye,superrf,mobisys20smoke,yuan2018pcn,qi2016pointnet}. Our work is inspired by their promising research results, and due to the low cost and small form factor of commodity mmWave radar sensors, we plan to develop a simple and fast 3D reconstruction system to be attached in our UAV SLAM system \cite{sun2020lidaus} for search and rescue in dangerous environment. Besides radar signals, vision community has also been working on learning-based 3D object shape reconstruction \cite{yang20173d,dai2017shape,sharma2016vconv,smith2017improved}, most of which use voxels to represent 3D objects. Our proposed neural network model uses point cloud as a format for 3D objects to capture detailed geometric information with efficient memory and computation performance. PointNet structure is utilized in PCN\cite{yuan2018pcn}, which uses point cloud to reconstruct 3D object shapes, and this structure inspires us to design our model. The novelty of our model is that it has a deeper structure than PCN and skip connections are used for better capture of objects' edges and shapes. In addition, our work adopts a conditional GAN architecture to jointly train a generator and a discriminator for better performance. \begin{comment} HawkEye \cite{HawkEye} generates 2D depth images of an object based on conditional GAN architecture with 3D radar intensity maps obtained by multiple SAR scans along both elevation and azimuth dimensions. Our architecture adopts this design to generate intermediate results used as inputs to a 3D point cloud generator. Different from \cite{HawkEye}, we use data of only two snapshots along elevation dimension when using commodity TI IWR6843ISK sensor \cite{iwr6843}. This is similar to the input data used in \cite{superrf}, but the network of \cite{superrf} outputs just a higher dimensional radar intensity map along elevation dimension, not 2D depth images. \end{comment} \section{Preliminaries}\label{sec_background} \subsection{FMCW Millimeter Wave Radar Sensing and Imaging} \begin{comment} sensor works by periodically transmitting continuous chirps that each linearly sweeps through a certain frequency band \cite{timmwave}. Transmitted signals reflected back from an object in a 3D space will be received by a receiver. Range Fast Fourier Transform (FFT) is conducted on the received waveforms to detect the distance of the object from the radar sensor. In addition, multiple receivers can be arranged horizontally and vertically to form virtual antenna arrays along both dimensions. Then two additional FFTs can be applied to the data to calculate an object's relative angles from the sensor horizontally and vertically, referred to as azimuth angle $\phi$ and elevation angle $\theta$. Those three FFTs together can generate a 3D heatmap or intensity map of the space that represents the energy or radar intensity per voxel, which is written as $x(\phi, \theta, \rho)$. The process of electronically or mechanically steering an antenna array to get high azimuth and elevation angle resolutions is referred to as Synthetic Aperture Radar (SAR) operation. Usually higher resolutions along these two dimensions requires longer SAR operation time given fixed number of transmitters and receivers. However, high range resolution can be achieved even with commodity mmWave radar sensors (e.g., IWR6843ISK \cite{iwr6843}) without time consuming SAR process. In our work, we use IWR6843ISK \cite{iwr6843} operating at $60$ GHz frequency. Different from LiDAR and camera sensors, the data generated by mmWave radar sensors is usually sparse, of low resolution, and highly noisy. Even though SAR can help improve resolution, it is a very slow process, which may not be practical in many application scenarios that require short application response time. The specularity characteristic makes an object's surface behave like a mirror, so the reflected signals from a certain portion of the object will not be received by a receiver (hence missing data). In addition, the multi-path effect can cause ghost points which give incorrect information on the object's shape. For detailed discussions on FMCW mmWave radar sensing, please see \cite{HawkEye,superrf,mobisys20smoke}. However such representations have cubic growth rate in the number of voxel grids, so they are limited to representing low resolution objects. In addition, mesh representations of 3D objects are considered in existing work, e.g., \cite{kong2017using,wang2018pixel2mesh}, but they are also limited by memory cost and are prone to self-intersecting meshes. In addition, even though we can generate the point cloud of an object by directly filtering out mmWave radar 3D heatmaps, such a resulting point cloud usually has very low resolution, being sparse, and with incorrect ghost points due to multi-path effect. Therefore even though it may be acceptable to just use such a point cloud to detect the presence of an object, it is impossible to reconstruct the shape of the object. Our work attempts to solve this problem by using two generator neural networks to produce a smooth dense point cloud based on raw radar data. Other than point clouds, voxel representations are commonly used in 3D reconstruction to represent 3D objects in learning based approaches, for example, \cite{kar2017learning,paschalidou2018raynet,ji2017surfacenet,wu2016learning}, and 3D CNN convolutional operations can be applied to such data models. However such representations have cubic growth rate in the number of voxel grids, so they are limited to representing low resolution objects. In addition, mesh representations of 3D objects are considered in existing work, e.g., \cite{kong2017using,wang2018pixel2mesh}, but they are also limited by memory cost and are prone to self-intersecting meshes. \end{comment} Similar to \cite{sun20213drimr}, we use Frequency Modulated Continuous Wave (FMCW) mmWave radar sensor \cite{timmwave} signals to reconstruct 3D object shapes. Three Fast Fourier Transforms (FFTs) are conducted on received waveforms to generate 3D heatmaps or intensity maps of the space that represent the energy or radar intensity per voxel, written as $x(\phi, \theta, \rho)$. Note that $\phi$, $\theta$, and $\rho$ represent azimuth angle, elevation angle, and range respectively. Same as in \cite{sun20213drimr}, we use IWR6843ISK \cite{iwr6843} operating at $60$ GHz frequency, and for high resolution radar signals, we adopt the Synthetic Aperture Radar (SAR) operation. Unlike data from LiDAR and camera sensor, mmWave radar sensors can only give us sparse, low resolution, and highly noisy data. Partically, incorrect ghost points in radar signals can be generated due to multi-path effect. Reference \cite{HawkEye,superrf,mobisys20smoke} give more detailed discussion on FMCW mmWave radar sensing. \subsection{Representation of 3D Objects} In this work, we adopt point cloud format to represent 3D objects. Even though point cloud format is a standard representation of 3D objects and it is used in learning-based 3D reconstruction, e.g., \cite{fan2017point,qi2016pointnet,qi2017pointnet++}, but CNN convolutional operation cannot be directly applied to a point cloud set as it is essentially an unordered point set. Furthermore, the point cloud of an object that is directly generated by raw radar signals is not a good choice to reconstruct the object due to the radar signal's low resolution, being sparse, and with incorrect ghost points due to multi-path effect. Besides point clouds, voxel representations can also be used in 3D reconstruction \cite{kar2017learning,paschalidou2018raynet,ji2017surfacenet,wu2016learning}, and the advantage of such representation is that 3D CNN convolutional operations can be applied to it. In addition, mesh representations of 3D objects are also used in existing work \cite{kong2017using,wang2018pixel2mesh}. However these two representation formats are limited by memory and computation cost. \begin{comment} In this work, we use point cloud, a widely used format in robotics, to represent 3D objects' geometry (e.g., \cite{mobisys20smoke}). This format has been used in recent work on learning-based 3D reconstruction, e.g., \cite{fan2017point,qi2016pointnet,qi2017pointnet++}. A point cloud representation of an object is a set of unordered points, with each point is a sample point of the object's surface, written as its 3D Cartesian coordinates. Unlike voxelization of 3D objects, a point cloud can represent an object with high resolution but without high memory cost. However, CNN convolutional operation cannot be applied to an unordered point cloud set. \end{comment} \subsection{Review of 3DRIMR Architecture} This paper introduces DeepPoint as the generator and discriminator networks of the Stage 2 of 3DRIMR to generate smooth and dense point clouds. For completeness, we now briefly review 3DRIMR architecture. 3DRIMR consists of two back-to-back generator networks $\mathbf{G_{r2i}}$ and $\mathbf{G_{p2p}}$. In Stage 1, $\mathbf{G_{r2i}}$ receives a 3D radar energy intensity map of an object and outputs a 2D depth image of the object. We let a mmWave radar sensor scans an object from multiple viewpoints to get multiple 3D energy maps. Then $\mathbf{G_{r2i}}$ generates multiple 2D depth images of the object. The Stage 2 of 3DRIMR first pre-processes these images to get multiple coarse point clouds of the object, which are used as input to $\mathbf{G_{p2p}}$ to generate a single point cloud of the object. A conditional GAN architecture is designed for 3DRIMR's training. That is, two discriminator networks $\mathbf{D_{r2i}}$ and $\mathbf{D_{p2p}}$ that are jointly trained together with their corresponding generator networks. Let $m_r$ denote a 3D radar intensity map of an object captured from a viewpoint, and let $g_{2d}$ be a ground truth 2D depth image of the same object captured from the same viewpoint. $\mathbf{G_{r2i}}$ generates $\hat{g}_{2d}$ that predicts or estimates $g_{2d}$ given $m_{r}$. If there are $k$ different viewpoints $v_1, ..., v_k$, generator $\mathbf{G_{r2i}}$ predicts their corresponding 2D depth images $\{\hat{g}_{2d,i} | i = 1, ..., k\}$. Each $\hat{g}_{2d,i}$ can be directly converted to a coarse and sparse 3D point cloud. Then we can have $k$ coarse point clouds $\{P_{r,i} | i = 1, ..., k\}$ of the object. The Stage 2 of 3DRIMR unions the $k$ coarse point clouds to form an initial estimated coarse point cloud of the object, denoted as $P_r$, which is a set of 3D points $\{p_j | j = 1, ..., n\}$. Generator $\mathbf{G_{p2p}}$ takes $P_r$ as input, and predicts a dense, smooth, and accurate point cloud $\hat{P}_r$. Note that since the prediction of $\mathbf{G_{r2i}}$ may not be completely correct, a coarse $P_r$ may likely contain many missing or even incorrect points. The Stage 1's design of 3DRIMR can be found in \cite{sun20213drimr}. Next we discuss our proposed DeepPoint as the network model in the Stage 2 of 3DRIMR. \begin{comment} By leveraging conditional GAN, the architecture's training process consists of two stages: $\mathbf{G_{r2i}}$ and $\mathbf{D_{r2i}}$ are trained together in Stage 1; similarly, $\mathbf{G_{p2p}}$ and $\mathbf{D_{p2p}}$ are trained together in Stage 2. The network architecture and training process are described in more details in Section \ref{sec_stage1}. The design of $\mathbf{G_{r2i}}$ is similar to HawkEye \cite{HawkEye}, but $\mathbf{G_{r2i}}$'s each input radar intensity map only contains two snapshots whereas HawkEye's input radar intensity map has $64$ SAR snapshots along elevation (which gives higher elevation resolution but it takes much longer time to generate those $64$ snapshots). In addition, 2D depth images are the final outcomes of HwakEye, but in our architecture, they are only intermediate results to be used as input for generating 3D object shapes. The design of $\mathbf{G_{p2p}}$ in Stage 2 follows the idea of \cite{yuan2018pcn}, but unlike \cite{yuan2018pcn}, we use a conditional GAN architecture. In addition, our Stage 2's generator network is designed to operate on sparse and only partially correct point clouds. \end{comment} \begin{comment} \begin{figure*}[htb!] \centerline{ \begin{minipage}{3.5in} \begin{center} \setlength{\epsfxsize}{3.4in} \epsffile{figures/net1G.eps}\\ {} \end{center} \end{minipage} \begin{minipage}{3.5in} \begin{center} \setlength{\epsfxsize}{3.4in} \epsffile{figures/net1D.eps}\\ {} \end{center} \end{minipage} } \caption{3DRIMR Stage 1 \cite{sun20213drimr}. The generator $\mathbf{G_{r2i}}$ takes an object's 3D radar intensity map as input and generates a 2D depth image. The discriminator $\mathbf{D_{r2i}}$'s input includes a 3D radar intensity map and a ground truth depth image or a generated 2D depth image. A conditional GAN architecture is used to train both generator and discriminator jointly.} \label{fig_stage_1} \end{figure*} \end{comment} \begin{figure*}[htb!] \centerline{ \begin{minipage}{3.5in} \begin{center} \setlength{\epsfxsize}{3.4in} \epsffile{figures/net2G.eps}\\ {} \end{center} \end{minipage} \begin{minipage}{3.5in} \begin{center} \setlength{\epsfxsize}{3.4in} \epsffile{figures/net2D.eps}\\ {} \end{center} \end{minipage} } \caption{DeepPoint architecture proposed in this paper. The system first pre-processes multiple 2D depth images of an object to get multiple coarse and sparse point clouds, which may contain many incorrect points. Those depth images are generated for the same object but viewed from four different viewpoints. Combining those coarse point clouds we can derive a single coarse point cloud, which is used as the input of the generator $\mathbf{G_{p2p}}$ of DeepPoint. The generator of DeepPoint outputs a dense and smooth point cloud representation of the object. A conditional GAN architecture is used to train both generator $\mathbf{G_{p2p}}$ and discriminator $\mathbf{D_{p2p}}$ jointly.} \label{fig_stage_2} \end{figure*} \section{DeepPoint Design}\label{sec_design} \subsection{Overview} DeepPoint is a generative model to generate a smooth and dense 3D point cloud of an object from the union of multiple coarse point clouds. which are directly converted from 2D depth images of the object observed from different viewpoints. Since those 2D depth images are generated from raw radar energy maps, the union of their converted point clouds may contain many incorrect points due to the imperfect image generation process. DeepPoint's generator network is able to correct those incorrect points and generate a smooth and dense point cloud. This generator can be used as the network in the Stage 2 of 3DRIMR, and it also can be used as an independent network model that works on any rough and sparse input point clouds that contains incorrect points. The training of DeepPoint is a conditional GAN architecture, as shown in Fig. \ref{fig_stage_2}. DeepPoint's generator network $\mathbf{G_{p2p}}$ aims at generating a point cloud of an object with continuous and smooth contour $\hat{P}_r$, from $P_r$, a union of $k$ separate coarse point clouds observed from $k$ viewpoints of the object $\{P_{r,i} | i=1,...,k\}$. \subsection{Generator $\mathbf{G_{p2p}}$} Generator $\mathbf{G_{p2p}}$'s input $P_r$ and output $\hat{P}_r = \mathbf{G_{p2p}}(P_r)$ are 3D point clouds represented as $n \times 3$ matrices, with each row being the 3D Cartesian coordinate $(x, y, z)$ of a point. However, different from the Stage 2's generator in \cite{sun20213drimr}, the input and output point clouds in our work should have the same number of points due to the use of Earth Mover's Distance (EMD) in the loss function design for the training of the generator network. Generator $\mathbf{G_{p2p}}$ consists of a series of blocks that expand an input point cloud $P_r$ into a high dimensional feature and then shrink it into 3-dimensional outputs $\hat{P}_r$. These blocks are referred to as DeepPoint Block, and their designs are inspired by PointNet structure. During the training, a discriminator $\mathbf{D_{p2p}}$ takes $(P_r, P_{true})$ or $(P_r, \hat{P}_r)$ pairs and outputs a score to indicate the difference between them. As shown left part of Fig. \ref{fig_stage_2}, the generator takes the input $P_r$, and converts it into a high-dimensional point feature matrix after passing first 2 DeepPoint blocks, and then decreases the dimension of feature matrices through the following 3 DeepPoint blocks, and finally outputs a new set of 3-dimensional matrix $\hat{P}_r$, which represents the Cartesian coordinate $(x, y, z)$ of a point of the predicted point cloud. The detailed structure of each {DeepPoint} block is shown in the bottom dotted box of Generator in Fig. \ref{fig_stage_2}. It first passes the raw input into a shared MLP, and then concatenates the raw input, i.e., the Cartesian coordinate $(x, y, z)$ of the input point cloud, to form a point feature matrix $F_{P_r}$ with each row representing the local feature of a corresponding point. Then, it applies a point-wise maxpooling on $F_{P_r}$ and extracts a global feature vector $g_{P_r}$. To produce a complete point cloud for an object, we need both local and global features, therefore, we concatenates the global feature $g_{P_r}$ with each of the point features $f_i$ and form another matrix $F'_{P_r}$. \bigskip \noindent \textbf{Remarks.} Note that there are two major differences between the proposed generator network and the generator in Stage 2 of 3DMIMR \cite{sun20213drimr}. First, the proposed generator is ``deeper" than the generator of 3DMIMR as ours has more layers of {DeepPoint} blocks. Second, 3DMIMR uses fully connected layers and apply reshape operation to derive output point cloud from a high-dimensional global feature vector, which can only get an rough overall shape without many fine, local, and detailed characteristics. However, our new generator network design generates an output point cloud from both local and global features and hence can generate fine, local and detailed characteristics of an object. \subsection{Discriminator $\mathbf{D_{p2p}}$} We design an improved discriminator with two-stream inputs, as shown in Fig. \ref{fig_stage_2}. The inputs pass through a simple shared MLP and get expanded into higher dimensional matrices. A point-wise max pooling and an average pooling are used to extract two global feature vectors. Then the two global feature vectors are concatenated to form final global features, which are further concatenated and fed into two fully connected layers to derive a score. The score is used to indicate whether the input is real or fake, i.e., generated point cloud. \subsection{Loss Function} When training the generator network, we concurrently train $\mathbf{D_{p2p}}$ to minimize $\mathcal{L}_{\mathbf{D_{p2p}}}$, and train $\mathbf{G_{p2p}}$ to minimize $\mathcal{L}_{\mathbf{G_{p2p}}}$. $\mathcal{L}_{\mathbf{D_{p2p}}}$ is calculated as the mean MSE (Mean Square Error) of $\mathbf{D_{p2p}}$'s prediction error. The loss function of generator $\mathcal{L}_{\mathbf{G_{p2p}}}$ is a weighted sum, consisting of $\mathcal{L}_{GAN} (\mathbf{G_{p2p}})$, Chamfer loss $\mathcal{L}_{cf}$ between predicted point clouds and the ground truth, and EMD \cite{yuan2018pcn} loss $\mathcal{L}_{emd} (\mathbf{G_{p2p}})$. Note that Chamfer distance \cite{yuan2018pcn} calculates the average closest distance between input and output points. The symmetric version of it is defined as: \begin{equation} \small{ d_{cf}(S_1, S_2) = \frac{1}{|S_1|} \sum_{x \in S_1} \mathop{min}\limits_{y \in S_2} \lVert x-y \rVert_{2} + \frac{1}{|S_2|} \sum_{y \in S_2} \mathop{min}\limits_{x \in S_1} \lVert y-x \rVert_{2} } \end{equation} Then, Chamfer loss isdefined as: \begin{equation} \mathcal{L}_{cf} (\mathbf{G_{p2p}}) = d_{cf}(\hat{P}_r, P_{true}) \end{equation} In addition, Earth Mover's Distance (EMD) \cite{yuan2018pcn} can find a bijection $\phi: S_1 \to S_2$, which can minimize the average distance between pairs of corresponding points. The equation of EMD is: \begin{equation} \small{ d_{emd}(S_1, S_2) = \mathop{min}\limits_{\phi: S_1 \to S_2} \frac{1}{|S_1|} \sum_{x \in S_1} || x-\phi(x) ||_{2} } \end{equation} In our case, EMD loss is calculated as: \begin{equation} \mathcal{L}_{emd} (\mathbf{G_{p2p}}) = d_{emd}(\hat{P}_r, P_{true}) \end{equation} $\mathcal{L}_{\mathbf{G_{p2p}}}$ is given by Eqn. (\ref{eqn_L_G_p2p}). Note that $\lambda_{d_{cf}}$ and $\lambda_{d_{emd}}$ are hand-tuned to 100 and 1 respectively in our experiments. \begin{eqnarray}\label{eqn_L_G_p2p} \mathcal{L}_{\mathbf{G_{p2p}}} &=& \mathcal{L}_{GAN} (\mathbf{G_{p2p}}) + \lambda_{d_{cf}}\mathcal{L}_{cf}(\mathbf{G_{p2p}}) \nonumber \\ &&+ \lambda_{d_{emd}} \mathcal{L}_{emd} (\mathbf{G_{p2p}}) \end{eqnarray} \section{IMPLEMENTATION AND EXPERIMENTS}\label{sec_imp} We implement DeepPoint and use it as Stage 2's generator network of 3DRIMR \cite{sun20213drimr} system. The system first generates 2D depth images from 3D radar intensity maps from multiple views of an object, and then passes these output depth images to the generator network of DeepPoint to produce a 3D point cloud of the object. We now present our experiment results in this section. \subsection{Datasets} We conduct experiments on cars with average size of $445cm \times 175cm \times 158cm$. The input data to the proposed the generator network is the output depth images produced by 3DRIMR's Stage 1. We follow a procedure that is similar to 3DRIMR \cite{sun20213drimr}, to generate ground truth point clouds. Fig. \ref{fig_car_ex} shows an example scene. \begin{comment} In 3DRIMR \cite{sun20213drimr}, due to the reason that there is no publicly available dataset of mmWave radar sensing, we conducted the car experiments on a sythensized dataset. in this paper a novel deep learning model that reconstruct 3D objects in point cloud format Same as 3DRIMR \cite{sun20213drimr}, due to the reason that there is no publicly available dataset of mmWave radar sensing, we conducted the car experiments on a sythensized dataset. To the best of our knowledge, there is no publicly available dataset of mmWave radar sensing, therefore we have conducted experiments to collect real data, and since real data collection is time consuming, we have also augmented our dataset via synthesizing mmWave data as done in \cite{HawkEye}. \noindent \textbf{Real radar data collection.} We collected real radar data with Synthetic Aperture Radar (SAR) operation using an IWR6843ISK \cite{iwr6843} sensor and a data capture card DCA1000EVM \cite{dca1000evm}. To generate a full-scale 3D energy intensity data as a baseline, we first conducted SAR radar scans with a $24\times 64$ virtual antenna array of the sensor, by sliding the sensor horizontally and vertically through a customized slider. Note that the sensor's each scan has a range or depth of $256$ units. We expanded a $24\times 64\times 256$ 3D data cube (obtained via a SAR scan) to a full-scale $64\times 64 \times 256$ 3D data cube, which can be regarded as consisting of $64$ snapshots stacked vertically, with each snapshot being a data plane of size $64\times 256$. Note that the full-scale data is only used as a base reference in validating our 3DRIMR deep learning system's effectiveness. When training and testing 3DRIMR, each actual input data sample has only $2$ snapshots out of $64$ snapshots. Getting $2$ snapshot data is a much faster process than getting full-scale $64$ snapshot data. \noindent \textbf{Synthesized radar data.} Similar to \cite{HawkEye}, we used 3D CAD models of cars \cite{fidler20123d} to generate synthesized radar signals. We first generated 3D point clouds based on those CAD models, and translated and rotated them to simulate different scenarios. Then we selected points in each point cloud as radar signal reflectors. Next we simulated received radar signals in a receiver antenna array based on our radar configuration. \noindent \textbf{Ground truth 2D depth images and point clouds.} For real data, ground truth depth images were obtained via a ZED mini camera \cite{zed}. Note that ZED mini camera is widely used in mobile robots and VR sets. For synthesized data, based on the derived point clouds of CAD models, we generated ground truth depth images after perspective projection with appropriate camera settings and viewpoints. Similarly we generated ground truth 3D point clouds. \noindent \textbf{Generating 3D radar energy intensity data.} For both real and synthesized radar data, we performed FFT along all three dimensions (i.e., azimuth $\phi$ and elevation $\theta$ and range $r$). Note that a radar 3D data cube is measured in degree along azimuth $\phi$ and elevation $\theta$ dimension. We converted a data cube into Cartesian coordinate system so that it matched the coordinate system of the depth camera. This is different from \cite{HawkEye} which directly used original data in spherical coordinate system (hence introduced additional errors). \end{comment} \subsection{Model Training and Testing} We use the 2D depth images generated in the Stage 1 of 3DRIMR to form a dataset of coarse and sparse point clouds, which includes $1600$ point clouds with $200$ point clouds of each car model. We train the proposed generator network and discriminator network for $200$ epochs using $1520$ point clouds with batch size $4$. The learning rate for the first 100 epochs is $2 \times 10^{-4}$ and linearly decreases to 0 in the rest 100 epochs. Then we test the generator network using the remaining $80$ point clouds. Fig. \ref{fig_stage1_car} shows some example results of generated 2D depth images from the Stage 1 of 3DRIMR. \begin{figure}[htb!] \centerline{ \begin{minipage}{2.2in} \begin{center} \setlength{\epsfxsize}{2.2in} \epsffile{figures/car7-obj9/car7-obj9-model.eps}\\ {} \end{center} \end{minipage} } \caption{An example scene of a car.} \label{fig_car_ex} \end{figure} \begin{figure*}[htb!] \begin{minipage}{7.0in} \begin{center} \setlength{\epsfxsize}{1.6in} \epsffile{figures/car6-obj6/radar/car6-cam1-6.eps} \setlength{\epsfxsize}{1.6in} \epsffile{figures/car6-obj6/radar/car6-cam2-6.eps} \setlength{\epsfxsize}{1.6in} \epsffile{figures/car6-obj6/radar/car6-cam3-6.eps} \setlength{\epsfxsize}{1.6in} \epsffile{figures/car6-obj6/radar/car6-cam4-6.eps} \end{center} \end{minipage}\label{fig_car6-obj6_radar}\\ \begin{minipage}{7.0in} \begin{center} \setlength{\epsfxsize}{1.6in} \epsffile{figures/car6-obj6/fake-depth/car6-cam1-6.eps} \setlength{\epsfxsize}{1.6in} \epsffile{figures/car6-obj6/fake-depth/car6-cam2-6.eps} \setlength{\epsfxsize}{1.6in} \epsffile{figures/car6-obj6/fake-depth/car6-cam3-6.eps} \setlength{\epsfxsize}{1.6in} \epsffile{figures/car6-obj6/fake-depth/car6-cam4-6.eps} \end{center} \end{minipage}\vspace{0.05in}\label{fig_car6-obj6_fake-depth}\\ \begin{minipage}{7.0in} \begin{center} \setlength{\epsfxsize}{1.6in} \epsffile{figures/car6-obj6/real-depth/car6-cam1-6.eps} \setlength{\epsfxsize}{1.6in} \epsffile{figures/car6-obj6/real-depth/car6-cam2-6.eps} \setlength{\epsfxsize}{1.6in} \epsffile{figures/car6-obj6/real-depth/car6-cam3-6.eps} \setlength{\epsfxsize}{1.6in} \epsffile{figures/car6-obj6/real-depth/car6-cam4-6.eps} \end{center} \label{fig_car6-obj6_real-depth} \end{minipage} \caption{Example results of generated 2D depth images from the Stage 1 of 3DRIMR. The generated images are used as inputs to DeepPoint (which is used as the Stage 2 of 3DRIMR). The 1st row shows the 3D radar intensity data from 2 snapshots only. The 2nd row shows the outputs from 3DRIMR's Stage 1. The 3rd row shows the ground truth depth images.} \label{fig_stage1_car} \end{figure*} \begin{figure*}[htb!] \begin{minipage}{7.2in} \begin{center} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/fake-pc/3d.eps} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/fake-pc/front.eps} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/fake-pc/side.eps} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/fake-pc/top.eps} \end{center} \end{minipage}\label{fig_car6-obj6-fake-pc}\\ \begin{minipage}{7.2in} \begin{center} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/3drimr-pc/3d.eps} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/3drimr-pc/front.eps} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/3drimr-pc/side.eps} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/3drimr-pc/top.eps} \end{center} \end{minipage}\vspace{0.05in}\label{fig_car6-obj6-out-pc}\\ \begin{minipage}{7.2in} \begin{center} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/out-pc/3d.eps} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/out-pc/front.eps} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/out-pc/side.eps} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/out-pc/top.eps} \end{center} \end{minipage}\vspace{0.05in}\label{fig_car6-obj6-out-pc}\\ \begin{minipage}{7.2in} \begin{center} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/real-pc/3d.eps} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/real-pc/front.eps} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/real-pc/side.eps} \setlength{\epsfxsize}{1.7in} \epsffile{figures/car6-obj6/real-pc/top.eps} \end{center} \end{minipage}\vspace{0.05in}\label{fig_car6-obj6-real-pc}\\ \caption{Example experimental results of the proposed generator network. The 1st row shows the input point clouds of a car from different viewpoints (i.e., inputs to the generator network). The 2nd row shows the output point clouds of 3DRIMR. The 3rd row shows the output point clouds of DeepPoint. The 4th row shows the ground truth point clouds. Counting from the side, the 1st column lists point clouds shown in 3D space. The 2nd column lists the front views of point clouds. The 3rd column shows the side views of point clouds. The 4th column shows the top views of point clouds. } \label{fig_stage2_car_pc} \end{figure*} \subsection{Evaluation Results} \begin{comment} We compare 3DRIMR's results in Stage 1 against HawkEye \cite{HawkEye} as HawkEye's goal is to generate 2D depth images only, and we compare 3DRIMR's final results against a double stacked PointNet architecture of PCN \cite{yuan2018pcn}, as PCN's goal is to generate 3D shapes in point cloud format based on sparse and partial point clouds. Note that PCN does not rely on a GAN-based architecture but uses FoldingNet \cite{yang2017foldingnet}. Example scenes of car and L-Box experiments are shown in Fig. \ref{fig_car_ex} and Fig. \ref{fig_Lbox_ex} respectively. Four colored dots in each figure show four viewpoints of radar sensor or camera. \subsubsection{Stage 1 results} We show 3DRIMR's performance in car experiments in Fig. \ref{fig_stage1_car}. We see that visually 3DRIMR can accurately predict an object's shape, size, and orientation, and it can also estimate the distances between an object's surface points and radar receiver. Although most of our training data is synthesized data, 3DRIMR can still predict depth images well based on the real data. We observe similar performance from the experiments with L-Box. Note that we only use 2-snapshot 3D intensity data in our experiments whereas HawkEye \cite{HawkEye} uses $64$ SAR snapshots along elevation, but our system's Stage 1 results are still comparable with those of HawkEye. To prove that, we evaluate the same metrics as those in \cite{HawkEye}. Table \ref{stage1-res-table} shows the median errors of 3DRIMR's Stage 1 results compared against those in \cite{HawkEye}. Since the size of L-box is different from the size of cars, we scale it to the average size of cars when calculating length, width, and height errors. In the comparison, we calculate the average errors of HawkEye's three experiment settings (i.e., clean air, fog, and synthesized data). Table \ref{stage1-res-table} shows that our system outperforms HawkEye in terms of range and orientation prediction. Compared with HawkEye, our car predication's length error is $29\%$ larger, and our L-box prediction's length error is about $50\%$ smaller. The errors in height and $\%$ Fictitious Reflections in both our car prediction and HawkEye's are very similar, but these errors in our L-box prediction are $67\%$ and $89\%$ smaller. The errors in width and $\%$ Surface Missed of ours and HawkEye are similar. In sum, 3DRIMR Stage 1's performance is comparable with that of HawkEye. Recall that Stage 1's results are just 3DRIMR's intermediate results. Next we evaluate 3DRIMR's final prediction results. \renewcommand{\arraystretch}{1.5} \begin{table*}[tp] \centering \fontsize{6}{8}\scriptsize \begin{tabular}{|c||c|c|c|c|c|c|c|} \hline Method&Error in Ranging&Error in Length&Error in Width&Error in Height&Error in Orientation&\% Fictitious Reflections&\% Surface Missed\cr \hline \hline 3DRIMR-Cars &16 cm &84 cm &37 cm &10 cm & \bm{$4.8^{\circ} $} &1.9 \% &15.4 \% \cr\hline 3DRIMR-Lbox-scaled &{\bf 8 cm}&{\bf 32 cm} &{\bf 34 cm}&{\bf 3 cm } &$12.4^{\circ} $ &{\bf 0.2 \%}&16.1 \% \cr\hline HawkEye-avg &34 cm &65 cm &37 cm &9 cm & $28.7^{\circ} $ &1.8 \% &{\bf 12.8 \% }\cr\hline \end{tabular} \captionsetup{font={scriptsize}} \caption{Quantitative Results of 3DRIMR's Stage 1, compared with HawkEye \cite{HawkEye}.} \label{stage1-res-table} \end{table*} \end{comment} In this section, we compare our generator network performance with the original 3DRIMR \cite{sun20213drimr} since both of them aim at reconstructing objects' 3D point clouds from sparse radar data. We also validate our design choices for generator and discriminator networks by controlled experiments. We conduct experiments by varying the number of layers, i.e., DeepPoint blocks, in our proposed generator network model. Specifically, as shown in Table \ref{tab_stage2_results_all}, we tested $1, 2, 5$ and $7$ layers of DeepPoint blocks in our generator network. \renewcommand{\arraystretch}{1.5} \begin{table}[tp] \centering \fontsize{6.5}{8}\scriptsize \begin{tabular}{|c|c|c|c|c|c|c|} \hline \multirow{2}{*}{Method}& \multicolumn{2}{c|}{CD}&\multicolumn{2}{c|}{EMD}&\multicolumn{2}{c|}{ F-score}\cr\cline{2-7} &avg.&std.&avg.&std.&avg.&std.\cr \hline \hline 3DRIMR & 7.89 &4.11 & - & - & 8.41 & 3.22 \cr\hline 1-Block, w/o sc & 10.10 &4.49 & 5.01 & 4.24 & 8.40 & 3.40 \cr\hline 1-Block & 9.75 &4.00 &4.56 &3.96 &8.47 &3.44 \cr\hline 2-Block & 9.40 &4.70 &4.83 &4.84 &9.40 &4.22 \cr\hline 5-Block & 7.79 &4.37 & {\bf 4.40 } & 4.49 & 13.10 & 5.97 \cr\hline 7-Block & {\bf 7.68} & 4.15 & 4.53 & 4.19 &{\bf 13.23} & 6.34 \cr\hline 7-Block + 3sc & 9.13 & 4.55 & 4.66 & 3.88 & 10.70 & 4.90 \cr\hline \end{tabular} \captionsetup{font={scriptsize}} \caption{Quantitative results under different setups. Note that the units of CD and EMD in this table are cm, and the magnitude of F-score is $10^{-2}$.} \label{tab_stage2_results_all} \end{table} \subsubsection{Comparison with 3DRIMR} In Table \ref{tab_stage2_results_all}, we can see the our generator network with 5-Block and 7-Block significantly outperforms the original 3DRIMR in terms of both Chamfer Distance (CD) and F-score. Note that EMD results are not available for 3DRIMR. In addition, Fig. \ref{fig_stage2_car_pc} demonstrates that the visual improvement of output point clouds is even more obvious. This is because 3DRIMR can only reconstruct an overall shape of the object whereas our proposed generator network can recover more fine details of the shape, e.g., correct orientation, and the shapes of wheels of the car. This significant improvement is due to the ``deeper" structure of the generator network, the optimal number of DeepPoint blocks, the introduction of skip connections, and the use of a more efficient training loss metric, i.e., Earth Mover's Distance (EMD). \subsubsection{Performances of different layers of DeepPoint Blocks} The DeepPoint blocks in our generator network first expand each input point's dimension and then shrink them back to 3 to get each output point's coordinates. The more such DeepPoint blocks means the generator network is ``deeper", which seems achieve better performance. However, this is not always true. There exists an optimal number of layers. As shown in Fig. \ref{stage2_bar_pb}, the performance of our generator improves with the number of DeepPoint blocks increasing, i.e., CD decreases from 9.8 cm to 7.8 cm and EMD decreases from 4.6 cm to 4.4 cm as the number of DeepPoint Blocks increases from 1 to 5. Correspondingly, F-score is even improved around $55\%$. However, after the number of DeepPoint blocks reaches an upper bound, say 5 in our experiment, further increasing the number of DeepPoint blocks to 7 can no longer largely improve the performance. We can see that all these 3 evaluation metrics are very similar in these two cases. \begin{figure*}[htb!] \centerline{ \begin{minipage}{7.2in} \begin{center} \setlength{\epsfxsize}{2.2in} \epsffile{figures/results/cd.eps} \setlength{\epsfxsize}{2.2in} \epsffile{figures/results/emd.eps} \setlength{\epsfxsize}{2.2in} \epsffile{figures/results/f-score.eps}\\ {} \end{center} \end{minipage} } \caption{Comparison of different numbers of DeepPoint blocks used in the design of the generator network.} \label{stage2_bar_pb} \end{figure*} \subsubsection{Skip Connections in Generator Network} As shown in Fig. \ref{fig_stage_2}, we can see inside each DeepPoint block, we concatenate the raw input points' Cartesian coordinates with feature matrix obtained by passing through the shared MLP to further form the point features. Our experiment results (e.g., Table \ref{tab_stage2_results_all}) clearly show that such skip connection design can improve the performance. However, blindly increasing skip connections will not always help. As shown in another experiment in which we build 3 more skip connections by concatenating the 1st and 7th point features, 2nd and 6th point features, and 3rd and 5th point features respectively. However, based on the results shown in Table \ref{tab_stage2_results_all}, we can see that with these additional skip connections, generator performs worse compared with the case without using them. In our future work, we will investigate an optimal placement of skip connections. \subsubsection{Variants of Discriminator} In our discriminator network design, we use mix pooling to extract the global feature vectors. Mix pooling means that we concatenate the feature vectors from both max pooling and average pooling. We compare the results of using max pooling, average pooling and mix pooling in the discriminator in Table \ref{tab_stage2_D}. Note that the generators in these 3 experiments are the same. Table \ref{tab_stage2_D} shows that mix pooling performs best among these three pooling methods, and max pooling falls a little behind average pooling method. \renewcommand{\arraystretch}{1.5} \begin{table}[tp] \centering \fontsize{6.5}{8}\scriptsize \begin{tabular}{|c|c|c|c|c|c|c|} \hline \multirow{2}{*}{Method}& \multicolumn{2}{c|}{CD}&\multicolumn{2}{c|}{EMD}&\multicolumn{2}{c|}{ F-score}\cr\cline{2-7} &avg.&std.&avg.&std.&avg.&std.\cr \hline \hline Mix Pooling &{\bf 9.75} &4.00 &{\bf 4.56} &3.96 &{\bf 8.47} &3.44 \cr\hline Max Pooling &10.52 &4.80 &4.79 &4.33 & 7.29 & 2.71 \cr\hline Average Pooling &10.28 &4.11 &4.60 &4.11 &7.71 & 3.18 \cr\hline \end{tabular} \captionsetup{font={scriptsize}} \caption{Quantitative Results of Stage 2 using different pooling methods in the discriminator. Note that the units of CD and EMD in this table are cm, and the magnitude of F-score is $10^{-2}$.} \label{tab_stage2_D} \end{table} \begin{comment} \subsubsection{PointNet VS PointNet++} PointNet++ \cite{qi2017pointnet++} is a hierarchical point clouds feature learning method. It first learns and grabs the global feature of points within a small sphere with radius $r$, rather than the whole point cloud as used in PointNet \cite{qi2016pointnet}. Hence, it can capture more local features of a point cloud. The results of using a based network and a based network in our reconstruction experiment are shown in Table. , their evaluation metrics are very similar. Note that we use 1024-point point cloud data in this control experiment due to the reason that training a PointNet++ based network is very time-consuming even on the training data with such few points. In my opinion, the reason of above phenomenon is because our input point clouds have many ghost/fake points, so the feature extracted by a sphere full of lots of such ghost/fake points can't help to reconstruct the final 3D object shape. \end{comment} \section{CONCLUSIONS AND FUTURE WORK}\label{sec_conclusion} We have proposed DeepPoint, a deep learning model that generates 3D objects in smooth and dense point clouds. It utilizes a sequence of novel DeepPoint blocks to extract essential features of the union of multiple rough and sparse input point clouds of an object when observed from various viewpoints, even though the inputs contain many incorrect points. It relies on a deep structure design, an optimally chosen number of DeepPoint blocks, and skip connections to achieve good 3D reconstruction performance. For future work, we will find the optimal placement of skip connections and introduce new techniques to improve the detailed geometry of generated point clouds. We will also conduct large scale experiments to improve our design. \newpage \bibliographystyle{IEEEtran}
\section{Introduction} \label{sec:intro} \input{separated_files/introduction.tex} \section{Related Work} \label{sec:relwork} \input{separated_files/related_work.tex} \section{The datasets} \label{sec:dataset} \input{separated_files/dataset.tex} \section{Link prediction based on social circles} \label{sec:prediction_algorithm} \input{separated_files/methods.tex} \section{Evaluation} \label{sec:evaluation} \input{separated_files/evaluation.tex} \section{Conclusion} \label{sec:conclusion} \input{separated_files/conclusion.tex} \ifCLASSOPTIONcaptionsoff \newpage \fi \bibliographystyle{IEEEtran} \subsection{Training and test data} \label{sec:train_test} For obtaining longitudinal data, we downloaded (December 2019) the Twitter timeline of the gamers in $E_e$ one year and a half after the initial download, and timeline of the generic users in $E_e$ eight years after the initial download. We then identified the links between gamers in the gaming-related dataset and between generic users in the generic users dataset that have appeared in the meanwhile. These new 843 links between gamers and new 1216 links between generic users constitute the set $E_{new}$ of links to be predicted, while $E_{old}$ contains the links existing in the first temporal snapshot. While the above considerations are sufficient for unsupervised link prediction, with supervised learning we also need to assign the negatives (i.e., missing links) to the train and test sets. To this aim, we split them 90\%-10\% between train and test. Clearly, the set of edges selected for test set may offer only a partial view of the performance (i.e, they may be easier or harder than average to predict). For this reason, we perform a $k$-fold cross-validation~\cite{Lu2011}, with $k=10$, each time selecting a new 10\% of the negative links for the test set. The performance metrics are aggregated via microaveraging~\cite{Forman2010}. Using the 90\% of negatives for training entails training supervised schemes on millions of negatives and only thousands of positives (Table~\ref{tab:dataset_summary_inactive_gamers}, Table~\ref{tab:dataset_summary_inactive_generic_users}). While the impact of class imbalance is typically limited for similarity-based unsupervised approaches like the ones discussed in Section~\ref{sec:unsupervised}, it can create serious problems for the scalability and reliability of supervised learning. In order to mitigate the problem, the common approach in the related literature~\cite{Hasan2006,Wang2011,Zhang2018} is to undersample the negative class. Despite its widespread use, this technique is not without drawbacks~\cite{Yang2015}. In order to provide reliable measurements, we will show both the results obtained with undersampling (Section~\ref{sec:results_supervised}) and the results obtained with the complete negative class (Appendix~\ref{app:supervised_additional}\iftoggle{ONEFILE}{}{ of the SM~\cite{toprak2021harnessing-power}}). \subsection{Evaluation metrics} \label{sec:metrics} Similarly to the related literature~\cite{Liben-Nowell2007,Zhu2016,Lu2011}, unsupervised link prediction algorithms are evaluated using a top-K analysis, i.e., we compare their performance in predicting $K$ new links. This allows for a fair comparison among the different approaches, as it avoids fixing a similarity threshold for approaches in which the same threshold may have a different meaning. In order to span a reasonable $K$ range around the number of positives in the test set (which, as we discussed in Section~\ref{sec:train_test}, are 843 and 1216, for the gaming and generic users datasets respectively), we consider $K \in \{100, 843, 1000\}$ for the gaming-related dataset and $K \in \{100, 1216, 1500\}$ for the generic users dataset. For a given slice $\omega$ and for a fixed~$K$, each unsupervised link predictor described in Section~\ref{sec:unsupervised} outputs a list $L_{\omega}^{K}$ of $K$ pairs in $V_{e} \times V_{e} - E_{old}$, which are the newly predicted links (each with its associated confidence in prediction, which, in our case, is the similarity value). Then we can compute classic metrics such as: \begin{itemize} \item $TP = | L_{\omega}^{K} \cap E_{new} |$ \item $FP = | L_{\omega}^{K} - E_{new} |$ \item $FN = | E_{new} - L_{\omega}^{K} |$ \item $TN = | V_{e} \times V_{e} - E_{old}| - | L_{\omega}^{K} \cup E_{new}|$. \end{itemize} Supervised approaches automatically label all the elements in the test set (without the need to set the $K$ or a similarity threshold), hence the number of positives predicted is part of the workings of the supervised approach. In this case, thus, we do not pick the top $K$ potential edges, but we directly rely on the labelling of the trained predictor for the test edges. It is then straightforward to compute the above metrics (for example, $TP$s are those edges in $E_{new}$ that are marked as \emph{new} by the supervised prediction algorithm). The related literature on evaluating systems with class imbalance suggests using metrics like precision ($=\frac{TP}{TP + FP}$), recall (aka TPR) and $F_{1}$ score. As already argued by~\cite{Wang2011}, in the context of link prediction, precision is more important than the other metrics (such as recall), because if the precision is high, one can live with some false negatives. Therefore, the focus of this evaluation will be mostly on precision. For the completeness of results, we also provide, when relevant, the AUC of the precision-recall curve. The results for the F1 score can be found in Appendix~\ref{app:supervised_additional}\iftoggle{ONEFILE}{}{ of the SM~\cite{toprak2021harnessing-power}}. Precision and recall are evaluated based on metrics (TP, FP, TN, FN) which corresponds to specific realizations of a target phenomenon. Thus, the question arises of how confident we can be about the results obtained on a particular collection that is the result of random sampling (as in the case of cross-validation or subsampling of negatives for supervised prediction). To quantify this confidence, we use credible intervals~\cite{Goutte2005}. For further details, please refer to Appendix~\ref{app:evaluation_setup}\iftoggle{ONEFILE}{}{ of the SM~\cite{toprak2021harnessing-power}}. \subsection{Experimental setup} \label{sec:evaluation_setup} We are interested in comparing the performance obtained using the baseline approach (no social circles information, all edges are considered) and the other strategies in which only edges belonging to the ego network circles are considered. The majority of egos in our datasets feature approximately five circles in their ego networks (Appendix~\ref{sec:results_egonets}\iftoggle{ONEFILE}{}{ of the SM~\cite{toprak2021harnessing-power}}, Figure~\ref{fig:optimal_circle_distr}). For this reason, in our circle-based slicing we will consider circles from C1 to C5, then we group together into the \textsc{Active} circle all the circles beyond C5 (for those nodes that have more than five circles). Note that, since social layers are concentric and the $i$-th also include the $(i-1)$-th up to the first one, for egos with less than five circles the predictions in, e.g. C5, are simply based on the last non-empty social layer (which includes all the innnermost ones). Recall that the alters in the \textsc{Active} circle are all those with a \emph{significant} relationship with the ego, i.e, they interact with the ego at a frequency of at least one contact per year~\cite{Zhou2005}. We denote with $\textsc{All}$ the situation in which all relationships are considered, which implies considering both the nodes in the \textsc{Active} circle (significant bonds) and those outside (acquaintances). This corresponds to the baseline from the related literature: all relationships are treated as equal, without factoring in the role of social circles. As anticipated in Section~\ref{sec:prediction_algorithm}, we will consider two scenarios. In the first one, denoted as \textsc{AllEdges}, we consider the full graph $\mathcal{G}$, slicing it based on the social circles both in the gaming-related dataset and the generic dataset. In the second one (\textsc{DomainSpecificEdges}), we perform both social-based and category-based slicing, by only retaining edges between nodes that are domain-specific (i.e., gamers and games, in our case) with the gaming-related dataset. \subsection{Evaluation of unsupervised link prediction} \label{sec:results_unsupervised} We start the evaluation with the unsupervised case. Note that credible intervals are not provided here, because in the unsupervised case there is no sampling of negatives and the links to be predicted are, deterministically, those that have actually appeared between the first and second download. \begin{figure} \centering \subfloat[Gaming-related dataset \label{fig:allk_precision_alledges_a}] {\includegraphics[width=0.4\textwidth] {./figures/figures_liga/3_unsupervised_precision_alledges.png}} \hfill \subfloat[Generic users dataset. \label{fig:allk_precision_alledges_b}] {\includegraphics[width=0.4\textwidth] {./figures/figures_generic_users/3_unsupervised_precision_alledges.png}} \hfill \caption{Precision in unsupervised settings - \textsc{AllEdges}.} \vspace{-10pt} \label{fig:allk_precision_alledges} \end{figure} \subsubsection{The \textsc{AllEdges} case with the gaming-related dataset} The precision\footnote{Note that the generally low precision values are due to the high class imbalance in the dataset. The benchmark random predictor (the always positive one), in the same settings, would achieve an even worse performance, approximately equal to $2*10^{-4}$.} for varying $K$ (number of new links recommended) is shown in Figure~\ref{fig:allk_precision_alledges_a}. The maximum precision across all policies decreases when we increase $K$: the more the links recommended, the more the mistakes (as it is generally the case in the related literature). RA clearly outperforms the others in the gaming-related dataset, and this is consistent with previous findings in the related literature~\cite{Lu2010}. RA seems to benefit significantly from circle-awareness. Specifically, ignoring the outer circle gives a clear advantage to RA, which at least doubles its precision for all $K$ values. Thus, the mechanism whereby high-degree penalization and social-awareness work hand in hand is very effective from a link prediction standpoint. It is also interesting to note that this advantage seems lost when only the innermost circle is considered. However, leveraging only the innermost circle C1 means using very little information (only a few links per ego, as can be seen in Figure~\ref{fig:c5_alter_distr}, Appendix~\ref{sec:results_egonets}\iftoggle{ONEFILE}{}{ of the SM~\cite{toprak2021harnessing-power}}). This can be an advantage in case of resource limitations (in terms of computational time, computing the similarity is faster on smaller neighborhoods, as we discuss in Appendix~\ref{app:complexity_analysis}\iftoggle{ONEFILE}{}{ of the SM~\cite{toprak2021harnessing-power}}). In such cases, we can have a good prediction (still better than that at $\textsc{All}$) by using only C1. Thus, the predictive power of using only the most intimate relationships unexpectedly outperforms baselines relying on \emph{all} relationships. The drastically different performance of AA with respect to RA in Figure~\ref{fig:allk_precision_alledges_a} tells us that the way we penalise high-degree nodes impacts on the effect that social circle information has on link prediction effectiveness. However, it is interesting to note that while in general RA is better than AA, this is not the case when resource constraints are considered. When only the most intimate links are kept in the ego networks, AA performs at its best and its precision is not only equivalent to that of RA, but also comparable to the precision of RA in the baseline (\textsc{All}). In this case, then, strong degree penalization seems to be less important than strong intimacy. The Common Neighbors policy performs quite similarly to AA, even if, in CN, all neighbors contribute the same to the similarity score, regardless of their degree. This is evidence that here AA is working in a regime in which all nodes weight approximately the same (i.e., its logarithmic degree penalization is not enough). Given the similarity with AA, the same considerations we made for AA hold for CN. Finally, we highlight the poor precision of the Jaccard-based strategy, for all $K$s and for all circles in the gaming-related dataset. Jaccard similarity gives more weight to neighborhoods that are very similar to each other. This means that not only the overlapping part is considered, but also the number of nodes that are not in common (union of neighbors). As testified by the plots, this restriction does not give an advantage for link prediction in the gaming-related dataset. With respect to social-circles awareness, Jaccard seems to suffer from using only the intimate relationships, while using the \textsc{Active} layer yields the same precision as the the baseline \textsc{All} while saving computational resources. We report in Table~\ref{tab:auc_alledges_liga} the Area Under the prediction-recall Curve. Recall that the AUC is not dependent on $K$, since it is obtained by exploring the whole range of similarities for making recommendations. When considering the relation between precision and recall through the AUC, we observe that the best overall results (values underlined in the table) are achieved by RA that leverages C4 and C5. Looking at the layers that, for each policy, provide the best AUC, we note that the \textsc{All} case (which is the baseline for similarity-based policies from the related literature) is never the best performing. From the circle-awareness standpoint, there seem to exist two classes of policies, those that benefit most from using the outermost circles and those that benefit from the innermost ones. \begin{table}[t] \centering \caption{\textsc{AllEdges} scenario with gaming-related dataset: AUC ($\times 10$) for the precision-recall curve of unsupervised link prediction. \textmd{We highlight in \textbf{bold} the social layer in which each policy performs at its best. We \underline{underline} the best two AUC overall.}} \footnotesize \resizebox{0.48\textwidth}{!}{\begin{tabular}{@{}llllllll@{}} \toprule & \multicolumn{7}{c}{\textbf{AUC} ($\times 10$)} \\ \cmidrule{2-8} & C1 & C2 & C3 & C4 & C5 & \textsc{active} & \textsc{all} \\ \midrule RA & 0.01179 & 0.03162 & 0.04699 & \underline{\textbf{0.05364}} & \underline{0.05162} & 0.03641 & 0.01916 \\ AA & \textbf{0.02148} & 0.00749 & 0.01023 & 0.01169 & 0.01270 & 0.01372 & 0.01122 \\ CN & \textbf{0.01914} & 0.00540 & 0.00764 & 0.00902 & 0.01000 & 0.01144 & 0.00924 \\ JC & 0.00332 & 0.00448 & 0.00648 & 0.00813 & 0.00927 & \textbf{0.01007} & 0.00969 \\ \bottomrule \end{tabular}} \label{tab:auc_alledges_liga} \end{table} \subsubsection{The \textsc{AllEdges} case with the generic users dataset} Similarly to the gaming-related dataset, we observe that the maximum precision across all policies decreases when we increase $K$ (Figure~\ref{fig:allk_precision_alledges_b}). In this case, though, the baseline results (i.e., those without social-awareness) are different: while, for the gamers network, RA was already the best predictor in the \textsc{All} case, here we observe a generalised advantage of the JC approach for all $K$ values. Given this different starting point, let us study how the prediction policies react to circle-awareness. RA preserves the characteristics we observed for the gamers, and still very much benefits from social-awareness: all the circle-based scenarios have better or comparable precision than the baseline \textsc{All}. Note that, as mentioned in the gaming-related dataset results, even if the prediction precision is similar -- as it is the case in Figure~\ref{fig:allk_precision_alledges_b} for C1 and \textsc{All} with large $K$ -- using the most intimate links in C1 gives us the advantage of smaller computation time against traditional methods (see Appendix~\ref{app:complexity_analysis}\iftoggle{ONEFILE}{}{ of the SM\cite{toprak2021harnessing-power}} for a thorough discussion). Turning our attention from RA to AA, Figure~\ref{fig:allk_precision_alledges_b} shows that AA performs significantly better compared to what we observed for the gaming-related dataset: here, AA substantially mimics the performance of RA, both in terms of achieved precision and in terms of social circles in which it performs best (specifically, around C4). Interestingly, AA was mimicking instead the performance of CN in the gaming-related dataset, with peak performance in C1 and a generally poor precision both in the other social circles and in the baseline \textsc{All}. The fact that this difference is due to the different structural properties of the generic users graph with respect to the gamers one follows directly from the definitions of RA, AA, and CN in Section~\ref{sec:unsupervised}. Indeed, all the three policies are based on the principle that the more the common neighbors, the better for link prediction. Then, in CN all common neighbors weight the same, while in AA and RA the common neighbors with high degree weight less (much less in RA than in AA, since in RA the penalization is linear while in AA it is logarithmic) than those with small degree. The fact that the performance of AA is approaching that of RA implies that the degree of the common neighbors is not very high (hence the logarithmic penalization of AA and the linear one of RA are in a regime in which they yield similar scores). Taking into account the degree of the common neighbors still provides an advantage, though, as highlighted by the worse performance of CN with respect to AA and RA. As a final remark, note that while JC is performing extremely well with the generic users dataset in the baseline \textsc{All}, its performance rapidly deteriorates as we incorporate circle information. This tendency was already present in the gamers datasets (Figure~\ref{fig:allk_precision_alledges_a}) but was somewhat masked by the generally poor precision achieved by JC regardless of the circle/baseline considered. It is interesting to speculate on why circle-awareness does not help JC in general. To this aim, let us consider the definition of the Jaccard similarity in Section~\ref{sec:unsupervised}. JC captures the fraction of common neighbors out of all neighbors for a pair of users $i,j$. Thus, its very nature requires ``useless'' neighbors (i.e. those that are not in common) to be present, in order to differentiate between high and low neighborhood overlap. However, the slicing based on social-circles effectively remove ``useless'' nodes, hence impairing the discriminating capabilities of the JC score. In Table~\ref{tab:auc_alledges_generic_users}, we report the Area Under the prediction-recall Curve for the generic uses dataset. Again, recall that the AUC captures the trade-off between precision and recall and that it is not dependent on the specific $K$ value considered, as it spans the whole $K$ range. The best overall precision-recall performance is achieve by RA when it leverages social information in C5. The second best AUC is provided by JC in the baseline case (no circle-awareness). AA and CN provides the highest AUC when leveraging C5 information. Overall, from the results in Table~\ref{tab:auc_alledges_generic_users}, we can thus conclude that, even though the advantage of circle awareness is less evident in the generic users dataset, it still outperforms non-circle-related approaches. \begin{table}[t] \centering \caption{\textsc{AllEdges} scenario with generic users dataset: AUC ($\times 10$) for the precision-recall curve of unsupervised link prediction. \textmd{We highlight in \textbf{bold} the social layer in which each policy performs at its best. We \underline{underline} the best two AUC overall.}} \footnotesize \resizebox{0.48\textwidth}{!}{\begin{tabular}{@{}llllllll@{}} \toprule & \multicolumn{7}{c}{\textbf{AUC} ($\times 10$)} \\ \cmidrule{2-8} & C1 & C2 & C3 & C4 & C5 & \textsc{active} & \textsc{all} \\ \midrule RA & 0.03028 & 0.05755 & 0.10289 & 0.14233 & \underline{\textbf{0.15142}} & 0.13941 & 0.09313 \\ AA & 0.02730 & 0.04987 & 0.07930 & 0.11554 & \textbf{0.12075} & 0.10057 & 0.06273 \\ CN & 0.01106 & 0.01914 & 0.03093 & 0.04678 & \textbf{0.04714} & 0.04171 & 0.03088 \\ JC & 0.00927 & 0.01737 & 0.03573 & 0.07824 & 0.10735 & 0.12498 & \underline{\textbf{0.14390}} \\ \bottomrule \end{tabular}} \label{tab:auc_alledges_generic_users} \end{table} \subsubsection{The \textsc{DomainSpecificEdges} case} Recall that, in this case, for any social-based slicing, we also remove all nodes (and associated edges) that are not domain-specific (this is only relevant to the gaming-related dataset). All the nodes left after this additional, category-based slicing are either gamers or games, i.e., they belong to the specific community for which we are making link recommendations. Making a link prediction is now much easier, because the network has been pruned by nodes potentially irrelevant or misleading. Indeed, as shown in Figure~\ref{fig:allk_precision_domainedges_liga}, the precision of AA and CN significantly improves with respect to the \textsc{AllEdges} scenario in Figure~\ref{fig:allk_precision_alledges_a}. This improvement is also present when no social-circle information is used (\textsc{All} circle in Figure~\ref{fig:allk_precision_alledges_a}). This implies that when social-circle awareness is not used for prediction, leveraging the category information provides a significant advantage. Vice versa, social-circles awareness seem to make information on the category unnecessary. Since the extraction of user categories typically requires a domain-specific classifier or manual labelling, being able to skip this phase without affecting the link prediction quality would be very important. The precision of the Jaccard-based approach remains very low also when considering domain-specific edges only. We conclude this part on the \textsc{DomainSpecificEdges} scenario by analysing the AUC of the precision-recall curve, reported in Table~\ref{tab:auc_domainedges_liga}. Table~\ref{tab:auc_domainedges_liga} shows that, also in this case, the best performance is achieved by RA in the outermost circles (specifically, \textsc{Active} and C5). We observe again the duality of behaviours with respect to the gain from social-circles awareness: RA and AA achieve their best AUC in \textsc{Active}, CN and JC in C1. The baseline \textsc{All} is never optimal (neither from an absolute standpoint nor for specific policies). This further confirms the advantage of using social circle awareness in general. \begin{figure}[t] \centering \includegraphics[width=0.4\textwidth]{./figures/figures_liga/3_unsupervised_precision_domainedges.png} \caption{Precision in unsupervised settings - \textsc{DomainEdges} (only relevant to the gaming-related dataset).} \label{fig:allk_precision_domainedges_liga} \end{figure} \begin{table}[t] \centering \caption{\textsc{DomainEdges} scenario with gaming-related dataset: AUC ($\times 10$) for the precision-recall curve of unsupervised link prediction. \textmd{We highlight in \textbf{bold} the social layer in which each policy performs at its best. We \underline{underline} the best two AUC overall.}} \footnotesize \resizebox{0.48\textwidth}{!}{\begin{tabular}{@{}llllllll@{}} \toprule & \multicolumn{7}{c}{\textbf{AUC} ($\times 10$)} \\ \cmidrule{2-8} & C1 & C2 & C3 & C4 & C5 & \textsc{active} & \textsc{all} \\ \midrule RA & 0.3331 & 0.5457 & 0.7275 & 0.7361 & \underline{0.8175} & \underline{\textbf{0.8807}} & 0.6605 \\ AA & 0.6564 & 0.5754 & 0.7638 & 0.6762 & 0.6834 & \textbf{0.7870} & 0.5745 \\ CN & \textbf{0.6523} & 0.5643 & 0.5381 & 0.4289 & 0.4131 & 0.5562 & 0.4028 \\ JC & \textbf{0.1296} & 0.1270 & 0.1353 & 0.1205 & 0.1117 & 0.1053 & 0.0950 \\ \bottomrule \end{tabular}} \label{tab:auc_domainedges_liga} \end{table} \vspace{-10pt} \subsection{Evaluation of supervised link prediction} \label{sec:results_supervised} In this section we assess the advantages brought about by including a supervised classifier in the link prediction approach. As discussed in Section~\ref{sec:supervised}, our classifier uses as features the similarity-based metrics introduced in Section~\ref{sec:unsupervised}. The supervised approaches that we test are logistic regression, decision trees, na\"ive Bayes, Random Forest, SVM. Recall (from Section~\ref{sec:train_test}) that with supervised learning we investigate the performance both on the original dataset and on the undersampled one. Also, with supervised learning we do not carry out a top-K analysis but we allow the algorithms to freely classify all the edges in the test set. \begin{figure}[t] \centering \subfloat[Gaming-related dataset \label{fig:supervised_precision_undersampled_alledges_a}] {\includegraphics[width=0.4\textwidth] {./figures/figures_liga/4_supervised_balanced_alledges_SEAL_node2vec.png}} \hfill \subfloat[Generic users dataset. \label{fig:supervised_precision_undersampled_alledges_b}] {\includegraphics[width=0.4\textwidth] {./figures/figures_generic_users/4_supervised_precision_balanced_alledges_SEAL_node2vec.png}} \hfill \caption{Precision (with credible intervals) - \textsc{Supervised AllEdges} on the undersampled datasets. The $\textsc{All}$ scenario of feature learning algorithms is also included (it will be discussed in Section~\ref{sec:networkembeddings}).} \label{fig:supervised_precision_undersampled_alledges} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.4\textwidth]{./figures/figures_liga/4_supervised_balanced_domainedges_SEAL_node2vec.png} \caption{(Gaming-related dataset) Precision (with credible intervals) - \textsc{Supervised DomainEdges} on the undersampled dataset. The $\textsc{All}$ scenario of feature learning algorithms is also included (it will be discussed in Section~\ref{sec:networkembeddings}).} \label{fig:supervised_precision_undersampled_domainspecific_liga} \end{figure} Figures~\ref{fig:supervised_precision_undersampled_alledges_a}, \ref{fig:supervised_precision_undersampled_alledges_b}, and~\ref{fig:supervised_precision_undersampled_domainspecific_liga} show the results, for the \textsc{AllEdges} and the \textsc{DomainEdges} case respectively. Recall that, as explained in Section~\ref{sec:train_test}, these results are obtained with the negatives undersampled to make the positive and negative classes balanced. In Appendix~\ref{app:supervised_additional}\iftoggle{ONEFILE}{}{ of the SM~\cite{toprak2021harnessing-power}} we also investigate the link prediction performance when no undersampling is carried out (the findings are substantially confirmed). Figure~\ref{fig:supervised_precision_undersampled_alledges_a} shows the precision of the supervised link prediction approaches in the \textsc{AllEdges} scenario of gaming-related dataset. We can identify two important results. First, all approaches that rely on C1 information provide better precision than with any other layer. In particular, using all edges (case \textsc{All}) is never better than using C1 alone. Second, all circle-based approaches that leverage information on the outermost social layers perform at least as well as the baseline (\textsc{All}). When considering the generic users dataset (Figure~\ref{fig:supervised_precision_undersampled_alledges_b}), we observe that the peak performance in C1 is confirmed for Random Forest and na\"ive Bayes. However, for the other learning strategies, the precision drastically drops in C1. For generic users, we can conclude that all the social circles but the first one provide approximately the same precision as the baseline \textsc{All}. Finally, please note that, for both datasets, the precision achieved with supervised strategies is much higher than that obtained with unsupervised ones (consistently with the results in the related literature~\cite{Wang2011}). In the \textsc{DomainSpecificEdges} scenario for the gaming-related dataset (Figure~\ref{fig:supervised_precision_undersampled_domainspecific_liga}), again na\"ive Bayes and Random Forest achieve the highest precision when leveraging only C1 relationships. Differently from the previous case, the precision of decision trees in C1 is lower than with other layers. The remaining learning strategies still gain from using C1 information, but the marging is smaller in this case. Differently from the unsupervised case, supervised learning seems able to overcome the difficulties of predicting new links in the \textsc{AllEdges} scenario, hence the relative advantage of filtering out links not domain-specific is partially lost. In summary, supervised learning consistently yields better predictions than their unsupervised counterparts. This may be due to more flexible identification of boundaries between positives and negatives (with respect to the simple threshold-based approach of similarity-based heuristics) or to a smart combination of the similarity-based heuristics. Regardless, social circles again prove very effective in boosting the precision of link prediction strategies, especially in the gaming-related dataset. In particular, supervised strategies seem able to effectively exploit the innermost layer C1 in the domain-dependent dataset and the active network layer in domain-independent dataset much better than the unsupervised cases. \subsection{Comparison against link prediction methods based on feature learning} \label{sec:networkembeddings} Until now, we have studied the social-aware link prediction method by embedding the intimacy levels of Dunbar's ego network model into existing unsupervised and supervised approaches. The ego network model is a way of capturing the local information of relationships of the individuals. Since the aim of the study is to understand the contribution of the social circles to the performance of the link prediction methods, we selected prediction methods where the feature calculation is not a black-box, and the link prediction method is not an end-to-end method. All the methods discussed so far were based on explicit graph features. In this section, we compare the prediction performance of the methods based on latent features (\emph{node2vec} and \emph{SEAL}, discussed in Section~\ref{sec:latent_features_based}) to feature extraction methods leveraging social circle information. Table~\ref{tab:selfsupervised_results} shows the precision results of \emph{node2vec} (for the best $(p, q)$ pair), SEAL (whose best precision is achieved with $h=1$ without embeddings), and the best supervised social-aware algorithms (whose the best results always occur with C1) on the undersampled\footnote{For consistency with the original \emph{node2vec} and SEAL papers, where the negatives are undersampled in the evaluation.} generic users and gamers datasets. Recall that we are using \emph{node2vec} and \emph{SEAL} approaches as baseline methods where all edges are included without any slicing (this corresponds to the case \textsc{All} in the previous section). Please note that this comparison is fair, since we are studying machine learning-based algorithms trained on explicit features against a machine learning-based algorithm trained on latent features. Vice versa, we do not consider the unsupervised approaches from Section~\ref{sec:results_unsupervised} as they do not leverage machine learning techniques. Table~\ref{tab:selfsupervised_results} shows that the best circle-aware link prediction methods always outperform latent feature--based algorithms. Looking at Figures~\ref{fig:supervised_precision_undersampled_alledges_a}, \ref{fig:supervised_precision_undersampled_alledges_b}, and~\ref{fig:supervised_precision_undersampled_domainspecific_liga} for a circle-by-circle comparison, we observe that either or both feature learning strategies always provide the best precision in the \textsc{All} case. As expected, feature learning strategies are also generally very competitive in the other cases, outperforming circle-aware approaches for several slicing. However, they are never able to surpass the precision achieved by the best circle-aware strategy. \ul{The implications of the above results are far-reaching: by using knowledge on a few common strong ties, circle-aware link prediction consistently beats black-box approaches.} This advantage is not even paid in terms of computational complexity: as we show in Appendix~\ref{app:complexity_analysis}\iftoggle{ONEFILE}{}{ of the SM~\cite{toprak2021harnessing-power}}, all the strategies in Table~\ref{tab:selfsupervised_results} are linear in the number of edges. \begin{table}[t] \centering \caption{Precision scores of \emph{node2vec} with best $(p,q)$ combinations, \emph{SEAL} with $h=1$ without embeddings (always the best configuration in our scenarios), and the best circle-aware supervised methods (all use C1 only, the learning method is \emph{RF}-Random Forest, \emph{NB}-na\"ive Bayes). The bold cells represent the best precision score per column/scenario.} \footnotesize \begin{adjustbox}{width=0.48\textwidth} \small \begin{tabular}{@{}llll@{}} \toprule & \textbf{Generic Users} & \multicolumn{2}{l}{\textbf{Gamers}}\\\cmidrule{3-4} & & \textsc{AllEdges} & \textsc{DomainEdges}\\ \midrule \emph{node2vec} & \vtop{\hbox{\strut 0.955}\hbox{\strut $(p=1, q=4)$}} & \vtop{\hbox{\strut 0.894}\hbox{\strut $(p=0.25, q=0.5)$}} & \vtop{\hbox{\strut 0.926}\hbox{\strut $(p=0.25, q=4)$}} \\ \cmidrule{1-4} \emph{SEAL} & 0.920 & 0.931 & 0.920 \\ \cmidrule{1-4} \emph{circle-aware link prediction} & \vtop{\hbox{\strut \textbf{0.974}}\hbox{\strut \emph{(C1; RF \& NB)}}} & \vtop{\hbox{\strut \textbf{0.945}}\hbox{\strut \emph{(C1; NB)}}} & \vtop{\hbox{\strut \textbf{0.985}}\hbox{\strut \emph{(C1; RF)}}} \\ \hline \end{tabular} \end{adjustbox} \label{tab:selfsupervised_results} \end{table} \subsection{Extracting the ego networks} \label{sec:extraction_egonets} We filter the 8,932 gamers and 1,930,802 generic users and extract their ego network (including their social circles) using the same methodology as in~\cite{boldrini2018twitter}, which we briefly recollect here. We simply need a weighted social graph, whose edge weights correspond to the contact frequency between the corresponding nodes. In order to extract reliable information, we filter users according to the same policy used in~\cite{boldrini2018twitter}. We only consider users whose Twitter activity is regular (i.e., they post, on average, at least one tweet every 3 days for at least 50\% of the total number of months of their activity) and stationary (i.e., they are not in their initial stage of engagement with the Twitter platform, which typically features a transient spike of activity). The strength of ego-alter relationships is inferred from the frequency of direct tweets (mentions, reply, or retweets) between the ego and the alters. The optimal number of social circles per users is obtained using the Mean Shift clustering algorithms to group such frequencies. The code for computing the ego networks can be found at~\url{https://egonetworks.readthedocs.io/en/latest/}. Approximately one third of the gamers passed all the filters described above, and this left us with 3,061 gamers with reliable ego network information. On the other hand, approximately 7\% of the generic users passed all the filters, amounting to 148,105 generic users with reliable ego network information. We further filter them as suggested in~\cite{Liben-Nowell2007} by considering only nodes that are connected to the giant component. Also, in order to have a generic user dataset with a similar size as that of the gaming-related dataset and to reduce its computational intensity, we sampled 3,000 egos from the giant component of the generic users network by snowball sampling~\cite{Leo1961}. We denote the set of nodes for which we have ego networks as $V_{e}$. In the gaming-related dataset all egos are gamers. Vice versa, in the generic users dataset, all egos are generic users. An exploratory analysis of the ego networks in our datasets, which is substantially in agreement with the results from the related literature~\cite{boldrini2018twitter,Dunbar2015}, can be found in Appendix~\ref{sec:results_egonets}\iftoggle{ONEFILE}{}{ of the SM~\cite{toprak2021harnessing-power}}. Note that, when we focus on an ego~$i$, its alters can now be associated with the social circle of~$i$ to which they belong. Note also that we do not typically have the ego network of the alters. In the gaming-related dataset, the alters of ego~$i$ can be generic users, other gamers, or even games. This implies that some nodes are \emph{domain-specific} (in our case, gaming-related), while others are generic. Domain-specific nodes are homogeneous, since they share a common interest. Summarising, we have three classes of nodes in the gaming-related dataset: gamer users with ego network ($V_{e}$), regular (unlabelled) users without ego network ($V_n$), and domain-specific users that may or may not have an ego network ($V_{d}$, including games and gamers for which ego network information is not available or not reliable because they didn't satisfy the filters discussed previously). On the other hand, in the generic user dataset, all alters of ego~$i$ are also generic users. Generic nodes make prediction more challenging with respect to the case of homogeneous nodes (as, e.g., in~\cite{Liben-Nowell2007}), because they tend to differ more from each other. In the generic user dataset, we can identify only two classes of nodes: generic users with ego network ($V_{e}$) and generic users without ego networks ($V_{n}$) that are basically alters. \subsection{Dataset summary} The final datasets are summarised in Table~\ref{tab:dataset_summary_inactive_gamers} and Table~\ref{tab:dataset_summary_inactive_generic_users}. The imbalance ratio, i.e., the ratio between the negatives (potential links that do not exist in practice) and the positives (links actually existing) in the class of both gamers and generic users is around $10^4$:1, which is quite high. This is a well-known problem in link recommendation for online social networks (remember from Section~\ref{sec:intro} that links are sparse). This implies that special care should be taken in the evaluation, as explained in detail in Section~\ref{sec:metrics}. \begin{table}[t] \caption{Gaming-related dataset } \label{tab:dataset_summary_inactive_gamers} \centering \begin{tabular}{l||r} \# of gamer nodes $|V_{e}|$ & 2,995 \\ \# of domain-specific nodes $|V_{d}|$ & 70,859 \\ \# of all nodes $|V| = |V_{e} \cup V_{d} \cup V_{n}|$ & 470,485 \\ \# of gamer edges $|E_{e}|$ & 2,614 \\ \# of domain-specific edges $|E_{d}|$ & 154,581 \\ \# of edges $|E|$ & 1,004,011 \\ \end{tabular} \end{table} \begin{table}[t] \centering \caption{Generic users dataset } \label{tab:dataset_summary_inactive_generic_users} \begin{tabular}{l||r} \# of ego nodes $|V_{e}|$ & 3000 \\ \# of all nodes $|V| = |V_{e} \cup V_{n}|$ & 278,510 \\ \# of ego edges $|E_{e}|$ & 7,158\\ \# of edges $|E|$ & 567,739 \\ \end{tabular} \end{table} \subsection{Space complexity} \subsection{Dunbar's model and ego networks} \label{sec:relwork_egonetworks} According to the \emph{social brain hypothesis} from anthropology~\cite{dunbar1998social}, the social life of primates is constrained by the size of their neocortex. Specifically, for humans, the typical group size is estimated around an average of 150 members, a limit that goes under the name of Dunbar's number. This limit is related to the cognitive capacity that humans are able to allocate to nurturing their social relationships. The 150 \emph{friends}, in fact, do not include acquaintances, but only people with which a coherent quality relationship is entertained. In a modern society, this entails, at the very least, exchanging birthday or Christmas cards every year. Unsurprisingly, humans are not fair in how they distribute their cognitive attentions among the 150 important persons they have around them. To the contrary, it is possible to group our social relationships in circles of increasing intimacy, as illustrated in Figure~\ref{fig:egonet}. Typically, each of us has at least four circles of intimacy~\cite{hill2003social,Zhou2005}: the innermost one (\emph{support clique}) includes our close family, the \emph{sympathy group} comprises all those people whose death tomorrow would leave us deeply affected, the \emph{affinity group} includes colleagues, extended family, people you hang out with, and finally the \emph{active network} is made up of all the people you meaningfully interact with at least once a year. The circles are conventionally concentric, with the inner layers contained in the outer ones. Many people also feature an additional inner layer (contained in the support clique) comprising on average $1.5$ alters for which they have a very high emotional investment~\cite{Dunbar2015}. The social brain theory was developed for the offline world, in which relationships were nurtured via face-to-face interactions, letters, or landline phone calls. Many had postulated that this theory would not carry over to the online world, where OSN allow us to engage conveniently with a huge number of people scattered across the globe. However, Dunbar's model stood the test of the cyberworld as well: Dunbar's number hold for email communications~\cite{Haerter2012}, mobile phone calls~\cite{Miritello2013}, and Twitter~\cite{gonccalves2011modeling}. More importantly, the same layered structure of social relationships has emerged on both Facebook and Twitter~\cite{Dunbar2015}. These findings are extremely important. In fact, since ego network structures are known to impact significantly on the way information spreads in OSN, and on the diversity of information that can be acquired by users~\cite{aral2011diversity}, embedding these models of human cognition into services for OSN may drastically improve the quality of service provided to the users. \vspace{-10pt} \subsection{Link prediction} \label{sec:relwork_linkprediction} The literature on link prediction algorithms is large. Here we only summarise the main approaches and we refer the interested readers to \cite{Martinez2016,Lu2011,mutlu2020review} for detailed surveys on the topic. Following the taxonomy proposed by~\cite{mutlu2020review}, we discuss separately feature extraction and feature learning methods \subsubsection{Feature extraction methods} \label{sec:relwork_linkprediction_feature_extraction} Similarity-based methods make up the largest class of link prediction algorithms proposed in the literature. The rationale of this approach is that nodes are more likely to form links with nodes that are similar to them. This idea is grounded in the widespread and well-documented social phenomenon of homophily~\cite{mcpherson2001birds}. Algorithms in this class differ in how they define the similarity between nodes. We can broadly distinguish them based on whether they use local information, global information, or a hybrid combination of the two (this approach is one of the least popular, hence we will not treat it further). For a given node pair, local similarity-based solutions rely on node neighborhood-related structural information, such as the number of common neighbors~\cite{Liben-Nowell2007}, an inverse function of the degree of common neighbors~\cite{Adamic2003,Zhou2009}, or a Preferential Attachment index~\cite{Liben-Nowell2007}. Local similarity-based approaches are very efficient, even on large networks, due to their easy parallelization. Their main theoretical limitation is that they are able to predict only new links between neighbors-of-neighbors. Their counterpart, global similarity-based approaches, rely on metrics computed considering the whole network topology. These metrics focus typically on the possible paths inside the network, such as the shortest paths~\cite{liben2005algorithmic}, paths with different lengths by means of the Katz Index~\cite{Liben-Nowell2007}, random walks~\cite{liu2010link}, or community membership~\cite{Soundarajan2012}. Algorithmic methods map the link prediction problem into well-known algorithmic approaches. Within this category, classifier-based methods treat the link prediction problem as a binary classification problem~\cite{Hasan2006,Zhang2017,Cukierski2011,Zhang2018}. Each node pair can be characterised with a variety of attributes, including the similarity-based heuristics discussed above. This labelled set can be fed to virtually any classifier (such as decision trees, SVM, k-nearest neighbors, random forest, neural networks). The advantage of this approach is that it can be extended and adapted to any new attribute that one wants to test, and that it generally significantly outperforms purely unsupervised similarity-based methods~\cite{Hasan2006,Cukierski2011,Wang2016}. Preprocessing methods are considered meta-approaches, as they are intended to be used in conjunction with other algorithms, for which they provide preprocessing/pre-filtering intended to remove some noise in the network. As an example, the clustering method discussed in~\cite{liben2005algorithmic} suggests the removal of the weakest links (those between nodes with few or zero common neighbors). The solution that we propose in this paper falls into this category. The meta-approach that we investigate is based on considerations related to how people distribute their social capacity across their relationships, rather than on pure graph-related properties. Orthogonally to the above classification, we can also distinguish between approaches that consider the weights of the links or not. Among the former, we mention~\cite{Zhou2009,Zhu2016}. As discussed in~\cite{Lu2010}, though, the performance of weighted indices is often worse than their unweighted counterpart. For this reason, in this work we do not consider the weight of links besides what is needed to compute the ego network structure. \subsubsection{Feature learning methods} \label{sec:relwork_linkprediction_feature_learning} Feature learning methods map the graph into a low-dimensional feature space. The difference between feature extraction and feature learning methods is that, in the latter, the features are learnt by the system and not hand-engineered. The mapping, or graph representation, can be learned and optimized via both supervised and unsupervised methods~\cite{mutlu2020review}. The random walk methods use graph exploration methods such as breadth-first search (BFS), depth-first search (DFS), and random walks to capture features and node properties such as centrality, being a hub, or community membership. \emph{DeepWalk}~\cite{perozzi2014deepwalk} and \emph{node2vec}~\cite{grover2016node2vec} are the most popular methods of this category. For the link prediction task, the node feature vectors (node embeddings) are transformed into edge feature vectors (edge embeddings) using operators like the Hadamard product or cosine similarity. Extracted edge embeddings are fed to learning algorithms (such as SVM, regression methods, deep neural networks) to train a model that is used to predict future links. These methods are considered semi-supervised, since the information on the existence/non-existence of a link is already present in the studied graph. Graph neural network (GNN) models leverage neural networks to map the graph structure to a low dimensional vector space. Graph differentiable pooling, graph autoencoders, and graph neural networks have been used for the link prediction algorithms based on neural networks. In this study, we compare against the popular GNN-based link prediction algorithm SEAL~\cite{Zhang2018}, which relies on a CNN architecture. Note that network embedding methods and graph neural networks (GNN) are highly related to each other~\cite{wu2020comprehensive}, as they both map the network to a lower-dimensional representation space. However, GNNs allow for greater flexibility, by leveraging node features in the encoder, by sharing parameters between nodes in the encoder, and by fixing the transductivity problem of shallow embdeddings~\cite{Hamilton2020}. From the link prediction perspective, GNNs typically provide end-to-end frameworks (i.e., the learnt presentation is optimised for the link prediction problem), while graph embedding methods capture topology-level properties that are then used to train a separate classifier for link prediction. \section{Data collection} \label{app:datasets} In order to collect an initial community of users interested in indie games, we first had to identify some relevant indie games. To this purpose, we referred to Steam\iffalse\cite{steam}\fi, a digital game distribution platform (\url{https://store.steampowered.com/}), and SteamSpy (\url{https://steamspy.com/}) \iffalse\cite{steamspy}\fi, which provides statistics about the games on Steam. Among the indie games listed as the most popular during October 2017, we were able to identify the Twitter accounts of 133 of them. We then downloaded the timelines of these games using the Twitter Search API. From the downloaded timelines, the 400 most frequently used hashtags have been extracted and used to monitor Twitter using the Twitter Streaming API. This allowed us to identify a set of 8,932 users engaging in game-related conversations. We labelled these users as \emph{gamers}. We have then collected (June 2018) their timeline (most recent 3200 tweets) using the Twitter Search API. In order to enrich the set of game-related nodes in the dataset, we also downloaded all followers of the initial 133 games, thus bringing in additional 25,014 nodes, for a total of 31,091 domain-specific nodes. Note that we do not collect the ego networks of these nodes. \section{Feauture learning methods used for benchmarks} \label{app:feature_learning} \emph{node2vec} is a framework that maps the nodes of a graph to low-dimensional feature vectors while preserving nodes' neighborhoods \cite{grover2016node2vec}. It proposes a biased random walk based on breadth-first sampling (BFS) and depth-first sampling (DFS) with transition probabilities $p$ and $q$. BFS captures the embeddings related to structural equivalence (e.g., being a hub node) while DFS captures embeddings related to communities based on homophily. There exist other four parameters for \emph{node2vec}: $d$ the dimension/length of the feature vector, $l$ the length of random walk, $k$ the size of the neighborhood, and $r$ the number of walks per node. A feature vector is produced per node in the network by combining the Skip-gram architecture of \emph{word2vec} with a flexible neighborhood definition obtained with biased random walks. For the link prediction task, these node embeddings are transformed into edge embeddings by applying binary operators like, e.g., Hadamard. Then, logistic regression is applied on the edge embeddings to train a binary classification model on positive and negative data (existing and missing links). Given that \emph{node2vec} is designed to capture latent features, in this study, we apply \emph{node2vec} method as is, without explicitly adding information on the social circles. Since the aim is to predict the possible future links between the egos whose social circles can be computed, as described in Section~\ref{sec:prediction_algorithm}, we learn the node embeddings of the vertex set $V_{e}$ by using all edges $E_{e}$. For the extraction of node embeddings, we try the different combinations of $p$ and $q$ values ($p,q \in \{0.25, 0.5, 1, 2, 4\}$) while keeping other parameters of random walk fixed ($d=128$, $l=80$, $k=10$, $r=10$) as mentioned in \cite{grover2016node2vec}. Then, we calculate the edge embeddings of all existing and missing links in $V_e \times V_e$. Given two feature vectors, $f(i)$ and $f(j)$, of egos $i$ and $j$ where $i,j \in V_e$, the edge embedding of the edge $e_{ij}$ is calculated as: $f(i) \circ f(j)$ where $\circ$ is a binary operator (average, Hadamard, weighted-L1, weighted-L2). We are using Hadamard operator, which is shown to be the most effective one in \cite{grover2016node2vec}. \emph{SEAL}~\cite{Zhang2018} is a graph neural network method that focuses on the local enclosing subgraphs of the target links (node pairs). For a node pair $i,j$, the local enclosing subgraph is the subgraph induced by the union of $i$'s and $j$'s neighborhoods, up to $h$ hops. Once the enclosing subgraphs are extracted, the nodes in them are labelled using the Double-Radius Node Labeling (DRNL), whereby the labels are a function of the distance from the target nodes $i,j$. Parameter $h$ defines the order of the neighborhood. Zhang and Chen~\cite{Zhang2018} show that higher-order graph structures and their corresponding heuristics (such as Page Rank, Katz index) can be captured using small $h$ values. Here, we use all relationships ($E$) to extract the local enclosing subgraph of all ego node pairs on which we apply the prediction task. We also set $h \in \{1, 2\}$, like in~\cite{Zhang2018}. In SEAL, the extracted local enclosing subgraphs, for the existing and missing links, are then fed to a Deep Graph Convolutional Neural Network (DGCNN)~\cite{zhang2018end} to train the model. For the DGCNN, we use the same parameters of the SEAL paper. The core structure of \emph{SEAL} consists of local enclosing subgraphs and DGCNN, which can be extended with node features (which we don't have) and node embeddings (such as those of \emph{node2vec}). In~\cite{Zhang2018}, it was shown that node embeddings may o may not increase the prediction performance. Thus, here we carry out experiments both with and without embeddings. \section{Preliminary ego network analysis} \label{sec:results_egonets} As anticipated in Section~\ref{sec:dataset}, we extract the ego network structure of the gamers and generic users in $V_e$ using the methodology described in~\cite{boldrini2018twitter}. The resulting distribution of the optimal circle number of gamer egos and generic user egos can be seen in Figure~\ref{fig:optimal_circle_distr}. The mean value is 4.94 for gamers and 4.73 for generic users, and the median and mode values are equal to 5 for both datasets. The plot shows that the number of social circles of both types of egos is compatible with the findings of previous studies which establish that human ego network can be layered into 5 layers/circles. For further understanding of the ego network structures, we examine the alter distribution through the layers. In previous studies~\cite{Dunbar2015}, it has been shown that in OSN the external layers are slightly smaller than the reference model discussed in Section~\ref{sec:relwork_egonetworks}. In Figure~\ref{fig:c5_alter_distr}, we show the distribution of the alter number for the egos with optimal circle number equal to~5 (the case generally studied in the related literature). These results, both for gamers and generic users, are compatible with the typical findings from OSNs analysis in the related literature. \begin{figure}[t] \subfloat[Gaming-related dataset ($V_{e}$) \label{fig:optimal_circle_distr_a}] {\includegraphics[width=0.49\textwidth] {./figures/figures_liga/1_optimal_circle_distr.png}} \hfill \subfloat[Generic users dataset ($V_{e}$) \label{fig:optimal_circle_distr_b}] {\includegraphics[width=0.49\textwidth] {./figures/figures_generic_users/1_optimal_circle_distr.png}} \hfill \caption{Distribution of the optimal number of social circles for the gamer egos and generic user egos. Red and blue lines represent the mean and median values, respectively.} \label{fig:optimal_circle_distr} \end{figure} \begin{figure}[t] \subfloat[Gaming-related dataset ($V_{e}$) \label{fig:c5_alter_distr_a}] {\includegraphics[width=0.49\textwidth] {./figures/figures_liga/2_c5_alter_distr.png}} \hfill \subfloat[Generic users dataset ($V_{e}$) \label{fig:c5_alter_distr_b}] {\includegraphics[width=0.49\textwidth] {./figures/figures_generic_users/2_c5_alter_distr.png}} \hfill \caption{Average alter distribution per each circle of gamer egos and generic user egos. For the sake of clarify, egos that have optimal circle number equal to five have been used. Red and blue lines represent the mean and median values, respectively, of the distribution.} \label{fig:c5_alter_distr} \end{figure} \section{Evaluation setup} \label{app:evaluation_setup} Traditionally, binary classifiers are evaluated using the ROC curve, which plots the True Positive Rate ($\frac{TP}{TP + FN}$) against the False Positive Rate ($\frac{FP}{FP + TN}$). However, the scenario we are considering clearly suffers from the class imbalance problem, since the actual edges between nodes are significantly fewer than all the possible edges that there could exist between them. In this situation, the ROC curve, while being insensitive to the class imbalance\footnote{Differently from the accuracy, which should not be used when imbalance is an issue. In fact, given the accuracy formula $\frac{TP+TN}{P+N}$, it is easy to see that correct classification in the most numerous class will hide anything about the sparse class.}, tends to provide overoptimistic results~\cite{Garcia-Gasulla2015}. The related literature on evaluating systems with class imbalance suggests using metrics like precision ($=\frac{TP}{TP + FP}$), recall (aka TPR) and $F_{1}$ score. As already argued by~\cite{Wang2011}, in the context of link prediction, precision is more important than the other metrics (such as recall), because if the precision is high, one can live with some false negatives. Therefore, the focus of this evaluation will be mostly on precision. For the completeness of results, we also provide, when relevant, the F1 score and the AUC of the precision-recall curve. Note also that we are interested in comparing the performance obtained using the baseline approach (no social circles information, all edges are considered) and the other strategies in which only edges belonging to the ego network circles are considered. Precision and recall are evaluated based on metrics (TP, FP, TN, FN) which corresponds to specific realizations of a target phenomenon. Thus, the question arises of how confident we can be about the results obtained on a particular collection that is the result of random sampling (as in the case of cross-validation or subsampling of negatives for supervised prediction). \cite{Goutte2005} proposes a Bayesian approach to the problem. The basic idea is to model TP, FP, FN, TN as if they were sampled from a multinomial distribution, with unknown success probability per category $\pi_i$. Based on the properties of the multinomial distribution, we know that individual counts are binomial (i.e., equivalent to the number of successes in a sequence of $n$ independent experiments, each with success probability $p$). Specifically, it can be proved that TP are binomial with parameters TP+FP (corresponding to the number of trials) and success probability $p$ (corresponding to the precision). Using Bayes' theorem and well-known priors associated with binomials, it can be derived that the posterior of the precision~$p$ is Beta distributed: \begin{equation} p | \mathcal{D} \textrm{ (aka the posterior distr.)} \sim Beta(TP+\lambda, FP+\lambda). \end{equation} A similar formula is obtained for the recall $r$. In these formulas, $\lambda$ is a parameter whose value depends on the prior considered: $\lambda=\frac{1}{2}$ corresponds to Jeffrey's non-informative prior (the one we use here), $\lambda=1$ to the uniform prior. Credible intervals\footnote{Using confidence intervals instead of credible intervals would not be the best choice in this case, because precision, recall, and F1 score belong to $[0,1]$, hence, especially for values close to either 0 or 1, they depart significantly from the normality assumption behind confidence intervals.} for $p$ and $r$ can then be obtained as the intervals containing 95\% of the Beta distribution. The formula for the credible interval of the F1 score is slightly more complicated, so we do not report it here. Microaveraging and credible intervals are also used in~\cite{Wang2016}. \section{Evaluation of supervised link prediction - additional results} \label{app:supervised_additional} As already mentioned, the precision achieved with supervised learning is generally much higher than that observed with unsupervised algorithms. In order to investigate whether this might be due to an artificial bias introduced by the undersampling of negatives, we have also run the same link prediction experiment using the complete set of negatives (again splitting 90\%-10\% between train and test). Figures~\ref{fig:supervised_precision_all_alledges_a}, \ref{fig:supervised_precision_all_alledges_b}, and~\ref{fig:supervised_precision_all_domainspecific_liga} show the precision obtained in this case. Only logistic regression, decision trees, and na\"ive Bayes are shown, since the others did not converge in a reasonable time due to to new size of the problem. The precision values achieved in this case are significantly smaller than those obtained with the undersampled dataset (thus confirming the limitations of this approach). Still, they improve over the ones obtained with the standalone similarity measures. Again, it is confirmed that the C1 layer is the most useful for making precise predictions in the gaming-related dataset (Figures~\ref{fig:supervised_precision_all_alledges_a}). This result is very encouraging, since C1 is the most lightweight in terms of resources consumed. In the generic users dataset (Figures~\ref{fig:supervised_precision_all_alledges_b}), the role played by the social circles is reversed: using C5 or \textsc{Active}, we are able to perform predictions that are at least as good as the baseline, however the precision drops as we move towards the innermost layers. \begin{figure} \subfloat[Gaming-related dataset \label{fig:supervised_precision_all_alledges_a}] {\includegraphics[width=0.49\textwidth] {./figures/figures_liga/5_supervised_precision_all_alledges.png}} \hfill \subfloat[Generic users dataset. \label{fig:supervised_precision_all_alledges_b}] {\includegraphics[width=0.49\textwidth] {./figures/figures_generic_users/5_supervised_precision_all_alledges.png}} \hfill \caption{Precision (with credible intervals) - \textsc{Supervised AllEdges} on the full datasets.} \label{fig:supervised_precision_all_alledges} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.49\textwidth]{./figures/figures_liga/5_supervised_precision_all_domainedges.png} \caption{Precision (with credible intervals) - \textsc{Supervised DomainEdges} on the full gaming-related dataset.} \label{fig:supervised_precision_all_domainspecific_liga} \end{figure} We conclude the section analysing the F1 score, which is the harmonic mean of precision and recall. We only show the results obtained using the full negative set, as they provide a more reliable evaluation. For both the \textsc{AllEdges} and the \textsc{DomainEdges} case (Figures~\ref{fig:supervised_fscore_all_alledges_a}, \ref{fig:supervised_fscore_all_alledges_b}, and ~\ref{fig:supervised_fscore_all_domainedges_liga}), we observe a different ranking with respect to the corresponding precision results, with the highest F1 being achieved by the na\"ive Bayes approach. Still, since, as discussed in~\cite{Wang2016}, precision is much more important than recall in link prediction, we argue that decision trees should be preferred to na\"ive Bayes. If we only look at the role played by the social circles, we observe that leveraging social circles is always better or as good as the \textsc{All} baselines. However, when aiming at striking a balance between precision and recall, C1 is replaced by C2 as the best performing circle in the gaming-related dataset, probably due to C1's high selectivity for the most intimate relationships. In the generic users dataset, instead, the \textsc{Active} layer is confirmed as the one providing the best prediction performance. \begin{figure} \subfloat[Gaming-related dataset \label{fig:supervised_fscore_all_alledges_a}] {\includegraphics[width=0.49\textwidth] {./figures/figures_liga/6_supervised_f_all_alledges.png}} \hfill \subfloat[Generic users dataset. \label{fig:supervised_fscore_all_alledges_b}] {\includegraphics[width=0.49\textwidth] {./figures/figures_generic_users/6_supervised_f_all_alledges.png}} \hfill \caption{F1 score (with credible intervals) - \textsc{Supervised AllEdges} on the full datasets.} \label{fig:supervised_fscore_all_alledges} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.49\textwidth]{./figures/figures_liga/6_supervised_f_all_domainedges.png} \caption{F1 score (with credible intervals) - \textsc{Supervised DomainEdges} on the full gaming-related dataset.} \label{fig:supervised_fscore_all_domainedges_liga} \vspace{-10pt} \end{figure} \section{Complexity analysis} \label{app:complexity_analysis} In this section, we investigate the computational complexity of ego-aware link prediction and how it compares to the other approaches tested in Section~\ref{sec:evaluation}. For the convenience of the reader, the notation used in this section is summarised in Table~\ref{tab:complexity_notation}. \begin{table}[h] \caption{Notation summary for complexity analysis} \begin{adjustbox}{width=0.48\textwidth} \begin{tabular}{@{}ll@{}} \toprule \textbf{Symbol} & \textbf{Description} \\ \midrule $V_e$ & set of ego nodes \\ $E_e$ & set of existing edges between ego nodes \\ $\overline{E}_e$ & Set of non-existing edges between ego nodes \\ $E_{train}$ & Set of training edges, it is the union set of positive and negative edges used for training \\ $\Gamma(i)$ & Neighborhood of a generic node $i$ \\ $\Gamma_{C_x}(i)$ & Social circle $C_x$ of a generic node $i$ \\ $d$ & Number of features used for learning \\ $h$ & Depth of the enclosing subgraph computed by SEAL \\ \bottomrule \end{tabular} \end{adjustbox} \label{tab:complexity_notation} \end{table} \begin{algorithm}[t] \DontPrintSemicolon \KwData{$\mathcal{G}=(V_e,E)$; $C_x$ = the social circle to be considered.} \SetKwInput{KwData}{Notation} \KwData{$\Gamma(i) =$ neighborhood of node $i$; $\overline{E}_e =$ set of missing edges.} \KwResult{Similarity $sim_{C_x}(i,j)$ for each node pair $i,j$ in $V_e$.} \Begin{ \For{$i\in V_e$}{ \tcp{Compute the ego network and slice the graph according to $C_x$}\label{ln:cmt} $AssignToCircles(\Gamma(i))$\; \label{ln:circles} $\Gamma_{C_x}(i) = Slice(\Gamma(i), C_x)$\; \label{ln:slice} } \For{$(i,j)\in \overline{E}_e$}{ \label{ln:sim} \tcp{Compute the similarity} \If{CN}{ $sim_{C_x}(i,j) = | \Gamma_{C_x}(i) \cap \Gamma_{C_x}(j)| $\; \label{ln:cn} } \If{JC}{ \label{ln:jc} $sim_{C_x}(i,j) = \frac{| \Gamma_{C_x}(i) \cap \Gamma_{C_x}(j) |}{| \Gamma_{C_x}(i) \cup \Gamma_{C_x}(j) |}$\; } \If{AA or RA}{ \label{ln:aa_ra} $sim_{C_x}(i,j) = 0 $ \; \For{$z \in \Gamma_{C_x}(i) \cap \Gamma_{C_x}(j)$}{ $sim_{C_x}(i,j) = sim_{C_x}(i,j) + penalised(\Gamma(z))$\; } } } } \caption{Find the similarity between nodes\label{algo:sim} - unsupervised setting} \end{algorithm} Let us start with heuristic-based link prediction in the unsupervised case (discussed in Section~\ref{sec:unsupervised}). Algorithm~\ref{algo:sim} illustrates the steps towards computing the similarity between a pair of nodes depending on the specific similarity considered. Please note that the weighted graph discussed in Section~\ref{sec:dataset} is assumed as input. With respect to the baselines (traditional methods which are represented as \textsc{All} in the results) in which no circle information is used, our approach requires two additional steps: (i) computing the ego networks of the nodes for which predictions should be made (line~\ref{ln:circles}) and (ii) pruning the ego networks based on the social circle we want to leverage (line~\ref{ln:slice}). The code from line~\ref{ln:sim} on is common to both the baselines and the circle-aware approaches, since the specific slicing considered is controlled with $C_x$ (and $x = \textsc{All}$ for the baseline). In Lemma~\ref{theo:time_complexity_egonet} below we derive the time complexity for computing the ego networks. Note that, in social networks where nodes are real people, the neighborhood size does not grow significantly with $|V|$, hence the complexity of computing an ego network can be considered approximately constant. \begin{lemma}[Complexity egonets]\label{theo:time_complexity_egonet} The complexity of computing the ego network of a generic node $i$ is given by the following: \begin{equation}\label{eq:complexity_ego} \mathcal{O}(\textrm{ego}) = \mathcal{O}(|\Gamma(i)| * \log(|\Gamma(i)|). \end{equation} \end{lemma} \begin{proof} Line~\ref{ln:circles} in Algorithm~\ref{algo:sim} entails a) sorting the neighbors of node $i$ ($\Gamma(i)$) based on contact frequencies, b) extracting the active part (corresponding to relationship with contact frequency larger than once per year, as discussed in Section~\ref{sec:relwork_egonetworks}), and c) running a unidimensional clustering algorithm on the remaining contact frequencies. The complexity of step (a) is $\mathcal{O}(|\Gamma(i)|*\log(|\Gamma(i)|))$ (e.g., assuming standard merge sort is used~\cite{cormen2009introduction}), the complexity of step (ii) is $\mathcal{O}(\log(|\Gamma(i)|))$ which is equivalent to the complexity of a search algorithm on a sorted input (e.g., assuming binary search is used~\cite{cormen2009introduction}). After step (b), for each ego $i$, we are not working anymore on its full neighborhood but only on the active part $\Gamma_{active}(i)$, which is smaller than $\Gamma(i)$ since it only includes strong relationships. The complexity of step (c) is mainly dependent on the chosen clustering algorithm (note that the classification of alters in circles is robust against the different clustering methods~\cite{Dunbar2015}). For example, DBSCAN is quite efficient and it runs in $\mathcal{O}\left(|\Gamma_{active}(i)| \log(|\Gamma_{active}(i)|) \right)$~\cite{tan2019introduction}. The time complexity of k-means is linear~\cite{tan2019introduction} in the number of points to cluster (i.e., $\mathcal{O}\left(|\Gamma_{active}(i)|\right)$) but it needs additional computations for the selection of the best $k$ (e.g., $\mathcal{O}(k |\Gamma_{active}(i)|)$ for the partition coefficient method, $\mathcal{O}( |\Gamma_{active}(i)|^2)$ for the Silhouette method). Mean Shift runs in $\mathcal{O}(|\Gamma_{active}(i)| \log(|\Gamma_{active}(i)|)$, like DBSCAN. The last step to carry out is the slicing in line~\ref{ln:slice}, whose complexity is equivalent to that of a search in $\Gamma_{active}(i)$, hence it is logarithmic in its size. In summary, the complexity of computing an ego network is given by the following (assuming DBSCAN or Mean Shift are used for clustering): \begin{align*} \mathcal{O}(\textrm{ego}) & = \mathcal{O}\left(|\Gamma(i)| * \log(|\Gamma(i)|) \right)+ \nonumber \\ & \quad + \mathcal{O}\left(\log(|\Gamma(i)|) + |\Gamma_{active}(i)| \log(|\Gamma_{active}(i)| + \right. \nonumber \\ & \left. \quad + \log(|\Gamma_{active}(i)|) \right) \nonumber \\ & = \mathcal{O}(|\Gamma(i)| * \log(|\Gamma(i)|), \end{align*} where we have leveraged $|\Gamma(i)| \ge |\Gamma_{active}(i)|$. \end{proof} Exploiting the above result, we can now derive the time complexity of circle-aware and baseline heuristics with unsupervised link prediction. Theorem~\ref{theo:time_complexity_unsupervised} below states that in both cases the complexity of unsupervised link prediction grows with $|V|^2$, hence it is intrinsically inefficient. Since $|\Gamma_{C_x}(i)| \ll |\Gamma(i)|$ when $x$ is small, circle-aware link prediction provides a marginal advantage in this case. \begin{theorem}[Complexity unsupervised]\label{theo:time_complexity_unsupervised} The time complexity of link prediction using circle-aware or baseline heuristic $\phi$ with unsupervised learning is given by the following: \begin{eqnarray} \label{eq:complexity_social_final} \mathcal{O}(\textrm{circle-aware }\phi) &=& \mathcal{O}(|V|^2 * |\Gamma_{C_x}(i)|) \\ \mathcal{O}(\textrm{baseline } \phi) & = &\mathcal{O}(|V|^2 * |\Gamma(i)|), \label{eq:complexity_baseline_final} \end{eqnarray} where $\phi$ is any of the heuristics defined in Section~\ref{sec:unsupervised} (i.e., CN, JC, AA, RA), $\Gamma(i)$ denotes the neighborhood of node $i$, and $\Gamma_{C_x}(i)$ corresponds to the neighborhood of node $i$ cut at social circle $C_x$. \end{theorem} \begin{proof} With reference to Algorithm~\ref{algo:sim}, in order to estimate the time complexity with circle-aware $\phi$ in the average case, we have to derive the time complexity of computing the ego network ($\mathcal{O}(\textrm{ego})$, derived in Lemma~\ref{theo:time_complexity_egonet}) and that of computing the similarity ($\mathcal{O}(\textrm{circle-aware similarity})$), as illustrated in Equation~\ref{eq:complexity_social} below. On the other hand, only the similarity complexity is needed for the baseline case (Equation~\ref{eq:complexity_baseline}). Note that, in both equations, we have approximated $|\overline{E}_e|$ (the number of missing edges between egos) as $|V|^2$, since social networks are typically sparse. \begin{align} \label{eq:complexity_social} \mathcal{O}(\textrm{circle-aware } \phi) &= \mathcal{O}(|V|)\mathcal{O}(\textrm{ego}) + \nonumber\\ & \quad + \mathcal{O}(|V|^2) * \mathcal{O}(\textrm{circle-aware sim}) \\ % \mathcal{O}(\textrm{baseline } \phi) &= \mathcal{O}(|V|^2) * \mathcal{O}(\textrm{baseline similarity}) \label{eq:complexity_baseline} \end{align} Clearly, the complexity of the circle-aware and baseline similarities depends on the specific approach $\phi$ (CN, JC, AA, RA) considered. We focus first on CN. The complexity $ \mathcal{O}(\textrm{similarity CN})$ simply corresponds to an intersection between sets (see line 7 of Algorithm~\ref{algo:sim}), hence it is given by Equation~\ref{eq:complexity_similarity_social} for the social-aware case, and by Equation~\ref{eq:complexity_similarity_baseline} for the baseline. The complexity of a set intersection by using hashing-based dictionaries is $\mathcal{O}(\min(|Set_1|, |Set_2|))$ ~\cite{Philip_2007}. \begin{align} \label{eq:complexity_similarity_social} \mathcal{O}(\textrm{circle-aware similarity}) &= \mathcal{O}(\min(|\Gamma_{C_x}(i)|, |\Gamma_{C_x}(j)|)) \nonumber \\ & \approx \mathcal{O}(|\Gamma_{C_x}(i)|)) \\ \mathcal{O}(\textrm{baseline similarity}) &= \mathcal{O}(\min(|\Gamma(i)|, |\Gamma(j)|)) \nonumber \\ & \approx \mathcal{O}(|\Gamma(i)|)) \label{eq:complexity_similarity_baseline} \end{align} While the above formulas have been derived for CN, it is easy to see that also JC, AA, and RA share the same complexity. Indeed, JC leverages the set union in addition to the set intersection, operation that is still linear in the size of the smaller set. AA and RA are the analogous of CN but with different weights, hence, again, they are linear in the size of the smaller set. We can now substitute Lemma~\ref{theo:time_complexity_egonet} and Equations~\ref{eq:complexity_similarity_social}-\ref{eq:complexity_similarity_baseline} into Equations~\ref{eq:complexity_social} and~\ref{eq:complexity_baseline} above, thus obtaining: \begin{align*} \mathcal{O}(\textrm{circle-aware }\phi) &= \mathcal{O}(|V| * |\Gamma(i)| * \log(|\Gamma(i)|) + \nonumber \\ & + \mathcal{O}(|V|^2) * |\Gamma_{C_x}(i)| \nonumber{} \\ & = \mathcal{O}(|V|^2) * |\Gamma_{C_x}(i)| \\ \mathcal{O}(\textrm{baseline }\phi) & = \mathcal{O}(|V|^2) * |\Gamma(i)|. \end{align*} The right-hand side of the above equation stems from the fact that social networks are sparse, hence $|\Gamma(i)| \ll |V|$. Since the number of neighbors in any circle of the ego network is (significantly) smaller than all neighbors in the baseline (because, by definition, social circles only retain the strongest relationships), we have that the time complexity of the ego-aware system is always (significantly) smaller than the baseline. This concludes the proof. \end{proof} In Theorem~\ref{theo:time_complexity_supervised} below, we derive the time complexity for baseline and circle-aware heuristics in the supervised case (discussed in Section~\ref{sec:supervised}). If negatives are undersampled, supervised learning can provide a much greater efficiency than unsupervised link prediction. \begin{table}[t] \caption{Time complexity of supervised learning algorithms used in Section~\ref{sec:supervised}. $d$ denotes the number of features considered (in our case $d=4$, i.e., to the number of heuristics defined in Section~\ref{sec:unsupervised}), $k$ is the number of decision trees used in Random Forest (in our case, $k=500$).} \begin{center} \resizebox{0.49\textwidth}{!}{% \begin{tabular}{ l l l l l} \toprule & \textbf{Strategy} & \textbf{Undersampled negatives} & \textbf{Full dataset} & \\ \midrule \multirow{4}{*}{Training} & Logistic regr., Na\"ive Bayes & $\mathcal{O}\left(|E_e| d \right)$ & $\mathcal{O}\left(|V|^2 d \right) $ \\ & Decision Trees & $\mathcal{O}\left(|E_e| \log(|E_e|) d \right)$ & $\mathcal{O}\left(|V|^2 \log(|V|^2) d \right)$\\ & Random Forest & $\mathcal{O}\left(|E_e| \log(|E_e|) d k \right)$ & $\mathcal{O}\left(|V|^2 \log(|V|^2) d k \right)$\\ & SVM & $\mathcal{O}\left(|E_e|^2\right)$ & $\mathcal{O}\left(|V|^4\right)$\\ \midrule \multirow{2}{*}{Feature extract.} & Baseline & $\mathcal{O}\left(|E_e|\right) \cdot \mathcal{O}\left(|\Gamma(i)|\right)$ & $\mathcal{O}\left(|V|^2\right) \cdot \mathcal{O}\left(|\Gamma(i)|\right)$\\ & Circle-aware & $\mathcal{O}\left(|E_e| \right) \cdot \mathcal{O}\left( |\Gamma_{C_x}(i)| \right)$ & $\mathcal{O}\left(|V|^2\right) \cdot \mathcal{O}\left(|\Gamma_{C_x}(i)|\right)$\\ \midrule \multirow{2}{*}{Egonet comp.} & Baseline & - & - \\ & Circle-aware & \multicolumn{2}{c}{$\mathcal{O}\left(|V| \right) \cdot \mathcal{O}\left(|\Gamma(i)| \cdot \log(|\Gamma(i)|\right))$} \\ \bottomrule \end{tabular}} \end{center} \label{tab:time_complexity_supervised_algos} \end{table} \begin{theorem}[Complexity supervised]\label{theo:time_complexity_supervised} The time complexity of link prediction using circle-aware or baseline heuristics with supervised learning is given by Table~\ref{tab:time_complexity_supervised_algos}. It holds that: \begin{itemize} \item When negatives are undersampled, with the exception of logistic regression and na\"ive Bayes, the training phase ($\ge \mathcal{O}(|E_e| \log |E_e|)$) dominates the complexity, and the effect of ego network computation in the feature extraction phase is negligible. \item When logistic regression and na\"ive Bayes are used together with negatives undersampling, the overall time complexity is $\mathcal{O}(|E_e|)$, with a slightly smaller multiplicative factor for baseline heuristics. \item When negatives are not undersampled, the computation of ego networks (which is $\mathcal{O}(|V|) \approx \mathcal{O}(|E_e|)$) is negligible, and the feature extraction is slightly more convenient for circle-aware heuristics. \end{itemize} \end{theorem} \begin{proof} The complexity of supervised learning can be decomposed into the complexity for extracting the relevant features and the complexity of solving the learning problem on these features: \begin{multline*} \mathcal{O}(\textrm{supervised link prediction}) = \\ \mathcal{O}(\textrm{feature extraction}) + \mathcal{O}(\textrm{supervised learning}) \end{multline*} It is easy to see that the latter component is the same regardless of the social circle considered, since the features described in Section~\ref{sec:unsupervised}, once computed, are simply the four heuristics associated with each edge $(i,j)$. Specifically, denoting the number of features with $d$ (with $d=4$ in our case) and the number of training links with $|E_{train}|$, the time complexity for training the supervised algorithms used in Section~\ref{sec:supervised} is: $\mathcal{O}\left(d |E_{train}|\right)$ for logistic regression and na\"ive Bayes, $\mathcal{O}\left(|E_{train}| \log(|E_{train}|) d \right)$ for decision trees, $\mathcal{O}\left(|E_{train}| \log(|E_{train}|) d k \right)$ for Random Forest ($k$ is the number of decision trees used in Random Forest), $\mathcal{O}\left(|E_{train}|^2\right)$ for SVM (of the latter, we here consider the kernel version). The number $|E_{train}|$ of training links depends on whether we consider the undersampled or full training set. In the former case, $|E_{train}| = 2 |E_e|$, since the negative training links are undersampled to match the number of positive ones. In the latter, $|E_{train}| \sim \mathcal{O}\left( | V^2 | \right)$, since social networks are sparse. Note that the time complexity of the learning phase only depends on the selected supervised learning algorithm. We now focus on $\mathcal{O}(\textrm{feature extraction})$. We start with the circle-aware feature extraction. In the equation below, we derive the time complexity separating the negatives undersampling and the full dataset case, and leveraging Lemma~\ref{theo:time_complexity_egonet} for $\mathcal{O}(\textrm{ego})$ and Equation~\ref{eq:complexity_similarity_social} for $\mathcal{O}(\textrm{circle-aware sim})$. In general, the similarity is computed for all node pairs in $E_{train} = E_e \cup \overline{E}_e^{train}$, where $\overline{E}_e^{train}$ denotes the set of negative training edges. However, with negatives undersampling, $|\overline{E}_e^{train}| = |E_e|$, with the full dataset $\overline{E}_e^{train} \approx \mathcal{O}(|V|^2)$. \begin{multline}\label{eq:complexity_feature_extr_circles} \mathcal{O}\left(\textrm{circle-aware feat. extr.} \right) = \\ = \mathcal{O}(|V|) \cdot \mathcal{O}(\textrm{ego}) + \bigg\{ \begin{matrix} \mathcal{O}(|E_e|) \cdot \mathcal{O}(\textrm{circle-aware sim}) \\ \mathcal{O}(|V|^2) \cdot \mathcal{O}(\textrm{circle-aware sim})\end{matrix} \\ \approx \bigg\{ \begin{matrix} \mathcal{O}(|E_e|) \cdot \mathcal{O}(|\Gamma(i)| \cdot \log(|\Gamma(i)|) \cdot |\Gamma_{C_x}(i)|) \\ \mathcal{O}(|V|^2) \cdot \mathcal{O}(|\Gamma_{C_x}(i)|)\end{matrix} \end{multline} Deriving the complexity of baseline feature extraction is now straightforward. In fact, we can simply neglect the computation of ego networks in Equation~\ref{eq:complexity_feature_extr_circles} and use the formula for $\mathcal{O}(\textrm{baseline sim})$ in Equation~\ref{eq:complexity_similarity_baseline}. Then, the equation below follows: \begin{multline}\label{eq:complexity_feature_extr_baseline} \mathcal{O}\left(\textrm{baseline feature extraction} \right) = \\ = \bigg\{ \begin{matrix} \mathcal{O}(|E_e|) \cdot \mathcal{O}(\textrm{baseline sim}) \\ \mathcal{O}(|V|^2) \cdot \mathcal{O}(\textrm{baseline sim})\end{matrix} = \\ = \bigg\{ \begin{matrix} \mathcal{O}(|E_e|) \cdot \mathcal{O}(|\Gamma(i)|) \\ \mathcal{O}(|V|^2) \cdot \mathcal{O}(|\Gamma(i)|)\end{matrix} \end{multline} Comparing Equations~\ref{eq:complexity_feature_extr_circles} and~\ref{eq:complexity_feature_extr_baseline}, we remark that, when using the full dataset, the time complexity of feature extraction is dominated by $\mathcal{O}(|V|^2)$, with circle-aware features being slightly more convenient (since $|\Gamma_{C_x}(i)| < |\Gamma(i)|$). Vice versa, with negatives undersampling, the time complexity of feature extraction is $\mathcal{O}(|E_e|)$ and baseline features are marginally more advantageous. \end{proof} If we compare the heuristic-based link prediction complexity in Theorems~\ref{theo:time_complexity_unsupervised}-\ref{theo:time_complexity_supervised}, we observe that supervised link prediction with negatives undersampled is more efficient than unsupervised link prediction, as it allows to reduce the complexity from $\mathcal{O}(|V|^2)$ to $\mathcal{O}(|E_e|)$. In these settings, the small overhead of computing ego networks is paid off by the outstanding prediction performance. We can now derive the time complexity of \emph{node2vec}-based link prediction and SEAL. \begin{theorem} The time complexity of link prediction with \emph{node2vec}, using Hadamard product for edge embedding, is given by the following: \begin{itemize} \item $\mathcal{O}(d |E_e|)$ when negatives are undersampled in the training set, \item $\mathcal{O}(d |V|^2)$ when all training negatives are used. \end{itemize} \end{theorem} \begin{proof} The time complexity for getting the node embedding with \emph{node2vec} is $\mathcal{O}(d |V|)$ \cite{zhang2018network-representation}, where $d=128$, i.e., the dimensions of the embeddings. . Then, for each training edge, we have to extract the edge embedding by taking the Hadamard product of the node embedding pairs for training links: \begin{equation*} \mathcal{O}\left(d \cdot |E_{train}| \right) \approx \bigg\{ \begin{matrix} \mathcal{O}(d |E_e|) & \textrm{with negatives undersampling} \\ \mathcal{O}(d |V|^2) & \textrm{with full training data.} \\\end{matrix} \end{equation*} Finally, for link prediction, we train a logistic regression model, whose complexity is $\mathcal{O}\left(d \cdot |E_{train}| \right)$, hence the above equation also holds for the training phase. Thus, the thesis follows. \end{proof} \begin{theorem} The time complexity of link prediction using SEAL is: \begin{itemize} \item $\mathcal{O}(d |E_e| |\Gamma(i)|^h|)$ when negatives are undersampled in the training set, \item $\mathcal{O}(|V|^2 |\Gamma(i)|^h)$ when all training negatives are used. \end{itemize} \end{theorem} \begin{proof} SEAL starts with extracting enclosing subgraphs of depth $h$ for each training link. We denote the edge set of the enclosing subgraphs of depth $h$ as $E_{sub}^h$. Note that $|E_{sub}^h| \approx 2 |\Gamma(i)|^h$, and $|E_{sub}^h|$ approaches $|E|$ as $h$ gets larger. This phase requires $\mathcal{O}\left( |E_{train}| \cdot |E_{sub}^h| \right)$. Then, each enclosing subgraph is fed to DGCNN, whose complexity is linear in the number of edges of the training graph~\cite{wu2020comprehensive}. Since DGCNN is applied to each enclosing subgraph, the complexity of this phase is given by $\mathcal{O}\left( |E_{train}| \cdot |E_{sub}^h| \right)$. When SEAL is used together with \emph{node2vec} embeddings, we have to also consider an initial $\mathcal{O}(d |V|)$ (with $d=128$) for computing the embeddings, which can also be approximated as $\mathcal{O}(d |E_e|)$. \end{proof} We conclude this section by comparing the complexity of the best-performing link prediction algorithms according to the results of Section~\ref{sec:evaluation}: circle-aware supervised link prediction (with logistic regression or na\"ive Bayes), \emph{node2vec}, and SEAL. Considering the case where negatives are undersampled (more effective for all strategies, including self-supervised ones), all the best-performing algorithms are linear in the number of edges. Hence, our circle-aware approach is able to outperform state of the art solutions without worsening the computational complexity. \subsection{Similarity-based unsupervised learning with circle-awareness} \label{sec:unsupervised} In order to showcase the effect of social circles for unsupervised link prediction, we focus on the simple, yet effective class of similarity-based approaches. Like for all similarity-based link prediction algorithms, the goal of the proposed algorithm is to associate each non-existing link between two users $i,j$ in $V_{e}$ with a score proportional to the likelihood that the link will actually be formed in the future. Hence, the goal of the link predictor is to associate with each edge in $V_{e} \times V_{e} - E_{e}$ a probability/confidence that the link will indeed appear in the future. Qualitatively, this is equivalent to \emph{suggesting users to other users} for possible interactions, friendships, etc. In order to study the effect of the social circles on link prediction, we propose to \emph{slice} the social graph based on the membership to a specific circle (recall that our concept of social circles is different from that of communities). Let us focus on a user $i \in V_{e}$. We denote with $C_1^{(i)}, C_2^{(i)}, \ldots$, the sets comprising the neighbors of $i$ that belong to $i$'s first, second,~$\ldots$, social circle, respectively. We have discussed how to obtain these circles in Section~\ref{sec:extraction_egonets}. Thus, the graph $\mathcal{G}$ sliced according, e.g., to circle $C_3$, is the graph including only links between egos and their alters up to layer 3 (remember that $C_3$ includes $C_1$ and $C_2$). More formally, it can be defined as $\mathcal{G}_{C_3} = (V, E_{C_3})$, where $ E_{C_3} = \{ e_{ij} \in E: i \in V_e, j \in C_3^{(i)} \}$. Note that the slicing introduces asymmetry in the graph (e.g., a relationship $i,j$ can be in C4 for ego $i$ and in C3 for ego $j$). However, it is exactly this edge filtering that helps link prediction, as we will show in Section~\ref{sec:evaluation}. Social-circles slicing can be extended to include also domain-based slicing for domain-specific datasets. For example, from $\mathcal{G}_{C_3}$ we can retain only domain-specific nodes and edges (i.e., nodes in $V_e \cup V_d$ and edges in $E_{e} \cup E_{d}$). We generalise the notation related to the slicing preprocessing by denoting with $\omega$ the specific slicing considered, and with $\mathcal{G}_{\omega}$ the resulting graph. In Section~\ref{sec:evaluation}, we will discuss the performance of link prediction both with social-based slicing and with social-based plus domain-based slicing. We anticipate here that when the social circles information is not used for the prediction, leveraging the category information provides a significant advantage. Vice versa, social-circles awareness makes information on the category less relevant (and this is extremely important, since the extraction of categories typically requires an additional, domain-specific, classifier or manual labelling). In order to perform unsupervised link predictions, for each user-user pair $i,j$ for which a link does not exist in $E_{e}$, we follow Definition~\ref{def:unsupervised_circle_aware} below. Note that each slicing will yield different predicted links. Hence, we will treat each slicing choice as a separate link prediction approach. \begin{definition}[\textsc{Unsupervised Circles-aware Link Prediction}]\label{def:unsupervised_circle_aware} For a fixed K, the social circles-aware link prediction algorithm suggests, to a user~$i$, K users $j$ (with $j \in V_{e} \wedge (i,j) \not\in E_{e}$) associated with the top-K $sim_{\omega}(i,j)$ values, where $\omega$ denotes the selected slicing and $sim_{\omega}(i,j)$ is the similarity computed on $\mathcal{G}_{\omega}$. \end{definition} The definition of a new similarity function is out of the scope of the paper. What we want to do here is to evaluate popular similarity functions available in the literature when they are enriched with knowledge about the ego network circles. In order to isolate the effect of social-circles awareness, we need approaches that are simple (so it is easy to gauge the role of social circles) yet effective. For these reasons, our choice fell on the strategies described below, often used in the related literature. In summarising them, we denote with $\Gamma_{\omega}(i)$ the neighborhood of node $i$ in $\mathcal{G}_{\omega}$. \begin{itemize} \item \emph{Common neighbors (CN)} \cite{Liben-Nowell2007}: the similarity is given by the number of common neighbors between users $i$ and $j$ in $\mathcal{G}_{\omega}$: \begin{equation} sim_{\omega}(i,j) = | \Gamma_{\omega}(i) \cap \Gamma_{\omega}(j) |. \end{equation} \item \emph{Jaccard's Coefficient (JC)} \cite{Liben-Nowell2007}: the similarity is computed as the Jaccard similarity of the set of common neighbors of users $i$ and $j$ in $\mathcal{G}_{\omega}$: \begin{equation} sim_{\omega}(i,j) = \frac{| \Gamma_{\omega}(i) \cap \Gamma_{\omega}(j)|}{| \Gamma_{\omega}(i) \cup \Gamma_{\omega}(j) |}. \end{equation} \item \emph{Adamic-Adar (AA)} \cite{Adamic2003}: the Adamic-Adar similarity reduces the importance of common neighbours having high degree: \begin{equation} sim_{\omega}(i,j) = \sum_{z \in \Gamma_{\omega}(i) \cap \Gamma_{\omega}(j)} \frac{1}{\log(| \Gamma(z) | )}. \end{equation} \item \emph{Resource Allocation (RA)} \cite{Zhou2009}: the RA score is similar to the Adamic-Adar one, but it penalises even more the common neighbors with high degree: \begin{equation} sim_{\omega}(i,j) = \sum_{z \in \Gamma_{\omega}(i) \cap \Gamma_{\omega}(j)} \frac{1}{| \Gamma(z) |}. \end{equation} \end{itemize} \noindent Among these four link prediction algorithms, RA is the one that consistently performs better in the related literature~\cite{Lu2010,Zhang2015,Zhu2016}. In Sections~\ref{sec:results_unsupervised} and~\ref{sec:results_supervised} we will investigate if this is still the case when the policies can leverage the knowledge of the social circles. \subsection{Supervised learning with social-circle awareness} \label{sec:supervised} Each topological metric discussed in the previous section captures a single possible mechanism yielding to the formation of new links in the network. Ref.~\cite{Lichtenwalter2010} discusses how this unsupervised approach can take advantage of adding supervised learning on top of it. They show that simple ranking of heuristics is outperformed by supervised classifiers, because the latter have the capability of identifying multiple differentiating boundaries in the similarity score domain, even when just a single heuristic is used as feature. Thus, in this section, we cast our social-aware link prediction problem into a supervised learning problem. This entails computing a vector of features for each user pair~$i,j$. Each of the metrics in Section~\ref{sec:unsupervised} becomes a feature that describes the user pair. Each pair is also labelled to mark whether the link exists or not. In order to test the different performance of different supervised approaches, in this work we consider the following learning algorithms (in parentheses we report the link prediction papers in which they have been previously used): logistic regression~\cite{OMadadhain2005}, Random Forest~\cite{Lichtenwalter2010}, decision trees, na\"ive Bayes, and SVM~\cite{Hasan2006}, the latter with both linear and polynomial kernels. We use their R implementations (\texttt{glm}, \texttt{randomForest}, \texttt{rpart}, \texttt{klaR}, \texttt{kernlab}, respectively) together with the \texttt{caret} package for training and test. Parameter optimization is applied on the training set with 10-fold cross validation. \subsection{Prediction based on feature learning methods} \label{sec:latent_features_based} In the literature, there are newly suggested link prediction methods based on learning \emph{latent features} of the graphs, where these feature vectors are low-dimensional vector representations produced by approaches such as graph representation learning~\cite{cai2018comprehensive} and graph neural networks (GNN) \cite{wu2020comprehensive}. For a detailed description and classification of the methods, the reader may refer to \cite{wu2020comprehensive, mutlu2020review, kumar2020link, cai2018comprehensive} and Section~\ref{sec:relwork_linkprediction_feature_extraction}. In this work, we select two feature learning algorithms to be used as benchmarks for comparison with our social-aware approach. Specifically, we have selected one of the most popular graph embedding methods, \emph{node2vec}~\cite{grover2016node2vec}, and one most the most popular GNN-based link prediction methods, \emph{SEAL}~\cite{Zhang2018}. For details on the two algorithms and their settings, please refer to Appendix~\ref{app:feature_learning}\iftoggle{ONEFILE}{}{ of the SM~\cite{toprak2021harnessing-power}}. Note that, differently from Sections~\ref{sec:unsupervised}-\ref{sec:supervised}, the selected feature learning approaches are not modified to include social-awareness. In fact, the key idea of feature learning is to autonomously learn the important graph features. Thus, our objective, in this case, is to assess whether the automatically learnt features are better than the social-aware hand-engineered ones in predicting new links.
\subsubsection{\@startsection{subsubsection}{3}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {-1.5ex \@plus -.2ex {\normalfont\normalsize\bfseries}} \makeatother \usepackage[ backend=biber, doi=true, sorting=none ]{biblatex} \addbibresource{Bibliography.bib} \begin{document} \pagestyle{plain} \pagenumbering{arabic} \title{An acrylic assembly for low temperature detectors} \author{M. Biassoni\inst{1} \and C. Brofferio\inst{1,2} \and M. Faverzani\inst{1,2} \and E. Ferri\inst{1,2} \and S. Ghislandi\inst{2}\footnote{e-mail: \href{mailto:<EMAIL>@gssi.it} (corresponding author).}\footnotemark\orcid{0000-0003-0232-1249} \and S. Milana\inst{3} \and I. Nutini\inst{1,2} \and V. Pettinacci\inst{3} \and S. Pozzi\inst{1,2} \and S. Quitadamo\inst{2}\footnotemark[\value{footnote}]\footnotetext{Gran Sasso Science Institute, L'Aquila, Italy (present affiliation).} } \institute{INFN – Section of Milano Bicocca, Milan, Italy \and Department of Physics, Università degli Studi di Milano - Bicocca, Milan, Italy \and INFN - Section of Roma1, Roma, Italy} \date{Received: date / Revised version: date} \abstract{ Thermal detectors are a powerful instrument for the search of rare particle physics events. Inorganic crystals are classically used as thermal detectors held in supporting frames made of copper. In this work a novel approach to the operation of thermal detectors is presented, where TeO$_2$ crystals are cooled down to $\sim\SI{10}{mK}$ in a light structure built with plastic materials. The advantages of this approach are discussed. } \maketitle \section{Introduction} \label{intro} Thermal detectors~\cite{Enns,Pirro} are largely used in rare event particle physics in the search of neutrinoless double beta decay ($0\nu\beta\beta$)~\cite{FIORINI,review} and dark matter interactions~\cite{reviewDM}. They are employed as calorimeters, thus measuring the energy released by particles, in a setup cooled down to $\sim\SI{10}{mK}$. One of the main experimental challenges of this technique is the capability of cooling down several crystals to extreme temperatures, maintaining them thermally stable. Detector holders characteristics are crucial to achieve satisfying performances. For this reason, copper holders have always been used for their known mechanical response at milli-Kelvin scale and high thermal conductivity. This allows to cool the material more efficiently and to provide an ideal thermal bath in which the detector discharges the absorbed energy. The \textsf{CUORE} experiment~\cite{CUORE} succeeded in cooling and operating a \SI{1}{tonne} detector made of \ce{TeO_{2}} crystals, by building the most powerful cryostat ever made~\cite{Criostato}. In experiments employing \ce{^{130}Te} as $\beta\beta$ emitter, the largest gamma-background component comes from high-energy photons undergoing Compton scattering in passive elements of the system~\cite{BackgroundBudget}. Copper is therefore not an optimal choice from this point of view as it has a large Compton scattering cross-section, on top of being heavy and expensive when produced with high radio-purity standards. We decided to test another material to be used as holder in the close vicinity of thermal detectors. We selected an organic compound, commercially available as Stratasys VeroClear\texttrademark. It is a transparent PolyJet photopolymer for clear acrylic simulation. It is also inexpensive, light (density $\rho = \SI{1.18}{g/cm^{3}}$) and, being organic, characterized by a low $Z_{\text{eff}} = 6.5$\footnote{The effective atomic number has been computed as $Z_{eff} = \sqrt[2.94]{\sum_{i}^{elements} f_{i} \cdot Z_{i}^{2.94}}$ as in~\cite{MURTY1965}.}. These features could passively lower the background induced by Compton interaction with the holder itself, meeting the requirements of rare events physics. From a mechanical point of view, at room temperature, the VeroClear\texttrademark \,is characterized by good rigidity and strength\footnote{The VeroClear\texttrademark \,specifics are available at \url{https://www.stratasys.com/-/media/files/material-spec-sheets/mds_pj_veroclear_0320a.pdf}.}, not far from the ones in copper. Conversely the acrylic has lower elasticity. These characteristics makes the polymer suitable to build structural frames. If copper properties are well known at cryogenic temperatures, VeroClear\texttrademark \,has to be tested in such extreme conditions. VeroClear\texttrademark \,was born to simulate the optical properties of polymethyl methacrylate (PMMA), largely used as base for many organic scintillators~\cite{PMMAScintillator}. This opens the possibility to activate a component of the setup which is passive in classical designs. An active holder would veto its own $\alpha$ surface contamination and part of the crystals one, together with the $\gamma$ component that Compton scatters with the holder itself (See Figure~\ref{fig:1}). \begin{figure} \begin{minipage}[t]{0.48\textwidth} \centering \includegraphics[width=0.9\linewidth]{Pictures/Fig1.eps} \caption{Sketch of the event types that contribute to the $0\nu\beta\beta$ background in \ce{TeO_{2}} and that would be vetoed by an active holder. The green straight arrows represent $\alpha$ particles generated in the holder surface, later reaching the crystals and vice-versa. The curled red arrow shows an energetic photon undergoing a Compton scattering with the holder and being absorbed by the detector} \label{fig:1} \end{minipage}\hfill \begin{minipage}[t]{0.48\textwidth} \centering \includegraphics[width=0.7\linewidth]{Pictures/Fig2.eps} \caption{CAD section of the VeroClear\texttrademark \,holder together with a crystal and the relative spacer. The top face of one of the columns is highlighted in order to appreciate its shape} \label{fig:2} \end{minipage} \end{figure} The main difference of VeroClear\texttrademark \, with respect to PMMA is the possibility to be 3D printed, a useful opportunity for building structures with complex geometries, if required. Right now, we are not yet considering the impact of such a build-up technique from the point of view of induced contamination. However, there is poor literature about properties of acrylic and, more generally, organic compounds, at the milli-Kelvin scale, even if some can still be found~\cite{Ventura}. We don't know how the VeroClear\texttrademark \,characteristics, such as low thermal conductance and large heat capacity, would modify the cool-down as well as the detector response's shape and performance. For these reasons, an initial proof of principle is of primary importance. It is essential to check detector behaviour at cryogenic temperature, to be compared to the one coming from copper holders. \section{Experimental Setup} \label{sec:2} The measurements have been performed using $1\times 1 \times 1$ \si{cm^{3}} \ce{TeO_{2}} crystals. They have been operated in a cryogenic facility located at Milano\,-\,Bicocca University (Italy). The crystals were equipped with $3 \times 3 \times 1$ \si{mm^{3}} Neutron Transmutation Doped \ce{Ge} (NTD) employed as thermistors~\cite{Haller}. The NTDs were mechanically and thermally coupled to the crystals with six spots of epoxy glue. The NTD consists of a \ce{Ge} chip with a doping level slightly below the Mott transition~\cite{MottTransition}. Since the NTDs are naturally well-compensated semiconductors (the uniformly-distributed dopants are both donors and acceptors), the \ce{Ge} lattice electrons behavior can be well described by the Shklovskii’s and Efros’ Variable Range Hopping (VRH) model~\cite{VariableRangeHopping}. In this regime, the NTD's conductivity strongly depends on the temperature $T$. It can be shown that the resistance $R$ can be written as: \begin{equation} R = R_{0} e^{\sqrt{\frac{T_{0}}{T}}}. \end{equation} The employed NTDs had already been characterized~\cite{ArticoloSimone} and their parameters, $R_{0}$ and $T_{0}$, were respectively evaluated as $\sim$\SI{0.5}{\ohm} and $\sim$\SI{4.75}{\kelvin}. A biasing and read-out circuit provided the polarization current to the thermistors, using either \SI{20}{\mega\ohm} or \SI{15}{\giga\ohm} load resistors, depending on the NTD's resistance value at the chosen working point. The latter is defined by the position in the NTD's I-V curve, usually referred as \emph{load curve}. The working point mainly determines the signal-to-noise ratio and the pulse shape of the detector. \begin{figure} \centering \includegraphics[width=0.35\linewidth]{Pictures/Fig3.eps}\hspace{0.2cm} \includegraphics[width=0.46\linewidth]{Pictures/Fig3_2.eps} \caption{Picture of the setup containing the two towers wired and installed below the cold plate through S-shaped copper strips (\emph{left}). Detail of the acrylic holder (\emph{right}). It is possible to see the NTDs glued on the crystals and their gold wire link to the Cu strips of the pins. These strips are not thermally coupled to the crystals. Only two channels for acrylic holder and one reference channel in the copper were used for this paper purposes} \label{fig:3} \end{figure} Two similar holding structures have been built for our purposes. One is the acrylic tower, composed of a \SI{5}{mm} thick base and four columns which accommodate three \ce{TeO_{2}} stacked crystals. To reduce the risk of damage to the detectors, due to the distinct differential contractions of acrylic and \ce{TeO_{2}}, the holder was designed to minimize stresses while maintaining the needed stiffness. This has been accomplished by shaping the VeroClear\texttrademark \,columns as in Figure~\ref{fig:2}. The holder fits the crystals' faces so to avoid vibration but leaving a mechanical unloading at the edges. Moreover, on top of the crystal stack, some space has been left to account for contractions at cryogenic temperatures. Lastly, \SI{0.5}{mm} thick VeroClear\texttrademark \,spacers were interposed between crystals mainly to avoid thermal cross-talk among detectors. The VeroClear\texttrademark \,holder and spacers have been produced through a Stratasys ObjetPRO machine, a 3D-Printer working by means of polyjet technology which guarantees high accuracy (order of hundredths of a mm) and quality of the parts produced through a process of instant cure by UV light of photosensitive resins (such as VeroClear\texttrademark). Soluble support material (Stratasys SUP706-B\texttrademark) was used for the construction of these parts, in order to optimize the cleaning and consequently the surface finishing. The printed substrates can be also treated for a few hours inside a lighting chamber equipped with fluorescent lamps, selected both in power and color temperature, in order to improve the final transparency. The production took place at INFN Rome mechanical workshop, exploiting the HAMMER\footnote{For more information consult \url{https://hammer.lngs.infn.it/}.} facilities (Hub for Additive Manufacturing Materials Engineering and Research) instituted by INFN. The second holder, made of copper, includes a \SI{5}{mm} thick base, $2$ columns and a thin plate. It can house two crystals glued, by means of Araldite$^{\circledR}$ Rapid glue spots, on the base and on the plate. Both the towers were hosted in an Oxford TL-200 \ce{^{3}He}-\ce{^{4}He} dilution refrigerator. Each holder was fixed through brass screws to a copper S-shaped strip, in turn thermally coupled to a copper plate. The latter is directly connected to the cold finger and the mixing chamber. The cryostat operating temperature was maintained at $\sim$\SI{15}{mK} and the heat bath was monitored through a \textsf{MAGNICON} MFFT SQUID thermometer, positioned under the mixing chamber, and thermally linked to the same copper plate the detectors were connected to. The entire detector setup is shown in fig.~\ref{fig:3}. The NTDs readout was performed through \SI{50}{\micro m} gold wires ball-bonded to the \ce{Ge} thermistors and soldered to metallic pins on the other side. In the case of acrylic holder, these gold wires provided the detector main thermal coupling, as demonstrated in~\cite{ArticoloSimone}. The electric signal was carried out of the cryostat through twisted constantan wires, lastly reaching a Faraday cage where it underwent amplification and anti-aliasing Bessel filtering. Eventually, the detector signal was digitized and stored using two \SI{18}{bit} ADC boards. A 2 cm thick Cu layer surrounded the setup to reduce the environmental $\gamma$ radiation reaching the two towers, together with a \SI{5}{cm} thick Pb disk on top of the cold plate. A \ce{^{232}Th} source was employed to calibrate the energy scale and was put under the cryostat during calibration runs. \section{Data analysis} \label{sec:3} When a particle passes through the \ce{TeO_{2}} crystals, it releases energy and, consequently, the detector temperature raises. This variation is detected through the NTD, operated as a thermometer. The NTDs output was digitized and stored as a continuous \SI{2}{kHz} waveform. During the data-taking, a derivative trigger flagged events from the continuous stream. The selected pulses were stored as windows of \SI{400}{ms} length (Figure~\ref{fig:4}). The pulse window contains a \SI{100}{ms} pre-trigger region used to extract information about the specific event baseline. Moreover, noise windows were sampled randomly. They have been used later to construct a noise power spectrum for each channel, run by run. The first part of the offline analysis identified periods of time in which the detectors were misbehaving. The check was done by looking for intervals with unstable baseline or high baseline RMS. These ``bad intervals'' were excluded from the subsequent analysis steps. For each channel the \emph{average pulse} (AP) and the \emph{average noise power spectrum} (ANPS) have been computed. They were used to evaluate the pulse amplitude with the Optimum Filter technique~\cite{OptimumFilter}, which allows to maximize the signal-to-noise ratio. Since the thermal gain depends on temperature, it was essential to correct the detector response compensating for temperature variations among events. For this reason, we applied a thermal gain stabilization by using the detector baseline level, that is the pretrigger average baseline, as a temperature proxy. The temperature dependence of the gain was corrected by correlating the amplitude of pulses belonging to a peak of known energy (\SI{2615}{keV} from \ce{^{208}Tl}) to the baseline level~\cite{ThermalStabilization}. The spectrum was calibrated using recognizable $\gamma$ peaks, mainly coming from the \ce{^{232}Th} calibration source. These lines have been fitted using a Gaussian function added to a linear background. For the calibrating function a $2^{nd}$ order polynomial with intercept at zero has been employed. An example of the obtained energy spectra is reported in fig.~\ref{fig:5}. All considered, we analyzed one reference channel in the copper assembly (here named channel 1) and $2$ channels from the acrylic tower (channel 2 and channel 3). \begin{figure} \begin{minipage}[t]{0.48\textwidth} \centering \includegraphics[width=1\linewidth]{Pictures/Fig4.eps} \caption{Typical \SI{400}{\milli\second} event window containing a pulse. Rise time ($t_{\text{rise}}$) and decay time ($t_{\text{decay}}$) are defined as the time elapsed between $10\%$ and $90\%$ of the pulse amplitude} \label{fig:4} \end{minipage}\hfill \begin{minipage}[t]{0.48\textwidth} \centering \includegraphics[width=1.0\linewidth]{Pictures/Fig5.eps} \caption{Example of calibration energy spectrum. The energy of lines used for the calibration is reported on top of the relative peaks and expressed in \si{keV}. The \SI{511}{keV} peak is due to $e^{+}$-$e^{-}$ annihilation, \SI{583}{keV} and \SI{2615}{keV} belong to \ce{^{208}Tl}, \SI{911}{keV} and \SI{969}{keV} come from \ce{^{228}Ac} decay, the \SI{1461}{keV} peak is due to \ce{^{40}K} and the \SI{1593}{keV} is the double escape peak of the highest energy \ce{^{208}Tl} line} \label{fig:5} \end{minipage} \end{figure} \section{Results} \label{sec:4} During the cool-down some high-statistics calibration runs were collected. They all lasted more than \SI{20}{hr} and they contain a total of $~10^{5}-10^{6}$ physical pulses each. Before the data acquisition, test runs were needed to optimize NTDs' working point and trigger parameters. The first obtained result is related to the detector stability over time. Acrylic is amorphous and it has low thermal conductance. The disordered molecule structure could in principle relax and, unpredictably, release energy, acting as a residual heat load on the holder. Therefore, the presence of acrylic could induce temperature shifts on long time scales or fast and large spikes. The latter, in contrast to the usual temperature variations, could not be corrected with the stabilization described in the previous chapter. However, the acrylic setup baseline level, proxy for the crystals temperature in the holder, was as stable as the one in the copper holder for very long times. The stability has been checked for all channels and all acquired runs. An example is shown in fig.~\ref{fig:6}. \begin{figure} \centering \includegraphics[width=0.6\linewidth]{Pictures/Fig6.eps} \caption{Baseline level-time scatter plot for channels $1$, $2$ and $3$ of a sample run. Arbitrary offsets have been added to not overlap all the points. The baseline, proxy of the temperature at the crystal level, is stable over the \SI{30}{hr} of data-taking both for acrylic and copper towers. The detectors in the VeroClear\texttrademark \, don't show long time shifts or spikes out of the expected ones. The visible overall baseline modulation, present in all the three channels, is due to fluctuations of the cryostat temperature, reported in the lower plot} \label{fig:6} \end{figure} Since crystal holders have also structural roles, another important result concerns acrylic mechanical properties. The plastic holder had already undergone many cool-down cycles from room temperature to $\SI{77}{K}$ and few cycles from room temperature to $\sim \SI{15}{mK}$. After each group of tests it was examined carefully at the microscope and no cracks or visible defects were found. No spurious thermal noise of the type registered in CRESST~\cite{CRESST} was observed during data taking, nor cracks on the crystals after warm-up. We expected the different conductivity of the holding material~\cite{ArticoloSimone} to influence pulse formation. Indeed, at their respective optimal working points (\emph{wp1}) the signals from channel in the acrylic holder are faster than those from channel $1$ (Cu tower). The effect can be qualitatively appreciated by comparing the pulse shapes plotted in fig.~\ref{fig:7}. This can be explained by the weaker thermal coupling provided by the acrylic, leading to an higher crystals operating temperature of $\sim \SI{20}{mK}$ (with smaller working resistances $R_W$ resulting in smaller intrinsic gain but faster time response). Conversely, the detectors in the copper tower were at the cryostat temperature, that was $\sim \SI{15}{mK}$. Since fast pulses could be useful to reduce pile-up whenever this background is an issue (as in the proposed CUPID experiment~\cite{CUPIDpileup, CUPIDpileup2}), this acrylic holder additive feature is very promising. To achieve similarly fast pulses on standard Cu frames, the NTDs can be warmed up by increasing the bias current. This approach was applied to channel $1$ by operating it at a different working point (\emph{wp2}), dissipating $\sim$\SI{30}{pW} through the bias circuit\footnote{In the case of \emph{wp1} the dissipated power is negligible, in the order of \SI{0.5}{pW}.}. The dissipated power was such that the pulses duration were shortened but the resolution (and the pulse shape) didn't suffered the non optimal working point yet. We characterize the signals by means of their rise and decay time, defined as the time elapsed for a pulse from $10\%$ to $90\%$ of its amplitude and vice versa. The obtained average values are reported in table~\ref{tab:1}, together with their working resistances $R_{\text{w}}$. Using these results, the pile-up probability, modelled as a Poissonian distribution, would be lower in acrylic holder channels by a factor $\sim 5$, when the NTDs are operated at their optimal working point. \begin{table} \centering \caption{Average rise time and decay time, as defined in fig.~\ref{fig:4}, computed for the two mentioned working points: \emph{wp1} and \emph{wp2}. In the last column, the NTDs working resistances.} \begin{tabular}{cccccc} \hline\noalign{\smallskip} Holder material & Channel & Working point & Rise time [\si{\milli\second}] & Decay time [\si{\milli\second}] & NTD $R_{\text{w}}$\\ \noalign{\smallskip}\hline\noalign{\smallskip} Copper & 1 & \emph{wp1} & $24.0\pm 0.2$ & $64.8\pm 0.8$ & $\SI{12.8}{\mega\ohm}$\\ Acrylic & 2 & \emph{wp1} & $4.4 \pm 0.1$ & $47.6 \pm 0.5$ & $\SI{139}{\kilo\ohm}$\\ Acrylic & 3 & \emph{wp1} & $2.49 \pm 0.05$ & $17.8 \pm 0.1$ & $\SI{287}{\kilo\ohm}$\\ Copper & 1 & \emph{wp2} & $4.6 \pm 0.1$ & $30.4 \pm 0.4$ & $\SI{1.37}{\mega\ohm}$\\ \noalign{\smallskip}\hline \end{tabular} \label{tab:1} \end{table} Besides these thermal considerations, the pulse shape of the detectors housed in the acrylic holder is not further modified. This fact allowed to process events from the two setups with the same algorithms without adapting or tuning the employed software. An important parameter used to assess the detector performance is the FWHM energy resolution. The most prominent calibration spectrum peaks, whose energies are reported in fig.~\ref{fig:5}, have been fitted with a Gaussian function plus a linear background at the end of the calibration step. A zero-energy FWHM, corresponding to the baseline resolution, has been computed taking into account the baseline distribution spread evaluated after filtering. The obtained resolution-energy plot is shown in fig.~\ref{fig:8}. The resolution is dominated, at low energies, by the baseline noise. Then, it grows monotonically, following the typical low temperature calorimeters trend. The FWHM resolutions of baseline and of the highest energy peak of the calibration are reported in table~\ref{tab:2}, where channel 1 is operated at \emph{wp2} and channel 2 and 3 at \emph{wp1}. \begin{figure} \begin{minipage}[t]{0.48\textwidth} \centering \includegraphics[width=0.97\linewidth]{Pictures/Fig7.eps} \caption{Examples of pulses coming from detectors in acrylic holder at \emph{wp1}, the optimal working point and from copper assembly operated at \emph{wp1} and \emph{wp2}, obtained by dissipating \SI{30}{pW} on channel 1. Notice that this is not the entire \SI{400}{ms} acquired time window} \label{fig:7} \end{minipage}\hfill \begin{minipage}[t]{0.48\textwidth} \centering \includegraphics[width=0.97\linewidth]{Pictures/Fig8.eps} \caption{Energy resolution expressed as FWHM for the considered channels. The point at zero energy is the resolution of randomly acquired noise windows} \label{fig:8} \end{minipage} \end{figure} \begin{table} \centering \caption{Summary of the results, in terms of energy resolution, obtained for the considered channels. In the table, the baseline FWHM resolution and the \SI{2615}{keV} peak one are reported.} \begin{tabular}{rccc} \hline\noalign{\smallskip} Channel & Holder material & FWHM baseline [\si{keV}] & FWHM $@$ \SI{2615}{keV} [\si{keV}] \\ \noalign{\smallskip}\hline\noalign{\smallskip} $1$ & Copper & $1.31 \pm 0.02$ & $6.1\pm0.5$ \\ $2$ & Acrylic & $1.72 \pm 0.02$ & $5.3\pm 0.3$ \\ $3$ & Acrylic & $1.04 \pm 0.01$ & $6.1\pm 0.4$ \\ \noalign{\smallskip}\hline \end{tabular} \label{tab:2} \end{table} We also compared the noise registered on the different channels by computing, run by run, their ANPS and normalizing for the electronic gain. As can be seen from fig.~\ref{fig:9}, the noise belonging to channels in the acrylic tower doesn't show problematic features when operated at the optimal working points. As already pointed out, the crystals in the acrylic work at slightly higher temperatures, that is at lower $R_{w}$. As a check, the Johnson contribution to the continuum is confirmed to be lower. \begin{figure} \centering \includegraphics[width=0.6\linewidth]{Pictures/Fig9.eps} \caption{Normalized ANPS for channel $1$, belonging to the copper tower, operated at \emph{wp2} and channels $2$ and $3$, framed in the acrylic holder and operated at \emph{wp1}. The difference in the amplitude scale and in the RMS can be ascribed to the different $R_W$ of the detectors (see tab~\ref{tab:1}), contributing to the Johnson noise on the channels} \label{fig:9} \end{figure} \section{Conclusions and Comments} \label{sec:5} Neutrinoless double beta decay searches, decade after decade, improve the limits on the $0\nu\beta\beta$ half-life for different emitting isotopes. Future experiments will ask for more demanding material radio-purity, background rejection capability, and better energy resolutions. For this reason, acting on structures close to the detectors will be essential to fulfill the desired requirements. In the field of low temperature detectors, copper has always been employed for the construction of the crystal holding structures. However, copper is expensive and its Compton scattering cross-section can cause significant background for experiments using \ce{^{130}Te} as target isotope. A novel approach would consist in using holding structures made of light organic compounds, which would reduce both the cost and the impact on the measured background. In our experimental setup, VeroClear\texttrademark \,has shown good mechanical characteristics and thermal coupling with our crystals down to the milli-Kelvin scale. Since it can be 3D printed, even complicated structures can be realised with a low number of components, simplifying the assembly. From a mechanical point of view, it would be possible to scale our test holder to real experiments dimension. A VeroClear\texttrademark \,holder would bear the \textsf{CUORE} detector strings, while maintaining the same frame volume employed in the experiment (with great margin, thus leaving room for further optimization). There are already examples of acrylic laminates produced with low \ce{^{238}U} and \ce{^{232}Th} contamination, at levels comparable to the \textsf{CUORE} cleanest copper. Therefore, the bulk contamination introduced by the detectors' holder would gain a factor at least 7.5 (density ratio), passively lowering the induced background. We demonstrated that the material replacement doesn't compromise the detector working properties (resolution, stability, etc.). The detectors housed in the plastic tower are as stable as the ones framed in copper for long times. In addition, their equilibrium temperature is only a few \si{mK} higher than in the copper case. As a consequence, the pulses are faster, allowing to reduce the background induced by $2\nu\beta\beta$ pile-up in $0\nu\beta\beta$ searches with isotopes characterized by shorter half-life~\cite{CUPIDpileup,CUPIDpileup2}. The acrylic holder doesn't cause any deterioration in the energy resolution and in the noise power spectrum. Since the acrylic frame is characterized by low conductance, thermalization issues cannot be excluded, especially when the detector strings become longer. These kind of tests are required to check where such effects are negligible and where they become a severe issue. A first hint of a real reduction of the Compton background events has been obtained and validated by Monte Carlo simulations and it is discussed in a specific paper~\cite{ArticoloSIF}. We will therefore further proceed in this direction in the near future, studying the VeroClear\texttrademark \,scintillation light properties at the milli-Kelvin scale, together with the associated readout. These tests will be critical to evaluate the feasibility of an ``active" acrylic holder, useful to reach a further background rejection mainly tagging and suppressing $\alpha$ induced events and rejecting $\beta$ radiation coming from the components close to the detectors. These additional features will be essential for future-generation $0\nu\beta\beta$ experiments, expected to operate close to the background-free regime. \section*{Acknowledgments} We thank Marco Iannone from INFN - Section of Roma1 and member of the Hammer project for helping with the production and preparation of the 3D printed components of the assembly. \printbibliography \end{document}
\section{Introduction} The development of the Internet of Things (IoT) has resulted in a plethora of benefits, such as improving business processes, enhancing efficiency in resource management, and the introduction of the smart environment framework and Industry 4.0 \cite{Ruggeri2020,moustafa2021new}. By combining the functionality of individual IoT devices, new multi-level services can be defined and orchestrated, leading to innovative applications and intelligent decision-making systems \cite{Koroniotis2020}. However, the many advantages that the IoT offers are offset by significant cybersecurity concerns that arise from vulnerabilities inherently found in the sensors and actuators, impacting the confidentiality, integrity, and availability of the data and assets in the smart environments. With the number of deployed IoT devices rapidly rising, and zero-day vulnerabilities being increasingly exploited by attackers, it is crucial to address the challenge of securing the IoT \cite{9343133}. Contemporary research and real-world attacks indicate that vulnerabilities render the IoT susceptible to a range of cyberattacks, due to firmware, hardware, protocol, authentication, or credential weaknesses \cite{Srivastava2020,AlHadhrami2021}. These vulnerabilities can be exploited by hackers for multiple purposes. Their end goals include modifying a device’s functionality by altering its internal state or the data it records, to steal information that is temporarily stored on an IoT device before it is forwarded to the gateway and the cloud backend, to cause malfunctions, and halt production lines, take control of the device and utilize it in large cyberattack campaigns, perform power depletion attacks by forcing a device to reply to repeated requests or utilize it as a springboard for lateral movement \cite{hussain2020machine}. Recent attacks, such as botnets and ransomware, have proven the destructive potential of IoT-powered cyberattacks, when routers, IP cameras, and other IoT devices were compromised, and orchestrated into launching immense volumetric DDoS attacks that were capable of disabling DNS servers and portions of the Internet \cite{Eustis2019}. It is, therefore, imperative to develop vulnerability detection methods that can be effectively applied to IoT infrastructure. Penetration testing mechanisms can be generally classified into post-exploitation (passive), where the focus is on recovery and detection of ongoing attacks, and pre-exploitation (active), where tools take a proactive approach and periodically assess a network for vulnerabilities \cite{moustafa2018towards}. Penetration testing is an active method for assessing cybersecurity readiness and resilience when faced with a prepared attacker that persistently pursues the detection and exploitation of vulnerabilities. The process of penetration testing involves a team of experts that are actively attempting to breach the security of their target, using both software and hardware-specific tools for the detection and exploitation of weaknesses and vulnerabilities \cite{AlShebli2018}. The first crucial step during a penetration test or a cyberattack, and necessary action for vulnerability assessment, is the reconnaissance phase also known as information gathering. In the reconnaissance phase, scanning attacks are launched by specialized software that targets a remote host’s ports, seeking to identify the services that are associated with them and to detect any exploitable vulnerabilities \cite{Kumar2019}. \textbf{Research Motivation}-- Contemporary security tools, for example, malware detection, intrusion detection and penetration testing, are designed to employ databases of pre-defined rules, signatures, and imposing policies for the detection of vulnerabilities. Although these tools are very accurate at detecting known vulnerabilities, they suffer from certain limitations \cite{Srivastava2020,moustaf2015creating}. Firstly, signature and rule-based detection tools can be circumvented by altering the behavior of an attack. Furthermore, they are incapable of detecting zero-day vulnerabilities \cite{moustafa2018towards,hussain2020machine}. Consequently, there is a need to develop penetration testing tools and techniques for IoT settings, that can effectively detect vulnerabilities in live environments and overcome the limitations posed by conventional signature-based solutions \cite{Koroniotis2020,haider2020fgmc}. \textbf{Research Contribution}-- In this study, we present a novel deep learning-enabled penetration testing framework, named Long Short-Term Memory Recurrent Neural Network-Enabled Vulnerability Identification (LSTM-EVI). This framework focuses on the information gathering stage of penetration testing, and particularly on vulnerability detection. To develop and evaluate this framework, we use a novel cybersecurity-oriented testbed, which is a smart airport-based testbed that combines physical IoT devices and virtual elements. Through the smart airport testbed, both benign and malicious/scanning data were collected, transformed, and employed for the evaluation of the proposed framework. The main contributions of this paper are as follows: \begin{itemize} \item We propose a new penetration testing framework that focuses on gathering information of vulnerabilities and learning scanning attacks. \item We designed and leveraged a smart airport-based testbed for the training and evaluation of the proposed framework. \end{itemize} The rest of this paper is organized as follows. Section II provides related work by discussing the current state of research on penetration testing in IoT settings. Section III focuses on the methodology for designing and constructing the proposed penetration testing framework. Section IV discussed the results obtained from experimenting with the proposed framework on the smart airport testbed that we developed. Finally, Section V provides the concluding remarks. \section{Related Work} Due to the growth of smart IoT environments, and the widespread adoption of these paradigms by organizations around the globe that incorporate them into their existing infrastructure, the security and integrity of these systems has become a popular topic of study \cite{Allakany2019,Abdalla2020,Yadav2020,Mikulskis2019}. In this section, we provide research related to the development and utilization of penetration testing techniques in IoT settings, focusing on vulnerability detection. For instance, Allakany \textit{et al.} \cite{Allakany2019} presented a plan for an end-to-end penetration testing framework for the IoT. The proposed framework was comprised of four modules, named planning, discovery, attack and reporting that were tasked with information gathering, vulnerability detection, vulnerability exploitation and reporting. The researchers provided an abstract overview of the proposed framework, and thus the vulnerability scanning methods were not discussed. Furthermore, the planning and discovery stages have overlapping functionality. Abdalla \textit{et al.} \cite{Abdalla2020} presented a penetration testing showcase for the IP camera “Onvif YY HD”. The proposed penetration testing process included 3 steps, starting with defining the area of investigation, implementation of process and outcome report presentation. The researchers employed several software tools found in Kali Linux machines, for network device discovery, network packet capture/analysis and cyber-attack implementation, that resulted in the identification of several vulnerabilities. Although this research delivered empirical data through penetration testing, they focused on a specific IP camera model, and thus generalisability is not ensured. Furthermore, the process was not automated and required the intervention of an investigator to be completed. Yadev \textit{et al.} \cite{Yadav2020} introduced IoT-PEN, a client-server-based penetration testing framework for IoT environments. The researchers designed IoT-PEN to be automated and scalable, using target-graphs for defining potential attack plans and CVE IDs for accessing vulnerability information. The NVD database was utilized to detect vulnerabilities found in particular versions of software and devices. The state of IoT nodes is sent to the server in XML format, using the MQTT protocol, from where the NVD database was used to detect known vulnerabilities and provide recommendations. The provided work was evaluated on several network topologies, however, the researchers did not provide information about the IoT devices that were included in their testing environment. Furthermore, their implementation makes use of the NVD database for vulnerability detection, via utilizing the state of IoT nodes, thus missing zero-day vulnerabilities. Additionally, it is unclear if their proposed solution can be applied to IoT sensors/actuators in addition to gateways/aggregators, as the IoT-PEN requires to be installed and IoT sensors are constrained in resources, including their storage and processing capacity. Mikulskis \textit{et al.} \cite{Mikulskis2019} developed Snout, a software tool for identifying, scanning, attacking and assessing IoT devices using non-IP communication protocols. The proposed tool can perform penetration testing techniques and cyber attacks against IoT devices to assess their security. Snout’s penetration testing capabilities were evaluated using ZigBee and are capable of supporting multiple protocols that are commonly found in the IoT, such as BLE, Z-Wave, and LoRa. Its penetration testing capabilities include the evaluation of ZigBee-specific attacks and fuzzing. Although promising, this work does not specify what type of fuzzing the Snout tool utilizes. Furthermore, Snout’s capabilities were not showcased in a real or simulated scenario, thus its effectiveness in penetration testing and vulnerability detection has not been proven. Although the presented studies \cite{Allakany2019,Abdalla2020,Yadav2020,Mikulskis2019} provided either a functional implementation or an extendable abstract design for a penetration testing tool tailor-made for IoT settings, the construction of a versatile and efficient deep learning-based penetration testing tool for smart airports that focuses on vulnerability detection, is still an unexplored topic. Additionally, some of the presented work either lacked any specific details of their testing environment or neglected to evaluate their solution through experimentation. Moreover, the penetration testing methods that were incorporated into the presented tools were, in some cases either not clarified, or reliant on existing tools that employ rule-based reasoning. This work seeks to address these shortcomings via developing a deep learning-based penetration testing framework, with its functionality focused primarily on vulnerability detection. \section{ Mathematical Formulation of Penetration Testing} To implement an automated deep learning-based penetration testing process, attacking and legitimate scenarios need to be executed. More importantly, for a system/network that is undergoing penetration testing, we define an initial condition ($I$), an attack activity set ($A$), the end state ($E$) and the attack probability set ($P$) \cite{moustafa2018towards}. The initial condition refers to the starting state of the system before the application of any attacks or penetration testing activities. The attack activity $(a \in A)$ corresponds to an action seeking to move from a previous state to a state closer to $E$, where $E$ denotes the exploitation of a vulnerability. The attack probability $(p \in P)$ corresponds to a probability function that is given by the equation $f(p)=Prob(a/I,G)$, and gives the probability of an action leading from the initial condition to the end state. Essentially, automating the penetration testing process involves the identification of the states $S=[I,s_1,s_2,…,s_n,G]$, where the automated tool can transition using attack actions $A=[a_{I1},a_{I2},…,a{nn},a{nG}]$, where $n$ is the number of potential states that the system may assume. The automated penetration testing tool is tasked with identifying viable paths that will allow the transition from state $I$ to $G$, with the greatest probability of success $p$. If we define a transition function $F_{t}(InitialCondition,EndState,AttackAction)$, then the process can be viewed as: $F_{t_0}(I,G,0)=a_{I1},F_{t_1}(s_1,G,a_{I1})=a_{12},…,F_{t_n}(s_n,G,a_{(n-1)n}) =a_{nG}$ \section{ Proposed Deep learning-based Vulnerability Identification Framework} In this section, we discuss the proposed deep learning-based penetration testing framework designed to launch reconnaissance-based scanning attacks and collect network traces. From the collected packet capture (pcap) files, network flows were extracted, pre-processed, enhanced through feature generation and labeled. The generated data was then employed for the training and testing of a deep learning model, that is designed to process network flows and detect vulnerabilities. In this work, a vulnerability identification framework is presented to incorporate the data collection, processing and application for the detection of Reconnaissance scanning attacks. As shown in Figure \ref{fig:Detection_Framework}, there are five main components of this framework. Each of which is distinct in its functionality and provides services to the next components, as explained in the following items. \begin{itemize} \item \textbf{Penetration Testing} - In this component, the penetration testing process is initiated through the use of tools, such as Nessus, Scapy and Zeek. They employ fuzzing and rule-based techniques that scan the network for vulnerabilities. \item \textbf{Data Collection} - In this component, network traffic and telemetry data obtained from the testbed's network and sensors respectively, are collected. \item \textbf{Flow Extraction} - In this component, the collected data is processed and network flows are extracted to form a prime dataset that will be used for training and evaluation of a DL model. \item \textbf{Feature Generation} - In this component, the prime dataset is further analyzed and enhanced, by generating new descriptive features that will enhance the performance of the DL model. The generated dataset is designed. \item \textbf{Model Training and Utilisation} - In this component, the generated dataset is utilized for the training and validation of a DL LSTM-based model that is used for vulnerability identification. \end{itemize} \begin{figure*}[ht] \centering \includegraphics[width=0.85\textwidth]{Scanning_Detection_Framework.pdf} \caption{\label{fig:Detection_Framework} Proposed framework of vulnerability identification, which is a case study of implementation in smart environments, such as smart airports} \end{figure*} \subsection{Testbed configuration for penetration testing purposes} A testbed was designed to represent a realistic smart airport environment and evaluate the fidelity of deep learning-based penetration testing systems. The testbed incorporates physical IoT devices, gateways, switches, computers, and virtual machines configured to interact in several attacking and legitimate scenarios. The design of such a testbed, which includes both physical IoT devices as well as virtual machines has certain advantages. To begin with, the physical off-the-shelf IoT devices can be found in real-world smart environments and thus ensure correct representation. Furthermore, unlike virtualized IoT devices, their physical counterparts allow the exploitation of firmware and hardware vulnerabilities, which need to be represented in the collected data, as it is crucial for the development of deep learning-based vulnerability analysis tools. The inclusion of VMs renders our testbed versatile, portable, and configurable, as VMs can be easily replaced, moved between computers and their resources adjusted according to circumstances. Additionally, a data management system was developed along with the testbed, consisting of a telemetry-based module that is tasked with the collection of telemetry data that the sensors produce, and a network traffic analysis module that handles the collection of packets, the extraction of network flows, the generation of new features and correct labelling of both network and telemetry data. The testbed consists of three zones; each of which represents a unique space in a smart airport is assigned a single gateway with USB NICs for the four wireless communication protocols, Bluetooth, ZigBee, Z-Wave and Lora of the included sensors, and several sensors that are indicative of the location represented by the zone. The gateways are connected to an access point that facilitates local communications, through WiFi, between the VMs and the rest of the testbed. The telemetry data that the sensors produce is published to an MQTT broker, through open-source software, from which it can be retrieved and analyzed. The testbed includes 20 VMs 10 of which (benign VMs) interact with each other and the zones and perform data collection, processing, management and visualization. The rest are tasked with targeting the sensors, gateways and the benign VMs with cyber-attacks (attacking VMs), to represent the attacking scenarios when the testbed is employed for the construction of datasets. Various physical IoT devices were attached to the testbed, and they included environmental sensors (humidity, temperature, air pressure), contact sensors, motion sensors, control devices such as switches, condensation sensors and IP cameras. This testbed was designed to collect and refine data, produce representative cybersecurity-based IoT datasets, and develop/validate efficient cyber-defence IoT-compatible solutions, such as vulnerability analysis tools. The proposed smart airport testbed's architecture is presented in Figure \ref{fig:Smart_Airport_Testbed_Architecture}. \begin{figure*} \centering \includegraphics[width=0.85\textwidth]{SAir-IoT_Architecture.pdf} \caption{\label{fig:Smart_Airport_Testbed_Architecture} Proposed Smart Airport Testbed Architecture} \end{figure*} To maximize the probability of success in their activities, cyber attackers and penetration testers alike often choose to employ established methods and strategies, when planning their attacks. The cyber kill chain model, developed by Lockheed Martin \cite{Dargahi2019}, analyses the necessary steps that Advanced Persistent Threats (APTs) which can be an attacker or a penetration tester, need to consider when attempting to attack and compromise a target in a network. The framework includes seven stages; each of which provides some information to the next, facilitating the successful infiltration of a computer and its resources. The stages of cyber kill chain consist of Reconnaissance, Weaponisation, Delivery, Exploitation, Installation, Command and Control, Actions on Objectives. In the Reconnaissance stage, the attackers gather as much information as possible about their target, seeking to identify a weakness they can use to their advantage. For example, a penetration tester, may launch scanning and probing attacks during the reconnaissance stage, to identify Internet-facing machines, their open ports and the services they provide. By doing so, they can potentially detect vulnerable services, with known exploitation. In the Weaponisation stage, the attackers use the vulnerabilities detected in the Reconnaissance stage to design their attack exploit, by combining the exploit code with a backdoor in a payload. In the Delivery and Exploitation stages, the crafted payload is sent to the target in the selected form (e-mail, USB stick, packet sequence, etc.) and the exploit is executed. In the Installation and Command and Control (C\&C) stages, the exploit that was executed previously facilitates the installation of malware that, once correctly installed, causing the backdoor code to run and establish a reverse channel with the attacker, initiating a C\&C channel. In the final stage, after the attackers have established a secure and reliable channel of communication with the compromised machine, they can proceed with their goal, for instance, to exfiltrate data, perform lateral movement and more. In this paper, we focus primarily on the Reconnaissance stage, as it is during that stage that vulnerabilities in IoT devices and other networked entities can be detected. Before any vulnerabilities can be detected, the first action that needs to be performed in the Reconnaissance stage is the detection of live hosts in the targeted network. For that purpose, we utilised the Nmap tool to perform a ping-based scan and an initial service detection, which resulted in a list of available hosts that would be later targeted with more sophisticated scanning-based attacks. The command that we employed for host detection was: \[nmap -sV --script=banner\ Target\_IP\_Address\] with the $-sV$ specifying that nmap should attempt to identify the version of services that it detects, and the $--script=banner$ enables the banner grabbing functionality, that captures the banners that services advertise, with banners being the initial text that the services generate upon receiving a request through their respective ports. Regarding the underlying mechanics that are employed for the detection of vulnerabilities in the networks and their connected devices, two primary categories exist, rules/signature-based and machine or deep learning-based \cite{Li2019, Sarker2020}. Many commercial and open-source tools such as Nessus, Zeek and Scapy, rely on rules and signatures crafted through expert knowledge that results in the creation of static profiles/signatures of vulnerabilities, which are detected if the response of carefully crafted network probe matches the signature or the rule. \subsection{ Proposed Long Short-Term Memory Recurrent Neural Network-Enabled Vulnerability Identification Model} Deep Learning (DL)-based penetration testing tools would scan the network and process collected data, to detect patterns that indicate the existence of a vulnerability, based on the output of the DL model that has been trained on curated and representative data, allowing them to generalize well and be more versatile. To test for vulnerabilities, one technique that has been employed in the past in multiple scenarios is fuzzing \cite{ Wang2020}. Fuzzing vulnerability testing relies on the generation of pseudo-random data that is forwarded to a target machine, and if that elicits a legitimate response from the system, then a vulnerability has been detected. We employed Nessus, Zeek and Scapy to perform fuzzing scanning attacks against the network-enabled components of the testbed, which resulted in the generation of network traffic that was collected, processed, and labelled. The generated data was utilized to train a deep learning model, namely a Long Short-Term Memory Recurrent Neural Network (LSTM-RNN), on 1-timestep intervals, that would output a class feature as either being “0” indicating normal traffic or “1” indicating a scanning attack. Deep Learning is a subclass of neural networks, designed to have multiple layers and hundreds of units \cite{Zaccone2017}, resulting in models that perform well when processing large volumes of data. The LSTM that is employed in the LSTM-EVI framework, is a version of the RNN that overcomes the latter’s limitations when tasked with learning long sequences of data, by employing certain mathematical constructs, known as gates, that control the model’s memory. An LSTM model that processes data with multiple timesteps, receives the first input data, processes it through the LSTM cell by applying weights and activation gates such as sigmoid and tanh, and forwards the hidden state to higher layers of the network, passing the computed cell and hidden states to the next timestep. There are 3 gates in an LSTM that manage the cell state and, in turn, affect the hidden state. The forget gate, given in Equation \ref{eq:forget_gate}, determines what portion of the previous cell state is going to be forgotten, by diminishing those values to $0$. The input gate, given in Equation \ref{eq:input_gate}, determines what parts of the cell state will be modified, and specifically what information will be added. Equation \ref{eq:new_cell_state} provides the new cell state that is calculated by combining the previous cell state, the information gate (Equation \ref{eq:input_gate}) and the new information ( Equation \ref{eq:new_information}). The new hidden state, which is the output of an LSTM cell, is forwarded to the next cell when working with multiple timesteps, is determined by the output gate, as formulated in Equation \ref{eq:output_gate}. During training, we selected binary cross-entropy loss, as it performs well when tasked with training binary classifiers. The cost in a mini-batch during training is given in Equation \ref{eq:cross_entropy}. \begin{equation}\label{eq:forget_gate} f_t=\sigma(w_f*[h_{t-1},x_t]+b_f, f_t \in [0,1] \end{equation} \begin{equation}\label{eq:input_gate} i_t=\sigma(w_i*[h_{t-1},x_t]+b_i, i_t \in [0,1] \end{equation} \begin{equation}\label{eq:new_information} C’_t=\tanh(w_c*[h_{t-1},x_t]+b_c, C’_t \in [-1,1] \end{equation} \begin{equation}\label{eq:new_cell_state} C_t=f_t*C_{t-1}+i_t*C’_t \end{equation} \begin{equation}\label{eq:output_gate} h_t=\sigma(w_o*[h_{t-1},x_t]+b_o)*\tanh(C_t) \end{equation} \begin{equation}\label{eq:cross_entropy} C=-\frac{1}{n}\sum^n_1[y_ilog(y'_i)+(1-y_i)log(1-y'_i)] \end{equation} \[\forall y,y' \in [0,1], i \in [1,n] \] \section{Experimental Results} In this section, the proposed penetration testing framework is evaluated and compared with five machine learning models on data acquired from the smart airport testbed for detecting scanning attacks. The models that were evaluated are LSTM, Multi-layered Perceptron (MLP), Support Vector Machine (SVM), Naive Bayes (NB), and K-Nearest Neighbour (KNN). \subsection{Environment Setup} The process of setting up the smart airport testbed involved connecting IoT sensors that utilise different wireless communication protocols (e.g., BLE, Z-Wave, ZigBee, Lora, and WiFI), with coordinator devices (Raspberry Pi) and the rest of the testbed (VMs, Switches, Routers, Wireless Access Points). Data was collected by the Tap machine (Ubuntu 18.04) and the scanning attacks were launched by the Kali VMs that can be seen in Figure \ref{fig:Smart_Airport_Testbed_Architecture}. After the dataset was finalised, two DL models were trained in an Ubuntu VM with Intel Core i7-10510U @ 1.8 GHz processor and 3 GB RAM. The programming environment that was used was Python 3.8, with the Keras and Tensorflow packages selected for defining, training and evaluating the DL models. \subsection{Dataset collected from the testbed} From the initial pcap files that were collected from the testbed, data features were extracted to train and test machine learning for classifying scanning attacks. Network flow features were then converted to a numerical form, using label encoding, with the process displayed in Algorithm \ref{algo:convert_numerical_categorical}. Next, to improve the performance of the DL models, a min-max normalisation function was applied to all features (excluding the class feature), transforming their values to be within the range $[0,1]$. This range would allow deep learning models to effectively learn legitimate and scanning observations without bias towards a particular class. The generated dataset was split into training (70\%) and testing (30\%) subsets, a common training/texting split that has been shown to improve results, and for the LSTM model, the subsets were modified to include a single timestep. The structure and hyperparameters of the two DL models can be seen in Table \ref{tab:DL_MDS_Hyper}. The structure of each model includes the number of features as the first layer(16), and for the LSTM-RNN, we defined the first two hidden layers (64 and 128 units) as LSTM, stacking five dense layers to perform classification. To enable reproducibility, we explicitly set the random seeds for TensorFlow and Numpy to be $22$. \begin{algorithm}[h] \SetAlgoLined dataset=Load\_Dataset()\; \For{column in dataset.columns()}{ \uIf{not column.is\_numeraical()}{ i=0\; \For{value in column.unique\_values()}{ column.exchange(value,i)\; i+=1\; } dataset.update(column)\; } } return dataset\; \caption{\label{algo:convert_numerical_categorical}Encoding of categorical values to numerical} \end{algorithm} \begin{table*}[tp] \caption{Deep Learning Models' Hyperparameters} \label{tab:DL_MDS_Hyper} \centering \begin{tabular}{|p{0.16\linewidth}|p{0.22\linewidth}|p{0.06\linewidth}|p{0.1\linewidth}|p{0.1\linewidth}|p{0.08\linewidth}|} \hline Model&Structure&Optimiser&Learning Rate&Batch Size&Epochs \\\hline MLP&[16,32,128,512,32,1]&Adam&0.001&560&10\\\hline LSTM-RNN&[16,64,128,256,512,64,64,32,1]&Adam&0.001&560&10\\\hline \end{tabular} \end{table*} \subsection{Results and Discussions} Each deep learning model was trained for 10 epochs, using the Adam optimiser on the same batch size. The ML/DL models were trained to perform binary classification, returning either $0$ for normal flows or $1$ for attack instances. The decision threshold, which determines if the predicted class feature is either $0$ or $1$ for both models was set at $0.5$. The confusion matrix of the LSTM model can be seen in Table \ref{tab:LSTM_Confusion} and its Receiver Operating Characteristics (ROC) curves in Figures \ref{fig:LSTM_ROC}. Additional metrics that were calculated to compare the performance of the aforementioned models, including Accuracy, Precision, Recall, Specificity and F-score are provided in Table \ref{tab:Models_Metrics}. Of all the tested models, the LSTM outperformed the rest, achieving $0.9991$ classification accuracy. MLP, SVM and KNN displayed similar performance, with the Naive Bayes model having the worst classification accuracy at just over $0.5$. As can be seen, by the calculated metrics, both models achieved high accuracy and low error rates. The reason for the LSTM’s performance is slightly better than is that LSTM is training more weights due to the added forget and state gates. In our work, we transformed our data to have only 1 timestep, thus the hidden states and cell states that help the LSTM to maintain the memory of long sequences of data was not used effectively. Nevertheless, these results indicate that the LSTM can be used effectively to detect scanning attacks, the first step in the cyber kill chain, and an indication that an APT has started to target a system. \begin{table}[h] \centering \caption{Confusion Matrix for LSTM-RNN} \label{tab:LSTM_Confusion} \begin{tabular}{|c|c|c|} \hline Prediction/Actual&Positive&Negative \\\hline Positive&605&1\\\hline Negative&0&594\\\hline \end{tabular} \end{table} \begin{table}[h] \centering \caption{Performance Metrics for the two Deep Learning Models.} \label{tab:Models_Metrics} \begin{tabular}{|c|c|c|c|c|c|} \hline Metric&Naive Bayes&KNN&SVM&MLP&\textbf{LSTM}\\\hline Accuracy&0.5241&0.9983&0.9983& 0.9983& 0.9991 \\\hline Precision&0.5144&0.9967&0.9967& 0.9967& 0.9983 \\\hline Recall&0.9981 &1.0&1.0& 1.0& 1.0 \\\hline Specificity&0.042&0.9966&0.9966& 0.9966& 0.99831 \\\hline F-score&0.679&0.9983&0.9983&0.9983 & 0.9991 \\\hline AUC&0.5201&0.9983&0.9983& 0.9983& 0.9991 \\\hline \end{tabular} \end{table} \begin{figure} \centering \includegraphics[width=0.48\textwidth]{LSTM_ROC.png} \caption{\label{fig:LSTM_ROC}ROC Curve for LSTM model.} \end{figure} \section{Conclusion} This study has presented a deep learning-enabled penetration testing framework for identifying vulnerabilities in IoT networks, such as smart airports. Specifically, an LSTM-RNN model was developed for detecting scanning attacks in an IoT network-based smart airport testbed. Scanning attacks are part of Reconnaissance, the first stage of the cyber kill chain model. To collect data and construct a dataset for this work, we utilised developed a smart airport hybrid testbed that incorporated both physical IoT devices and virtual machines. For the scanning attacks, we focused on vulnerability detection through fuzzing and penetration testing tools, such as Nmap, Zeek, Nessus and Scapy. A network dataset was extracted from the testbed for evaluating the performances of DL models. Our experiments indicated that the proposed framework can achieve high performance in detecting scanning attacks compared with other compelling techniques. In the future, we intend to generate a large-scale dataset that will incorporate a greater range of scanning attacks. Furthermore, we intend to investigate the applicability of reinforcement learning in detecting vulnerabilities in IoT settings. \section*{Acknowledgment} The work was supported in part by the Cyber Security Research Centre Ltd., funded by the Australian Government’s Cooperative Research Centres Programme under Grant RG201120.
\section{Keywords} $r$-process nucleosynthesis; neutron captures; beta decays; nuclear fission; dynamical ejecta; disk outflows; kilonovae; AT2017gfo; heavy elements; metal-poor stars. \section{Introduction} After the discovery of the first stellar system formed by two neutron stars (NSs) \cite{Hulse.Taylor1975}, it was immediately realized that the decompression of NS matter following the merger of a binary neutron star (BNS) or of a black hole (BH)-neutron star (BHNS) system produces an ideal environment where the rapid neutron capture process ($r$-process) nucleosynthesis can take place. The very first calculations were carried out for BHNS binaries \cite{Lattimer:1974a,Lattimer:1976}: in this scenario, during the last orbits of the gravitational wave (GW)-driven inspiral, the NS is tidally disrupted by the gravity of the more massive BH and a fraction of it is ejected into space. The coalescence of two NSs could also eject neutron-rich matter into the interstellar medium (ISM) through an even richer dynamics \cite{Eichler:1989}. The first modeling of BNS merger nucleosynthesis was indeed accomplished a few years later \cite{Symbalisty:1982,Freiburghaus.etal:1999}. Since then, major progress has been made in understanding the mechanisms behind the ejection of matter and the properties of these ejecta. $r$-process nucleosynthesis is one of the fundamental processes responsible for the production of the heaviest elements in the Universe (e.g. \cite{BBFH:1957,Cameron:1957}, see also \cite{Cowan.etal:2019} for a recent review). The binding energy per nucleon in nuclei increases almost steadily from lithium up to ${}^{56}{\rm Fe}$ and ${}^{56}{\rm Ni}$. This allows the production of nuclei starting from H and He (mostly produced during the big bang) up to iron inside massive stars for increasing plasma temperatures in hydrostatic conditions (see e.g. \cite{Clayton:1983}). The production of heavier elements through reactions involving charged nuclei would require even larger temperatures to overcome Coulomb repulsion. The kinetic energy necessary to synthesise very heavy elements through fusion reactions becomes soon prohibitive for all plausible astrophysical scenarios. Moreover, at such high temperatures disintegration reactions would even dominate due to highly energetic photons. This strongly limits the nucleosynthesis yields produced through this path. The capture of a free neutron on a nucleus has instead the clear advantage of not having any Coulomb barrier to overcome and it is indeed the key process to produce the heaviest elements. However, free neutrons in non-degenerate conditions are unstable against $\beta^-$ decay. Thus, neutron capture nucleosynthesis requires a source of neutrons lasting for the relevant timescale over which the nucleosynthesis takes place. Moreover, the neutron-rich nuclei produced by neutron captures are unstable against $\beta^-$ decay. While decay rates are constants, neutron capture rates crucially depend on the neutron density: if the neutron density is high enough ($n_n \gtrsim 10^{20}~{\rm cm^{-3}}$), at least for a short timescale ($\sim 1$s), neutrons are rapidly captured (increasing the mass number) before $\beta$ decays increase the charge number and therefore produce isotopes of the next heavier element. Due to its rapidity, this process can happen in explosive environments. This is the basic idea behind $r$-process nucleosynthesis and matter ejected from compact binary mergers provides precisely the conditions necessary for the $r$-process nucleosynthesis to occur. Over the past few years, several observational evidences have accumulated pointing to compact binary mergers as one of the main sites in the Universe where $r$-process nucleosynthesis takes place, including the observation of elements synthesised through the $r$-process in the atmosphere of very old metal poor stars (see e.g. \cite{Sneden.etal:2008}). The first unambiguous detection of a kilonova (also called macronova), AT2017gfo, as one of the electromagnetic counterparts of the GW signal GW170817 (compatible with a BNS merger) represented the strongest evidence, so far, of this picture (e.g. \cite{Abbott:2017b,Smartt.etal:2017,Kasen.etal:2017}. In this chapter, we present the most relevant aspects of the $r$-process nucleosynthesis in compact binary mergers. We start by reviewing the conditions of matter expelled during a BNS or a BHNS merger. After that, we present how $r$-process nucleosynthesis proceeds in these ejecta. Finally, we overview the main observational evidences supporting compact binary mergers as major astrophysical sites for $r$-process nucleosynthesis. In most of our calculations we use cgs units. The physical constants employed through the text are the speed of light $c$, the reduced Planck constant $\hbar$, the Boltzmann constant $k_B$, the gravitational constant $G$, the Stefan-Boltzmann constant $\sigma_{\rm SB}$, the solar mass \msun, the masses of the electron, proton and neutron $m_e$, $m_p$, $m_n$, and a generic baryon mass $m_{b}$, which for our purposes can be assumed $m_{b} \approx m_{n}$. Temperatures are expressed both in Kelvin and in MeV (i.e. as $k_B T$), depending on the context. We recall here that the conversion factor between GK and MeV is roughly one tenth, i.e. $ k_{\rm B} \times 1 {\rm GK} \approx 0.086~{\rm MeV}$. The distribution of a generic nuclear species $i$ can be expressed either in terms of its mass fraction $X_i$ or number abundance $Y_i$. The former is defined as the ratio between the mass (density) of the species $i$ over the total mass (density): $X_i = m_i/m_{\rm tot} = \rho_i / \rho$, while the latter as the ratio between the number (density) of the $i$ species over the total baryon number (density), $Y_i = N_i/N_{b} = n_i / n_b$. Clearly, $n_{b} \approx \rho/m_{b}$ and $Y_i = X_i/A_i $, where $A_i$ is the atomic number of the species $i$. The electron abundance is defined as $Y_e = n_e/n_{b}$, where $n_e$ is the net density of electrons (i.e. the density of electrons minus the one of positrons). Due to charge neutrality, $Y_e = Y_{p,{\rm free}} + Y_{p,{\rm nuclei}} $, where $Y_{p,\rm free}$ and $Y_{p,\rm bound}$ are the abundance of free protons and of protons bound in nuclei, respectively. \section{\textit{Matter ejection from compact binary mergers}} \label{sec: ejecta} Matter ejection in compact binary mergers happens through different channels. These channels are characterized by specific ejection mechanisms, which operate on different timescales and leave an imprint on the ejecta properties and, ultimately, on the nucleosynthesis. In the following, we review the properties of the ejecta from BNS and BHNS mergers by directly relating them to their merger dynamics. Before doing that, we briefly present some of the most relevant features that characterize the modeling of compact binary mergers and some of the more fundamental processes that influence the ejecta properties. For more extended and complete information about these topics, we refer to the dedicated Chapters and to a few recent reviews, e.g. \cite{Shibata.Hotokezaka:2019,Radice.etal:2020}, where detailed references to the original works can be found. The dynamics of the merger and of the ejecta expulsion depends on several intrinsic parameters of the binary: first of all, on the nature of the coalescing objects (i.e. if it is a BNS or a BHNS system), but also on their masses and spins. Another relevant ingredient is the still uncertain nuclear equation of state (EOS) for matter at supranuclear density \cite{Oertel.etal:2017}. Any quantitative statement (and even a robust qualitative understanding) about the merger dynamics relies on detailed numerical simulations. The latter solve the equations of relativistic neutrino-radiation ($\nu$-radiation) hydrodynamics coupled with dynamical space-time evolution. The hydrodynamics equations are closed by a finite temperature, composition dependent EOS describing the microphysical properties of matter for a rest mass density that varies between stellar densities (a few ${\rm g~cm^{-3}}$) up to several times $10^{15}{\rm g~cm^{-3}}$, corresponding to more than 10 times nuclear saturation density. Both in BNS and BHNS mergers an accretion disk around a central remnant is expected to form after the merger. In the case of BHNS systems, the remnant is always represented by a BH, while in the case of BNS systems a massive NS, possibly collapsing to a BH on a variable timescale, usually forms. While the inspiraling NSs are in cold neutrino-less weak equilibrium, hot matter inside the merger remnant is out of equilibrium and its neutron-to-proton content changes due to neutrino-matter interactions. Several hydrodynamics processes increase matter temperature during the merger and the relevant temperatures range between 0 and $\sim$150~MeV. Neutrino production is strongly boosted in hot and dense matter. Due to their low opacity, neutrinos become the dominant cooling source and their luminosity is of the order of a few $10^{53}{\rm erg~s^{-1}}$, at least at merger and during the early aftermath. The decompression and heating of neutron-rich matter favors initially $\bar{\nu}_e$ luminosity through the reaction $n + e^{+} \rightarrow p + \bar{\nu}_e$ on the thermally produced positrons and $L_{\bar{\nu}_e} \gtrsim 2 L_{\nu_e} $. The resulting net effect is to increase the electron fraction (leptonization), balancing the proton-to-neutron ratio such that at later times $L_{\nu_e} \approx L_{\bar{\nu}_e}$. In the densest part of the remnant, where matter density is above $\rho \sim 10^{12}{\rm g~cm^{-3}}$, and the temperature $T_{\rm rem}$ is of the order of 10 MeV, the neutrino mean free path $\ell_\nu = 1/(n_{\rm B} \sigma_{\nu})$ is smaller than the size of the system ($\sim 10$-$100~{\rm km}$) for thermal neutrinos of energy $E_{\nu} \sim 3.15 T_{\rm rem}$ : $ \ell_{\nu} \sim 250~{\rm m} \left( \rho /10^{12}{\rm g~cm^{-3}} \right)^{-1} \left( T_{\rm rem}/10~{\rm MeV} \right)^{-2} \, . $ For this estimate we have used an approximated expression for the cross-section of neutrino scattering off free nucleons, $\sigma_{\nu} \approx \sigma_0 (E_\nu/m_e c^2)^2$ with $\sigma_0 = 1.76\times 10^{-44}{\rm cm^{2}}$, to evaluate the neutrino-matter cross-section. Absorption cross-section on free baryons have similar magnitudes and dependences. Then deep inside the remnant neutrinos equilibrate with matter and diffuse out on the diffusion timescale ($\sim$ seconds). Due to the presence of an accretion disk, neutrinos are emitted preferentially along the polar direction rather than along the equator, such that the polar flux can be a few times the equatorial one. The most relevant neutrino decoupling surfaces are located in the density interval $10^{11-12}{\rm g~cm^{-3}}$, with $\nu_e$'s decoupling at lower densities and temperatures than $\bar{\nu}_e$'s and $\nu_{\mu,\tau}$'s, since the neutron richness favors $n+\nu_e \rightarrow p + e^-$ as absorption process over other inelastic neutrino-matter processes. Typical neutrino mean energies in the decoupling region are $E_{\nu_e} \sim 10~{\rm MeV}$, $E_{\bar{\nu}_e} \sim 15~{\rm MeV}$ and $E_{\nu_{\mu,\tau}} \sim 20~{\rm MeV}$. Matter at even lower density, usually located at larger distances from the center, is irradiated by the neutrinos emitted at the inner decoupling surfaces and this irradiation can change the neutron-to-proton content (i.e. $Y_e$) through neutrino absorption on neutrons, protons, and nuclei. Finally, we recall that NSs are magnetized objects. During the merger and the subsequent remnant evolution, several mechanisms (e.g. dynamo amplification, magneto-rotational instabilities, Kelvin-Helmholtz instabilities) amplify the field strength. Even for initially low magnetic field ($B \sim 10^{9-10} \rm{G}$), the field can be amplified up to several $\sim 10^{15} \rm{G}$ and it becomes dynamically relevant during the merger aftermath, also for matter ejection. \subsection{\textit{Ejecta from binary neutron stars mergers}} \begin{figure}[t!] \centering \includegraphics[width=0.75 \linewidth]{histograms_NR_handbook.png} \caption{Color coded two-dimensional histograms of the conditions of the dynamical ejecta, as obtained by an equal mass BNS merger simulation (BLh $q=1$ run presented in \protect\cite{Bernuzzi.etal:2020}). On the left panel, the ejecta are characterized in terms of their specific entropy and electron fraction, while on the right panels of their specific entropy and expansion timescale. The top panels refer to an angular slice close to the rotational axis of the binary, while the bottom one to a slice close to the equator.} \label{fig: NR histograms} \end{figure} \begin{figure}[t!] \centering \includegraphics[width=0.75 \linewidth]{histograms_NR_handbook2.png} \caption{Same as in Figure~\ref{fig: NR histograms}, but for a very unequal mass BNS merger (BLh $q=1.8$ run presented in \protect\cite{Bernuzzi.etal:2020}). These conditions are qualitatively similar to the onse observed also in BHNS mergers.} \label{fig: NR histograms 2} \end{figure} The first kind of ejecta emerging from a BNS merger are the \textit{dynamical ejecta}. The dynamical timescale of the merger is set by the orbital (angular) velocity at the last orbit before merger, $v_{\rm dyn}$ ($\Omega_{\rm dyn}$), as $t_{\rm dyn} \sim 2 \pi /\Omega_{\rm dyn} \sim \left( 4 \pi~R_{\rm NS} \right)/v_{\rm dyn} $ where $R_{\rm NS}$ is the NS radius. Assuming a Keplerian behavior, $v_{\rm dyn} \sim \sqrt{GM/(2R_{\rm NS})}$, we obtain: \begin{equation} v_{\rm dyn} \sim 0.4~c \left(\frac{M}{2.7 M_{\odot}} \right)^{1/2} \left(\frac{R_{\rm NS}}{12~{\rm km}} \right)^{-1/2} \, , \label{eq: orbital speed} \end{equation} and \begin{equation} t_{\rm dyn} \sim 1.23~{\rm ms} \left(\frac{M}{2.7 M_{\odot}} \right)^{-1/2} \left(\frac{R_{\rm NS}}{12~{\rm km}} \right)^{3/2} \, , \label{eq: dynamical timescale} \end{equation} for a typical total binary mass $M$ of 2.7 \msun and a NS radius of 12km \cite{Abbott:2017a,Abbott.etal:2018}. During the last orbits, when the two NSs approach each other, each of them gets deformed by the tidal field of the companion. As soon as the NSs touch, a large fraction of their kinetic orbital energy is converted into internal energy, while the tidal tails retain their orbital speed, Eq.~(\ref{eq: orbital speed}). Since this is larger than the radial escape velocity, matter in the tails is ballistically expelled with velocity $v_{\rm ej} \approx 0.1$-$0.3 c \lesssim v_{\rm dyn}$. This is the \textit{tidal component} of the dynamical ejecta and it mainly develops across the equatorial plane of the binary. The temperature in these ejecta is only marginally increased by the tidal compression that precedes the merger ($T \lesssim 1~{\rm MeV}$) and the emission of neutrinos is too weak to change $Y_e$ significantly. Thus, these ejecta mostly retain their original $Y_e$, $0.05 \lesssim Y_e \lesssim 0.15$, and they increase their specific entropy only up to a few $k_B$ per baryon, $s \lesssim 5 k_{\rm B}~{\rm baryon^{-1}}$. If the total mass of the binary is too large for the matter pressure and for the rotational support to sustain the forming remnant, the latter collapses immediately to a BH. Otherwise, a (possibly metastable) massive NS forms in the center. This object is far from equilibrium and it bounces as the result of the gravitational pull and matter pressure response. As the sound waves generated by these oscillations travel through the remnant and reach lower density regions, they convert into shock waves, triggering the ejection of matter heated by compression and shocks from the outer edge of the remnant. These ejecta are called \textit{shock-heated ejecta} and present a broad distribution of expansion velocity, usually peaked around 0.2-0.3$c$, but with a possible high velocity tail extending up to 0.6-0.8$c$. Due to the action of shocks and compression the ejecta entropy increases, typically reaching values around 10-20 $k_{\rm B}~{\rm baryon}^{-1}$, but with a low-mass, high-entropy, high speed tail extending up to $\sim$100 $k_{\rm B}~{\rm baryon}^{-1}$. The corresponding increase in temperature (initially, up to several tens of MeV before dropping due to matter expansion) produces a large density of electron-positron pairs and determines an increase in $Y_e$ in the ejecta due to positron captures on neutrons. Moreover, neutrino irradiation coming from the forming remnant can further increase $Y_e$ through $\nu_e$ absorption on neutrons \cite{Wetal:2014}. Since neutrino emission is more efficient along the polar direction, the effect of irradiation is more evident at high latitudes. The combined effect of tidal tail interactions, hydrodynamics shocks and weak processes is the expansion of the dynamical ejecta over the entire solid angle, still with a preference along the equatorial plane (the mass distribution retains a $\sin^2{\theta}$ dependence on the polar angle $\theta$), with a clear gradient in the $Y_e$ distribution moving from the equator ($Y_e \approx 0.1$) to the poles ($Y_e \lesssim 0.4$). In particular, matter above $\theta \sim 45^\circ$ is expected to have $Y_e \gtrsim 0.25$. The ejection of dynamical ejecta lasts for a few ms after merger, see Eq.~(\ref{eq: dynamical timescale}), and its amount ranges between $\sim 10^{-4}$ and $\sim 10^{-2}$ \msun, depending on the binary properties and on the nuclear EOS (see e.g. \cite{Radice.etal:2018}). The tidal component is more relevant if the high density part of the EOS is rather stiff or if the two NSs in the binary have very different masses. In this case, at least one of the two NSs is not very compact (i.e. $R_{\rm NS}$ is larger) and the tidal disruption is very effective. The presence of shock-heated ejecta is instead more relevant in the case of equal mass mergers and for a soft nuclear EOS. In these cases, the NSs are more compact (i.e. $R_{\rm NS}$ is smaller), the collision velocity at merger is larger (see Eq.~\ref{eq: orbital speed}) and the shocks are more violent. Typical conditions of the dynamical ejecta are presented in Figures \ref{fig: NR histograms} and \ref{fig: NR histograms 2} for both an equal and a very unequal mass BNS merger, as obtained by detailed merger simulations in Numerical Relativity, at two different polar angles . While the massive NS forms in the center, matter compressed and heated up at the contact interface between the two NS cores is expelled outward. Conservation of angular momentum drives the formation of a rotationally supported, thick accretion disk of radial and vertical extension $R_{\rm disk}$ and $H_{\rm disk}$, such that its aspect ratio is $(H/R)_{\rm disk} \sim 1/3$. The typical disk mass $M_{\rm disk}$ (where the disk is usually defined as the part of the remnant with density below $10^{13}{\rm g~cm^{-3}}$ or, in the presence of a BH, outside of the horizon) ranges between $10^{-3}$ and 0.3$M_{\odot}$. A prompt collapse to BH stops the disk formation, leading to lighter disks. An interesting exception is represented by very asymmetric binaries: in this case, the sudden BH formation is accompanied by a very efficient tidal disruption of the secondary NS, such that a significant fraction of it settles in Keplerian orbital motion outside the BH horizon \cite{Bernuzzi.etal:2020}. The evolution of the rotating disk is governed by hydrodynamics, magnetic and weak processes. Several mechanisms are responsible for the local amplification of the magnetic field. The resulting viscosity of turbulent origin drives matter accretion onto the central object on the accretion timescale: \begin{equation} t_{\rm acc} \sim \frac{1}{\alpha} \left( \frac{H}{R} \right)^{-2} \Omega_{\rm disk}^{-1} \approx 0.76~{\rm s} \left( \frac{\alpha}{0.02} \right)^{-1} \left( \frac{H/R}{1/3} \right)^{-2} \left( \frac{M_{\rm rem}}{2.6 M_{\odot}} \right)^{-1/2} \left( \frac{R_{\rm disk}}{100~{\rm km}} \right)^{3/2} \label{eq: disk timescale} \end{equation} where $\alpha$ is an effective viscosity parameter, $\Omega_{\rm disk}$ the Keplerian angular velocity, and for the remnant mass $M_{\rm rem}$ and disk radial scale $R_{\rm disk}$ we set as characteristic values 2.6\msun and 100~km, respectively. During its secular evolution, the processes that determine the disk evolution can produce mass outflows, known as \textit{disk wind ejecta}. Neutrino absorption, for example, redistributes energy and momentum inside the remnant, from hot and dense regions ($\rho > 10^{12}{\rm g~cm^{-3}}$) to regions where the density decreases to $\rho \sim 10^{10-11}{\rm g~cm^{-3}}$. This process inflates the disk, mainly in the vertical direction (\textit{neutrino-driven winds}). At the same time, the accretion process implies an angular momentum redistribution inside the remnant: while mass has a net inflow and the bulk of the disk is accreted, a fraction of it expands radially (\textit{viscosity-driven winds}). In both cases, the disk expansion determines a drop in temperature and when $T \lesssim 5-6{\rm GK}$ free neutrons and protons recombine first in $\alpha$ particles and then in heavier nuclei. The energy released is on average $\epsilon_{\rm nucl} \approx 8.6~{\rm MeV~baryon^{-1}}$ and the corresponding expansion velocity can be estimated by equating the kinetic energy at infinity with the sum of the gravitational and nuclear energy released by recombination: $ v/c \lesssim \sqrt{2\left( \epsilon_{\rm nucl}/m_{b} c^2 - GM_{\rm rem}/(Rc^2) \right)} $, where $R_{\rm rec}$ is the radial scale where recombination occurs. Assuming $M_{\rm rem} = 2.6 M_{\odot}$, and $R_{\rm rec}\approx 450-600~{\rm km}$ for disk winds, one obtains $v \approx 0.034-0.074~c$. Neutrino-driven winds can emerge on a few tens of millisecond timescale, while viscosity-driven winds on the longer accretion timescale. The earlier the wind develops, the faster the ejecta travel. Indeed, at earlier time the disk is hotter and the recombination radius is larger. Other processes happening inside the disk can also drive disk winds. For example, if the central remnant does not collapse to a BH, non-axisymmetric bars extending inside the disk (mainly $m=1$ and $m=2$ spiral modes) acts continuously on its innermost part, producing a net outflow of angular momentum that crosses the disk and expels matter from its edge (\textit{spiral-wave winds}). Spiral-wave winds develops immediately after disk formation and possibly last up to the point where the central massive NS collapses or the bars are dissipated by GW emission. Moreover, if in addition to disordered local fields, large scale magnetic fields develop inside the remnant, magnetic pressure and the Lorentz force can further accelerate matter producing \textit{magnetically-driven wind disks}. Both in the magnetic and in the spiral-wave wind cases, expansion velocities are intermediate between the fast dynamical ejecta and the slower recombination disk winds, $v \sim 0.1-0.2c$. \begin{figure}[t!] \centering \includegraphics[width=\linewidth]{dyn_ejecta_vs_wind_ejecta.pdf} \caption{Comparison between the dynamical and the disk-wind ejecta, as obtained by a large set of BNS merger models, employing several nuclear EOSs. While the amount of dynamical ejecta are computed within the simulations, the mass of the wind-disk is assumed to be 20\% of the mass of the accretion disk at the end of the simulations. Figure taken from \protect\cite{Radice.etal:2018}.} \label{fig: disk VS dyn ejecta} \end{figure} The many processes taking place inside the disk are very effective in unbinding mass from it. The scale that sets the ejecta amount is the mass of the disk itself. While neutrinos alone are able to unbind only a few percents of the disk (and even less in absence of the very luminous massive NS), the other mechanisms unbind between 0.1 and 0.4 $M_{\rm disk}$. It is worth mentioning that these mechanisms can work at the same time, with disk consumption being the only really competing factor. Disk-wind ejecta are thus likely the most relevant source of ejecta for BNS mergers, as visible in Figure~\ref{fig: disk VS dyn ejecta}. The ejection timescale of disk winds is comparable to the weak reaction timescale. As for the dynamical ejecta, while the initial $Y_e$ in the disk is set by the cold weak equilibrium of the merging NSs, the hot temperature increases $Y_e$ inside the expanding winds due to positron and neutrino absorption on neutrons. Assuming that neutrino irradiation is effective and long enough to reach equilibrium, $Y_e$ tends progressively toward \cite{Qian.Woosley:1996,Martinez-Pinedo.etal:2012}: \begin{equation} Y_{e,{\rm eq}} \approx \left( 1+ \frac{L_{\bar{\nu}_e}}{L_{\nu_e}} \frac{W_{\bar{\nu}_e}}{W_{\nu_e}} \frac{\epsilon_{\bar{\nu}_e} - 2 \Delta + 1.2 \Delta^2/\epsilon_{\bar{\nu}_e}} {\epsilon_{{\nu}_e} + 2 \Delta + 1.2 \Delta^2/\epsilon_{{\nu}_e}} \right)^{-1} \, , \end{equation} where $\Delta = (m_n - m_p) c^2 \approx 1.29~{\rm MeV}$, $\epsilon_{\nu}$ is the ratio between the average squared neutrino energy and the average neutrino energy (which for relevant spectral distribution gives $\epsilon_{\nu} \approx 1.2~E_{\nu}$), and $W_i \approx 1 + \eta \langle E_i \rangle/m_b c^2$ with $\eta_{\nu_e} = 1.01$ and $\eta_{\bar{\nu}_e} = -7.22$ is the weak magnetism correction factor. For typical neutrino luminosities and mean energies, $Y_{e,{\rm eq}} \approx 0.45 < 0.5 $. Thus, depending on the ejection time and on the strength of the neutrino irradiation, the electron fraction in the wind ejecta shows a broad distribution between 0.1 and 0.45. In the case of short-lived massive NS the bulk of the disk wind ejecta have $Y_e$ between $0.2$ and $0.3$, while in the case of long-lived remnant, the higher neutrino luminosity drives the $Y_e$ distribution toward $Y_e \gtrsim 0.3$. Matter in the disk is shocked by waves produced by the central remnant and it is heated by viscous dissation. Then its entropy increases to an average value of 15-25 $k_{\rm B}~{\rm baryon}^{-1}$, with possibly high entropy tails extending also in this case up to $\sim$100 $k_{\rm B}~{\rm baryon}^{-1}$. \subsection{\textit{Ejecta from neutron star-black hole mergers}} The ejection of matter from BHNS systems shares many similarities with the one from BNS mergers, but it also present crucial differences. Astrophysical BHs are characterized by their mass, $M_{\rm BH}$, and spin, $\mathbf{J}_{\rm BH}$. In the following we assume that the orbital angular momentum of the binary points toward the positive $z$ direction and that the BH is significantly more massive than the NS ($M_{\rm BH} \gtrsim 5$ \msun, while $M_{\rm NS} \lesssim 2$ \msun). Assuming $\mathbf{J}_{\rm BH}$ to be also along the $z$ axis, we characterize it through the dimensionless spin parameter $a_{\rm BH} = \pm J_{\rm BH} c/(GM_{\rm BH}^2)$, where $0 \leq a < 1$ if the spin points toward the positive $z$ direction, $-1 < a < 0$ otherwise. When at the end of the GW-driven inspiral phase the two compact objects approach each other, the merger fate depends on the location of the BH last stable circular orbit, $R_{\rm ISCO}$ (i.e. the radius inside of which circular time-like test-mass orbits in the equatorial plane become unstable to small perturbations), with respect to the tidal distance, $d_{\rm tidal}$ (i.e. the BH-NS distance at which the gravitational force on a test mass at the NS surface equals the tidal force pulling the mass toward the BH). For Kerr BH $R_{\rm ISCO} = M_{\rm BH} f(a)$, where $f(a)$ is a monotonically decreasing function such that $1 \leq f(a) \leq 9$ and $f(0)=6$, while $d_{\rm tidal} \approx (2 M_{\rm BH}/M_{\rm NS})^{1/3} R_{\rm NS}$. If $d_{\rm tidal} \lesssim R_{\rm ISCO}$ the NS is swallowed by the BH before a significant tidal disruption can occur. No mass is practically left outside the horizon to form a disk or to become unbound. Otherwise the NS experiences a partial tidal disruption before most of its mass gets inside the BH horizon. Mass coming from the farther NS edge can become unbound in the form of tidal dynamical ejecta inside a crescent. The rest of the unswallowed mass sets into a Keplerian accretion torus around a spinning BH. From the above relations, it is clear that the probability of leaving mass outside the BH horizon increases for stiffer nuclear EOS, smaller mass ratios, and larger $a_{\rm BH}$ . Numerical simulations show that $ 0 \leq M_{\rm dyn} \lesssim 0.15$\msun for the dynamical ejecta while the mass in the torus is such that $ 0 \leq M_{\rm disk} \lesssim 0.5$\msun. While the dynamical ejecta mass decreases for larger NS masses, the most massive torii are observed for very massive NSs (and for smaller mass ratios and larger spins). The NS gets compressed during the inspiral. However, the tidal nature of the merger keeps the entropy in the dynamical ejecta low ($s \sim {\rm a~few~}k_{\rm B}$) such that $k_{\rm B}T \lesssim 1~{\rm MeV}$ always. The electron fraction of the ejecta stays also very close to its cold neutrino-less weak equilibrium value, i.e. $Y_e \sim 0.05$. Inside the torus, even in absence of shocks produced by the central remnant, accretion and disk dynamics heat up matter up to $k_{\rm B}T \sim10~{\rm MeV}$, producing $\sim 10^{52}{\rm erg~s^{-1}}$ of accretion-powered neutrino luminosities. The subsequent production of disk wind ejecta is similar to the one observed in BNS mergers. Due to the lower neutrino luminosity, the electron fraction of the disk wind ejecta shows a broad distribution, $0.1 \lesssim Y_e \lesssim 0.35 $, with a lower average value, compared with the wind disk ejecta produced by long-lived NS remnants. \subsection{\textit{Ejecta expansion and thermodynamics}} As we have seen both for BNS and for BHNS systems, during the merger cold and neutron-rich nuclear matter is heated up and leptonized by several processes, including matter compression, hydrodynamics shocks and neutrino irradiation. The bulk of the dynamical ejecta and of the remnant disk originate from inside the outer NS core, where $\rho \gtrsim 10^{14}{\rm g~cm^{-3}}$ and $Y_e \lesssim 0.1$. In these conditions, nuclei are fully dissociated in free neutrons and protons (homogeneous nuclear matter), and due to charge neutrality their initial abundances are related to the electron fraction by $Y_p = Y_e \lesssim 0.1$ and $Y_n = (1-Y_e) \gtrsim 0.9$. After having reached its peak temperature, matter is expelled and the density and temperature drop, while neutrons and protons start to form nuclei. In the following we will always assume that the peak temperature of the ejecta exceeds $4~{\rm GK}$. Matter and radiation in the expanding ejecta can be considered as a neutrally charged plasma consisting of nuclei (often distinguished in free neutrons $n$'s, free protons $p$'s, $\alpha$ particles and a distribution of all other nuclei), electrons, photons and neutrinos. During most of the relevant nucleosynthesis timescale, photons, electrons and nuclei are in thermodynamics equilibrium. It is thus useful to consider an expanding fluid element as a Lagrangian particle characterized by an evolving density $\rho=\rho(t)$ and temperature $T=T(t)$. Nuclei and nucleons can be treated as an ideal, non relativistic classical gas, obeying Maxwell-Boltzmann statistics. Electrons are degenerate in the early phase of the expansion before entering a classical gas phase, and they can be described by an ideal Fermi gas of arbitrary degeneracy. Photons are always characterized by a black body spectrum, typical of massless bosons in thermal equilibrium with matter. Once the density, temperature and composition are given, the entropy of the system can also be computed through the resulting equation of state, $s=s(t)$. In the first phase of the ejecta expansion, when hydrodynamics processes are still active, the fluid density decreases approximately in an exponential way: $\rho(t) \approx \rho_0~\exp{\left( -(t-t_0)/\tau \right)}$, where $\rho_0$ is the density at the onset of the expansion, $t=t_0$. The expansion timescale, $\tau$, quantifies how fast the density drops during the first phase. Faster dynamical ejecta have smaller $\tau$'s ($1 \lesssim \tau[{\rm ms}] \lesssim 10 $) than slower disk winds ($10 \lesssim \tau[{\rm ms}] \lesssim 100 $). The expansion timescale can be related to the expansion velocity $v_{\rm ej}$ through: \begin{equation} \tau \approx \frac{\tilde{R}}{v_{\rm ej}} \approx 16.7~{\rm ms} \left( \frac{\tilde{R}}{500~{\rm km}} \right) \left( \frac{v_{\rm ej}}{0.1 c} \right)^{-1} \label{eq: expansion timescale VS velocity} \end{equation} where $\tilde{R}$ is the lengthscale where matter becomes unbound, depending on the kind of ejecta and ejection mechanism. For the dynamical ejecta, the more impulsive expulsion set a lower $\tilde{R} \sim 300~{\rm km}$ than for the disk wind ejecta, $\tilde{R} \sim 600~{\rm km}$. After a timescale $t_{\rm hom} \sim 3\tau $, internal dynamics and momentum redistribution cease and fluid elements start to expand with an approximately constant velocity: the fastest fluid elements at the front, the slowest at the bottom. Such expansion profile is said homologous since $v \propto r$ and in this phase the density evolves as: \begin{equation} \rho(t) = \rho_{\rm hom} \left( \frac{t_{\rm hom}}{t} \right)^{3} \approx 100~{\rm g~cm^{-3}} \left( \frac{\rho_{\rm hom}}{3 \times 10^6{\rm g~cm^{-3}}} \right) \left( \frac{\tau}{10~{\rm ms}} \right)^{3} \left( \frac{t}{1~{\rm s}} \right)^{-3} \label{eq: density evolution} \end{equation} with $\rho_{\rm hom}$ varying inside the range $10^{4}-10^{8}{\rm g~cm^{-3}}$, and the larger values are for low entropy, fast expanding ejecta. This density evolution is a very relevant input for the $r$-process \cite{Rosswog.etal:2014}. After the nucleosynthesis, the internal energy of the ejecta is subdominant with respect to the kinetic energy and the expansion proceeds adiabatically. Moreover, for the relevant density and temperature conditions, the EOS is dominated by the relativistic photons and electrons. For such a gas, an adiabatic expansion satisfies $\rho T^3 \approx {\rm const}$ and thus $T(t) \propto t^{-1}$. While this temperature evolution profile is not accurate during the nucleosynthesis epoch, it provides a good approximation after it. \section{\textit{$r$-process nucleosynthesis in compact mergers}} We now move to the study of the nucleosynthesis happening inside the ejecta. Before speaking about the $r$-process, we introduce a few basics, although necessary, concepts in nuclear reaction theory. We address the reader to Refs.~\cite{Clayton:1983,Iliadis:2007,Martinez-Pinedo:2008} for general introductions and to \cite{Thielemann.etal:2017,Cowan.etal:2019} for more specific reviews on the $r$-process. Nuclear abundances inside the ejecta evolve in time as a result of nuclear (both strong and weak) and electromagnetic reactions. The usage of abundances in nucleosynthesis calculations is very sensible because, being the ratio of densities, it allows to decouple the effects of reactions on the composition from the effects due to matter expansion. Strong and electromagnetic reactions conserve separately the number of protons and neutrons. Strong nuclear reactions include fusion reactions among nuclei. In the case of transfer reactions, they are often indicated as $B(i,o)C$ to emphasise the transfer particles $i$ and $o$. For example, in a $(n,\alpha)$ reaction a free neutron is absorbed by a nucleus $B=(A,Z)$, and a nucleus $C=(A-3,Z-2)$ and an $\alpha$ particle are produced in the final state. Strong nuclear interactions include also $\alpha$ decays, $(A,Z) \rightarrow (A-4,Z-2) + \alpha$, and spontaneous or induced fission processes. The most relevant electromagnetic reactions involving nuclei are the photodisintegration reactions, $B(\gamma,o)C$, and their inverse absorption processes, $B(i,\gamma)C$. For example, in the case of a $(\gamma,n)$ reaction, the absorption of a photon on a nucleus $B=(A,Z)$ produces a nucleus $C=(A-1,Z)$ together with a free neutron. The opposite reaction $(n,\gamma)$, called neutron capture, consists in the absorption of a free neutron on a nucleus $B=(A,Z)$, producing a nucleus $C=(A+1,Z)$ and a photon. Weak nuclear reactions include $\beta^{\pm}$ decays, electron and neutrino captures, and they convert neutrons into protons and vice-versa, changing the electron fraction of matter. In the expanding neutron-rich ejecta, $\beta^-$ decays, $(A,Z) \rightarrow (A,Z+1) + e^{-} + \bar{\nu}_e$, are the most important weak reactions while in the initial expansion phase neutrino irradiation acts through neutrino absorption, as previously discussed. Any of the transfer and absorption reactions $B(i,o)C$ is characterized by its cross-section, $\sigma_{B(i,o)C}$, which in general depends on the energy of the colliding particles. In an astrophysical plasma, the distribution of the colliding energy depends on the local thermodynamics properties and the reaction rate, $r_{B(i,o)C}$ (defined as the number of reactions occurring per unit time, per units volume and per reactant pair), is given by $ r_{B(i,o),C} = \langle \sigma v \rangle_{B(i,o)C}~n_B n_i $ where $\langle \sigma v \rangle_{B(i,o)C}$ is the product of the reaction cross section times the relative velocity between $B$ and $i$, averaged over their thermal distributions. In the case of photon or neutrino absorptions on a nucleus $B$, the reaction rate can be expressed in terms of an effective destruction/decay rate, $\lambda_{B(\gamma/\nu,o)C}$, as $r_{B(\gamma/\nu,o)C} = \lambda_{B(\gamma/\nu,o)C}~n_B$, where $\lambda_{B,\gamma}$ is a function of $T$ only (since the photon gas properties depend only on temperature), while $\lambda_{B,\nu}$ depends on the neutrino spectrum, which is in general not in equilibrium with the plasma. Then, strong and electromagnetic reactions depend only on the local plasma properties. Alpha and beta decays are instead characterized by a constant decay rate $\lambda_{\alpha / \beta}$, related to the nucleus half-life $t_{1/2}$ by $\lambda_{\alpha / \beta} = \ln{2}/t_{1/2}$. The lifetime of a nucleus against a certain reaction can be defined as the inverse of the corresponding rate, $\tau_i = 1/ \lambda_i$. For large temperatures, strong and photodisintegration reactions are characterized by large reaction rates. For $T \gtrsim 4-5~{\rm GK}$ the resulting fusion and photodisintegration timescales become much shorter than the weak and dynamical timescales in the ejecta. Thus, these reactions can be considered in equilibrium among them and with their inverse reactions. This condition is called Nuclear Statistical Equilibrium (NSE) and the nuclear abundance in NSE are fully determined by the local thermodynamical conditions, i.e. by $\rho$, $T$ and $Y_e$. While $\rho$ and $T$ vary due to the expansion, $Y_e$ changes due to weak processes, but in both cases on much longer timescales than the nuclear NSE timescale. When the temperature decreases below $\sim 4-5~{\rm GK}$ some reactions characterized by small $Q$-values become slow enough that NSE is no more guaranteed across the entire nuclear distribution, and especially for nuclei characterized by magic nuclear numbers, i.e. close to shell closure conditions. This transition is called \textit{NSE freeze-out}. Since a large fraction of direct and inverse nuclear reactions are still very fast, the nuclear distribution splits into areas of Quasi Statistical Equilibrium (QSE), where equilibrium conditions still apply on sub-sets of nuclei. When the temperature decreases even further, no equilibrium arguments apply and fully out-of-equilibrium nucleosynthesis occurs. While in NSE conditions accurate abundances can be computed even without precise information on the reaction rates, a detailed knowledge of the properties of the ejecta and of nuclei all over the nuclear chart are requested to predict accurate abundances after NSE freeze-out. Nevertheless, equilibrium arguments still provide a useful tool to understand the basic feature of nucleosynthesis in QSE conditions. \subsection{\textit{Compact binary mergers as $r$-process site}} Before entering the details of the $r$-process, we first motivate why the ejecta of compact binary mergers represent a suitable environment for $r$-process nucleosyntheshis. The ejecta come from high density conditions and usually experience high enough temperatures such that matter is mostly dissociated into free neutrons and protons under NSE conditions at their peak temperature. As temperature drops, neutrons and protons recombine first into $\alpha$ particles. The subsequent building of the most tightly bound iron group nuclei depends on the three body reactions responsible for the assembly of heavier nuclei, namely $2 \alpha + {\rm n} \rightarrow {}^{9}{\rm Be} + \gamma $ and $3 \alpha \rightarrow {}^{12}{\rm C}+ \gamma $. The first one is the most relevant in neutron-rich conditions. Triple reactions are in competition with their inverse photodestruction reactions. Due to their triple nature, the former are favored by larger densities, while the latter are strongly enhanced by higher temperatures since for the photon density and mean energy one has $n_{\gamma} \propto T^3$ and $\langle E_{\gamma} \rangle \propto T$, respectively. If the plasma is radiation-dominated, the value of the specific entropy ultimately determine whether iron group nuclei can form. Indeed, if $s \gtrsim s_{\gamma} + s_{e^{\pm}} \approx 2 s_{\gamma}$, the density can be computed as: \begin{equation} \rho \lesssim 2 \left( \frac{4 \pi^2 m_{b}}{45 \left( \hbar c \right)^3} \right) \frac{k_{\rm B}^3 T^3}{s/k_{\rm B}} \approx 3.02 \times 10^{6}~{\rm g~cm^{-3}} \left( \frac{T}{5~{\rm GK}} \right)^3 \left( \frac{s}{10~k_{\rm B}} \right)^{-1} \, . \label{eq: density photon-dominated gas} \end{equation} In very neutron rich conditions ($Y_e \sim 0.1$), when temperature decreases between 5 and 2.5 GK, $\alpha \alpha n$ reactions occur more efficiently than their inverse photodestruction reactions only for $\rho \gtrsim 3 \times 10^5~{\rm g~cm^{-3}}$, i.e. for $s \lesssim 100 k_{\rm B}~{\rm baryon}^{-1}$. This implies that in low and moderate entropy conditions (typical of the merger ejecta) iron group nuclei are formed in NSE conditions, while in the high entropy tail $\alpha$ particles are mostly produced when NSE equilibrium is no more guaranteed ($\alpha$-rich freeze out). Almost all protons are bound inside nuclei and a distribution of heavy nuclei around the iron group (called \textit{seed nuclei}) is present at the NSE freeze-out. For the seed nuclei, one can introduce a representative average nucleus $(\langle A \rangle_{\rm seed},\langle Z \rangle_{\rm seed})$ defined such that: \begin{equation} \langle A \rangle_{\rm seed} \equiv \left( \sum\limits_{(A,Z),A > 4}~A ~ Y_{(A,Z)} \right) /Y_{\rm seed} \, , \quad \langle Z \rangle_{\rm seed} \equiv \left( \sum\limits_{(A,Z),A > 4}~Z ~ Y_{(A,Z)} \right) /Y_{\rm seed} \, , \end{equation} where we have defined $Y_{\rm seed} \equiv \sum_{(A,Z),A > 4}~Y_{(A,Z)}$. While for $Y_e \approx 0.5$ the nuclear abundance distribution has its peak around $^{56}{\rm Fe}$ and $^{56}{\rm Ni}$ (the most bound, symmetric nuclei, characterized by the presence of a $Z=28$ proton shell closure), for $Y_e < 0.5$ the distribution moves toward more exotic, neutron-rich iron group nuclei. However, there is a limit for the amount of neutrons that can be bound inside a nucleus: for $20 \lesssim Z \lesssim 40$, nuclei located at the neutron drip line have $(Z/A)_{\rm min} \sim 0.3$. Moreover, due to the neutron richness it becomes energetically favorable to have a certain fraction of free neutrons even for $Y_e > 0.3$. Starting from baryon number conservation written as $X_n + X_{n,{\rm seed}} + X_{p,{\rm seed}} \approx 1$ (where $X_{n/p,{\rm seed}}$ indicate the fractions of neutrons or protons bound in seed nuclei), from the charge neutrality condition $Y_e \approx \sum_{(A,Z),A> 4} ~\left( Z~Y_{(A,Z)} \right)$, and using the above definitions, the free neutron fraction can be evaluated as: \begin{equation} Y_n \approx 1 - \left( \langle A \rangle_{\rm seed} / \langle Z \rangle_{\rm seed} \right) Y_e \, . \label{eq:Yn formula} \end{equation} Assuming for simplicity that $\langle Z \rangle_{\rm seed} \approx 28 $, and that the dependence of $\langle A \rangle_{\rm seed}$ on $Y_e$ is approximately linear between $A/Z = 0.5$ and $A/Z = \left(A/Z\right)_{\rm min}$: \begin{equation} \langle A \rangle_{\rm seed} \approx 56 + 70 \left( 0.5 - Y_e \right) \, , \label{eq:Aseed estimate} \end{equation} we obtain an approximation for $Y_n$: \begin{equation} Y_n \approx 1 - 3.25 Y_e + 2.5 Y_e^2 \, , \label{eq:Yn estimate} \end{equation} that varies between 0 for $Y_e = 0.5$ and 1 for $Y_e = 0$. Since almost all protons are contained inside the seed nuclei, we can also estimate the seed abundance as: \begin{equation} Y_{\rm seed} \approx Y_e/\langle Z \rangle_{\rm seed} \approx Y_e/28 \, . \label{eq:Yseed formula} \end{equation} Neutron capture is the key reaction to produce heavy nuclei beyond the iron group, once NSE freeze-out has occurred. In accordance with the definition of reaction rate and in analogy to the effective rate definition, the lifetime of a generic seed nucleus against a neutron capture reaction can be estimated as: \begin{equation} \tau_{(n,\gamma)} = 1/ \left( n_n \langle \sigma v \rangle_{(n,\gamma)} \right) \, , \label{eq: n-capture lifetime} \end{equation} where $n_n$ is the free neutron density. The $Q$-value of an $(n,\gamma)$ reaction is the energy gained by the nucleus $(A,Z)$ by acquiring a neutron and it is computed as $Q = \left( m_{(A,Z)} + m_n c^2 - m_{(A+1,Z)} \right) c^2$. It is also equal to the energy required to remove a neutron from a $(A+1,Z)$ nucleus, called \textit{neutron separation energy} of the $(A+1,Z)$ nucleus, $S_{n,(A+1,Z)}$. Neutron captures have $Q$-values that range from 0 for exotic neutron-rich nuclei at the neutron drip line up to $\sim 15~{\rm MeV}$ close to the valley of stability. The leading contribution to $\sigma_{(n,\gamma)}$ is provided by the $s$-wave term of the partial wave expansion: $ \sigma_{n} \approx \left( \pi/k^2 \right) T_s$, where $T_s \approx 4k/k'$ is the transmission coefficient obtained by considering a neutron moving against the potential barrier of the nucleus, and $k,k'$ are the wave numbers of the particles in the initial and final state, respectively. If $\mu \approx m_n$ is the reduced mass of the parent state and $E \sim k_{\rm B}T$ the thermal energy scale, for non-relativistic energies ($k_{\rm B}T \sim 0.1~{\rm MeV}\ll Q \ll m_n c^2 $) the relative speed is $v = \sqrt{2E/\mu}$, and the wave numbers are $k \approx \sqrt{2 \mu E}/\hbar$ and $ k' \approx \sqrt{2 \mu (S_{n}+E)}/ \hbar \approx \sqrt{2 \mu S_{n}}/\hbar $, so that the typical cross-section is: \begin{equation} \sigma_{(n,\gamma)} \sim 3.70~{\rm barn} \left( \frac{k_{\rm B}T}{0.1~{\rm MeV}} \right)^{-1/2} \left( \frac{S_{n}}{5~{\rm MeV}} \right)^{-1/2} \, . \label{eq: cross section estimate} \end{equation} Since $\sigma_n \propto 1/\sqrt{T}$ and $v \propto \sqrt{T}$, $\langle \sigma v \rangle_{n,\gamma} $ is approximately constant for thermal, non-relativistic neutrons. Thus, the lifetime against neutron capture, Eq.~(\ref{eq: n-capture lifetime}), depends mainly on $n_n$, which for a plasma of density $\rho$ and free neutron fraction $Y_n$ is simply $n_n = \rho Y_n/m_{\rm B} \approx 2.99 \times 10^{24} {\rm cm^{-3}}~(\rho/10~{\rm g~cm^{-3}})~(Y_n/0.5)$, and $\tau_{(n,\gamma)}$ becomes: \begin{equation} \tau_{(n,\gamma)} \sim 0.21~{\rm ns} \left( \frac{\rho}{10~{\rm g~cm^{-3}}} \right)^{-1} \left( \frac{Y_n}{ 0.5} \right)^{-1} \left( \frac{S_{n}}{5~{\rm MeV}} \right)^{1/2} \, . \label{eq:tau_n_gamma estimate} \end{equation} The density in the ejecta changes considerably with time as a result of the homologous expansion, Eq~(\ref{eq: density evolution}). If we further consider that $\rho_{\rm hom} \sim 10^6{\rm g~cm^{-3}} $ at NSE freeze-out for $s \sim 10~k_{\rm B}~{\rm baryon^{-1}} $, see Eq~(\ref{eq: density photon-dominated gas}), then the free neutron density at time $t$ is: \begin{equation} n_n \approx 8.08 \times 10^{24}~{\rm cm^{-3}} \left( \frac{\rho_{\rm hom}}{10^6~{\rm g~cm^{-3}}} \right) \left( \frac{Y_n}{0.5} \right) \left( \frac{\tau}{10~{\rm ms}} \right)^3 \left( \frac{t}{1~{\rm s}} \right)^{-3} \, , \label{eq:tau_n_gamma estimate 2} \end{equation} and $\tau_{(n,\gamma)}$ can be also expressed as a function of time after merger as: \begin{eqnarray} \tau_{(n,\gamma)} & \sim & 1.18~{\rm \mu s} \left( \frac{Y_n~\rho_{\rm hom}}{0.5 \times 10^6~{\rm g~cm^{-3}}} \right)^{-1} \left( \frac{\tau}{10~{\rm ms}} \right)^{-3} \left( \frac{S_{n}}{5~{\rm MeV}} \right)^{1/2} \left( \frac{t}{1~{\rm s}} \right)^{3} \, . \label{eq:tau_n_gamma estimate 2} \end{eqnarray} The capture of one or more neutrons increases the mass number by one or more units without increasing the atomic number. Then, neutron captures move the nuclear abundances toward the neutron-rich side of the nuclear chart. Two kinds of reactions compete with neutron capture in producing heavier and heavier neutron-rich nuclei: $(\gamma,n)$ reactions and the $\beta^{-}$ decays. For the $(\gamma,n)$ reactions, while the high neutron density guarantees high $(n,\gamma)$ rates, high energy photons are required to knock a neutron off a nucleus, overcoming the neutron separation energy $S_n$ and boosting the photodestruction rates. For $T \gtrsim 4{\rm GK}$ the two set of reactions are in NSE, meaning that the temperature is large enough to bring $(n,\gamma)$-$(n,\gamma)$ at equilibrium everywhere, also close to the valley of stability where $S_n \sim 8-10~{\rm MeV}$. In neutron-rich conditions, when the nuclear distribution is shifted toward the neutron-drip line, the relevant $S_n$ can be as low as $\sim 1-2~{\rm MeV}$. Thus, temperatures lower than 4 GK are enough to preserve the $(n,\gamma)$-$(n,\gamma)$ equilibrium after NSE-freeze-out on the neutron rich side of the nuclear chart. This is indeed the QSE typical of neutron-rich conditions. Since $(\gamma,n)$ reactions are the inverse of $(n,\gamma)$ reactions, their rates are related by detailed balance conditions: $ n_{(A,Z)} n_n ~ \langle \sigma v \rangle_{(n,\gamma)} = n_{(A+1,Z)}\lambda_{(\gamma,n)} $, where $\lambda_{(\gamma,n)}$ is the photodisintegration rate of $(\gamma,n)$ reactions. Assuming these reactions to be in equilibrium, i.e. $(A,Z) + n \leftrightarrow (A+1,Z) + \gamma$, the chemical potential of the different nuclear species involved are related by $\mu_{(A,Z)} + \mu_n = \mu_{(A+1,Z)}$ (we recall that $\mu_{\gamma}=0$). Using the expression of the chemical potentials for an ideal Maxwell-Boltzmann gas in its relativistic version (i.e., including the rest mass contribution), one obtains: \begin{equation} \frac{n_{(A+1,Z)}}{n_{(A,Z)}~n_{n}} = \left( \frac{2 \pi \hbar^2}{m_{b} k_{\rm B} T} \right)^{3/2} \frac{G_{(A+1,Z)}(T)}{2~G_{(A,Z)}(T)} \left( \frac{A+1}{A} \right)^{3/2} \exp\left(\frac{S_{n,(A+1,Z)}}{k_{\rm B}T}\right) \, , \label{eq: chain abundaces} \end{equation} where $G_{(A,Z)}(T)$ is the nuclear partition function, dependent on the matter temperature. Assuming $G_{(A+1,Z)}/G_{(A,Z)} \sim 1 $ and $(A+1)/A \sim 1 $, we finally obtain an expression for $\tau_{(\gamma,n)} \equiv 1/\lambda_{(\gamma,n)}$, the lifetime of a seed nucleus against photodestruction: \begin{equation} \tau_{(\gamma,n)} \approx 0.19~{\rm \mu s} \left( \frac{k_{\rm B}T}{0.167 {\rm MeV}} \right)^{-3/2} \left( \frac{S_n}{5 {\rm MeV}} \right)^{1/2} \frac{\exp{\left( S_n / k_{\rm B}T \right) }}{\exp{(30)}} \, , \label{eq: tau_g_n estimate} \end{equation} where the reference temperature (corresponding to $T \approx 2~{\rm GK}$) and neutron separation energy are chosen such that $S_n/k_{\rm B}T \approx 30$. This timescale depends heavily on the temperature due to the presence of the exponential factor that rises by orders of magnitudes as the temperature decreases. Additionally, it depends also on the nuclear masses through $S_n$ and the latter sets the scale in the exponential argument, meaning that for a given temperature $\tau_{(\gamma,n)}$ changes dramatically between the valley of stability and the drip line. Initially, at NSE freeze out ($T \sim 4~{\rm GK}$), the temperature and the density are large enough such that both $\tau_{\rm n,\gamma}$ and $\tau_{\rm \gamma,n}$ are much smaller than the dynamical timescale. The exponential term in Eq.~(\ref{eq: tau_g_n estimate}) set the typical $S_{n}$ necessary to guarantee the equilibrium between the two reaction sets. As $T$ and $\rho$ decrease, $\tau_{(\gamma,n)}$ changes much more sensibly and $(n,\gamma)$-$(\gamma,n)$ equilibrium can establish only down to $T \approx 1~{\rm GK}$, assuming typical $S_n \approx 1$-$3~{\rm MeV}$. For the $\beta^-$ decays, using the low-energy limit of the weak interaction theory at leading order, the transition matrix element $\mathcal{M}$ is proportional to the Fermi coupling constant, $G_{\rm F}$. Remembering that in natural units $G_{\rm F}$ is the reciprocal of an energy squared, that the time is the reciprocal of an energy, and that the only relevant energy scale in the process is the $Q$-value of the decay, the lifetime of a nucleus against $\beta$ decay, $\tau_{\beta}$, must be proportional to $Q^{-5}$. This dependence can be seen also as a consequence of the three-body nature of the final state. The $Q$-value of $\beta^-$ decays involving neutron-rich nuclei is roughly proportional to the neutron excess, $D = N-Z$, and varies between a fraction of MeV close to the valley of stability and $\sim$5-15 MeV at the neutron drip line (with larger values at lower mass numbers, where the neutron excess can also be much larger). Using the decay of the free $n$ as representative $\beta^-$ reaction (for which $Q=\Delta$ and $D=1$), we estimate the typical $\beta$-decay lifetime as: \begin{eqnarray} \tau_{\beta} \sim \tau_{n} \left(\frac{\Delta}{Q} \right)^5 & \approx & 3.19~{\rm ms} \left( \frac{Q}{10~{\rm MeV}} \right)^{-5} \approx 8.82 {\rm ms} \left( \frac{D}{10} \right)^{-5} \, , \label{eq: tau_beta estimate} \end{eqnarray} where in the last step we have further assumed that $Q \sim D \Delta$. Then, $\beta^{-}$ decays act on much longer timescale than neutron captures at NSE freeze-out and during the $(n,\gamma)-(\gamma,n)$ equilibrium, and become competitive only when the temperature and density have significantly dropped. This difference in the neutron capture and in the $\beta^-$ decay timescale qualifies the the ejecta from compact binary mergers as one of the astrophysical sites for $r$-process nucleosynthesis in the Universe. Starting from a certain seed nuclei distribution, the fast neutron and photon captures move abundances within the same isotopic chain (i.e., the sequence of nuclei characterized by the same $Z$ and by an increasing $N$). However, nuclear decay is a stochastic process and a fraction of nuclei decay from one isotopic chain to the next one even if $\tau_{\beta}$ is significantly larger than $\tau_{(n,\gamma)}$, especially if the $(n,\gamma)$-$(\gamma,n)$ equilibrium is maintained on a timescale comparable to or longer than $\tau_{\beta}$. Moreover, $S_n$ is not a smooth, monotonic function inside the nuclear chart. The closure of neutron shells inside the nucleus at the magic numbers $N=28,50,82,126$ determines an increase of $S_n$ around those values. The corresponding nuclei become \textit{waiting points}, where $\tau_{(n,\gamma)}$ increases and matter tends to accumulate. For these nuclei the $\beta^-$ decay starts earlier to be competitive and matter flows through them from an isotopic chain to the next one. The net results of the combination of neutron captures, photodestructions and $\beta^-$-decays on the whole distribution of nuclei emerging from NSE during the $(n,\gamma)$-$(\gamma,n)$ equilibrium is a characteristic nuclear distribution that proceeds as a river inside the neutron-rich side of the nuclear chart. This is called the \textit{r-process path}. The final point of the $r$-process nucleosynthesis depends on how many free neutrons are available to be captured by the seed nuclei. This number is called the \textit{neutron-to-seed ratio}, $Y_n/Y_{\rm seed}$, and the end point of the $r$-process can be estimated as: \begin{equation} \langle A \rangle_{\rm final} \sim \langle A \rangle_{\rm seed} + Y_n/Y_{\rm seed} \, , \end{equation} where $\langle A \rangle_{\rm seed}$ is the average mass number of the seed nuclei. For example, assuming $\langle A \rangle_{\rm seed} \sim 80-90$ (see Eq.~\ref{eq:Aseed estimate}), to produce element with $A \approx 130$ it is necessary to have $Y_n/Y_{\rm seed} \approx 40-50$; for $A \approx 195$, $Y_n/Y_{\rm seed} \approx 95-115$ (we will see later than these are the mass numbers of the so-called second and third $r$-process peaks); while for uranium and thorium ($A \approx 235$) $Y_n/Y_{\rm seed} \approx 145-155$. For low or moderate entropy ejecta, the value of $Y_e$ primary determines the neutron-to-seed ratio and, from that, how far the $r$-process nucleosynthesis proceeds in producing heavy elements starting from iron group seed nuclei. Using Eqs.~(\ref{eq:Yn estimate}) and (\ref{eq:Yseed formula}) we can obtain a simple estimate for the neutron-to-seed ratio as a function of $Y_e$ in low entropy conditions: \begin{equation} Y_n/Y_{\rm seed} \sim \langle Z \rangle_{\rm seed}/Y_e - \langle A \rangle_{\rm seed} \approx 28/Y_e - 70~Y_e - 21 \, . \end{equation} This expression diverges for $Y_e \rightarrow 0$, as there are no seeds, while it goes to 0 for $Y_e = 0.5$. For intermediate values $Y_e = 0.1,0.2, 0.3, 0.4$ we obtain $Y_n/Y_{\rm seed} \approx 250, 105, 51, 21$, respectively. These formulae, relying on the simple assumption of a linear dependence of $\langle A \rangle_{\rm seed}$ on $Y_e$, Eq~(\ref{eq:Aseed estimate}), must be understood as very rough estimates that nevertheless catch the most relevant trends for typical entropy ($s \sim 10~k_{\rm B}{\rm baryon^{-1}}$) and expansion timescale ($\tau \sim 10~{\rm ms}$) in the ejecta. More detailed and physically motivated calculations (e.g. \cite{Hoffman.etal:1997,Lippuner.Roberts:2015}) extending to broader ranges of possible conditions, show that the neutron-to-seed ratio has a more complex dependence on the (thermo)dynamics conditions at NSE freeze-out, in particular, $Y_n/Y_{\rm seed}$ is larger for lower $Y_e$, smaller $\tau$ and larger $s$. For example, for $Y_e \gtrsim 0.4$ the neutron-to-seed ratio is such that $Y_n/Y_{\rm seed} \propto s^3/ Y_e^3 \tau$. \subsection{\textit{The working of the $r$-process in compact binary mergers}} \begin{figure}[t!] \centering \includegraphics[width=\linewidth]{tau_10_s_10_ye_0p10.png} \caption{Evolution of a few selected abundances computed for a fluid elements expanding in space with homologous expansion, see Eq.~({\protect\ref{eq: density evolution}}), and initially characterized by a specific entropy $s = 10~k_{\rm B}{\rm baryon}^{-1}$, an initial $Y_e = 0.10$ and expansion timescale $\tau = 10{\rm ms}$, corresponding to typical compact binary merger ejecta conditions (left panel). Heavy nuclei are defined as nuclei for which $A \geq 120$. In addition, relevant timescales as computed according to Eqs.~(\protect\ref{eq: neutron timescale})-(\protect\ref{eq: tau beta network}) are also shown (right panel). Calculations were performed using the SkyNet nuclear network \protect\cite{Lippuner.Roberts:2017} (Courtesy of D. Vescovi).} \label{fig: skynet trajectory} \end{figure} \begin{figure}[t!] \centering \includegraphics[width=\linewidth]{chart_000079.png} \vspace{0.5cm}\\ \includegraphics[width=\linewidth]{chart_000299.png} \caption{For the same trajectory used for Figure~\ref{fig: skynet trajectory}, we also present detailed nuclear compositions on the nuclear chart. In this two panels we show the abundances at the end of the NSE phase (top panel), and the end of the $(n,\gamma)$-$(\gamma,n)$) equilibrium (bottom panel). In the latter case, the $r$-process path is clearly visible. These pictures were produced using the SkyNet nuclear network \protect\cite{Lippuner.Roberts:2017} and the dedicated visualization software (Courtesy of D. Vescovi).} \label{fig: skynet chart 1} \end{figure} \begin{figure}[t!] \centering \includegraphics[width=\linewidth]{chart_000353.png} \vspace{0.5cm}\\ \includegraphics[width=\linewidth]{chart_001399.png} \caption{Same as in Figure \ref{fig: skynet chart 1}, but during the decay phase, just after neutron freeze-out (top panel) and at $10^9{\rm s}$ after merger (bottom panel). These pictures were produced using the SkyNet nuclear network \protect\cite{Lippuner.Roberts:2017} and the dedicated visualization software (Courtesy of D. Vescovi).}\label{fig: skynet chart 2} \end{figure} The evolution of the nuclear abundances and the calculation of the nuclear energy released during the nucleosynthesis is computed by nuclear reaction networks. A nuclear network is a large system of coupled ordinary differential equations. For each nucleus $i\equiv (A_i,Z_i)$, its abundance $Y_i \equiv Y_(A_i,Z_i)$ evolves according to: \begin{equation} \frac{{\rm d}Y_i}{{\rm d}t} = \sum_{j} \mathcal{N}^{i}_{j} \lambda_j Y_j + \sum_{j,k} \mathcal{N}^{i}_{j,k} \frac{\rho}{m_b} \langle \sigma v \rangle_{j,k} Y_j Y_k + \sum_{j,k,l} \mathcal{N}^{i}_{j,k,l} \frac{\rho^2}{m_b^2} \langle \sigma v \rangle_{j,k,l} Y_j Y_k Y_l \, , \label{eq:nuclear network} \end{equation} where the sums run over all possible reactions that include $(A_i,Z_i)$ in the initial or in the final state: the first sum contains decays, photodisintegrations and semi-leptonic processes, as electron, positron or neutrino captures; the second and the third ones include nuclear fusions with two and three reactants, respectively. In this context, a three-body reaction is a sequence of two-body reactions with an intermediate state with an extremely short lifetime. The factors $\mathcal{N}^i_{\dots}$ account for multiplicity effects in the case of identical particles: if $N_m$ represents the number of $m$ nuclei involved in a specific reaction with sign (i.e., $N_m>0$ for creation and $N_m<0$ for destruction), then $\mathcal{N}^{i}_{j} = N_i$, $\mathcal{N}^{i}_{j,k} = N_i/(|N_j|!|N_k|!)$ and $\mathcal{N}^{i}_{j,k,l} = N_i/(|N_j|! |N_k|! |N_l|!)$ (for identical reactants, double counting must be avoided so that $N_j +N_k=2 $ and $N_j +N_k + N_l=3 $ for two- and three-body reactions, respectively. For example, for $\alpha+\alpha+\alpha \rightarrow{}^{12}C$, $N_j=3$ and $N_k=N_l=0$). The calculation of the reaction rates and of the effective decay constants require the knowledge of the evolution of the fluid density and temperature, as well as information about the neutrino irradiation fluxes. In actual computations, the evolution of the matter density is usually prescribed or extracted from hydrodynamics simulations. The subsequent evolution of the temperature and $Y_e$ are then self-consistently determined from the detailed abundances, from the EOS of the plasma, and assuming that the expansion proceeds adiabatically, unless for nuclear energy generation and neutrino leakage or irradiation. We will now describe in more details the most relevant features of the nucleosynthesis happening in a fluid element expanding after a compact binary mergers, according to the outcome of nuclear network calculations. For the bulk of the neutron-rich ejecta, characterized by low specific entropy, we can identify four phases: \begin{itemize} \item the initial NSE phase; \item the $r$-process nucleosynthesis phase; \item the neutron freeze-out phase; \item the decay phase. \end{itemize} The different phases and their properties can be observed in Figures \ref{fig: skynet trajectory}, \ref{fig: skynet chart 1} and \ref{fig: skynet chart 2}. \subsubsection{\textit{The NSE phase}} The NSE phase (top panel of Figure~\ref{fig: skynet chart 1}) lasts as long as the temperature in the plasma stays above $T \approx 4$-$5~{\rm GK}$. It is important to notice that a fluid elements can enter and exit the NSE phase several times before eventually decreasing its temperature below the NSE threshold due to hydrodynamics processes and intense nuclear heating. In this case, only the conditions at the last NSE freeze-out influence the subsequent evolution. During NSE, since $(p,\gamma)$-$(\gamma,p)$ and $(n,\gamma)$-$(\gamma,n)$ reactions are all in equilibrium, the recursive application of the corresponding equilibrium relation among the relativistic chemical potentials, namely $\mu_{(A,Z)} = \mu_p + \mu_{(A-1,Z-1)}$ and $\mu_{(A,Z)} = \mu_n + \mu_{(A-1,Z)}$, yields to $\mu_{(A,Z)} = Z \mu_p + N \mu_n $. For particles described by the Maxwell-Boltzmann statistics, once $\rho$, $T$, and the abundances of free $n$'s and $p$'s ($Y_{n,p}$), are provided, the abundance $Y_{(A,Z)}$ of any nucleus $(A,Z)$ in NSE is given by \cite{Clayton:1983}: \begin{equation} Y_{(A,Z)} = Y_p^Z Y_n^{(A-Z)} \frac{G_{(A,Z)}(T) A^{3/2}}{2^A} \left( \frac{\rho}{m_b} \right)^{A-1} \left( \frac{2 \pi \hbar^2 }{ m_{\rm b} k_{\rm B}T }\right)^{3(A-1)/2} e^{B(A,Z)/{k_{\rm B}T}} \, , \label{eq: NSE abundance} \end{equation} where $B_{(A,Z)}$ is the nucleus binding energy. $Y_{n,p}$ are ultimately set by requiring baryon conservation and charge neutrality, i.e. $ 1 = \sum_{(A,Z)} Y_{(A,Z)} A$ and $Y_e = \sum_{(A,Z)} Y_{(A,Z)} Z$, respectively. Very high densities and not too large temperatures favor large nuclei (as it happens in the crust of cold NSs), while photodestruction in hot environments produces light nuclei and ultimately free protons and neutrons (as in the mantle above proto-neutron stars in core-collapse supernovae (CCSNe) or in the cores of merging NSs). For intermediate regimes, the nuclear binding energy favors the most tightly bound nuclei, i.e. iron group nuclei or $\alpha$ particles among the light nuclei, and the temperature regulates the width of the distribution. For a given plasma configuration (i.e., for a given set of $\rho$, $T$ and $Y_e$) the NSE condition determines the nuclear abundances according to Eq.~(\ref{eq: NSE abundance}) without the need of solving Eqs.~(\ref{eq:nuclear network}). However, the abundances change as a function of time due to the temporal evolution of the expanding and cooling plasma, $\rho = \rho(t)$ and $T = T(t)$. Moreover, weak interactions are out of equilibrium and Eq.~(\ref{eq:nuclear network}) and the charge neutrality conditions reduce to an equation for $Y_e$: \begin{equation} \frac{{\rm d}Y_e}{{\rm d}t} = \sum_{i} \left( \lambda_{e^+,i} - \lambda_{e^-,i} + \lambda_{\nu_e,i} - \lambda_{\bar{\nu}_e,i} + \lambda_{\beta^{-},i} - \lambda_{\beta^{+},i} \right) Y_{i} \, , \end{equation} where the sum runs over all nuclei and the rates span all possible (if any) semi-leptonic reactions involving each nucleus $i$. As visible in the top panel of Figure~\ref{fig: skynet chart 1}, at NSE freeze-out the composition of the expanding plasma is characterized by a distribution of seed nuclei, peaking around the iron group, $\alpha$ particles and free neutrons. Depending mainly on the initial $Y_e \lesssim 0.4$, the seed nuclei are possibly very or extremely neutron-rich, with $A \sim 60-100$. A high fraction of free neutron is also expected. If the fluid is radiation dominated, its specific entropy can be approximated by the entropy of the photon gas, see Eq.~(\ref{eq: density photon-dominated gas}). It is very insightful to substitute this expression inside the expression of the abundances in NSE conditions, Eq. (\ref{eq: NSE abundance}), to express it also in terms of the entropy: \begin{equation} Y_{(A,Z)} \propto Y_p^Z Y_n^{(A-Z)} \frac{A^{3/2}}{2^A~s^{A-1}} \left( \frac{ k_{\rm B}T }{m_{\rm b} c^2}\right)^{3(A-1)/2} e^{B(A,Z)/{k_{\rm B}T}} \, . \label{eq: approximated NSE abundance} \end{equation} Since $Y_{(A,Z)} \propto s^{-(A-1)}$, we recover the result that in the case of matter with high specific entropy an $\alpha$-rich freeze-out is obtained. \subsubsection{\textit{The $r$-process nucleosynthesis phase}} Once $T \lesssim 4~{\rm GK}$, the first reactions that run out of equilibrium are charged nuclear reactions involving the less abundant nuclei. Under the assumption that neutron captures, photodestructions and $\beta^-$ decays (possibly emitting $j$ delayed neutrons, with $j=0$ being the classical $\beta^{-}$ decay) are the most relevant reactions, Eq.(\ref{eq:nuclear network}) becomes: \begin{eqnarray} \frac{{\rm d} Y_{(A,Z)}}{{\rm d} t} & \approx & n_n \langle \sigma v \rangle_{(A-1,Z)(n,\gamma)(A,Z)} Y_{(A-1,Z)} + \lambda_{(A+1,Z)(\gamma,n)(A,Z)} Y_{(A+1,Z)} + \nonumber \\ & & - \left[ n_n \langle \sigma v \rangle_{(A,Z)(n,\gamma)(A+1,Z)} + \lambda_{(A,Z)(\gamma,n)(A-1,Z)} \right] Y_{(A,Z)} + \nonumber \\ & & + \sum_{j=0}^{J} \lambda_{(A+j,Z-1)\rightarrow (A,Z)+e^- + \bar{\nu}_e + j~n}~Y_{(A+j,Z-1)} + \nonumber \\ & & - \sum_{j=0}^{J} \lambda_{(A,Z)\rightarrow (A-j,Z+1)+e^- + \bar{\nu}_e + j~n}~Y_{(A,Z)} \, . \label{eq:simplified network} \end{eqnarray} In the first line, we have considered the creation of $(A,Z)$ nuclei through $(n,\gamma)$ reactions on $(A-1,Z)$ nuclei and $(\gamma,n)$ reactions on $(A+1,Z)$ nuclei. In the second line, we have considered the destruction of $(A,Z)$ nuclei through $(n,\gamma)$ and $(\gamma,n)$ reactions. In the third and forth lines, we have taken into account $\beta^-$ decays that can include a $(A,Z)$ nucleus in the final or initial state, respectively, possibly through the additional delayed emission of $0 < j \leq J$ neutrons. As we have seen in the previous section, if the temperature and density are large enough, the timescale of $\beta^-$ decays are much longer than the timescales of $(n,\gamma)$ and $(\gamma,n)$ reactions. The latter absorption processes connect nuclei among the same isotopic chain ($Z$ is fixed) and their equilibrium ensures an almost steady free neutron fraction, while the former decays connect nuclei of contiguous isotopic chains ($Z-1$ and $Z$, and $Z$ to $Z+1$). Then, the evolution predicted by Eq.~(\ref{eq:simplified network}) can be split into two separate problems: the much faster $(n,\gamma)$-$(n,\gamma)$ equilibrium inside each isotopic chain; the slower flow through different isotopic chains driven by $\beta^-$ decays. In the following we will closely analyse each of the two problems separately. We start by consider an isotopic chain characterized by a specific $Z$. The equilibrium condition inside the chain (i.e. $\mu_{(A+1,Z)} = \mu_{(A,Z)} + \mu_{n}$) allows to write an equation for the abundances of two adjacent nuclei in the chain, starting from Eq.(\ref{eq: chain abundaces}) and simply noticing that $Y_{(A+1,Z)}/Y_{(A,Z)} = n_{(A+1,Z)}/n_{(A,Z)}$. Evaluated the resulting expression for typical magnitudes, we obtain: \begin{equation} \frac{Y_{(A+1,Z)}}{Y_{(A,Z)}} \approx 5.71 \times 10^3 \left( \frac{n_n}{8 \times 10^{24} {\rm cm^{-3}}} \right) \left( \frac{k_B T}{0.1 {\rm MeV}} \right)^{-3/2} \left( \frac{\exp{\left( S_n/k_{\rm B} T \right) }}{\exp{(30)}} \right) \, . \label{eq: abundance in ng-gn equilibrium} \end{equation} We notice that the abundance ratio depends only on $n_n$, $T$ and on $S_n$. The latter introduces a dependence on the nuclear masses. Also in this case, the numerical value of this ratio is dominated by the exponential factor whose argument compares the neutron separation energy with the plasma temperature. Close to the valley of stability $S_n \approx 15{\rm MeV} \gg k_{\rm B} T$ and $Y_{(A+1,Z)} \gg Y_{(A,Z)}$, i.e. abundances increase steeply moving toward neutron richer nuclei. Assuming $k_{\rm B}T = 0.1 ~{\rm MeV}$ and $S_n = 3 {\rm MeV}$, the above estimate still implies $Y_{(A+1,Z)} \gg Y_{(A,Z)}$. For $S_n = 2 {\rm MeV}$, the numerical prefactor decreases to 0.26, meaning that $Y_{(A+1,Z)} < Y_{(A,Z)}$. Since $S_n \rightarrow 0$ at the neutron drip line, there exists always a turning point in the isotopic chain, where $Y_{(A+1,Z)}$ stops to increase with respect to $Y_{(A,Z)}$ before decreasing when approaching the neutron drip line. We estimate this point by requiring $Y_{(A+1,Z)}/Y_{(A,Z)}=1$. Assuming a certain $n_n$ and temperature $T$, this condition translates in a reference neutron separation energy $S_{n}^0$: \begin{eqnarray} S_{n}^0 & = & k_{\rm B} T \ln{\left( \frac{2}{n_n} \left( \frac{m_{\rm B} k_{\rm B}T}{2 \pi \hbar^2} \right)^{3/2} \right) } \approx 2.14~{\rm MeV} \left( \frac{k_{\rm B}T}{0.1~{\rm MeV}}\right) \times \nonumber \\ & & \left[ 1 - 0.047~\ln \left( \frac{n_n}{8 \times 10^{24} {\rm cm^{-3}}}\right) + 0.070~\ln \left( \frac{k_{\rm B}T}{0.1{\rm MeV}} \right) \right] \, . \label{eq: S_n^0} \end{eqnarray} The value of $S_{n}^0$ depends on $n_n$ and $T$, but not on $Z$. So, at any given time, all populated isotopic chains have their abundance peaks at nuclei characterized by the same $S_{n}^0$ and the conditions $S_{n}(A,Z) \gtrsim S_{n}^0$ defines the $r$-process path. A better approximation can be done by considering that, due to nuclear paring effect, even neutron numbers are favored. Indeed, while $S_{n}$ decreases for increasing $D$, but with a even-odd modulation, $S_{2n}$ defined as $S_{2n}(A+2,Z) = (m_{A,Z} + 2 m_n - m_{(A+2,Z)})c^2 $ and called the \textit{two neutron separation energy}, decreases in a smoother way, with a sudden decrease at the magic neutron numbers. By considering the effective equilibrium $(A+2,Z) + \gamma \leftrightarrow (A,Z)+2n$ and the corresponding relation on the chemical potentials, $\mu_{(A+2,Z)}= \mu_{(A,Z)} + 2 \mu_n$, the $r$-process path can be defined as the set of nuclei belonging to different isotopic chains for which $S_{2n}(A,Z)$ is closer to $2 S^0_{n}(n_n,T)$ along each specific chain. Since the relative distribution of abundances inside an isotopic chain is set by the fast $(n,\gamma)$-$(\gamma,n)$ equilibrium and determined by Eq.~(\ref{eq: abundance in ng-gn equilibrium}), it is useful to consider the total abundance along the chain, $Y_{Z} \equiv \sum_{A} Y_{(A,Z)}$. Starting from Eq.~(\ref{eq:simplified network}) and considering only $\beta^-$ decays without delayed neutron emission ($J=0$), we obtain an evolution equation for $Y_{Z}$: \begin{equation} \frac{{\rm d} Y_{Z}}{{\rm d} t} \approx \tilde{\lambda}_{\beta,(Z-1)} Y_{Z-1} - \tilde{\lambda}_{\beta,Z} Y_{Z} \end{equation} where $\tilde{\lambda}_{\beta,Z}$'s are the effective, abundance-weighted $\beta$ decay rates of the whole chains: \begin{equation} \tilde{\lambda}_{\beta,Z} \equiv \left( \sum_A \lambda_{\beta,(Z,A)} Y_{(A,Z)} \right) / \left( \sum_A Y_{(A,Z)} \right) \, . \end{equation} Under the assumption that the amount of free neutrons and the temperature are high enough, the duration of the $r$-process becomes comparable or even larger than the $\beta$ decay lifetime (Eq.~\ref{eq: tau_beta estimate}) over the most relevant part of the nuclear chart, and the chain abundances $Y_Z$ tend toward an equilibrium configuration, i.e. ${\rm d} Y_{Z}/{\rm d} t \approx 0 $, which translates into: \begin{equation} \tilde{\lambda}_Z Y_{Z} = \tilde{\lambda}_{Z-1} Y_{Z-1} \approx {\rm const} \, . \end{equation} This condition is knows as \textit{steady $\beta$-flow approximation} \cite{Kratz.etal:1993,Freiburghaus.etal:1999a} and it implies that the abundance of a chain is proportional to its effective $\beta$ decay lifetime. Since the nuclei with magic neutron numbers $N=50,82,126$ (or just above them) and closer to the valley of stability have the longest $\beta$ decay lifetime, it is expected that maxima in the abundances will occur at the top end of the kinks in the $r$-process path corresponding to the neutron shell closures. This is what quantitatively defines the location and the relative importance of the waiting points inside the $r$-process path. The duration of the $r$-process nucleosynthesis phase crucially depends on the availability of free neutrons. Under the assumption that neutron captures and photodestructions are the most relevant reactions, the timescale over which the neutron abundance changes, $\tau_n$, can be evaluated from Eq.\ref{eq:simplified network} as: \begin{equation} \frac{1}{\tau_n} \equiv \frac{1}{Y_n} \left| \frac{{\rm d}Y_n}{{\rm d}t} \right| \approx \frac{1}{Y_n/Y_{\rm seed}} \left( \frac{1}{\tau_{(n,\gamma)}} - \frac{1}{\tau_{(\gamma,n)}} \right) \, . \label{eq: neutron timescale} \end{equation} The relevant timescales $\tau_{(n,\gamma)}$ and $\tau_{(\gamma,n)}$ can be estimated through Eqs~(\ref{eq:tau_n_gamma estimate}) and (\ref{eq: tau_g_n estimate}) as we did in the previous section, but they can also be computed more rigorously from the reaction rates that enter Eq.(\ref{eq:nuclear network}): \begin{eqnarray} \frac{1}{\tau_{(n,\gamma)}} \equiv \left( \sum\limits_{(A,Z)} Y_{A,Z}~n_n~\langle \sigma v \rangle_{(A,Z)(n,\gamma)(A+1,Z)} \right)/ \sum\limits_{(A,Z)} Y_{(A,Z)} \, , \\ \frac{1}{\tau_{(\gamma,n)}} \equiv \left( \sum\limits_{(A,Z)} Y_{A,Z}~\lambda_{(A,Z)(\gamma,n)(A-1,Z)} \right) / \sum\limits_{(A,Z)} Y_{(A,Z)} \, . \label{eq: tau n g network} \end{eqnarray} As long as the neutron-to-seed ratio is large, $\tau_n$ is relatively long and there is enough time for many isotopic chain (with increasing $Z$) to be reached and for the $\beta$-flow equilibrium to establish. Detailed calculation show that, for typical conditions in compact binary merger ejecta, this $r$-process phase can last up to $\sim$1 second after the merger (see for example the bottom panel of Figure~\ref{fig: skynet chart 1}). Eventually, the $r$-process path can reach the neutron magic number $N=184$. Above that, fission becomes the dominant nuclear process. Typical super-heavy, neutron-rich nuclei have $(A,Z) \sim (250,100) $, while daughter nuclei can be approximated by distribution around the double-magic number nucleus $(A_{1,2},Z_{1,2}) \sim (132,50)$. Thanks to fission and depending on the lighter fission fragment distribution, the abundances of heavy elements double and specific region of the nuclear chart start to populate. If the initial neutron richness is high enough (in particular, when the initial $Y_e \lesssim 0.1$) fission becomes relevant while $(n,\gamma)$ and $(\gamma,n)$ reactions are still in equilibrium. The lighter nuclei resulting from the fission still capture many neutrons, reaching again $N=184$ and many fission cycles occur \cite{Korobkin.etal:2012,Mendoza.etal:2015,Lippuner.Roberts:2015}. The possibility of reaching $(n,\gamma)$-$(\gamma,n)$ equilibrium and its duration are critically related with the temperature evolution. For a radiation dominated plasma, if the expansion proceeded adiabatically the temperature would simply evolve as $T(t) \approx T_{\rm hom} (t_{\rm hom}/t)$, with $T_{\rm hom}$ of the order of a few GK. Then, within $\sim$ 0.1 s, the temperature would drop below 1GK. While this relation describes in good approximation the evolution of matter temperature before and after the $r$-process, it is rather inaccurate \textit{during} it. Indeed, during the $r$-process the energy released by nuclear reactions and the matter density are often large enough such that matter is significantly re-heated and temperature becomes again larger than 1 GK for a much longer time (up to $\sim$ 1 s), before dropping again as predicted by the adiabatic expansion law, $T \propto t^{-1}$. To estimate if the specific nuclear heating $\dot{e}_{\rm nucl}$ (nuclear energy per unit mass, per unit time) can affect significantly the matter temperature, we compare the density of energy of the radiation field with the energy released by the nuclear decays during a time comparable to the expansion timescale $\tau$, i.e. $\pi^2 k_{\rm B}^4 T_{\rm max}^4/ 15 (\hbar c)^3 \sim \dot{e}_{\rm nucl} \rho \tau $, and we estimate $\dot{e}_{\rm nucl} \sim S_n Y_n / (m_b \Delta t_{r{\rm -proc}}) $ \cite{Mendoza.etal:2015}. By solving for $T_{\rm max}$, we can estimate the maximum temperature reached by matter due to the nuclear heating. Assuming that around $t \approx 0.1 {\rm s}$ the density has decreased down to $10^5{\rm g~cm^{-3}}$ and the $(n,\gamma)$-$(\gamma,n)$ equilibrium lasts for $\Delta t_{r{\rm -proc}} \sim 1~{\rm s}$: \begin{equation} T_{\rm max} \approx 0.75~{\rm GK} \left( \frac{Y_n~\rho}{0.5 \times 10^5~{\rm g~cm^{-3}}} \right)^{1/4} \left( \frac{S_n}{5~{\rm MeV}} \right)^{1/4} \left( \frac{\tau}{10~{\rm ms}} \right)^{1/4} \left( \frac{\Delta t_{r{\rm -proc}}}{1~{\rm s}} \right)^{-1/4} \, . \label{eq: max temp neutron capture phase} \end{equation} When $T_{\rm max} \gtrsim 0.7~{\rm GK}$ the temperature is large enough to guarantee $(n,\gamma)$-$(\gamma,n)$ equilibrium during most of the neutron captures. This is defined as the \textit{hot r-process}. If, on the other hand, $T_{\rm max} \lesssim 0.3~{\rm GK}$, the density is large enough to sustain the neutron captures, but not $(n,\gamma)$-$(\gamma,n)$ equilibrium. In this latter case, the neutron density decreases much faster due to neutron consumption and this is referred as \textit{cold r-process}. It is important to stress again that the relevant $r$-process regime (hot or cold) does not depend on the absolute peak temperature, but on the maximum temperature during the re-heating phase occurring when seed nuclei capture neutrons. Other factors, as for example the expansion timescale, determined if the $r$-process happens in hot or cold conditions. \subsubsection{\textit{The neutron freeze-out and the decay phases}} As the $r$-process proceeds, and matter expands and cools below $\sim$1GK, $\tau_{(\gamma,n)} \gg \tau_{(n,\gamma)}$ and photodestruction becomes inefficient in keeping a high neutron density outside the heavy nuclei, while the still effective neutron captures and $\beta^-$ decays produce more and more heavy nuclei. Once $Y_n/Y_{\rm seed} \sim 1$, according to Eqs.~(\ref{eq:tau_n_gamma estimate 2}) and (\ref{eq: neutron timescale}), it happens that $\tau_n \sim Y_n/Y_{\rm seed} \tau_{(n,\gamma)} \ll 1 {\rm s}$: the free neutron lifetime suddenly decreases because the seed nuclei start to compete for the few available neutrons. This phase is called \textit{neutron freeze-out} and it is characterized by a sudden drop of the neutron density and of the neutron-to-seed ratio, as visible both and in Figure~\ref{fig: skynet trajectory} and in the the top panel of Figure~\ref{fig: skynet chart 2}. After this drop, the $\beta^-$ decays (often followed by the emission of free neutrons) start to compete with the neutron capture, since $\tau_{(n,\gamma)}$ becomes comparable to $\tau_{\beta}$. The latter can be estimated as Eq.(\ref{eq: tau_beta estimate}), but also as: \begin{equation} \frac{1}{\tau_{\beta}} \equiv \left( \sum\limits_{(A,Z),~A > 4} \sum\limits_{j=1,J} Y_{(A,Z)} \lambda_{(A,Z) \rightarrow (A-j,Z+1)+e^{-} + \bar{\nu}_e + jn} \right) / \left( \sum\limits_{(A,Z),~A > 4} Y_{(A,Z)} \right) \, . \label{eq: tau beta network} \end{equation} The presence of freshly emitted free neutrons provides a new source of neutrons available to be captured also at later time. The result is that, while the nuclei that were located along the $r$-process path during the $(n,\gamma)$-$(\gamma,n)$ equilibrium decay collectively toward the valley of stability, the competition between the neutron captures and the $\beta$ decays smooths the $r$-process abundances. In particular, it removes the strong oscillations in the mass number that characterize the abundances just before neutron freeze-out, due pairing and collective effects in the nuclear properties. After a timescale ranging from a few up to a few tens of seconds (depending on the environment and increasing for decreasing initial $Y_e$) the neutron density has decreased such that also the neutron captures become negligible. Most of the matter is still in the form of unstable nuclei, with neutron excess $D \sim 5$-$10$. At this stage $\beta^{-}$ decays and, depending on how extended the $r$-process path is, $\alpha$ decays are the most relevant nuclear processes that bring the abundances toward the valley of stability. While most of the nuclei have reached stable configurations within a few tens of days, a few heavy isotopes have longer half-lives, extending above $10^7$ yrs for 14 isotopes and above $10^9$ yrs for 7 isotopes. Since all these reactions liberate nuclear energy, they can heat up matter or become a distinct source of radiation. The detection of the various, distinct signals is thus a clear indication of the $r$-process nucleosynthesis occurring inside the ejecta. \subsubsection{\textit{The $r$-process peaks and the s-process nucleosynthesis}} During the $(n,\gamma)$-$(\gamma,n)$ equilibrium the $r$-process path is characterized by the presence of waiting points, where matter accumulates due to the longer lifetimes occurring in correspondence of the neutron magic numbers $N=50,82,126$. Waiting points are identified by neutron close shells, but they can span a large range of $Z$'s and they can also be influenced by the presence of the proton magic numbers $Z=28,50$ (see the bottom panel of Figure~\ref{fig: skynet chart 1}). Since at neutron freeze out nuclei are still very neutron-rich (typically $Z/A \sim 0.5$), these waiting point nuclei are characterized by $A \sim 80,130,195$. When decaying back to stability, nuclear abundances proceed along $A \approx {\rm const}$ paths, i.e. they keep their mass number approximately constant while increasing their $Z$. However, the residual delayed neutron emissions and neutron captures can further change $A$ by a few units during the process. Due to the decreasing neutron density, the effect due to $\beta$ decays eventually takes over. The result is that the final abundance pattern is characterized by three peaks (known as the \textit{r-process peaks}): the first peak is located around $A \approx 80$ and covers the range $ A \approx 72-94$, the second around $A \approx 130$ with range $A \approx 111-145$, and the third around $A \approx 195 $ with range $A \approx 188-206$. Due to the $\beta$ decays, the nuclei neutron content has globally decreased, the $Y_e$ has increased toward $\lesssim 0.4$. As a function of $Z$, the peaks are located around $Z \approx 35$ (e.g. Selenium, Bromine, Krypton) for the first peak, $Z \approx 53$ (e.g. Tellurium, Iodine, Xenon) for the second peak, and $Z \approx 77 $ (e.g. Osmium, Iridium, Platinum) for the third peak. Thus, due to the combination of multiple neutron captures followed by many $\beta$ decays, the final peaks are shifted toward the left by several units with respect to the nuclei characterized by magic neutron numbers along the valley of stability. However, when considering the element above Zn, the abundances that we observe inside the solar system reveal, close to the $r$-process peaks, other peaks shifted toward the right by a few units in the mass number and happening precisely in correspondence of the magic neutron numbers. Then, differently from what happens in the $r$-process, the production of these peaks must make place close to the valley of stability, in such a way that a neutron capture on a stable or long-lived nucleus is followed by a $\beta$ decay before another neutron can be captured, meaning that $t_{(n,\gamma)} \gg t_{\beta}$. This is possible if the neutron densities are in the range $10^{6-11}{\rm cm^{-3}}$, so several orders of magnitudes lower than the ones required by the $r$-process. This kind of nucleosynthesis is called slow neutron capture process ($s$-process) and it is thought to happen inside low and intermediate mass stars (starting their life with a mass between 0.6 and 10 \msun) during their asymptotic giant branch (AGB) phase. Starting from iron group nuclei produced in a previous SN explosion and already present inside the star, the $s$-process proceeds through the $s$-process path up to lead on a timescale of several thousands of years. The abundances of the $s$-process nucleosynthesis are well understood since they rely on the well-known properties of nuclei at or very close to the valley of stability. Thus, the solar $r$-process abundances are defined as the residual of the solar abundances, once the $s$-process contribution has been removed, see e.g. \cite{Prantzos.etal:2020}. Most of the heavy elements receive a contribution from both the $s$- and the $r$-process. It is important here to stress that information about the isotopic composition is in general harder to obtain, while astrophysical observations often provide information on the elemental composition. So, an element usually receives contributions from different isotopes and these isotopes can be synthesised in different environments. Nevertheless the structure of the valley of stability is such that some stable isotopes can only be produced in the $s$-process or in the $r$-process. In the first case, this happens when a stable isotopes is shielded by another stable isotopes along a $\beta$ decay line. In the second case, this happens when a stable nucleus can be reached by a neutron capture and a subsequent $\beta$ decay sequence only from a nucleus that has a very short lifetime or that is outside the $s$-process path. When this happens for all or for the most relevant isotopes of an element, this element is called $s$-only or $r$-only element, respectively. A $r$-only isotope has the advantage of allowing the study the contribution of the $r$-process independently from possible contamination from the $s$-process. Europium and elements above lead (including Uranium, Thorium and Plutonium) are among the $r$-only elements. \subsubsection{\textit{Nucleosynthesis in high entropy and fast expanding ejecta}} Not all the ejecta are characterized by low or moderate entropy, or by expansion timescales ranging from a few ms up to several tens of ms. In particular, detailed merger models show the presence of high entropy and/or extremely fast expanding tails in the ejecta distribution. Moreover, it is not always guaranteed that the peak temperature will be above 4GK or that the temperature will be high enough during the $r$-process phase to ensure $(n,\gamma)$-$(\gamma,n)$ equilibrium. The nucleosynthesis in these conditions can be significantly different than the one described above. For example, if the expansion timescale $\tau$ becomes of the order of (or even smaller than) 1 ms, the re-heating during the $r$-process phase could become inefficient and $(n,\gamma)$-$(\gamma,n)$ equilibrium cannot establish, see Eq.(\ref{eq: max temp neutron capture phase}). In this case, a cold $r$-process happens. Moreover, despite the possible large abundance of free neutrons and the availability of seed nuclei, the decrease in the neutron density is so fast that neutron captures become inefficient too early and the $r$-process does not proceed much. A large fraction of the free neutrons are not captured by nuclei and decay into protons. The resulting abundances are very different from the one observed in a full $r$-process. According to Eq.(\ref{eq: expansion timescale VS velocity}), for the dynamical ejecta emerging from BNS mergers, this is the case for matter expanding at $v\sim 0.6-0.8 c$. Such ejecta are observed in some models in the high speed tail, especially if the EOS of nuclear matter is rather soft and the shocks produced by the NS collision are very violent. Finally, if the specific entropy is large enough ($s \gtrsim 80~k_{\rm B}{\rm baryon^{-1}}$), the NSE ends with a $\alpha$-rich freeze-out (see e.g. \cite{Just.etal:2015} and reference therein). If, additionally, $Y_e \lesssim 0.4$, there is a significant abundance of free neutrons that are not bound inside the very abundant $\alpha$ particles and inside the fewer seed nuclei. Thus, in these conditions the neutron-to-seed ratio is still very high and the $r$-process nucleosynthesis can still occur to produce heavy $r$-process nuclei. The fundamental different is that the final abundances are overall dominated by the $\alpha$ particles emerging from the NSE freeze-out, see e.g. \cite{Qian.Woosley:1996,Hoffman.etal:1997}. \subsection{\textit{Nuclear physics input and detailed network calculations}} Equilibrium argument are very useful to get a qualitative understanding of the main features of the $r$-process nucleosynthesis. However, only the numerical solution of Eqs.(\ref{eq:nuclear network}) provides detailed nucleosynthesis yields. In nuclear network calculations abundances are typically initialized in NSE conditions at high temperatures ($T \sim 6-8{\rm GK}$) and then evolved consistently following the chemical evolution of the ejecta during their expansion. For $r$-process nucleosynthesis calculations more than 7000 nuclei are necessary, ranging from free neutrons and protons up to very neutron-rich transuranic elements (e.g. Curium), and covering the whole neutron-rich side of the valley of stability. The reaction rates needed by the network require a vast amount of nuclear physics knowledge. In the following, we briefly discuss the most relevant inputs, namely the nuclear masses, the $\beta$-decay half lives, the neutron captures rates and the fission physics. For more detailed information we address the reader to Ref~\cite{Cowan.etal:2019}. \textbf{Nuclear masses.} The most basic nuclear property are the masses of all nuclei, since they determines the threshold energies for all relevant reactions and, in particular, the neutron separation energies. While the masses of stable nuclei and of nuclei close to the valley of stability are experimentally well known, only theoretical values predicted by nuclear mass models are available for exotic neutron-rich nuclei. Nuclear mass models are tuned on experimentally known masses and then extrapolated, so that the uncertainties grow moving toward the neutron drip line and just above the shell closure points, where correlations and deformation may be very relevant, but difficult to be taken into account. \textbf{Beta decay rates.} Also the values of $\beta$ decay half-lives are experimentally unknown far from the valley of stability and theoretical calculations are necessary. Their values are crucial, since they determine the matter flow between different isotopic chains. In particular, the most relevant decay rates are those of nuclei at the neutron magic numbers, since they are the waiting points of the $r$-process path. The calculation of these decay rates dependes on the reaction $Q$-value (and thus on the mass model), on the transition strength and, in particular, on its energy distribution. If the transition leads to a final state whose energy is above the neutron separation energy, the emission of one or more neutrons in the final state ($\beta$-delayed neutron emission) is possible. This emission is relevant after the neutron freeze-out phase. Also in this case, shell effects and nucleon correlations are possibly very relevant but difficult to model. \textbf{Neutron capture rates.} While neutron captures are essential to establish $(n,\gamma)$-$(\gamma,n)$ equilibrium, the corresponding QSE condition makes the detailed knowledge of their rates not very relevant in modeling the $r$-process. It is after neutron freeze-out, when the temperature drops below 1 GK and the photodisintegration becomes less and less relevant, that a detailed knowledge of the relevant neutron capture rates becomes more important. At this stage, nuclei are still very exotic and theoretical calculations are once again necessary. They are usually computed within the statistical model of nuclei, which is done using the Hauser-Feshbach approach and modeling the nuclear energy density, the $\gamma$-strength function for the decay of the compound nucleus, and the potentials of several light particles. \textbf{Nuclear fission.} The fission properties of super-heavy nuclei ($A \lesssim 280$) are very relevant in calculations involving very neutron-rich matter (at least for initial $Y_e \lesssim 0.10$), but they are very uncertain. The theoretical description of fission is highly non-trivial, and it mainly depends on the fission barriers, defined as the energy required for a nucleus to undergo fission. This energy is necessary to deform the nucleus such that the transition to the fission fragments states becomes energetically favored. If the transition to the final state does not require any additional energy, the fission is spontaneous. If additional energy is provided by the interaction or the absorption of another particle, then the fission is induced. All possible fission channels (e.g., spontaneous, neutron-induced, $\gamma$-induced) and all the other competing reactions (e.g. $\alpha$ and $\beta$ decays) need to be included in the model to provide reliable predictions. In the case of a very neutron-rich environment, as the one typically expected in the ejecta of compact binary mergers, neutron-induced fission is usually the most relevant channel. The very uncertain fission fragment distributions are also very important as they influence the abundances around $A \lesssim 140$. {~}\\ While the basic features of the $r$-process nucleosynthesis in the ejecta of compact binary mergers are robust and, especially for low entropy ejecta, mainly influenced by the initial $Y_e$, the nuclear input physics can significantly change the fine structure of the abundance pattern. For example, the $\beta$ decay half-lives of nuclei with $Z \gtrsim 80$ regulate the mass flow toward the magic neutron number $N=126$ (possibly enhancing the amount of nuclei that go though fission cycles) and possibly affect the position of the third $r$-process peak \cite{Eichler.etal:2015,Mendoza.etal:2015}. Moreover, since fission fragments are located around $A \lesssim140$, fission physics can influence the width of the second $r$-process peak, as well as the abundances of the rear-earth elements, between Lanthanium and Lutetium \cite{Goriely.etal:2013}. \subsection{\textit{Detailed network calculations and nucleosynthesis yields from compact binary mergers}} \begin{figure}[t!] \centering \includegraphics[width=0.49\linewidth]{ye_varia.pdf} \includegraphics[width=0.49\linewidth]{ye_varia_z.pdf} \caption{Abundances as a function of the mass number ($A$, left panel) and of the atomic number ($Z$, right panel) at 10$^9$ seconds after merger for trajectories characterized by $s \approx 11k_{\rm B}{\rm baryon^{-1}}$ and $\tau \approx 11~{\rm ms}$, but for different initial $Y_e$'s, computed using the SkyNet nuclear network \protect\cite{Lippuner.Roberts:2017}. Black dots represent the Solar $r$-process residual, as reported by \protect\cite{Prantzos.etal:2020} (Courtesy of D. Vescovi).} \label{fig: skynet ye abundances A} \end{figure} Once all the relevant nuclear input physics has been considered, nuclear network calculations can predict with accuracy the distribution of the yields synthesised by a specific fluid elements. Nuclear network calculations for fluid elements expanding adiabatically show that the nucleosynthesis outcome depends mainly on the three parameters that we have used to described the properties of the ejecta at the onset of the homologous expansion phase, namely the electron fraction, the specific entropy and the expansion timescale (see, e.g., \cite{Lippuner.Roberts:2015} for a systematic study). As representative cases for the abundances obtained at $\sim 30{\rm y}$ after merger, in Figures~(\ref{fig: skynet ye abundances A}) we present the abundance patterns obtained by detailed nuclear network calculations. All trajectories have the same specific entropy and expansion timescales ($s\approx 11k_{\rm B}{\rm baryon^{-1}}$ and $\tau \approx 11~{\rm ms}$), but differ because of their initial electron fraction. In all cases, we compare the calculation outcome with the solar $r$-process residual. For $Y_e \lesssim 0.2$ all elements between the second and the third $r$-process peaks are synthesized with a pattern that well reproduces the solar one. Here the observed differences in the shape of the rare-earth peak could be mostly ascribed to the nuclear physics input. This nucleosynthesis outcome is often referred as the "strong $r$-process". For very low electron fractions ($Y_e \lesssim 10$) the nucleosynthesis proceeds up to Ur and Th, and the abundance pattern is very robust, due to the extremely long $r$-process path and to the effect of several fission cycles, while for $0.1 \lesssim Y_e \lesssim 0.2$ the production of actinides decreases. Around $Y_{e,{\rm crit}} \approx 0.23-0.24$, the neutron-to-seed ratio at NSE freeze out is only of a few, the production of nuclei above the second $r$-process peak is inhibited, and the abundances move toward the first $r$-process peak for increasing $Y_e$. This nucleosynthesis outcome is sometimes called "weak $r$-process". \subsubsection{\textit{Nucleosynthesis yields from compact binary mergers}} Detailed abundances in the ejecta from compact binary mergers reflect the ranges and the relative relevance of the distributions of entropy, expansion timescale and electron fraction that emerge from the merger dynamics. Different abundance patterns characterize the different ejection channels and keep an imprint of the merger nature, dynamics and aftermath. \begin{figure}[t!] \centering \includegraphics[width=0.49 \linewidth]{ejecta_dependency_nu_yields.pdf} \includegraphics[width=0.49 \linewidth]{ejecta_dependency_q_yields.pdf} \caption{Mass integrated abundances in the dynamical ejecta obtained by simulations of BNS merger models. In the left panel, the different curves represent different neutrino treatment,with the blue curve not including neutrino irradiation, while the other two including it. In the right panel, neutrino irradiation is always accounted for, but the different curves show the difference between an equal (blue) and an unequal (yellow) mass mergers. Figures taken from \protect\cite{Radice.etal:2018}.} \label{fig: dynamical ejecta abundances} \end{figure} \begin{figure}[t!] \centering \includegraphics[width=0.49 \linewidth]{BHNS_A.pdf} \includegraphics[width=0.49 \linewidth]{BHNS_nu.pdf} \caption{Mass integrated yields in the dynamical ejecta obtained by simulations of BHNS merger. In the left panel, mass fractions are presented for different combinations of NS and BH masses. In the right panel, the different curves represent abundances obtained for different intensities of the neutrino luminosities. Figures taken from \protect\cite{Just.etal:2015} (left panel) and \protect\cite{Roberts.etal:2017} (right panel).} \label{fig: dynamical BHNS ejecta abundances} \end{figure} \textbf{Dynamical ejecta}. The low-entropy, equatorial dynamical ejecta have $Y_e \lesssim 0.2$ and produce robustly all elements between the second and the third $r$-process peak. In addition, if $Y_e \lesssim 0.1$, significant abundances of translead nuclei and actanides are produced in relative abundances that can be comparable or even larger than the solar ones. This is the case especially for BHNS mergers and BNS mergers characterized by very different NS masses. In the case of BNS mergers of comparable NS masses, at polar latitudes the entropy increases but stays on average below 20 $k_{\rm B} {\rm baryon^{-1}}$, while $Y_e \gtrsim 0.25$ and the production of heavy $r$-process elements is suppressed. In this case, the $r$-process nucleosynthesis does not proceed up to very high mass numbers, but produces elements from the first up to the beginning of the second peak. The relative importance of the two contributions (polar and equatorial) to the dynamical ejecta depends on the binary mass ratio and on the properties of the nuclear EOS. However, the equatorial component is expected to be always present and overall dominant. Representative results for mass integrated abundances in the dynamical ejecta of BNS and BHNS simulations are presented in Figures~\ref{fig: dynamical ejecta abundances} and \ref{fig: dynamical BHNS ejecta abundances} and they show that the dynamical ejecta can produce a significant fraction of all $r$-process nuclei from the first to the third peaks, see e.g.~\cite{Wetal:2014,Radice.etal:2018}. \textbf{Disk wind ejecta from BH-torus systems}. For a BHNS merger or for a BNS merger whose the central remnant collapses to a BH within a few dynamical timescales, the ejecta from disk winds are dominated by the viscous component, have low entropy and cover a broad range of electron fractions across the critical value $Y_{e,{\rm crit}} \approx 0.23-0.25 $. In these conditions, the production of all heavy elements between the first and the third $r$-process peak is expected (see e.g. \cite{Just.etal:2015,Wu.etal:2016}). Due to the smaller effect of neutrino irradiation, the synthesis of elements between the second and the third $r$-process peaks is significant while the production of the first peak elements is below the solar ratio. The angular distribution of the abundances is in this case rather insensitive to the latitude: high-$Y_e$ matter at polar latitude possibly synthesize only elements below the second $r$-process peak, but this $\nu$-driven component is very subdominant for BH-torus systems, due to the lower neutrino luminosities. Nucleosynthesis results for the viscous ejecta from BH-torii systems are presented in the left panel of Figure~\ref{fig: disk-wind ejecta abundances}. \begin{figure} \centering \includegraphics[width=0.54\linewidth]{BH_disk_Wu.pdf} \includegraphics[width=0.45\linewidth]{HMNS_final_abund.pdf} \caption{Mass integrated nucleosynthesis results (as a function of the mass number $A$) for the disk-wind ejecta obtained in the case of a BH-disk systems (left panel) and of a massive NS remnant (right panel, with different colors corresponding to different NS lifetimes). Figures taken from \protect\cite{Wu.etal:2016} (left panel) and \protect\cite{Lippuner.etal:2017} (right panel).} \label{fig: disk-wind ejecta abundances} \end{figure} \textbf{Disk wind ejecta from systems hosting a massive NS}. If the massive NS resulting from the merger of two NSs is not a short-lived one, a larger variability is expected, reflecting the presence of several components in the disk winds and the impact of neutrino irradiation \cite{Lippuner.etal:2017}. If the remnant survives for a timescale comparable to the disk lifetime ($t_{\rm acc}$, see Eq.(\ref{eq: disk timescale})), neutrino irradiation progressively shift the $Y_e$ distribution of the viscous ejecta toward larger values $\gtrsim Y_{e,{\rm crit}}$, compared to the BH-torus system. While the production of both light and heavy $r$-process elements is forseen, the relative importance of the former with respect to the latter increases as a function of the remnant lifetime. The presence of a very long-lived massive NS (collapsing on a timescale $\gg t_{\rm acc}$) could possibly prevent the formation of the second peak and of all the elements above it in the bulk of the ejecta, producing a significant amount of light $r$-process elements. The presence of a massive NS causes also disk wind ejecta emerging from distinct portions of the solid angle to be characterized by different nucleosynthesis patterns. As in the case of the dynamical ejecta, matter expelled at high (polar) latitudes is more efficiently irradiated by neutrinos and for it the production of heavy $r$-process elements at and beyond the second $r$-process peak becomes soon inefficient, while elements characterized by $75 \lesssim A \lesssim 120$ and $33 \lesssim Z \lesssim 55$ are eventually produced in solar proportions even for ejecta expelled within the first few tens of milliseconds \cite{Perego.etal:2014,Martin.etal:2015}. Nucleosynthesis yields obtained for the neutrino- and the viscosity-driven ejecta from merger remnant hosting a massive NS in the center are presented in the right panel of Figure~\ref{fig: disk-wind ejecta abundances}.\\ \textbf{High entropy, high velocity tails.} In the case of shock-heated ejecta and ejecta expelled from strong magnetic fields in torii around BHs, a high entropy tail is observed in the ejecta distribution. In the first case, the ejecta also expand with a high velocity, such that $\tau \lesssim 2{\rm ms}$. In this case, assuming $Y_e \lesssim 0.4$ (but often $Y_e < 0.3$) the $r$-process nucleosynthesis proceeds in $\alpha$-rich freeze-out conditions and it synthesises a significant fraction of nuclei up to lantanides ($Y_e \lesssim 0.4 $) or even actinides ($Y_e \lesssim 0.2 $). Differently from the low entropy, neutron rich ejecta, these matter present also a significant amount of H and He in the final composition. \section{\textit{Observables of compact binary merger nucleosynthesis}} Binary compact mergers have long been thought as promising astrophysical sites for $r$-process nucleosynthesis. While the expected conditions of the ejecta and the outcome of detailed numerical models indicate that the production of heavy $r$-process elements above the iron group is robust, observational evidences are crucial to validate our models and to discriminate between the many theoretical uncertainties that still affect our theoretical understanding. In the following we will discuss two major observables and their relation with the outcome of $r$-process nucleosynthesis in compact binary mergers: the electromagnetic transient called kilonova and the evolution of the chemical abundances of $r$-process elements in the stars of our Galaxy and in its satellites. \subsection{\textit{Electromagnetic signatures of $r$-process nucleosynthesis in compact binary mergers}} \subsubsection{\textit{What is a kilonova?}} Starting from a few seconds and continuing for several hundreds of days after merger, a large amount of nuclear energy is released by the combination of $\beta$ decays, $\alpha$ decays and fission processes that follow the $r$-process nucleosynthesis in the ejecta of a compact binary merger. This energy heats up the expanding matter and produces a nuclear powered transient called kilonova \cite{Li.Paczynski:1998}. Depending on the ejecta properties, a kilonova is expected to have its peak luminosity between a few hours and several days after merger in the UV/optical/near-IR frequences, with a fast declining luminosity. For a detailed treatment of this transient we refer to the dedicated Chapter and to recent reviews, e.g. \cite{Fernandez.Metzger:2016,Metzger:2019,Cowan.etal:2019}. The nuclear energy associated with each decay is distributed among the daughter nuclei and the other particles in the final state (electrons, photons and neutrinos), in a way that primarily depends on the nature of the decay. Typical $Q$-values are of the order of 1-100 MeV, much larger than the decreasing matter temperature in the expanding ejecta. Indeed, if the temperature at the end of the $r$-process nucleosynthesis ($t_{r-{\rm proc}} \sim 1~{\rm s}$) is $k_{\rm B} T_{r-{\rm proc}} \sim 0.1 {\rm MeV}$, then: \begin{equation} k_{\rm B}T(t) \sim k_{\rm B}T_{r-{\rm proc}} \left( \frac{t}{t_{r-{\rm proc}}} \right)^{-1} \approx 1.16~{\rm eV} \left( \frac{k_{\rm B}T_{r-{\rm proc}}}{0.1~{\rm MeV}} \right) \left( \frac{t_{r-{\rm proc}}}{1~{\rm s}} \right) \left( \frac{t}{1~{\rm d}} \right)^{-1} \, . \label{eq:kilonova temperature} \end{equation} While the energy emitted in neutrinos is always lost, several processes can thermalize at least a fraction of the released nuclear energy, making it available for the kilonova. The intensity of the nuclear heat and the efficiency of the thermalization processes are maximal immediately after the $r$-process nucleosynthesis. However matter is initially very opaque to photons and the timescale for photon diffusion is much larger than the dynamical timescale over which the ejecta expand. The photon optical depth depends on the matter density profile and on the photon opacity. It is thus necessary to wait for the density to drop such that thermal photons can efficiently diffuse and be emitted at the photosphere. \subsubsection{\textit{$r$-process nucleosynthesis and kilonovae}} If this is the mechanism behind kilonovae, $r$-process nucleosynthesis can influence these transients mainly through three aspects: the nuclear heating, the thermalization efficiency and the photon opacity. In the following we will analyze the main features of each of them. \textbf{Nuclear heating}. On the kilonova timescale nuclear abundances in the ejecta change in time according to a set of decays and fission reactions. Each reaction is characterized by an exponential behavior, $N_i(t) = N_{i,0}\exp(-\lambda_i t)$ where $N_{i}(t)$ is the number of parent nuclei at time $t$ and $\lambda_i$ the reaction rate. The specific nuclear heating rate as a function of time can be computed as: \begin{equation} \dot{e}_{\rm nucl}(t) = \frac{\sum_{i} Q_i \lambda_i N_i(t)}{m_{\rm ej}} \approx \dot{e}_{e^{-}}(t) + \dot{e}_{\nu}(t) + \dot{e}_{\alpha}(t) + \dot{e}_{\gamma}(t) + \dot{e}_{\rm fission}(t) \, , \label{eq:general heating rate} \end{equation} where $Q_i$ is the $Q$-value of each reaction $i$ and $m_{\rm ej}$ is the ejecta mass. In the last step we have explicitly indicated the decay particles whose kinetic energy provide the available nuclear energy, neglecting the kinetic energy of the daughter nuclei in the case of $\alpha$ and $\beta$ decays. Detailed network calculations (e.g., \cite{Metzger.etal:2010,Korobkin.etal:2012,Lippuner.Roberts:2015}) show that the dominant contribution to $\dot{e}_{\rm nucl}$ can be approximately described by a power-law dependence in time, with possible corrections in the form of exponential terms: \begin{equation} \dot{e}_{\rm nucl}(t) \approx \dot{e}_{\rm nucl,0}~(t/t_0)^{-\alpha} + \sum_{i=1}^{N} \beta_i \exp(-\gamma_i~t) \, . \label{eq:heating parametrization} \end{equation} with $t_0$ being a reference timescale. The precise values of $\dot{e}_{\rm nucl,0}$, $\alpha$, $\beta_i$ and $\gamma_i$ depend on the initial ejecta properties, i.e. on $(Y_e,s,\tau)$ of the specific trajectory, and on the nuclear input physics. For low entropy ejecta, $Y_e$ is the dominant parameter. For $Y_e \lesssim 0.25$, $\alpha \approx 1.3$ with a possible variation interval $1.1-1.4$, while different mass models give $\dot{e}_{\rm nucl,0} \sim 10^{16}-10^{17}{\rm erg~s^{-1}~g^{-1}}$ (assuming $t_0=1~{\rm s}$) \cite{Rosswog.etal:2017}. This is mainly due to the fact that, especially for very low $Y_e$, translead nuclei tend to decay trough $\alpha$ decays and fission, which are very sensitive to the specific mass model \cite{Barnes.etal:2016,Rosswog.etal:2017,Wu.etal:2019}. The dominant power-law term in Eq.~(\ref{eq:heating parametrization}) can be understood by considering that in most of the cases (and especially for $Y_e \lesssim 0.2$, when strong $r$-process nucleosynthesis occurs) a large statistical ensemble of nuclei is produce \cite{Metzger.etal:2010}. Assuming $\beta^-$ decay to be the dominant decay channel, along an isotopic chain (i.e. for fixed $Z$), the $Q$-value is roughly proportional to the neutron excess $D$. Since $\lambda_\beta \propto Q^{5}$, then $\lambda_\beta \propto D^{5}$. The nuclei at the end of the $r$-process distribute along the $r$-process path, characterized by $S_n \approx S_n^0$, see Eq.(\ref{eq: S_n^0}). According to the $S_n$ distribution on the nuclear chart, at high $N$ a larger $D$ is required to fulfill the $r$-process path condition and, for a given time $t$, the nuclear distribution is such that the number of nuclei per interval of $D$ is approximately constant within the relevant interval of neutron excess: \begin{equation} \frac{{\rm d} N}{{\rm d} D} \approx {\rm const} \rightarrow \frac{{\rm d} N}{{\rm d} \lambda} = \frac{{\rm d} N}{{\rm d} D} \frac{{\rm d} D}{{\rm d} \lambda} = C \lambda^{-4/5} \, , \end{equation} with $C$ being a constant. Due to the large number of reactions and nuclei involved, Eq.(\ref{eq:general heating rate}) can be converted in an integral over $\lambda$: \begin{equation} \dot{e}_{\rm nucl} \propto \int_0^{+\infty} \lambda^{1/5} \lambda \exp{(- \lambda t)} \lambda^{-4/5} {\rm d}\lambda \propto t^{-7/5} \, . \end{equation} While this argument explains well the presence of the power-law and provides a good estimate of its slope, many details can affect the precise calculation, accounting for the lower exponent obtained in detailed calculations. The power law term in Eq.(\ref{eq:heating parametrization}) is very robust for ejecta characterized by $Y_e \lesssim 0.25$ and undergoing strong $r$-process nucleosynthesis. For $Y_e \gtrsim 0.25$, the decay of a few nuclei dominate the heating rate and deviations from the power-low behavior are accounted by the exponential terms in Eq.(\ref{eq:heating parametrization}). These nuclei (including for example neutron-rich isotopes of Kr, Rb, Br, Sr, Ce, As, and Ge, see e.g. \cite{Martin.etal:2015}) are usually below the second $r$-process peak and are characterized by large $Q$-values and half-lives of a few hours. Thus the heating rate is enhanced by a factor of a few within the first day and decreased by a factor $\sim 2$ at later time with respect to the $Y_e \lesssim 0.25$ case. However, since the exponential corrections depend significantly on the ejecta distribution in the $(Y_e,s,\tau)$ space and the latter is usually rather broad in $Y_e$, a power law behavior is partially recovered and $\dot{e}_{\rm nucl}$ varies only by a factor of a few for relevant ejecta conditions during the first week after merger (e.g. \cite{Lippuner.Roberts:2015}). At late time (between 10 and several hundreds days), independently from the initial $Y_e$, the nuclear distribution is very close to the valley of stability and only very few nuclei have the right lifetime to decay within this time window. Thus, the heating rate becomes possibly very sensitive to the details of the abundance distribution through emerging bumps in its time evolution. Due to the temporal evolution of the thermalization efficiency (see below) and depending on the detailed yields, heavy nuclei with $\beta$ decay half-lives around 14 days can be relevant for the light curve behavior at a few weeks, while a few actinides and transuranium elements with $\alpha$-decay half-lives of several tens of days can affect the kilonova emission up to hundreds of day after the merger \cite{Wu.etal:2019,Zhu.etal:2018}. \textbf{Thermalization efficiency}. Thermalization efficiency is defined as the ratio of the total energy released by all radioactive processes, $\dot{e}_{\rm nucl}$, to the energy effectively transferred to the ejecta, $\dot{e}_{\rm th}$, i.e. $ f_{\rm th} \equiv \dot{e}_{\rm th}/\dot{e}_{\rm nucl} $. Since both these quantities changes with time, also $f_{\rm th}$ is a function of time. Detailed studies on $f_{\rm th}$ can be found, e.g., in Refs.~\cite{Barnes.etal:2016,Hotokezaka.etal:2016}. First of all, the thermalization efficiency depends on how relevant each decay channel is and on how energetic the particles in the final state are. These two points ultimately relate with the physics of the decays and with the actual abundances in the ejecta. Beta decay is the dominant decay channel for nuclei $A \lesssim 200$ and it is relevant for all $Y_e$ conditions, especially for $Y_e \gtrsim 0.25$. The $Q$-values of the $\beta$ decays relevant for the kilonova emission are of the order a 1-2 MeV and most of this energy is emitted in form of $\gamma$ rays ($\sim45 \%$, emitted from the excited daughter nucleus) while $e^{-}$'s takes usually 20\%, the rest being lost in neutrinos. The $Q$-values and the $e^{-}$ energies are larger for larger $Y_e$. Alpha decay is the dominant decay channel for $A \gtrsim 200$. Thus, it affects significantly the heating rate if actinides are produced, i.e. if $Y_e \lesssim 0.20$. For these decays, typical $Q$-values are in the range 5-9 MeV. Most of this energy is taken by the $\alpha$ particle while the daughter nucleus de-excitation is negligible. Fission is very effective for super-heavy nuclei ($A \gtrsim 250$) produced for $Y_e \lesssim 0.10$. The $Q$-value of these reactions can be approximated by the kinetic energy of the fission fragments and the latter can be estimated as the Coulomb repulsion energy of the two fragments at their formation, $Q_{\rm fission} \sim E_{\rm Coul} = Z_1 Z_2 e^2 / ( r_0 (A_1^{1/3} + A_2^{1/3}))$, where we have approximated the radius of a nucleus of mass number $A$ as $r_0 A^{1/3}$ with $r_0 \approx 1.8~{\rm fm}$. For typical super-heavy nuclei with $(A,Z) \sim (250,100) $, and daughter nuclei with $(A_{1,2},Z_{1,2}) \sim (132,50)$, $Q$ is $\sim 100~{\rm MeV}$. Additionally, $f_{\rm th}$ depends on how efficiently the different final state particles termalize in the plasma. This in turn depends on the physical processes providing thermalization and on the density of the medium, since $f_{\rm th}$ is larger in high density ejecta (e.g. in more massive and slower ejecta). High energy charged particles ($e^{-}$'s, $\alpha$'s and fission fragments) lose their energy in the ambient plasma through Coulomb interactions with the free and the atomic $e^-$'s. In the latter case, they can excite or even ionize atoms and these are the most efficient thermalization mechanisms. Each of these distant interactions transfers a relatively small amount of energy to other electrons. Then many interactions are required to thermalize a single projectile particle, but due to the low transferred energy the target electrons in the final state thermalize very rapidly. Due to its $Z_1 Z_2$ dependence, Coulomb interactions with ions are relevant only for fission fragments, while strong nuclear interactions with other nuclei are negligible. The cumulative nature of the Coulomb processes that affect charged particles allows to thermalize efficiently at least a fraction of the available energy. Also $\gamma$-rays lose their energy in the plasma by interacting with electrons through photoionization and Compton scattering. Due to the relatively high ionization thresholds of heavy elements ($\sim$100~keV), photoionization is the most relevant process up to $\sim 1~{\rm MeV}$, while for higher photon energies the Compton scattering becomes dominant. Any thermalization process is efficient as long the timescale over which it acts is smaller than the ejecta expansion timescale. Due to the relatively low opacity provided by Compton scattering and photoionization, high energy photons stop to thermalize when matter become transparent to them, and for typical kilonova conditions this happens within the first day after merger ($t_{{\rm ineff},\gamma} \sim 1~{\rm day}$, where $t_{\rm ineff}$ is the timescale when thermalization becomes inefficient). For supra-thermal electrons and $\alpha$ particles, an efficient thermalization can occur up to several days after the merger ($t_{\rm ineff} \sim 8~{\rm day}$), while fission fragments (again due to the $ \propto Z_1Z_2$ dependence of the Coulomb interaction) thermalize efficiently up to a few weeks ($t_{\rm ineff} \sim 16~{\rm day}$). Detailed calculations (e.g. \cite{Barnes.etal:2016}) show that $f_{\rm th}(t)$ decreases from $0.5-0.6$ during the first day down to 0.1 around 10 days after merger. \textbf{Atomic opacity}. The photon opacity, $\kappa_{\gamma}$, quantifies the degree of transparency of matter to electromagnetic radiation. In particular, it can be understood as the cross section ($\sigma$) per unit mass of a fluid element to radiation: $ \kappa_{\gamma} = n \sigma / \rho$, where $\rho$ is the matter density and $n$ the target particle density. In general, $\kappa_{\gamma}$ depends on the energy of the incident photon and on its complex interactions with the electron structure of the atom, in all its possible ionization states. Thus information about the composition and the ionization degree of each species is crucial to take properly into account the most relevant atomic opacities. While the ejecta expand and cool, electrons recombine with atoms to form ions and neutral atoms. First ionization energies vary between 3 and 25 eV, while the innermost electrons of heavy elements have ionization energy of $\sim 100 {\rm keV}$. Given the expected temperature, Eq.(\ref{eq:kilonova temperature}), most of the electrons have recombined at the time of the kilonova emission. and the abundance of free electron is $Y_{e,{\rm free}} \sim$ a few $0.01$, decreasing as a function of time due to electron recombination. Despite the fact that plasma collisions are not effective enough to maintain thermodynamics equilibrium during the ejecta expansion, due to the high opacity expected in the ejecta of compact binary mergers, radiation can effectively drive the ion abundances towards local thermodynamical equilibrium (LTE), at least during the first days after merger (e.g. \cite{Kasen.etal:2017} and references therein). For the photon energy interval relevant for kilonovae, bound-bound transitions are the most important atomic processes, followed by bound-free and free-free opacities, usually smaller by several orders of magnitudes. Detailed and exhaustive experimental values of $\kappa_{\gamma}$ for heavy elements, for a broad range of photon energies and in relevant thermodynamics conditions, are mostly missing, and the recourse to sophisticated, but still uncertain, atomic physics calculations is necessary (e.g. \cite{Kasen.etal:2013,Tanaka.etal:2013}). The energy-independent electron scattering opacity (Thomson's opacity), $\kappa_{\gamma,{\rm Th}} = 8 \pi/3 \left( \alpha \hbar c/m_e c^2 \right)^2 n_{e,{\rm free}}/\rho \approx 3.97 \times 10^{-3}~{\rm cm^2~g^{-1}} \left( Y_{e,{\rm free}}/0.01 \right)$, where $\alpha=1/137$ is the electromagnetic coupling constant, sets a lower limit that becomes relevant only for photon wavelengths $\lambda_\gamma \gtrsim 10^4 \textup{\AA}$. Energy- and composition-averaged values of the opacity (sometimes called gray opacity) can be use to roughly characterize the global plasma behavior. For example, for the Planck mean opacity $\kappa_{\gamma}(\lambda_\gamma)$ is averaged over the Planck distribution function, while for the Rossland mean opacity $1 / \kappa_{\gamma}(\lambda_\gamma)$ is averaged over the temperature derivative of the Planck distribution function. When the ejecta contain light $r$-process elements ($A \lesssim 140$), bound-bound transition involve $d$-shell valence electrons. For $\lambda_{\gamma} \gtrsim 10^3 \textup{\AA}$ the opacity strongly decreases with the photon wavelength ($\kappa_\gamma(\lambda_{\gamma}=10^3 \textup{\AA}) \sim 10^{3} {\rm cm^2~g^{-1}}$ while $\kappa_\gamma(_{\gamma}=10^{4} \textup{\AA}) \sim 10^{-3}{\rm cm^2~g^{-1}}$) and typical gray opacities are $\lesssim 1 {\rm cm^2~g^{-1}}$. If lanthanides and/or actinides are also present, the opening of the electron $f$-shell increases enormously the number of possible transitions and the bound-bound opacity is characterized by a forest of lines, Doppler-broadened by the large expansion velocity. The spectral opacity still decreases with the photon wavelength, but much mildly ($\kappa_\gamma(10^3 \textup{\AA}) \sim 10^{3} {\rm cm^{2}~g^{-1}}$, but $\kappa_\gamma(2.5 \times 10^{4} \textup{\AA}) \sim 10^{-3} {\rm cm^2~g^{-1}}$), and typical gray opacities are in this case $\gtrsim 10~{\rm cm^2~g^{-1}}$. We stress that even a small amount of lanthanides or actinides ($ X_{\rm La's} + X_{\rm Ac's} \lesssim 10^{-4}$) can already change the global matter opacity. \subsubsection{\textit{Modeling kilonovae}} Kilonova modeling is an extremely challenge task. State-of-the-art models require the solution of the photon radiative transfer equation in the expanding ejecta, possibly in multiple dimensions, e.g. \cite{Kasen.etal:2017,Tanaka.etal:2017,Wollaeger.etal:2018}. In addition to physically motivated density and temperature profiles, theyse models also require detailed information on the nuclear composition, on the ion abundances and on the spectral opacities at every time and everywhere in the ejecta. These models are able to provide light curves and spectra from a given configuration, at different epochs after merger. If the measurement or computation of all relevant transition lines is one of the major theoretical uncertainties, also their treatment in radiative transfer codes and in particular their translation in an effective opacity (``effective" because it refers to a discretization procedure involving finite wavelength interval, where many single lines are present) is not obvious. In the following, we will derive fundamental scaling relations, based on a simplified analytical model, which are in qualitative agreement with more detailed models. In addition to provide the fundamental scales of the problem, they also highlight the impact of nuclear physics input and the variety implied by the different ejecta conditions expected in compact binary ejecta. To model the ejecta we consider a spherically symmetric distribution of total mass $m_{\rm ej}$ and average speed $\langle v_{\rm ej} \rangle $, characterized by a grey opacity $\kappa_{\gamma}$ and expanding homologously. Matter at the outer edge is moving at velocity $v_{\rm ej,max}$, and at each time $t$ its radial position is $R_{\rm max} = v_{\rm ej,max} t$. Any internal shell of mass $\delta m$ is expanding at a speed $v_{\rm ej} < v_{\rm ej,max}$, constant in time and proportional to the radius, such that its radial position evolves according to $R=v_{\rm ej}t$. We further define $m_{\rm env}$ the mass of the envelope above $\delta m$ and $\Delta R = R_{\rm max} - R$ its radial thickness. The expansion timescale of this envelope can be computed as $t_{\rm exp} \sim \Delta R/v_{\rm ej}$. Thermal photons produced inside the envelope will contribute to the kilonova if $t_{\rm exp} \sim t_{\rm diff}$, where $t_{\rm diff}$ is the photon diffusion timescale. The latter can be determined from random-walk arguments starting from the photon optical depth ($\tau_\gamma$) and mean free path ($\ell_\gamma = 1/ \left( \kappa_{\gamma} \rho \right)$) as $t_{\rm diff} \sim \tau_{\gamma}^2 \ell_{\gamma}/c $. The optical depth is defined as the integral of the photon inverse mean path, $\ell_{\gamma}^{-1}$, along an outgoing radial path. In words, $\tau_{\gamma}$ counts the average number of interactions that a photon experiences before being emitted at the photosphere and it can be approximated by $\tau_{\gamma} \sim \langle \rho \rangle \kappa \Delta r $, where $\langle \rho \rangle$ is the average density experienced by the outgoing photon, $\langle \rho \rangle \sim m_{\rm env}/(4 \pi R^2~\Delta R)$. By equating the expansion and the diffusion timescale we can determine the time $\tilde{t}(m_{\rm env})$ at which the photons emitted by $m_{\rm env}$ will contribute to the kilonova, and we can estimate the peak time of the kilonova emission $t_{\rm peak}$ by taking $m_{\rm env} \sim m_{\rm ej}$ and $v_{\rm ej} \sim \langle v_{\rm ej} \rangle $: \begin{equation} t_{\rm peak} \sim \sqrt{\frac{m_{\rm ej}\kappa_{\gamma}}{4 \pi \langle v_{\rm ej} \rangle c }} \approx 4.6~{\rm days} \left( \frac{\kappa_{\gamma}}{10~{\rm cm^2~g^{-1}}} \right)^{1/2} \left( \frac{m_{\rm ej}}{0.01~M_{\odot}} \right)^{1/2} \left( \frac{\langle v_{\rm ej} \rangle }{0.1~c} \right)^{-1/2} \, . \label{eq: peak time estimate} \end{equation} The energy available to power the kilonova at $\tilde{t}$ is the nulcear energy released by $m_{\rm ej}$ and thermalized by the plasma: $L_{\gamma}(\tilde{t}) \approx \dot{e}_0~( \tilde{t}/1~{\rm sec})^{-\alpha}~f_{\rm th}(\tilde{t})~m_{\rm rad}(\tilde{t})$, with $\alpha = 1.3$ as a typical value. Once again, we can estimate the peak luminosity by taking $\tilde{t} = t_{\rm peak}$ and $m_{\rm env} \sim m_{\rm ej}$ to obtain: \begin{eqnarray} L_{\rm peak} & \sim & 2.4 \times 10^{40}~{\rm erg~s^{-1}} \left( \frac{\kappa_{\gamma}}{10~{\rm cm^2~g^{-1}}} \right)^{-\alpha/2} \left( \frac{m_{\rm ej}}{0.01~M_{\odot}} \right)^{1-\alpha/2} \nonumber \\ & & \left( \frac{\langle v_{\rm ej} \rangle}{0.1~c} \right)^{\alpha/2} \left( \frac{\dot{e}_0}{5 \times 10^{16}{\rm erg~s^{-1}~g^{-1}}} \right) \left( \frac{f_{\rm th}}{0.5} \right) \, . \label{eq: luminosity estimate} \end{eqnarray} The radius of the photosphere at $\tilde{t}$ is $R_{\rm ph}(\tilde{t}) \approx v_{\rm ej} \tilde{t}$ and then at the luminosity peak: \begin{equation} R_{\rm ph,peak} \sim 1.26 \times 10^{15}~{\rm cm} \left( \frac{\kappa_{\gamma}}{10~{\rm cm^2~g^{-1}}} \right)^{1/2} \left( \frac{m_{\rm ej}}{0.01~M_{\odot}} \right)^{1/2} \left( \frac{\langle v_{\rm ej} \rangle }{0.1~c} \right)^{1/2} \, . \label{eq: photospheric radius estimate} \end{equation} Finally, assuming black body emission and using the Stefan-Boltzmann law, the effective photospheric temperature, $T_{\gamma,{\rm eff}}$, can be determined as $T_{\gamma}^4 = \left( L_{\gamma}/(4 \pi R_{\rm ph}^2 \sigma_{\rm SB}) \right)$. This expression can be evaluated at the peak: \begin{eqnarray} T_{\gamma,{\rm peak}} & \sim & 2.15 \times 10^{3}{\rm K} \left( \frac{\kappa_{\gamma}}{10~{\rm cm^2~g^{-1}}} \right)^{-(\alpha+2)/8} \left( \frac{m_{\rm ej}}{0.01~M_{\odot}} \right)^{-\alpha/8} \nonumber \\ & & \left( \frac{\langle v_{\rm ej} \rangle}{0.1~c} \right)^{(\alpha-2)/8} \left( \frac{\dot{e}_0}{5 \times 10^{16}{\rm erg~s^{-1}~g^{-1}}} \right)^{1/4} \left( \frac{f_{\rm th}}{0.5} \right)^{1/4} \, , \label{eq: BB temperature estimate} \end{eqnarray} and translated in a peak wavelength $\lambda_{\gamma,{\rm peak}} = 1.35 \times 10^3 {\rm nm}~(T_{\gamma,{\rm peak}}/2.15 \times 10^3 {\rm K})^{-1}$. The above estimates have been done assuming $\kappa_{\gamma} \sim 10~{\rm cm^2~g^{-1}}$, i.e. considering ejecta that contain a significant fraction of lanthanides and actinides (meaning that the ejecta contains some matter with initial $Y_e \lesssim 0.25$). In this case, the luminosity peak is expected to occur around one week and at near-IR wavelengths. The luminosity is more than 100 times larger than the one of a typical nova, but several orders of magnitudes lower than a supernova (SN). Since SNe are also powered by radioactive decays in expelled matter, the mean reason for such a large difference is in the amount of ejecta ($L_{\gamma} \propto m_{\rm ej}^{1-\alpha/2} $), much lower in the case of compact binary mergers. If the wind ejecta or the dynamical ejecta have been significantly irradiated by neutrinos, the initial $Y_e$ could have increased such that the production of lanthanides is prevented. In that case, $\kappa \lesssim 1 {\rm cm^2~g^{-1}}$ and the lumonisity peak is expected to happen earlier (around 1 day), with a higher luminosity (more than $10^3$ times the one of a nova) and at bluer peak frequency ($\lambda_{\gamma} \sim 500~{\rm nm}$). \subsubsection{\textit{GW170817 and its kilonova}} On August the 17th 2017 and in the subsequent weeks, the first unambiguous kilonova resulting from a compact binary merger was detected, see e.g. \cite{Abbott:2017b}. This kilonova (called AT2017gfo) followed GW170817, the first GW signal compatible with the late inspiral of two NSs \cite{Abbott:2017a}. The total mass of the system was 2.74 \msun while the mass ratio, assuming slowly spinning NSs, was measured to be between 0.7 and 1.0. Light curves in different photometric bands of this unprecedented UV/visible/IR emission showed an early peak (around 1 day after merger) in the visible frequencies, followed by a later peak (around 5-7 days after merger) in the near-IR, see \cite{Villar.etal:2017} and references therein. The bolometric luminosity of the event 1.5 days after merger was $\sim 3.2 \times 10^{41}{\rm erg~s^{-1}}$, while it decayed approximately following a $t^{-1.3}$ power-law during the first week so that around 7 days $L_{\gamma} \approx 6 \times 10^{40} {\rm erg~s^{-1}}$. The spectrum at 1.5 days was very close to a black-body of $5 \times 10^3K$, while around 7 days it was broadly compatible with a $2.2 \times 10^3K$ black-body spectrum with a forest of absorption features, e.g. \cite{Pian.etal:2017,Smartt.etal:2017,Tanvir.etal:2017}. The identification of elements in the spectrum is very challenging due to the high density of lines and to their broadening due to the high expansion velocities. An analysis of the spectra recorded during the first days has revealed features compatible with the presence of Sr, an element of the first $r$-process peak \cite{Watson.etal:2019}. \begin{figure}[t!] \centering \includegraphics[width=\linewidth]{kilonova_smartt2.pdf} \caption{Modeling of the bolometric light curve of AT2017gfo, the kilonova associated with the GW170817 BNS merger event. The slope of the light curved, fitted with four different models characterized by different ejecta mass and opacity, is consistent with a power-law decay, $t^{-\beta}$ such that $\beta \approx 1.0-2.0$ ($\alpha$ in the text), compatible with the decay of $r$-process material in the ejecta of compact binary mergers. Figures taken from from \protect\cite{Smartt.etal:2017}.} \label{fig: kilonova model} \end{figure} Theoretical modelling of AT2017gfo requires the presence of more than one component of the ejecta. The different components are characterized by different masses, velocities and opacities, and possibly a non-trivial dependence from the geometry of the ejection. This is indeed necessary to explain the observed blue and red peaks \cite{Villar.etal:2017,Perego.etal:2017}. For example, one can consider the presence of two distinct components to explain the color evolution of AT2917gfo. Using Eq.~(\ref{eq: peak time estimate})-(\ref{eq: BB temperature estimate}), assuming a $\alpha \sim 1.3$ and a thermalization efficiency of 0.8 and 0.4 for the peaks at 1.5 and 7 days, respectively, the above peak properties imply that the blue peak was characterized by $m_{\rm blue} \approx 0.019$ \msun, $\kappa_{\gamma,{\rm blue}} \approx 1~{\rm cm^{2}~g^{-1}}$ and $v_{\rm ej,blue} \approx 0.20 c$, while for the red peak $m_{\rm red} \approx 0.058$ \msun, $\kappa_{\gamma,{\rm red}} \approx 4.2~{\rm cm^{2}~g^{-1}}$ and $v_{\rm ej,red} \approx 0.09 c$. The estimated total amount of ejecta is thus of the order of several percents of a solar mass. Results from one of these models are presented in Figure~\ref{fig: kilonova model}. According to more detailed models, e.g \cite{Kasen.etal:2017,Tanaka.etal:2017,Wollaeger.etal:2018}, the amount of ejecta in this event was $\sim 0.02-0.05$~\msun. Nuclear physics input (e.g. the nuclear mass model) can introduce an additional uncertainty factor of a few, possibly reducing the total ejecta mass. The inferred opacities suggest a negligible amount of lanthanides in the blue component and a lanthanide mass fraction between $10^{-3}$ and $10^{-2}$ in the red one. The emerging picture is certainly very compatible with results of compact binary merger simulations and nucleosynthesis calculations. In particular, the decline rate of the bolometric light curve and the inferred opacities are compatible with what expected from the collective decay of freshly synthetized $r$-process elements (see for example Figure~\ref{fig: kilonova model}). \subsection{\textit{Compact binary mergers and the chemical evolution}} \begin{figure}[t!] \centering \includegraphics[width=0.49 \linewidth]{wind+dynEjecta_Z.pdf} \includegraphics[width=0.49 \linewidth]{wind+dynEjecta_Z_HD.pdf} \caption{Elemental abundance comparison between BNS merger models and metal poor star observations. The violet curve represents nucleosynthesis yields for tidally dominated dynamical ejecta, while the other curves yields from neutrino-driven wind ejecta for different massive NS lifetimes. Theoretical abundances are compared with two classes of metal poor stars. In the right panel dynamical ejecta have been diluted by a factor of 50 with respect to the neutrino-driven wind one. Figures taken from \protect\cite{Martin.etal:2015}.} \label{fig: ejecta VS stars} \end{figure} \begin{figure}[t!] \centering \includegraphics[width=\linewidth]{cumulative_fractions.pdf} \caption{Cumulative mass fraction obtained by the solar residual $r$-process abundances from \protect\cite{Prantzos.etal:2020} both as a function of the mass numbers (left panel) and the atomic numbers (right panel).} \label{fig: cumulative fraction sun} \end{figure} Due to the production and ejection of heavy nuclei, compact binary mergers are a possible key player in shaping the evolution of chemical abundances in the Universe. A first relevant question is whether they are primary astrophysical sites for the production of $r$-process elements. Two main ingredients are necessary to answer this question: detailed abundance predictions and reliable merger rates. The former are obtained by combining the amount of ejecta predicted by merger simulations with the distributions of the nucleosynthesis yields corresponding to the properties of the ejecta. The latter are related to the binary formation channels and evolution. In particular, they depend on the probability that a compact binary forms and on the time that it takes for it to reach coalescence due to GW emission. To provide a simple answer, we compare the amount of $r$-process elements in the Milky-Way (MW, $M_{r,{\rm MW}}$) to the whole amount of $r$-process material ejected by compact binary mergers during the galactic evolution ($M_{r,{\rm CBM}}$). Their ratio, $f_{\rm CBM} \equiv M_{r,{\rm CBM}}/M_{r,{\rm MW}}$, quantifies the relevance of compact binary mergers in accounting for the observed $r$-process elements. The enumerator can be evaluated as the product of the average merger rate in the Galaxy, $R_{\rm CBM}$, times the average mass of $r$-process elements expelled by a single event, $m_{r,{\rm CBM}}$, times the age of the Galaxy, $t_{\rm MW} \approx 13.5~{\rm Gyrs}$. The mass per event can be estimated from the lower bound obtained from GW170817 ejecta, i.e. $m_{r,{\rm CBM}} \sim 0.02M_{\odot}$. The merger rate is still very uncertain, but it can be measured in different ways. From the GW events detected so far in the first two observing runs, the Ligo-Virgo collaborations have provided a rate of $110-3840{\rm Gpc^{-3}~yrs^{-1}}$ for BNS mergers, and a robust upper bound of $660~{\rm Gpc^{-3}~yrs^{-1}}$ for BHNS mergers \cite{Abbott:2019}. Assuming that a significant fraction of mergers produce also a short gamma-ray burst (SGRB), the merger rate can be inferred also from the SGRB rate. The latter is bracket by $R_{\rm SGRB} = 0.6-6 ~{\rm Gpc^{-3}{\rm yrs}^{-1}}$ \cite{Wanderman.Piran:2015,Ghirlanda.etal:2016}, and since GRBs are collimated emissions with a beaming correction factor $f_{\rm beam} \sim 100$ ($f_{\rm beam} = 1-\cos{\theta_{\rm jet}}$ and typical opening angles are $\theta_{\rm jet} \approx 5- 10^{\circ}$, \cite{Fong.etal:2015}), the resulting lower bound on $R_{\rm CBM}$ rate is $\sim 80-600~{\rm Gpc^{-3}{\rm yrs}^{-1}}$. More theoretical bounds can be obtained from population synthesis studies and from extrapolations of the observed populations of galactic BNS system (see for example \cite{abadie:2010} and references therein). These rates broadly agree with the measured rates, even if with larger uncertainties. Assuming a galaxy density of $\sim 0.01~{\rm galaxy}~{\rm Mpc^{-3}}$, a conservative merger rate inferred from theoretical models and observations is $R_{\rm CBM} \approx 30~{\rm Myr^{-1}}{\rm galaxy^{-1}}$. For the total mass of $r$-process elements in the MW, we consider the Sun as representative of the averaged enrichment of the Galaxy, a common assumption in Galactic chemical evolution models. We also assume that all this mass is produced by the one single type of events and with a relative constant yield and rate for the entire evolution of our Galaxy. These hypothesis are also grounded in the observations of the abundances of $r$-process elements in metal poor stars. Indeed the spectroscopic analysis of the light emitted by a star reveals the chemical composition of the ISM from which the star has formed. Low mass stars can live longer than the Galaxy, thus some of them are among the oldest objects in the MW. These old stars have an extremely low metallicity since they formed very early in the Galactic history when only a few SNe had exploded and polluted the ISM. They can be considered fossils of the early chemical enrichment of our Galaxy and the chemical abundances measured in their spectra can be studied to infer the characteristics of the first stellar nucleosynthesis events. Noteworthy, in the spectra of these old stars the lines of neutron capture elements are identified and their abundances measured. Among these fossil stars, there is a group that appears particularly rich in $r$-process elements (so called $r$-process rich stars, see e.g. \cite{Sneden.etal:2008}). For this group, the derived abundance pattern reproduces very closely the solar residual $r$-process pattern, at least beyond the second peak, while the first peak presents a significant dispersion. Since the low metallicity implies that these stars have been polluted by very few (if not one single) $r$-process sources, the common patterns observed in the solar $r$-process residual, in this group of metal poor stars and in compact binary merger nucleosynthesis calculations reveal the presence of robust features that characterize the $r$-process nucleosynthesis in very general terms. Nevertheless, the emerging picture is more complicated than that: other metal poor stars present a substantial amount of first peak elements and a lower enrichment in the heavy ones \cite{Honda.etal:2004}. This is still compatible with the large variability expected in the the yields of compact mergers (see Figure~\ref{fig: ejecta VS stars}), but it leaves also space for other production sites. To account for these uncertainties, starting from the solar $r$-process abundances, we compute the cumulative mass fraction of the $r$-process materials above a certain mass number $A_{\rm min}$, $X_>(A > A_{\rm min})$, see Figure~\ref{fig: cumulative fraction sun}. To estimate the typical total mass fraction of $r$-process elements in the MW we assume $X_{r-{\rm proc}} \approx X_>(A > A_{\rm min})$ and we consider $A_{\rm min} = 68, 89, 124$ such that $X_{r-{\rm proc}}(A > A_{\rm min}) \approx 40,9,6 \times 10^{-8}$, respectively. Since the mass in stars and ISM of the MW is $M_{\rm MW} \approx 6 \times 10^{10}$\msun, $f_{\rm CMB}$ can be finally estimated as: \begin{equation} f_{\rm CBM} \approx 1.35 \left( \frac{R_{\rm CBM}}{30 ~{\rm Myr^{-1}}} \right) \left( \frac{m_{r,{\rm CBM}}}{0.02 M_{\odot}} \right) \left( \frac{t_{\rm MW}}{13.5 ~{\rm Gyr}} \right) \left( \frac{X_{r-{\rm proc}}}{10^{-7}} \right) \, , \label{eq: CBM mass estimate} \end{equation} and $f_{\rm CBM} \approx 0.34,1.50,2.25$ for $A_{\rm min} = 68, 89, 124$, respectively. These estimates are rather crude in many ways. For example, they assume that the present day merger rate is representative of the average merger rate, while we know that it has significantly changed during the Galaxy history. Chemical evolution models can be used to better consider the merger rate and set more stringent constrain on the impact of the enrichment of compact mergers to the total balance of $r$-process in the Galaxy, see \cite{Cowan.etal:2019}. Moreover, it is not obvious that the reference amount of ejecta is representative for the merger population. However, it is worth noticing that an IR excess, observed in the afterglow light curves of a few SGRB, is broadly compatible with the emission expected from a kilonova and it usually points to the presence of large ejecta masses ($10^{-2}-10^{-1}$ \msun), e.g. \cite{Tanvir.etal:2013}. In addition, assuming that a significant fraction of the accretion disk is expelled in disk winds, our reference value is also well compatible with the results reported in Figure~\ref{fig: disk VS dyn ejecta}. Some astrophysical processes are also neglected for simplicity. For example, when compact objects emerge from CCSNe, they receive a kick at birth. This kick, in addition of being a threat for the survival of the binary, can put the binary in a wide orbit inside the galactic potential, such that the merger could happen with a significant offset from the stellar and gas distributions inside the Galaxy (see \cite{Hotokezaka.etal:2018} for a more detailed discussion). Despite the large uncertainties, $f_{\rm CBM} \sim 1$ and this testifies that compact binary mergers are primary astrophysical site where $r$-process elements are produced. This is especially true for elements above the second $r$-process peak, while the explanation of the first peak could be a clear confirmation that different mergers can produce different yields or could require additional production sites. \begin{figure}[t!] \centering \includegraphics[width=0.41 \linewidth]{Dispersion.pdf} \includegraphics[width=0.58\linewidth]{R_M_O3h_A90.pdf} \caption{Left: Scatter plot of the relative abundance ratio of iron over hydrogen versus europium over iron, for a large sample of metal poor stars. The quantity ${\rm [A/B]}$ is relative with respect to the solar one, i.e. it is defined as ${\rm [A/B]} \equiv \log_{10}\left( Y_A/Y_B \right) - \log_{10}\left( Y_A/Y_B \right)_{\odot} $. Data have been taken from \protect\cite{Roederer.etal:2014}. Right: Summary of the observational evidences for the production of $r$-process elements expressed on the $r$-process mass ($m_{\rm r}$) versus galactic event rate ($R_{\rm MW}$) plane. For concreteness, $r$-process abundances are assumed to be equal to the solar residual for $A_{\rm min} = 90$ while the BNS rate is inferred from galactic BNS observations \protect\cite{Pol.etal:2019}. (Courtesy of K. Hotokezaka; see also \protect\cite{Hotokezaka.etal:2018}).} \label{fig: observational constraints} \end{figure} A related question is whether other astrophysical sites are able to synthesise heavy elements through the $r$-process. Historically, proto-neutron star winds emerging after a successful CCSN explosion have long been thought to be a possible $r$-process nucleosynthesis site \cite{Qian.Woosley:1996}. The argument applied above to relate the rates and the ejecta from compact binary mergers to the observed amount of $r$-process elements in the MW could be easily adapted to regular CCSNe and it is not able to distinguish alone between these two scenarios. However CCSNe are significantly more frequent than compact binary mergers and their rate is well constrained, $R_{\rm CCSN} \approx 2.8 \times 10^4{\rm Myr^{-1}}$ (this rate can be related to $R_{\rm CBM}$ by considering that approximately half of the massive stars are in binaries, two CCSNe are required to form a compact binary and only $\sim 1\%$ of the stellar binaries survives the two CCSN explosions). From Eq.(\ref{eq: CBM mass estimate}) it is evident that CCSNe could explain the bulk of the galactic $r$-process nucleosynthesis if every SN would eject $\sim 10^{-5}$ \msun \, of $r$-process elements. Thus, the competition here is between rare events that expel large amounts of $r$-process material (e.g. compact binary mergers) or frequent events with much smaller amounts (e.g. regular CCSN). Over the past years, several observational evidences (in addition to GW170817) have accumulated pointing to the fact that the $r$-process elements come from rare events that produce a significantly large amount of $r$-process elements. In the following we will briefly review them:\\ \textbf{Eu abundance in galactic metal poor star}. The analysis of the abundance of $r$-process elements, and especially of Eu, as a function of metallicity (and in particular of iron and of $\alpha$ elements, which are good tracers of the early evolution of the ISM composition due to the explosions of the very first massive stars) has revealed that the \text{\rm average} abundance of Eu correlates with the one of $\alpha$ elements produced in CCSNe through the entire metallicity evolution (it correlates also with the one of iron, but only before type Ia SN start to explode, i.e. for low metallicity). However, differently from the $\alpha$ elements case, the distribution of the \textit{single} observations changes considerably: while at present metallicity the cumulative effect of several nucleosynthesis episodes and the efficient mixing of gas inside the Galaxy has homogenized the ISM composition and reduced the observed spread, at early times, when the amount of iron was $10^2-10^3$ times smaller than the present one, the ratio of the Eu over iron abundances shows a two orders of magnitude scatter, ranging from metal poor stars where Eu is underrepresented to cases where this ratio is more than 10 times the one observed in the present solar system (see the left panel of Figure~\ref{fig: observational constraints} and \cite{Sneden.etal:2008}). This large scatter suggests that the possible $r$-process elements pollution comes from a single rare event that ejects large amount of $r$-process material in ISM clouds that have seen only a few SNe. Considering that ISM mixing over the entire Galaxy requires a timescale much larger than the star formation timescale, this naturally introduces the inhomogeneous character to the early chemical evolution necessary to explain the observations. Sophisticated Galactic chemical evolution models have been specifically developed to mimic this observational spread (see \cite{Cowan.etal:2019} and references therein). It shall be underlined that this is a peculiar characteristics of the $r$-process elements, not present in other chemical elements, such as $\alpha-$elements produced together with iron by the more frequent SNe. \\ \textbf{$r$-process abundance in ultra-faint dwarf galaxies}. In addition to galactic observation, Eu can be observed also in classical dwarf and ultra-faint dwarf (UFD) galaxies, satellites of the MW and formed by very old stars (interestingly, these observations are possibly related with the ones of galactic metal poor stars, because the latter are often located in the so called galactic halo, that is thought to be formed by accretion episodes of dwarf galaxies on the MW). In particular, in the case of UFD galaxies, while Fe is observed in all cases, Eu has been detected so far only in a couple of cases (Reticulum II and Tucana III), corresponding to $\sim$30\% of the available sample \cite{Ji.etal:2016,Hansen.etal:2017}. Since UFD galaxies are formed by $10^3-10^5$ stars, such a low detection rate points again to a single, rare event (no more than one per $10^{4}-10^{5}$ stars). Moreover, it is interesting to compare the ratio between the amount of iron and of europium observed in Reticulum II ($M_{\rm Fe,Ret~II} \approx 0.7$ \msun and $M_{\rm Eu,Ret~II} \approx 10^{-5}$\msun), with the theoretical value predicted by assuming that Fe is produced by CCSNe (typically, $m_{\rm Fe,CCSN} \approx 0.07$\msun) and Eu by merger events (for which we conservatively assume again $m_{r,{\rm CBM}}\sim 0.02 M_{\odot}$) with an abundance equal to the solar one ($X_{\rm Eu} \approx 4.1 \times 10^{-10} $). Since $\left( M_{\rm Fe}/M_{\rm Eu}\right)_{\rm theory} \sim m_{\rm Fe,CCSN} R_{\rm CCSN} / m_{\rm Eu,CBM} R_{\rm CBM} $ and $m_{\rm Eu,CBM} \sim m_{r,{\rm CBM}}~X_{\rm Eu}/X_{r-{\rm proc}}$, we finally obtain: \begin{eqnarray} \frac{\left( M_{\rm Fe}/M_{\rm Eu} \right)_{\rm theory}}{\left( M_{\rm Fe}/M_{\rm Eu} \right)_{\rm Ret~II} } & \approx & 5.69 \left( \frac{\left( M_{\rm Fe}/M_{\rm Eu} \right)_{\rm Ret~II}}{7 \times 10^4} \right)^{-1} \left( \frac{R_{\rm CCSN}/R_{\rm CBM}}{4.7 \times 10^2} \right) \nonumber \\ & & \left( \frac{m_{\rm Fe,CCSN}/m_{r,{\rm CBM}}}{7/2} \right) \left( \frac{X_{\rm Eu}}{4.1 \times 10^{-10}} \right)^{-1} \left( \frac{X_{>}}{10^{-7}} \right) \, . \end{eqnarray} Thus, despite the crude approximations, the large uncertainties and the possible peculiar character of Reticulum II, the relative amount of Fe over Eu is broadly compatible with what expected from compact binary enrichment.\\ \textbf{Radioactive elements in Earth sediments and in meteorites}. The analysis of the abundances of long-lived $r$-process isotopes ($t_{1/2} > 10^7 {\rm yr}$) and of their daughter nuclei in meteorites (formed when the solar system was formed) and in sediments (e.g. deep see floor) reveals information on the local isotopes production at specific times (see \cite{Hotokezaka.etal:2018} and references therein). Due to the paucity of the $r$-process nuclides ${~}^{129}$I and ${~}^{247}$Cm, whose lifetimes are $\lesssim 20~{\rm Myr}$, and to the relative large abundance ratio (0.008) between ${~}^{244}$Pt ($t_{1/2} \sim 80~{\rm Myr}$) and its stable daughter nucleus ${~}^{238}$U in meteorites, it is possible to set the delay time between the solar system formation and its last $r$-process pollution to $\sim 100-120~{\rm Myr}$. In addition, the analysis of the deposition rates in deep see sediments of radioactive nuclides like ${}^{60}$Fe (very short-lived nuclide usually produced in SNe) and the $r$-only ${~}^{244}$Pt over the past 25 Myr shows a large fluctuation, with the present rate $\sim 10^{-2}$ times smaller than the rate 25 Myr ago. This indicates that the enrichment of $r$-process elements is uncorrelated with the CCSNe enrichment and the former is due to rarer events that produce large yields \cite{Hotokezaka.etal:2015}. A summary of the above observational constraints is provided in the right panel of Figure~(\ref{fig: observational constraints}). All of them work against regular CCSNe and in favor of compact binary merger as major site for the $r$-process production. A final interesting question is whether compact binary mergers are the \textit{only} sources of $r$-process elements. The large abundances of the first peak elements in the solar $r$-process pattern and in some metal poor stars, with respect to the elements beyond it, could be an indication of the occurrence of mergers in which the production of heavy $r$-process elements is disfavored (for example, due to a strong neutrino irradiation). However, it leaves also space for other sources able to provide weak $r$-process nucleosynthesis (e.g. electron capture SN, \cite{Wanajo.etal:2011}). Moreover, it is non-trivial for compact binary mergers to explain the abundances at very low metallicity. Indeed, a compact binary merger requires the successful explosion of at least one CCSN to form it (two for a BNS system) and, in addition to the stellar evolution timescale, it is necessary to wait for the GW-driven inspiral timescale. The latter can be estimated from the semi-major axis, $a$, the eccentricity, $e$, the total and reduced mass, $M$ and $\mu$, of the binary at formation as: \begin{equation} t_{\rm GW} \sim 0.66~{\rm Gyr} \left( \frac{a}{ 0.01 {\rm AU}} \right)^{4} \left( \frac{M}{2.7~M_{\odot}} \right)^{-2} \left( \frac{\mu}{0.68 M_{\odot}} \right)^{-1} \left( 1-e^2 \right)^{7/2} \, . \end{equation} This is a possibly rather long timescale to be reconciled with fast mergers happening at extremely low metallicity. However, the strong dependence of $t_{\rm GW}$ on $a$ and $e$ does not exclude them, but it requires a population of tight, possibly eccentric, compact binaries. Possible alternative sites are represented by rare classes of SNe characterized, for example, by very intense magnetic fields and fast rotating cores (e.g. \cite{Winteler.etal:2012}). It is important to stress that the relation between time and metallicity is not obvious: yields expelled by stars, SNe and compact binary mergers need to mix with the ISM before entering in the composition of the next stellar generations. Moreover, due to kicks and fast traveling ejecta, the places where SNs explode, compact binaries merge and new stars form could be distinct. All these effects are amplified in low metallicity conditions, where only a few enrichment episodes have happened. \section{Summary and outlook} Compact binary mergers involving at least one neutron star represent ideal environments where the production of heavy elements through the $r$-process nucleosynthesis takes place. The prediction of the precise composition of the ejecta and a clear understanding of its origin depend both on the modeling of the astrophysical sites and on detailed nuclear physics knowledge. A lot of progress has been achieved in the past few years and the predicted abundances are able to explain many independent observations. Compact binary mergers are also possibly very relevant in explaining the nuclear evolution of the Universe, in terms of the abundances that we observe at different epochs and in different astrophysical environments. Still, many open questions remain. On the one hand, more realistic and sophisticated compact binary merger models are required to predict the properties and the amount of ejecta with better accuracy and properly taking into account all the relevant physics. On the other hand, a more robust knowledge of the properties of exotic neutron-rich nuclei is key to reduce present nuclear uncertainties. In this respect, existing and upcoming world-wide nuclear facilities (including FAIR, FRIB, HIAF, RAON, RIKEN and SPIRAL) will finally produce some of the neutron-rich nuclei relevant for the $r$-process and measure their properties. Multimessenger observations, as well as the study of the composition of matter in different astrophysical and terrestrial contexts, will also sharpen our understanding and test our models, helping reducing our ignorance and forcing us to look at the problem from many viewing angles. Despite a conclusive answer about the presence and the role of other possible $r$-process nucleosynthesis sites still needs deeper investigations and clear evidences, it is nowadays certain that compact binary mergers are one of the major sources of $r$-process elements in the Universe. \input{reference.tex} \end{document}
\section*{Nomenclature} \noindent \textbf{Abbreviations} \vspace{+0.2cm} \noindent \begin{tabular}{ l p{6.55cm} } CB & Convergence Bid \\ DAM & Day-Ahead Market \\ RTM & Real-Time Market \\ LMP & Locational Marginal Price \\ D-LMP & Day-Ahead Market LMP \\ R-LMP & Real-Time Market LMP \\ ISO & Independent System Operator \\ Pnode & Pricing Node \\ \end{tabular} \vspace{+0.4cm} \noindent \begin{tabular}{ l p{6.55cm} } APnode & Aggregated Pricing Node \\ DLAP & Default Load Aggregated Point \\ MILP & Mixed-Integer Linear Programming \\ HDBSCAN & Hierarchical Density-Based Spatial Clustering of Applications with Noise \\ \end{tabular} \vspace{+0.2cm} \noindent \textbf{Indices, Sets, and Symbols} \vspace{+0.2cm} \noindent \begin{tabular}{ l p{6.55cm} } $T$ & Set of all the time intervals \\ $t$ & Index of time interval \\ $ (\boldsymbol{\cdot})^{*} $ & Symbol for average value \\ $ (\boldsymbol{\cdot})^{min/max} $ & Symbol for upper/lower limit \\ \end{tabular} \vspace{+0.2cm} \noindent \textbf{Parameters} \vspace{+0.2cm} \noindent \begin{tabular}{ l p{6.55cm} } $\Delta$ & The distance of price bid from the average hourly D-LMP \\ $\lambda$ & D-LMP \\ $\pi$ & R-LMP \\ $\delta$ & Difference between D-LMP and R-LMP \\ $\epsilon$ & Relatively small number \\ $M$ & Sufficiently large number \\ $\theta$ & Objective function threshold in Algorithm 1 \\ a & Accuracy of forecasting \\ \end{tabular} \vspace{+0.2cm} \noindent \textbf{Variables} \vspace{+0.2cm} \noindent \begin{tabular}{ l p{6.55cm} } $\eta$ & Net profit \\ $L$ & Loss / negative profit \\ $P$ & Profit / positive profit \\ $x$ & Submitted price bid \\ $m$ & Distance from the average D-LMP captured as a spike by an optimal CB \\ $b^1$, $b^2$ & Auxiliary binary variables \\ $z$ & Auxiliary continuous variable \\ \end{tabular} \section{Introduction} \label{sec:introduction} \subsection{Background: Convergence Bidding} Convergence bidding, a.k.a., virtual bidding, is a market mechanism that is used by Independent System Operators (ISOs) in two-settlement wholesale electricity markets to reduce the gap between the day-ahead market (DAM) prices and the real-time market (RTM) prices in order to increase market efficiency \cite{hogan2016,2015Financial0MIT}. A supply convergence bid (CB) is a bid to sell energy in DAM and buy the \emph{same amount} of energy in RTM. A demand CB is a bid to buy energy in DAM and sell the \emph{same amount} of energy in RTM \cite{samani2020cb}. While CBs are virtual, i.e., only financial and not physical, they are cleared in DAM together with physical supply and demand bids. If a supply CB is cleared in DAM, then the bidder is credited at the DAM price and charged at the RTM price; and if a demand CB is cleared in DAM, then the bidder is charged at the DAM price and credited at the RTM price. In both cases, the \emph{difference} between the earning or loss is paid to the convergence bidder. The process of clearing CBs and the related payment calculation is outlined in Fig. \ref{fig:out1}. The payment is calculated by multiplying the cleared amount of energy by the \emph{difference} between the DAM locational marginal price (D-LMP) and the RTM locational marginal price (R-LMP). \begin{figure}[t] \centering {\scalebox{0.66}{\includegraphics*{Fig1_clearing.pdf}}} \caption{The process of clearing CBs in wholesale electricity markets \cite{samani2020cb}.} \label{fig:out1} \end{figure} Most ISOs in the United States, including the California ISO, have already adopted CBs \cite{Ref_CAISO_CB_Document, 2015Virtual0Pjm}. CBs are currently understood to play a critical role in electricity markets, e.g., to improve market efficiency, reduce the price gap between D-LMP and R-LMP, and help with the integration of renewable energy resources, e.g., see the various studies in \cite{kazempour2017value,kazempour2017value2,woo2015virtual,hogan2006revenue}. \color{black} In this paper, we seek to answer a series of research questions related to CB strategies: 1) How many market participants submit CBs in the California ISO market, and what are the characteristics of their CBs? 2) How do market participants shape their CB strategy, in particular with respect to the choice of their price bids? 3) How does the reality of the CB strategies in the California ISO market match the existing literature in this field? 4) What are the most common strategies that are used by the CB market participants in the California ISO market? 5) Is it possible to learn from the current CB strategies in the California ISO market and propose a new strategy that can significantly outperform them? 6) Could a CB strategy that is seemingly unprofitable comprise part of an enhanced new composite bidding strategy? \color{black} For the rest of this paper, we will refer to the above research questions as Research Question 1 to Research Question 6, respectively. We will address and refer to these questions throughout the paper. \color{black} \subsection{Summary of Contributions and Discoveries} \label{sec:intr:cntr} While the basic principles of convergence bidding are studied in the academic literature and industry reports, there is currently a gap in this field about understanding the strategy and behavior of CB market participants in real-world electricity markets. This is a critical subject because the way that market participants select their CBs can ultimately shape the impact of CBs on electricity markets. Addressing this open problem is the focus of this paper. Accordingly, the main discoveries and contributions in this paper are as follows: \begin{itemize} \vspace{0.1cm} \item Three years of real-world market data from the California ISO market are investigated to understand the behavior of CB market participants. The analysis is comprehensive; it looks into all the submitted CBs, D-LMPs, R-LMPs, and the net cleared CBs. \color{black} The convergence bidders that are most present in the market are identified based on different metrics; and their CBs are analyzed \color{black} in terms of the number of submitted CBs, the number of participated locations, the type of submitted CBs, the number of steps for the submitted CBs, and the quantity of in MWh. \vspace{0.1cm} \item The \emph{features} for the strategy of the submitted CBs are extracted; and by using a density-based clustering algorithm, \emph{three main clusters} of CB strategies are identified. The characteristics and the performance of each identified cluster of strategies are analyzed and some of their \emph{advantages} and \emph{disadvantages} are investigated. Next, the identified strategies are \emph{reverse engineered}, i.e., their key steps are identified such that we can implement them for a market participant. The purpose of this reverse engineering task is two-fold. First, it can shed light on \emph{how} CB market participants behave. This by itself is an important study and the results can be insightful to ISOs and policy makers. Second, it serves as means for us to develop a \emph{new} and better convergence bidding strategy based on what we learn from the current state of practice. \vspace{0.1cm} \item Our analysis also unmasks two interesting discoveries. First, one of the most common real-world CB strategies in the California ISO market does \emph{not} match any of the strategic convergence bidding methods that currently exist in the research literature. Second, most of the exciting papers in the research literature are focused on one of the CB strategies that is \emph{less} common in practice among the CB market participants in the California ISO market. \vspace{0.1cm} \item A new comprehensive convergence bidding strategy is proposed to utilize the identified reverse engineered strategies based on their advantages and disadvantages under various market conditions. To the best of our knowledge, this is the first composite CB strategy that is proposed in the literature. It is also the first CB strategy that is obtained by reverse engineering of existing real-world CB strategies. The proposed strategy comprises \emph{three steps}: net profit maximization by capturing price spikes, dynamic node labeling, and strategy selection. We show that the annual profit for the most lucrative market participant in the California ISO market can increase by 43\%; if the proposed bidding strategy is used. \vspace{0.1cm} \end{itemize} \subsection{Literature Review} \label{sec:intr:lit} Despite the fact that CBs are widely adopted by ISOs in recent years, the current literature is still limited when it comes to the analysis of convergence bidding strategies. Some of the related papers include \cite{baltaoglu2018algorithmic,xiao2018risk,kohansal2020strategic,xiao2019risk,mehdipourpicha2020risk,xiao190optimal,wang2019machine}. In \cite{baltaoglu2018algorithmic}, an online learning algorithm is proposed to maximize the cumulative payoff over a finite number of CB trading sessions. \color{black} However, there is no discussion on how the proposed strategy is similar to or different from the strategies that are currently used by the market participants in practice. \color{black} In \cite{xiao2018risk}, a stochastic optimization model is proposed to place CBs under different risk management scenarios. \color{black} The focus is on self-scheduling bids; therefore, the choice of the price components for the CBs is inherently not part of the analysis. \color{black} In \cite{kohansal2020strategic}, a bi-level CB optimization problem is proposed, where the upper-level problem aims to maximize the profit for the convergence bidder and the lower-level is the economic dispatch problem. The authors in \cite{xiao190optimal} also proposed a bi-level stochastic optimization model for joint physical demand bidding and convergence bidding, for a strategic retailer in the short-term electricity market. \color{black} While the use of bi-level optimization is insightful, it may not match the information available to CB market participants in practice. In fact, in practice, market participants do not have access to the detailed formulation of the economic dispatch problem that is solved by the ISO. They also do not have access to the comprehensive market data that are needed to solve the economic dispatch problem. \color{black} In summary, while the above papers do propose new convergence bidding strategies, they are not concerned with convergence bidding strategies that already exist in practice in the real-world convergence bidding markets. This is indeed still an open issue that needs to be explored, which we seek to address in this paper. \color{black} \color{black} There are fundamental differences between the work in this paper and the few available studies related to the convergence bidding strategies that we listed in the previous paragraph. % \emph{First}, none of the available works in the literature has proposed a data-driven convergence bidding strategy based on the real-world market data. \color{black} \emph{Second}, some of the existing convergence bidding papers in the literature focus only on selecting the quantity (in MWh) of the bid, and not the price of the bid; i.e., they focus on self-scheduling strategies. \color{black} \emph{Third}, some of the papers in the literature tried to solve the market clearing process as part of their problem in order to consider the price component of CBs and to be able to use the resultant LMPs in the profit maximization problem. However, as we know, the market clearing problem is a very complex optimization problem with many steps. Therefore, the authors in those papers had no choice but to significantly simplify the market model in order to solve their formulated optimization problems. On the contrary, in this work, we focus on real-world market data and we analyze and reverse engineer the strategies of each convergence bidder in the California ISO market. Compared to the preliminary conference version of this work in \cite{Ehsan_ISGT}, the current journal submission has several new and important contributions. In fact, the two major tasks of reverse engineering the existing CB strategies as well as designing a new comprehensive convergence bidding strategy are both new in this journal version. This journal version also includes new results with respect to identifying the advantages and disadvantages of various real-world convergence bidding strategies in the California ISO market. Finally, there is also a rich body of literature that studies CBs; but they are \emph{not} about understanding the strategies of CB market participants. In particular, there are papers that study the impact of CBs on electricity markets \cite{samani2020cb,2016Dynamic0Theis,oren2015,nyc2007,tang2016model,hadsell2007one,wolak2013,jha2019can,mather2017virtual,larrieu2015impact,tangimpact,you2019role,long2020exploring}. In \cite{samani2020cb}, a method is proposed to identify under what theoretical conditions a CB results in price divergence, instead of price convergence. The impact of convergence bidding on the efficiency of the California ISO market and impact on price convergence is studied in \cite{oren2015} and also in \cite{jha2019can}. There are also a few papers in the literature that are concerned with the potential to manipulate the wholesale electricity market by using CBs \cite{ftr2013,AnotherFTR,birge2018limits,shan2017simulation,choi2016economic,tajer2017false,goodbad2010}. In \cite{AnotherFTR}, an equilibrium model is developed to study the cross-product manipulation in financial transmission right and two-settlement energy markets. The concept of cyber attacks in wholesale electricity markets with virtual bidding activities is analyzed in \cite{choi2016economic}. A framework is proposed to evaluate the economic profit of an attacker who conducts a topology data attack using CBs. \color{black} In the second part of this paper in Section IV, we look at the strategic bidding problem from the viewpoint of the market participants. In this regard, the viewpoint in this paper is similar to those in \cite{baltaoglu2018algorithmic,7307233,6767152,7038219,7892020,7524679,7533471}; all of which discuss developing new bidding strategies in electricity markets. \color{black} \section{Overview of the Real-World CB Market Participation Data in the California ISO} \label{sec:gnral} In this section, we provide an overview of the CB market participation in the California ISO electricity market based on the real-world market data. All the raw data in this study are available in \cite{OASIScaiso}. The analysis in this section \color{black} will address Research Question 1. It will also \color{black} set the stage for the data-driven reverse engineering work in Section III. \subsection{Analyzing the Market Data} \label{sec:gnral:data} Three years of market data from the California ISO electricity market, during 2017, 2018, and 2019, are analyzed. \color{black} A CB that is submitted to the California ISO electricity market must contain four pieces of information as follows: i) step-wise quantities (MWh), ii) step-wise prices\footnote{\color{black} Throughout this paper, we refer to the price bids, which are expressed in \$/MWh, as the \emph{price components} or the \emph{price values} of the convergence bids.} (\$/MWh), iii) the type of the CB, which can be either a demand CB or a supply CB, and iv) the nodal location of the CB. In the California ISO electricity market, the CB market participants can submit up to ten steps of quantity and price pairs in each bid. It should be mentioned that, throughout this paper, if a CB is multi-step, then the maximum quantity of the different steps of the same submitted CB is considered as its \emph{quantity}. \color{black} In this study, we focused on the aggregated pricing nodes (APnodes) in the California ISO market. \color{black} As defined by the California ISO, an APnode is a trading hub, a load aggregation point, or any group of multiple pricing nodes (Pnodes)\color{black}\cite{CAISOBPMDAv19}. \color{black} The reason that APnodes are the focus of this study is that, most of the submitted CBs in the California ISO market are at the APnodes. There is no practical advantage to look into any higher locational resolution beyond APnodes. With over two thousand APnodes across the state of California, focusing on the APnodes in this study already required handling a huge amount of real-world market data. \color{black} Accordingly, we examined a total of 2265 APnodes; out of which a total of 475 APnodes hosted at least one CB at any time during the three-year period of this study. On average, a total of 387 APnodes hosted at least one CB during each month. \begin{figure}[t] \centering {\scalebox{0.45}{\includegraphics*{Fig2_energy.pdf}}} \caption{Total monthly amount of cleared energy by CBs for each year.} \label{fig:mon_energy} \end{figure} \begin{figure}[t] \centering {\scalebox{0.45}{\includegraphics*{Fig3_profit.pdf}}} \caption{Total monthly net profit by convergence bidders for each year.} \label{fig:mon_prof} \end{figure} \begin{table}[t] \color{black} \centering \caption {Selection of the CB Market Participants with Considerable Presence based on the Four Introduced Metrics across a Total of 101 Convergence Bidders.} \label{tab1} \begin{center} \begin{tabular}{| c | c | c | c | c |} \hline Alias ID & \circled{1} & \circled{2} & \circled{3} & \circled{4} \\ \hline 1 & \cellcolor{gray!25}20.97 & 1.49 & \cellcolor{gray!25}11.06 & 1.93 \\ \hline 2 & \cellcolor{gray!25}8.53 & \cellcolor{gray!25}12.82 & \cellcolor{gray!25}5.61 & \cellcolor{gray!25}7.00 \\ \hline 3 & \cellcolor{gray!25}6.54 & \cellcolor{gray!25}8.92 & 1.68 & 2.51 \\ \hline 4 & \cellcolor{gray!25}6.05 & \cellcolor{gray!25}13.13 & \cellcolor{gray!25}3.00 & \cellcolor{gray!25}6.96 \\ \hline 5 & \cellcolor{gray!25}6.02 & 1.26 & \cellcolor{gray!25}16.26 & \cellcolor{gray!25}3.47 \\ \hline 6 & \cellcolor{gray!25}5.63 & 1.50 & \cellcolor{gray!25}7.09 & \cellcolor{gray!25}3.55 \\ \hline 7 & \cellcolor{gray!25}5.26 & 1.16 & 2.28 & 0.50 \\ \hline 8 & \cellcolor{gray!25}3.87 & 1.11 & \cellcolor{gray!25}2.34 & 1.21 \\ \hline 9 & \cellcolor{gray!25}3.69 & \cellcolor{gray!25}7.15 & \cellcolor{gray!25}10.56 & \cellcolor{gray!25}17.56 \\ \hline 10 & \cellcolor{gray!25}2.56 & \cellcolor{gray!25}3.30 & 0.68 & 1.06 \\ \hline 11 & 2.49 & \cellcolor{gray!25}5.62 & 0.31 & 0.72 \\ \hline 12 & 2.31 & \cellcolor{gray!25}2.92 & 1.11 & 1.47 \\ \hline 13 & 1.91 & 2.24 & \cellcolor{gray!25}5.77 & \cellcolor{gray!25}5.82 \\ \hline 14 & 1.67 & \cellcolor{gray!25}3.63 & 0.28 & 0.62 \\ \hline 15 & 1.58 & \cellcolor{gray!25}3.53 & 0.27 & 0.62 \\ \hline 16 & 1.36 & \cellcolor{gray!25}2.37 & 1.76 & 2.10 \\ \hline 17 & 1.21 & 1.90 & \cellcolor{gray!25}4.58 & \cellcolor{gray!25}5.10 \\ \hline 18 & 1.11 & 1.12 & 2.20 & \cellcolor{gray!25}2.71 \\ \hline 19 & 1.04 & 1.94 & \cellcolor{gray!25}2.50 & \cellcolor{gray!25}3.69 \\ \hline 20 & 0.19 & 0.41 & 1.88 & \cellcolor{gray!25}4.30 \\ \hline Total & 84.0\% & 77.5\% & 81.2\% & 72.9\% \\ \hline \end{tabular} \end{center} \begin{flushleft} $ \ \ \ \ \ \ \ \ \ \ \ \ \ $ \circled{1} Share of the number of submitted CBs (\%). $ \ \ \ \ \ \ \ \ \ \ \ \ \ $ \circled{2} Share of the number of cleared CBs (\%). $ \ \ \ \ \ \ \ \ \ \ \ \ \ $ \circled{3} Share of the total submitted quantity in MWh (\%). $ \ \ \ \ \ \ \ \ \ \ \ \ \ $ \circled{4} Share of the total cleared quantity in MWh (\%). \end{flushleft} \end{table} \color{black} The total number of \emph{market participants} that ever submitted a CB during the three-year period of this study was 101, with a monthly average of 52 market participants. The total profit that was earned by all the market participants in the CB market during this period was \$61 million. Out of the 101 convergence bidders, 74 of them made money, i.e., had a \emph{net positive profit}. Fig. \ref{fig:mon_energy} shows the total monthly amount of cleared energy at each year for the convergence bidders, and Fig. \ref{fig:mon_prof} shows the monthly net profit that all the convergence bidders earned during this period of study. \color{black} Note that, notation \$M means \$1,000,000. \color{black} Interestingly, there were months that the market participants had an overall loss, i.e., \emph{net negative profit} as the outcome of their convergence bidding. Another interesting observation is that even though the net profit fluctuated significantly across different months, the amount of cleared CB was about the same in each month. \color{black} As it is already widely discussed in the literature, there is a direct relationship between the CB market participants' ability to earn profit, and the advantages that convergence bidding can provide to the society from the system viewpoint. In particular, as discussed in the ISO reports, such as in \cite{Ref_CAISO_CB_Document,2015Virtual0Pjm}, if the CB market participants make profit, then their CBs also help closing the gap between D-LMPs and R-LMPs. Closing such gap results in several benefits to the system, such as \cite{Ref_CAISO_CB_Document,2015Virtual0Pjm}: 1) Lowering the costs due to more efficient day-ahead commitment, 2) Improving the grid operations and reliability, 3) Market power mitigation, 4) Increasing the market liquidity, 5) Promoting the competition between market participants. The above mentioned fact in the ISO reports, that a profitable CB helps with achieving price convergence and its advantages, is also proved mathematically in \cite{samani2020cb}. \subsection{Identifying the Most Present Convergence Bidders} \label{sec:gnral:prsnt} In this work, although we analyze \emph{all} the submitted CBs in the California ISO market, we scrutinize only the ``most present" convergence bidders for the purpose of extracting their convergence bidding strategies. The most present CB market participants can be defined based on different metrics: 1) their high share in the market in terms of the number of submitted CBs; 2) their high share in the market in terms of the number of cleared CBs; 3) their high share in the market in terms of the total amount of quantity of the submitted CBs in MWh; 4) their high share in the market in terms of the total amount of quantity of the cleared CBs in MWh. The process of selecting the most present market participants is summarized in Table I. For each metric, we calculated the share (in percentage) of all the CB market participants according to that particular metric. We then sorted the list of market participants based on each metric, and accordingly selected the market participants with the 10 highest shares in the market according to each metric. The 10 selected market participants for each metric are marked in Table I by gray shaded areas. There are exactly 10 market participants with gray shaded areas in each column. Next, we combined the four lists from the four metrics. Due to the overlaps between the lists for the four metrics, this analysis results in identifying a total of 20 market participants as the ones that are ``most present'' in the CB market. At this stage, we assigned \emph{Alias IDs} to the selected market participants, as denoted by 1 to 20. As it is mentioned before, the total number of CB market participants that ever submitted a CB during the period of this study is 101. The reason for choosing the 10 highest shares of each list of metrics is to select all market participants that \emph{one way or another} have some considerable presence in the market, then we scrutinize the selected market participants. Note that, each of the 20 selected market participants has a considerable presence in the market based on \emph{at least} one of the four metrics. As we can see in the last row in Table I, the identified 20 most present market participants in the above process accounted for 72\% to 84\% of the entire convergence bidding market, based on any of the four metrics that one can consider to define the share of the market participants. \color{black} \color{black} Table \ref{tab2} shows some basic information for each Alias ID that we previously identified in Table I. \color{black} We can make several preliminary observations, as we explain next. Some of the identified convergence bidders placed CBs in almost all the locations that ever received CBs, such as Alias ID 4 that placed CBs in 95\% of locations that hosted at least one CB at any time during the three-year period of this study. Some other convergence bidders placed CBs in only a few locations, such as Alias ID 20 that placed CBs in less than 1\% of the locations. Most of these 20 convergence bidders with considerable presence submitted both supply and demand bids, but some of them, such as Alias ID 17 and Alias ID 20, submitted supply CBs more than demand CBs, or vice versa. \color{black} Based on the average value for the number of steps for the cleared CBs, some market participants always submitted single step bids, while some others used multiple steps in their CBs. Finally, the average quantity of the cleared CBs varies from about 2 MWh to 156 MWh which shows a different amount of investment and available credit between market participants. \begin {table}[t] \color{black} \centering \caption {Convergence Bidding Characteristics in the Cleared \\ CBs for the Market Participants with Considerable Presence.} \label{tab2} \begin{center} \begin{tabular}{| c | c | c | c | c |} \hline Alias ID & \circled{1} & \circled{2} & \circled{3} & \circled{4} \\ \hline 1 & 28.21 & 68.11 & 2.86 & 28.79 \\ \hline 2 & 58.53 & 79.08 & 1.11 & 8.41 \\ \hline 3 & 70.95 & 69.33 & 2.05 & 4.92 \\ \hline 4 & 95.37 & 50.53 & 1 & 7.97 \\ \hline 5 & 21.47 & 63.18 & 2.9 & 76.51 \\ \hline 6 & 48.63 & 57.01 & 1.92 & 49.27 \\ \hline 7 & 62.11 & 61.5 & 2.45 & 8.07 \\ \hline 8 & 19.16 & 49.12 & 1.64 & 19.73 \\ \hline 9 & 18.11 & 55.08 & 2.52 & 49.66 \\ \hline 10 & 32.63 & 79.03 & 1.04 & 4.97 \\ \hline 11 & 68.63 & 45.74 & 1 & 1.92 \\ \hline 12 & 20 & 58.02 & 1.03 & 7.84 \\ \hline 13 & 3.58 & 53.81 & 1.37 & 49.15 \\ \hline 14 & 24.84 & 60.19 & 1.13 & 2.6 \\ \hline 15 & 45.26 & 39.25 & 1 & 2.64 \\ \hline 16 & 22.74 & 77.88 & 4.36 & 21.42 \\ \hline 17 & 12 & 87.04 & 3.33 & 53.93 \\ \hline 18 & 33.68 & 53.63 & 1 & 36.23 \\ \hline 19 & 69.89 & 64.09 & 5.29 & 37.37 \\ \hline 20 & 0.21 & 100 & 1 & 156.72 \\ \hline \end{tabular} \end{center} \begin{flushleft} $ \ \ \ \ \ \ \ \ \ \ \ \ \ $ \circled{1} Share of nodal locations in cleared CBs (\%). $ \ \ \ \ \ \ \ \ \ \ \ \ \ $ \circled{2} Share of supply bids in cleared CBs (\%). $ \ \ \ \ \ \ \ \ \ \ \ \ \ $ \circled{3} Average number of steps in cleared CBs. $ \ \ \ \ \ \ \ \ \ \ \ \ \ $ \circled{4} Average quantity in MWh in cleared CBs. \end{flushleft} \end{table} \color{black} \section{Data-Driven Reverse Engineering of the Convergence Bidding Strategies} \label{sec:classes} In this section, first, we will extract different quantitative \emph{features} to characterize the convergence bidding strategies of the market participants based on the raw market data that we introduced in Section II. After that, we will use the extracted features to \emph{cluster} the submitted CBs into three clusters of strategies. Finally, the performance of the clusters of strategies will be compared. By going through these steps, the convergence bidding strategies of the real-world market participants in the California ISO market will be \emph{reverse engineered}. \color{black} The benefit of this analysis is two-fold. First, an in-depth understanding of the CB strategies that are currently adopted by the real-world market participants is in its own right interesting from the view point of research and also to provide insights to ISOs. Second, by unmasking and reverse engineering the existing real-world CB strategies in the California ISO market, an enhanced and more profitable CB strategy is achieved, as we will see in Section IV. \color{black} \subsection{Features for Cluster Identification} \label{sec:features} Recall from Section II.A that each submitted CB has three types of information: quantities, prices, and whether it is a demand CB or a supply CB. The pair of quantity and price can be submitted in one step or multiple steps. Accordingly, we introduce four different \emph{features} for each submitted CB: 1) The price distance, i.e., the difference between the price bid in the submitted CB at a node and the average hourly D-LMP\footnote{\color{black}The average D-LMP is a fixed number for each hour and each node, as it is the mean value of the historical prices over a period of three years. \color{black} } at that node; 2) The correlation between the type of the submitted CB (demand or supply) at a node and the historical CBs at that node; 3) The number of steps in the submitted CB; 4) The type of node where the CB is submitted, i.e., whether the node is a regular APnode, \color{black} i.e., it is \emph{not} a Hub or a DLAP, \color{black} or it is one of the major aggregated nodes in the California ISO market, \color{black} i.e., it \emph{is} a Hub or a DLAP\color{black}. \color{black} In this work, we seek to consider the key determinative features for the bidding strategy of the CB market participants. In our assessment, the selected features should have three main characteristics as follows. First, the selected feature should be built only based on the data that each market participant has access to by its own. For example, a feature that needs to include other market participants' bidding information is not considered in our features for the purpose of clustering. \color{black} This is because each convergence bidder does not have access to the bidding data of other market participants. \color{black} Second, the selected feature should not involve or depend on the information that is private to the market participant. \color{black} It is not really a choice to not consider such private information; it is rather the nature of a study like ours that is based on analyzing real-world electricity market data. \color{black} For example, each CB market participant has a ``credit'' with California ISO, which determines the maximum quantity of bids that the market participant can submit to the market. Such ``credit'' is not public data. Thus, the quantity of the submitted CB in MWh is not considered as a feature, because it is not clear whether the quantity of the bid is simply set based on the market participant's ``credit'' or it is a factor that is strategically selected by the market participant. Third, the selected feature should be built only based on the data that each market participant has access to \emph{at the time of submitting} its bid to the California ISO market. For example, the same day LMPs are \emph{not} known to the market participants at the time of submitting their bids, but the historical average of the LMPs for each location and each hour \emph{is} known to them. \begin{figure}[t] \centering {\scalebox{0.42}{\includegraphics*{Fig4_delta_1.pdf}}} {\scalebox{0.42}{\includegraphics*{Fig4_delta_2.pdf}}} \color{black} \caption{Demonstration of the first feature, i.e., $\Delta$, which is the price distance of bid from average hourly D-LMP: a) in a supply bid; b) in a demand bid.} \color{black} \label{fig:dist_def} \end{figure} \color{black} Fig. 4 shows the definition of the first feature for a multi-step supply CB and a multi-step demand CB. This feature is denoted by $\Delta$. \color{black} In this figure, the green horizontal dashed line is the average hourly D-LMPs for the hour corresponding to a given CB. Three green lines show three possible different cases that will be explained in follow. \color{black} First, consider a supply CB \color{black} in sub-figure (a)\color{black}. Three cases can happen: 1) All the submitted price values in a given CB are higher than the average D-LMP. In other words, the entire piecewise linear function for the submitted CB is above the average D-LMP. In this case, \color{black} $\Delta > 0$ and it \color{black} is defined to be equal to the minimum price value in the submitted CB minus the average D-LMP. 2) All the submitted price values in a given CB are lower than the average D-LMP. In other words, the entire piecewise linear function for the submitted CB is below the average D-LMP. In this case, \color{black} $\Delta < 0$ and it \color{black} is defined to be equal to the maximum price value in the submitted CB minus the average D-LMP. 3) The average D-LMP is somewhere between the minimum and the maximum price values in the submitted CB. In other words, the average D-LMP has an intersection with the piecewise linear function for the submitted CB. In this case, \color{black} $\Delta = 0$ and it \color{black} is defined to be zero. Next, consider a demand CB \color{black} in sub-figure (b)\color{black}. Again, three cases can happen, which can be defined similarly. The only difference is that, when it comes to a demand CB, in the first case, $\Delta$ is equal to the average D-LMP minus the minimum price value in the submitted CB (not the other way around); and in the second case, $\Delta$ is equal to the average D-LMP minus the maximum price value in the submitted CB (not the other way around). In other words, the previously defined $\Delta$ should be multiplied by -1. \color{black} The second feature indicates whether the same type of CB, i.e. a supply CB or a demand CB, has been consistently used by a market participant at a nodal location. This feature is a number between $0$ and $1$. \color{black} This feature indicates whether the type of the submitted CB is similar or dissimilar to the type of the CBs historically submitted by the same market participant at the same location. The value of this feature is close to $1$, if the market participant consistently selects the same type of CB at the given node; and the new submitted CB also has the same type. The value of this feature is close to $0$, if the market participant consistently selects the same type of CB at the given node; but the new submitted CB has a different type. Finally, the value of this feature is close to $0.5$ if the market participant frequently changes the type of its submitted CBs at the given node; i.e., it submits a mix of both supply CBs and demand CBs. \color{black}As an example, consider all the previous CBs that are submitted by a market participant at a node. Suppose 60\% of the CBs are supply bids and 40\% of the CBs are demand bids. If the current CB is a supply CB, then the second feature would be 0.6. If the current CB is a demand CB, then the second feature would be 0.4. \color{black} In this work, a window of one year of historical data, i.e., the data over the previous year, is considered for calculating this feature. \color{black} The third feature is the number of steps in the submitted CB, which is an integer number between one and ten. The fourth feature is driven by the fact that some market participants submit CBs \emph{only} at the major aggregated nodes, in the California ISO market, i.e., at one or more of its three Hubs, namely NP15, SP15, and ZP26, or its three Default Load Aggregated Points (DLAPs), which include San Diego Gas and Electric (SDG\&E), Pacific Gas and Electric (PG\&E), and Southern California Edison (SCE). Importantly, these major aggregated nodes have \emph{a higher level of predictability} for LMPs, compared to the regular APnodes. \color{black} This feature somewhat incorporated two other candidate features, namely the LMP volatility and the LMP forecast accuracy of the node where the CB is submitted. In fact, higher volatility in LMP values directly results in less accuracy in forecasting the LMP values. This fourth feature is a binary number on whether or not the node is a major aggregated node. It should be noted that, in the California ISO market, the major aggregated nodes are among the APnodes. \color{black} \subsection{Identified Convergence Bidding Clusters} Based on the introduced features in Section III.A, next, we classify the submitted CBs by using the Hierarchical Density-Based Spatial Clustering of Applications with Noise (HDBSCAN) method. HDBSCAN is a robust clustering algorithm that can work with little or no parameter tuning \cite{campello2013density}. The only parameter that needs to be tuned in this method is the minimum number of points in each cluster. \color{black} The data points in this analysis are the collection of all the submitted CBs over the three-year period of this study, which add up to 6.6 million CBs. The purpose of our clustering analysis is to gain insights from such a huge amount of data, such that we can identify the main convergence bidding strategies in the California ISO market. Accordingly, our analysis is a hybrid of applying data-driven algorithms and manual inspection of the data-driven results. \color{black} In the latter (i.e., manual) inspection, we examined the data-driven results with respect to the four features and we accordingly identified \color{black} three clusters that can cover practically all the existing major convergence bidding strategies in the California ISO market during the period of this study. In this process, we combined artificial intelligence with human expertise to translate the bidding data to the most meaningful clusters. It should be mentioned that, \color{black} the clustering in this paper is done only once and it is done for the entire dataset in the period of this study. Our approach to involve \color{black} both machine intelligence and human expertise, is very suitable for the purpose of this study which involves a huge amount of bidding data. The definition of each cluster and its work function is defined as follows: \vspace{0.05cm} \color{black}\textbf{CB Cluster 1 (Price-Forecasting Strategy):} This strategy is the case where the CB market participant submits price bids that are \emph{close} to the LMP values at the location where the CB is placed; making it evident that the market participant is trying to forecast the market prices at its bidding locations. For each hour of the next day, if the forecasted D-LMP is higher than R-LMP, then a supply CB is submitted. If the forecasted D-LMP is lower than R-LMP, then a demand CB is submitted. For a supply CB, the price values should be \emph{less} than the forecasted D-LMP but \emph{close} to it in order to avoid entering the market when D-LMP is unexpectedly low. Also, for a demand CB, the price values should be \emph{more} than the forecasted D-LMP but \emph{close} to it in order to avoid entering the market when D-LMP is unexpectedly high. As a result, in this cluster: 1) $\Delta$ is relatively small. 2) The correlation between the type of the submitted CB and those of the previous CBs of the same market participant at the same location is often {not} close to 1, because the convergence bidder is trying to actively forecast the LMPs. As a result, the types of the CBs are selected according to the forecast results, and they can vary depending on the market conditions. 3) The number of steps for the submitted CB can be single or multiple, and this is \emph{not} a determinative feature in this cluster of strategies. 4) The CB is mostly submitted in a major aggregated node, with a higher level of locational price predictability, because this strategy requires accurate forecasting of both D-LMP and R-LMP. However, in principle, it is possible that a market participant uses this strategy on regular APnodes, if they \emph{can} achieve accurate LMP forecasts at that node. \vspace{0.05cm} \textbf{CB Cluster 2 (Self-Scheduling Strategy):} This strategy is the case where the CB market participant does not mean to calculate and submit a price bid, i.e., its CB is mainly about its quantity. It should be clarified that, in principle, all CBs in the California ISO market \emph{must} include at least one price value. Thus, when a CB market participant follows a self-scheduling strategy, it still needs to include a price value in its CB. For a demand CB, the price value should be \emph{much higher} than the expected D-LMP for that hour, i.e., the average D-LMP for that hour, such that the submitted CB is always cleared in the market. For a supply CB, the price value should be \emph{much lower} than the expected D-LMP, such that the submitted CB is always cleared in the market. In both cases, i.e., whether the submitted CB is a demand bid or a supply bid, it would result in a large negative $\Delta$. Importantly, as far as the price-forecasting is concerned, the self-scheduling strategy only needs a \emph{rough forecast} about the \emph{sign} of the difference between D-LMP and R-LMP in order to decide on whether to submit a supply CB or a demand CB. For each hour of the next day, if the difference between D-LMP and R-LMP is expected to be \emph{positive}, then a supply CB is submitted; and if such difference is expected to be \emph{negative}, then a demand CB is submitted. As a result, in this cluster: 1) $\Delta$ is relatively large and negative. 2) The correlation between the type of the submitted CB and those of the previous CBs of the same market participant at the same location is often \emph{not} close to 1, because the convergence bidder may submit different types of CBs based on the expected sign of the difference between D-LMP and R-LMP. 3) The submitted CB is \emph{single} step. This is an important determinative feature in this cluster of strategies, because multi-step strategies cannot match the definition of self-scheduling bids. 4) The CB may be submitted at regular APnodes \emph{or} at the major aggregated nodes. \vspace{0.05cm} \textbf{CB Cluster 3 (Opportunistic Strategy):} This strategy is the case where the CB market participant does not want to get involved in the difficulties of doing an accurate price forecast, yet it does not want to be as passive as in the self-scheduling strategy (as far as the selection of its price bid is concerned). Hence, the market participant takes a third option, which is somewhat opportunistic. In this strategy, the CB market participant always submits either a supply CB that has a price bid that is considerably higher than the \color{black} D-LMPs\color{black}, or a demand CB that has a price bid that is considerably lower than the \color{black} D-LMPs\color{black}. In this regard, the CB market participant waits for a \emph{spike} in D-LMP to enter the market. As a result, the submitted bids are \emph{not} cleared most of the time. They are cleared only occasionally, when there is a \color{black}potential \color{black} opportunity to make a considerable profit. Interestingly, this is a completely new CB strategy and it does not match any of the strategic convergence bidding methods that currently exist in the literature. Thus, we will provide a detailed explanation about the application of this strategy in Section IV. In this cluster: 1) $\Delta$ is relatively large and positive. 2) The correlation between the type of the submitted CB and those of the previous CBs \emph{is} often close to 1. 3) The number of steps for the submitted CB can be single or multiple, and it is \emph{not} a determinative feature in this cluster. 4) The CB is almost always submitted at regular APnodes, but \emph{not} at the major aggregated nodes. This is an important determinative feature in this cluster, because convergence bidders should find those nodes that have a potential for experiencing price spikes. Major aggregated nodes with high levels of predictability do not carry this characteristic. \color{black} The above three identified clusters and their introduced characteristics address Research Question 2. The above analysis can also be used to address Research Question 3. Importantly, while \color{black} CB Cluster 2 is \emph{less} common among market participants, yet many of the existing papers in the literature \emph{are} in fact focused on this strategy; such as some of the papers that we cited in Section I.C. Furthermore, CB Cluster 3 is a common strategy in the California ISO market, yet it does \emph{not} match any of the strategic convergence bidding methods that currently exist in the literature. In fact, the strategy in CB Cluster 3 is currently used by several market participants, including Alias ID 1, which is the most active market participant in the California ISO market, in terms of the number of submitted CBs. Another note to highlight is that the \emph{same} market participant may have \emph{different} strategies at \emph{different} nodes. For example, consider the hourly value of the first feature ($\Delta$) in Fig. \ref{fig:214147_dist} for the submitted CBs by Alias ID 5 in two \emph{different} locations. As we can see, there is a clear distinction between the strategies that Alias ID 5 chose at these two different locations. \begin{figure}[t] \centering {\scalebox{0.45}{\includegraphics*{Fig5_locations.pdf}}} \caption{The first feature ($\Delta$) for Alias ID 5 at two different locations during 2019. It is evident that this CB market participant uses two different bidding strategies as these two different locations.} \label{fig:214147_dist} \end{figure} \begin{figure}[t] \centering {\scalebox{0.45}{\includegraphics*{Fig6_change.png}}} \color{black} \caption{The first feature ($\Delta$) at each hour for Alias ID 6 over a period of two years. It is evident that this CB market participant changed its bidding strategy in February 2019.} \color{black} \label{fig:chng_str} \end{figure} \color{black} An interesting observation is that, some of the CB market participants have clearly \emph{changed} their strategy during the period of this study. For example, Fig. \ref{fig:chng_str} shows the first introduced feature, i.e., the distance of the submitted price bids from the average D-LMPs, at each hour for Alias ID 6. We see that this market participant clearly changed its bidding strategy around February 2019. While its bidding strategy in 2018 mostly matches the Opportunistic Strategy, its bidding strategy in 2019 mostly matches the Price-Forecasting Strategy. \color{black}As a side note, no other market participant changed her convergence bidding strategy around the date that Alias ID 6 changed her strategy. Therefore, while we cannot speculate on the reason for Alias ID 6 to change her strategy, it is more likely that the change was due to Alias ID 6’s own internal factors than a change in the system. \color{black} \subsection{Performance Comparison among Identified Strategies} \label{sec:performance} To complete the reverse engineering task, next, we evaluate the performance of each CB cluster to understand the advantages and the disadvantages of different CB strategies. \color{black} Two metrics are used to assess and compare the performance of different CB clusters. The first metric is the \emph{cleared-to-submitted-ratio} (CSR), which is the percentage of the submitted CBs that are cleared in the market for each market participant: \begin{equation} \text{CSR} = \frac{\text{Number of Cleared CBs}}{\text{Number of Submitted CBs}} \times 100. \end{equation} The second metric is the \emph{loss-to-profit-ratio} (LPR), which can help capture the level of loss compared to the level of profit. This metric is defined as follows: \begin{equation} \label{define_LPR} \text{LPR} = \frac{\text{Total Loss}}{\text{Total Profit}} \times 100. \end{equation} A lower CSR indicates that only a small portion of the submitted CBs for a given market participant at a given node is cleared. A lower LPR indicates that the cleared CBs of a given market participant at a given node resulted in more profits than losses. Together, CSR and LPR draw a clear picture about the portion of the CBs that are cleared and the circumstances in terms of loss versus profit for the cleared CBs. \color{black} Note that, we do \emph{not} consider the total net profit as a comparison factor, because it depends on each market participant's credit in the California ISO market, which limits the quantity of their submitted CBs. \begin {table}[t] \color{black} \centering \caption {Percentage of Submitted CBs that Are Cleared in the \\ Market for Each Alias ID in Each Year.} \label{tab3} \begin{center} \begin{tabular}{| c | c | c | c |} \hline Alias ID & 2017 (\%) & 2018 (\%) & 2019 (\%) \\ \hline 1 & 3.58 & 3.59 & 2.45 \\ \hline 2 & 66.12 & 65.72 & 67.36 \\ \hline 3 & 68.43 & 68.86 & 48.32 \\ \hline 4 & - & 98.68 & 94.38 \\ \hline 5 & 33.46 & 12.54 & 5.25 \\ \hline 6 & 7.29 & 14.41 & 44.49 \\ \hline 7 & 5.52 & 13.48 & 11.51 \\ \hline 8 & 100 & 4.54 & 14.23 \\ \hline 9 & 88.36 & 94.15 & 76.77 \\ \hline 10 & 56.99 & 60.57 & 40.17 \\ \hline 11 & - & 99.84 & 99.98 \\ \hline 12 & - & 61.14 & 54.99 \\ \hline 13 & 61.14 & 51.78 & 51.12 \\ \hline 14 & 98.19 & 93.11 & 95.54 \\ \hline 15 & 96.45 & 99.9 & 99.79 \\ \hline 16 & 68.81 & 81 & 75.64 \\ \hline 17 & 86.43 & 88.15 & 49.98 \\ \hline 18 & 82 & 59.73 & 33.62 \\ \hline 19 & 78.45 & 83.99 & 84.15 \\ \hline 20 & 98.79 & 98.13 & - \\ \hline \end{tabular} \end{center} \end{table} \color{black} The CSR is listed in Table \ref{tab3} for all the identified Alias IDs. \color{black} For each CB cluster, the performance of one representative market participant is considered for benchmarking. \begin{figure}[t] \color{black} \centering {\scalebox{0.45}{\includegraphics*{Fig7_id_profit.pdf}}} \caption{Total yearly amount of earned/lost profit by each Alias ID.} \label{fig:totl_prft_id} \end{figure} \color{black} \color{black} Alias ID 9, which is the \emph{most lucrative} CB market participant in the California ISO market (Fig. \ref{fig:totl_prft_id}), mostly used the Price-Forecasting Strategy on the major APnodes. Fig. \ref{fig:SDGE_990504} shows the hourly per unit profit (\$/MWh) for Alias ID 9 in one of the three DLAPs using the Price-Forecasting Strategy. As we can see, there are many hours with a loss for the submitted CBs by this market participant. For these CBs, CSR and LPR are 86.43\% and 73.62\%, respectively. These values show that most of the submitted CBs by Alias ID 9 are cleared, and some of the cleared ones resulted in a positive profit. \color{black} \begin{figure}[t] \centering {\scalebox{0.45}{\includegraphics*{Fig8_id9_profit.pdf}}} \caption{Hourly profit for Alias ID 9 using the Price-Forecasting Strategy at a DLAP.} \label{fig:SDGE_990504} \end{figure} \begin{figure}[t] \centering {\scalebox{0.45}{\includegraphics*{Fig9_id1_profit.pdf}}} \caption{Hourly profit for Alias ID 1 using the Opportunistic Strategy at four different locations in the market.} \label{fig:774727} \end{figure} \color{black} \begin{figure}[t] \color{black} \centering {\scalebox{0.45}{\includegraphics*{Fig10_share_strtgy.pdf}}} \caption{The share of each identified strategy for each market participant.} \label{fig:share_strtgy} \end{figure} \color{black} Alias ID 1, which is the most \emph{active} market participant in terms of the number of submitted CBs, used the Opportunistic Strategy in \emph{most} of the nodes. Fig. \ref{fig:774727} shows the hourly per unit profit for Alias ID 1 at four different locations using the Opportunistic Strategy. It should be mentioned that only the non-zero profits are shown in Fig. \ref{fig:774727}. As we can see, there are only a few days that \emph{any} of the submitted CBs is cleared. But Alias ID 1 had excellent profit on those few days. \color{black} For these CBs, CSR and LPR are 0.24\% and 3.04\%, respectively. These values show that only a few submitted CBs are cleared, but most of the cleared ones resulted in a positive profit. \color{black} Alias ID 11 always used the Self-Scheduling Strategy as its strategy. As mentioned in Section III.B, this strategy is \emph{less} common among the market participants. Fig. \ref{fig:totl_prft_id} shows that Alias ID 11 did \emph{not} gain a high profit during its presence in the market despite participating in more than 300 nodes. From Table \ref{tab3}, almost 100\% of Alias ID 11's CBs are cleared in the market. \color{black} For this market participant, CSR is 90.90\%. \color{black} The share of each implemented CB strategy for each CB market participant is calculated. The results for each of the 20 most present CB market participants are shown in Fig. 10. This figure shows the share of each strategy for each Alias ID. We can see that each of the three identified convergence bidding strategies has been used in the market. In total, out of the 6.6 million submitted CBs that were analyzed during the period of this study for all the 101 CB market participants in the California ISO market, here is the share of each convergence bidding strategy: 35.95\% of all the submitted CBs belong to CB Cluster 1 (Price-Forecasting Strategy), 15.58\% of all the submitted CBs belong to CB Cluster 2 (Self-Scheduling Strategy), 35.33\% belong to CB Cluster 3 (Opportunistic Strategy), and 13.14\% of all the submitted CBs belong to Other (Unidentified) strategies. \color{black} As it is evident from the above numbers, \emph{three} is the exact number of the clusters of strategies that take \emph{significant shares} of the real-world convergence bids in the period of this study. On one hand, a smaller number of clusters would inevitably ignore at least one of the three significant real-world strategies. On the other hand, a larger number would inevitably add a very insignificant strategy which can distract the focus from the three significant strategies and their characteristics and implications. Collectively, the analyses in Sections III-B and III-C address Research Question 4 that we had raised in Section I.A. \color{black} \section{Designing a Comprehensive Convergence Bidding Strategy Based on the Reverse Engineering Results} \label{sec:optiz} In this section, we \color{black} seek to address Research Question 5. In this regard, we \color{black}propose a new comprehensive composite convergence bidding strategy based on the results in Section III. The key question is: \emph{now that we have learned the strategic behaviors of various real-world CB market participants through reverse engineering, can we go one step further and create a new CB strategy that can learn from the advantages and disadvantages of the existing strategies to significantly outperform them?} The answer is \emph{yes}. In this section, we discuss how such a strategy can be developed. The proposed composite convergence bidding strategy is developed in three steps. \textbf{\emph{First}}, we focus on the Opportunistic Strategy, i.e., the CB strategy that is completely new and has never been discussed in the literature. In this step, we propose an optimization-based algorithm to maximize the net profit of the market participant by \emph{capturing the spikes} in D-LMPs with an optimal price bid at each node. \emph{\textbf{Second}}, we introduce an algorithm to \emph{label} each node based on the solution of the optimization problem in the first step. This labeling is necessary to find out what kind of CB (if any) is more profitable at each node. Each node can be labeled as Demand CB Node, or Supply CB Node, or Neither, or Both. \textbf{\emph{Third}}, by using the results from the first two steps, and combining them with the results from Section III about CB Cluster 1 and CB Cluster 2, we propose the new composite CB strategy. \subsection{Step 1: Net Profit Maximization by Capturing Price Spikes} \label{sec:step1} \subsubsection{Basic Idea} We define \emph{price spikes} as the cases where D-LMPs demonstrate abnormalities by being much higher or much lower than the average D-LMP at the same location and the same hour. By using the historical data at each node, we formulate an optimization problem to find the \emph{optimal price bid} that could maximize the net profit with \emph{minimum loss} for a CB with a unit quantity. If there is a feasible solution for the formulated optimization problem, then the optimal price bid will be used for each hour of the next day for that given node. Price spikes can be both negative or positive. A demand CB is required to take advantage of a negative spike in D-LMPs, i.e., low prices. Similarly, a supply CB is required to take advantage of a positive spike in D-LMPs, i.e., high prices. \subsubsection{Optimization Problem Formulations} The following optimization problem is designed to capture the negative spikes with a demand CB at each node in order to maximize the total net profit with minimum loss. At each time interval, if the net profit ($\eta_t$) is positive, then it is considered as a profit ($P_t$); and if it is negative, then it is considered as a loss ($L_t$). \color{black} Note that, this optimization problem makes use of only the historical data that are already known to the market participant. \color{black} Thus, it does \emph{not} require dealing with the difficulties associated with price forecasting. Hence, this analysis is inherently not sensitive to the accuracy of price forecasting. \color{black} Here, $T$ is the set of historical time intervals that a market participant considers in analyzing the historical price spikes. \color{black} \begin{align} & {\text{maximize}} && Obj : \sum\limits_{t = 1}^T \eta_t\\ & \text{subject to} && \eta_t = (\pi_t - \lambda_t) \; | \; \lambda_t \leq x_t, &\forall t \in T \\ & && x_t = {\lambda}_t^{*} - m &\forall t \in T \\ & && P_t = \eta_t \; | \; \eta_t \geq 0, &\forall t \in T \\ & && L_t = \eta_t \; | \; \eta_t \leq 0, &\forall t \in T \\ & && -\sum\limits_{t = 1}^T L_t \leq \epsilon \times \sum\limits_{t = 1}^T P_t \\ & && m^{min} \leq m \leq m^{max}&& \end{align} \label{eq:noncnvx} The objective function (3) is the total net profit over the past $T$ time intervals. The amount of net profit for each time interval using a demand CB with a unit quantity is calculated in (4). Here, $\pi$ and $\lambda$ denote R-LMP and D-LMP, respectively; and $x$ is the price bid. The \emph{condition} in this constraint, which is denoted by a vertical line, indicates that the submitted price bid ($x$) is cleared \emph{only if} it is higher than D-LMP. Eq. (5) shows that the price bid for each hour is equal to the average of D-LMP for that hour minus $m$. In this optimization, $m$ is the main decision variable which is the \emph{distance} from the average hourly D-LMPs that is captured as a \emph{price spike criteria} by an optimal price bid. Eqs. (6) and (7) divide the net profit to \emph{profit} and \emph{loss} in each time interval. Eq. (8) is a bound constraint that is used to guarantee that the total amount of loss is less than a small percentage ($\epsilon$) of the total amount of profit. As we will discuss in Step 2 of the proposed method, only those nodes that have a \emph{feasible solution} for this optimization problem with an optimal objective value of greater than a \emph{threshold} are used in our proposed bidding strategy. As mentioned before, the optimization problem in (3)-(9) is for capturing the \emph{negative} spikes in D-LMPs with demand CBs. The same optimization problem can be used to capture the \emph{positive} spikes with supply CBs. We just need to replace the definition of net profit in (4)-(5) with the following: \begin{align} & && \eta_t = (\lambda_t - \pi_t) \; | \; \lambda_t \geq x_t, &\forall t \in T \ \! \\ & && x_t = {\lambda}_t^{*} + m &\forall t \in T && \end{align} \label{eq:spplycb} \vspace{-.4cm} \subsubsection{Solving the Formulated Problems} The introduced optimization problems are \emph{non-convex} and may not be solved efficiently and quickly in their current forms. Importantly, it is necessary to have a computationally tractable formulation as these optimization problems must be solved \emph{each} day for \emph{all} the nodes in the market. In two steps, we convert the optimization problem (3)-(9) into a Mixed-Integer Linear Program (MILP). First, we introduce a binary variable ($b_{t}^1$) and utilize the Big-M method to convert Eq. (4) to the following linear constraints \cite{samani2019tri}: \begin{align} & && \eta_t = b_{t}^1 \times (\pi_t - \lambda_t), &\forall t \in T \ \! \\ & && x \geq \lambda_t - M \times (1-b_{t}^1), &\forall t \in T \ \! \\ & && x \leq \lambda_t + M \times b_{t}^1, &\forall t \in T && \end{align} \label{eq:ax_2} \noindent where $M$ is a large fixed parameter in the Big-M method. Next, equations (6)-(7) are transformed to the following: \begin{align} & && P_t = \eta_t \times b_{t}^2 &\forall t \in T \\ & && L_t = \eta_t \times (1-b_{t}^2), &\forall t \in T \\ & && \eta_t \geq -M \times (1-b_{t}^2), &\forall t \in T \\ & && \eta_t \leq M \times b_{t}^2, &\forall t \in T && \end{align} \label{eq:ax_3} \noindent where $b^1$ and $b^2$ are binary variables. By replacing $R_{t}$ in equations (15)-(18) with equation (12), the new MILP maximization problem will be formulated as follows: \begin{align} & {\text{maximize}} && Obj : \sum\limits_{t = 1}^T b_{t}^1 \times (\pi_t - \lambda_t)\\ & \text{subject to} && {\lambda}_t^{*} - m \geq \lambda_t - M (1-b_{t}^1), &\forall t \in T \\ & && {\lambda}_t^{*} - m \leq \lambda_t + M \times b_{t}^1, &\forall t \in T \\ & && b_{t}^1 \times (\pi_t - \lambda_t) \geq -M (1-b_{t}^2), &\forall t \in T \\ & && b_{t}^1 \times (\pi_t - \lambda_t) \leq M \times b_{t}^2, &\forall t \in T \\%& & && \sum\limits_{t = 1}^T (z_t - b_{t}^1) \times (\pi_t - \lambda_t) \leq \nonumber \\ & && \qquad \epsilon \times \sum\limits_{t = 1}^T z_t \times (\pi_t - \lambda_t) \\ & && m^{min} \leq m \leq m^{max} \\ & && z_t \leq b_t^1, &\forall t \in T \\ & && z_t \leq b_t^2, &\forall t \in T \\ & && z_t \geq b_t^1 + b_t^2 -1, &\forall t \in T \\ & && 0 \leq z_t \leq 1, &\forall t \in T & \end{align} \label{eq:cnvx} \color{black} The optimization problem in (19)-(29) is the linearized version of the optimization problem in (3)-(9). The process of linearizing this optimization problem is done through (12)-(18). Note that, $z$ is a \emph{new} continuous auxiliary variable which takes the value of the multiplication of $b^1$ and $b^2$ to avoid the nonlinearity. Constraints (26)-(29) are added to the linearized optimization problem in order to create the required conditions for $z$ to be able to work as the multiplication of $b^1$ and $b^2$. This final MILP optimization problem in (19)-(29) can be solved by using various commercial solvers. \color{black} \subsection{Step 2: Dynamic Node Labeling} Algorithm 1 is developed to dynamically \emph{label} each node for the next day, using the optimization-based results in Step 1. For each node, first, we solve the negative and the positive spike capturing problems. If the \emph{optimal objective value} for the negative spike capturing problem is greater than a threshold, then the node is labeled as Demand CB Node. If the \emph{optimal objective value} for the positive spike capturing problem is greater than a threshold, then the node is labeled as Supply CB Node. The two optimization problems are independent; hence, a node can be labeled \emph{both} as Demand CB Node and Supply CB Node. A node may also be labeled as No CB Node. As another output of the optimization problem in (19)-(29), $m$ is used for generating the optimal price bid for each hour of the next day based on the label of each node. If a node is labeled as Demand CB Node, Supply CB Node, or Both, then it will be considered for the next (final) step in the proposed convergence bidding strategy, as we will explain next. \subsection{Step 3: Strategy Selection} \label{sec:propos} In this section, we put together all the components, including the optimization-based price spike capturing method in Step 1 and the dynamic node labeling method in Step 2 to develop a new composite convergence bidding strategy. The new CB strategy makes use of each of three reverse engineering CB strategies based on their advantages and disadvantages. \begin{algorithm}[t] \caption{Dynamic Node Labeling} \label{algo1} \begin{algorithmic}[1] \State \textbf{Input:} Outputs of Optimization-Based Spike Capturing \State \textbf{Output:} Label and Optimal Price Bid for each Node \For {$n$ in Nodes} \State Solve the negative spike capturing problem in (3)-(9). \If {$Obj > \theta $} \State Label $n$ as a \emph{Demand CB Node} \State Optimal Price Bid $=\lambda_t^{*} - m$ \EndIf \State Solve the positive spike capturing problem in (3), (6)-(11). \If {$Obj > \theta $} \State Label $n$ as a \emph{Supply CB Node} \State Optimal Price Bid $=\lambda_t^{*} + m$ \EndIf \EndFor \end{algorithmic} \end{algorithm} The inputs for this comprehensive strategy are the historical LMPs and the forecasted LMPs for the next day. The output is the type of strategy that should be used at each node for each hour of the next day. The outline of this strategy is shown in Fig. \ref{fig:flowchrt}. Here, $a^{\lambda}$, $a^{\pi}$, and $a^{\delta}$ are the accuracy for the forecasted D-LMP, R-LMP, and the sign of the difference between D-LMP and R-LMP, respectively. As we can see, the first two strategies in this algorithm are based on the \emph{forecast accuracy} of the next day LMPs. On the other hand, the third strategy does not use any price forecast data and instead, relies on the historical LMPs, optimization-based price spike capturing, and node labeling. It must be mentioned that these three strategies are based on the three identified clusters of strategies in Section III.B. \color{black} The choice of the thresholds for the mentioned forecast accuracy defines the risk preference for the use of each strategy. Higher thresholds in Fig. \ref{fig:flowchrt}, mean less risk-seeking; and lower thresholds mean more risk-seeking. \color{black} The application of each strategy is as follows: \begin{figure}[t] \centering {\scalebox{0.66}{\includegraphics*{Fig11_strtgy_flowchart.pdf}}} \caption{The proposed comprehensive convergence bidding strategy for each hour of the next day and at each node in the market, based on the reversed engineered strategies of market participants.} \label{fig:flowchrt} \end{figure} \vspace{0.1cm} \textbf{Selecting CB Strategy 1}: This strategy is selected if both D-LMP and R-LMP forecasts are available and have high accuracy. For each hour of the next day, if the forecasted D-LMP is higher than R-LMP, then a supply CB is submitted. If the forecasted R-LMP is higher than D-LMP, then a demand CB is submitted. For a supply CB, the price components should be \emph{less} than the forecasted D-LMP but \emph{close} to it in order to avoid entering the market when D-LMP is unexpectedly low. Also, for a demand CB, the price components should be \emph{more} than the forecasted D-LMP but \emph{close} to it in order to avoid entering the market when D-LMP is unexpectedly high. \vspace{0.1cm} \textbf{Selecting CB Strategy 2}: This strategy should be used if only the forecast for the sign of the difference between D-LMP and R-LMP is available and it has high accuracy. For each hour of the next day, if the difference between D-LMP and R-LMP is \emph{positive}, then a supply CB is submitted; and if it is \emph{negative}, then a demand CB is submitted. The price components for a supply CB must be \emph{much lower} than the average D-LMP; and for a demand CB, it must be \emph{much higher} than the average D-LMP on that hour in order to always be cleared in the market. \vspace{0.1cm} \textbf{Selecting CB Strategy 3}: This strategy is used when accurate forecasting for LMPs are \emph{not} available at a node. Using the historical LMPs in the spike capturing optimization problem and the node labeling algorithm, the optimal price bid and the type of CB are determined for a node. As explained in Step 1, the optimal price component of the submitted CB is the best price bid to capture the price spikes; which leads to a situation where the convergence bidders participate in the CB market only occasionally, but when their CB is cleared they gain considerable profit. This behavior is indeed justified, because in the absence of accurate price forecasting capability, one should avoid taking high risks. \color{black} It must be emphasized that, each strategy has its own importance and it forms part of the proposed enhanced composite bidding strategy. For example, although we showed that the performance of the Self-Scheduling Strategy is not as good as the other two strategies in the California ISO market, the Self-Scheduling Strategy does bring value to our composite bidding strategy when there is an accurate forecast only for the sign of the difference between D-LMP and R-LMP. If there is an accurate forecast for both D-LMP and R-LMP, then the Price-Forecasting Strategy would be a better choice. \color{black} Importantly, the construction of the above proposed algorithm also addresses Research Question 6. Here, the seemingly unprofitable (or low profitable) CB strategy is the second strategy. It is now incorporated as one part of an enhanced and profitable new bidding strategy. Another note to mention is that, the overall architecture of our proposed composite bidding strategy is \emph{not} sensitive to or even directly related to the specific building of the explained clusters. That is, if other major clusters of bidding strategies emerge in the future, they too can potentially be incorporated into the architecture of our proposed composite bidding strategy by reveres engineering their main characteristics. \color{black} Before ending this section, it should be mentioned that the quantity of submitted CBs (MWh) at each hour, depends on the available credit for each market participant with the California ISO. Accordingly, a unit value is considered in the proposed bidding strategy for the quantity of submitted CBs, which is aligned with other studies in the literature such as \cite{baltaoglu2018algorithmic}. \subsection{Case Study} In this section, we analyze the performance of the proposed comprehensive convergence bidding strategy. Since providing an accurate and realistic forecast for D-LMPs and R-LMPs is out of the scope of this work, here we assume that we have the same forecasting accuracy as Alias ID 9, which is the most lucrative CB market participant in the California ISO market during the period of this study. Our goal here is to examine how Alias ID 9 could improve its performance in 2019, if it had used our proposed composite strategy. \color{black} The value for $M$ in the Big-M method is tuned to be a sufficiently large number. In this regard, it is set to 3000. Also, the boundaries for $m$ in equation (25) are set to 30 and 200, respectively; which are based on our observations on the real-world data. \color{black} The analyses in this section are done in Python and the optimization problems are solved by using Gurobi within the Pyomo package on a PC with Intel Xeon Silver 4208 CPU @2.10GHz and 128 GB RAM. As mentioned before, Alias ID 9 mostly participated in the main Hubs and DLAPs by utilizing the Price-Forecasting Strategy. For other nodes, we use one year of historical data before each day in 2019 and run the dynamic node labeling algorithm including the optimization-based spike capturing problem. By adjusting the only two hyperparameters, $\epsilon$ and $\theta$, the nodes with the potential to use the Opportunistic Strategy are labeled and the optimal price bid is submitted for each hour of the next day. The submitted CBs have one step and the quantity of each submitted CB is considered as the average of Alias ID 9's submitted CBs equal to 50 MW, instead of a unit value. All the above assumptions match the overview of the actual market data in Table \ref{tab2}. \begin {table}[t] \centering \caption {Results for Three Analyzed Cases Based on \\ Different Values of the Hyperparameters.} \label{tab4} \begin{center} \begin{tabular}{| c | c | c | c | c | c | c |} \hline Case & $\epsilon$ & $\theta$ & Node & Day & $\eta$ (\$M) & LPR (\%) \\ \hline 1 & 0.01 & 100 & 148 & 227 & 3.89 & 24.84 \\ \hline 2 & 0.001 & 1000 & 32 & 66 & 2.13 & 11.14 \\ \hline 3 & 0.0001 & 2000 & 25 & 40 & 1.55 & 5.25 \\ \hline \end{tabular} \end{center} \end{table} \begin{figure}[t] \centering {\scalebox{0.45}{\includegraphics*{Fig12_add_1.pdf}}} \caption{The \emph{additional} hourly net profit in Case 1. Each color represents one of the 148 labeled nodes where the submitted CBs are cleared.} \label{fig:add_prft_cs2} \end{figure} \begin{figure}[t] \centering {\scalebox{0.45}{\includegraphics*{Fig13_add_2.pdf}}} \caption{The \emph{additional} hourly net profit in Case 2. Each color represents one of the 32 labeled nodes where the submitted CBs are cleared.} \label{fig:add_prft} \end{figure} Table IV shows three cases based on different values for the hyperparameters. We can see that, by tightening the constraints (decreasing $\epsilon$ and increasing $\theta$) from Case 1 to Case 3, the number of nodes and days that the submitted CBs are cleared has decreased. \color{black} As we defined in (2), LPR indicates the level of loss compared to the level of profit. Also, recall from Section IV.A that $\eta$ denotes the total net profit. \color{black} As we can see in Table IV, by tightening the constraints, although the total net profit is decreased, the loss-to-profit-ratio as an important factor in the Opportunistic Strategy is also decreased. \color{black} Therefore, these two parameters can be used as control knobs by the market participant to suitably adjust the level of risk seeking in this composite bidding strategy. \color{black} Figs. \ref{fig:add_prft_cs2} and \ref{fig:add_prft} show the additional hourly net profit for Case 1 and Case 2. \color{black} Note that, notation \$K means \$1,000. \color{black} In Fig. \ref{fig:add_prft}, for Case 2 as a moderate case, it is shown that by submitting CBs at 32 nodes and entering the CB market in only 66 days, Alias ID 9 could earn an \emph{additional} net profit of \$2.13 million. This is a 43\% increase in Alias ID 9's net profit in 2019, compared to its current net profit of \$4.9 million. \color{black} In order to further extended the assessment of the increase in net profit, Table V shows the original annual net profit of four market participants (Alias IDs) in 2019 and compares them with the corresponding annual net profit of the same market participant in case she had used the proposed convergence bidding method in Algorithm 1. Similar to the previous test case for Alias ID 9 as the most lucrative market participant, here we use the average quantity in MWh from Table II for the size of the CBs for each market participant. We can see that all these four market participants that were mainly focused on the third strategy based on Fig. 10, could have significantly benefited from the proposed convergence bidding strategy. \color{black} \color{black} \begin {table}[t] \color{black} \centering \caption {Comparing the Performance of the Proposed Method with \\ Four Alias ID in 2019 which Mostly Used the Third Strategy.} \label{tab5} \begin{center} \begin{tabular}{| c | c | c | c |} \hline Alias & Original & New & Improvement \\ ID & Net Profit (\$M) & Net Profit (\$M) & (\$M) \\ \hline 1 & 0.30 & 1.27 & 0.97 \\ \hline 5 & 0.31 & 3.26 & 2.95 \\ \hline 6 & 0.44 & 2.1 & 1.66 \\ \hline 8 & 0.58 & 0.84 & 0.26 \\ \hline \end{tabular} \end{center} \end{table} \color{black} \section{Conclusions and Future Work} \label{sec:conclusions} This paper provided a data-driven analysis of real-world electricity market data from the California ISO market to \emph{understand}, \emph{reverse engineer}, and \emph{enhance} the behavior of convergence bidders. It was discussed that a total of 20 CB market participants currently have a considerable presence in the California ISO that accounts for 72\% to 84\% of the entire CB market. The different bidding characteristics of these most present market participants were analyzed. Next, four quantitative features were extracted from all the submitted CBs; and by using the HDBSCAN algorithm, three main clusters of CB strategies were identified. The characteristics and the performance of each identified cluster of strategies were analyzed and some of their \emph{advantages} and \emph{disadvantages} were investigated. Two interesting discoveries were discussed. First, the Opportunistic Strategy does \emph{not} match any of the convergence bidding strategies that currently exist in the literature. Second, most papers in the literature are focused on the Self-Scheduling Strategy, while in practice, this strategy is \emph{less} common among the market participants in the California ISO. After reverse engineering the convergence bidding strategies of the real-world market participants in the California ISO market, a new comprehensive \emph{composite} CB strategy was proposed. It was shown that the proposed strategy, optimally utilizes the advantages of various identified reverse engineered strategies under different market conditions. The new strategy was developed in three steps: First, by focusing on the Opportunistic Strategy as the newly discovered strategy, an optimization-based algorithm was proposed to maximize the total net profit of the market participant by capturing the price spikes. Second, an algorithm was developed to dynamically label each node based on the solution of the optimization problem in the first step. Third, by using the results from the first two steps for the Opportunistic Strategy, as well as by combining them with the Price-Forecasting Strategy and the Self-Scheduling Strategy, a strategy selection algorithm was proposed to complete a comprehensive composite CB strategy. It was shown in a case study that the annual profit of the most lucrative market participant could increase by over 40\% if the proposed comprehensive strategy had been used. The study in this paper can be extended in different directions. For example, we may investigate how the identified real-world CB strategies may positively or negatively affect price convergence and the efficiency of the electricity market. In other words, we may investigate the system-level impact of the identified real-world bidding strategy and/or the proposed composite bidding strategy. We may also analyze and reverse engineer the bidding strategy of the market participants that also submit physical bids. \color{black} Another interesting path for potential future research is to investigate the impact of the behavior of CB market participants on each other; i.e., by using concepts and methods in Game Theory. \color{black} \vspace{0.2cm} \bibliographystyle{IEEEtran}
\section{Introduction} Neural language models have become the foundation for modern NLP systems \citep{devlin2019bidirectional,radford2018improving}, but what they understand about language, and how they represent that knowledge, is still poorly understood \citep{belinkov2019analysis,rogers2020primer}. The \textit{probing} methodology grapples with these questions by relating neural representations to well-understood properties. Probing analyzes a representation by using it as input into a supervised classifier, which is trained to predict a property, such as part-of-speech \citep{shi2016does,ettinger2016probing,alain2016understanding,adi2017finegrained,belinkov2021probing}. % One suggests that a representation encodes a property of interest if probing that representation produces higher accuracy than probing a baseline representation like non-contextual word embeddings. However, consider a representation that encodes \textit{only} the part-of-speech tags that aren't determined by the word identity. Probing would report that this representation encodes \textit{less about part-of-speech} than the non-contextual word baseline, since ambiguity is relatively rare. Yet, this representation clearly encodes interesting aspects of part-of-speech. How can we capture this? In this work, we present a simple probing method to explicitly condition on a baseline.\footnote{Our code is available at \url{https://github.com/john-hewitt/conditional-probing}.} For a representation and a baseline, our method trains two probes: (1) on just the baseline, and (2) on the concatenation of the baseline and the representation. % The performance of probe (1) is then subtracted from that of probe (2). We call this process \textit{conditional probing}. Intuitively, the representation is not penalized for \textit{lacking} aspects of the property accessible in the baseline. We then theoretically ground our probing methodology in $\mathcal{V}$-information\xspace, a theory of \textit{usable} information introduced by \citet{xu2020theory} that we additionally extend to multiple predictive variables. We use $\mathcal{V}$-information\xspace instead of mutual information \cite{shannon1948mathematical,pimentel2020information} because any injective deterministic transformation of the input has the same mutual information as the input. For example, a representation that maps each unique sentence to a unique integer must have the same mutual information with any property as does BERT's representation of that sentence, yet the latter is more useful. In contrast, $\mathcal{V}$-information\xspace is defined with respect to a family of functions $\mathcal{V}$ that map one random variable to (a probability distribution over) another. % $\mathcal{V}$-information\xspace can be constructed by deterministic transformations that make a property more accessible to the functions in the family. We show that conditional probing provides an estimate of \textit{conditional $\mathcal{V}$-information\xspace} $I_{\mathcal{V}}(\text{repr} \rightarrow \text{property } | \text{ baseline})$. In a case study, we answer an open question posed by \citet{hewitt2019control}: how are the aspects of linguistic properties that \textit{aren't explainable by the input layer} accessible across the rest of the layers of the network? % We find that the part-of-speech information not attributable to the input layer remains accessible much deeper into the layers of ELMo \cite{peters2018deep} and RoBERTa \cite{liu2019roberta} than the overall property, a fact previously obscured by the gradual loss across layers of the aspects attributable to the input layer. For the other properties, conditioning on the input layer does not change the trends across layers. \section{Conditional $\mathcal{V}$-information\xspace Probing} In this section, we describe probing methods and introduce conditional probing. We then review $\mathcal{V}$-information\xspace and use it to ground probing. \subsection{Probing setup} We start with some notation. Let $X\in\mathcal{X}$ be a random variable taking the value of a sequence of tokens. Let $\phi(X)$ be a representation resulting from a deterministic function of $X$; for example, the representation of a single token from the sequence in a layer of BERT \cite{devlin2019bidirectional}. Let $Y\in\mathcal{Y}$ be a property (e.g., part-of-speech of a particular token), and $\mathcal{V}$ a \textit{probe family}, that is, a set of functions $\{f_\theta: \theta \in \mathbb{R}^{p}\}$, where $f_\theta : z \rightarrow \mathcal{P}(\mathcal{Y})$ maps inputs $z$ to probability distributions over the space of the label.\footnote{We discuss mild constraints on the form that $\mathcal{V}$ can take in the Appendix. Common probe families including linear models and feed-forward networks meet the constraints.} The input $z\in\mathbb{R}^m$ may be in the space of $\phi(X)$, that is, $\mathbb{R}^d$, or another space, e.g., if the probe takes the concatenation of two representations. In each experiment, a training dataset $\mathcal{D}_\text{tr} = \{(x_i,y_i)\}_i$ is used to estimate $\theta$, and the probe and representation are evaluated on a separate dataset $\mathcal{D}_{\text{te}} = \{(x_i,y_i)\}_i$. We refer to the result of this evaluation on some representation $R$ as $\text{Perf}(R)$. \subsection{Baselined probing} Let $B \in \mathbb{R}^d$ be a random variable representing a baseline (e.g., non-contextual word embedding of a particular token.) A common strategy in probing is to take the difference between a probe performance on the representation and on the baseline \cite{zhang2018language}; we call this \textbf{baselined probing performance}: \begin{align} \text{Perf}(\phi(X)) - \text{Perf}(B). \end{align} This difference in performances estimates how much more \textit{accessible} $Y$ is in $\phi(X)$ than in the baseline $B$, under probe family $\mathcal{V}$. But what if $B$ and $\phi(X)$ capture distinct aspects of $Y$? For example, consider if $\phi(X)$ captures parts-of-speech that aren't the most common label for a given word identity, while $B$ captures parts-of-speech that \text{are} the most common for the word identity. Baselined probing will indicate that $\phi(X)$ explains less about $Y$ than the baseline, a ``negative'' probing result. But clearly $\phi(X)$ captures an interesting aspect of $Y$; we aim to design a method that measures just what $\phi(X)$ \textit{contributes beyond $B$} in predicting $Y$, not what $B$ has and $\phi(X)$ lacks. \subsection{Our proposal: conditional probing} In our proposed method, we again train two probes; each is the concatenation of two representations of size $d$, so we let $z\in\mathbb{R}^{2d}$. The first probe takes as input $[B; \phi(X)]$, that is, the concatenation of $B$ to the representation $\phi(X)$ that we're studying. The second probe takes as input $[B; \mathbf{0}]$, that is, the concatenation of $B$ to the $\mathbf{0}$ vector. The conditional probing method takes the difference of the two probe performances, which we call \textbf{conditional probing performance}: \begin{align} \text{Perf}([B;\phi(X)]) - \text{Perf}([B;\mathbf{0}]). \end{align} Including $B$ in the probe with $\phi(X)$ means that $\phi(X)$ only needs to contribute what is missing from $B$. In the second probe, the $\mathbf{0}$ is used as a placeholder, representing the lack of knowledge of $\phi(X)$; its performance is subtracted so that $\phi(X)$ isn't given credit for what's explainable by $B$.\footnote{The value $\mathbf{0}$ is arbitrary; any constant can be used, or one can train the probe on just $B$.} % \subsection{$\mathcal{V}$-information\xspace} $\mathcal{V}$-information is a theory of \textit{usable} information---that is, how much knowledge of random variable $Y$ can be extracted from r.v. $R$ when using functions in $\mathcal{V}$, called a \textit{predictive family} \cite{xu2020theory}. Intuitively, by explicitly considering computational constraints, $\mathcal{V}$-information can be \emph{constructed} by computation, in particular when said computation makes a variable easier to predict. If $\mathcal{V}$ is the set of all functions from the space of $R$ to the set of probability distributions over the space of $Y$, then $\mathcal{V}$-information\xspace is mutual information \cite{xu2020theory}. However, if the predictive family is the set of all functions, then no representation is more useful than another provided they are related by a bijection. By specifying a $\mathcal{V}$, one makes a hypothesis about the functional form of the relationship between the random variables $R$ and $Y$. One could let $\mathcal{V}$ be, for example, the set of log-linear models. Using this predictive family $\mathcal{V}$, one can define the uncertainty we have in $Y$ after observing $R$ as the $\mathcal{V}$-entropy: \begin{align} \label{eqn_v_entropy} H_{\mathcal{V}}(Y|R) = \inf_{f\in\mathcal{V}}\mathbb{E}\big[-\log f[r](y)\big], \end{align} where $f[r]$ produces a probability distribution over the labels. Information terms like $I_{\mathcal{V}}(R \rightarrow Y)$ are defined analogous to Shannon information, that is, $I_{\mathcal{V}}(R \rightarrow Y) = H_{\mathcal{V}}(Y) - H_{\mathcal{V}}(Y|R)$. For brevity, we leave a full formal description, as well as our redefinition of $\mathcal{V}$-information\xspace to multiple predictive variables, to the appendix. \subsection{Probing estimates $\mathcal{V}$-information} With a particular performance metric, baselined probing estimates a difference of $\mathcal{V}$-information\xspace quantities. Intuitively, probing specifies a function family $\mathcal{V}$, training data is used to find $f\in V$ that best predicts $Y$ from $\phi(X)$ (the infimum in Equation~\ref{eqn_defn_ventropy}), and we then evaluate how well $Y$ is predicted. If we use the negative cross-entropy loss as the $\text{Perf}$ function, then \textbf{baselined probing} estimates \begin{align*} I_{\mathcal{V}}(\phi(X)\rightarrow Y) - I_{\mathcal{V}}(B\rightarrow Y), \end{align*} the difference of two $\mathcal{V}$-information quantities. This theory provides methodological best practices as well: the form of the family $\mathcal{V}$ should be chosen for theory-external reasons,\footnote{There are also PAC bounds \cite{valiant1984theory} on the estimation error for $\mathcal{V}$-information\xspace \cite{xu2020theory}; simpler families $\mathcal{V}$ with lower Rademacher complexity result in better bounds.} and since the probe training process is approximating the infimum in Equation~\ref{eqn_v_entropy}, we're not concerned with sample efficiency. % Baselined probing appears in existing information-theoretic probing work: \citet{pimentel2020information} define conditional mutual information quantities wherein a lossy transformation $c(\cdot)$ is performed on the sentence (like choosing a single word), and an estimate of the gain from knowing the rest of the sentence is provided; $I(\phi(X);Y|c(\phi(X)))= I(X;Y|c(X))$.\footnote{Equality depends on the injectivity of $\phi$; otherwise knowing the representation $\phi(X)$ may be strictly less informative than knowing $X$.} Methodologically, despite being a conditional information, this is identical to baselined probing, training one probe on just $\phi(X)$ and another on just $c(\phi(X))$.\footnote{ This is because of the data processing inequality and the fact that $c(\phi(X))$ is a deterministic function of $\phi(X)$. } \subsection{Estimating conditional information} Inspired by the transparent connections between $\mathcal{V}$-information and probes, we ask what the $\mathcal{V}$-information analogue of conditioning on a variable in a mutual information, that is, $I(X,Y|B)$. To do this, we extend % $\mathcal{V}$-information to multiple predictive variables, and design conditional probing (as presented) to estimate \begin{align*} I_{\mathcal{V}}(\phi(X)& \rightarrow Y | B) \\&= H_{\mathcal{V}}(Y|B) - H_{\mathcal{V}}(Y|B,\phi(X)), \end{align*} thus having the interpretation of probing what $\phi(X)$ explains about $Y$ apart from what's already explained by $B$ (as can be accessed by functions in $\mathcal{V}$). Methodologically, the innovation is in providing $B$ to the probe on $\phi(X)$, so that the information accessible in $B$ need not be accessible in $\phi(X)$. \section{Related Work} Probing---mechanically simple, but philosophically hard to interpret \cite{belinkov2021probing}---has led to a number of information-theoretic interpretations. % \citet{pimentel2020information} claimed that probing should be seen as estimating mutual information $I(\phi(X);Y)$ between representations and labels. This raises an issue, which \citet{pimentel2020information} notes: due to the data processing inequality, the MI between the representation of a sentence (from e.g., BERT) and a label is upper-bounded by the MI between the sentence itself and the label. Both an encrypted document $X$ and an unencrypted version $\phi(X)$ provide the same mutual information with the topic of the document $Y$. This is because MI allows unbounded work in using $X$ to predict $Y$, including the enormous amount of work (likely) required to decrypt it without the secret key. Intuitively, we understand that $\phi(X)$ is more useful than $X$, and that this is because the function $\phi$ performs useful ``work'' for us. Likewise, BERT can perform useful work to make interesting properties more accessible. While \citet{pimentel2020information} conclude from the data processing inequality that probing is not meaningful, we conclude that estimating mutual information is not the goal of probing. \citet{voita2020informationtheoretic} propose a new probing-like methodology, \textit{minimum description length (MDL) probing}, to measure the number of bits required to transmit both the specification of the probe and the specification of labels. Intuitively, a representation that allows for more efficient communication of labels (and probes used to help perform that communication) has done useful ``work'' for us. \citet{voita2020informationtheoretic} found that by using their methods, probing practitioners could pay less attention to the exact functional form of the probe. $\mathcal{V}$-information\xspace and MDL probing complement each other; $\mathcal{V}$-information\xspace does not measure sample efficiency of learning a mapping from $\phi(X)$ to $Y$, instead focusing solely on how well any function from a specific family (like linear models) allows one to predict $Y$ from $\phi(X)$. Further, in practice, one must choose a family to optimize over even in MDL probing; the complexity penalty of communicating the member of the family is analogous to choosing $\mathcal{V}$. Further, our contribution of conditional probing is orthogonal to the choice of probing methodology; it could be used with MDL probing as well. $\mathcal{V}$-information\xspace places the functional form of the probe front-and-center as a \textit{hypothesis} about how structure is encoded. This intuition is already popular in probing. For example, \citet{hewitt2019structural} proposed that syntax trees may emerge as squared Euclidean distance under a linear transformation. Further work refined this, showing that a better structural hypothesis may be hyperbolic \cite{chen2021probing} axis-aligned after scaling \cite{limisiewicz-marecek-2021-introducing}, or an attention-inspired kernel space \cite{white-etal-2021-non}. In this work, we intentionally avoid claims as to the ``correct'' functional family $\mathcal{V}$ to be used in conditional probing. Some work has argued for simple probe families \cite{hewitt2019control,alain2016understanding}, others for complex families \cite{pimentel2020information,hou2021birds}. % \citet{pimentel2020pareto} argues for choosing multiple points along an axis of expressivity, while \citet{cao2021low} define the family through the weights of the neural network. Other work performs structural analysis of representations without direct supervision \cite{saphra2018understanding,wu2020perturbed}. \citet{hewitt2019control} suggested that differences in ease of identifying the word identity across layers could impede comparisons between the layers; our conditional probing provides a direct solution to this issue by conditioning on the word identity. \citet{kuncoro2018lstms} and \citet{shapiro2021multilabel} use control tasks, and \citet{rosa2020measuring} measures word-level memorization in probes. Finally, under the possible goals of probing proposed by \citet{ivanova2021probing}, we see $\mathcal{V}$-information\xspace as most useful in \textit{discovering emergent structure}, that is, parsimonious and surprisingly simple relationships between neural representations and complex properties.\looseness=-1 \section{Experiments} In our experiments, we aim for a case study in understanding how conditioning on the non-contextual embeddings changes trends in the accessibility of linguistic properties across the layers of deep networks. \subsection{Tasks, models, and data} \paragraph{Tasks.} We train probes to predict five linguistic properties, roughly arranged in order from lower-level, more concrete properties to higher-level, more abstract properties. We predict five linguistic properties $Y$: (i) \textbf{upos}: coarse-grained (17-tag) part-of-speech tags \cite{nivre2020universal}, (ii) \textbf{xpos}: fine-grained English-specific part-of-speech tags, (iii) \textbf{dep rel}: the label on the Universal Dependencies edge that governs the word, (iv) \textbf{ner}: named entities, and (v) \textbf{sst2}: sentiment. \paragraph{Data.} All of our datasets are composed of English text. For all tasks except sentiment, we use the Ontonotes v5 corpus \citep{weischedel2013ontonotes}, recreating the splits used in the CoNLL 2012 shared task, as verified against the split statistics provided by \citet{strubell2017fast}.\footnote{In order to provide word vectors for each token in the corpus, we heuristically align the subword tokenizations of RoBERTa with the corpus-specified tokens through character-level alignments, following \citet{tenney2018what}.}\footnote{Ontonotes uses the destructive Penn Treebank tokenization (like replacing brackets \texttt{\{} with \texttt{-LCB-} \cite{marcus1993building}). We perform a heuristic de-tokenization process before subword tokenization to recover some naturalness of the text.} Since Ontonotes is annotated with constituency parses, not Universal Dependencies, we use the converter provided in CoreNLP \citep{schuster2016enhanced,manning2014stanford}. For the sentiment annotation, we use the binary GLUE version \cite{wang2018glue} of the the Stanford Sentiment Treebank corpus \citep{socher2013recursive}. All results are reported on the development sets. \paragraph{Models.} We evaluate the popular RoBERTa model \cite{liu2019roberta}, as provided by the HuggingFace Transformers package \citep{wolf2019huggingfaces}, as well as the ELMo model \citep{peters2018deep}, as provided by the AllenNLP package \citep{gardner2017allennlp}. When multiple RoBERTa subwords are aligned to a single corpus token, we average the subword vector representations. \paragraph{Probe families.} For all of our experiments, we choose $\mathcal{V}$ to be the set of affine functions followed by softmax.\footnote{We used the Adam optimizer \cite{kingma2014adam} with starting learning rate 0.001, and multiply the learning rate by $0.5$ after each epoch wherein a new lowest validation loss is not achieved.} For word-level tasks, we have \begin{align} f_\theta(\phi_i(X)_j) = \text{softmax}(W\phi_i(X)_j+b) \end{align} where $i$ indexes the layer in the network and $j$ indexes the word in the sentence. For the sentence-level sentiment task, we average over the word-level representations, as \begin{align} f_\theta(\phi_i(X)) =\text{softmax}(W\ \text{avg}(\phi_i(X))+b) \end{align} \subsection{Results} \begin{figure} \includegraphics[width=0.49\linewidth]{graphs/upos_768_roberta.pdf} \includegraphics[width=0.49\linewidth]{graphs/dep_rel_768_roberta.pdf} \includegraphics[width=0.49\linewidth]{graphs/named_entities_768_roberta.pdf} \includegraphics[width=0.49\linewidth]{graphs/sst2_768_roberta.pdf} \caption{\label{fig_results_bert_roberta_eci_eri}Probing results on RoBERTa. Results are reported in bits of $\mathcal{V}$-information; higher is better. } \end{figure} \begin{table} \centering \small \begin{tabular}{l c c c c c} \toprule & \multicolumn{2}{c}{Baselined} & & \multicolumn{2}{c}{Conditional}\\ \midrule & $\phi_1$ & $\phi_2$ & & $\phi_1$ & $\phi_2$\\ \cmidrule{2-3} \cmidrule{5-6} upos & 0.20 & 0.16 & & 0.22 & 0.20\\ xpos & 0.20 & 0.16 & & 0.21 & 0.20\\ dep rel & 0.99 & 0.81 & & 1.00 & 0.87\\ ner & 0.24 & 0.23 & & 0.25 & 0.24\\ sst2 & 0.18 & 0.13 & & 0.17 & 0.13\\ \bottomrule \end{tabular} \caption{\label{table_elmo_results}Results on ELMo, reported in bits of $\mathcal{V}$-information; higher is better. $\phi_i$ refers to layer $i$.} \end{table} \paragraph{Results on ELMo.} ELMo has a non-contextual embedding layer $\phi_0$, and two contextual layers $\phi_1$ and $\phi_2$, the output of each of two bidirectional LSTMs \citep{hochreiter1997long}. Previous work has found that $\phi_1$ contains more syntactic information than $\phi_2$ \cite{peters2018dissecting,zhang2018language}. Baselined probing performance, in Table~\ref{table_elmo_results}, replicates this finding. But \citet{hewitt2019control} conjecture that this may be due to accessibility of information from $\phi_0$. Conditional probing answers shows that when only measuring information not available in $\phi_0$, there is still more syntactic information in $\phi_1$ than $\phi_2$, but the difference is much smaller. \paragraph{Results on RoBERTa.} RoBERTa-base is a pretrained Transformer consisting of a word-level embedding layer $\phi_0$ and twelve contextual layers $\phi_i$, each the output of a Transformer encoder block \citep{vaswani2017attention}. We compare baselined probing performance to conditional probing performance for each layer. In Figure~\ref{fig_results_bert_roberta_eci_eri}, baselined probing indicates that part-of-speech information decays in later layers. However, conditional probing shows that information \textit{not} available in $\phi_0$ is maintained into deeper layers in RoBERTa, and only the information already available in $\phi_0$ decays. In contrast for dependency labels, we find that the difference between layers is lessened after conditioning on $\phi_0$, and for NER and sentiment, conditioning on $\phi_0$ does not change the results. \section{Conclusion} In this work, we proposed \textit{conditional probing}, a simple method for conditioning on baselines in probing studies, and grounded the method theoretically in $\mathcal{V}$-information\xspace. In a case study, we found that after conditioning on the input layer, usable part-of-speech information remains much deeper into the layers of ELMo and RoBERTa than previously thought, answering an open question from \citet{hewitt2019control}. Conditional probing is a tool that practitioners can easily use to gain additional insight into representations.\footnote{An executable version of the experiments in this paper is on CodaLab, at this link: \url{https://worksheets.codalab.org/worksheets/0x46190ef741004a43a2676a3b46ea0c76}.}
\section{Introduction} For two graphs $G,H$, their \emph{Ramsey number} $r(G,H)$ is the smallest $N$ such that every graph $\Gamma$ on $N$ vertices contains $G$ as a subgraph, or its complement contains $H$ as a subgraph. The existence of $r(G,H)$ is guaranteed by Ramsey's theorem \cite{Ramsey}. The most well-studied Ramsey number is the \emph{diagonal} Ramsey number $r(K_k, K_k)$. One of the oldest (and easiest) results in Ramsey theory is the fact that $r(K_k,K_k) \geq (k-1)^2+1$, which is proved by taking $\Gamma$ to be the complete balanced $(k-1)$-partite graph on $(k-1)^2$ vertices. This quadratic lower bound is far from best possible. Indeed, it is known \cite{Erdos47,ErSz} that $r(K_k,K_k)$ must grow exponentially in $k$, though the exact exponential rate remains unknown despite decades of intense research. Nonetheless, it is an instance of a much more general inequality which can be tight. Write $\chi(G)$ for the chromatic number of $G$. The inequality in question is then \begin{equation}\label{eq:goodness} r(G,H) \ge (p-1)(n-1)+a, \end{equation} which holds under the conditions that $\chi(G)=p$ and $a$ is the minimum size of a color class among all proper $p$-colorings of $G$, and $H$ is a connected graph with $n$ vertices. Inequality (\ref{eq:goodness}) was first proved by Burr~\cite{Burr}, by taking $\Gamma$ to be a complete $p$-partite graph with $p-1$ parts of size $n-1$ and one part of size $a-1$. Burr and Erd\H os \cite{BuEr} initiated the study of when (\ref{eq:goodness}) is tight; following their terminology, one says that a connected $n$-vertex graph $H$ is \emph{$G$-good} if (\ref{eq:goodness}) is tight when $\chi(G)=p$ and $a$ is the minimum size of a color class among all proper $p$-colorings of $G$. In case $G=K_p$, one says that $H$ is \textit{$p$-good}, rather than $K_p$-good. While the Ramsey goodness bound (\ref{eq:goodness}) is far from tight in the case of cliques, it turns out that many interesting graphs are $p$-good, and that the theory of Ramsey goodness generalizes many important results in graph theory. For example, Tur\'an's theorem, which states that the balanced complete $(p-1)$-partite graph has the most edges among all $K_p$-free graphs on $N$ vertices, is equivalent to the fact that stars are $p$-good. Extending this fact, Chv\'atal~\cite{Chvatal} proved that all trees are $p$-good for all $p \geq 3$, and this theorem inspired Burr and Erd\H os to define Ramsey goodness. At this point, there is a rich theory of Ramsey goodness, about which we refer the interested reader to the survey \cite[Section 2.5]{CoFoSu15}. For $n \geq k \geq 1$, the $k$-book $\book kn$ on $n$ vertices consists of a copy of $K_k$, called the \emph{spine}, as well as $n-k$ additional vertices each joined to every vertex of the spine; equivalently, $\book kn$ consists\footnote{We remark that other notation exists for book graphs; notably, some other papers (e.g.\ \cite{Conlon,CFW,NR04}) use $B_{n-k}\up k$ to denote what is $\book kn$ in our notation.} of $n-k$ cliques of order $k+1$ sharing a common $K_k$. Book graphs arise naturally in the study of Ramsey numbers. Indeed, Ramsey \cite{Ramsey} originally proved the finiteness of $r(K_k,K_k)$ by proving the finiteness of $r(\book kn, \book kn)$ for every $n$, and it was observed by Erd\H os, Faudree, Rousseau, and Schelp \cite{ErFaRoSc} that the classical Erd\H os--Szekeres \cite{ErSz} upper bound on Ramsey numbers can also be framed as an upper bound on certain book Ramsey numbers. This connection yields an important approach to improving upper bounds on $r(K_k,K_k)$; for more details, see e.g.\ \cite{Conlon,CFW}. In \cite{NR04}, Nikiforov and Rousseau used Szemer\'edi's regularity lemma to prove that for every $k,p \geq 1$ and every sufficiently large $n$, the book $\book kn$ is $p$-good. One consequence of applying the regularity method is that their proof yields tower-type bounds on how large $n$ must be in terms of $k$ and $p$, and they raised the question of what the best possible $n$ is. Our first main result is a new proof of $p$-goodness for books which avoids the use of the regularity lemma, and thus gets a much better dependence for $n$ on $k$ and $p$. \begin{theorem}\label{thm:main1} If $n \geq 2^{k^{10p}}$, then $\book kn$ is $p$-good. \end{theorem} Our main technique is a novel variant of the greedy embedding strategy, which allows us to build a large induced copy of a complete multipartite graph inside a $K_p$-free graph whose complement does not contain a very large book. Extending the techniques from \cite{NR04}, Nikiforov and Rousseau \cite{NR09} were later able to prove a remarkable theorem, which remains the most general result in the field of Ramsey goodness. As the result in its full generality requires some notation, we state only the following special case. \begin{theorem}[{Nikiforov and Rousseau \cite[Theorem 2.12]{NR09}}] \label{thm:book-book} For every $k,p\geq 2$, there exists some $\delta>0$ such that for all sufficiently large $n$, \[ r(\book {p-1}{\delta n}, \book kn) = (p-1)(n-1)+1. \] \end{theorem} In other words, the Ramsey goodness result $r(K_p, \book kn) = (p-1)(n-1)+1$ remains true even if we replace $K_p$ by the much larger graph $\book {p-1}{\delta n}$ containing it. This result goes beyond the basic Ramsey goodness framework introduced by Burr and Erd\H os, to show that $r(G,H) = (p-1)(n-1)+1$ in cases even when $G$ is not a fixed graph. Just as before, the proof of \cite{NR09} uses Szemer\'edi's regularity lemma, and hence the bound on $1/\delta$ in \cref{thm:book-book} is of tower type. In order to demonstrate the flexibility of our proof technique, we prove the following generalization of \cref{thm:book-book}, which again goes beyond the basic Ramsey goodness framework of Burr and Erd\H os. \begin{theorem}\label{thm:multipartite} For every $k,p,t \geq 2$, there exists $\delta>0$ such that the following holds for all $n\ge 1$. Let $1 \leq a_1 \leq \dotsb \leq a_{p-1} \leq t$ and $a_p \leq \delta n$ be positive integers. Let $G$ be the complete $p$-partite graph with parts of sizes $a_1,\dots,a_p$, and let $H = \book kn$. Then $r(G,H) = (p-1)(n-1)+a_1$ if and only if $a_1 = a_2 = 1$. \end{theorem} Note that \cref{thm:multipartite} is vacuously true unless $n$ is sufficiently large, as otherwise there does not exist a positive integer $a_p \le \delta n$. Our proof shows that one may take $1/\delta$ to be double-exponential in $k,p$, and $t$. Additionally, once $n$ is double-exponential in $k,p$, and $t$, the statement holds with $1/\delta$ merely single-exponential in $k,p,$ and $t$. Although \cref{thm:multipartite} has not appeared in the literature, the ``if'' direction (which is the harder one) can be deduced from the general theorem of Nikiforov and Rousseau \cite[Theorem 2.1]{NR09}. Nonetheless, the main novelty is not the statement of \cref{thm:multipartite}, but rather the fact that our proof again avoids the use of the regularity lemma, so that the bounds on $1/\delta$ are not of tower-type. It would be very interesting to see how far one can push these ideas; for example, is it possible to completely eliminate the use of the regularity lemma from the proof of \cite[Theorem 2.1]{NR09}? \vspace{3mm} \noindent {\bf Organization.} In \cref{sec:good-book}, we warm up by proving \cref{thm:book-book}; in fact, we prove a generalization that sets the groundwork for \cref{thm:multipartite}. In \cref{sec:stability-supersaturation}, we prove a stability-supersaturation version of Tur\'an's theorem, and use that to prove a variant of the Andr\'asfai--Erd\H os--S\'os theorem, \cref{thm:aes-variant}, in \cref{sec:aes-variant}. \cref{thm:aes-variant} is an important ingredient in the proof of \cref{thm:multipartite}, as it essentially allows us to reduce to the case that $\Gamma$ is $(p-1)$-partite. While both such results are relatively standard, the specific statements we need are apparently new. Finally, the proof of \cref{thm:multipartite} is completed in \cref{sec:main-proof}, and we collect some interesting open problems in \cref{sec:concluding}. For the sake of clarity of presentation, we omit floor and ceiling signs when they are not crucial. \section{Ramsey goodness of books}\label{sec:good-book} Let $K_r(t)$ denote the complete $r$-partite graph with parts of size $t$. The following result is the greedy embedding lemma that we use. Given a graph $\Gamma$, it allows us to find a large book in $\ol \Gamma$ or find a large induced complete multipartite subgraph of $\Gamma$. \begin{lemma}\label{lem:greedy} Let $k, r, s, t$ be positive integers with $s \leq t$ and $2k \le t$, and let $G$ be any graph. Let $\Gamma$ be a $G$-free graph with $N \geq \binom ts^r \frac{t}{2ks}r(G, K_s)$ vertices which contains $K_{r}(t)$ as an induced subgraph, with parts $V_1,\dots,V_r$. If $\overline \Gamma$ does not contain a book $\book kn$ with $n \geq (1-4ks/t)N/r$ vertices, then $\Gamma$ contains an induced copy of $K_{r+1}(s)$ with parts $W_0,\dots,W_r$, where $W_i \subseteq V_i$ for every $1 \leq i \leq r$. \end{lemma} \begin{comment} \begin{lemma}\label{lem:greedy} Let $s,t,r$ be positive integers with $s \leq t$. Let $\eps \in [s/t,1]$. Let $G$ be an $H$-free graph with $N \geq \left({t\choose s}/{\eps t \choose s}\right)^r (2k\eps)^{-1}r(H,K_s)$ vertices which contains $K_{r}(t)$ as an induced subgraph, with parts $V_1,\dots,V_r$. If $\overline G$ does not contain a book $\book kn$ with $k \geq t/2$ and $n \geq (1-4k\eps)N/r$ vertices, then $G$ contains an induced copy of $K_{r+1}(s)$ with parts $W_0,\dots,W_r$, where $W_i \subseteq V_i$ for every $1 \leq i \leq r$. \end{lemma} \end{comment} \begin{proof} Let $\eps = s/t$. Partition the vertex set of $\Gamma$ into $r+1$ parts $U_0,U_1,\ldots,U_r$, where, for each $i \in [r]$, every vertex in $U_i$ has degree at most $\eps t$ to $V_i$, and every vertex in $U_0$ has degree at least $\eps t$ to each $V_j$. Note that by construction, $V_i \subseteq U_i$ for $i\in [r]$. Suppose there is $i \in [r]$ such that $|U_i| \geq (1-2k\eps)N/r$. Let $X$ denote the set of all vertices $v \in V_i$ with at most $2\eps|U_i \setminus V_i|$ neighbors in $U_i \setminus V_i$. Since each vertex in $U_i$ has density at most $\eps$ to $V_i$, we have $|X| \geq |V_i|/2 = t/2\geq k$. Let $Q$ be any $k$ vertices in $X$. Then all but at most a $2k\eps $ fraction of the vertices in $U_i \setminus V_i$ are empty to $Q$. So $Q$ together with the vertices of $U_i$ that have have no neighbors in $Q$ form a $k$-book in $\overline \Gamma$ with at least $(1-2k\eps)|U_i \setminus V_i|+|V_i| \geq (1-4k\eps)N/r$ vertices. So we may assume that there is no $i \in [r]$ with $|U_i| \geq (1-2k\eps)N/r$. In this case, we have $|U_0| \geq N-r(1-2k\eps)N/r=2k\eps N$. By the pigeonhole principle, there is a subset $T \subset U_0$ of size at least ${\binom ts}^{-r}|U_0| \geq r(G, K_s)$ such that there are subsets $W_i \subseteq V_i$ with $|W_i|=s$ for $i\geq 1$ such that every vertex in $T$ is complete to each $W_i$. As $\Gamma$ and hence the induced subgraph $\Gamma[T]$ is $G$-free and $|T| \geq r(G, K_s)$, we know that $T$ contains an independent set $W_0$ of order $s$. Then $W_0,W_1,\ldots,W_r$ form a complete induced $(r+1)$-partite subgraph of $\Gamma$ with parts of size $s$. \end{proof} Our next lemma shows that, once we find a large induced complete multipartite subgraph of $\Gamma$, we can find a large book in $\ol \Gamma$. \begin{lemma}\label{lem:simple} If a $K_p$-free graph $\Gamma$ on $n$ vertices contains $K_{p-1}(k)$ as an induced subgraph, then its vertex set can be partitioned into $p-1$ subsets that each span a $k$-book in $\overline \Gamma$. \end{lemma} \begin{proof} Let $V_1,\ldots,V_{p-1}$ be the $p-1$ parts of the induced $K_{p-1}(k)$. As $\Gamma$ is $K_p$-free, each vertex in $\Gamma$ has no neighbors in some $V_i$. Partition the vertex set of $\Gamma$ into $p-1$ parts $U_1,\ldots,U_{p-1}$, where, for each $i \in [p-1]$, each vertex in $U_i$ has no neighbors in $V_i$. Then each $U_i$ spans a $k$-book in $\overline \Gamma$ with spine $V_i$. \end{proof} Our next result is the main form in which we use \cref{lem:greedy}, and follows from it by a simple inductive argument. \begin{lemma} \label{lem:find-blowup} Let $k,p,x$ be positive integers, and let $z = x\cdot(20k)^{p}$. Let $\Gamma$ be a $K_p$-free graph on at least $N=(p-1)(n-1)+1$ vertices, and suppose $S \subseteq V(\Gamma)$ satisfies $\ab S \ge z^z \cdot r(K_p, K_z)$. Then either $\ol \Gamma$ contains a copy of $\book kn$, or else $\Gamma$ contains $K_{p-1}(x)$ as an induced subgraph, one part of which is a subset of $S$. \end{lemma} \begin{proof} For $r=1,\ldots,p-2$, let $\eps_r = \left(1-r/(p-1)\right)/(4k)$ so that $(1-4k\eps_r)/r=1/(p-1)$. Let $t_{p-1}=x$ and $t_r=t_{r+1}/\eps_r$ for $r=p-2,\ldots,1$. Observe that \[ t_1=t_{p-1}/\prod_{r=1}^{p-2} \eps_r = x(4k)^{p-2}(p-1)^{p-2}/(p-2)!<(20k)^p x = z. \] Since $t_1 \geq t_2 \geq \dotsb \geq t_{p-1}$, this implies that $t_r <z$ for all $r$. We now prove by induction on $r$ for $r \in [p-1]$ that $\Gamma$ contains $K_r(t_r)$ as an induced subgraph, with the first part of $K_r(t_r)$ being a subset of $S$. For the base case $r=1$, we have $\ab S \geq r(K_p, K_z) > r(K_p,K_{t_1})$, so $\Gamma$ contains an independent set of order $t_1$, that is, $\Gamma[S]$ contains $K_r(t_r)$ with $r=1$ as an induced subgraph. Now suppose $\Gamma$ contains $K_r(t_r)$ as an induced subgraph, with the first part a subset of $S$. We apply Lemma \ref{lem:greedy} with $s=t_{r+1}$, $t=t_r$, and $G = K_p$. Observe that \begin{eqnarray*} \binom{t_{r+1}}{t_r}^r (2kt_{r+1}/t_r)^{-1}r(K_p, K_{t_{r+1}}) & \leq & (e/\eps_r)^{rt_r}(2kt_{r+1}/t_r)^{-1}r(K_p, K_{t_{r+1}}) \\ & < & z^z \cdot r(K_p, K_z) \le |S|. \end{eqnarray*} So either $\ol \Gamma$ contains a $k$-book with at least $(1-4k\eps_r)N/r=N/(p-1) \ge n$ vertices, in which case we are done, or $\Gamma$ contains an induced $K_{r+1}(t_{r+1})$ whose first $r$ parts are subsets of the $r$ parts of the $K_r(t_r)$. In particular, the first part of this induced $K_{r+1}(t_r)$ is a subset of $S$. This proves the claimed inductive statement. The desired statement is just then the case $r=p-1$. \end{proof} We are now ready to prove \cref{thm:main1}, whose statement we now recall. \begin{thm:main1} If $n \geq 2^{k^{10p}}$, then $\book kn$ is $p$-good, that is, $r(K_p,\book kn) = (p-1)(n-1)+1$. \end{thm:main1} \begin{proof} Let $N=(p-1)(n-1)+1$. Our choice of $n$ guarantees that if $z=k(20k)^p$, then $N\ge z^z \cdot r(K_p, K_z)$. Suppose for the sake of contradiction that there is a $K_p$-free graph on $N$ vertices such that $\overline \Gamma$ does not contain a $k$-book with $n$ vertices. By \cref{lem:find-blowup}, applied with $S=V(\Gamma)$ and $x = k$, we see that $\Gamma$ must contain $K_{p-1}(k)$ as an induced subgraph. But then Lemma \ref{lem:simple} implies that $\ol \Gamma$ contains a $k$-book with $n$ vertices as a subgraph, completing the proof. \end{proof} \section{A stability-supersaturation theorem}\label{sec:stability-supersaturation} One of our main tools is a version of the Erd\H os--Simonovits stability version of Tur\'an's theorem. While many variants of the stability theorem are known, we were not able to find the following result in the literature, though its proof is similar to the proofs of several known results. Roughly speaking, this result combines two types of well-known variants of Tur\'an's theorem. The first, namely the Erd\H os--Simonovits stability theorem \cite{MR0232703, MR0233735}, says that if $\Gamma$ is a $K_p$-free graph with slightly fewer edges than the Tur\'an graph, then $\Gamma$ can be turned into the Tur\'an graph by changing a small number of edges. The second, often known as a supersaturation result \cite{MR726456}, says that if $\Gamma$ is an $m$-vertex graph with slightly \emph{more} edges than the $K_p$-free Tur\'an graph, then it actually contains many (that is, $\Omega(m^p)$) copies of $K_p$. Contrapositively, this latter result says that if $\Gamma$ has few copies of $K_p$, then it cannot have substantially more edges than the Tur\'an graph. The result that we need, a combination of the two mentioned above, is the following. It asserts that if $\Gamma$ has slightly fewer edges than the Tur\'an graph (the stability regime) and has few copies of $K_p$ (the supersaturation regime), then it is close to the Tur\'an graph. \begin{theorem}\label{thm:stability} For every $\varepsilon>0$ and every integer $p \geq 3$, there exist $\eta,\gamma>0$ such that the following holds for all $m \geq 5$. Suppose $\Gamma$ is a graph on $m$ vertices with minimum degree at least $(1- \frac{1}{p-1}- \gamma)m$ and at most $\eta m^p$ copies of $K_p$. Then $V(\Gamma)$ can be partitioned into $V_1 \sqcup \dotsb \sqcup V_{p-1}$, such that the total number of internal edges in $V_1,\dotsc,V_{p-1}$ is at most $\varepsilon \binom m2$. Moreover, we may take $\gamma= \min \{1/(2p^2),\varepsilon/2\}$ and $\eta = p^{-10p} \varepsilon$. \end{theorem} A natural approach to prove \cref{thm:stability} is to first apply the celebrated graph removal lemma (see the survey \cite{MR3156927}). This allows us to pass to a $K_p$-free subgraph $\Gamma'$ of $\Gamma$ which still has very many edges. At this point, we can apply the standard stability theorem to deduce that $\Gamma'$ is nearly $(p-1)$-partite; since we deleted few edges to go from $\Gamma$ to $\Gamma'$, we must also have that $\Gamma$ is nearly $(p-1)$-partite. This proof technique was used to prove \cite[Corollary 3.4]{MR4170438}, which is a very similar result to \cref{thm:stability}. This proof technique actually proves a stronger theorem than \cref{thm:stability}, weakening the minimum degree condition to an average degree condition. However, since the known bounds in the graph removal lemma are very weak, this proof technique would yield a tower-type dependence in the parameters $\varepsilon$ and $\eta$ in the statement of \cref{thm:stability}. Moreover, a super-polynomial dependence on the parameters is unavoidable if one only assumes an average degree condition. Indeed, let $\Gamma$ be the disjoint union of a Tur\'an graph on $(1- \gamma)m$ vertices and a graph $\Gamma_0$ on $\gamma m$ vertices which is extremal for the $K_p$ removal lemma, so that $\Gamma$ has at least $(1- \frac{1}{p-1}- \gamma)\binom m2$ edges. Then the distance of $\Gamma$ from being $(p-1)$-partite is roughly the same as the distance of $\Gamma_0$ from being $K_p$-free, and it is known that the clique removal lemma requires super-polynomial bounds in general. Such a construction shows that the clique removal lemma and stability-supersaturation theorems like \cref{thm:stability} are very closely related. The $\Gamma$ constructed has high average degree but low minimum degree, and this distinction turns out to be crucial. Indeed, in \cite{2105.09194}, Fox and Wigderson proved that the $K_p$ removal lemma has \emph{linear} bounds if the minimum degree of $\Gamma$ is above a certain threshold, namely $(1-\frac{2}{2p-3})m$. This allows us to prove \cref{thm:stability} using the technique outlined above, while obtaining much stronger quantitative control. The first tool we need to prove \cref{thm:stability} is the high-degree removal lemma with linear bounds mentioned above, from \cite[Theorem 2.1]{2105.09194}. We remark that the explicit $p$-dependence of the constant is not given in \cite[Theorem 2.1]{2105.09194}, but it is easy to verify that the proof yields the following result. \begin{theorem}\label{thm:removal-above-threshold} Let $\Gamma$ be an $m$-vertex graph with with minimum degree at least $(1- \frac{2}{2p-3}+\beta)m$ and with at most $(10p)^{-2p} \beta \lambda m^p$ copies of $K_p$. Then $\Gamma$ can be made $K_p$-free by deleting at most $\lambda m^2$ edges. \end{theorem} \noindent We also use the following quantitative form of the stability theorem, due to F\"uredi \cite{MR3383250}. \begin{theorem}\label{thm:furedi} Let $\Gamma$ be an $m$-vertex $K_p$-free graph with at least $(1- \frac{1}{p-1})\frac{m^2}{2}-\ell$ edges. Then $\Gamma$ can be made $(p-1)$-partite by deleting at most $\ell$ edges. \end{theorem} \noindent With these preliminaries, we can now prove \cref{thm:stability}. \begin{proof}[Proof of \cref{thm:stability}] Since $\gamma \leq 1/(2p^2)$, we see that \[ 1- \frac{1}{p-1} - \gamma \geq 1 - \frac{1}{p-1} -\frac{1}{2p^2} = 1- \frac{2}{2p-3} + \frac{5p-3}{4p^4-10p^3 + 6p^2} \geq 1 - \frac{2}{2p-3} + \frac{1}{p^3}. \] Therefore, we may apply \cref{thm:removal-above-threshold} with $\beta = 1/p^3$. We also set $\lambda = \varepsilon/10$, and note that the number of $K_p$ in $\Gamma$ is at most \[ \eta m^p = p^{-10p} \varepsilon m^p \leq (10p)^{-2p} \cdot \frac{1}{p^3} \cdot \frac \varepsilon {10} \cdot m^p = (10p)^{-2p} \beta \lambda m^p. \] This implies that we may delete at most $\frac \varepsilon {10} m^2$ edges from $\Gamma$ to obtain a $K_p$-free graph $\Gamma'$. Since $\Gamma$ has minimum degree at least $(1- \frac{1}{p-1}- \gamma)n$, we see that $\Gamma'$ has at least $(1- \frac{1}{p-1} - \gamma)\frac{m^2}{2}- \frac \varepsilon {10}m^2$ edges. Therefore, by \cref{thm:furedi}, we see that $\Gamma'$ can be made $(p-1)$-partite by deleting at most $(\frac \gamma 2 + \frac\varepsilon {10})m^2$ edges. Let $\Gamma''$ be this $(p-1)$-partite subgraph, and let $V_1 \sqcup \dotsb \sqcup V_{p-1}$ be its $(p-1)$-partition. Since each $V_i$ is an independent set in $\Gamma''$, we see that the total number of edges of $\Gamma$ contained in $V_1,\dots,V_{p-1}$ is at most \[ \frac \varepsilon {10}m^2 + \left(\frac \gamma 2 + \frac \varepsilon{10}\right) m^2 \leq \left(\frac \varepsilon 5 + \frac \varepsilon 4\right)m^2 \leq \varepsilon \binom m2 \] by our choice of $\gamma \leq \varepsilon/2$ and $m \geq 5$. \end{proof} \section{A blowup variant of the Andr\'asfai--Erd\H os--S\'os theorem}\label{sec:aes-variant} The Andr\'asfai--Erd\H os--S\'os theorem \cite{AES} is a minimum-degree stability version of Tur\'an's theorem. It says that if an $m$-vertex $K_p$-free graph has minimum degree greater than $\frac{3p-7}{3p-4}m$, then it is $(p-1)$-partite; moreover, the constant $\frac{3p-7}{3p-4}$ is best possible. We need a related result, which says that if a graph has high minimum degree and does not contain some blowup of $K_p$, then it is $(p-1)$-partite. We remark that unlike Andr\'asfai, Erd\H os, and S\'os, we do not obtain the exact minimum degree threshold for being $(p-1)$-partite; for more on such refined questions, see e.g.\ \cite{Illingworth}. \begin{theorem}\label{thm:aes-variant} For every $p,t \geq 2$, every $1 =a_1 = a_2 \leq a_3 \leq \dotsb \leq a_{p-1} \leq t$, there exist some $\gamma,\delta>0$ such that if $m$ is large enough in terms of $a_{p-1}$ and $p$, $a_p \leq \delta m$, and $\Gamma$ is a $K_p(a_1,a_2,\dots,a_p)$-free graph on $m$ vertices with minimum degree at least $(1-1/(p-1)-\gamma)m$, then $\Gamma$ is $(p-1)$-partite. \end{theorem} \noindent We need the following lemma, which is essentially due to Erd\H os \cite{Erdos64}. \begin{lemma}\label{lem:zarankiewicz} For every $\eta>0$ and $p,t \geq 2$, and $1\leq a_1 \leq \dotsb \leq a_{p-1} \leq t$, there exists some $\delta>0$ such that the following holds for large enough $m$. If $a_p \leq \delta m$ and $\Gamma$ is a $K_p(a_1,a_2,\dots,a_p)$-free graph on $m$ vertices, then $\Gamma$ has at most $\eta m^p$ copies of $K_p$. \end{lemma} \begin{proof} We proceed by induction on $p$. The base case $p=2$ just says that a $K_{a_1,\delta m}$-free graph has at most $\eta m^2$ edges. We double-count the number of copies of $K_{1,a_1}$ in $\Gamma$. On the one hand, every $a_1$-set has at most $\delta m$ common neighbors, so there are at most $\delta m \binom m{a_1} < \delta m^{a_1+1}$ copies of $K_{1,a_1}$. On the other hand, a vertex of degree $d$ contributes $\binom d{a_1}$ many copies. Therefore, \[ \delta m^{a_1+1} > \sum_{v \in V(G)} \binom{\deg(v)}{a_1} \geq m \binom{2 e(\Gamma)/m}{a_1} \geq m \left(\frac{2e(\Gamma)}{ea_1 m}\right)^{a_1} \] where the second inequality uses Jensen's inequality. Rearranging, we find that $e(\Gamma) < 2a_1\delta^{1/a_1} m^2$. If we let $\delta = (\eta/(2 a_1))^{a_1}$, this gives the desired result. We now proceed with the inductive step. For every $(p-1)$-set of vertices $S$, let $\ext(S)$ denote the set of vertices $v$ such that $S \cup \{v\}$ is a $K_p$. Note that the sum of $\ab{\ext(S)}$ over all $(p-1)$-sets $S$ is exactly $p$ times the number of $K_p$ in $\Gamma$. By assumption, this sum is therefore more than $p \eta m^p$. Thus, the average value of $\ab{\ext(S)}$ is greater than $p \eta m^p/\binom m{p-1}> \eta m$. Again by convexity \[ \sum_{S \in \binom{V(\Gamma)}{p-1}} \binom{\ext(S)}{a_1} > \binom{m}{p-1} \binom{\eta m}{a_1} \] Therefore, there is some $a_1$-set $A$ such that the common neighborhood of $A$ has at least \[ \binom{m}{p-1} \binom{\eta m}{a_1} / \binom m{a_1} \geq \eta' m^{p-1} \] copies of $K_{p-1}$, for some $\eta'$ depending only on $\eta$, $t$, and $p$. By induction, the common neighborhood of $A$ must have a copy of $K_{p-1}(a_2,\dots,a_p)$, which is a contradiction. \end{proof} We can now prove \cref{thm:aes-variant}. \begin{proof}[Proof of \cref{thm:aes-variant}] Fix some small $\eps>0$ depending on $p$ and $t$. Let $\gamma,\eta$ be the parameters given in \cref{thm:stability}, depending only on $\eps$ and $p$, and recall that $\gamma \leq \eps$. Finally, let $\delta>0$ be the parameter in \cref{lem:zarankiewicz}. By \cref{lem:zarankiewicz}, we see that since $\Gamma$ is a $K_p(a_1,a_2,\dots,a_p)$-free graph on $m$ vertices, it must have at most $\eta m^p$ copies of $K_p$, and it has minimum degree at least $(1-1/(p-1)- \gamma)m$ by assumption. Therefore, \cref{thm:stability} implies that $\Gamma$ has a partition into parts $V_1,\dots,V_{p-1}$ such that the total number of internal edges is at most $\varepsilon \binom m2$. We fix such a partition with the minimum number of total internal edges. In particular, every vertex must have at least as many neighbors in every other part as it does in its own part. Since $\Gamma$ has minimum degree at least $(1-1/(p-1)-\gamma)m$, it must have at least $(1-1/(p-1)-\gamma)\frac{m^2}{2}$ edges. Therefore, since there are at most $\eps \frac{m^2}{2}$ internal edges in $V_1,\dots,V_{p-1}$, we must have that \begin{equation}\label{eq:edges-across-lb} \sum_{1 \leq i<j\leq p-1} e(V_i,V_j) \geq \left( 1- \frac{1}{p-1} -\gamma -\varepsilon \right) \frac{m^2} 2 \geq \left( 1- \frac{1}{p-1} - 2 \varepsilon \right) \frac{m^2}{2} \end{equation} since $\gamma \leq \eps$. We note that \begin{equation}\label{eq:sum-of-squares} \sum_{i=1}^{p-1} \left( \ab{V_i}- \frac{m}{p-1} \right) ^2= \sum_{i=1}^{p-1} \ab{V_i}^2 - \frac{2m}{p-1} \sum_{i=1}^{p-1} \ab{V_i} + \frac{m^2}{p-1} = \sum_{i=1}^{p-1} \ab{V_i}^2 - \frac{m^2}{p-1}. \end{equation} Since the left-hand side of (\ref{eq:sum-of-squares}) is non-negative, we see that \[ \sum_{1 \leq i<j\leq p-1} \ab{V_i} \ab{V_j} = \frac12\left( m^2 - \sum_{i=1}^{p-1} \ab{V_i}^2 \right)\leq \frac 12\left( m^2 - \frac{m^2}{p-1} \right) = \left( 1- \frac{1}{p-1} \right) \frac{m^2}2. \] We can conclude from this that each $V_i$ has cardinality $\frac{m}{p-1} \pm \sqrt{2\varepsilon}m$. For if not, then the left-hand side of (\ref{eq:sum-of-squares}) would be larger than $2 \varepsilon m^2$, and the above computation would contradict (\ref{eq:edges-across-lb}). Now, suppose that for some $1\leq a < b\leq p-1$, we have that $e(V_a,V_b) <(1- p^2\varepsilon)\ab{V_a}\ab{V_b}$. Then we would find that \[ \sum_{1 \leq i<j\leq p-1} e(V_i,V_j) < \sum_{1 \leq i<j \leq p-1} \ab{V_i}\ab{V_j} -p^2 \varepsilon \ab{V_a} \ab{V_b} \leq \left( 1- \frac{1}{p-1}-2 \varepsilon \right) \frac{m^2}{2}, \] contradicting (\ref{eq:edges-across-lb}), using the bound $\ab{V_a} \geq \frac{m}{p-1}-\sqrt{2 \varepsilon}m \geq m/p$ for sufficiently small $\eps$. Therefore, we find that for all $i \neq j$, \begin{equation}\label{eq:pairs-dense} e(V_i,V_j) \geq (1- p^2 \varepsilon) \ab{V_i} \ab{V_j}. \end{equation} Now suppose that some vertex $v \in V_i$ has more than $2p^2\sqrt \eps \ab{V_i}$ neighbors in its own part $V_i$. By our assumption above, this means that $v$ also has more than $2p^2 \sqrt \eps \ab{V_i}\geq p^2 \sqrt \eps \ab{V_j}$ neighbors in each part $V_j$ for $j \neq i$, where we used the fact that $\ab{V_j} = \frac{m}{p-1} \pm \sqrt{2\eps}m$ and the fact that $\eps$ is sufficiently small to conclude that $\ab{V_i} \geq \frac 12 \ab{V_j}$. Let $U_j = N(v) \cap V_j$ denote the neighbors of $v$ in $V_j$. For every $1 \leq a \neq b \leq p-1$, we have by (\ref{eq:pairs-dense}) that \[ e(U_a,U_b) \geq \ab{U_a} \ab{U_b} - p^2 \eps \ab{V_a} \ab {V_b} \geq \left(1 - \frac{p^2 \eps}{p^4 \eps}\right) \ab{U_a} \ab{U_b} =\left(1 - \frac 1{p^2}\right) \ab{U_a} \ab{U_b}, \] where the second inequality uses our assumption that $\ab{U_a} \geq p^2 \sqrt \eps \ab{V_a}$, and similarly for $U_b$. By the union bound, if we pick a random vertex from $U_a$ for each $1 \leq a \leq p-1$, then they span a copy of $K_{p-1}$ with probability at least $1-\binom p2/p^2\geq \frac12$. Therefore, the neighborhood of $v$ contains at least \[ \frac 12 \prod_{a=1}^{p-1} \ab{U_a} \geq \frac{(p^2 \sqrt \eps)^{p-1}}{2}\prod_{a=1}^{p-1} \ab{V_a} \geq \frac{(p^2\sqrt \eps)^{p-1}}{2p^{p-1}} m^{p-1} = \eta' m^{p-1} \] copies of $K_{p-1}$, for $\eta'$ depending only on $p$ and $\eps$. By \cref{lem:zarankiewicz}, this implies that if $\delta$ is sufficiently small in terms of $p,t$, and $\eps$, then the neighborhood of $v$ contains a copy of $K_{p-1}(a_2,\dots,a_p)$. Since $a_1=1$, this implies that $\Gamma$ contains a copy of $K_p(a_1,a_2,\dots,a_p)$, which is a contradiction. Thus, we conclude that every vertex $v \in V_i$ has at most $2p^2 \sqrt \eps \ab{V_i}$ neighbors in its own part $V_i$, for every $1 \leq i \leq p-1$. We now claim that for every $1 \leq i \neq j \leq p-1$, every vertex $v \in V_i$ has at least $(1-1/(2pt))\ab{V_j}$ neighbors in $V_j$, as long as $\eps$ is sufficiently small in terms of $p$ and $t$. Indeed, if not, then $v$ has at least $\ab{V_j}/(2pt)$ non-neighbors in $V_j$, and at least $(1-2p^2 \sqrt \eps)\ab{V_i}-1$ non-neighbors in $V_i$. In total, the number of non-neighbors of $v$ is at least \[ \frac{1}{2pt} \ab{V_j} + (1-2p^2 \sqrt \eps)\ab{V_i}-1 > \left(1 + \frac 1{2pt} - 2p^2 \sqrt \eps - 4\sqrt \eps\right)\frac m{p-1} > \left(\frac 1{p-1} + \eps\right)m, \] as long as $\eps$ is sufficiently small in terms of $p$ and $t$. This contradicts the assumption that the minimum degree of $\Gamma$ is at least $(1-1/(p-1)-\eps)m$. Now suppose that there is some edge $vw$ inside some part $V_i$, and assume without loss of generality that $i=1$. The vertices $v$ and $w$ have at least $(1-1/(pt))\ab{V_2}>a_3$ common neighbors in $V_2$, so we may pick some set of $a_3$ common neighbors in $V_2$. Then $v,w,$ and these $a_3$ common neighbors have at least $(1-(a_3+2)/(2pt))\ab{V_3}>(1-2t/(2pt))\ab{V_3}>a_4$ common neighbors in $V_3$, so we may pick $a_4$ such common neighbors in $V_3$. Continuing in this way, we can greedily pick $a_{j+1}$ vertices from $V_j$ which are common neighbors of the previously chosen vertices, for each $j \leq p-2$. Having done this, we have picked at most $pt$ vertices, so they still have at least $(1-pt/(2pt))\ab{V_{p-1}} = \frac 12 \ab{V_{p-1}}> \delta m$ common neighbors in $V_{p-1}$. Thus, we have built a copy of $K_p(a_1,\dots,a_p)$ in $\Gamma$, a contradiction. This shows that there can be no edge inside any $V_i$, and thus that $\Gamma$ is $(p-1)$-partite. \end{proof} \section{Proof of Theorem \ref{thm:multipartite}} \label{sec:main-proof} In this section, we prove \cref{thm:multipartite}. Recall the statement: for any $k, p, t \ge 2$, there exists $\delta > 0$ such that the following holds. If $n$ is large enough in terms of $k,p$ and $t$, $1\le a_1 \le a_2 \le \cdots \le a_{p-1} \le t \le a_p = \delta n$, $G = K_p (a_1, a_2, \ldots, a_p)$, and $H = \book kn$, then $r(G,H) = (p-1)(n-1) + a_1$ if and only if $a_1 = a_2 = 1$. Here $K_p(a_1,a_2, \ldots, a_p)$ is the complete $p$-partite graph with part sizes $a_1, \ldots, a_p$. We start with the construction for the ``only if'' direction. \begin{proof}[Proof of ``only if'' direction of \cref{thm:multipartite}.] It suffices to show that if $a_2 \ge 2$, then $r(G,H) > (p-1)(n-1)+a_1$. Let $\Gamma$ be a graph on $N = (p-1)(n-1)+a_1$ vertices which are divided into $p-1$ parts $U_1,\ldots, U_{p-1}$ with $|U_1| = n+a_1-1$ and $|U_2| = \cdots = |U_{p-1}| = n-1$. The edges of $\Gamma$ are defined as follows. First, all pairs of vertices in two different parts are adjacent. Second, $U_1$ induces a $C_4$-free subgraph $A = \Gamma[U_1]$ which is almost $a_1$-regular. This means that either $A$ is $a_1$-regular (if $|U_1|$ or $a_1$ is even), or else all but one vertices of $A$ have degree $a_1$ and one vertex has degree $a_1-1$ (if $|U_1|$ and $a_1$ are both odd). Such a graph $A$ always exists if $n$ is large enough in terms of $a_1$. It remains to show that $\Gamma$ is $G$-free and $\overline{\Gamma}$ is $H$-free. Suppose $\Gamma$ contained a copy of $G$. Since $G$ is complete $p$-partite and $U_2,\ldots, U_{p-1}$ are independent sets of $\Gamma$, each of these sets can contain only vertices from one part of this copy of $G$. Thus, at least two parts of $G$ must be entirely contained inside $U_1$, which means that $\Gamma[U_1]$ must contain a copy of the complete bipartite graph $K_{a_1, a_2}$. By construction, $A = \Gamma[U_1]$ is $C_4$-free, so this is impossible unless $a_1=1$. When $a_1=1$, $A$ has maximum degree $1$ and thus cannot contain a copy of $K_{a_1, a_2}$ either, when $a_2 \ge 2$. In all cases, $\Gamma$ is $G$-free. The complement $\overline{\Gamma}$ is a disjoint union of $\overline{A}$ and $p-2$ copies of $K_{n-1}$. The book $H$ is connected and has $n$ vertices, so $K_{n-1}$ cannot contain a copy of $H$. Also, $k\ge 2$, so $H$ contains at least two vertices of degree $n-1$, whereas $\overline{A}$ has either one or zero vertices of degree at least $n-1$. It follows that $\overline{A}$ contains no copies of $H$ either, completing the proof. \end{proof} The proof of the ``if'' direction of \cref{thm:multipartite} divides into three parts. First, we show \cref{lem:low-deg-vtxs} below (which uses \cref{lem:find-blowup}) that under the assumptions of the theorem, we can assume that most vertices of $\Gamma$ have degree at least $(1-1/(p-1) - o(1)) N$. We then apply \cref{thm:aes-variant}, which proves that except for the small number of low-degree vertices, $\Gamma$ is $(p-1)$-partite. Finally, we use a careful averaging argument to show that under these assumptions, $\ol \Gamma$ must contain a copy of $H=\book kn$, completing the proof. We begin by proving that most vertices of $\Gamma$ have high degree. \begin{lemma}\label{lem:low-deg-vtxs} Under the assumptions of \cref{thm:multipartite}, if $a_1 = a_2 = 1$, then the following holds for any $\alpha > 0$, assuming that $n$ is sufficiently large in terms of $\alpha$. If $\Gamma$ is a graph on $N = (p-1)(n-1)+1$ vertices such that $\Gamma$ is $G$-free and $\overline{\Gamma}$ is $H$-free, then at most $\alpha N$ vertices of $\Gamma$ have degree at most $d = (1-1/(p-1) - \alpha) N$. \end{lemma} \begin{proof} Let $\eps = \eps(k, \alpha) > 0$ be small in terms of $k$ and $\alpha$, and let $x = x(k, \eps) \ge 1$ be large in terms of $k$ and $\eps$. We also assume that $\delta = \delta(k,p,t) > 0$ is chosen to be small in terms of $\eps$ and $\alpha$. Let $S \subset V(\Gamma)$ be the set of vertices of degree less than $d$. We proceed by contradiction and assume that $|S| \ge \alpha N$. By \cref{lem:find-blowup}, there is an induced copy of $K_{p-1}(x)$ in $\Gamma$ whose parts are $V_1,\ldots, V_{p-1}$ with $V_1 \subseteq S$. Thus, all the vertices of $V_1$ have degree less than $d$. We remark that \cref{lem:find-blowup} requires $|S|$ to be double-exponentially large in $p$, so we require $n$ to be at least double-exponentially large in $p$ for this step. This is the only place where a double-exponential dependence is needed. Partition the vertices of $\Gamma$ into $p$ parts $U_0,\ldots, U_{p-1}$, where for $i\ge 1$, each vertex in $U_i$ has at most $\eps x$ neighbors in $V_i$, and $U_0$ consists of all vertices more than $\eps x$ neighbors in each $V_i$. First, if $|U_0|\ge (e/\eps)^{tp} \cdot \delta n$, then we can find a copy of $G$ in $\Gamma$ as follows. If we pick a set $W$ by taking $a_i$ vertices uniformly at random from $V_i$ for $i=1,\ldots,p-1$, then the expected number of vertices of $U_0$ complete to $W$ is at least \[ \prod_{i=1}^{p-1} \frac{\binom{\eps x}{a_i}}{\binom{x}{a_i}} \cdot |U_0| \ge (\eps/e)^{tp}\cdot |U_0| \ge \delta n. \] Thus, there exists a $W$ for which we can find $\delta n$ vertices of $U_0$ which together with $W$ form a copy of $G= K_p (a_1, \ldots, a_p)$, which is impossible. Next, suppose $|U_i| \ge (1-2k \eps)^{-1} (n-k)$ for some $i\ge 1$. Every vertex in $U_i$ has at most $\eps x$ neighbors in $V_i$, so we may remove half the vertices of $V_i$ (the ones with highest degree to $U_i$) to find a subset $V'_i$ such that every $v\in V'_i$ has at most $2\eps |U_i|$ neighbors in $U_i$. Take $W$ to be any $k$-subset of $V'_i$, and let $U'_i \subseteq U_i$ be the set of vertices with no neighbors in $W$. We have $|U'_i| \ge (1-2 k\eps) |U_i|\ge n-k$, and so $W$ and $U'_i$ form a copy of $\book kn$ in $\ol \Gamma$, which is again impossible. We henceforth assume that $|U_i| < (1-2k \eps)^{-1}(n-k)$ for all $i\geq 1$. Finally, suppose $|U_1| \ge (1-2k\eps)^{-1}(n-k) - (\alpha /10)^k N.$ We seek to find a copy of $\book kn$ in $\ol \Gamma$ again, this time using the degree condition on $V_1$. As before, we may pass to a subset $V'_1$ of half the vertices of $V_1$ such that each has at least $(1-2\eps) |U_1|$ non-neighbors in $U_1$. Each vertex of $V'_1$ has degree at most $d = (1-1/(p-1)-\alpha)N$, and so has at least $N-1-d = N/(p-1)+\alpha N -1 \geq n + \alpha N-2$ non-neighbors in total. In particular, since $|U_1| < (1-2k \eps)^{-1}(n-k) < (1+3k\eps) n-2$ and $\alpha \ge 6k \eps$, each vertex of $V'_1$ has at least $(n + \alpha N -2) - |U_1| \ge \alpha N/2$ non-neighbors in $\ol{U_1}$. Pick a random $k$-subset $W$ of $V'_1$ to form the spine of the book. The number of common non-neighbors the vertices of $W$ have inside $U_1$ is at least $(1-2k\eps)|U_1|$. We now count the expected number of common non-neighbors the vertices of $W$ have in $\ol{U_1}$. For the convenience of the following calculation, we insert phantom vertices to $\ol{U_1}$, each complete to $W$, until $|\ol{U_1}| = N$; this has no effect on the common non-neighborhood we care about. If $u \in \ol{U_1}$ has $y$ non-neighbors in $V'_1$, then the probability that $W$ is chosen entirely among these $y$ vertices is $\binom{y}{k}/\binom{x/2}{k}$. Since vertices in $V'_1$ have at most $(1-\alpha/2)N$ neighbors in $\ol{U_1}$, the average value of $y$ over a random $u\in \ol{U_1}$ is at least $\alpha/2 \cdot |V'_1| = \alpha x/4$. By linearity of expectation and convexity we find that the expected number of common non-neighbors of $W$ in $\ol{U_1}$ is at least \[ \binom{\alpha x / 4}{k}\binom{x/2}{k}^{-1} |\ol{U_1}| \ge \left(\frac{\alpha x}{4k}\right)^k\left(\frac{2k}{ex}\right)^k |\ol{U_1}| \ge (\alpha / (2e))^k \cdot (N/2) \ge (\alpha / 10)^k N. \] Thus, there exists some particular $W$ with at least $(1-2\eps)|U_1| + (\alpha/10)^k N \ge n-k$ non-neighbors, forming the desired $\book kn$ in $\ol \Gamma$. This contradicts our assumptions on $\Gamma$. We conclude that the partition $V(\Gamma) = U_0\sqcup \cdots \sqcup U_{p-1}$ satisfies \begin{align*} |U_0|& < (e/\eps)^{tp} \cdot \delta n \\ |U_1| & < \frac{n-k}{1-2k\eps} - (\alpha /10)^k N \\ |U_i| & < \frac{n-k}{1-2k \eps} \textnormal{ if $i \ge 2$.} \end{align*} Adding these together, we obtain that the number $N$ of vertices in $\Gamma$ is \begin{align*} \sum_{i=0}^{p-1} |U_i| & < (e/\eps)^{tp} \cdot \delta n + (p-1) \frac{n-k}{1-2k \eps} - (\alpha /10)^k N \\ & < (1+ 3k\eps) N + (e/\eps)^{tp} \cdot \delta n - (\alpha /10)^k N \\ & < N, \end{align*} if $\eps$ is small enough compared to $k$ and $\alpha$, and $\delta$ is small enough compared to $\eps$, $t$, and $p$. This is a contradiction and we are done. \end{proof} We now have all the tools to complete the proof. \begin{proof}[Proof of ``if'' direction of \cref{thm:multipartite}.] Recall that $H=\book kn$, and $G = K_p(a_1,\dots,a_p)$, where $1 \leq a_1 \leq \dotsb \leq a_{p-1} \leq t$, $a_p = \delta n$, and $n$ is sufficiently large in terms of $t,k,$ and $p$. We are given a $G$-free graph $\Gamma$ on $N = (p-1)(n-1)+1$ vertices, and we wish to show that $\ol \Gamma$ contains a copy of $H$. We have already proved in \cref{lem:low-deg-vtxs} that at most $\alpha N$ vertices of $\Gamma$ have degree at most $d = (1-1/(p-1)- \alpha)N$, for any fixed $\alpha >0$ and sufficiently large $N$. If we let $T$ be the set of vertices of degree greater than $d$, then the induced subgraph $\Gamma[T]$ has at least $(1-\alpha)N$ vertices and thus minimum degree at least $(1-1/(p-1)-2 \alpha)\ab T$. Applying \cref{thm:aes-variant} to the graph $\Gamma[T]$, we find that as long as $\alpha$ is sufficiently small in terms of $p$ and $t$, we have that $\Gamma[T]$ is $(p-1)$-partite. Let the parts of $\Gamma[T]$ be $T_1,\dots,T_{p-1}$. We now argue roughly as in the proof of \cref{thm:aes-variant}. Recall that for a vertex $v$ and a vertex set $W$, we denote by $d(v,W)$ the \textit{density} of $v$ to $W$, namely the number of neighbors of $v$ in $W$ divided by $\ab{W}$. \begin{claim}\label{cl:partition-properties} Let $T_1,\dots,T_{p-1}$ be as defined above. Let $\xi = 4p^2 \alpha$. Then for every $1 \leq i \neq j \leq p-1$, we have that \begin{equation}\label{eq:part-sizes} \left(\frac{1}{p-1} -\xi\right)N \leq \ab{T_i} \leq \left(\frac{1}{p-1} +\xi\right)N \end{equation} and \begin{equation}\label{eq:pair-densities} d(w,T_j) \geq 1-\xi \text{ for every }w \in T_i. \end{equation} \end{claim} \begin{proof} Since $T_i$ is an independent set, every vertex in $T_i$ has degree at most $N-\ab{T_i}$. Since every vertex in $T_i$ has degree at least $d$, this implies that $\ab{T_i} \leq N-d = (1/(p-1)+\alpha)N$. Since $T_1,\dots,T_{p-1}$ partition $T$, which has size at least $(1-\alpha)N$, this implies that $\ab{T_i} = \ab{T} -\sum_{j \neq i} \ab{T_j} \geq (1/(p-1)-p \alpha)N$, which proves (\ref{eq:part-sizes}) since $p \alpha < \xi$. For (\ref{eq:pair-densities}), we recall that the induced subgraph $\Gamma[T]$ has minimum degree at least $(1-1/(p-1)-2 \alpha)\ab{T}$. So any $w \in T_i$ has at most $(1/(p-1)+2 \alpha)\ab T$ non-neighbors in $T$. Additionally, since $T_i$ is an independent set, every $w \in T_i$ has $\ab{T_i}-1$ non-neighbors in $T_i$. If $d(w,T_j)<1-\xi$, then the total number of non-neighbors of $w$ is at least \[ \xi \ab{T_j} + \ab{T_i} - 1 \geq (1+\xi)\left( \frac{1}{p-1} - p \alpha\right)N - 1 > \left( \frac{1+\xi}{p-1} - 2p \alpha\right) N > \left(\frac 1{p-1} + 2\alpha\right)\ab{T}, \] using the computations above and our choice of $\xi = 4p^2 \alpha$. This is a contradiction. \end{proof} Let $S$ be the complement of $T$, i.e.\ the set of vertices in $\Gamma$ with degree less than $d$, and recall that $\ab{S} \leq \alpha N$. \begin{claim} Let $\zeta =pt \xi = 4p^3 t \alpha$. For every $v \in S$, at least one of the following is true. Either $v$ has no edges to some $T_i$, or else $d(v,T_i) < \zeta$ for at least two different choices of $i \in [p-1]$. \end{claim} \begin{proof} Suppose for contradiction that this is false for some $v \in S$. Thus, $d(v,T_i)\geq \zeta$ for all but at most one choice of $i \in [p-1]$, and additionally $v$ has a neighbor in each $T_i$. By relabeling the parts, we may assume that $d(v,T_i) \geq \zeta$ for all $i \in [p-2]$. Let $w$ be a neighbor of $v$ in $T_{p-1}$. By (\ref{eq:pair-densities}), we see that $v$ and $w$ have at least $(\zeta-\xi)\ab{T_1} > \xi\ab{T_1} > a_3$ common neighbors in $T_1$, for $N$ sufficiently large. Pick any $a_3$ common neighbors in $T_1$. Then $v,w$, and these $a_3$ common neighbors have at least $(\zeta - (a_3+1)\xi)\ab{T_2} > \xi\ab{T_2} > a_4$ common neighbors in $T_2$. Continuing in this way, we can pick out $a_i$ vertices in $T_{i+2}$ which are common neighbors of all previously-chosen vertices. At the end of this process, we can still pick at least $(\zeta-(p-1)t\xi)\ab{T_{p-2}} \geq \delta n$ common neighbors in $T_{p-2}$, and thus we can build a copy of $G$, contradicting our assumption that $\Gamma$ is $G$-free. \end{proof} We partition $S$ into $S_1 \cup S_2$, where $S_1$ consists of all vertices in $S$ that are empty to some part $T_i$, and $S_2$ consists of the remaining vertices $v$, namely those satisfying $d(v,T_i)<\zeta$ for at least two choices of $1 \leq i \leq p-1$. Now, we pick an index $i \in [p-1]$ uniformly at random, and then pick a $k$-set $Q \subset V_i$ uniformly at random. By doing so, we obtain a (non-uniform) distribution on the set of $k$-cliques in $\ol \Gamma$. For a vertex $v \in V(\Gamma)$, let us say that $v$ \emph{extends} $Q$ if $Q \cup \{v\}$ is also a clique in $\ol \Gamma$, or equivalently if $v$ is not adjacent in $\Gamma$ to any vertex of $Q$. Note that if $v \in Q$, then we still say that $v$ extends $Q$, even though this is not really an extension per se. We observe that if $v \in T$, then the probability that $v$ extends $Q$ is at least $1/(p-1)$. Indeed, the probability that $v$ extends $Q$ is at least the probability that $v \in T_i$ for the randomly chosen index $i$, which is exactly $1/(p-1)$ since we pick the index $i$ uniformly at random. Next, if $v \in S_1$, then we again have that the probability that $v$ extends $Q$ is at least $1/(p-1)$. Indeed, if $v \in S_1$, then $v$ has no edges to $T_j$ for at least one index $j$. The probability that $v$ extends $Q$ is then at least the probability that $j$ is the randomly chosen index, which equals $1/(p-1)$. Finally, if $v \in S_2$, then without loss of generality, $d(v,T_1) < \zeta$ and $d(v,T_2)<\zeta$. If the randomly chosen index $i$ is $1$ or $2$, then the probability that $v$ has an edge to $Q$ is at most $k\zeta$, by the union bound. Therefore, if $v \in S_2$, then \[ \pr(v\text{ extends }Q) \geq \frac{2}{p-1}\cdot (1-k\zeta) \geq \frac{1}{p-1}, \] since we may pick $\alpha$ sufficiently small so that $k \zeta \leq 1/2$. By putting all of this together, we find that $\pr(v \text{ extends }Q) \geq 1/(p-1)$ for every vertex $v \in V(\Gamma)$. By linearity of expectation, this implies that \[ \E[|\{v : v\text{ extends }Q\}|] = \sum_{v \in V(\Gamma)} \pr(v\text{ extends }Q) \geq \frac{N}{p-1} \] Therefore, there exists some clique $Q$ in $\ol \Gamma$ which has at least $\lceil N/(p-1)\rceil = n$ extensions. Since exactly $k$ of these extensions are the degenerate ones coming from vertices in $Q$ itself, we find that $\ol \Gamma$ contains a copy of $H=\book kn$. This completes the proof. \end{proof} \section{Concluding remarks}\label{sec:concluding} In this section we collect a few of the tantalizing open questions remaining in this area. \paragraph{Removing regularity.} Note that the full Ramsey goodness results of Nikiforov and Rousseau~\cite{NR09} hold in greater generality than our results \cref{thm:book-book} and \cref{thm:multipartite}. However, due to the dependence of their arguments on Szemer\'edi's regularity lemma, the quantitative dependence between the graph sizes involved are tower-type. It would be interesting to find a direct proof of their goodness results without regularity, as this would likely lead to superior quantitative bounds. \paragraph{Near Ramsey goodness.} In \cref{thm:multipartite}, we study the Ramsey number $r(K_p(a_1,\dots,a_p), \book kn)$ for sufficiently large $n$, where $a_1,\dots,a_{p-1}$ are fixed and $a_p \leq \delta n$ for some absolute constant $\delta>0$. We are able to determine this Ramsey number in the case $a_1 = a_2 = 1$ (in which case the answer is given by the Ramsey goodness bound), but it is natural to ask what happens for larger values of $a_1$ and $a_2$. In this case, there is a natural lower bound, generalizing the proof of the ``only if'' direction of \cref{thm:multipartite}, and which shows a surprising connection to an analogue of the classical extremal problem for complete bipartite graphs. To explain this connection, we first define the following Dirac-type extremal function. \begin{definition} Given a graph $H$ and integers $k,n$, let $d_k(n,H)$ be the maximum $d$ for which there is an $(n+d-1)$-vertex $H$-free graph, at most $k-1$ vertices of which have degree less than $d$. \end{definition} Now let $d = d_k(n, K_{a_1,a_2})$, and let $\Gamma_0$ be a $K_{a_1,a_2}$-free graph on $n+d-1$ vertices, at most $k-1$ of which have degree less than $d$. Let $\Gamma$ be a graph with $N=(p-1)(n-1)+d$ vertices, whose vertex set is divided into $p-1$ parts $U_1,\dots,U_{p-1}$ with $\ab{U_1} = n+d-1$ and $\ab{U_2} = \dotsb = \ab{U_{p-1}} = n-1$, such that $\Gamma[U_1]$ is isomorphic to $\Gamma_0$, and such that all pairs of vertices in different parts are adjacent. Then $\Gamma$ is $K_p(a_1,\dots,a_p)$-free, since $U_2,\dots,U_{p-1}$ are independent sets, and $\Gamma[U_1]$ is $K_{a_1,a_2}$-free. Additionally, $\ol \Gamma$ is a disjoint union of $\ol{\Gamma_0}$ and $p-2$ cliques of order $n-1$. The cliques are too small to contain a copy of $\book kn$, and all but at most $k-1$ vertices of $\ol{\Gamma_0}$ have degree at most $(n+d-1)-1-d = n-2$. Since $\book kn$ has $k$ vertices of degree $n-1$, this shows that $\ol \Gamma$ is $\book kn$-free. Thus, we conclude that \begin{equation}\label{generalextremal} r(K_p(a_1,\dots,a_p), \book kn) > (p-1)(n-1) + d_k(n,K_{a_1,a_2}). \end{equation} Our proof of the ``only if'' direction of \cref{thm:multipartite} used the same argument, and we simply noted that if $a_2>1$, then for sufficiently large $n$, we have $d_k(n,K_{a_1,a_2})\geq a_1$ for all $k \geq 2$. We conjecture that the lower bound (\ref{generalextremal}) is tight for sufficiently large $n$, if $a_1,\dots,a_{p-1}$ are fixed, and $a_p \leq \delta n$. \begin{conjecture}\label{conj:dirac-type} For all integers $k,p,t\geq 2$, there exists some $\delta>0$ such that the following holds for all $n \geq 1$. For positive integers $a_1 \leq \dotsb \leq a_{p-1} \leq t$ and $a_p \leq \delta n$, we have \[ r(K_p(a_1,\dots,a_p), \book kn) = (p-1)(n-1) + d_k(n,K_{a_1,a_2})+1. \] \end{conjecture} \noindent Thus, \cref{thm:multipartite} verifies \cref{conj:dirac-type} in the case $a_1 = a_2 = 1$. \paragraph{Disconnected graphs.} Ramsey goodness results are some of the rare examples in graph Ramsey theory where exact values of Ramsey numbers are known. Another such example is an old result of Burr, Erd\H os, and Spencer~\cite{BuErSp}, recently improved by Buci\'c and Sudakov~\cite{BuSu}, which shows \[ r(nG, nG) = 2(|G| - \alpha(G))n + c \] for $n$ sufficiently large and some constant $c=c(G)$. Here, $G$ is a fixed graph, $nG$ is a vertex disjoint union of $n$ copies of $G$, and $\alpha(G)$ is the independence number of $G$. Does there exist a theory of Ramsey goodness for disconnected graphs, giving a common generalization of the Burr--Erd\H os--Spencer result and our theorems? \paragraph{Empty pairs in triangle-free graphs.} Motivated by a well-studied approach to the famous Erd\H os--Hajnal conjecture, the following conjecture was proposed by Conlon, Fox, and Sudakov. \begin{conjecture}[{\cite[Conjecture 3.14]{CoFoSu15}}] \label{conj:triangle-free} There exists some $\eps>0$ such that every $N$-vertex triangle complete graph contains two vertex subsets $A,B$ with $\ab A \geq \eps N$, $\ab B \geq N^\eps$, and with no edges between $A$ and $B$. \end{conjecture} For more on this conjecture and its variants, see also \cite{CFSSS}. \cref{conj:triangle-free} remains open. The strongest result in this direction, due independently to Fox and Shapira (unpublished) says that one may take $\ab A \geq \eps N$ and $\ab B \geq \eps\log N/\log \log N$. One consequence of \cref{thm:main1} is that we may take $\ab A \geq \eps N$ and $\ab B \geq (\log N)^\eps$, for $\eps = 1/31$. Indeed, \cref{thm:main1} with $p=3$ says that if $n \geq 2^{k^{10p}} = 2^{k^{30}}$ and if $N = (p-1)(n-1)+1 = 2n-1$, then for every $N$-vertex triangle-free graph $\Gamma$, its complement $\ol \Gamma$ contains a copy of $\book kn$. Let $A$ be the set of leaves of this book and $B$ be its spine, so that $\ab A = n \geq N/31$ and $\ab B = k \geq (\log N)^{1/31}$. Since $A \cup B$ span a book in $\ol \Gamma$, there are no edges between $A$ and $B$ in $\Gamma$. By the same argument, we see that improving the bounds in \cref{thm:main1} could yield progress on \cref{conj:triangle-free}. For example, improving the bound $n \geq 2^{k^{10p}}$ in \cref{thm:main1} to a bound that is single-exponential in both $k$ and $p$ would allow one to take $\ab A \geq \eps N$ and $\ab B \geq \eps \log N$ in \cref{conj:triangle-free}. \paragraph{Ramsey goodness threshold.} More generally, it is natural to ask what the ``Ramsey goodness threshold'' is in \cref{thm:main1}. That is, what is the smallest $n$ (in terms of $k$ and $p$) such that $r(K_p, \book kn) = (p-1)(n-1)+1$? A simple random construction shows that this threshold is at least $(k/\log p)^{cp}$, for an absolute constant $c>0$. Indeed, let $n = (k/\log p)^{cp}$ and $N = (p-1)(n-1)+1$, and let $\Gamma$ be an Erd\H os--R\'enyi random graph on $N$ vertices with edge probability\footnote{If the quantity $C(\log p)/k$ is greater than $1$, then the result we are trying to prove is vacuously true, since $(k/\log p)^{cp}$ is then less than $1$. Thus we may assume that this is a valid edge probability.} $C(\log p)/k$, for an absolute constant $C>0$. Then a first moment estimate shows that with positive probability, $\Gamma$ does not contain a copy of $K_p$ and its complement does not contain a copy of $\book kn$. However, there remains a rather large gap between the lower bound of $(k/\log p)^{cp}$ and the upper bound of $2^{k^{10p}}$ for this threshold. In particular, it would be interesting to determine if, for $p$ fixed, the correct behavior is polynomial or exponential in $k$.
\section{Introduction} \label{sec:introduction} Whereas direct, adaptive optics (AO)-assisted imaging is the best tool to detect and characterize faint companions close to the diffraction limits of current 10\,m-class telescopes, these instruments usually cannot identify comoving objects at separations that are larger than several arcseconds. The Gemini Planet Imager \citep[GPI;][]{Macintosh2014} and the Spectro-Polarimetric High-contrast Exoplanet REsearch instrument \citep[SPHERE;][]{beuzit2019} has a field of view with a radial extent of approximately 1\farcs4 and 5\farcs5 with respect to the primary star. Even though several remarkable discoveries have been made with these instruments \citep[e.g.,][]{macintosh2015,chauvin2017b,keppler2018}, it is reasonable to assume that a non-negligible fraction of wide-orbit companions remain undiscovered as they are located outside the field of view of the respective detectors. Studying this unexplored population of wide-orbit objects is crucial for obtaining a complete census of the occurrence rates of sub-stellar companions. Dynamical and spectroscopic monitoring of these companions will help significantly in understanding the underlying formation mechanisms and test the efficiency of several proposed formation channels. Due to the low amount of flux contamination from the primary star, spectroscopic analysis of these widely separated companions is relatively easy and can be conducted with non-AO instruments. Constraining elemental abundances of the atmospheres and comparison to the stellar properties provides important clues as to whether the companion has formed in situ \citep[e.g.,][]{kroupa2001,chabrier2003}, inside a protoplanetary disk closer to the star \citep[e.g.,][]{pollack1996,boss1997}, or was even captured \citep[e.g.,][]{kouwenhoven2010,malmberg2011}. Even transiting exomoons could be detected around these low-mass companions by monitoring their light curves. Due to limits of the field of view of high-contrast imagers, comoving objects at these larger separations need to be identified using other techniques. The \textit{Gaia} mission \citep{gaia2016} of the European Space Agency and especially its \rev{early version of the third} data release \citep[\textit{Gaia} \rev{EDR3};][]{gaia2020} are best suited to identify this population of low-mass companions at wide orbital separations. Future data releases of the \textit{Gaia} mission might even provide partial orbital solutions for some of the identified companions. In Sect.~\ref{sec:methods} of this article we describe how we use \textit{Gaia} EDR3 to search for comoving objects at wide separations and in to K-type stars in the Scorpius-Centaurus association \citep[Sco-Cen;][]{dezeeuw1999}. Sco-Cen is composed of the three subgroups Upper Scorpius (US), Upper Centaurus-Lupus (UCL), and Lower Centaurus Crux (LCC) with mean distances of 145 pc, 140 pc, and 118 pc, respectively \citep{dezeeuw1999}. Its youth -- with average ages of 10\,Myr, 16\,Myr, and 15\,Myr for the US, UCL, and LCC subgroups respectively \citep{pecaut2016} -- and its proximity made this association subject to several studies for young, directly imaged exoplanets \citep{rameau2013,chauvin2017b,keppler2018,haffert2019}. The solar-type stars that are observed within the Young Suns Exoplanet Survey \citep[YSES;][]{bohn2020a} constitute a subsample of the larger selection of K-type Sco-Cen members, which is studied in this article. We further analyze \rev{this sample of preselected companion candidates}, derive object masses and companionship probabilities in Sect.~\ref{sec:results_analysis}. In Sect.~\ref{sec:hci_results} we present the \rev{results from complementary imaging data that were collected for seven of our preselected candidate companions. } \rev{These data} can be used to assess the quality of our strictly \textit{Gaia}-based results. Lastly, we discuss our findings in Sect.~\ref{sec:discussion} and present our conclusions and further implications of this work in Sect.~\ref{sec:conclusions}. \section{Data and methods} \label{sec:methods} \rev{We introduce the sample of K-type pre-main sequence stars that is objective to our analysis in Sect.~\ref{subsec:sample_selection} and we reassess their membership status in light of \textit{Gaia} EDR3 astrometric measurements. The selection algorithm that we apply to identify comoving companion candidates to the stars of our sample in the \textit{Gaia} catalogue is presented in Sect.~\ref{subsec:methods_gaia_edr3}. As several of the companion candidates were also imaged within the scope of YSES, we have additional near infrared imaging data to assess the properties of these companions. Our high-contrast observations and data reduction methods are described in Sect.~\ref{subsec:methods_data_reduction}. } \subsection{\rev{Sample selection}} \label{subsec:sample_selection} \rev{Our analyses are based on} a sample of \rev{493} K-type pre-main sequence stars located in Sco-Cen.\footnote{Compiled from Table 7 of \citet{pecaut2016}.} The subsample of solar-type stars ($0.8\,M_{\odot}<M<1.2\,M_{\odot}$) in the LCC sub-group of Sco-Cen is used within YSES to search for planetary-mass companions. These targets and their selection are extensively described in \citet{pecaut2016}. As their criteria for Sco-Cen membership are amongst other parameters based on kinematically constrained parallaxes, we assessed if the trigonometric \textit{Gaia} parallaxes confirm the membership status of these stars. We applied the same thresholds for Sco-Cen membership as presented in \citet{dezeeuw1999} and \citet{pecaut2016}, which are given by $4\,\mathrm{mas}<\varpi<20\,\mathrm{mas}$, $\mu<55\,\mathrm{mas}\,\mathrm{yr}^{-1}$, $\mu_{\alpha *}<10\,\mathrm{mas}\,\mathrm{yr}^{-1}$, $\mu_\delta<30\,\mathrm{mas}\,\mathrm{yr}^{-1}$. This analysis indicated that only ten targets (2.0\%) from the initial catalog \rev{do not comply with these astrometric requirements for Sco-Cen membership} (see Table~\ref{tbl:dismissed_targets}). \begin{table} \caption{ Targets that \rev{were excluded from our analysis}. } \label{tbl:dismissed_targets} \def1.2{1.2} \setlength{\tabcolsep}{12pt} \small \centering \begin{tabular}{@{}ll@{}} \hline \hline 2MASS ID & Reason\\ \hline 11143442-4418240 & $\varpi=(1.94\pm0.01)\,\mathrm{mas}<4\,\mathrm{mas}$\\ \rev{11472064-4953042} & \rev{No astrometric measurements}\\ 12063292-4247508 & $\mu=(56.5\pm0.1)\,\mathrm{mas\,yr}^{-1}>55\,\mathrm{mas\,yr}^{-1}$\\ \rev{12124890-6230317} & \rev{No astrometric measurements}\\ \rev{12253370-7227480} & \rev{No astrometric measurements}\\ \rev{13010856-5901533} & \rev{No astrometric measurements}\\ \rev{13032904-4723160} & \rev{No astrometric measurements}\\ \rev{13405585-4244505} & \rev{No astrometric measurements}\\ \rev{15151856-4146354} & $\sigma_\varpi=0.55\,\mathrm{mas}>0.50\,\mathrm{mas}$\\ \rev{15250358-3604455} & $\sigma_\varpi=0.57\,\mathrm{mas}>0.50\,\mathrm{mas}$\\ \rev{15272286-3604087} & \rev{No astrometric measurements}\\ 15280322-2600034 & $\varpi=(1.76\pm0.06)\,\mathrm{mas}<4\,\mathrm{mas}$\\ 15364094-2923574\tablefootmark{a} & \rev{Optical triple} \\ 15374917-1840449 & $\varpi=(0.76\pm0.03)\,\mathrm{mas}<4\,\mathrm{mas}$\\ \rev{15455225-4222163} & \rev{No astrometric measurements}\\ \rev{15463111-5216580} & \rev{No astrometric measurements}\\ \rev{15494499-3925089} & \rev{No astrometric measurements}\\ \rev{15550624-2521102} & \rev{No astrometric measurements}\\ 15564402-4242301 & \rev{No astrometric measurements}\\ \rev{16003134-2027050} & \rev{No astrometric measurements}\\ \rev{16015149-2445249} & \rev{No astrometric measurements}\\ \rev{16021045-2241280} & \rev{No astrometric measurements}\\ 16025243-2402226 & $\varpi=(0.82\pm0.02)\,\mathrm{mas}<4\,\mathrm{mas}$\\ \rev{16025396-2022480} & \rev{No astrometric measurements}\\ \rev{16034536-4355492} & \rev{No astrometric measurements}\\ \rev{16062196-1928445} & \rev{No astrometric measurements}\\ \rev{16070356-2036264} & \rev{No astrometric measurements}\\ \rev{16120140-3840276} & \rev{No astrometric measurements}\\ \rev{16131738-2922198} & \rev{No astrometric measurements}\\ 16141107-2305362 & $\varpi=(0.50\pm0.11)\,\mathrm{mas}<4\,\mathrm{mas}$\\ 16195068-2154355 & \rev{No astrometric measurements}\\ \rev{16240632-2456468} & \rev{No astrometric measurements}\\ \rev{16271951-2441403} & \rev{No astrometric measurements}\\ \rev{16384946-2735294} & $\varpi=(3.73\pm0.72)\,\mathrm{mas}<4\,\mathrm{mas}$\\ \hline \end{tabular} \tablefoot{ The targets in the table were excluded from the analysis, either because these are not consistent with Sco-Cen membership according to the criteria listed in \citet{dezeeuw1999} and \citet{pecaut2016} \rev{or the \textit{Gaia} database contained insufficient or uncertain astrometric information.} \tablefoottext{a}{% \rev{2MASS~J15364094-2923574 is resolved by \textit{Gaia} into an optical triple, comprised of a foreground ($\varpi$ $\simeq$ 16 mas), high proper motion, physical binary (Gaia EDR3 6209195913018942976 \& Gaia EDR3 6209195913018942720) and a third background interloper (Gaia EDR3 6209195913015396608).} } } \end{table} \begin{figure*} \resizebox{\hsize}{!}{\includegraphics{./ScoCen_sample.pdf}} \caption{ \rev{Input sample of K-type pre-main sequence stars in Sco-Cen. We show the sky positions of the targets in galactic coordinates and the color of the markers indicates the distance to the objects. Members of the YSES subsample are highlighted by the black outlines around the markers. The star highlights TYC~8252-533-1, whose brown dwarf companion is analyzed in Sect.~\ref{subsec:bd_companion_yses}. } } \label{fig:scocen_sample} \end{figure*} Whilst this hypothesis needs to be confirmed by further measurements, we removed the corresponding targets from the full sample for the scope of this work. Furthermore, \rev{no astrometric measurements were available in the \textit{Gaia} database for 24 additional stars from the initial catalogue (see Table~\ref{tbl:dismissed_targets}). As our identification of comoving companion candidates relies on precise astrometric measurements for all stars from the input sample, we discarded these insufficiently characterized objects as well. } \rev{The final input catalogue of stars used in this study is comprised of 459} K-type Sco-Cen members. \rev{ The positions and distances of these targets are visualized in Fig.~\ref{fig:scocen_sample}. } \subsection{\rev{preselection of companion candidates in \textit{Gaia} EDR3}} \label{subsec:methods_gaia_edr3} \rev{Our preliminary companionship assessment is based on the data products provided by \textit{Gaia} EDR3. We corrected the parallax measurements for the zero point bias as discussed in \citet{lindegren2020a}}\footnote{\rev{The applied correction formula for the parallactic zero point bias is available at \url{https://gitlab.com/icc-ub/public/gaiadr3_zeropoint}.}} \rev{and performed the correction of the $G$ band magnitudes of sources with 6-parameter astrometric solutions as described by \citet{riello2020}}.\footnote{\rev{The applied correction formula for the $G$ band magnitudes is available at \url{https://github.com/agabrown/gaiaedr3-6p-gband-correction}.}} We compiled a first list of potential companions in four steps. \rev{For each target from our input catalogue} \begin{enumerate} \item we found all targets within \rev{a projected physical separation of $\rho_\mathrm{cutoff}=10\,000$\,au}, \item we dismissed data without any parallax measurements or a measurement with an uncertainty larger than 0.5\,mas, \item we checked for the remaining objects, if the \rev{parallaxes deviated by less than 20\% from that of the host}, \item and we \rev{required the proper motions in right ascension and declination to be consistent within a \rev{10\,km\,s$^{-1}$} interval}. \end{enumerate} \rev{Similar selection methods are used by \citet{fontanive2019}, \citet{fontanive2021}, and within the scope of the COol Companions ON Ultrawide orbiTS \citep[COCONUTS;][]{zhang_zj2020,zhang_zj2021} program.} A detailed discussion of these preselection criteria can be found in Sect.~\ref{subsec:discussion_preselection_criteria}. As we are predominantly interested in the identification of sub-stellar companions, we do not require a radial velocity (RV) measurement, since brown dwarf members of \rev{Sco-Cen} are too distant and thus too faint to allow an RV measurement in the \textit{Gaia} database. \rev{The radial velocity measurements reported in \textit{Gaia} EDR3 are not newly derived for this catalogue, but adopted from the second data release of the \textit{Gaia} mission \citep[Gaia DR2;][]{gaia2018}, for which an average limiting magnitude to facilitate RV measurements of $\sim$13\,mag is reported \citep{cropper2018}.} After applying the four selection criteria as described before, we identified \rev{172} companion candidates to \rev{148} stars of our sample (for a detailed list see Table~\ref{tbl:companions_full_1} in Appendix~\ref{sec:identified_companions}) within a cutoff \rev{separation of 10,000\,au}. When studying the list of identified companion \rev{candidates} we realized that twelve of the identified companion \rev{candidates} were part of the input catalog. \rev{These six pairs of potential stellar multiples that were} directly obtained from the list of K-type Sco-Cen members in \citet{pecaut2016} \rev{are listed in Table~\ref{tbl:duplicates}}. \begin{table} \caption{ \rev{ Duplications amongst our list of preselected candidate companions. } } \label{tbl:duplicates} \def1.2{1.2} \setlength{\tabcolsep}{12pt} \small \centering \begin{tabular}{@{}ll@{}} \hline \hline 2MASS ID & \textit{Gaia} EDR3 ID\\ \hline 13335329-6536473 & 5863747467220735744\\ 13335481-6536414 & 5863747467220738432\\ \hline 15241147-3030582 & 6208136391829015936\\ 15241303-3030572 & 6208136396126956928\\ \hline 16023814-2541389 & 6235806323497438592\\ 16023910-2542078 & 6235806259081172736\\ \hline 16123916-1859284 & 6245821092014031616\\ 16124051-1859282 & 6245821126373768832\\ \hline 16265700-3032232 & 6037784004457590528\\ 16265763-3032279 & 6037784008760031872\\ \hline 16320058-2530287 & 6045791575844270208\\ 16320160-2530253 & 6045791953801392128\\ \hline \end{tabular} \tablefoot{ We show targets that were both listed in the input catalog and the full selection of candidate companions presented in Appendix~\ref{sec:identified_companions}. The horizontal lines separate individual pairs of potential candidate companions. } \end{table} \begin{table*} \caption{ \rev{ Candidate triple systems to K-type stars in Sco-Cen. The list originates from our preselected candidates companions presented in Appendix~\ref{sec:identified_companions}. } } \label{tbl:triples} \def1.2{1.2} \small \centering \begin{tabular}{@{}llllll@{}} \hline \hline \multicolumn{2}{c}{Primary} & \multicolumn{2}{c}{Secondary} & \multicolumn{2}{c}{Tertiary}\\ 2MASS ID & \textit{Gaia} EDR3 ID & 2MASS ID & \textit{Gaia} EDR3 ID & 2MASS ID & \textit{Gaia} EDR3 ID\\ \hline 11554295-5637314 & 5343603288120259072 & - & 5343603288130858112 & - & 5343603180734334592\\ 12094184-5854450 & 6071087597518919040 & - & 6071087597518919808 & - & 6071087597497876480\\ 12123577-5520273 & 6075815841096386816 & - & 6075816592695096576 & - & 6075816596995760640\\ 12474824-5431308 & 6073980172067600640 & - & 6073980240787079680 & - & 6073980172067600000\\ 13071310-5952108 & 6056115131031531264 & - & 6056115135337482496 & - & 6056115169731484288\\ 13335481-6536414 & 5863747467220738432 & 13335329-6536473 & 5863747467220735744 & - & 5863747462890662144\\ 13540743-6733449 & 5850443307764629376 & - & 5850443303440130816 & - & 5850443303446183040\\ 15113968-3248560 & 6207460471351260160 & - & 6207460436991521280 & - & 6207460471351260928\\ - & 6200310514738629504 & 15171083-3434194 & 6200310519037175040 & - & 6200310484677437184\\ 15241147-3030582 & 6208136391829015936 & 15241303-3030572 & 6208136396126956928 & - & 6208136396122878976\\ 15370214-3136398 & 6208381582919629568 & - & 6208381587215253504 & - & 6208381587220236160\\ 15451286-3417305 & 6014696841553696768 & - & 6014696841553696896 & - & 6014696875913435520\\ 16065795-2743094 & 6042124910722287744 & - & 6042124915024285440 & - & 6042124807643059968\\ 16085427-3906057 & 5997035351934438784 & - & 5997035317574700544 & - & 5997035416337166976\\ 16114387-2526350 & 6049537165279381632 & - & 6049532737170518016 & - & 6049537169580902272\\ 16135801-3618133 & 6022499010422921088 & - & 6022499006128860928 & - & 6022499010440068864\\ 16161423-2643148 & 6042418858284146688 & - & 6042418862581174016 & - & 6042418828224074752\\ 16204468-2431384 & 6049266036882633856 & - & 6049266002522895232 & - & 6049266414839756416\\ - & 6024816059387932416 & - & 6024816020718366464 & 16235484-3312370 & 6024816025017339392\\ 16265763-3032279 & 6037784008760031872 & 16265700-3032232 & 6037784004457590528 & - & 037784004457597568\\ 16345314-2518167 & 6047289699098449920 & - & 6047289699098450944 & - & 6047289733458188032\\ \hline \end{tabular} \tablefoot{ \rev{ The targets are classified as potential primary, secondary or tertiary of the system by increasing $G$ band magnitudes. Only for targets from our input catalog we list the corresponding 2MASS identifiers. } } \end{table*} \rev{Three of these candidate multiple systems from the input catalog even host a third potential companion that was identified by our preselection for both of the respective Sco-Cen K-type stars: these are Gaia EDR3 5863747462890662144, Gaia EDR3 6208136396122878976, and Gaia EDR3 6037784004457597568 that are preselected as candidate companions to the potential stellar multiples composed of Gaia EDR3 5863747467220735744 (2MASS J13335329-6536473) and Gaia EDR3 5863747467220738432 (2MASS J13335481-6536414), Gaia EDR3 6208136391829015936 (2MASS J15241147-3030582) and Gaia EDR3 6208136396126956928 (2MASS J15241303-3030572), and Gaia EDR3 6037784004457590528 (2MASS J16265700-3032232) and Gaia EDR3 6037784008760031872 (2MASS J16265763-3032279), respectively. } After removing these duplicates from our list of preselected companions, \rev{163} potential companions to \rev{142} Sco-Cen members remained.\footnote{To report the full output of our algorithm, we did not remove these duplications from the table presented in Appendix~\ref{sec:identified_companions}. All further analysis, however, is performed on the cleaned sample of \rev{163} individual companion candidates.} Amongst these newly identified candidate binary systems we found \rev{21} potential systems of even higher multiplicity. \rev{In addition to the three previously mentioned candidate triples comprising two stars from our input catalog each, we found 18 further targets that were associated with two individual candidate companions according to our preselection. All of these potential triple systems are listed in Table~\ref{tbl:triples}. } In addition, we identify HD~98363 (2MASS J11175813-6402333, Gaia~EDR3 5240643988513309952) among this sample of preselected candidate companions. \citet{bohn2019} showed that HD~98363 is the $1.9\,M_\sun$ primary to the solar-mass star Wray~15-788 (2MASSJ11175186-6402056, Gaia~EDR3 5240643988513310592) from our target stars. This demonstrates that the input stars of the algorithm do not necessarily have to be the primary of the system, as the detected companions can be equal or even higher mass. \rev{% Furthermore, we identify seven candidate companions that were also observed with SPHERE as part of YSES. The identifiers of all primary stars with companion candidates from our preselection that have been imaged within the scope of YSES are listed in Table~\ref{tbl:yses_targets}. } \begin{table} \caption{ \rev{ Candidate companion systems with complementary SPHERE data from YSES. } } \label{tbl:yses_targets} \def1.2{1.2} \setlength{\tabcolsep}{12pt} \small \centering \begin{tabular}{@{}ll@{}} \hline \hline 2MASS ID & \textit{Gaia} EDR3 ID\\ \hline 12195938-5018404 & 6126648698878768384\\ 12391404-5454469 & 6074374346993398144\\ 12505143-5156353 & 6075310478057303936\\ 12560830-6926539 & 5844909156504879360\\ 13130714-4537438 & 6088027047281877120\\ 13233587-4718467 & 6083750638577673088\\ 13335481-6536414 & 5863747467220738432\\ \hline \end{tabular} \end{table} \begin{figure*} \resizebox{\hsize}{!}{\includegraphics{./gaia_companion_properties.pdf}} \caption{ \rev{% Astrometric and photometric properties of the input sample and the preselected list of candidate companions (CCs). In the top panel we present the distributions of the object parallaxes, proper motions, and mangitudes from both samples. In the lower panel the uncertainties are shown. The colored values in the upper right of each panel indicate the median and the 68\% confidence intervals of the associated distributions. } } \label{fig:sample_properties} \end{figure*} A detailed analysis of \rev{these} objects \rev{that combines \textit{Gaia} and high-contrast imaging data} is performed in Sect.~\ref{sec:hci_results}. The planetary-mass companions that \citet{bohn2020a,bohn2020c,bohn2021} detected for YSES~1 (TYC~8998-760-1, 2MASS J13251211-6456207, Gaia~EDR3 5864061893213196032) and \rev{YSES~2 (TYC 8984-2245-1, 2MASS J11275535-6626046, Gaia EDR3 5236792880333011968)}, however, are not listed in the \textit{Gaia} archive. This is explained by the large contrast of \rev{all three} companions that are found at angular separations of less than 3\farcs5, which places them directly inside the red dashed exclusion zone highlighted in Fig.~\ref{fig:separation_magnitude}. \rev{ We further compared the astrometric and photometric properties of the targets from our input sample to the preselection of candidate companions. The parallaxes, proper motions, and magnitudes among both groups and their corresponding uncertainties are presented in Fig~\ref{fig:sample_properties}. } \rev{% The distributions of parallaxes and proper motions are very similar among our input sample and the detected candidate companions. We derive median parallaxes of $7.55^{+1.59}_{-0.90}$\,mas and $7.68^{+1.39}_{-1.04}$\,mas and proper motions of $32.06^{+6.90}_{-6.68}$\,mas\,yr$^{-1}$ and $31.83^{+6.15}_{-6.38}$\,mas\,yr$^{-1}$ for the former and latter sample, respectively.\footnote{\rev{The uncertainties represent the 68\% confidence intervals of the distributions.}} This is not surprising as our pre-selection criteria are supposed to identify objects with astrometric properties that are similar to those of the K-type Sco-Cen members from \citet{pecaut2016}. The $G$ band magnitude distributions of our input catalog and identified candidate companions are distinct, with median values of $11.26\pm0.87$\,mag and $14.21^{+2.05}_{-2.19}$\,mag, respectively. This is also expected, as the input catalog contains only stars of the same spectral type that are all members of the same association; hence no large range of the stellar magnitudes is covered by this sample. The companion candidates, however, exhibit fainter magnitudes that extend down to the \textit{Gaia} limiting magnitude of $G\approx21$\,mag. Due to the fainter nature of our candidate companions, their astrometric uncertainties are on average larger by a factor of 2 than those of the stars from our input catalog (see bottom left and middle panel of Fig.~\ref{fig:sample_properties}). The median magnitude uncertainties among both samples are comparable though, yet there are a few objects with magnitude uncertainties as large as 0.02\,mag in our candidate companion sample. These outliers are associated to the faintest targets from our preselection algorithm. } This preselected sample can be refined by comparing the differential projected velocity of a candidate companion to the maximum allowed speed for a gravitationally bound orbit based on the masses of both bodies and their separation. A detailed application of this refinement procedure is described in Sect.~\ref{subsec:companionship_assessment}. \subsection{High-contrast imaging observations} \label{subsec:methods_data_reduction} \rev{% Seven of our preselected companion candidates were also imaged with SPHERE as part of YSES. The identifiers of these systems are listed in Table~\ref{tbl:yses_targets}. For a potential brown dwarf companion around} TYC~8252-533-1 \rev{we collected additional data with} NACO \citep{lenzen2003,rousset2003} at ESO's Very Large Telescope. A detailed overview of \rev{all} observations and the weather conditions is provided in Table~\ref{tbl:yses_observations} in Appendix~\ref{sec:hci_observing_conditions}. The reduction is detailed in \citet{bohn2020a} with a custom processing pipeline that is based on version 0.8.1 of the \texttt{PynPoint} package \citep{stolker2019}. As the companions are reasonably bright and widely separated from the star, we did not perform any PSF subtraction when evaluating their \rev{astrometry and} photometry. \section{Gaia results and analysis} \label{sec:results_analysis} \rev{% In this Section we analyze the results that were derived from our preselection described in Sect.~\ref{subsec:sample_selection}. In Sect.~\ref{subsec:raw_astro_photo} we show the object magnitudes of identified candidate companions as a function of angular separation with respect to the primary star. As we know the ages of all our targets, we can convert these flux measurements to mass estimates for the companion candidates. This analysis is detailed in Sect.~\ref{subsec:mass_estimation}. We further assess the colors of our candidate companions and evaluate whether these are consistent with the proposed Sco-Cen membership in Sect.~\ref{subsec:color_magnitude_analysis}. We analyze the relative motions of all identified objects and probe if these are in agreement with a gravitationally bound orbit around the primary star. This assessment is presented in Sect.~\ref{subsec:companionship_assessment}. In Sect.~\ref{subsec:high_confidence_companions} we present the properties of the candidates that exhibit the highest likelihoods to be bound companions. } \subsection{Raw \textit{Gaia} astrometry and photometry} \label{subsec:raw_astro_photo} In Fig.~\ref{fig:separation_magnitude} we present the apparent $G$ band magnitudes of the identified companion candidates as a function of projected separation. \begin{figure} \resizebox{\hsize}{!}{\includegraphics{./gaia_companions_separation_magnitude.pdf}} \caption{ Identified companion \rev{candidates} to K-type Sco-Cen members. Members of the YSES subsample are highlighted by the black outline around the marker. The orange star highlights the brown dwarf companion TYC~8252-533-1~B that is analyzed in Sect.~\ref{subsec:bd_companion_yses}. The apparent \textit{Gaia} $G$ band magnitude is presented as a function of projected separation in arcseconds. Due to the PSF halo of the primary, the detectable magnitude threshold increases with larger separations from the host. This area of reduced sensitivity is indicated by the red, dashed triangle. \rev{The gray-shaded region represents the field of view of the SPHERE/IRDIS detector.} } \label{fig:separation_magnitude} \end{figure} The detection sensitivity improves with increasing separation from the target, which can be attributed to the PSF halo of the host star. There is a clear exclusion zone (as indicated by the red, dashed triangle in Fig.~\ref{fig:separation_magnitude}) in which the presented technique is not able to detect any low mass comoving objects. This region is however highly complementary to the parameter space that is covered by the field of view of current generation of high-contrast imaging instruments. \rev{% The gray-colored background of Fig.~\ref{fig:separation_magnitude} shows the field of view of the SPHERE/IRDIS camera with a radial extent of $\leq$\,5\farcs5. The seven companions that were observed within the scope of YSES are located in this part of the parameter space. } For separations that are larger than approximately 10 arcseconds the \textit{Gaia} contrast to the primary becomes background limited and we are sensitive to objects with an apparent $G$ band magnitude down to 20\,mag. This is in good agreement with the limiting magnitude of $G=21$\,mag that is required for objects to appear with a five-parameter astrometric solution in the EDR3 catalog \citep{gaia2020}. \subsection{Mass estimation} \label{subsec:mass_estimation} To characterize the identified companion \rev{candidates} in further detail, we determined the absolute magnitudes of the objects using the parallax measurement provided by \textit{Gaia} \rev{EDR3}. In many cases, the parallaxes of the identified companion candidates have larger uncertainties than the parallax measurements of the stars from our input catalog, which have a median error of only 0.02\,mas \rev{(see Fig.~\ref{fig:sample_properties})}. We therefore used the latter parallax values to estimate the distances to the detected objects. \rev{Even though this requires true companionship between both objects, this estimate is a reasonable assumption as all candidate companions are Sco-Cen members according to the astrometric membership criteria from \citet{dezeeuw1999} and \citet{pecaut2016} (see Sect.~\ref{subsec:sample_selection}).} As \citet{pecaut2016} provide age estimates\footnote{We note that these age estimates rely on pre-\textit{Gaia} parallaxes that were derived kinematically and which might differ from the value reported in \textit{Gaia} EDR3. A reassessment of these parameters -- especially for the identified systems with low-mass companions -- is advisable, but beyond the scope of this work.} for all systems but one, we converted the absolute magnitudes of the companions to object masses by evaluation of BT-Settl models \citep{allard2012,baraffe2015} at the corresponding system age. The remaining system without an age measurement, SZ~65 (2MASS J15392776-3446171, Gaia EDR3 6013399894569703040), is a member of the Lupus star forming region, so we assigned it an age of 2\,Myr in accordance with the average age of this cloud complex \citep{comeron2008,alcala2014}. For all ages we assumed an uncertainty of 2\,Myr with a youngest possible age of 1\,Myr. The BT-Settl models we used are valid for objects with masses smaller than $1.2\,M_\sun$, which is equivalent to an apparent $G$ band magnitude of approximately 11\,mag at the average distance of Sco-Cen and at an age of 15\,Myr. For the brightest objects from Fig.~\ref{fig:separation_magnitude}\rev{, which were outside the magnitude range supported by the BT-Settl models,} we used MIST isochrones \citep{dotter2016,choi2016} to convert their $G$ band photometry to a stellar mass. As the object masses strongly depend on the underlying system age and only a single photometric measurement is used for the derivation, we do not claim that the provided mass estimates are very precise, but instead indicate whether it is a brown dwarf or a stellar companion. The derived mass estimates for the companion candidates are listed in Table~\ref{tbl:companions_full_1} in Appendix~\ref{sec:identified_companions}. We present the companion masses as a function of projected physical separation in Fig.~\ref{fig:separation_mass}. \begin{figure} \resizebox{\hsize}{!}{\includegraphics{./gaia_companions_separation_mass.pdf}} \caption{ Identified companion \rev{candidates} to K-type Sco-Cen members II. Members of the YSES subsample are highlighted by the black outline around the marker. The orange star highlights TYC~8252-533-1~B analyzed in Sect.~\ref{subsec:bd_companion_yses}. The companion mass is presented as a function of projected separation in Astronomical Units. Mass conversion was performed by comparison to BT-Settl and MIST models evaluated at the system age. The dashed red line at $80\,M_\mathrm{Jup}$ indicates the threshold between brown dwarfs and stellar mass companions. } \label{fig:separation_mass} \end{figure} The conversion from projected angular separations to projected physical separations was performed using the distance estimate based on the parallax measurement of the primary. We do not include the difference in \textit{Gaia} parallaxes between primary and companion to determine a three-dimensional separation, as these measurements have typical errors of \rev{0.02\,mas} and \rev{0.05\,mas} for stars from our input catalog and companion candidates, respectively \rev{(see Fig.~\ref{fig:sample_properties})}. For two average Sco-Cen members with parallaxes of 7.5\,mas, Gaussian error propagation provides an uncertainty for the radial separation in the order of \rev{1\,pc} or approximately \rev{200,000\,au}. This uncertainty is much larger than our measured projected separations and would dominate the uncertainty of the derived parameter. We proceed using projected separations as a lower limit for the three-dimensional distances. In Fig.~\ref{fig:separation_mass} the region of limited sensitivity due to the PSF halo of the primary is still clearly visible and it implies that for separations closer than approximately 300\,au we are only sensitive to stellar-mass companions. Farther away from the host, however, we can detect comoving brown dwarf companions with masses smaller than $80\,M_\mathrm{Jup}$. The lower mass threshold is reached for separations larger than approximately 1000\,au and we are sensitive to objects masses as low as $20\,M_\mathrm{Jup}$. Exoplanets at Sco-Cen distance and age and with masses below the deuterium burning limit of approximately $13\,M_\mathrm{Jup}$ are thus marginally too faint to be confidently detected with \textit{Gaia} \rev{EDR3}. \subsection{Color-magnitude analysis} \label{subsec:color_magnitude_analysis} To confirm the young and (sub-)stellar nature of the detected objects, we evaluated all candidate companions in a color-magnitude diagram as presented in Fig.~\ref{fig:cmd}. \begin{figure} \resizebox{\hsize}{!}{\includegraphics{./gaia_companions_cmd_annotated.pdf}} \caption{ Color-magnitude diagram of identified companion \rev{candidates} to K-type stars in Sco-Cen. The colors of the markers indicate the projected separation between host and companion. The orange line represents a combination of MIST and BT-Settl isochrones for an age of 15\,Myr. } \label{fig:cmd} \end{figure} The color is estimated using the \textit{Gaia} filters for the blue ($G_\mathrm{BP}$) and red part ($G_\mathrm{RP}$) of the $G$ band continuum. As visualized in Fig~\ref{fig:cmd}, most of the candidate companions have colors that are in very good agreement with synthetic MIST and BT-Settl models for young objects of 15\,Myr, which is a reasonable average for the presented Sco-Cen sample \citep{pecaut2016}. This corroborates the Sco-Cen membership of the analyzed candidates and each of these is very likely to be a young member of the association, even if it turns out not to be a companion to any of the stars from our input catalog. \rev{% There are two outliers at the faint end of the sequence that appear to be bluer than predicted by the evolutionary models. This is, however, not a contradiction with Sco-Cen membership of these objects. } The corresponding objects, Gaia~EDR3 5232514298301348864 and Gaia~EDR3 5997035416337166976, are the faintest among our full sample of identified companion candidates with a $G$ band magnitude of 19.9\,mag \rev{and 19.3\,mag, respectively}. Their $G_\mathrm{BP}$ and $G_\mathrm{RP}$ photometric measurements exhibit a corrected flux excess factor $C^*$ of 0.62 and 0.28, respectively, which is \rev{different from $C^*=0$ that is associated with} trustworthy photometry \citep{riello2020}. This large uncertainty most likely originates from the faint $G_\mathrm{BP}$ flux of the objects, whose true value might be below \textit{Gaia}'s sensitivity limits in this channel. Hence it is certainly possible that Gaia~EDR3 5232514298301348864 and Gaia~EDR3 5997035416337166976 are much redder than indicated in Fig.~\ref{fig:cmd} and consistent with the colors that are predicted for a low-mass brown dwarf companion at Sco-Cen age. This conclusion is corroborated by the better-constrained $G-G_\mathrm{RP}$ colors of both objects. \rev{These values of 1.5\,mag and 1.3\,mag} are in good agreement with late M spectral types. It should be noted that not all of our identified companion candidates have $G_\mathrm{BP}$ and $G_\mathrm{RP}$ flux measurements, as can be seen in Table~\ref{tbl:companions_full_1} in Appendix~\ref{sec:identified_companions}. These \rev{27} targets without any color information are not included in the plot shown in Fig.~\ref{fig:cmd} and their photometric Sco-Cen membership compatibility thus cannot be assessed properly. For \rev{23} of these insufficiently characterized companions the lack of precise color measurements is explained by their proximity and contrast with respect to the target star. \rev{All of these objects exhibit angular separations of less than 3\arcsec.} The remaining four candidates without any color information are at larger separations from the target star, but in all cases these have an additional \textit{Gaia} source of equal or higher brightness at very close separations ($<2\arcsec$); these are most likely affecting the flux measurements. For Gaia~EDR3 6022499010440068864 and Gaia~EDR3 6208381587215253504 these close contaminants are members of the same candidate multiple systems that we have preselected. \subsection{Companionship assessment} \label{subsec:companionship_assessment} We further analyzed whether the identified companion candidates are gravitationally bound multiple systems based on the available astrometric data. In the general description of the gravitational two-body problem, a system is considered bound when its total kinetic energy \begin{equation} T = \frac{\mu}{2}\left(\dot{r}^2+r^2\dot{\phi}^2\right) \end{equation} is smaller than the potential energy \begin{equation} V = \frac{1}{r}GM\mu\,, \end{equation} of both bodies. In this formalism $r$ denotes the separation of the two bodies; $\dot{r}$ and $\dot{\phi}$ are the radial and azimuthal velocities with respect to the center of mass. The sum of both individual object masses $M_1$ and $M_2$ is $M$ and we define the reduced mass as \begin{equation} \mu=\frac{M_1M_2}{M_1+M_2}=\frac{M_1M_2}{M}\,. \end{equation} These conditions imply that a gravitationally bound system requires \begin{equation} \left(\dot{r}^2+r^2\dot{\phi}^2\right) < \frac{2GM}{r}\,. \label{eqn:velocity_lim} \end{equation} Even though we do not know the objects' true three-dimensional separations and differential velocities, equation~\eqref{eqn:velocity_lim} allows us to assess which systems cannot be bound. This is possible because our projected differential velocity $v_\mathrm{proj}$ is strictly smaller or equal to the amplitude of the true differential velocity $\sqrt{\dot{r}^2+r^2\dot{\phi}^2}$. Likewise, the right-hand side of equation~\eqref{eqn:velocity_lim} is bounded above by substituting $r$ in the expression with our measured projected separation $\rho\leq r$ as \begin{equation} \frac{2GM}{r}\leq\frac{2GM}{\rho}=:v_\mathrm{max}^2\,, \label{eqn:def_v_max} \end{equation} where we defined this new expression as the maximum allowed differential velocity for a system to be bound. Hence we evaluated the ratio of our measured projected velocity difference $v_\mathrm{proj}$ and $v_\mathrm{max}$ to assess which systems are most likely not bound as per \begin{align} \label{eqn:v_proj_v_max} \frac{v_\mathrm{proj}}{v_\mathrm{max}}&=v_\mathrm{proj}\sqrt{\frac{\rho}{2GM}}\\ &= \begin{cases} <1\qquad\text{System can be gravitationally bound or}\\ \geq 1\qquad\text{System most likely not gravitationally bound.}\\ \end{cases}\nonumber \end{align} This expression is completely symmetric in $M_1$ and $M_2$, so within this formalism it does not matter which star is considered to be the primary of the system. Whereas a ratio greater than or equal to one is a good indicator that the studied system cannot be physically bound, a value smaller than unity does not necessarily indicate that the opposite scenario is true, due to the unknown contributions to separation and differential velocity along our line of sight. This metric is valid for regular binary systems but it is not suitable to assess systems with higher orders of multiplicity, such as the potential triple systems we have found around some of our targets. A proper treatment for these special cases, however, is not straightforward and will thus be neglected in our further analysis. \rev{% The fraction of triple or higher-order multiple systems is assumed to be approximately 25\,\% among solar-type multiple systems \citep[e.g.,][]{mayor1987,eggleton2008,duchene2013}. It is thus not surprising that we have identified 21 candidate triple systems out of 142 candidate multiples from our preselection. This smaller fraction of $\approx$15\,\% does not violate these statistical constraints as some triple systems will certainly be missed either due to the cutoff separation or additional components below the resolution limit of \textit{Gaia}. } We calculated the differential proper motions between target and companion from the values listed in the \textit{Gaia} \rev{EDR3} database (see Appendix~\ref{sec:identified_companions}). To convert this angular movement to a differential projected velocity $v_\mathrm{proj}$ in km\,s$^{-1}$ we used the inverted parallax of the star from our input catalog. For the derivation of $v_\mathrm{max}$ we adopted the mass measurements for the stars of our sample from \citet{pecaut2016}. For SZ~65, which was missing this quantity in \citet{pecaut2016}, we used a mass of $0.7\,M_\sun$ based on previous work by \citet{alcala2017}. The masses of the identified companions were estimated as previously determined by \textit{Gaia} photometry and for the objects that were heavier than the maximum valid mass from our BT-Settl models we used MIST isochrones to derive a stellar mass. The resulting ratios of $v_\mathrm{proj}$ to $v_\mathrm{max}$ that we derived for all objects are listed in Table~\ref{tbl:companions_full_1} in Appendix~\ref{sec:identified_companions}. The error budget in the calculation of these quantities is dominated by the uncertainty of the differential velocities of both objects. \rev{The uncertainties of} $v_\mathrm{proj}/v_\mathrm{max}$ \rev{were propagated by a bootstrapping approach}. \rev{We repeated the velocity calculation} 10,000 times, drawing the initial proper motions of both objects from Gaussian distributions that are centered around the \textit{Gaia} \rev{EDR3} values, and their corresponding uncertainties served as standard deviation for these initial normal distributions. The derived $v_\mathrm{proj}$ to $v_\mathrm{max}$ ratios represent the median of the corresponding posterior distribution and the surrounding 68\% confidence interval as an estimate of the uncertainties. We visualize these derived parameters as a function of angular separation and companion mass in Fig.~\ref{fig:separation_escape_velocity}. \begin{figure} \resizebox{\hsize}{!}{\includegraphics{./gaia_companions_separation_escape_velocity.pdf}} \caption{% Relative velocities of identified companions of a sample of K-type Sco-Cen members. We show the ratio of the differential projected velocities $v_\mathrm{proj}$ to the maximum velocity that allows a gravitationally bound system $v_\mathrm{max}$ as defined in equation~\eqref{eqn:v_proj_v_max}. This parameter is a measure of whether our preselected candidate companions are part of a binary system; a value greater than unity renders this scenario as unlikely. These two different regimes are separated by the dashed red line. The colors of the markers indicate the mass of the corresponding candidate companion. To focus primarily on the sub-stellar objects in our sample the color bar is cut off at masses that are higher than $100\,M_\mathrm{Jup}$. Markers with a black outline refer to members of the YSES subsample and TYC~8252-533-1~B is highlighted by the star. } \label{fig:separation_escape_velocity} \end{figure} Most of the identified companion candidates are consistent with $v_\mathrm{proj}/v_\mathrm{max}<1$, which indicates that for these objects a gravitationally bound orbit is not ruled out by \textit{Gaia} \rev{EDR3} data. To quantify the likelihood of these objects to be a real companion to the target of our sample, we derive the probability of a $v_\mathrm{proj}$ to $v_\mathrm{max}$ ratio that is smaller than unity, based on our 10,000 samples for each posterior distribution. This value $p_\mathrm{dyn}^\mathrm{C}$ \rev{represents an upper limit for the dynamical companionship probability} as the complete three dimensional astrometry of all objects is not available. \rev{% As this value does not account for comoving Sco-Cen members that might have similar projected velocities as a target from our input catalog despite not being gravitationally associated, we further derived a statistical companionship likelihood $p_\mathrm{stat}^\mathrm{C}$. For each companion candidate we checked how many sources were found by our preselection algorithm, when choosing a cutoff separation that is twenty times as large as the projected separation of the candidate \citep[see e.g.,][]{fontanive2021}. This number provides an estimate of how many other Sco-Cen objects with similar parallaxes and proper motions are in the immediate surroundings of the stars from our input catalog. \revrev{We obtained the adjusted number of objects, $N_{20}$, by counting the objects within the twenty times larger reference region while excluding the originally enclosed companion candidates.} \revrev{Based on this number} we derived a statistical probability to have one of these sources in the 400 times smaller search region. The statistical companionship likelihood is then calculated as \begin{equation} p_\mathrm{stat}^\mathrm{C}=1-\frac{N_{20}}{400}\;. \end{equation} Our final companionship probability considers both these dynamical and statistical terms and is derived as \begin{equation} p^\mathrm{C}= p_\mathrm{dyn}^\mathrm{C}p_\mathrm{stat}^\mathrm{C}\;. \end{equation} These values are provided in Table~\ref{tbl:companions_full_1} in Appendix~\ref{sec:identified_companions}. } We find that only \rev{27\%, 31\%, and 33\%} of our identified companion candidates have a $p^\mathrm{C}$ value that is smaller than 0.1, 0.5, and 0.95, respectively. Even though the true membership probabilities might be lower than the values we have derived here, this test strongly suggests that our preselection based on \textit{Gaia} astrometry is a viable method to detect comoving companions to stars that are listed with position and proper motion measurements in \textit{Gaia} \rev{EDR3}. We do not detect any trends of objects without any color measurement having significantly higher likelihoods to be unbound. This is expected as the missing color information does not arise from the companion candidates but by the proximity to another object of equal or higher brightness. The \rev{majority of the} aforementioned \rev{23} companions without color data that are closer than \rev{$3\arcsec$} to the target star from our input catalog exhibits $p^\mathrm{C}>0.5$ and \rev{19} out of these even $p^\mathrm{C}>0.95$. As expected due to their small projected separations of less than 300\,au, these are very likely gravitationally bound stellar binaries. \rev{Only three objects without color measurements at separations that are smaller than 3\arcsec are found to have $p^\mathrm{C}<0.1$} \subsection{\rev{high confidence companions}} \label{subsec:high_confidence_companions} When applying a conservative cutoff of $p^\mathrm{C}>0.95$ to the full list of preselected companion candidates, \rev{110} objects around \rev{104} targets have a high probability to be gravitationally associated to the star from the input catalog. A detailed list of these high confidence companions and their main parameters is presented in Table~\ref{tbl:high_priority_companions_1}. \begin{sidewaystable*} \caption{ \rev{\textit{Gaia} companion candidates} with $p^\mathrm{C}>0.95$ that were identified to K-type Sco-Cen members. In the last column we report whether these systems have been mentioned in previous literature. \rev{A full version of the table that is including the parameter uncertainties is available online.} } \label{tbl:high_priority_companions_1} \tiny \def1.2{1.2} \centering \begin{tabular}{@{}lllllllllllll@{}} \hline\hline \multicolumn{2}{c}{\textit{Gaia} EDR3 ID} & \multicolumn{2}{c}{Coordinates\tablefootmark{c}} & $\rho$\tablefootmark{d} & PA\tablefootmark{e} & \multicolumn{2}{c}{$\mu_{\alpha *}$\tablefootmark{f}} & \multicolumn{2}{c}{$\mu_{\delta}$} & \multicolumn{2}{c}{$G$} & References \\ Prim.\tablefootmark{a} & Sec.\tablefootmark{b} & Prim. & Sec. & & & Prim. & Sec. & Prim. & Sec. & Prim. & Sec. & \\ & & (hh:mm:ss.s $\pm$dd:mm:ss.s) & (hh:mm:ss.s $\pm$dd:mm:ss.s) & (\arcsec) & (\degr) & (mas\,yr$^{-1}$) & (mas\,yr$^{-1}$) & (mas\,yr$^{-1}$) & (mas\,yr$^{-1}$) & (mag) & (mag) \\ \hline 5232514298297802880 & 5232514298301348864 & 10:31:37.1 -69:01:58.7 & 10:31:36.4 -69:01:49.1 & 10.3 & 338.4 & -19.27 & -19.09 & 8.46 & 8.66 & 11.6 & 19.9 & \\ 5240643988513309952 & 5240643988513310592 & 11:17:58.1 -64:02:33.4 & 11:17:51.8 -64:02:05.6 & 49.6 & 304.0 & -28.59 & -28.64 & -0.63 & -1.23 & 7.8 & 11.4 & B19,D19,G18 \\ 5332922112460126976 & 5332922116810986880 & 11:51:50.4 -64:07:27.7 & 11:51:50.7 -64:07:27.4 & 1.6 & 78.8 & -22.80 & -22.99 & 4.70 & 8.47 & 11.8 & 16.6 & \\ 5343603288120259072 & 5343603288130858112 & 11:55:42.9 -56:37:31.7 & 11:55:42.8 -56:37:31.2 & 0.8 & 304.9 & -39.46 & -38.91 & -7.41 & -10.59 & 11.2 & 13.0 & \\ 6124952431621117056 & 6124952431621118848 & 12:05:12.5 -53:31:23.6 & 12:05:12.2 -53:31:16.7 & 7.4 & 339.2 & -33.79 & -34.33 & -9.84 & -10.52 & 12.4 & 16.5 & D19,G18 \\ 6057456092878899072 & 6057456092897714816 & 12:07:42.3 -62:27:28.2 & 12:07:42.1 -62:27:29.3 & 1.6 & 230.1 & -36.37 & -37.43 & -8.11 & -10.30 & 10.5 & 13.2 & \\ 6071087597518919040 & 6071087597497876480 & 12:09:41.8 -58:54:45.2 & 12:09:40.2 -58:54:41.0 & 12.8 & 289.4 & -37.47 & -37.52 & -10.68 & -9.54 & 10.0 & 15.9 & \\ 6071087597518919040 & 6071087597518919808 & 12:09:41.8 -58:54:45.2 & 12:09:41.7 -58:54:41.8 & 3.5 & 350.7 & -37.47 & -34.48 & -10.68 & -8.39 & 10.0 & 13.1 & \\ 6129878999619301120 & 6129879755533544832 & 12:10:10.6 -48:55:47.8 & 12:10:09.2 -48:55:44.0 & 14.1 & 285.3 & -37.49 & -36.09 & -12.36 & -11.87 & 10.8 & 13.5 & D19,G18 \\ 5860803662284763392 & 5860803696599969280 & 12:12:08.0 -65:54:55.1 & 12:12:13.0 -65:54:49.3 & 31.6 & 79.4 & -37.22 & -37.03 & -8.27 & -8.53 & 11.1 & 17.0 & G18 \\ 6129584364863667840 & 6129584364863668096 & 12:12:11.1 -49:50:08.4 & 12:12:11.0 -49:50:02.0 & 6.4 & 352.1 & -31.04 & -30.20 & -9.80 & -10.20 & 11.0 & 14.9 & D19,G18 \\ 6075815841096386816 & 6075816592695096576 & 12:12:35.7 -55:20:27.5 & 12:12:36.1 -55:20:00.5 & 27.3 & 8.1 & -34.08 & -33.77 & -11.10 & -9.86 & 10.2 & 12.6 & D19,G18 \\ 6126585034583698944 & 6126585034581064192 & 12:14:34.0 -51:10:12.7 & 12:14:31.8 -51:10:15.9 & 21.2 & 261.4 & -34.14 & -33.66 & -11.78 & -10.70 & 10.3 & 12.2 & D19,G18 \\ 6075548419252906368 & 6075548419252913152 & 12:14:50.7 -55:47:23.7 & 12:14:52.2 -55:47:03.8 & 24.0 & 33.9 & -35.76 & -35.21 & -10.96 & -11.21 & 8.3 & 9.6 & D19,G18 \\ 5855198832989286400 & 5855198828676205696 & 12:16:40.1 -70:07:36.3 & 12:16:39.5 -70:07:35.8 & 3.2 & 279.2 & -36.10 & -36.39 & -8.53 & -7.80 & 10.4 & 13.8 & D19,G18 \\ 6126648698878768384 & 6126648703176939392 & 12:19:59.4 -50:18:40.8 & 12:19:59.3 -50:18:37.7 & 3.1 & 355.5 & -25.80 & -25.56 & -9.31 & -9.28 & 12.3 & 13.9 & \\ 6077461328965244160 & 6077461328965240576 & 12:21:08.0 -52:12:22.9 & 12:21:06.8 -52:12:41.4 & 21.8 & 211.9 & -35.11 & -34.68 & -12.80 & -13.28 & 11.4 & 15.8 & D19,G18 \\ 6127110188823860480 & 6127110188823860864 & 12:22:04.3 -48:41:25.1 & 12:22:03.9 -48:41:17.7 & 8.3 & 333.0 & -28.63 & -27.60 & -10.63 & -9.90 & 10.4 & 15.7 & D19,G18 \\ 6078760195785278208 & 6078760195785506048 & 12:30:29.5 -52:22:27.2 & 12:30:30.5 -52:22:28.9 & 9.2 & 100.6 & -33.60 & -34.67 & -13.31 & -14.35 & 11.3 & 13.3 & D19,G18 \\ 6073105991611649024 & 6073106193460538240 & 12:33:33.7 -57:14:06.8 & 12:33:32.1 -57:14:10.3 & 13.4 & 254.6 & -37.85 & -36.63 & -13.91 & -14.76 & 10.5 & 17.9 & \\ 6074563978391541888 & 6074563978391541504 & 12:36:58.9 -54:12:18.2 & 12:36:56.5 -54:12:17.5 & 20.7 & 272.0 & -35.02 & -35.13 & -13.13 & -13.17 & 10.1 & 13.0 & D19,G18 \\ 6074374346993398144 & 6074374346993397760 & 12:39:14.0 -54:54:47.0 & 12:39:13.8 -54:54:49.1 & 2.6 & 216.1 & -35.60 & -34.44 & -14.18 & -16.07 & 11.5 & 14.3 & \\ 6078074169253752064 & 6078074237969848960 & 12:40:46.6 -52:11:04.8 & 12:40:46.1 -52:11:04.3 & 4.8 & 276.4 & -26.63 & -25.89 & -11.36 & -10.35 & 11.6 & 15.0 & D19,G18 \\ 6079389185156706944 & 6079389253876183808 & 12:40:54.5 -50:31:55.4 & 12:40:53.3 -50:31:47.6 & 14.1 & 303.8 & -43.33 & -43.35 & -19.41 & -19.86 & 11.4 & 14.4 & \\ 6060864815105080064 & 6060864819427739904 & 12:42:00.5 -57:59:48.8 & 12:42:00.4 -57:59:49.0 & 1.3 & 261.0 & -35.42 & -32.62 & -14.79 & -13.70 & 12.8 & 13.6 & \\ 5862876928853591040 & 5862876928853590144 & 12:44:34.7 -63:31:46.5 & 12:44:35.8 -63:31:49.9 & 7.9 & 116.1 & -36.13 & -37.35 & -13.72 & -14.82 & 10.3 & 15.2 & \\ 6074796250199371648 & 6074796245904371968 & 12:45:48.8 -54:10:58.7 & 12:45:49.6 -54:10:41.4 & 18.8 & 22.9 & -34.84 & -34.46 & -13.91 & -13.38 & 11.0 & 13.6 & D19,G18 \\ 6061376298490107520 & 6061376298480880512 & 12:48:48.1 -56:35:38.0 & 12:48:47.8 -56:35:39.2 & 2.8 & 245.8 & -29.55 & -28.67 & -12.13 & -12.81 & 10.1 & 16.1 & \\ 6061310052916532096 & 6061310052892185088 & 12:50:44.8 -56:54:48.3 & 12:50:44.9 -56:54:49.6 & 1.7 & 138.2 & -37.56 & -34.54 & -15.76 & -13.30 & 12.4 & 12.5 & \\ 6075310478057303936 & 6075310478050174592 & 12:50:51.4 -51:56:35.6 & 12:50:51.7 -51:56:35.1 & 3.2 & 81.1 & -34.36 & -34.25 & -16.59 & -15.89 & 11.5 & 14.6 & D19,G18 \\ 6080364825623490688 & 6080364791268622336 & 13:06:40.1 -51:59:38.9 & 13:06:39.5 -51:59:44.7 & 8.1 & 224.3 & -32.16 & -32.35 & -17.24 & -17.78 & 10.3 & 14.2 & D19,G18 \\ 6056115131031531264 & 6056115135337482496 & 13:07:13.0 -59:52:11.3 & 13:07:13.0 -59:52:09.4 & 1.9 & 354.9 & -30.46 & -29.90 & -12.80 & -16.47 & 9.9 & 13.9 & \\ 6067650970822132224 & 6067650970822131584 & 13:12:18.0 -54:38:54.2 & 13:12:18.6 -54:39:05.7 & 12.5 & 157.2 & -28.59 & -29.09 & -11.91 & -13.20 & 10.2 & 11.3 & \\ 6088027047281877120 & 6088027051573430400 & 13:13:07.1 -45:37:43.9 & 13:13:07.1 -45:37:44.6 & 0.7 & 157.5 & -28.26 & -29.62 & -16.57 & -16.34 & 11.3 & 12.7 & \\ 6083750638577673088 & 6083750638540951552 & 13:23:35.8 -47:18:46.9 & 13:23:35.7 -47:18:51.0 & 4.4 & 204.2 & -31.18 & -32.38 & -20.10 & -19.69 & 10.8 & 16.8 & \\ 6082617587508723200 & 6082617591804976512 & 13:27:05.9 -48:56:18.5 & 13:27:06.5 -48:56:18.2 & 5.8 & 86.6 & -38.26 & -38.05 & -25.86 & -22.45 & 10.4 & 13.5 & D19,G18 \\ 5863747467220738432 & 5863747462890662144 & 13:33:54.7 -65:36:41.9 & 13:33:54.8 -65:36:40.6 & 1.3 & 8.3 & -34.02 & -35.47 & -20.78 & -19.88 & 10.7 & 14.6 & \\ 6113000942074857216 & 6113000946373209216 & 13:36:40.9 -40:43:36.3 & 13:36:41.1 -40:43:40.1 & 4.6 & 146.2 & -30.16 & -28.98 & -21.69 & -20.90 & 12.0 & 14.2 & \\ 6094572719180018432 & 6094572753539758976 & 13:45:41.9 -49:04:59.3 & 13:45:44.2 -49:04:50.2 & 24.1 & 68.0 & -24.23 & -23.82 & -17.62 & -18.36 & 9.1 & 10.3 & \\ 6094529696485204864 & 6094529696485204736 & 13:47:50.5 -49:02:05.8 & 13:47:51.4 -49:01:49.0 & 19.0 & 27.4 & -23.40 & -23.76 & -15.39 & -16.28 & 10.6 & 11.8 & D19,G18 \\ \hline \end{tabular} \tablefoot{ \tablefoottext{a}{Primary of the binary system (i.e. the heavier mass star of the pair).} \tablefoottext{b}{Secondary of the binary system (i.e. the lower mass object of the pair).} \tablefoottext{c}{Coordinates are given at \textit{Gaia} EDR3 epoch J2016.0.} \tablefoottext{d}{$\rho$ denotes the projected separation of the binary.} \tablefoottext{e}{PA denotes the position angle (east of north) of the secondary with respect to the primary.} \tablefoottext{f}{$\mu_{\alpha *}$ and $\mu_\delta$ denote the proper motions in RA and Dec, respectively.} } \tablebib{ B19:~\citet{bohn2019}; D19:~\citet{damiani2019}; G18:~\citet{goldman2018} } \end{sidewaystable*} \begin{sidewaystable*} \setcounter{table}{\the\numexpr\value{table}-1\relax} \caption { (continued). } \tiny \def1.2{1.2} \centering \begin{tabular}{@{}lllllllllllll@{}} \hline\hline \multicolumn{2}{c}{\textit{Gaia} EDR3 ID} & \multicolumn{2}{c}{Coordinates\tablefootmark{c}} & $\rho$\tablefootmark{d} & PA\tablefootmark{e} & \multicolumn{2}{c}{$\mu_{\alpha *}$\tablefootmark{f}} & \multicolumn{2}{c}{$\mu_{\delta}$} & \multicolumn{2}{c}{$G$} & References \\ Prim.\tablefootmark{a} & Sec.\tablefootmark{b} & Prim. & Sec. & & & Prim. & Sec. & Prim. & Sec. & Prim. & Sec. & \\ & & (hh:mm:ss.s $\pm$dd:mm:ss.s) & (hh:mm:ss.s $\pm$dd:mm:ss.s) & (\arcsec) & (\degr) & (mas\,yr$^{-1}$) & (mas\,yr$^{-1}$) & (mas\,yr$^{-1}$) & (mas\,yr$^{-1}$) & (mag) & (mag) \\ \hline 5850443307764629376 & 5850443303440130816 & 13:54:07.3 -67:33:45.0 & 13:54:03.1 -67:33:30.7 & 28.0 & 300.7 & -29.23 & -30.18 & -5.06 & -4.66 & 10.8 & 12.4 & \\ 5850443307764629376 & 5850443303446183040 & 13:54:07.3 -67:33:45.0 & 13:54:03.4 -67:33:27.3 & 28.7 & 308.0 & -29.23 & -30.50 & -5.06 & -5.43 & 10.8 & 13.7 & \\ 6095161370216796928 & 6095162843384927744 & 13:55:25.5 -47:06:56.8 & 13:55:27.6 -47:07:04.8 & 23.4 & 110.0 & -27.42 & -27.88 & -22.30 & -22.49 & 10.8 & 15.1 & D19,G18 \\ 6114536929757358592 & 6114536929755100544 & 13:56:29.6 -38:39:13.0 & 13:56:29.6 -38:39:13.9 & 1.0 & 204.4 & -30.41 & -29.84 & -18.68 & -23.20 & 11.0 & 12.0 & \\ 6109646679996671360 & 6109646679996673024 & 14:00:49.7 -42:36:57.3 & 14:00:50.2 -42:36:48.0 & 11.0 & 32.7 & -24.53 & -25.37 & -20.76 & -21.39 & 10.7 & 13.2 & \\ 6116680904413813504 & 6116680908709624448 & 14:21:30.5 -38:45:25.1 & 14:21:30.5 -38:45:26.0 & 1.1 & 150.7 & -20.59 & -19.77 & -18.68 & -21.01 & 12.3 & 12.4 & \\ 6092201450556437632 & 6092201450556434944 & 14:27:05.5 -47:14:22.1 & 14:27:04.4 -47:14:37.8 & 19.1 & 215.0 & -28.17 & -28.52 & -24.70 & -24.30 & 10.4 & 16.0 & \\ 5894194318558985984 & 5894194348576228992 & 14:37:50.2 -54:57:41.6 & 14:37:52.0 -54:56:44.0 & 59.7 & 15.0 & -24.67 & -25.06 & -25.60 & -25.97 & 10.3 & 12.4 & D19,G18 \\ 5905886387736675840 & 5905886215936891008 & 14:41:35.0 -47:00:29.2 & 14:41:39.3 -47:00:15.2 & 46.5 & 72.4 & -27.29 & -27.62 & -26.57 & -26.00 & 9.8 & 15.1 & \\ 6101758336902846208 & 6101758332601667712 & 14:42:15.9 -41:00:18.9 & 14:42:15.6 -41:00:15.7 & 4.4 & 316.5 & -27.60 & -29.13 & -25.83 & -26.06 & 11.1 & 11.8 & \\ 6204234706098895104 & 6204234706096290688 & 14:58:45.7 -33:15:10.7 & 14:58:45.9 -33:15:11.2 & 2.8 & 100.3 & -13.82 & -12.22 & -19.70 & -18.21 & 11.8 & 11.9 & \\ 6203845650778424960 & 6203845655074564864 & 14:59:44.7 -34:25:47.2 & 14:59:44.7 -34:25:47.1 & 0.9 & 87.1 & -25.02 & -29.59 & -28.70 & -31.21 & 11.1 & 11.5 & \\ 6203959484592343936 & 6203959488887357824 & 15:02:26.0 -34:05:13.7 & 15:02:25.9 -34:05:12.6 & 1.8 & 310.4 & -18.09 & -17.62 & -19.78 & -19.91 & 11.9 & 15.0 & \\ 6003698873422956928 & 6003698907782693248 & 15:08:51.4 -43:03:22.9 & 15:08:54.7 -43:03:14.2 & 37.3 & 76.6 & -19.91 & -20.40 & -26.14 & -26.20 & 9.4 & 11.0 & \\ 6201456107071825536 & 6201456107071825792 & 15:11:04.5 -32:51:30.8 & 15:11:04.7 -32:51:27.8 & 4.5 & 48.8 & -20.49 & -22.22 & -23.31 & -22.08 & 11.5 & 13.6 & \\ 6210702308369949952 & 6210702415745896192 & 15:12:44.5 -31:16:48.6 & 15:12:46.1 -31:17:02.2 & 24.9 & 123.2 & -17.28 & -16.54 & -22.64 & -21.62 & 11.3 & 14.0 & \\ 5903894175757504128 & 5903894175757506176 & 15:13:58.1 -46:29:14.9 & 15:13:57.2 -46:29:06.5 & 12.8 & 311.2 & -17.96 & -18.11 & -23.52 & -24.19 & 12.1 & 13.3 & \\ 5886747291936159104 & 5886747291923626240 & 15:15:22.9 -54:41:09.3 & 15:15:22.8 -54:41:09.1 & 1.5 & 280.0 & -21.33 & -18.11 & -22.89 & -25.03 & 11.9 & 13.3 & \\ 6200310519037175040 & 6200310484677437184 & 15:17:10.8 -34:34:20.0 & 15:17:14.3 -34:33:57.6 & 48.9 & 62.8 & -21.88 & -21.72 & -24.59 & -24.01 & 10.9 & 12.9 & \\ 6200310514738629504 & 6200310519037175040 & 15:17:10.7 -34:34:37.8 & 15:17:10.8 -34:34:20.0 & 17.9 & 5.1 & -20.73 & -21.88 & -22.73 & -24.59 & 8.0 & 10.9 & \\ 6000349589207590016 & 6000349657912636928 & 15:18:01.2 -44:44:27.5 & 15:18:01.0 -44:44:27.7 & 2.4 & 265.1 & -27.72 & -28.31 & -31.99 & -34.30 & 11.4 & 15.7 & \\ 6004331775495542656 & 6004331779800414464 & 15:19:16.0 -40:56:08.0 & 15:19:15.9 -40:56:11.8 & 3.9 & 190.2 & -21.74 & -20.92 & -27.20 & -27.21 & 11.0 & 16.4 & \\ 6213042069112745856 & 6213042073410590464 & 15:21:52.4 -28:42:38.7 & 15:21:52.4 -28:42:40.2 & 1.6 & 177.0 & -19.74 & -17.66 & -27.32 & -25.19 & 11.3 & 14.8 & \\ 6208136391829015936 & 6208136396126956928 & 15:24:11.4 -30:30:58.6 & 15:24:13.0 -30:30:57.6 & 20.3 & 87.2 & -22.09 & -22.11 & -25.07 & -24.57 & 10.6 & 12.9 & \\ 6208136396126956928 & 6208136396122878976 & 15:24:13.0 -30:30:57.6 & 15:24:12.8 -30:30:55.9 & 3.5 & 300.1 & -22.11 & -21.99 & -24.57 & -25.79 & 12.9 & 15.2 & \\ 6013649964744749184 & 6013649969039127552 & 15:29:38.5 -35:46:51.9 & 15:29:38.4 -35:46:50.6 & 2.6 & 299.1 & -23.95 & -21.95 & -30.37 & -29.91 & 10.7 & 15.7 & \\ 6013480055841212416 & 6013480060137095296 & 15:29:47.2 -36:28:37.7 & 15:29:47.2 -36:28:39.4 & 1.7 & 192.7 & -14.75 & -12.66 & -19.66 & -20.17 & 11.4 & 16.3 & \\ 6209492506280547200 & 6209492506275602816 & 15:31:29.6 -30:21:54.4 & 15:31:29.6 -30:21:53.2 & 1.2 & 19.1 & -14.45 & -13.24 & -17.99 & -20.95 & 12.4 & 14.3 & \\ 6014539542668216832 & 6014539645747431680 & 15:34:23.1 -33:00:09.2 & 15:34:26.3 -32:59:50.1 & 43.9 & 64.2 & -20.36 & -20.45 & -27.60 & -27.25 & 12.1 & 15.2 & \\ 6208381582919629568 & 6208381587215253504 & 15:37:02.1 -31:36:40.3 & 15:37:01.8 -31:36:39.5 & 4.7 & 279.8 & -20.59 & -21.49 & -27.87 & -28.36 & 9.8 & 11.8 & \\ 6208381582919629568 & 6208381587220236160 & 15:37:02.1 -31:36:40.3 & 15:37:01.7 -31:36:38.5 & 5.9 & 287.5 & -20.59 & -19.47 & -27.87 & -27.25 & 9.8 & 11.9 & \\ 6013399894569703040 & 6013399830146943104 & 15:39:27.8 -34:46:17.6 & 15:39:28.3 -34:46:18.4 & 6.4 & 97.8 & -13.22 & -13.12 & -22.12 & -21.81 & 11.7 & 13.9 & \\ 6013398451460692992 & 6013351520350805632 & 15:39:46.4 -34:51:02.9 & 15:39:46.4 -34:51:04.0 & 1.1 & 182.6 & -15.35 & -13.82 & -22.28 & -20.73 & 11.9 & 13.9 & \\ 6234377340635038848 & 6234377718592160384 & 15:41:06.8 -26:56:26.7 & 15:41:07.2 -26:56:25.9 & 6.3 & 82.1 & -18.07 & -17.87 & -26.64 & -24.87 & 11.0 & 16.1 & \\ 6014696841553696768 & 6014696841553696896 & 15:45:12.8 -34:17:31.0 & 15:45:12.6 -34:17:29.7 & 2.8 & 297.2 & -14.24 & -15.43 & -21.78 & -20.27 & 9.8 & 14.7 & \\ 5885915442658792576 & 5885915442658792448 & 15:46:29.6 -52:17:24.2 & 15:46:29.5 -52:17:25.8 & 1.6 & 183.3 & -21.95 & -24.04 & -22.60 & -21.96 & 11.1 & 14.7 & \\ 6236477064249469312 & 6236477064249562624 & 15:51:45.3 -24:56:51.7 & 15:51:45.5 -24:56:50.1 & 2.4 & 47.4 & -9.15 & -9.99 & -21.77 & -23.42 & 12.0 & 16.8 & \\ 6039427503765943936 & 6039427503765943040 & 15:54:51.4 -31:54:46.8 & 15:54:51.9 -31:54:47.6 & 6.3 & 97.7 & -9.75 & -10.71 & -27.23 & -27.27 & 11.6 & 17.6 & \\ 6248340348034690688 & 6248340343736161664 & 15:58:20.5 -18:37:25.5 & 15:58:20.5 -18:37:19.9 & 5.6 & 351.8 & -17.08 & -17.33 & -23.43 & -24.20 & 9.9 & 15.5 & \\ 6247571617610119808 & 6247571583249729280 & 15:59:11.0 -18:50:44.6 & 15:59:11.0 -18:50:59.2 & 14.6 & 183.0 & -10.28 & -10.21 & -20.89 & -21.31 & 12.6 & 13.3 & \\ 5984404849554176896 & 5984404849554176256 & 16:01:10.7 -48:04:44.3 & 16:01:12.1 -48:04:49.3 & 15.3 & 109.1 & -20.74 & -20.54 & -30.67 & -30.45 & 11.4 & 17.3 & \\ 6235806259081172736 & 6235806323497438592 & 16:02:39.1 -25:42:08.4 & 16:02:38.1 -25:41:39.5 & 31.7 & 335.8 & -20.03 & -20.08 & -32.57 & -32.68 & 11.6 & 12.4 & \\ 6236273895118889472 & 6236273895118890112 & 16:02:51.2 -24:01:57.8 & 16:02:51.2 -24:01:50.7 & 7.2 & 353.2 & -11.80 & -12.39 & -23.99 & -24.18 & 11.9 & 16.3 & \\ 6243393817024157184 & 6243393817024156288 & 16:04:21.6 -21:30:28.9 & 16:04:21.0 -21:30:42.1 & 16.2 & 215.7 & -12.45 & -12.64 & -23.81 & -24.75 & 11.7 & 13.6 & \\ 6249074718717359744 & 6249074718725644288 & 16:06:23.5 -18:14:19.5 & 16:06:23.5 -18:14:18.9 & 0.6 & 328.8 & -8.81 & -8.97 & -20.67 & -21.26 & 12.1 & 12.2 & \\ \hline \end{tabular} \end{sidewaystable*} \begin{sidewaystable*} \setcounter{table}{\the\numexpr\value{table}-1\relax} \caption { (continued). } \tiny \def1.2{1.2} \centering \begin{tabular}{@{}lllllllllllll@{}} \hline\hline \multicolumn{2}{c}{\textit{Gaia} EDR3 ID} & \multicolumn{2}{c}{Coordinates\tablefootmark{c}} & $\rho$\tablefootmark{d} & PA\tablefootmark{e} & \multicolumn{2}{c}{$\mu_{\alpha *}$\tablefootmark{f}} & \multicolumn{2}{c}{$\mu_{\delta}$} & \multicolumn{2}{c}{$G$} & References \\ Prim.\tablefootmark{a} & Sec.\tablefootmark{b} & Prim. & Sec. & & & Prim. & Sec. & Prim. & Sec. & Prim. & Sec. & \\ & & (hh:mm:ss.s $\pm$dd:mm:ss.s) & (hh:mm:ss.s $\pm$dd:mm:ss.s) & (\arcsec) & (\degr) & (mas\,yr$^{-1}$) & (mas\,yr$^{-1}$) & (mas\,yr$^{-1}$) & (mas\,yr$^{-1}$) & (mag) & (mag) \\ \hline 6042124910722287744 & 6042124915024285440 & 16:06:57.9 -27:43:10.1 & 16:06:57.9 -27:43:08.7 & 1.5 & 6.1 & -12.84 & -9.82 & -24.24 & -24.14 & 8.1 & 11.8 & \\ 5998266426996208384 & 5998266426996209408 & 16:07:33.7 -37:59:24.7 & 16:07:33.5 -37:59:21.4 & 3.6 & 339.2 & -17.53 & -16.34 & -28.33 & -29.33 & 12.4 & 14.7 & \\ 5983063479721274880 & 5983063479721275520 & 16:08:07.7 -50:41:56.2 & 16:08:07.1 -50:41:52.9 & 6.2 & 302.0 & -22.03 & -21.01 & -36.43 & -37.88 & 11.5 & 13.6 & \\ 6043486660173351552 & 6043486655875354112 & 16:08:43.4 -26:02:17.2 & 16:08:44.4 -26:02:14.2 & 13.5 & 77.4 & -10.72 & -10.86 & -25.18 & -24.95 & 10.0 & 18.7 & \\ 6245777283349430912 & 6245777283349431552 & 16:09:00.7 -19:08:53.1 & 16:09:00.0 -19:08:37.3 & 19.0 & 326.6 & -9.37 & -9.44 & -25.12 & -24.89 & 12.9 & 15.4 & \\ 6035794030167079808 & 6035794030168507264 & 16:10:11.7 -32:26:36.1 & 16:10:11.7 -32:26:36.9 & 1.3 & 131.9 & -9.65 & -9.13 & -23.03 & -23.02 & 11.8 & 12.1 & \\ 6245781097280740864 & 6245781131640479360 & 16:10:21.7 -19:04:07.0 & 16:10:21.8 -19:04:02.4 & 4.6 & 6.6 & -9.05 & -8.60 & -24.05 & -24.78 & 13.6 & 16.9 & \\ 6042235793900264448 & 6042235725180784768 & 16:10:26.5 -27:56:30.0 & 16:10:28.2 -27:56:40.1 & 24.6 & 114.3 & -9.61 & -8.61 & -34.54 & -36.19 & 13.1 & 13.2 & \\ 6243833724749589632 & 6243833724749589760 & 16:10:42.0 -21:01:32.4 & 16:10:41.8 -21:01:30.6 & 3.2 & 305.7 & -9.88 & -10.09 & -23.34 & -24.59 & 11.8 & 15.5 & \\ 6242176653347275136 & 6242176829446854656 & 16:12:55.3 -23:19:46.1 & 16:12:52.6 -23:19:56.4 & 38.3 & 254.4 & -9.55 & -8.48 & -23.71 & -23.94 & 9.1 & 11.8 & \\ 6022499010422921088 & 6022499006128860928 & 16:13:58.0 -36:18:13.9 & 16:13:58.0 -36:18:19.6 & 5.7 & 178.8 & -16.14 & -17.36 & -30.32 & -31.12 & 10.8 & 13.3 & \\ 6243089247998315264 & 6243089217937775360 & 16:14:00.3 -21:08:44.3 & 16:13:58.1 -21:09:17.6 & 45.8 & 223.3 & -9.90 & -9.60 & -20.96 & -20.56 & 13.0 & 15.5 & \\ 5935099415271699072 & 5935099415267651328 & 16:14:52.0 -50:26:19.0 & 16:14:52.2 -50:26:19.9 & 2.2 & 114.4 & -20.08 & -16.52 & -31.57 & -32.12 & 10.2 & 11.4 & \\ 6242598526515737728 & 6242598526515738112 & 16:15:34.6 -22:42:43.1 & 16:15:34.5 -22:42:41.3 & 1.9 & 339.3 & -7.90 & -9.54 & -25.97 & -26.33 & 12.3 & 13.3 & \\ 6042418858284146688 & 6042418862581174016 & 16:16:14.2 -26:43:15.5 & 16:16:14.1 -26:43:14.2 & 2.5 & 300.5 & -17.79 & -17.25 & -26.92 & -28.46 & 11.7 & 12.6 & \\ 6050056478369804288 & 6050056482664014976 & 16:18:37.2 -24:05:23.0 & 16:18:37.2 -24:05:18.5 & 4.5 & 0.1 & -11.86 & -10.28 & -20.04 & -21.53 & 11.0 & 11.5 & \\ 6048571072519663872 & 6048571076818643968 & 16:19:12.2 -25:50:38.5 & 16:19:12.2 -25:50:39.8 & 1.3 & 175.5 & -11.38 & -10.81 & -23.39 & -25.84 & 12.5 & 16.1 & \\ 6037784008760031872 & 6037784004457590528 & 16:26:57.6 -30:32:28.4 & 16:26:57.0 -30:32:23.9 & 9.3 & 298.8 & -20.31 & -18.66 & -32.99 & -34.28 & 11.1 & 11.6 & \\ 6037784008760031872 & 6037784004457597568 & 16:26:57.6 -30:32:28.4 & 16:26:57.5 -30:32:31.8 & 3.6 & 197.1 & -20.31 & -18.70 & -32.99 & -33.03 & 11.1 & 12.6 & \\ 6031823178275372800 & 6031823173966757120 & 16:30:37.9 -29:54:22.9 & 16:30:37.8 -29:54:18.4 & 5.0 & 333.2 & -17.35 & -20.53 & -31.34 & -30.66 & 10.6 & 14.9 & \\ 6045791575844270208 & 6045791953801392128 & 16:32:00.6 -25:30:29.2 & 16:32:01.6 -25:30:25.8 & 14.2 & 76.2 & -11.52 & -10.65 & -23.08 & -22.83 & 12.5 & 12.7 & \\ 6047289699098449920 & 6047289699098450944 & 16:34:53.1 -25:18:17.4 & 16:34:53.2 -25:18:07.3 & 10.2 & 6.0 & -13.21 & -12.96 & -23.18 & -24.05 & 10.0 & 14.8 & \\ 5967552634824947456 & 5967552634824945152 & 16:43:01.4 -44:05:27.9 & 16:43:02.3 -44:05:33.2 & 10.8 & 119.1 & -8.89 & -8.60 & -19.79 & -19.36 & 11.6 & 17.1 & \\ 6046749289143173504 & 6046749319188591104 & 16:45:26.1 -25:03:17.0 & 16:45:29.0 -25:02:48.0 & 48.1 & 52.8 & -4.04 & -4.00 & -23.47 & -23.49 & 10.6 & 14.4 & \\ 4130416623473262720 & 4130416726552477440 & 16:47:37.1 -20:14:27.3 & 16:47:38.4 -20:14:15.8 & 22.1 & 58.6 & -8.10 & -8.50 & -21.94 & -21.26 & 11.8 & 14.6 & \\ \hline \end{tabular} \end{sidewaystable*} For each system we designated the object with the brightest $G$ band magnitude to be the primary. The \rev{six} remaining triple systems in this list are represented by two individual entries each and we derived all properties with respect to the primary. \rev{% The masses and separations of these high confidence binaries are presented in Fig.~\ref{fig:high_confidence_comp_properties}. } \begin{figure} \resizebox{\hsize}{!}{\includegraphics{./high_prioriy_comp_parameters_200_hybrid_edr3.pdf}} \caption{% \rev{% Properties of high confidence companions to K type Sco-Cen members. \textit{Left panel}: Distribution of separations amongst our high confidence sample. \textit{Right panel}: Mass distribution among this sample. The red dashed line indicates the threshold of brown dwarf and stellar-mass companions at $80\,M_\mathrm{Jup}$. } } \label{fig:high_confidence_comp_properties} \end{figure} \rev{% The majority of the companions exhibit projected separations that are smaller than 1000\,au. We find a median separation of $763_{-539}^{+1933}$\,au and no companion is farther separated than 7\,000\,au. The peak of the separation distribution is located at approximately 50\,au, which is in good agreement with general binary statistics \citep[e.g.,][]{duchene2013}. For the masses of the companions we derived a median value of $277_{-172}^{+505}\,M_\mathrm{Jup}$, well in the M dwarf regime. More massive and less massive objects are less frequent among the high confidence companions. \revrev{As shown in Fig.~\ref{fig:separation_magnitude}, this statistical evaluation does not consider close-in, low-mass companions that are below the sensitivity of our detection method. The derived median mass might thus be biased for these missing objects. } \revrev{Nevertheless, our results agree} well with the findings of \citet{duquennoy1991} and \citet{raghavan2010}, who established a peak in the companion mass ratio distributions to solar-type primaries at $q\approx0.3$ and $q\approx0.1$, respectively. } We identified \rev{ten} sub-stellar objects with masses below $80\,M_\mathrm{Jup}$ that are very likely to be comoving with $p^\mathrm{C}>0.95$. \rev{The identifiers and mass estimates for these brown dwarf companions are listed in Table~\ref{tbl:bd_companions}.} \begin{table} \caption { \rev{% Brown dwarf companions companions with $p^\mathrm{C}>0.95$. } } \label{tbl:bd_companions} \setlength{\tabcolsep}{12pt} \def1.2{1.2} \centering \begin{tabular}{@{}ll@{}} \hline\hline \textit{Gaia} EDR3 ID & $G$ band photometric mass \\ & ($M_\mathrm{Jup}$)\\ \hline 5232514298301348864 & $36.5\pm2.4$\\ 6071087597497876480 & $76.0\pm16.7$ \\ 5860803696599969280 & $66.2\pm4.5$ \\ 6073106193460538240 & $46.5\pm3.3$ \\ 6083750638540951552 & $48.7\pm11.1$ \\ 6039427503765943040 & $33.8\pm3.6$ \\ 5984404849554176256 & $73.8\pm4.4$ \\ 6043486655875354112 & $24.8\pm1.0$ \\ 6245781131640479360 & $43.1\pm5.8$ \\ 6243833724749589760 & $78.9\pm12.5$ \\ \hline \end{tabular} \end{table} \rev{% Especially intriguing are Gaia EDR3 5232514298301348864, Gaia EDR3 6039427503765943040, and Gaia EDR3 6043486655875354112 that exhibit masses below $40\,M_\mathrm{Jup}$. The latter is not too far away from the planetary mass regime with a photometric mass estimate of $24.8\pm1.0\,M_\mathrm{Jup}$. } Except for Gaia~EDR3 5860803696599969280, which was reported in \citet{goldman2018}, these are all newly identified brown dwarf members of Sco-Cen. Their likely companionship to K-type stellar members of this association makes these especially intriguing laboratories not only for spectroscopic follow-up observations but also to study the dynamical evolution of multiple systems in a densely populated stellar birth environment. Whereas the former will allow us to understand the atmospheric architectures and compositions of these sub-stellar objects, the latter will provide important implications for companion migration and ejection mechanisms caused by close stellar encounters. \section{High-contrast imaging results} \label{sec:hci_results} \rev{% In this section we present the results from our high-contrast imaging observations with SPHERE and NACO that were obtained within the scope of YSES. Sect.~\ref{subsec:bd_companion_yses} contains a detailed analysis of a brown dwarf companion that we detected to TYC~8252-533-1. We briefly assess the astrometry and photometry of other companions in the SPHERE field of view detected to other YSES targets from our input catalog in Sect.~\ref{subsec:sphere_stellar_companions}. } \subsection{A brown dwarf companion to TYC~8252-533-1} \label{subsec:bd_companion_yses} Our previous analysis revealed that the YSES target TYC~8252-533-1 (2MASS J13233587-4718467; Gaia EDR3 6083750638577673088) harbors a companion with a projected separation of 4\farcs4 and at a position angle of 204$^\circ$. As \textit{Gaia} photometry suggests that the companion is of sub-stellar mass and likely a brown dwarf companion, we will refer to it as TYC~8252-533-1~B henceforth. Due to the small angular separation of the binary, both objects were located within the SPHERE field of view during our regular YSES observations. This object is thus an ideal test case to assess the quality of the parameters that were derived from the \textit{Gaia} catalog by comparison to independent photometry and astrometry acquired with SPHERE. To characterize this companion independently from the \textit{Gaia} measurements, we acquired SPHERE dual-band measurements ranging from $Y$ to $K$ band and additional NACO $L'$ data as described in Sect.~\ref{subsec:methods_data_reduction}. The final images for several SPHERE filters and our NACO data are presented in Appendix~\ref{sec:hci_observing_conditions}. \subsubsection{Stellar parameters} \label{subsubsec:stellar_parameters} A summary of the basic stellar parameters of TYC~8252-533-1 is presented in Table~\ref{tbl:yses_companion_host_properties}. \begin{table} \caption{% Properties of TYC~8252-533-1. } \label{tbl:yses_companion_host_properties} \def1.2{1.2} \setlength{\tabcolsep}{8pt} \small \centering \begin{tabular}{@{}lll@{}} \hline \hline Parameter & Value & Reference(s)\\ \hline Main identifier & TYC~8252-533-1 & (1)\\ 2MASS identifier & J13233587-4718467 & (2)\\ \textit{Gaia} \rev{EDR3} ID & 6083750638577673088 & (3) \\ Right Ascension\tablefootmark{a} & 13:23:35.8 & (3) \\ Declination\tablefootmark{a} & -47:18:46.9 & (3) \\ Spectral Type & K3Ve & (4,5) \\ Mass [$M_\mathrm{\sun}$] & $1.2$ & (5) \\ $T_\mathrm{eff}$ [K] & $4,500\pm50$ & (6)\\ $\log\left(L_*/L_\mathrm{\sun}\right)$ & $-0.06\pm0.02$ & (6)\\ Age [Myr] & $5$ & (5)\\ Parallax [mas] & $7.71\pm0.09$ & (3) \\ Distance [pc] & $129.5\pm1.4$ & (3,7) \\ $\mu_{\alpha*}$ [mas / yr] & $-31.183\pm0.085$ & (3) \\ $\mu_{\delta}$ [mas / yr] & $-20.105\pm0.078$ & (3) \\ $B$ [mag]& $ 11.96$ & (1) \\ $V$ [mag] & $11.20$ & (1) \\ $G_\mathrm{BP}$ [mag] & $11.43$ & (3) \\ $G$ [mag] & $10.80$ & (3) \\ $G_\mathrm{RP}$ [mag] & $10.04$ & (3) \\ $J$ [mag] & $9.03$ & (2) \\ $H$ [mag] & $8.40$ & (2) \\ $K_\text{s}$ [mag] & $8.31$ & (2) \\ $W1$ [mag] & $8.17$ & (8) \\ $W2$ [mag] & $8.13$ & (8) \\ $W3$ [mag] & $7.94$ & (8) \\ $W4$ [mag] & $7.10$ & (8) \\ \hline \end{tabular} \tablefoot{ \tablefoottext{a}{Coordinates are given at \textit{Gaia} \rev{EDR3} epoch J2016.0.} } \tablebib{ (1)~\citet{hog2000}; (2)~\citet{cutri2012a}; (3)~\citet{gaia2020}; (4)~\citet{torres2006}; (5)~\citet{pecaut2016}; (6)~this work; (7)~\citet{bailer-jones2021}; (8)~\citet{cutri2012b}. } \end{table} To convert the photometric contrasts measured in the SPHERE and NACO data into absolute fluxes, it was necessary to characterize the primary star first. We analyzed its spectral energy distribution (SED) with VOSA \citep{bayo2008} using flux measurements from Tycho \citep{hog2000}, APASS \citep{henden2012}, \textit{Gaia} \rev{EDR3 \citep{gaia2020}}, DENIS \citep{denis_consortium2005}, 2MASS \citep{skrutskie2006,cutri2003}, and WISE \citep{cutri2012b}. \citet{pecaut2016} measured an extinction of $A_V=0.16\,\mathrm{mag}$ and reported that the star is likely to host a debris disk based on the infrared excess that was observed in WISE $W3$ and $W4$ filters. The STILISM reddening map \citep{lallement2014} provides a total visual extinction of $A_V=(0.05\pm0.05)\,\mathrm{mag}$ at the position and distance of our target. We therefore allowed extinctions in the range $0\,\mathrm{mag}<A_V<0.2\,\mathrm{mag}$ and excluded the $W3$ and $W4$ measurements from the fit of the stellar SED. As the stellar flux measurements of the primary might be affected by flux from the close companion we briefly assessed the extent of this potential contamination. The fractional contribution from the secondary to the measured flux of the primary is maximized for the longest wavelengths of the analyzed SED\footnote{This statement is verified by the lowest magnitude contrast $\Delta$Mag between primary and secondary that is measured in the $L'$ band (see Table \ref{tbl:photometry_yses_bd}).}. Equation (2) of \citet{bohn2020b} yields a contribution of 0.04\,mag to the stellar magnitude in $L'$ band if the binary was unresolved in the photometric data. This contribution is significantly smaller for shorter wavelengths where the contrast between both objects is larger. We therefore do not perform any correction of the flux measurements for the primary, as the contribution from the secondary is below 5\% and thus already considered in the larger uncertainties of the magnitude contrast values as presented in Table~\ref{tbl:photometry_yses_bd}, when deriving the fluxes of the companion. The stellar distance was fixed to \rev{130\,pc} using the estimate from \citet{bailer-jones2021} based on \textit{Gaia} EDR3 parallaxes, and we assumed a solar-like metallicity of the primary. We fitted a grid of BT-Settl models \citep{allard2012,baraffe2015} in a $\chi^2$ minimizing approach, and the best fit of the data was provided by a model with an effective temperature of $T_\mathrm{eff}=4500\pm50\,K$, a surface gravity of $\log\left(g\right)=2.6\pm0.3\,\mathrm{dex}$, a stellar luminosity of \rev{$\log\left(L_*/L_\sun\right)=-0.06\pm0.02$}, and a visual extinction parameter of $A_V=0.13\pm0.06\,\mathrm{mag}$. These values are in good agreement with the properties that \citet{pecaut2016} derived for TYC~8252-533-1. \subsubsection{Brown dwarf astrometry} \label{subsubsec:yses_bd_astrometry} To assess whether our high-contrast data confirm a bound orbit of TYC~8252-533-1~B, we extracted the relative astrometry with respect to the primary star for all of our observations. For SPHERE we used the general astrometric solution presented in \citet{maire2016} with a true north correction of $-1\fdg75\pm0\fdg08$ and plate scales of 12.255\,mas px$^{-1}$, 12.251\,mas px$^{-1}$, and 12.265\,mas px$^{-1}$ for $H2$, $H$, and $K_s$ band images, respectively. The NACO data were calibrated with a plate scale of $27.193\pm0.059$\,mas px$^{-1}$ \citep{launhardt2020} but no true north correction was applied as discussed in \citet{bohn2020a}. The derived separations and position angles are presented in Table~\ref{tbl:astrometry_yses_companion} and visualized in Fig.~\ref{fig:ppm_analysis_yses_companion}. \begin{table} \caption{% Relative astrometry of TYC~8252-533-1~B with respect to the primary. } \label{tbl:astrometry_yses_companion} \def1.2{1.2} \setlength{\tabcolsep}{8pt} \centering \begin{tabular}{@{}llll@{}} \hline\hline Epoch & Filter & Separation & PA\\ & & (\arcsec) & (\degr)\\ \hline J2015.5 & $G$ & $4.4115\pm0.0001$ & $204.230\pm0.002$ \\ J2016.0 & $G$ & $4.4119\pm0.0001$ & $204.241\pm0.001$ \\ 2017-04-02 & $H$ & $4.414\pm0.005$ & $204.09\pm0.09$ \\ 2019-04-07 & $K_s$ & $4.437\pm0.005$ & $204.11\pm0.09$ \\ 2019-04-15 & $L'$ & $4.426\pm0.011$ & $204.34\pm0.11$ \\ 2020-02-19 & $H2$ & $4.424\pm0.005$ & $204.13\pm0.09$ \\ \hline \end{tabular} \tablefoot{% \rev{The $G$ band astrometric data originate from the $Gaia$ DR2 (epoch J2015.5) and EDR3 (epoch J2016.0) catalogs. These filters have different pass bands.} } \end{table} \begin{figure} \resizebox{\hsize}{!}{\includegraphics{./ppm_analysis_yses_companion.pdf}} \caption{ Proper motion analysis of TYC~8252-533-1~B. The colored markers represent the relative offsets in RA and Dec with respect to the primary that we measured in SPHERE and NACO imaging data or derived from the \textit{Gaia} DR2 \rev{and EDR3} catalogs. The blue dashed line illustrates the trajectory of a static background object at infinity and the white markers along the curve represent the hypothetical positions of such an object at the epoch of the corresponding observation. } \label{fig:ppm_analysis_yses_companion} \end{figure} The measurements clearly confirm that the path of TYC~8252-533-1~B is highly inconsistent with the simulated trajectory of a static background object. Instead, the relative astrometric offsets with respect to the primary are in good agreement with the small relative velocity that is expected from an orbit with a projected angular separation of approximately \rev{570}\,au. Even though there remain some systematic sources of uncertainties between the astrometric measurements that originate from different instruments or filters, the high-contrast imaging data clearly confirm the hypothesis, based on the \textit{Gaia} data, that TYC~8252-533-1~B is a bound companion to the solar-type primary TYC~8252-533-1. \subsubsection{Brown dwarf photometry} \label{subsubsec:yses_bd_photometry} The de-reddened photometry of TYC~8252-533-1~B and its host star are presented in Table~\ref{tbl:photometry_yses_bd}. \begin{table} \caption{ De-reddened photometry of TYC~8252-533-1 and its brown dwarf companion. } \label{tbl:photometry_yses_bd} \def1.2{1.2} \centering \begin{tabular}{@{}llll@{}} \hline\hline Filter & Magnitude star & $\Delta$Mag & Flux companion\\ & (mag) & (mag) & ($\mathrm{erg}\,\mathrm{s}^{-1}\,\mathrm{cm}^{-2}\,\mathrm{\mu m}^{-1}$)\\ \hline $G_\mathrm{BP}$ & 11.43 & $6.73\pm0.05$ & $(0.22\pm0.01)\times10^{-11}$\\ $G$ & 10.80 & $5.94\pm0.01$ & $(0.503\pm0.002)\times10^{-11}$\\ $G_\mathrm{RP}$ & 10.04 & $5.20\pm0.02$ & $(1.02\pm0.02)\times10^{-11}$\\ \textit{Y2} & 9.34 & $5.84\pm0.96$ & $(0.50\pm 0.44)\times10^{-11}$\\ \textit{Y3} & 9.25 & $5.59\pm0.93$ & $(0.58\pm0.49)\times10^{-11}$\\ \textit{J2} & 9.06 & $4.79\pm0.17$ & $(1.05\pm0.16)\times10^{-11}$\\ \textit{J3} & 8.86 & $4.68\pm0.15$ & $(1.07\pm0.15)\times10^{-11}$\\ \textit{H2} & 8.34 & $4.47\pm0.09$ & $(0.96\pm0.08)\times10^{-11}$\\ \textit{H3} & 8.26 & $4.37\pm0.09$ & $(0.96\pm0.08)\times10^{-11}$\\ \textit{K1} & 8.22 & $4.25\pm0.05$ & $(0.49\pm0.02)\times10^{-11}$\\ \textit{K} & 8.22 & $4.20\pm0.05$ & $(0.44\pm0.02)\times10^{-11}$\\ \textit{K2} & 8.22 & $4.04\pm0.04$ & $(0.46\pm0.02)\times10^{-11}$\\ \textit{L'} & 8.16 & $3.62\pm0.31$ & $(0.10\pm0.03)\times10^{-11}$\\ \hline \end{tabular} \tablefoot{% The $G$ band values originate directly from \textit{Gaia} \rev{EDR3} whereas the infrared measurements of the companion are based on our SPHERE and NACO data. The stellar magnitudes at infrared wavelengths are derived from SED modeling as described in Sect.~\ref{subsubsec:stellar_parameters}. } \end{table} The listed \textit{Gaia} photometry is directly obtained from the \rev{EDR3} catalog and the infrared photometry originates from our high-contrast imaging data. We applied the previously determined extinction of $A_V=0.13$\,mag to correct the presented fluxes. As the SPHERE $H$ band data from 2017-04-02 were collected in poor atmospheric conditions and with a very unstable AO performance, we disregarded the photometry that was extracted from these observations in our further analysis. We fitted the full optical and infrared SED of the companion utilizing the MCMC approach described in \citet{bohn2020c}. We used a linearly interpolated grid of BT-Settl models \citep{allard2012,baraffe2015} with effective temperatures $T_\mathrm{eff}$ between 1500\,K and 4000\,K, surface gravity in the range of $0<\log\left(g\right)<6$, and solar metallicity. We further allowed object radii $R$ from $0.5\,R_\mathrm{Jup}$ to $5\,R_\mathrm{Jup}$. The MCMC sampler was implemented in the \texttt{emcee} framework \citep{foreman-mackey2013} and we used 100 walkers with 10,000 steps to sample the posterior distribution. In accordance with the computed autocorrelation time of approximately 200 steps, the first 1000 samples of each chain were discarded as burn-in phase and we further continued using each twentieth step of the remaining chains. This provided 45,000 samples for our posterior distribution in ($T_\mathrm{eff}$, $\log\left(g\right)$, $R$), which are visualized in \rev{Fig.~\ref{fig:sed_mcmc_post_yses_companion} of} Appendix~\ref{sec:mcmc_posterior}. From these distributions we derived an effective temperature of $T_\mathrm{eff}=3092^{+186}_{-91}\,K$, a surface gravity of $\log\left(g\right)=3.41^{+1.07}_{-0.31}$\,dex, and a radius of $R=3.5^{+0.3}_{-0.4}\,R_\mathrm{Jup}$ for TYC~8252-533-1~B. These values were obtained as the 95\,\% confidence intervals around the medians of the posterior distributions. From these three parameters we derived the object luminosity as $\log\left(L_*/L_\sun\right)=-1.99^{+0.01}_{-0.02}$. The results of this SED fit are presented in Fig.~\ref{fig:sed_yses_companion}. \begin{figure} \resizebox{\hsize}{!}{\includegraphics{./TYC8252-533-1B_coro_mcmc_sed_fit.pdf}} \caption{% SED of TYC~8252-533-1~B. The yellow, orange, and red squares indicate the photometry we measured for \textit{Gaia}, SPHERE, and NACO filters, respectively. The bars in $x$ direction indicate the width of the filter transmission curves. The blue curve presents the median model from our posterior distribution of the SED fit as shown in \rev{Fig.~\ref{fig:sed_mcmc_post_yses_companion} of} Appendix~\ref{sec:mcmc_posterior}. We present the integrated flux of this median model in the applied filters with the grey squares and we visualize 100 randomly selected models from our posterior distribution as grey curves. In the bottom panel we present the residuals of the fit. } \label{fig:sed_yses_companion} \end{figure} Interestingly, the derived object radius is markedly larger than usual radii of field brown dwarfs of this mass, which are in the order of $1\,R_\mathrm{Jup}$ \citep[e.g.,][]{chabrier2009}. This inflated photometric radius, however, is nothing unusual for sub-stellar companions at this young age, and similarly large values have been reported for various planetary-mass objects \citep[e.g.,][]{schmidt2008,bohn2019,stolker2020}. To convert the results of this analysis to a mass estimate for the companion, we assumed a system age of $5\pm2$\,Myr \citep{pecaut2016}. The kinematic parallax that \citet{pecaut2016} used for this target (7.83\,mas) is not far from the \textit{Gaia} \rev{EDR3} value of 7.71\,mas. The difference in age due to the different adopted distances should therefore be considered in our assigned uncertainties. Evaluation of BT-Settl isochrones at this age and with our derived luminosity yielded a mass of $52^{+17}_{-11}\,M_\mathrm{Jup}$ for TYC~8252-533-1~B, which makes it likely a brown dwarf companion to the solar-type primary. \rev{This value is in good agreement with the photometric mass estimate of $48.7\pm11.1\,M_\mathrm{Jup}$ derived from the \textit{Gaia} $G$ band flux.} \subsubsection{System architecture} \label{subsubsec:yses_bd_companion_system_architecture} Based on the observed infrared excess in the W3 and W4 filters the primary star likely hosts a debris disk \citep[][and Sect.~\ref{subsubsec:stellar_parameters}]{pecaut2016}. Our direct imaging data do not reveal any scattered light flux of this postulated debris ring, which is most likely below the detection sensitivity of our total intensity observations. Nevertheless, we assessed the relative location of this newly identified brown dwarf companion with respect to the circumstellar material. As our photometric data cover only wavelengths shorter than 22\,$\mu$m (W4), we most likely do not sample the peak of the infrared excess emission; hence we could only derive an upper limit for the temperature of the dust grains in the disk. We assumed a single species of dust grains that is located at a radial separation $r_\mathrm{dust}$ from the central star, and modeled the thermal dust emission by a single blackbody with a dust temperature $T_\mathrm{dust}$. As the peak of this emission is detected either in W4 or at longer wavelengths, we could constrain a maximum dust temperature of $T_\mathrm{dust}\leq130$\,K. We converted this dust temperature to a minimum disk radius of $r_\mathrm{dust}\geq4$\,au, utilizing a temperature-radius relation as presented by \citet{backman1993} with \begin{equation} \frac{r_\mathrm{dust}}{1\,\mathrm{au}} = \left(\frac{L_*}{L_\sun}\right)^{0.5} \left(\frac{278\,\mathrm{K}}{T_\mathrm{dust}}\right)^{2}\;, \end{equation} where $L_*$ denotes our previously determined stellar luminosity. Even though this lower limit does not rule out that the debris disk around the primary might extend up to a separation in the order of the projected separation of \rev{570}\,au that we measure for TYC~8252-533-1~B, this scenario is expected to be extremely unlikely, as it would require dust temperatures as low as 10\,K. In agreement with temperature and radius measurements from other debris disk studies that rely on either SED modeling \citep[e.g.,][]{moor2011} or spatially resolved imaging of these environments \citep[e.g.,][]{pawellek2014}, we conclude that TYC~8252-533-1~B is thus very likely located outside the debris disk of its primary star. TYC~8252-533-1~B is a new data point to the catalog of debris-disk systems that are harboring giant exoplanets or brown dwarf companions such as \object{HR~8799} \citep{marois2008,marois2010}, \object{$\beta$~Pictoris} \citep{lagrange2009,lagrange2010}, \object{HD~95086} \citep{rameau2013}, \object{HD~106906} \citep{bailey2014}, \object{HR~3549} \citep{mawet2015}, \object{HR~2562} \citep{konopacky2016}, or \object{HR~206893} \citep{milli2017}. While the giant companions HR~8799~bcde, $\beta$~Pic~b, HD~95086~b, HR~2562~B, and HR~206893~B are located inside the debris disks of their host stars, HD~106906~b, HR~3549~B, and TYC~8252-533-1~B are residing beyond these. Whereas the objects in the former category might have formed via core accretion \citep{pollack1996,alibert2005,dodsonrobinson2009,lambrechts2012} or gravitational instabilities in the protoplanetary disk \citep{boss1997,rafikov2005,durisen2007,kratter2010,boss2011}, similar formation mechanisms are unlikely for the objects that are found outside the circumstellar disks of their hosts, as \textit{in situ} formation at these large separations is not supported by these mechanisms, and migration from within the current disk is unlikely without disrupting the circumstellar environment \citep{raymond2012}. As concluded by \citet{bailey2014} for HD~106906, it is thus likely that TYC~8252-533-1~B rather formed via a star-like pathway by fragmentation processes in the collapsing protostellar cloud \citep{kroupa2001,chabrier2003}. Future astrometric observations to constrain the orbital parameters of this brown dwarf and spectroscopic analysis of its atmospheric composition are required to confirm this suggested formation scenario. \subsection{Stellar companions in the SPHERE field of view} \label{subsec:sphere_stellar_companions} \rev{% Six additional companion candidates from the \textit{Gaia} preselection were also identified in the SPHERE observations that were collected within the scope of YSES. Contrary to TYC~8252-533-1~B, most of these companions seem to exhibit masses that are in good agreement with stellar nature of these objects. In this section we briefly assess the combined SPHERE and \textit{Gaia} astrometry and photometry of these objects. The numerical values are presented in Table~\ref{tbl:yses_stellar_companions}. We used 2MASS $JHK$ photometry of the systems to derive the absolute magnitudes for the companion candidates. For 2MASS~J12195938-5018404, 2MASS~J12505143-5156353, and 2MASS~J12560830-6926539 the \textit{Gaia} companion candidates are spatially resolved by 2MASS, so they should not pollute the flux measurement of the primary. This is not the case for 2MASS~J12391404-5454469, 2MASS~J13130714-4537438, and 2MASS~J13335481-6536414, for which the fluxes of both sources are blended. Furthermore, we identified an additional companion candidate at a separation of approximately 0\farcs2 to 2MASS~J12560830-6926539, which is resolved neither by 2MASS nor \textit{Gaia}. To obtain an unbiased estimate for the flux of the primary star, we corrected the 2MASS magnitudes of these unresolved pairs for the additional contribution, utilizing Eq.~(2) from \citet{bohn2020b}. These revised values are reported in Table~\ref{tbl:yses_stellar_companions}. As for the Gaia fluxes, the SPHERE photometric measurements were converted to object masses by BT-Settl models that were evaluated at the system age. The corresponding imagery of these additional companions is shown in Fig.~\ref{fig:sphere_stellar_companions} in Appendix~\ref{sec:hci_observing_conditions}. } \begin{table*} \caption{% \rev{% SPHERE astrometric and photometric measurements of stellar companions identified by the \textit{Gaia} search. } } \label{tbl:yses_stellar_companions} \def1.2{1.2} \centering \begin{tabular}{@{}lllllllll@{}} \hline\hline Target & Date & Filter & Sep. & PA & $m_\star$\tablefootmark{a} & $\Delta m$ & $M_\mathrm{comp}$ & Phot. mass\\ (2MASS ID) & (yyyy-mm-dd) & & (mas) & (\degr) & (mag) & (mag) & (mag) & ($M_\mathrm{Jup}$)\\ \hline 12195938-5018404 & 2018-12-30 & $H$ & $3066\pm4$ & $355.5\pm0.1$ & 9.86 & $1.162\pm0.016$ & $5.107\pm0.016$ & $370.5^{+25.6}_{-38.7}$ \\ 12195938-5018404 & 2018-12-30 & $K_s$ & $3067\pm4$ & $355.5\pm0.1$ & 9.65 & $1.086\pm0.072$ & $4.821\pm0.072$ & $380.4^{+34.4}_{-42.8}$ \\ 12391404-5454469 & 2019-01-12 & $H$ & $2567\pm4$ & $215.9\pm0.1$ & 9.07 & $1.976\pm0.016$ & $5.887\pm0.016$ & $111.3^{+56.9}_{-40.6}$ \\ 12391404-5454469 & 2019-01-12 & $K_s$ & $2568\pm3$ & $215.9\pm0.1$ & 8.96 & $1.835\pm0.006$ & $5.632\pm0.008$ & $106.1^{+59.9}_{-37.7}$ \\ 12505143-5156353 & 2019-01-12 & $H$ & $3235\pm4$ & $81.0\pm0.1$ & 8.71 & $2.157\pm0.016$ & $5.675\pm0.016$ & $190.5^{+26.5}_{-51.3}$ \\ 12505143-5156353 & 2019-01-12 & $K_s$ & $3240\pm4$ & $81.0\pm0.1$ & 8.63 & $2.061\pm0.002$ & $5.501\pm0.006$ & $180.1^{+24.1}_{-56.6}$ \\ 12560830-6926539 & 2019-01-08 & $H$ & $5085\pm9$ & $41.8\pm0.1$ & 8.54 & $3.740\pm0.030$ & $7.291\pm0.053$ & $36.2^{+2.6}_{-6.9}$ \\ 12560830-6926539 & 2019-01-08 & $K_s$ & $5086\pm6$ & $41.7\pm0.1$ & 8.30 & $3.388\pm0.377$ & $6.700\pm0.379$ & $39.9^{+12.5}_{-8.9}$ \\ 13130714-4537438 & 2017-07-05 & $J$ & $707\pm3$ & $157.5\pm0.3$ & 9.59 & $0.800\pm0.003$ & $4.669\pm0.037$ & $312.4^{+181.0}_{-121.8}$ \\ 13130714-4537438 & 2017-07-05 & $H$ & $706\pm3$ & $157.4\pm0.3$ & 8.99 & $0.659\pm0.002$ & $3.926\pm0.036$ & $318.3^{+176.5}_{-121.7}$ \\ 13335481-6536414 & 2018-04-30 & $H$ & $1340\pm3$ & $8.2\pm0.2$ & 8.14 & $2.517\pm0.004$ & $5.599\pm0.005$ & $80.2^{+67.3}_{-3.2}$ \\ 13335481-6536414 & 2018-04-30 & $K_s$ & $1341\pm3$ & $8.2\pm0.1$ & 7.91 & $2.529\pm0.003$ & $5.380\pm0.004$ & $76.7^{+61.9}_{-3.1}$ \\ 13335481-6536414 & 2020-02-16 & $H$ & $1341\pm3$ & $8.4\pm0.1$ & 8.23 & $2.585\pm0.053$ & $5.661\pm0.053$ & $79.4^{+64.9}_{-5.1}$ \\ \hline \end{tabular} \tablefoot{% \tablefoottext{a}{\rev{% Stellar 2MASS magnitudes. For 2MASS~J12391404-5454469, 2MASS~J12560830-6926539, 2MASS~J13130714-4537438, and 2MASS~J13335481-6536414 we corrected the 2MASS magnitudes for the contribution of close, unresolved companions. }} } \end{table*} \subsubsection{2MASS J12195938-5018404} \label{subsubsec:results_2massj1219} \rev{% The candidate companion detected to 2MASS~J12195938-5018404 clearly seems to be stellar in nature. Whereas the Gaia $G$ band photometry indicates an object mass of $464.7\pm29.3\,M_\mathrm{Jup}$, the SPHERE near infrared photometry favors slightly lower masses of approximately $375\,M_\mathrm{Jup}$. Both measurements are consistent at 2$\sigma$ level and the slightly higher Gaia value might originate from uncorrected flux contribution of the primary star. As visualized in Fig.~\ref{fig:2MASSJ1219_ppm_analysis}, SPHERE and Gaia astrometry for the companion candidate are highly consistent. } \begin{figure} \resizebox{\hsize}{!}{\includegraphics{./2MASSJ12195938-5018404_ppm_analysis.pdf}} \caption{ \rev{% Proper motion analysis of 2MASS~J12195938-5018404~B. See Fig.~\ref{fig:ppm_analysis_yses_companion} for a detailed description of the plot elements. } } \label{fig:2MASSJ1219_ppm_analysis} \end{figure} \rev{% This is also supported by a companionship probability of $p^\mathrm{C}=100\,\%$ as derived from \textit{Gaia} astrometry alone. We thus conclude that 2MASS~J12195938-5018404~B is a stellar secondary to its solar-mass primary. The binary has a projected separation of approximately 470\,au. } \subsubsection{2MASS J12391404-5454469} \label{subsubsec:results_2massj1239} \rev{% The companion candidate to 2MASS~J12391404-5454469 is supposedly of stellar mass. The \textit{Gaia} photometry is consistent with a mass of $189.1\pm41.9\,M_\mathrm{Jup}$. Again, the SPHERE data favor a smaller object mass of approximately $110\,M_\mathrm{Jup}$. The proper motion analysis clearly supports that the companion candidate is gravitationally bound to the primary star, and has a projected separation of approximately 275\,au (see Fig.~\ref{fig:2MASSJ1239_ppm_analysis}). } \begin{figure} \resizebox{\hsize}{!}{\includegraphics{./2MASSJ12391404-5454469_ppm_analysis.pdf}} \caption{ \rev{% Proper motion analysis of 2MASS~J12391404-5454469~B. See Fig.~\ref{fig:ppm_analysis_yses_companion} for a detailed description of the plot elements. } } \label{fig:2MASSJ1239_ppm_analysis} \end{figure} \rev{% This combined astrometric analysis is confirmed by $p^\mathrm{C}=100\,\%$ that was derived from \textit{Gaia} data alone. We will thus refer to the object as 2MASS~J12391404-5454469~B henceforth. } \subsubsection{2MASS J12505143-5156353} \label{subsubsec:results_2massj1250} \rev{% The three mass estimates derived from SPHERE $H$ and $K_s$ band and \textit{Gaia} $G$ band data agree particularly well for the candidate companion to 2MASS~J12505143-5156353. As presented in Fig.~\ref{fig:2MASSJ1250_ppm_analysis}, the object is clearly comoving with the primary star. } \begin{figure} \resizebox{\hsize}{!}{\includegraphics{./2MASSJ12505143-5156353_ppm_analysis.pdf}} \caption{ \rev{% Proper motion analysis of 2MASS~J12505143-5156353~B. See Fig.~\ref{fig:ppm_analysis_yses_companion} for a detailed description of the plot elements. } } \label{fig:2MASSJ1250_ppm_analysis} \end{figure} \rev{% The \textit{Gaia} companionship probability of $p^\mathrm{C}=100\,\%$ that we derived for this object strongly supports this conclusion. It should therefore be named 2MASS~J12505143-5156353~B, a stellar companion with a mass of approximately $185\,M_\mathrm{Jup}$. The projected separation between primary and secondary is approximately 350\,au. } \subsubsection{2MASS J12560830-6926539} \label{subsubsec:results_2massj1256} \rev{% As presented in Fig.~\ref{fig:2MASSJ1256_ppm_analysis} the astrometry from \textit{Gaia} and SPHERE for the candidate companion to 2MASS J12560830-6926539 clearly disfavors a static background object. } \begin{figure} \resizebox{\hsize}{!}{\includegraphics{./2MASSJ12560830-6926539_ppm_analysis.pdf}} \caption{ \rev{% Proper motion analysis of 2MASS~J12560830-6926539~B. See Fig.~\ref{fig:ppm_analysis_yses_companion} for a detailed description of the plot elements. } } \label{fig:2MASSJ1256_ppm_analysis} \end{figure} \rev{ But the relative astrometric measurements for both epochs are too disjunct to allow a bound orbit within the measurement uncertainties. This conclusion seems to be supported by a velocity ratio of $\nicefrac{v_\mathrm{proj}}{v_\mathrm{max}}=1.36\pm0.06$ and a \textit{Gaia} companionship probability of $p^\mathrm{C}=0\,\%$. } \rev{% The reason for this inconsistency can be identified in the high-contrast imaging data collected on 2MASS~J12560830-6926539 (see Fig.~\ref{fig:sphere_stellar_companions} in Appendix~\ref{sec:hci_observing_conditions}). The primary star is resolved into a visual binary with an angular separation of $0\farcs218\pm0\farcs006$. The fainter of the two stars is detected at a position angle of $33\fdg8\pm1\fdg6$. The binarity of the source was identified within the scope of the Search for associations containing young stars \citep[SACY;][]{torres2006,elliott2015} and confirmed by \citet{tokovinin2019}. It also affects the accuracy of the provided \textit{Gaia} astrometry. The \textit{Gaia} measurements exhibit an astrometric excess noise of 2.3\,mas (\texttt{astrometric\_excess\_noise} parameter) that is detected at a significance of approximately 6\,820 (\texttt{astrometric\_excess\_noise\_sig} parameter). This significance is much larger than the threshold of 2 that is required for a certain corruption of the astrometric measurements \citep[see][]{lindegren2020b}. This conclusion is also supported by a renormalised unit weight error (RUWE) of $\sim13$; for well-behaved sources $\mathrm{RUWE}\approx1$ is expected. As parallaxes and proper motions for the binary and the \textit{Gaia} companion candidate are highly consistent, it is very likely that these three objects form a gravitationally bound triple system. Further astrometric monitoring will help to confirm this hypothesis. } \rev{ The companion candidate from \textit{Gaia} has been spectroscopically analyzed by \citet{riaz2006}. The authors determined a spectral type of M1 and classified it as a stellar object. This is in stark contrast to the photometric mass estimates that we derived from both \textit{Gaia} and SPHERE. The \textit{Gaia} $G$ band photometry is consistent with a mass of $44.5\pm5.8\,M_\mathrm{Jup}$ and the SPHERE $H$ and $K_s$ band data indicate object masses of $36^{+3}_{-7}\,M_\mathrm{Jup}$ and $40^{+13}_{-9}\,M_\mathrm{Jup}$, respectively. These values are consistent within their uncertainties and suggest that Gaia EDR3 5844909156504880128 (2MASS J12560892-6926503) is a brown dwarf rather than a stellar companion. It is possible that \citet{riaz2006} misclassified the companion, perhaps due to contaminating flux from the primary star that was leaking into the slit with a width of 1\farcs5. Further spectroscopic measurements will help to confirm the sub-stellar nature of this outer companion in a young triple system. } \subsubsection{2MASS J13130714-4537438} \label{subsubsec:results_2massj1313} \rev{% The \textit{Gaia} and SPHERE astrometric measurements for the companion candidate to 2MASS J13130714-4537438 are highly consistent and indicate that this object is gravitationally bound to its Sun-like primary (see Fig.~\ref{fig:2MASSJ1313_ppm_analysis}). } \begin{figure} \resizebox{\hsize}{!}{\includegraphics{./2MASSJ13130714-4537438_ppm_analysis.pdf}} \caption{ \rev{% Proper motion analysis of 2MASS~J13130714-4537438~B. See Fig.~\ref{fig:ppm_analysis_yses_companion} for a detailed description of the plot elements. } } \label{fig:2MASSJ1313_ppm_analysis} \end{figure} \rev{% This conclusion was also drawn from \textit{Gaia} astrometry alone, for which we calculated $p^\mathrm{C}=100\,\%$. We derived photometric mass estimates of $312.4^{+181.0}_{-121.8}\,M_\mathrm{Jup}$ and $318.3^{+176.5}_{-121.7}\,M_\mathrm{Jup}$ from the SPHERE $H$ and $K_s$ band data, respectively. The corresponding \textit{Gaia} mass of $414.4\pm114.2\,M_\mathrm{Jup}$ is marginally higher, but well consistent within the uncertainties. These mass errors are relatively large for this object. Due the the young age of the system of $2_{-1}^{+2}$\,Myr, the object mass can vary significantly when propagating the age uncertainties. 2MASS~J13130714-4537438~B is likely a stellar-mass companion at a projected separation of approximately 100\,au. } \subsubsection{2MASS J13335481-6536414} \label{subsubsec:results_2massj1333} \rev{% As visualized in Fig.~\ref{fig:2MASSJ1333_ppm_analysis}, the three astrometric data points collected with SPHERE and \textit{Gaia} are in very good agreement with each other. } \begin{figure} \resizebox{\hsize}{!}{\includegraphics{./2MASSJ13335481-6536414_ppm_analysis.pdf}} \caption{ \rev{% Proper motion analysis of 2MASS~J13335481-6536414~B. See Fig.~\ref{fig:ppm_analysis_yses_companion} for a detailed description of the plot elements. } } \label{fig:2MASSJ1333_ppm_analysis} \end{figure} \rev{% This analysis and the \textit{Gaia} companionship probability of $p^\mathrm{C}=100\,\%$ strongly support that 2MASS~J13335481-6536414~B is a gravitationally bound companion with a projected separation of approximately 140\,au. Both optical and near infrared photometric mass estimates for the secondary agree very well within their uncertainties. Whereas the photometric mass estimate from \textit{Gaia} suggests that 2MASS~J13335481-6536414~B is a low-mass stellar object with a mass of $91.9\pm31.0\,M_\mathrm{Jup}$, the SPHERE data indicate that it might be of sub-stellar nature with a mass of approximately $78\,M_\mathrm{Jup}$. But the upper boundaries of the SPHERE measurements also allow for stellar masses. Future data will be required to discern whether 2MASS~J13335481-6536414~B is a high-mass brown dwarf or rather low-mass stellar companion. } \rev{% An additional companion candidate to 2MASS~J13335481-6536414 at a projected separation of more than 1000\,au is detected by the \textit{Gaia} preselection algorithm. For this object with the identifier Gaia EDR3 5863747467220738432 we derived $\nicefrac{v_\mathrm{proj}}{v_\mathrm{max}}=1.32\pm0.02$ and hence $p^\mathrm{C}=0\,\%$. It is possible that the visual stellar binary of 2MASS~J13335481-6536414 AB is corrupting the astrometric measurements for the primary. Further monitoring will be necessary to determine the orbital parameters of this binary. These data will be helpful to assess whether the additional companion candidate is consistent with a bound orbit after all and was just rejected due to the velocity contribution from the inner binary. } \section{Discussion} \label{sec:discussion} \subsection{preselection criteria} \label{subsec:discussion_preselection_criteria} Even though we have detected several high confidence companions in \textit{Gaia} \rev{EDR3}, it is necessary to evaluate the quality of our preselection criteria as to whether \textit{bona fide} binaries might be neglected or too many unbound objects are identified. Due to the nature of our companionship assessment, it is vital that our companion candidates must have a well constrained parallax measurement. It is thus justified to dismiss any data without or with loosely constrained parallaxes. Setting the maximum value of the parallax uncertainty to 0.5\,mas defines a rather conservative threshold and considers larger uncertainties due to imprecise astrometry for small separation binaries or objects close to \textit{Gaia}'s sensitivity limit. Of course, true companions with small angular separations can exhibit even larger uncertainties and might thus be rejected from our preselected sample (these are the companions that reside close to or within the red, dashed exclusion triangle presented in Fig.~\ref{fig:separation_magnitude}). Within the scope of this work, however, a rejection of these companions need not be considered as a drawback, because other techniques such as lucky imaging \citep[e.g.,][]{janson2012} speckle interferometry \citep[e.g.,][]{tokovinin2010} or AO-assisted high-contrast imaging \citep[e.g.,][]{wang2015,bonavita2021} are much stronger in detecting these close, visual binaries. The \rev{applied 20\,\% deviation in parallax measurements} of the primary and companion candidate does not exclude any \textit{bona fide} binaries either; again with the exception of very close pairs with corrupted astrometry. Given the median parallaxes of our target stars \rev{($\varpi=7.55$\,mas, see Fig.~\ref{fig:sample_properties})}, this \rev{criterion} defines a potential radial separation of up to $\sim33$\,pc ($\approx7\times10^6$\,au), which is significantly larger than the average distance between stars in a young association \citep[e.g.,][]{kraus2008}. \rev{% The same cutoff threshold is applied for similar searches presented by \citet{fontanive2019} and \citet{fontanive2021}. } The \rev{10\,km\,s$^{-1}$} interval that we chose for the proper motions is justified in a similar manner. Close companions show a non-negligible amount of orbital motion with respect to the primary star. \rev{% For a solar-mass primary, a BD companion of $40\,M_\mathrm{Jup}$ with a semi-major axis of 100\,au would exhibit an orbital velocity of 3\,km\,s$^{-1}$. For a Sun-like secondary with a semi-major axis of 50\,au this velocity is even as large as 6\,km\,s$^{-1}$. The 10\,km\,s$^{-1}$ interval is thus required to account for both potential scenarios and additional velocity uncertainties. Both parallax and proper motion criteria applied in our preselection are rather conservative choices. This ensures that no \textit{bona fide} binaries get neglected by the algorithm. A refinement of the preselected sample as presented in Sect.~\ref{sec:results_analysis} is necessary to reject clearly unbound objects afterwards. } The most important parameter for our selection is probably the cutoff radius \rev{of $\rho_\mathrm{cutoff}=10\,000$\,au} in projected separation. \rev{The same threshold is also applied within the COCONUTS program that relies on a similar selection methodology \citep[][]{zhang_zj2020,zhang_zj2021}}. Basic geometry demands that the larger one chooses this parameter, the more companions will be preselected by the algorithm, especially when applying it to a densely populated region on the sky. It is expected, however, that the fraction of high confidence candidates with $p^\mathrm{C}>0.95$ among all preselected objects decreases with increasing $\rho_\mathrm{cutoff}$. To assess this correlation, we repeated our full analysis with a cutoff radius of \rev{$\rho_\mathrm{cutoff}=200'000\,\mathrm{au}\approx$1\,pc}. \rev{This agrees with the 20 times larger cutoff radius that was previously applied in our companionship probability assessment (see Sect.~\ref{subsec:companionship_assessment}).} In Fig.~\ref{fig:p_bound_search_radius} we show the fraction of high confidence companions to the total number of potential companions identified within a radius of $\rho_\mathrm{cutoff}$. \begin{figure} \resizebox{\hsize}{!}{\includegraphics{./p_bound_large_vs_search_radius_hybrid_edr3.pdf}} \caption{ Fraction of high confidence companions to the total number of identified companion candidates within a specified radius $\rho_\mathrm{cutoff}$. We show the fractional amount of companions with $p^\mathrm{C}>0.95$ to the total number $N$ of preselected objects interior to our cutoff radius $\rho_\mathrm{cutoff}$. The grey, dashed line marks the chosen cutoff radius of $\rho_\mathrm{cutoff}=10\,000$\,au. } \label{fig:p_bound_search_radius} \end{figure} A clear correlation between the chosen cutoff radius and the number of high confidence objects is visible and the ratio decreases continuously when increasing $\rho_\mathrm{cutoff}$. For large separations the allowed velocities are in the order of the uncertainties we derive from the differential proper motions, so it becomes hard to assess whether these are actually bound or not. Our chosen cutoff separation \rev{lies just before the steepest decrease of the fraction of high confidence companions}. \rev{% Increasing the cutoff separation would therefore also increase the number of preselected yet unbound companion candidates. We thus argue that $\rho_\mathrm{cutoff}=10\,000$\,au is a good choice that allows for the detection of several wide-orbit companions, without diluting the preselected sample by an abundance of unbound contaminants. This is supported by the non-detection of any high confidence companions with a projected angular separation that is larger than 7000\,au (see Table~\ref{tbl:high_priority_companions_1} and Fig.~\ref{fig:high_confidence_comp_properties}). } \subsection{Quality assessment of derived \textit{Gaia} properties} \label{subsec:quality_gaia_properties} As we detect \rev{seven companion candidates} in both SPHERE and \textit{Gaia} measurements, \rev{these systems} provide ideal test cases to assess the quality of the companion properties that we derived for the remaining sample members. This analysis was focused on two important parameters that were extracted from our \textit{Gaia} analysis as presented in Sect.~\ref{sec:results_analysis}: (i) the co-movement hypothesis of the companion and (ii) the companion mass estimate. \rev{ For all these companion candidates but the one detected to 2MASS J12560830-6926539 we derived a velocity ratio $v_\mathrm{proj}/v_\mathrm{max}$ that is smaller than unity. This resulted in companionship probabilities $p^\mathrm{C}>0.95$, indicating that these are gravitationally bound companions. These hypotheses are confirmed for all cases, when analyzing the relative astrometric offsets between the SPHERE and \textit{Gaia} epochs as presented in Sect.~\ref{sec:hci_results}. SPHERE and \textit{Gaia} astrometric measurements are highly consistent and prove the claimed companionship status. Even though the astrometric measurements from both instruments do not agree within their uncertainties for the companion candidate around 2MASS J12560830-6926539, this is no indication that our classification scheme does not work. As detailed in Sect.~\ref{subsubsec:results_2massj1256}, the primary is a visual binary itself that is unresolved in the \textit{Gaia} catalog. For that reason, the measured astrometry is corrupted and does not agree with our SPHERE data. Previous work however strongly indicated that the companion candidate is indeed gravitationally bound, and all three objects form a triple system. } We conclude that the differential velocities directly measured in the \textit{Gaia} catalog are trustworthy, at least for companions that are as bright or brighter and at least as far separated from the primary as \rev{the benchmark targets with complementary SPHERE data}. \rev{Due to the small angular separation of less than 5\farcs5, these are already quite challenging cases and for the majority of brighter and farther separated companions, a similar or better performance of the evaluation method can be expected.} Further monitoring and reduction of the velocity uncertainties as presented in Fig.~\ref{fig:separation_escape_velocity} is required to confirm co-movement for all the companion candidates that were detected during our search. Precise measurements of the RVs of the companions are necessary to obtain a complete three dimensional picture of the orbital dynamics and parameters. \rev{ For all seven companions the photometric masses determined by either SPHERE or \textit{Gaia} are consistent within 2\,$\sigma$ intervals. Especially the masses of the identified sub-stellar companions to TYC~8252-533-1, 2MASS J12560830-6926539, and 2MASS J13335481-6536414 are in exceptional agreement. } It is thus likely that the mass estimates we derived for all identified companions are good estimates for the actual object masses. Given its rather close separation to the primary star and a $G$ band contrast of $\Delta G\approx6$\,mag, TYC~8252-533-1~B is one of the more challenging cases for extraction of \textit{Gaia} photometry (which is also visualized by the proximity of the object to the red exclusion zone that is highlighted in Fig.~\ref{fig:separation_magnitude}). It is therefore likely that the extraction of these relevant \textit{Gaia} parameters could be performed at higher accuracy, leading to more trustworthy results for the objects that are farther away from the red-dashed triangle in Fig.~\ref{fig:separation_mass}. Of course this is not true for companions that are closely located to \textit{Gaia}'s $G$ band magnitude limit of approximately 21\,mag, for which the small amount of received flux creates larger uncertainties in the measured parameters. When inspecting the derived masses for the potential triple system comprising two of our targets from the input catalog (2MASS J15241147-3030582 and 2MASS J15241303-3030572) and a third lower-mass companion, it appears that our mass estimates for the stellar members of this trio are quite different from the input masses we adopted from \citet{pecaut2016}. As listed in Table~\ref{tbl:companions_full_1}, we derived the same mass estimate of approximately $0.7\,M_\sun$ for both stars, which should be very distinct with $1.1\,M_\sun$ and $0.4\,M_\sun$ for 2MASS J15241147-3030582 and 2MASS J15241303-3030572, respectively. This discrepancy is not caused by the marginally different parallaxes assumed for the corresponding primary, which only results in a magnitude difference of 0.05\,mag. The main source of error stems from the two very different ages of 18\,Myr and 1\,Myr that \citet{pecaut2016} give for the two targets, which also results in the very different mass estimates of the third companion Gaia~EDR3 6208136396122878976. Based on the same apparent $G$ band magnitude of this object, we derived masses of $0.23\,M_\sun$ and $0.08\,M_\sun$, respectively, with the higher mass corresponding to the older system age. If the system is indeed a gravitationally bound stellar triple, which is strongly suggested by the derived values of $p^\mathrm{C}\approx1$, all three components should roughly be of the same age, which would also avoid the change in mass of more than 100\% for the lightest member of the system. When trying to reproduce the stellar masses of the two targets from \citet{pecaut2016} based on the measured $G$ band photometry and BT-Settl isochrones, we find best agreement with a system age of approximately 4\,Myr, which provides masses of $1.13\,M_\sun$, $0.45\,M_\sun$, and $0.14\,M_\sun$ for 2MASS J15241147-3030582, 2MASS J15241303-3030572, and Gaia~EDR3 6208136396122878976, respectively. We see similar age and mass discrepancies for the other multiple systems that contain stars from our input catalog as identified companion candidates. This clearly shows that our derived object masses have to be used carefully as they are heavily affected by the underlying system age. Further refinements of the stellar age such as updated \textit{Gaia} distances and coevality constraints for the identified multiple systems are thus required to properly constrain derived objects masses. Further spectral coverage of the SEDs of the detected companions is also necessary, to determine their properties with much higher accuracy than our results, which are based on a single photometric data point. As most of the identified objects are reasonably separated from the primary, spectroscopic follow-up measurements are easily possible and can in most cases even be performed without any AO-assisted instruments. Further data releases of the \textit{Gaia} mission might also improve the parameters derived in this study, and it should be straightforward to update the presented results in the future. The photometric uncertainties, especially of the very faint objects, will certainly be improved with more observational data points, even though the provided $G$ band magnitudes were already precise enough so that these only had a marginal influence on the precision of the derived quantities. It is not clear if color measurements for all our companion candidates will be available in future releases as most of these incompletely characterized objects are very close to a source of equal or higher brightness, which will always be problematic for precise photometric measurements. Higher accuracy astrometry will certainly help to reject or confirm marginal cases from our current study and it will provide new candidate companions that were discarded by our present preselection, either due to non-existing proper motion measurements or too large astrometric uncertainties. \subsection{Comparison to similar studies} \label{subsec:comparision_similra_studies} There are two main studies that have utilized \textit{Gaia} DR2 to reveal members of Sco-Cen. \citet{goldman2018} identified additional \textit{Gaia} members in the LCC, which is the Sco-Cen sub-group that YSES is focusing on. This moving group comprises several low-mass stellar and brown dwarf objects, whose membership had not been revealed before \textit{Gaia} DR2. \citet{damiani2019} focus on the stellar population of Sco-Cen and they identify almost 11,000 pre-main sequence members by \textit{Gaia} astrometry and photometry. To assess whether any of our candidates have been picked up by either of these studies, we cross-matched our identified companions with the output catalogs of both surveys. We focused on the systems with a companionship probability $p^\mathrm{C}>0.95$ as presented in Table~\ref{tbl:high_priority_companions_1} and we found that \rev{20} of our detected companions were listed in both of the studied catalogs. One additional source was identified only by \citet{goldman2018}. Interestingly, only companions with a right ascension below 15h were picked up by either of these previous studies. This is not surprising for the work of \citet{goldman2018}, as these authors were explicitly targeting the LCC, which does not extend to a right ascension greater than 15h. However, none of these discussed surveys identified individual binary or multiple systems as part of their analysis. \subsection{\rev{Completeness}} \label{subsec:discussion_completeness} \rev{% We assessed the completeness of our companion detection method based on the completeness of the \textit{Gaia} \revrev{DR2} catalog. Using the \texttt{selectionfunctions} introduced by \citet{boubert2020a} and \citet{boubert2020b}, we derived the completeness as a function of the position on sky for objects down to the \textit{Gaia} magnitude threshold of $G=21$\,mag. The resulting completeness map is presented in Fig.~\ref{fig:gaia_completeness}. } \begin{figure} \resizebox{\hsize}{!}{\includegraphics{./gaia_completeness.pdf}} \caption{ \rev{ Completeness of \textit{Gaia} DR2 as a function of position on sky. The completeness is calculated for objects as faint as $G=21$\,mag. } } \label{fig:gaia_completeness} \end{figure} \rev{% The map shows clear patterns that correspond to the scanning scheme of the \textit{Gaia} satellite. For most of the coordinates of our Sco-Cen targets, the achieved completeness is higher than 80\,\% and the LCC, \revrev{which is covering an area of approximately $290\degr<l<310\degr$ and $-10\degr<b<20\degr$,} has a completeness coverage of almost 100\,\%. As the underlying code is relying on \textit{Gaia} DR2 we expect the actual completeness of Gaia EDR3 to be even higher. } \section{Conclusions} \label{sec:conclusions} We present a method to find comoving companions utilizing the \rev{early version of the third} data release of ESA's \textit{Gaia} mission. We applied this preselection algorithm to a sample of 480 K-type pre-main sequence stars presented by \citet{pecaut2016} aiming to find new (sub-)stellar companions for them. With our selection criteria we identify \rev{163} potential companions to \rev{142} members of our input catalog, including \rev{21} candidate triples systems. We could show that the sensitivity of \textit{Gaia} to detect such companion candidates improves with increasing angular separation from the target star. For our K-type stars we reach the background limit of $G\approx20$\,mag for separations larger than 10\arcsec. Utilizing age estimates from \citet{pecaut2016}, we converted the measured photometry to mass estimates of the companion candidates using BT-Settl \citep{allard2012,baraffe2015} and MIST \citep{dotter2016,choi2016} models for (sub-)stellar objects. The age and distance of our sample allows for detections of objects with masses as low as $20\,M_\mathrm{Jup}$. To corroborate the companionship status of the preselected objects we performed tests based on the available photometry and relative astrometry. Color-magnitude analysis, which was accessible for the majority of our candidate companions, is in agreement with evolutionary models of young, (sub-)stellar objects. We further compared differential projected velocities $v_\mathrm{proj}$ of each potential binary to the maximum velocity that still permits bound orbits, $v_\mathrm{max}$. Based on the posterior distributions of the calculated $v_\mathrm{proj}$ to $v_\mathrm{max}$ ratios \rev{and the statistical constraints from the stellar density around the target star} we derived likelihood \rev{estimates} of a companion to be bound, $p^\mathrm{C}$. Only \rev{27}\% from our identified companion candidates exhibited a companionship probability of less than 10\%. Instead, \rev{110} objects (\rev{67}\%) reside in the $p^\mathrm{C}>0.95$ regime, which we designate as our high confidence targets henceforth. Amongst these we found \rev{ten candidate brown dwarf companions}: \begin{itemize} \item Gaia~EDR3 5232514298301348864, $M=36.5\pm2.4\,M_\mathrm{Jup}$, \item Gaia~EDR3 6071087597497876480, $M=76.0\pm16.7\,M_\mathrm{Jup}$, \item Gaia~EDR3 5860803696599969280, $M=66.2\pm4.5\,M_\mathrm{Jup}$, \item Gaia~EDR3 6073106193460538240, $M=46.5\pm3.3\,M_\mathrm{Jup}$, \item Gaia~EDR3 6083750638540951552, $M=48.7\pm11.1\,M_\mathrm{Jup}$, \item Gaia~EDR3 6039427503765943040, $M=33.8\pm3.6\,M_\mathrm{Jup}$, \item Gaia~EDR3 5984404849554176256, $M=73.8\pm4.4\,M_\mathrm{Jup}$, \item Gaia~EDR3 6043486655875354112, $M=24.8\pm1.0\,M_\mathrm{Jup}$, \item Gaia~EDR3 6245781131640479360, $M=43.1\pm5.8\,M_\mathrm{Jup}$, \item Gaia~EDR3 6243833724749589760, $M=78.9\pm12.5\,M_\mathrm{Jup}$. \end{itemize} These \rev{ten} brown dwarf companions are suitable for future follow-up observations with ground- and space-based telescopes, aiming to understand their atmospheric architectures and dynamical histories. \rev{% For seven of the detected candidate companions we used complementary high-contrast imaging data. These were collected with the SPHERE and NACO instruments as part of YSES, a direct imaging search for sub-stellar companions around Sun-like stars \citep{bohn2020a}. The astrometry that was extracted from this near infrared data was in excellent agreement with the \textit{Gaia} measurements and confirmed the companionship of six candidates. The remaining target, 2MASS J12560830-6926539, was resolved into a visual binary that was corrupting the astrometric measurements. This system is likely to be a triple with a brown dwarf companion of about $40\,M_\mathrm{Jup}$. } Another interesting target that was observed with both instruments is TYC~8252-533-1. This solar-type star hosts a sub-stellar companion at a projected separation of 4\farcs4 that was picked up by \textit{Gaia} and could be directly imaged within the scope of our survey. Complementary data collected with SPHERE and NACO covered the spectral energy distribution of the companion from 1 to 4 microns and we derived an effective temperature of $T_\mathrm{eff}=3092^{+186}_{-91}\,K$, a surface gravity of $\log\left(g\right)=3.41^{+1.07}_{-0.31}$\,dex, a radius of $R=3.5^{+0.3}_{-0.4}\,R_\mathrm{Jup}$, and a luminosity of $\log\left(L_*/L_\sun\right)=-1.99^{+0.01}_{-0.02}$. We converted the latter parameter to an object mass by evaluation of BT-Settl isochrones at the system age of $5\pm2$\,Myr, which provided a mass of $52^{+17}_{-11}\,M_\mathrm{Jup}$. With a projected physical separation of \rev{570}\,au, this brown dwarf companion is likely to reside beyond the debris disk that is found around its host star based on an infrared excess in WISE W3 and W4 bands. As postulated for the widely separated planetary-mass companion HD~106906~b that was detected outside the circumstellar disk around its primary \citep{bailey2014}, a star-like formation pathway for TYC~8252-533-1~B is favored over planetary formation channels such core accretion or gravitational instabilities in the protoplanetary disk. \rev{ The photometric mass estimates independently derived from SPHERE and \textit{Gaia} data do also agree very well for the seven targets that were observed with both instruments. } We conclude that \textit{Gaia} can properly characterize all objects from our sample that are at lest equally bright and separated from their host stars. Nevertheless, one should treat the derived mass estimates for the remaining objects with some care, as these are based on a single photometric measurement, and that this parameter is very sensitive to the system age, which needs to be determined better in some cases. We have shown that our proposed method is a viable tool to identify comoving companions \rev{to Sco-Cen members} in \textit{Gaia} data. It \rev{should be applicable to arbitrary samples} of input stars, but some justified age and primary mass estimates are required to derive secondary masses and their companionship probability. The parameter space that is probed by this approach is highly complementary to the comparably small field of view of current high-contrast imaging instruments. To obtain a detailed understanding of the occurrence rates of giant, sub-stellar companions and their underlying formation mechanisms, it is important not to neglect this population of widely separated objects. \begin{acknowledgements} \rev{ We would like to thank the anonymous referee for the detailed feedback they provided. Their comments helped the authors to improve the quality of the manuscript. } We dedicate this article to the memory of France Allard, who passed away in October 2020. Her groundbreaking work on low-mass stars, brown dwarfs, and exoplanets strongly shaped our current understanding of their atmospheric physics; the models she (co-)developed -- that were also used in this work and that were frequently accessed by a vast number of researchers -- will remain as a crucial foundation to all future studies in this field and astronomy in general. The research of A.J.B. leading to these results has received funding from the European Research Council under ERC Starting Grant agreement 678194 (FALCONER). Part of this research was carried out at the Jet Propulsion Laboratory, California Institute of Technology, under a contract with the National Aeronautics and Space Administration (80NM0018D0004). G.C. thanks the Swiss National Science Foundation for financial support under grant number 200021\_169131. This research has used the SIMBAD database, operated at CDS, Strasbourg, France \citep{wenger2000}. This work has used 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 publication makes use of VOSA, developed under the Spanish Virtual Observatory project supported by the Spanish MINECO through grant AyA2017-84089. To achieve the scientific results presented in this article we made use of the \emph{Python} programming language\footnote{Python Software Foundation, \url{https://www.python.org/}}, especially the \emph{SciPy} \citep{virtanen2020}, \emph{NumPy} \citep{numpy}, \emph{Matplotlib} \citep{Matplotlib}, \emph{emcee} \citep{foreman-mackey2013}, \emph{scikit-image} \citep{scikit-image}, \emph{scikit-learn} \citep{scikit-learn}, \emph{photutils} \citep{photutils}, and \emph{astropy} \citep{astropy_1,astropy_2} packages. \end{acknowledgements} \bibliographystyle{aa}
\section{Introduction} If we have two combinatorial objects, $O$ and $p$, a natural question to ask is how many times does $p$ occur as part of $O$. Loosely speaking, we will refer to $p$ as the \emph{pattern}. Patterns in various combinatorial structures have been extensively studied in the past. This includes patterns in set partitions \cite{mansourBook}, trees \cite{trees}, Dyck paths \cite{dyckPaths} and permutations \cite{bonaBook,kitaev}. Many important statistics on these and other structures can be represented as linear combinations of patterns (i.e., the number of occurrences of certain patterns). Chern et al. \cite{partitions} showed that the moments (mean, variance and higher moments) of any such statistic on set partitions of $\{1,2,\ldots ,n\}$, can be written as a linear combination of shifted Bell numbers with coefficients that are polynomials in $n$. Their technique was also used for patterns in perfect matchings \cite{matchings}, in which case the moments of the corresponding statistics can be expressed as linear combinations of double factorials with constant coefficients. This is an analogous result since the total number of perfect matchings of given size is a double factorial, whereas the total number of set partitions of given size is a Bell number. In this paper, we adapt the approach of Chern et al. to permutations and obtain an analog to both of the mentioned results by showing that if a statistic on permutations of size $n$ can be written as a linear combination of bivincular patterns, then each of its higher moments can be expressed as a linear combination of shifted factorials of $n$ with constant coefficients. This generalizes the main theorem of Zeilberger in \cite{Z.I}, where he showed that each of these higher moments for the number of occurrences of any classical pattern is a polynomial in $n$ of a certain degree depending on the pattern. The same was proved for the variance of the number of occurrences of any vincular pattern \cite[Lemma 4.2]{hofer} and for an arbitrary moment of the number of classical pattern occurrences, when we sample from a conjugacy class of permutations \cite{gaetz}. The obtained result (Theorem \ref{th:main}) allows us to derive exact formulas for the moments of various permutation statistics based on data for small values of $n$. Furthermore, we give new proofs to some central limit theorems for the number of permutation pattern occurrences. \subsection{Central limit theorems for permutation patterns} Assume that the two objects $O$ and $p$ are permutations. Some constraints on $p$ give us different types of patterns in permutations: consecutive, classical, vincular and bivincular. When $p$ is fixed and $O$ is selected at random from a set of permutations of given size, then we are naturally interested in the distribution of the number of occurrences of $p$, when the size of $O$ approaches infinity. Several previous works establish asymptotic normality of this distribution for different sets of patterns in permutations selected uniformly at random. For example, see Feller \cite[3rd ed., p.257]{feller} (for inversions), Mann \cite{mann} (for descents), Fulman \cite{fulman} (for both inversions and descents), Goldstein \cite{goldstein} and Borga \cite{jacopo} (for consecutive patterns), B\'{o}na \cite{bona} (for classical patterns) and Hofer \cite{hofer} (for vincular patterns). However, the number of occurrences of some simple bivincular patterns is not normally distributed (see Section \ref{subsec:bivinc}). The recent works of Gaetz and Ryba \cite{gaetz} and Kammoun \cite{kammoun} establish normal limit laws on certain classes of permutations for classical and vincular patterns, respectively. In addition, Janson \cite{janson1,janson2} showed that the number of pattern occurrences is not normally distributed when we sample from the permutations avoiding a certain fixed pattern. Earlier, Janson, Nakamura and Zeilberger \cite{JNZ} initiated the study of the same general question. Two articles proving asymptotic normality for random permutations selected not according to the uniform measure are \cite{mallow,ferayEvans}. Finally, some important works \cite{baxter,zohar,JNZ} give central-limit theorems for certain joint-distributions of pattern occurrences. The listed articles use various approaches, from the method of moments \cite{Z_moments} to dependency graphs, Stein's method (see \cite[Section 3]{hofer} for overview of both methods) and the theory of U-statistics \cite[Chapter XI]{jansonBook}. We give a new proof of the central limit theorem (CLT) for the number of occurrences of any fixed classical pattern, first obtained by B\'{o}na \cite{bona}. In particular, we show that the lower bound for the variance of this number, which is a major part of his proof, follows from a lemma of Burstein and H\"{a}st\"{o} \cite{burstein}. We give a new simple interpretation of this lemma, which provides an intuitive explanation of why this CLT holds. We obtain a similar lemma with an analogous interpretation for the more general case of vincular patterns, which must hold since the CLT for an arbitrary vincular pattern was established by Hofer \cite{hofer}. Giving a combinatorial proof of the lemma, either in the case of classical or vincular patterns will be of great interest. Finally, we use a formula for the $r$-th moment of the minimal descent statistic that we obtain with the adapted approach of Chern et al., to give a new direct proof of the fact that we do not necessarily have asymptotic normality in the case of bivincular patterns. In particular, we show that the minimal descent statistic, which counts the number of occurrences of a simple bivincular pattern, has Poisson distribution. The most recent proof of this fact was given by Corteel et al. \cite{corteel}. \subsection{Summary of the paper} \label{subsec:summary} The structure of the paper is as follows. In Sections \ref{sec:defs}, \ref{sec:aggr} and \ref{sec:hMoments} we adapt the definitions and tools developed in \cite{partitions, matchings} to permutations. Our main result, giving a closed form for the higher moments of a large class of permutation statistics, is Theorem \ref{th:main}. In Section \ref{sec:descents}, we demonstrate how one can use an important Corollary of our main result to obtain explicit formulas for any given higher moment of some simple permutation statistics, e.g., descents and minimal descents. Section \ref{sec:classical} contains the new proof of the CLT for the number of occurrences of classical patterns and Section \ref{sec:vincular} discusses how one can use the same approach to obtain a proof of the CLT in the more general case of vincular patterns. In Section \ref{subsec:bivinc}, we use one of the two formulas, obtained in Section \ref{sec:descents} to show that there are simple bivincular patterns whose number of occurrences does not have asymptotically normal distribution. Finally, in Section \ref{sec:lin_val_polynomials}, we give explicit formulas for the aggregates (resp., for the moments) of some permutation statistics in certain special cases, where a linearity of expectation arguments are directly applicable. \section{Definitions and examples} \label{sec:defs} Let $S_{n}$ be the set of all permutations of $[n]\coloneqq \{1,2, \ldots , n\}$, that is, the set of all bijections from $[n]$ to $[n]$. We will write any permutation $\pi$ using the one-line notation $\pi = \pi_{1}\pi_{2} \ldots \pi_{n}$, where $\pi(i)=\pi_{i}$ for all $i\in [n]$. Let $A(\pi)$ be the set of distinct pairs of integers $(u,v)$, such that $u$ occurs before $v$ in $\pi$. Formally, $A(\pi) \coloneqq \{(u,v)\mid u = \pi_{i}, v = \pi_{j},i<j\}$. To define statistics on permutations, we need the following definition of pattern, which is an analogue of those in \cite{partitions} for set partitions and \cite{matchings} for matchings. \begin{definition} \label{def:pattern} \leavevmode \begin{enumerate} \item[(i)] A \emph{permutation pattern} $\underline{P}$ of length $k$ is a tuple $\underline{P} = (P,\boldsymbol{C}(\underline{P}),\boldsymbol{D}(\underline{P}))$, where $P = p_{1}\cdots p_{k}$ is a permutation of length $k$ and $\boldsymbol{C}(\underline{P})\subseteq [k-1]$, $\boldsymbol{D}(\underline{P})\subseteq [k-1]$ are two subsets. \item[(ii)] An \emph{occurrence} of the pattern $\underline{P}=(p_1p_2\cdots p_k,\boldsymbol{C}(\underline{P}), \boldsymbol{D}(\underline{P}))$ of length $k$ in $\sigma \in S_{n}$ is a tuple $s = (t_{1},t_{2}, \ldots , t_{k})$ with $t_{i} \in [n]$, such that: \begin{itemize} \item[a)] $t_1<t_2<\cdots<t_{k}$. \item[b)] $(t_{i},t_{j})\in A(\sigma)$, if and only if $(i,j)\in A(P)$. \item[c)] if $i\in \boldsymbol{C}(\underline{P})$, then $\sigma^{-1}(t_{p_{i+1}}) = \sigma^{-1}(t_{p_i})+1$, i.e., the positions of $t_{p_i}$ and $t_{p_{i+1}}$ in $\sigma$ are consecutive. \item[d)] if $i\in \boldsymbol{D}(\underline{P})$, then $t_{i+1} = t_{i}+ 1$, i.e., the values of $t_{i}$ and $t_{i+1}$ in $\sigma$ are consecutive. \end{itemize} \end{enumerate} \end{definition} Definition \ref{def:pattern} is equivalent to the definition of the so-called \emph{bivincular} patterns in permutations introduced by Bousquet-M\' elou et al. \cite {bivincular}. When $\boldsymbol{D}(\underline{P})= \emptyset$, then $\underline{P}$ is one of the \emph{vincular} patterns introduced by Babson and Steingr\' imsson \cite{babson}. When both $\boldsymbol{C}(\underline{P})= \emptyset$ and $\boldsymbol{D}(\underline{P})= \emptyset$, then $\underline{P}$ is a \emph{classical} pattern. For simplicity, when we have a classical pattern $\underline{P}$, we will refer to it just by writing the permutation $P$. For example, the classical pattern $\underline{P} = (132,\emptyset,\emptyset)$ will be denoted by $132$. When we have a vincular pattern, we will write $P$ with the positions $i$ and $i+1$ of $P$ being underlined for every $i\in\boldsymbol{C}(\underline{P})$. By that, we will indicate that these two numbers must be at consecutive positions in every occurrence of the pattern. For example, the vincular pattern $\underline{P} = (2314,\{2\},\emptyset)$ will be written as $2\underline{31}4$. When $\boldsymbol{D}(\underline{P})$ is non-empty, then we will use the two-line notation when referring to $\underline{P}$: if $P\in S_{k}$, the identity $id_{k}=12\cdots k$ will be on the top row with the numbers $j$ and $j+1$ of $id_{k}$ being overlined, for every $j\in\boldsymbol{D}(\underline{P})$. By that, we will indicate that the values of $t_{j}$ and $t_{j+1}$ must be consecutive in every occurrence $(t_{1}, \ldots , t_{k})$ of the pattern. On the bottom row, we will have the vincular pattern $\underline{P'} = (P,\boldsymbol{C}(\underline{P}),\emptyset)$ written in the usual one-line notation. For example, the bivincular pattern $\underline{P} = (43125,\{3\},\{1,4\})$ will be written as $\Vectorstack{\overline{12}3\overline{45} 43\underline{12}5}$. We will write $s\in_{\underline{P}}\sigma$ if $s$ is an occurrence of $\underline{P}$ in $\sigma$. Throughout the paper, we will need the following definition. \begin{definition} Let $q=q_{1}\cdots q_{k}$ be a sequence of $k$ different numbers. The \emph{reduction} of $q$, denoted by $\red(q)$, is the unique permutation $\pi = \pi_{1}\cdots\pi_{k}\in S_{k}$, such that its elements are in the same relative order as the elements of $q$, i.e., $\pi_{i}<\pi_{j}$ if and only if $q_{i}<q_{j}$, for all $i,j\in [k]$. The permutation $\red(q)$ can be obtained by replacing the $i$-th smallest element of $q$ with $i$, for every $i\in [k]$. \end{definition} For example, $\red(523)=312$. Note that condition $(b)$ in the second part of Definition \ref{def:pattern} implies that if $s\in_{\underline{P}}\sigma$ and the elements of $s$ form the subsequence $q$ of $\sigma$, then $\red(q)=P$, i.e., the relative order of the numbers of the permutation $P$ and the numbers of $s$ in $\sigma$ is the same. \leavevmode \newline \textbf{Examples (occurrence of patterns):} \leavevmode \begin{itemize} \item[1.] $(t_1,t_2,t_3)=(3,4,5)$ is an occurrence of $132 = (132,\emptyset,\emptyset)$ in $\sigma = 31524$, since $\red(354)=132$. \item[2.] $(t_{1},t_{2},t_{3},t_{4})=(2,3,5,7)$ is an occurrence of $\underline{32}14 = (3214,\{1\},\emptyset)$ in $\sigma = 4536217$ since $\red(5327)=3214$ and the positions of $t_{p_{1}}=t_{3}=5$ and $t_{p_{2}}=t_{2}=3$ in $\sigma$ are consecutive. \item[3.] $(t_{1},t_{2},t_{3},t_{4})=(1,3,5,6)$ is an occurrence of $\scaleto{\Vectorstack{12\overline{34} 4\underline{31}2}}{25pt} = (4312,\{2\},\{3\})$ in $\sigma = 625143$ since $\red(6513)=4312$, the positions of $t_{p_{2}}=t_{3}=5$ and $t_{p_{3}}=t_{1}=1$ in $\sigma$ are consecutive and the values of $t_{3}=5$ and $t_{4}=6$ in $\sigma$ are consecutive. \end{itemize} The number of occurrences of the pattern $\underline{P}$ in $\sigma$ will be denoted by $\cnt_{\underline{P}}(\sigma)$. In the literature, usually a \emph{permutation statistic} is a function $T:S\to \mathbb{N}$, where $S=\bigcup_{i=1}^{\infty} S_{n}$. In this paper, when we write $\emph{statistic}$ or $\emph{simple statistic}$, we will refer to two classes of such functions defined below. \begin{definition} \leavevmode \begin{itemize} \item[(i)] A simple statistic is defined by a pattern $\underline{P}$ of length $k$ and a valuation function $Q(s,w)=Q_1(s)Q_2(w)$, which is a product of two polynomials $Q_1, Q_2\in\mathbb{Z}[y_{1},\ldots ,y_{k},m]$. If $\sigma\in S_n$ and $s = (t_{1},t_{2}, \ldots , t_{k}) \in_{\underline{P}}\sigma$, such that $\sigma(w_i)=t_i$, for all $i \in [k]$, then write $Q(s,\sigma^{-1}(s)) = Q_1(s)Q_2(\sigma^{-1}(s)) = Q_1\mid_{y_{i} = t_{i},m=n} Q_2\mid_{y_{i} = w_{i},m=n}$. Let \begin{equation*} f(\sigma) = f_{\underline{P},Q}(\sigma)\coloneqq \sum_{{s\in_{\underline{P}}\sigma} }Q(s,\sigma^{-1}(s)) = \sum_{{s\in_{\underline{P}}\sigma} }Q_1(s)Q_2(\sigma^{-1}(s)). \end{equation*} \noindent Let the degree of a simple statistic $f_{\underline{P},Q}$, denoted $d(f)$, be the sum of twice the length of $P$ and the degree of $Q$, which is the sum of the degrees of $Q_1$ and $Q_2$. \item[(ii)] A \emph{statistic} is a finite $Q$-linear combination of simple statistics. The degree of a statistic is defined to be the minimum, over all such representations, of the maximum degree of any of the included simple statistics. \end{itemize} \end{definition} \textbf{Examples.} \begin{itemize} \item[] $\cnt_{\underline{P}}\coloneqq f_{\underline{P},1}(\sigma)=\sum_{s\in_{\underline{P}}\sigma}1$, which counts the number of occurrences of the pattern $\underline{P}$ in $\sigma$, is a simple statistic for any pattern $\underline{P} = (P,\boldsymbol{C}(\underline{P}),\boldsymbol{D}(\underline{P}))$, with valuation function $Q=1$. If $P$ is of length $k$, then the degree of the statistic is $d(\cnt_{\underline{P}}) = 2k$. The first three examples we give below are of this kind, for $\underline{P}$ being classical, vincular and bivincular pattern (for which $\boldsymbol{C}(\underline{P}) \neq \emptyset$ and $\boldsymbol{D}(\underline{P}) \neq \emptyset$), respectively. \\ \item[1.] \emph{Number of occurrences of $1324$.} $$\cnt_{1324}(\sigma)=f_{1324,1}(\sigma) = \sum_{{s\in_{1324}\sigma} }1$$ is the number of occurrences of the classical pattern $(1324,\emptyset,\emptyset)=1324$ in $\sigma$. This is the only classical pattern of length less than five for which the sequence of the number of permutations avoiding it, for different values of $n$, has not been enumerated yet. Two recent works related to this problem are \cite{bevan1324,mansour1324}. \item[2.] \emph{Number of double ascents}. \begin{equation*} \cnt_{\underline{123}}(\sigma) = \sum_{{s\in_{\underline{123}}\sigma} }1 \end{equation*} is the number of occurrences of the vincular pattern $(123,\{1,2\},\emptyset)=\underline{123}$ in $\sigma$. The vincular patterns for which $\boldsymbol{C}(\underline{P})=[k-1]$ are called \emph{consecutive}. The generating function and the distribution of this statistic, as well as of $\cnt_{\underline{P}}$ for other vincular patterns of this kind were investigated in \cite{elizaldeNoy}. \item[3.] \emph{Number of occurrences of $\scaleto{\Vectorstack{1\overline{23} 3\underline{12}}}{25pt}$}. \begin{equation*} \cnt_{\scaleto{\Vectorstack{1\overline{23} 3\underline{12}}}{16pt}}(\sigma) = \sum_{{s\in_{\scaleto{\Vectorstack{1\overline{23} 3\underline{12}}}{11pt}}\sigma} }1 \end{equation*} is the number of occurrences of the bivincular pattern $(312,\{2\},\{2\})$ in $\sigma$. It was shown in \cite{eriksen} that the number of permutations in $S_n$ with $k$ occurrences of this pattern is equal to the number of matchings on $[2n]$ with $k$ right nestings and no left nestings. \item[4.] \emph{Descent drop}. \begin{equation*} \drops(\sigma) = \sum\limits_{\sigma_{i}>\sigma_{i+1}} \sigma_{i}-\sigma_{i+1} = \sum_{(t_{1},t_{2})\in_{\underline{21}}\sigma} t_{2}-t_{1} \end{equation*} is a simple statistic corresponding to the pattern $(21,\{1\},\emptyset)$ with valuation function $Q(s,w)=Q_{1}(s)Q_{2}(w)$, where $Q_{1}(s)=Q_{1}(t_{1},t_{2})=t_{2}-t_{1}$ and $Q_{2}(w)=1$. Thus, $deg(Q)=1$ and $d(\drops)=5$. Petersen and Tenner \cite{bridget} showed that this statistic is equidistributed with the statistic $dp(\sigma) = \sum_{\sigma(i)>i}\sigma(i)-i$, which they call \say{depth}. The depth of a permutation is half of another important statistic called \say{total displacement} or \say{Spearman's disarray}, whose generating function was found in \cite{petersonGF}. \item[5.] \emph{Sum of peak squares}. \begin{equation*} \peakSqSum(\sigma) = \sum_{\sigma(i-1)<\sigma(i)>\sigma(i+1)}\sigma(i)^{2}= \sum_{(t_{1},t_{2},t_{3})\in_{\underline{132}}\sigma} t_{3}^{2} + \sum_{(t_{1},t_{2},t_{3})\in_{\underline{231}}\sigma} t_{3}^{2} \end{equation*} is a statistic, which is a sum of the two simple statistics $f_{1} = f_{\underline{132},t_{3}^{2}}$ and $f_{2}= f_{\underline{231},t_{3}^{2}}$. Thus, $d(\peakSqSum)=max(d(f_{1}),d(f_{2})) = 8$. Two articles investigating the number of interior peaks and the number of permutations with a given set of peak values, called \say{pinnacle set}, are \cite{peaks} and \cite{bridget2}, respectively. To the best of our knowledge, the sum of the peaks and the sum of the squares of the peaks have not been yet investigated, despite of the recent interest in pinnacle sets \cite{lopez,sagan, rusu}. \end{itemize} In the next two sections, we will show that the moments of all statistics are also statistics, as defined above, and we will give closed forms for one of these moments for each of the statistics above. \section{Aggregates of permutation statistics} \label{sec:aggr} We are often interested in the expected value $\mathbb{E}(f)$ of the permutation statistic $f$, for a permutation chosen uniformly at random from $S_{n}$. Obviously, we have $\mathbb{E}(f) = M(f,n)/n!$, where \[ M(f,n)\coloneqq\sum_{\sigma\in S_{n}}f(\sigma). \] In this section, we show that the aggregate $M(f,n)$ is a linear combination of factorials with constant coefficients. This is an analogue of the results in \cite{partitions} for aggregates of set partition statistics and those in \cite{matchings} for aggregates of statistics on matchings. To deal with the constraints caused by $\boldsymbol{C}(\uP)$ and $\boldsymbol{D}(\uP)$, we use the same technique to compress numbers used in both of these articles. \begin{theorem} \label{th:simpleStat} Let $f_{\uP, Q}$ be a simple statistic of degree $m$ associated with the pattern $\uP$ of length $k$ and the valuation polynomial $Q(s,w)=Q_1(s)Q_2(w)$. Assume that $c=|\boldsymbol{C}(\uP)|$ and $d=|\boldsymbol{D}(\uP)|$. Then \begin{eqnarray} \label{polynomial-form-exten} M(f_{\uP, Q}, n) = R(n) (n-k)! \end{eqnarray} where $R(x)$ is a polynomial of degree no more than $m-c-d$. Equivalently for $n \geq k$, $M(f,n)$ can be expressed as a linear combination of shifted factorials with constant coefficients, i.e., \begin{eqnarray} \label{T-ext-form} M(f_{\uP, Q}, n) = \left\{ \begin{array}{ll} 0 & n < k \\ \displaystyle \sum_{i= 0 }^{m-c-d} c_i (n-k+i)! & n \geq k \end{array} \right. , \end{eqnarray} for some constants $c_i \in \mathbb{Q}$. \end{theorem} \begin{proof} Let $V_{n,k}:=\{(t_1,t_2,\cdots,t_k)\in [n]^k \mid 1\leq t_1<t_2<\cdots<t_k\leq n\}$ be the set of increasing vectors of $k$ numbers in $[n]$. For simplicity, fix $n$ and $k$ and let $T\coloneqq V_{n,k}$. Note that if $s\in_{\underline{P}} \sigma$ for some $\sigma \in S_n$, then $s\in T$. Let us also define $W:=\{(w_1,w_2,\ldots,w_k)\in [n]^k \mid \text{for all }i,j \in [k],\text{ if }w_i = w_j, \text{then }i=j\}$. Note that $|T| = \binom{n}{k}$ and $|W| = n(n-1)\cdots (n-k+1)$. We have \begin{eqnarray*} M(f_{\uP, Q}, n) = \sum_{\sigma \in {S}_{n}} f_{\uP, Q}(\sigma) & = & \sum_{\sigma \in {S}_{n}} \sum_{s \in_{\uP} \sigma} Q_1(s)Q_2(\sigma^{-1}(s)) \\ & = & \sum_{s \in T}\sum_{\substack{{\sigma \in S_n}\\{s \in_{\uP}\sigma}}}Q_1(s)Q_2(\sigma^{-1}(s))= \sum_{s \in T}Q_1(s)\sum_{\substack{{\sigma \in S_n}\\{s \in_{\uP}\sigma}}}Q_2(\sigma^{-1}(s)). \end{eqnarray*} For any $s \in T$, let $G(s):=\{\sigma \in S_n \mid s\in_{\uP} \sigma\}$ and for any $w\in W$, let $H(w):=\{\sigma \in S_n \mid (t_{1},\ldots ,t_{k})\in_{\uP} \sigma,\text{ where } \sigma^{-1}(t_i)=w_i \text{, for all } i\in [k]\}$. In addition, for any $s\in T$ and $w\in W$, let $Z(s,w):=\{\sigma \in S_n \mid s=(t_{1},\ldots ,t_{k})\in_{\uP} \sigma,\text{ } \sigma^{-1}(t_i)=w_i \text{ for all } i\in [k]\}$. Clearly, for any $s\in T$ and $w, w' \in W$ for which $w\neq w'$, we have $Z(s,w)\cap Z(s,w')=\emptyset$. Also, note that $G(s)=\cup_{w\in W}Z(s,w) $. Hence, we can rewrite the above equations in the following way: \begin{eqnarray*} M(f_{\uP, Q}, n) & = & \sum_{s \in T}Q_1(s)\sum_{\substack{{\sigma \in S_n}\\{s \in_{\uP}\sigma}}}Q_2(\sigma^{-1}(s)) = \sum_{s \in T}Q_1(s)\sum_{\sigma \in G(s)}Q_2(\sigma^{-1}(s))\\ & = & \sum_{s \in T}Q_1(s)\sum_{\sigma \in \cup_{w\in W}Z(s,w)}Q_2(w) = \sum_{s \in T}Q_1(s)\left(\sum_{w\in W}Q_2(w)\sum_{\sigma \in Z(s,w)}1\right)\\ \end{eqnarray*} Consider any fixed vector of values $s\in T$ and a vector of positions $w\in W$. If $Z(s,w)\neq \emptyset$, then $|Z(s,w)|=(n-k)!$ since the remaining $n-k$ values, except those in $s$, can be arranged in all the possible ways at the remaining $n-k$ positions, which are not in $w$. Furthermore, if we define $T' \coloneqq \{s\in T \mid G(s)\neq \emptyset\}$ and $W' \coloneqq \{w\in W \mid H(w)\neq \emptyset\}$, then observe that the values in any $s\in T'$ can be at the positions determined by any $w\in W'$ and vice versa. In other words, $Z(s,w)\neq \emptyset$, if and only if $s\in T'$ and $w\in W'$. Therefore, \begin{eqnarray*} M(f_{\uP, Q}, n) &=& \sum_{s \in T}Q_1(s)\left(\sum_{w\in W}Q_2(w)\sum_{\sigma \in Z(s,w)}1\right)\\ &=& (n-k)! \left(\sum_{s \in T'}Q_1(s)\right)\left(\sum_{w\in W'}Q_2(w)\right). \end{eqnarray*} Consider $s \in T$ and $w \in W$, such that $Z(s,w)\neq \emptyset$. Now, we will use the compression technique, which relies on the following observation: Since $|D(\underline{P})|=d$, every subset of $[n-d]$ of $k-d$ different numbers corresponds to a set of values $s\in T'$ and the correspondence is one-to-one. Formally, let us call $i+1$ a \emph{follower}, if $i \in\boldsymbol{D}(\underline{P})$ and a \emph{non-follower}, if $i \notin\boldsymbol{D}(\underline{P})$. If $g(i)\in [k]$ denotes the index of the $i$-th non-follower, then let $y_i\coloneqq t_{g(i)}-(g(i)-i)$. Then, the vector $s\in T'$ determines uniquely the vector $(y_1, \ldots, y_{k-d})$ and one can see that $y_{u}<y_{v}$, if $u<v$. Indeed, it suffices to show this for $v=u+1$. In this case we have $y_{u+1}=t_{g(u+1)}-(g(u+1)-(u+1))>t_{g(u+1)-1}-(g(u+1)-(u+1))$, but we must have that $t_{g(u+1)-1}=t_{g(u)}+(g(u+1)-g(u)-1)$, because all the numbers between $g(u)$ and $g(u+1)$ are followers. Thus, $y_{u+1}>t_{g(u)}+(g(u+1)-g(u)-1)-(g(u+1)-(u+1)) = t_{g(u)}-(g(u)-u) = y_{u}$. Conversely, for any $(y_1, \ldots, y_{k-d})\in V_{n-d,k-d}$, the vector $(t_1, \ldots, t_k)$ is uniquely determined, since $t_{j}=y_i+j-i$, where $j$ is the index of the $i$-th non-follower and $t_{j}=t_{j-1}+1$, if $j$ is an index of a follower. Thus $Q_1$ can be viewed as a polynomial in $y_1, \ldots, y_{k-d}$ and $n$. We can proceed in the same way for $W'$ and $\boldsymbol{C}(\underline{P})$. The only difference is that the elements of any $w\in W'$ are not necessarily in increasing order. However, the elements of $\overline{w} = (w_{P^{-1}}(1),\ldots ,w_{P^{-1}}(k))$ are always in increasing order and the map $w\mapsto\overline{w}$ is a bijection. Thus, using this map, we can get a set $W''\subseteq W$, such that there is a bijection between $W'$ and $W''$ and a bijection between $W''$ and $V_{n-c,k-c}$ (by the compression technique). Hence there is a bijection between $W'$ and $V_{n-c,k-c}$ and $Q_2$ can be viewed as a polynomial in $x_1, \ldots, x_{k-c}$ and $n$, where $(x_1, \ldots, x_{k-c})\in V_{n-c,k-c}$. Therefore, we have \begin{eqnarray*} \label{tildeQ} M(f_{\uP, Q}, n)=(n-k)!\sum_{\scaleto{(y_1, \ldots, y_{k-d})\in V_{n{-}d,k{-}d}}{7.5pt}} \tilde{Q_1}(y_1, \ldots, y_{k-d}, n) \sum_{\scaleto{(x_1, \ldots, x_{k-c})\in V_{n{-}c,k{-}c}}{7.5pt}} \tilde{Q_2}(x_1, \ldots, x_{k-c}, n) \end{eqnarray*} for some polynomials $\tilde{Q_1}$ and $\tilde{Q_2}$ of the same degree as $Q_1$ and $Q_2$, respectively. The product of the two sums above yields a polynomial in $n$ of degree at most the sum of the following two terms: the maximum possible degree of $n$ in the product $\binom{n-d}{k-d} \tilde{Q_1}$ and the maximum possible degree of $n$ in the product $\binom{n-c}{k-c} \tilde{Q_2}$. Therefore, the degree of the product is at most $k-d+deg(Q_1)+k-c+deg(Q_2)=(deg(Q_1)+deg(Q_2)+2k)-c-d = m-c-d$, since $m=d(f_{\underline{P},Q}) = (deg(Q_1)+deg(Q_2)+2k)$. To see Equation \eqref{T-ext-form}, let $g_i(n)$ be a polynomial in $n$ defined by $g_i(n) = {(n-k+i)!} / (n-k)!$. Then $g_i$ is of degree $i$, and hence $\{ g_i(n)\}_{i=0}^\infty $ form a basis of $\mathbb{Q}[n]$. It follows that any polynomial of degree $i$ can be written as a linear combination of $g_0(n), \dots, g_{i}(n)$. This implies Equation \eqref{T-ext-form}. \end{proof} Next, we consider any general statistic. Recall that a statistic is a $\mathbb{Q}$-linear combination of simple statistics. \begin{theorem} \label{general-sum} For any statistic $f$ of degree $m$, there is a positive integer $L \leq \frac{m}{2}$, such that for all $n \geq L$, \begin{eqnarray} \label{eq:statPolyForm} M(f, n)= U(n) (n-L)!, \end{eqnarray} where $U(n)$ is a polynomial of degree no more than $m+L$. Equivalently, if $n \geq L $, \begin{eqnarray} \label{T-form2} M(f, n)= \sum_{-L\leq i \leq m} \alpha{_i} (n+i)!, \end{eqnarray} for some constants $\alpha{_i} \in \mathbb{Q}$. \end{theorem} \begin{proof} Assume that \[ f=\sum_{i=1}^t h_i f_{\uP_i, Q_i}, \] with $h_i \in \mathbb{Q}$. Then, by Theorem \ref{th:simpleStat}, \[ M(f, n) = \sum_{i=1}^t h_i M( f_{\uP_i, Q_i}, n) = \sum_{i=1}^t h_i R_i (n) (n-k_i)!, \] where $k_i$ is the length of $\underline{P_i}$ and the degree of $R_i(n)$ is no more than $deg(f_{\uP_i, Q_i})-d_i -c_i\leq m$, where $c_i=|\boldsymbol{C}(\underline{P_i})|$ and $d_i=|\boldsymbol{D}(\underline{P_i})|$. Combining the terms with the same $(n-k_i)!$ yields the equation \[ M(f, n)= \sum_{j=0}^L U_j(n) (n-j)!, \] where $U_j(n)$ is a polynomial of degree no more than $m$, and $L= \max(k_i) \leq \frac{m}{2}$. As $\frac{(n-L+i)!}{(n-L)!}=(n-L+i)(n-L+(i-1))\cdots(n-L+1)$ is polynomial in $n$ of degree $i$, we obtain Equation \eqref{eq:statPolyForm} for $n \geq L$. In addition, $\frac{(n-L+i)!}{(n-L)!}$ for $0 \leq i\leq L+m$ forms a basis and Equation \eqref{T-form2} is obtained by expanding $U(n)$ under the basis $\{1, \frac{(n-L+1)!}{(n-L)!}, \frac{(n-L+2)!}{(n-L)!},\cdots, \frac{(n-L+L+m)!}{(n-L)!}\}$. \end{proof} Theorem \ref{general-sum} allow us to obtain a closed form expression for $M(f,n)$ (and respectively for $\mathbb{E}(f)$), for any statistic $f$ whenever we know the exact values of $M(f,n)$ for a set of $L+m+1$ values of $n \geq L$, where $m=d(f)$. Then, we can take Equation \eqref{T-form2} and substitute each of these values for $n$. We get a system of $L+m+1$ linear equations, where the variables are the numbers $\alpha_{i}$, for $i\in [-L,m]$. After we solve it, we have a closed form expression for $M(f,n)$ as a linear combination of shifted factorials, coming from the same Equation \eqref{T-form2}. We used this approach and implemented a computer program, in order to obtain these closed forms for the aggregates of the statistics given as examples in Section \ref{sec:aggr}. Some of the results are listed below. \\ \textbf{Examples (formulas for aggregates of statistics):}\\ \begin{itemize} \item[1.] $\cnt_{1324}$.\\ Recall that for the simple statistic $\cnt_{1324}=f_{\underline{P},Q}$, $\underline{P}=(1324,\emptyset,\emptyset)$ and $Q=1$. We have \begin{equation*} M(\cnt_{1324},n)=\frac{1}{24}n!-\frac{1}{6}(n+1)!+\frac{1}{8}(n+2)!-\frac{1}{36}(n+3)! + \frac{1}{576}(n+4)!. \end{equation*} In fact, a simple linearity of expectation argument gives that $M(\cnt_{P},n)= \frac{1}{k!}\binom{n}{k}n!$ for the number of occurrences of any classical pattern $P$ of length $k$. By using that the so-called Lah numbers, $L(k,j) = \binom{k-1}{j-1}\frac{k!}{j!}$, are the coefficients expressing rising factorials in terms of falling factorials, one can show that \begin{equation*} M(\cnt_{P},n) = \frac{1}{k!}\binom{n}{k}n! = \frac{(-1)^{k}}{k!}n! + \sum\limits_{j=1}^{k-1}\frac{(-1)^{k-j}}{(j!)^{2}(k-j)!}(n+j)! + \frac{1}{(k!)^{2}}(n+k)!. \end{equation*} Such a general formula can be derived for an arbitrary bivincular pattern. \\ \item[2.] \emph{Descent drop}.\\ Recall that for the simple statistic $\drops=f_{\underline{P},Q}$, $\underline{P}=(21,\{1\},\emptyset)$ and $Q(s,w)=Q_{1}(s)Q_{2}(w)$, where $Q_{1}(s)=Q_{1}(t_{1},t_{2})=t_{2}-t_{1}$ and $Q_{2}(w)=1$. We have \begin{equation*} M(\drops,n)=-\frac{1}{2}(n+1)!+\frac{1}{6}(n+2)!. \end{equation*} \item[3.] \emph{Sum of peak squares}.\\ Recall that the statistic $\peakSqSum$ is a sum of the two simple statistics corresponding to the patterns $\underline{P}=(132,\{1,2\},\emptyset)$ and $\underline{P}=(231,\{1,2\},\emptyset)$, where the valuation polynomials for both statistics are $Q(s,w)=Q_{1}(s)Q_{2}(w)$ with $Q_{1}(s)=Q_{1}(t_{1},t_{2},t_{3})=t_{3}^{2}$ and $Q_{2}(w)=1$. We have \begin{equation*} M(\peakSqSum,n)=(n+1)!-\frac{5}{4}(n+2)!+\frac{1}{5}(n+3)!. \end{equation*} \end{itemize} \section{Higher moments of simple statistics} \label{sec:hMoments} Our next goal is to show that the higher moments of statistics are also statistics. In order to investigate the higher moments, we will need to look at ordered tuples of occurrence of a given pattern. To do that, we will first define a \emph{merge} of two patterns, as done originally in \cite{partitions} for set partitions. In the definition given below, $g(S)\coloneqq \{g(x) \mid x\in S\}$, where $g$ is a function and $S$ is a set. \begin{definition}[Merge of patterns]\label{def-merge} Given are three patterns $\underline{P_1} = (x,\boldsymbol{C}(\underline{P_1}),\boldsymbol{D}(\underline{P_1}))$,\\ $\underline{P_2} = (y,\boldsymbol{C}(\underline{P_2}),\boldsymbol{D}(\underline{P_2}))$ and $\underline{P_3} = (z,\boldsymbol{C}(\underline{P_3}),\boldsymbol{D}(\underline{P_3}))$ of sizes $k_{1},k_{2}$ and $k_{3}$, respectively. A \emph{merge} of $\underline{P_1}$ and $\underline{P_2}$ onto $\underline{P_3}$ is a pair of increasing functions $m_{1}\mathbin{:} [k_{1}]\to [k_{3}]$ and $m_{2}\mathbin{:} [k_{2}]\to [k_{3}]$, such that \begin{enumerate} \item $m_1([k_1])\cup m_2([k_2])= [k_3]$. \item for every $i,j\in[k_1]$, $(m_1(i),m_1(j))\in A(z)$ if and only if $(i,j)\in A(x)$ and for every $i,j\in[k_2]$, $(m_2(i),m_2(j))\in A(z)$ if and only if $(i,j)\in A(y)$. \item for every $j \in \boldsymbol{C}(\underline{P_1})$, $z^{-1}(m_{1}(x_{j+1})) = z^{-1}(m_{1}(x_{j}))+1$ and for every $j \in \boldsymbol{C}(\underline{P_2})$, $z^{-1}(m_{2}(y_{j+1})) = z^{-1}(m_{2}(y_{j}))+1$. In addition, \[ \boldsymbol{C}(\underline{P_3}) = \{z^{-1}(m_{1}(x_{j}))\mid j \in \boldsymbol{C}(\underline{P_1})\}\cup \{z^{-1}(m_{2}(y_{j}))\mid j \in \boldsymbol{C}(\underline{P_2})\}. \] \item for every $j \in \boldsymbol{D}(\underline{P_1})$, $m_{1}(j+1) = m_{1}(j)+1$ and for every $j \in \boldsymbol{D}(\underline{P_2})$, $m_2(j+1)=m_2(j)+1$. In addition, \[ \boldsymbol{D}(\underline{P_3}) = \{m_1(j)\mid j\in \boldsymbol{D}(\underline{P_1})\} \cup \{m_2(j)\mid j\in \boldsymbol{D}(\underline{P_2}) \}. \] \end{enumerate} A merge will be denoted by $m_1, m_2\mathbin{:} \underline{P_1}, \underline{P_2}\rightarrow \underline{P_3}$. \end{definition} \begin{example} \leavevmode \newline Let $\underline{P_1}=(132,\{1\},\{2\})$, $\underline{P_2}=(21,\emptyset,\emptyset)$ and $\underline{P_3}=(2143,\{2\},\{3\})$.\\ Define the increasing functions $m_1$ and $m_2$ as follows: \\ $m_{1}(1) = 1$, $m_{1}(2) = 3$, $m_{1}(3) = 4$ \\ $m_{2}(1) = 1$, $m_{1}(2) = 2$ \end{example} Note that for a merge, the pattern $\underline{P_{3}}$ is not uniquely defined by the functions $m_1$,$m_2$ and the patterns $\underline{P_1}$, $\underline{P_2}$. For instance, assume that $\underline{P_1}=321$, $\underline{P_2}=21$ and $m_{1}(1) = 1$, $m_{1}(2) = 2$, $m_{1}(3) = 4$, $m_{2}(1) = 3$, $m_{1}(2) = 4$. Then, $\underline{P_3}$ can be $4321$, $4231$ or $4213$. \begin{lemma}\label{lemma:higherMoments} Let $\underline{P_1}$ and $\underline{P_2}$ be two patterns. For any $ \sigma \in S_n$, there is a one-to-one correspondence between the following sets. $$\{(s_1,s_2)\mathbin{:} s_1 \in_{\underline{P_{1}}} \sigma,s_2 \in_{\underline{P_{2}}} \sigma\}\leftrightarrow \{s_3 \in_{P_3} \sigma \mid m_1,m_2 \mathbin{:}\underline{P_1},\underline{P_2} \rightarrow \underline{P_3}\}$$. \end{lemma} \vspace{-1cm} \begin{proof} Let $\underline{P_{1}}=(x,C(\underline{P_{1}}),D(\underline{P_{1}}))$ and $\underline{P_{2}}=(y,C(\underline{P_{2}}),D(\underline{P_{2}}))$. $( \Longrightarrow )$ Assume that $s_{1}\in_{\underline{P_{1}}}$ and $s_{2}\in_{\underline{P_{2}}}$. Take the union of the elements of $s_1$ and $s_2$ and sort the elements of this union in increasing order. Let $s_{3}$ be the resulting increasing vector of numbers in $[n]$. As in the case of matchings and partitions, the maps $m_{a}$, for $a=1,2$, must be given by the unique function so that $m_{a}(i)=j$ if and only if the $i$-th smallest element of $s_{a}$ equals the $j$-th smallest element of $s_{3}$. If the elements of $s_{3}$ form the subsequence $\sigma_{i_{1}}\ldots \sigma_{i_{k_{3}}}$ in $\sigma$, then let $z = \red(\sigma_{i_{1}}\ldots \sigma_{i_{k_{3}}})$ and let $\underline{P_{3}} = (z,\boldsymbol{C}(\underline{P_{3}}),\boldsymbol{D}(\underline{P_{3}}))$, where $\boldsymbol{C}(\underline{P_3}) = \{z^{-1}(m_{1}(x_{j}))\mid j \in \boldsymbol{C}(\underline{P_1})\}\cup \{z^{-1}(m_{2}(y_{j}))\mid j \in \boldsymbol{C}(\underline{P_2})\}$ and $\boldsymbol{D}(\underline{P_3}) = \{m_1(j)\mid j\in \boldsymbol{D}(\underline{P_1})\} \cup \{m_2(j)\mid j\in \boldsymbol{D}(\underline{P_2}) \}$. We will show that $m_1,m_2 \mathbin{:}P_1,P_2 \rightarrow P_3$. One can easily verify that conditions (1) and (2) of Definition \ref{def-merge} hold. It remains to show that conditions (3) and (4) of the same definition also hold. We will do this just for $C(\underline{P_1})$ and $D(\underline{P_1})$ since one can proceed in the same way for $C(\underline{P_2})$ and $D(\underline{P_2})$. To check condition (3), it suffices to show that for every $j\in C(\underline{P_1})$, $z^{-1}(m_{1}(x_{j+1}))=z^{-1}(m_{1}(x_{j}))+1$. Indeed, the positions of the elements corresponding to $x_{j}$ and $x_{j+1}$ in every occurrence of $\underline{P_{1}}$, must be consecutive. Thus, since $s_{1}\in_{\underline{P_{1}}}\sigma$, the positions of $m_{1}(x_{j})$ and $m_{1}(x_{j+1})$ in $\sigma$, and consequently in $z$, must be consecutive, because $z$ is the reduction of $s_{3}$, which is the union of $s_1$ and $s_2$. Also, if $j\in D(\underline{P_1})$, then $t_{j+1}=t_{j}+1$, where $s_{1}=(t_{1},\ldots ,t_{k_{1}})$. Therefore, these two elements have consecutive values in $s_{3}$, as well, i.e., $m_1(j+1)=m_1(j)+1$. With that, we showed that $m_1,m_2 \mathbin{:}P_1,P_2 \rightarrow P_3$. Now, it is easy to check that $s_{3}\in_{\underline{P_{3}}}\sigma$. $( \Longleftarrow )$ Let $s_{3}\in_{\underline{P_{3}}}\sigma$, where $s_{3}=(t_{1},t_{2}, \ldots , t_{k_{3}})$ is an increasing vector, $m_{1},m_{2}: \underline{P_{1}},\underline{P_{2}}\to \underline{P_{3}}$ and $\underline{P_{3}} = (z,\boldsymbol{C}(\underline{P_{3}}),\boldsymbol{D}(\underline{P_{3}}))$. Define $s_{1}\coloneqq t|_{m_{1},k_{1}}$ and $s_{2}\coloneqq t|_{m_{2},k_{2}}$, where $t|_{h,k} \coloneqq (t_{h(1)},t_{h(2)}, \ldots ,t_{h(k)})$. We must show that $t|_{m_{1},k_{1}}\in_{\underline{P_{1}}}\sigma$. One can similarly show that $t|_{m_{2},k_{2}}\in_{\underline{P_{2}}}\sigma$. Condition (2) of Definition \ref{def-merge} implies that the elements of $t|_{m_{1},k_{1}}$ are in the same relative order in $\sigma$ as the elements of $\underline{P_{1}}$. Now, assume that $j\in \boldsymbol{C}(\underline{P_{1}})$. We have to show that the positions of the elements $t_{m_{1}(x_{j})}$ and $t_{m_{1}(x_{j+1})}$ in $\sigma$ are consecutive. According to condition (3) of Definition \ref{def-merge}, $z(m_{1}(x_{j+1})) = z(m_{1}(x_{j}))+1$, i.e., $m_{1}(x_{j})$ and $m_{1}(x_{j+1})$ have consecutive positions in $z$ and $z^{-1}(m_{1}(x_{j}))\in \boldsymbol{C}(\underline{P_3})$. Therefore, these positions must be also consecutive in $\sigma$ since $s_{3}\in_{\underline{P_{3}}}\sigma$. Finally, assume that $j\in \boldsymbol{D}(\underline{P_{1}})$. We have to show that $t_{m_{1}(j+1)}=t_{m_{1}(j)}+1$. According to condition (4) of Definition \ref{def-merge}, we must have that $m_{1}(j)\in \boldsymbol{D}(\underline{P_{3}})$ and $m_{1}(j+1)=m_{1}(j)+1$. Since $s_{3}\in_{\underline{P_{3}}}\sigma$, we have $t_{m_{1}(j)}+1 = t_{m_{1}(j)+1} = m_{1}(j+1)$. \end{proof} Assume that $f$ is a simple statistic associated with the pattern $\underline{P_{1}}$ and valuation function $Q_{1}Q'_{1}$, whereas $g$ is a simple statistic associated with the pattern $\underline{P_{2}}$ and valuation function $Q_{2}Q'_{2}$. Assume, also, that $m_1,m_2 \mathbin{:}\underline{P_1},\underline{P_2} \rightarrow \underline{P_3}$ for some $m_{1},m_{2}$ and $\underline{P_3}$. If $s_3=(t_1,t_2,\cdots, t_{k_3})\in_{\underline{P_{3}}}\sigma$ and $w_3=(\sigma^{-1}(t_1), \sigma^{-1}(t_2), \ldots, \sigma^{-1}(t_{k_3}))$, then let us define \begin{align*} Q_{m_{1},m_{2},Q_{1},Q_{2}}(s_{3})\coloneqq Q_{1}(t|_{m_{1},k_{1}},n)Q_{2}(t|_{m_{2},k_{2}},n). \end{align*} and \begin{align*} Q'_{m_{1},m_{2},Q_{1},Q_{2}}(w_3)\coloneqq Q'_{1}(\sigma^{-1}(t|_{m_{1},k_{1}}),n)Q'_{2}(\sigma^{-1}(t|_{m_{2},k_{2}}),n). \end{align*} \begin{theorem}\label{higher-moment} Let $\mathbbm{St}$ be the set of all permutation statistics thought of as functions $f \mathbin{:} \cup_{n}{S_n}\rightarrow \mathbb{Q}$. Then $\mathbbm{St}$ is closed under the operations of point-wise scaling, addition and multiplication. Thus, if $f$, $g$ $\in \mathbbm{St}$ and $a\in \mathbb{Q}$, then there exist permutation statistics $h_a$, $h_{+}$ and $h_{*}$ so that for all permutations $\sigma \in \mathbbm{St}$, \begin{eqnarray*} af(\sigma)&=&h_a(\sigma),\\ f(\sigma)+g(\sigma)&=&h_{+}(\sigma),\\ f(\sigma)g(\sigma)&=&h_{*}(\sigma). \end{eqnarray*} Furthermore, we have the following inequalities for the degrees: $d(h_a)\leq d(f)$, $d(h_{+})\leq \max \{ d(f), d(g)\}$ and $d(h_{*})\leq d(f)+d(g)$. \end{theorem} \begin{proof} The addition of two statistics is obviously a statistic by definition. Now, one can easily see that it suffices to show the existence of $h_{a}$ and $h_{*}$, when $f$ and $g$ are simple statistics. If $f$ corresponds to the pattern $\underline{P}$ and the valuation function $Q(s,w)=Q_1(s)Q_2(w)$, then let $h_{a}$ be the simple statistic corresponding to the same pattern $\underline{P}$ and valuation function $Q'(s,w)=aQ_1(s)Q_2(w)=Q'_1(s)Q_2(w)$. Clearly, $h_{a}$ is a statistic. To establish the fact that the product of two simple statistics is a statistic, we need Lemma \ref{lemma:higherMoments}. Let $f$ and $g$ have associated patterns $\underline{{P}_1}$, $\underline{{P}_2}$ and valuations functions $Q_1Q_1'$ and $Q_2Q_2'$, respectively. For any positive integer $n$, let $\sigma \in S_n$ and consider \begin{align*} f_{\underline{{P}_1}, Q_1}(\sigma)g_{\underline{{P}_2}, Q_2}(\sigma) = \sum_{s_1\in _{\underline{{P}_1}} \sigma}Q_1(s_1) Q_1'(\sigma^{-1}(s_1))\sum_{s_2\in _{\underline{{P}_2}} \sigma}Q_2(s_2)Q_2'(\sigma^{-1}(s_2))\\ \overset{\text{\scalebox{0.5}{(by Lemma \ref{lemma:higherMoments})}}}= \sum_{\underline{P_{3}}}\left(\sum_{s_3\in_{\underline{P_3}}\sigma} \left(\sum_{m_1, m_2\mathbin{:}\underline{P_1}, \underline{P_2}\to \underline{P_3}} Q_{m_1,m_2,Q_1,Q_2}(s_3)Q_{m_1,m_2,Q_1,Q_2}'(\sigma^{-1}(s_3))\right)\right) = \sum_{\underline{P_{3}}}f_{\underline{P_{3}},\tilde{Q}}, \end{align*} where $$\tilde{Q}(s_3) = \sum_{m_1, m_2\mathbin{:}\underline{P_1}, \underline{P_2}\to \underline{P_3}} Q_{m_1,m_2,Q_1,Q_2}(s_3)Q_{m_1,m_2,Q_1,Q_2}'(\sigma^{-1}(s_3))$$ for the fixed $\underline{P_{1}},\underline{P_{2}}$ and $\underline{P_{3}}$. We get that the product $fg$ is a finite sum of statistics and thus, it is a statistic itself. Indeed, this sum is finite since the number of patterns $\underline{P_{3}}$ that one can get as a merge of $\underline{P_{1}}$ and $\underline{P_{2}}$ is finite. Note that the bounds on the degrees of the statistics $h_{a}$, $h_{+}$ and $h_{*}$ follow directly from our proof and the definitions. \end{proof} We will also need a generalization of Definition \ref{def-merge}. Let $\underline{P_1}$,$\underline{P_2}$, $\ldots$, $\underline{P_l}$ be $l$ patterns, where $k$ is the length of the pattern $\underline{P}$ and for each $i \in [l]$, $k_i$ is the length of the pattern $\underline{P_i}$. If we have the increasing functions $m_1\mathbin{:}[k_1]\to [k]$, $m_2\mathbin{:}[k_2]\to [k]$, $\ldots$ , $m_l\mathbin{:}[k_l]\to [k]$, then a \emph{merge} of these $l$ patterns corresponding to the listed functions is denoted by $m_1,m_2, \ldots, m_l\mathbin{:} \underline{P_1}, \underline{P_2},\ldots,\underline{P_l}\to \underline{P}$ or by the shorthand $\mathcal{M}_{l}\mathbin{:}\Pi_{l}\to\underline{P}$. Similarly, for any $\sigma \in S_n$ one can establish an analogue of Lemma \ref{lemma:higherMoments}. We state this result without a proof. \begin{lemma}\label{r-moment version} Assume that we have the $r$ patterns $(\underline{P_1},\boldsymbol{C}(\underline{P_1}), \boldsymbol{D}(\underline{P_1}))$, $(\underline{P_2},\boldsymbol{C}(\underline{P_2}), \boldsymbol{D}(\underline{P_2}))$, $\ldots$ , $(\underline{P_{r}}, \boldsymbol{C}(\underline{P_r}), \boldsymbol{D}(\underline{P_r}))$. There is a one-to-one correspondence between the following sets. \begin{align*} \{(s_1,s_2, \ldots, s_r)\mid s_1\in_{\underline{P_1}}\sigma, s_2\in_{\underline{P_2}}\sigma, \ldots, s_r\in_{\underline{P_r}}\sigma\}\\ \leftrightarrow \{s\in_{\underline{P}} \sigma \mid m_1,m_2,\ldots,m_r\mathbin{:} \underline{P_1},\underline, \ldots, \underline{P_r}\rightarrow P\}. \end{align*} \end{lemma} Using this lemma, one can obtain analogously that the product of $r$ statistics of degrees $d_{1}, \ldots , d_{r}$ is a statistic of degree not more than $\sum_{j=1}^{r}d_{j}$. We use this observation to obtain the following result. \begin{theorem} \label{th:main} Let $f$ be any statistic of degree $m$. Then, for any positive integer $r$, the $r$-th moment of $f$ is given by \begin{equation}\label{eq-higher_moment} M(f^r,n)= \sum_{-I\leq i\leq J} \alpha_i(n+i)!, \end{equation} where $I$ and $J$ are constants that satisfy $-I\geq \frac{-rm}{2}$, $J\leq mr$ and $n\geq I$, and the $\alpha _i$'s are rational constants. \end{theorem} \begin{proof} Let $f=\sum_{i=0}^{t}\beta_i f_{\underline{P_i},Q_i}$. We have \begin{equation} \label{eq:rMoments} \resizebox{0.94\hsize}{!}{ $\begin{aligned} M(f^r,n) = \sum_{\sigma\in S_n}{\left(\sum_{i=1}^t \beta_i f_{\underline{P_i},Q_i}(\sigma)\right)}^r = \sum_{\sigma\in S_n}\sum_{\underline{P^{r}}}\gamma_{j}\left(\sum_{s\in_{\underline{P^r}}\sigma}\left(\sum_{\mathcal{M}_{r}\mathbin{:}\Pi_{r}\to \underline{P^r}}\prod_{i=1}^{r}Q_{i}(t\mid_{m_{i},k_{i}},\sigma^{-1}(t\mid_{m_{i},k_{i}}))\right)\right)\\ \overset{\text{\scalebox{0.55}{(by Lemma \ref{r-moment version})}}}=\sum_{\sigma\in S_n}\sum_{\underline{P^{r}}}\gamma_{j}f_{\underline{P^{r}},\tilde{Q}}(\sigma) = \sum_{\underline{P^{r}}}\gamma_{j}M(f_{\underline{P^{r}},\tilde{Q}},n), \end{aligned}$ } \end{equation} for some constants $\gamma_{j}\in \mathbb{Q}$. Each of the statistics $f_{\underline{P^{r}},\tilde{Q}}$ is a summation of products of $r$ statistics, with each of them being of degree not more than $m$. Thus, $f_{\underline{P^{r}},\tilde{Q}}$ is a statistic of degree not more than $rm$, for every $\underline{P^{r}}$. Therefore, by Theorem \ref{general-sum}, we get \begin{equation} \label{eq:linearFormMain} M(f^r,n)= \sum_{-L\leq i\leq rm} \alpha_i(n+i)! \end{equation} where $L\leq \frac{m}{2}$. \end{proof} In order to establish Lemma \ref{lemma:mainVinc}, which is an important special case of Theorem \ref{th:main}, we will need the lemma below. \begin{lemma} \label{lemma:boundMerge} Consider a merge of the vincular patterns $\underline{P_{1}} = (x,\boldsymbol{C}(\underline{P_{1}}))$ and $\underline{P_{2}} = (y,\boldsymbol{C}(\underline{P_{2}}))$ onto $\underline{P_{3}} = (z,\boldsymbol{C}(\underline{P_{3}}))$, where $x$, $y$ and $z$ are of lengths $k_1$, $k_2$ and $k_3$, respectively and the values of $|\boldsymbol{C}(\underline{P_{1}})|$, $|\boldsymbol{C}(\underline{P_{2}})|$ and $|\boldsymbol{C}(\underline{P_{3}})|$ are $c_1$, $c_2$ and $c_3$, respectively. Then, \[ k_{3}-c_{3}\leq (k_{1}+k_{2})-(c_{1}+c_{2}). \] \end{lemma} \begin{proof} Part (3) of Definition \ref{def-merge} allows us to write the following: \begin{equation*} \resizebox{0.93\hsize}{!}{ $\begin{aligned} k_{3}-c_{3} = (k_{1}+k_{2}-(m_{1}([k_{1}])\cap m_{2}([k_{2}])))-(c_{1}+c_{2}-(\{m_{1}(x_{i})\mid i\in \boldsymbol{C}(\underline{P_{1}})\}\cap\{m_{2}(y_{j})\mid j\in \boldsymbol{C}(\underline{P_{2}})\})) = \\ (k_{1}+k_{2})-(c_{1}+c_{2}) - [(m_{1}([k_{1}])\cap m_{2}([k_{2}])) - (\{m_{1}(x_{i})\mid i\in \boldsymbol{C}(\underline{P_{1}})\}\cap\{m_{2}(y_{j})\mid j\in \boldsymbol{C}(\underline{P_{2}})\})]. \end{aligned} $} \end{equation*} Thus, it suffices to show that \begin{equation*} (m_{1}([k_{1}])\cap m_{2}([k_{2}])) - (\{m_{1}(x_{i})\mid i\in \boldsymbol{C}(\underline{P_{1}})\}\cap\{m_{2}(y_{j})\mid j\in \boldsymbol{C}(\underline{P_{2}})\})\geq 0, \end{equation*} but the latter is clearly true since $\boldsymbol{C}(\underline{P_{1}})$ and $\boldsymbol{C}(\underline{P_{2}})$ are subsets of $[k_{1}]$ and $[k_{2}]$, respectively. \end{proof} \begin{theorem} \label{lemma:mainVinc} If $\underline{P}$ is a vincular pattern of length $k$, such that $|\boldsymbol{C}(\underline{P})|=c$, then \begin{equation} \label{eq:linFormVinc} M(\cnt_{\underline{P}}^r,n)= \sum_{0\leq i\leq r(k-c)} \alpha_i(n+i)!, \end{equation} for $n\geq rk$. \end{theorem} \begin{proof} One can easily prove the following equality (Lemma \ref{lemma:ExpBivinc}, proved in the next section, gives a generalisation): \[ M(\cnt_{\underline{P}},n) =\frac{\binom{n-c}{k-c}}{k!}n!. \] Since $\binom{n-c}{k-c}$ is a polynomial in $n$ of degree $k-c$, the statement of the lemma holds, when $r=1$. For bigger values of $r$, we can look at Equation \eqref{eq:rMoments} and plug in $t=1$, $\beta_{1}=1$ and $Q=1$ for all valuation functions $Q$, as well as $\underline{P_{1}}=\underline{P_{2}} = \ldots \underline{P_{r}} = \underline{P}$ . We will get that \begin{equation} \label{eq:tmp} M(\cnt_{\underline{P}}^{r},n) = \sum_{\underline{P^r}}\delta_{j}M(\cnt_{\underline{P^r}},n), \end{equation} where the summation is over all possible merges $\underline{P^r}$ of $r$ copies of $\underline{P}$ and where $\delta_j$ are some rational constants. Using Lemma \ref{lemma:boundMerge}, we can see that each of the patterns $\underline{P^r}=(z,\boldsymbol{C}(\underline{P^r}))$ is a vincular pattern with $|z|-|\boldsymbol{C}(\underline{P^r})|\leq r(k-c)$. Therefore, each of the aggregates $M(\cnt_{\underline{P^r}},n)$ can be written in the form, as in the right side of Equation \eqref{eq:linFormVinc}. After we substitute these forms in the right side of Equation \eqref{eq:tmp} and regroup, we see that the claim holds. \end{proof} Theorem \ref{th:main} and Theorem \ref{lemma:mainVinc} generalize a result of Zeilberger \cite[Main formula]{Z.I}. What he proved is that for any classical pattern $\underline{P}$ of length $k$, $\mathbb{E}(\cnt_{\underline{P}}^{r})$ is a polynomial of degree $rk$. In the same article, he used this observation to get the polynomials for the second and the third moments of the statistic $\cnt_{\underline{P}}$, for various classical patterns $\underline{P}$. To do that, he implemented a computer program that fits the actual values of this statistic for $0,1,\ldots , rk$ to a polynomial of degree $rk$. Below, we give explicit expressions for the second moment of some of the statistics introduced in Section \ref{sec:defs}. We use the same approach by fitting small values of these statistics to the right side of Theorem \ref{th:main} or Theorem \ref{lemma:mainVinc}, in order to find the coefficients $\alpha_{i}$.\\ \textbf{Examples (formulas for aggregates of higher moments):} \begin{itemize} \item[1.] Second moment of the double ascents.\\ \begin{equation*} M(\cnt_{\underline{123}}^2,n)=-\frac{1}{12}n!-\frac{1}{15}(n+1)!+\frac{1}{36}(n+2)!. \end{equation*} \item[2.] Second moment of $\cnt_{\scaleto{\Vectorstack{1\overline{23} 3\underline{12}}}{16pt}}$.\\ \begin{equation*} M(\cnt_{\scaleto{\Vectorstack{1\overline{23} 3\underline{12}}}{16pt}}^2,n)=\frac{1}{2}n!-\frac{9}{28}(n+1)!+\frac{29}{672}(n+2)!+\frac{11}{10080}(n+3)!-\frac{1}{45360}(n+4)!. \end{equation*} \end{itemize} Several important simple statistics have unit valuation function associated to them, i.e., $Q(s,w)=1$. For these cases, we give the following important corollary from Theorem \ref{th:main}, which is an analogue of \cite[Proposition 3.5]{matchings} and will be substantially used in the next two sections. \begin{corollary} \label{corr:main} Let $\underline{P}$ be a pattern of length $k$ with $|\boldsymbol{C}(\underline{P})|=c$, $|\boldsymbol{D}(\underline{P})|=d$ and unit valuation function. Then, \begin{equation} \label{eq:corr} M(\cnt_{\underline{P}}^{r},n) = \sum_{\tilde{k},\tilde{c},\tilde{d}}w^{(r)}_{\tilde{k},\tilde{c},\tilde{d}}\binom{n-\tilde{c}}{\tilde{k}-\tilde{c}}\binom{n-\tilde{d}}{\tilde{k}-\tilde{d}}(n-k)!, \end{equation} where $w^{(r)}_{\tilde{k},\tilde{c},\tilde{d}}$ is the number of ways to merge $r$ copies of $\underline{P}$ and get a pattern $\underline{P^{r}}$ of length $\tilde{k}$, with $|C(\underline{P^{r}})|=\tilde{c}$, $|D(\underline{P^{r}})|=\tilde{d}$ and where $k\leq \tilde{k}\leq rk$, $c\leq \tilde{c}\leq rc$ and $d\leq \tilde{d}\leq rd$. \end{corollary} \begin{proof} Take Equation \eqref{eq:rMoments} in the proof of Theorem \ref{th:main} and plug in $t=1$, $\beta_{1}=1$, $Q=1$ for all valuation functions $Q$ and $\underline{P_{1}}=\underline{P_{2}} = \ldots \underline{P_{r}} = \underline{P}$. Then, $M(\cnt_{\underline{P}}^{r},n) = \sum_{\underline{P^r}}\gamma_{j}M(f_{\underline{P^r},\tilde{Q}},n)=\sum_{\underline{P^r}}\gamma_{j}'M(\cnt_{\underline{P^r}},n)$, for some rational constants $\gamma_{j}'$. In addition, use Lemma \ref{lemma:ExpBivinc} to get that \[ M(\cnt_{\underline{P}},n) =\frac{\binom{n-\tilde{c}}{\tilde{k}-\tilde{c}}\binom{n-\tilde{d}}{\tilde{k}-\tilde{d}}}{n_{(\tilde{k})}}n! = \binom{n-\tilde{c}}{\tilde{k}-\tilde{c}}\binom{n-\tilde{d}}{\tilde{k}-\tilde{d}}(n-\tilde{k})!, \] for every pattern $\underline{P}$ of length $\tilde{k}$, with $|C(\underline{P})|=\tilde{c}$ and $|D(\underline{P})|=\tilde{d}$. \end{proof} \section{Descents and minimal descents. Explicit formulas for the higher moments.} \label{sec:descents} The results from the previous section can be used to obtain an explicit formula for the $r$-th moment of some permutation statistics. In this section, we illustrate how this can be done for the descents and the minimal descents statistics. We will use the following simple lemma. \begin{lemma} \label{lemma:ExpBivinc} For any bivincular pattern $\underline{P}$ of length $k$, such that $|\boldsymbol{C}(\underline{P})|=c$ and $|\boldsymbol{D}(\underline{P})|=d$, \[ \mathbb{E}(\cnt_{\underline{P}},n) =\frac{\binom{n-c}{k-c}\binom{n-d}{k-d}}{n_{(k)}}. \] \end{lemma} \begin{proof} Let $I$ be the set of possible positions for an occurrence of $\underline{P}$ in a permutation of length $n$. Similarly, let $J$ be the set of possible values of the numbers in such an occurrence. By linearity of expectation, we have that \[ \mathbb{E}(\cnt_{\underline{P}},n) = \sum_{i\in I,j\in J} X_{i,j}, \] where the random variable $X_{i,j}\coloneqq 1,$ if the set of possible values with index $j$ are at the set of possible positions with index $i$, and these values are in the relative order determined by the permutation $P$. Otherwise, $X_{i,j}\coloneqq 0$. Note that when we choose a permutation of length $n$ at random, $\mathbb{E}(X_{i,j})=\frac{1}{n_{(k)}}$. Also, note that $|I|=\binom{n-c}{k-c}$ and $|J|=\binom{n-d}{k-d}$. \end{proof} Consider the statistic $\des = \cnt_{\underline{21}}$. It is well known that the number of permutations of length $n$ having $k$ descents is given by the \emph{Eulerian numbers} and the corresponding distribution is called \emph{Eulerian distribution}. A comprehensive source dedicated to Eulerian numbers is the book \cite{petersen}. Its preface and the notes at the end of Chapter 1 provide a good historical overview. A recent article by Hwang et al. gives a complicated recurrence relation as a way to calculate the higher moments of the Eulerian distribution and a family of other distributions with generating functions satisfying a similar relation (see \cite[Section 2.2]{hwang}). Below, we give a direct summation formula for the $r$-th moment of the Eulerian distribution. \begin{theorem} \label{th:eulerMoments} Consider a random permutation of length $n$ and $r\geq 1$. Then, \begin{equation*} \Scale[0.95]{\mathbb{E}(\des^{r}) = \sum\limits_{m=2}^{min(n,2r)}\sum\limits_{u=1}^{\lfloor \frac{m}{2}\rfloor}\left(\sum\limits_{w=0}^{m-u}(-1)^{w}\binom{m-u}{w}(m-u-w)^{r}\right)\left(\sum\limits_{\substack{q_{1}+\dots + q_{u}=m\\q_{i}\geq 2}}\binom{m}{q_{1},\dots ,q_{u}}\right)\frac{\binom{n-(m-u)}{u}}{m!}}. \end{equation*} \end{theorem} \begin{proof} Use Corollary \ref{corr:main} and note that for $\underline{P}=\underline{21}$, $d=0$ and $c=1$. Let us find the numbers $w^{(r)}_{\tilde{k},\tilde{c}}$ for the pattern $\underline{21}$. We will need to sum over all possible merges $\underline{P^{r}}$ depending on their length $\tilde{k}$ and the value $\tilde{c}$ of $|\boldsymbol{C}(\underline{P^{r}})|$. Instead of $\tilde{k}$, we will write $m$. Any of the patterns $\underline{P^{r}}$ can have between $m=2$ and $m=2r$ letters. For a fixed $m$, any such pattern can be comprised of $u$ segments of consecutive letters, where $1\leq u \leq \lceil \frac{m}{2}\rceil$. For example, $q=\underline{43}\, \underline{61}\, \underline{752}$ has length $m=7$ and is comprised of three segments of consecutive letters, namely $43$, $61$ and $752$. Note that getting a pattern $\underline{P}$ with $u$ segments requires merging at least $m-u$ copies of the pattern $\underline{21}$ since a segment of length $h$ requires merging at least $h-1$ copies of $\underline{21}$. For instance, the segment $\underline{752}$ in the pattern $q$ above can be obtained after merging multiple copies of $\underline{21}$, corresponding either to $\underline{75}$ or to $\underline{52}$ and at least one copy corresponding to each of them. In general, for a merge with $u$ segments, each of the $r$ copies of the descent pattern \underline{21} must correspond to one out of $m-u$ pairs of consecutive elements and we must have at least one copy for each of these pairs. The inclusion-exclusion principle gives us $\sum\limits_{w=0}^{m-u}(-1)^{w}\binom{m-u}{w}(m-u-w)^{r}$ ways to achieve that. In addition, every segment must be a decreasing sequence of elements. If the lengths of the segments in the pattern $\underline{P^{r}}$ are denoted by $q_{1},\ldots ,q_{u}$, then we must have $q_{1}+ \cdots + q_{u} = m$ and $q_{i}\geq 2$ for each $1\leq i\leq u$. Thus, for every such composition of $m$, we can choose the numbers in each of the segments in $\binom{m}{q_{1},\dots ,q_{u}}$ ways. Finally, for every pattern $\underline{P^{r}}$ with $u$ segments, $|\boldsymbol{C}(\underline{P^{r}})| = m-u$. Therefore $w^{(r)}_{\tilde{k},\tilde{c}}=w^{(r)}_{m,m-u} = \sum\limits_{u=1}^{\lfloor \frac{m}{2}\rfloor}\left(\sum\limits_{w=0}^{m-u}(-1)^{w}\binom{m-u}{w}(m-u-w)^{r})\right)\sum\limits_{\substack{q_{1}+\dots + q_{u}=m\\q_{i}\geq 2}}\binom{m}{q_{1},\dots ,q_{u}}$ and $M(\cnt_{\underline{P^{r}}},n) = \frac{\binom{n-(m-u)}{u}}{m!}n!$, by Lemma \ref{lemma:ExpBivinc}. Our goal is to find $E(\des^{r})$, so we are dividing both sides by $n!$ to obtain the desired formula. \end{proof} Similarly, we can obtain the moments of the minimal descents statistic $\cnt_{\scaleto{\Vectorstack{\overline{12} \underline{21}}}{16pt}}$, i.e., a descent, such that the two numbers in it are consecutive. In the literature, this statistic is also known as \emph{adjacency} and we will denote it by $\adj$. The following Theorem will be used in Section \ref{subsec:bivinc}. \begin{theorem} \label{th:adj} Consider a random permutation of length $n$ and $r\geq 1$. Then, \begin{equation*} \Scale[1]{\mathbb{E}(\adj^{r}) = \sum\limits_{m=2}^{min(n,2r)}\sum\limits_{u=1}^{\lfloor \frac{m}{2}\rfloor}\left(\left(\sum\limits_{w=0}^{m-u}(-1)^{w}\binom{m-u}{w}(m-u-w)^{r}\right)\binom{m-u-1}{u-1}u!\frac{\binom{n-(m-u)}{u}^{2}}{n_{(m)}}\right)}. \end{equation*} \end{theorem} \begin{proof} Proceed as in the proof of the previous Theorem \ref{th:eulerMoments}. One difference is that now, for a pattern $\underline{P^r}$ of length $m$ with $u$ segments, the values of the numbers in each segment must be consecutive. Thus, instead of $\sum\limits_{\substack{q_{1}+\cdots + q_{u}=m\\q_{i}\geq 2}}\binom{m}{q_{1},\ldots ,q_{u}}$ possible ways to determine the numbers in a pattern with $u$ segments, we have just $u!$ such segments for every solution of $q_{1}+\cdots + q_{u}=m$, where $q_{i}\geq 2$. By using the stars and bars model, one can see that the number of these solutions is exactly $\binom{m-u-1}{u-1}$. In addition, one can see that $|\boldsymbol{C}(\underline{P^r})|=|\boldsymbol{D}(\underline{P^r})|=m-u$, for every pattern $\underline{P^r}$ with $u$ segments and therefore by Lemma \ref{lemma:ExpBivinc}, we get $M(\cnt_{\underline{P^{r}}},n) =\frac{\binom{n-(m-u)}{u}^{2}}{n_{(m)}}$. \end{proof} \section{Central limit theorems for $\cnt_{\underline{P}}$.} \label{sec:CLTs} The normal distribution is frequently appearing in the context of combinatorial enumeration \cite[Chapter 3]{HEC}. A major reason is, of course, the central limit theorem, which gives us that under rather general circumstances, when independent random variables are added, their properly normalized sum converges in distribution to the normal distribution. Formally, a random variable $X$ is \emph{normally distributed} when \[ \mathbb{P}(X\leq x) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{x}e^{-t^{2}/2}dt. \] In this section, we will reprove some limiting laws for the random variable $\cnt_{\underline{P}}$, which counts the number of occurrences of the pattern $\underline{P}$ in a given permutation. \subsection{Classical Patterns} \label{sec:classical} Recall that if $\boldsymbol{C}(\underline{P})$ and $\boldsymbol{D}(\underline{P})$ are empty, then $\underline{P}$ is a classical pattern. The limiting normality of $\cnt_{\underline{P}}$, when $\underline{P}$ is a classical pattern was first established by B\'{o}na \cite{bona}. He uses the method of \emph{dependency graphs} and the \emph{Janson dependency criterion}. This method is used when we have a set of partially dependent random variables, for every value of $n$, and we want to prove that the sum of these variables has a certain asymptotic distribution. To obtain a dependency graph for a set of random variables, we take a vertex for each variable and connect the dependent random variables by edges. We can construct a dependency graph for each value of $n$. The idea of the method is that if the degrees of the vertices in the obtained sequence of dependency graphs do not grow too fast, then the corresponding variables behave as if independent and their sum is asymptotically normal \cite{ferayDepGraphs}. Janson's criterion gives one sufficient condition for this asymptotic normality, quantifying that the degrees do not grow too quickly. A main fact that B\'{o}na uses when checking the criterion is a lower bound on the variance of $\cnt_{\underline{P}}$. In this subsection, we reprove this result by using Corollary \ref{corr:main} and Lemma \ref{lemma:classical} given below, which was established by Burstein and H\"{a}st\"{o} \cite{burstein}. This gives a new proof that $\cnt_{\underline{P}}$ has asymptotically normal distribution. We also provide a new interpretation of Lemma \ref{lemma:classical}. Let $A_{\sigma}(r)$ denotes the set of possible merges of two copies of the pattern $\underline{\sigma}$, which is of length $k$, and where the resulting pattern is of length $r$. Formally, $A_{\sigma}(r)$ can be defined as the set of triples $(\pi, m_{1}, m_{2})$, such that $m_1,m_2 \mathbin{:}\underline{\sigma} ,\underline{\sigma} \rightarrow \underline{\pi}$ and $\pi\in S_{r}$. However, it will be more convenient for us to look at the subsequences of $\pi$ formed by the images of the functions $m_1$ and $m_2$, i.e., we will use the following equivalent definition. \begin{definition} For $\sigma\in S_{k}$, let \[ A_{\sigma}(r) \coloneqq \{(\underline{\pi}, x,y)\mid \pi\in S_{r},\text{ }x,y\in \subs(\pi),\text{ }\red(x) {=} \sigma,\text{ }\red(y){=}\sigma,\text{ } |x\cap y|=2r-k\}, \] where $\subs(\pi)$ denotes the set of the subsequences of the permutation $\pi$. \end{definition} For instance, if $\underline{\sigma}$ is the classical pattern $312$, then $A_{312}(5)$ contains $(54213, 523, 413)$, since $\red(523)=312$, $\red(413)=312$ and these two subsequences have exactly one common element (see Figure 1). \begin{table} $ \begin{array}{|c|c|c|c|c|c|} \hline 5 & 4 & 2 & 1 & 3\\ \hhline{|=|=|=|=|=|} 5 & & 2 & & 3\\ \hline & 4 & & 1 & 3\\ \hline \end{array}$ \caption{Merge of two copies of the pattern $312$.} \end{table} Let $a_{\sigma}(r)\coloneqq |A_{\sigma}(r)|$. \begin{lemma}[{Burstein and H\"{a}st\"{o}, \cite[Lemma 4.3]{burstein}}] \label{lemma:classical} For any classical pattern $\sigma = \sigma_{1}\cdots\sigma_{k}$, \begin{equation} \label{eq:burnstein} a_{\sigma}(2k-1) > \binom{2k-1}{k}^{2}. \end{equation} \end{lemma} \begin{example} $k=2$ and $\sigma = 21$. Then, $\binom{2k-1}{k}^2 = 9$ and $a_{\sigma}(2k-1)=a_{21}(3)=10$, since $A_{21}(3)$ consists of the $10$ triples $(\pi, x,y)$ given below: $\pi = 321$: $(321,32,31)$, $(321,31,32)$, $(321,32,21)$, $(321,21,32)$, $(321,31,21)$, $(321,21,31)$. $\pi = 312$: $(312,31,32)$, $(312,32,31)$. $\pi = 231$: $(231,21,31)$, $(231,31,21)$. \end{example} Now, we are ready to prove the bound for the variance of $\cnt_{\underline{P}}$ used by B\'{o}na. \begin{theorem} \label{th:boundBona} Let $X_{n}\coloneqq \cnt_{\sigma}$ be the number of occurrences of a classical pattern $\sigma = \sigma_{1}\cdots\sigma_{k}$ in a random permutation of length $n$. Then, there exists $c>0$, such that for all $n$, \[ \Var(X_{n})\geq cn^{2k-1}. \] \end{theorem} \begin{proof} Since $\sigma$ is a classical pattern, Lemma \ref{lemma:ExpBivinc} gives us that $\mathbb{E}(X_{n})=\frac{\binom{n}{k}}{k!}$. Using this fact and Corollary \ref{corr:main}, we obtain \begin{equation*} \begin{split} \Scale[0.95]{\Var(X_{n}) = \mathbb{E}(X_{n}^{2}) - \mathbb{E}^{2}(X_{n}) = [a_{\sigma}(2k)\frac{\binom{n}{2k}}{(2k)!} + a_{\sigma}(2k-1)\frac{\binom{n}{2k-1}}{(2k-1)!}+ \mathcal{O}(n^{2k-2})] - \frac{\binom{n}{k}^{2}}{(k!)^{2}}}. \end{split} \end{equation*} We know that $\binom{n}{k} = \frac{(n)_{k}}{k!}$ and that $(n)_{k} = \sum\limits_{i=0}^{k}s(k,i)n^{i}$, where $s(k,i)$ are the \emph{Stirling numbers of the first kind}. We have $s(k,i) = (-1)^{k-i}{ k\brack i}$, where ${ k\brack i}$ is the number of permutations in $S_{k}$ with $i$ disjoint cycles. In particular, ${ k\brack k-1} = \binom{k}{2}$. Therefore, \begin{equation*} \begin{split} \Scale[0.95]{\Var(X_{n}) = [a_{\sigma}(2k)\frac{n^{2k}-\binom{2k}{2}n^{2k-1}}{((2k)!)^{2}} + a_{\sigma}(2k-1)\frac{n^{2k-1})}{((2k-1)!)^{2}}] - \frac{n^{2k}-2\binom{k}{2}n^{2k-1}}{(k!)^{4}}+ \mathcal{O}(n^{2k-2}).} \end{split} \end{equation*} It is easy to see that $a_{\sigma}(2k) = \binom{2k}{k}^{2}$ since a merge of length $2k$ of two copies of $\underline{\sigma}$ is uniquely determined by the set of $k$ positions among $[2k]$, where the first copy will be placed and the set of $k$ values among $[2k]$ at these positions. The values and the positions for the letters of the second copy are those remaining. Then, one can see that the coefficient of $\Var(X_{n})$ in front of $n^{2k}$ is $0$ and the coefficient in front of $n^{2k-1}$ is \begin{equation*} \frac{-\binom{2k}{k}^{2}\binom{2k}{2}}{((2k)!)^{2}} + \frac{a_{\sigma}(2k-1)}{((2k-1)!)^{2}} + \frac{2\binom{k}{2}}{(k!)^{4}}. \end{equation*} Simplify the last expression to get that this coefficient is positive, only if \begin{equation*} a_{\sigma}(2k-1)> \binom{2k-1}{k}^{2}, \end{equation*} which follows from Lemma \ref{lemma:classical}. \end{proof} It is interesting to note that Burstein and H\"{a}st\"{o} obtained the same bound for the variance of $X_{n}$ in \cite{burstein}, but they did not state that it implies the central limit theorem for $\cnt_{\underline{P}}$. At the same time, in \cite{bona}, B\'{o}na proved the bound independently and did not cite the work of Burstein and H\"{a}st\"{o}. The proof of Lemma \ref{lemma:classical}, found in \cite{burstein}, is algebraic. As a first step, this proof shows that $a_{\sigma}(2k-1)$ is the trace of a product of two symmetric matrices, for which we know that they have only positive eigenvalues. In addition, one of the eigenvalues of the product matrix turns out to be $\binom{2k-1}{k}^{2}$. The result follows, since the trace of a matrix equals the sum of its eigenvalues. Next, we give an interpretation of Lemma \ref{lemma:classical}, which may be useful to obtain a combinatorial proof for it. Let \[A_{\sigma, \sigma'}(r) \coloneqq \{(\pi, x,y)\mid \pi\in S_{r},\text{ }x,y\in \subs(\pi),\text{ }\red(x) {=} \sigma,\text{ }\red(y){=}\sigma',\text{ } |x\cap y|=2r-k\}, \] be the set of merges of length $r$ for the permutations $\sigma\in S_k$ and $\sigma'\in S_k$, corresponding to the patterns $\underline{\sigma}$ and $\underline{\sigma'}$, respectively. Let $a_{\sigma , \sigma'}(r) = |A_{\sigma, \sigma'}(r)|$. \begin{theorem} \label{th:interpretation} Lemma \ref{lemma:classical} is equivalent to \begin{equation} a_{\sigma}(2k-1) > \mathbb{E}(a_{\sigma , \sigma'}(2k-1)), \end{equation} where $\sigma\in S_k$ is a fixed classical pattern and $\sigma'\in S_{k}$ is chosen uniformly at random. \end{theorem} \begin{proof} First, note that $\binom{2k-1}{k}^2$, which is the right-hand side of Equation \eqref{eq:burnstein} in Lemma \ref{lemma:classical}, can be written as $\frac{\binom{2k-1}{k}}{k}\binom{2k-1}{k}k$. Then, observe that $\binom{2k-1}{k}k$ is the number of ways to choose the $k$ positions from $[2k-1]$ for the numbers of the subsequence $x$ (that is order isomorphic to $\sigma$), as well as the position of the common element $c$ for $x$ and the subsequence $y$ (that is order-isomorphic to $\sigma'$). For each of these choices, we can select the values of the numbers of $x$ at the already selected positions in $\binom{2k-1}{k}$ ways. Once this choice is made, the values of $x,y$ and $c$ are uniquely determined. Suppose that $c$ has to be at position $p$ in $y$. Since $\sigma'$ is chosen uniformly at random, we have probability $\frac{1}{k}$ for the element $c$ to be at position $p$ in $y$. This gives $\frac{\binom{2k-1}{k}}{k}$ for the expected number of merges when we know the positions of the elements of $x$ and the position of $c$. Therefore, \[ \mathbb{E}(a_{\sigma , \sigma'}(2k-1)) = \frac{\binom{2k-1}{k}}{k}\binom{2k-1}{k}k = \binom{2k-1}{k}^2. \] \end{proof} Interestingly, if $\sigma$ is fixed, $a_{\sigma , \sigma'}(k,2k-1)$ does not necessarily reach its maximum when $\sigma'=\sigma$. For instance, $a_{1324 , 1234}(4,7)>a_{1324 , 1324}(4,7)$. However, since we know that Lemma \ref{lemma:classical} holds, Theorem \ref{th:interpretation} gives us that when $\sigma'=\sigma$, we always get a value greater than the expectation over $\sigma'$. \subsection{Vincular Patterns} \label{sec:vincular} Recall that if $\boldsymbol{D}(\underline{P})$ is empty, then $\underline{P}$ is a vincular pattern and to denote it, we write $P$ with the positions $i$ and $i+1$ of $P$ underlined, for every $i\in\boldsymbol{C}(\underline{P})$. The \emph{blocks} of a vincular pattern are the groups of numbers at consecutive positions at the pattern, such that their corresponding numbers in an occurrence must be at consecutive positions, as well. For example, if $\underline{P} = (135246, \{1,2,5\},\emptyset)=\underline{135}2\underline{46}$, then $\boldsymbol{C}(\underline{P})$ has three blocks, namely $135$, $2$ and $46$. The limiting normality of $\cnt_{\underline{\sigma}}$, when $\underline{\sigma}$ is a vincular pattern was first established by Hofer \cite{hofer}. She proposes two different approaches to bound the Kolmogorov distance between the distribution of $\cnt_{\underline{\sigma}}$ and the Normal distribution, both based on dependency graphs. To apply them, she needs a lower bound for the variance of $\cnt_{\underline{\sigma}}$, i.e., to prove a more general version of Theorem \ref{th:boundBona}, which holds for any vincular pattern. Hofer obtained such a generalization by a rather complicated recurrence based on the law of total variance. \begin{theorem}[Hofer, \cite{hofer}] \label{th:hofer} Let $X_{n}=\cnt_{\underline{\sigma}}$ be the number of occurrences of a vincular pattern $\underline{\sigma}$ with $j$ blocks, in a random permutation of length $n$. Then, there exists $c>0$, such that for all $n$, \[ \Var(X_{n})\geq cn^{2j-1}. \] \end{theorem} Below, we show that this more general bound is equivalent to a lemma generalizing Lemma ~\ref{lemma:classical}, that has an analogous interpretation as the one given with Theorem \ref{th:interpretation}. If $\underline{\sigma}$ is a vincular pattern of length $k$ with $j$ blocks, then we denote by $b_{\sigma}(m,j')$ the number of merges of two copies of $\underline{\sigma}$, where the resulting pattern is of length $m$ and has $j'$ blocks. \begin{example}[Merge of two copies of a vincular pattern]\leavevmode\\ Let $\underline{\sigma} = \underline{431}\,\underline{52}$. This pattern has length $k=5$ and $j=2$ blocks. Below is given a merge of two copies of $\underline{\sigma}$. The resulting pattern $\underline{6531}\,\underline{84}\,\underline{72}$ is of length $m=8$ and has $j'=3$ blocks. \begin{table}[h!] $\begin{array}{|c|c|c|c|c|c|c|c|} \hline 6 & 5 & 3 & 1 & 8 & 4 & 7 & 2\\ \hhline{|=|=|=|=|=|=|=|=|} 6 & 5 & 3 & & 8 & 4 & & \\ \hline & 5 & 3 & 1 & & & 7 & 2 \\ \hline \end{array}$ \caption{Merge of two copies of the pattern $\underline{431}\,\underline{52}$.} \label{fig:vincMergeExample} \end{table} \end{example} \vspace{-6mm} If $\underline{\sigma}$ has blocks of sizes $\alpha_{1},\ldots , \alpha_{j}$, then let $M_{\underline{\sigma}} = \max\limits_{1\leq i \leq j} \{\alpha_{i}\}$ and let $[x^{k}]P$ denotes the coefficient of the polynomial $P$ in front of $x^k$. \begin{theorem} \label{th:vinc} Theorem \ref{th:hofer} is equivalent to \begin{equation} \label{eq:lemmaVinc} \sum\limits_{l=1}^{M_{\underline{\sigma}}} (2k)_{l}b_{\sigma}(2k-l,2j-1) > \binom{2k}{k}\binom{2j-1}{j}j. \end{equation} \end{theorem} \begin{proof} We will use that the expected number of occurrences of a vincular pattern $\underline{\sigma}$ of length $k$, with $j$ blocks, in a random permutation of length $n$ is $\frac{\binom{n-(k-j)}{j}}{k!}$. This follows from Lemma ~\ref{lemma:ExpBivinc} and the fact that $|\boldsymbol{C}(\underline{\sigma})|=k-j$. Apply Corollary \ref{corr:main} and note that if $m_{1},m_{2}: \underline{\sigma},\underline{\sigma}\to \underline{P}$ and $\underline{P}$ has $2j-1$ blocks, then exactly one block of the first copy of $\underline{\sigma}$ was merged with one block of the second copy of $\underline{\sigma}$. Therefore, $|P|=\tilde{k}\in [2k-M_{\underline{\sigma}},2k]$ and $|\boldsymbol{C}(\underline{P})| = \tilde{k}-(2j-1)$. We have \\ \resizebox{0.97\hsize}{!}{ $ \begin{aligned} \Var(X_{n}) = \mathbb{E}(X_{n}^{2}) -\mathbb{E}^{2}(X_{n}) = \left[b(2k,2j)\frac{\binom{n-(2k-2j)}{2j}}{(2k)!} + \sum\limits_{l=1}^{M_{\underline{\sigma}}} b_{\sigma}(2k-l,2j-1)\frac{\binom{n-(2k-l-2j+1)}{2j-1}}{(2k-l)!}\right] \\ - \frac{\binom{n-(k-j)}{j}^{2}}{(k!)^{2}} + \mathcal{O}(n^{2j-2}). \end{aligned}$ } We will again use that $\binom{n}{k} = \frac{(n)_{k}}{k!}$ and that $(n)_{k} = \sum\limits_{i=0}^{k}s(k,i)n^{i}$, where $s(k,i) = (-1)^{k-i}{ k\brack i}$ are the Stirling numbers of the first kind and ${ k\brack i}$ is the number of permutations in $S_{k}$ with $i$ disjoint cycles. Since ${ k\brack k-1} = \binom{k}{2}$ and $b_{\sigma}(2k,2j)=\binom{2k}{k}\binom{2j}{j} = \frac{(2j)!(2k)!}{(k!j!)^{2}}$, we get the following. \resizebox{0.98\hsize}{!}{ $\begin{aligned} \Var(X_{n}) & = \left[ \frac{(2j)!(2k)!}{(k!j!)^{2}}\frac{(n-2k+2j)_{2j}}{(2j)!(2k)!} + \sum\limits_{l=1}^{M_{\underline{\sigma}}} b_{\sigma}(2k-l,2j-1)\frac{(n-(2k-l-2j+1))_{2j-1}}{(2k-l)!(2j-1)!}\right] - \frac{(n-k+j)_{j}^{2}}{(k!)^{2}(j!)^{2}} + \mathcal{O}(n^{2j-2}) \\ & = \frac{1}{(k!j!)^{2}}[(n-2k+2j)^{2j}-\binom{2j}{2}(n-2k+2j)^{2j-1}- ((n-k+j)^{j}-\binom{j}{2}(n-k+j)^{j-1}+\mathcal{O}(n^{j-2}))^{2}] \\ & +\sum\limits_{l=1}^{M_{\underline{\sigma}}} b_{\sigma}(2k-l,2j-1)\frac{(n-2k+l+2j-1)^{2j-1} + \mathcal{O}(n^{2j-2})}{(2k-l)!(2j-1)!}+ \mathcal{O}(n^{2j-2})\\ & = \frac{1}{(k!j!)^{2}}[n^{2j}-(2k-2j)n^{2j-1}-j(2j-1)n^{2j-1}-(n^{j}-(k-j)n^{j-1}-\frac{j(j-1)}{2}n^{j-1}+\mathcal{O}(n^{j-2}))^{2}] \\ & +\sum\limits_{l=1}^{M_{\underline{\sigma}}} b_{\sigma}(2k-l,2j-1)\frac{n^{2j-1}}{(2j-1)!(2k-l)!} + \mathcal{O}(n^{2j-2}). \end{aligned}$ }\\ After simplifying, we get that $[n^{2j-1}]\Var(X_{n})>0$ if and only if \begin{equation*} \begin{split} \frac{-j^{2}}{(k!j!)^{2}}+ \sum\limits_{l=1}^{M_{\underline{\sigma}}}\frac{b_{\sigma}(2k-l,2j-1)}{(2k-l)!(2j-1)!} > 0 \Longleftrightarrow \\ \sum\limits_{l=1}^{M_{\underline{\sigma}}} (2k)_{l}b_{\sigma}(2k-l,2j-1) > \binom{2k}{k}\binom{2j-1}{j}j. \end{split} \end{equation*} \end{proof} Note that when $j=k$, we have $M_{\underline{\sigma}}=1$ and $b_{\sigma}(2k-1,2j-1)=a_{\sigma}(2k-1)$, so we get Lemma \ref{lemma:classical}. When $j=1$, Inequality \eqref{eq:lemmaVinc} is trivial, since $M_{\underline{\sigma}}=k$ and on the left, just one of the summands (when $l=k$) is $(2k)_{k}$, while on the right we have $\binom{2k}{k}<(2k)_{k}$. We were not able to prove Inequality \eqref{eq:lemmaVinc} for vincular patterns with arbitrary number of blocks. However, we can give an interpretation of this inequality. Note that when one merges two copies of a pattern with $j$ blocks and the obtained pattern has $2j-1$ blocks, then the blocks of the two copies can be aligned in exactly $\binom{2j-1}{j}j$ ways. These alignments will be called \emph{configurations}. For example, when $j=2$, there are $\binom{3}{2}2 = 6$ configurations shown below (the $\square$ symbol represents a block): \renewcommand{\thefigure}{3} \begin{figure}[ht!] \centering \begin{multicols}{3} \begin{itemize}[itemsep=10pt] \item[] $\begin{array}{|c|c|c|} \hline \square & \square & \\ \hline \square & & \square\\ \hline \end{array}$ \item[] $\begin{array}{|c|c|c|} \hline \square & & \square\\ \hline \square & \square & \\ \hline \end{array}$ \item[] $\begin{array}{|c|c|c|} \hline \square & \square & \\ \hline & \square & \square \\ \hline \end{array}$ \item[] $\begin{array}{|c|c|c|} \hline & \square & \square \\ \hline \square & \square & \\ \hline \end{array}$ \item[] $\begin{array}{|c|c|c|} \hline & \square & \square \\ \hline \square & & \square\\ \hline \end{array}$ \item[] $\begin{array}{|c|c|c|} \hline \square & & \square\\ \hline & \square & \square \\ \hline \end{array}$ \end{itemize} \end{multicols} \caption{The $6$ possible configurations, when merging two copies of a pattern with two blocks.} \label{fig:configs} \end{figure} For instance, the configuration corresponding to the merge shown on Figure \ref{fig:vincMergeExample} is the top-left configuration shown on Figure \ref{fig:configs}. It is not difficult to see that the conjecture we give next would imply Inequality \eqref{eq:lemmaVinc} and respectively Theorem \ref{th:hofer} and the CLT for vincular patterns. \begin{conjecture} \label{conj:vinc} For every vincular pattern $\sigma$ with $j$ blocks and every $1\leq l\leq M_{\underline{\sigma}}$, \begin{equation} \label{eq:conj} b'_{\sigma}(2k-l,2j-1)>\frac{\binom{2k-l}{k}}{k_{(l)}}c_{\sigma ,l}, \end{equation} where $c_{\sigma ,l}\coloneqq$ the number of possible configurations for a merge of two copies of $\underline{\sigma}$, such that the minimum of the sizes of the two merged blocks is $l$ and $b'_{\sigma}(2k-l,2j-1)$ is the number of merges of two copies of $\underline{\sigma}$ with $l$ common elements and $2j-1$ blocks, such that they correspond to one of the same $c_{\sigma ,l}$ configurations. \end{conjecture} Indeed, it suffices to note that $\sum_{l=1}^{M_{\underline{\sigma}}}c_{\sigma ,l} = \binom{2j-1}{j}j$ and that $\frac{\binom{2k-l}{k}}{k_{(l)}} = \frac{\binom{2k}{k}}{(2k)_{l}}$. Thus, if we sum up Inequality \eqref{eq:conj} over $l$, we get Inequality \eqref{eq:lemmaVinc} with $b_{\sigma}$ replaced with $b'_{\sigma}$. Since $b_{\sigma}(2k-l,2j-1)\geq b'_{\sigma}(2k-l,2j-1)$, for all $l,j$ and $k$, Conjecture \ref{conj:vinc} would indeed imply Inequality \eqref{eq:lemmaVinc}. The ratio $\frac{\binom{2k-l}{k}}{k_{(l)}}$ is the expected number of merges when we fix one of the $c_{\sigma ,l}$ configurations and when we merge $\underline{\sigma}$ and $\underline{\sigma'}$, where $\sigma'\in S_k$ is a permutation selected uniformly at random and $\underline{\sigma'}$ has the same block structure as $\underline{\sigma}$. Therefore, Inequality \eqref{eq:conj} can be written as \begin{equation} b'_{\sigma}(2k-s,2j-1)>\mathbb{E}(b'_{\sigma,\sigma'}(2k-s,2j-1)), \end{equation} where $b'_{\sigma,\sigma'}(2k-s,2j-1)$ is defined analogously to $a_{\sigma,\sigma'}(2k-1)$. \subsection{Bivincular patterns} \label{subsec:bivinc} In the general case when $\underline{P}$ is a pattern for which $\boldsymbol{D}(\underline{P})$ might be non-empty, we do not necessarily have asymptotic normality of the distribution of $\cnt_{\underline{P}}$. For example, $\cnt_{\scaleto{\Vectorstack{\overline{12} \underline{21}}}{15pt}}$, which is the adjacency statistic $\adj$ introduced in Section \ref{sec:descents}, has Poisson distribution with mean $1$. This follows from a result proved by Wolfowitz \cite{wolfowitz} and independently by Kaplansky \cite{kaplansky} in the 1940s. They showed that if $X$ denotes the pairs of numbers $a$, $a+1$ that have consecutive positions in a permutation in $S_n$ that is chosen uniformly at random, then $X$ is asymptotically Poisson distributed with mean $2$. In 2014, Corteel et al. \cite{corteel} give another proof of this result that uses the method of Chen, which is used to prove convergence to Poisson distribution and which is an adaptation of the method of Stein for convergence to normal distribution \cite{stein}. Roughly, the method of Chen can be applied when one considers a sum of Bernoulli random variables such that many of them are independent. The article \cite{arratia} contains an accessible introduction and some good examples. Here, we reprove the fact that the asymptotic distribution of $\adj$ is Poisson with mean $1$ by using Theorem \ref{th:adj} and the Fr\'{e}chet-Shohat Theorem given below. \begin{theorem}[{\cite[Theorem 30.2]{momMeas}}] \label{th:FrSh} Suppose that the distribution of $X$ is determined by its moments and that $X_{n}$ have moments of all orders. Suppose also that $\lim_{n\to \infty}\mathbb{E}(X_{n}^{r}) = \mathbb{E}(X^{r})$, for $r=1,2,\ldots$. Then, $X_n$ converges in distribution to $X$. \end{theorem} \begin{definition} The discrete random variable $X\coloneqq\Po(\lambda)$ is said to have a Poisson distribution, with parameter $\lambda>0$, if \[ \mathbb{P}(X=k) = \frac{\lambda^{k}e^{-\lambda}}{k!},\qquad \text{for }k=0,1,\ldots \] \end{definition} \begin{theorem} As $n\to \infty$, $\adj$ converges in distribution to $\Po(1)$. \end{theorem} \begin{proof} The Poisson measure is determined by its moments. One can deduce that using \cite[Theorem 30.1]{momMeas}. Because of Theorem \ref{th:FrSh}, it suffices to show that $\mathbb{E}(\adj^{r})$ converges to the $r$-th moment of $Po(1)$, when $n\to \infty$. A well-known fact is that the $r$-th moment of the Poisson distribution with mean $1$ is the $r$-th Bell number $B_{r} = \sum\limits_{k=1}^{r}S(r,k)$, where $S(r,k)$ is the \emph{Stirling number of the second kind} (for more details, see \cite{pitman}). Looking at the double sum expression for $\mathbb{E}(\adj^{r})$ obtained in Theorem \ref{th:adj}, we see that every summand is a product of terms not including $n$ and the term $\frac{(\binom{n-(m-u)}{u})^{2}}{n_{(m)}}$ is $\mathcal{O}(1)$, unless $u = \frac{m}{2}$. Thus, when $n\to \infty$, we can look only at the terms corresponding to even values of $m$, i.e., $m=2m_{1}$ for some $m_{1} = 1,\ldots ,r$ and $u = \frac{m}{2} = m_{1}$. Since $\lim\limits_{n\to\infty} \frac{\binom{n-m_{1}}{m_{1}}^{2}}{n_{(2m_{1})}} = \frac{1}{(m_{1}!)^{2}}$ and $\sum\limits_{i=0}^{k}(-1)^{i}\binom{k}{i}(k-i)^{r} = k!S(r,k)$ , we obtain the following. \begin{equation*} \begin{split} \lim_{n\to\infty} \mathbb{E}(\adj^{r}) = \sum\limits_{m_{1}=1}^{r}\left(\sum\limits_{w=0}^{m_{1}}(-1)^{w}\binom{m_{1}}{w}(m_{1}-w)^{r}\right)m_{1}!\frac{1}{(m_{1}!)^{2}} = \\ = \sum\limits_{m_{1}=1}^{r}\frac{\sum\limits_{w=0}^{m_{1}}(-1)^{w}\binom{m_{1}}{w}(m_{1}-w)^{r}}{m_{1}!} = \sum\limits_{m_{1}=1}^{r} S(r,m_{1}) = B_{r}. \end{split} \end{equation*} \end{proof} It would be interesting to investigate which are the possible asymptotic distributions of $\cnt_{\underline{P}}$ for other bivincular patterns? This question has been already stated in \cite[Section 1]{hofer}, where some approaches were also suggested. \section{Patterns with linear valuation polynomials} \label{sec:lin_val_polynomials} In this section, we obtain direct formulas for $M(f_{\underline{P},Q},n)$ in three special cases using linearity of expectation. \begin{theorem} \label{th:linearity} Consider a simple statistic with a valuation polynomial $Q(s,w)=Q_1(s)Q_2(w)$. The following three formulas for $M(f_{\underline{P},Q},n)$ hold in the described cases for $Q_{1}$, $Q_{2}$, $|\boldsymbol{C}(\underline{P})|$ and $|\boldsymbol{D}(\underline{P})|$. \captionsetup[table]{name=Table} \begin{table}[h!] \renewcommand\thetable{1} \centering \captionsetup{position=below} \scalebox{0.7}{ \begin{tabular}{|c|c|c|c|c|c|} \hline \textbf{Formula} & \boldmath{$Q_1(s)$} & \boldmath{$Q_2(w)$} & \boldmath{$|C(P)|$} & \boldmath{$|D(P)|$} & \boldmath{$M(f_{\underline{P},Q},n)=\sum\limits_{\sigma\in S_{n}}\sum\limits_{s\in_{P}\sigma}Q_{1}(s)Q_{2}(w)$} \\ \hline\hline 1 & $a_{0} + a_{1}s_{1} + \ldots + a_{k}s_{k}$ & 1 & c & 0 & $\binom{n}{k}\binom{n-c}{k-c}(n-k)!(a_{0} + \frac{n+1}{k+1}\sum\limits_{i=1}^{k}ia_{i})$ \\ \hline 2 & 1 & $b_{0} + b_{1}w_{1} + \ldots + b_{k}w_{k}$ & 0 & d & $\binom{n}{k}\binom{n-d}{k-d}(n-k)!(a_{0} + \frac{n+1}{k+1}\sum\limits_{j=1}^{k}jb_{j})$ \\ \hline 3 & $a_{0} + a_{1}s_{1} + \ldots + a_{k}s_{k}$ & $b_{0} + b_{1}w_{1} + \ldots + b_{k}w_{k}$ & 0 & 0 & $\binom{n}{k}^{2}(n-k)!(a_{0} + \frac{n+1}{k+1}\sum\limits_{i=1}^{k}ia_{i})(b_{0} + \frac{n+1}{k+1}\sum\limits_{j=1}^{k}jb_{j})$ \\ \hline \end{tabular} } \caption{Formulas for $M(f_{\underline{P},Q},n)$ obtained with linearity of expectation in some special cases} \label{table:M} \end{table} \end{theorem} \begin{proof} Consider the first row of Table \ref{table:M}. We have linear polynomial $Q_{1}$, constant $Q_{2}(w)=1$, $|\boldsymbol{C}(\underline{P})|=c$ for a given constant $c$ and $|\boldsymbol{D}(\underline{P})|=0$. One can write $M(f_{\underline{P},Q},n) =\\ \sum\limits_{\sigma\in S_{n}}\sum\limits_{s\in_{p}\sigma}Q(s,w)= \sum\limits_{\sigma\in S_{n}}\sum\limits_{s\in_{p}\sigma}Q_{1}(s) = \mathbb{E}(Q_{1}^{*})n!$, where $Q_{1}^{*}$ is a random variable defined over each $\sigma\in S_{n}$ as the sum of the $Q_{1}$-valuations for each occurrence of $\underline{P}$ in $\sigma$. Formally, $Q_{1}^{*}(\sigma) = \sum\limits_{s\in_{P}\sigma}Q_{1}(s)$. Let $v$ be the number of possible $k$-tuples of positions for the elements of the occurrences $s$ in $\sigma$, enumerated with $1,2,\ldots ,v$. We will use that \[ Q_{1}^{*}(\sigma) = Q^{*}_{1,1}(\sigma) + Q^{*}_{1,2}(\sigma) + \cdots + Q^{*}_{1,v}(\sigma), \] where for each $j\in [v]$: \[ Q^{*}_{1,j}(\sigma) \coloneqq \begin{cases} Q_{1}(s),\text{ if $s\in_{P}\sigma$ and $s_{1},\ldots s_{k}$ appear in $\sigma$ at the $k$ positions indexed by $j$. }\\ 0, \text{otherwise}. \end{cases} \] We have $v = \binom{n-c}{k-c}$ since $|\boldsymbol{D}(\underline{P})| = 0$ and since for each $i\in \boldsymbol{C}(\underline{P})$, one can look at $P_{i}$ and $P_{i+1}$ as a single element. Due to symmetry, we have $\mathbb{E}(Q^{*}_{1,i}) = \mathbb{E}(Q^{*}_{1,j})$ for each $1\leq i,j\leq v$. Thus, using the linearity of expectation, we have \[ \mathbb{E}(Q_{1}^{*}) = \sum\limits_{r=1}^{v}\mathbb{E}(Q_{1,r}^{*}) = \binom{n-c}{k-c}\mathbb{E}(Q^{*}_{1,1}), \] where the $k$-tuple with number $1$ comprises the first $k$ possible positions for an occurrence of $\underline{P}$ in $\sigma$. We will show that \begin{equation} \label{eq:Q1} \mathbb{E}(Q^{*}_{1,1}) = \frac{a_{0} + \frac{n+1}{k+1}\sum\limits_{i=1}^{k}ia_{i}}{k!}. \end{equation} We have $\mathbb{E}(Q^{*}_{1,1}) = \frac{\mathbb{E}(Q_{1}(s))}{k!}$, where $s = (s_{1},\ldots ,s_{k})$ and $s_{1}< \cdots <s_{k}$ is a random $k$-subset of $[n]$. Since $Q(s) = a_{0} + a_{1}s_{1} + \cdots + a_{k}s_{k}$, we can use the linearity of expectation one more time to get $\mathbb{E}(Q_{1}(s)) = a_{0} + \sum\limits_{1}^{k} a_{i}\mathbb{E}(s_{i})$, where $s_{i}$ is the $i$-th ordered statistic for a $k$-sample without replacement from $[n]$. Therefore, \[ \mathbb{E}(s_{i}) = \sum\limits_{j=i}^{n-(k-i)}j\frac{\binom{j-1}{i-1}\binom{n-j}{k-i}}{\binom{n}{k}} = \frac{i}{\binom{n}{k}}\sum\limits_{j=i}^{n-(k-i)}\binom{j}{i}\binom{n-j}{k-i} = i\frac{\binom{n+1}{k+1}}{\binom{n}{k}} = i\frac{n+1}{k+1}. \] This establishes Equation \eqref{eq:Q1}. Formula 2 for $M(f_{\underline{P},Q},n)$, under the conditions listed in the second row of Table \ref{table:M}, can be obtained in a similar way. To obtain Formula 3, a different transformation is used. In particular, \begin{equation*} M(f_{\underline{P},Q},n) = \sum\limits_{\sigma\in S_{n}}\sum\limits_{s\in_{p}\sigma}Q(s,w) = \sum\limits_{\sigma\in S_{n}}\sum\limits_{s\in_{p}\sigma}Q_{1}(s)Q_{2}(w) = \mathbb{E}(Q_{1}^{*}Q_{2}^{*})n!, \end{equation*} where $Q_{1}^{*}$ and $Q_{2}^{*}$ are random variables defined over $S_{n}$ as $Q_{1}^{*}(\sigma) = \sum\limits_{s\in_{P}\sigma}Q_{1}(s)$ and $Q_{2}^{*}(\sigma) = \sum\limits_{\substack{s\in_{P}\sigma \\ \sigma(w_{i})=s_{i}}}Q_{2}(w)$. Furthermore, let us also enumerate the possible $k$-tuples of values for an occurrence $s=(s_{1},\dots ,s_{k})$ with $s^{(1)},s^{(2)},\ldots ,s^{(\binom{n}{k})}$ and let $w^{(1)},w^{(2)},\ldots ,w^{(\binom{n}{k})}$ enumerates the possible $k$-tuples of positions for $s_{1},\dots ,s_{k}$ in an $n$-permutation $\sigma$. In addition, for $i,j\in [\binom{n}{k}]$, let $Q^{*}_{1,i,j}(\sigma) = Q_{1}(s^{(i)})$, if the values $s^{(i)}$ are at positions $w^{(j)}$ in $\sigma$ and let $Q^{*}_{1,i,j}(\sigma) = 0$ otherwise. Similarly, let $Q^{*}_{2,i,j}(\sigma) = Q_{2}(w^{(j)})$, if the values $s^{(i)}$ are at positions $w^{(j)}$ in $\sigma$ and let $Q^{*}_{2,i,j}(\sigma) = 0$ otherwise. Then, \begin{equation*} \mathbb{E}(Q_{1}^{*}Q_{2}^{*})n! = n!\sum\limits_{i=1}^{\binom{n}{k}}\sum\limits_{j=1}^{\binom{n}{k}}\mathbb{E}[Q^{*}_{1,i,j}Q^{*}_{2,i,j}] = n!\sum\limits_{i=1}^{\binom{n}{k}}\sum\limits_{j=1}^{\binom{n}{k}}\frac{1}{\binom{n}{k}k!}Q_{1}(s^{(i)})Q_{2}(w^{(j)}). \end{equation*} Thus, \begin{equation*} M(f_{\underline{P},Q},n) = (n-k)!\sum\limits_{i=1}^{\binom{n}{k}}\big(Q_{1}(s^{(i)})\sum\limits_{j=1}^{\binom{n}{k}}Q_{2}(w^{(j)})\big) = (n-k)!(\sum\limits_{i=1}^{\binom{n}{k}}Q_{1}(s^{(i)}))(\sum\limits_{j=1}^{\binom{n}{k}}Q_{2}(w^{(j)})). \end{equation*} Equation \eqref{eq:Q1} gives us $\sum\limits_{i=1}^{\binom{n}{k}}Q_{1}(s^{(i)}) = \binom{n}{k}\frac{a_{0} + \frac{n+1}{k+1}\sum\limits_{i=1}^{k}ia_{i}}{k!}$, $\sum\limits_{j=1}^{\binom{n}{k}}Q_{2}(w^{(j)}) = \binom{n}{k}\frac{b_{0} + \frac{n+1}{k+1}\sum\limits_{j=1}^{k}jb_{j}}{k!}$ and formula 3 follows. \end{proof} \begin{example} $n=3$, $k=2$, $P=21$, $\boldsymbol{C}(\underline{P}) = \{1\}$, $\boldsymbol{D}(\underline{P}) = \emptyset$, $Q_{1}(s) = 3y_{1} + y_{2}$, $Q_{2}(w) = 1$. \\ Then, we have $v = \binom{2}{1}$ possible sets of positions for an occurrence of the pattern, namely $(1,2)$ and $(2,3)$. One can readily check that $M(f_{\underline{P},Q},n) = \sum\limits_{\sigma\in S_{n}}\sum\limits_{s\in_{P}\sigma}Q_{1}(s) = 40$. Formula 1 in table \ref{table:M} indeed gives the same value. \end{example} To obtain $M(f_{\underline{P},Q},n)$ when $Q$ is of higher degree, one should be able to evaluate expectations of the kind $\mathbb{E}(s_{i_{1}}^{r_{1}}\cdots s_{i_{u}}^{r_{u}})$, where $\{s_{i_{1}},\ldots s_{i_{u}}\}$ is a random subset of $[n]$ with $u$ elements. To do that, one might use the theory of Ordered statistics (see \cite[Chapter 3.7]{ordStat}). \section{Further questions} We discuss three interesting further questions related to the results in the previous sections: \setlist[itemize]{label=\rule[0.5ex]{0.6ex}{0.6ex}} \begin{itemize} \item Can we improve the bounds for the number of terms in Equation \eqref{T-ext-form}, Theorem \ref{th:simpleStat} and for the number of terms in Equation \eqref{eq:linearFormMain}, Theorem \ref{th:main}? Some computational evidence suggests that this might be possible. \item Can we prove the CLT for vincular patterns by giving either a combinatorial or algebraic proof to Equation \eqref{eq:lemmaVinc} in Theorem \ref{th:vinc}? \item Theorem \ref{th:main} shows that the aggregate of any permutation statistic is a linear combination of shifted factorials with constant coefficients. Similarly, in \cite{matchings}, Khare et al. showed that any statistic on matchings is a linear combination of double factorials with constant coefficients, whereas for statistics on the more general structure of set partitions, Chern et al. ~\cite{partitions} showed that we have linear combinations of shifted Bell numbers with polynomial coefficients. These facts suggest that most probably, there exists a combinatorial structure generalizing permutations, for which the aggregates of the statistics on it can be written as linear combinations of factorials with polynomial coefficients. Can we find such a structure, e.g., posets or polyominoes? \end{itemize} \section*{Acknowledgement} We are grateful to professor Catherine Yan and to professor Perci Diaconis for suggesting to us this approach for studying patterns in combinatorial structures. We are also thankful to Alexander Burstein for the helpful discussions over the results in Section \ref{sec:CLTs}.
\section{Introduction} Two-dimensional (2D) materials in single or few-layer form have great potential as nanometer thin building blocks for flexible and wearable (opto)electronic and photonic~\cite{wang2012electronics, seo2019fully, manzeli20172d} devices. Concrete examples of promising devices based on 2D transition metal dichalcogenides (TMDs) are photodetectors~\cite{LopezSanchez2013, du2020ultrathin}, transistors~\cite{Roy2014, chuang2016low}, gas sensors~\cite{Yang2017gas, jha2019mose2}, and thermoelectric generators~\cite{oh2016chemically}. Many of these applications rely on the remarkable properties of van der Waals crystals that appear upon reaching, or approaching, the monolayer thickness limit. Examples are the crossover from indirect to direct bandgap at the monolayer limit of MoS$_2$~\cite{mak2010atomically} and other TMDs, a metal-to-semiconductor transition in PtSe$_2$~\cite{ciarrocchi2018thickness}, mechanical softening of MoSe$_2$ films~\cite{babacic2021thickness}, and layer-dependent magnetic phases in CrI$_3$~\cite{Huang2017}. The ability to control the thickness of layered materials allows one to engineer their electrical, optical, mechanical and magnetic properties. The thermal properties of layered materials have so far received less attention than their electronic and optical counterparts, although several remarkable and exotic thermal transport phenomena have been found. Interesting observations are the ultrahigh in-plane thermal conductivity of graphene~\cite{balandin2008superior} and hexagonal boron nitride (hBN)~\cite{cai2019high}, the highly anisotropic thermal conductivity of TMDs~\cite{jiang2017probing}, and the occurrence of second sound in graphite~\cite{Huberman2019}. However, there are still many open questions concerning the very basic, yet critical, thermal transport properties of TMDs at room temperature~\cite{Zhao2020}. In particular, experimental values of the in-plane lattice thermal conductivity $\kappa$ vary substantially, ranging from 6~Wm$^{\shortminus1}$K$^{\shortminus1}$~\cite{zobeiri2019frequency} to 59~Wm$^{\shortminus1}$K$^{\shortminus1}$~\cite{zhang2015measurement} for MoSe$_2$, and it is not clear how the thermal conductivity changes with the thickness of TMD flakes~\cite{easy2021experimental, bae2017thickness, yuan2018nonmonotonic}. A systematic experimental study with a broad range of thicknesses is lacking. Moreover, the calculated thermal conductivities extracted from atomistic simulations also give scattered results, ranging from 17.6~Wm$^{\shortminus1}$K$^{\shortminus1}$~\cite{C5RA19747C} to 54~Wm$^{\shortminus1}$K$^{\shortminus1}$~\cite{Gu2014dft} for monolayer MoSe$_2$. Also in the theoretical approaches, a systematic thickness variation is lacking, as most studies focused either on monolayer or bulk MoSe$_2$. The effect of the environment on thermal transport in TMDs has furthermore not received much attention, despite that a significant effect was observed for graphene~\cite{chen2011raman}. This situation for MoSe$_2$ is representative for all layered materials in the TMD family~\cite{Zhao2020}. Performing reliable experimental and theoretical thermal transport studies over a broad thickness range, down to the molecular monolayer, is challenging. Experimental approaches can be susceptible to thickness-dependent artefacts, and require reproducible fabrication of a large number of clean samples with the required thicknesses. Theoretical approaches based on molecular dynamics simulations are limited in accuracy by the choice of empirical interatomic potentials, while \textit{ab initio} simulations often examine phonons at zero temperature, rather than at room temperature, and simulations of thicknesses other than monolayer and bulk are computationally costly. In this work, we overcome these challenges and reach a deep understanding of thermal transport properties of TMD crystals. In particular, we establish how the in-plane lattice thermal conductivity $\kappa$ depends on crystal thickness, that is, the number of molecular layers. For this, we systematically vary the thickness down to the monolayer limit, both in experiment and simulations. Whereas we focus on MoSe$_2$ crystals, the obtained results are representative for other TMDs. In our experimental approach, we exploit the widely used technique of Raman thermometry, where we identify and eliminate important artefacts that can have a strong influence on the experimentally obtained thermal conductivity. In our theoretical approach, we perform \textit{ab initio} simulations based on density functional theory and Boltzmann transport theory, including anharmonic renormalization yielding accurate results also at room temperature. We employ SIESTA~\cite{Soler_2002, siesta}, which is particularly suitable for atomistic simulations with a large number of atoms, such that we can obtain results up to several molecular layers. We find that the main contribution to the in-plane thermal conductivity in few-layer MoSe$_2$ comes from phonon modes centered around 1~THz. Towards the monolayer limit, the contribution of these modes decreases substantially, as there are fewer modes and the phonon lifetimes decrease. These effects are counteracted by the appearance of ``surface'' modes well below 1~THz and with exceptionally long mean free path (MFP) of several micrometers, which contribute substantially to thermal transport. This results in an in-plane thermal conductivity that is mostly constant up to a thickness of $\sim$10 layers, with $\kappa$ $\sim$20~Wm$^{\shortminus1}$K$^{\shortminus1}$ ($\sim$25~Wm$^{\shortminus1}$K$^{\shortminus1}$) according to experiment (simulation), after which it increases progressively towards $\sim$40~Wm$^{\shortminus1}$K$^{\shortminus1}$ for bulk (experiment and simulation). We furthermore find that thermal transport is strongly affected by the material's environment, in particular for monolayer crystals, where $>$80\% of the thermal power is lost through out-of-plane heat dissipation to surrounding molecules. We extract a remarkably large heat transfer coefficient $h_{\rm c}$ up to 30,000 Wm$^{\shortminus2}$K{$^{\shortminus1}$} for monolayer MoSe$_2$. \section{Results and Discussion} \subsection*{Experimental approach} One of the most common methods to study thermal properties of thin films is Raman thermometry~\cite{zhang2015measurement, bae2017thickness, yuan2018nonmonotonic, easy2021experimental}, where a laser beam serves both as a heater and a thermometer. The thermometer works via Raman scattering of the laser light, where the frequency shift of a temperature-calibrated Raman mode serves as a probe of the local temperature of a suspended sample. This technique benefits from a relatively simple implementation, contactless nature, and no stringent sample requirements, apart from the presence of a temperature-sensitive Raman active mode. In our experiments (see Methods for details), we use continuous wave (CW) light with a wavelength of 532~nm to heat a local spot with a $1/e$ spot size $r_0$ of $\sim$1~$\upmu$m in the center of a suspended MoSe$_2$ crystal (see Fig.~\ref{fig:FIG1}\textbf{a-b}). Subsequent cooling occurs -- in the ideal situation -- by radial, diffusive flow of heat towards the edge of the suspended region of the crystal, where the substrate acts as a heat sink. We then probe the temperature at the location of the laser spot, corresponding to the steady-state situation where laser-induced heating is compensated by cooling through heat flow and subsequent heat sinking. Thus, a higher (lower) steady-state temperature indicates less (more) efficient cooling, which in turn implies a lower (higher) $\kappa$. For thin exfoliated TMD flakes with high crystallinity the obtained $\kappa$ corresponds to in-plane transport, as the out-of-plane thermal conductivity is typically more than an order of magnitude lower~\cite{jiang2017probing}. \begin{figure*}[htbp] \centering \includegraphics[width=\linewidth]{ink_FIG1_v9.png} \caption{\textbf{Concept of the thermal transport experiments and investigated samples.} \textbf{a)}~Schematic representation of a suspended trilayer MoSe$_2$ crystal in vacuum, where absorbed 532~nm laser light in the center of the suspended region leads to local heating, and subsequent heat spreading towards the heat sink at the edge of the suspended region, establishing a steady state temperature profile that depends on the in-plane thermal conductivity $\kappa$. \textbf{b)}~In air, additional out-of-plane dissipation occurs. \textbf{c)}~Optical reflection images of suspended MoSe$_2$ flakes with a thickness varying from monolayer to $\sim$70 layers, suspended over gold-coated substrates with circular holes with a radius of 7.5~$\upmu$m (black/grey central circle), inside Si$_3$N$_4$ membranes (yellow squares). Several flakes have regions with different thicknesses, yet the thickness is uniform in the suspended region in all cases. \textbf{d)}~Images of monolayer flakes that were transferred onto gold-coated substrates with holes with a radius of 2.5 and 5~$\upmu$m, used to study the effect of hole size. \textbf{e)}~Images of flakes that were transferred onto bare 200~nm thick Si$_3$N$_4$ membranes without gold coating, used to study the effect of varying heat sinking properties of the substrate. The 50~$\upmu$m scale bar is common for panels \textbf{(c)}, \textbf{(d)} and~\textbf{(e)}.} \label{fig:FIG1} \end{figure*} We use exfoliated MoSe$_2$ crystals suspended over substrates with a circular hole, fabricated using dry transfer, as described in the Methods. This fabrication method leads to crystalline, residue-free, suspended crystals, as shown in Ref.~\cite{Varghese2021b}, which allows us to probe the intrinsic material properties of MoSe$_2$ crystals. We vary the thickness from monolayer (1L) up to $\sim$70 layers (70L), fully covering the 1L to 5L range (see Fig.~\ref{fig:FIG1}\textbf{c$-$e}). This corresponds to a thickness ranging from 0.7~nm up to $\sim$50~nm. We carefully determined these thicknesses using a combination of optical contrast, atomic force microscopy and photoluminescence measurements (see Supporting Fig.~\ref{fig:FIGS1}). Importantly, we use more than one sample with the same thickness in the 1L to 3L regime, including four bilayer samples, in order to assess the reproducibility of both our samples and our experimental technique. We suspend the flakes over circular holes with a radius of 7.5~$\upmu$m, in the centre of 200~nm thick Si$_3$N$_4$ membranes that are coated with a 50~nm thick layer of gold (see Fig.~\ref{fig:FIG1}\textbf{c}). For comparison, we also study monolayer samples suspended over smaller holes (see Fig.~\ref{fig:FIG1}\textbf{d}), and flakes with varying thickness, transferred on Si$_3$N$_4$ substrates without gold coating (see Fig.~\ref{fig:FIG1}\textbf{e}), aimed at understanding the effect of the substrate on the extracted thermal conductivity. \begin{figure*}[htbp] \centering \includegraphics[width=\linewidth]{ink_FIG2_v1.png} \caption{\textbf{Raman thermometry of a suspended monolayer MoSe$_2$.} \textbf{a)}~Schematic representation of the A$_{\rm 1g}$ mode of MoSe$_2$. \textbf{b)}~Raman spectra at 532~nm for increasing laser power $P$, showing an increasing red-shift of the A$_{\rm 1g}$ mode due to laser-induced heating. \textbf{c)}~Calibration measurements of Raman spectra at 532~nm for increasing sample temperature of the sample stage, showing an increasing red-shift. Here, the laser power was kept very low, in order to avoid laser-induced heating. For similar measurements on thicker flakes, see Supporting Figs.~\ref{fig:FIG-rawP_vacuum} and~\ref{fig:temp_calib}.} \label{fig:FIG2} \end{figure*} We perform Raman thermometry measurements on all the suspended MoSe$_2$ samples shown in Fig.~\ref{fig:FIG1}\textbf{c$-$e}, exploiting the temperature-sensitive $A_{\rm 1g}$ Raman mode (see Fig.~\ref{fig:FIG2}\textbf{a}). In Fig.~\ref{fig:FIG2}\textbf{b}, we show how the peak frequency of this mode shifts with laser power at the sample position, $P$, for monolayer MoSe$_2$ (see Supporting Fig.~\ref{fig:FIG-rawP_vacuum} for the results for other thicknesses): a higher laser power induces a larger temperature increase $\Delta T$, and therefore a larger red-shift. We correlate the red-shift of the A$_{\rm 1g}$ peak, $\Delta\nu$, with the increase in temperature, $\Delta T$, by measuring the Raman spectrum at very low incident power, while varying the temperature of the crystal using a controlled sample stage (see Fig.~\ref{fig:FIG2}\textbf{c} for monolayer MoSe$_2$, and Supporting Fig.~\ref{fig:temp_calib} for the results for other thicknesses). We find that the temperature coefficients $\chi_{\rm T} = \partial\nu / \partial T$ change from $\shortminus 0.007$~cm$^{\shortminus 1}$/K for bulk to $\shortminus 0.015$~cm$^{\shortminus 1}$/K for monolayer MoSe$_2$ (see Supporting Table~\ref{tab:tab1}). We then use these temperature coefficients to convert the laser-induced red-shift $\Delta \nu$ of the peak of the Raman signal into a local temperature rise that depends on laser power $\Delta T (P)$. In order to extract the in-plane thermal conductivity, we perform a linear fit to the extracted $\Delta T$ as a function of absorbed laser power $P_{\rm abs}$, obtaining the slope $\partial T/\partial P_{\rm abs}$, and then use the following equation, following Ref.~\cite{cai2010thermal}: \begin{equation} \kappa = \alpha \cdot \frac{1}{2 \pi d} \cdot \left ( \frac{\partial T}{\partial P_{\rm abs}} \right )^{-1} \cdot \ln\left({\frac{R}{r_0}}\right) \hspace{0.25cm}, \label{eq:1} \end{equation} where $R$ is the hole radius, $r_0$ is the laser spot radius, and $\alpha$ is a prefactor that is a function of the ratio $R / r_0$. For our experimental conditions, $\alpha \approx 1$~\cite{cai2010thermal}. This equation for $\kappa$ is valid when the only cooling channel is in-plane diffusive heat transport to the edge of a circular suspended material, where perfect heat-sinking occurs, such that the crystal is at ambient temperature. The accurate extraction of $\kappa$ relies on knowledge of the laser spot size $r_0$ and the optical absorption of each of the flakes, which were measured independently (see Methods). We confirmed the validity of Eq.~(\ref{eq:1}) using a numerical simulation of the Raman thermometry experiment (see Supporting Fig.~\ref{fig:Alex1}). \begin{figure*}[htbp] \centering \includegraphics[width=\linewidth]{ink_FIG3_v1.png} \caption{\textbf{Artefact identification and elimination.} \textbf{a)}~Temperature increase $\Delta T$ as a function of absorbed power $P_{\rm abs}$ for 17L flakes on substrates without gold coating (red crosses and red shaded area) and with gold coating (green circles and green shaded ares). Gold coating improves heat sinking to the substrate, and therefore gives a more reliable estimate of the intrinsic $\kappa$ of MoSe$_2$. \textbf{b)}~Side-view schematic of substrate with artefacts due to reduced heat sinking. \textbf{c)}~Temperature increase, normalized by $\ln{(R/r_0)}$, as a function of absorbed power $P_{\rm abs}$ for 1L flakes on substrates with hole diameters of 5~$\upmu$m (red crosses), 10~$\upmu$m (blue pentagons) and 15~$\upmu$m (green circles). The smallest hole size leads to an overestimation of $\kappa$, likely due to an overestimation of $P_{\rm abs}$ due to beam clipping on the hole. \textbf{d)}~Side-view schematic of substrate with artefacts due to insufficiently large hole size. \textbf{e)}~Side-view schematic of artefact-free substrate. } \label{fig:FIG3} \end{figure*} \subsection*{Experimental approach: eliminating substrate-induced artefacts} Before presenting the results of the intrinsic thermal conductivity of MoSe$_2$ crystals, we demonstrate how substrate properties can affect the extracted thermal conductivity, leading to a non-intrinsic, apparent, thermal conductivity $\kappa_{\rm app}$ (see Supporting Fig.~\ref{fig:FigS-coating}). In Fig.~\ref{fig:FIG3}\textbf{a}, we compare the results for two suspended flakes with a thickness of 17L placed on Si$_3$N$_4$ substrates with and without 50~nm gold-coating. We observe a much higher $\Delta T$ for the substrate without gold coating, which we ascribe to less efficient heat sinking. We confirm this difference in heat sinking efficiency by measuring, with relatively high incident power, on the substrate-supported regions, where $\Delta T$ is larger for the non-coated substrate than for the gold-coated substrate (see Supporting Fig.~\ref{fig:FigS-coating}\textbf{b}). The main reason for this is likely that the thermal conductivity of gold is larger than that of thin Si$_3$N$_4$ films~\cite{Zhang1995}. Using scanning thermometry, with typical incident laser powers, we furthermore find a significant temperature increase on the suspended region and no visible temperature increase on the supported region (see Supporting Fig.~\ref{fig:FigS-coating}\textbf{c}). We conclude that heat sinking to the gold-coated sample is efficient, implying that the requirements for using Eq.~(\ref{eq:1}) are met, and thus we obtain the intrinsic thermal conductivity $\kappa$. The less efficient heat sinking of the non-coated substrate leads to more heat accumulation on the suspended region of the flake and therefore a reduced apparent thermal conductivity $\kappa_{\rm app}$ when using Eq.~(\ref{eq:1}), as illustrated in Fig.~\ref{fig:FIG3}\textbf{b}. Since in this case the boundary conditions used to arrive at Eq.~(\ref{eq:1}) are not fulfilled, one should use a modified version of Eq.~(\ref{eq:1}), taking into account, for example, the thermal boundary conductance between MoSe$_2$ and the substrate material, and the substrate's thermal conductivity. However, this requires accurate knowledge of such material parameters, which likely introduces additional uncertainty and, possibly, errors in the obtained conductivity. We conclude that it is crucial to use gold-coated substrates, as this leads to efficient heat sinking, such that Eq.~(\ref{eq:1}) is valid. To study possible substrate-induced artefacts related to hole size, we fabricated monolayer MoSe$_2$ flakes suspended over holes with a radius of 2.5, 5 and 7.5~$\upmu$m on gold-coated substrates (see Methods for fabrication details). Figure~\ref{fig:FIG3}\textbf{c} shows the temperature increase for these suspended monolayer flakes, where we normalize to the $\ln{(R/r_0)}$-factor, such that the slope is (inversely) proportional to $\kappa$ (see Eq.~(\ref{eq:1})). We find comparable results for holes with a radius of 5 and 7.5~$\upmu$m, while the sample with the 2.5-$\upmu$m hole gives rise to a lower $\Delta T$, and therefore a higher $\kappa_{\rm app}$. Raman thermometry measurements on crystals suspended over small holes are prone to several possible artefacts. It is possible that phonons with a relatively long mean free path are restricted by the size of the suspended region, which would lead to an underestimation of $\kappa$. For small hole sizes, any non-ideal heat sinking of the substrate-supported region of the crystal will also have a larger effect, because the smaller circumference implies a smaller region at the edge of the suspended crystal for heat sinking, leading to an underestimation of $\kappa$. Finally, laser absorption by the suspended crystal can be overestimated, as part of the incident light can be clipped by the small hole, as illustrated in Fig.~\ref{fig:FIG3}\textbf{d}, leading to an overestimation of $\kappa$. Since we find an apparent thermal conductivity for the 2.5-$\upmu$m hole that is more than two times larger than the intrinsic $\kappa$ we find using the larger holes, we attribute the artefact we observe for small holes to an error in determining $P_{\rm abs}$. A possible way to overcome this problem is to use a smaller laser spot size. However, this can introduce additional complications, such as non-diffusive heat transport~\cite{chiloyan2020nonfourier}, and does not resolve the other possible artefacts induced by small holes. We conclude that it is crucial to use gold-coated substrates with relatively large holes, with a radius of at least 5~$\upmu$m (see Fig.~\ref{fig:FIG3}\textbf{e}). \subsection*{Experimental approach: effect of thickness} \begin{figure*}[htbp] \centering \includegraphics[width=\linewidth]{ink_FIG4_v0.png} \caption{\textbf{Raman thermometry of MoSe$_2$ as a function of crystal thickness.} \textbf{a)} Temperature rise $\Delta T$ as a function of absorbed power $P_{\rm abs}$ for MoSe$_2$ crystals of varying thickness. \textbf{b)} The same data as in panel \textbf{a}, now multiplied by the thickness of each crystal, such that the slope is representative of $\kappa$. Each layer thickness has its own corresponding color (see color bars). Solid lines are linear fits to the data.} \label{fig:FIG4} \end{figure*} Having identified and eliminated important artefacts by using gold-coated substrates with a hole radius of 7.5~$\upmu$m, as illustrated in Fig.~\ref{fig:FIG3}\textbf{e}, we proceed by studying the effect of crystal thickness on the thermal conductivity using our experimental approach of Raman thermometry. We perform these experiments on our artefact-free substrates and under vacuum conditions. We plot $\Delta T$ as a function of absorbed power (Fig.~\ref{fig:FIG4}\textbf{a}), and observe a clear trend with the thickness of the samples: thinner crystals heat up more significantly for the same absorbed power $P_{\rm abs}$. This is intuitive, as thinner crystals have a smaller volume in which the same amount of heat is deposited. Plotting $\Delta T \cdot d$ as a function of $P_{\rm abs}$ (see Fig.~\ref{fig:FIG4}\textbf{b}) gives a slope that is directly representative of the thermal conductivity $\kappa$ (see Eq.~(\ref{eq:1})). We now see that all data points fall on almost the same slope, suggesting that the intrinsic thermal properties of MoSe$_2$ are not dramatically affected by crystal thickness. A quantitative analysis of the experimental data using Eq.~(\ref{eq:1}) results in a $\kappa$ of $\sim$20~Wm$^{\shortminus1}$K$^{\shortminus1}$ for crystals with a thickness of 17L down to monolayer, and $\sim$40~Wm$^{\shortminus1}$K$^{\shortminus1}$ for bulk-like MoSe$_2$, with a thickness of $\sim$70L (Fig.~\ref{fig:FIG5}\textbf{a}). In the Supporting Fig.~\ref{fig:FigS-exp-lit}, we compare our values for the in-plane thermal conductivity with the available experimental results in the literature~\cite{zobeiri2019frequency,wang2018measurement,jiang2017probing,zhang2015measurement}. Most strikingly, our systematic thickness variation demonstrates a relatively weak effect of crystal thickness, within a factor two, whereas experimental literature values suggest a variation over almost an order of magnitude with particularly large conductivities for the thinnest crystals. We ascribe this discrepancy to the fact that not all measurements in the literature were performed under the same conditions nor with similar substrates, and often using non-coated substrates with rather small hole sizes, whereas in our case we used artefact-free substrates and constant fabrication and measurement conditions for all different thicknesses. \subsection*{Theoretical approach: effect of thickness} In order to interpret and understand our experimental results, we compute the thermal properties of MoSe$_2$ using density functional theory, as implemented in SIESTA~\cite{siesta}, in combination with the Temperature-Dependent Effective Potential (TDEP) method that allows to take into account phonons at a non-zero temperature~\cite{Hellman2011tdep1,Hellman2013tdep2}. In brief (see Methods for details), with this method we identify harmonic and anharmonic interatomic force constants taking into account atomic displacements and forces of a canonical ensemble at a given temperature. These computed force constants are the representation of the thermally averaged Born-Oppenheimer potential energy surface of the atomic displacements around the equilibrium positions. With this method we compute the phonon dispersion (see Supporting Fig.~\ref{fig:phononDispersion}) and the anharmonic terms of the interatomic potential, in order to obtain the in-plane lattice thermal conductivity $\kappa$. We compute $\kappa$ for bulk MoSe$_2$, and for 2D crystals with thicknesses from 6L down to the monolayer. \begin{figure*}[htbp] \centering \includegraphics[width=15.5cm]{ink_FIG5_v3.png} \caption{\textbf{Microscopic understanding of heat transport in MoSe$_2$.} \textbf{a)}~In-plane thermal conductivity of MoSe$_2$ crystals as a function of thickness, using our experimental (circles) and theoretical (stars) approach. The shaded line is a guide to the eye for the theory results. \textbf{b)}~Spectrally decomposed thermal conductivity $\kappa_{\rm spec}$ as a function of phonon frequency, indicating how towards thinner films an increasing contribution from a sub-THz mode compensates the decreasing contribution from modes around 1 THz. \textbf{c)}~Decomposed in-plane thermal conductivity as a function of phonon MFP. The cumulative thermal conductivity is normalized by the overall in-plane thermal conductivity. \textbf{d,e)}~ Spectrally decomposed thermal conductivity $\kappa_{\rm spec}$ for \textbf{(d)}~acoustic-like modes and \textbf{(e)}~optical-like modes.} \label{fig:FIG5} \end{figure*} We compare the theoretically obtained in-plane thermal conductivity of MoSe$_2$ crystals with different thicknesses to the experimental results (see Fig.~\ref{fig:FIG5}\textbf{a}). For bulk MoSe$_2$, the experimental and theoretical values both give a $\kappa$ of $\sim$40~Wm$^{\shortminus1}$K$^{\shortminus1}$, which is close to the values found in the literature~\cite{Kandemir_2016}. For thinner crystals, we see that the first-principles-based results show a $\kappa$ of 21~Wm$^{\shortminus1}$K$^{\shortminus1}$ for monolayer MoSe$_2$, weakly increasing to 29~Wm$^{\shortminus1}$K$^{\shortminus1}$ for 6L. These values are in overall good agreement with the experiments, although the simulated values are slightly higher than the experimental results with $\sim$20~Wm$^{\shortminus1}$K$^{\shortminus1}$. Importantly, both results show that there is a weak effect of crystal thickness on the thermal conductivity. Furthermore, if there is any effect, it is opposite to the effect in graphite, which shows an increase in thermal conductivity upon decreasing crystal thickness, with monolayer graphene exhibiting the largest thermal conductivity~\cite{balandin2008superior,ghosh2010dimensional}. In Supporting Fig.~\ref{fig:theory_lit}, we compare our values for the in-plane thermal conductivity with the available results in the literature~\cite{kumar15,C5RA19747C,Gu2014dft,Kandemir_2016}. Moreover, we performed the same simulations for the TMD materials WSe$_2$ and MoS$_2$, which show a similar trend (see Supporting Fig.~\ref{fig:wse}). This suggests that the trend we observe both experimentally and theoretically is representative of the broader family of TMD materials. Our simulation results provide important physical insights for the observed weak effect of crystal thickness on $\kappa$ for TMDs: we examine which phonons contribute to the total thermal conductivity by plotting the spectrally decomposed thermal conductivity of MoSe$_2$ $\kappa_{\rm spec}$ (see Fig.~\ref{fig:FIG5}\textbf{b}). We find that for bulk crystals, the largest contribution comes from modes around 1~THz. This contribution gradually decreases with the crystal thickness. However, towards the monolayer limit, modes with a frequency well below 1~THz start playing an important role. We confirm this picture by examining the phonon mean free path of each of the phonon modes in the decomposed thermal conductivity (see Supporting Fig.~\ref{fig:cum_kappa}). We show the cumulative thermal conductivity as a function of MFP (see Fig.~\ref{fig:FIG5}\textbf{c}), and observe that in the monolayer case, an increased fraction of the conductivity is carried by low-frequency modes with a relatively long MFP. This result also highlights the importance of using large hole sizes, as a significant fraction of $\kappa$ is carried by phonons with a MFP of several microns, which confirms that our experimental hole size is not significantly affecting the extracted $\kappa$ through edge scattering: phonons with a MFP $<$7.5~$\upmu$m contribute to $>$90\% of the total thermal conductivity. In order to gain more understanding of the key phonon modes, we decompose the spectral contribution into acoustic modes (see Fig.~\ref{fig:FIG5}\textbf{d}) and low-frequency optical modes (see Fig.~\ref{fig:FIG5}\textbf{e}). For the latter, we only take into account of modes below 4~THz: the thermal conductivity of higher optical modes is negligible. The contribution of the optical modes, which are centered slightly above 1~THz and have an interlayer character, weakly decreases with decreasing crystal thickness. The acoustic contribution that is centered below 1~THz exhibits stronger thickness effects, with the most striking effect being the increasingly strong contribution of the flexural mode situated at $\sim$0.1~THz for thin MoSe$_2$. Thus, from the simulation results in Fig.~\ref{fig:FIG5}\textbf{b$-$e} we understand that towards the monolayer limit, the decreasing contribution to $\kappa$ from modes around 1~THz is compensated by the increasing contribution of modes with a much lower frequency, in particular a low-energy flexural mode, thus resulting in an overall weak effect of material thickness. This is a surprising result, because both the phonon dispersions and the phonon lifetimes (see Supporting Fig.~\ref{fig:lifetimes}) change drastically with thickness, as is also clear from the spectrally decomposed thermal conductivity in Fig.~\ref{fig:FIG5}. It is also surprising, because a strong effect of thickness was shown for graphene~\cite{balandin2008superior}. Moreover, it is remarkable that significant amounts of heat are carried by modes with a mean free path of several micrometers inside a material with sub-nanometer thickness. This shows that out-of-plane boundary scattering does not play any role for the in-plane thermal conductivity of 2D van der Waals bonded TMDs. This is in large contrast with thin films of 3D bonded materials, where the thermal conductivity is typically thought to be limited by boundary scattering at the film surface, limiting the mean free path out of plane to an effective scattering thickness. For 2D materials this is not the case: the very long lifetimes of low energy modes in thin MoSe$_2$ are made possible by the weakness of the van der Waals interlayer scattering, which is generic for all 2D materials, and leads to well known thermal transport anisotropy of more than an order of magnitude~\cite{jiang2017probing}. In our theoretical simulations, the full physical thickness is taken into account: surface vibrations are distinguished explicitly, and the scattering between bulk-localized and surface-localized modes is included in the anharmonic 3-phonon interatomic force constants. The simulated surface does not contain additional sources of scattering (strain, residues, defects, etc.) which would also limit the mean free path. The agreement with experiments is a further confirmation of the very clean and ideal nature of the experimental samples. \begin{figure*}[htbp] \centering \includegraphics[width=\linewidth]{ink_FIG6_v1.png} \caption{\textbf{Air-mediated losses in suspended MoSe$_2$.} \textbf{a)}~Apparent in-plane thermal conductivity of suspended MoSe$_2$ flakes on large, gold-coated holes as measured in air. \textbf{b)}~Relative power losses to air, extracted by comparing measurements performed in vacuum with those performed in air. Solid lines represent the simulated power losses for different heat transfer coefficients (see Methods).} \label{fig:FIG6} \end{figure*} \subsection*{Out-of-plane dissipation to the environment} Many properties of thin, layered materials have been shown to be sensitive to the environment~\cite{gabourie2020reduced}. In the case of thermal properties, a relatively small effect caused by heat transport to gas molecules was observed for suspended graphene~\cite{chen2011raman}. We examine the effect of the surrounding environment on thermal transport in our MoSe$_2$ crystals, by performing Raman thermometry experiments both in vacuum and in air, for several samples with different thicknesses. In Fig.~\ref{fig:FIG6}\textbf{a}, we show the obtained apparent thermal conductivity $\kappa_{\rm app}$ as a function of flake thickness in the case of air, instead of vacuum. We find a thermal conductivity that is slightly higher in air than in vacuum for thick flakes, whereas it is almost an order of magnitude higher for monolayer MoSe$_2$. The reason for this large effect is likely that the presence of air introduces an additional cooling channel. In addition to in-plane diffusion from the hot spot to the heat sink, heat dissipation occurs by transfer to the ambient air as a sink (schematically depicted in the inset of Fig.~\ref{fig:FIG6}\textbf{a}). The relative effect of this competing dissipation channel is much larger than in the case of graphene, because the in-plane thermal conductivity of monolayer MoSe$_2$ is much smaller than that of graphene. We note that Eq.~(\ref{eq:1}) is not valid if there is an additional cooling channel, which means that the obtained apparent thermal conductivity $\kappa_{\rm app}$ in air is not an intrinsic material property of MoSe$_2$. However, it can be seen as an effective parameter describing heat transport in the combined air-MoSe$_2$ system. In order to understand the observed effect of the environment in more detail, we include additional cooling channels in our simulation of the Raman thermometry experiment (see Supporting Eq.~(\ref{eq:heat})). We first consider radiative cooling, estimating its maximum possible contribution by using a $\Delta T$ of 200~K, which is the largest value we used in our experiment (see Fig.~\ref{fig:FIG4}\textbf{a}). The results are shown in the Supporting Information, and indicate a negligible effect of $<$0.1\% for radiative cooling at such temperatures. Due to the $T^4$-scaling, this cooling channel will likely only start playing a role at significantly higher temperatures ($\Delta T \gg$ 200~K). The next cooling channel we consider is that of out-of-plane heat dissipation from MoSe$_2$ to the surrounding air molecules. We plot the experimentally obtained loss fraction, defined as $\zeta = 1 - \kappa_{\rm vac} / \kappa_{\rm app,air}$, as a function of surface-to-volume ratio of the crystal (see Fig.~\ref{fig:FIG6}\textbf{b}), and compare it to our simulation of the Raman thermometry experiment that includes an out-of-plane heat transfer term. We find a heat loss fraction $\zeta$ of $\sim$20\% for the lowest surface-to-volume ratio, which we can reproduce with a heat transfer coefficient $h_{\rm c}$ of $\sim$5,000~Wm$^{\shortminus2}$K{$^{\shortminus1}$}. For monolayer MoSe$_2$, on the other hand, we find $>$80\% loss, which we can reproduce with a heat transfer coefficient $h_{\rm c}$ of $\sim$30,000~Wm$^{\shortminus2}$K{$^{\shortminus1}$}. These are much larger values than the typical values for the convective heat transfer coefficient found in the literature~\cite{zhang2015measurement,easy2021experimental}, even for forced convection by gases: $h_{\rm c} = 25-250$~Wm$^{\shortminus2}$K{$^{\shortminus1}$}~\cite{BergmanHeatTransfer}. Our value, however, is very close to the value observed for monolayer graphene (2.9$\times$10$^4$ Wm$^{\shortminus2}$K{$^{\shortminus1}$}~\cite{chen2011raman}), and close to the ideal heat transfer coefficient to air at ambient pressure and temperature with an ideal molecular accommodation coefficient (10$^5$ Wm$^{\shortminus2}$K{$^{\shortminus1}$}~\cite{chen2011raman}). Importantly, these results provide clear evidence that out-of-plane heat dissipation to air plays an important role in the cooling dynamics of suspended ultrathin materials, and that cooling is significantly more efficient for atomically thin crystals than for thicker crystals. Importantly, when such thin crystals are placed in air, their overall cooling ability is enhanced by their efficient interaction with air molecules. This is very relevant and beneficial for designing applications where the thermal management of TMDs and other layered materials is a crucial consideration. \section{Conclusion} We used Raman thermometry and \textit{ab initio} simulations to investigate the influence of thickness on the thermal conductivity of suspended MoSe$_2$ crystals. We observed excellent agreement between our experimentally measured and computed in-plane lattice conductivities. Both approaches indicate a relatively weak effect of crystal thickness on the lattice thermal conductivity $\kappa$ -- within a factor two. We explain this weak thickness influence as the result of competing effects in the phonon contribution to the thermal conductivity. Furthermore, we have shown the importance of a careful experimental configuration in order to obtain reliable thermal conductivities from Raman thermometry measurements. Finally, we have demonstrated a very strong effect of the environment on thermal transport, in particular in the case of monolayer MoSe$_2$, which is caused by out-of-plane heat dissipation with a surprisingly large heat transfer coefficient. We note that many of these results represent essential guidance for the thermal investigation of other TMD materials. This work provides a basis to understand and engineer thermal transport properties of a broad class of materials, with promising applications in thermal management, energy materials and (opto)electronic devices. \section{Methods} \textbf{Sample fabrication}. The sample fabrication, based on PDMS-assisted dry transfer of mechanically exfoliated MoSe$_2$ flakes (HQ graphene, 2H phase), is described in detail in Ref.~\cite{Varghese2021b}. As substrates, we used holey Si$_3$N$_4$ membranes (Norcada, NTPR005D-C15) for the study of the effect of crystal thickness and the effect of gold coating, (see samples in Fig.~\ref{fig:FIG1}\textbf{b} and Fig.~\ref{fig:FIG1}\textbf{d}). Those substrates have a single hole with a radius of 7.5~$\upmu$m. For the study of the effect of hole size, we used gold-coated silicon-on-insulator wafers with back-thinned membranes. We used focused ion beam to perforate holes with a radius of 2.5 and 5~$\upmu$m (see Fig.~\ref{fig:FIG1}\textbf{c}). The gold coatings, consisting of 50~nm gold with 5~nm titanium adhesion layer, were deposited prior to transfer using E-beam evaporation (AJA Orion). \textbf{Raman thermometry}. Raman spectra were collected with a Horiba T64000 Raman spectrometer and a laser beam, with a wavelength of $\lambda = 532$~nm, focused to a $1/e$ spot size of $\sim$1~$\upmu$m (see Supporting Fig.~\ref{fig:spotsize} for spot size measurements). For thermal measurements, the samples were placed in a temperature controlled vacuum stage (Linkam). The samples were glued onto a holey Cu plate using silver paste, for a good thermal link with the stage. The samples were left to thermalize for 20~min at each temperature. These calibration measurements were taken both in the supported and suspended regions, giving comparable results (see Supporting Information). The temperature increase is defined as $\Delta T = (\nu_P - \nu_{P=0}) / \chi_T$, with $\nu_{P=0}$ the intercept from the linear fit of Raman shift with laser power. The Raman experiments were performed both in vacuum ($5 \cdot 10^{\shortminus3}$~mbar) and air ($1$~bar). The absorbance of each suspended MoSe$_2$ crystal was determined using a home-built optical setup by measuring transmittance and reflectance through the suspended region, see Supporting Information. We note that the experimental $\kappa$ of the bulk material is extracted using an effective thickness $d_{\rm eff}$ equal to the penetration depth in MoSe$_2$ ($d_{\rm eff} = \lambda /4\pi k = 20$~nm, with the extinction coefficient $k = 2.08$ at 532~nm~\cite{beal1979kramers}) as the thickness of the flake, instead of the actual thickness of 47~nm, because of the very low out-of-plane thermal conductivity, which means that only a region with a thickness $d_{\rm eff}$ carries the in-plane heat. For other thicknesses, we assume homogeneous heating in the $c$-axis of the flake. \textbf{Density Functional Theory (DFT) simulations}. Our computational approach is based on first-principles calculations. We study thermal transport properties using the density functional theory as implemented in the SIESTA program~\cite{Soler_2002, siesta} and employing LMKLL functionals~\cite{LMKLL} to take into account van der Waals interactions. We consider structures with a different number of layers, from monolayer up to 6L, with 17~\AA~of vacuum to eliminate the interaction between periodically repeated images. Calculations are converged with 1000~Ry energy cutoff for the real-space grid with a ($20 \times 20 \times 1$) \textbf{k}-points sampling of the Brillouin zone for all the layers and ($20 \times 20 \times 20$) \textbf{k}-points grid for the bulk. A standard double zeta polarized (DZP) basis for Mo and Se atoms and an electronic temperature of 300~K was used. The conjugate gradient algorithm is used to relax the cell and the atomic positions until the forces on the atoms became smaller than 0.001~eV/\AA~and the maximum stress component is smaller than 0.5~GPa. The calculations of forces and stress were then performed with ($10 \times 10 \times 1$) supercells and ($8 \times 8 \times 2$) supercells for the bulk material with the standard diagonalization method. The number of atoms in the supercells varies from 192 atoms in the monolayer to 1152 atoms in the 6-layer flake. The thermal properties are then computed with the TDEP method. The convergence of forces in TDEP required 7 iterations, where an iteration consists in generating a set of displacements, computing forces and fitting force-constants. The temperature used to generate snapshots is 300~K. To better average the forces, the number of configurations used in the procedure was increased as a geometrical series, with the 7th iteration computed using 128 configurations. The thermal conductivity is calculated by iteratively solving the full Boltzmann transport equation (BTE) for several \textbf{q}-point grid densities and extrapolating the value for an infinite number of \textbf{q}-points. \section*{Acknowledgements} The authors thank Andrea Pitillas Martínez for the graphics shown in the TOC and Figure~\ref{fig:FIG1}\textbf{a} and \ref{fig:FIG1}\textbf{b}. D.S.R. and S.V. would like to acknowledge the support of the Spanish Ministry of Economy through FPI-SO2019 and FPI-SO2018, respectively. R.F., P.O. and Z.Z. acknowledge support by the EU H2020-NMBP-TO-IND-2018 project ``INTERSECT'' (Grant No. 814487), the EC H2020-INFRAEDI-2018-2020 MaX ``Materials Design at the Exascale'' CoE (Grant No. 824143), and Spanish MCI/AEI/FEDER-UE (Grant No. PGC2018-096955-B-C43). O.H. acknowledges support from the Swedish Research Council (VR) program 2020-04630. P.W. acknowledges funding from the European Union's Horizon 2020 research and innovation program under the Marie Skłodowska-Curie Grant Agreement No. 754510 (PROBIST). M.S., A.E.S., E.C.A. and C.M.S.T. acknowledge support of the Spanish MICIN project SIP (PGC2018-101743-B-I00). S.O.V. acknowledges support from MINECO under contract numbers PID2019-111773RB-I00/AEI/10.13039/501100011033. Z.Z. acknowledges financial support by the Netherlands Sector Plan program 2019-2023. M.J.V. acknowledges support from FRS-FNRS Belgium PdR Grant No. T.0103.19 - ALPS, and contributions from the Melodica flag-era.net project. K.J.T., M.S., C.M.S.T., S.O.V. and N.F.v.H. acknowledge funding from BIST Ignite project 2DNanoHeat. K.J.T. acknowledges funding from the European Union's Horizon 2020 research and innovation program under Grant Agreement No. 804349 (ERC StG CUHL), RYC fellowship No. RYC-2017-22330, and IAE project PID2019-111673GB-I00. ICN2 was supported by the Severo Ochoa program from Spanish MINECO Grant No. SEV-2017-0706 and Generalitat de Catalunya (CERCA program and Grant 201756R1506).
\section{\label{sec:Intro}Introduction} Reference \cite{Webb2017} described an experimental class and a control class taught by the same instructor, covering the same topics, and even using exactly the same curricular materials. The main difference between these two introductory Newtonian mechanics classes lay in the order of the presentation of material. In the control class the topics of the course were covered chapter by chapter as usual. In this chapter-by-chapter style the conceptual issues are studied together with simple calculations and then quickly followed by complicated calculations. On the other hand, the experimental class spent the first 60\% of the course in an intensive study of all of the conceptual issues (along with very simple calculations) in the course. The final 40\% of the course was then spent on the complicated calculations. At the same time that these two classes were given there were also two other classes covering the same material but with two different instructors. Reference \cite{Webb2017} compared final exam results for the control and experimental classes. In order to avoid issues\cite{Gutierrez2008} associated with between-demographic-group comparisons (also known as gap gazing\cite{Rodriguez2001}) the paper mainly showed within-demographic-group final exam grade differences between the two classes. It was found that each demographic group studied had higher or equal final exam grades when they were enrolled in the concepts-first class than when they were enrolled in the control class. In addition to these detailed within-group results we noted that the course grades of concepts-first students from racial/ethnic groups historically underrepresented in physics were indistinguishable from their peers in the same concepts-first class but that the usual result (lower than their peers) obtained in each of the other three classes. This between-group result was noted but not carefully quantified. This addendum is aimed at better quantifying this between-group affect. The main reason for examining between-group affects is to add a voice to the growing body of recent research \cite{Salehi2019}\cite{Simmons2020}\cite{Shafer2021} on between-group demographic studies. Specifically, some recent studies seem to take a Student Deficit Model\cite{Valencia1997} of demographic grade gaps and some studies seem to take a Course Deficit Model\cite{Cotner2017} of demographic grade gaps. The work described in reference \cite{Webb2017} seems likely to support the Course Deficit Model. \section{\label{sec:DataAndMethod}Data Set and Method} The three other classes offered at the same time as the concepts-first class took the same final exam at the same time and they were all graded at the same time. Unfortunately, the final exam had problems on it that the experimental and control groups had not seen but that one or both of the other classes had seen. Because this makes a direct comparison of all four classes difficult and the fact that the comparison between the experimental and control classes told a fairly complete story, we left aside a more complete analysis using the other two classes. In this addendum we will use Hierarchical Linear Modeling (HLM) to bring all of the classes into a single model that allows us to use all of our data in a comparison a particular demographic grade gap across two ways of organizing the course materials in an introductory physics course. Using HLM allows one to take account of the fact that students are aggregated into classes so that the demographic grade gap calculation is first done at the class level using student-level variables before assembling the results from the different classes and including any class-level variables. Fitting the data in this order helps one account for class-to-class variations (i.e. some classes have already seen some of the final exam questions). In using HLM the student variables (FCI and math scores, and ethnicity) are at the lowest level and the class variable, concepts first or not, is at a higher level in the hierarchy. The anonymized database from the previous study had the students' Force Concept Inventory\cite{Hestenes1992Force} pre-scores ($FCIpre$), their average calculus grades normalized to standard deviation = 1 ($IntroMath$), their final exam scores normalized to standard deviation = 1 ($FinalExam$), and the student ethnicities for each of the four classes. This gives us a total of 633 students in the database that we use in this addendum (152 in the concepts-first class, 160 in the control class, 163 in the third class, and 158 in the fourth class). The 14\% of the students who were from underrepresented racial/ethnic groups are denoted with a variable $URM = 1$ and their peers have $URM = 0$. \section{\label{sec:Results}Results} First we can look at the demographic gaps for all four classes. Table \ref{Tbl1} shows, for each of the four classes, the average difference between students who are members of racial/ethnic groups underrepresented in physics and their peers in the same class. The average demographic gap for the concepts-first class does not fall within any of the 95\% confidence intervals of the gaps from the other three classes. On the other hand, \textbf{each} of the other three classes have gaps which fall within the 95\% confidence intervals of \textbf{each} of those three classes and fall outside the 95\% confidence interval of the concept's first class. For these reasons, in the sequel I will gather those three standard courses together into one group and compare those classes directly with the concept's first class to quantify the differences while controlling for the students' incoming understandings of calculus and physics. \begin{table}[htbp] \caption{The final exam grade gaps for each of the four classes offered as the same time. The grades are normalized so that the standard deviation over all students taking the final exam is 1. The gap is between students from racial/ethnic groups underrepresented in physics ($URM$) and their peers. The gap is negative if URM students received lower final exam grades. The concepts first class is class number 1 and the control class (same instructor) is class number 2 and the other two classes were given at the same time and took the same final exam.} \label{Tbl1} \begin{ruledtabular} \begin{tabular}{c c c c} \textbf{Class} & \textbf{Grade Gap} &\textbf{Error} & \textbf{95\% confidence interval}\\ \hline 1 & 0.18 & 0.25 & -0.32 $\rightarrow$ 0.67 \\ 2 & -0.90 & 0.23 & -1.34 $\rightarrow$ -0.44 \\ 3 & -0.70 & 0.18 & -1.06 $\rightarrow$ -0.34 \\ 4 & -0.80 & 0.23 & -1.25 $\rightarrow$ -0.34 \\ \end{tabular} \end{ruledtabular} \end{table} One way to use HLM to compare the course structures is to fit model shown in equation \ref{eqn:HLMModel1} separately for i) the concepts-first class and ii) the other three classes. The resulting coefficients are shown in Table \ref{Tbl2}. \begin{multline} FinalExam = b_0 + b_{URM}(URM) \\ + b_{FCIpre}FCIpre + b_{IntroMath}IntroMath \label{eqn:HLMModel1} \end{multline} \begin{table}[htbp] \caption{The coefficients from HLM fitting of equation \ref{eqn:HLMModel1} for 1) the concepts-first class and 2,3,4) the other three classes fit as a group.} \label{Tbl2} \begin{ruledtabular} \begin{tabular}{c c c c c} \textbf{Coefficient} & \textbf{Class} & \textbf{Value} &\textbf{Error} & \textbf{95\% conf. intvl.}\\ \hline $b_{URM}$ & 1 & 0.38 & 0.15 & 0.09 $\rightarrow$ 0.68 \\ & 2,3,4 & -0.39 & 0.09 & -0.56 $\rightarrow$ -0.21 \\ \hline $b_{FCIpre}$ & 1 & 0.089 & 0.007 & 0.07 $\rightarrow$ 0.10 \\ & 2,3,4 & 0.062 & 0.005 & 0.05 $\rightarrow$ 0.07 \\ \hline $b_{IntroMath}$ & 1 & 0.56 & 0.07 & 0.41 $\rightarrow$ 0.70 \\ & 2,3,4 & 0.62 & 0.05 & 0.52 $\rightarrow$ 0.71 \\ \hline $b_{0}$ & 1 & -1.59 & 0.13 & -1.84 $\rightarrow$ -1.34 \\ & 2,3,4 & -1.09 & 0.12 & -1.34 $\rightarrow$ -0.85 \\ \end{tabular} \end{ruledtabular} \end{table} The important coefficient, $b_{URM}$, measures the demographic final exam grade gap. As we noticed from the uncorrected gap, the gaps in the two different organizations of class material are of opposite sign. Calculating the difference in the two values of the gap we find that the difference is 0.77 $\pm$ 0.17. For this comparison the t-statistic = 4.43 so the two values of demographic gap differ by 4.43 standard errors. This difference is almost as large as the difference (5 standard errors) that physicists use to identify a new ``discovery''. At this point we should note that the student-level variables $FCI$ and $IntroMath$ are excellent predictors of differences between the students in a particular demographic group and so are good within-group predictors. Nevertheless, correcting for these student-level variables not only does not explain (i.e. reduce to zero) the demographic gap but may have enlarged the demographic gap in the concepts-first class. So using these particular student-level variables as between-group predictors is untenable for these data. A possible issue with the above fitting is that the two types of class organization are treated separately, and so differently. Interestingly, the $FCIpre$ coefficients were measurably different from each other using this method. We can get around this possible problem by simply treating the class differences within a single model fitting the entire database. To do this we define a second categorical variable, $Course$, which equals 0 for the group of classes taught in the usual way and equal to 1 for the concepts-first class and we include an interaction term, $URM*Course$ to measure a difference between the two class structures on the resulting demographic gap. The variable $Course$ is a class-level variable and a further importance of HLM is that class-level variables are treated so that the error estimates automatically take into account the fact that this variable is correlated at the class-level. We use HLM to fit equation \ref{eqn:HLMModel2} \begin{multline} FinalExam = b_0 \\ + b_{URM}(URM) + b_{Course}(Course) \\ + b_{URM*Course}(URM*Course)\\ + b_{FCIpre}FCIpre + b_{IntroMath}IntroMath \label{eqn:HLMModel2} \end{multline} \begin{table}[htbp] \caption{The coefficients from HLM fitting of equation \ref{eqn:HLMModel2}. The URM coefficient will give the demographic gap for the three classes offered with the standard organization and the interaction coefficient will give the difference between the standard demographic gap and the demographic gap from the concepts-first class organization.} \label{Tbl3} \begin{ruledtabular} \begin{tabular}{c c c c c} \textbf{Coefficient} & \textbf{Value} &\textbf{Error} & \textbf{z-statistic} & \textbf{P-value}\\ \hline $b_{URM}$ & -0.38 & 0.09 & -4.36 & $<10^{-3}$ \\ $b_{Course}$ & -0.10 & 0.17 & -0.55 & 0.585 \\ $b_{Course*URM}$ & 0.77 & 0.19 & 4.12 & $<10^{-3}$ \\ $b_{FCIpre}$ & 0.069 & 0.004 & 16.76 & $<10^{-3}$ \\ $b_{IntroMath}$ & 0.61 & 0.04 & 14.67 & $<10^{-3}$ \\ $b_{0}$ & -1.19 & 0.11 & 11.00 & $<10^{-3}$ \\ \end{tabular} \end{ruledtabular} \end{table} Table \ref{Tbl2} tells the same story that we found above. The demographic gap for the standard classes is -0.38 and the gap in the concepts-first course is 0.77 higher than that of the standard classes. So the two demographic gaps are still opposite in sign and with this calculation the t-statistic = 4.12 and comes out of the fit itself. Again the t-statistic is fairly large and we find that using student-level variables as between-group predictors is untenable but that the differences may be explained by the course-level variable $Course$. \section{\label{sec:Disc}Discussion} In comparisons of physics grades, researchers often find different average grades for different demographic groups, these are between-group comparisons. In addition, the size of these demographic grade gaps can often be reduced (sometimes reduced to essentially zero) by controlling for student-level variables that are related to academic skills, or academic preparation, or test-taking skills, etc. and that are known to help explain within-group grades. Using student-level variables in this way can suggest that students from one demographic group may not have the same average skills or preparation as students from another demographic group. This has been called a student deficit model of the demographic gap\cite{Valencia1997},\cite{Cotner2017}. A different view of these demographic gaps comes when one considers that maybe all of the groups of students have the ability to learn and demonstrate that learning but that the course design and/or presentation may not be suited for equally teaching all of the different socioeconomic groups of students that make up the class. This view suggests using a course deficit model\cite{Cotner2017} in explaining how it happens that different groups of students receive different grades. Here, the word ``course'' is meant to encompass all of the details that are under the control of either the particular instructor or the school that offers the course. Course differences could be as minor as changing the presentation of the material or changing the testing regime or include changing the order of the material presented, the number of classes a student takes, and/or the number of hours per class or include even more changes whose nature have not occurred to this author. The question of deciding whether the student deficit model or the course deficit model is better at explaining why one demographic group outperforms another under a particular course regime is one that a growing group of researchers think should be considered. The results of this study of the concepts-first class structure show that a particular demographics grade gap is not easily explained using a student deficit model that considers only preparation in physics (using the Force Concept Inventory) and preparation in math (using the students' introductory calculus scores). Instead, the demographic grade gap seems highly correlated with the course structure so the data support a course deficit model of this gap.
\section{Introduction} In quantum field theory (QFT), entanglement entropy (EE) characterizes the statistical properties of the vacuum state in the local operator algebras attached to spacetime regions. An important task in investigations related to EE has been to understand how it is related to more traditional QFT observables. Several important connections are well established, such as the realization that renormalization group charges are extractable from the universal parts of the entropy of spheres \cite{Holzhey:1994we, Calabrese:2004eu,Solodukhin:2008dh,Casini:2011kv}. Universal, cutoff independent pieces of EE can be systematically extracted by considering the mutual information for two disjoint regions $A,B$, \begin{equation} I(A,B)\equiv S(A)+S(B)-S(AB)\,. \end{equation} This is finite, universal and well defined mathematically. For a conformal field theory (CFT), the renormalization group charges appear in an expansion of the mutual information between two spheres in the short distance limit \cite{Casini:2011kv,Casini:2015woa}. In the opposite limit, {\it i.e.,}\ for far away regions, application of the replica trick and the operator product expansion (OPE) for twist operators leads to an expansion of mutual information in inverse powers of the distance. The corresponding exponents are sums of the conformal dimensions of the theory \cite{Cardy:2013nua}. In this way, important information about the spectrum can be recovered from EE. The coefficients in the long-distance expansion can be computed in particular cases. Notably, the exact form of the coefficient of the leading term for spheres has a closed universal expression which only depends on the spin and conformal dimension of the operator \cite{Agon:2015ftl,Chen:2017hbk,Casini:2021raa}. In this work we focus on the large separation distances expansion of the tripartite information associated to three disjoint spheres in a CFT. This is defined for three entangling regions $A,B,C$ as \begin{align} \label{tripardef} I_3(A,B,C) &\equiv I(A,B)+I(A,C)-I(A,BC) \\ &=S(A)+S(B)+S(C)-S(AB)-S(AC)-S(BC)+S(ABC)\, . \nonumber \end{align} By its very definition, $I_3$ measures the non-extensivity of mutual information. It is known that $I_3(A,B,C)$ can be used as an order parameter for topological theories \cite{Kitaev:2005dm} and, remarkably, it is always negative for holographic EE \cite{Hayden:2011ag} ---for a discussion on how much tripartite entanglement is present in holographic states see \cite{Cui:2018dyq} vs \cite{Akers:2019gcv}. This inequality, $I_3\le 0$, called ``monogamy'' of mutual information,\footnote{For qubit systems, it was argued in \cite{Rangamani:2015qwa} that random states also tend to have a monogamous mutual information. A simple $N$-qubit state which has a positive tripartite information is the GHZ state $1/\sqrt{2} [\otimes_i^N \ket{0}_i+ \otimes_i^N \ket{1}_i] $ ---see \cite{Rota:2015wge} for a discussion on how to construct generalizations of such state which maximize $I_3$. } is one of the inequalities defining the so called ``holographic entropy cone'' \cite{Bao:2015bfa} ---see also \cite{Hubeny:2018trv}. On the other hand, the case $I_3\equiv 0$ gives place to the ``Extensive Mutual Information model'' \cite{Casini:2008wt}, which corresponds to a free fermion in $d=2$, and has been recently shown not to describe the mutual information of any QFT (or limit of QFTs) in higher dimensions \cite{Agon:2021zvp}. The case $I_3 \geq 0$ is also known to occur {\it e.g.,}\ for free fields \cite{Casini:2008wt}, so the tripartite does not have a definite sign in general \cite{Lieb,RevModPhys.74.197}. Part of our interest in the long-distance behavior of $I_3$ arises from the fact that this quantity seems to offer a relatively simple access to the three-point function coefficients ---also known as ``structure constants'' or ``OPE coefficients''--- which, alongside the conformal dimensions, constitute the CFT data. Here we show that these coefficients already show up in the leading term of the tripartite information. Indeed, when the primary operator with the lowest scaling dimension present in the theory is a scalar, we obtain for three spherical regions $A,B,C$ of radii $R$ and with relative separations $r_{AB},r_{BC},r_{AC} \gg R$ , \begin{eqnarray}\label{I3-LD} I_3(A,B,C)=-\frac{R^{6\Delta}}{r_{AB}^{2\Delta}r_{BC}^{2\Delta}r_{AC}^{2\Delta}}\[\frac{\sqrt{\pi}}{4}\frac{\Gamma\!\(3\Delta +1\)}{\Gamma\!\(3\Delta +\frac{3}{2}\)}\(C_{\mathcal{O}\cO\mathcal{O}}\)^2 -\frac{2^{6\Delta} \Gamma\(\Delta + \frac{1}{2}\)^3}{2\pi \Gamma\(3\Delta +\frac{3}{2}\)} \]\,, \end{eqnarray} a formula which is valid in general dimensions. As compared to the analogous expression for the mutual information, a new feature of this expression is its dependence on the structure constant ${C}_{\mathcal{O} \mathcal{O}\cO}$. This implies that knowledge of the leading term in the tripartite information can be used to extract the values of both the smallest scaling dimension in the theory, $\Delta$, as well as the dynamical coefficient ${C}_{\mathcal{O} \mathcal{O}\cO}$. Thus, considering other primary operator contributions one could imagine extracting as well other OPE coefficients and with this completing the task of getting the full CFT information from the mutual information. When the lowest-dimensional primary is not a scalar, more work is required in order to generalize \req{I3-LD}, but we do argue here that the analogous result when this field is a fermion has a vanishing coefficient for the naive leading piece $\sim r^{-6\Delta_f}$. The remainder of the paper goes as follows. In Section \ref{I3longd} we compute the leading term in the long-distance expansion of the tripartite information for a generic CFT such that its lowest-dimensional primary is a scalar field. In Section \ref{I3ferm} we show with an explicit calculation that the term responsible for the would-be leading term in the case of a CFT with a fermionic lowest-dimensional primary identically vanishes. In Section \ref{Lattice-2+1} we use lattice calculations in three-dimensions to verify the scalings obtained in the previous sections for free scalars and fermions (in particular, we find a scaling $\sim r^{-(6\Delta_f+1)}$ for the latter). We also verify there that the free scalar result for the three-disks coefficient computed analytically in Section \ref{I3longd} is reproduced numerically in the lattice and we obtain the analogous one for fermions. In Section \ref{discuuu} we conclude with a couple of comments regarding: the implications of our results for the ``entropic bootstrap'' program; and how difficult is to achieve a monogamous mutual information at long distances. In appendix \ref{OPE-block-section} we show how our formula for the long-distance tripartite information can be enhanced in order to include the full conformal block associated to the lowest-dimensional primary. \section{Tripartite information at long distances \label{I3longd}} We wish to compute the tripartite information for three entangling regions bounded by spheres of equal radii $R$ in the regime in which the distance between any of the two is much larger than $R$. In order to do this, it is convenient to split $I_3(A,B,C)$ into two contributions, one which depends on the individual mutual informations of pairs of spheres, and a remanent piece which depends only on the subtracted entropy of the three regions, this is \begin{eqnarray}\label{I3} I_3(A,B,C)=I(A,B)+I(A,C)+I(B,C)-\tilde{I}_3(A,B,C)\, , \end{eqnarray} where \begin{eqnarray} \tilde{I}_3(A,B,C)\equiv S(A)+S(B)+S(C)-S(ABC)\,. \end{eqnarray} We are interested in the leading contribution to $I_3(A,B,C)$ in the long-distance regime of the above set up. For such a computation we can exclusively focus on $\tilde{I}_3(A,B,C)$, since in \cite{Agon:2015ftl} the corresponding behavior of the remaining mutual informations was already understood. \subsection{Warm up: Mutual Information} First, recall that for a given entangling region $A$, the R\'enyi entropy $S^{(n)}(A)$ can be obtained as the following path integral: \begin{eqnarray} S^{(n)}(A)=\frac{1}{1-n}\log\left[\frac{Z({\cal C}^{(n)}_A)}{Z^n}\right]\,, \end{eqnarray} where ${\cal C}^{(n)}_A$ represents the replica manifold for the $n$ copies of the original space-time geometry after suitably identifying the region $A$ of copy $i$ with the one of $i+1$, and $n+1\equiv 1$. $Z(X)$ is the partition function of the theory defined on the manifold $X$ (for simplicity we use $Z$ when the manifold is a single copy of the original spacetime). Using this expression, one gets for the R\'enyi mutual information \begin{eqnarray}\label{MI} I^{(n)}(A,B)=\frac{1}{n-1}\log\left[\frac{Z({\cal C}^{(n)}_{AB})Z^{n}}{Z({\cal C}^{(n)}_A)Z({\cal C}^{(n)}_B)}\right]=\frac{1}{n-1}\log\left[\frac{Z^{(n)}_{AB}\, Z^{n}}{Z^{(n)}_A Z^{(n)}_B}\right]\, , \end{eqnarray} where we have simplified the notation for convenience using $Z^{(n)}_A\equiv Z({\cal C}^{(n)}_A)$. In \cite{Cardy:2013nua}, it was proposed that at long distances from the conifold of singularities, one can interpret the associated twist operator as a semi-local operator that couples the $n$ QFT's in the corresponding region. This implies that in the evaluation of the partition function \begin{eqnarray}\label{ZAB} \frac{Z^{(n)}_{AB}}{Z^{n}}=\langle \Sigma_A^{(n)} \Sigma_B^{(n)} \rangle_{\mathcal{M}^n}\, , \end{eqnarray} where $\mathcal{M}^n$ is the replicated theory, provided $A$ and $B$ are apart from each other, one can expand $\Sigma_{A}^{(n)}$ as a linear combination of local operators \begin{eqnarray}\label{SigmaA} \Sigma_{A}^{(n)}=\frac{Z^{(n)}_A}{Z^n}\sum_{\{k_j\}}C_{\{k_j\}}^{A} \prod_{j=0}^{n-1} \Phi^{(j)}_{k_j}(r_A)\,, \end{eqnarray} where $\{\Phi^{(j)}_{k_j}(r_A)\}$ is a complete set of operators in the $j^{\rm th}$ copy of the QFT located at a conveniently chosen point $r_A$ in region $A$. We can further separate the identity contributions from the product of operators in (\ref{SigmaA}) as \begin{eqnarray}\label{SigmaA1} \Sigma_{A}^{(n)}=\frac{Z^{(n)}_A}{Z^n}(1+\tilde{\Sigma}_{A}^{(n)})\, , \quad \text{where} \quad \tilde{\Sigma}_{A}^{(n)}=\sum_{\{k_j\}\neq \mathbb{I}}C_{\{k_j\}}^{A} \prod_{j=0}^{n-1} \Phi^{(j)}_{k_j}(r_A)\, , \end{eqnarray} and analogously for $B$. This leads to \begin{eqnarray} \frac{Z^{(n)}_{AB}}{Z^{n}}=\frac{Z^{(n)}_A Z^{(n)}_{B}}{Z^{2n}} \left(1+\langle \tilde{\Sigma}_A^{(n)} \tilde{\Sigma}_B^{(n)} \rangle_{\mathcal{M}^n}\right)\, , \end{eqnarray} where we take into account that one-point functions vanish in a CFT \begin{eqnarray}\label{Sigma0} \langle \tilde{\Sigma}_A^{(n)}\rangle_{\mathcal{M}^n}=0\,. \end{eqnarray} The expansion of the logarithm reads \begin{eqnarray}\label{RenyiMI} \log\left[\frac{Z^{(n)}_{AB}\, Z^{n}}{Z^{(n)}_A Z^{(n)}_B}\right]=\left[\langle \tilde{\Sigma}_A^{(n)} \tilde{\Sigma}_B^{(n)} \rangle_{\mathcal{M}^n}-\frac{1}{2}\(\langle \tilde{\Sigma}_A^{(n)} \tilde{\Sigma}_B^{(n)} \rangle_{\mathcal{M}^n}\)^2+\cdots \right]\,. \end{eqnarray} The leading term in the above expansion goes as $(n-1)$ when $n\to 1$, while the higher order terms involve higher powers of $(n-1)$ and as such they vanish in the same limit. The mutual information is thus given entirely by \begin{eqnarray}\label{MI1} I(A,B)=\lim_{n\to 1}\frac{1}{n-1}\langle \tilde{\Sigma}_A^{(n)} \tilde{\Sigma}_B^{(n)} \rangle_{\mathcal{M}^n} \, . \end{eqnarray} In \cite{Cardy:2013nua}, it was shown that the leading contribution to $I(A,B)$ comes from products of two operators located at different sheets and, from those, the ones with lowest scaling dimension $\Delta$ contribute the most. Making explicit the contributions of products of the lowest dimensional operator ${\cal O}_i$ in different copies, and assuming this operator is a scalar, \begin{eqnarray}\label{Sigmatilde} \tilde{\Sigma}^{(n)}_A=\sum_i C^A_i\, {\cal O}_i+\cdots \sum_{i<j}C^A_{ij} \mathcal{O}^{i}\mathcal{O}^{j}+\cdots+\sum_{i<j<k}C^A_{ijk}\mathcal{O}^{i}\mathcal{O}^{j}\mathcal{O}^{k}+\cdots \, . \end{eqnarray} As $\tilde{\Sigma}^{(n)}_A$ vanish in the $n\rightarrow 0$ limit (where $\Sigma_A^{1}=1$) the coefficient of the linear term must be proportional to $n-1$ and will not contribute to the mutual information \cite{Agon:2015ftl}. Then the leading contribution in the long-distance expansion has the form \begin{eqnarray}\label{MI-coeff-undet} I(A,B)=\(\lim_{n\to 1}\frac1{n-1}\sum_{i<j}C^A_{ij}C^B_{ij} \) \frac{1}{r^{4\Delta}}+\cdots \end{eqnarray} The coefficients $C^A_{ij}$ are given by the two-point functions on the conifold properly normalized \cite{Cardy:2013nua}, this is \begin{eqnarray} \label{coeffs2} C^A_{ij}=\lim_{r \to \infty } |r|^{4 \Delta} \langle \mathcal{O}^i(r) \mathcal{O}^{j}(r) \rangle_{{\cal C}^{(n)}_A}\,. \end{eqnarray} Although it might be difficult to have an analytic handle on the above coefficients, the factor in brackets appearing in (\ref{MI-coeff-undet}) can actually be evaluated analytically \cite{Agon:2015ftl}. The result is \begin{eqnarray}\label{scalar-CA} \lim_{n\to 1}\frac{1}{n-1}\sum_{i<j}C^A_{ij}C^B_{ij}=\frac{\sqrt{\pi}}{4}\frac{\Gamma\(2\Delta +1\)}{\Gamma\(2\Delta +\frac{3}{2}\)}R^{2\Delta}_A R^{2\Delta}_B\,. \end{eqnarray} Taking $R_A=R_B=R$ for simplicity, we can write the leading term in the mutual information as \begin{eqnarray} I(A,B)=\frac{\sqrt{\pi}}{4}\frac{\Gamma\(2\Delta +1\)}{\Gamma\(2\Delta +\frac{3}{2}\)}\frac{R^{4\Delta}}{r^{4\Delta}}\,+\cdots. \end{eqnarray} The next term in the expansion of the twist operator which contributes to $I(A,B)$ (assuming there are no other operators with dimension $\Delta_{\phi}\leq 3\Delta/2$) is \begin{eqnarray} \sum_{i<j<k}C^A_{ijk}\mathcal{O}^{i}\mathcal{O}^{j}\mathcal{O}^{k} \, . \end{eqnarray} As we will argue later, such type of terms would give a contribution to $I(A,B)$ of order $\sim \(R/r\)^{6\Delta}$\,. We show below that this order of contribution appears also in $\tilde{I}_3(A,B,C)$ and that it is in fact the leading one in $I_3(A,B,C)$. \subsection{Tripartite Information} Let us now move to the tripartite information. We consider three well separated spheres and compute the leading term, assuming the lowest-dimensional operator is a scalar. For the evaluation of both $\tilde{I}_3(A,B,C)$ and $I_3(A,B,C)$, the new ingredient is the computation of $Z^{(n)}_{ABC}$. This can be expressed as \begin{eqnarray} \frac{Z^{(n)}_{ABC}}{Z^{n}}=\langle \Sigma_A^{(n)} \Sigma_B^{(n)} \Sigma_C^{(n)} \rangle_{\mathcal{M}^n} \, , \end{eqnarray} which in terms of correlators of $\tilde{\Sigma}$'s results in \begin{eqnarray} \frac{Z^{(n)}_{ABC}}{Z^{n}} &=& \frac{Z^{(n)}_A Z^{(n)}_B Z^{(n)}_C}{Z^{3n}} \\ && \times \left(1 + \langle \tilde{\Sigma}_B^{(n)} \tilde{\Sigma}_C^{(n)} \rangle_{\mathcal{M}^n}+\langle \tilde{\Sigma}_A^{(n)} \tilde{\Sigma}_C^{(n)} \rangle_{\mathcal{M}^n}\nonumber +\, \langle \tilde{\Sigma}_A^{(n)} \tilde{\Sigma}_B^{(n)} \rangle_{\mathcal{M}^n}+ \langle \tilde{\Sigma}_A^{(n)} \tilde{\Sigma}_B^{(n)} \tilde{\Sigma}_C^{(n)} \rangle_{\mathcal{M}^n}\right) \, , \end{eqnarray} where once again we eliminated terms with a single $\tilde{\Sigma}$ as they have zero expectation value. This expansion implies the following leading contribution to $\tilde{I}_3(A,B,C)$, \begin{eqnarray} \label{tildeI3} \tilde{I}_3^{(n)}(A,B,C)&=&\frac{1}{n-1}\log\left[\frac{Z^{(n)}_{ABC}\, Z^{2n}}{Z^{(n)}_A Z^{(n)}_B Z^{(n)}_C}\right]=\frac{1}{n-1}\log\left[1+\(\frac{Z^{(n)}_{ABC}\, Z^{2n}}{Z^{(n)}_A Z^{(n)}_B Z^{(n)}_C}-1\)\right] \nonumber \\ &=&\frac{1}{n-1}\left[\(\frac{Z^{(n)}_{ABC}\, Z^{2n}}{Z^{(n)}_A Z^{(n)}_B Z^{(n)}_C}-1\)-\frac12\(\frac{Z^{(n)}_{ABC}\, Z^{2n}}{Z^{(n)}_A Z^{(n)}_B Z^{(n)}_C}-1\)^2+\cdots \right]\,. \end{eqnarray} The linear term in the expansion of the logarithm goes as $\sim (n-1)$ in the $n\to 1$ limit, while the other terms have higher powers. Therefore, for the purpose of computing the tripartite information only the first term contributes, and we get \begin{eqnarray}\label{tildeI3-2} \tilde{I}_3(A,B,C)&=&\lim_{n\rightarrow 1}\frac{1}{n-1}\left[\langle \tilde{\Sigma}_B^{(n)} \tilde{\Sigma}_C^{(n)} \rangle_{\mathcal{M}^n}+\langle \tilde{\Sigma}_A^{(n)} \tilde{\Sigma}_C^{(n)} \rangle_{\mathcal{M}^n} \right. \\ \nonumber &&\qquad \left. +\langle \tilde{\Sigma}_A^{(n)} \tilde{\Sigma}_B^{(n)} \rangle_{\mathcal{M}^n}+ \langle \tilde{\Sigma}_A^{(n)} \tilde{\Sigma}_B^{(n)} \tilde{\Sigma}_C^{(n)} \rangle_{\mathcal{M}^n} \right] \, . \end{eqnarray} In the above equation we can recognize the leading-order expressions (in powers of $(n-1)$) for the R\'enyi mutual informations of pairs of regions (\ref{RenyiMI}). After such identification, we can rewrite (\ref{tildeI3-2}) as \begin{equation} \label{I3-3} \tilde{I}_3(A,B,C)= \lim_{n\rightarrow 1}\frac{1}{n-1}\langle \tilde{\Sigma}_A^{(n)} \tilde{\Sigma}_B^{(n)} \tilde{\Sigma}_C^{(n)} \rangle_{\mathcal{M}^n} + I(A,B)+I(B,C)+I(A,C)\,. \end{equation} Comparing this equation with (\ref{I3}) we straightforwardly identify an exact expression for the tripartite information, \begin{equation}\label{renyi-tripartite} I_3(A,B,C) = \lim_{n\rightarrow 1}\frac{1}{1-n}\langle \tilde{\Sigma}_A^{(n)} \tilde{\Sigma}_B^{(n)} \tilde{\Sigma}_C^{(n)} \rangle_{\mathcal{M}^n} \, . \end{equation} The lowest order of approximation corresponds to taking the quadratic term in the expansion (\ref{Sigmatilde}). Thus \begin{eqnarray} \notag \label{l-expansion-tripatite} &\displaystyle& \langle \tilde{\Sigma}_A^{(n)} \tilde{\Sigma}_B^{(n)} \tilde{\Sigma}_C^{(n)} \rangle_{\mathcal{M}^n} \\ \displaystyle &=& \sum_{\{k_j\}}\sum_{\{p_l\}}\sum_{\{q_m\}}C_{\{k_j\}}^{A} C_{\{p_l\}}^{B}C_{\{q_m\}}^{C}\prod_{j,l,m=0}^{n-1} \langle \Phi^{(j)}_{k_j}(r_A)\Phi^{(l)}_{p_l}(r_B)\Phi^{(m)}_{q_m}(r_C) \rangle_{\mathcal{M}^n} \nonumber \\ & \displaystyle \sim &\sum_{ij} \sum_{kl}\sum_{pq} C_{ij}C_{kl}C_{pq}\langle \mathcal{O}^i(r_A)\mathcal{O}^j(r_A) \mathcal{O}^k(r_B)\mathcal{O}^l(r_B) \mathcal{O}^p(r_C)\mathcal{O}^q(r_C)\rangle_{\mathcal{M}^n}\, . \end{eqnarray} Within the correlators, we need to pair operators of different regions. They will only give non-zero contributions provided they are in the same sheet. We can describe two different configurations that contribute in these sums. In order to analyze them, it is convenient to introduce a matrix representation. Since we have $n$ sheets and $3$ regions, we can put the various operator locations in a $3\times n$ matrix as follows, \begin{eqnarray}\label{conf1} \text{First configuration:} \quad \left(\begin{array}{ccccc} 1 &\cdots \mathcal{O}^i(r_A) & \cdots \mathcal{O}^j(r_A) & \cdots 1 \\ 1 &\cdots \mathcal{O}^i(r_B) & \cdots \mathcal{O}^j(r_B) &\cdots 1 \\ 1 &\cdots \mathcal{O}^i(r_C) & \cdots \mathcal{O}^j(r_C) &\cdots 1 \\ \end{array} \right)\, , \end{eqnarray} \begin{eqnarray}\label{conf2} \text{Second configuration:} \quad \left(\begin{array}{cccccc} 1 &\cdots \mathcal{O}^i(r_A) & \cdots \mathcal{O}^j(r_A) & \cdots 1 &\cdots 1 \\ 1 &\cdots 1 & \cdots \mathcal{O}^j(r_B) & \cdots \mathcal{O}^k(r_B) &\cdots 1 \\ 1 &\cdots \mathcal{O}^i(r_C) & \cdots 1 & \cdots \mathcal{O}^k(r_C) &\cdots 1 \\ \end{array} \right)\, . \end{eqnarray} Here, each row represents the operators associated to a given region: $A$, $B$, $C$ and each column represents a sheet on the multiple copies of the geometry. We normalize primary operators so that their two- and three-point functions are given by \begin{eqnarray} \langle \mathcal{O}(r_A)\mathcal{O}(r_B)\rangle=\frac{1}{r_{AB}^{2\Delta}}, \qquad{\rm and } \qquad \langle \mathcal{O}(r_A)\mathcal{O}(r_B)\mathcal{O}(r_C)\rangle=\frac{C_{\mathcal{O}\cO\mathcal{O}}}{r_{AB}^{\Delta}r_{BC}^{\Delta}r_{AC}^{\Delta}}\,, \end{eqnarray} respectively. We use the notation $r_{AB}=|r_A-r_B|$. In the first configuration we get a product of two three-point functions while in the second we get a product of three two-point functions. Both of them yield a $\sim \(r_{AB}r_{BC}r_{AC}\)^{-2\Delta}$ behavior. A configuration of the type (\ref{conf1}) for fixed $\{i,j\}$ is unique while a configuration like (\ref{conf2}) for fixed $\{i, j ,k\}$ ---via permutations across the regions $A$, $B$ and $C$--- gives rise to $3!=6$ non-equivalent ones but with the same numerical value. Thus, the full answer is given by \begin{eqnarray}\label{I3-31} I_3(A,B,C)=-\frac{1}{r_{AB}^{2\Delta}r_{BC}^{2\Delta}r_{AC}^{2\Delta}}\lim_{n\rightarrow 1}\[\frac{\(C_{\mathcal{O}\cO\mathcal{O}}\)^2}{n-1}\sum_{i<j}\(C_{ij}\)^3+\frac{6}{n-1}\sum_{i<j<k} C_{ij}C_{jk}C_{ki}\,\]. \end{eqnarray} By looking at the derivation of (\ref{scalar-CA}) in \cite{Agon:2015ftl}, we observe that for a power different than two, say $s$, we simply need to replace $\Delta \to s\Delta/2$ in that formula. For our case, $s=3$, and we obtain \begin{eqnarray} \lim_{n\to 1}\frac{1}{n-1}\sum_{i<j}\(C_{ij}\)^3=\frac{\sqrt{\pi}}{4}\frac{\Gamma\!\(3\Delta +1\)}{\Gamma\!\(3\Delta +\frac{3}{2}\)}R_A^{2\Delta}R_B^{2\Delta}R_C^{2\Delta}\,. \end{eqnarray} This allows us to evaluate the first term of (\ref{I3-31}), which therefore gives a negative contribution to the tripartite information. The second term is more complicated to analyze. We devote section \ref{A-C} to explain how to compute it using the same techniques introduced in \cite{Agon:2015ftl}. The final result reads \begin{eqnarray}\label{AC-2pf} \lim_{n\to 1}\frac{1}{n-1}\sum_{i<j<k} C_{ij}C_{jk}C_{ki} =-\frac{ 2^{6\Delta}\Gamma\( \Delta +\frac{1}{2}\)^3}{12\pi \Gamma\(3\Delta +\frac{3}{2}\)}R_A^{2\Delta}R_B^{2\Delta}R_C^{2\Delta}\,. \end{eqnarray} Putting the pieces together, we obtain a closed expression for the leading term in the long-distance regime of the tripartite information, namely, \begin{eqnarray}\label{I3-LD1} I_3(A,B,C)=-\frac{R_A^{2\Delta}R_B^{2\Delta}R_C^{2\Delta}}{r_{AB}^{2\Delta}r_{BC}^{2\Delta}r_{AC}^{2\Delta}}\[\frac{\sqrt{\pi}}{4}\frac{\Gamma\!\(3\Delta +1\)}{\Gamma\!\(3\Delta +\frac{3}{2}\)}\(C_{\mathcal{O}\cO\mathcal{O}}\)^2 -\frac{2^{6\Delta} \Gamma\(\Delta + \frac{1}{2}\)^3}{2\pi \Gamma\(3\Delta +\frac{3}{2}\)} \]\,. \end{eqnarray} This is our main result. Observe that both terms inside the square brackets are positive-definitive except for the relative minus sign. As it happens for the long distance coefficient of the mutual information, the coefficient of the tripartite information depends on the lowest scaling dimension but not explicitly on the spacetime dimension. This is due to the universal form of the modular flow for spherical entangling surfaces. The coefficient in front of the $(C_{\mathcal{O}\cO\mathcal{O}})^2$ is a monotonically decreasing function of $\Delta$ and tends to zero for $\Delta \gg 1$. On the other hand, the coefficient with the minus sign takes a minimum value of $\simeq 0.604$ for $\Delta_{\rm min}\simeq 0.841$ and then becomes monotonically increasing for greater values of $\Delta$ ---see left and middle plots in Fig.\,\ref{refiss3ds}. We observe then that depending on the value of $C_{\mathcal{O}\cO\mathcal{O}}$, the tripartite information in this regime can be positive, negative or zero. The first two cases correspond to non-monogamous and monogamous mutual informations, respectively ---see right plot in Fig.\,\ref{refiss3ds}. We make more comments regarding these possibilities in Section \ref{discuuu}. \begin{figure}[t] \centering \includegraphics[scale=0.503]{coeftripar2.pdf}\hspace{-0.4cm} \includegraphics[scale=0.51]{coeftripar1.pdf}\hspace{-0.3cm} \includegraphics[scale=0.48]{monogamy.pdf} \caption{In the first two plots, we show, respectively, the dependence on the lowest-scaling dimension $\Delta$ of a given CFT of the two coefficients appearing in our formula for the tripartite information at long distances. The third plot represents how the value of $(C_{\mathcal{OOO}})^2$ determines whether or not the CFT has a monogamous mutual information (at least in the long-distance regime). When $(C_{\mathcal{OOO}})^2$ is larger than $\frac{2^{6\Delta+1} \Gamma(\Delta+1/2)^3}{\pi^{3/2}\Gamma(3\Delta+1)}$ (red curve) the mutual information is monogamous and viceversa. } \label{refiss3ds} \end{figure} Note also that when the coefficient $C_{\mathcal{O} \mathcal{O}\cO}=0$ ---in particular when the lowest dimensional operator is free or charged under a global symmetry that gives non-zero charge to the product of three operators (such as a $\mathbb{Z}_2$ symmetry acting as $\mathcal{O}\to -\mathcal{O}$)--- the tripartite information reduces to \begin{eqnarray}\label{I3-LD-3} I_3(A,B,C)=\frac{2^{6\Delta} \Gamma\(\Delta+\frac{1}{2}\)^3}{2\pi \Gamma\!\(3\Delta +\frac{3}{2}\)}\, \frac{R_A^{2\Delta}R_B^{2\Delta}R_C^{2\Delta}}{r_{AB}^{2\Delta}r_{BC}^{2\Delta}r_{AC}^{2\Delta}}\,. \end{eqnarray} For all these theories, the mutual information is non monogamous. In particular for a free scalar in $d$ spacetime dimensions, $\Delta=(d-2)/2$, and setting the three radii of the spheres equal for simplicity, one gets, \begin{eqnarray}\label{laaa} \left. I_3(A,B,C)\right|^{\rm scalar}_{d= 3}=\frac{2^{(3d-7) } \Gamma\(\frac{d-1}{2}\)^3 }{\pi \Gamma\(\frac{3(d-1)}{2}\)}\frac{R^{3(d-2)}}{r^{(d-2)}_{AB}r^{(d-2)}_{BC} r^{(d-2)}_{AC}}\,. \end{eqnarray} Later, we will verify this expression in the lattice for $d= 3$. In that case, we have \begin{eqnarray}\label{I3-3dff} \left. I_3(A,B,C)\right|^{\rm scalar}_{d= 3}=\frac{2}{\pi}\frac{R^3}{r_{AB}r_{BC} r_{AC}}\,. \end{eqnarray} Another natural example is the Ising model in three dimensions. The lowest scaling dimension is in that case given by \cite{Kos:2016ysd} $ \Delta^{\rm Ising}_{d=3}= 0.5181489(10)\, , $ and hence we find for the corresponding long-distance tripartite information \begin{eqnarray}\label{I3-ising} \left. I_3(A,B,C)\right|^{\rm Ising}_{d= 3}\simeq 0.632833\, \frac{R^{3.10889}}{r_{AB}^{1.0362978}r_{BC}^{1.0362978}r_{AC}^{1.0362978}}\,. \end{eqnarray} Note that the power is slightly greater than in the scalar case, whereas the coefficient is smaller ($2/\pi \simeq 0.63662 $). Similarly, for the $O(2)$ model one finds using results from \cite{Chester:2019ifh}, \begin{eqnarray}\label{I3-on} &\left. I_3(A,B,C)\right|^{O(2)}_{d= 3} \simeq \displaystyle 0.632645\, \frac{R^{3.11453}}{r_{AB}^{1.03818}r_{BC}^{1.03818}r_{AC}^{1.03818}}\,. \end{eqnarray} For the $O(3)$ model, the currently known result for $\Delta^{ O(3)}_{d=3}$ \cite{Kos:2016ysd} suggests that it may be slightly greater than $\Delta^{ O(2)}_{d=3}$, which would produce a greater power for $R$ and $r$, and a slightly smaller coefficient. For sufficiently large values of $N$, the result tends to the free scalar values. In particular, in the large-$N$ limit, we have \begin{eqnarray} \left. I_3(A,B,C)\right|^{O(N\gg1)}_{d= 3} \simeq \displaystyle \left[\frac{2}{\pi}+\frac{4(4\log(2) -3)}{\pi^3 N} \right]\, \frac{R^{3+8/(\pi^2 N) }}{r_{AB}^{1+8/(3\pi^2 N)}r_{BC}^{1+8/(3\pi^2 N)}r_{AC}^{1+8/(3\pi^2 N)}}\,, \end{eqnarray} where we used the expression for $\left.\Delta\right|^{O(N\gg1)}_{d= 3}$ valid up to $\mathcal {O}(1/N)$ ---see {\it e.g.,} \cite{Kos:2013tga} for the answer up to $\mathcal {O}(1/N^3)$. Our formula is completely general, so it applies to any other model with a scalar as its lowest scaling dimension operator. For instance, the explicit expression for the $O(N)$ model in the large-$N$ expansion for general $d$ can be similarly obtained using {\it e.g.,}\ results from \cite{Fei:2014yja}. Our formula can also be generalized to include all the descending operators associated to the leading term in the OPE expansion of the twist operator, this is, the quadratic term in (\ref{Sigmatilde}). The final formula is given in (\ref{final-OPE}). We discussed this generalization in detail in appendix \ref{OPE-block-section}. \subsection{Analytic continuation of the sums over coefficients $C_{ij}$\label{A-C}} The first coefficient in our formula \req{I3-LD1} can be relatively easily obtained, as we saw in the previous subsection. On the other hand, computing the second one has required considerably more work, which we present here. We wish to show that the LHS of \req{AC-2pf} can be written as the expression appearing in the RHS. As a first step, we recall that in \cite{Agon:2015ftl}, the coefficient $C_{ij}$ was related to the thermal Green function of the theory on hyperbolic space, evaluated at different points along the thermal circle \begin{eqnarray} \label{cjg} C_{jj'}=(2R)^{2\Delta}G_n(2\pi (j-j'))\,, \end{eqnarray} where the factor $(2R)^{2\Delta}$ comes from the details of the conformal transformation. More explicitly, the conformal map introduced in \cite{Casini:2011kv} takes a single copy of $\mathbb{R}^d$ into $\mathbb{S}^1\times \mathbb{H}^{d-1}$, where $\mathbb{H}^{d-1}$ is the hyperbolic space. Such map can be adapted such that the conifold of singularities $\mathcal{C}^{(n)}_A$ is mapped to $\mathbb{S}_n^1\times \mathbb{H}^{d-1}$, where the thermal circle $\mathbb{S}_n^1$ now obeys $\tau \equiv \tau+2\pi n$ and thus allows us to connect two-point functions on $\mathcal{C}^{(n)}_A$ with thermal two-point functions on $\mathbb{S}_n^1\times \mathbb{H}^{d-1}$ (\ref{cjg}). For $n=1$ the thermal two-point function is known to be \begin{eqnarray}\label{G1} G_1(\tau)=\frac{1}{2^\Delta\(1-\cos\tau\)^{\Delta}}=\frac{1}{2^{2\Delta} \sin^{2\Delta}\(\tau/2\)}\,, \end{eqnarray} where we also known that $G_1(-is)$ decays as $e^{-\Delta|s|}$ for real $s$. The assumed analyticity in $n$ implies that a similar exponential decay should happen for $G_n(-is)$. This property together with the standard analyticity properties of thermal two-point functions allows us to evaluate the sum $\sum^{n-1}_{j=1} G_n^2(2\pi j)$ in \cite{Agon:2015ftl}. A key step in that computation is to relate the previous sum to a contour integral \begin{eqnarray}\label{sum} \sum^{n-1}_{j=1} G_n^2(2\pi j)=\int_{\gamma_n} \frac{\mathrm{d} s}{2\pi i} \frac{G_n^2(-is)}{e^s-1} \, , \end{eqnarray} where the exponential decay assumption allows us to deform the integral contour $\gamma_n$ to the horizontal lines at $\operatorname{\mathbb{I}m}(s)=2\pi n-\epsilon$ and $\operatorname{\mathbb{I}m}(s)=\epsilon$ as depicted in Figure {\ref{fig:contour}}. \begin{figure}[t!] \begin{center} \hspace{-1.5cm}\includegraphics[scale=0.3]{Contour6} \begin{picture}(0,0) \put(-116,62){{\small $\gamma_n$}} \put(-9,6){{\small $\operatorname{\mathbb{I}m}(s)=0$}} \put(-9,116){{\small $\operatorname{\mathbb{I}m}(s)=2\pi n$}} \end{picture} \end{center} \vspace{-0.4cm} \caption{Integration contour (depicted in solid blue) used to evaluate the complex integral in (\ref{sum}). Assuming the integrand vanishes for $\operatorname{\mathbb{R}e}(s) \to \pm\infty$, we can then deform the contour $\gamma_n$ to be the dashed blue lines at $\operatorname{\mathbb{I}m}(s)=\epsilon$ and at $\operatorname{\mathbb{I}m}(s)=2\pi n-\epsilon$ with $\epsilon>0$. For illustrative purposes, we have picked the value $n=4$ to make this figure.} \label{fig:contour} \end{figure} Here we are interested in the following sum, \begin{eqnarray} \sum_{i<j<k} C_{ij}C_{jk}C_{ki}=(2R)^{6\Delta}\sum_{i<j<k} G_n(2\pi (j-i))G_n(2\pi (k-j))G_n(2\pi (i-k))\, , \end{eqnarray} where we used \req{cjg} in the RHS. Notice that one can extend the sum to a disordered one and pay a symmetry factor for it. Then one can further fix the location of one of the operators to be zero and multiply by $n$ using the replica symmetry. After that, we can recover an ordered sum by paying the price of a remaining symmetry factor of $2$. The sequence is \begin{eqnarray}\label{sums-sym} \sum_{i<j<k} \to \frac{1}{3!}\sum_{i\neq j\neq k}\to \frac{n}{3!}\sum_{i=0, j\neq k>0} \to \frac{n}{3}\sum_{i=0, k>j>0} \, . \end{eqnarray} Applying the above equivalence we can write \begin{eqnarray}\label{Cij-3} \sum_{i<j<k} C_{ij}C_{jk}C_{ki} =2^{6\Delta}R^{6\Delta}\,\, \frac{n}{3} \, C_{n}\, , \end{eqnarray} where \begin{eqnarray} C_n\equiv \sum_{j=1}^{n-2}G_n(2\pi j)\,\sum_{k=j+1}^{n-1} G_n(2\pi (k-j))G_n(2\pi k) \, , \end{eqnarray} and where we also used the fact that Green functions must be reflection symmetric $G_n(\tau)=G_n(-\tau)$. Now it is convenient to rewrite the double sum as \begin{eqnarray} C_n=\sum_{k=2}^{n-1} G_n(2\pi k)\, \sum_{j=1}^{k-1} G_n(2\pi (j-k))G_n(2\pi j)\, , \end{eqnarray} where the relevant contour for the $j$-sum is given in Fig.\,\ref{fig:contour} (with the simple $n\to k$ replacement). At this point we cannot make a similar replacement for the other sum as the first contour depends on the integer label $k$. We deform the integral to the horizontal contours along $\mathbb{I}{\rm m}(s)=\epsilon$ and $\mathbb{I}{\rm m}(s)=2\pi k-\epsilon$. The vertical parts do not contribute as we assume an exponential decay along the imaginary axis as discussed around (\ref{G1}). Then, we have \begin{eqnarray} C_n=\sum_{k=2}^{n-1} G_n(2\pi k) \int_{-\infty}^{\infty}\frac{\mathrm{d} s}{2\pi i} \!\!\!\! \!\!\!\! & \displaystyle \left[\frac{G_n(-is+\epsilon) G_n(-is-2\pi k+\epsilon)}{e^{\(s+i\epsilon \)}-1} \right. \\ & \notag \displaystyle \left. -\frac{G_n(-is-\epsilon) G_n(-is+2\pi k-\epsilon)}{e^{\(s+i2\pi k -i\epsilon \)}-1}\right] \,. \end{eqnarray} Using $e^{2\pi i k}=1$ for integer $k$ one gets \begin{eqnarray}\label{Cn-k-sum} C_n=\sum_{k=2}^{n-1} G_n(2\pi k) \int_{-\infty}^{\infty}\frac{\mathrm{d} s}{2\pi i}\!\!\!\! \!\!\!\! & \displaystyle \left[\frac{G_n(-is+\epsilon) G_n(-is-2\pi k+\epsilon)}{e^{\(s+i\epsilon \)}-1} \right. \\ & \notag \displaystyle \left.-\frac{G_n(-is-\epsilon) G_n(-is+2\pi k-\epsilon)}{e^{\(s -i\epsilon \)}-1}\right] \,. \end{eqnarray} The remanent sum can be done via a contour integral by introducing the following function \cite{Casini:2021raa} \begin{eqnarray}\label{fntau} f(n,\tau)\equiv \frac{1}{2\pi i} \sum_{k=2}^{n-1}\frac{1}{\tau-i k }=\frac{1}{2\pi}\(\psi(n+i\tau )-\psi(2+i\tau)\) \end{eqnarray} where $\psi(z)\equiv \Gamma'(z)/\Gamma(z)$ is the digamma function. For positive integer $n\geq 3$, the function $f(n, i u)$ has poles at $u=2, \cdots ,n-1$ with residue one, thus, one can turn the sum over $k$ in (\ref{Cn-k-sum}) into a contour integral over $\tau$ with with $k\to -i\tau $ as \begin{eqnarray}\label{Cnintcontour} C_n=\int_{-\infty}^{\infty}\frac{\mathrm{d} s}{2\pi i}\oint \mathrm{d} \tau f(n,\tau)\,G_n(-2\pi i \tau)&\!\!\!\! \!\!\!\! \!\!\!\! \displaystyle \left[\frac{G_n(-is+\epsilon) G_n(-is+2\pi i \tau+\epsilon)}{e^{\(s+i\epsilon \)}-1} \right. \\ & \notag \displaystyle \left.-\frac{G_n(-is-\epsilon) G_n(-is-2\pi i \tau-\epsilon)}{e^{\(s -i\epsilon \)}-1}\right] \,. \end{eqnarray} The above contour must encircle the poles along $\tau=iu$ with $u\geq 2$. Fixing the integration contour one can study the $n\to1$ limit of the above expression. Before doing so let us study in some detail the function $f(n,\tau)$. First, notice that one can rewrite (\ref{fntau}) as \begin{eqnarray} f(n,\tau)= -\frac{1}{2\pi i}\frac{1}{\tau -i}+\frac{1}{2\pi}\(\psi(n+i\tau )-\psi(1+i\tau)\)\,, \end{eqnarray} where we have added un subtracted a function with a single pole at $\tau=i$ and used the following recursive property $\psi(z+1)=\psi(z)+1/z$. Of course, the full function has no poles at $\tau=i$, nevertheless, such separation is convenient since the second term has a simple expression in the $n\to 1$ limit \cite{Casini:2021raa}. Since we want to discard the first term, it is enough to make sure the integration contour in (\ref{Cnintcontour}) does not contain the spurious pole at $\tau=i$. Indeed, we will chose the contour integral to be made out of the line $\mathbb{I}{\rm m}(\tau)=3i/2$ plus a semi-circle of infinite radius closing the contour on the upper half plane. Such contour satisfies all our requirements and the integral on the semi-circle vanishes due to the exponential damp coming from $G_n$. In the $n\to1$ limit we have \begin{eqnarray} f(n,\tau)\sim -\frac{1}{2\pi i}\frac{1}{\tau -i}-(n-1)\(\frac{1}{2\pi} \psi'(-i\tau )+\frac{\pi}{2\sinh^2(\pi \tau )}\)+\mathcal{O}((n-1)^2)\,. \end{eqnarray} The function $\psi'(-i\tau)$ and $1/(\tau-i)$ above has no poles inside the integration contour and therefore, they do not contribute to the contour integral. The second term inside the parenthesis gives a contribution proportional to $n-1$, which means we can evaluate the remaining terms in the integrand at $n=1$. Thus, the leading term in the $n-1$ expansion of $C_n$ is \begin{eqnarray} C_n=(n-1)\int_{-\infty}^{\infty}\frac{\mathrm{d} s}{2\pi i}\int_{\infty}^{\infty}{\mathrm{d} s'} \, \frac{G_1(-i s'+\pi)}{4\cosh^2(s'/2 )}&\!\!\!\! \!\!\!\! \!\!\!\! \displaystyle \left[\frac{G_1(-is+\epsilon) G_1(-i(s-s')+\pi+\epsilon)}{e^{\(s+i\epsilon \)}-1} \right. \\ & \notag \displaystyle \left.-\frac{G_1(-is-\epsilon) G_1(-i(s+s')+\pi-\epsilon)}{e^{\(s -i\epsilon \)}-1}\right] \, , \end{eqnarray} where we have changed the integration variable from $\tau$ to $s'$ via $\tau=3i/2 +s'/2\pi$, and used the $2\pi$ periodicity of $G_1(\tau)$. The integral above can be further simplified into \begin{eqnarray} C_n=(n-1)\int_{-\infty}^{\infty}\frac{\mathrm{d} s}{2\pi i}\left[\frac{G_1(-is+\epsilon) }{e^{(s+i\epsilon )}-1} -\frac{G_1(-is-\epsilon)}{e^{\(s -i\epsilon \)}-1}\] \int_{-\infty}^{\infty}\mathrm{d} s' \frac{G_1(-is'+\pi) G_1(-i\(s-s'\)+\pi)}{4\cosh^2(s'/2)} \,,\nonumber \\ \end{eqnarray} which we arrive at after changing $s'\to -s'$ in the second integral, using the reflection symmetry of $G_1(\tau)$ and the $2\pi$ periodicity. We also dropped the $\epsilon$ dependence on the $G_1$ functions with real argument $\pi$ as those functions are completely regular inside the integrals. Replacing the expression for $G_1$ in the second integral leads to \begin{eqnarray}\label{Cn} & \displaystyle C_n=(n-1)\frac{1}{2^{4\Delta}}\int_{-\infty}^{\infty}\frac{\mathrm{d} s}{2\pi i}\left[\frac{G_1(-is+\epsilon) }{e^{(s+i\epsilon )}-1} -\frac{G_1(-is-\epsilon)}{e^{\(s -i\epsilon \)}-1}\] \\ & \displaystyle \qquad \qquad \qquad \qquad \qquad \qquad \cdot \int_{-\infty}^{\infty}\mathrm{d} s' \frac{1}{4\cosh^{2(\Delta+1)}(s'/2)\cosh^{2\Delta}((s-s')/2)} \nonumber \, . \end{eqnarray} So far we have succeeded at obtaining a closed-form expression for the linear piece of $C_n$ in the $(n-1)$ expansion, which is relevant for the computation of the tripartite information. This expression is given as a double integral which we will now evaluate via a series of convenient manipulations. Let us first separate $C_n$ into two contributions as \begin{eqnarray} C_n=C_n^+-C_n^-\, , \end{eqnarray} with the obvious identifications. Now, let us factor out the coupling term in the double integral by introducing a delta function of the form \begin{eqnarray} \int_{-\infty}^\infty\frac{\mathrm{d} u}{2}\, \delta\!\[\frac{u}{2}-\(\frac{s-s'}{2}\)\] = \int_{-\infty}^\infty \frac{\mathrm{d} q}{2\pi}\int_{-\infty}^\infty\frac{\mathrm{d} u}{2} e^{iq\[\frac{u}{2}-\(\frac{s-s'}{2}\)\]} \, . \end{eqnarray} Then, the $C_n^{\pm }$ become \begin{eqnarray}\label{Cn+} C_n^{\pm}&=&(n-1)\frac{1}{2^{4\Delta+3}}\int_{-\infty}^\infty \frac{\mathrm{d} q}{2\pi}\int_{-\infty}^{\infty}\frac{\mathrm{d} s}{2\pi i}\frac{e^{-iq s/2} G_1(-is\pm \epsilon) }{e^{(s\pm i\epsilon )}-1} \int_{-\infty}^{\infty}\mathrm{d} s' \frac{e^{iqs'/2}}{\cosh^{2(\Delta+1)}(s'/2)} \nonumber \\ && \qquad \qquad \qquad \int_{-\infty}^{\infty}\mathrm{d} u \frac{e^{iqu/2}}{\cosh^{2\Delta}(u/2)} \, . \end{eqnarray} Now, the $s$ integral in this $C_n^{\pm }$ contour can be deformed to the Im$(s)= \pm i\pi$ surface and after that we can safely take $\epsilon \to 0$. This results in \begin{eqnarray} C_n^{\pm }&=&-(n-1)\frac{1}{2^{6\Delta+4}}\int_{-\infty}^\infty \frac{\mathrm{d} q}{2\pi}e^{\pm q\pi/2}\int_{-\infty}^{\infty}\frac{\mathrm{d} s}{2\pi i}\frac{e^{-s/2}e^{-iq s/2}}{\cosh^{2\Delta+1}\(\frac s2\)} \int_{-\infty}^{\infty}\mathrm{d} s' \frac{e^{iqs'/2}}{\cosh^{2(\Delta+1)}(s'/2)} \nonumber \\ && \qquad \qquad \qquad \int_{-\infty}^{\infty}\mathrm{d} u \frac{e^{iqu/2}}{\cosh^{2\Delta}(u/2)} \, , \end{eqnarray} and therefore for $C_n$ we get \begin{eqnarray} C_n&=&-(n-1)\frac{1}{2^{6\Delta+3}}\frac{1}{2\pi i}\int_{-\infty}^\infty \frac{\mathrm{d} q}{2\pi}\sinh\(\frac{q\pi}2\)\int_{-\infty}^{\infty}\mathrm{d} s \frac{e^{-s/2}e^{-iq s/2}}{\cosh^{2\Delta+1}\(\frac s2\)} \int_{-\infty}^{\infty}\mathrm{d} s' \frac{e^{iqs'/2}}{\cosh^{2(\Delta+1)}(s'/2)} \nonumber \\ && \qquad \qquad \qquad \int_{-\infty}^{\infty}\mathrm{d} u \frac{e^{iqu/2}}{\cosh^{2\Delta}(u/2)} \,. \end{eqnarray} Now we can use the following integral \begin{eqnarray} \int_{-\infty}^{\infty}\mathrm{d} u \frac{e^{\pm iqu/2}}{\cosh^{\Delta}(u/2)} =\frac{2^\Delta\Gamma\(\frac{\Delta}2+i\frac{q}2\)\Gamma\(\frac{\Delta}2-i\frac{q}2\)}{\Gamma(\Delta)}\,, \end{eqnarray} which can be analytically continued to get \begin{eqnarray} \int_{-\infty}^{\infty}\mathrm{d} u \frac{e^{\pm iqu/2}e^{-u/2}}{\cosh^{\Delta}(u/2)} =\frac{2^\Delta\Gamma\(\frac{\Delta}2\pm i\frac{q}2-\frac 12\)\Gamma\(\frac{\Delta}2\mp i\frac{q}2+\frac 12\)}{\Gamma(\Delta)}\,. \end{eqnarray} Replacing these integrals in the resulting expression for $C_n$ one gets: \begin{eqnarray} C_n&=&-\frac{(n-1)}{2\pi i}\int_{-\infty}^\infty \frac{\mathrm{d} q}{2\pi}\sinh\(\frac{q\pi}2\) \frac{\Gamma\(\Delta-i\frac{q}2\)^2\Gamma\(\Delta+i\frac{q}2+1\)^2\Gamma\(\Delta-i\frac{q}2+1\)\Gamma\(\Delta+i\frac{q}2\)}{\Gamma(2\Delta+1)\Gamma(2\Delta+2)\Gamma(2\Delta)}\,. \nonumber \\ \end{eqnarray} This expression is not obviously real. However, we can rewrite it in a manifestly real form using the relation $|\Gamma(z)|^2=\Gamma(z) \Gamma(\bar{z})$ and the defining property of the Gamma function as \begin{eqnarray} C_n&=&-\frac{(n-1)}{2\pi i}\int_{-\infty}^\infty \frac{ \mathrm{d} q}{2\pi}\sinh\(\frac{q\pi}2\) \(\Delta+i \frac q2\) \frac{\left|\Gamma\(\Delta+i\frac{q}2+1\)\right|^2\, \left|\Gamma\(\Delta+i\frac{q}2\)\right|^4}{\Gamma(2\Delta+1)\Gamma(2\Delta+2)\Gamma(2\Delta)}\,. \end{eqnarray} In this integral, only the even part contributes. Since $|\Gamma(z)|^2$ is even on the imaginary part of its argument we conclude that only the imaginary part in $(\Delta+iq/2)$ contributes. This results in\footnote{For a recent analysis of a similar analytic continuation see \cite{Chandrasekaran:2021tkb}. There is also an interesting analytic continuation in \cite{Sarosi:2017rsq}, where the authors continue a sum over three-point functions.} \begin{eqnarray}\label{final-Cn} C_n&=&-(n-1)\frac{1}{8\pi \Delta }\int_{-\infty}^\infty \frac{\mathrm{d} q}{2\pi}\, q\, \sinh\(\frac{q\pi}2\)\, \frac{\left|\Gamma\(\Delta+i\frac{q}2+1\)\right|^2\, \left|\Gamma\(\Delta+i\frac{q}2\)\right|^4}{\Gamma(2\Delta+2)\(\Gamma(2\Delta)\)^2}\,. \end{eqnarray} The expression above is real and non-positive for $n>1$. Now, we are interested in the coefficient $C$ defined as \begin{eqnarray} C\equiv \lim_{n\to 1}\frac{1}{n-1}\sum_{i<j<k} C_{ij}C_{jk}C_{ki} =\lim_{n\to 1}\frac{2^{6\Delta}}3 R^{6\Delta}\,\frac{n\, C_{n}}{n-1}\, , \end{eqnarray} where the second equality follows from (\ref{Cij-3}). From (\ref{final-Cn}) one finds \begin{eqnarray}\label{Int-Cij-3} \frac{C}{R^{6\Delta}}=-\frac{2^{6\Delta}}{24\pi \Delta }\int_{-\infty}^\infty \frac{\mathrm{d} q}{2\pi}\, q\, \sinh\(\frac{q\pi}2\)\, \frac{\left|\Gamma\(\Delta+i\frac{q}2+1\)\right|^2\, \left|\Gamma\(\Delta+i\frac{q}2\)\right|^4}{\Gamma(2\Delta+2)\(\Gamma(2\Delta)\)^2}\,. \end{eqnarray} Finally, one can check this reduces to \begin{eqnarray}\label{C/R} \frac{C}{R^{6\Delta}}=-\frac{2^{6\Delta} \Gamma\(\Delta+\frac{1}{2}\)^3}{12 \pi \Gamma\(3\Delta + \frac{3}{2}\)}\,, \end{eqnarray} which leads to (\ref{AC-2pf}). \section{Mutual and tripartite information for fermions}\label{I3ferm} In the previous section we derived a formula for the leading long distance contribution to the tripartite information for disjoint spheres (\ref{I3-LD1}). Such result was obtained for a generic CFT with a scalar as its lowest scaling dimension operator. However, in general, such an operator can have arbitrary spin. In this section we study how the above analysis gets modified when the lowest dimension operator is fermionic. This case is of special interest due to the fact that in two dimensions a free fermion has an identically vanishing tripartite information, $I_3\equiv 0$, while a naive generalization to the formula (\ref{I3-LD1}) suggests a non-zero answer. This seems to be the case, due to the presence of a universal contribution coming from products of two-point functions ---second term in (\ref{I3-LD1}). In this section we will show that such universal contribution vanishes identically for fermions. This fact will be later supported by a lattice analysis in Section \ref{Lattice-2+1}. Following Cardy \cite{Cardy:2013nua}, the twist operator $\tilde{\Sigma}_{A}$ is dominated at long distance by the product of two operators with the lowest scaling dimension in the theory. For spin half operators this implies \begin{eqnarray}\label{Sigma-t-ferm} \tilde{\Sigma}_A\approx \sum_{j\neq i} C^{A, \alpha \beta}_{ij}\bar{\psi}^i_{\alpha}(r_A)\psi^j_{\beta}(r_A)\,, \end{eqnarray} where $i,j$ labels the sheets on which the spinor fields are located and $\alpha, \beta$ are spinor indices. The tensor structure for $C^{A, \alpha \beta}_{ij}$ was deduced in \cite{Casini:2021raa} to be \begin{eqnarray}\label{C-ferm} C^{A, \alpha \beta}_{ij}=a^A_{ij}\delta_{\alpha \beta}+b^A_{ij}n_A^\mu\(\gamma_\mu \)_{\alpha \beta}\, , \end{eqnarray} where $n_A^\mu$ is the vector normal to the spherical region. The authors of \cite{Casini:2021raa} further argued that $a^A_{ij}=0$. In even dimensions this is the case due to chiral symmetry and in odd dimension this avoids parity violation. As in the scalar case, one can read off the undetermined coefficients $b^A_{ij}$, by studying the long distance behavior of the appropriate two point function in the presence of the twist operator. This is, one computes\footnote{Notice that the correlator ${\rm Tr}[\langle \tilde{\Sigma}_A \bar{\psi}^i_\rho(\bar{r}) \psi^j_\sigma(\bar{r}) \rangle]$ vanishes identically as it is proportional to the trace of a single gamma matrix} \begin{eqnarray}\label{trace-bij} \bar{n}^\mu {\rm Tr}[\langle \tilde{\Sigma}_A \bar{\psi}^i_\lambda(\bar{r})\(\gamma_{\mu}\)_{\lambda \rho}\psi^j_\sigma(\bar{r})\rangle] \quad {\rm when} \quad |\bar{r}-r_A|^2 \to \infty \,. \end{eqnarray} In the above formula $\bar{r}$ is an arbitrary point chosen to be far away from $A$. Likewise, $\bar{n}$ is an arbitrary future directed time-like normal vector and thus one can chose it to have any particular direction as to simplify the above formula. For the computation of (\ref{trace-bij}) we need the two point function of the spinor fields \begin{eqnarray}\label{fermion-2pf} \langle \psi_\alpha (r_A) \bar{\psi}_\beta(r_B) \rangle =i (\gamma^\mu)_{\alpha \beta} \frac{\(r_B-r_A\)_\mu}{|r_B-r_A|^{2\Delta+1}}\,, \end{eqnarray} where $\Delta$ is the scaling dimension of the spinor field. We evaluate the quantity (\ref{trace-bij}) by using (\ref{Sigma-t-ferm}) and (\ref{C-ferm}) with $a^A_{ij}=0$, which leads to \begin{eqnarray} \bar{n}^\mu \langle \tilde{\Sigma}_A \bar{\psi}^i_\lambda(\bar{r})\(\gamma_{\mu}\)_{\lambda \rho}\psi^j_\rho(\bar{r}) \rangle=\sum_{k\neq l} b^{A}_{kl}\, n_A^\nu \(\gamma_\nu \)_{\alpha \beta} \bar{n}^\mu \(\gamma_\mu\)_{\lambda \rho} \langle \bar{\psi}^k_{\alpha}(r_A)\psi^l_{\beta}(r_A) \bar{\psi}^i_{\lambda}(\bar{r})\psi^j_{\rho}(\bar{r})\rangle\,, \end{eqnarray} where the trace in (\ref{trace-bij}) has been included implicitly. The four-point function factorizes into a product of two-point functions which can be evaluated using (\ref{fermion-2pf}). The result is \begin{eqnarray}\label{bji} \bar{n}^\mu \langle \tilde{\Sigma}_A \bar{\psi}^i_\lambda(\bar{r})\(\gamma_{\mu}\)_{\lambda \rho}\psi^j_\rho(\bar{r}) \rangle&=&-\frac{1}{r^{4\Delta}} b^{A}_{ji}\, n_A^\nu \(\gamma_\nu \)_{\alpha \beta} \bar{n}^\mu \(\gamma_\mu\)_{\lambda \rho} \hat{r}^\pi \(\gamma_\pi\)_{\rho \alpha} \hat{r}^\rho \(\gamma_\sigma\)_{\beta \lambda } \nonumber \\ &=&-\frac{1}{r^{4\Delta}}b^{A}_{ji}\,n_A^\nu \bar{n}^\mu \hat{r}^\pi \hat{r}^\sigma {\rm Tr}\( \gamma_\nu \gamma_\sigma \gamma_\mu \gamma_\pi \) \nonumber \\ &=&-\[ 2\(n_A\cdot \hat{r}\)\(\bar{n}\cdot \hat{r}\)-\(n_A\cdot \bar{n}\) \]\frac{b^{A}_{ji}}{r^{4\Delta}}\,, \end{eqnarray} where we introduced the variables $r=|\bar{r}-r_A|$ and $\hat{r}=(\bar{r}-r_A)/|\bar{r}-r_A|$, and used the identity \begin{eqnarray}\label{4gammas} {\rm Tr}\(\gamma_\alpha \gamma_\mu \gamma_\beta \gamma_\nu \)=2^{\[\frac{d}2\]}\(\eta_{\alpha \mu}\eta_{\beta \nu}+\eta_{\alpha \nu}\eta_{\mu \beta }-\eta_{\alpha \beta}\eta_{ \mu \nu}\) \end{eqnarray} in the last line. Equation (\ref{bji}) can be inverted to obtain the coefficient $b_{ji}^A$ in terms of the correlator in (\ref{trace-bij}) when $r$ goes to infinity as \begin{eqnarray} b^{A}_{ji}=-\lim_{r\to \infty}2^{-\[\frac{d}2\]}\, r^{4\Delta}\frac{\bar{n}^\mu \langle \tilde{\Sigma}_A \bar{\psi}^i_\lambda(\bar{r})\(\gamma_{\mu}\)_{\lambda \rho}\psi^j_\rho(\bar{r}) \rangle}{\[ 2\(n_A\cdot \hat{r}\)\(\bar{n}\cdot \hat{r}\)-\(n_A\cdot \bar{n}\) \]}\,. \end{eqnarray} \subsection{Mutual information} We can write down expressions for the leading term in the mutual information and tripartite information respectively in terms of the coefficients $b_{ij}$ from the twist operator expansion (\ref{Sigma-t-ferm}). We start with the mutual information $I(A,B)$ whose leading term, according to (\ref{MI}), (\ref{Sigma-t-ferm}) and (\ref{C-ferm}) is given by \begin{eqnarray} I(A,B)=\lim_{n\to 1}\frac{1}{n-1}\sum_{j\neq i}\sum_{l\neq k}b^A_{ij}\,b^B_{kl}\, n_A^\mu n_B^\nu \langle\bar{\psi}^i_{\alpha}(r_A)\(\gamma_\mu\)_{\alpha \beta}\psi^j_{\beta}(r_A) \bar{\psi}^k_{\rho}(r_B)\(\gamma_\nu\)_{\rho \sigma}\psi^l_{\sigma}(r_B)\rangle +\dots \end{eqnarray} Following the same steps used to obtain the coefficient $b_{ji}^A$ in (\ref{bji}), one can reduce the above expression to \begin{eqnarray}\label{MI-ferm} I(A,B)=2^{\[\frac d2\]+1}\frac{\(2(n_A\cdot \hat{r})(n_B\cdot \hat{r})-(n_A\cdot n_B)\)}{r^{4\Delta}}\(\lim_{n\to 1}\frac{1}{2(1-n)}\sum_{j\neq i}b^A_{ij}\,b^B_{ji}\)+\dots\,, \end{eqnarray} where here $r=|r_B-r_A|$ and $ \hat{r}=(r_B-r_A)/|r_B-r_A|$. With a bit of extra work it can be shown that the analytic continuation of the sum over $b^A_{ij}b^B_{ji}$ in the $n$ going to $1$ limit (the last factor in (\ref{MI-ferm})), equals the analogous coefficient for the scalar (\ref{scalar-CA}). Thus, the final long-distance result for the mutual information coincides with the one presented in \cite{Casini:2021raa} ---including the tensor structure--- as well as with the earlier work of \cite{Chen:2017hbk}. This is \begin{eqnarray} I(A,B)=2^{\[\frac d2\]+1}\frac{\sqrt{\pi}}{4}\frac{\Gamma\(2\Delta +1\)}{\Gamma\(2\Delta +\frac{3}{2}\)}\[2(n_A\cdot \hat{r})(n_B\cdot \hat{r})-(n_A\cdot n_B)\]\frac{R^{2\Delta}_A\,R^{2\Delta}_B}{r^{4\Delta}}+\dots \end{eqnarray} \subsection{Tripartite information} Now, we would like to study the analogous long-distance behavior of the tripartite information for conformal spinors. We start with the expression for the tripartite information given in (\ref{renyi-tripartite}). Using (\ref{Sigma-t-ferm}) and (\ref{C-ferm}) we can write the leading term of (\ref{renyi-tripartite}) in terms of sums of six point functions as \begin{eqnarray}\label{I3-ferm} I_3(A,B,C)&\sim&\lim_{n\to 1}\frac{1}{n-1}\sum_{j\neq i}\sum_{l\neq k}\sum_{m\neq n}b^A_{ij}\,b^B_{kl}\, b^C_{mn} n_A^\mu \(\gamma_\mu\)_{\alpha \beta} n_B^\nu \(\gamma_\nu\)_{\rho \sigma} n_C^\lambda \(\gamma_\lambda\)_{\pi \xi} \nonumber \\ && \qquad \qquad \qquad \times \langle\bar{\psi}^i_{\alpha}(r_A)\psi^j_{\beta}(r_A) \bar{\psi}^k_{\rho}(r_B)\psi^l_{\sigma}(r_B)\bar{\psi}^m_{\pi}(r_C)\psi^n_{\xi}(r_C)\rangle\,. \end{eqnarray} The above six-point function factorizes into products of two-point functions, there are no three-point function terms for spinors. Let us write down the factorization in question explicitly \begin{eqnarray}\label{6pt-3-2points} &&\langle\bar{\psi}^i_{\alpha}(r_A)\psi^j_{\beta}(r_A) \bar{\psi}^k_{\rho}(r_B)\psi^l_{\sigma}(r_B)\bar{\psi}^m_{\pi}(r_C)\psi^n_{\xi}(r_C)\rangle\nonumber \\ &&\qquad \qquad =-\delta^{il}\delta^{jm} \delta^{kn} \langle\bar{\psi}^i_{\alpha}(r_A)\psi^l_{\sigma}(r_B)\rangle \langle \psi^j_{\beta}(r_A)\bar{\psi}^m_{\pi}(r_C) \rangle \langle \bar{\psi}^k_{\rho}(r_B)\psi^n_{\xi}(r_C)\rangle \nonumber \\ &&\qquad \qquad \quad +\delta^{in}\delta^{jk} \delta^{lm} \langle\bar{\psi}^i_{\alpha}(r_A)\psi^n_{\xi}(r_C)\rangle \langle \psi^j_{\beta}(r_A) \bar{\psi}^k_{\rho}(r_B)\rangle \langle\psi^l_{\sigma}(r_B)\bar{\psi}^m_{\pi}(r_C)\rangle \nonumber\\ &&\qquad \qquad =-\frac{i}{r_{AB}^{2\Delta}r_{AC}^{2\Delta}r_{BC}^{2\Delta}}\Big[-\delta^{il}\delta^{jm} \delta^{kn} \hat{r}_{AB}^\tau \hat{r}_{AC}^\eta \hat{r}_{BC}^\chi \(\gamma_\tau\)_{\sigma \alpha} \(\gamma_\eta\)_{\beta \pi} \(\gamma_\chi\)_{\xi \rho} \nonumber \\ &&\qquad \qquad \qquad \qquad \qquad \qquad +\delta^{in}\delta^{jk} \delta^{lm} \hat{r}_{AC}^\tau \hat{r}_{AB}^\eta \hat{r}_{BC}^\chi \(\gamma_\tau\)_{\xi \alpha} \(\gamma_\eta\)_{\beta \rho} \(\gamma_\chi\)_{\sigma \pi} \Big] \,, \end{eqnarray} where we used (\ref{fermion-2pf}) in the second equality, $\hat{r}_{AB}\equiv (r_B-r_A)/|r_{R}-r_A|$, $r_{AB}\equiv |r_B-r_A|$, and similarly for the ${AC}$ and ${BC}$ combinations. Plugging (\ref{6pt-3-2points}) into (\ref{I3-ferm}), and after a bit of algebra we find \begin{eqnarray} I_3(A,B,C) &\sim&\(\lim_{n\to 1}\frac{1}{n-1}\sum_{i\neq j\neq k}b^A_{ij}\,b^B_{jk} \,b^C_{ki} \)\frac{i}{r_{AB}^{2\Delta}r_{AC}^{2\Delta}r_{BC}^{2\Delta}} \hat{r}_{AB}^\tau \hat{r}_{AC}^\eta \hat{r}_{BC}^\chi n_A^{\mu} n_B^\nu n_C^\lambda \nonumber \\ &&\qquad \qquad \qquad \Big\{{\rm Tr}\[\gamma_\mu \gamma_\eta \gamma_\lambda \gamma_\chi \gamma_\nu \gamma_\tau \]-{\rm Tr}\[ \gamma_\tau \gamma_\nu \gamma_\chi \gamma_\lambda \gamma_\eta \gamma_\mu \] \Big\}\,. \nonumber\\ \end{eqnarray} We expect the analytically continued sum (the first term in brackets) to be related to the analogous coefficient for the scalar case (\ref{AC-2pf}). However, the term in curly brackets is identically equal to zero, and thus we conclude that the analogue contribution to the tripartite information obtained for scalars (\ref{I3-3}) identically vanishes for spinors \begin{eqnarray} I_3(A,B,C)= 0 + \dots \end{eqnarray} Therefore, the tripartite information at long distances must decay faster than $\(R/r\)^{6\Delta}$ when the lowest scaling dimension in the CFT is a spinor with scaling dimension $\Delta$. This is indeed the case for $2d$ free fermions as $I_3\equiv 0$.\footnote{For dimensions higher than two, free fermions are known not to be extensive \cite{Casini:2008wt}. Nevertheless, it is interesting to notice that free fermions are close to be so, as it can be seen from a comparison between the varios charges associated to the free fermion theory and the so called ``Extensive Mutual Information model'' \cite{Casini:2008wt, Agon:2021zvp}.} For free fermions in three dimensions we find via a lattice computation presented in Section \ref{Lattice-2+1}, that \begin{equation} \label{feee} I_3\sim \(R/r\)^{6\Delta_f+1} \end{equation} (where in that case $\Delta_f=1$), which is consistent with the above result. We expect \req{feee} to be the leading-order scaling for theories with a fermion as their lowest-dimensional primary. An alternative possibility would involve an additional primary with a scaling dimension $\Delta_f < \tilde \Delta < \Delta_f+1/6$ which would then give rise to a leading scaling $I_3 \sim (R/r)^{\tilde \Delta}$ instead. Observe that the difference in the leading power of the tripartite information between theories with a scalar or a fermion as their lowest-dimensional operator is somewhat different from the mutual information situation. In that case, the leading term is $\sim r^{-4\Delta}$ regardless of the spin of the lowest-dimensional primary ---the only difference being an overall tensorial structure which changes as a function of the spin \cite{Casini:2021raa}. \section{Lattice calculations in $(2+1)$ dimensions \label{Lattice-2+1}} In this section we perform some checks of our analytic results in the case of three-dimensional free fields. In particular, for the free scalar we verify that the long-distance scaling of the tripartite information is $I_3 \sim (R/r)^3$ and that the coefficient in the case of disk entangling regions matches our analytic prediction with reasonable precision. In the case of the fermion, we verify that the analogous long-distance scaling is $I_3 \sim (R/r)^7$, in agreement with our result that the naive leading scaling $I_3 \sim (R/r)^6$ does not hold due to the vanishing of the involved tensorial structures. The coefficient of the leading term for disk regions is also evaluated numerically for the free fermion. \subsection{Long-distance scaling for free scalars and fermions} Let us start with the free scalar. Consider a square lattice of $N$ points and a set of scalar fields and momenta $\phi_i,\pi_j$, $i,j=1,\dots,N$ satisfying canonical commutation relations, $[\phi_i,\pi_j]=i\delta_{ij}$, $[\phi_i,\phi_j]=[\pi_i,\pi_j]=0$. Given a Gaussian state $\rho$, consider the two-point correlators $ X_{ij}\equiv {\tilde \rho} (\rho \phi_i\phi_j)$, $P_{ij}\equiv {\tilde \rho} (\rho \pi_i \pi_j) $. Then, the entanglement entropy corresponding to a region $A$ can be obtained from the restrictions of $X_{ij}$ and $P_{ij}$ to the sites belonging to such a region as \begin{equation}\label{see} S(A)={\tilde \rho} \left[(C_A+1/ 2) \log (C_A+1/2)- (C_A-1/2)\log (C_A-1/2) \right]\, , \end{equation} where $C_A \equiv \sqrt{X_A P_A} $ and we denote $(X_A)_{ij}\equiv X_{ij}$, $(P_A)_{i j}=P_{ij}$ with $i,j\in A$. Here we will work in $d=2+1$, so each index $i$ corresponds to coordinates in a two-dimensional lattice. The free-scalar lattice Hamiltonian can be written as \begin{equation} H= \frac{1}{2} \sum_{n,m=-\infty}^{\infty} \left[\pi^2_{n,m}+ (\phi_{n+1,m}-\phi_{n,m})^2+(\phi_{n,m+1}-\phi_{n, m})^2 \right]\, , \end{equation} where we set the lattice spacing to one. Expressions for $X_{(x_1,y_1), (x_2,y_2)}$ and $P_{(x_1,y_1),(x_2, y_2)}$ for the vacuum state can be found in \cite{Casini:2009sr} and read \begin{align} X_{(0, 0),(i,j)}&=\frac{1}{8\pi^2}\int_{-\pi}^{\pi} \mathrm{d} x \int_{-\pi}^{\pi} \mathrm{d} y \frac{\cos (ix) \cos (jy)}{\sqrt{2(1-\cos x)+2(1-\cos y)}}\, , \\ P_{(0, 0),(i,j)}&=\frac{1}{8\pi^2}\int_{-\pi}^{\pi} \mathrm{d} x \int_{-\pi}^{\pi} \mathrm{d} y \cos(ix) \cos(jy) \sqrt{2(1-\cos x)+2(1- \cos y)}\, . \end{align} Using these expressions, we can evaluate the tripartite information of lattice regions $A$, $B$, $C$ using \req{see} and the general expression \req{tripardef}. The story is analogous for the free fermion. We start with fermionic fields $\psi_i$, $i=1,\dots, N$ defined at the lattice sites and satisfying canonical anticommutation relations, $\{\psi_i,\psi_j^{\dagger} \}=\delta_{ij}$. For a Gaussian density matrix $\rho$, we define the correlators matrix $D_{ij} \equiv {\tilde \rho} \small( \rho \psi_i \psi_j^{\dagger} \small)$. Then, the entanglement entropy for some region $A$ can be computed from the restriction of $D_{ij}$ to the corresponding lattice sites as \begin{equation} S(A)=- {\tilde \rho} \left[ D_A \log D_A + (1-D_A) \log (1-D_A)\right] \, . \end{equation} The three-dimensional lattice Hamiltonian we consider for the free fermion reads \begin{equation} H=-\frac{i}{2} \sum_{n ,m} \left[ \left(\psi^{\dagger}_{m, n} \gamma^0 \gamma^1 (\psi_{m+1,n}-\psi_{m,n})+\psi^{\dagger}_{m, n} \gamma^0 \gamma^2 (\psi_{m,n+1}-\psi_{ m,n} ) \right) - h.c.\right] \, , \end{equation} and the vacuum-state correlators read in this case \begin{equation} D_{(n,k),(j,l)} = \frac{1}{2}\delta_{n,j} \delta_{kl}- \int_{-\pi}^{\pi} \mathrm{d} x \int_{-\pi}^{\pi} \mathrm{d} y \frac{\sin (x) \gamma^0 \gamma^1+\sin(y) \gamma^0 \gamma^2}{8\pi^2 \sqrt{\sin^2 x + \sin^2 y}} e^{i(x (n-j)+y(k-l))}\, . \end{equation} \begin{figure}[t] \centering \includegraphics[scale=0.5]{squarestripa.pdf}\hspace{1cm} \includegraphics[scale=0.5]{circultripa.pdf} \caption{We show two examples of the equilateral-triangle lattice configurations considered. In the left, three squares of $15^2=225$ points separated a distance of $\simeq 82$ points. In the right, three disks of $317\sim \pi 10^2$ points separated a distance of $\simeq 104$ points. The configurations are chosen so that the distances between each pair of centers are very similar. For instance, the distance between each of the lower squares and the upper one is $\sqrt{(82/2)^2+71^2}= 81.9878$. Similarly, the separation between each of the lower disks and the upper one is $\sqrt{(104/2)^2+90^2}=103.942$. } \label{refiss} \end{figure} In all cases, we restrict ourselves to configurations consisting of identical entangling regions which we separate forming approximate the vertices of equilateral triangles --- see Fig. \ref{refiss} for a couple of examples corresponding to square and disk regions. \begin{figure}[t!] \centering \includegraphics[scale=0.535]{fitscalar3r.pdf}\hspace{-0.5cm} \includegraphics[scale=0.535]{fitscalar2r.pdf}\hspace{-0.5cm} \includegraphics[scale=0.535]{fiscalar4r.pdf} \hspace{-0.5cm} \\ \vspace{-0.6cm} \includegraphics[scale=0.535]{I3ferm7.pdf}\hspace{-0.5cm} \includegraphics[scale=0.535]{I3ferm6.pdf}\hspace{-0.5cm} \includegraphics[scale=0.535]{I3ferm8.pdf} \caption{(Upper row) For a free scalar field, we plot $I_3(A,B,C)$ for three squares of equal size for several values of $(R/r)$ as a function of possible different powers of such ratio (data points). The $(R/r)^2$ and $(R/r)^4$ scalings are clearly off, whereas the $(R/r)^3$ one does a very good job in fitting the data linearly, as expected from our analytic computations. (Lower row) Same quantity for a free fermion. In this case, the differences between the possible scalings are not so neat, but it is nonetheless manifest that the $(R/r)^7$ linear fit is the best one.} \label{refiss2} \end{figure} Our first goal is to determine the power of the scaling of the tripartite information with the ratio $R/r$ for both theories. In order to do that, we consider square-shaped lattice regions of various side lengths $R$ and fix the distance $r$. Then, we plot the resulting data points against various possible powers of $(R/r)$. The idea is that whenever the right power is chosen, the points should follow a linear relation. The results are plotted in Fig. \ref{refiss2}. In the case of the scalar, we observe that a linear fit of the data points with respect to $(R/r)^3$ sits on top of the data points, whereas the $(R/r)^2$ and $(R/r)^4$ scalings are ruled out. In the case of the fermion, we observe that the naive $(R/r)^6$ scaling is disfavored by our numerical calculations, in agreement with our observation that this putative leading term is in fact absent. The next candidate leading power, $(R/r)^7$, is on the other hand the winner of this comparison, strongly suggesting that in the case of the fermion, the long-distance behavior of the tripartite information is $I_3^{\rm ferm}\propto (R/r)^7$. Observe also that both the scalar and the fermion have a tripartite information which is positive in the long-distance regime ---namely, their mutual informations are non-monogamous. \subsection{Three-disks coefficient} One of the results that follow from our analysis in the previous section is that the coefficient corresponding to the leading term in the long-distance expansion of the tripartite information in the case of three disks is $2/\pi$. Here we verify this prediction from a lattice calculation and perform the analogous analysis in the case of a free fermion. In the left plot of Fig.\,\ref{refiss3} we show the results for various configurations of radius-$R$ disks positioned at the vertices of equilateral triangles of side $r$ as a function of $(R/r)^3$, which is the leading power in the long-distance regime, as we have learnt. At subleading order, we expect a contribution proportional to $(R/r)^4$, so in order to extract the coefficient of the leading term, we fit the data points to a function of the form $I_3= \alpha_3 x + \alpha_4 x^{4/3}$ where $x\equiv (R/r)^3$. \begin{figure}[t] \hspace{-0.2cm} \includegraphics[scale=0.635]{circleI3.pdf}\hspace{-0.85cm} \includegraphics[scale=0.635]{circleI3fer.pdf} \caption{(Left) For a free scalar, we plot the tripartite information for three disks of radius $R$ positioned at the vertices of an equilateral triangle os side $r$ as a function of $(R/r)^3$. (Right) Same for a free fermion as a function of $(R/r)^7$. In both plots the solid lines correspond to fits which include a linear term plus a subleading correction as explained in the main text.} \label{refiss3} \end{figure} The resulting curve is shown in Fig.\,\ref{refiss3} and approximates all points rather well. The coefficients of the fit read, respectively, $\alpha_4\simeq -0.741$ and \begin{equation} \alpha_3 \simeq 0.6325= 0.9935 \cdot \frac{2}{\pi}\, , \end{equation} which is an excellent agreement with the analytic result. We repeat the analysis in the case of the free fermion. For that, we fit the data points to a function of the form $I_3= \beta_7 x + \beta_8 x^{8/7}$, which assumes a subleading piece in the tripartite information scaling with $\sim (R/r)^8$. The fit is again excellent and appears in the right plot of Fig.\,\ref{refiss3}. For the corresponding coefficients we find $ \beta_8\simeq-3.089$ and \begin{equation} \beta_7\simeq 1.641 \, , \end{equation} which ---just like for the scalar--- is a positive number and therefore corresponds to a non-monogamous mutual information (as anticipated in the case of the square regions). It would be interesting to compute $\beta_7$ analytically and compare it with this numerical result.\footnote{We point out that a function of the form $I_3=\tilde \beta_7 x + \tilde \beta_9 x^{9/7}$ produces an almost identical fit for coefficients $\tilde \beta_7\simeq 1.399$ and $\tilde \beta_9\simeq -9.796$. Given that the naive $\mathcal{O} (R/r)^6$ term is actually absent for the fermion, it does not seem impossible that the $\mathcal{O} (R/r)^8$ term does not appear either. In that case, the exact coefficient for the leading piece would be closer to $\tilde \beta_7$ rather than to $\beta_7$.} \section{Discussion}\label{discuuu} In this paper we have shown how to compute the tripartite information in a CFT in an expansion for long distances of the involved regions. A more detailed summary of our main results can be found at the end of the introduction. We end with two comments. The first discusses these results as part of the program aiming at bootstrapping CFT data from entropy quantities. The second discusses what the results teach us about the monogamy condition in a CFT. \subsection{CFT data from mutual information\label{CFT-discussion}} In \cite{long2016co} it was found that the mutual information for disjoint spherical regions in a CFT has an expansion in terms of conformal blocks of the form \begin{eqnarray}\label{ICB} I(A,B)=\sum_{\Delta,J}b_{\Delta,J} G_{\Delta, J}(u,v)\,, \end{eqnarray} where $\{\Delta, J\}$ is the set of replica primary operators which contribute to the R\'enyi mutual information and survives the $n\to 1$ limit. $G_{\Delta, J}(u,v)$ is the conformal block associated to the respective replica primary and it is written naturally in terms of the conformal ratios $u,v$. Also, $b_{\Delta,J}$ is a proportionality coefficient. The conformal ratios are constructed from the tips of the causal cones defining the spheres. For example, for a sphere $A$, $x^+_A$ denotes the future causal tip while $x^-_A$ denotes the past causal tip. The explicit expression is \begin{eqnarray}\label{uxAxB} u=\frac{|x^+_A-x^-_A|^2 |x^+_B-x^-_B|^2}{|x^-_B-x^-_A|^2 |x^+_B-x^+_A|^2}\,, \quad v=\frac{|x^+_B-x^-_A|^2 |x^+_A-x^-_B|^2}{|x^-_B-x^-_A|^2 |x^+_B-x^+_A|^2}\,. \end{eqnarray} Equation (\ref{ICB}) comes from an OPE block expansion of the twist operator in the replica theory as reviewed in appendix \ref{OPE-block-section}. Interestingly, knowledge of the mutual information for disjoint spheres can be used to ``bootstrap'' part of the operator content in the replica theory.\footnote{This formula does not necessarily include all the primary operators that appear in the replica theory as there might be many operators which do not contribute to the mutual information. However, the replica primaries which are simply related to the primary operators of the seeding CFT will always appear in the mutual information. For instance, operators of the form $\mathcal{O}_i \mathcal{O}_j$ with $i,j$ replica indices always appear in the mutual information.} Such procedure was outlined in \cite{Agon:2021zvp} where we used it to rule out the ``Extensive Mutual Information model'' as corresponding to a CFT in $d \geq 3$. The ``bootstrapping'' procedure is the following. We consider the long-distance limit of each conformal block, in the usual cross-ratio variables $u$, $v$. This corresponds to the $u\to 0$ and $v\to 1$ limits, which in terms of the physical parameters is \cite{Casini:2021raa} \begin{eqnarray} u\sim \frac{16 R_A^2R_B^2}{L^4}, \, \quad v\sim 1-\frac{8R_AR_B}{L^2}\[2\(n_A\cdot \hat{r}\)\(n_B\cdot \hat{r}\)-n_A\cdot n_B\]\,. \end{eqnarray} In that case \begin{eqnarray}\label{CB-LD} \lim_{u\to 0, v\to 1}G_{\Delta, J}(u,v) &\sim& c_{d,J} u^{\frac{\Delta}2}C_J^{\frac d2-1}\[\frac{v-1}{2u^{1/2}}\] \nonumber \\ &=& c_{d,J} \(\frac{4 R_A R_B}{L^2}\)^{\Delta}C_J^{\frac d2-1}\Big[2\(n_A\cdot \hat{r}\)\(n_B\cdot \hat{r}\)-n_A\cdot n_B\Big]\,, \end{eqnarray} where the $C_J^{\frac d2-1}[x]$ are the Gegenbauer polynomials. Therefore, from (\ref{ICB}) we see that the long-distance limit of $I(A,B)$ would be given by the long-distance limit of the leading conformal block, namely, the RHS of (\ref{CB-LD}) for the smallest possible $\Delta$. Thus, from this term we can read off the corresponding scaling dimension $\Delta$ and spin $J$ of the smallest replica primary which contributes to the mutual information. Next, we can subtract off the full leading conformal block appearing on the RHS of (\ref{ICB}) from $I(A,B)$, which results in: \begin{eqnarray} I^{(1)}(A,B)\equiv I(A,B)-b_{\Delta_1,J_1}G_{\Delta_1,J_1}(u,v)=\!\!\sum_{\Delta\neq \Delta_1,J\neq J_1}b_{\Delta,J} G_{\Delta, J}(u,v)\,, \end{eqnarray} where the super-index $(1)$ in $I^{(1)}(A,B)$ indicates that we removed the first leading conformal block to the mutual information. After that, we can apply the described algorithm to $I^{(1)}(A,B)$, finding in this way the subleading replica primary operator that contributes to $I(A,B)$. Possible degeneracies could also be accounted for by identifying the linear combination of Gegenbauer polynomials contributing to that order (which is possible by the completeness of the Gegenbauer polynomials). Some of the coefficients $c_{d,J}$ appearing in (\ref{CB-LD}) can be obtained via an explicit computation using the framework developed in \cite{Casini:2021raa}. In summary, applying the above procedure one could reconstruct the set of primary replica operators that contributes to the mutual information, including their corresponding scaling dimensions $\Delta$'s and spins $J$'s. Via a detailed analysis of the possible replica operators that can be constructed from the original or seed CFT, one could invert the above data to obtain the set of primary operators, their scaling dimensions $\bar{\Delta}$'s and associated spins $\bar{J}$'s as well as possibly some of the OPE coefficients\footnote{In this section we use $\bar{\Delta}$'s to represent the conformal dimensions of the seed theory operators while $\Delta$'s to represent the conformal dimensions of the replica theory.} $C_{ijk}$ of the seed CFT. Let us elaborate a bit further on that possibility. Schematically, the replica primary operators can be constructed from the seed primaries in varios different ways. For example, some of them can include products of two seed primaries in different replicas with arbitrary number of derivatives in between \begin{eqnarray} A^{\mu_1\cdots \mu_n}\mathcal{O}_i\partial_{\mu_1} \cdots \partial_{\mu_n} \mathcal{O}_j\,, \end{eqnarray} where the tensor structures $A^{\mu_1 \cdots \mu_n}$ may have different symmetries and $\mathcal{O}_i$ are scalars. For fermions there are also tensor structures one can be build from two-seed primary fermions, and which have non zero coefficients, \begin{eqnarray} \bar{\psi}_i \gamma_\mu \psi_j, \quad \bar{\psi}_i \gamma_{\mu_1}\cdots \partial_{\mu_n} \psi_j\,, \qquad \cdots \end{eqnarray} None of these replica primaries would have information about the structure coefficients $C_{ijk}$, and their coefficients depend only on the two-point function. However, there are replica primaries formed by fields in more than two copies consistent with conservation laws and super-selection constraints, for example, \begin{eqnarray} \mathcal{O}_i \mathcal{O}_j \mathcal{O}_k,\qquad \Psi_i\bar{\Psi}_j \Psi_k \bar{\Psi}_l \qquad {\cal O}_i \bar{\psi_j}\gamma_\mu\psi_k\,. \end{eqnarray} The contributions of these replica primaries would contain information about the OPE coefficients $C_{ijk}$ and thus the above procedure could in principle allow us to extract such CFT data from $I(A,B)$. Unfortunately, the procedure for these operators as well as replica primaries involving higher number of replica operators is significantly harder to use in practice than the ones that involve only two replicas. Therefore, one might deem this procedure unpractical for the purpose of obtaining the OPE coefficients. Interestingly, our current work presents a complementary avenue for extracting the OPE coefficients. As opposed to what happens for the mutual information of two disjoint spheres, the tripartite information for three spheres at long distances receives contributions at the leading order from the replica primaries involving three replicas. For this reason, even the leading expression for the tripartite information includes also information about the OPE coefficients of the seed CFT as is manifest in (\ref{I3-LD1}). Thus, the reconstruction procedure derived from (\ref{ICB}) can be complemented with an analogous one from (\ref{I3-LD1}) properly generalized to include all replica primaries, to facilitate the extraction of the full information of the seed CFT. \subsection{Monogamy condition and holography} From the expression of the long-distance tripartite information (\ref{I3-LD1}) it is easy to read off a condition for having monogamy of mutual information, $I_3\le 0$. In this geometric setup and in this regime the condition reduces to \begin{eqnarray}\label{monogami} \(C_{\mathcal{O}\cO\mathcal{O}}\)^2 \geq \frac{ 2^{6\Delta+1}\Gamma\(\Delta + \frac{1}{2}\)^3}{\pi^{3/2}\Gamma\!\(3\Delta +1\)}=\frac{2}{\Gamma\(3\Delta+1\)}\(\frac{2\, \Gamma\(2\Delta\)}{\Gamma\(\Delta\)}\)^3\,. \end{eqnarray} The RHS of (\ref{monogami}) is a growing function of $\Delta$ and its limiting value when $\Delta \to 0$ is $2$. The asymptotic behavior for large $\Delta$ can be determined from the Stirling approximation, which gives \begin{eqnarray} \frac{2}{\Gamma\(3\Delta+1\)}\(\frac{2\, \Gamma\(2\Delta\)}{\Gamma\(\Delta\)}\)^3\sim \frac{4}{\(3 \pi \Delta\)^{1/2} }\(\frac{4}{3}\)^{3\Delta}\,. \end{eqnarray} This approximation is an strict upper bound on the RHS of (\ref{monogami}) and thus it is a good estimate on how large should $\(C_{\mathcal{O}\cO\mathcal{O}}\)^2$ be for the theory to be monogamous at large separations. This is a strong condition over $\(C_{\mathcal{O}\cO\mathcal{O}}\)^2$, which suggest that generically in QFT the mutual information for separated regions tends to be non-monogamous (if dominated by scalars\footnote{But possibly also for fermions in view of our results in the rest of the paper.}). Definitely, monogamous behavior could only hold far from a perturbative regime. This statement is in line with the observation that in a perturbative scheme the tripartite information is generically non-monogamous \cite{Balasubramanian:2011wt}, although note that the latter statement was made in the context of entanglement in momentum space. As mentioned in the introduction, for holographic theories the tripartite information is known to be monogamous at leading order in the large-$N$ parameter. However, the existence of RT phase transitions for disjoint regions implies that in our regime of interest ---large separation--- the RT contribution to the holographic tripartite information vanishes and thus its behavior is determined by the subleading contribution, which is given by the tripartite information of the associated dual bulk homology regions. Depending on the dual bulk theory, then, this tripartite information might be positive or negative, which renders the boundary mutual information to be generically non-monogamous. However, there is an interesting possibility, namely, one in which the bulk theory is itself holographic. These situations are known as {\it double holographic} \cite{Randall:1999vf,Karch:2000ct}, and they have been the focus of important recent activity due to their relevance in the partial resolution to the black hole information paradox \cite{Penington:2019npb,Almheiri:2019psf}. In this context, one could imagine situations in which the bulk mutual information of the first dual theory is non vanishing at leading order, thus the RT surface of the second dual theory would be in the connected phase and therefore it would be necessarily monogamous (by the properties of the RT formula for the second holographic theory). In other words, in such geometric configurations the first bulk theory would be monogamous, and likewise would be its associated boundary theory. Indeed, boundary monogamy has been recently proved to hold at all orders in the large-$N$ expansion provided the bulk theory is also monogamous \cite{Akers:2021lms}.\footnote{See also \cite{Agon:2021tia} for a weaker statement proved in the context of quantum bit threads. Namely, holographic entropy cone inequalities in the bulk imply boundary monogamy.} Unfortunately, in the strict large separation regime both first and second bulk RT surfaces would be in the disconnected phase and thus monogamy would not be guarantee even in double holography. \section*{Acknowledgements} It is a pleasure to thank Gonzalo Torroba for useful discussions. C.A. is specially grateful to Tomonori Ugajin for various discussions regarding tripartite information in CFT. This material is based upon work supported by the Simons Foundation through \emph{It from Qubit: Simons Collaboration on Quantum Fields, Gravity, and Information}. H.C. acknowledges support from the National University of Cuyo, CNEA, and CONICET, Argentina.
\section{Introduction} In comparison to the conventional single-task learning, multi-task learning (MTL)~\cite{zhang2021a} provides a new learning paradigm to leverage knowledge across related tasks for improving the generalization performance of tasks. The community of multi-task learning has overlaps with other domains like transfer learning~\cite{zhuang2021atl}, multi-view learning~\cite{sun2013a} and multi-fidelity modeling~\cite{fernndez-godino2016review}. Among current MTL paradigms, multi-task Gaussian process (MTGP), the topic of this paper, inherits the non-parametric, Bayesian property of Gaussian process (GP)~\cite{williams2006gaussian} to have not only the prediction mean but also the associated prediction variance, thus showcasing widespread applications, e.g., multi-task regression and classification, multi-variate time series analysis~\cite{drichen2015multitask}, multi-task Bayesian optimization~\cite{swersky2013multi, kandasamy2019multi}, and multi-view learning~\cite{mao2021multiview}. To date, various MTGP models have been proposed in literature. Among them, the linear model of coreionalization (LMC)~\cite{goovaerts1997geostatistics, bonilla2007multi, teh2005semiparametric} is a well-know MTGP framework that linearly mixes $Q$ independent, latent GPs for modeling $C$ related tasks simultaneously. The latent GPs in LMC achieve knowledge transfer since they are shared across tasks, while the task-related mixing coefficients adapt the behaviors for specific tasks. Other popular MTGPs include for example the convolved GP~\cite{alvarez2008sparse}, Co-Kriging~\cite{myers1982matrix}, and stacked GP~\cite{neumann2009stacked}. For the details of various MTGPs, readers are suggested to refer to these surveys, reports and implementations~\cite{alvarez2012kernels, liu2018remarks, brevault2020overview, wolff2021mogptk}. It is notable that this paper mainly focuses on the LMC-type MTGPs. The improvements over the original LMC model mainly raise from two views. The first is improving the capability of multi-task modeling. This can be done by simply increasing the number $Q$ of latent GPs, which however significantly increases the model complexity, making it unaffordable on large-scale datasets. Alternatively, instead of using the conventional stationary kernels, like the squared exponential (SE) kernel in~\eqref{eq_SE}, we could devise the more expressive spectral mixing kernel which could take for example the phase shift and decays between tasks into account, thus enhancing the learning of complicated cross-task relationships~\cite{parra2017spectral, chen2019multioutput}. As for task similarity, traditional LMC adopts global, constant coefficients to mix the independent latent GPs. As an improvement, we could employ additional GPs for modeling complicated, input-varying task correlations, see~\cite{wilson2012gaussian}. Besides, various likelihood distributions, for example, the student-$t$ and probit distributions, have been utilized to extend MTGPs for different downstream scenarios, for example, classification and heterogeneous modeling~\cite{chen2020multivariate, moreno-muoz2019continual, moreno-muoz2018heterogeneous}. Finally, as for the improvement of model structure, we could employ the residual components to account for negative transfer~\cite{nguyen2014collaborative, liu2018cope}, the auto-regressive modeling to transfer the knowledge of previous tasks sequentially~\cite{requeima2019gaussian, perdikaris2017nonlinear}, or the combination of powerful deep models to enhance the representational learning~\cite{kandemir2015asymmetric, jankowiak2019neural, mao2021multiview}. The second is improving the scalability of LMC for tackling massive data, which is an urgent demand for MTL due to the simultaneous modeling of multiple tasks. To this end, we usually leverage the idea from scalable GPs that have been recently compared and reviewed in~\cite{liu2019understanding, liu2020gaussian}. The majority of scalable LMCs relies on the framework of sparse approximation~\cite{snelson2006sparse, titsias2009variational, hensman2013gaussian}, which introduces $M$ inducing variables to be the sufficient statistics of $N$ latent function values for a task with $M \ll N$, thus greatly reducing the cubic model complexity~\cite{alvarez2011computationally, nguyen2014collaborative, NIPS2015_3b3dbaf6, ashman2020sparse, bruinsma2020scalable}. Other complexity reduction strategies have also been investigated through for example the distributed learning~\cite{chiplunkar2016approximate}, the natural gradient assisted stochastic variational inference~\cite{giraldo2021a}, and the exploitation of Kronecker structure in kernel matrix~\cite{stegle2011efficient, rakitsch2013all}. Recently, the efficient and effective modeling of many outputs, i.e., ``big $C$'', has been investigated through for example the manifold learning and the tensor decomposition~\cite{perdikaris2016multifidelity, yu2017tensor, zhe2019scalable, wang2020multi}. To further improve the model capability as well as the scalability of LMC, this paper devises a new paradigm, named NSVLMC, to flexibly enhance the number and diversity of latent GPs while keeping the automatic regularization of GP and the desirable model complexity. The main contributions of our work are three-folds: \begin{itemize} \item We propose to use the flexible and powerful \textit{neural embedding} to transform the latent independent GPs into a \textit{higher-dimensional} yet \textit{diverse} space, thus greatly improving the model expressivity of LMC; \item Under the framework of sparse approximation, we further derive \textit{tighter} and \textit{more compacted} evidence lower bound (ELBO) in order to enhance the model inference quality of scalable LMC when handling massive multi-task data; \item We finally conduct comprehensive experiments to investigate and verify the methodological characteristics and superiority of the proposed model over existing MTGPs. \end{itemize} The remaining of this paper is organized as follows. Section~\ref{sec_gp_mtgp} first has a brief introduction of GP and LMC. Thereafter, section~\ref{sec_nlmc} introduces the proposed NSVLMC model, followed by the scalable variational inference for efficient and effective model training in section~\ref{sec_vi}. Then, section~\ref{sec_exp} conducts extensive numerical experiments on various multi-tasks scenarios in order to verify the superiority of our NSVLMC model. Finally, section~\ref{sec_conclusion} provides concluding remarks. \section{Preliminaries} \label{sec_gp_mtgp} \subsection{Gaussian process} For a single-task regression task, the data-driven GP learns the mapping between the input domain $\mathcal{X} \in \mathbb{R}^D$ and the output domain $\mathcal{Y} \in \mathbb{R}$ through the following expression \begin{align} y(\mbf{x}) = f(\mbf{x}) + \epsilon, \end{align} where $\epsilon \sim \mathcal{N}(\epsilon|0, \nu_{\epsilon})$ is an independent and identically distributed (\textit{i.i.d.}) noise; and the latent function $f(.): \mathbb{R}^D \mapsto \mathbb{R}$ defined over the functional space is placed with a GP prior \begin{align} f(\mbf{x}) \sim \mathcal{GP}(m(\mbf{x}), k(\mbf{x}, \mbf{x}') ), \end{align} where $m(\mbf{x})$ is the mean function which usually takes zero without loss of generality, and $k(\mbf{x}, \mbf{x}')$ is the kernel (covariance) function describing the similarity between two arbitrary data points, with the popular choice being the squared exponential (SE) kernel equipped with automatic relevance determination (ARD) as \begin{align} \label{eq_SE} k(\mbf{x}, \mbf{x}') = \sigma_f^2 \exp\left(-\frac{1}{2} \sum_{i=1}^D \frac{(x_i - x'_i)^2}{l_i^2} \right), \end{align} where the hyperparameter $\sigma_f^2$ is an output scale, and $l_i$ is the length-scale representing the variation or smoothness along the $i$-th input dimension.\footnote{For other commonly used kernels, e.g., the Mat\'{e}rn family, please refer to~\cite{williams2006gaussian}.} After observing $N$ training data $\mathcal{D} = \{\mbf{X} \in \mathbb{R}^{N \times D}, \mbf{y} \in \mathbb{R}^N \}$, we optimize the hyperparameters of GP by maximizing the marginal likelihood, which achieves automatic regularization, as \begin{align} p(\mbf{y}) = \mathbb{E}_{p(\mbf{f})} [p(\mbf{y}|\mbf{f})] = \mathcal{N}(\mbf{y}|\mbf{0}, \mbf{K} + \nu_{\epsilon} \mbf{I}), \end{align} where the kernel matrix $\mbf{K} = k(\mbf{X}, \mbf{X}) \in \mathbb{R}^{N \times N}$, the determinant or inversion of which is an $\mathcal{O}(N^3)$ operator; and the multi-variate Gaussian prior $p(\mbf{f}) = \mathcal{N}(\mbf{f}|\mbf{0}, \mbf{K})$. Given the data as well as the optimized hyperparameters, we update our Gaussian beliefs and devise the Gaussian posterior through the Bayes' rule $p(\mbf{f}|\mbf{y}) \propto p(\mbf{y}|\mbf{f}) p(\mbf{f})$, which is thereby utilized to perform Gaussian prediction at a test point $\mbf{x}_*$ as $p(y_*|\mbf{y}) = \mathcal{N}(y_*|\mu_*, \nu_*)$, with the mean and variance expressed respectively as \begin{align} \mu_* =& \mbf{k}_*^{\mathsf{T}} [\mbf{K} + \nu_{\epsilon} \mbf{I}]^{-1} \mbf{y}, \\ \nu_* =& k_{**} - \mbf{k}_*^{\mathsf{T}} [\mbf{K} + \nu_{\epsilon} \mbf{I}]^{-1} \mbf{k}_* + \nu_{\epsilon}, \end{align} where the vector $\mbf{k}_* = k(\mbf{X}, \mbf{x}_*) \in \mathbb{R}^N$. \subsection{Linear model of coregionalization} For the joint learning of $C$ related regression tasks, the multi-task GP should be enabled to measure the similarity of tasks in order to enhance knowledge transfer across tasks, which distinguishes it from conventional single-task GP. As shown in Fig.~\ref{fig_LMCvsNLMC}(a), we consider the following linear model of coregionalization (LCM) for the $c$-th task defined in the input space $\mathcal{X}$ as \begin{align} \label{eq_mogp} y^c(\mbf{x}) = \sum_{q=1}^Q a^c_q f_q(\mbf{x})+ \epsilon^c, \end{align} where the $Q$ latent functions $\{f_q \sim \mathcal{GP}(0, k_q(.,.)) \}_{q=1}^Q$ are \textit{independent} and \textit{diverse} GPs which however are \textit{shared} across $C$ tasks.\footnote{These independent GPs can have their own kernels $\{k_q(.,.) \}_{q=1}^Q$ or, for simplicity, share the same kernel $k(.,.)$.} Note that the independency of latent GPs simplifies model inference, while the diversity enhances multi-scale feature extraction of related tasks; the task similarity (knowledge transfer) is achieved through using the task-specific coefficients $\{a_q^c\}_{1\le q\le Q}^{1 \le c \le C}$ to linearly mix the shared latent GPs; and finally, $\epsilon^c = \mathcal{N}(\epsilon^c|0,\nu^c_{\epsilon})$ is the \textit{i.i.d.} noise for the $c$-th task, which remains possible knowledge transfer even when the tasks have the same training inputs~\cite{bonilla2007multi, rakitsch2013all}. Other similar and extended expressions for LMC can be found in~\cite{alvarez2012kernels}. The vector-valued form of model~\eqref{eq_mogp} is \begin{align} \label{eq_lmc_matrix} \mbf{y}(\mbf{x}) = \mbf{A} \mbf{f}(\mbf{x}) + \bm{\epsilon}, \end{align} where the $C$ observations at point $\mbf{x}$ are $\mbf{y}(\mbf{x}) = [y^1(\mbf{x}), \cdots, y^C(\mbf{x})]^{\mathsf{T}}$, the $Q$ shared latent function values $\mbf{f}(\mbf{x}) = [f_1(\mbf{x}), \cdots, f_Q(\mbf{x})]^{\mathsf{T}}$, and finally, the similarity matrix (also known as coregionalization matrix) $\mbf{A} = [\mbf{a}^1, \cdots, \mbf{a}^C]^{\mathsf{T}} \in \mathbb{R}^{C \times Q}$ where $\mbf{a}^C = [a_1^C, \cdots, a_Q^C]^{\mathsf{T}}$. Without loss of generality, suppose that we have the \textit{heterotopic} training inputs $\mbf{X} = \{\mbf{X}^c \in \mathbb{R}^{N^c \times D}\}_{c=1}^C$ for $C$ related tasks, and the related observations $\mbf{y} = \{\mbf{y}^c \in \mathbb{R}^{N^c} \}_{c=1}^C$. We further define the notations: the total training size $N = \sum_c^C N^c$ for all the tasks, the $q$-th latent function values $\mbf{f}_q^c = [f_q(\mbf{x}^c_1), \cdots, f_q(\mbf{x}^c_{N^c})]^{\mathsf{T}}$ at training points for the $c$-th task, the $q$-th latent function values $\mbf{f}_q =\{ \mbf{f}^c_q\}_{c=1}^C$ for all the tasks, and finally, the overall latent function value set $\mbf{f}=\{\mbf{f}_q \in \mathbb{R}^N \}_{q=1}^Q$. Thereafter, we define the following Gaussian likelihood factorized over both data points and tasks as \begin{align} p(\mbf{y}|\mbf{f}) = \prod_{c=1}^C \prod_{i=1}^{N^c} \mathcal{N}\left(y_i^c \left| \sum_{q=1}^Q a_q^c f_q(\mbf{x}_i^c), \nu^c_{\epsilon} \right.\right), \end{align} Due to the independency assumption, we also have the following factorized GP priors \begin{align} p(\mbf{f}) = \prod_{q=1}^Q p(\mbf{f}_q) = \prod_{q=1}^Q \mathcal{N}(\mbf{f}_q| \mbf{0}, \mbf{K}_q), \end{align} where the covariance matrix $\mbf{K}_q = [\mbf{K}_q^{cc'} = k_q(\mbf{X}^c, \mbf{X}^{c'}) \in \mathbb{R}^{N^c \times N^{c'}}]_{1\le c,c' \le C} \in \mathbb{R}^{N \times N}$. Thereafter, similar to the single-task GP, we have the marginal likelihood (model evidence) \begin{align} p(\mbf{y}) = \mathcal{N} \left(\mbf{y} \left| \mbf{0}, \sum_{q=1}^Q \bar{\mbf{K}}_q + \bm{\Xi} \right.\right), \end{align} where the covariance $\bar{\mbf{K}}_q = [\bar{\mbf{K}}_q^{cc'} = a_q^c a_q^{c'}k_q(\mbf{X}^c, \mbf{X}^{c'})\in \mathbb{R}^{N^c \times N^{c'}}]_{1\le c,c' \le C} \in \mathbb{R}^{N \times N}$ is the scaled version of $\mbf{K}_q$ by taking into account the mixture coefficients, and the diagonal noise matrix $\bm{\Xi} = \mathrm{diag}[\bm{\Xi}^1, \cdots, \bm{\Xi}^C] \in \mathbb{R}^{N \times N}$ with the $c$-th diagonal noise matrix $\bm{\Xi}^c = \nu^c_{\epsilon} \mbf{I}_{N^c}\in \mathbb{R}^{N^c \times N^c}$. \begin{figure}[t!] \centering \includegraphics[width=1.0\textwidth]{fig1} \caption{Graphical models of (a) the original LMC and (b) the proposed model for multi-task learning.} \label{fig_LMCvsNLMC} \end{figure} Given the training data and the optimized hyperparameters, we perform predictions akin to GP for the $C$ tasks jointly at an unseen point $\mbf{x}_*$ as $p(\mbf{y}_*|\mbf{y}) = \mathcal{N}(\mbf{y}_*|\bm{\mu}_* \in \mathbb{R}^C, \bm{\Sigma}_* \in \mathbb{R}^{C\times C})$, where the mean and covariance are respectively expressed as \begin{align} \bm{\mu}_* =& \bar{\mbf{K}}_*^{\mathsf{T}} [\bar{\mbf{K}} + \bm{\Xi}]^{-1} \mbf{y}, \\ \bm{\Sigma}_* =& \bar{\mbf{K}}_{**} - \bar{\mbf{K}}_*^{\mathsf{T}} [\bar{\mbf{K}} + \bm{\Xi}]^{-1} \bar{\mbf{K}}_* + \mathrm{diag}[\bm{\xi}], \end{align} where the full covariance matrix $\bar{\mbf{K}} = \sum_{q=1}^Q \bar{\mbf{K}}_q \in \mathbb{R}^{N\times N}$; the covariance matrix $\bar{\mbf{K}_*} = \sum_{q=1}^Q \bar{\mbf{K}}_{q*} = \sum_{q=1}^Q [a_q^c a_q^{c'}k_q(\mbf{X}^c, \mbf{x}_*)]_{1\le c,c' \le C} \in \mathbb{R}^{N\times C}$ describes the correlations between the training and testing data of $C$ tasks; the covariance matrix $\bar{\mbf{K}}_{**} = [a_q^c a_q^{c'}k_q(\mbf{x}_*, \mbf{x}_*)]_{1\le c,c' \le C} \in \mathbb{R}^{C\times C}$ measures the correlations of testing data of $C$ tasks; and finally, the vector $\bm{\xi} = [\nu_{\epsilon}^1, \cdots, \nu_{\epsilon}^C]^{\mathsf{T}}$ collects the independent noise variances of $C$ tasks. \section{The LMC with neural embedding} \label{sec_nlmc} It is known that the capability of LMC increases with $Q$ (i.e., the number of latent GPs). More and diverse latent GPs enhance the extraction of multi-scale features shared across related tasks at the cost of however linearly increased time complexity as well as more hyperparameters to be inferred. Can we have the desired number of latent GPs (i.e., maintaining the acceptale model complexity) while enhancing the diversity of latent space, which is crucial for enabling high model expressivity to tackle complicated multi-task scenario? To this end, we introduce an additional latent embedding that wraps the latent functions $\{f_q(.)\}_{q=1}^Q$ to express the model for the $c$-th output in a \textit{higher} $H$-dimensional space, which may induce informative statistical relations, as \begin{align} \label{eq_mogp_} y^c(\mbf{x}) = \sum_{h=1}^H a^c_h \bar{f}_h(\mbf{x}) + \epsilon^c, \end{align} where the additional latent embedding acts on $\{f_q(.)\}_{q=1}^Q$ as \begin{align} \label{eq_bar_f_h} \bar{f}_h(\mbf{x}) = \sum_{q=1}^Q b_q^h f_q(\mbf{x}) \end{align} through linearly weighted combination. It is found that the new $\bar{f}_h(.)$ mixes the base GPs $\{f_q(.)\}_{q=1}^Q$, which could be regarded as the ``coordinate components'' to express the related outputs $\{y^c\}_{c=1}^C$, in a higher dimensional space ($H > Q$) before passing it to the following Gaussian likelihood. Now we obtain more latent functions $\{\bar{f}_h\}_{h=1}^H$ that are expected to induce more powerful feature extraction across tasks. But it is found through~\eqref{eq_bar_f_h} that these new latent functions are similar to each other due to the linear combination. For example, taking the extreme case with $Q=1$, we have almost the same functions $\{\bar{f}_h\}_{h=1}^H$, since each of them is a scaled version of the base GP $f_1$. This raises the degenerated modeling of related tasks in such an \textit{isotropic} latent space. Inspired from the idea of neural network (NN), Jankowiak and Gardner~\cite{jankowiak2019neural} proposed to additionally apply an activation function, for example, the ReLU activation, to the latent embeddings $\{\bar{f}_h\}_{h=1}^H$, see equation~\eqref{eq_nmogp}, which increases the non-linearity of latent functions but cannot alleviate the isotropic behavior of this high dimensional latent space. Hence, to alleviate the above issue, the key is increasing the \textit{diversity} of $\{\bar{f}_h\}_{h=1}^H$. To this end, as depicted by Fig.~\ref{fig_LMCvsNLMC}(b), we propose to use the more flexible and powerful neural embedding of $\{f_q\}_{q=1}^Q$, i.e., making the mixing coefficient $b_q^h$ be dependent of input $\mbf{x}$, thus varying over the entire input domain and resulting in various latent functions $\{\bar{f}_h\}_{h=1}^H$ even with $Q=1$, the example of which has been illustrated in Fig.~\ref{fig_toy_Neural_study} on a toy case. It is worth noting that though the model capability of LMC could be improved in the high dimensional latent space, it still relies on the number and quality of base GPs. So far, this improved LMC model can be written in the matrix form as \begin{align} \label{eq_nsvlmc} \mbf{y}(\mbf{x}) = \mbf{A} \bar{\mbf{f}}(\mbf{x}) + \bm{\epsilon} = \mbf{A} \mbf{B}(\mbf{x}) \mbf{f}(\mbf{x}) + \bm{\epsilon}, \end{align} where the likelihood mixture $\mbf{A} \in \mathbb{R}^{C \times H}$ performs task-specific regression, and the latent neural mixture $\mbf{B}(\mbf{x}) \in \mathbb{R}^{H \times Q}$ transforms the GPs into high-dimensional and diverse latent space. Given the model definition, the scalable variational inference of the proposed model will be elaborated in next section. \section{Scalable variational inference} \label{sec_vi} This section attempts to address the scalability of the proposed model and improve the quality of inference through advanced variational inference, followed by the discussions regarding the variants of neural embeddings for LMC. \subsection{Tighter evidence lower bound} To improve the scalability of the proposed MTGP model when handling massive data over tasks, we take the idea from sparse approximation by introducing a set of inducing variables $\mbf{u}_q \in \mathbb{R}^{M_q}$ as sufficient statistics for the latent function values $\mbf{f}_q \in \mathbb{R}^{N}$ at the pseudo inputs $\mbf{Z}_q \in \mathbb{R}^{M_q \times D}$ with $M_q \ll N$. We then let the inducing set $\mbf{u} = \{\mbf{u}_q\}_{q=1}^Q$ be a collection of the inducing variables for $Q$ independent latent functions. For model inference, we introduce the following joint variational distribution \begin{align} \label{eq_q(f,u,A,B)} q(\mbf{f}, \mbf{u}, \mbf{A}, \mbf{B}) = q(\mbf{A}) q(\mbf{B}) \prod_{q=1}^Q p(\mbf{f}_q|\mbf{u}_q) q(\mbf{u}_q) \end{align} to approximate the unknown, exact posterior $p(\mbf{f}, \mbf{u}, \mbf{A}, \mbf{B} | \mbf{y})$. In~\eqref{eq_q(f,u,A,B)}, the variational posterior $q(\mbf{u}_q) = \mathcal{N}(\mbf{u}_q | \mbf{m}_q, \mbf{S}_q)$ takes the Gaussian form with the mean $\mbf{m}_q$ and variance $\mbf{S}_q$ as hyperparameters to be inferred from data. Besides, under the multi-variate Gaussian prior assumption, we have the following Gaussian posterior \begin{align} p(\mbf{f}_q|\mbf{u}_q) = \mathcal{N}(\mbf{f}_q | \mbf{K}_{XZ_q} \mbf{K}^{-1}_{Z_q} \mbf{u}_q, \mbf{K}_q - \mbf{K}_{XZ_q} \mbf{K}^{-1}_{Z_q} \mbf{K}_{XZ_q}^{\mathsf{T}}), \end{align} where the covariances $\mbf{K}_{Z_q} = k_q(\mbf{Z}_q, \mbf{Z}_q) \in \mathbb{R}^{M_q \times M_q}$ and $\mbf{K}_{XZ_q} = k_q(\mbf{X}, \mbf{Z}_q) \in \mathbb{R}^{N \times M_q}$. We can further obtain the variational posteriors for $\mbf{f}_q$ by integrating $\mbf{u}_q$ out as \begin{align} q(\mbf{f}_q) &= \mathbb{E}_{q(\mbf{u}_q)} [p(\mbf{f}_q|\mbf{u}_q)] = \mathcal{N}(\mbf{f}_q | \bm{\mu}_{q}, \bm{\Sigma}_{q}), \end{align} where the mean and covariance write respectively as \begin{align} \bm{\mu}_{q} &= \mbf{K}_{XZ_q} \mbf{K}^{-1}_{Z_q} \mbf{m}_q, \\ \bm{\Sigma}_{q} &= \mbf{K}_q + \mbf{K}_{XZ_q} \mbf{K}^{-1}_{Z_q} [\mbf{S}_q \mbf{K}^{-1}_{Z_q} - \mbf{I}] \mbf{K}_{XZ_q}^{\mathsf{T}}. \end{align} Note that for the high-dimensional variational posteriors $\{q(\bar{\mbf{f}}_h)\}_{h=1}^H$, they are still Gaussians because of the linear mixture of Gaussian posteriors $\{q(\mbf{f}_q)\}_{q=1}^Q$ according to~\eqref{eq_bar_f_h}. Thereafter, we minimize the KL divergence $\mathrm{KL}[q(\mbf{f}, \mbf{u}, \mbf{A}, \mbf{B})||p(\mbf{f}, \mbf{u}, \mbf{A}, \mbf{B}|\mbf{y})]$, which is equivalent to maximize the evidence lower bound (ELBO) expressed as \begin{align} \label{eq_elbo_L} \begin{aligned} \mathcal{L} =& \mathbb{E}_{q(\mbf{f}) q(\mbf{A}) q(\mbf{B})} [\log p(\mbf{y}|\mbf{f}, \mbf{A}, \mbf{B})] \\ &-\mathrm{KL}[q(\mbf{u})||p(\mbf{u})] -\mathrm{KL}[q(\mbf{A})||p(\mbf{A})] -\mathrm{KL}[q(\mbf{B})||p(\mbf{B})]. \end{aligned} \end{align} Note that the latent mixture $\mbf{B}$ here is input-dependent. Furthermore, we could derive a \textit{tighter} ELBO to improve the inference quality. To this end, we first obtain the lower bound for the log marginal likelihood $\log p(\mbf{y}|\mbf{A},\mbf{B})$ conditioned on the mixtures $\mbf{A}$ and $\mbf{B}$ as \begin{align} \begin{aligned} \log p(\mbf{y}|\mbf{A},\mbf{B}) \ge \mathcal{L}_{\mbf{AB}} =& \mathbb{E}_{q(\mbf{f})} [\log p(\mbf{y}|\mbf{f}, \mbf{A}, \mbf{B})] -\mathrm{KL}[q(\mbf{u})||p(\mbf{u})] \\ =& \tilde{\mathcal{L}}_{\mbf{AB}} -\mathrm{KL}[q(\mbf{u})||p(\mbf{u})]. \end{aligned} \end{align} Thereafter, we arrive at the tighter bound for $\log p(\mbf{y})$ as \begin{align} \begin{aligned} \label{eq_elbo_tight} \log p(\mbf{y}) \ge& \log \mathbb{E}_{p(\mbf{A}) p(\mbf{B})} [\exp(\mathcal{L}_{\mbf{AB}}) ] \\ =& \log \mathbb{E}_{q(\mbf{A}) p(\mbf{B})} \left[\exp(\mathcal{L}_{\mbf{AB}}) \frac{p(\mbf{A})}{q(\mbf{A})} \right] \\ \ge& \mathbb{E}_{q(\mbf{A})} \left[ \log \mathbb{E}_{p(\mbf{B})}\left[ \exp(\tilde{\mathcal{L}}_{\mbf{AB}}) \right] \right] - \mathrm{KL}[q(\mbf{A}) || p(\mbf{A})] \\ &- \mathrm{KL}[q(\mbf{u}) || p(\mbf{u})]\\ =& \mathcal{L}_{\mathrm{tight}} \ge \mathcal{L}, \end{aligned} \end{align} which supports efficient stochastic variational inference (SVI) since the first expectation could be factorized over data points, see the detailed expressions for the components in ELBO~\eqref{eq_elbo_tight} in Appendix~\ref{app_elbo}. Hence, an unbiased estimation of $\mathcal{L}_{\mathrm{tight}}$ in the efficient mini-batch fashion can be obtained on a subset $\mathcal{B}^c$ of the $c$-th training data $\mbf{X}^c$ with $|\mathcal{B}^c| < N^c$. It is found that this ELBO achieves tighter lower bound by directly using the prior $p(\mbf{B})$ rather than the variational posterior $q(\mbf{B})$ in~\eqref{eq_elbo_L}. Besides, the usage of $q(\mbf{B})$ in $\mathcal{L}$ introduces additional hyperparameters as well as more inference efforts. Particularly, the ELBO~\eqref{eq_elbo_tight} employs the \textit{factorized} Gaussian prior for the latent neural mixture \begin{align} \label{eq_p_B} p(\mbf{B}) = \mathcal{N}(\mathrm{vec}(\mbf{B})|\bm{\mu}_{\mbf{B}}, \mathrm{diag}(\bm{\nu}_{\mbf{B}})). \end{align} Furthermore, to devise an informative prior for $\mbf{B}$ that is assumed to be dependent of input $\mbf{x}$, we could adopt the so-called \textit{neural embedding}, i.e., making the mean $\bm{\mu}_{\mbf{B}}$ and variance $\bm{\nu}_{\mbf{B}}$ in $p(\mbf{B})$ be parameterized as the function of input through multi-layer perceptron (MLP) as \begin{align} [\bm{\mu}_{\mbf{B}}, \, \bm{\nu}_{\mbf{B}}] = \mathrm{MLP}_{\bm{\theta}}(\mbf{x}), \end{align} where $\bm{\theta}$ is the hyperparameters of the adopted MLP to be inferred from data. Finally, as for the likelihood mixing coefficients $\mbf{A}$, we have the following Gaussian prior and posterior \begin{align} p(\mbf{A}) = \mathcal{N}(\mathrm{vec}(\mbf{A})|\mbf{0}, \mbf{I}), \quad q(\mbf{A}) = \mathcal{N}(\mathrm{vec}(\mbf{A})|\bm{\mu}_{\mbf{A}}, \mathrm{diag}(\bm{\nu}_{\mbf{A}})), \end{align} wherein the mean $\bm{\mu}_{\mbf{A}}$ and variance $\bm{\nu}_{\mbf{A}}$ will be freely inferred from data. Moreover, we could further improve the quality of ELBO~\eqref{eq_elbo_tight} by using importance-weighted variational inference (IWVI)~\cite{burda2016importance, domke2018importance}, which attempts to decrease the variance by letting the term inside the expectation concentrated around its mean. To this end, the $\mbf{B}$ term inside the expectation is replaced with a sample average of $S$ terms $\{\mbf{B}^s\}_{s=1}^S$ as \begin{align} \label{eq_elbo_iwvi} \begin{aligned} \mathcal{L}_{\mathrm{IWVI}} =& \mathbb{E}_{q(\mbf{A})} \left[ \log \frac{1}{S} \sum_{s=1}^S \mathbb{E}_{p(\mbf{B}^{s})}\left[ \exp(\tilde{\mathcal{L}}_{\mbf{AB}^s}) \right] \right] \\ & - \mathrm{KL}[q(\mbf{A}) || p(\mbf{A})] - \mathrm{KL}[q(\mbf{u}) || p(\mbf{u})]. \end{aligned} \end{align} This has been found to be a strictly tighter bound than $\mathcal{L}_{\mathrm{tight}}$ in~\eqref{eq_elbo_tight}~\cite{burda2016importance,cremer2017reinterpreting}. This tight and compacted ELBO can be estimated through the reparameterization trick introduced in~\cite{kingma2014auto}. So far, we have provided the scalable and effective variational inference strategy for the proposed MTGP model. This improved stochastic variational LMC model using neural embedding of coregionalization is donated as NSVLMC. \subsection{Predictions} Given the inferred hyperparameters of proposed NSVLMC, we then perform multi-task prediction at unseen points. First, the predictions of $Q$ latent independent GPs at the test point $\mbf{x}_*$ are \begin{align} q(\mbf{f}_{*}) = \int \prod_{q=1}^Q p(f_{q*}|\mbf{u}_q) q(\mbf{u}_q) d\mbf{u}_q = \mathcal{N}(\mbf{f}_{*}| \bm{\mu}_{\mbf{f}*}, \bm{\nu}_{\mbf{f}*}), \end{align} where the mean and variance are respectively expressed as \begin{align} [\bm{\mu}_{\mbf{f}*}]_q &= k_q(\mbf{x}_*,\mbf{Z}_q) \mbf{K}^{-1}_{Z_q} \mbf{m}_q, \\ [\bm{\nu}_{\mbf{f}*}]_q &= k_q(\mbf{x}_*,\mbf{x}_*) + k_q(\mbf{x}_*,\mbf{Z}_q) \mbf{K}^{-1}_{Z_q} [\mbf{S}_q \mbf{K}^{-1}_{Z_q} - \mbf{I}] k_q^{\mathsf{T}}(\mbf{x}_*,\mbf{Z}_q), \end{align} for $1 \le q \le Q$. Thereafter, the conditional predictions for the observations are \begin{align} q(\mbf{y}_*|\mbf{A}, \mbf{B}_*) = \int p(\mbf{y}_*|\mbf{f}_{*}) q(\mbf{f}_{*}) d\mbf{f}_* = \mathcal{N}(\mbf{y}_*|\bm{\mu}_*, \bm{\Sigma}_*), \end{align} where \begin{align} \bm{\mu}_* &= \mbf{A} \mbf{B}_* \bm{\mu}_{\mbf{f}*}, \\ \bm{\Sigma}_* &= \mbf{A} \mbf{B}_* \bm{\Sigma}_{\mbf{f}*} \mbf{B}_*^{\mathsf{T}} \mbf{A}^{\mathsf{T}} + \bm{\Sigma}_{\epsilon}, \end{align} with the diagonal covariance $\bm{\Sigma}_{\mbf{f}*} = \mathrm{diag}[\bm{\nu}_{\mbf{f}*}]$ and the task-related noise variances $\bm{\Sigma}_{\epsilon} = \mathrm{diag}[\nu_{\epsilon}^1, \cdots, \nu_{\epsilon}^C]$. Finally, we integrate the randoms $\mbf{A}$ and $\mbf{B}_*$ out to derive the final predictions \begin{align} \label{eq_y*} p(\mbf{y}_*|\mbf{y}) \approx \int q(\mbf{y}_*|\mbf{A}, \mbf{B}_*) q(\mbf{A}) p(\mbf{B}_*) d\mbf{A}d\mbf{B}_*, \end{align} which can be estimated through Markov Chain Monte Carlo (MCMC) sampling. It is worth noting that the predictive distribution $p(\mbf{y}_*|\mbf{y})$ is no longer Gaussian. \subsection{Discussions} \label{sec_diss} \begin{figure}[t!] \centering \includegraphics[width=0.8\textwidth]{fig2} \caption{The graphical models of various latent neural embeddings for scalable LMCs including (a) NMOGP, (b) NGPRN, (c) SVLMC-DKL, and (d) the proposed NSVLMC. Note that these neural embeddings are performed through the terms marked in red background.} \label{fig_neuralEmbeddings} \end{figure} Except for the proposed neural embedding acting on the latent GPs $\{f_q\}_{q=1}^Q$ in~\eqref{eq_nsvlmc}, how about other neural embeddings? For example, inspired by the idea from Gaussian process regression network (GPRN)~\cite{wilson2012gaussian}, we could perform neural embedding on the weights in likelihood mixture $\mbf{A}$, thus arriving at the so-called neural GPRN (NGPRN)~\cite{jankowiak2019neural} as \begin{align} \label{eq_ngprn} \mbf{y}(\mbf{x}) = \mbf{A}(\mbf{x}) \mbf{f}(\mbf{x}) + \bm{\epsilon}, \end{align} where the neural embedding $\mbf{A}(\mbf{x}) = \mathrm{MLP}_{\bm{\alpha}}(\mbf{x})$ with the NN parameters $\bm{\alpha}$ to be inferred. It is observed that in comparison to the conventional input-independent likelihood mixture $\mbf{A}$, now the new $\mbf{A}(\mbf{x})$ controlled by a neural network varies over the input domain in order to express the flexible point-by-point similarity across tasks, thus greatly enhancing the ability for tackling complicated multi-task regression. The introduction of neural network assisted similarity in the task-specific level however may raise the issue of poor generalization, especially when some of the tasks have a few number of data points, see the numerical experiments in section~\ref{sec_exp}. Alternatively, observing that the transformation of $\mbf{f}(\mbf{x})$ in~\eqref{eq_nsvlmc} is similar to the architecture of neural network, we could apply a nonlinear activation function $\sigma(.)$, e.g., the tanh function, to the linear mapping $\mbf{B} \mbf{f}(\mbf{x})$ instead of making $\mbf{B}$ be dependent of input $\mbf{x}$ as~\cite{jankowiak2019neural} \begin{align} \label{eq_nmogp} \mbf{y}(\mbf{x}) = \mbf{A} \sigma(\mbf{B} \mbf{f}(\mbf{x})) + \bm{\epsilon}. \end{align} As has been discussed before, this model, denoted as NMOGP, however does not improve the diversity of the $H$-dimensional latent space, which is crucial for enhancing model capability. Besides, the nonlinear activation makes $\sigma(\mbf{B} \mbf{f}(\mbf{x}))$ no longer Gaussians. Finally, inspired by the idea of deep kernel learning (DKL)~\cite{wilson2016deep, liu2021deep}, we could perform embedding on the inputs $\mbf{X}$ before passing them to the following LMC model as \begin{align} \mbf{y}(\mbf{x}) = \mbf{A} \mbf{f}(\mathrm{MLP}_{\bm{\psi}}(\mbf{x}))+ \bm{\epsilon}, \end{align} where the neural network wrapper $\mathrm{MLP}_{\bm{\psi}}(\mbf{x})$ encodes the input feature into a latent space, which is expected to improve the subsequent LMC modeling. This model using sparse approximation is denoted as SVLMC-DKL. The benefits brought by additional input transformation however is insignificant in the following numerical experiments. The superiority, for example, higher quality of predictions and better generalization, of our proposed neural embedding against the above neural embedding variants will be verified empirically through extensive numerical experiments in section~\ref{sec_exp}. \section{Numerical experiments} \label{sec_exp} This section first investigates the methodological characteristics of the proposed NSVLMC on a three-task toy case, followed by the comprehensive comparison study against existing LMCs on three small- and large-scale real-world multi-task datasets. Finally, it specifically applies the proposed NSVLMC to the cross-fluid modeling of unsteady fluidized bed. \subsection{Toy case} We first study the methodological characteristics of the proposed NSVLMC on a toy case. This toy case has three tasks generated from the same four latent functions expressed respectively as \begin{align} \begin{aligned} y_1(x) =& 0.5f_1(x) - 0.4 f_2(x) + 0.6f_3(x) + 0.6f_4(x) + \epsilon, \\ y_2(x) =& -0.3f_1(x) + 0.43f_2(x) - 0.5f_3(x) + 0.1f_4(x) + \epsilon, \\ y_3(x) =& 1.5f_1(x) + 0.3f_3(x) + 0.6f_4(x) + \epsilon, \end{aligned} \end{align} where the independent noise $\epsilon \sim \mathcal{N}(\epsilon|0, 0.04)$, and the four latent functions are \begin{align} \begin{aligned} f_1(x) =& 0.5\sin (3x) + x, \\ f_2(x) =& 3\cos(x) - x, \\ f_3(x) =& 2.5\cos(5x-1), \\ f_4(x) =& \sin(1.5x). \end{aligned} \end{align} We randomly generate 100 points in the one-dimensional range $[-5, 5]$ for outputs $y_1$ and $y_3$, and 10 random points for $y_2$. Through modeling the three related tasks simultaneously, the knowledge transfer across tasks is expected to be extracted for improving the modeling of $y_2$ with a few number of data points. We first investigate the modeling quality of the proposed NSVLMC with different numbers of latent functions, i.e., using different $Q$ values, on this toy case. We employ (i) the SE kernel and $M_q=25$ inducing variables for each latent function $f_q$; (ii) $H=100$ hidden latent functions $\{\bar{f}_h\}_{h=1}^H$; and (iii) the Adam optimizer to train the model over 20000 iterations. Other detailed model configurations are provided in Appendix~\ref{sec_exp_details}. The original SVLMC model has also been introduced as baseline for comparison. Fig.~\ref{fig_toy_NSVLMC} depicts the comparative results of NSVLMC and SVLMC with increasing $Q$ on the toy case. It is interesting to observe that when $Q=1$, i.e., we are only using a single latent function, the original SVLMC of course cannot model the three tasks well since the outputs are limited to the scaled version of the single latent function, leaving no flexibility to explain the task-related features. Contrarily, the proposed NSVLMC first transforms the single latent function into a high-dimensional space to have $H=100$ hidden latent functions with diverse characteristics (see Fig.~\ref{fig_toy_Neural_study}), which thereby help well model the three tasks even with $Q=1$. With the increase of $Q$, the diverse base latent functions quickly improve the model capability of both SVLMC and NSVLMC. For example, by transferring shared knowledge from $y_1$ and $y_3$, the SVLMC equipped with $Q=2$ latent functions well models $y_2$ even in the left input domain with unseen data points. \begin{figure}[t!] \centering \includegraphics[width=1.0\textwidth]{fig3} \caption{The multi-task regression of NSVLMC and SVLMC with increasing $Q$ on the toy case. The dashed curves marked in different colors represent the latent true responses of three tasks. The curves together with the shaded region represent 95\% predictive distributions. The dots marked in different colors are the training data for three tasks.} \label{fig_toy_NSVLMC} \end{figure} The performance of NSVLMC with $Q=1$ and $H=100$ is impressive on the toy case. Hence, we thereafter investigate the impact of $H$ on the performance of NSVLMC in Fig.~\ref{fig_toy_NSVLMC_H}. As for the challenging case with $Q=1$, it is found that the increase of $H$ generally improves the model capability since it describes the multi-scale task features more finely. As for the case $Q=4$, due to the sufficient and diverse latent base GPs, the increase of $H$ does not bring significant improvement on this toy case. Particularly, it is found that the enhanced model expressivity with $H=100$ have raised slight over-fitting on the toy case with $Q=4$. This implies that the setting of $H$ is related to $Q$: when $Q$ is small, indicating a poor and limited base GP set, we need a large $H$ to have diverse hidden latent functions for improving the prediction; contrarily, when $Q$ is large, indicating sufficient and diverse base GPs, we need a mild $H$ to preserve the model capability while alleviating the issue of over-fitting. \begin{figure}[t!] \centering \includegraphics[width=1.0\textwidth]{fig4} \caption{The impact of $H$ on the multi-task regression of NSVLMC on the toy case. The dashed curves marked in different colors represent the latent true responses of three tasks. The curves together with the shaded region represent 95\% predictive distributions. The dots marked in different colors are the training data for three tasks.} \label{fig_toy_NSVLMC_H} \end{figure} Finally, as has been discussed in section~\ref{sec_diss}, variants of neural embeddings could be implemented for LMC. Therefore, we here compare them against the proposed NSVLMC on the toy case in Fig.~\ref{fig_toy_Neural_Embedding}. As for NMOGP, it adopts global weights $\mbf{A}$ and $\mbf{B}$ but applies nonlinear activation to the transform $\mbf{B}\mbf{f}(\mbf{x})$, which however does not well improve the diversity of $\bar{\mbf{f}}(\mbf{x})$ in the $H$-dimensional space, as shown in Fig.~\ref{fig_toy_Neural_study}. Therefore, the NMOGP fails to perform multi-task regression when $Q=1$. As for SVLMC-DKL, it performs an input transformation through neural networks before multi-task modeling. This has no impact on the diversity of latent functions, thus resulting in poor performance when $Q=1$. Besides, the free neural input encoding may raise the issue of over-fitting, see the model with $Q=4$ and the discussions in~\cite{liu2021deep}. As for NGPRN, instead of improving the diversity of latent functions, it attempts to employ task-specific, input-dependent weights $\mbf{A}(\mbf{x})$ to tackle challenging multi-task cases. Consequently, we can find in~Fig.~\ref{fig_toy_Neural_Embedding} that the NGPRN well fits all the outputs at training points when $Q=1$, but raises obvious over-fitting for $y_2$ and poor generalization in the left input domain. This is due to the flexible and task-specific weights $\mbf{A}(\mbf{x})$ parameterized by NN. As shown in Fig.~\ref{fig_toy_Neural_study}, the powerful neural network is easy to become over-fitting when we have scarce training data. Finally, for the proposed NSVLMC, it performs well in the studied scenarios due to the flexible and diverse hidden latent functions $\bar{\mbf{f}}(\mbf{x})$ in comparison to that of NMOGP, see Fig.~\ref{fig_toy_Neural_study}. Besides, though equipped with neural networks for the latent neural mixture $\mbf{B}(\mbf{x})$, the NSVLMC does not obviously suffer from the issue of over-fitting. This may be attributed to two reasons: (i) the neural embedding is conducted on the task-sharing level, i.e., it is trained on the inputs of all the tasks, see Fig.~\ref{fig_LMCvsNLMC}(b); and (ii) the model is implemented in the complete Bayesian framework, which is beneficial for guarding against over-fitting. \begin{figure}[t!] \centering \includegraphics[width=1.0\textwidth]{fig5} \caption{Comparison of different neural embeddings on the toy case. The dashed curves marked in different colors represent the latent true responses of three tasks. The curves together with the shaded region represent 95\% predictive distributions. The dots marked in different colors are the training data for three tasks.} \label{fig_toy_Neural_Embedding} \end{figure} \begin{figure}[t!] \centering \includegraphics[width=1.0\textwidth]{fig6} \caption{The latent functions or weights obtained by neural embeddings in NMOGP, NGPRN and NSVLMC on the toy case.} \label{fig_toy_Neural_study} \end{figure} \subsection{Real-world datasets} This section verifies the superiority of the proposed NSVLMC on three multi-scale multi-task datasets, which will be elaborated as below. The detailed experimental configurations are provided in Appendix~\ref{sec_exp_details}. Besides, the error criteria adopted in the following comparison for model evaluation are provided in Appendix~\ref{sec_err_criteria}. \subsubsection{Datasets description} \texttt{Jura} dataset.\footnote{The data is available at~\url{https://sites.google.com/site/goovaertspierre/pierregoovaertswebsite/download/}. } This geospatial dataset describes the heavy metal concentration of Cadmium, Nickel and Zinc measured from the topsoil at 359 positions in a local region of the Swiss Jura. We follow the experimental settings in~\cite{requeima2019gaussian}: we observe the Nickel and Zinc outputs at all the $359$ positions and the Cadmium output at the first 259 positions, with the goal being to predict the Cadmium output at the remaining 100 positions. For the fair of comparison, we adopt the mean absolute error (MAE) and the negative log likelihood (NLL) criteria to quantify the model performance. \texttt{EEG} dataset.\footnote{The data is available at~\url{https://archive.ics.uci.edu/ml/datasets/eeg+database}. } This medical dataset describes the voltage readings of seven electrons FZ and F1-F6 placed on the patient's scalp over $t=1$s measurement period at 256 discrete time points. We follow the experimental settings in~\cite{requeima2019gaussian}: we observe the whole signals of F3-F6 and the first 156 signals of FZ, F1 and F2, with the goal being to predict the last 100 signals of FZ, F1 and F2. For the fair of comparison, we adopt the standardized mean square error (SMSE) and the NLL criteria to quantify the model performance. \texttt{Sarcos} dataset.\footnote{The data is available at~\url{http://www.gaussianprocess.org/gpml/data/}.} This large-scale, high dimensional data is related to the inverse dynamic modeling of a 7-degree-of-freedom anthropomorphic robot arm~\cite{vijayakumar2000locally} with 21 input variables (7 joints positions, 7 joint velocities, and 7 joint accelerations) and the corresponding 7 joint torques as outputs. We build three cases with different scales from this dataset for investigating multi-task modeling. The first two cases (cases A and B) study the joint modeling of the 4th torque and the 7th torque, the spearman correlation of which is up to $r=0.96$, indicating the highest similarity between two outputs. We split the data so that the 7th torque has 44484 data points. But for case A, the 4th torque only have 50 data points; while for case B, the 4th torque has 2000 data point. The final case C attempts to simultaneously model the 6th and 7th torques, which have the lowest and negative spearman correlation as $r=-0.10$. Similarly, we observe 44484 data points for the 7th torque and 2000 data points for the 4th torque. For the above three cases, we have a separate test set consisting of 4449 data points for model evaluation. Similar to the \texttt{EEG} dataset, we employ the SMSE and NLL criteria for performance quantification. It is found that the \texttt{Jura} dataset and the three cases of \texttt{Sarcos} perform multi-task \textit{interpolation}, while the \texttt{EEG} dataset performs the challenging multi-task \textit{extrapolation}. Besides, the target outputs of the \texttt{Jura} dataset, the \texttt{EEG} dataset and case A of the \texttt{Sarcos} dataset are small-scale with no more than 100 data points for target outputs; while the training size of target outputs of cases B and C of \texttt{Sarcos} is up to 2000, which is a challenging scenario for LMC to outperform single task GP. \subsubsection{Results and discussions} This comparative study introduces state-of-the-art LMCs as well as other MTGP competitors, including (i) the Gaussian processes autoregressive regression with nonlinear correlations (GPAR-NL)~\cite{requeima2019gaussian}, which has been verified to be superior in comparison to previous MTGPs, for example, CoKriging~\cite{wackernagel2003multivariate}, intrinstic coregionalisation model (ICM)~\cite{williams2007multi}, semiparametric latent factor model (SLFM)~\cite{teh2005semiparametric}, collaborative multi-output GP (CGP)~\cite{nguyen2014collaborative}, convolved multi-output GP (CMOGP)~\cite{alvarez2011computationally}, and GPRN~\cite{wilson2012gaussian}; (ii) the multi-output GPs with neural likelihoods~\cite{jankowiak2019neural}, including NMOGP, NGPRN and SVLMC-DKL; and (iii) the sparse GP variational autoencoders (GP-VAE)~\cite{ashman2020sparse} with partial inference networks~\cite{vedantam2018generative}. Besides, the baselines GP and stochastic variational GP (SVGP)~\cite{hensman2013gaussian} are involved in the comparison. Tables~\ref{tab_jura}-\ref{tab_sarcos} showcase the comparative results of different models on the three multi-task datasets, respectively. It is notable that the results of GP and GPAR-NL in Tables~\ref{tab_jura} and~\ref{tab_eeg} are taken from~\cite{requeima2019gaussian}, and the results of GP-VAE are taken from~\cite{ashman2020sparse}. We have the following findings from the comparative results. \begin{table} \caption{Comparative results on the \texttt{Jura} dataset, with the best and second-best results marked in gray and light gray, respectively.} \label{tab_jura} \centering \resizebox{0.8\columnwidth}{!} \begin{tabular}{lrrrr} \hline Models &GP &GPAR-NL &GP-VAE &SVLMC \\ \hline MAE &0.5739 &0.4324 &\cellcolor{lightgray}0.40$_{\pm0.01}$ &0.4580$_{\pm0.0047}$ \\ NLL &NA &NA &1.0$_{\pm0.06}$ &\cellcolor{mygray}0.9686$_{\pm0.0100}$ \\ \hline \hline Models &NMOGP &NGPRN &SVLMC-DKL &NSVLMC \\ \hline MAE &0.4618$_{\pm0.0036}$ &0.5619$_{\pm0.0187}$ &0.5173$_{\pm0.0136}$ &\cellcolor{mygray}0.4196$_{\pm0.0077}$ \\ NLL &1.0172$_{\pm0.0090}$ &1.2887$_{\pm0.0859}$ &1.0335$_{\pm0.0208}$ &\cellcolor{lightgray}0.8681$_{\pm0.0263}$ \\ \hline \end{tabular} } \end{table} \textbf{MTGPs outperform (SV)GP for correlated tasks with scarce data.} It is found that by leveraging the similarity among tasks, the MTGPs could transfer knowledge from other tasks in order to improve the modeling quality of target tasks even with scarce data, see for example the results on \texttt{Jura}, \texttt{EEG} and case A of \texttt{Sarcos} in Tables~\ref{tab_jura}-\ref{tab_sarcos}. But when the target task has sufficient data points, the benefits brought by multi-task learning is insignificant, especially for the lowly correlated tasks, see the results of cases B and C of \texttt{Sarcos} in Table~\ref{tab_sarcos}. \begin{table} \caption{Comparative results on the \texttt{EEG} dataset, with the best and second-best results marked in gray and light gray, respectively.} \label{tab_eeg} \centering \resizebox{0.8\columnwidth}{!} \begin{tabular}{lrrrr} \hline Models &GP &GPAR-NL &GP-VAE &SVLMC \\ \hline SMSE &1.75 &0.26 &0.28$_{\pm0.04}$ &0.2335$_{\pm0.1183}$ \\ NLL &2.60 &\cellcolor{lightgray}1.63 &2.23$_{\pm0.21}$ &1.7184$_{\pm0.3521}$ \\ \hline \hline Models &NMOGP &NGPRN &SVLMC-DKL &NSVLMC \\ \hline SMSE &\cellcolor{mygray}0.2148$_{\pm0.0554}$ &1.9012$_{\pm0.7016}$ &1.7883$_{\pm0.7998}$ &\cellcolor{lightgray}0.1783$_{\pm0.0185}$ \\ NLL &1.8835$_{\pm0.3058}$ &8.9466$_{\pm4.6042}$ &3.0267$_{\pm0.6609}$ &\cellcolor{mygray}1.7035$_{\pm0.2409}$ \\ \hline \end{tabular} } \end{table} \textbf{NGPRN risks over-fitting for scarce data and extrapolation.} It is observed that the NGPRN has the poorest performance on \texttt{Jura}, \texttt{EEG} and case A of \texttt{Sarcos}, especially in terms of the NLL criterion. The NGPRN introduces input-varying, task-related weights $\mbf{A}(\mbf{x})$ in~\eqref{eq_ngprn} to form the flexible and powerful neural likelihood, the capability of which has been illustrated in the toy case with $Q=1$. But this expressive likelihood mixture for tasks is easy to risk overfitting, thus resulting in poor prediction mean and overestimated variance, see for example the extremely large NLL for case A in Table~\ref{tab_sarcos}. The poor prediction of NGPRN becomes more serious for extrapolation, see the results on the \texttt{EEG} dataset and the illustration in Fig.~\ref{fig_toy_Neural_Embedding}. This is due to the poor generalization of task-specific neural network modeling of $\mbf{A}(\mbf{x})$ at unseen points, see the illustration in Fig.~\ref{fig_toy_Neural_study}. The above issues however could be alleviated by increasing the training size, see the desirable results of NGPRN for cases B and C of \texttt{Sarcos} in Table~\ref{tab_sarcos}. But as have been discussed before, the benefits of multi-task modeling in this large-scale scenario are insignificant. \begin{table} \caption{Comparative results on the three cases of \texttt{Sarcos} dataset, with the best and second-best results marked in gray and light gray, respectively.} \label{tab_sarcos} \centering \resizebox{\columnwidth}{!} \begin{tabular}{lrrrrrrr} \hline &Metric &SVGP &SVLMC &NMOGP &NGPRN &SVLMC-DKL &NSVLMC \\ \hline \multirow{2}*{A} &SMSE &0.1397$_{\pm0.0143}$ &\cellcolor{mygray}0.0708$_{\pm0.0044}$ &0.0756$_{\pm0.0031}$ &0.1586$_{\pm0.0367}$ &0.0761$_{\pm0.0070}$ &\cellcolor{lightgray}0.0665$_{\pm0.0046}$ \\ ~ &NLL &2.8457$_{\pm0.0776}$ &\cellcolor{mygray}2.7476$_{\pm0.0506}$ &2.7568$_{\pm0.0210}$ &56.3878$_{\pm16.6132}$ &2.7637$_{\pm0.0526}$ &\cellcolor{lightgray}2.6902$_{\pm0.0442}$ \\ \hline \hline \multirow{2}*{B} &SMSE &0.0235$_{\pm0.0009}$ &0.0278$_{\pm0.0112}$ &0.0284$_{\pm0.0147}$ &\cellcolor{lightgray}0.0139$_{\pm0.0018}$ &0.0221$_{\pm0.0026}$ &\cellcolor{mygray}0.0177$_{\pm0.0011}$ \\ ~ &NLL &2.3348$_{\pm0.0085}$ &2.2047$_{\pm0.1700}$ &2.2069$_{\pm0.1880}$ &\cellcolor{lightgray}1.8113$_{\pm0.0567}$ &2.1246$_{\pm0.0565}$ &\cellcolor{mygray}1.9807$_{\pm0.0311}$ \\ \hline \hline \multirow{2}*{C} &SMSE &0.0951$_{\pm0.0025}$ &0.2445$_{\pm0.0743}$ &0.1628$_{\pm0.0433}$ &\cellcolor{mygray}0.0941$_{\pm0.0079}$ &0.1962$_{\pm0.0167}$ &\cellcolor{lightgray}0.0891$_{\pm0.0254}$ \\ ~ &NLL &\cellcolor{mygray}0.8238$_{\pm0.0128}$ &1.2129$_{\pm0.2073}$ &1.0309$_{\pm0.1701}$ &0.9536$_{\pm0.0732}$ &1.1408$_{\pm0.0395}$ &\cellcolor{lightgray}0.7119$_{\pm0.1530}$ \\ \hline \end{tabular} } \end{table} \textbf{NSVLMC showcases superiority over counterparts.} In comparison to SVLMC, the SVLMC-DKL wraps inputs through neural networks, which may ease the subsequent latent GP regression but having limited enhancement for the learning of task similarities, thus resulting in slight improvements. Similar to the proposed NSVLMC, the NMOGP maps the $Q$ latent functions into a $H$-dimensional space and applies nonlinear activation before passing them to the likelihood. This helps it perform better than SVLMC on most cases. But this sort of LMC is still undesirable for tackling challenging scenarios due to the limited diversity of latent functions, see the illustration in Fig.~\ref{fig_toy_Neural_study}. As an improvement, the proposed NSVLMC adopts input-varying mixture $\mbf{B}(\mbf{x})$ to enhance the diversity of latent functions, thus showcasing the best results even for case C of the \texttt{Sarcos} dataset with the nearly uncorrelated tasks in Table~\ref{tab_sarcos}. It is worth noting that different from the input-varying, task-related $\mbf{A}(\mbf{x})$ in NGPRN, the mixture $\mbf{B}(\mbf{x})$ in NSVLMC is performed at the task-shared level, thus helping guarding against over-fitting. \begin{figure*}[t!] \centering \begin{subfigure} \centering \includegraphics[width=.9\textwidth]{fig7a} \end{subfigure \begin{subfigure} \centering \includegraphics[width=.9\textwidth]{fig7b} \end{subfigure} \caption{Impact of parameters $Q$ and $H$ on the performance of NSVLMC on the \texttt{Jura} dataset and case B of the \texttt{Sarcos} dataset.} \label{fig_impact_L_H} \end{figure*} \textbf{The cooperation of parameters $Q$ and $H$ is crucial for NSVLMC.} We finally investigate the impact of parameters $Q$ and $H$ on the performance of NSVLMC on the \texttt{Jura} dataset and case B of the \texttt{Sarcos} dataset in Fig.~\ref{fig_impact_L_H}. As has been discussed in the toy case, increasing the parameters $Q$ and $H$ will enhance the expressivity of NSVLMC. Hence, for the small-scale \texttt{Jura} dataset, the performance of NSVLMC first increases with $Q$ and $H$ but thereafter becomes poor, which indicates the possibility of over-fitting due to the increasing model capability. This issue however has been alleviated on case B of the \texttt{Sarcos} dataset since the increased training data plays the role of regularization. \subsection{Cross-fluid modeling for unsteady fluidized bed} This section applies the proposed NSVLMC to an engineering case that is a gas-solid fluidized bed wherein the spherical glass beads are fluidized with air at ambient condition. The operating conditions and simulation inputs of this fluidized bed are consistent to the experiments conducted in~\cite{taghipour2005experimental}. The unsteady computational fluid dynamics (CFD) simulation is performed by using the twoPhaseEulerFoam solver of OpenFOAM~\cite{jasak2007openfoam} to get the volume fraction of particles (VFP) evolved over 20s time period within the bed. We have two simulation cases, where case I is the fluidized bed filled up to $h=40$cm with glass beads, and case II is filled up to $h=38$cm. Since these two cases are only differ in the height of beads, we believe that the distributions of the spatial-temporal VFPs within the bed are similar. That is, we could adopt multi-task learning to predict the VFPs of these two cases. But directly modeling the high-dimensional VFP domain is unavailable for MTGP. Hence, we first resort to the well-known proper orthogonal decomposition (POD)~\cite{taira2017modal} to perform model reduction of VFP.\footnote{In machine learning community, it is known as principle component analysis (PCA).} Given $T=2000$ snapshots of the time-aware VFPs $\mbf{u}(\mbf{x}, t) \in \mathbb{R}^{N_m}$ of fluidized bed along time, the POD could extract the $R$-order dominant basis modes $\bm{\varphi}_k(\mbf{x}) \in \mathbb{R}^{N_m}$ as well as the time series coefficients $a_k(t)$ ($1 \le k \le R$) as \begin{align} \label{eq_pod} \mbf{u}(\mbf{x}, t) \approx \tilde{\mbf{u}}(\mbf{x}, t) = \sum_{k=1}^R a_k(t) \bm{\varphi}_k(\mbf{x}), \end{align} where $\tilde{\mbf{u}}(\mbf{x}, t)$ is the VFPs recovered by the $R$-order POD to approximate $\mbf{u}(\mbf{x}, t)$; $N_m = 6000$ (20 nodes $\times$ 300 nodes for the rectangular bed) is the number of structured meshes representing the discrete spatial approximation to the physics domain; the POD order satisfies $R \le \min\{T, N_m\}$ and the quality of VFP recovery increases with $R$; the input $\mbf{x}$ represents the input conditions of fluidized bed; $t$ ($0 \le t \le 20$) is an discrete time point within $[0, 20]$s; and finally, $a_k(t) = \int \mbf{u}(\mbf{x}, t) \bm{\varphi}_k(\mbf{x}) d\mbf{x}$ is the time series coefficient lying into a $R$-dimensional space. Given the five-order ($R=5$) POD decomposition of the two fluidized bed cases,\footnote{We here only verify the superiority of LMCs over the single-task GP on the first five time series coefficients. It can be naturally extended for the modeling of remaining time series coefficients.} we obtain two coefficient sets $\{a_k^{\mathrm{I}}(t) \}_{1\le k\le R}^{0\le t\le 20}$ and $\{a_k^{\mathrm{II}}(t) \}_{1\le k\le R}^{0\le t\le 20}$. We setup the following multi-task experimental settings: for $\mbf{a}_k^{\mathrm{I}} = \{a_k^{\mathrm{I}}(t) \}_{t=0}^{20}$ ($1\le k \le R$), we observe the coefficients at all the 2000 time points, while for $\mbf{a}_k^{\mathrm{II}} = \{a_k^{\mathrm{II}}(t) \}_{t=0}^{20}$ ($1\le k \le R$), we only have observations at the first 20 time points, thus raising the demand of multi-task leaning to improve the predictions of case II at the remaining time points. Besides, we convert these time series coefficients into supervised leaning scenario through one-step ahead auto-regressive with the look-back window size of 10, thus resulting in 1990 data points for $\mbf{a}_k^{\mathrm{I}}$ and 10 data points for $\mbf{a}_k^{\mathrm{II}}$. Our goal is to predict the time series coefficients as well as recovering the VFPs $\tilde{\mbf{u}}^{\mathrm{II}}(\mbf{x}, t)$ using~\eqref{eq_pod} at the remaining 1980 time points for case II. It is worth noting that since we have five pairs of coefficients, five LMCs have been built. The detailed implementations are elaborated in Appendix~\ref{sec_exp_details}. \begin{table} \caption{Comparative results on predicting the time series coefficients of case II of the fluidized bed, with the best and second-best results marked in gray and light gray, respectively.} \label{tab_fluid_bed} \centering \resizebox{\columnwidth}{!} \begin{tabular}{lrrrrrrr} \hline &Metric &GP &SVLMC &NMOGP &NGPRN &SVLMC-DKL &NSVLMC \\ \hline \multirow{2}*{$a_1^{\mathrm{II}}(t)$} &SMSE &0.1078 &0.0020$_{\pm0.0002}$ &\cellcolor{lightgray}0.0019$_{\pm0.0005}$ &0.0602$_{\pm0.0059}$ &0.0027$_{\pm0.0029}$ &\cellcolor{lightgray}0.0019$_{\pm0.0005}$ \\ ~ &NLL &-2.2103 &-5.4890$_{\pm0.0399}$ &\cellcolor{lightgray}-5.5215$_{\pm0.1186}$ &8.9083$_{\pm1.4626}$ &-5.3353$_{\pm0.7092}$ &\cellcolor{mygray}-5.5210$_{\pm0.1264}$ \\ \hline \hline \multirow{2}*{$a_2^{\mathrm{II}}(t)$} &SMSE &1.0605 &\cellcolor{mygray}0.0007$_{\pm0.0001}$ &\cellcolor{lightgray}0.0006$_{\pm0.0001}$ &3.7819$_{\pm0.4869}$ &0.0009$_{\pm0.0001}$ &0.0007$_{\pm0.0003}$ \\ ~ &NLL &-2.1992 &\cellcolor{lightgray}-5.8037$_{\pm0.0332}$ &\cellcolor{mygray}-5.7904$_{\pm0.0294}$ &906.8614$_{\pm106.1105}$ &-5.6912$_{\pm0.0415}$ &-5.5145$_{\pm0.1767}$ \\ \hline \hline \multirow{2}*{$a_3^{\mathrm{II}}(t)$} &SMSE &0.5182 &0.0014$_{\pm0.0004}$ &0.0021$_{\pm0.0004}$ &0.4628$_{\pm0.0433}$ &\cellcolor{mygray}0.0013$_{\pm0.0002}$ &\cellcolor{lightgray}0.0010$_{\pm0.0005}$ \\ ~ &NLL &-3.3703 &\cellcolor{mygray}-5.6414$_{\pm0.0942}$ &-5.4664$_{\pm0.0811}$ &108.4444$_{\pm10.4394}$ &-5.6404$_{\pm0.0658}$ &\cellcolor{lightgray}-5.7240$_{\pm0.1078}$ \\ \hline \hline \multirow{2}*{$a_4^{\mathrm{II}}(t)$} &SMSE &0.5535 &0.0017$_{\pm0.0005}$ &0.0018$_{\pm0.0009}$ &2.0475$_{\pm0.3549}$ &\cellcolor{mygray}0.0015$_{\pm0.0023}$ &\cellcolor{lightgray}0.0005$_{\pm0.0001}$ \\ ~ &NLL &-3.0062 &-5.5750$_{\pm0.1148}$ &-5.5257$_{\pm0.1786}$ &486.9308$_{\pm085.3126}$ &\cellcolor{mygray}-5.4643$_{\pm0.2542}$ &\cellcolor{lightgray}-5.8115$_{\pm0.0150}$ \\ \hline \hline \multirow{2}*{$a_5^{\mathrm{II}}(t)$} &SMSE &0.7184 &0.0037$_{\pm0.0015}$ &0.0025$_{\pm0.0019}$ &0.3005$_{\pm0.3273}$ &\cellcolor{mygray}0.0021$_{\pm0.0009}$ &\cellcolor{lightgray}0.0015$_{\pm0.0024}$ \\ ~ &NLL &-2.7060 &-5.1114$_{\pm0.3273}$ &-5.3924$_{\pm0.3760}$ &67.7025$_{\pm80.1554}$ &\cellcolor{mygray}-5.4629$_{\pm0.1816}$ &\cellcolor{lightgray}-5.6345$_{\pm0.5152}$ \\ \hline \end{tabular} } \end{table} \begin{figure}[t!] \centering \includegraphics[width=1.0\textwidth]{fig8} \caption{The five time series coefficients of case II of the fluidized bed predicted by GP and NSVLMC, respectively. The shaded regions indicate 95\% confidence interval of the prediction.} \label{fig_fluid_bed_gp_nsvlmc} \end{figure} Table~\ref{tab_fluid_bed} summarizes the comparative results of NSVLMC against other neural embeddings, the original SVLMC and the baseline GP to predict the time series coefficients of case II of the fluidized bed.\footnote{Note that since GP is independent of random seed, it produces the same results for multiple runs.} It is found that all the LMCs except the flexible NGPRN outperform the single-task GP for modeling the five time series coefficients of case II by leveraging knowledge shared from case I, see the illustration of NSVLMC versus GP in Fig.~\ref{fig_fluid_bed_gp_nsvlmc}. Besides, we can again observe the superiority of our NSVLMC in comparison to other neural embeddings, and the results of flexible NGPRN here again reveal the serious issue of poor generalization. Finally, after predicting the time series coefficients of case II, we can use the POD expression~\eqref{eq_pod} to recover the VFPs, as shown in Fig.~\ref{fig_VFPs}. It is observed that in comparison to the VFPs recovered by GP, the VFPs recovered by NSVLMC at $t=0.6$s are closer to the VFPs of POD due to the high quality of time series coefficients predictions. Note that the quality of VFP recovery could be further improved by POD and NSVLMC using higher orders. \begin{figure}[t!] \centering \includegraphics[width=.5\textwidth]{fig9} \caption{The VFPs of fluidized bed recovered by the five-order POD, the GP and the proposed NSVLMC, respectively, at $t=0.6$s.} \label{fig_VFPs} \end{figure} \section{Conclusions} \label{sec_conclusion} In order to improve the performance of LMC, this paper develops a new LMC paradigm wherein the neural embedding is adopted to induce rich yet diverse latent GPs in a high-dimensional latent space, and the scalable yet tight ELBO has been derived for high quality of model inference. We compare the proposed NSVLMC against existing LMCs on various multi-task learning cases to showcase its methodological characteristics and superiority. Further improvements related to the NSVLMC model could be the extensions on handling heterogeneous input domains (e.g., the input domains of tasks may have different dimensions)~\cite{hebbal2021multi, mao2021multiview} and massive related outputs (e.g., the direct modeling of fluids)~\cite{zhe2019scalable, wang2020multi}. \section*{Acknowledgements} This work was supported by the National Natural Science Foundation of China (52005074), and the Fundamental Research Funds for the Central Universities (DUT19RC(3)070). Besides, it was partially supported by the Research and Innovation in Science and Technology Major Project of Liaoning Province (2019JH1-10100024), and the MIIT Marine Welfare Project (Z135060009002). \section*{Appendix} \begin{appendices} \section{Expressions for the components in ELBO~\eqref{eq_elbo_tight}} \label{app_elbo} For the inner term $\tilde{\mathcal{L}}_{\mbf{AB}}$ in the expectation $\mathbb{E}_{q(\mbf{A})} \left[ \log \mathbb{E}_{p(\mbf{B})}\left[ \exp(\tilde{\mathcal{L}}_{\mbf{AB}}) \right] \right]$ of ELBO~\eqref{eq_elbo_tight}, we have \begin{align} \label{eq_elbo_fact} \begin{aligned} \tilde{\mathcal{L}}_{\mbf{AB}} =& \mathbb{E}_{q(\mbf{f})} [\log p(\mbf{y}|\mbf{f}, \mbf{A}, \mbf{B})] \\ =& \left\langle \log p(\mbf{y}| \mbf{f}, \mbf{A}, \mbf{B}) \right\rangle_{\prod_{q=1}^Q q(\mbf{f}_q)} \\ =& \sum_{c=1}^C \sum_{i=1}^{N^c} \mathbb{E}_{\prod_{q=1}^Q q(f_{q,i}^c)} \left[\log \mathcal{N}\left(y_i^c \left| \sum_{h=1}^H a_h^c \sum_{q=1}^Q b_q^h(\mbf{x}_i^c) f_q(\mbf{x}_i^c), \nu^c_{\epsilon} \right.\right) \right] \\ =& \sum_{c=1}^C \sum_{i=1}^{N^c} \log \mathcal{N}\left(y_i^c \left| \sum_{h=1}^H \sum_{q=1}^Q a_h^c b_q^h(\mbf{x}_i^c) \mu_{q,i}^c, \nu^c_{\epsilon} \right.\right) \\ &- \frac{1}{2\nu^c_{\epsilon}} \left(\sum_{h=1}^H \sum_{q=1}^Q (a_h^c b_q^h(\mbf{x}_i^c))^2 \nu_{q,i}^c \right), \end{aligned} \end{align} where the individual mean and variance express respectively as \begin{align} \mu_{q,i}^c &= \bm{\mu}_{q}(\mbf{x}_i^c) = k_q(\mbf{x}_i^c,\mbf{Z}_q) \mbf{K}^{-1}_{Z_q} \mbf{m}_q, \\ \nu_{q,i}^c &= \bm{\Sigma}_{q}(\mbf{x}_i^c) = k_q(\mbf{x}_i^c,\mbf{x}_i^c) + k_q(\mbf{x}_i^c,\mbf{Z}_q) \mbf{K}^{-1}_{Z_q} [\mbf{S}_q \mbf{K}^{-1}_{Z_q} - \mbf{I}] k_q^{\mathsf{T}}(\mbf{x}_i^c,\mbf{Z}_q). \end{align} Thereafter, the unbiased evaluation of the expectation could be conducted through the Markov Chain Monte Carlo (MCMC) sampling method by the samples from the variational Gaussian posterior $q(\mbf{A})$ and the Gaussian prior $p(\mbf{B})$. It is found that the factorized expression over both data points and tasks in~\eqref{eq_elbo_fact} makes the ELBO be efficiently evaluated and optimized through the mini-batch fashion and stochastic optimizer, for example, Adam~\cite{kingma2015adam}. For the remaining two KL terms, due to the Gaussian form, all of them could be calculated analytically as \begin{align} \begin{aligned} \mathrm{KL}[q(\mbf{A})||p(\mbf{A})] =& \sum_{c=1}^C \sum_{h=1}^H \mathrm{KL}[q(a_h^c)||p(a_h^c)] \\ =& \frac{1}{2} \left(-\log |\mathrm{diag}(\bm{\nu}_{\mbf{A}})| - C \times H + \mathrm{Tr}(\mathrm{diag}(\bm{\nu}_{\mbf{A}})) + \bm{\mu}_{\mbf{A}}^{\mathsf{T}} \bm{\mu}_{\mbf{A}} \right), \end{aligned} \end{align} and \begin{align} \begin{aligned} \mathrm{KL}[q(\mbf{u})||p(\mbf{u})] =& \sum_{q=1}^Q \mathrm{KL}[q(\mbf{u}_q)||p(\mbf{u}_q)] \\ =& \sum_{q=1}^Q \frac{1}{2} \left(\log \frac{|\mbf{K}_{Z_q}|}{|\mbf{S}_q|} -N + \mathrm{Tr}(\mbf{K}_{Z_q}^{-1} \mbf{S}_q) + \mbf{m}_q^{\mathsf{T}} \mbf{K}_{Z_q}^{-1} \mbf{m}_q \right). \end{aligned} \end{align} \section{Experimental configurations} \label{sec_exp_details} The experimental configurations for the numerical cases in our comparative study in section~\ref{sec_exp} are detailed as following. As for data preprocessing, we normalize the inputs along each dimension to have zero mean and unit variance, and specifically, this normalization has been applied for the outputs to fulfill the GP model assumption. Besides, we have ten runs of model training with different random seeds on each case to quantify the algorithmic robustness. For the proposed NSVLMC model, it adopts the NN prior for the mean and variance of $p(\mbf{B})$ in~\eqref{eq_p_B} as \begin{align} \bm{\mu}_{\mbf{B}} &= \mbf{W}_{\mu}^{\mathsf{T}} \mathrm{MLP}_{\bm{\theta}}(\mbf{x}) + \mbf{b}_{\mu}, \\ \bm{\nu}_{\mbf{B}} &= \nu_0 \times \mathtt{Sigmoid}(\mbf{W}_{\nu}^{\mathsf{T}} \mathrm{MLP}_{\bm{\theta}}(\mbf{x}) + \mbf{b}_{\nu}), \end{align} where the base $\mathrm{MLP}_{\bm{\theta}}(.)$ accepts the $D$-dimensional input $\mbf{x}$ and has three fully-connected (FC) hidden layers ``FC($Q\times H$)-FC($Q\times H$)-FC($Q\times H$)'', each of which employs the tanh activation function and has $Q\times H$ hidden units with the weights initialized through the Xavier method~\cite{glorot2010understanding} and the biases initialized as zeros; the weights $\mbf{W}_{\mu}^{\mathsf{T}}$ and biases $\mbf{b}_{\mu}$ are the parameters for the final FC layer outputting the mean $\bm{\mu}_{\mbf{B}}$; similarly, the weights $\mbf{W}_{\nu}^{\mathsf{T}}$ and biases $\mbf{b}_{\nu}$ are the parameters for the final FC layer outputting the variance $\bm{\nu}_{\mbf{B}}$ with the sigmoid activate function which makes the output be within $[0,1]$; finally, the small positive parameter $\nu_0$ scales the variance, and it is initialized as $10^{-4}$ in order to yield nearly deterministic behaviors at the beginning for speeding up model training. As for the GP part of NSVLMC, we employ the SE kernel~\eqref{eq_SE} with (i) the length-scales $\{l_i \}_{i=1}^D$ initialized as 0.1 for the toy case, the \texttt{Jura} and \texttt{EEG} datasets, and the fluidized bed case, and they are initialized as 0.5 for the \texttt{Sarcos} dataset; and (ii) the output scale $\sigma^2_f$ is initialized as 1.0. We use the same inducing size $M_q = M$ ($1 \le q \le Q$) for latent GPs. Specifically, for the small-scale cases (\texttt{Jura}, \texttt{EEG} and case A of \texttt{Sarcos}), we use all the training inputs to initialize the inducing positions due to the low model complexity; while for the large-scale cases, we have $M=100$ and initialize them though the $k$-means clustering technique from the \texttt{scikit}-\texttt{learn} package~\cite{pedregosa2011scikit} for cases B and C of the \texttt{Sarcos} dataset, and we adopt $M=500$ for the fluidized bed case. The ELBO~\eqref{eq_elbo_iwvi} in training is estimated through $S=10$ samples; while for predicting, we sample 100 points from $p(\mbf{y}_*|\mbf{y})$ in~\eqref{eq_y*}. As for the parameters $Q$ and $H$ in NSVLMC, we have $Q=2$ for all the cases except the \texttt{EEG} dataset which adopts $Q=4$; we have $H=20$ for the \texttt{Jura} and \texttt{EEG} datasets, and $H=10$ for cases A and B of the \texttt{Sarcos} dataset but $H=100$ for case C due to the low task correlation, and finally we have $H=10$ for the fluidized bed case. As for the optimization, we employ the well-known Adam optimizer~\cite{kingma2015adam} with the learning rate of $5\times10^{-3}$,\footnote{Since the proposed NSVLMC is a hybrid model of NN and GP, we adopt a mild learning rate $5\times10^{-3}$ according to the suggestion in~\cite{liu2021deep}.} and run it over 10000 iterations for all the cases except the \texttt{Sarcos} dataset which runs up to 20000 iterations. The mini-batch size $|\mathcal{B}|$ takes 32 for the \texttt{Jura} and \texttt{Sarcos} datasets and the fluidized case, and it is 64 for the \texttt{EEG} dataset. \section{Error criteria for model evaluation} \label{sec_err_criteria} The expressions of the error criteria employed in the comparison study in section~\ref{sec_exp} for model evaluation are elaborated respectively as below. First, for the $c$-th output, given $N^c_*$ test points $\{\mbf{X}^c_* \in \mathbb{R}^{N^c_* \times D}, \mbf{y}^c_* \in \mathbb{R}^{N^c_*}\}$, the MAE criterion is used to quantify the precision of prediction mean as \begin{align} e^c_{\mathrm{MAE}} = \frac{1}{N^c_*} \sum_{i=1}^{N^c_*} |\mu^c_{*i} - y^c_{*i}|, \end{align} where $\mu^c_{*i}$ is the prediction mean at test point $\mbf{x}^c_i$, and $y^c_{*i}$ is the true observation at $\mbf{x}^c_i$. Second, different from MAE, the SMSE is a normalized error criterion expressed as \begin{align} e^c_{\mathrm{SMSE}} = \frac{1}{N^c_*} \frac{\sum_{i=1}^{N^c_*} (\mu^c_{*i} - y^c_{*i})^2}{\mathrm{var}(\mbf{y}^c)}, \end{align} where $\mathrm{var}(\mbf{y}^c)$ is the estimated variance of training outputs of the $c$-th task. It is noted that the SMSE equals to one when the model always predict the mean of $\mbf{y}^c$. Third, different from both MAE and SMSE, the informative NLL criteria is employed to further quantify the quality of predictive distribution. It is thus expressed as \begin{align} e^c_{\mathrm{NLL}} = \frac{1}{N^c_*} \sum_{i=1}^{N^c_*} \frac{1}{2} \left[ \frac{(\mu^c_{*i} - y^c_{*i})^2}{\nu^c_{*i}} + \log(2\pi \nu^c_{*i})\right], \end{align} where $\nu^c_{*i}$ is the prediction variance at test point $\mbf{x}^c_i$. For all the three criteria, lower is better. \end{appendices} \section*{References}
\section{Introduction} \label{sec:1introduction} \begin{figure*}[!ht] \centering \begin{tabular}{c} \includegraphics[width=17cm,keepaspectratio]{figures/dance_overview.png} \end{tabular} \caption{ Overview of the model architecture. Given a sequence of video frames $\{I_t\}^{T-1}_{t=0}$, the model analyzes the content in a hierarchical manner, from the low levels (pose estimation \& tracking) to the cognitive levels (movement and dance genre recognition). The input sequence $\{I_t\}^{T-1}_{t=0}$ forms the first (bottom) level. At the second level, our algorithm simultaneously estimates the 2D pose $\hat{p}^i_t$ and 3D pose $\hat{P}^i_t$ of each dancer $i (i=0,...,N-1)$ at each frame, as well as the camera projection parameters. Our algorithm works under occlusions, e.g., among dancers. At the third level, each dance movement $\hat{y}^e_t$ of each body part $e \in E$ (defined over a sequence of frames) is recognized and its location, given by, e.g., its starting frame $t$ and length are estimated, based on the poses estimated for the previous frames. At the fourth level, the dance genre $\hat{g}$ is recognized based on the movements $\{\hat{y}^e_t\}_{e\in E}$ of all body parts. } \label{fig:overview} \vspace{-0.2cm} \end{figure*} Dance represents a special genre of human activity. Our goal in this paper is development of algorithms to understand dance videos. We combine estimation of body movements with their feasibility as a part of dance. This enables interpretation of dance videos using not only constraints posed by the data but also those by the domain knowledge. A variety of proposed methods have also focused on dance videos \cite{Protopapadakis,Matsuyama,Dewan2017ICMV,Dewan2018laban,Castro2018,Zhao2019CVPR}. Most of these rely on kinect sensors to obtain depth information \cite{Protopapadakis,Matsuyama}. \cite{Dewan2017ICMV} classifies Indian dances by extracting patches centered at body's joint locations and using an LSTM network for classification. \cite{Dewan2018laban} proposes to perform Laban Movement Analysis (in terms of dance domain constructs of Body, Effort, Shape and Space) to then describe human motion from a pose sequence. \cite{Castro2018} compares the effects of using three different representations - raw images, optical flow and multi-person pose data - on their proposed dance dataset {proving that visual information is not sufficient to classify motion-heavy categories}. { There are several approaches to action recognition that first estimate poses \mbox{\cite{Wang2013cvpr,Wang2019,Luvizon2018}}. \mbox{\cite{Wang2013cvpr}} creates a coaching system for personalized athletic training based on pose correctness. \mbox{\cite{Wang2019}} improves action recognition performance by improving pose estimation accuracy using additional spatial and temporal constraints. However, \mbox{\cite{Wang2013cvpr,Wang2019}} both estimate only the 2D poses, leading to difficulties ambiguity when the movements are along the viewing direction . \mbox{\cite{Luvizon2018}} estimates both 2D and 3D Poses as well as image features to predict actions from all three. \mbox{\cite{Wang2013cvpr,Wang2019,Luvizon2018}} limit their representation for action recognition to pose sequences without including any higher level semantics that may define action. Moreover, these methods also require pose annotations in training videos. } \cite{Zhao2019CVPR} embeds RGB and optical-flow values into a single two-in-one stream network for more efficient dance genre classification. In addition to the features such as pose and optical flow used in these works, in this paper we use dance domain representations to tune feature analysis to dance instead of being generic. {When people dance, they follow a carefully choreographed sequence of 3D \textit{movements}, where each movement is hierarchically composed of simpler movements, ending in \textit{basic movements}. Each basic movement is composed of a sequence of poses representing a specific dance pattern. For brevity, in what follows, we will refer to basic movements by simply movements, We identify movements of 16 main \textit{body parts} $e \in E$ illustrated in Figure \mbox{\ref{fig:human_model}}. following Labanotation \mbox{\cite{labanotation}}, a well-known notation system used to record and archive human motion. Then in Table \mbox{\ref{tab:labels_movement}} we list the basic \textit{movements} $y^e \in Y^e$ for each \textit{body part} $e \in E$, again following \mbox{\cite{labanotation}} and defined in terms of homogeneity of motion direction, and level which are frequently used to describe the dance in dance domain.} Our dance recognition model adopts this hierarchy used by dance experts, which starts with the 3D pose sequence of the dancer, combines subsequences of joint displacements into dance \textit{movements}, and finally infers dance genre from the sequences of the movements of joints. {To help the model segment the pose sequence into the basic movements, we manually annotate the starting and ending positions of such movements for each body part for a subset of videos in the UID dataset.} Our framework takes a raw dance video sequence $\{I_t\}^{T-1}_{t=0}$ as input, estimates poses $\hat{p}_t$ for each frame $I_t$, recognizes the movement $\hat{y}^e_t$ (over multiple frames) of each body part $e$ based on its past pose sequence, and then predicts the dance genre $\hat{g}_t$ from the movement sequence. Experiments show that our hierarchical feature analysis is an effective way to recognize dance and our method outperforms state-of-the-art on F-score. The main contributions of this paper are as follows: \begin{itemize \item We propose the first dance video understanding framework that analyzes the videos hierarchically - from the bottom level of video frames, through the middle level of human poses, to the highest level of movements and associated dance genres. \item Our algorithm tracks and outputs 2D pose of each dancer in each frame in the presence of occlusions among dancers. \item We propose an unsupervised 3D pose estimation algorithm that starts with the estimated 2D pose sequence, and simultaneously and iteratively updates 2D poses, 3D poses and 3D-to-2D projection parameters using a single camera without using ground-truth for these poses or parameters. Our 3D pose network achieves state-of-the-art performance by incorporating kinematic constraints of a 34-DOF human skeletal model and temporal smoothness of motion. \item We have curated a large dance video data set, containing pose in ground truths for each video frame as well as for each movement, which we will share with the community for further exploration. \end{itemize} \section{Computational Approach} \begin{table*}[!ht] \small \centering \begin{tabular}{l p{13.2cm} l} \toprule \textbf{Body Part} & \textbf{Examples of Movement Label} & \textbf{\# Labels} \\ \midrule Head & Head Turning Up; Head Turning Down; Head Turning Left; Head Turning Right; Head Circling & 7 \\ Neck & Neck Moving Left; Neck Moving Right; Neck Circling; Head Keeping Still; Unknown & 5 \\ Left Shoulder & Left Shoulder Moving Upward; Left Shoulder Moving Downward; Left Shoulder Circling & 5 \\ Left Lower Arm & Left Arm Moving Upward; Left Arm Moving Downward; Left Arm Moving Left & 11 \\ Left Upper Arm & Left Arm Moving Upward; Left Arm Moving Downward; Left Arm Moving Left & 11 \\ Torso & Torso Bending; Torso Unbending; Torso Turning Left; Torso Turning Right; Torso Swing; Somesault & 10 \\ Hips & Hips Waving; Hips Figure 8; Hips Circling; Hip Moving Up; Hip Moving Down; Hips Keeping Still & 10 \\ Left Lower Leg & Left Leg Moving Upward; Left Leg Moving Downward; Left Leg Moving Left & 15 \\ Left Upper Leg & Left Leg Moving Upward; Left Leg Moving Downward; Left Leg Moving Left & 15 \\ Left Foot & Left Foot Extension; Left Foot Flexion; Left Foot Relaxed; Unknown & 4 \\ \bottomrule \end{tabular} \caption{Selected examples of movement labels of each body part. To save space, only the movements of the left body parts are shown in the table. The movements of the right body parts are the same as the left ones. There are 16 body parts and 154 movement labels in total. } \label{tab:labels_movement} \vspace{-0.2cm} \end{table*} Figure \ref{fig:overview} describes the components of our approach to dance video recognition and the hierarchy they form. Our approach can be summarized in the following steps: Step 1: For each input frame $I_t$, the model estimates the 2D pose $p^i_t$ for dancer $i$ appearing in $I_t$. The model tracks approximate locations of the dancers $\{i\}^{N-1}_{i=0}$ throughout the video via their bounding boxes $\{B_t^i\}^{T-1}_{t=0}$. Step 2: At each frame, the model provides an estimate $\hat{p}^i_t$ of the 2D pose $p^i_t$ of the dancer associated with each tracked box $B_t^i$ (Section \ref{sec:2Dpose}). Step 3: {The model then estimates 3D poses $\hat{P}^i_t$ from the estimated 2D ones $\hat{p}^i_t$, by using an unsupervised 3D pose estimation method (Section \mbox{\ref{sec:3Dpose}}).} Step 4: The model uses the LSTM network to recognize the movement $\{\hat{y}^e_t\}^{T-1}_{t=0}$ of each body part $e \in E$ (e.g., head, torso, etc.) from the trajectories $\{\{\hat{P}^j_t\}_{j\in J_e}\}^{T-1}_{t=0}$ of all the joints $j \in J_e$ connected to the body part $e$, where $J_e \subset E$ (Section \ref{sec:Movement}). We represent any given state of a dance as a set of body part configurations and the entire dance as a sequence of such sets. Step 5: For recognition, we first concatenate the movements $\{\{\hat{y}^e_t\}_{e\in E}\}\}^{T-1}_{t=0}$ of all body parts, and input it to an LSTM network to recognize the dance genre $\hat{g}$ (Section \ref{sec:Genre}). The rest of this section introduces the components of this hierarchy. \subsection{2D Pose Estimation by Tracking} \label{sec:2Dpose} \begin{algorithm}[!ht] \SetAlgoLined \textbf{Input}: a sequence of video frames $\{I_t\}^{T-1}_{t=0}$ \\ \textbf{Output}: a sequence of bounding boxes $\{(x_t^i, y_t^i, w_t^i, l_t^i)\}^{T-1}_{t=0}$ of the $i^{th}$ dancer \\ Initialization: select the bounding box $(x_0^i, y_0^i, w_0^i, l_0^i)$ of $N$ dancers to track by mouth \\ \While{new frame $I_t$ available}{ \For {$i^{th}$ dancer}{ Obtain $(x_t^i, y_t^i, w_t^i, l_t^i)$ by LDES approach \\ \If{not overlap with others}{ Store histogram and velocity of $i^{th}$ dancer \\ } \If{overlap happens \& tracking fails}{ Estimate when overlap ends } \If{overlap ends}{ Relocate the bounding box } } } \caption{Object Tracking} \label{alg:tracking} \end{algorithm} \begin{algorithm}[!ht]6 \SetAlgoLined \textbf{Input}: a sequence of video frames $\{I_t\}^{T-1}_{t=0}$ and a sequence of bounding boxes $\{B_t^i\}^{T-1}_{t=0} = \{(x_t^i, y_t^i, w_t^i, l_t^i)\}^{T-1}_{t=0}$ of the $i^{th}$ dancer\\ \textbf{Output}: a sequence of poses $\{\hat{p}_t^i\}^{T-1}_{t=0}$ of the $i^{th}$ dancer \\ \While{new frame $I_t$ available}{ Estimate poses // Perform OpenPose\\ \For {$i^{th}$ dancer}{ Select pose $\hat{c}$ from $C$ poses overlapped with the bounding box $B_t^i$ based on histogram match } } \caption{Tracking Based 2D Pose Estimation} \label{alg:2Dpose_est} \end{algorithm} To estimate 2D (or 3D) pose, we estimate 2D (or 3D) coordinates of each body joint. Classical pose estimation methods such as pictorial structures framework and deformable part models largely rely on hand-designed features to determine body joint locations. {Recently, deep learning-based approaches have achieved a major breakthrough in solving the problems in multi-person pose estimation (e.g., how to group keypoints for different people). They can be divided into top-down \mbox{\cite{Wang2020, 2018PersonLab}} and bottom-up \mbox{\cite{PifPaf2019,HigherHRNet2020,OpenPose}}.} The former employ detectors to first locate person instances and then their individual joints; the latter first estimate all joint locations within the image and then assign the joints to the associated person. Although these methods provide superior pose estimates, they have two major shortcomings critical to our task. Firstly, most of the pose estimation methods cannot track a dancer through the video when there are multiple dancers present because they perform pose estimation from individual images, ignoring the temporal information. Besides, the methods perform training mostly on large datasets wherein the dance parts are very small, with a single person, limited pose variety, and clean background. and therefore cannot guarantee accuracy on real world dance videos. The method we propose can track selected dancers, detect estimation errors, and correct them automatically. \begin{figure*}[!ht] \centering \begin{tabular}{c} \includegraphics[width=17.2cm,keepaspectratio]{figures/3Dpose_initial.png} \\ \includegraphics[width=17.2cm,keepaspectratio]{figures/3Dpose.png} \end{tabular} \caption{Overview of Proposed 3D pose estimation method. Given a sequence of video frames $\{I_t\}^{T-1}_{t=0}$, the dancers are tracked by our tracking algorithm in Algorithm \mbox{\ref{alg:tracking}} and each of their 2D poses $\{p_t^i\}^{N-1}_{i=0}$ are estimated by our tracking based 2D pose estimation algorithm in Algorithm \mbox{\ref{alg:2Dpose_est}}. Then based on the 2D poses $\{p_t^i\}^{N-1}_{i=0}$, we initialize their 3D poses and camera perspective projection parameters, $P_{t}^{*}$ and $\omega^{*2D}$, as shown in Fig. \mbox{\ref{fig:3Dpose} (top)} and Algorithm \mbox{\ref{alg:3D_to_2D}}. Finally, a neural network is trained to estimate the 3D poses $\{\hat{P}_t\}^{T-1}_{t=0}$, which incorporates kinematic constraints and spatiotemporal smoothness of motion, as described in Algorithm \mbox{\ref{alg:3D}}.} \label{fig:3Dpose} \vspace{-0.5cm} \end{figure*} \noindent\textbf{Object Tracking:} As explained in Algorithm \ref{alg:tracking}, our tracking algorithm is built upon the LDES tracker \cite{Li2019LDES}. Since occlusion between dancers is a serious problem, our algorithm centrally addresses it. Following are the three stages of our algorithm: (1) Use the LDES tracker to track each $i^{th}$ dancer when the dancer has no overlap with other dancers, while maintaining a color histogram $h^i_t$ and a bounding box $B^i_t=(x_t^i, y_t^i, w_t^i, l_t^i)$ for the dancer. (2) Detect occurrence of overlap by detecting failure of the tracker as indicated by a significant difference between the directions of motion before and after overlap. (3) Predict the time and the location of the dancer when the overlap may be expected to end, from the location and velocity observed just before the beginning of the overlap. Since multiple dancers may be detected in the vicinity of the predicted location in the predicted frame, select the one that provides the best histogram match, and update $h^i_t$ and $B^i_t$ accordingly. \noindent\textbf{Tracking Based 2D Pose Estimation:} { As explained in Algorithm \mbox{\ref{alg:2Dpose_est}}, we obtain the initial 2D poses by using the OpenPose method \mbox{\cite{OpenPose}}. } After we obtain the bounding box $B^i_t$ for each dancer $i$ at the end of the overlap, the box $B^i_t$ may overlap with multiple boxes simultaneously, indicating multiple 2D pose estimation results. We select that pose $\hat{p}^i_t$ whose histogram is most similar to the one $\hat{p}^i_{t-1}$ seen in the previous frame. (Algorithm \mbox{\ref{alg:2Dpose_est}}). \subsection{3D Pose Estimation} \label{sec:3Dpose} \begin{algorithm}[!ht] \SetAlgoLined \textbf{Input}: a sequence of 2D poses $\{p_t\}^{N-1}_{t=0}$ of a dancer \\ \textbf{Output}: a sequence of 3D poses $\{\tilde{P}_t\}^{N-1}_{t=0}$ of the dancer \\ Set the temporal window size to be $2\Delta$ \\ Denote total number of segments as $s=\floor*{\frac{N}{2\Delta}}$ \\ \For{$t = \Delta$ to $N-\Delta$}{ \For{k = 0 to $K-1$}{ Try new seed for DH parameters $\Lambda^k$ and perspective projection parameters $\omega^k$ \\ \For{$i = t-\Delta$ to $t+\Delta$}{ Generate 3D pose $\hat{P}^k_i=G(\Lambda^k)$ \\ Estimate 2D pose $\hat{p}_{i}^k=\Psi(\hat{P}_{i}^k; \omega^k)$ \\ Compute error $e^k_i = ||\hat{p}_{i}^k - p_{i}||^2_2$ \\ Optimize $\Lambda^{*k}, \omega^{*k}$ \\ } } } Select the 3D pose corresponding to seed $k^{*} = \operatornamewithlimits{argmin}\limits_{\tilde{k}}\sum_{i=t-\Delta}^{t+\Delta} e^{\tilde{k}}_i$ as the initialized pose\\ \caption{3D Pose Initialization} \label{alg:3D_to_2D} \end{algorithm} \begin{algorithm}[!ht] \SetAlgoLined \textbf{Input}: a sequence of video frames $\{I_t\}^{T-1}_{t=0}$, 2D poses $\{p_t\}^{T-1}_{t=0}$ and initial 3D poses $\{\tilde{P}_t\}^{T-1}_{t=0}$ of a dancer \\ \textbf{Output}: a sequence of estimated 3D poses $\{\hat{P}_t\}^{T-1}_{t=0}$ of the dancer \\ \While{new frame $I_{t}$ available}{ Estimate 3D pose $ \hat{P}_{t}$ \\ Project to 2D pose $\hat{p}_{t}$ \\ Compute loss $L = \alpha(|| \hat{p}_{t} - \hat{p}_{t-1} ||^2_2 + \beta || \hat{P}_{t} - \hat{P}_{t-1} ||^2_2) + || \hat{p}_{t} - p_{t} ||^2_2 + || \hat{P}_{t} - \tilde{P}_{t} ||^2_2$ \\ Update $\omega^{2D}$ and $\omega^{3D}$ } \caption{3D Pose Estimation} \label{alg:3D} \end{algorithm} Towards our objective of using dance representations close to those used by experts, we need to use 3D, instead of 2D, pose sequences. Similarly for recognition using the language of dance experts, we need to extract descriptors of 3D movements from the 2D pose sequences, which constitute our method's next stage. Computationally too, 3D poses contain more information than 2D poses, and thus lead to more accurate dance recognition. However, predicting 3D poses from 2D poses is an ill-posed problem like other 2D-to-3D problems. The state-of-the-art methods \cite{Pavllo2019CVPR,Wang20203D,Kocabas2020} use a two-step pipeline for solving it: first detect 2D poses from video frames, and then predict 3D poses by learning the correspondences of 2D and 3D key points. { \mbox{\cite{Martinez2017ICCV}} provides a simple yet effective baseline proving that the 2D to 3D task can be solved with a remarkably low error rate. \mbox{\cite{Wandt2019RepNet}} learns a mapping from a distribution of 2D poses to a distribution of 3D poses using an adversarial training approach. However, \mbox{\cite{Martinez2017ICCV,Wandt2019RepNet}} estimate 3D poses from 2D poses estimated from individual 2D frames, which ignores the temporal continuity information. } \cite{chen2020anatomyaware,Xu2020cvpr} use temporal correspondences of 2D keypoints to both learn the joint angles as well as predict the joint locations. They compute loss in terms of the distance between these key points and those back-projected using the estimated 3D pose. They enforce such geometric consistency to progressively refine the estimates of 3D poses. However, these methods are based on the assumption that the input 2D poses are accurate. \cite{Xu2020cvpr} proposes a 2D pose correction module which uses a temporal CNN to refine the 2D initial inputs. However, this assumes that ground-truth 2D poses are available to train the correction module. These assumptions are often restrictive in practice, and do not hold for our dance videos which are collected from the internet. { \mbox{\cite{Andriluka2010Mono}} relates detected 2D poses across frames based on tracking-by-detection and then recovers 3D pose in a Bayesian framework. However, their MAP estimation is not robust if the video is long or background changes dramatically. \mbox{\cite{XNect2020SIGGRAPH}} proposes a method to cope with occlusion. They first infer 3D locations of the visible body joints and then reconstruct the occluded joint locations using learned pose priors and a kinematic skeletal model. \mbox{\cite{Zanfir2018CVPR}} fit a parametric human model (SMPL) to observed image key points and segments along with some additional constraints. However, \mbox{\cite{XNect2020SIGGRAPH,Zanfir2018CVPR}} require 3D pose labels and/or shape to supervise the training, which are not available for our ``in the wild'' video dataset. \mbox{\cite{Zhou2017ICCV,kocabas2019epipolar}} estimate 3D pose from in-the-wild images without 3D pose annotations, but they require either additional 2D pose datasets or a multi-view setting. } To avoid these requirements and the need for groudtruth 2D pose, and to improve computational robustness, we propose an algorithm that integrates 3D pose estimation with 2D pose correction, which can be trained to converge on both estimates simultaneously while also estimating the camera projection parameters consistently. \begin{figure}[!ht] \centering \begin{tabular}{c} \includegraphics[width=8cm,keepaspectratio]{figures/human_model.png} \end{tabular} \caption{Our 34-DOF digital dancer model. The values of the DH parameters $\Lambda = \{\bm{\Theta},\bm{d},\bm{a},\bm{\alpha}\}$ of this model are listed in Table \mbox{\ref{tab:DH_parameters}} in Appendix. The bounds of the joint rotation offset angles $\bm{\theta}$ and bone length $\bm{b}$ are defined in Table \mbox{\ref{tab:bounds}} in Appendix.} \label{fig:human_model} \end{figure} {We use the Denavit-Hartenberg (DH) parameters $\Lambda^k = \{\bm{\Theta}^k,\bm{d}^k,\bm{a}^k,\bm{\alpha}^k\}$ to represent the 3D pose. A 3D pose $\tilde{P}_{t}$ is generated by passing $\Lambda^k$ to the 34-DOF kinematic model $G$ as follows:} \begin{equation} \hat{P}_{i}^k=(J_0, J_1, ..., J_{24}) \label{eq:P} \end{equation} \begin{equation} J_j = G(\Theta, d, a, \alpha)=\mathcal{T}_{\Theta} \mathcal{T}_d \mathcal{T}_a \mathcal{T}_{\alpha} J_{j-1} \label{eq:J} \end{equation} where \begin{align*} \scriptsize \mathcal{T}_{\Theta} \mathcal{T}_d \mathcal{T}_a \mathcal{T}_{\alpha} = \left[\begin{array}{cccc} \cos \Theta & -\sin \Theta \cos \alpha & \sin \Theta \sin \alpha & r \cos \Theta \\ \sin \Theta & \cos \Theta \cos \alpha & -\cos \Theta \sin \alpha & r \sin \Theta \\ 0 & \sin \alpha & \cos \alpha & d \\ 0 & 0 & 0 & 1 \end{array}\right] \end{align*} where $\mathcal{T}_{\Theta}, \mathcal{T}_d, \mathcal{T}_a$ and $\mathcal{T}_{\alpha} J_{j-1}$ are transition matrices, and $J_j$ is the 3D location of the joint $j$. We initialize the desired estimates of 3D pose $\tilde{P}_{t}$ and the 3D-to-2D projection parameter $\omega^{2D}_t$ with multiple randomly selected seed pairs $\{\Lambda^{*k}, \omega^{k}\}$ (to sample the search space), as explained in Figure \mbox{\ref{fig:3Dpose} (top)} and Algorithm \mbox{\ref{alg:3D_to_2D}}. $\omega^k=\{f^k,c^k\}$ are the perspective projection parameters. At frame $t$, we sample $K$ seeds of the DH parameters to generate 3D poses $\{\hat{P}_{i}^k\}_{i=t-\Delta}^{t+\Delta}$ in a sliding window of size $2\Delta$ centered at $t$ {and 3D-to-2D projection parameter $\omega^{2D}$}. By comparing the reconstructed 2D pose $\hat{p}=\Psi(\hat{P}_{t}; \omega^{2D})$ projected from the generated 3D pose $\hat{P}_{t}$ with the input 2D pose $p_{i}$ estimated in \mbox{\ref{sec:2Dpose}}, we optimize the DH parameters $\Lambda^k$ generating the 3D pose $\hat{P}_{i}^k$ while enforcing: (a) constraints that govern the joint rotation offset angles $\bm{\theta}^k$, (b) consistency with the known bone lengths $\bm{b}^k$ and (c) temporal smoothness of both the 2D and 3D poses. This is achieved by training with a loss function consisting of two parts: (1) temporal smoothness of both the 2D pose and 3D pose: $\alpha(|| \hat{p}_{t} - \hat{p}_{t-1} ||^2_2 + \beta || \hat{P}_{t} - \hat{P}_{t-1} ||^2_2)$. (2) preservation of 3D-to-2D projection (imaging) property: $|| \Psi(\hat{P}_{t}; \omega^{2D}) - p_{t} ||^2_2$. The coefficients $\alpha$ and $\beta$ are chosen to be inversely proportional to the error: the larger the error, smaller the weight of the window. We also enforce constancy of the 3D to 2D projection parameters by smoothing it over a time window. At each time step $t$, we update the 3D pose $\hat{P}_{t}$ and the projection parameter $\omega^{3D}$. From among the solutions obtained using the different seeds, the pair $\{\hat{P}^{*}_{t}; \omega^{*2D}\}$ corresponding to the seed offering the least error is selected. As shown in Figure \mbox{\ref{fig:3Dpose}} (bottom), after obtaining the initial 3D pose $P^{*}_{t}$ and the 3D-to-2D projection parameters $\omega_t^{*2D}$ from the \textit{3D Pose Initialization} block, we train temporal convolutional networks to learn the mapping from the input 2D poses $\{\hat{p}_t\}$ to the 3D ones $\{\hat{P}_t\}$. We use \mbox{\cite{Pavllo2019CVPR}} as our baseline networks. During the training, in addition to the consistency between 2D and 3D poses at all times, we again enforce temporal smoothness of motion with the loss function defined as follows: \begin{equation} \mathcal{L} = || \hat{p}_{t} - p_{t} ||^2_2 + || \hat{p}_{t} - p_{t-1} ||^2_2 + || \hat{P}_{t} - P^{*}_{t} ||^2_2 + || \hat{P}_{t} - \hat{P}_{t-1} ||^2_2) \label{eq:L} \end{equation} where $\hat{p}_{t}=\Psi(\hat{P}_{t}; \omega^{*2D})$.See details in Algorithm \ref{alg:3D}. { To further improve the accuracy when limited labeled 3D ground-truth pose data are available, we introduce a semi-supervised training version of the proposed pose estimation method. A supervised loss is trained by using the available labeled ground truth 3D poses $P_t$ as target, and the loss in Equation (\mbox{\ref{eq:L}}) is implemented using the remaining unlabeled data. Here, the predicted 3D poses $\hat{P}_t$ are projected back to 2D joint coordinates for consistency with the 2D input $p_t$. Similar to the training strategy in \mbox{\cite{Pavllo2019CVPR}}, we jointly optimize the supervised component with our unsupervised component during training, with the labeled data occupying the first half of a batch, and the unlabeled data occupying the second half. } \subsection{Body Part Movement Recognition} \label{sec:Movement} For each body part $e$, we train an LSTM-based model to recognize its (basic) movement. During training, the input is a sequence of 3D poses $\{\{\hat{p}^j_t\}_{j\in J_e}\}^{T-1}_{t=0}$ of all the joints $j \in J_e$ connected to the body part $e$ and the output is a sequence of predicted movement labels $\{\hat{y}^e_t\}^{T-1}_{t=0}$ connected to $e$. Since this is a multi-label classification problem, which means the poses $\{\hat{p}^j_t\}_{j\in J_e}$ connected to the body part $e$ may map to multiple movement labels $\hat{y}^e_t$ of $e$ at the same time, we use the Binary Cross Entropy (BCE) loss between predicted movements $\{\hat{y}^e_t\}^{T-1}_{t=0}$ and the target movement labels $\{y^e_t\}^{T-1}_{t=0}$. This loss is minimized during the training to obtain the optimal model. During testing, the trained model of each $e \in E$ takes a sequence of 3D poses $\{\{\hat{p}^j_t\}_{j\in J_e}\}^{T-1}_{t=0}$ of all the joints connected to $e$ as input, and predicts the movement $\{\hat{y}^e_t\}^{T-1}_{t=0}$ of $e$. \subsection{Dance Genre Recognition} \label{sec:Genre} Analogous to the approach in Section \ref{sec:Movement}, we train an LSTM model to take a sequence of movement labels $\{\{\hat{y}^e_t\}_{e \in E}\}^{T-1}_{t=0}$ of all the body parts $e \in E$ as input. We use the output of the last time step from the last layer as the prediction of the dance genre $\hat{g}$. For loss function, we use cross entropy between the predicted dance genre $\hat{g}$ and the target dance genre $g$. We describe the movement and dance genre recognition in detail in Algorithm \ref{alg:MovementSupplementary} and Algorithm \ref{alg:DanceClassifySupplementary} in the supplementary document. \section{Experiments} \label{sec:experiment} \subsection{Data and Experiment Setting} \noindent\textbf{University of Illinois Dance (UID) Dataset.} One major challenge for dance recognition lies in the lack of training data. We have curated \textit{UID video dataset} containing 9 types of dances (Ballet, Belly dance, Flamenco, Hip Hop, Rumba, Swing dance, Tango, Tap dance and Waltz) with details listed in Table \ref{tab:UID_dataset}. Figure \ref{fig:UID_dataset} and \ref{fig:UID_dist} show sample frames and information about in our dataset for each dance genre. The videos contain situations of varying difficulty, from simple ones such as tutorial videos with clean background, to hard videos, having interacting dancers, noisy background and varying lights. \begin{figure}[!ht] \centering \begin{tabular}{c} \includegraphics[width=8cm,keepaspectratio]{figures/dataset_uiuc.jpg} \end{tabular} \caption{Sample frames for 9 types of dances in the University of Illinois Dance (UID) Dataset.} \label{fig:UID_dataset} \end{figure} \begin{figure}[!ht] \centering \begin{tabular}{c} \includegraphics[width=8cm,keepaspectratio]{figures/dataset_dist.png} \end{tabular} \caption{Distribution of the numbers and durations of clips for each genre in the UID Dataset.} \label{fig:UID_dist} \end{figure} \begin{table}[!ht] \small \centering \begin{tabular}{l|l|l|l} \toprule \textbf{Dance Genres} & 9 & \textbf{Total Duration} & 108,089s \\ \hline \textbf{Total \# of Clips} & 1143 & \textbf{Total \# of Frames} & 2,788,157 \\ \hline \textbf{Min clip length} & 4s & \textbf{Min \# of clips / class} & 30 \\ \hline \textbf{Max clip length} & 824s & \textbf{Max \# of clips / class} & 304 \\ \bottomrule \end{tabular} \caption{Summary of the characteristics of the UID dataset.} \label{tab:UID_dataset} \end{table} \begin{table}[!ht] \small \centering \begin{tabular}{llll} \toprule \parbox{0.7cm}{\textbf{Method}} & \parbox{0.8cm}{\textbf{Supervision}} & \parbox{0.7cm}{\textbf{Extra Data}} & \parbox{1.2cm}{\textbf{MPJPE (mm)$(\downarrow)$}} \\ \midrule Martinez \cite{Martinez2017ICCV} {\scriptsize ICCV'17} & Supervised & - & 110.0 \\ Wandt \cite{Wandt2019RepNet} {\scriptsize CVPR'19} & Supervised & - & 323.7 \\ Pavllo \cite{Pavllo2019CVPR} {\scriptsize CVPR'19} & Supervised & - & \underline{77.6} \\ \midrule Pavllo \cite{Pavllo2019CVPR} {\scriptsize CVPR'19$(\star)$} & Semi-Sup. & No & 446.1 \\ Ours & Semi-Sup. & No & \textbf{73.7} \\ \midrule Zhou \cite{Zhou2017ICCV} {\scriptsize ICCV'17} & Weakly-Sup. & Yes & 93.1 \\ Kocabas \cite{kocabas2019epipolar} {\scriptsize CVPR'19} & Self-Sup. & {\scriptsize Multiview} & 87.4 \\ Ours & Unsupervised & No & 246.4 \\ \bottomrule \end{tabular} \caption{Comparison of 3D pose estimation results using Protocol 1: Mean Per-Joint Position Error (MPJPE) on AIST Dance Video Dataset \cite{aist}. $(\star)$ uses ground truth 2D poses. Methods using different supervision level are divided by horiontal line. Our proposed method (semi-supervised) achieves the lowest error against the fully supervised methods. Moreover, our unsupervised pose estimation method can achieve the same level of performance as the state-of-the-art supervised/semi-supervised methods. } \label{tab:3Dpose_result_aist} \end{table} \begin{table}[!ht] \small \centering \begin{tabular}{llll} \toprule \parbox{0.8cm}{\textbf{Method}} & \parbox{0.8cm}{\textbf{Supervision}} & \parbox{0.7cm}{\textbf{Extra Data}} & \parbox{1.2cm}{\textbf{MPJPE (mm)$(\downarrow)$}} \\ \midrule Martinez \cite{Martinez2017ICCV} {\scriptsize ICCV'17} & Supervised & - & 87.3 \\ Zanfir \cite{Zanfir2018CVPR} {\scriptsize CVPR'18} & Supervised & - & 69.0 \\ Wandt \cite{Wandt2019RepNet} {\scriptsize CVPR'19} & Supervised & - & 89.9 \\ Pavllo \cite{Pavllo2019CVPR} {\scriptsize CVPR'19} & Supervised & - & \textbf{46.8} \\ Mehta \cite{XNect2020SIGGRAPH} {\tiny SIGGRAPH'20} & Supervised & - & 63.6 \\ \midrule Pavllo \cite{Pavllo2019CVPR} {\scriptsize CVPR'19$(\star)$} & Semi-Sup. & No & 51.6 \\ Ours & Semi-Sup. & No & \underline{47.3} \\ \midrule Zhou \cite{Zhou2017ICCV} {\scriptsize ICCV'17} & Weakly-Sup. & Yes & 64.9 \\ Rhodin \cite{rhodin2018ECCV} {\scriptsize ECCV'18} & Unsupervised & {\scriptsize Multiview} & 98.2 \\ Kocabas \cite{kocabas2019epipolar} {\scriptsize CVPR'19} & Self-Sup. & {\scriptsize Multiview} & 60.6 \\ Chen \cite{Chen2019cvpr} {\scriptsize CVPR'19} & Unsupervised & Yes & 68.0 \\ Kundu \cite{kundu2020unsup} {\scriptsize ECCV'20} & Unsupervised & Yes & 67.9 \\ Ours & Unsupervised & No & 82.1 \\ \bottomrule \end{tabular} \caption{Comparison of 3D pose estimation results using Protocol 1: Mean Per-Joint Position Error (MPJPE) on Human3.6M Dataset \cite{h36m} evaluated on S9 and S11. $(\star)$ uses ground truth 2D poses. Based on the method's supervision level, five labelled subjects (S1, S5, S6, S7, S8) are used to train the supervised methods, four labelled subjects (S5, S6, S7, S8) and one unlabelled subject (S1) are used to train the semi-supervised methods, and five unlabelled subjects (S1, S5, S6, S7, S8) for the rest methods (e.g., unsupervised). Our proposed method (semi-supervised) achieves the second lowest error against the fully supervised methods. Without the need of additional 2D/3D data, our unsupervised pose estimation method can achieve the same level of performance as the state-of-the-art methods. } \label{tab:3Dpose_result_human36} \end{table} \begin{figure*}[!ht] \centering \scalebox{0.85}{ \setlength{\tabcolsep}{1pt} \begin{tabular}{ccccccccc} \multirow{2}{*}{\rotatebox[origin=c]{90}{\small{AIST++ Dataset}}} & \ctab{\includegraphics[height=1.3cm,trim=15cm 5cm 15cm 10cm ,clip]{results/AIST/gLO_sFM_c01_d15_mLO0_ch15/00000_2D.png}} & \ctab{\includegraphics[height=1.3cm,trim=15cm 5cm 15cm 10cm ,clip]{results/AIST/gLO_sFM_c01_d15_mLO0_ch15/00010_2D.png}} & \ctab{\includegraphics[height=1.3cm,trim=15cm 5cm 15cm 10cm ,clip]{results/AIST/gLO_sFM_c01_d15_mLO0_ch15/00020_2D.png}} & \ctab{\includegraphics[height=1.3cm,trim=15cm 5cm 15cm 10cm ,clip]{results/AIST/gLO_sFM_c01_d15_mLO0_ch15/00030_2D.png}} & \ctab{\includegraphics[height=1.3cm,trim=15cm 3cm 15cm 8cm ,clip]{results/AIST/gWA_sFM_c01_d26_mWA3_ch11/00000_2D.png}} & \ctab{\includegraphics[height=1.3cm,trim=15cm 3cm 15cm 8cm ,clip]{results/AIST/gWA_sFM_c01_d26_mWA3_ch11/00010_2D.png}} & \ctab{\includegraphics[height=1.3cm,trim=15cm 3cm 15cm 8cm ,clip]{results/AIST/gWA_sFM_c01_d26_mWA3_ch11/00020_2D.png}} & \ctab{\includegraphics[height=1.3cm,trim=15cm 3cm 15cm 8cm ,clip]{results/AIST/gWA_sFM_c01_d26_mWA3_ch11/00030_2D.png}}\\ & \ctab{\includegraphics[height=1.3cm,trim=3cm 3cm 3cm 3cm ,clip]{results/AIST/gLO_sFM_c01_d15_mLO0_ch15/00000_3D.png}} & \ctab{\includegraphics[height=1.3cm,trim=3cm 3cm 3cm 3cm ,clip]{results/AIST/gLO_sFM_c01_d15_mLO0_ch15/00010_3D.png}} & \ctab{\includegraphics[height=1.3cm,trim=3cm 3cm 3cm 3cm ,clip]{results/AIST/gLO_sFM_c01_d15_mLO0_ch15/00020_3D.png}} & \ctab{\includegraphics[height=1.3cm,trim=3cm 3cm 3cm 3cm ,clip]{results/AIST/gLO_sFM_c01_d15_mLO0_ch15/00030_3D.png}} & \ctab{\includegraphics[height=1.3cm,trim=3cm 3cm 3cm 3cm ,clip]{results/AIST/gWA_sFM_c01_d26_mWA3_ch11/00000_3D.png}} & \ctab{\includegraphics[height=1.3cm,trim=3cm 3cm 3cm 3cm ,clip]{results/AIST/gWA_sFM_c01_d26_mWA3_ch11/00010_3D.png}} & \ctab{\includegraphics[height=1.3cm,trim=3cm 3cm 3cm 3cm ,clip]{results/AIST/gWA_sFM_c01_d26_mWA3_ch11/00020_3D.png}} & \ctab{\includegraphics[height=1.3cm,trim=3cm 3cm 3cm 3cm ,clip]{results/AIST/gWA_sFM_c01_d26_mWA3_ch11/00030_3D.png}}\\ \multirow{2}{*}{\rotatebox[origin=c]{90}{\small{UID Dataset}}} & \ctab{\includegraphics[height=1.3cm,trim=1cm 0cm 1cm 0cm ,clip]{results/UIUC/Sylvia_S0006/s7.png}} & \ctab{\includegraphics[height=1.3cm,trim=1cm 0cm 1cm 0cm,clip]{results/UIUC/Sylvia_S0006/s12.png}} & \ctab{\includegraphics[height=1.3cm,trim=1cm 0cm 1cm 0cm,clip]{results/UIUC/Sylvia_S0006/s22.png}} & \ctab{\includegraphics[height=1.3cm,trim=1cm 0cm 1cm 0cm,clip]{results/UIUC/Sylvia_S0006/s37.png}} & \ctab{\includegraphics[height=1.3cm,trim=1cm 0cm 1cm 0cm,clip]{results/UIUC/FlamencoDancePhoenix_0005/b228.png}} & \ctab{\includegraphics[height=1.3cm,trim=1cm 0cm 1cm 0cm,clip]{results/UIUC/FlamencoDancePhoenix_0005/b244.png}} & \ctab{\includegraphics[height=1.3cm,trim=1cm 0cm 1cm 0cm,clip]{results/UIUC/FlamencoDancePhoenix_0005/b259.png}} & \ctab{\includegraphics[height=1.3cm,trim=1cm 0cm 1cm 0cm,clip]{results/UIUC/FlamencoDancePhoenix_0005/b268.png}} \\ & \ctab{\includegraphics[height=1.3cm,trim=1cm 1cm 1cm 1cm ,clip]{results/UIUC/Sylvia_S0006/s7_.png}} & \ctab{\includegraphics[height=1.3cm,trim=1cm 1cm 1cm 1cm,clip]{results/UIUC/Sylvia_S0006/s12_.png}} & \ctab{\includegraphics[height=1.3cm,trim=1cm 1cm 1cm 1cm,clip]{results/UIUC/Sylvia_S0006/s22_.png}} & \ctab{\includegraphics[height=1.3cm,trim=1cm 1cm 1cm 1cm,clip]{results/UIUC/Sylvia_S0006/s37_.png}} & \ctab{\includegraphics[height=1.3cm,trim=1cm 1cm 1cm 1cm,clip]{results/UIUC/FlamencoDancePhoenix_0005/b228_.png}} & \ctab{\includegraphics[height=1.3cm,trim=1cm 1cm 1cm 1cm,clip]{results/UIUC/FlamencoDancePhoenix_0005/b244_.png}} & \ctab{\includegraphics[height=1.3cm,trim=1cm 1cm 1cm 1cm,clip]{results/UIUC/FlamencoDancePhoenix_0005/b259_.png}} & \ctab{\includegraphics[height=1.3cm,trim=1cm 1cm 1cm 1cm,clip]{results/UIUC/FlamencoDancePhoenix_0005/b268_.png}} \\ & Frame 0 & Frame 10 & Frame 20 & Frame 30 & Frame 0 & Frame 10 & Frame 20 & Frame 30 \\ \end{tabular}} \caption{Visualization results on sample videos from the AIST++ dataset \cite{li2021learn} and our proposed University of Illinois Dance (UID) dataset. The top row shows the reconstructed 2D poses from the estimated 3D poses and the bottom row shows the estimated 3D poses.} \label{fig:qualitative} \end{figure*} \begin{table*}[!ht] \small \centering \begin{tabular}{l|l|lllllllllll} \toprule \multirow{2}{*}{\parbox{2.2cm}{\raggedright Input to the \mbox{Movement Recog.}}} & \multicolumn{12}{c}{F-score} \\ \cline{2-13} & \textit{Averaged} & Head & lshoulder & rshoulder & larm & rarm & Hips & Torso & lleg & rleg & lfoot & rfoot \\ \midrule 2D Pose & 0.93 & \textbf{0.95} & \textbf{0.96} & \textbf{0.96} & 0.89 & 0.91 & 0.81 & 0.96 & 0.94 & 0.85 & \textbf{1.00} & \textbf{1.00} \\ 3D Pose & \textbf{0.97} & 0.93 & \textbf{0.96} & \textbf{0.96} & \textbf{0.94} & \textbf{0.93} & \textbf{1.00} & \textbf{0.98} & \textbf{0.95} & \textbf{0.98} & 0.99 & \textbf{1.00} \\ \bottomrule \end{tabular} \caption{F-scores for body part movements recognition from estimated 2D poses (Sec \ref{sec:2Dpose}) and estimated 3D poses (Sec \ref{sec:3Dpose}) as inputs. Recognition improves as a result of using our estimated 3D poses. Note that the performances for several parts are comparable with existing results. This is because the dancers are at a large distance, diminishing the extra power offered by the 3D information. This situation changes in Table \ref{tab:genre_recog}. } \label{tab:move_recog} \end{table*} \begin{table}[!ht] \small \centering \begin{tabular}{l|l} \toprule Input to Dance Genre Recognition & F-score \\ \midrule 2D Pose & 0.44 \\ 3D Pose & 0.47 \\ Movements (2D Pose as input) & 0.50 \\ Movements (3D Pose as input) & 0.55 \\ 2D Pose + Movements (2D Pose as input) & \textbf{0.73} \\ 3D Pose + Movements (3D Pose as input) & \textbf{0.86} \\ \bottomrule \end{tabular} \caption{Ablation study using different components as inputs. The 3D pose, in general, provides higher accuracy for genre recognition than 2D pose. Combination of the two, 2D and 3D level estimates, achieves better performance than either alone. } \label{tab:genre_recog} \end{table} \noindent\textbf{Evaluation Protocols.} we use the widely used mean per-joint position error (MPJPE) in millimeters to calculate the mean Euclidean distance between the predicted 3D poses $\{\hat{P}_t\}_{t=0}^{T-1}$ and the target 3D poses $\{P_t\}_{t=0}^{T-1}$. We use F-score to measure the accuracy of our movement and dance recognition approaches on our UID dataset. \noindent\textbf{Experiment Setting.} We evaluate our unsupervised 3D pose estimation approach on both the UID video dataset and AIST++ dance dataset \cite{aist}. The AIST++ Dataset contains 1,408 multi-view dance sequences from 10 dance genres with hundreds of choreographies, provides 3D human keypoint annotations and camera parameters for 10.1M images, and covers 30 different subjects in 9 views. We did our experiments with a subset of AIST++, containing 200 videos (~0.4M frames). 30\% of the videos with ground-truth 3D poses are used as labeled data to train the supervised methods \cite{Wandt2019RepNet, Martinez2017ICCV, Pavllo2019CVPR} and semi-supervised methods (\cite{Pavllo2019CVPR} and our method). 10\% of the videos are used for testing. The remaining video samples are used as unlabeled data for training the semi-supervised methods. For consistency with other work \cite{Wandt2019RepNet, Martinez2017ICCV, Pavllo2019CVPR}, we train and evaluate on $3D$ poses in camera space. In the 3D Pose Initialization component, we use Adam \cite{kingma2017adam} optimizer to optimize the estimated 3D poses in Algorithm \ref{alg:3D_to_2D} for 50 epochs. The temporal window size $\Delta=3$ and the number of seeds $K=2$. After obtaining the best initial 3D poses and camera projection parameters (focal lengths and principal points), we use \cite{Pavllo2019CVPR} as the baseline to train the 3D pose estimation network for 200 epochs. \subsection{3D Poses} Figure \ref{fig:qualitative} shows qualitative results of our 3D pose method on both the UID dataset and the AIST++ dataset \cite{aist}. The 2D poses (top row) reconstructed from the estimated 3D poses align well with the dancer's movement. The estimated 3D poses well match the known human skeletal structure and are smooth between frames. To quantitatively evaluate our method, we train our model and three state-of-the-art methods \cite{Wandt2019RepNet, Martinez2017ICCV, Pavllo2019CVPR} on the AIST++ dataset and calculate the mean per-joint position errors (MPJPE). We also evaluated our model on the Human 3.6M dataset \cite{h36m}. Table \ref{tab:3Dpose_result_aist} and Table \ref{tab:3Dpose_result_human36} shows that our unsupervised pose estimation method is comparable with the supervised methods. Moreover, our semi-supervised version achieves the best and second best performance on the AIST++ dataset \mbox{\cite{aist}} and 3.6M dataset \mbox{\cite{h36m}}, respectively. \subsection{Movement and Dance Genre Recognition} Recognition results for body part movements and dance genre recognition on the UID dataset are given in Tables \ref{tab:move_recog} and \ref{tab:genre_recog}. {We use the 3D poses estimated using our unsupervised method as the input for recognition since our UID collects videos in the wild and hence does not provide ground-truth 3D annotations for training the proposed semi-supervised version. The movements of different body parts can help with dance understanding from the viewpoint of dance experts.} \section{Conclusions and Future Work} In conclusion,we have presented an approach to dance videos understanding that follows a hierarchical representation used by experts to describe dances. We have presented an approach to extract the primitives occurring at each level of the representation, from raw videos, to 3D pose, to movements, to dance genre. We have presented the challenges we have encountered and how we have addressed them using new constraints and algorithms. { Note that the training in our current dance video recognition framework is not fully unsupervised. We plan to develop a fully unsupervised pipeline that could be jointly trained for pose estimation and genre recognition. } In addition, we plan to synthesize dances using the representations we have extracted. We also plan to use the judgments of expert viewers on the quality of the synthesized dance videos as qualitative metrics of the representations extracted by our algorithms. \section{UID Dataset} The proposed \textit{UID video dataset} can be found at \url{https://drive.google.com/drive/folders/1-SdWYxIorbhQzi9Bp_HpJf25_ieMjoh5?usp=sharing}. The dataset folder contains 9 sub-folders, each having $\sim$30 to $\sim$300 videos, showing one of the following 9 dance types: Ballet, Belly dance, Flamenco, Hip Hop, Rumba, Swing dance, Tango, Tap dance and Waltz. \section{Demo Videos} In Figure \ref{fig:qualitative} in Section \ref{sec:experiment} of the paper, we have shown estimated 3D poses by drawing skeletal figures in the estimated poses and overlaying them on the corresponding images of the dancers. These single frame overlays help us verify the placement of the skeleton within the body parts in only four frames in a video (containing $\sim$100 to $\sim$800 frames). However, the contributions of our paper also include enforcement of temporal smoothness constraints, and estimation of complex 3D poses. Here we therefore include videos that show the overlays of the skeletons in all frames of the videos. Viewing these videos shows the temporal smoothness of pose estimates as well as their continuous alignment with the dancer's poses achieved by our method, which cannot be seen from the static depictions in the paper. Further, the pose and alignment quality can now be seen for the entire range of complexities associated with the poses assumed by the dancer throughout the video instead of with the selected few frames in the paper. The videos we use to show our results are selected from the test set in the \textit{UID dataset}. The selected videos can be found at \url{https://drive.google.com/drive/folders/1X5K2U1Eq1QlcU8GmM_gHFVv75VkBzcoV?usp=sharing}. The right side of each video shows videos of skeletons representing 2D projections (2D poses) $\hat{p}_t$ of the estimated 3D poses $\hat{P}_t$ by themselves. These 2D poses are estimated using the estimated 3D-to-2D projection parameter $\omega^{*2D}$. To bring out the poses, they are shown from a closer and different viewpoint than used to capture the original video. On the left side, we show the same 2D poses, using the viewpoint used to capture the original video, and overlaid on the original video frames. We can see that the skeletons align well with the complex movements of the dancers, such as spinning, Pointe (fully extended feet), and Tour Jeté (a high turning leap). Also, we can see that transitions between poses in adjacent frames are smooth, e.g., without large, abnormal displacements between the locations of the same joint in successive frames. Finally, names of the recognized 3D movements $\hat{y}^e_t$ of each body part $e \in E$ are shown at the bottom of the video. The recognized movements $\hat{y}^e_t$ can be seen to well match the dancers' movements in the original video. \section{Algorithms in Detail} Algorithms \hyperref[alg:trackingSupplementary]{1*}, \hyperref[alg:2DposeEstSupplementary]{2*}, \hyperref[alg:3Dto2DSupplementary]{3*} and \hyperref[alg:3DSupplementary]{4*} here are the detailed versions of Algorithms \ref{alg:tracking}, \ref{alg:2Dpose_est}, \ref{alg:3D_to_2D} and \ref{alg:3D}. The movement and dance genre recognition is described in detail in Algorithm \ref{alg:MovementSupplementary} and \ref{alg:DanceClassifySupplementary}. \begin{algorithm}[!ht] \SetAlgoRefName{1*} \SetAlgoLined \textbf{Input}: a sequence of video frames $\{I_t\}^{T-1}_{t=0}$ \\ \textbf{Output}: a sequence of bounding boxes $\{(x_t^i, y_t^i, w_t^i, l_t^i)\}^{T-1}_{t=0}$ of the $i^{th}$ dancer \\ Initialization: select the bounding box $(x_0^i, y_0^i, w_0^i, l_0^i)$ of $N$ dancers to track by mouth \\ \While{new frame $I_t$ available}{ \For {$i^{th}$ dancer}{ Obtain $(x_t^i, y_t^i, w_t^i, l_t^i)$ by LDES approach \\ \If{not overlap with others}{ $\tilde{h}$ $\leftarrow$ $h_t^i$ // Store histogram of $i^{th}$ dancer \\ $\tilde{v}$ $\leftarrow$ $v_t^i$ // Store velocity of $i^{th}$ dancer \\ } \If{overlap happens \& tracking fails}{ Estimate when overlap ends } \If{overlap ends}{ // Relocate the bounding box \\ $\hat{k} = \operatornamewithlimits{argmax}\limits_k (correlation(\tilde{h}, h^k))$ where $h^k$ is the histogram of the $k^{th}$ patch along the moving direction in the cone searching region \\ $(x_t^i, y_t^i, w_t^i, l_t^i)$ $\leftarrow$ location of $\hat{k}^{th}$ patch } } } \caption{Object Tracking} \label{alg:trackingSupplementary} \end{algorithm} \begin{algorithm}[!ht] \SetAlgoLined \SetAlgoRefName{2*} \textbf{Input}: a sequence of video frames $\{I_t\}^{T-1}_{t=0}$ and a sequence of bounding boxes $\{B_t^i\}^{T-1}_{t=0} = \{(x_t^i, y_t^i, w_t^i, l_t^i)\}^{T-1}_{t=0}$ of the $i^{th}$ dancer\\ \textbf{Output}: a sequence of poses $\{\hat{p}_t^i\}^{T-1}_{t=0}$ of the $i^{th}$ dancer \\ \While{new frame $I_t$ available}{ Estimate poses // Perform OpenPose\\ \For {$i^{th}$ dancer}{ Select $C$ poses $\{p_t^{i,c}\}^{C-1}_{c=0}$ overlapped with the bounding box $B_t^i$ \\ $\hat{c} = \operatornamewithlimits{argmax}\limits_c (correlation(h_t^{i,c}, h_{t-1}^i))$ where $h_t^{i,c}$ is the histogram of the pose $p_t^{i,c}$\\ $\hat{p}_t^i$ $\leftarrow$ $p_t^{i,\hat{c}}$ } } \caption{Tracking Based 2D Pose Estimation} \label{alg:2DposeEstSupplementary} \end{algorithm} \begin{algorithm}[!ht] \SetAlgoRefName{3*} \SetAlgoLined \textbf{Input}: a sequence of 2D poses $\{p_t\}^{N-1}_{t=0}$ of a dancer \\ \textbf{Output}: a sequence of 3D poses $\{\tilde{P}_t\}^{N-1}_{t=0}$ of the dancer \\ Set the temporal window size to be $2\Delta$ \\ Denote total number of segments as $s=\floor*{\frac{N}{2\Delta}}$ \\ \For{$t = \Delta$ to $N-\Delta$}{ \For{k = 0 to $K-1$}{ Try new seed for DH parameters $\Lambda^k = \{\bm{\Theta}^k,\bm{d}^k,\bm{a}^k,\bm{\alpha}^k\}$ and perspective projection parameters $\omega^k=\{f^k,c^k\}$ \\ \For{$i = t-\Delta$ to $t+\Delta$}{ Generate 3D pose $\hat{P}^k_i=G(\Lambda^k)$ \\ Estimate 2D pose $\hat{p}_{i}^k=\Psi(\hat{P}_{i}^k; \omega^k)$ \\ Compute error $e^k_i = ||\hat{p}_{i}^k - p_{i}||^2_2$ \\ Optimize $\Lambda^{*k}, \omega^{*k}=\operatornamewithlimits{argmin}\limits_{\Lambda^k, \omega^k} e^k_i$ \\ Assign $\hat{P}_i^{*k} = G(\Lambda^{*k})$ \\ Update $\Lambda^{k} \leftarrow \Lambda^{*k}$ \\ Update $\omega^k \leftarrow \frac{1}{i-t+\Delta} \sum_{l=t-\Delta}^{t} \omega_l^{*k}$ \\} } } Select the seed $k^{*} = \operatornamewithlimits{argmin}\limits_{\tilde{k}}\sum_{i=t-\Delta}^{t+\Delta} e^{\tilde{k}}_i$ \\ Assign $\tilde{P}_t, \omega_t^{2D} \leftarrow \hat{P}_t^{*k^{*}}, \omega^{k^{*}}$ \caption{3D Pose Initialization} \label{alg:3Dto2DSupplementary} \end{algorithm} \begin{algorithm}[!ht] \SetAlgoRefName{4*} \SetAlgoLined \textbf{Input}: a sequence of video frames $\{I_t\}^{T-1}_{t=0}$, 2D poses $\{p_t\}^{T-1}_{t=0}$ and initial 3D poses $\{\tilde{P}_t\}^{T-1}_{t=0}$ of a dancer \\ \textbf{Output}: a sequence of estimated 3D poses $\{\hat{P}_t\}^{T-1}_{t=0}$ of the dancer \\ \While{new frame $I_{t}$ available}{ Estimate 3D pose $ \hat{P}_{t} = \Phi(p_{t}; \omega^{3D}) $ \\ Project to 2D pose $\hat{p}_{t} = \Psi(\hat{P}_{t}; \omega^{2D})$ \\ Compute loss $L = \alpha(|| \hat{p}_{t} - \hat{p}_{t-1} ||^2_2 + \beta || \hat{P}_{t} - \hat{P}_{t-1} ||^2_2) + || \hat{p}_{t} - p_{t} ||^2_2 + || \hat{P}_{t} - \tilde{P}_{t} ||^2_2$ \\ Update $\omega^{2D}$ $\leftarrow$ $\omega^{2D} - \eta \frac{\partial L}{\partial \omega^{2D}} $ \\ Update $\omega^{3D}$ $\leftarrow$ $\omega^{3D} - \eta \frac{\partial L}{\partial \omega^{3D}} $ } \caption{3D Pose Estimation} \label{alg:3DSupplementary} \end{algorithm} \begin{algorithm}[!ht] \SetAlgoLined \textbf{Input}: a sequence of poses $\{\bar{p}_t^e=\{(\bar{x}^j_t,\bar{y}^j_t)\}^{|J_e|}_{j=0}\}^{T-1}_{t=0}$ where $T$ denotes the total number of frames and $J_e$ denotes the set of body joints connected to the body part $e$; a sequence of corresponding movement labels $\{\tilde{y}^e_t\}^{T-1}_{t=0}$ of the body part $e$ \\ \textbf{Output}: predicted movement labels $\{\hat{y}^e_t\}^{T-1}_{t=0}$ \\ \For{$\text{epoch}=0$ \textbf{to} $N-1$}{ $\{\hat{y}_t^e\}^{T-1}_{t=0} = \text{LSTM}(\{\bar{p}_t^e\}^{T-1}_{t=0})$ \\ $L = \text{BCELoss}(\{\hat{y}_t^e\}^{T-1}_{t=0}, \{\tilde{y}^e_t\}^{T-1}_{t=0})$ \\ Update \text{LSTM} until converge } \caption{Movement Identification} \label{alg:MovementSupplementary} \end{algorithm} \begin{algorithm}[!ht] \SetAlgoLined \textbf{Input}: a sequence of movement labels $\{\{\hat{y}^e_t\}^{|E|-1}_{e=0}\}^{T-1}_{t=0}$ of all the body parts $e \in E$; and the ground-truth dance genre label $g$ of the sequence \\ \textbf{Output}: predicted dance genre label $\hat{g}$ \\ \For{$\text{epoch}=0$ \textbf{to} $N-1$}{ $\hat{g} = \text{LSTM}(\{\{\hat{y}^e_t\}^{|E|-1}_{e=0}\}^{T-1}_{t=0})$ \\ $\tilde{L} = \text{CrossEntropyLoss}(\hat{g}, g)$ \\ Update \text{LSTM} until converge } \caption{Dance Classification} \label{alg:DanceClassifySupplementary} \end{algorithm} \section{Implementation Details} Table \ref{tab:DH_parameters} and \ref{tab:bounds} show the the values of the DH parameters, and the bounds of the joint rotation offset angles and bone length of our 34-DOF digital dancer model. \begin{table*}[!ht] \small \centering \begin{tabular}{p{0.4cm}p{1.2cm}lll|p{0.4cm}p{1.3cm}lll|p{0.4cm}p{1.3cm}lll} \toprule \textbf{Joint} & \textbf{$\Theta$} & \textbf{$d$} & \textbf{$a$} & \textbf{$\alpha$} & \textbf{Joint} & \textbf{$\Theta$} & \textbf{$d$} & \textbf{$a$} & \textbf{$\alpha$} & \textbf{Joint} & \textbf{$\Theta$} & \textbf{$d$} & \textbf{$a$} & \textbf{$\alpha$} \\ \midrule 0 & $180+\theta_0$ & 0 & 0 & 90 & 12 & $90+\theta_{11}$ & $b_4 h$ & 0 & 90 & 24 & $0+\theta_{23}$ & 0 & 0 & 90 \\ 1 & $-90+\theta_0$ & 0 & 0 & 90 & 13 & $90+\theta_{12}$ & 0 & $0.6 b_4 h$ & 0 & 25 & $0+\theta_{24}$ & $b_8 h$ & 0 & -90 \\ 2 & $90+\theta_1$ & 0 & $b_0 h$ & -90 & 14 & $0+\theta_{13}$ & 0 & 0 & -90 & 26 & $-90+\theta_{25}$ & 0 & $0.1 b_8 h$ & 0 \\ 3 & $0+\theta_2$ & 0 & 0 & 90 & 15 & $-90+\theta_{14}$ & 0 & 0 & 90 & 27 & $0+\theta_{26}$ & 0 & 0 & -90 \\ 4 & $90+\theta_3$ & 0 & 0 & 90 & 16 & $90+\theta_{15}$ & $-b_3 h$ & 0 & 90 & 28 & $-90+\theta_{27}$ & 0 & 0 & 90 \\ 5 & $90+\theta_4$ & $b_1 h$ & 0 & 90 & 17 & $0+\theta_{16}$ & 0 & 0 & -90 & 29 & $0+\theta_{28}$ & $b_6 h$ & 0 & -90 \\ 6 & $90+\theta_5$ & 0 & 0 & 90 & 18 & $90+\theta_{17}$ & $-b_4 h$ & 0 & 90 & 30 & $90+\theta_{29}$ & 0 & $-b_7 h$ & 0 \\ 7 & $90+\theta_6$ & 0 & $b_1 h$ & 0 & 19 & $-90+\theta_{18}$ & 0 & $-0.6b_4 h$ & 0 & 31 & $0+\theta_{30}$ & 0 & 0 & 90 \\ 8 & $0+\theta_7$ & 0 & 0 & 90 & 20 & $0+\theta_{19}$ & 0 & 0 & -90 & 32 & $0+\theta_{31}$ & $-b_8 h$ & 0 & -90 \\ 9 & $90+\theta_8$ & 0 & 0 & 90 & 21 & $-90+\theta_{20}$ & 0 & 0 & 90 & 33 & $-90+\theta_{32}$ & 0 & $-0.1 b_8 h$ & 0 \\ 10 & $90+\theta_{9}$ & $b_3 h$ & 0 & 90 & 22 & $0+\theta_{21}$ & $-b_6 h$ & 0 & -90 & & & & & \\ 11 & $0+\theta_{10}$ & 0 & 0 & -90 & 23 & $90+\theta_{22}$ & 0 & $b_7 h$ & 0 & & & & & \\ \bottomrule \end{tabular} \caption{The DH parameters $\Lambda = \{\bm{\Theta},\bm{d},\bm{a},\bm{\alpha}\}$ for the 34-DOF human model as shown in Figure \mbox{\ref{fig:human_model}}. The joint rotation angle $\bm{\Theta}$ along $z$ axis, the distance $\bm{d}$ along $z$ axis, and the offset distance $\bm{a}$ along $x$ axis are determined by the joint rotation offsets $\bm{\theta}=(\theta_0, ..., \theta_{32})$ and bone lengths $\bm{b}=(b_0, ..., b_6)$, where their bounds are defined in Table \mbox{\ref{tab:bounds}}. } \label{tab:DH_parameters} \end{table*} \begin{table*}[!ht] \small \centering \setlength\tabcolsep{4pt} \begin{tabular}{llllllllllllllllllllll} \toprule \textbf{Rotation} & $\theta_1$ & $\theta_2$ & $\theta_3$ & $\theta_7$ & $\theta_8$ & $\theta_9$ & $\theta_{10}$ & $\theta_{13}$ & $\theta_{14}$ & $\theta_{15}$ & $\theta_{16}$ & $\theta_{19}$ & $\theta_{20}$ & $\theta_{21}$ & $\theta_{22}$ & $\theta_{23}$ & $\theta_{26}$ & $\theta_{27}$ & $\theta_{28}$ & $\theta_{29}$ & $\theta_{30}$ \\ \midrule $\textit{min}$ & $-\frac{\pi}{8}$ & $-\frac{\pi}{4}$ & $-\frac{\pi}{4}$ & $-\frac{\pi}{1.6}$ & $-\frac{\pi}{4}$ & $-\pi$ & $-\frac{\pi}{2}$ & $-\frac{\pi}{1.6}$ & $-\frac{\pi}{4}$ & $-\pi$ & $-\frac{\pi}{2}$ & $-\frac{\pi}{2}$ & $-\pi$ & $-\frac{\pi}{2}$ & 0 & $-\frac{\pi}{4}$ & $-\frac{\pi}{2}$ & $-\pi$ & $-\frac{\pi}{2}$ & 0 & $-\frac{\pi}{4}$\\ $\textit{max}$ & $\frac{\pi}{8}$ & $\frac{\pi}{4}$ & $\frac{\pi}{4}$ & $\frac{\pi}{1.6}$ & $\frac{\pi}{1.6}$ & 0 & 0 & $\frac{\pi}{1.6}$ & $\frac{\pi}{1.6}$ & 0 & 0 & $\frac{\pi}{4}$ & $\frac{\pi}{1.3}$ & $\frac{\pi}{2}$ & $\frac{\pi}{1.3}$ & $\frac{\pi}{2}$ & $\frac{\pi}{4}$ & $\frac{\pi}{1.3}$ & $\frac{\pi}{2}$ & $\frac{\pi}{1.3}$ & $\frac{\pi}{2}$ \\ \bottomrule \end{tabular} \begin{tabular}{llllllllll} \toprule \textbf{Bone} & neck $b_0$ & head $b_1$ & shoulder $b_2$ & uparm $b_3$ & lowarm $b_4$ & hip $b_5$ & upleg $b_6$ & lowleg $b_7$ & toe $b_8$ \\ \midrule $\textit{Average}$ & 0.25 & 0.08 & 0.06 & 0.17 & 0.17 & 0.04 & 0.21 & 0.21 & 0.04 \\ $\textit{Std}$ & 0.05 & 0.05 & 0.05 & 0.05 & 0.05 & 0.05 & 0.05 & 0.05 & 0.05 \\ \bottomrule \end{tabular} \caption{The bounds of the joint rotation offset angles $\bm{\theta}=(\theta_0, ..., \theta_{32})$ and bone length ratios $\bm{b}=(b_0, ..., b_6)$ defined for our digital dancer model.} \label{tab:bounds} \end{table*}
\section{INTRODUCTION} Autonomous navigation in unknown environments is a widely studied problem in mobile robots nowadays. It involves researches in online localization, mapping, and planning. In this paper, we focus on the mapping problem aiming to support real-time and large-scale autonomous navigation. In a typical autonomous navigation application, mobile robots need to navigate in partially known environments and incrementally perceive the environment through streaming data provided by onboard sensors. To describe the environment, many map representations are proposed. An intuitive way is to discretize the environment with a set of occupancy grids or voxels \cite{elfes1989using}. Others model the obstacle surfaces with surfels \cite{klingensmith2015chisel, whelan2016elasticfusion, wang2019real} or meshes \cite{piazza2018real, rosinol2020kimera}. All these map representations have their own weakness when it comes to navigation applications. A SLAM system is often used to localize in an unknown environment which exhibit drifts. To correct the accumulated drift error, most map representations need to accommodate corrections and reintegrate all observations into a global map and thus suffering from heavy computation, especially in large-scale environments. The surfaces mapping focuses on merging the texture and cannot be used for navigation directly. \begin{figure}[t] \centering \includegraphics[scale=0.59]{figures/teaser.png} \caption{We propose HiTMap, a hierarchical topological map representation for navigation in unknown environments. The orange lines are local edges that connect local traversable vertices, the green lines are global edges that connect submaps, blue dots are frontiers. The red points are obstacle points in the local dense map while the green points represent the traversable areas. The transparent area shows the different submaps. In this scenario, HiTMap describes the environment with only one local metric map and neighboring three topological roadmaps.} \label{fig:Teaser_img} \vspace{-0.35cm} \end{figure} In our preliminary work on occupancy mapping \cite{pan2020gem}, we proposed a real-time globally consistent elevation mapping method called GEM. Attribute to the submap-based 2.5D occupancy representation, GEM achieves better scalability and consistency than the map representations like OctoMap \cite{hornung2013octomap}. Although GEM is basically satisfied in SLAM systems, there are still impediments to utilize it on large-scale autonomous navigation. The most intractable problem is to achieve global consistency. Although submap-based representation doesn't need to reintegrate all observations, the loop correction and reorganizing a global map are still costly in large-scale environments. Rethinking the purpose of such map representations, the aim is to support exactly optimal global path planning. However, the real-world environment is changing all the time, so optimal global paths are unreliable. With such reflections, we develop an insight that the dense metric information is only effective in the local area. To address the problems in pure occupancy representations. Recent works utilize rapid-exploring random tree (RRT) \cite{lavalle2001randomized} or its variants to replace the heavy occupancy mapping and improve the efficiency in the exploration task \cite{bircher2016receding, selin2019efficient, schmid2020efficient}. However, the random sampling mechanism within a single iteration may not guarantee the coverage of the free space. Inspired by \cite{xu2021autonomous} to build a full-coverage topological representation, we acquire the insight that full coverage of free space can be achieved by using lightweight sparse roadmap. Combining the two insights mentioned above, we proposed a hierarchical topological map representation called HiTMap that enables large-scale navigation in unknown environments. Unlike methods using the random tree, we apply a uniform roadmap with the inspiration of Probabilistic RoadMap (PRM) \cite{kavraki1996probabilistic}. The local dense map with traversability information \cite{pan2019gpu} combined with the concept of PRM, HiTMap can achieve comprehensive coverage of traversable areas and generate a reusable sparse topological roadmap. To improve efficiency, an incremental topological mapping mechanism is proposed. Along with the sensor's perception area, a local area consists of several submaps is formed by reusing the stored neighboring roadmap. Also, a coarse topology that is similar to the pose graph in SLAM systems is generated to provide hierarchical large-scale perception. Note that, unlike the pose graph in SLAM systems, a connectivity validation mechanism is proposed to ensure the correctness of the topology relations. As we only store the metric information in vertices of global topology, we just need to add an edge to the existing topology and change the coordinates of corresponding submaps when loop closing is performed. The contributions of this work are: \begin{itemize} \item A hierarchical topological map representation, HiTMap, is proposed for efficient navigation in large-scale environments with state estimates drift. \item A reusable sparse topological roadmap that guarantees the coverage of free space is proposed. Accordingly, a loop connectivity validation based on this roadmap is implemented for correct topological mapping. \item Evaluations on a simulation environment and a demonstration on real-world are conducted. We make our map representation HiTMap available as open source. \end{itemize} \section{RELATED WORK} \subsection{Map Representations} \subsubsection{Metric Representations} Metric representations models environments with dense geometrical entities in a specific reference frame. To achieve metric representation, quantization and discretization are necessary. The predominant metric representations are occupancy grid representations in which each grid models an attribute of this area \cite{elfes1989using}. The attribute of a grid can be defined as discrete occupancy conditions or probability or even signed distance to the surface of the closest obstacle \cite{curless1996volumetric, newcombe2011kinectfusion}. In some applications, the polygon is also used to represent known free space \cite{ge2011simultaneous, gonzalez2002navigation}. However, heavily relied on precise location information, metric representations suffer from state estimation drift which is ubiquitous in the real world. Wrong estimations would lead to the inconsistency of the map and further influence the performance of navigation. A solution to the inconsistency is adopting a loop correction mechanism. Submap-based map representations can deal with the drift when there is loop closure happens \cite{pan2020gem} but the price of introducing such a mechanism is high. The correction of submaps rather time-consuming or computational-consuming. \subsubsection{Topological Representations} Topological representations models environments with a graph. Places are often regarded as vertices and relations between places are represented by edges. Pure topological maps are scarcely seen in navigation as there is not enough metric information. Typical usage of topological representation is the pose graph in SLAM. Each vertex represents a submap coordinate and edges are simply the distance between vertices. Such representations just provide trajectory information and can be hardly used for autonomous navigation. In recent years, works on exploration tasks often adopt topological map representations as it's suitable for quick planning algorithms like Rapid-exploring Random Tree. \subsubsection{Hybrid Representations} Hybrid representations combine advantages of topological and metric representations. Metric maps maintain detailed global location information and have trouble being lightweight. Topological maps, though, are extremely lightweight but lack metric information to navigate. The intuitive combination is to locally build a metric map and navigate in the global topological graph. With this concept, some previous works develop systems for long-term mapping \cite{tang2019topological} and subterranean challenges. However, relying on the place recognition module these methods do not check the connectivity of neighboring submaps, thus lacking traversability information among looped submaps. \subsection{Navigation in Unknown Environments} Navigation in unknown environments have mainly two criteria. First, a robot needs to decide where to move next. The second is to quickly perceive the unknown space. There are mainly two categories of planning approaches for such tasks. A prevalent way is frontier-based planning. The frontiers are free areas adjacent to the unknown areas. A common idea is to use frontiers as guidance to navigate robots into unknown areas. However, purely follow the nearest frontier repeatedly may leads to unnecessary back-and-forth movements \cite{cieslewski2017rapid, selin2019efficient}. To address this kind of method, sampling-based methods are proposed. Next-best-view (NBV) \cite{bircher2016receding} planner decides the next view to move according to a utility function. With this concept, graph-based path planning (GBP) \cite{dang2019graph} utilizes Rapidly-exploring Random Graph to choose the next goal with the highest score. Recent work Efficient autonomous exploration planning (AEP) \cite{selin2019efficient} adopts NBVP for local exploration and frontier for global navigation to improve the performance of exploration. The methods mentioned above can achieve competitive performance in simulation and small scale environments, but they failed to meet the large-scale demands. They rely on accurate state estimations and have trouble dealing with drifts. \section{PROPOSED METHOD} The task of navigation in unknown environments involves works on mapping and planning modules. In this paper, we focus on the map representation that has long been a problem in large-scale real-world navigation applications. Recent map representations used in this task suffer from heavy computation on pose corrections. To address these problems, the main idea of our paper is to propose a map representation that is lightweight and can easily accommodate pose corrections. The HiTMap generation process is shown in Fig. \ref{fig:overview}. We also implement a simple hierarchical planner for our map representation and achieve the navigation in unknown environments. \begin{figure}[t] \centering \includegraphics[scale=0.4]{figures/overview.png} \caption{HiTMap generation overview. The roadmap is incrementally updated whenever a new observation is received. When there is a loop detected, the previous roadmap can be accordingly updated by simply change the center location of submaps.} \label{fig:overview} \vspace{-0.35cm} \end{figure} \subsection{Local Mapping and Planning} The robot-centric local dense map is important for safe navigation as it provides enough information to avoid the collision. In the local map, we can reasonably assume that state estimation drift is low and we can accumulate sensor data into a dense occupancy map. Here we adopt our preliminary works to simultaneously update the local elevation map and calculate traversability. The main idea is to use height variance and gradient of a grid to calculate its roughness and slope, thus estimate its traversability. Mature local planning algorithms can be easily deployed on this local map. With the traversability information, we first inflate obstacles to eliminating the influence of robots configuration and further uniformly sample the traversable areas and generate a local topological map. The local map maintains the newest environment information thus guarantee safe navigation. Because the local map has fixed bounds and sensors are streaming at a uniform rate, the local mapping process has bounded memory and computation consumption. \subsection{Local Area} The submap mechanism is often adopted to the map representations that can accommodate pose corrections. Following the step in \cite{pan2020gem} the information that last seen in the local map is merging into the submap. In the topological map, the last seen vertex is incrementally added into the topological submap. The incremental generation of the topological submap can be found in Fig. \ref{fig:submap}. Based on submaps, we further use local area to provide topology around robots as in \cite{schmid2021unified}. It consists of a few submaps that have connections with the current one. The combination of neighboring submaps extends the robot's vision to the visited places and thus provides an optimal path in the local area. Unlike generating a global metric map as other map representations, local areas only need a bounded lookup and merging consumption. \begin{figure}[t] \centering \includegraphics[scale=0.5]{figures/submap.png} \caption{The local topological map is incrementally merged into a submap. The purple dots are vertices in a submap that won't update while the red dots are up-to-date vertices based on the local metric map. Green lines are the edges between local vertices. Yellow lines are incremental edges.} \label{fig:submap} \vspace{-0.35cm} \end{figure} \subsection{Loop Validation and Correction} Place recognition is important in SLAM systems to correct accumulated drifts. It's often implemented by matching two measurements, if matched, two vertices of the pose graph are connected and further optimization process will correct the pose graph. Many approaches also take inspiration from graph SLAM and build a graph with active loop closing \cite{lee2021real}. However, the motion of aerial robots is more flexible than ground robots so that the loop closing result can not equal topological connectivity. An example is shown in Fig. \ref{fig:loopValidate}. To tackle this case, looped submaps should be validated using their topological relations. If the connectivity is checked, two submaps are connected and merged to form the local area. The pose graph in the SLAM system is corrected after optimization so is our HiTMap. Without the global map, the pose correction of HiTMap is simply changing the coordinate of each submap. \subsection{Frontiers Update} Frontiers are boundaries between the known and unknown parts of a map. They can guide the robot to explore the unknown environment and thus achieve navigation in unknown environments. In the HiTMap, frontiers are detected in every submap and saved as an attribute of vertices in the roadmap. As the robot is always in the traversable area, we implement a simple frontier detection module with the idea of Wave Front Detection (WFD) \cite{keidar2014efficient}. There are many types of frontiers that appeared in different layers in our HiTMap. The first one is the local frontiers detected in the local metric map. These frontiers can be frontiers or vertices connected with the incremental roadmap or even the previous submap. The second type of frontiers is detected in the incremental area of a submap. This kind of frontier is also ambiguous as it may be connected to the previous submap. To tackle this ambiguity, we check the frontiers in the merging step of the local area. \subsection{Global Planner} The information provided by the HiTMap contains two parts. The first is the roadmap graph and frontiers of the local area, and the second is the graph and frontiers of the global topology. The first step of global path planning is to add the robot's current position and the goal position into the HiTMap. There are two situations in practical use. The robot is always surrounded by the roadmap, but the goal might be in the known roadmap or not. Accordingly, global path planning can be divided into two modes, the exploration mode, and the backtracing mode. The exploration mode is mainly used to navigate toward the goal that is not in the known roadmap, and the backtracing mode is used to navigate in the established roadmap. \subsubsection{Backtracing Mode} If the goal is in the local area, the planning is actually backtracing. The backtracing using roadmap is actually the planning in a graph. With the topological local roadmap, this can be easily achieved by A* algorithm \cite{hart1968formal}. \subsubsection{Exploration Mode} If the goal is in the unknown space, the exploration mode is activated. The first step is to calculate a cost function of each frontier and find the best one as a global waypoint in the topology. The criterion of the global waypoint is formed as Eq. \ref{eq:waypoint}. It has minimal cost value which consists of two parts. One is the distance, the nearest point has the minimum score. The second part is the shift score, it ensures the chosen frontier won't change drastically which often happens in an intersection. And then, simply using the A* algorithm, a global topological path is generated. Since the local area contains a merged roadmap of neighboring submaps, the next global waypoint is actually the nearest connected submap vertex. To navigate towards this waypoint, the nearest frontier is picked. So far, the global path has been converted to series of waypoints and finally connected to the local area. The planning in the local area is degrade into the backtracing problem and can be easily solved by any existing planner. \begin{equation} F_{waypoint} = \arg\min U(F_i) \label{eq:waypoint} \end{equation} where the $F_i$ indicates to the $ith$ frontier. The function $U$ is defined below. \begin{equation} U(F_i) = W_d * dist(F_i, goal) + W_l * \pazocal{C}(F_i) \label{eq:utility} \end{equation} where the $W_d$ and $W_l$ are two weight factor. $dist(\dot)$ is the euclidean distance between two points. The function $\pazocal{C}$ is defined below. \begin{equation} \pazocal{C}(F_i) = dist(F_{last} - F_i) \label{eq:changeCost} \end{equation} where the $F_{last}$ indicates the last chosen position. \section{IMPLEMENTATION DETAILS} We use the GEM \cite{pan2020gem} package as the mapping baseline. Based on the original mapping method, we further modified it to provide costmap. The modified version of GEM can be found in this link \footnote{https://github.com/ZJU-Robotics-Lab/GEM}. The pointcloud map generated by GEM is converted into local and global costmaps. The mature DWA planner \cite{fox1997dynamic} and A* global planner \cite{hart1968formal} integrated in ROS is used for planning. \setlength{\tabcolsep}{1mm}{ \begin{table}[t] \caption{Simulation (top) and real-world (bottom) experiment configurations.} \centering \begin{tabular}{llll} \hline local map size & 5m & submap interval & 5m \\ & 15m & & 10m \\ local map resolution & 0.1m & roadmap sample interval & 0.3m\\ & 0.2m & & 0.8m \\ sensor range & 5m & sensor type & depth camera\\ & 15m & & lidar \\ environment scale & 15m x 20m & & \\ & 60m x 70m & & \\ \hline \end{tabular} \label{tb:simConfiguration} \end{table} } \begin{figure} \centering \includegraphics[scale=0.5]{figures/loop_validate.png} \caption{A demonstration of the loop validation. The detected loop can not guarantee topological connectivity.} \label{fig:loopValidate} \vspace{-0.35cm} \end{figure} \begin{figure} \centering \includegraphics[scale=0.47]{figures/twomode.png} \caption{A demonstration of two modes in the simulation environment. The exploration mode aims to find the best frontier to the goal and the backtracing mode is to find the best path (red line) in the given roadmap.} \label{fig:twoMode} \vspace{-0.35cm} \end{figure} \begin{figure}[t] \centering \includegraphics[scale=0.47]{figures/simulation.png} \caption{Experiment results on the simulation environment. The orange lines on the left are the roadmap connection of the local area. The green line represents the global topology. The red circle is the start point and the yellow star is the goal. On the right, the global costmap is shown.} \label{fig:simulation} \vspace{-0.35cm} \end{figure} \begin{figure}[t] \centering \includegraphics[scale=0.42]{figures/simAll.png} \caption{The memory usage and time consumption trend in the simulation experiment.} \label{fig:simResult} \vspace{-0.35cm} \end{figure} \section{EXPERIMENTS} The experiments are all conducted with ROS running on a personal computer with AMD Ryzen 3700X and NVIDIA RTX 2060 Super. All experiments are to evaluate the feasibility of the HiTMap for navigation in unknown environments and its efficiency. We choose the most recent and competitive metric map representation, GEM \cite{pan2020gem}, as our benchmark. The configuration of experiments are shown in TAB.\ref{tb:simConfiguration}. The distance-related weight in cost function $W_d$ is set to 0.8 and $W_l$ is set to 0.2. \begin{figure*}[t] \centering \includegraphics[scale=0.95]{figures/realworld.png} \caption{A demonstration of the HiTMap in a real-world SLAM system. The left image shows the ground robot we used in a real-world experiment. The middle image is the snapshot when a loop is detected. The right image shows the local and global costmap generated by the modified GEM.} \label{fig:realWorld} \vspace{-0.45cm} \end{figure*} \begin{figure} \centering \includegraphics[scale=0.47]{figures/prProblem.png} \caption{A demonstration of the connectivity problem in place recognition.} \label{fig:prProblem} \vspace{-0.45cm} \end{figure} \subsection{Simulation} The mobile robot used in the simulation is TurtleBot3 Waffle Pi equipped with an RGB-D camera. We use the TrajectoryPlannerROS as our local planner and the proposed strategy as our global planner. We first evaluate the HiTMap in a simulation environment as introduced in \cite{tordesillas2019faster}. The room-like scene with a bug trap is hard for navigation but common in indoor applications. Ground robots cannot reach the goal by simply using a local metric map. As shown in Fig. \ref{fig:simulation}, our HiTMap can successfully lead the robot to the goal in such a hard scenario. Two modes of planning are demonstrated in Fig. \ref{fig:twoMode}. As a map representation, we are more interested in whether it can be used in various scenes, especially large-scale environments. The scalability of the map can be evaluated by the memory usage and calculation time. The performance of the HiTMap and the modified GEM are shown in Fig. \ref{fig:simResult}, the Frame Num means the sensor data sequence, as the sensor collects data in a constant frequency, this number is equal to the time sequence. The curve of GEM is longer in time sequence means the navigation efficiency of GEM is lower than the HiTMap. Also, as we can see from the memory consumption trend in the simulation experiment, although HiTMap occupied more memory for the topological roadmap at the beginning of the evaluation, the long-term memory consumption is bounded. However, the memory usage of the modified GEM grows fastly when the unknown environment is explored. Also, the worst case of modified GEM is shown in the right image of Fig. \ref{fig:simulation}. The back-and-forth movement happens due to the failure of the local planner and the drastic change of global planning. Attribute to the cost function Eq. \ref{eq:utility}, HiTMap successfully avoids the extra movement in the planning process. The time usage trend of comparing methods is shown in Fig. \ref{fig:simResult}. In the small-scale simulation environment without a loop, the advantages of direct correction of the HiTMap are not shown. As we generate roadmap and local metric map in the meanwhile, the time cost by the HiTMap is longer, but it's acceptable. In the simulation environment, we further design a scenario that can cause the false topology as we mentioned in Section III.C. A low wall is built in the front of the ground robot. The camera can scan a part of the ground behind the wall and thus has the potential of loop closing. When the robot travels around the wall and generates submaps, a loop is detected on different sides of this wall. In the existing topological connection strategy used in aerial robots, an edge is added between loop submaps as shown in Fig. \ref{fig:prProblem}. This edge is useful in pose optimization but harmful in the navigation of ground robots. So with the connectivity check in the HiTMap, this edge is checked and discarded. \begin{figure} \vspace{-1.0cm} \centering \includegraphics[scale=0.84]{figures/realAll.png} \caption{The memory usage and time consumption trend in the real-world experiment.} \label{fig:realResult} \vspace{-0.35cm} \end{figure} \subsection{Real-world Demonstration} We further test the efficiency of the HiTMap in a real-world SLAM system. The ground robot we used in the real-world experiment is shown on the left of Fig. \ref{fig:realWorld}. It is equipped with several sensors, but we only use lidar to localize, the localization is mainly based on ICP and exhibits drifts during our test. We manually control the robot to move in a loop and validate the correction of topology. The real-world performance on memory usage and time consumption is shown in Fig. \ref{fig:realResult}. In such a complex and large-scale environment, the different performance on memory usage and time consumption of comparing methods are more significant. As we've analyzed in the simulation experiment, the generation of the roadmap on the local metric map will cost extra time, but the HiTMap doesn't need to costly maintain a global map and thus has bounded time consumption. In this experiment, two loops are detected and triggers the corrections in GEM and leads to an impulse in the time trend curve. The time consumed by this process will increase linearly when exploring and cause delay in path planning. \section{CONCLUSIONS} In this paper, we propose the novel hierarchical topological map representation (HiTMap) for navigation in unknown environments. The HiTMap takes advantage of sparse topological representation and the full coverage character of the roadmap. With a navigation strategy implemented, the HiTMap can successfully navigate in unknown environments. With the hierarchical structure, the HiTMap takes bounded time and memory usage in large-scale applications. \bibliographystyle{IEEEtran}
\section{Introduction}\label{intro} Solar filaments (or prominences) are one of the basic building blocks of the solar atmosphere, their eruption into the solar-terrestrial space can cause disastrous space weather \citep{2011LRSP....8....1C,2013ScChD..56.1091W}. High spatiotemporal observations showed that the main body of a filament is composed of many thin threads carrying many dynamical mass flows, transverse waves, and Kelvin-Helmholtz instabilities \citep[e.g.,][]{2015ApJ...814L..17S,2018ApJ...863..192L,2021A&A...647A.112Z,2007Sci...318.1577O}. The supporting magnetic structure of a filament could be dips in sheared arcades \citep{kip57,lite05,Mackay2010,Aulanier1998a} or twisted magnetic flux ropes (MFRs) \citep{rust96,zhangj12,Zhou2017}, while its mass can be originated from direct injection of chromospheric cold material \citep[e.g.,][]{1999ApJ...520L..71W,2003ApJ...584.1084C,shen19a}, the condensation of hot coronal plasma due to thermal instability \citep{hil74,spark90,xia2011, xia2012, xia2014}, or a combination of the two \citep{2021arXiv210413546H}. In filament physics, there are many questions yet to be resolved. Besides the formation and stability, the eruption mechanism is still not understood completely. Generally, filament eruptions can be divided into three types, i.e., failed, partial and full eruptions \citep[][]{2001ApJ...549.1221G,ji03,2011RAA....11..594S,shen12b}. However, what determines the final result of a filament eruption is also unclear. In previous studies, many theoretical models have been proposed to interpret successful filament eruptions, and most of them take magnetic reconnection as the basic trigger and driving mechanism \citep[e.g.,][]{chen00,lin&forbes2000,moo01,ant99}. In recent years, ideal magnetohydrodynamic (MHD) instabilities such as kink instability and torus instability are also thought to be important for the onset of filament eruptions \citep{ji03,kumar11,joshi13,joshi14,xuh20}. Observations indicate that solar eruptions are very complicated, which represent the large-scale rearrangement of mass and magnetic field and energy conversion, and are accompanied by spectacular phenomena such as flares \citep{2011LRSP....8....6S}, CMEs \citep[e.g.,][]{2011LRSP....8....1C,Lynch08,Lynch13,2019ApJ...887..118C}, filament eruptions \citep[e.g.,][]{bi14,Panesar17,2020ApJ...902....8C}, jets \citep[e.g.,][]{shi07,shen12b,shen17,shen19a,str17,shen21}, and magnetohydrodynamic waves \citep{shen18,miao19}. High-resolution observations in recent years showed that the eruption of many small-scale solar eruptions, such as mini-filament eruptions and solar jets, resemble their large-scale counterparts, indicating the possible scale invariance of solar eruptions \citep[e.g.,][]{shen12b,wang12,Lim2016,Panesar18,Li2018,yang18,shen19a,duan2019}. Normally, a solar eruption occurs independently. However, for some successive events occurring within a short time interval in the same complicated active region or at different active regions, they may physically connect to each other, i.e., the sympathetic eruptions in which the occurrence of one event makes another one at different places \citep{1998ApJ...509..448W}. The physical linkages in sympathetic eruptions can be the disruption of large-scale convective motions \citep{bum1993}, the interaction between different magnetic flux systems \citep{peng07,jiang08,tang21}, the large-scale waves \citep{shen14,2014ApJ...795..130S}, and reduction of confining magnetic fields caused by the earlier eruptions \citep[e.g.,][]{shen12a,hou20,yang12,jiang11}. In addition, \cite{sch11} proposed that long-range flares and eruptions could be connected by a system of separatrices, separators, and quasi-separatrix layers \citep{2012ApJ...759...70T}. Usually, the removal of the open magnetic fields or the external disturbances were thought as a key signature indicative for the occurrence of sympathetic eruptions. \citet{jiang11} observed a filament eruption which subsequently caused the removal of overlying loops of two adjacent filaments and resulted in their eruption, during which the dimming regions could be a good agent for linking consecutive solar eruptions. \citet{hou20} investigated the consecutive eruption of two nearby filaments, in which the authors found that the first filament eruption pushed its overlying loops to reconnect with the overlying loop of the other filament. Therefore, the filament became unstable and then erupted due to the reduction of the overlying magnetic fields by the external magnetic reconnection \citep{2020ApJ...892...79S}. \citet{shen12a} reported two consecutive filament eruptions in a breakout magnetic configuration, including a partial filament eruption and a full successful filament eruption. They firstly proposed that the so-called magnetic implosion mechanism \citep{hu00} can be the physical linkage for the observed sympathetic filament eruptions, in which the external null point reconnection played a vital role in the initiation of the event. Sympathetic filament eruptions have been studied in several numerical simulation studies. \citet{Lynch13} performed a 2.5D MHD simulation which revealed two breakout CMEs in a sympathetic filament eruption from a pseudostreamer configuration, its eruption paired with the current sheets developed by the external and the internal reconnections. \citet{tor11} numerically studied the eruption mechanism of the consecutive eruptions of three nearby filaments, in which two filaments were confined by a pseudostreamer, while the other one was next to it. The eruption of the outside filament resulted in the consecutive eruption of the two filaments inside the pseudostreamer. The simulation suggested that the key of the sympathetic filament eruption was the consecutive consumption of the filaments' overlying magnetic fluxes by the external reconnections. All these observational and numerical studies suggest that the large-scale structural properties of the coronal magnetic field are important for the occurrence of solar sympathetic eruptions, and the physical linkages for different types of eruptions can be diversified. Particularly, we will focus on the magnetic topology change as the mechanism for sympathetic filament eruptions in regions with multiple magnetic polarities. As firstly proposed by \cite{hu00}, a magnetic implosion occurs following the basic law that transient events such as flares and CMEs should release free magnetic energy into the low plasma $\beta$ corona, and the reduction of magnetic energy inevitably result in the decreasing of the magnetic pressure around the energy releasing regions. The magnetic implosion can be indirectly estimated by the contraction of coronal loops, and those have been observed in several events \citep[e.g.,][]{lw2010,gos12,liuliu12}. \citet{wang16} reported a well observed contraction of the imploding loops, and the implosion was actually took place during the eruptive phase of the associated filament. In order to refrain from the projection effect, \citet{pit16} and \citet{wangjun18} analyzed the contraction of coronal loops from two different observing angles, their study confirmed that the contraction of corona loops is indeed associated with flares. \citet{sim13} estimated the energy redistribution and implosive motions in a solar flare, and they found that the contraction happened during the flare's impulsive phase, and the contraction rate was closely associated with the intensity of the hard X-ray and microwave emissions. Observations showed that the occurrence of magnetic implosion is commonly accompanied by the oscillation of coronal loops (or part loops) besides loop contraction \citep[e.g.,][]{lw2010,gos12,Sun12,sim13,rus15}. However, \citet{rus15} proposed that contractions and oscillations of coronal loops can occur in a single response to the occurrence of magnetic implosion, and they argued that coronal magnetic implosion is a newly identified excitation mechanism for transverse loops oscillation. The relation between the converging motions of conjugate loop's footpoints and the descending motion of loop top sources at the beginning of solar flares were also explained as the results of magnetic implosions \cite[e.g.,][]{2003ApJ...596L.251S,2004ApJ...607L..55J,2006A&A...446..675V}. Recently, coronal magnetic implosion was also used to explain the abrupt reserved in the rotation and some penumbral dynamics of sunspots \citep{2016NatCo...713798B,2019ApJ...874..134X}, and the physical linkage of sympathetic filament eruptions within the framework of magnetic breakout configuration \citep{shen12b}. Solar eruptions are more liable to occur in complicated active regions with sufficient magnetic free energy \citep{munro1979,zhang01}. A tripolar magnetic region often manifests as a central parasitic magnetic field encompassing by the opposite polarity, and the corresponding overlying coronal magnetic field shows as a fan-spine magnetic configuration consisting of a dome-shaped fan structure, a null point, and inner and outer spines \citep{lau90,Masson09,shen19b}. The far end of the outer spine connects to a remote magnetic field region with the same polarity as the inner parasitic magnetic field. Therefore, to a certain degree, a complete fan-spine magnetic structure is in fact a magnetic breakout topology in nature \citep{ant99,shen12b,2017Natur.544..452W,shen21}. Solar eruptions in fan-spine magnetic structures have been studied by many researchers \citep{lau90,tor09,tor10,Masson09,par09,wyp18}, and they are found to be in favor of the occurrence of solar jets \citep{shen19b,shen21}. Previous studies suggested that the dome-shaped fan structure can be characterized by the high degree of squashing factor Q, and it is actually a separatrix layer in favor of the occurrence of magnetic reconnection. When magnetic reconnection happens in the fan-separatrix, it changes the connectivities of the neighboring magnetic field lines, and leads to a flare. Generally, flares associated with the eruptions in fan-spine structures often consist of three flare ribbons: an inner bright point surrounded by a circular ribbon, and a remote brightening \citep{wang12,shen19b,Lih17}. The formation of flare ribbons corresponds to the movement of the footprints of separatrices or quasi-separatrices (QSLs); therefore, the flare ribbons show the magnetic reconnection process of flares \citep{priest1996}. In many cases, the eruption of fan-spine structures involves the eruption of mini-filaments in the fan structures, and the unstable of the fan-spine structures were believed to result from the reconnection around the null point, with a great deal of confined arcades consumed \citep{sun13,shen19b,yang20}. According to standard filament eruption models \citep[e.g.,][]{lin&forbes2000}, magnetic reconnection will take place below the rising filament, and cause two parallel conjugated flare ribbons. Within the framework of fan-spine magnetic systems, the rising filament also pushes its confining field lines to reconnect with the reconnection favorable field lines around the null point. Therefore, a paired magnetic reconnections can be expected in such eruptions. Normally, the reconnection below the rising filament is called internal reconnection, while that around the null point is called external reconnection. The external reconnection can occur before or after the internal one, and in different cases, one can observe different eruption characteristics \citep{joshi15,zhang15,shen19b}. Eruptions in fan-spine systems in or around active regions are evidenced to be hard to produce successful CMEs in the interplanetary space \citep[e.g.,][]{Lih19,shen19b,Yangs2020}. So far only a few observations showed the production of CMEs from fan-spine magnetic systems, and those events were all associated with energetic large flares \citep[e.g.,][]{Lih19,2020ApJ...899...34L}. The large-scale pseudostreamers can be viewed as the larger counterpart of fan-spine systems, nothing but with their outer spine extending to the interplanetary space. It seems that eruptions in pseudostreamers are more likely to produce CMEs \citep[e.g.,][]{2007ApJ...654L.171L,tor11}. Occasionally, small secondary fan-spine systems are identified in the fan structure of large fan-spine systems \citep{hou19b}, and such nested fan-spine systems were possibly apt to produce successful CMEs due to multiple null point reconnection and therefore more energy released in the magnetic system \citep{Lih19}. In this paper, we studied two successive filament eruptions in a tripolar magnetic field region whose coronal magnetic field showed as a fan-spine magnetic system. The main aim of the present study is to figure out the eruption mechanism of the filament eruptions and the associated activities, as well as to verify whether there is the physical connection between the two successive filament eruptions. Observations and methods are introduced briefly in Section ~\ref{sec:data}; the main analysis results are presented in Section ~\ref{sec:result}; interpretation of the event is described in Section ~\ref{sec:discuss}; the conclusion and discussions are given in Section ~\ref{sec:summary}. \section{Observations and Methods}\label{sec:data} To explore the physic mechanism of the present event, we use high-resolution observatories taken by the Kanzelh\"{o}he Solar Observatory ({\em KSO}) and the {\em Solar Dynamics Observatory} \citep[{\em SDO};][]{pesnell12}. These observations allow us to explore the eruption details and three-dimensional (3D) coronal magnetic field environment with the aid of the Nonlinear Force-Free Field (NLFFF) model. The Atmospheric Imaging Assembly \citep[AIA;][]{lemen12} onboard the {\em SDO} observes the full-disk Sun in 10 channels with a {1.2\arcsec} spatial resolution, which included 7 extreme ultraviolet (EUV), 2 ultraviolet (UV) and 1 visible-light wavelengths. We mainly use AIA EUV images at 304 \AA\, 171 \AA\, 193 \AA\ and 94 \AA\ wavelengths with a 12 s temporal cadence, and the UV images at 1600 \AA\ with a 24 s temporal cadence. The full-disk line-of-sight (LOS) photospheric magnetograms and vector magnetic fields provided by the Helioseismic and Magnetic Imager \citep[HMI;][]{Schou2012} onboard the {\em SDO}, and their temporal resolutions are of 45 s and 720 s, respectively. KSO provides the full-disk solar images at 6562.8 \AA\ (H$\alpha$ line center) with a {2\arcsec} spatial resolution and a temporal cadence of 1 minute. The {\em Reuven Ramaty High Energy Solar Spectroscopic imager} \citep[RHESSI;][]{lin02} provides X-ray fluxes with a temporal resolution of 4 seconds. Moreover, we also use the soft X-ray (SXR) fluxes taken by the {\em Geostationary Operational Environmental Satellite} ({\em GOES}) to study the flaring process. \begin{figure*}[thbp] \epsscale{0.85} \plotone{fig1.pdf} \caption{AIA images and HMI LOS magnetogram show the signatures during the sympathetic eruptions. Panels (a)-(c): the overview of the active region, the white boxes in panel (a) and (c) are used to collect AIA light curves and magnetic fluxes in Figure~\ref{fig6}. Panels (d)-(f): the location of some features in panels (a)-(c), The blue and green curves show the approximate locations of the two filaments, and the yellow, blue and purple boxes indicate the three ribbons( R1, R2 and R3) after the eruptions, respectively. Panel (g)-(i) are composite AIA images. Panel (g): the body of filaments are labeled by MF1 and MF2, and the LOS magnetogram at 08:23:45 UT are overlaid at $\pm100$ G on composite AIA image, where the red (blue) color indicates positive (negative) polarity. Panel (h): the features of bi-directional flows, the post flare loops (PFL), the bright loop upon the filaments. Panel (i): the arrow with F1 denotes the new-formed filament after reconnection, and the blue dotted line outlines the loops upon the filaments. An animation of the sympathetic eruption is available. The animation has a 12 second cadence, including five EUV bands (94\AA\ 131\AA\ 30\AA\ 171\AA\ 193\AA\ ) and a UV band (1600\AA\ ) from 08:15 UT to 09:05 UT. An animation of this event is available. \label{fig1}} \end{figure*} To understand the 3D coronal magnetic environment around the eruption source region, we extrapolated the 3D coronal magnetic field using the photospheric vector magnetic fields as the lower boundary input, with the NLFFF software adopting the “weighted optimization” calculation method \citep{wht00,wig04}. The HMI vector magnetograms have a time cadence of 12 minutes, and those taken at 08:00 UT, 08:24 UT and 08:48 UT are used to extrapolate the 3D coronal magnetic fields. The eruption source region of the present event was close to the disk center; therefore, the projection effect should be weak in our extrapolation result. We select a large (grid point: {$396 \times$ 396 $\times$ 396) region to check the magnetic field connectivity of the whole eruption source region. To investigate the kinematics of various structures such as the filaments, loops and plasma ejections, we constructed a series of time-distance diagrams by using the time sequenced AIA images. To obtain a time-distance diagram, one needs to get the intensity profiles at different times along a specific path, then stacks up these one-dimensional intensity profiles in time to generate a two-dimensional time-distance diagram. \section{Result}\label{sec:result} On 2013 October 20, a {\em GOES} soft X-ray C2.9 flare took place in NOAA active region AR11868, which was accompanied by two successive filament eruptions and a CME. The flare started and peaked respectively at about 08:30 UT and 08:40 UT based on the {\em GOES} 1--8 \AA\ soft X-ray flux. The top and middle rows of \nfig{fig1} show the pre-eruption source region and the locations of the flare ribbons, while the bottom row shows the formation process of a small filament. The HMI LOS magnetograms show that the eruption source region was a tripolar magnetic region composed of a positive polarity (P) in-between two negative magnetic polarities (N1 and N2). Such a magnetic field environment forms two polarity inversion lines (PIL) where filaments are apt to form (see \nfig{fig1} (a) and (d)). By checking the KSO H$\alpha$ center images, we do find two filaments resided along the two PILs (see \nfig{fig1} (b) and (e) and the blue and green contours in \nfig{fig1} (d) and (e)). Here, for the sake of description, hereafter, we name the filament resided in-between P and N1 (N2) as F1 (F2). In EUV images, an obvious fan-spine magnetic configuration can be identified as outlined by the purple curves in \nfig{fig1} (a) and (c). An AIA 1600 \AA\ image during the eruption is displayed in \nfig{fig1} (f), which exhibits the locations of three flare ribbons that often can be expected in the eruption of fan-spine magnetic systems. The ribbons were located at the sites of the three magnetic polarities P, N1 and N2, and they are outlined by the three boxes. We did not observed the expected remote brightening in association with the outer spine, which was possibly that the remote footpoint of the outer spine was located in the back side of the solar disk, or the brightening was too weak to be detected. In AIA observations, it is evidenced that F1 was formed by two crossed mini-filaments (MF) through magnetic reconnection between the two MFs around their crossing site. The detailed evolution process is shown by the composite tri-color images in the bottom row of \nfig{fig1}, by using the AIA 94 \AA\,171 \AA\ and 193 \AA\ images. The main axes of MF1 and MF2 are highlighted by a black and a green curves in \nfig{fig1} (g), respectively. The reconnection between MF1 and MF2 can be evidenced by several features: the sudden appearance of a small bright loop between G1 and G2 (see the red curve in \nfig{fig1} (h)), the bi-directional plasma flows from the crossing site of the two MFs (see the two black arrows in \nfig{fig1} (h)), and the formation of F1 as indicated by the black arrow in \nfig{fig1} (i). Such kind of magnetic reconnection between two filaments were observed in several previous events, which was thought to be important for the generation of two-sided-loop solar jets and the formation of filaments \citep[e.g.,][]{tian2017,2016ApJ...816...41Y,2017ApJ...840L..23X,zhengr17,yangbo19,2016ApJ...818L..27C,chenh18}. Another interesting feature during the eruption is the appearance and kinking eruption of a bright loop as indicated by the dotted blue curve (labeled with ``loop'') in \nfig{fig1} (h) and (i). The detailed eruption of this loop will be described later. \begin{figure*}[thbp] \epsscale{0.85} \plotone{fig2.pdf} \caption{The time sequence of the first eruption in AIA 171 \AA, 193 \AA~and 94 \AA~images, different wavebands show the dynamic evolution of the overlying loops and filament. Panels (a)-(c): AIA 94 \AA~images, panels (d)-(f): AIA 171 \AA~images, panels (g)-(i): AIA 193 \AA~images. The first column points out initial brightening of the F1, a well defined fan spine and the overlying loops upon F1 at 08:30 UT. The second column denotes the center of the eruption, the parallelogram labeled with 'Slice 3' in panel (h) is used to investigating the contraction of the overlying arcades displayed in \nfig{fig6}. The third column shows the final stage of F1 eruption, including the post flare loops PFL1 (PFL2) caused by the internal (external) reconnection, the three ribbons (R1, R2 and R3). \label{fig2}} \end{figure*} The eruption of F1 and the associated eruption features are displayed in \nfig{fig2} to \ref{fig4}, as well as the animation available in the online journal. F1 started to rise at about 08:30 UT; it firstly brightened and then quickly erupted. The filament material seemingly drained back to the solar surface along its two legs, and therefore the filament body, especially the apex part, became weaker during its eruption. This filament eruption did not cause any CME signal in the outer corona, which might be collapsed or the eruption was too weak to escape the Sun. In the low corona, two groups of PFLs (PFL1 and PFL2) and three flare ribbons (R1, R2, and R3) were observed to be associated with the filament eruption. The PFLs can be best seen in the AIA 94 \AA\ images, in which PFL1 connects P and N1, while PFL2 connects P and N2 (see the top row of \nfig{fig2}). The three bright flare ribbon situated at the footpoints of the two groups of PFLs, i.e., along the magnetic polarities of P, N1 and N2. In the AIA 171 \AA\ images (see the middle row of \nfig{fig2}), the three flare ribbons can be clearly observed. The appearance of R1 and R2 were simultaneously at about 08:33 UT, while R3 appeared about two minutes later at about 08:35 UT. In addition, the coronal loops consisting the fan structure of the fan-spine system experienced an obvious expansion but only coronal loops met contraction movements during the eruption of F1. Similar process can also be identified in the AIA 193 \AA\ images (see the bottom row of \nfig{fig2}). \begin{figure*}[thbp] \epsscale{0.85} \plotone{fig3.pdf} \caption{Panels (a)-(f): the negative AIA 171 \AA~images, while the black shows the area of strong bright emission, the dashed white lines outline the bright loop. Panel (c): the white box shows a jet-like structure, the blue and red straight lines denote the MFR of F1 and the loop. Panel (d): the bi-directional flows when the F1 crushed to the loop. Panel (e): the circular dashed line indicates the bright point during the eruption, the arrow labels its moving direction. Panel (f) : the writhed loop before eruption. An animation of the loop eruption is available. The animation has a 12 second cadence, including one EUV bands (171 \AA\ ) from 08:24 UT to 08:37 UT. An animation of this event is available. \label{fig3}} \end{figure*} \nfig{fig3} combines negative AIA 171 \AA\ images to display the eruption details of the loop labeled at \nfig{fig1}. In a negative image, the white and black features represent the dark and bright structures in the original image. At 08:24 UT, the loop showed as a normal potential shape. This figure shows some features appeared around the crossing site (see the inset and arrows in Figure 3 (c) and (e) : a jet-like structure, bidirectional flows, a bright point. A sudden change of the topology of the loop structure can also be identified there (see the animation available in the online journal). It is reasonable for the occurrence of magnetic reconnection between F1 and the loop. This loop finally violently erupted at about 08:36 UT, and it was followed by the violent eruption of F1. Due to the projection effect, here, we can not confirm whether magnetic reconnection occurred or not at the crossing point of the kink structure as what has been evidenced in a few observations \citep[e.g.,][]{2006ApJ...653..719A,shen12b,lil16}. \begin{figure*}[thbp] \epsscale{0.85} \plotone{fig4.pdf} \caption{Panels (a)–(d): Four snapshots of the AIA 304 \AA~images. In the panels (a)-(c), the yellow arrows show the two slipping bright ribbons at the west side of the east section of R3, the solid blue lines and the green contours symbolize the contours of the HXR emission at 12–25 keV and the intensity of 1600 \AA, respectively. The red (blue) contours in panel (d) are overlaid by the HMI magnetic field at $\pm$ 25 G. Panel (e): the time–distance diagrams obtained by the yellow dashed curve in panel (d). \label{fig4}} \end{figure*} From 08:37 UT to 08:45 UT, we observed an interesting small bright circular ribbon at the west side of the east section of R3. The detailed evolution and kinematics are displayed in \nfig{fig4}, we use four snapshots of AIA 304 \AA\ images to illustrate. The blue and green contours overlaid in \nfig{fig4} (a) and (c) are obtained from {RHESSI} hard X-ray emission sources at 12--25 keV energy band and AIA 1600 \AA\, respectively. The small circular ribbon started from a sudden brightening at about 08:37 UT as indicated by the yellow arrow in \nfig{fig4} (a), then a bi-directional slipping of the brightening in northwest and southeast directions were observed along a circular path as shown by the two yellow arrows in \nfig{fig4} (b), they met at the west side of the circular path at about 08:45 UT (see \nfig{fig4} (c) and (d)). The time-distance diagram made from the AIA 304 \AA\ images along the circular ribbon is shown in \nfig{fig4} (e), in which the slipping bright feature can be clearly identified. It is measured that the slipping speeds of the brightening in southwest and northeast directions were about \speed{64} and \speed{75}, respectively. An additional hard X-ray source was detected at 08:42 UT, which located between the main source and the small circular ribbon (see the black arrow in \nfig{fig4} (c)). In \nfig{fig4} (d), the LOS HMI magnetogram was overlaid as contours on the AIA 304 \AA\ image. As indicated by the black arrow in \nfig{fig4} (d), there was a small positive polarity close to the north boundary of the circular ribbon. Here, we consider that the small circular ribbon and the small hard X-ray source were possibly associated with the null point reconnection of a small fan-spine system. The triggering of the small fan-spine system's eruption was probably caused by the disturbance resulted from the eruption of F1, and the slipping motion of the circular ribbon suggests the slipping magnetic reconnection in the fan quasi-separatrix layer \citep[e.g.,][]{shen19b}. \begin{figure*}[thbp] \epsscale{0.85} \plotone{fig5.pdf} \caption{The time sequence of the second filament eruption of AIA 171 \AA~, 193 \AA~and 94 \AA~images in log scale, panels (a)-(d): AIA 94 \AA~images, panels (e)-(h): AIA 171 \AA~images, panels (i)-(l): AIA 193 \AA~images. The arrows in the first column show the PFL1 and initial brightening at the center of the F2. The second column displays the eruptive phase of F2, the arrows mark the features of the PFL1, PFL2, R3 and the contraction of spine. The blue dashed lines in the third column point to the new hot arcades during the eruption. The solid black line with 'Slice 4' in panel (j) is used to investigating the projection velocity of the CME. The fourth column shows the final stage of the eruption, the arrows point out the MF1, PFLs (PFL1 and PFl2) and the null point of the fan-spine. \label{fig5}} \end{figure*} Right after the total formation of the small circular ribbon, F2 started to rise at about 08:45 UT and then erupted violently at about 08:48 UT. The eruption process is displayed in \nfig{fig5} with the AIA 94 \AA\, 171 \AA\ and 193 \AA\ time sequence images. The eruption of F2 underwent a slow rising phase during 08:45 UT to 08:48 UT, then it erupted quickly to the northwest direction and caused a CME in the outer corona (the CME is not displayed). At about 08:48 UT, PFL1 associated with the eruption of F1 was still very bright, but PFL2 had disappeared. At the beginning of F2's violent eruption phase, brightening firstly appeared below the filament, then a large bright loop system connecting opposite magnetic polarities of P and N2 appeared (PFL2). It is clear that this hot loop system was the PFL caused by the eruption of F2, due to the magnetic reconnection between the two legs of F2's confining magnetic field lines below the filament. It is interesting that new hot loops were continuously formed at the site of PFL1, connecting magnetic polarities of P and N1. By considering the fan-spine magnetic configuration of the eruption source region, these newly formed hot loops should be the consequence of magnetic reconnection around the null point of the main fan-spine system, between the confining fields of F2 and the magnetic reconnection favorable open field lines around the null point. During the eruption of F2, the fan structure also showed a first expansion and then a contraction motion. Although this filament eruption caused a CME in the outer corona, the fan-spine system was not completely destroyed. On the contrary, it recovered its initial configuration before the eruptions (see \nfig{fig5} (i) and (p)). \begin{figure*}[thbp] \epsscale{0.85} \plotone{fig6.pdf} \caption{The left four panels (a)-(d): time–distance diagrams obtained by slice1 and slice2 in Figure~\ref{fig1}, slice3 in Figure~\ref{fig2} and slice4 in Figure~\ref{fig5}. Panel (a): projection velocity of the eruptive loop. Panel (b): made from AIA 171 \AA~, the solid blue and green lines point to the velocity of the bi-directional flows. Panel (c): the red and green curves indicate the trajectory of the overlying arcades of the F1, the black arrow labels the first eruption time. Panel (d): made from AIA 171 \AA~, the purple lines stand for the rising velocity of the F2 caused by the second flare. The right four panels (e)-(g): SXR, HXR, AIA light curves of the two sympathetic filaments eruptions and temporal evolutions of magnetic flux with the box in panel (a) of Figure~\ref{fig1}, panel (h) shows the light curves of ribbons (R1, R2 and R3) associated with the filaments eruption. \label{fig6}} \end{figure*} The time-distance diagrams along slice1 to slice4 are displayed in the left column of \nfig{fig6} to study the dynamic evolution of the event. \nfig{fig6} (a) is the time-distance diagram along slice1 (shown in \nfig{fig1} (c2)), which is used to study the eruption of the kink loop stretching over F1. The loop experienced a slow rising phase before its violent eruption at about 08:29 UT. The mean speeds during the slow rising and violent eruption phases were about \speed{2.1 and 35}, respectively. During the transition phase from the slow rising to the violent eruption phase, it had an acceleration of about \accel{0.5}. The time-distance diagram along slice2 (shown in \nfig{fig1} (c2)) is shown in \nfig{fig6} (b), which shows the bi-directional ejections of plasma flows caused by the magnetic reconnection between MF1 and MF2. It can be seen that the plasma ejections started at about 08:25 UT, and the ejecting plasma flows in the east and west directions were about \speed{50 and 37}, respectively. The expansion and contraction motions of the north lobe of the main fan-spine are examined by using a time-distance diagram along slice3 (see \nfig{fig2} (h)), and the result is displayed in \nfig{fig6} (c). The time-distance diagram clearly shows the expansion and contraction motion of the loop system. It is noted that the transition from expansion to contraction motion occurred at about 08:32 UT, 2 minutes after the start of F1's slow rising. The speed and acceleration of the expansion motion were about \speed{12.7} and \accel{0.4}, while the contraction motion were about \speed{23} and \accel{0.5}, respectively. \nfig{fig6} (d) shows the time-distance diagram along slice4 (see \nfig{fig5} (j)), from which we obtain the eruption speed of F2 was about \speed{344}, consistent with the average speed (\speed{488}) of the associated CME whose first appearance in the FOV of LASCO C2 was 09:12 UT \footnote{\url{http://sidc.oma.be/cactus/catalog/LASCO/2_5_0/2013/10/CME0092/CME.html}}. The right column of \nfig{fig6} shows the plots of various fluxes in association with the event, in which the two vertical dotted lines indicate the start times of the two filament eruptions at 08:30 UT and 08:45 UT, respectively. \nfig{fig6} (e) shows the variations of positive (red) and negative (blue, absolute value) magnetic fluxes within the white box as shown in \nfig{fig1} (a). The positive magnetic flux showed an increasing trend until at about 08:45 UT, then it kept a constant value for about 10 minutes before the start of rapid decreasing at about 08:55 UT. For the negative magnetic flux, it showed an increasing trend from 08:30 UT to 08:45 UT, then it changed to a rapid decreasing trend until the end of the event. The soft X-ray {\em GOES} fluxes in the energy bands of 0.5--4 \AA\ and 1--8 \AA\ , EUV intensity fluxes of AIA 304 \AA\, 193 \AA\, 131 \AA\ and 94 \AA\ within the eruption source region (see the white box in \nfig{fig1} (c)). The {\em RHESSI} X-ray fluxes in the energy bands of 3--6 keV, 6--12 keV, and 12--25 keV. \nfig{fig6} (h) shows the intensity fluxes within the three boxes in \nfig{fig1} (f), which reflect the temporal intensity variation of the three flare ribbons. Based on these flux curves in \nfig{fig6} (f)--(h), one can identify two main peaks at about 08:38 UT and 08:49 UT. The two main peaks well reflected the eruption of the two filaments, and their start times were at about 08:30 UT and 08:45 UT, respectively. In addition, a small peak can also be identified at about 08:42 UT (see the red arrow and the inset in \nfig{fig6} (h)), three minutes before the onset of the second filament eruption. Based on the imaging observational results, this small peak can be recognized as the evidence of the eruption of the small circular ribbon as described in \nfig{fig4}. \begin{figure*}[thbp] \epsscale{0.85} \plotone{fig7.pdf} \caption{Panel (a) displays a HMI LOS magnetogram at 08:00:00 UT, while the dashed line indicates the location of the cross-section where we calculate the map of magnetic pressure (panels (c) and (f)) and squashing factor Q (panels (d) and (g)), and the colored lines display the location of the PILs and the site of the implosion. Panels (b) and (e) show some overlying arcades of the fan-spine structure (blue) and the filaments (MF1 (pink), MF2 (yellow) and F2 (purple)) at two pre-eruptive phases from the front view. The black dashed lines and white dotted lines in panels (c) and (f) display the location of null point. The arrows in panels (d) and (g) indicate the fan-spine structure. Panels (h) and (i) illustrate the decay index above the filaments, the vertical dotted lines point to the heights of MF1 (yellow), MF2 (red), F2 (purple) and null point (green), respectively. Panels (j)-(l) display the horizontal fields across the PILs and explosion area in corona at the height of 7 Mm to 15 Mm, the standard errors for each measured lines are about $\pm$1.8 G, $\pm$4 G, $\pm$1 G, and the black dotted lines in the three panels are the eruption time of the two filaments. \label{fig7}} \end{figure*} Using the HMI photospheric vector magnetic fields as input, the 3D coronal magnetic fields were extrapolated to study the magnetic structure around the eruption source region. Since the NLFFF model is not a good way to obtain the coronal magnetic field of active regions during the impulsive phase of flares, we chose the vector magnetic fields at 08:00 UT, 08:24 UT (before the event) and 08:48 UT (before the eruption of F2) to extrapolate the 3D magnetic fields. The extrapolated results are shown in \nfig{fig7} and \nfig{fig8}. \nfig{fig7} (a) shows the HMI LOS magnetogram around the eruption source region, in which the black dotted line shows the position where we calculate the magnetic pressure and squashing factor maps in the height direction. Panels (b)--(d) show the magnetic field lines, magnetic pressure, and Q-map calculated based on the NLFFF extrapolation result at 08:00 UT, panels (e)--(g) are the corresponding maps calculated based on the extrapolated magnetic field at 08:48 UT, and panels (j)-(k) are the horizontal fields in corona calculated by NLFFF models across the colored lines in panel (a). The first two columns of \nfig{fig8} show the flux ropes and twist maps corresponding to filaments, beside, the predicted ribbons according to the squashing factor Q on the surface are also displayed in the third column. Panels (j)--(k) are the photospheric transverse filed cross the PFLs (PFL1 and PFL2). The extrapolated coronal magnetic field at 08:00 UT well reveals the fan-spine magnetic system and the filaments as those observed in the direct imaging observations, i.e., F1 (form by the coalescence of MF1 and MF2) and F2 located in the north and south lobes of the inner fan structure, respectively (see \nfig{fig8} (a)). At 08:24 UT, from the 3D magnetic configuration, the F1, MF1 and loop appear. The loop is originated in the south positive polarity and mostly connected upon the filaments, indicated by the green lines in the \nfig{fig8} (d), whose profile in the SDO views are very similar to the shape of the loop in \nfig{fig3} (a). At 08:48 UT, F2 and MF1 were also revealed by the extrapolated magnetic field, but MF2 can not (see \nfig{fig8} (g)). Compared to the magnetic field lines in 08:00 UT and 08:48 UT, The left lobe of fan-spine gets its inner spine closer to the right spine. The extrapolated results are in agreement with the direct imaging observational results as shown in the bottom of \nfig{fig1} and \nfig{fig2} (e). \nfig{fig7} (c) and (f) show the magnetic pressure maps at 08:00 UT and 08:48 UT along the black dotted line (see \nfig{fig7} (a)) in the height direction, respectively. The locations of F1 (or MF1 and MF2) and F2 can be identified as high magnetic pressure regions (red color) well below the north and south lobes of the fan structure, respectively. The null point of the fan-spine magnetic system shows as a small region of low magnetic pressure, and the height of its center is about 15 Mm above the solar surface (see the horizontal dashed line in \nfig{fig7} (c) and (f)). The maps of squashing factor Q in the height direction along the black dotted line (see \nfig{fig7} (a)) at 08:00 UT and 08:48 UT are displayed in \nfig{fig7} (d) and (g), respectively. Here, we use the code developed by \cite{liu2016} to generate the Q-maps. The Q-maps well exhibit the skeleton of the fan-spine system, in which the linear high Q regions represent the quasi-separatrix layers within the fan-spine magnetic system. It is interesting that the Q-map at 08:00 UT also revealed a small fan-spine magnetic system hosted within the south lobe of the inner fan of the main fan-spine magnetic system (see the white box and the inset in \nfig{fig7} (d)), which also indicated that F2 was below the outer spine of this small fan-spine magnetic system. The footpoint of the fan of this small fan-spine structure well corresponds to the location of the observed small circular ribbon as described in \nfig{fig4}. Therefore, the appearance of the small circular ribbon evidenced the eruption of this small fan-spine structure, in which magnetic reconnection occurred around the null point. Since F2 located below the outer spine, the eruption of this small fan-spine structure would lead to the decrease of the confinement capacity of the overlying magnetic field of F2. This could be the reason why the slow rising of F2 occurred right after the formation of the small circular ribbon. The horizontal fields upon PILs and implosion area are measured the average value with the height from 7 Mm to 15 Mm, which is below the null point. We estimate the measuring errors to be related to the adjacent eight pixels of the points where we choose to calculate the coronal horizontal field, and the standard errors for the calculation regions (PIL1, PIL2 and implosion area) are about 1.8 G, 4 G, 1 G, respectively. We label the start time of two filament eruptions by black dashed lines, in under the two sympathetic eruptions interval, the magnetic pressure upon the PIL1 shows a gradual increasing from 49 G to 60G, while PIL2 experiences a sightly decreasing. And the drift of transverse magnetic field upon the implosion site down from 38 G towards 33 G at the pre-eruptive phase of F1, then it is back to 38 G, the disparity of the value may be the reason for the loops contraction in \nfig{fig2}. It should be noted that the increasing horizontal field is often related to the impulsive phase of the filament eruption\citep[e.g.,][]{2019ApJS..240...11P,2012ApJ...745L..17W}, as an associated phenomenon with the eruptions. Thus, before 08:48 UT, the small fan-spine structure had just erupted, the extraordinary decreasing upon PIL2 might be caused by the magnetic topology change. We also compute the QSLs from squashing factor Q on the surface to predict the flare ribbons in both the potential and NLFFF models. The results are displayed in \nfig{fig8} (c), (f) and (i), where the green (blue) contours are from the value of NLFFF (potential) model. One can see that both the NLFFF QSLs and the potential field QSLs are in well accordance with the brightening in 304 \AA\ images, while the potential field QSLs are more associated with the ribbons (R1, R2 and R3). Based on the extrapolated 3D magnetic fields, the decay index of the external potential magnetic field over F1 (or MF1 and MF2) and F2 are calculated using the formula $n = -dln|B|/dln|z|$ \citep{kliem06}. Here, $B$ and $z$ are the external potential magnetic field strength and height above the solar surface, respectively. The calculated decay indexes are plotted in \nfig{fig7} (h) and (i), which are the results calculated from the extrapolated coronal magnetic fields at 08:00 UT and 08:48 UT, respectively. The vertical yellow, red, purple, and green dashed lines indicate respectively the heights of MF1, MF2, F2, and the fan-spine null point above the solar surface, while the decay indexes for MF1, MF2, and F2 are plotted as yellow, red, and purple curves. At 08:00 UT, the decays index for MF1 (MF2) shows a quick increase to about 1.7 (1.1) below the null point, and then it rapidly decreases to about 0.5 (0.9) at a height of about 25 Mm. Above the height of about 30 Mm, the decay indexes above MF1 and MF2 gradually increase to about 2.4 and 2.2 at the height of 120 Mm. Such a decay index variation pattern suggests the complexity of the overlying coronal magnetic field above MF1 and MF2 (i.e., F1), the saddle-like shape of the decay index curves mainly caused by the null point distribution overlying the filaments. The decay index above F2 shows a simple increasing trend as the increase of the height, which indicates the normal potential magnetic field distribution above F2. These decay index curves reflect the magnetic field distribution as what have been revealed by the extrapolated magnetic field lines, magnetic pressure and the squashing factor Q maps. According to the previous statistical and theoretical investigation, the critical value of the decay index for a successful (failed) filament eruption is generally greater (smaller) than 1.5 at a height of about 42 Mm from the solar surface \citep[e.g.,][]{Tor05,kliem06,Liuy08,Liu12}. For the present event, one can see that all the decay indexes above 42 Mm increase smoothly as the increasing height, and the decay index above F2 always greater than F1 (i.e., MF1 and MF2) at any specific height. At the height of 42 Mm above the solar surface, the decay index values for F1 and F2 are about 1 and 2, respectively. This result suggests that F1 (F2) was stable (unstable) for torus instability, in agreement with our observation. The decay indexes of above MF1 and F2 at 08:00 UT and 08:48 UT are compared in \nfig{fig7} (i). At these two moments, the decay index above MF1 show little difference, but that for F2 was decreased at 08:48 UT. \begin{figure*}[thbp] \epsscale{0.85} \plotone{fig8.pdf} \caption{Panel (a), (d) and (g): the top-view of the filaments from NLFFF calculation, the field-of-view (FOV) for panel (a) and (g) is 120\arcsec$\times$120\arcsec, and the FOV for panel (d) is 75\arcsec$\times$75\arcsec. Panel (b), (e) and (h): twist maps correspond to the FOV of the first column. Panel (c), (f) and (i): the QSLs from Logarithmic Q, the blue contour is calculated from the potential model, while the green is from NLFFF model. Panel (j)-(k): The photospheric transverse field across PILs (PIL1 and PIL2) as the function of time, the two black dotted lines in panel (j)-(k) label the activated time of the two filaments, and the implosion time is marked by the black arrow in panel (j), the mean uncertainty estimate for PIL1 is about $\pm$42 G, while the mean uncertainty estimate for PIL2 is about $\pm$62 G. \label{fig8}} \end{figure*} In order to make sense the the mechanisms to destabilize F1 and F2, we performed the twist maps of the filaments as well as the photospheric transverse field across the PILs (PIL1 and PIL2) during the eruptions, the results are displayed in \nfig{fig8}. We also plot the location of the filaments in twist maps by colored lines and record the mean $T_{\omega}$ cross those lines. For F1, we notice that the increasing magnetic twist across the newly formed F1 (1.04) compares to the previous filaments MF1 (0.67) and MF2 (0.59). For F2, it becomes more winding and extends another branch on the body after F1 is activated. One can see that both in the two pre-eruptive phase, the MFR of F2 is featured by the dark blue color. As the eruption process, the magnetic twists of F2 gradually increases and reaches to -2.63 while the F1 maintains a low level, indicating that the eruption of F2 may be caused by torus instability and the F1 may not. From the calculation of photospheric transverse field across the PILs in panels (j) and (k), the two black dashed lines show the activated time of the filaments F1 and F2, the sympathetic eruptions pushed a prominent $B_t$ drifts up on PIL1, marked by black arrows. The magnetic implosion started at the time around 08:35 UT, before the eruptive phase of F2, transverse magnetic field of the PIL1 drifts from 159 G towards 195 G, increases about 30\%. From the physical interpretation of the implosion according to \cite{hu00}, due to conservation of the momentum, the photospheric transverse field $B_t$ at implosion site would increase first, and then the horizontal field in corona would decrease after the implosion occurred. In \nfig{fig7} (l), one can see that the transverse magnetic field upon the implosion region has decreased at 08:36 UT, this scenario may indicate that the implosion was contemporaneous with the first eruption. We believe that gravitational and kinetic energy of the filament eruption was came from the magnetic energy releasing which would lead to the decreasing of magnetic pressure and performance for a reduction of the transverse magnetic field in corona. Together those results provide an important evidence that with the eruption of F1 going on, the overlying loops upon F2 could move into the reconnection favor part of the right lobe (upon F1) of the fan-spine. Thus the magnetic topology change for the right lobe of fan-spine system might play an important role in the instability of F2. \section{Interpretation}\label{sec:discuss} Based on our analysis results, it is clear that the two successive filament eruptions originated from different locations were physically connected to each other within a tripolar magnetic field region that has a fan-spine coronal magnetic topology. We propose that the physical linkage between the two filament eruptions could be the magnetic topology change. \begin{figure*}[thbp] \epsscale{0.85} \plotone{fig9.pdf} \caption{Cartoons show our understanding of how is the sympathetic eruptions triggered. Panel (a) shows the initial magnetic configuration, the image set at the top left corner shows the original of the F1. Panel (b): the rise of F1 and internal reconnection. Panel (c): the external reconnection between the confined loops with the outer spine, the reconnection of the small fan-spine structure, and F2 begins to rise. Panel (d) illustrates the internal reconnection between the two legs of confined loops upon F2. Panel (e): external reconnection of the confined loops upon F2. Panel (f) shows the ultimate stage of the fan-spine configuration in Figure~\ref{fig5}, the large scale CME triggered by the eruption of F2. \label{fig9}} \end{figure*} We draw a cartoon in \nfig{fig9} to explain the detailed eruption and evolution processes of the sympathetic filament eruptions, in which only some representative magnetic field lines are plotted, and features including the filaments and magnetic polarities are the same as those revealed by the direct imaging observations and the extrapolated 3D coronal magnetic fields. \nfig{fig9} (a) shows the initial status of the pre-eruption magnetic configuration, i.e., a fan-spine magnetic system with two filaments reside in the two lobes, respectively. Here, we only show the details of the fan structure of the entire fan-spine system to study the physical linkage between the two filament eruptions. It should be noted that the filament (F1) between P and N1 are actually the two crossing mini-filaments as what is shown in the inset at the upper left corner of \nfig{fig9} (a). As has been shown in the bottom row of \nfig{fig1}, F1 was formed by the coalesce of MF1 and MF2 through magnetic reconnection around the crossing site. In addition, the small fan-spine structure below the left lobe of the main fan-spine system is plotted as pink curves, and with F2 being confined by its outer spine. The kinked loop structure presented in \nfig{fig3} is not plotted in the cartoon. The newly formed F1 was unstable, and the eruption of the kinked loop as analyzed in \nfig{fig3} can further contribute to the unsteadiness of F1. According to the calculated decay index and transverse field above MF1, the unstable of F1 was probably due to the reconnection of MFs. The rising of F1 leads to a current sheet below F1 between the two legs of the confining field lines, and the magnetic reconnection (internal) in this current sheet will accelerate the eruption of the filament, result in the formation of two conjugated flare ribbons at P (R2) and N1 (R1), and the hot PFL1 connecting P and N1 (see \nfig{fig9} (b)). Due to the continuous rising of F1, the confining magnetic field lines above F1 will inevitably interact with the open field lines rooted in N2. This can lead to the formation of a new current sheet between the closed confining field lines and the open field lines rooted in N2. Consequently, the magnetic reconnection (external) in this new current sheet further removes the confining magnetic field lines of F1 and accelerates the eruption of the filament. Another consequence of this external magnetic reconnection is the formation of PFL2 connecting P and N2 and the flare ribbon R3 at N2 (see \nfig{fig9} (c)). This process can reasonably explain the delayed appearance of PFL2 (R3) for about 2 minutes with respect to the first appearance of PFL1 (R1 and R2). According to our observations, the eruption of F1 was a failed filament eruption that did not result in any detectable CME in the outer corona, which could possibly attribute to the low decay index of the confining magnetic field over F1 (see \nfig{fig9} (h), i.e., $n ~\textless ~1.5$ at the height of about 20 -- 60 Mm above the solar surface ), and the low magnetic twist as well as the strong background magnetic field (see \nfig{fig8} (e) and (k)). How does the eruption of F1 lead to the eruption of F2? Here, we propose that this was due to magnetic topology change above F2 (likely the fan structure), causing the torus instability of F2 , and to set off the much larger eruption. For the present case, all the eruption of F1, the internal and the external magnetic reconnections as indicated by the red cross symbols in \nfig{fig9} (c), which can be explained by the three ribbons caused by standard slipping or slip-running reconnection. Then the confining loops of F2 will become unstable due to topology change caused by the F1 eruption (see \nfig{fig8} (k)). Topology change affects the stability of small fan-spine structure whose outer spine acting as a part of the confining magnetic field of F2 (see \nfig{fig9} (c)), then the eruption of this small fan-spine structure will further destroy the balance of forces acting on F2. Therefore, F2 starts to rise and triggers the internal magnetic reconnection below F2 between the two legs of the confining magnetic field lines (see \nfig{fig9} (d)). It should be noted that as the low magnetic twist and decay index, we deduce that the eruption of F1 may be a failed kink eruption, it does not deplete the material and fields, and most of its mass may be fallen down to the surface of solar, so we remain some confined loops and material in \nfig{fig9} (c). The internal magnetic reconnection will accelerate the rising of F2, causing two conjugated flare ribbons at P and N2, and a group of hot PFL connecting P and N2. The continuous rising of F2 will result in the formation of a new current sheet between the confining fields of F2 and the open field lines rooted in N1, and the magnetic reconnection (external) in this current sheet further accelerates the eruption of F2. This external magnetic reconnection also causes two conjugated flare ribbons at P and N1, and a group of hot PFL connecting P and N1 (see \nfig{fig9} (e)). Finally, the complete eruption of F2 causes a broad CME in the outer corona as what we have evidence in the coronagraph white-light images (see \nfig{fig9} (f)). The decay index above F2 was greater than the critical value of 1.5 for torus instability; therefore, the eruption of F2 was liable to become a successful eruption. It's noted that there also exists alternative possibility. According to Hudson (2000), the magnetic pressure around these energy releasing sites should be decreased during the initial stage of the magnetic reconnections, and such a process can typically last for several minutes, which are believed to be an available way to change the magnetic topology~\citep[e.g.,][]{lw2010,gos12,Sun12,sim13,rus15,wang16}. \cite{shen12a} firstly proposed that the magnetic implosion can change the magnetic topology between sympathetic filament eruptions within the framework of quadripolar breakout magnetic system. From the observation of the detected contraction of the confining loops (see \nfig{fig6} (c)), we conclude that the magnetic implosion were possibly took place upon F1. Therefore, although there is no enough evidence to demonstrate quantitatively how implosion of F1 would influence the eruption, we presume that the magnetic topology change may be the different variation in magnetic pressure caused by the magnetic implosion, the implosion results in the upper parts (stable magnetic pressure) upon F2 moving toward the implosion site (decreasing magnetic pressure) to keep the equilibrium of the system. Consequently, this can also lead to the instability and eruption of the small fan-spine structure. \section{Conclusions and Discussions}\label{sec:summary} Using high spatiotemporal multi-wavelength observations taken by space-borne and ground-based telescopes, we studied the sympathetic eruption of two filaments occurred in tripolar magnetic field region on 2013 October 20. The coronal magnetic field of the eruption source region was a fan-spine topology which hosted the two filaments respectively in its two lobes of the fan. The initiation of the sympathetic filament eruptions was started from the formation of an unstable small filament (F1) through the magnetic reconnection between two crossing mini-filaments (MF1 and MF2). The eruption of F1 was a failed filament eruption, and its start time was coincidence with the sudden emergence of negative magnetic flux in the eruption source region. The physical reason for the failed eruption of F1 was possibly due to the low decay index ($\rm n~\textless~1.5$) above the filament as what had been revealed by the extrapolated coronal magnetic field. During the rising of F1, a loop structure riding on F1 showed interesting writhing and kinking motions before its eruption, which was possibly due to the increased magnetic twist transferred from F1 via the magnetic reconnection between the loop and the rising F1. This process can significantly reduce the magnetic twist or non-potential magnetic energy of F1. Therefore, we propose that the effective reduction in magnetic twist could be a possible reason for the failed eruption of filaments, because there is no enough energy to power the eruptions. Although F1 failed to erupt in the interplanetary space, it destroyed the equilibrium of the small fan-spine system and F2 hosted by the south lobe of the fan structure. How did the eruption of F1 result in the subsequent eruptions of the small fan-spine system and F2 has been explained in detail in our cartoon, the topology change around F1's eruption source region led to the instability of the nearby magnetic system in which the small fan-spine and F2 resided in. It should be pointed out that the first expansion and then contraction motions observed during the rising of F1 indicated the occurrence of magnetic implosion process, as what has been reported in previous studies \cite[e.g.,][]{lw2010,gos12,liuliu12,lw2010,gos12,Sun12,sim13,rus15}. Here, we propose that the magnetic topology change can also be used as the physical linkage for sympathetic filament eruptions in tripolar fan-spine magnetic system, and the topology change may be led by the magnetic implosion. For the present event, the loss of equilibrium of the south lobe of the fan structure firstly resulted in the null point reconnection and eruption of the small fan-spine system, and then the rising and eruption of F2. The energy releasing around the null point and the eruption of the small fan-spine system can further change the topology above F2. Therefore, the eruption of F2 occurred after the eruption of the small fan-spine system. The eruption of F2 was a successful eruption which caused a large-scale CME in the outer corona. We noted that the start time of F2's eruption was a coincidence with the beginning of magnetic flux cancellation in the photosphere, and the successful eruption of F2 was possibly due to the relatively large decay index ($\rm n~\textgreater~1.5$) of the overlying coronal magnetic field. Sympathetic filament eruptions have been studied intensively in recent years \citep[e.g.,][]{peng07,shen12a,2020ApJ...892...79S,hou20}, and those occurred in breakout magnetic systems and pseudostreamers often started from external reconnection around the null point due to external or internal disturbances \citep[e.g.,][]{moo01,peng07,shen12a,tor11,Lynch13}. In principle, if the external reconnection starts first, it will greatly consume the overlying confining magnetic field lines and decrease the magnetic tension force upon the low-lying core magnetic structure such as a filament. The consequence of the external reconnection will result in the eruption of the core magnetic structures and the occurrence of the internal reconnection. For the present event, we propose that the external magnetic reconnections occurred after the internal ones during the eruption periods of the two filaments, as the scenario described in \nfig{fig9}. This is mainly based on the observations of the appearance times of the flare ribbons and PFLs. During the eruption of F1, the conjugated flare ribbons of R1 and R2 (PFL1) appeared about 2 minutes before R3 (PFL2). According to the standard filament eruption model within the framework of fan-spine magnetic topology, R1, R2, and PFL1 should be caused by the internal reconnection below the rising filament, while R3 and PFL2 were associated with the external reconnection around the null point. The eruption of F2 showed the same observational characteristics as the eruption of F1, so it also suggested that the internal reconnection below the rising F2 occurred before the external reconnection around the null point of the fan-spine system. It should be pointed out that the cartoon shown in \nfig{fig9} can also be used to explain such events in which the external reconnection starts firstly, if we make some minor changes. In this case, since the external reconnections start firstly before the internal ones, the appearance times of the flare ribbons of R1, R2 and R3 should be observed simultaneously during the initial rising phases of the two filaments. For the appearance times of the PFLs, one can expect the firstly show up of PFL2 (PFL1) during the eruption of F1 (F2). Although the eruption of F1 was a failed eruption in the present event, the cartoon also implies the possibility for producing sympathetic CMEs when sympathetic filament eruptions occurred in tripolar fan-spine magnetic systems. In such cases, all the filament eruptions should be powerful enough, or the decay indexes of their overlying coronal magnetic fields are all higher than the critical value for torus instability. In addition, the quadripolar breakout magnetic systems can also launch sympathetic CMEs evolving from sympathetic filament eruptions \citep{shen12a}. Generally, the fan-spine magnetic system represents the 3D magnetic topology of straight anemone type solar jets \cite{shen21}, and many observational and numerical simulation works are all taken such a special magnetic system as the basic coronal magnetic environment of solar jets \citep[e.g.,][]{par09,str15,wyp18,shen19b,hongj19}. Many recent high spatiotemporal resolution observations showed that solar jets are driven by mini-filament eruptions in fan-spine systems and in association with photospheric magnetic flux cancellations, and these features are also frequently observed in large-scale energetic solar eruptions \citep[e.g.,][]{shen12b,shen17,str15,2016ApJ...830...60H,2017ApJ...835...35H,2017Natur.544..452W,Panesar17,Panesar18,2018ApJ...864...68S,2019Sci...366..890S}. Therefore, small-scale solar jets probably represent the miniature version of large-scale solar eruptions, and hence that this may hint a possible scale invariance of solar eruptions \citep{2016SSRv..201....1R,shen21}. In the line of this thought, the present event also showed some common characteristics with solar jets. For example, the eruption included the eruption of filaments in fan-spine magnetic system, and the start of its main eruption was a coincidence with photospheric magnetic flux cancellations. Typically, solar jets are often associated with small-scale eruption source regions. Therefore, based on the observing capacity of our current telescopes, it is hard to distinguish as many eruption features as possible to diagnose the formation mechanism of solar jets. The present event occurred in a relatively larger eruption source region, it exhibited more observable clues about its triggering and evolution details. If the scale invariance of solar eruptions really exists, we can take the present event as a solar jet in a relatively larger version. Hence, the eruption mechanism of the present event can also be used to explain the eruption of solar jets. More observational and theoretical works are desirable in the future to verify our scenario discussed in this paper. The authors would like to thank the {\em SDO} and other data providing teams for their excellent and user-friendly observations, and we really appreciate the reviewer in reviewing our manuscript with many valuable suggestions and comments. Mr. C. Zhou thanks the helpful discussions with Dr. C. Xia from Yunnan University. This work is supported by the Natural Science Foundation of China (12173083,11922307,11773068,11633008), the Yunnan Science Foundation for Distinguished Young Scholars (202101AV070004), the Yunnan Science Foundation (2017FB006), the National Key R\&D Program of China (2019YFA0405000), the Specialized Research Fund for State Key Laboratories, the Open Research Program of CAS Key Laboratory of Solar Activity (KLSA202017), and the West Light Foundation of Chinese Academy of Sciences.
\section{Introduction and Preliminaries} Let us consider the Gaussian measure \begin{equation} \gamma_d(dx)=\frac{e^{-\|x\|^2}% }{\pi^{d/2}} dx, \, x\in\mathbb{R}^d \end{equation} on $\mathbb{R}^d$ and the Ornstein-Uhlenbeck differential operator \begin{equation}\label{OUop} L=\frac12\triangle_x-\left\langle x,\nabla _x\right\rangle. \end{equation} Let $\nu=(\nu _1,...,\nu_d)$ be a multi-index such that $\nu _i \geq 0, i= 1, \cdots, d$, let $\nu !=\prod_{i=1}^d\nu _i!,$ $\left| \nu \right| =\sum_{i=1}^d\nu _i,$ $% \partial _i=\frac \partial {\partial x_i},$ for each $1\leq i\leq d$ and $% \partial ^\nu =\partial _1^{\nu _1}...\partial _d^{\nu _d}$.\\ Consider the normalized Hermite polynomials of order $\nu$ in $d$ variables, \begin{equation} h_\nu (x)=\frac 1{\left( 2^{\left| \nu \right| }\nu !\right) ^{1/2}}\prod_{i=1}^d(-1)^{\nu _i}e^{x_i^2}\partial _i^{\nu _i}(e^{-x_i^2}). \end{equation} The {\em Ornstein-Uhlenbeck semigroup} on ${\mathbb{R} ^d}$ \label{semOU2} is defined by \begin{eqnarray*} T_t f(x) &=& \frac{1}{(1-e^{-2t})^{d/2}}\int_{\mathbb{R}^d} e^{- \frac{e^{-2t}(|x|^2 +|y|^2) - 2 e^{-t} \langle x,y \rangle }{1-e^{-2t}}} f(y) \gamma_d(dy) \quad . \end{eqnarray*} Using the {\em Bochner subordination formula} \begin{equation} \label{bochner} e^{-\lambda} = \frac{1}{\sqrt \pi} \int_0^{\infty} \frac{e^{-u}}{\sqrt u} e^{-\lambda^2/4u} du, \end{equation} we introduce the {\em Poisson-Hermite semigroup} \label{semPH1} by \begin{eqnarray} P_t f(x) & = & \frac{1}{\sqrt \pi} \int_0^{\infty} \frac{e^{-u}}{\sqrt u} T_{t^2/4u}f(x) du. \end{eqnarray} Now, taking the change of variables $s=\displaystyle\frac{t^2}{4u}$ , $ P_{t}f(x)$ can be written as \begin{equation}\label{02} P_t f(x) = \int^{\infty}_0 T_sf(x) \mu^{(1/2)}_t(ds), \end{equation} where $$\mu^{(1/2)}_t(ds) = \frac{t}{2\sqrt{\pi}} e^{-t^2/4s} s^{-3/2} ds,$$\label{onesided1/2} is {\em the one-sided stable measure on $(0, \infty)$ of order $1/2$}.\\ It is easy to see that $\mu^{(1/2)}_t$ is a probability measure on $(0, \infty)$. It is well known, that the Hermite polynomials are eigenfunctions of the operator $L$, \begin{equation}\label{eigen} L h_{\nu}(x)=-\left|\nu \right|h_\nu(x). \end{equation} In consequence \begin{equation}\label{OUHerm} T_t h_\nu(x)=e^{-t\left| \nu\right|}h_\nu(x), \end{equation} and \begin{equation}\label{PHHerm} P_t h_\nu(x)=e^{-t\sqrt{\left| \nu\right|}}h_\nu(x), \end{equation} i.e. the Hermite polynomials are also eigenfunctions of $T_t$ and $P_t$ for any $t \geq 0$, for more details, see \cite{urbina2019}. \\ Next, we present some technical results for the measure $\mu^{(1/2)}_t$ needed in what follows. First, as $\mu^{(1/2)}_t(ds) = \displaystyle\frac t{2\sqrt{\pi}}\frac{e^{-t^2/4s}}{s^{3/2}}ds = g(t,s) ds$, for any $k\in \mathbb{N}$, we use the notation $\frac{\partial^{k}}{\partial t^{k}}\mu_{t}^{(1/2)}(ds)$ for \begin{equation} \frac{\partial^{k}}{\partial t^{k}}\mu_{t}^{(1/2)}(ds) := \frac{\partial^{k} g(t,s)}{\partial t^{k}}ds. \end{equation} \begin{lem} \label{lematec1} Given $k\in \mathbb{N}$ \begin{equation} \frac{\partial^{k}\mu_{t}^{(1/2)}}{\partial t^{k}}(ds)=\left(\sum_{i,j}a_{i,j}\frac{t^{i}}{s^{j}}\right)\mu_{t}^{(1/2)}(ds) \end{equation} where $\{a_{i,j}\}$ is a finite set of constants and the indexes $i\in \mathbb{Z}$, $j\in \mathbb{N}$ verifies the ecuation $2j-i=k$. \end{lem} \begin{lem}\label{lematec2} Given $k\in \mathbb{N}$ and $t>0$ $$ \int_{0}^{+\infty}\frac{1}{s^{k}}\mu_{t}^{(1/2)}(ds)=\frac{C_{k}}{t^{2k}},$$ where $C_{k}=\frac{2^{2k}\Gamma(k+\frac{1}{2})}{\pi^{\frac{1}{2}}}.$ \end{lem} \begin{cor}\label{corol1} Given $k\in \mathbb{N}$ and $t>0$ \begin{equation} \int_{0}^{+\infty}\left|\frac{\partial^{k}\mu_{t}^{(1/2)}}{\partial t^{k}}\right|(ds)\leq\frac{C_{k}}{t^{k}}. \end{equation} \end{cor} On the other hand, by considering the {\em maximal function of the Ornstein-Uhlenbeck semigroup} $$T^{\ast}f(x)=\displaystyle\sup_{t>0}|T_{t}f(x)|,$$ we obtain the inequaility: \begin{lem}\label{lematec5} Let $f\in L^{1}(\gamma_{d}), x\in \mathbb{R}^{d}$ and $k\in \mathbb{N}$ \begin{equation} \left|\frac{\partial^{k}P_{t}f(x)}{\partial t^{k}}\right| \leq C_{k} \, T^{\ast}f(x) t^{-k} \quad, \forall t>0 \quad . \end{equation} \end{lem} For the proofs of these technical results, see \cite{Pinurb} or \cite{urbina2019}.\\ Now, for completeness, we need some background on variable Lebesgue spaces with respect to a Borel measure $\mu$.\\ A $\mu$-measurable function $p(\cdot):\Omega \subset \mathbb{R}^d \rightarrow [1,\infty]$ is said to be an {\em exponent function}; the set of all the exponent functions will be denoted by $\mathcal{P}(\Omega,\mu)$. For $E\subset\Omega$ we set $$p_{-}(E)=\text{ess}\inf_{x\in E}p(x) \;\text{and}\; p_{+}(E)=\text{ess}\sup_{x\in E}p(x).$$ $\Omega_{\infty}=\{x\in \Omega:p(x)=\infty\}$.\\ We use the abbreviations $p_{+}=p_{+}(\Omega)$ and $p_{-}=p_{-}(\Omega)$. \begin{defi}\label{deflogholder} Let $E\subset \mathbb{R}^{d}$. we say that $p(\cdot):E\rightarrow\mathbb{R}$ is locally log-H\"{o}lder continuous, denote by $p(\cdot)\in LH_{0}(E)$, if there exists a constant $C_{1}>0$ such that \begin{eqnarray*} |p(x)-p(y)|&\leq&\frac{C_{1}}{log(e+\frac{1}{|x-y|})} \end{eqnarray*} for all $x,y\in E$. We say that $p(\cdot)$ is log-H\"{o}lder continuous at infinity with base point at $x_{0}\in \mathbb{R}^{d}$, and denote this by $p(\cdot)\in LH_{\infty}(E)$, if there exist constants $p_{\infty}\in\mathbb{R}$ and $C_{2}>0$ such that \begin{eqnarray*} |p(x)-p_{\infty}|&\leq&\frac{C_{2}}{log(e+|x-x_{0}|)} \end{eqnarray*} for all $x\in E$. We say that $p(\cdot)$ is log-H\"{o}lder continuous, and denote this by $p(\cdot)\in LH(E)$ if both conditions are satisfied. The maximum, $\max\{C_{1},C_{2}\}$ is called the log-H\"{o}lder constant of $p(\cdot)$. \end{defi} \begin{defi}\label{defPdlog} Let $E\subset \mathbb{R}^{d}$, we say that $p(\cdot)\in\mathcal{P}_{d}^{log}(E)$, if $\frac{1}{p(\cdot)}$ is log-H\"{o}lder continuous and denote by $C_{log}(p)$ or $C_{log}$ the log-H\"{o}lder constant of $\frac{1}{p(\cdot)}$. \end{defi} \begin{defi} Let $\Omega\subset \mathbb{R}^{d}$ and $p(\cdot)\in\mathcal{P}(\Omega,\mu)$. For a $\mu$-measurable function $f:\Omega\rightarrow \overline{\mathbb{R}}$, we define the modular \begin{equation} \rho_{p(\cdot),\mu}(f)=\displaystyle\int_{\Omega\setminus\Omega_{\infty}}|f(x)|^{p(x)}\mu(dx)+\|f\|_{L^{\infty}(\Omega_{\infty},\mu)}, \end{equation} and the norm \begin{equation} \|f\|_{L^{p(\cdot)}(\Omega,\mu)}=\inf\left\{\lambda>0:\rho_{p(\cdot),\mu}(f/\lambda)\leq 1\right\}. \end{equation} \end{defi} \begin{defi} The variable exponent Lebesgue space on $\Omega\subset\mathbb{R}^{d}$, $L^{p(\cdot)}(\Omega,\mu)$ consists on those $\mu\_$measurable functions $f$ for which there exists $\lambda>0$ such that $\rho_{p(\cdot),\mu}\left(\frac{f}{\lambda}\right)<\infty,$ i.e. \begin{equation*} L^{p(\cdot)}(\Omega,\mu) =\left\{f:\Omega\to \overline{\mathbb{R}}: f \; \text{is measurable and} \; \rho_{p(\cdot),\mu}\left(\frac{f}{\lambda}\right)<\infty, \; \text{for some} \;\lambda>0\right\}. \end{equation*} \end{defi} \begin{obs}\label{obs4.2} When $\mu$ is the Lebesgue measure, we write $\rho_{p(\cdot)}$ and $\|f\|_{p(\cdot)}$ instead of $\rho_{p(\cdot),\mu}$ and $\|f\|_{p(\cdot),\mu}$. \end{obs} \begin{teo} (Norm conjugate formula) Let $\nu$ a complete, $\sigma$-finite measure on $\Omega$. $p(\cdot)\in \mathcal{P}(\Omega,\nu)$, then\\ \begin{equation}\label{normaconjugada} \frac{1}{2}\|f\|_{p(\cdot),\nu}\leq \|f\|^{'}_{p(\cdot),\nu}\leq 2\|f\|_{p(\cdot),\nu}, \end{equation} for all $f$ $\nu$-measurable on $\Omega$,\\ donde $\displaystyle\|f\|^{'}_{p(\cdot),\nu}=\sup\left\{\int_{\Omega}|f||g|d\mu:g\in L^{p'(\cdot)}(\Omega,\nu),\|g\|_{p'(\cdot),\nu}\leq 1\right\}.$ \end{teo} \begin{proof} See Corollary 3.2.14 in \cite{LibroDenHarjHas} \end{proof} \begin{teo} (H\"older's inequality) Let $\nu$ a complete, $\sigma$-finite measure on $\Omega$. $r(\cdot),q(\cdot)\in \mathcal{P}(\Omega,\nu)$, define $p(\cdot)\in \mathcal{P}(\Omega,\nu)$ by $\displaystyle \frac{1}{p(x)}=\frac{1}{q(x)}+\frac{1}{r(x)}$ $\nu$ a.e. $x\in \Omega$ .\\ Then for all $f\in L^{q(\cdot)}(\Omega,\nu)$ and $g\in L^{r(\cdot)}(\Omega,\nu)$, $ fg\in L^{p(\cdot)}(\Omega,\nu)$ and \begin{equation}\label{Holder generalizada} \|fg\|_{p(\cdot),\nu}\leq 2\|f\|_{q(\cdot),\nu}\|g\|_{r(\cdot),\nu} \end{equation} \end{teo} \begin{proof} See Lemma 3.2.20 in \cite{LibroDenHarjHas} \end{proof} \begin{teo} (Minkowski's integral inequality for variable Lebesgue spaces) Given $\mu$ and $\nu$ complete $\sigma$-finite measures on $X$ and $Y$ respectively, $p\in \mathcal{P}(X,\mu)$. Let $f:X\times Y\rightarrow \overline{\mathbb{R}}$ measurable with respect to the product measure on $X\times Y$, such that for almost every $y\in Y$, $f(\cdot,y)\in L^{p(\cdot)}(X,\mu)$. Then \begin{equation}\label{integralMinkowski} \left\|\int_{Y}f(\cdot,y)d\nu(y)\right\|_{p(\cdot),\mu}\leq 4\int_{Y}\|f(\cdot,y)\|_{p(\cdot),\mu}d\nu(y) \end{equation} \end{teo} \begin{proof} It is completely analogous to the proof of Corollary 2.38 in \cite{dcruz} by interchanging the Lebesgue measure for complete $\sigma$-finite measures $\mu$ and $\nu$ on $X$ and $Y$ respectively, and by using (\ref{Holder generalizada}), Fubini's theorem and then (\ref{normaconjugada}). \end{proof} In what follows $\mu$ represents the measure $\displaystyle\mu(dt)=\frac{dt}{t}$ on $\mathbb{R}^{+}$.\\ \begin{obs} For a $\mu$-measurable function $f:\mathbb{R}^{+}\rightarrow \overline{\mathbb{R}}$, $q(\cdot)\in\mathcal{P}(\mathbb{R}^{+},\mu)$, and any $\lambda>0$ \begin{eqnarray*} \rho_{q(\cdot),\mu}(\frac{f}{\lambda})&=&\displaystyle\int_{0}^{\infty}\left|\frac{f(t)}{\lambda}\right|^{q(t)}\mu(dt)=\displaystyle\int_{0}^{\infty}\left|\frac{t^{-1/q(t)}f(t)}{\lambda}\right|^{q(t)}dt\\ &=&\rho_{q(\cdot)}\left(\frac{t^{-1/q(\cdot)}f}{\lambda}\right) \end{eqnarray*} Thus, \begin{equation}\label{normaq,dt/t} \|f\|_{q(\cdot),\mu}=\|t^{-1/q(\cdot)}f\|_{q(\cdot)} \end{equation} \end{obs} Next, we present an useful technical results for the measure $\mu$. \begin{lem}\label{desigualdadesnormamu} For $q(\cdot)\in\mathcal{P}(\mathbb{R}^{+},\mu)$ \begin{enumerate} \item[i)] For any $\alpha,\beta>0$ and $q_{+}<\infty,\; \|t^{\alpha}e^{-t\beta}\|_{q(\cdot),\mu}<\infty.$ \item[ii)] For any $ \alpha>0, \; \|t^{\alpha}\chi_{(0,1]}\|_{q(\cdot),\mu}<\infty.$ \item[iii)] For any $ \alpha>0, \; \|t^{-\alpha}\chi_{(1,\infty)}\|_{q(\cdot),\mu}<\infty.$ \item[iv)] For any $ t_{0}>0, \; (\ln 2)^{\frac{1}{q_{-}}}\leq\|\chi_{[t_{0}/2,t_{0}]}\|_{q(\cdot),\mu}\leq 1.$ \end{enumerate} \end{lem} \begin{proof} Let us prove $i)$. Set $f=t^{\alpha}e^{-t\beta}$\\ \begin{eqnarray*} \rho_{q(\cdot),\mu}(f)&=&\int_{0}^{\infty}|f(t)|^{q(t)}\mu(dt)=\int_{0}^{1}|t^{\alpha}e^{-t\beta}|^{q(t)}\frac{dt}{t}+\int_{1}^{\infty}|t^{\alpha}e^{-t\beta}|^{q(t)}\frac{dt}{t} \end{eqnarray*} Now, \begin{eqnarray*} \int_{0}^{1}|t^{\alpha}e^{-t\beta}|^{q(t)}\frac{dt}{t}&=&\int_{0}^{1}t^{\alpha q(t)-1}e^{-t\beta q(t)}dt \leq\int_{0}^{1}t^{\alpha -1}dt<\infty, \end{eqnarray*} since $ \alpha,\beta>0$ and $0\leq t\leq 1.$ On the other hand, by making the change of variables $u=t\beta q_{-}$ \begin{eqnarray*} \int_{1}^{\infty}|t^{\alpha}e^{-t\beta}|^{q(t)}\frac{dt}{t}&=&\int_{1}^{\infty}t^{\alpha q(t)}e^{-t\beta q(t)}\frac{dt}{t}\\ &\leq&\int_{1}^{\infty}t^{\alpha q_{+}}e^{-t\beta q_{-}}\frac{dt}{t} \leq\int_{0}^{\infty}t^{\alpha q_{+}}e^{-t\beta q_{-}}\frac{dt}{t}\\ &=&\int_{0}^{\infty}(\frac{u}{\beta q_{-}})^{\alpha q_{+}}e^{-u}\frac{du}{u} =\frac{1}{(\beta q_{-})^{\alpha q_{+}}}\int_{0}^{\infty}u^{\alpha q_{+}-1}e^{-u}du\\ &=&\frac{1}{(\beta q_{-})^{\alpha q_{+}}}\Gamma(\alpha q_{+})<\infty . \end{eqnarray*} since $ \alpha,\beta>0$ and $q_{+}<\infty$. Thus, $\rho_{q(\cdot),\mu}(f)<\infty$, and therefore $$\|t^{\alpha}e^{-t\beta}\|_{q(\cdot),\mu}<\infty.$$ The proof of $ii)$ and $iii)$ are immediate. Now, in order to prove $iv)$, set $g=\chi_{[t_{0}/2,t_{0}]}$\\ \begin{eqnarray*} \rho_{q(\cdot),\mu}(g)&=&\int_{0}^{\infty}|g(t)|^{q(t)}\mu(dt)=\int_{t_{0}/2}^{t_{0}}\frac{dt}{t}=\ln 2<1. \end{eqnarray*} Then, $\lambda\geq 1$ implies $\rho_{q(\cdot),\mu}(\frac{g}{\lambda})\leq \rho_{q(\cdot),\mu}(g)\leq 1$. Thus, $\|g\|_{q(\cdot),\mu}\leq 1$.\\ On the other hand, taking $0<\lambda<1$ \begin{eqnarray*} \rho_{q(\cdot),\mu}(\frac{g}{\lambda})&=&\int_{t_{0}/2}^{t_{0}}\lambda^{-q(t)}\frac{dt}{t}\geq \int_{t_{0}/2}^{t_{0}}\lambda^{-q_{-}}\frac{dt}{t}=\lambda^{-q_{-}}(\ln 2)\\ \end{eqnarray*} then $\lambda<(\ln 2)^{1/q_{-}}$ implies $ \rho_{q(\cdot),\mu}(\frac{g}{\lambda})>1$. Therefore, $\rho_{q(\cdot),\mu}(\frac{g}{\lambda})\leq 1$ implies $\lambda\geq(\ln 2)^{1/q_{-}}$ and then $$\|g\|_{q(\cdot),\mu}\geq (\ln 2)^{1/q_{-}}.$$ \end{proof} In the case $\Omega=\mathbb{R}^{+}$, we denote $\mathcal{M}_{0,\infty}$ the set of all measurable functions $p(\cdot): \mathbb{R}^{+}\rightarrow \mathbb{R}^{+} $ which satisfy the following conditions: $i)$ $0\leq p_{-}\leq p_{+} <\infty$,\\ $ii_{0})$ there exists $p(0)=\displaystyle\lim_{x\rightarrow 0}p(x)$ and $|p(x)- p(0)|\leq \frac{A}{\ln(1/x)}, 0< x\leq 1/2$\\ $ii_{\infty})$ there exists $p(\infty)=\displaystyle\lim_{x\rightarrow \infty}p(x)$ and $|p(x)- p(\infty)|\leq \frac{A}{\ln(x)}, x>2$.\\ we denote $\mathcal{P}_{0,\infty}$ the subset of functions $p(\cdot)$ such that $p_{-}\geq 1$.\\ Let $\alpha(\cdot),\beta(\cdot)\in LH(\mathbb{R}^{+})$, bounded with \begin{equation}\label{alpha,p'} \displaystyle\alpha(0)<\frac{1}{p'(0)}, \alpha(\infty)<\frac{1}{p'(\infty)} \end{equation} and \begin{equation}\label{beta,p} \displaystyle\beta(0)>-\frac{1}{p(0)}, \beta(\infty)>-\frac{1}{p(\infty)} \end{equation} \begin{teo} Let $p(\cdot)\in\mathcal{P}_{0,\infty}$, $\alpha(\cdot),\beta(\cdot)\in LH(\mathbb{R}^{+})$, bounded. Then the Hardy-type inequalities \begin{equation}\label{hardyinequalityvariable0ax} \left\|x^{\alpha(x)-1}\int_{0}^{x}\frac{f(y)}{y^{\alpha(y)}}dy\right\|_{p(\cdot)}\leq C_{\alpha(\cdot),p(\cdot)}\|f\|_{p(\cdot)} \end{equation} \begin{equation}\label{hardyinequalityvariablexinfty} \left\|x^{\beta(x)}\int_{x}^{\infty}\frac{f(y)}{y^{\beta(y)+1}}dy\right\|_{p(\cdot)}\leq C_{\beta(\cdot),p(\cdot)}\|f\|_{p(\cdot)} \end{equation} are valid, if and only if, $\alpha(\cdot),\beta(\cdot)$ satisfy conditions (\ref{alpha,p'}) and (\ref{beta,p}) \end{teo} \begin{proof} For the proof see Theorem 3.1 and Remark 3.2 in \cite{dieningsamko}. \end{proof} As a consequence, we obtain the Hardy's inequalities associated to the exponent $q(\cdot)\in\mathcal{P}_{0,\infty}$ and the measure $\mu$. \begin{cor} Let $q(\cdot)\in\mathcal{P}_{0,\infty}$ and $r>0$, then \begin{equation}\label{hardyineq0atr}\displaystyle\left\|t^{-r}\int_{0}^{t}g(y)dy\right\|_{q(\cdot),\mu}\leq C_{r,q(\cdot)}\left\|y^{-r+1}g\right\|_{q(\cdot),\mu} \end{equation} and \begin{equation}\label{hardyineqtainftyr}\displaystyle\left\|t^{r}\int_{t}^{\infty}g(y)dy\right\|_{q(\cdot),\mu}\leq C_{r,q(\cdot)}\left\|y^{r+1}g\right\|_{q(\cdot),\mu} \end{equation} \end{cor} \begin{proof} Let $\alpha(t)=-r+\frac{1}{q'(t)}=-r+1-\frac{1}{q(t)},$ for any $t\in \mathbb{R}^{+}$, $f(y)=y^{\alpha(y)}g(y), $ for any $y\in \mathbb{R}^{+}$ then $\alpha(\cdot)\in LH(\mathbb{R}^{+})$ and bounded, $\alpha(0)=-r+\frac{1}{q'(0)}<\frac{1}{q'(0)}$ and $\alpha(\infty)=-r+\frac{1}{q'(\infty)}<\frac{1}{q'(\infty)}$. Then, using (\ref{normaq,dt/t}) and (\ref{hardyinequalityvariable0ax}) \begin{eqnarray*} \left\|t^{-r}\int_{0}^{t}g(y)dy\right\|_{q(\cdot),\mu}&=&\left\|t^{-r-\frac{1}{q(t)}}\int_{0}^{t}g(y)dy\right\|_{q(\cdot)}=\left\|t^{\alpha(t)-1}\int_{0}^{t}g(y)dy\right\|_{q(\cdot)}\\ &\leq&C_{r,q(\cdot)}\left\|y^{\alpha(y)}g\right\|_{q(\cdot)}= C_{r,q(\cdot)}\left\|y^{-r+1-\frac{1}{q(y)}}g\right\|_{q(\cdot)}\\ &=&C_{r,q(\cdot)}\left\|y^{-r+1}g\right\|_{q(\cdot),\mu}. \end{eqnarray*} On the other hand, by taking $\beta(t)=r-\frac{1}{q(t)}, \forall t\in \mathbb{R}^{+}$, $f(y)=y^{\beta(y)+1}g(y), \forall y\in \mathbb{R}^{+}$ then $\beta(\cdot)\in LH(\mathbb{R}^{+})$ and the proof of (\ref{hardyineqtainftyr}) is completely analogous. \end{proof} In what follows we will consider only Lebesgue variable spaces with respect to the Gaussian measure $\gamma_d,$ $L^{p(\cdot)}(\mathbb{R}^{d},\gamma_d).$ The next condition was introduced by E. Dalmasso and R. Scotto in \cite{DalSco} and it is crucial to deal with the Gaussian measure. \begin{defi}\label{defipgamma} Let $p(\cdot)\in\mathcal{P}(\mathbb{R}^{d},\gamma_{d})$, we say that $p(\cdot)\in\mathcal{P}_{\gamma_{d}}^{\infty}(\mathbb{R}^{d})$ if there exist constants $C_{\gamma_{d}}>0$ and $p_{\infty}\geq1$ such that \begin{equation} |p(x)-p_{\infty}|\leq\frac{C_{\gamma_{d}}}{|x|^{2}}, \end{equation} for $x\in\mathbb{R}^{d}\setminus\{(0,0,\ldots,0)\}.$ \end{defi} \begin{obs}\label{obs4.2} It can be proved that if $p(\cdot)\in\mathcal{P}_{\gamma_{d}}^{\infty}(\mathbb{R}^{d})$, then $p(\cdot)\in LH_{\infty}(\mathbb{R}^{d})$. \end{obs} \section{The main results} In this section we are going to define the variable Gaussian Besov-Lipschitz spaces and the variable Gaussian Triebel-Lizorkin spaces, which are the main goal of the paper.\\ The following two technical results are needed for defining variable Gaussian Besov-Lipschitz spaces. \begin{lem}\label{lematec3} Let $p(\cdot)\in\mathcal{P}_{\gamma_{d}}^{\infty}(\mathbb{R}^{d})\cap LH_{0}(\mathbb{R}^{d})$ and $f\in L^{p(\cdot)}(\gamma_d), \alpha\geq 0$ y $k,l$ integers greater than $\alpha$, then $$\left\|\frac{\partial^{k}u(\cdot,t)}{\partial t^{k}}\right\|_{p(\cdot),\gamma_d}\leq A_{k}t^{-k+\alpha}\, \mbox{if and only if} \, \,\left\|\frac{\partial^{l}u(\cdot,t)}{\partial t^{l}}\right\|_{p(\cdot),\gamma_d}\leq A_{l}t^{-l+\alpha}.$$ Moreover, if $A_{k}(f),A_{l}(f)$ are the smallest constants in the inequalities above then there exist constants $A_{k,l,\alpha,p(\cdot)}$ and $D_{k,l,\alpha}$ such that $$ A_{k,l,\alpha,p(\cdot)} A_{k}(f)\leq A_{l}(f)\leq D_{k,l,\alpha}A_{k}(f),$$ for all $f\in L^{p(\cdot)}(\gamma_d)$. \end{lem} \begin{proof} Let us suppose without loss of generality that $k\geq l$. We start by proving the direct implication. For this we use the representation of the Poisson-Hermite semigroup (\ref{02}), this is, $$P_{t}f(x)=\int_{0}^{+\infty}T_{s}f(x)\mu_{t}^{(1/2)}(ds).$$ Then, by differentiating $k$-times with respect to $t$ and by using the dominated convergence theorem, we get $$\frac{\partial^{k}P_{t}f(x)}{\partial t^{k}}=\int_{0}^{+\infty}T_{s}f(x) \frac{\partial^{k}\mu_{t}^{(1/2)}}{\partial t^{k}}(ds).$$ By using Lemma \ref{lematec5}, it's easy to prove that for all $m\in \mathbb{N}$ $$\lim_{t\rightarrow +\infty}\frac{\partial^{m}P_{t}f(x)}{\partial t^{m}}=0.$$ Now, given $n\in \mathbb{N}$, $ n>\alpha$ \begin{eqnarray*} -\int_{t}^{+\infty}\frac{\partial^{n+1}P_{s}f(x)}{\partial s^{n+1}}ds&=&-\lim_{s\rightarrow +\infty}\frac{\partial^{n}P_{s}f(x)}{\partial s^{n}}+\frac{\partial^{n}P_{t}f(x)}{\partial t^{n}}\\ &=&\frac{\partial^{n}P_{t}f(x)}{\partial t^{n}}. \end{eqnarray*} Thus, for Minkowski's integral inequality (\ref{integralMinkowski}) \begin{eqnarray*} \left\|\frac{\partial^{n}u(\cdot,t)}{\partial t^{n}}\right\|_{p(\cdot),\gamma_d} &\leq&4 \int_{t}^{+\infty}\left\|\frac{\partial^{n+1}u(\cdot,s)}{\partial s^{n+1}}\right\|_{p(\cdot),\gamma_d}ds \leq 4\int_{t}^{+\infty}A_{n+1}(f)s^{-(n+1)+\alpha}ds\\ &=&4\frac{A_{n+1}(f)}{n-\alpha}t^{-n+\alpha}. \end{eqnarray*} Therefore $$A_{n}(f)\leq 4\frac{A_{n+1}(f)}{n-\alpha},$$ and, since $n>\alpha$ is arbitrary, then, by using the above result $k-l$ times, we obtain \begin{eqnarray*} A_{l}(f)&\leq&4\frac{A_{l+1}(f)}{l-\alpha}\leq 4^{2}\frac{A_{l+2}(f)}{(l-\alpha)(l+1-\alpha)}\\ &\leq&...\leq 4^{k-l}\frac{A_{k}(f)}{(l-\alpha)(l+1-\alpha)...(k-1-\alpha)}= D_{k,l,\alpha}A_{k}(f). \end{eqnarray*} To prove the converse, we use again the representation (\ref{02}) and we obtain that $$u(x,t_{1}+t_{2})=P_{t_{1}}(P_{t_{2}}f)(x)=\displaystyle\int_{0}^{+\infty}T_{s}(P_{t_{2}}f)(x)\mu_{t_{1}}^{\frac{1}{2}}(ds).$$ Thus, taking $t=t_{1}+t_{2}$ and differentiating $l$ times with respect to $t_{2}$ and $k-l$ times with respect to $t_{1}$, we get \begin{equation}\label{PoissonkDev} \displaystyle\frac{\partial^{k}u(x,t)}{\partial t^{k}}=\int_{0}^{+\infty}T_{s} (\frac{\partial^{l}P_{t_{2}}f(x)}{\partial t_{2}^{l}})\frac{\partial^{k-l}\mu_{t_{1}}^{\frac{1}{2}}}{\partial t_{1}^{k-l}} (ds). \end{equation} Then, by Corollary \ref{corol1}, Minkowski's integral inequality (\ref{integralMinkowski}) and the $L^{p(\cdot)}$-boundedness of the Ornstein-Uhlenbeck semigroup (see \cite{MorPinUrb}), we get \begin{eqnarray*} \left\|\frac{\partial^{k}u(\cdot,t)}{\partial t^{k}}\right\|_{p(\cdot),\gamma_d}&\leq&4\int_{0}^{+\infty}\left\|T_{s} \left(\frac{\partial^{l}P_{t_{2}}f}{\partial t_{2}^{l}}\right)\right\|_{p(\cdot),\gamma_d}\left|\frac{\partial^{k-l} \mu_{t_{1}}^{\frac{1}{2}}}{\partial t_{1}^{k-l}}(ds)\right|\\ &\leq&4C_{p(\cdot)}\left\|\frac{\partial^{l}P_{t_{2}}f}{\partial t_{2}^{l}}\right\|_{p(\cdot),\gamma_d}\int_{0}^{+\infty}\left|\frac{\partial^{k-l} \mu_{t_{1}}^{\frac{1}{2}}}{\partial t_{1}^{k-l}}(ds)\right|\\ &\leq&4C_{p(\cdot)}\left\|\frac{\partial^{l}}{\partial t_{2}^{l}}P_{t_{2}}f\right\|_{p(\cdot),\gamma_d}C_{k-l}t_{1}^{l-k} \leq 4C_{p(\cdot)} A_{l}(f)C_{k-l}t_{2}^{-l+\alpha}t_{1}^{l-k}. \end{eqnarray*} Therefore, taking $t_{1}=t_{2}=\frac{t}{2}$, $$\displaystyle\left\|\frac{\partial^{k}u(\cdot,t)}{\partial t^{k}}\right\|_{p(\cdot),\gamma_d}\leq 4C_{p(\cdot)} A_{l}(f)C_{k-l}(\frac{t}{2})^{-k+\alpha}.$$ Thus $$\displaystyle A_{k}(f)\leq 4C_{p(\cdot)}\frac{C_{k-l}}{2^{-k+\alpha}} A_{l}(f).$$ \end{proof} \begin{lem}\label{lematec4} Let $p(\cdot)\in\mathcal{P}_{\gamma_{d}}^{\infty}(\mathbb{R}^{d})\cap LH_{0}(\mathbb{R}^{d})$ and $q(\cdot)\in\mathcal{P}_{0,\infty}$. Let $\alpha\geq 0$ and $k,l$ integers greater than $\alpha$. Then $$\left\|t^{k-\alpha}\left\|\frac{\partial^{k}u(\cdot,t)}{\partial t^{k}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu}<\infty$$ if and only if $$\left\|t^{l-\alpha}\left\|\frac{\partial^{l}u(\cdot,t)}{\partial t^{l}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu}<\infty. $$ Moreover, there exist constants $A_{k,l,\alpha,p(\cdot)}$ and $D_{k,l,\alpha,q(\cdot)}$ such that \begin{eqnarray*} D_{k,l,\alpha,q(\cdot)}\left\|t^{l-\alpha}\left\|\frac{\partial^{l}u(\cdot,t)}{\partial t^{l}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu} &\leq&\left\|t^{k-\alpha}\left\|\frac{\partial^{k}u(\cdot,t)}{\partial t^{k}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu}\\ &\leq&A_{k,l,\alpha,p(\cdot)}\left\|t^{l-\alpha}\left\|\frac{\partial^{l}u(\cdot,t)}{\partial t^{l}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu}, \end{eqnarray*} for all $f\in L^{p(\cdot)}(\gamma_d)$. \end{lem} \begin{proof} Suppose without loss of generality that $k\geq l$. We prove first the converse implication; by proceeding as in lemma \ref{lematec3}, taking $t_{1}=t_{2}=\frac{t}{2}$, we have \begin{eqnarray*} \left\|\frac{\partial^{k}u(\cdot,t)}{\partial t^{k}}\right\|_{p(\cdot),\gamma_d}&\leq&4C_{p(\cdot)}\left\|\frac{\partial^{l}P_{t_{2}}f}{\partial t_{2}^{l}}\right\|_{p(\cdot),\gamma_d} C_{k-l}t_{1}^{l-k}, \,\\ &=&4C_{p(\cdot)}\left\|\frac{\partial^{l}P_{\frac{t}{2}}f}{\partial (\frac{t}{2})^{l}}\right\|_{p(\cdot),\gamma_d}C_{k-l}(\frac{t}{2})^{l-k}. \end{eqnarray*} Thus \begin{eqnarray*} \left\|t^{k-\alpha}\left\|\frac{\partial^{k}u(\cdot,t)}{\partial t^{k}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu}&\leq&4C_{p(\cdot)}\frac{C_{k-l}}{2^{l-k}} \left\|t^{l-\alpha}\left\|\frac{\partial^{l}u(\cdot,\frac{t}{2})}{\partial (\frac{t}{2})^{l}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu}\\ &=&A_{k,l,\alpha,p(\cdot)}\left\|s^{l-\alpha}\left\|\frac{\partial^{l}u(\cdot,s)}{\partial s^{l}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu}. \end{eqnarray*} with $\displaystyle A_{k,l,\alpha,p(\cdot)}=4C_{p(\cdot)}C_{k-l} 2^{k-\alpha}$.\\ For the direct implication, given $n\in \mathbb{N}$, $ n>\alpha$, again, as in the above lemma $$\left\|\frac{\partial^{n}u(\cdot,t)}{\partial t^{n}}\right\|_{p(\cdot),\gamma_d}\leq 4\int_{t}^{+\infty}\left\|\frac{\partial^{n+1}u(\cdot,s)}{\partial s^{n+1}}\right\|_{p(\cdot),\gamma_d}ds.$$ Therefore, by the Hardy's inequality (\ref{hardyineqtainftyr}) \begin{eqnarray*} \left\|t^{n-\alpha}\left\|\frac{\partial^{n}u(\cdot,t)}{\partial t^{n}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu} &\leq&4\left\|t^{n-\alpha}\int_{t}^{+\infty}\left\|\frac{\partial^{n+1}u(\cdot,s)}{\partial s^{n+1}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu}\\ &\leq&4C_{n,\alpha,q(\cdot)}\left\|s^{n+1-\alpha}\left\|\frac{\partial^{n+1}u(\cdot,s)}{\partial s^{n+1}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu} \end{eqnarray*} Now, since $n>\alpha$ is arbitrary, by using the previous result $k-l$ times, we obtain \begin{eqnarray*} \left\|t^{l-\alpha}\left\|\frac{\partial^{l}u(\cdot,t)}{\partial t^{l}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu} &\leq&4C_{l,\alpha,q(\cdot)}\left\|t^{l+1-\alpha}\left\|\frac{\partial^{l+1}u(\cdot,t)}{\partial t^{l+1}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu}\\ &\leq&4^{2}C_{l,\alpha,q(\cdot)}C_{l+1,\alpha,q(\cdot)}\left\|t^{l+2-\alpha}\left\|\frac{\partial^{l+2}u(\cdot,t)}{\partial t^{l+2}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu}\\ &\vdots&\\ &\leq&D_{k,l,\alpha,q(\cdot)}\left\|t^{k-\alpha}\left\| \frac{\partial^{k}u(\cdot,t)}{\partial t^{k}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu} \end{eqnarray*} where $\displaystyle D_{k,l,\alpha,q(\cdot)}=4^{k-l}C_{l,\alpha,q(\cdot)}\cdots C_{k-1,\alpha,q(\cdot)}$. \end{proof} The next technical result will be the key to define the variable Gaussian Triebel-Lizorkin spaces. \begin{lem}\label{TLind} Let $p(\cdot)\in\mathcal{P}_{\gamma_{d}}^{\infty}(\mathbb{R}^{d})\cap LH_{0}(\mathbb{R}^{d})$ and $q(\cdot)\in\mathcal{P}_{0,\infty}$. Let $\alpha \geq 0$ and $k,l$ integers greater than $\alpha$. Then $$ \left\|\left\|t^{k-\alpha}\left|\frac{\partial^{k}}{\partial t^{k}}P_{t}f\right|\right\|_{q(\cdot),\mu}\right\|_{p(\cdot),\gamma_d}<\infty $$ if and only if $$\left\|\left\|t^{l-\alpha}\left|\frac{\partial^{l}}{\partial t^{l}}P_{t}f\right|\right\|_{q(\cdot),\mu}\right\|_{p(\cdot),\gamma_d}<\infty. $$ Moreover, there exist constants $A_{k,l,\alpha,p(\cdot)}, D_{k,l,\alpha,q(\cdot)}$ such that \begin{eqnarray*} D_{k,l,\alpha,q(\cdot)} \left\|\left\|t^{l-\alpha}\left|\frac{\partial^{l}}{\partial t^{l}}P_{t}f\right|\right\|_{q(\cdot),\mu}\right\|_{p(\cdot),\gamma_d}&\leq&\left\|\left\|t^{k-\alpha}\left| \frac{\partial^{k}}{\partial t^{k}}P_{t}f\right|\right\|_{q(\cdot),\mu}\right\|_{p(\cdot),\gamma_d} \\ &\leq& A_{k,l,\alpha,p(\cdot)} \left\|\left\|t^{l-\alpha}\left|\frac{\partial^{l}}{\partial t^{l}}P_{t}f\right|\right\|_{q(\cdot),\mu}\right\|_{p(\cdot),\gamma_d}, \end{eqnarray*} for all $f\in L^{p(\cdot)}(\gamma_d)$. \end{lem} \begin{proof} Suppose without loss of generality that $k\geq l$. Let $n\in \mathbb{N}$ such that $n>\alpha$, we can prove that $$\left|\frac{\partial^{n}}{\partial t^{n}}P_{t}f(x)\right|\leq\int_{t}^{+\infty}\left|\frac{\partial^{n+1}}{\partial s^{n+1}}P_{s}f(x)\right|ds \quad.$$ Then, by the Hardy's inequality (\ref{hardyineqtainftyr}), \begin{eqnarray*} \left\|t^{n-\alpha}\left|\frac{\partial^{n}}{\partial t^{n}}P_{t}f(x)\right|\right\|_{q(\cdot),\mu} &\leq&\left\|t^{n-\alpha}\int_{t}^{+\infty}\left|\frac{\partial^{n+1}}{\partial s^{n+1}}P_{s}f(x)\right|ds\right\|_{q(\cdot),\mu}\\ &\leq&C_{n,\alpha,q(\cdot)}\left\|s^{n+1-\alpha}\left|\frac{\partial^{n+1}}{\partial s^{n+1}}P_{s}f(x)\right|\right\|_{q(\cdot),\mu} \end{eqnarray*} Now, since $n>\alpha$ is arbitrary, by iterating the previous argument $k-l$ times, we obtain \begin{eqnarray*} \left\|t^{l-\alpha}\left|\frac{\partial^{l}}{\partial t^{l}}P_{t}f(x)\right|\right\|_{q(\cdot),\mu} &\leq&C_{l,\alpha,q(\cdot)}\left\|t^{l+1-\alpha}\left|\frac{\partial^{l+1}}{\partial t^{l+1}}P_{t}f(x)\right|\right\|_{q(\cdot),\mu}\\ &\leq&C_{l,\alpha,q(\cdot)}C_{l+1,\alpha,q(\cdot)}\left\|t^{l+2-\alpha}\left|\frac{\partial^{l+2}}{\partial t^{l+2}}P_{t}f(x)\right|\right\|_{q(\cdot),\mu}\\ &\vdots&\\ &\leq&C_{k,l,\alpha,q(\cdot)}\left\|t^{k-\alpha}\left| \frac{\partial^{k}}{\partial t^{k}}P_{t}f(x)\right|\right\|_{q(\cdot),\mu} \end{eqnarray*} where $\displaystyle C_{k,l,\alpha,q(\cdot)}=C_{l,\alpha,q(\cdot)} C_{l+1,\alpha,q(\cdot)}\cdots C_{k-1,\alpha,q(\cdot)}.$ Thus, \begin{eqnarray*} D_{k,l,\alpha,q(\cdot)}\left\|\left\|t^{l-\alpha}\left|\frac{\partial^{l}}{\partial t^{l}}P_{t}f\right|\right\|_{q(\cdot),\mu}\right\|_{p(\cdot),\gamma_d}&\leq&\left\|\left\|t^{k-\alpha}\left| \frac{\partial^{k}}{\partial t^{k}}P_{t}f\right|\right\|_{q(\cdot),\mu}\right\|_{p(\cdot),\gamma_d}, \end{eqnarray*} where $D_{k,l,\alpha,q(\cdot)} = 1/C_{k,l,\alpha,q(\cdot)}.$\\ The other inequality is obtain from the case $k=l+1$ by an inductive argument. Let $t_{1},t_{2}>0$ and take $t=t_{1}+t_{2}$, from (\ref{PoissonkDev}) we get $$\frac{\partial^{k}u(x,t)}{\partial t^{k}}=\int_{0}^{+\infty}T_{s} \left(\frac{\partial^{l}P_{t_{2}}f(x)}{\partial t_{2}^{l}}\right)\frac{\partial^{k-l}}{\partial t_{1}^{k-l}} \mu_{t_{1}}^{(1/2)}(ds),$$ and since, $\displaystyle\frac{\partial }{\partial t_{1}}\mu_{t_{1}}^{(1/2)} (ds)=\big(t_{1}^{-1}-\frac{t_{1}}{2s}\big)\mu_{t_{1}}^{(1/2)}(ds)$ we obtain \begin{eqnarray*} \left|\displaystyle\frac{\partial^{k}u(x,t)}{\partial t^{k}}\right|&\leq&\int_{0}^{+\infty}T_{s} \left(\left|\frac{\partial^{l}P_{t_{2}}f(x)}{\partial t_{2}^{l}}\right|\right) |\big(t_{1}^{-1}-\frac{t_{1}}{2s}\big)|\mu_{t_{1}}^{(1/2)}(ds)\\ &\leq&t_{1}^{-1}\int_{0}^{+\infty}T_{s} \left(\left|\frac{\partial^{l}P_{t_{2}}f(x)}{\partial t_{2}^{l}}\right|\right)\mu_{t_{1}}^{(1/2)}(ds)\\ && \hspace{3.2cm}+\frac{t_{1}}{2}\int_{0}^{+\infty}T_{s} \left(\left|\frac{\partial^{l}P_{t_{2}}f(x)}{\partial t_{2}^{l}}\right|\right)\frac{1}{s} \mu_{t_{1}}^{(1/2)}(ds). \end{eqnarray*} Therefore \begin{eqnarray*} \left\|t_{2}^{k-\alpha}\left|\displaystyle\frac{\partial^{k}u(x,t)}{\partial t^{k}}\right|\right\|_{q(\cdot),\mu}&\leq&\left\|t_{2}^{k-\alpha}t_{1}^{-1} \int_{0}^{+\infty}T_{s} \left(\left|\frac{\partial^{l}P_{t_{2}}f(x)}{\partial t_{2}^{l}}\right|\right)\mu_{t_{1}}^{(1/2)}(ds)\right\|_{q(\cdot),\mu}\\ &&\hspace{.15cm} + \left\|t_{2}^{k-\alpha}\frac{t_{1}}{2}\int_{0}^{+\infty}T_{s} \left(\left|\frac{\partial^{l}P_{t_{2}}f(x)}{\partial t_{2}^{l}}\right|\right)\frac{1}{s} \mu_{t_{1}}^{(1/2)}(ds)\right\|_{q(\cdot),\mu}.\\ &=&(I) + (II). \end{eqnarray*} Now, by using Minkowski's integral inequality twice (\ref{integralMinkowski}) (since $T_{s}$ is an integral transformation with positive kernel) and the fact that $\mu_{t_{1}}^{(1/2)}(ds)$ is a probability measure, we get \begin{eqnarray*} (I)&=&\left\|\big(t_{2}^{k-\alpha}t_{1}^{-1}\int_{0}^{+\infty}T_{s} \left(\left|\frac{\partial^{l}P_{t_{2}}f(x)}{\partial t_{2}^{l}}\right|\right)\mu_{t_{1}}^{(1/2)}(ds)\right\|_{q(\cdot),\mu}\\ &\leq& 4\int_{0}^{+\infty}\left\|t_{2}^{k-\alpha}t_{1}^{-1}T_{s} \left(\left|\frac{\partial^{l}P_{t_{2}}f(x)}{\partial t_{2}^{l}}\right|\right)\right\|_{q(\cdot),\mu}\mu_{t_{1}}^{(1/2)}(ds)\\ &\leq&16\int_{0}^{+\infty}T_{s}\left(\left\|t_{2}^{k-\alpha}t_{1}^{-1}\left|\frac{\partial^{l}P_{t_{2}}f(x)}{\partial t_{2}^{l}}\right|\right\|_{q(\cdot),\mu}\right)\mu_{t_{1}}^{(1/2)}(ds)\\ &\leq&16 T^{\ast} \left(\left\|t_{2}^{k-\alpha}t_{1}^{-1}\left|\frac{\partial^{l}P_{t_{2}}f(x)}{\partial t_{2}^{l}}\right|\right\|_{q(\cdot),\mu}\right). \end{eqnarray*} For (II) we proceed in analogous way, and by using Lemma \ref{lematec2} we get \begin{eqnarray*} (II)&\leq&\frac{16}{2}T^{\ast}\left(\left\|t_{2}^{k-\alpha}t_{1}\left|\frac{\partial^{l}P_{t_{2}}f(x)}{\partial t_{2}^{l}}\right|\right\|_{q(\cdot),\mu}\right)\int_{0}^{+\infty}\frac{1}{s}\mu_{t_{1}}^{(1/2)}(ds)\\ &=&8T^{\ast}\left(\left\|t_{2}^{k-\alpha}t_{1} \left|\frac{\partial^{l}P_{t_{2}}f(x)}{\partial t_{2}^{l}}\right|\right\|_{q(\cdot),\mu}\right) C_{1}\frac{1}{t_{1}^{2}}. \end{eqnarray*} Now, since $T^{\ast}$ is defined as a supremum, we get \begin{eqnarray*} (II) &\leq& 8C_{1}T^{\ast}\left(\left\|t_{2}^{k-\alpha}t_{1}^{-1}\left|\frac{\partial^{l}P_{t_{2}}f(x)}{\partial t_{2}^{l}}\right|\right\|_{q(\cdot),\mu}\right). \end{eqnarray*} Then, taking $t_{1}=t_{2}=\frac{t}{2}$ and the change of variable $s=\frac{t}{2}$, we have \begin{eqnarray*} (I)&\leq&16T^{\ast}\left(\left\|s^{l-\alpha}\left|\frac{\partial^{l}P_{s}f(x)}{\partial s^{l}}\right|\right\|_{q(\cdot),\mu}\right) \end{eqnarray*} and \begin{eqnarray*} (II) &\leq&8C_1 T^{\ast}\left(\left\|s^{l-\alpha}\left|\frac{\partial^{l}P_{s}f(x)}{\partial s^{l}}\right|\right\|_{q(\cdot),\mu}\right) \end{eqnarray*} Therefore, by the $L^{p(\cdot)}(\gamma_d)$-boundedness of $T^*$ (see \cite{MorPinUrb}), \begin{eqnarray*} \left\|\left\|t^{k-\alpha}\left|\displaystyle\frac{\partial^{k}u(\cdot,t)}{\partial t^{k}}\right|\right\|_{q(\cdot),\mu}\right\|_{p(\cdot),\gamma_d}&\leq&2^{k-\alpha}16\left\|T^{\ast}\left(\left\|s^{l-\alpha}\left|\frac{\partial^{l}P_{s}f}{\partial s^{l}}\right|\right\|_{q(\cdot),\mu}\right)\right\|_{p(\cdot),\gamma_d}\\ &+&2^{k-\alpha}8C_1\left\|T^{\ast}\left(\left\|s^{l-\alpha}\left|\frac{\partial^{l}P_{s}f}{\partial s^{l}}\right|\right\|_{q(\cdot),\mu}\right)\right\|_{p(\cdot),\gamma_d}\\ &\leq&2^{k-\alpha}C_{p(\cdot)}(16+8C_{1})\left\|\left\|s^{l-\alpha}\left|\frac{\partial^{l}P_{s}f}{\partial s^{l}}\right|\right\|_{q(\cdot),\mu}\right\|_{p(\cdot),\gamma_d}. \end{eqnarray*} \end{proof} Next, we need the following technical result for the $L^{p(\cdot)}(\gamma_d)$-norms of the derivatives of the Poisson-Hermite semigroup: \begin{lem}\label{kdecay} Let $p(\cdot)\in\mathcal{P}_{\gamma_{d}}^{\infty}(\mathbb{R}^{d})\cap LH_{0}(\mathbb{R}^{d})$. Suppose that $f\in L^{p(\cdot)}(\gamma_d)$, then for any integer $k$, $\displaystyle\left\|\frac{\partial^{k}}{\partial t^{k}}P_t f\right\|_{p(\cdot),\gamma_{d}}\leq C_{p(\cdot)}\left\|\frac{\partial^{k}}{\partial s^{k}}P_s f\right\|_{p(\cdot),\gamma_{d}}$, for whatever $0<s<t<+\infty$. Moreover, \begin{equation}\label{kdecayine} \left\|\frac{\partial^{k}}{\partial t^{k}}P_t f\right\|_{p(\cdot),\gamma_d}\leq \frac{C_{k,p(\cdot)}}{t^{k}} \|f\|_{p(\cdot),\gamma_d}, \quad t>0 \quad . \end{equation} \end{lem} \begin{proof} First, let us consider the case $k=0$. Fixed $t_{1},t_{2}>0$, by using the semigroup property of $\{P_{t}\}$, we get $$ P_{t_{1}+t_{2}}f(x) =P_{t_{1}}(P_{t_{2}}f(x)) $$ Thus, by the $L^{p(\cdot)}$-boundedness of $\{P_{t}\}$ (see \cite{MorPinUrb}), $$\|P_{t_{1}+t_{2}}f\|_{p(\cdot),\gamma_d}\leq C_{p(\cdot)}\|P_{t_{2}}f\|_{p(\cdot),\gamma_{d}}.$$ In order to prove the general case, $k >0$, using the dominated convergence theorem and differentiating the identity $u(x,t_{1}+t_{2})=P_{t_{1}}(u(x,t_{2}))$ $k$-times with respect to $t_{2}$ we obtain $$ \frac{\partial^{k}u(x,t_{1}+t_{2})}{\partial (t_{1}+t_{2})^{k}}=P_{t_{1}}\left(\frac{\partial^{k}u(x,t_{2})}{\partial t_{2}^{k}}\right)$$ and then we proceed as in the previous argument. In other to prove (\ref{kdecayine}) we use again the representation (\ref{02}) of the Poisson-Hermite semigroup and differentiating $k$-times with respect to $t$ to obtain $$\frac{\partial^{k}}{\partial t^{k}}u(x,t)=\int_{0}^{+\infty}T_{s}f(x) \frac{\partial^{k}}{\partial t^{k}}\mu_{t}^{(1/2)}(ds).$$ Thus, by the Minkowski's integral inequality, the $L^{p(\cdot)}$-boundedness of the Ornstein-Uhlenbeck semigroup (see \cite{MorPinUrb}) and the Corollary \ref{corol1} , for $t>0$ \begin{eqnarray*} \left\|\frac{\partial^{k}u(\cdot,t)}{\partial t^{k}}\right\|_{p(\cdot),\gamma_d}&\leq&4\int_{0}^{+\infty}\left\|T_{s}f \frac{\partial^{k}\mu_{t}^{(1/2)}}{\partial t^{k}}(ds)\right\|_{p(\cdot),\gamma_d}\\ &=&4\int_{0}^{+\infty}\|T_{s}f\|_{p(\cdot),\gamma_d}\left|\frac{\partial^{k}\mu_{t}^{(1/2)}}{\partial t^{k}}(ds)\right|\\ &\leq&4C_{p(\cdot)}\|f\|_{p(\cdot),\gamma_d}\int_{0}^{+\infty}\left|\frac{\partial^{k} \mu_{t}^{(1/2)}}{\partial t^{k}}(ds)\right| \leq \frac{C_{k,p(\cdot)}}{t^{k}} \|f\|_{p(\cdot),\gamma_d}. \end{eqnarray*} \end{proof} The Lipschitz spaces can be generalized of the following way (see, for example \cite{Pinurb}, \cite{st1},\cite{trie1},\cite{trie2}), using the Poisson-Hermite semigroup.\\ We are ready to define the variable Gaussian Besov-Lipschitz spaces $B_{p(\cdot),q(\cdot)}^{\alpha}(\gamma_d)$, also called Gaussian Besov-Lipschitz spaces with variable exponents or variable Besov-Lipschitz spaces for expansions in Hermite polinomials. \begin{defi} Let $p(\cdot)\in\mathcal{P}_{\gamma_{d}}^{\infty}(\mathbb{R}^{d})\cap LH_{0}(\mathbb{R}^{d})$ and $q(\cdot)\in\mathcal{P}_{0,\infty}$. Let $\alpha \geq 0$, $k$ the smallest integer greater than $\alpha$. The variable Gaussian Besov-Lipschitz space $B_{p(\cdot),q(\cdot)}^{\alpha}(\gamma_d)$ is defined as the set of functions $f \in L^{p(\cdot)}(\gamma_d)$ such that \begin{equation}\label{e15} \left\|t^{k-\alpha} \left\| \frac{\partial^{k}P_t f}{\partial t^{k}} \right\|_{p(\cdot),\gamma_d} \right\|_{q(\cdot),\mu} < \infty. \end{equation} The norm of $f \in B_{p(\cdot),q(\cdot)}^{\alpha}(\gamma_d)$ is defined as \begin{equation} \left\| f \right\|_{B_{p(\cdot),q(\cdot)}^{\alpha}}: = \left\| f \right\|_{p(\cdot), \gamma_d} +\left\|t^{k-\alpha} \left\| \frac{\partial^{k} P_t f}{\partial t^{k}} \right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu} . \end{equation} The variable Gaussian Besov-Lipschitz space $B_{p(\cdot),\infty}^{\alpha}(\gamma_d)$ is defined as the set of functions $f \in L^{p(\cdot)}(\gamma_d)$ for which there exists a constant $A$ such that $$\left\|\frac{\partial^{k}P_t f}{\partial t^{k}}\right\|_{p(\cdot),\gamma_d}\leq At^{-k+\alpha}$$ and then the norm of $f \in B_{p(\cdot),\infty}^{\alpha}(\gamma_d)$ is defined as \begin{equation} \left\| f \right\|_{B_{p(\cdot),\infty}^{\alpha}}: = \left\| f \right\|_{p(\cdot),\gamma_d} +A_{k}(f), \end{equation} where $A_{k}(f)$ is the smallest constant $A$ in the above inequality. \end{defi} Lemmas \ref{lematec3} and \ref{lematec4} show that we could have replaced $k$ with any other integer $l$ greater than $\alpha$ and the resulting norms are equivalents.\\ Now, let us study some inclusion relations between variable Gaussian Besov-Lipschitz spaces. The next result is analogous to Proposition 10, page 153 in \cite{st1} (see also \cite{Pinurb} or Proposition 7.36 in \cite{urbina2019} ). \begin{prop} \label{incluBesov} Let $p(\cdot)\in\mathcal{P}_{\gamma_{d}}^{\infty}(\mathbb{R}^{d})\cap LH_{0}(\mathbb{R}^{d})$ and $q_{1}(\cdot),q_{2}(\cdot)\in\mathcal{P}_{0,\infty}$. The inclusion $B_{p(\cdot),q_1(\cdot)}^{\alpha_{1}}(\gamma_d)\subset B_{p(\cdot),q_2(\cdot)}^{\alpha_{2}}(\gamma_d)$ holds if: \begin{enumerate} \item [i)] $\alpha_{1}>\alpha_{2}>0$ ( $q_{1}(\cdot)$ y $q_{2}(\cdot)$ not need to be related), or \item[ii)] If $\alpha_{1}=\alpha_{2}$ and $q_{1}(t)\leq q_{2}(t)$ a.e. \end{enumerate} \end{prop} \begin{proof} To prove part $ii)$, let us take $\alpha$ the common value of $\alpha_{1}$ and $\alpha_{2}$.\\ Let $f\in B_{p(\cdot),q_1(\cdot)}^{\alpha}$ and set $A=\displaystyle\left\|t^{k-\alpha}\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\right\|_{q_{1}(\cdot),\mu}$.\\ Fixed $t_{0}>0$ $$\left\|\chi_{[\frac{t_{0}}{2},t_{0}]}t^{k-\alpha}\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\right\|_{q_{1}(\cdot),\mu}\leq A.$$ However, by Lemma \ref{kdecay},$$\displaystyle\left\|\frac{\partial^{k}P_{t_{0}} f}{\partial t_{0}^{k} }\right\|_{p(\cdot),\gamma_d}\leq C_{p(\cdot)}\left\|\frac{\partial^{k}P_{t} f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\quad t\in [\frac{t_{0}}{2},t_{0}].$$ Thus, we obtain \begin{eqnarray*} \left\|\frac{\partial^{k}P_{t_{0}} f}{\partial t_{0}^{k} }\right\|_{p(\cdot),\gamma_d}\left\|\chi_{[\frac{t_{0}}{2},t_{0}]}t^{k-\alpha}\right\|_{q_{1}(\cdot),\mu}&\leq& C_{p(\cdot)}\left\|\chi_{[\frac{t_{0}}{2},t_{0}]}t^{k-\alpha}\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\right\|_{q_{1}(\cdot),\mu}\\ &\leq& C_{p(\cdot)}A. \end{eqnarray*} Therefore, \begin{eqnarray*} (\frac{t_{0}}{2})^{k-\alpha}\left\|\frac{\partial^{k}P_{t_{0}} f}{\partial t_{0}^{k} }\right\|_{p(\cdot),\gamma_d}\left\|\chi_{[\frac{t_{0}}{2},t_{0}]}\right\|_{q_{1}(\cdot),\mu}&\leq&\left\|\frac{\partial^{k}P_{t_{0}} f}{\partial t_{0}^{k} }\right\|_{p(\cdot),\gamma_d}\left\|\chi_{[\frac{t_{0}}{2},t_{0}]}t^{k-\alpha}\right\|_{q_{1}(\cdot),\mu}\\ &\leq& C_{p(\cdot)}A \end{eqnarray*} and by Lemma \ref{desigualdadesnormamu} \begin{eqnarray*} (\frac{t_{0}}{2})^{k-\alpha}\left\|\frac{\partial^{k}P_{t_{0}} f}{\partial t_{0}^{k} }\right\|_{p(\cdot),\gamma_d}(\ln 2)^{1/q_{1}^{-}}&\leq&(\frac{t_{0}}{2})^{k-\alpha}\left\|\frac{\partial^{k}P_{t_{0}} f}{\partial t_{0}^{k} }\right\|_{p(\cdot),\gamma_d}\left\|\chi_{[\frac{t_{0}}{2},t_{0}]}\right\|_{q_{1}(\cdot),\mu}\\ &\leq& C_{p(\cdot)}A \end{eqnarray*} Then, $$\displaystyle\left\|\frac{\partial^{k}P_{t_{0}} f}{\partial t_{0}^{k}}\right\|_{p(\cdot),\gamma_d}\leq\frac{ C_{p(\cdot)}2^{k-\alpha}}{(\ln 2)^{1/q_{1}^{-}}}At_{0}^{-k+\alpha},$$ and since $t_{0}$ is arbitrary $$\displaystyle\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\leq C_{k,\alpha,p(\cdot)q_{1}(\cdot)}At^{-k+\alpha},$$ for all $t>0$. In other words, $f\in B_{p(\cdot),q_1(\cdot)}^{\alpha}$ implies that $f\in B_{p(\cdot),\infty}^{\alpha}$.\\ Now, let us take $g(t)=\displaystyle t^{k-\alpha}\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}$, then $\rho_{q_{1}(\cdot),\mu}(g)<\infty$, since, $f\in B_{p(\cdot),q_1(\cdot)}^{\alpha}$. Thus, as $q_{2}(t)\geq q_{1}(t)\;\text{ a.e.}$ \begin{eqnarray*} \rho_{q_{2}(\cdot),\mu}(g)&=&\int_{0}^{+\infty}\left(t^{k-\alpha}\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\right)^{q_{2}(t)}\frac{dt}{t}\\ &=&\int_{0}^{+\infty}\left(t^{k-\alpha}\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\right)^{q_{2}(t)-q_{1}(t)}\left(t^{k-\alpha}\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\right)^{q_{1}(t)}\frac{dt}{t}\\ &\leq&(C_{k,\alpha,p(\cdot)q_{1}(\cdot)}A)^{q_{2}^{+}-q_{1}^{-}}\int_{0}^{+\infty}\left(t^{k-\alpha}\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\right)^{q_{1}(t)}\frac{dt}{t}\\ &=&(C_{k,\alpha,p(\cdot)q_{1}(\cdot)}A)^{q_{2}^{+}-q_{1}^{-}}\rho_{q_{1}(\cdot),\mu}(g)<+\infty. \end{eqnarray*} Hence, $f\in B_{p(\cdot),q_2(\cdot)}^{\alpha}$. In order to prove part $i)$, by Lemma \ref{kdecay}, we obtain $$\left\|\frac{\partial^{k}P_t f}{\partial t^{k}}\right\|_{p(\cdot),\gamma_d}\leq C_{k,p(\cdot)}t^{-k}, \, t>0.$$ Now, given $f\in B_{p(\cdot),q_1(\cdot)}^{\alpha_{1}}$, again by setting $$A=\left\|t^{k-\alpha_{1}}\left\|\frac{\partial^{k}P_t f}{\partial t^{k}}\right\|_{p(\cdot),\gamma_d}\right\|_{q_{1}(\cdot),\mu},$$ we obtain, as in part $ii)$, $$\displaystyle\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\leq C_{k,\alpha_{1},p(\cdot)q_{1}(\cdot)}At^{-k+\alpha_{1}},$$ for all $t>0$. Therefore, \begin{eqnarray*} \left\|t^{k-\alpha_{2}}\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\right\|_{q_{2}(\cdot),\mu}&\leq&\left\|\chi_{(0,1]}t^{k-\alpha_{2}}\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\right\|_{q_{2}(\cdot),\mu}\\ && \hspace{1.5cm} + \left\|\chi_{(1,\infty)}t^{k-\alpha_{2}}\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\right\|_{q_{2}(\cdot),\mu}\\ &=&(I)+(II). \end{eqnarray*} Now, again by Lemma \ref{desigualdadesnormamu} we get, \begin{eqnarray*} (I)&=&\left\|\chi_{(0,1]}t^{k-\alpha_{2}}\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\right\|_{q_{2}(\cdot),\mu}\leq \left\|\chi_{(0,1]}t^{k-\alpha_{2}}C_{k,\alpha_{1},p(\cdot)q_{1}(\cdot)}At^{-k+\alpha_{1}}\right\|_{q_{2}(\cdot),\mu}\\ &=&C_{k,\alpha_{1},p(\cdot)q_{1}(\cdot)}A \left\|\chi_{(0,1]}t^{\alpha_{1}-\alpha_{2}}\right\|_{q_{2}(\cdot),\mu}<\infty, \end{eqnarray*} and also by Lemma \ref{desigualdadesnormamu}, \begin{eqnarray*} (II)&=&\left\|\chi_{(1,\infty)}t^{k-\alpha_{2}}\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\right\|_{q_{2}(\cdot),\mu}\leq \left\|\chi_{(1,\infty)}t^{k-\alpha_{2}}C_{k,p(\cdot)}t^{-k}\right\|_{q_{2}(\cdot),\mu}\\ &=&C_{k,p(\cdot)}\left\|\chi_{(1,\infty)}t^{-\alpha_{2}}\right\|_{q_{2}(\cdot),\mu}<\infty. \end{eqnarray*} Hence, \begin{eqnarray*} \left\|t^{k-\alpha_{2}}\left\|\frac{\partial^{k}P_t f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\right\|_{q_{2}(\cdot),\mu}&<&+\infty, \end{eqnarray*} and then $f\in B_{p(\cdot),q_2(\cdot)}^{\alpha_{2}}$. \end{proof} Let us now define the variable Gaussian Triebel-Lizorkin spaces $F_{p(\cdot),q(\cdot)}^{\alpha}(\gamma_{d})$, which represent another way to measure regularity of functions, proceeding as in \cite{Pinurb}, \cite{trie1} or \cite{trie2}. \begin{defi} Let $p(\cdot)\in\mathcal{P}_{\gamma_{d}}^{\infty}(\mathbb{R}^{d})\cap LH_{0}(\mathbb{R}^{d})$ and $q(\cdot)\in\mathcal{P}_{0,\infty}$. Let $\alpha \geq 0$ and $k$ the smallest integer greater than $\alpha$. The variable Gaussian Triebel-Lizorkin space $F_{p(\cdot),q(\cdot)}^{\alpha}(\gamma_{d})$ is the set of functions $f\in L^{p(\cdot)}(\gamma_d)$ such that \begin{equation}\label{e16} \left\| \left\|t^{k-\alpha} \frac{\partial^{k}P_t f}{\partial t^{k}}\right\|_{q(\cdot),\mu} \right\|_{p(\cdot),\gamma_d}<\infty, \end{equation} The norm of $f \in F_{p(\cdot),q(\cdot)}^{\alpha}(\gamma_d)$ is defined as \begin{equation} \left\| f \right\|_{F_{p(\cdot),q(\cdot)}^{\alpha}}: = \left\| f \right\|_{p(\cdot), \gamma_d} +\left\| \left\|t^{k-\alpha} \frac{\partial^{k}P_t f}{\partial t^{k}}\right\|_{q(\cdot),\mu} \right\|_{p(\cdot),\gamma_d}. \end{equation} \end{defi} By Lemma \ref{TLind}, the definition of $F_{p(\cdot),q(\cdot)}^{\alpha}$ is independent of the integer $k>\alpha$ chosen and the resulting norms are equivalents. \begin{obs} The variable Gaussian Besov-Lipschitz and variable Gaussian Triebel-Lizorkin spaces are, by construction, subspaces of $L^{p(\cdot)}(\gamma_d)$. Moreover, since trivially $\left\| f \right\|_{p(\cdot),\gamma_d} \leq \left\| f \right\|_{B_{p(\cdot),q(\cdot)}^{\alpha}}$ and $\left\| f \right\|_{p(\cdot),\gamma_d} \leq \left\| f \right\|_{F_{p(\cdot),q(\cdot)}^{\alpha}}$, the inclusions are continuous. On the other hand, from (\ref{PHHerm}) it is clear that for all $t>0$ and $k\in \mathbb{N}$, $$\displaystyle\frac{\partial^{k}}{\partial t^{k}}P_{t}h_{\beta}(x)=(-1)^k |\beta|^{k/2}e^{-t\sqrt{|\beta|}}h_{\beta}(x),$$ and again by Lemma \ref{desigualdadesnormamu}, \begin{eqnarray*} \left\|t^{k-\alpha}\left\|\frac{\partial^{k}}{\partial t^{k}}P_{t}h_{\beta}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu}&=&\left\|t^{k-\alpha}\left\|(-|\beta|^{1/2})^{k} e^{-t\sqrt{|\beta|}}h_{\beta}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu}\\ &=& |\beta|^{k/2}\|h_{\beta}\|_{p(\cdot),\gamma_d}\left\|t^{k-\alpha} e^{-t\sqrt{|\beta|}}\right\|_{q(\cdot),\mu} \\ &=&C_{k,\alpha,\beta,q(\cdot)}\|h_{\beta}\|_{p(\cdot),\gamma_d}<\infty. \end{eqnarray*} Thus, $h_{\beta}\in B^{\alpha}_{p(\cdot),q(\cdot)}(\gamma_{d})$ and $$ \|h_{\beta}\|_{B^{\alpha}_{p(\cdot),q(\cdot)}}=(1+C_{k,\alpha,\beta,q(\cdot)})\|h_{\beta}\|_{p(\cdot),\gamma_d}.$$ In a similar way, $h_{\beta}\in F^{\alpha}_{p(\cdot),q(\cdot)}(\gamma_{d})$ and \begin{eqnarray*} \|h_{\beta}\|_{F^{\alpha}_{p(\cdot),q(\cdot)}}&=&\|h_{\beta}\|_{p(\cdot),\gamma_d}+\left\|\left\|t^{k-\alpha}|\frac{\partial^{k}}{\partial t^{k}}P_{t}h_{\beta}|\right\|_{q(\cdot),\mu}\right\|_{p(\cdot),\gamma_d}\\ &=&\|h_{\beta}\|_{p(\cdot),\gamma_d}+ |\beta|^{k/2}\left\|t^{k-\alpha} e^{-t\sqrt{|\beta|}}\right\|_{q(\cdot),\mu}\|h_{\beta}\|_{p(\cdot),\gamma_d}\\ &=&(1+C_{k,\alpha,\beta,q(\cdot)})\|h_{\beta}\|_{p(\cdot),\gamma_d} = \|h_{\beta}\|_{B^{\alpha}_{p(\cdot),q(\cdot)}}. \end{eqnarray*} Hence, the polinomials ${\mathcal P}$ is contained in $ B^{\alpha}_{p(\cdot),q(\cdot)}(\gamma_{d})$ and in $ F^{\alpha}_{p(\cdot),q(\cdot)}(\gamma_{d})$. \end{obs} Also, we have an inclusion result for the variable Gaussian Triebel-Lizorkin spaces, which is analogous to Proposition \ref{incluBesov}, see also \cite{Pinurb} or Proposition 7.40 in \cite{urbina2019}. \begin{prop}\label{incluTriebel} Let $p(\cdot)\in\mathcal{P}_{\gamma_{d}}^{\infty}(\mathbb{R}^{d})\cap LH_{0}(\mathbb{R}^{d})$ and $q_{1}(\cdot),q_{2}(\cdot)\in\mathcal{P}_{0,\infty}$. The inclusion $F_{p(\cdot),q_1(\cdot)}^{\alpha_{1}}(\gamma_d)\subset F_{p(\cdot),q_2(\cdot)}^{\alpha_{2}}(\gamma_d)$ holds for $\alpha_1 > \alpha_2>0$ and $q_1(t)> q_2(t) $ a.e. \end{prop} \begin{proof} Let us consider $f\in F_{p(\cdot),q_1(\cdot)}^{\alpha_{1}}$, then \begin{eqnarray*} \left\|t^{k-\alpha_{2}}\left|\frac{\partial^{k}P_{t}f(x)}{\partial t^{k}}\right|\right\|_{q_{2}(\cdot),\mu} &\leq&\left\|t^{k-\alpha_{2}}\left|\frac{\partial^{k}P_{t}f(x)}{\partial t^{k}}\right|\chi_{(0,1]}\right\|_{q_{2}(\cdot),\mu}\\ &&\hspace{1.5cm} + \left\|t^{k-\alpha_{2}}\left|\frac{\partial^{k}P_{t}f(x)}{\partial t^{k}}\right|\chi_{(1,\infty)}\right\|_{q_{2}(\cdot),\mu}\\ &=& (I) + (II). \end{eqnarray*} Now, since $q_{1}(t)>q_{2}(t)$ a.e., by taking $r(t)=\displaystyle\frac{q_{1}(t)q_{2}(t)}{q_{1}(t)-q_{2}(t)}$, we obtain that $r(\cdot)\geq 1$ and $\displaystyle\frac{1}{r(\cdot)}+\frac{1}{q_{1}(\cdot)}=\frac{1}{q_{2}(\cdot)}$, thus, by H\"older's inequality (\ref{Holder generalizada}) and Lemma \ref{desigualdadesnormamu} \begin{eqnarray*} (I)&=&\left\|t^{\alpha_{1}-\alpha_{2}}\chi_{(0,1]}t^{k-\alpha_{1}}\left|\frac{\partial^{k}P_{t}f(x)}{\partial t^{k}}\right|\right\|_{q_{2}(\cdot),\mu}\\ &\leq&2\left\| t^{\alpha_{1}-\alpha_{2}}\chi_{(0,1]}\right\|_{r(\cdot),\mu} \left\|t^{k-\alpha_{1}}\left|\frac{\partial^{k}P_{t}f(x)}{\partial t^{k}}\right|\right\|_{q_{1}(\cdot),\mu}\\ &=&C_{\alpha_{1},\alpha_{2},q_{1}(\cdot),q_{2}(\cdot)}\left\|t^{k-\alpha_{1}}\left|\frac{\partial^{k}P_{t}f(x)}{\partial t^{k}}\right|\right\|_{q_{1}(\cdot),\mu}. \end{eqnarray*} Now, for the second term $(II)$, by using Lemmas \ref{desigualdadesnormamu} and \ref{lematec5}, we get \begin{eqnarray*} (II)&=&\left\|t^{k-\alpha_{2}}\left|\frac{\partial^{k}P_{t}f(x)}{\partial t^{k}}\right|\chi_{(1,\infty)}\right\|_{q_{2}(\cdot),\mu}\leq C_{k}T^{\ast}f(x) \left\|\chi_{(1,\infty)}t^{k-\alpha_{2}}t^{-k}\right\|_{q_{2}(\cdot),\mu}\\ &=&C_{k} T^{\ast}f(x)\left\|\chi_{(1,\infty)} t^{-\alpha_{2}}\right\|_{q_{2}(\cdot),\mu}= C_{k,\alpha_{2},q_{2}(\cdot)}T^{\ast}f(x).\end{eqnarray*} Then, by using the $L^{p(\cdot)}(\gamma_d)$ boundedness of $T^{\ast}$ (see \cite{MorPinUrb}), \begin{eqnarray*} \left\|\left\|t^{k-\alpha_{2}}\left|\frac{\partial^{k}P_{t}f}{\partial t^{k}}\right|\right\|_{q_{2}(\cdot),\mu}\right\|_{p(\cdot),\gamma_d}&\leq& C_{\alpha_{1},\alpha_{2},q_{1}(\cdot),q_{2}(\cdot)}\left\|\left\|t^{k-\alpha_{1}}\left|\frac{\partial^{k}P_{t}f}{\partial t^{k}}\right|\right\|_{q_{1}(\cdot),\mu}\right\|_{p(\cdot),\gamma_d}\\ &+&C_{k,\alpha_{2},q_{2}(\cdot)} \|T^{\ast}f\|_{p(\cdot),\gamma_d}\\ &\leq&C_{\alpha_{1},\alpha_{2},q_{1}(\cdot),q_{2}(\cdot)} \left\|\left\|t^{k-\alpha_{1}}\left|\frac{\partial^{k}P_{t}f}{\partial t^{k}}\right|\right\|_{q_{1}(\cdot),\mu}\right\|_{p(\cdot),\gamma_d}\\ &+&C_{k,\alpha_{2},p(\cdot),q_{2}(\cdot)} \|f\|_{p(\cdot),\gamma_d}<+\infty \quad . \end{eqnarray*} Therefore, $f\in F_{p(\cdot),q_{2}(\cdot)}^{\alpha_{2}}.$ \\ \end{proof} \section{Interpolation results} Finally, we are going to consider some interpolation results for the Gaussian variable Besov-Lipschitz and the variable Triebel-Lizorkin spaces.\\ We will use the following results for general variable Lebesgue spaces $L^{p(\cdot)}(X,\nu)$. \begin{lem}\label{lema3.2.6harjhuleto} Let $p(\cdot)\in \mathcal{P}(\Omega,\nu)$ and $s>0$ such that $sp^{-}\geq 1$. Then $\displaystyle\||f|^{s}\|_{p(\cdot),\nu}=\|f\|^{s}_{sp(\cdot),\nu}$. \end{lem} \begin{proof} It is the same proof of Lemma 3.2.6 in \cite {LibroDenHarjHas}. \end{proof} \begin{lem}\label{holderinterpolacion} Let $\nu$ a complete $\sigma$-finite measure on $X$. $r_{j}(\cdot)\in \mathcal{P}(X,\nu)$, $1<r^{-}_{j},r^{+}_{j}<\infty$,$j=0,1$. For all $0<\lambda<1$, if $f\in L^{r_{j}(\cdot)}(X,\nu)$, $j=0,1$ then $f\in L^{r(\cdot)}(X,\nu)$ where $\displaystyle\frac{1}{r(y)}=\frac{1-\lambda}{r_{0}(y)}+\frac{\lambda}{r_{1}(y)},$ a.e. $y\in X$ and \begin{equation} \|f\|_{r(\cdot),\nu}\leq 2\|f\|_{r_{0}(\cdot),\nu}^{1-\lambda}\|f\|_{r_{1}(\cdot),\nu}^{\lambda}. \end{equation} \end{lem} \begin{proof} It is a consequence of H\"older's inequality (\ref{Holder generalizada}) and Lemma \ref{lema3.2.6harjhuleto}. \end{proof} Now, we present the interpolation result. \begin{teo} Let $p_{j}(\cdot)\in \mathcal{P}(\mathbb{R}^{d},\gamma_{d})$ and $q_{j}\in \mathcal{P}(\mathbb{R}^{+},\mu), j=0,1$ \begin{enumerate} \item [i)] For $1<p^{-}_{j},q^{-}_{j}$, $p^{+}_{j},q^{+}_{j}<+\infty$ and $\alpha_{j}\geq 0$, if $f\in B_{p_{j}(\cdot),q_{j}(\cdot)}^{\alpha_{j}}(\gamma_d)$, $j=0,1,$ then for all $0<\theta<1, f\in B_{p(\cdot),q(\cdot)}^{\alpha}(\gamma_d)$, where $$\alpha=\alpha_{0}(1-\theta)+\alpha_{1}\theta$$ and $$\displaystyle\frac{1}{p(x)}=\frac{1-\theta}{p_{0}(x)}+\frac{\theta}{p_{1}(x)},\, \text{a.e.} \; x\in \mathbb{R}^{d},$$ $$\displaystyle\frac{1}{q(t)}=\frac{1-\theta}{q_{0}(t)}+\frac{\theta}{q_{1}(t)},\, \text{a.e.} \; t\in \mathbb{R}^{+}.$$ \item[ii)] For $1<p^{-}_{j},q^{-}_{j}$, $p^{+}_{j},q^{+}_{j}<+\infty$ and $\alpha_{j}\geq 0$, if $f\in F_{p_{j}(\cdot),q_{j}(\cdot)}^{\alpha_{j}}(\gamma_d)$, $j=0,1,$ then for all $0<\theta<1, f\in F_{p(\cdot),q(\cdot)}^{\alpha}(\gamma_d)$, where $$\alpha=\alpha_{0}(1-\theta)+\alpha_{1}\theta,$$ and $$\displaystyle\frac{1}{p(x)}=\frac{1-\theta}{p_{0}(x)}+\frac{\theta}{p_{1}(x)},\, \text{a.e.} \; x\in \mathbb{R}^{d},$$ $$\displaystyle\frac{1}{q(t)}=\frac{1-\theta}{q_{0}(t)}+\frac{\theta}{q_{1}(t)},\, \text{a.e.} \; t \in \mathbb{R}^{+}.$$ \end{enumerate} \end{teo} \begin{proof} \begin{enumerate} \item[i)] Let $k$ be any integer greater than $\alpha_{0}$ and $\alpha_{1}$, by using Lemma \ref{holderinterpolacion}, we obtain for $\alpha =\alpha_0 (1- \theta) +\alpha_1 \theta$, $$ \left\|t^{k-\alpha}\left\|\frac{\partial^{k}P_{t}f}{\partial t^{k}}\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu}\hspace{5cm}.$$ \begin{eqnarray*} &\leq&\left\|t^{k-(\alpha_0 (1- \theta) +\alpha_1 \theta)}2\left\|\frac{\partial^{k}P_{t}f}{\partial t^{k}}\right\|_{p_{0}(\cdot),\gamma_d}^{1-\theta}\left\|\frac{\partial^{k}P_{t}f}{\partial t^{k}}\right\|_{p_{1}(\cdot),\gamma_d}^{\theta}\right\|_{q(\cdot),\mu} \\ &=&2\left\|t^{(1-\theta)(k-\alpha_{0})+\theta(k-\alpha_{1})}\left\|\frac{\partial^{k}P_{t}f}{\partial t^{k}}\right\|_{p_{0}(\cdot),\gamma_d}^{1-\theta}\left\|\frac{\partial^{k}P_{t}f}{\partial t^{k}}\right\|_{p_{1}(\cdot),\gamma_d}^{\theta}\right\|_{q(\cdot),\mu}\\ &=&2\left\|\left(t^{k-\alpha_{0}}\left\|\frac{\partial^{k}P_{t}f}{\partial t^{k}}\right\|_{p_{0}(\cdot),\gamma_d}\right)^{1-\theta}\left(t^{k-\alpha_{1}}\left\|\frac{\partial^{k}P_{t}f}{\partial t^{k}}\right\|_{p_{1}(\cdot),\gamma_d}\right)^{\theta }\right\|_{q(\cdot),\mu}. \end{eqnarray*} Thus, by H\"older's inequality (\ref{Holder generalizada}) and Lemma \ref{lema3.2.6harjhuleto}, \begin{eqnarray*} &&\left\|t^{k-\alpha}\left\|\frac{\partial^{k}P_{t}f}{\partial t^{k} }\right\|_{p(\cdot),\gamma_d}\right\|_{q(\cdot),\mu}\\ &\leq&4\left\|t^{k-\alpha_{0}}\left\|\frac{\partial^{k}P_{t}f}{\partial t^{k}}\right\|_{p_{0}(\cdot),\gamma_d}\right\|^{1-\theta}_{q_{0}(\cdot),\mu}\left\|t^{k-\alpha_{1}}\left\|\frac{\partial^{k}P_{t}f}{\partial t^{k}}\right\|_{p_{1}(\cdot),\gamma_d}\right\|^{\theta}_{q_{1}(\cdot),\mu}<+\infty , \end{eqnarray*} that is, $f\in B_{p(\cdot),q(\cdot)}^{\alpha}(\gamma_d)$.\\ \item[ii)] Analogously, by H\"older's inequality (\ref{Holder generalizada}) and Lemma \ref{lema3.2.6harjhuleto}, we obtain for $\alpha = \alpha_0 (1- \theta) +\alpha_1 \theta$, \begin{eqnarray*} \left\|t^{k-\alpha}\left|\frac{\partial^{k}P_{t}f(x)}{\partial t^{k} }\right|\right\|_{q(\cdot),\mu}&=&\left\|\left(t^{k-\alpha_{0}} \left|\frac{\partial^{k}P_{t}f(x)}{\partial t^{k} }\right|\right)^{1-\theta}\left(t^{k-\alpha_{1}}\left|\frac{\partial^{k}P_{t}f(x)}{\partial t^{k}}\right|\right)^{\theta}\right\|_{q(\cdot),\mu}\\ &\leq&2\left\|t^{k-\alpha_{0}} \left|\frac{\partial^{k}P_{t}f(x)}{\partial t^{k}}\right|\right\|^{1-\theta}_{q_{0}(\cdot),\mu}\left\|t^{k-\alpha_{1}}\left|\frac{\partial^{k}P_{t}f(x)}{\partial t^{k} }\right|\right\|^{\theta}_{q_{1}(\cdot),\mu}, \end{eqnarray*} a.e. $x\in \mathbb{R}^{d}.$ Therefore \begin{eqnarray*} \left\|\left\|t^{k-\alpha}\left|\frac{\partial^{k}P_{t}f}{\partial t^{k}}\right|\right\|_{q(\cdot),\mu}\right\|_{p(\cdot),\gamma_d}&\leq&2 \left\|\left\|t^{k-\alpha_{0}} \left|\frac{\partial^{k}P_{t}f}{\partial t^{k}}\right|\right\|^{1-\theta}_{q_{0}(\cdot),\mu}\left\|t^{k-\alpha_{1}}\left|\frac{\partial^{k}P_{t}f}{\partial t^{k} }\right|\right\|^{\theta}_{q_{1}(\cdot),\mu}\right\|_{p(\cdot),\gamma_d}, \end{eqnarray*} and again by H\"older's inequality and Lemma \ref{lema3.2.6harjhuleto}, \begin{eqnarray*} &&\left\|\left\|t^{k-\alpha}\left|\frac{\partial^{k} P_{t}f}{\partial t^{k}}\right|\right\|_{q(\cdot),\mu}\right\|_{p(\cdot),\gamma_{d}}\\ &\leq&4 \left\|\left\|t^{k-\alpha_{0}} \left|\frac{\partial^{k}P_{t}f}{\partial t^{k}}\right|\right\|_{q_{0}(\cdot),\mu}\right\|^{1-\theta}_{p_{0}(\cdot),\gamma_{d}}\left\|\left\|t^{k-\alpha_{1}}\left|\frac{\partial^{k}P_{t}f}{\partial t^{k} }\right|\right\|_{q_{1}(\cdot),\mu}\right\|^{\theta}_{p_{1}(\cdot),\gamma_{d}}<+\infty . \end{eqnarray*} That is, $f\in F_{p(\cdot),q(\cdot)}^{\alpha}(\gamma_d)$. \end{enumerate} \end{proof}
\section{\@startsection{section}{1 \z@{-1.2\linespacing\@plus-.5\linespacing}{.8\linespacing {\normalfont\bfseries\Large}} \def\subsection{\@startsection{subsection}{2 \z@{-.8\linespacing\@plus-.3\linespacing}{.3\linespacing\@plus.2\linespacing {\normalfont\bfseries\large}} \def\subsubsection{\@startsection{subsubsection}{3 \z@{.7\linespacing\@plus.1\linespacing}{-1.5ex {\normalfont\bfseries}} \def\@secnumfont{\bfseries} \makeatother \fi \makeatother \newtheorem{theorem}{Theorem}[section] \newtheorem*{theorem*}{Theorem} \newtheorem{theoremalpha}{Theorem}\def\thetheoremalpha{\Alph{theoremalpha}} \newtheorem{corollaryalpha}[theoremalpha]{Corollary}\def\thecorollaryalpha{\Alph{corollaryalpha}} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{fact}[theorem]{Fact} \newtheorem{cla}[theorem]{Claim} \newtheorem{mth}[theorem]{Main Theorem} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{conjecture}[theorem]{Conjecture} \newtheorem{assertion}{Assertion} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{question}[theorem]{Question} \newtheorem{example}[theorem]{Example} \newtheorem{remark}[theorem]{Remark} \newtheorem{notation}[theorem]{Notation} \newtheorem{note}[theorem]{Note} \numberwithin{equation}{section} \newcommand{\tar}[2]{\begin{array}{c} #1 \\ \mbox{#2}\end{array}} \newcommand{\tart}[2]{\begin{tabular}{c} #1 \\ #2\end{tabular}} \newcommand{\incg}[2]{\includegraphics[height=#1em]{#2.eps} \newcommand{\targ}[3]{\tart{\incg{#1}{#2}}{#3}} \newcommand{\Cube}{\mathcal{C}} \newcommand{\CC}{\mathcal{C}} \newcommand{\MM}{\mathcal{M}} \newcommand{\gr}{\mathrm{gr}} \newcommand{\CubeFlowCat}{\mathscr{C}_C} \newcommand{\Moduli}{\mathcal{M}} \newcommand{\vect}{\overline} \newcommand{\sm}{\setminus} \newcommand{\gen}[1]{#1} \newcommand{\CInc}{\mathcal{I}} \newcommand{\np}{\newpage} \newcommand{\bs}{\smallbreak} \newcommand{\bb}{\bigbreak} \newcommand{\h}{\noindent} \newcommand{\R}{\mathbb R} \newcommand{\N}{\mathbb N} \newcommand{\E}{\mathbb E} \newcommand{\x}{\times} \newcommand{\Hom}{\mathrm{Hom}} \newcommand{\lartial}{\mathbin{\rotatebox[origin=c]{180}{\(\partial\)}}} \newcommand{\cdkh}{CDKh} \newcommand{\dkh}{DKh} \newcommand{\Q}{\mathbb{Q}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\sg}{\mathfrak{s}} \newcommand{\vup}{v^{\text{u}}_+} \newcommand{\vum}{v^{\text{u}}_-} \newcommand{\vlp}{v^{\text{l}}_+} \newcommand{\vlm}{v^{\text{l}}_-} \newcommand{\vulp}{v^{\text{u/l}}_+} \newcommand{\vulm}{v^{\text{u/l}}_-} \newcommand{\vlup}{v^{\text{l/u}}_+} \newcommand{\vlum}{v^{\text{l/u}}_-} \newcommand{\sumax}{s^{\text{u}}_{\text{max}}} \newcommand{\slmax}{s^{\text{l}}_{\text{max}}} \newcommand{\sumin}{s^{\text{u}}_{\text{min}}} \newcommand{\slmin}{s^{\text{l}}_{\text{min}}} \newcommand{\ind}{\mathrm{ind}} \DeclareRobustCommand{\CloseDef} \leavevmode\unskip\penalty9999 \hbox{}\nobreak\hfill \quad\hbox{$\lozenge$ } \textheight=620pt \textwidth=480pt \oddsidemargin=15pt \evensidemargin=15pt \vspace*{-50pt} \begin{document} \pagestyle{plain} \title{ Khovanov-Lipshitz-Sarkar homotopy type for links in thickened surfaces and those in $S^3$ with new modulis} \author{Louis H. Kauffma , Igor Mikhailovich Nikonov, and Eiji Ogasa} \maketitle \begin{abstract} We define a family of Khovanov-Lipshitz-Sarkar stable homotopy types for the homotopical Khovanov homology of links in thickened surfaces indexed by moduli space systems. This family includes the Khovanov-Lipshitz-Sarkar stable homotopy type for the homotopical Khovanov homology of links in higher genus surfaces (see the content of the paper for the definition). The question whether different choices of moduli spaces lead to the same stable homotopy type is open. \end{abstract} \tableofcontents \newpage \bb \section{Introduction}\label{intro} \h In this paper, a surface means a closed oriented surface unless otherwise stated. Of course, a surface may or may not be the sphere. We discuss links in thickened surfaces. If $\mathcal L$ is a link in a thickened surface, then a link diagram $L$ which represents $\mathcal L$ lies in the surface. Since our theory has a special behaviour at genus one, in this paper a higher genus surface means a surface with genus greater than one unless otherwise stated. In the previous paper~\cite{KauffmanNikonovOgasa}, the authors discussed the higher genus case. In the present paper, we mainly discuss the torus case. \\ Let $\mathcal K$ be a link in the thickened torus. Let $K$ be a link diagram in the torus which represents $\mathcal K$. Call a poset associated with a decorated Kauffman state, a {\it dposet}. See \cite{KauffmanNikonovOgasa, LSk} for decorated Kauffman states, or decorated resolution configurations. Dposets are defined for all pairs of enhanced Kauffman states. We discuss the following two cases, which will be introduced in \S\ref{mod}. \\ The first case will be called Case (C) in \S\ref{subsect:case_C}. We choose the right pair or the left one for the ladybug Kauffman state (see \cite{KauffmanNikonovOgasa, LSk}). We determine a degree 1 homology class $\lambda$ of $T^2$. After that, we define a cubic moduli for any dposet of $K$, and construct {\it Khovanov-Lipshitz-Sarkar stable homotopy type} for the homotopical Khovanov chain complex (\cite{MN}) of $K$. We define {\it Khovanov-Lipshitz-Sarkar stable homotopy type} for $\mathcal K$ to be that for $K$. Make the set of all Khovanov-Lipshitz-Sarkar stable homotopy types for all $\lambda$ and for a fixed choice of the right and the left. It is a link type invariant. There are infinitely many $\lambda$ but there are finite numbers of stable homotopy types. \\ Recall in \cite{KauffmanNikonovOgasa} that in the higher genus case, we give only one stable homotopy type for any link diagram after we choose the right pair or the left one, and therefore for any link type. \\ The second case will be called Case (D) in \S\ref{subsect:case_D}. We construct a different set of stable homotopy types for $K$. We choose the right pair or the left one for the ladybug Kauffman state. After that, we made a way to give a set of moduli spaces for all dposets. We do not fix a degree 1 homology class. It is important that a moduli is not cubic. This is a surprisingly new feature. We choose a moduli for a dposet and construct a CW complex. We construct no less than one CW complex for a link diagram. The set of such all Khovanov-Lipshitz-Sarkar stable homotopy types gives a link type invariant. \\ We prove that the set of our Khovanov-Lipshitz-Sarkar stable homotopy types is stronger than the homotopical Khovanov homology of $\mathcal K$ in both cases. It is a meaningful Khovanov stable homotopy type of links in a 3-manifold other than the 3-sphere. In the previous paper \cite{KauffmanNikonovOgasa} we introduced a Khovanov-Lipshitz-Sarkar stable homotopy type for links in the thickened higher genus surface. In this present paper we discuss the case of links in the thickened torus. \\ \begin{mth}\label{main} $(1)$ We define Khovanov-Lipshitz-Sarkar stable homotopy type for `links in the thickened torus, a degree 1 homology class $\lambda$, and a choice of the right and the left pair'. In this case, all modulis which we use are cube modulis. \bs\h $(2)$ We define Khovanov-Lipshitz-Sarkar stable homotopy type for `links in the thickened torus, and a choice of the right and the left pair', in a different method from $(1)$. In this case, there is a case that uses a non-cubic moduli. \bs\h $(3)$ Each of the invariants (the stable homotopy type) in $(1)$ and that in $(2)$ gives an invariant stronger than the homotopical Khovanov homology as invariants of links in the thickened torus. We use the second Steenrod square to prove it. \end{mth} \bb We give non-cubic modulis for Khovanov chain complex of classical links in $S^3$, which are not used in Lipshitz and Sarkar's construction in~\cite{LSk}. We show such a new moduli in Section~\ref{subsect:mutlivalued_moduli_system}. We use these modulis and can give a set of stable homotopy types to a link in $S^3$ as we did in Case (D) of this paper. Although we use different modulis from Lipshitz and Sarkar's con­struction in~\cite{LSk}, it is an open question whether our stable homotopy types are different from that in Lipshitz and Sarkar's construction of~\cite{LSk}. \subsection{Homotopical Khovanov homology} Let $F$ be a closed oriented surface. \begin{definition}\label{def:resolution_configuration} A {\it resolution configuration} $D$ on the surface $F$ is a pair $(Z(D),A(D))$, where $Z(D)$ is a set of pairwise-disjoint embedded circles in $F$, and $A(D)$ is an ordered collection of disjoint arcs embedded in $F$, with $A(D)\cap Z(D)=\partial A(D)$. The number of arcs in $A(D)$ is the {\it index} of the resolution configuration $D$, denoted by $\ind(D)$. A {\it labeled resolution configuration} is a pair $(D, x)$ of a resolution configuration $D$ and a labeling $x$ of each element of $Z(D)$ by either $x_+$ or $x_-$. \end{definition} \begin{example} Consider a link $\mathcal L$ in the thickening $F\x[-1,1]$ of $F$. Let $L\subset F$ be a diagram of the link $\mathcal L$. Assume that the diagram $L$ has $n$ crossings ordered somehow. For any vector $v\in\{0,1\}^n$ one can define the {\it associated resolution configuration} $D_L(v)$ obtained by taking the resolution of the diagram $L$ corresponding to $v$ (that is, taking the 0-resolution at the $i$-th crossing if $v_i =0$, and the 1-resolution otherwise) and then placing arcs corresponding to each of the crossings labeled by 0's in $v$ (that is, at the $i$-th crossing if $v_i=0$), see Fig.~\ref{fig:resolution}. The index of the associated configuration is $\ind(D_L(v))=n-|v|$. Let $\Lambda(L)$ be the set of all labeling with $x_+$ and $x_-$ of the associated resolution configurations of the link diagram $L$. The elements of this set are called {\em enhanced Kauffman states} or {\em Khovanov basis elements}. \begin{figure} \includegraphics[width=120mm]{r.eps} \caption{\bf The 0- and 1-resolutions}\label{fig:resolution} \end{figure} \end{example} The set $\Lambda(L)$ of Khovanov basis elements has several grading on it. Let $n$ (respectively, $n_+$, $n_-$) be the number of crossings (respectively, positive crossings, negative crossings) of $L$. For a labeled resolution configurations $(D_L(u), x)\in\Lambda(L)$, its {\em homological grading} is \begin{equation}\label{eq:homological_grading} \gr_h(D_{L(u)}, x) = -n_- + |u|, \end{equation} and the {\em quantum grading} is \begin{equation}\label{eq:quantum_grading} \gr_q(D_L(u), x) = n_+ - 2n_- + |u|+ \sharp\{Z\in Z(D_L(u)) | x(Z) = x_+\} -\sharp\{Z\in Z(D_L(u)) | x(Z) = x_-\}. \end{equation} Let us consider the set $\mathfrak L = [S^1; F]$ of all the homotopy classes of free oriented loops in $F$. Let $\bigcirc\in \mathfrak L$ be the homotopy class of contractible loops. For any closed curve $\gamma$, one can consider the curve $-\gamma$ obtained from $\gamma$ by the orientation change. Let $\mathfrak H$ be the quotient group of the free abelian group with generator set $\mathfrak L$ modulo the relations $\bigcirc= 0$ and $[\gamma]=[-\gamma]$ for all free loops $\gamma$. Define the {\em homotopical grading} of the Khovanov basis element $(D_L(u),x)$ as follows \begin{equation}\label{eq:homotopical_grading} \gr_{\mathfrak H}(D_L(u), x)= \sum_{Z\in Z(D_L(u))} \deg x(Z)\cdot[Z] \in\mathfrak H, \end{equation} \h where $\deg(x_\pm)=\pm 1$. \begin{definition}\label{def:surgery} Given a resolution configuration $D$ and a subset $A'\subseteq A(D)$ there is a new resolution configuration $s_{A'}(D)$, the {\em surgery of $D$ along $A'$}, obtained as follows. The circles $Z(s_{A'}(D))$ of $s_{A'}(D)$ are obtained by performing embedded surgery along the arcs in $A'$; in other words, $Z(s_{A'}(D))$ is obtained by deleting a neighborhood of $ A'$ from $Z(D)$ and then connecting the endpoints of the result using parallel translates of $A'$. The arcs of $s_{A'}(D)$ are the arcs of $D$ not in $A'$, i.e., $A(s_{A'}(D))=A(D)- A'$. Let $s(D)=s_{A(D)}(D)$ denote the maximal surgery on $D$. \end{definition} \begin{definition}\label{2.10} There is a partial order $\prec$ on labeled resolution configurations defined as follows. We declare that $(E, y)\prec(D, x)$ if: \begin{enumerate} \ite $D$ is obtained from $E$ by surgering along a single arc of $A(E)$ \ite The labelings $x$ and $y$ induce the same labeling on $D\cap E = E\cap D$. \ite $\gr_q(E, y)=\gr_q(D, x)$, $\gr_{\mathfrak H}(E, y)=\gr_{\mathfrak H}(D, x)$. \end{enumerate} The possible cases of the order are drawn in Fig.~\ref{resolC} and~\ref{resolNC}. \begin{figure} \includegraphics[width=0.6\textwidth]{resolC1.eps} \caption{{\bf The partial order of labeled resolution configurations with contractible circles }\label{resolC}} \end{figure} \begin{figure} \includegraphics[width=0.6\textwidth]{resolNC1.eps} \caption{{\bf The partial order of labeled resolution configurations with non-contractible circles. Non-contractible circles are marked with (H). } \label{resolNC}} \end{figure} Now, we close the order $\prec$ by transitivity. \end{definition} \begin{definition}\label{korekos} Given an oriented link diagram $L$ with $n$ crossings and an ordering of the crossings in $L$, the {\em Khovanov chain} complex $KC(L)$ is defined as the $\Z$-module freely generated by labeled resolution configurations of the form $(D_L(u), x)$ for $u\in\{0, 1\}^n$. Thus, the set of all labeled resolution configurations of $L$ is a basis of $KC(L)$. The {\em Khovanov differential} preserves the quantum grading and the homotopical grading, increases the homological grading by 1, and is defined as \begin{equation}\label{bibun} {\displaystyle \delta(D_L(v),y) = \sum_{(D_L(u),x)\succ (D_L(v),y)\colon |u|=|v|+1} (-1)^{s_0(\mathcal C_{u,v}) }}(D_L(u),x), \end{equation} \noindent where for $u= (\epsilon_1,..., \epsilon_{i-1}, 1, \epsilon_{i+1}, . . . , \epsilon_n)$ and $v=(\epsilon_1,..., \epsilon_{i-1}, 0,\epsilon_{i+1}, . . . , \epsilon_n)$, one defines $s_0(C_{u,v}) = \epsilon_1+\cdot\cdot\cdot+ \epsilon_{i-1}$. The homology $KH(L)$ of the complex $(KC(L),\delta)$ are the {\em Khovanov homology} of the link $L$. \end{definition} \begin{definition}\label{def:decorated_resolution_configuration} A {\em decorated resolution configuration} is a triple $(D, x, y)$ where $D$ is a resolution configuration and $x$ (respectively, $y$) is a labeling of each component of $Z(s(D))$ (respectively, $Z(D)$) by an element of $\{x_+, x_-\}$. The labeled resolution configuration $i=(D,y)$ is the {\em initial configuration} of the decorated resolution configuration, and the labeled resolution configuration $f=(s(D),x)$ is the {\em final configuration}. Associated to a decorated resolution configuration $(D, x, y)$ is the poset $P(D, x, y)$ consisting of all labeled resolution configurations $(E, z)$ with $(D, y)\prec(E, z)\prec(s(D), x)$. We call $P(D, x, y)$ the poset for $(D, x, y)$. For any resolution configuration $D'=s_A(D)$, $A\subset A(D)$, we define its {\em multiplicity} as the number of its labelings which belong to $P(D,x,y)$: $$ \mu_{(D, x, y)}(D')=\sharp\{z\,|\, (D, y)\prec(D', z)\prec(s(D), x)\}. $$ The {\em multiplicity} $\mu(D, x, y)$ of a decorated resolution configuration $(D, x, y)$ is the maximum of the multiplicities $\mu_{(D, x, y)}(D')$: $$ \mu(D, x, y)=\max_{A\subset A(D)}\mu_{(D, x, y)}(s_A(D)). $$ \end{definition} \begin{definition}\label{def:core_configuration} The {\it core} $c(D)$ of a resolution configuration $D$ is the resolution configuration obtained from $D$ by deleting all the circles in $Z(D)$ that are disjoint from all the arcs in $A(D)$. A resolution configuration $D$ is called {\em basic} if $D = c(D)$, that is, if every circle in $Z(D)$ intersects an arc in $A(D)$. In the same way one can define the core $c(D, x)$ of a labeled resolution configuration $(D,x)$, and basic labeled resolution configurations. The core of a decorated resolution configuration $(D,x,y)$ is the decorated configuration $$c(D,x,y)=(c(D),x\mid_{s(c(D))},y\mid_{c(D)}).$$ A decorated resolution configuration is basic if it coincides with its core. \end{definition} \begin{remark} Given two comparable labeled resolution configurations $\alpha=(D,y)\prec (D',x)=\beta$, $D'=s_A(D)$, $A\subset A(D)$, one can assign a basic decorated resolution configuration ${\mathcal D}(\alpha,\beta)$ to it. Consider two resolution configurations $\bar D=(Z(D),A)$, $\bar D'=s(\bar D)=(Z(D'),\emptyset)$. Then the decorated configuration ${\mathcal D}(\alpha,\beta)$ is defined as the core of $(\bar D, x, y)$. If $(D,y)\not\prec (D',x)$ we say that the corresponding decorated resolution configuration is empty. \end{remark} \begin{remark} (Basic) decorated resolution configurations form a partially ordered set by inclusion relation: $(D',x',y')\subset (D,x,y)$ if $(D',y')$ and $(s(D'),x')$ belong the poset $P(D,x,y)$. \end{remark} \subsection{Khovanov homotopy type} Let us remind the construction of Khovanov homotopy type by R. Lipshitz and S. Sarkar~\cite{LSk}. \begin{definition}\label{def:manifold_with_corners} A {\em $k$-dimensional manifold with corners} is a topological space $X$ which is locally homeomorphic to an open subset of $\R^k_+=(\R_+)^k$ where $\R_+=[0,\infty)$. For $x\in X$, let $c(x)$ be the number of zero coordinates of the corresponding point in $\R^k_+$. The set $\{x\in X\,|\, c(x)=i\}$ is the {\em codimension-$i$ boundary} of $X$. A {\em connected facet} of $X$ is the closure of a connected component of the codimension-$1$ boundary of $X$. A {\em facet} is a union of disjoint connected facets. \end{definition} \begin{definition}\label{def:n_manifold} A manifold with corners $X$ is called a {\em manifold with facets} if every point $x\in X$ belongs to exactly $c(x)$ connected facets. An $\langle n\rangle$-manifold is a manifold with facets $X$ along with an ordered $n$-tuple $(\partial_1X,\dots,\partial_n X)$ of facets of $X$ such that \begin{itemize} \item $\bigcup_{i=1}^n \partial_i X=\partial X$; \item for all distinct $i,j$ the intersection $\partial_i X\cap \partial_j X$ is a facet of both $\partial_i X$ and $\partial_j X$. \end{itemize} \end{definition} For any $A\subset \{1,\dots,n\}$ denote $X(A)=\bigcap_{i\in A}\partial_i X$. \begin{definition}\label{def:neat_embedding} Given a $(n+1)$-tuple ${\mathbf d}=(d_0,\dots,d_n)\in\N^{n+1}$, let $$ \E^{\mathbf d}_n=\R^{d_0}\times\R_+\times\R^{d_1}\times\R_+\times\dots\times\R_+\times\R^{d_n}. $$ $\E^{\mathbf d}_n$ is a $\langle n\rangle$-manifold with $$ \partial_i(\E^{\mathbf d}_n)=\R^{d_0}\times\dots\times\R^{d_{i-1}}\times\{0\}\times\dots\times\R^{d_n}. $$ A {\em neat immersion} of an $\langle n\rangle$-manifold is a smooth immersion $\iota\colon X\looparrowright\E_n^{\mathbf d}$ for some $\mathbf d$ such that: \begin{enumerate} \item $\iota^{-1}(\partial_i(\E^{\mathbf d}_n))=\partial_i X$ for all $i$,\\ \item for any $A\subset B\subset\{1,\dots,n\}$ the sets $\iota(X(A))$ and $\E^{\mathbf d}_n(B)$ are transversal. \end{enumerate} A {\em neat embeding} is a neat immersion that is also an embedding. \end{definition} \begin{definition}\label{def:flow_category} A {\em flow category} is a pair $(\mathscr C, \gr)$ where $\mathscr C$ is a category with finitely many objects $Ob(\mathscr C)$ and $\gr\colon Ob(\mathscr C)\to\Z$ is a function, satisfying the following conditions: \begin{enumerate} \item $\Hom(x,x)={id}$ for all $x\in Ob(\mathscr C)$, and for distinct $x,y\in Ob(\mathscr C)$, $\Hom(x,y)$ is a compact $(\gr(x)-\gr(y)-1)$-dimensional $\langle \gr(x)-\gr(y)-1\rangle$-manifold; \item for distinct $x,y,z\in Ob(\mathscr C)$ with $\gr(z)-\gr(y)=m$ the composition map $$ \circ\colon \Hom(z,y)\times\Hom(x,z)\to\Hom(x,y) $$ is an embedding into $\partial_m\Hom(x,y)$. Furthermore, $$ \circ^{-1}(\partial_i\Hom(x,y))=\left\{\begin{array}{cl} \partial_i\Hom(z,y)\times\Hom(x,z) & \mbox{for } i<m,\\ \Hom(z,y)\times\partial_{i-m}\Hom(x,z) & \mbox{for } i>m.\end{array}\right. $$ \item for distinct $x,y\in Ob(\mathscr C)$ the composition induces a diffeomorphism $$ \partial_i\Hom(x,y)\cong\bigsqcup_{z\in Ob(\mathscr C)\colon \gr(z)=\gr(y)+i}\Hom(z,y)\times\Hom(x,z). $$ \end{enumerate} \end{definition} For any objects $x,y$ in a flow category define the {\em moduli space} from $x$ to $y$ to be $$ \MM(x,y)=\left\{\begin{array}{cl} \emptyset & \mbox{if } x=y,\\ \Hom(x,y) & \mbox{otherwise}.\end{array}\right. $$ Let ${\mathbf d}=(\dots, d_{-1},d_0,d_1,\dots)$ be a sequence of natural numbers. For any $a<b$ denote $\E_{\mathbf d}[a:b]=\E_{b-a-1}^{d_a,\dots,d_{b-1}}$. \begin{definition} A neat immersion (embedding) of a flow category $\mathscr C$ is a collection of neat immersions (embeddings) $\iota_{x,y}\colon \MM(x,y)\looparrowright \E_{\mathbf d}[\gr(y):\gr(x)]$ such that \begin{enumerate} \item for all $i,j$ the map $$\iota_{i,j}=\sqcup_{x,y}\iota_{x,y}\colon \bigsqcup_{x,y\in Ob(\mathscr C)\colon \gr(x)=i,\gr(y)=j}\MM(x,y)\to \E_{\mathbf d}[j:i] $$ is a neat immersion (embedding); \item for all objects $x,y,z$ and all points $p\in\MM(x,z)$, $q\in\MM(z,y)$ $$ \iota_{x,y}(q\circ p)=(\iota_{z,y}(q),0,\iota_{x,z}(p)). $$ \end{enumerate} \end{definition} \begin{definition}\label{def:framed_flow_category} Let $\iota$ be a neat immersion of a flow category $\mathscr C$. For objects $x,y$, let $\nu_{x,y}$ be the normal bundle on the moduli space $\MM(x,y)$, induced by the immersion $\iota_{x,y}$. A {\em coherent framing} $\phi$ of the normal bundle is a framing for $\nu_{x,y}$ for all objects $x,y$ such that the product framing $\nu_{z,y}\times\nu_{x,z}$ equals to the pullback $\circ^*(\nu_{x,y})$ for all $x,y,z$. A flow category with a fixed coherent framing of the normal bundle to some neat immersion is called a {\em framed flow category}. \end{definition} For a framed flow category there is an associated cochain complex $C^*(\mathscr C)$. The chain space of the complex is the free abelian group generated by the objects of the category: $C^*(\mathscr C)=\Z[Ob(\mathscr C)]$; the differential is given by the formula $$ \delta y=\sum_{x\in Ob(\mathscr C)\colon \gr(x)=\gr(y)+1} \left(\sum_{f\in\MM(x,y)}\phi(f)\right)x. $$ The moduli space in the formula is a compact zero-dimensional manifold, i.e. a finite set, and the framing $\phi$ is given by signs of the elements of that set. To a framed flow category one can associate a based CW complex in the following way. \begin{definition}\label{def:flow_category_realization} Let $\mathscr C$ be a framed flow categoty with a neat embedding $\iota$ into $\E_{\mathbf d}$ and a framing $\phi$. Let $B=\min_{x\in Ob(\mathscr C)} \gr(x)$ and $B=\max_{x\in Ob(\mathscr C)} \gr(x)$.. Using framing, extend the embedding $\iota_{x,y}$ for some small $\epsilon>0$ to an embedding $$ \tilde\iota_{x,y}\colon \MM(x,y)\times [-\epsilon,\epsilon]^{d_{\gr(y)}+\cdots+d_{\gr(x)-1}}\to \E_{\mathbf d}[\gr(y):\gr(x)] $$ where $\E_{\mathbf d}[\gr(y):\gr(x)]= \R^{d_{\gr(y)}}\times\R_+\times\dots\times\R_+\times\R^{d_{\gr(x)-1}}.$ Choose $R$ sufficiently large so that for all $x,y$ $$\tilde\iota_{x,y}\colon \MM(x,y)\times [-\epsilon,\epsilon]^{d_{\gr(y)}+\cdots+d_{\gr(x)-1}}$$ lies in $[-R,R]^{d_{\gr(y)}}\times[0,R]\times\dots\times[0,R]\times[-R,R]^{d_{\gr(x)-1}}$. To any object $x$ assign the cell \begin{multline*} C(x)=[0,R]\times[-R,R]^{d_{B}}\times\dots\times[0,R]\times[-R,R]^{d_{\gr(x)-1}}\times\{0\}\times\\ [-\epsilon,\epsilon]^{d_{\gr(x)}}\times\dots\times\{0\}\times[-R,R]^{d_{A-1}}. \end{multline*} For any other object $y$ such that $\gr(y)<\gr(x)$ one identifies $C(y)\times\MM(x,y)$ with the subset \begin{multline*} C_y(x)=[0,R]\times[-R,R]^{d_{B}}\times\dots\times[0,R]\times[-R,R]^{d_{\gr(y)-1}}\times\{0\}\times\\ \iota_{x,y}(\MM(x,y))\times\{0\}\times[-\epsilon,\epsilon]^{d_{\gr(x)}}\times\dots\times\{0\}\times[-\epsilon,\epsilon]^{d_A-1}. \end{multline*} Define the attaching map for $C(x)$ as the map which is the projection $C_y(x)\cong C(y)\times\MM(x,y)$ to $C(y)$ on $C_y(x)$ and the map to the basepoint on the $\partial C(x)\setminus \bigcup_y C_y(x)$. These gluing maps define a CW complex $|\mathscr C|$ which is the {\em Cohen--Jones--Segal realization} of the framed flow category $\mathscr C$. \end{definition} \begin{theorem}[\cite{LSk}] The CW complex $|\mathscr C|$ is well defined and its cellular cochain complex is isomorphic to the associated cochain complex $C^*(\mathscr C)$. \end{theorem} \begin{example}[Cube flow category] Let $X=[0,1]^n$ be the $n$-dimensional cube and $f_n(x_1,\dots,x_n)=f(x_1)+\cdots+f(x_n)$, where $f(x)=3x^2-2x^3$, be a Morse function on it. Define the {\em $n$-dimensional cube flow category} $\mathscr C_C(n)$ as the Morse flow category of the function $f_n$. This means that the objects of $\mathscr C_C(n)$ are the critical points of $f_n$, i.e. the vertices $\{0,1\}^n$ of the cube $X$. Denote the object $(0,\dots,0)$ by $\bar 0$, and the object $(1,\dots, 1)$ by $\bar 1$. The grading function is defined as $\gr(u)=|u|=\sum_{i=1}^n u_i$, $u=(u_1,\dots,u_n)\in\{0,1\}^n$. The moduli space $\MM(x,y)$ consists of the lines of the gradient flow which starts at $x$ and ends at $y$. One can identify the moduli space $\MM(x,y)$ with the permutahedron of dimension $\gr(x)-\gr(y)-1$. The cube flow category can be framed (by induction on the moduli spaces dimension). \end{example} \begin{example}[Khovanov flow category] Let $\mathcal L$ in $S^3$ be a link and $L$ in $S^2$ be its diagram. The {\it Khovanov flow category} $\mathscr C_K(L)$ has one object for each Khovanov basis element. That is, an object of $\mathscr C_K(L)$ is a labeled resolution configuration of the form $\mathbf{x}=(D_L(u), x)$ with $u\in\{0, 1\}^n$. The grading on the objects is the homological grading gr$_h$; the quantum grading gr$_q$ is an additional grading on the objects. We need the orientation of $L$ in order to define these gradings, but the rest of the construction of $\mathscr C_K(L)$ is independent of the orientation. Consider objects $\mathbf{x}=(D_L(u), x)$ and $\mathbf{y}=(D_L(v), y)$ of $\mathscr C_K(L)$. The space $\mathcal M_{\mathscr C_K(L)}(\mathbf{x},\mathbf{y})$ is defined to be empty unless $y\prec x$ with respect to the partial order from Definition \ref{2.10}. So, assume that $y\prec x$. Let $x|$ denote the restriction of $x$ to $s(D_L(v)-D_L(u))=D_L(u)-D_L(v)$ and let $y|$ denote the restriction of $y$ to $D_L(v)-D_L(u)$. Therefore, $(D_L(v)-D_L(u), x|, y|)$ is a basic decorated resolution configuration. In \cite[\S5 and \S6]{LSk} Lipshitz and Sarkar associate to each index $n$ basic decorated resolution configuration $(D, x, y)$ an $(n-1)$-dimensional $\left<n-1\right>$-manifold $\mathcal M(D, x, y)$ together with a $\mu(D,x,y)$-fold trivial covering $$\mathcal F :\mathcal M(D, x, y) \to\mathcal M_{\mathscr C(n)}(\overline1, \overline0).$$ Use it, and define $$\MM_{\mathscr C_K(L)}(\mathbf{x},\mathbf{y})=\MM(D_L(v)-D_L(u),x|, y|).$$ The framing of the cube flow category can be lifted to the Khovanov category. \end{example} \begin{definition} The Cohen--Jones--Segal realization ${\mathcal X}(L)=|\mathscr C_K(L)|$ of the Khovanov framed flow category is called the {\em Khovanov-Lipshitz-Sarkar stable homotopy type} of the link diagram $L$. \end{definition} \begin{theorem}[\cite{LSk}]\label{thm:stable_khovanov_homology} The Khovanov-Lipshitz-Sarkar stable homotopy type ${\mathcal X}(L)$ is a link invariant. \end{theorem} \section{Moduli systems} Let $F$ be a closed oriented surface. We consider links in the thickening of the surface $F$. In order to define Khovanov homotopy type of such links we need fix a set of moduli spaces for the decorated resolution configurations of the link. This observation leads to the following definition, cf.~\cite[Section 5.1]{LSk}. \begin{definition}\label{def:moduli_system} A {\em branched covering moduli system} on the surface $F$ is a family of correspondences between the basic decorated resolution configurations of index $n$ in the surface $F$ and $(n-1)$-dimensional $\langle n-1\rangle$-manifolds: $$\MM\colon (D,x,y) \mapsto \MM(D, x, y)$$ together with $\langle n-1\rangle$-maps $$ \mathcal F_{(D, x, y)}\colon\MM(D, x, y)\to\MM_{\CC_C(n)}(\bar 1,\bar 0) $$ These correspondences must obey the following conditions: \begin{enumerate} \item the moduli space $\MM(D, x, y)$ of a basic decorated resolution configuration $(D, x, y)$ depends only on the isotopy class of the configuration; \item $\MM(D, x, y)=\emptyset$ if $P(D,x,y)=\emptyset$; \item for any $(E,z)\in P(D,x,y)$ there are embeddings $$ \circ\colon \MM(D\setminus E, z|, y|)\times \MM(E\setminus s(D), x|, z|)\to \MM(D, x, y);$$ \item the faces of $\MM(D, x, y)$ are determined by $$ \partial_i\MM(D, x, y) \coprod_{(E,z)\in P(D,x,y),\ ind(D\setminus E)=i} \circ(\MM(D\setminus E, z|, y|)\times \MM(E\setminus s(D), x|, z|)); $$ \item the composition is compatible with the maps $\mathcal F$: for any $E=D_D(v)$ \begin{equation*}\label{eq:moduli_space_equivarity} \xymatrix{ \Moduli(D\sm E,\gen{z}|,\gen{y}|)\times \Moduli(E\sm s(D),\gen{x}|,\gen{z}|) \ar[r]^-\circ\ar[d]_{{\mathcal F}\times{\mathcal F}} & \Moduli(D,\gen{x},\gen{y})\ar[dd]^{{\mathcal F}}\\ \Moduli_{\CubeFlowCat(n-m)}(\vect{1},\vect{0})\times \Moduli_{\CubeFlowCat(m)}(\vect{1},\vect{0}) \ar[d]_{} \\ \Moduli_{\CubeFlowCat(n)}({v},\vect{0}) \times \Moduli_{\CubeFlowCat(n)}(\vect{1},{v})\ar[r]^-\circ & \Moduli_{\CubeFlowCat(n)}(\vect{1},\vect{0}). } \end{equation*} \item the map $\mathcal F_{(D, x, y)}$ is a $\mu(D,x,y)$-fold branched covering. \end{enumerate} \end{definition} Note that we can define the covering by pointing out the branching set $P\subset \MM_{\CC_C(n)}(\bar 1,\bar 0)$ of codimension 2. \begin{definition}\label{def:cases_C_and_D} The moduli system $\{\MM(D, x, y)\}$ is {\em cubical} or {\em of type C} if all the covering maps over the cubic moduli spaces are trivial. Otherwise, the moduli system is called {\em dodecagonal} or {\em of type D}. \end{definition} \begin{theorem}\label{thm:moduli_system_existence} \begin{enumerate} \item For any closed oriented surface $F$ there exists a covering moduli system of type $C$. \item For any closed oriented surface $F$ there exists a covering moduli system of type $D$. \end{enumerate} \end{theorem} We present the corresponding moduli systems in Sections~\ref{subsect:case_C} and~\ref{subsect:case_D} Given a (branched covering) moduli system $\MM=\{\MM(D, x, y)\}$, let $\mathscr C_\MM(L)$ be the Khovanov flow category whose objects are labeled resolution configurations and moduli spaces are $$\MM((D_L(u),x),(D_L(v),y))=\MM(D_L(v)-D_L(u),x|, y|).$$ \begin{proposition} There is a structure of framed flow category on $\mathscr C_\MM(L)$. \end{proposition} \begin{proof} Let $\iota_C$ be a neat embedding of the cube flow category $\CC_C$ with a coherent framing $\phi_C$. Then $\iota_0=\iota_C\circ\mathcal F$ is a neat map into some $\E_{\mathbf d}[a:b]$. Although the map $\iota_0$ is not a neat immersion in general, the normal bundle to the image $\iota_0(\mathscr C_\MM(L))=\iota_C(\CC_C)$ is well-defined and framed (see Fig.~\ref{fig:normal_frame_lift}). \begin{figure} \includegraphics[width=0.25\textwidth]{normal_frame_lift.eps} \caption{{\bf Lifting of a normal framing to a branch cover }\label{fig:normal_frame_lift}} \end{figure} By Lemma 3.16 of~\cite{LSk} there exists a neat embedding $\iota_1$ of the flow category $\mathscr C_\MM(L)$ into $\E_{\mathbf d'}[a:b]$. By Lemma 3.17 of~\cite{LSk} there exists a family of neat maps $\tilde\iota_t$ connecting the neat maps $\iota_0[\mathbf{d}+\mathbf{d'}+1]$ and $\iota_1[\mathbf{d}+\mathbf{d'}+1]$ such that for any $t>0$ the map $\tilde\iota_t$ is a neat embedding. This family of maps admits an explicit formula \begin{gather*} \tilde\iota_t\colon \mathscr C_\MM(L) \to \E_{\mathbf{d}+\mathbf{d'}+1}[a:b]=\R^{d_a+d'_a+1}\times\R_+\times\R^{d_{a+1}+d'_{a+1}+1}\times\R_+\times\dots\times\R_+\times\R^{d_{b-1}+d'_{b-1}+1},\\ \tilde\iota_t=((1-t)\iota_0^{a}+t\iota_1^a,f(t)\iota_1^a,f(t)\bar\iota_1^{a+1},(1-t)\bar\iota_0^{a+1}+t\bar\iota_1^{a+1}, (1-t)\iota_0^{a+1}+t\iota_1^{a+1},\dots, (1-t)\iota_0^{b-1}+t\iota_1^{b-1},f(t)\iota_1^{b-1},0) \end{gather*} where $f(t)=e^{-\frac 1{t(1-t)}}$ and $$ \iota_0=(\iota_0^a,\bar\iota_0^{a+1},\iota_0^{a+1},\dots,\bar\iota_0^{b-1},\iota_0^{b-1})\colon \mathscr C_\MM(L) \to \R^{d_a}\times\R_+\times\R^{d_{a+1}}\times\dots\times\R_+\times\R^{d_{b-1}}. $$ By Lemma~3.19 of~\cite{LSk} we can extend the coherent framing $\phi$ for the map $\tilde\iota_0=\iota_0[\mathbf{d'}+\mathbf{d''}]$ to a family of coherent framings $\phi_t$ for the maps $\tilde\iota_t$. In particular, the neat embedding $\tilde\iota_1=\iota_1[\mathbf{d}+\mathbf{d''}]$ admits the coherent framing $\phi_1$. \end{proof} Define the Khovanov homotopy type ${\mathcal X}_\MM (L)$ associated with the moduli system $\MM$ as the realization of the framed flow category $\mathscr C_\MM(L)$. \begin{theorem}\label{thm:moduli_system_invariance} Khovanov homotopy type ${\mathcal X}_\MM (L)$ is a link invariant. \end{theorem} \begin{proof} We can use the reasoning of~\cite[Propositions 6.2, 6.3, 6.4]{LSk} without any changes. Indeed, let the diagram $L'$ differ from $L$ by an increasing first Reidemeister move, Fig.~\ref{fig:reidemeister1}. \begin{figure}[h] \includegraphics[width=0.25\textwidth]{reidemeister1.eps} \caption{{\bf First Reidemeister move }\label{fig:reidemeister1}} \end{figure} The Khovanov complex of the diagram $L'$ contains a contractible subcomplex $C_1$, Fig.~\ref{fig:reidemeister1_complex} left. The quotient complex $C_2$ (Fig.~\ref{fig:reidemeister1_complex} right) can be identified with the Khovanov complex of $L$. On the level of flow category this means that the Khovanov flow category $\mathscr C_K(L)$ contains a closed subcategory $\mathscr C_1$ which corresponds to $C_1$ and a subcategory $\mathscr C_2$ that corresponds to $C_2$. The subcategory $\mathscr C_2$ is isomorphic to the category $\mathscr C_K(L)$. The geometric realization of $\mathscr C_1$ is contractible, hence, ${\mathcal X}_\MM (L')=|\mathscr C_K(L')|=|\mathscr C_1|\vee |\mathscr C_2|=|\mathscr C_2|=|\mathscr C_K(L)|={\mathcal X}_\MM (L)$. \begin{figure}[h] \includegraphics[height=0.13\textheight]{reidemeister1_subcomplex.eps}\hfil\qquad \includegraphics[height=0.13\textheight]{reidemeister1_quotientcomplex.eps} \caption{{\bf Parts of Khovanov complex of the diagram $L'$ }\label{fig:reidemeister1_complex}} \end{figure} Analogously, one establishes the invariance under the second and third Reidemeister moves. \end{proof} \subsection{Multivalued moduli systems} \begin{definition} A {\em multivalued moduli system} is a correspondence between basic decorated resolution configurations of index $n$ and sets of $(n-1)$-dimensional $\langle n-1\rangle$-manifolds ${\mathfrak M}(D, x, y)$. We reformulate the boundary condition as follows: for any $\MM \in {\frak M}(D, x, y)$ $$ \partial_i\MM=\coprod_{(E,z)\in P(D,x,y),\ ind(D\setminus E)=i} \circ(\MM_{D\setminus E}\times \MM_{E\setminus s(D)}), $$ for some $\MM_{D\setminus E}\in{\mathfrak M}(D\setminus E, z|, y|)$, $\MM_{E\setminus s(D)}\in{\mathfrak M}(E\setminus s(D), x|, z|)$. A multivalued moduli system is {\em extendable} if for any decorated resolution configuration $(D',z,w)$ and any choice of moduli spaces $M(D,x,y)\in {\mathfrak M}(D, x, y)$ for all the proper decorated resolution sub-configurations $(D,x,y)\subsetneq(D',z,w)$ which satisfies the conditions (2)-(6) of Definition~\ref{def:moduli_system}, there exists $M(D',z,w)\in {\mathfrak M}(D', z, w)$ such that \[ \partial_i M(D',z,w)=\coprod_{(E,x)\in P(D',z,w),\ ind(D'\setminus E)=i} \circ(M{(D'\setminus E,x,w)}\times M{(E\setminus s(D'),z,x)}), \]. \end{definition} In other words, any compatible choice of moduli spaces of the proper decorated resolution sub-configurations can be extended to a compatible choice of a moduli space for the whole decorated resolution configuration. \begin{theorem}\label{thm:multivalued_moduli_system} There exists an extendable multi-valued moduli system. \end{theorem} Note that since any branched covering moduli system is an example of a multivalued moduli system with moduli sets ${\mathfrak M}(D, x, y)$ consisting at most of one moduli space, Theorem~\ref{thm:moduli_system_existence} implies Theorem~\ref{thm:multivalued_moduli_system}. In particular, the moduli systems of types (C) and (D) constructed in Sections~\ref{subsect:case_C} and~\ref{subsect:case_D} are multivalued moduli systems. In Section~\ref{subsect:mutlivalued_moduli_system} we present a multivalued moduli systems which assigns several spaces to decorated resolution configurations. Using a multi-valued moduli system, one can construct a framed flow category by choosing moduli spaces $\MM_{D}\in{\mathfrak M}(D, x, y)$ for each decorated resolution configuration. The geometric realization of this flow category is a topological space which can be thought of as a value of Khovanov homotopy type. By considering all possible choices we get a {\em multivalued Khovanov homotopy type} ${\mathfrak X}_{\mathfrak M}(L)$ which is a set of CW complexes considered up to stable homotopy. \begin{theorem} Let $\mathfrak M$ be an extendable multivalued moduli system. Then the multivalued Khovanov homotopy type ${\mathfrak X}_{\mathfrak M}(L)$ is a link invariant. \end{theorem} \begin{proof} We need to prove that the set ${\mathfrak X}_{\mathfrak M}(L)$ is invariant under the Reidemeister moves. Let $L$ and $L'$ be two diagrams connected by a Reidemeister move. Take a homotopy type $\mathcal X\in {\mathfrak X}_{\mathfrak M}(L)$. We must find a homotopy type $\mathcal X'\in {\mathfrak X}_{\mathfrak M}(L')$ which is stable homotopic to $\mathcal X$. If the move is an increasing first or second Reidemeister move then the moduli spaces of a Khovanov flow category $\mathscr C_K(L)$ which produces the CW complex $\mathcal X$ can be extended to some moduli spaces for the decorated resolution configurations in a Khovanov flow category $\mathscr C_K(L')$. We can take these moduli spaces and construct a Khovanov homotopy type $\mathcal X'$. Then the flow category $\mathscr C_K(L)$ is a subcategory in the flow category $\mathscr C_K(L')$, and $\mathcal X$ is embedded in $\mathcal X'$ (or some factor-space of $\mathcal X'$) This map induces isomorphism in cohomology. Hence, by Whitehead theorem $\mathcal X$ homotopic to $\mathcal X'$. For the third Reidemeister move, we consider its braid-like version (see Fig.~\ref{fig:braid}). The left diagram $L$ can be obtained by smoothing the right diagram $L'$. Hence, the resolution cube for $L$ is a subcube in the resolution cube for $L'$. Then we can use the reasonings above to construct a map between the stable homotopy types or the diagrams which will be a homotopy equivalence by Whitehead theorem. \begin{figure \includegraphics[width=60mm]{braid.eps} \caption{{\bf The braid-like Reidemeister move $III$}\label{fig:braid}} \end{figure} Thus, for any homotopy type $\mathcal X\in {\mathfrak X}_{\mathfrak M}(L)$ we can extend the corresponding framed flow category to a framed flow category of $L'$ and get a homotopy type $\mathcal X'\in {\mathfrak X}_{\mathfrak M}(L')$ such that $\mathcal X\simeq \mathcal X'$. On the other hand, for a homotopy type $\mathcal X'\in {\mathfrak X}_{\mathfrak M}(L')$ the restriction of its framed flow category to the resolution configurations of the link $L$ gives a homotopy type $\mathcal X\in {\mathfrak X}_{\mathfrak M}(L)$ such that $\mathcal X\simeq \mathcal X'$. \end{proof} \section{Decorated resolution configurations}\label{sect:decorated} Let $F$ be a closed oriented surface. Let us describe decorated resolution configurations of link diagrams in the surface $F$ in more details. Let $\mathcal D = (D,x,y)$ be a decorated resolution configuration in $F$. It is a trivalent graph $F$ consisting of cycles and arcs between the cycles. Recall that $P(D,x,y)$ is the partially ordered set consisting of the labeled resolution configurations between $(D,y)$ and $(s(D),x)$. Let $A=A(D)$ be the set of arcs. Assuming the arcs are ordered, there is a map $\pi\colon P(D,x,y)\to C_n$, where $n=|A|$ is the index of $D$ and $C_n\simeq\{0,1\}^n$ is the vertex set of $n$-dimensional cube. If $(s_{A'}(D),z)\in P(D,x,y)$ where $A'\subset A=\{a_i\}_{i=1,\dots,n}$ then one sets $\pi(s_{A'}(D),z)=\chi_{A}=(\epsilon_1,\dots,\epsilon_n)$ where $\epsilon_i=1$ if $a_i\in A'$ and $\epsilon_i=0$ if not. Recall that the multiplicity of the decorated resolution configuration is the number $\mu(D,x,y)=\max_{v\in C_n} |\pi^{-1}(v)|$. Let $\mathcal D_i = (D_i, x|_{D_i}, y|_{D_i})$, $i=1,...,l$ be the connected components of the decorated resolution configuration $(D,x,y)$. \begin{proposition} $\mu(\mathcal D)=\mu(\mathcal D_1)\times\cdots\times\mu(\mathcal D_l)$. \end{proposition} \begin{proof} Indeed, for each component $\mathcal D_i$ we can take a vector $v_i$ with the maximal preimage $\pi^{-1}|_{\mathcal D_i}(v_i)$. Then the concatenation $v$ of the vectors $v_1,\dots,v_l$ gives the maximal preimage of the map $\pi$, and $|\pi^{-1}(v)|=\prod_{i=1}^l \left|\pi^{-1}|_{\mathcal D_i}(v_i)\right|$. \end{proof} Below we assume that the decorate resolution configuration $D$ is connected. Let $(D,y)$ be a labeled resolution configuration. Denote the number of circles in $D$ by $\gamma(D)$, and let $|y|$ be the sum of labels of the circles. Then $-\gamma(D)\le |y|\le\gamma(D)$. The quantum degree of the enchanced state $(D,y)$ is equal to $|\pi(D)|+|y|=|y|$. Let $A'\subset A(D)$ and $(s_{A'}(D),z)\succ (D,y)$. Since the quantum degrees of comparable configurations coincide, $|y|=|\pi(s_{A'}(D))|+|z|=|A'|+|z|$. Hence, $-\gamma(s_{A'}(D))\le |z|=|y|-|A'|$ and $\gamma(s_{A'}(D))\ge |A'|-|y|$. In particular, if $\gamma(D)=1$ and $|y|=-1$ then $\gamma(s_{A'}(D))\ge |A'|+1$, hence, $\gamma(s_{A'}(D))=|A'|+1$. If $\gamma(D)=1$ and $|y|=1$ then $\gamma(s_{A'}(D))=|A'|\pm 1$. \begin{proposition} Let $a\in A(D)$ be a leaf or coleaf (see Fig.~\ref{fig:leaf_coleaf}). Then there exists a unique labeled resolution configuration $(s_a(D),z)$ such that $(D,y)\prec(s_a(D),z)\prec(s(D),x)$, and $$P(D,x,y)=P(s_a(D),z,y)\times\{0,1\}.$$ \begin{figure}[h] \includegraphics[width=0.4\textwidth]{leaf_coleaf.eps} \caption{{\bf Leaf (left) and coleaf (right) in a resolution configuration }\label{fig:leaf_coleaf}} \end{figure} \end{proposition} \begin{proof} If $a$ is a leaf then $(s_a(D),z)$ is uniquely determined. If $a$ is a coleaf then $s_a(D)$ splits into two components $(D_1,z_1)$ and $(D_2,z_2)$. Then $s(D)=s(D_1)\sqcup s(D_2)$. The ambiguity of $z_1, z_2$ concerns the labels of the circles incident to $a$. But one can restore the labels using the quantum grading of the component: $|\pi(D_i)|+|z_i|=|\pi(s(D_i))|+|x|_{s(D_i)}|$, so $|z_i|=|\pi(s(D_i))|+|x|_{s(D_i)}|-|\pi(D_i)|$. If one knows the labels of all the circles in $(D_i,z_i)$ except one and the sum of all labels $|z_i|$, then the last label is uniquely determined. Let $P_0=\{(s_{A}(D),u)\in P(D,x,y)\,|\, a\not\in A\}$ and $P_1=\{(s_{A}(D),u)\in P(D,x,y)\,|\, a\in A\}$. Using the reasonings above, we can prove that the surgery $s_a$ establishes an bijection between $P_0$ and $P_1=P(s_a(D),z,y)$. This bijection is compatible with the order in $P_0$ and $P_1$. \end{proof} Let $(D,x,y)$ be a nonempty decorated resolution configuration with one circle. Then $D$ is a chord diagram. Let $M=(m_{ab})_{a,b\in A(D)}$ be the $\Z_2$-valued interlacement matrix: $m_{ab}=lk(a,b)$, that is $m_{ab}=1$ if the arcs $a$ and $b$ are linked, and $m_{ab}=0$ if they are not. Then $M$ is a skew-symmetric matrix. For any labeled resolution $(s_{A'}(D),z)\in P(D,x,y)$ the number of circles $\gamma(s_{A'}(D))$ is given by the curcuit-nullity formula \begin{proposition} $\gamma(s_{A'}(D))=corank M|_{A'}+1$. \end{proposition} On the other hand, the quantum degree gives the equality $|z|+|A'|=|y|$, so $\gamma(s_{A'}(D))\ge |A'|-|y|$. If $|y|=-1$ then $\gamma(s_{A'}(D))=|A'|+1$ and all labels in $z$ are equal to $x_-$. Thus, $\mu(D,x,y)=1$. If $|y|=1$ then $\gamma(s_{A'}(D))\ge |A'|-1$. Hence, $$rank M|_{A'}=|A'|-corank M|_{A'}=|A'|-\gamma(s_{A'}(D))+1\le 2.$$ In particular, $rank M\le 2$. Since, $M$ is skew-symmetric then $rank M$ is even. If $rank M=0$ then $M=0$ and all the arcs are coleafs. Thus, $\mu(D,x,y)=1$. If $rank M=2$ then there are two independent vectors $a,b\in\Z_2^n$ such that any row of the matrix is equal to $0,a,b$ or $a+b$. This means the arcs of the chord diagram split into four subsets: three sets of parallel chords and coleaves, see Fig.~\ref{fig:one_circle_state}. Then $A(D)=A_a\sqcup A_b\sqcup A_{a+b}\sqcup A_0$. \begin{figure}[h] \includegraphics[width=0.15\textwidth]{one_circle_state.eps} \caption{{\bf Combinatorial structure of a non empty decorated resolution configuration with one circle}\label{fig:one_circle_state}} \end{figure} \begin{proposition}\label{prop:decorated_resolution_1} Let $(D,x,y)$ be a non empty decorated resolution configuration with one circle such that its interlacement matrix has $rank M = 2$. Then \begin{enumerate} \item the circle of the configuration $D$ is contractible \item the arcs which belong to one subset $A_a, A_b, A_{a+b}$ are homotopical in $F$. \end{enumerate} \end{proposition} \begin{proof} 1. Assume $D$ is not contractible. Take arcs $a\in A_a$, $b\in A_b$. Let $D'=s_{\{a,b\}}(D)$. Then $D$ has label $x_+$ and $D'$ has label $x_-$, hence, $\gr_{\mathfrak H}(D,x_+)=[D]$ and $\gr_{\mathfrak H}(D',x_-)=-[D']$. But $[D]\ne -[D']$. 2. Let $a_1,a_2\in A_a$ be two non homotopical arcs, and $b\in A_b$. Then the resolution $s_{\{a_1,a_2, b\}}(D)$ consists of two circles of homotopy type $[a_1b^\pm a_2^{-1}b^\mp]$ and $[a_1^{-1}a_2]$ with labels $x_-,x_-$. Then the homotopical grading of this labeled resolution can not be zero. But $\gr_{\mathfrak H}(D,x_+)=0$ because $D$ is contractible. \end{proof} Let $(D,x,y)$ be a non empty decorated resolution configuration with one circle such that its interlacement matrix has $rank M = 2$. The complement to the circle of the resolution configuration consists of two components, one of which is contractible. We will call an arc {\em inner} if it lies in the contractible component, and {\em outer} otherwise. \begin{proposition}\label{prop:decorated_resolution_2} Let $(D,x,y)$ be a non empty decorated resolution configuration with one circle such that its interlacement matrix has $rank M = 2$. Then \begin{enumerate} \item the arcs from one of the subsets $A_a, A_b, A_{a+b}$ are either all inner or all outer \item let the subsets $A_a, A_b$ consist of outer arcs. Then the surface $F$ is the torus, and the homology type of the arcs in $A_{a+b}$ (when $A_{a+b}\ne\emptyset$) is the sum of homology classes of an arc in $A_a$ and an arc $A_b$. \item let the subset $A_a$ consist of inner arcs. Then $A_b$ consists of outer arcs and $A_{a+b}=\emptyset$. \end{enumerate} \end{proposition} \begin{proof} 1. Assume that $a_1,a_2\in A_a$ and $b\in A_b$. Since $a_i$, $i=1,2$, and $b$ are interlaced and do not intersect, then these chords lie in different components to the circle of $D$. Hence, the chords $a_1$ and $a_2$ lie in one component, i.e. they are both internal or both external. Thus, the chords from the subset $A_a$ are all internal or all external. The same statements holds for the subsets $A_b$ and $A_{a+b}$. 2. Let $a\in A_a$ and $b\in A_b$ be outer chords. The intersection index of the loops $a$ and $b$ is equal to $1$, hence, $a$ and $b$ present independent homology classes. The resolution configuration $s_{\{a,b\}}(D)$ consists of one circle with the label $x_-$. This circle must be contractible due to the homotopical grading. Hence, the surface $F$ can be obtained by gluing two disc along the arcs $a$ and $b$. Thus, $F$ is the torus. Let $c\in A_{a+b}$. Since $c$ is disjoint from $a$ and $b$ and $F$ is the torus, the homology class corresponding to $c$ is equal to $a\pm b$, i.e. it is the sum of the homology classes of $a$ and $b$ (up to signs). 2. Let $a\in A_a$ be inner and $b\in A_b$ and $c\in A_{a+b}$. Then $b$ and $c$ are outer chords. The intersection index of the loops $b$ and $c$ is equal to $1$, hence, $b$ and $c$ present independent homology classes. The resolution configuration $s_{\{a,b,c\}}(D)$ consists of two circles with the labels $x_-$. Then the homotopical grading of this labeled resolution is equal $-2[bc^{-1}]\ne 0$ but the initial resolution configuration has homotopical grading $0$. Thus, the decorated resolution configuration must be empty. \end{proof} Note that the necessary conditions of Propositions~\ref{prop:decorated_resolution_1},~\ref{prop:decorated_resolution_2} are also sufficient for the decorated resolution configuration to be non empty. \begin{proposition}\label{prop:1circle_multiplicity} 1. The multiplicity of a resolution configuration $s_{A'}(D)$ is equal to $2$ if $A'$ contains chords from exactly one of subsets $A_a, A_b, A_{a+b}$, and is equal to $1$ otherwise. 2. Let $(D',z,w)\subset (D,x,y)$ be a decorated resolution configuration with an initial configuration $(s_{A'}(D),w)$ and final configuration $(s(A''),z)$, where $D'=s_{A'}(D)$ and $A'\subset A''\subset A(D)$. Then $\mu(D',z,w)=2$ if and only if $A'\subset A_0$ and $A''$ intersects at least two of the subsets $A_a$, $A_b$, $A_{a+b}$. \end{proposition} \begin{proof} 1) Let $A'\subset A(D)$. If $A'$ does not intersect with $A_a, A_b, A_{a+b}$ then it contains only coleaf arcs. The resolution configuration $s_{A'}(D)$ consists of circles among which only one contains a pair of linked arcs. Then the label of this circle in $s_{A'}(D)$ must be $x_+$ (otherwise the surgery by the pair of linked arcs gives zero) whereas the labels of the other circles must be $x_-$. Thus, the labels of the configuration $s_{A'}(D)$ are defined uniquely, and $\mu(s_{A'}(D))=1$. If $A'$ contains a pair arcs from different subsets $A_a, A_b, A_{a+b}$ then $rank M|_{A'}=2$. This means that the labels of all the circles in $s_{A'}(D)$ are $x_-$. Thus, $\mu(s_{A'}(D))=1$. If $A'$ contains chords from exactly one of subsets $A_a, A_b, A_{a+b}$ then the resolution configuration looks like in Fig.~\ref{fig:resolution_mult2}. There are two circles connected with an arc in $s_{A'}(D)$. Hence, the label of one of these circle must be $x_+$. The labels of the other circles are $x_-$. Hence, the multiplicity is $2$. \begin{figure}[h] \includegraphics[width=0.4\textwidth]{resolution_mult2.eps} \caption{{\bf Labelings of a resolution configuration of multiplicity $2$}\label{fig:resolution_mult2}} \end{figure} 2) The condition of the second statement means the decorated configuration $(D',z,w)$ contains a resolution configuration of multiplicity $2$. Thus, it follows from the first statement of the proposition. \end{proof} Let us now consider resolution configurations with several circles in the initial state. Let $(D,x,y)$ be a connected nonempty decorated resolution configuration with $k\ge 1$ circles in the initial state. Then there are $k-1$ arcs $\hat A=\{c_1,\dots,c_{k-1}\}\in A(D)$ such that the resolution $D'=s_{\hat A}(D)$ consists of one circle (Fig.~\ref{fig:decorated_many_circles}). In the diagram $D'$ we can draw the arc adjoint to the arcs of $\hat A$. With some abuse of notation, we denote the set of the adjoint arcs by $\hat A$. Then $D=s_{\hat A}(D')\cup\hat A$. \begin{figure}[h] \includegraphics[width=0.45\textwidth]{decorated_many_circles1.eps} \caption{Decorated resolution configurations $D$ and $D'$. The set $\hat A$ consists of green arcs}\label{fig:decorated_many_circles} \end{figure} Let $M$ be the interlacement matrix of the chords $A(D')\cup \hat A\simeq(A(D)\setminus\hat A)\cup\hat A=A(D)$ on the circle $D'$. Then for any $A'\subset A(D)$ the number circles in the resolution configuration is equal to $corank M|_{A'\bigtriangleup\hat A}+1$ where $A'\bigtriangleup\hat A$ is the symmetric difference of the sets $A'$ and $\hat A$. \begin{proposition}\label{prop:kcircle_multiplicity} Let $(D,x,y)$ be a connected nonempty decorated resolution configuration such that $rank M|_{A(D)\setminus\hat A}=2$ and $A'\subset A(D)$. Let $M_{A'}$ be the submatrix of the interlacement matrix $M$ whose rows correspond to the subset $A'\setminus\hat A$ and columns correspond to the subset $A(D)\setminus(A'\cap \hat A)$, and $M^0_{A'}$ be the submatrix with rows from $A'\setminus\hat A$ and columns from $\hat A\setminus A'$. Then the resolution configuration $s_{A'}(D)$ has in $(D,x,y)$ multiplicity $2$ if and only if $rank M_{A'}-rank M^0_{A'}=1$, and multiplicity $1$ otherwise. \end{proposition} \begin{proof} The matrix $M_{A'}$ includes $M_{A'}^0$, so $rk M_{A'}-rk M^0_{A'}\ge 0$. Let $\tilde D=s_{\hat A\cap A'}(D)$ be the resolution configuration obtained from $D$ by surgery along arcs in $\hat A$. The resolution configuration $\tilde D$ has $|\hat A\setminus A'|+1$ circles with labels $x_+$. Assume that $rk M^0_{A'}=0$. This means that the resolution configuration $\tilde D$ consists of $|\hat A\setminus A'|+1$ distinct components. The chords from different components are not interlaced, i.e. the coefficient correspondent to them in the matrix $M_{A'}$ is zero. Indeed, let $c$ and $c'$ belong to different components. Then the resolution configuration $s_{\{c,c'\}}(\tilde D)$ has $|\hat A\setminus A'|+3$ circles, and the resolution configuration $s_{\{c,c'\}\cup (\hat A\setminus A')}(\tilde D)$ has $|\hat A\setminus A'|+3-|\hat A\setminus A'|=3$ circles. But the number of circles is equal to $corank M(\{c,c'\})+1$. Hence, $corank M(\{c,c'\})=2$ and $M(\{c,c'\})=0$, so $m_{cc'}=0$. Among the components of $\tilde D$ only one can include interlaced chords. Indeed, if we have pairs $c_1,c_1'$ and $c_2,c_2'$ of interlaced chords from different component then the surgery $s_{\{c_1,c_1',c_2,c_2'\}\cup (\hat A\setminus A')}(\tilde D)$ would give a resolution configuration with one circle and a label of degree $-2$, but $\deg(x_-)=-1$ is the minimal grading. Thus, the label is zero and the decorated resolution configuration $(D,x,y)$ is empty. Thus, we have only one component with interlaced chord. For the matrix $M(A')$ this means that its nonzero elements can correspond only to the distinguished component. Thus, $rk M_{A'}$ is equal to the rank of the submatrix which corresponds to the component with interlaced chords. Then the statement of the proposition follows from Proposition~\ref{prop:1circle_multiplicity}. If $rk M^0_{A'}>0$ then there are chords in $\tilde D$ that connect different circles. Then we can chose subsets $A''\subset A'$ and $\hat A''\subset \hat A\setminus A'$ such that $|A''|=|\hat A''|=rank M^0_{A'}$ and surgery along the set $\hat A\setminus (A'\cup \hat A'')\cup A''$ transforms the resolution configuration $\tilde D$ to a configuration with one circle. Let $\hat A_1=(\hat A\setminus\hat A'')\cup A''$ and $M'$ be the interlacement matrix on the circle $D_1=s_{\hat A_1}(D)$. Then one can check that $corank M|_{A'\bigtriangleup\hat A}=corank M'|_{A'\bigtriangleup\hat A_1}$, $rank M_{A'}-rank M^0_{A'}=rank M'_{A'}-rank (M')^0_{A'}$ and $rank (M')^0_{A'}=0$. Thus, the statement of the proposition reduces to the case considered above. \end{proof} \begin{example} Consider the resolution configuration in Fig.~\ref{fig:decorated_many_circles}. With labels $x_+$ on each circle, it defines an initial labeled resolution configuration of a decorated resolution configuration. One can choose the set $\hat A=\{a_1,a_2\}$ to merge the circles of the configuration. The interlacement matrix then is equal to $$ M=\left(\begin{array}{cccccc} 0 & 0 & 1 & 0 & 0 & 0\\ 0 & 0 & 1 & 0 & 0 & 0\\ 1 & 1 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 \end{array}\right). $$ Consider the surgery along the subset $A'=\{a_1,a_3,a_5,a_6\}$. The matrix $M_{A'}$ is equal $$ M_{A'}=\left(\begin{array}{c|ccc} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 \end{array}\right) $$ where the left part is the submatrix $M^0_{A'}$. Then $rank M_{A'}=2$ and $rank M^0_{A'}=1$. Since $rank M_{A'}-rank M^0_{A'}=1$, the multiplicity of the resolution configuration $s_{A'}(D)$ is equal to $2$. The labelings of the resolution configuration $s_{A'}(D)$ are shown in Fig.~\ref{fig:decorated_many_circles_surgery}. \begin{figure}[h] \includegraphics[width=0.7\textwidth]{decorated_many_circles_surgery.eps} \caption{Resolution configuration $s_{\{a_1,a_3,a_5,a_6\}}(D)$ and its labelings}\label{fig:decorated_many_circles_surgery} \end{figure} \end{example} Let us enumerate the isotopy classes of connected decorated resolution configuration of multiplicity $>1$. \subsection{Decorated resolution configurations of index $1$} All nonempty decorated resolution configurations consists of a comparable pair of labeled resolution configurations and have multiplicity $1$. \subsection{Decorated resolution configurations of index $2$} According to Propositions~\ref{prop:1circle_multiplicity} and~\ref{prop:kcircle_multiplicity} the multiplicity of a decorated resolution configuration $(D, x, y)$ with two arcs is equal to $1$ except three cases (see Fig.~\ref{fig:ladybug_cases}). If $F=S^2$ then there is a unique up to isomorphism decorated resolution configuration $L_0$ of multiplicity $2$. When $F\ne T^2$, the decorated resolution configurations of multiplicity $2$ are the ladybug resolution configuration of type $L_\alpha$ where $\alpha$ is a homotopy class of a nontrivial simple loop in $F$. In the torus case $F=T^2$, there is a two-parameter series of decorated resolution configurations of multiplicity $2$. The parameters are two homology classes $\alpha$ and $\beta$ in $H_1(T^2)$. \begin{figure}[h] \centering\includegraphics[width=0.6\textwidth]{ladybug_types.eps} \caption{Ladybug configurations of type $L_0$ (left) and $L_\alpha$ (middle), and a quasi-ladybug configuration of type $Q_{\alpha,\beta}$ (right). The labels of the circles are $x_+$}\label{fig:ladybug_cases} \end{figure} Let us consider these configuration more attentively. \subsubsection{\bf The ladybug configuration for link diagrams in $S^2$}\label{tamago} \noindent We review the ladybug configuration for link diagrams in $S^2$, which is introduced in \cite[section 5.4]{LSk}. Lipshitz and Sarkar introduced it in the case of link diagrams in $S^2$. We cite the definition of it, that of the right pair, and that of the left pair associated with it from \cite[section 5.4.2]{LSk}. \\ \begin{definition}\label{teten} {\bf (\cite[Definition 5.6]{LSk}).} An index 2 basic resolution configuration $D$ in $S^2$ is said to be a ladybug configuration if the following conditions are satisfied (See Figure \ref{tento}.). $\bullet$ $Z(D)$ consists of a single circle, which we will abbreviate as $Z$; $\bullet$ The endpoints of the two arcs in $A(D)$, say $A_1$ and $A_2$, alternate around $Z$ \hskip3mm (that is, $\partial A_1$ and $\partial A_2$ are linked in $Z$).\\ \end{definition} \begin{definition}\label{rl} {\bf (\cite[section 5.4.2]{LSk}).} Let $D$ be as above. Let $Z$ denote the unique circle in $Z(D)$. The surgery $s_{A_1}(D)$ (respectively, $s_{A_2}(D)$) consists of two circles; denote these $Z_{1,1}$ and $Z_{1,2}$ (respectively, $Z_{2,1}$ and $Z_{2,2}$); that is, $Z(s_{A_i}(D)) = \{Z_{i,1}, Z_{i,2}\}$. As an intermediate step, we distinguish two of the four arcs in $Z - (\partial A_1\cup \partial A_2)$. Assume that the point $\infty\in S^2$ is not in $D$, and view $D$ as lying in the plane $S^2-\{\infty\}\cong\R^2$. Then one of $A_1$ or $A_2$ lies outside $Z$ (in the plane) while the other lies inside $Z$. Let $A_i$ be the inside arc and $A_o$ the outside arc. The circle $Z$ inherits an orientation from the disk it bounds in $\R^2$. With respect to this orientation, each component of $Z - (\partial A_1\cup\partial A_2)$ either runs from the outside arc $A_o$ to an inside arc $A_i$ or vice-versa. The {\it right pair} is the pair of components of $Z-(\partial A_1\cup\partial A_2)$ which run from the outside arc $A_o$ to the inside arc $A_i$. The other pair of components is the {\it left pair}. See \cite[Figure 5.1]{LSk}. \end{definition} We explain why the ladybug configuration is important, below. \begin{proposition}\label{4} Let ${\bf x}$ $($respectively, ${\bf y})$ be a labelled resolution configuration in $S^2$ of homological grading $n$ $($respectively, $n+2).$ Then the cardinality of the set \hskip3mm $\{p| p$ is a labelled resolution configuration. ${\bf x}\prec p, p\prec{\bf y},$ $p\neq{\bf x}$, $p\neq{\bf y}\}$ \noindent is 0, 2, or 4, where $\prec$ represents the partial order defined in \cite[Definition 2.10]{LSk}. \end{proposition} Let $D$ be the ladybug configuration in $S^2$. Since each of $D$ and $s(D)$ has only one circle, we can let $x_+$ or $x_-$ denote a labeling on it. Give $D$ (respectively, $s(D)$) a labeling $x_+$ (respectively, $x_-$). We call the resultant labeled resolution configuration $(D,x_+)$ (respectively, $(s(D),x_-)$). We obtain a decorated resolution configuration $(D,x_-,x_+)$ as drawn in Figure \ref{uenp}. \begin{fact}\label{tenten} The case of 4 in Proposition \ref{4} occurs in the above case $(D,x_-,x_+)$. \end{fact} Fact \ref{tenten} is also explained in \cite[section 5.4]{LSk}. \begin{figure} \includegraphics[width=0.16\textwidth]{tento.eps} \caption{{\bf The ladybug configuration }\label{tento}} \end{figure} \begin{figure} \centering\includegraphics[width=0.65\textwidth]{uenp.eps} \caption{ {\bf The poset for the decorated resolution configuration associated with a ladybug configuration in $S^2$ }\label{uenp} } \end{figure} \bb \subsection{Ladybug and quasi-ladybug configurations for link diagrams in surfaces}\label{hiyoko} \bb \begin{definition}({\bf\cite{KauffmanNikonovOgasa}})\label{LQ} Let $D$ be a resolution configuration which is made of one circle and two m-arcs (multiplication arc). \\ Stand at a point in the circle where you see an arc to your right. Go ahead along the circle. Go around one time. Assume that you encounter the following pattern: In the order of travel you next touch the other arc. Then you touch the first arc. Then you touch the other arc again. Finally, you come back to the point at the beginning. \\ Since both arcs are m-arcs, both satisfy the following property: At both endpoints of each arc, you see the arc in the same side -- either on the right hand side and on the left hand side.\\ If you see the arcs both in the right hand side and in the left hand side (respectively, only in the right hand side) while you go around one time, we call $D$ a {\it ladybug configuration} (respectively, {\it quasi-ladybug configuration}). If $F$ is the 2-sphere, our definition of ladybug configurations is the same as that in in \S\ref{tamago}. \bb Let $D$ be a ladybug (respectively, quasi-ladybug) configuration. Then $Z(D)$ have only one circle and $A(D)$ have only two arcs. Make $s(D)$. Give $D$ (respectively, $s(D)$) a labeling $x$ (respectively, $y$). We call the decorated resolution configuration $(D,y,x)$ a {\it decorated resolution configuration associated with the ladybug $($respectively, quasi-ladybug$)$ configuration $D$}. \end{definition} Note that $(D,y,x)$ may be empty as explained below. Since each of $D$ and $s(D)$ has only one circle, we can let $x_+$ or $x_-$ denote $x$ (respectively, $y$). See Figure \ref{quasiT2}. The partial order defined in \cite[Definition 2.10]{LSk} is defined in the case of link diagrams in $S^2$. The authors \cite{KauffmanNikonovOgasa} generalized it to the case of links in thickened surfaces. \begin{figure} \includegraphics[width=0.7\textwidth]{quasiT2.eps} \caption{{\bf The poset for a decorated resolution configuration $(D,x_-,x_+)$ associated with a quasi-ladybug configuration on $T^2$: We envelope $T^2$ along two circles as usual, and draw six labeled resolution configurations. Here, we have $[\xi;a]\cdot[a;\eta]=[\xi;b]\cdot[b;\eta]=-[\xi;c]\cdot[c;\eta]=-[\xi;d]\cdot[d;\eta].$ }\label{quasiT2}} \end{figure} \begin{proposition}{\bf(\cite{KauffmanNikonovOgasa})}\label{daijida} \h$(1)$ Let $D$ be a quasi-ladybug configuration in a surface $F$. Assume that the only one circle in $D$ is contractible. Let $F$ be the torus. Then there is a non-vacuous decorated resolution configuration $(D, x_-,x_+)$ associated with $D$. \bs \h$(2)$ Let $D$ be a quasi-ladybug configuration in a surface $F$. Assume that the only one circle in $D$ is contractible. Let $(D,y,x)$ be a decorated resolution configuration associated with $D$. Assume that the genus of $F$ is greater than one. Then $(D,y,x)$ is empty for arbitrary $x$ and $y$. \bs \h$(3)$ Let $D$ be a ladybug $($respectively, quasi-ladybug$)$ configuration in a surface $F$. Let $(D,y,x)$ be a decorated resolution configuration associated with $D$. Assume that the only one circle in $D$ is non-contractible. Then $(D,y,x)$ is empty for arbitrary $x$ and $y$. \bs \h$(4)$ Let $F$ be an arbitrary surface. There is a ladybug configuration $D$ in $F$ such that a decorated resolution configuration $(D,y,x)$ associated with $D$ is non-empty. \end{proposition} \subsection{Decorated resolution configurations of index $3$} All resolution configurations with three arcs are made from graphs in Figure \ref{fig:cases3}. \begin{figure} \centering\targ{4}{chord3_1}{1} \quad \targ{4}{chord3_2}{2} \quad \targ{4}{chord3_3}{3} \quad \targ{4}{chord3_4}{4} \quad \targ{4}{chord3_5}{5} \\ \targ{3.5}{chord3_6}{6} \quad \targ{3.5}{chord3_7}{7} \quad \targ{3.5}{chord3_8}{8} \\ \targ{3.5}{chord3_9}{9}\quad \targ{3.5}{chord3_10}{10}\quad \targ{3.5}{chord3_11}{11} \\ \targ{3.5}{chord3_12}{12} \quad \targ{4}{chord3_13}{13} \quad \targ{3.5}{chord3_14}{14} \\ \targ{3.5}{chord3_15}{15}\quad \targ{3.5}{chord3_16}{16} \\ \targ{3}{chord3_17}{17} \quad \targ{3}{chord3_18}{18} \\ \targ{7}{chord3_19}{19} \caption{{\bf Connected graphs of the resolution configurations of index 3: The segments denote arcs. We do not use dotted segments here. }}\label{fig:cases3} \end{figure} Most of the configurations contain a leaf or a coleaf. Hence, they can be reduced to decorated configurations of smaller index. Using Propositions~\ref{prop:1circle_multiplicity} and~\ref{prop:kcircle_multiplicity} we can enumerate the diagrams without leaves and coleaves, see Fig.~\ref{fig:cases}. \begin{figure}[h] \includegraphics[width=140mm]{cases1_12.eps} \caption{{\bf Initial configurations of decorated resolutions of index $3$ with one circle and without leaves and coleaves. The labels of the circles are $x_+$.}}\label{fig:cases} \end{figure} The diagrams (1)--(2'') are local, i.e. can be drawn in a disk of the surface. Note that the diagrams (1) and (1') ((2), (2') and (2'')) are isotopic if one considers them as diagrams in the sphere $S^2$. Then diagrams (3)--(6) are parameterized by the homotopy class $\alpha$ of a nontrivial simple loop in the sphere. The diagrams (7)--(8) contain a pair of interlaced outer chords (quasi-ladybug configuration) and can occur only when $F=T^2$ is the torus. \section{Moduli spaces}\label{mod} In the subsequent sections we consider concrete examples of branched covering moduli systems. \subsection{Case (C) for links in surfaces}\label{subsect:case_C} We starts with the cubic case, i.e. with moduli systems which cover trivially the moduli spaces of the cubic flow category. We define the moduli spaces $\MM(D, x, y)$ by induction on the index $n$ of decorated resolution configuration $(D, x, y)$. Case $n=1$. We set $\MM(D, x, y)\simeq \MM_{\CC_C(1)}(\bar 1, \bar 0)$ to be one point. Case $n=2$. The moduli space $\MM_{\CC_C(2)}(\bar 1, \bar 0)$ can be identified with the segment $I=[0,1]$. In all cases except the ladybug and quasi-ladybug configurations (see Fig.~\ref{fig:ladybug_cases}) there are four labeled resolution configurations in $(D, x, y)$ that correspond to the vertices of a square, i.e. the objects of $\CC_C(2)$. Thus, we can identify the moduli space $\MM(D, x, y)$ with $\MM_{\CC_C(2)}(\bar 1, \bar 0)=I$. In a (quasi)-ladybug configuration the boundary $\partial\MM(D, x, y)$ consists of four points $a,b,c,d$ which correspond to the paths in the diagram of the decorated resolution configuration, see Fig.~\ref{fig:ladybug_right} and~\ref{fig:quasi-ladybug_pairs}. By induction, the points $a$ and $b$ project to one end of the segment $I$, and $c$ and $d$ project to the other end. We must extend this projection to a $2$-fold covering over $I$. There are two ways to do this, and we must choose one of them. \begin{figure}[h] \centering\includegraphics[width=0.4\textwidth]{ladybug_right_left_pairs.eps} \caption{Right pairs (right column) and left pairs (left column) in ladybug resolution configurations}\label{fig:ladybug_right_left_pairs} \end{figure} For a ladybug configuration we can use left-right pair convention from the paper~\cite{LSk}. The ends of the arcs splits the cycle of the decorated resolution configuration into four segments. For the {\em right pairs}, we take the segments that start in the endpoint of the arc which goes to the right, and end in the endpoint of the arc which goes to the left, see Fig.~\ref{fig:ladybug_right_left_pairs}. The we pair the labeled resolution configurations which have the same labels on the distinguished segments of the cycle: $a$ with $d$, $b$ with $c$. The moduli space $\MM(D, x, y)$ is the disjoint union of segments $ad$ and $bc$, see Fig.~\ref{fig:ladybug_moduli_space}. Analogously, the moduli space for the left pairs can be defined. \begin{figure}[h] \centering\includegraphics[width=0.5\textwidth]{ladybug_right.eps} \caption{Decorated diagram in a ladybug case. The blue segments are the right pairs in the cycle.}\label{fig:ladybug_right} \end{figure} \begin{figure}[h] \centering\includegraphics[width=0.15\textwidth]{quasi-ladybug_order_modulus.eps} \caption{The moduli space in (quasi-)ladybug case}\label{fig:ladybug_moduli_space} \end{figure} In the quasi-ladybug case, the cycle must be contractible (otherwise the decorated resolution configuration will be empty due to the homotopical grading). Then the orientation of the torus induces a canonical orientation of the cycle. Any arc with the ends on the cycle determines a homology class in $H_1(T^2,\Z)$ (we take the class of the loop that the arc becomes after contraction the cycle to a point). Let us define an analogue of right pairs in the quasi-ladybug case. Fix a prime element $\lambda\in H_1(T^2,\Z)$. It defines a simple curve in the torus. Choose a class $\mu$ such that $\lambda\cdot\mu=1$. Then $\lambda, \mu$ is a basis of $H_1(T^2,\Z)$. Any arc $a$ with ends on the cycle determines a homology class in $H_1(T^2,\Z)$. Then $a=p\lambda+q\mu$, $p,q\in\Z$. We assign the number $-\frac pq$ to the arc $a$ (if $a=\pm\lambda$ we assign $-\infty$ to $a$). This numbering defines an order on the arcs of the decorated resolution configuration. Informally speaking, we number the arcs moving counterclockwise on the cycle, starting from an endpoint of the longitude on the cycle, see Fig.~\ref{fig:quasi-ladybug_order_pairs}. In a quasi-ladybug decorated resolution configuration we take the segments of the cycle which start at the arc with the bigger number and end at the arc the smaller number, see Fig.~\ref{fig:quasi-ladybug_order_pairs}. \begin{figure}[h] \centering\includegraphics[width=0.2\textwidth]{quasi-ladybug_order_pairs.eps} \caption{The $\lambda$-pair.}\label{fig:quasi-ladybug_order_pairs} \end{figure} We shall call this pair of segments of the cycle the {\em $\lambda$-pair}. The other two segments form the {\em $\bar\lambda$-pair}, see Fig.~\ref{fig:quasi-ladybug_lambda_pairs}. \begin{figure}[h] \centering\includegraphics[width=0.4\textwidth]{quasi-ladybug_lambda_pairs.eps} \caption{The $\lambda$-pairs (left) and the $\bar\lambda$-pairs (right).}\label{fig:quasi-ladybug_lambda_pairs} \end{figure} Note that the $\lambda$-pair does not depend on the orientation of the cycle in the case when the arcs differ from $\lambda$ (as elements in $H_1(T^2,\Z)$). The segments which form the $\lambda$-pair can be thought of as the segments of the cycle (with ends at the arcs) which intersect the longitude $\lambda$. But the orientation matters when one of the arcs is homologous to $\lambda$, see Fig.~\ref{fig:quasi-ladybug_lambda_pairs}. \begin{figure}[h] \centering\includegraphics[width=0.4\textwidth]{quasi-ladybug_lambda_pairs0.eps} \caption{The $\lambda$ and $\bar\lambda$-pairs when one of the arcs is homologous to $\lambda$.}\label{fig:quasi-ladybug_order_pairs0} \end{figure} We pair the labeled resolution configurations which have the same labels on the distinguished segments of the cycle ($a$ with $d$, $b$ with $c$), see Fig.~\ref{fig:quasi-ladybug_pairs}. Thus, we get the moduli space $\MM(D, x, y)$ to be equal the disjoint union of segments $ad$ and $bc$, see Fig.~\ref{fig:ladybug_moduli_space}. \begin{figure}[h] \centering\includegraphics[width=0.5\textwidth]{quasi-ladybug_pairs.eps} \caption{Decorated diagram in the quasi-ladybug case. The red segments are the $\lambda$-pairs.}\label{fig:quasi-ladybug_pairs} \end{figure} Thus, in order to define the moduli spaces of index $2$ we need to fix choices $\pi(0),\pi(\alpha)\in\{l,r\}$ of left/right pairs for ladybug configurations $L_0$ and $L_\alpha$, and choices $\pi(\alpha,\beta)=\pi(\alpha,\beta)\in\{\lambda,\bar\lambda\}$ between $\lambda$ and $\bar\lambda$-pairs for quasi-ladybug configurations $Q_{\alpha,\beta}$. This set of choices $\pi$ is called a {\em pairing}. Let $\pi_{r,\lambda}$ denote the pairing such that $\pi_{r,\lambda}(0)=r$, $\pi_{r,\lambda}(\alpha)=r$ for all $\alpha$, and $\pi_{r,\lambda}(\alpha,\beta)=\lambda$ for all $\alpha,\beta$. Analogously, one defines the pairings $\pi_{l,\lambda}$, $\pi_{r,\bar\lambda}$, $\pi_{l,\bar\lambda}$. We will call these pairings {\em regular}. From now on, we fix some pairing $\pi$ (regular or not) and define the moduli spaces $\MM(D, x, y)$ of index $2$ according to it. Case $n=3$. The moduli space $\MM_{\CC_C(3)}(\bar 1, \bar 0)$ is a hexagon. Let $(D, x, y)$ be a decorated resolution configuration of index $3$. The boundary $\partial\MM(D, x, y)$ is defined by induction, and we need to extend it to a moduli space $\MM(D, x, y)$ and a covering $\MM(D, x, y)\to \MM_{\CC_C(3)}(\bar 1,\bar 0)$. If the decorated resolution configuration does not include a (quasi)-ladybug configuration, there is a bijection between the labeled resolutions of $(D, x, y)$ and the vertices of the $3$-cube, and we set $\MM(D, x, y)=\MM_{\CC_C(3)}(\bar 1,\bar 0)$. If the decorated resolution configuration includes only a ladybug of type $L_0$, we are in the classical situation that was treated in~\cite{LSk}. The boundary $\partial\MM(D, x, y)$ is (the boundary of) two hexagons which project naturally to $\partial\MM_{\CC_C(3)}(\bar 1, \bar 0)$. We extend this projection to a trivial $2$-fold covering $\MM(D, x, y)\to \MM_{\CC_C(3)}(\bar 1,\bar 0)$. If the decorated resolution configuration includes a ladybug of type $L_\alpha$, then it can not contain configurations of type $L_0$ or $Q_{\alpha,\beta}$ (otherwise the decorated resolution configuration is empty because of homotopical rading). Then we have the following initial labeled resolution configurations, see Fig.~\ref{fig:cases} (3)--(6). In all cases the homotopical grading does not interferes the poset structure of the decorated resolution configuration. Hence, we can treat the decorated configuration as if it were planar. Thus, the boundary $\partial\MM(D, x, y)$ forms two hexagons as in the classical ladybug case, and the moduli space $\MM(D, x, y)$ is defined as a trivial $2$-fold covering space over $\MM_{\CC_C(3)}(\bar 1,\bar 0)$. Let us consider the case when the decorated resolution configuration includes a quasi-ladybug configuration, see Fig.~\ref{fig:cases} (7)--(10). In the diagrams (7), (9), a quasi-ladybug configuration of type $L_{\alpha,\beta}$ appears twice in the decorated resolution configuration. In these two cases the homotopical grading does not impose additional restrictions to the poset structure of the decorated resolution configuration. Then we can consider the horizontal (if $\pi(\alpha,\beta)=\lambda$) or vertical (if $\pi(\alpha,\beta)=\bar\lambda$) arcs as inner and work with the decorated configuration as with one including ladybug configuration of type $L_\beta$ (or $L_\alpha$). Thus, the moduli space $\MM(D, x, y)$ is a trivial $2$-fold covering over the hexagon $\MM_{\CC_C(3)}(\bar 1,\bar 0)$. \begin{figure}[h] \centering\includegraphics[width=0.12\textwidth]{dodeca_quasiladybug.eps} \caption{Initial labeled resolution configuration for the decorated configuration $DQ(\alpha,\beta,\gamma)$}\label{fig:dodeca_quasiladybug} \end{figure} Let us consider the diagram in Fig.~\ref{fig:cases} (8). Denote the homology classes of the arcs by $\alpha$, $\beta$, $\gamma$, see Fig.~\ref{fig:dodeca_quasiladybug}. Then the decorated resolution configuration includes three quasi-ladybug configurations of type $Q_{\alpha,\beta}$, $Q_{\beta,\gamma}$ and $Q_{\alpha,\gamma}$, see Fig.~\ref{fig:case_8l}. \begin{figure}[h] \centering\includegraphics[width=0.7\textwidth]{case_8l.eps} \caption{The decorated diagram $DQ(\alpha,\beta,\gamma)$ of index $3$}\label{fig:case_8l} \end{figure} The boundary $\partial\MM(D, x, y)$ consists of $12$ vertices which corresponds to paths from the initial to the final labeled resolution configuration in the diagram of the decorated configuration in Fig.~\ref{fig:case_8l}. Any path is determined by the intermediate labeled configuration, for example, $1a$, $4c$ etc. An edge of $\partial\MM(D, x, y)$ corresponds to switching between two paths with a common edge, see Fig.~\ref{case_8_moduli_space1}. There are six fixed edges $1a-1b$, $2a-2b$, $3a-3c$, $4a-4c$, $5b-5c$, $6b-6c$. The other six edges of $\partial\MM(D, x, y)$ depend on the chosen pairing $\pi$. \begin{figure}[h] \includegraphics[width=0.4\textwidth]{case_8_modulus1.eps} \caption{Pairings in $\partial\MM(D, x, y)$. Red, orange and gold edges correspond to $\lambda$-pairs. Blue, azure and magenta labels correspond to $\bar\lambda$-pairs. The black edges are fixed.}\label{case_8_moduli_space1} \end{figure} Let us first consider the case when all pairs are $\lambda$-pairs: $\pi(\alpha,\beta)=\pi(\beta,\gamma)=\pi(\alpha,\gamma)=\lambda$. Using the fixed longitude $\lambda$, we determine the $\lambda$-pairs for any pair of arcs, see Fig.~\ref{fig:case_8_order_pairs}. \begin{figure}[h] \centering\includegraphics[width=0.25\textwidth]{case_8_order_pairs.eps} \caption{Segments of the $\lambda$-pairs.}\label{fig:case_8_order_pairs} \end{figure} We use the $\lambda$-pairs to find the moduli space of the quasi-ladybug faces. The moduli space of the face containing the labeled resolution configuration $a$ consists of segments $1a-3a$ and $2a-4a$, the other two faces give the segments $1b-5b$, $2b-6b$, $3c-5c$ and $4c-6c$. Thus, the boundary $\partial\MM(D, x, y)$ forms two hexagons, see Fig.~\ref{fig:case_8_order_modulus}. Since the space $\partial\MM_{\CC_C(3)}(\bar 1,\bar 0)$ is a hexagon, the covering map on the boundary is trivial. \begin{figure}[h] \centering\includegraphics[width=0.35\textwidth]{case_8_order_modulus.eps} \caption{The boundary $\partial\MM(D, x, y)$ of the moduli space for the $\lambda$-pairing.}\label{fig:case_8_order_modulus} \end{figure} \begin{figure}[h] \centering\includegraphics[width=0.15\textwidth]{dodeca_quasiladybug1.eps} \caption{Initial labeled resolution configuration for the decorated configuration $DQ'(\alpha,\beta,\gamma)$. The classes $\alpha,\beta,\gamma$ are the ones of loops that appear after contracting the two cycles to points and deleting one of the three arcs.}\label{fig:dodeca_quasiladybug1} \end{figure} Let us consider the diagram in Fig.~\ref{fig:dodeca_quasiladybug1}. This decorated resolution configuration $DQ'(\alpha,\beta,\gamma)$ (see Fig.~\ref{fig:case_8_dual_lambda}) is dual to the one considered above. Thus, it has the isomorphic moduli space $\MM(D, x, y)$: two hexagons if the number of $\bar\lambda$-pairings among $\pi(\alpha,\beta)$, $\pi(\beta,\gamma)$, $\pi(\alpha,\gamma)$ is even, and a dodecagon branched over the hexagon $\MM_{\CC_C(3)}(\bar 1, \bar 0)$ if the number $\bar\lambda$-pairings is odd. \begin{figure}[h] \centering\includegraphics[width=0.7\textwidth]{case_8_dual_lambda.eps} \caption{The decorated diagram $DQ'(\alpha,\beta,\gamma)$ of index $3$}\label{fig:case_8_dual_lambda} \end{figure} Thus, we see that the regular pairings $\pi_{r,\lambda}$, $\pi_{l,\lambda}$ induce trivial coverings of the moduli spaces $\MM(D, x, y)\to\MM_{\CC_C(3)}(\bar 1, \bar 0)$ of index three. Since there is no obstruction to extension of trivial covering in higher dimensions, the moduli spaces of regular $\lambda$-pairings are trivial coverings over the cubic moduli spaces. Thus, we have proved Theorem~\ref{thm:moduli_system_existence} for the cubic case. \subsection{Case (D) for links in surfaces}\label{subsect:case_D} Now let us pass to the case when moduli spaces of the moduli system cover the moduli spaces of the cube flow category with branching points. \begin{proof}[Proof of Theorem~\ref{thm:moduli_system_existence}] We construct the moduli spaces $\MM(D, x, y)$ by induction on the index of the decorated resolution configurations. We modify moduli spaces constructed for the case (C) in the previous section. For indices $n=1,2$ we use the moduli spaces of the cubic case. These are points ($n=1$) and one or two segments ($n=2$). Case $n=3$. The cubic moduli spaces are one or two hexagons. For two hexagons we add a handle connecting the hexagons and make the moduli space a cylinder (Fig.~\ref{fig:branched_moduli3}). This space corresponds to a branched covering over the hexagon with two branch points (Fig.~\ref{fig:branched_moduli3_cover}). \begin{figure}[h] \includegraphics[width=0.35\textwidth]{branched_moduli3.eps} \caption{Branched moduli space.}\label{fig:branched_moduli3} \end{figure} \begin{figure}[h] \includegraphics[width=0.15\textwidth]{branched_moduli3_cover.eps} \caption{Branching set in the moduli space of the cube flow category.}\label{fig:branched_moduli3_cover} \end{figure} Case $n\ge 4$. Assume we have construct moduli spaces for the decorated resolution configurations of index $\le n$. Let $(D, x, y)$ be a decorated resolution configurations of index $n$. By induction the boundary $\partial \MM(D, x, y)$ of the moduli space is determined as a covering. This means that we have a branching submanifold of codimension 2 in the sphere $\partial\MM_{\CC_C(n)}(\bar 1, \bar 0)\simeq S^{n-2}$ such that the branched covering space is equal to $$\partial \MM(D, x, y)=\coprod_{(E,z)\in P(D,x,y)} \circ(\MM(D\setminus E, z|, y|)\times \MM(E\setminus s(D), x|, z|)).$$ The branching set $P\subset \partial \MM_{\CC_C(n)}(\bar 1, \bar 0)=S^{n-2}$ is an oriented closed $(n-4)$-dimensional manifold. Then there is a $(n-3)$-dimensional oriented manifold $Q\subset S^{n-2}$ with boundary such that $\partial Q = P$~\cite[p. 50, Theorem 3]{Kirby}. Push the manifold $Q$ inside $B^{n-1}$ so that the deformed manifold $Q'$ have the boundary $P=\partial Q'=Q'\cap S^{n-2}$ and $Q'$ intersect the sphere $S^{n-2}$ transversely. Then we define the moduli space $\MM(D,x,y)$ as the $2$-fold branched covering over $D^{n-1}$ with the branching set $Q'$. \end{proof} \begin{remark} The moduli spaces constructed above differ from the moduli spaces of the case (C) by framed cobordisms. Then Pontryagin--Thom construction yields the same (up to homotopy) attaching maps in the cell complex for the Khovanov homotopy type~\cite{Stong}. Thus, the Khovanov homotopy type for the moduli system will be the same as the Khovanov homotopy type of the case (C). \end{remark} Let us construct another moduli system for links in the torus, which has some minimality properties: \begin{itemize} \item for index $3$ the branching set in the hexagon $\MM_{\CC_C(3)}$ consists of zero or one point; \item for $n\ge 4$ the branching set in $\MM_{\CC_C(n)}$ has no components $B$ such that $B\cap\partial\MM_{\CC_C(n)}=\emptyset$. \end{itemize} We construct the moduli spaces $\MM(D, x, y)$ by induction on the index of the decorated resolution configurations. Case $n=1$. We set $\MM(D, x, y)\simeq \MM_{\CC_C(1)}(\bar 1, \bar 0)$ to be one point. Case $n=2$. The moduli space $\MM_{\CC_C(2)}(\bar 1, \bar 0)$ can be identified with the segment $I=[0,1]$. In all cases except the ladybug and quasi-ladybug configurations (see Section~\ref{hiyoko}) the multiplicity of the decorated configuration is equal to $1$, hence, there are four labeled resolution configurations in $(D, x, y)$ that correspond to the vertices of a square, i.e. the objects of $\CC_C(2)$. Thus, we can identify the moduli space $\MM(D, x, y)$ with $\MM_{\CC_C(2)}(\bar 1, \bar 0)=I$. For ladybug and quasi-ladybug configurations (case $\mu(D,x,y)=2$) we have four points in the boundary of $\partial \MM(D, x, y)$ which can be connected with two segments. Thus, for those configurations $\MM(D, x, y)$ is a disjoint union two segments. In order to define the moduli spaces of index $2$ we fix choices $\pi(0),\pi(\alpha)\in\{l,r\}$ of left/right pairs for ladybug configurations $L_0$ and $L_\alpha$, and choices $\pi(\alpha,\beta)=\pi(\alpha,\beta)\in\{\lambda,\bar\lambda\}$ between $\lambda$ and $\bar\lambda$-pairs for quasi-ladybug configurations $Q_{\alpha,\beta}$. For the (D) case we can take one of the regular pairing $\pi_{r,\bar\lambda}$ or $\pi_{l,\bar\lambda}$ (see the previous section). Case $n=3$. The moduli space $\MM_{\CC_C(3)}(\bar 1, \bar 0)$ is a hexagon. Let $(D, x, y)$ be a decorated resolution configuration of index $3$. The boundary $\partial\MM(D, x, y)$ is defined by induction, and we extend it to a moduli space $\MM(D, x, y)$ and a covering $\MM(D, x, y)\to \MM_{\CC_C(3)}(\bar 1,\bar 0)$. Let us show that the regular pairing $\pi_{r,\bar\lambda}$ gives branched moduli spaces. Consider the decorated resolution diagram $DQ(\alpha,\beta,\gamma)$ (Fig.~\ref{fig:case_8l}). If we use $\bar\lambda$-pairing: $\pi(\alpha,\beta)=\pi(\beta,\gamma)=\pi(\alpha,\gamma)=\bar\lambda$, the boundary $\partial\MM(D, x, y)$ of the moduli space is a dodecagon, see Fig.~\ref{fig:case_8_order_modulus1}. Then the moduli space $\MM(D, x, y)$ should be the interior of the dodecagon. The map $\MM(D, x, y)\to\MM_{\CC_C(3)}(\bar 1, \bar 0)$ is a $2$-fold branched covering with one branch point in the center of the dodecagon. \begin{figure}[h] \includegraphics[width=0.35\textwidth]{case_8_modulus_bar_lambda.eps} \caption{The boundary $\partial\MM(D, x, y)$ of the moduli space for the $\bar\lambda$-pairing.}\label{fig:case_8_order_modulus1} \end{figure} For the decorated resolution configuration $DQ'(\alpha,\beta,\gamma)$ in Fig.~\ref{fig:dodeca_quasiladybug1} the $\bar\lambda$-pairing also gives a dodecagon moduli space. Note that moduli spaces that covers the cubic moduli spaces with branching points can appear only for links in the torus. For this reason below we focus on the case when $F=T^2$. Case $n=4$. The moduli space $\MM_{\CC_C(3)}(\bar 1, \bar 0)$ is a truncated octahedron. Let $(D, x, y)$ be a decorated resolution configuration of index $4$. If it does not have a subconfiguration of index $3$ whose moduli space is a dodecagon, then the boundary $\partial\MM(D, x, y)$ covers trivially the boundary $\partial\MM_{\CC_C(4)}(\bar 1,\bar 0)$. Hence, we define $\MM(D, x, y)$ as a trivial cover over $\MM_{\CC_C(4)}(\bar 1,\bar 0)$ which is $1$ fold when $(D, x, y)$ does not include (quasi)ladybug confgurations, $2$-fold when $(D, x, y)$ includes a (quasi)ladybug confguration, and $4$-fold when $(D, x, y)$ includes two disjoint (quasi)ladybug configurations. Now, let $(D, x, y)$ includes a subconfiguration of index $3$ with a dodecagon moduli space. At first, consider the case when this subconfiguration is $DQ(\alpha,\beta,\gamma)$. Then there exists a labeled resolution configuration $(\hat D,z)\in P(D,x,y)$ which contains the labeled resolution configuration of Fig.~\ref{fig:dodeca_quasiladybug}. Let $A$ be the set of arcs in the decorated resolution configuration $(D, x, y)$. Then there exists a subset $A_-\subset A$ such that $\hat D=s_{A_-}D$. Let $A_+=A\setminus(A_-\cup\{\alpha, \beta,\gamma\})$. Since $A$ consists of four arcs, then $A\setminus\{\alpha, \beta,\gamma\}=\{\delta\}$. Assume that $A_-=\{\delta\}$. We can draw $\delta$ as an arc in the resolution configuration $\hat D=s_\delta(D)$. That arc can not be an outer non-contractible arc. Otherwise, the diagram $D=s_\delta^{-1}(D)$ would have two nontrivial cycles with label $x_+$, hence the decorated resolution configuration must be empty because of homotopical grading. Then $\delta$ is an inner arc or an outer coleaf. In the latter case we can draw $\delta$ as an inner coleaf. Assume that $A_+=\{\delta\}$. Then $\delta$ can not be an inner arc which interlaces with arc $\alpha$, $\beta$ or $\gamma$. Otherwise, we would have an empty decorated resolution configuration like in Fig.~\ref{case_9} by the homotopical grading. Thus, an inner $\delta$ is a trivial arc, so it can be drawn outside the cycle. Then $\delta$ is either outer nontrivial or outer trivial arc. \begin{figure}[h] \includegraphics[width=100mm]{case_9.eps} \caption{{\bf An empty decorated resolution configuration}\label{case_9}} \end{figure} Thus, we have several possibilities to draw the fourth arc in the resolution configuration, see Fig.~\ref{fig:dodeca_quasiladybug_index4}. \begin{figure}[h] \centering\includegraphics[width=0.2\textwidth]{dodeca_quasiladybug_index4.eps} \caption{Possible layouts of the fourth arc in the diagram $\hat D$. The red arcs correspond to the cases when $\delta\in A_+$ and the blue arcs are cases for $\delta\in A_-$}\label{fig:dodeca_quasiladybug_index4}. \end{figure} The corresponding decorated resolution are given in Fig.~\ref{fig:dodeca_quasiladybug_index4_diagrams}. \begin{figure}[h] \centering\includegraphics[width=0.6\textwidth]{dodeca_quasiladybug_index4_diagrams.eps} \caption{Decorated resolution configuration of index $4$ which includes the decorated resolution configuration $DQ(\alpha,\beta,\gamma)$.}\label{fig:dodeca_quasiladybug_index4_diagrams} \end{figure} Now, let the decorated resolution configuration $(D, x, y)$ include the subconfiguration is $DQ'(\alpha,\beta,\gamma)$. Then there exists a labeled resolution configuration $(\hat D,z)\in P(D,x,y)$ which contains the labeled resolution configuration of Fig.~\ref{fig:dodeca_quasiladybug1}. Let $a$ be one of the arcs of $DQ'(\alpha,\beta,\gamma)\subset\hat D$, and $\hat D'=s_a(\hat D)$. Then $\hat D'$ has two nontrivial outer and one inner arc (which is $a$ after the surgery), see Fig.~\ref{fig:dodeca_quasiladybug1_index4}. We should add a fourth arc $\delta$ to those three arc. As before, we have the following restrictions: \begin{itemize} \item if $\delta\in A_-$ and outer then $\delta$ must be homologically trivial \item if $\delta\in A_-$ then it is not interlaced with $a$ \item if $\delta \in A_+$ and inner then it is not interlaced with $\alpha$, $\beta$ or $\gamma$ \end{itemize} This we have the following possible cases. \begin{figure}[h] \centering\includegraphics[width=0.2\textwidth]{dodeca_quasiladybug1_index4.eps} \caption{Possible layouts of the fourth arc in the diagram $\hat D'$. The solid inner arc is the arc $a$. The red arcs correspond to the cases when $\delta\in A_+$ and the blue arcs are cases for $\delta\in A_-$}\label{fig:dodeca_quasiladybug1_index4}. \end{figure} The corresponding decorated resolution configurations are presented in Fig.~\ref{fig:dodeca_quasiladybug1_index4_diagrams}. \begin{figure}[h] \centering\includegraphics[width=0.6\textwidth]{dodeca_quasiladybug1_index4_diagrams.eps} \caption{Decorated resolution configuration of index $4$ which includes the decorated resolution configuration $DQ'(\alpha,\beta,\gamma)$. Same numbers correspond to isomorphic resolution configurations}\label{fig:dodeca_quasiladybug1_index4_diagrams} \end{figure} Now let us describe the moduli space structure for the cases 1--10. Let $\alpha$ be the homology class of the horizontal side and $\gamma$ be the vertical side of the square which represents the torus in Fig.~\ref{fig:dodeca_quasiladybug_index4_diagrams},~\ref{fig:dodeca_quasiladybug1_index4_diagrams}. Then $\beta=\alpha+\gamma$. The boundary $\partial\MM(D, x, y)$ covers the surface of the moduli space $\partial\MM_{\CC_C(n)}(\bar 1,\bar 0)$. The number of $2$-faces which can have branched points (of types $DQ$ and $DQ'$) for the cases 1--10 are given in the table. \begin{center} \begin{tabular}{|c|c|} \hline Case & Faces of types $DQ$ and $DQ'$ \\ \hline 1 & $2DQ(\alpha,\beta,\gamma)$ \\ 2 & $2DQ(\alpha,\beta,\gamma)$ \\ 3 & $2DQ(\alpha,\beta,\gamma)$ \\ 4 & $2DQ(\alpha,\beta,\gamma)+2DQ(\alpha,\bar\beta,\gamma)+2DQ'(\alpha,\beta,\gamma)+2DQ'(\alpha,\bar\beta,\gamma)$ \\ 5 & $DQ(\alpha,\beta,\gamma)+DQ'(\alpha,\beta,\gamma)$ \\ 6 & $2DQ(\alpha,\beta,\gamma)$ \\ 7 & $2DQ'(\alpha,\beta,\gamma)$ \\ 8 & $2DQ'(\alpha,\beta,\gamma)$ \\ 9 & $2DQ'(\alpha,\beta,\gamma)$ \\ 10 & $2DQ'(\alpha,\beta,\gamma)$ \\ \hline \end{tabular} \end{center} Here $\bar\beta=\gamma-\alpha$. Thus, in cases 1--3,5--10, if we have $D$-case for the triple $(\alpha,\beta,\gamma)$ (i.e. the number of $\bar\lambda$ among the values $\pi(\alpha,\beta)$, $\pi(\alpha,\gamma)$, $\pi(\beta,\gamma)$ is odd) then the moduli space has two branched points on the boundary. The branched covering can be extended to the interior by choosing the branched set to be the segment that connects the branched points on the boundary, see Fig.~\ref{fig:branching_order4_2bpoints}. \begin{figure}[h] \centering\includegraphics[width=0.6\textwidth]{branching_order4_2bpoints.eps} \caption{The branched set in the cases 1,3,7,9 (left), 2,6,8,10 (middle) and 5 (right)}\label{fig:branching_order4_2bpoints} \end{figure} The case 4 is more complicated. If there is one dodecagon triple among $(\alpha,\beta,\gamma)$ and $(\alpha,\bar\beta,\gamma)$ then there are 4 branched points on the boundary, see Fig.~\ref{fig:branching_order4_4bpoints} right. If both the triples $(\alpha,\beta,\gamma)$ and $(\alpha,\bar\beta,\gamma)$ are in $D$-case then the number of branched points is $8$, Fig.~\ref{fig:branching_order4_4bpoints} left. We can connect the branching points with two or four nonintersecting curves. Note that in this case there is no canonical way to extend the branched set from boundary to the whole moduli space. \begin{figure}[h] \centering\includegraphics[width=0.4\textwidth]{branching_order4_4bpoints.eps} \caption{Boundary branched points in the case 4}\label{fig:branching_order4_4bpoints} \end{figure} Case $n\ge 5$. Assume we have construct moduli spaces for the decorated resolution configurations of index $\le n$. Let $(D, x, y)$ be a decorated resolution configurations of index $n$. By induction the boundary $\partial \MM(D, x, y)$ of the moduli space is determined as a covering. This means that we have a branching submanifold of codimension 2 in the sphere $\partial\MM_{\CC_C(n)}(\bar 1, \bar 0)\simeq S^{n-2}$ such that the branched covering space is equal to $$\partial \MM(D, x, y)=\coprod_{(E,z)\in P(D,x,y)} \circ(\MM(D\setminus E, z|, y|)\times \MM(E\setminus s(D), x|, z|)).$$ The branching set $P\subset \partial \MM_{\CC_C(n)}(\bar 1, \bar 0)=S^{n-2}$ is an oriented closed $(n-4)$-dimensional manifold. Then there is a $(n-3)$-dimensional oriented manifold $Q\subset S^{n-2}$ with boundary such that $\partial Q = P$~\cite[p. 50, Theorem 3]{Kirby}. Push the manifold $Q$ inside $B^{n-1}$ so that the deformed manifold $Q'$ have the boundary $P=\partial Q'=Q'\cap S^{n-2}$ and $Q'$ intersect the sphere $S^{n-2}$ transversely. Then we define the moduli space $\MM(D,x,y)$ as the $2$-fold branched covering over $D^{n-1}$ with the branching set $Q'$. \begin{remark} Note that a ``minimal'' branching moduli systems such as considered above for links in the torus, present trivial covering (i.e. case (C)) moduli system for surfaces of other genus. Indeed, in this case quasi-ladybug configurations can not appear and for ladybug configurations any choice of left/right pairs lead to $2$-dimensional moduli spaces without branch point. Then branching sets can not appear in higher dimensions because by minimality they must intersect with the border. \end{remark} \subsection{Multivalued moduli systems for links in $S^3$}\label{subsect:mutlivalued_moduli_system} As we have seen in the previous paragraph, for links in a surface except the torus, choice of a fixed moduli space for each decorated resolution leads (under some minimality condition) to a moduli system of type (C). We can overcome this situation by considering multivalued moduli system. If we allow to choose of left/right pairs for each ladybug configuration independently then we can get moduli spaces which cover the moduli spaces of the cubic flow category with some branch point. Consider the following example (Fig.~\ref{fig:case_1}). The decorated resolution configuration has index $3$ and corresponds to a 2-dimensional moduli space. The moduli space has 12 vertices which correspond to the paths from the initial to the final state in the diagram in Fig.~\ref{fig:case_1}. The edges of the moduli space correspond to switching between the paths by changing one of the intermediate states (Fig.~\ref{fig:case_1_modulus}). The decorated resolution configuration includes two ladybug configurations, so we have two choices between the left (red in the figure) and the right (blue) pairs. If we choose the left pairs for one ladybug and the right pair for the other, we get a dodecagon as the moduli space. The dodecagon covers the hexagon (the moduli space of the cubic flow category) twofold with one branch point. \begin{figure}[h] \includegraphics[width=140mm]{case_1.eps} \caption{{\bf A decorated resolution configuration with two ladybug subconfigurations}\label{fig:case_1}} \end{figure} \begin{figure}[h] \includegraphics[width=80mm]{case_1_modulus.eps} \caption{{\bf Boundary of the moduli space of the decorated resolution configuration}\label{fig:case_1_modulus}} \end{figure} Multivalued moduli systems generalize this example. We construct a multivalued moduli system $\mathfrak M$ for links in a closed oriented surface $F$ by induction on the index of the decorated resolution configurations. Case $n=1$. Let $\MM(D, x, y)\simeq \MM_{\CC_C(1)}(\bar 1, \bar 0)$ be the moduli space consisting of one point. We set ${\mathfrak M}(D, x, y)=\{\MM(D, x, y)\}$. Case $n=2$. The moduli space $\MM_{\CC_C(2)}(\bar 1, \bar 0)$ can be identified with the segment $I=[0,1]$. In all cases except the ladybug and quasi-ladybug configurations the moduli space $\MM(D, x, y)$ is identified with $\MM_{\CC_C(2)}(\bar 1, \bar 0)=I$. Then we set ${\mathfrak M}(D, x, y)=\{I\}$. For ladybug and quasi-ladybug configurations (case $\mu(D,x,y)=2$) we have four points in the boundary of $\partial \MM(D, x, y)$ which can be connected with two segments. Thus, for those configurations we have two possible moduli spaces $\MM'(D, x, y)$ and $\MM''(D, x, y)$ which are disjoint unions of two segments. Then we take ${\mathfrak M}(D, x, y)=\{\MM'(D, x, y),\MM''(D, x, y)\}$. Case $n>2$. Let $(D, x, y)$ be a decorated resolution configurations of index $n$. By definition the boundary $\partial \MM(D, x, y)$ must be equal to $$\partial \MM(D, x, y)=\coprod_{(E,z)\in P(D,x,y)} \circ(\MM(D\setminus E, z|, y|)\times \MM(E\setminus s(D), x|, z|)).$$ We choose all possible moduli spaces $\MM(D\setminus E, z|, y|)\in {\mathfrak M}(D\setminus E, z|, y|)$, $\MM(E\setminus s(D), x|, z|)\in {\mathfrak M}(E\setminus s(D), x|, z|)$ which are compatible on the boundary. After the boundary $\partial \MM(D, x, y)$ is defined, we extend the moduli space $\MM(D, x, y)$ as in the previous section. Then we define ${\mathfrak M}(D, x, y)$ as the set consisting of all possible moduli space $\MM(D, x, y)$ constructed by this scheme. Note that the constructed moduli spaces $\MM(D, x, y)\in {\mathfrak M}(D, x, y)$ will be branch coverings over the cubic moduli spaces. \begin{example} For the knot in Fig.~\ref{fig:case_1_knot} corresponding to the decorated resolution configuration in Fig.~\ref{fig:case_1}, we have $4$ possible variants to define moduli of index $2$. Two of these variants lead to the moduli space of index $3$ homeomorphic to two hexagons, and the other two variants yield a dodecagon. The decorated resolution configurations which are not sub-configurations of the one in Fig.~\ref{fig:case_1} have multiplicity one and correspond to moduli spaces of the cube flow category. Thus, we have two potentially different Khovanov homotopy types $\mathcal X_h,\mathcal X_d\in{\mathfrak X}_{\mathfrak M}(L)$ which are constructed on the hexagonal or dodecagonal moduli spaces correspondingly. But the knot is trivial, hence, its Khovanov homology is. Thus, the homotopy types coincide and ${\mathfrak X}_{\mathfrak M}(L)=\{S^{-1}\vee S^1\}$. This fact follows also from the invariance of the multi-valued homotopy type ${\mathfrak X}_{\mathfrak M}(L)$. \begin{figure}[h] \includegraphics[width=0.2\textwidth]{case_1_knot.eps} \caption{{\bf A diagram of the unknot}\label{fig:case_1_knot}} \end{figure} \end{example} We hope to present a knot example with a nontrivial multi-valued Khovanov homotopy type in a subsequent paper. \np \section{The second Steenrod square operator}\label{sq} \subsection{The first Steenrod square operator $Sq^1$ }\label{sqq1 \h In \cite{Steenrod,SE} the Steenrod square $Sq^* (*\in\Z)$ is defined. Let $X$ and $X'$ be compact CW complexes. Let $\{C_i\}_{i\in\Z}$ be a chain complex. Assume that $\{C_i\}_{i\in\Z}$ is associated with both a CW decomposition on $X$ and a CW decomposition on $X'$. It is well-known that $Sq^1(X)=Sq^1(X')$ (see e.g. \cite[Introduction]{LSs}) and that $Sq^2(X)$ and $Sq^2(X')$ are different in general (see e.g. \cite{Seed}). Therefore, $Sq^1$ is not informative as a link invariant. Let us pass to $Sq^2$. \bigbreak \subsection{The second Steenrod square operator $Sq^2$ }\label{sqq \h We review the definition of the second Steenrod square~\cite{Steenrod, SE}. \begin{definition}\label{secondsq} Let $K_m$ be the Eilenberg--MacLane space $K(\Z_2,m)$ for any natural number $m>1$. By definition, $K_m$ is connected and $\pi_i(K_m)\cong\Z_2$ (respectively, $0$) if $i=m$ (respectively, $i\neq m$ and $ i\ge 1$). It is known that $H^{m+2}(K_m;\Z_2)\cong\Z_2$. Denote the generator of $H^{m+2}(K;\Z_2)\cong\Z_2$ by $\xi$. Let $X$ be a CW complex and $[X,K]$ be the set of all homotopy classes of continuous maps $X\to K$. Then $[X,K_m]=H^m(X;\Z_2)$. For an arbitrary element $x\in H^m(X;\Z_2)$, take a continuous map $f_x:X\to K$ which corresponds to the class $x$. Define the {\em second Steenrod square} $Sq^2(x)$ of $x$ to be $f^\ast_x(\xi)\in H^{m+2}(X;\Z_2)$. \end{definition} This definition is reviewed and explained very well in \cite[section 3.1]{LSs}. We review an important property of the second Steenrod square operator $Sq^2$, below. \begin{proposition}\label{sq2}{\rm\bf(\cite[section 12]{Steenrod}.)} Let $Y$ be any compact CW complex. Let $Y^{(*)}$ be the $*$-skeleton of $Y (*\in\Z)$. Then the second Steenrod square \\ $Sq^2(Y):H^{m}(Y;\Z_2)\to H^{m+2}(Y;\Z_2)$ is determined by the homotopy type of $Y^{(m+2)}/Y^{(m-1)}$. \end{proposition} This proposition is reviewed and explained very well in \cite[section 3.1]{LSs}. \subsection{The second Steenrod square $\mathcal Sq^2$ for links in the thickened torus in both cases (C) and (D) }\label{vitaC} \h Let $\mathcal L$ be a link in the thickened torus. We constructed stable homotopy types for $\mathcal L$. Of course each of stable homotopy types has the second Steenrod square. In the case (C), make a Khovanov-Liphitzs-Sarkar stable homotopy type for a triple of $\mathcal L$, a degree 1 homology class $\lambda\in H_1(T^2;\Z_2)$ and the right-left choice. Its second Steenrod square gives an invariant of a triple of $\mathcal L$, a degree 1 homology class $\lambda\in H_1(T^2;\Z_2)$, and henceforce, gives an invariant of $\mathcal L$. Note. There are infinitely many choice of degree 1 homology classes. However, when we are given two link diagrams and we compare the two, we only have to calculate the second Steenrod square in a finite cases. In Case (D), take the set of Khovanov-Liphitzs-Sarkar stable homotopy types for a pair of $\mathcal L$ and the right-left choice. The set of their second Steenrod squares is an invariant of a pair of $\mathcal L$ and the right-left choice, and therefore, gives an invariant of $\mathcal L$. Note. Our invariant, the set of Steenrod squares, is calculable. \\ In the case of links in $S^3$, in \cite{LSs} Lipshitz and Sarkar showed a way to calculate $\mathcal Sq^2$ by using classical link diagrams. Seed calculated the second Steenrod square for links in $S^3$ by making a computer program of the method in \cite{LSs}. He found the following explicit pair. \begin{theorem}\label{Seedrei} {\bf (\cite{Seed})} There are links $\mathcal J$ and $\mathcal J'$ in $S^3$ such that the Khovanov homologies are the same, but such that the second Steenrod squares are different. Therefore there are links $\mathcal J$ and $\mathcal J'$ in $S^3$ such that the Khovanov homologies are the same, but the Khovanov stable homotopy types are different. \end{theorem} It is very natural to ask the following question. Are there a pair of links in the thickened torus such that the homotopical Khovanov homologies are the same, but such that the second Steenrod squares are different? Note that all links in $B^3$ are regarded as links in the thickened torus if we regard $B^3$ is embedded in the thickened torus. Therefore, by Theorem~\ref{thm:moduli_system_existence}, Theorem~\ref{thm:moduli_system_invariance} and Theorem \ref{Seedrei}, there are links $\mathcal J$ and $\mathcal J'$ in the thickened torus such that the homotopical Khovanov homologies are the same (they coincide with the ordinary Khovanov homology), but such that the set of the second Steenrod squares are different.\label{proof:homotopy_type_stronger_homology} \\ Here, it is very natural to ask the following question. Are there a pair of links in the thickened torus which are not embedded in $B^3$ such that the homotopical Khovanov homologies are the same, but such that the second Steenrod squares are different? The answer is a main result. See the following proof. \bb \h{\bf Proof of Main Theorem \ref{main}.} Let $L$ be a link in the thickened torus. Consider the moduli system $\mathcal M$ on the torus constructed in Section~\ref{subsect:case_C}. Then ${\mathcal X}_\MM (L)$ is a Khovanov homotopy type with cubic moduli spaces which proves Main Theorem \ref{main}.(1). Then consider the moduli system $\mathcal M'$ on the torus constructed in Section~\ref{subsect:case_D}. The complex ${\mathcal X}_{\MM'} (L)$ is a Khovanov homotopy type with non-cubic moduli spaces which proves Main Theorem \ref{main}.(2). An easy example which proves Main Theorem \ref{main}.(3) is given above in the page~\pageref{proof:homotopy_type_stronger_homology}. We show a little more complicated example below, and give an alternative proof of Main Theorem \ref{main}.(3). Let $C$ be a circle in $T^2$ which represents a nontrivial element of $H_1(F;\Z)$. Regard $A$ as a knot in $F\x[-1,1]$. Take $\mathcal J$ and $\mathcal J'$ in a 3-ball $B$ embedded in $F\x[-1,1]$, which are written in Theorem \ref{Seedrei}. Assume that $C\cap B=\emptyset$. Make a disjoint 2-component link which is made from $C$ and $\mathcal {J}$ (respectively, $\mathcal {J'}$). By Theorem \ref{Seedrei}, these two links have different Steenrod squares and the same Khovanov homology. See \cite[\S10.2]{LSk} for Khovanov-Lipshitz-Sarkar stable homotopy type of disjoint links. In this case, we do not have a quasi-ladybug configuration. The right pair and the left one of ladybug situations give the same Steenrod second square by explicit calculus which uses that about the classical link diagram $K$. (Note that the Steenrod square is only one element in this case.) Replace $C$ with a link whose diagram is drawn in Figure~\ref{fig:case_8l}. This example gives a case which we use a dodecagon moduli. \qed\\ The above example is just the beginning of many possible applications of the result in this paper. Further applications require deeper computations of the virtual Khovanov homology and will be the subject of a subsequent paper.\\
\section{Introduction} \label{sec:intro} \setcounter{equation}{0} Piecewise-linear maps can exhibit complicated dynamics yet are relatively amenable to an exact analysis. For this reason they provide a useful tool for us to explore complex aspects of dynamical systems, such as chaos. They arise as approximations to certain types of grazing bifurcations of piecewise-smooth ODE systems \cite{DiBu08}, and are used as mathematical models, particularly in social sciences \cite{PuSu06}. In this paper we study the family of maps \begin{equation} (x,y) \mapsto f_\xi(x,y) = \begin{cases} \begin{bmatrix} \tau_L x + y + 1 \\ -\delta_L x \end{bmatrix}, & x \le 0, \\ \begin{bmatrix} \tau_R x + y + 1 \\ -\delta_R x \end{bmatrix}, & x \ge 0, \end{cases} \label{eq:f} \end{equation} where \begin{equation} \xi = \left( \tau_L, \delta_L, \tau_R, \delta_R \right). \label{eq:xi} \end{equation} With $(x,y) \in \mathbb{R}^2$ and $\xi \in \mathbb{R}^4$, this is the two-dimensional border-collision normal form \cite{NuYo92}, except the border-collision bifurcation parameter (often denoted $\mu$) has been scaled to $1$. It is a normal form in the sense that any continuous, piecewise-linear map with two pieces for which the image of the switching line intersects the switching line at a unique point that is not a fixed point, can be transformed to \eqref{eq:f} under an affine change of coordinates, see for instance \cite{Si20e}. With $\tau_R = -\tau_L$ and $\delta_L = \delta_R$, \eqref{eq:f} reduces to the well-studied Lozi map \cite{Lo78}. While \eqref{eq:f} appears simple its dynamics can be remarkably rich \cite{BaGr99,Gl16e,Si14,SiMe08b,ZhMo06b}. In \cite{BaYo98} Banerjee, Yorke, and Grebogi identified an open parameter region $\Phi_{\rm BYG} \subset \mathbb{R}^4$ (defined below) throughout which $f_\xi$ has a chaotic attractor, and this was shown formally in \cite{GlSi21}. Their work popularised the notion that families of piecewise-linear maps typically exhibit chaos in a robust fashion. This is distinct from families of one-dimensional unimodal maps --- often promoted as a paradigm for chaos --- that have dense windows of periodicity \cite{GrSw97,Ly97}. Robust chaos had already been demonstrated by Misiurewicz in the Lozi map \cite{Mi80}, but by studying the border-collision normal form, Banerjee, Yorke, and Grebogi showed that robust chaos occurs for generic families of piecewise-linear maps. However, while $f_\xi$ has a chaotic attractor for all $\xi \in \Phi_{\rm BYG}$, the attractor undergoes bifurcations, or crises \cite{GrOt83}, as the value of $\xi$ is varied within $\Phi_{\rm BYG}$. The purpose of this paper is to reveal bifurcation structure within $\Phi_{\rm BYG}$ and we achieve this via renormalisation. Broadly speaking, renormalisation involves showing that, for some member of a family of maps, a higher iterate or induced map is conjugate to a different member of this family \cite{Ma93}. By employing this relationship recursively one can obtain far-reaching results. Renormalisation is central for understanding generic families of one-dimensional maps \cite{CoEc80,DeVa93}. For instance, Feigenbaum's constant ($4.6692\ldots$) for the scaling of period-doubling cascades is the eigenvalue with largest modulus of a fixed point of a renormalisation operator for unimodal maps. For the one-dimensional analogue of \eqref{eq:f} (skew tent maps) the bifurcation structure was determined by Ito {\em et.~al.}~\cite{ItTa79b} via renormalisation, see also \cite{VeGl90}. More recently renormalisation was applied to a two-parameter family of two-dimensional, piecewise-linear maps in \cite{PuRo18,PuRo19}. Their results show that for any $n \ge 1$ there exists $\xi \in \mathbb{R}^4$ such that \eqref{eq:f} has $2^n$ coexisting chaotic attractors. We apply renormalisation to \eqref{eq:f} in the following way. On the preimage of the closed right half-plane, denoted $\Pi_\xi$, the second iterate of $f_\xi$ is conjugate to an alternate member of \eqref{eq:f}. That is, $f_\xi^2$ is conjugate to $f_{g(\xi)}$ for a certain function $g : \mathbb{R}^4 \to \mathbb{R}^4$. By repeatedly iterating a boundary of $\Phi_{\rm BYG}$ backwards under $g$, we are able to divide $\Phi_{\rm BYG}$ into regions $\cR_n$, for $n = 0,1,2,\ldots$, where $f_\xi$ has a chaotic Milnor attractor with $2^n$ connected components. The regions converge to a fixed point of $g$ as $n \to \infty$. The main difficulties we overcome are in analysing the global dynamics of the nonlinear map $g$ and showing that the relevant dynamics of $f_\xi$ occurs entirely within $\Pi_\xi$. Our main results are presented in \S\ref{sec:results}, see Theorems \ref{th:Rn}--\ref{th:affinelyConjugate}. Sections \ref{sec:XY}--\ref{sec:mainProof} work toward proofs of these results. First \S\ref{sec:XY} describes the phase space of \eqref{eq:f}, primarily saddle fixed points and their stable and unstable manifolds. Then in \S\ref{sec:f2} we consider the second iterate $f_\xi^2$ on $\Pi_\xi$ and construct a conjugacy to $f_{g(\xi)}$. In \S\ref{sec:phiPsi} we derive geometric properties of the boundaries of $\cR_0$ and in \S\ref{sec:renormalisation} study the dynamics of $g$. Chaos is proved in the sense of a positive Lyapunov exponent. This positivity is achieved for all points in the attractor, including points whose forward orbits intersect the switching line where $f_\xi$ is not differentiable. This is achieved by using one-sided directional derivatives which are always well-defined in our setting, \S\ref{sec:lyap}. A recursive application of the renormalisation is performed in \S\ref{sec:mainProof}. Finally \S\ref{sec:conc} provides a discussion and outlook for future studies. \section{Main results} \label{sec:results} \setcounter{equation}{0} In this section we motivate and define the parameter region $\Phi_{\rm BYG}$ and the renormalisation operator $f_\xi \mapsto f_{g(\xi)}$, then state the main results. First Theorem \ref{th:Rn} clarifies the geometry of the regions $\cR_n \subset \mathbb{R}^4$. Next Theorem \ref{th:R0} informs us of the dynamics of $f_\xi$ in $\cR_0$. Finally Theorem \ref{th:affinelyConjugate} describes the dynamics with $\xi \in \cR_n$ and any value $n \ge 0$ and follows from a recursive application of the renormalisation to Theorem \ref{th:R0}. Throughout the paper we write \begin{align} f_{L,\xi}(x,y) &= \begin{bmatrix} \tau_L x + y + 1 \\ -\delta_L x \end{bmatrix}, & f_{R,\xi}(x,y) &= \begin{bmatrix} \tau_R x + y + 1 \\ -\delta_R x \end{bmatrix}, \label{eq:fLfR} \end{align} for the left and right pieces of \eqref{eq:f}. \subsection{Two saddle fixed points} \label{sub:fps} Consider the parameter region \begin{equation} \Phi = \left\{ \xi \in \mathbb{R}^4 \,\big|\, \tau_L > \delta_L + 1, \,\delta_L > 0, \,\tau_R < -(\delta_R + 1), \,\delta_R > 0 \right\}. \label{eq:saddleSaddleRegion} \end{equation} For any $\xi \in \Phi$, $f_\xi$ has exactly two fixed points. Specifically \begin{equation} Y = \left( \frac{-1}{\tau_L - \delta_L - 1}, \frac{\delta_L}{\tau_L - \delta_L - 1} \right) \label{eq:Y} \end{equation} is a fixed point of $f_{L,\xi}$ and lies in the left half-plane, while \begin{equation} X = \left( \frac{-1}{\tau_R - \delta_R - 1}, \frac{\delta_R}{\tau_R - \delta_R - 1} \right) \label{eq:X} \end{equation} is a fixed point of $f_{R,\xi}$ and lies in the right half-plane. The eigenvalues associated with these points are those of the Jacobian matrices of $f_{L,\xi}$ and $f_{R,\xi}$: \begin{align} A_L(\xi) &= \begin{bmatrix} \tau_L & 1 \\ -\delta_L & 0 \end{bmatrix}, & A_R(\xi) &= \begin{bmatrix} \tau_R & 1 \\ -\delta_R & 0 \end{bmatrix}. \label{eq:ALAR} \end{align} Notice $\tau_L$ and $\delta_L$ are the trace and determinant of $A_L$; similarly $\tau_R$ and $\delta_R$ are the trace and determinant of $A_R$. It follows that $\Phi$ is the set of all parameter combinations for which $Y$ is a saddle with positive eigenvalues and $X$ is a saddle with negative eigenvalues. \subsection{The parameter region $\Phi_{\rm BYG}$} \label{sub:phiBYG} For any $\xi \in \Phi$, $X$ and $Y$ have one-dimensional stable and unstable manifolds. Fig.~\ref{fig:igRN_phasePortrait} illustrates the stable (blue) and unstable (red) manifolds of $Y$. These intersect if and only if $\phi(\xi) \le 0$, where \begin{equation} \phi(\xi) = \delta_R - (1+\tau_R) \delta_L + \frac{1}{2} \big( (1+\tau_R) \tau_L - \tau_R - \delta_L - \delta_R \big) \left( \tau_L + \sqrt{\tau_L^2 - 4 \delta_L} \right). \label{eq:phi} \end{equation} Equation \eqref{eq:phi} can be derived by directly calculating the first few linear segments of the stable and unstable manifolds of $Y$ as they emanate from $Y$, see \cite{GlSi21}. As a bifurcation, $\phi(\xi) = 0$ is a homoclinic corner \cite{Si16b} and is analogous to a `first' homoclinic tangency for smooth maps \cite{PaTa93}. Banerjee, Yorke, and Grebogi \cite{BaYo98} observed that an attractor is often destroyed here, so focussed their attention on the parameter region \begin{equation} \Phi_{\rm BYG} = \left\{ \xi \in \Phi \,\big|\, \phi(\xi) > 0 \right\}, \label{eq:BYGRegion} \end{equation} where the stable and unstable manifolds of $Y$ do not intersect. Indeed for all $\xi \in \Phi_{\rm BYG}$, $f_\xi$ has a trapping region and therefore a topological attractor \cite{Gl17}. \begin{figure}[b!] \begin{center} \includegraphics[height=8cm]{igRN_phasePortrait} \caption{ A sketch of the phase space of $f_\xi$ \eqref{eq:f} with $\xi \in \Phi_{\rm BYG}$. We have shown the fixed points $X$ and $Y$ and the initial parts of $W^s(Y)$ (blue) and $W^u(Y)$ (red) as they emanate from $Y$ (these manifolds do not intersect when $\phi(\xi) > 0$). The small black dots show $1000$ iterates of the forward orbit of the origin after transient dynamics has decayed. \label{fig:igRN_phasePortrait} } \end{center} \end{figure} \subsection{The renormalisation operator} \label{sub:renormOp} \begin{figure}[b!] \begin{center} \includegraphics[height=5cm]{igRN_Pi} \caption{ The preimage of the closed right half-plane \eqref{eq:Pi}. \label{fig:igRN_Pi} } \end{center} \end{figure} On $\mathbb{R}^2$ the second iterate $f_\xi^2$ is a continuous, piecewise-linear map with four pieces. But if we restrict our attention to the set \begin{equation} \Pi_\xi = \left\{ f_\xi^{-1}(x,y) \,\middle|\, x \ge 0 \right\}, \label{eq:Pi} \end{equation} then $f_\xi^2$ has only two pieces: \begin{equation} f_\xi^2(x,y) = \begin{cases} \left( f_{R,\xi} \circ f_{L,\xi} \right)(x,y), & x \le 0, \\ f_{R,\xi}^2(x,y), & x \ge 0. \end{cases} \label{eq:f2} \end{equation} As shown in Fig.~\ref{fig:igRN_Pi}, the boundary of $\Pi_\xi$ intersects the switching line at $(x,y) = (0,-1)$ and has slope $-\tau_L < 0$ in $x < 0$ and slope $-\tau_R > 0$ in $x > 0$. For any $\xi \in \Phi$, the map \eqref{eq:f2} is affinely conjugate to the normal form \eqref{eq:f} (see Proposition \ref{pr:conjugacy}). This is because the switching line of \eqref{eq:f2} satisfies the non-degeneracy conditions mentioned in \S\ref{sec:intro}. When the affine transformation to the normal form is applied, the matrix parts of the pieces of \eqref{eq:f2} undergo a similarity transform, thus their traces and determinants are not changed. The matrix part of the $x \le 0$ piece of \eqref{eq:f2} is $A_R(\xi) A_L(\xi)$, which has trace $\tau_L \tau_R - \delta_L - \delta_R$ and determinant $\delta_L \delta_R$. The matrix part of the $x \ge 0$ piece of \eqref{eq:f2} is $A_R(\xi)^2$, which has trace $\tau_R^2 - 2 \delta_R$ and determinant $\delta_R^2$. Hence \eqref{eq:f2} can be transformed to $f_{g(\xi)}$ where \begin{equation} g(\xi) = \big( \tau_R^2 - 2 \delta_R, \delta_R^2, \tau_L \tau_R - \delta_L - \delta_R, \delta_L \delta_R \big). \label{eq:g} \end{equation} Notice we are transforming the left piece of \eqref{eq:f2} to the right piece of $f_{g(\xi)}$ and the right piece of \eqref{eq:f2} to the left piece of $f_{g(\xi)}$. This ensures $g(\xi) \in \Phi$ (see Proposition \ref{pr:PhiForwardInvariant}) so our renormalisation operator $f_\xi \mapsto f_{g(\xi)}$ produces another member of the family \eqref{eq:f} in $\Phi$. Also observe \begin{equation} \xi^* = (1,0,-1,0) \label{eq:xiStar} \end{equation} is a fixed point of $g$ and lies on the boundary of $\Phi$. \subsection{Division of parameter space} \label{sub:division} For all $n \ge 0$ let \begin{equation} \zeta_n(\xi) = \phi \big( g^n(\xi) \big). \label{eq:zetan} \end{equation} The surface $\zeta_n(\xi) = 0$ is an $n^{\rm th}$ preimage of $\phi(\xi) = 0$ under $g$. We now use these surfaces to form the regions \begin{equation} \cR_n = \left\{ \xi \in \Phi \,\big|\, \zeta_n(\xi) > 0, \zeta_{n+1}(\xi) \le 0 \right\}, \label{eq:Rn} \end{equation} for all $n \ge 0$. The following result (proved in \S\ref{sub:RnProof}) gives properties of these regions. \begin{theorem} The $\cR_n$ are non-empty, mutually disjoint, and converge to $\{ \xi^* \}$ as $n \to \infty$. Moreover, \begin{equation} \Phi_{\rm BYG} \subset \bigcup_{n=0}^\infty \cR_n \,. \label{eq:RnUnion} \end{equation} \label{th:Rn} \end{theorem} Being four-dimensional the $\cR_n$ are inherently difficult to visualise. Fig.~\ref{fig:igRN_parameterSpace} shows two-dimensional cross-sections obtained by fixing the values of $\delta_L > 0$ and $\delta_R > 0$. For any such cross-section only finitely many $\cR_n$ are visible because as $n \to \infty$ they converge to $\{ \xi^* \}$ for which $\delta_L = \delta_R = 0$. Notice $\cR_1$ contains some points that do not belong to $\Phi_{\rm BYG}$. For this reason the two sets in \eqref{eq:RnUnion} are not equal. \begin{figure}[b!] \begin{center} \setlength{\unitlength}{1cm} \begin{picture}(16.7,8.5) \put(-.2,0){\includegraphics[height=8cm]{igRN_parameterSpace_a}} \put(8.7,0){\includegraphics[height=8cm]{igRN_parameterSpace_b}} \put(3.2,8.2){\small {\bf a)}~~$\delta_L = \delta_R = 0.01$} \put(12.1,8.2){\small {\bf b)}~~$\delta_L = \delta_R = 0.5$} \end{picture} \caption{ Two-dimensional cross-sections of the parameter regions $\cR_n$. In panel (a) $\cR_n$ is visible for all $n = 0,1,\ldots,4$; in panel (b) only $\cR_0$ and $\cR_1$ are visible. In both panels $\Phi_{\rm BYG}$ is the bounded by the vertical line $\tau_L = \delta_L + 1$, the horizontal line $\tau_R = -\delta_R - 1$, and the curve $\zeta_0 = 0$. \label{fig:igRN_parameterSpace} } \end{center} \end{figure} \subsection{A chaotic attractor with one connected component} \label{sub:R0} The next result shows $f_\xi$ has a chaotic, connected Milnor attractor for all $\xi \in \cR_0$ when $\delta_R < 1$. This is proved in \S\ref{sub:R0Proof} and based on the results of \cite{GlSi21}. The attractor is the closure of the unstable manifold of $X$, \begin{equation} \Lambda(\xi) = {\rm cl}(W^u(X)). \label{eq:Lambda} \end{equation} \begin{theorem} For the map $f_\xi$ with any $\xi \in \cR_0$, \begin{romanlist} \item $\Lambda(\xi)$ is bounded, connected, and invariant, \item every $z \in \Lambda(\xi)$ has a positive Lyapunov exponent, and \item if $\delta_R < 1$ there exists forward invariant $\Delta \subset \mathbb{R}^2$ with non-empty interior such that \begin{equation} \bigcap_{n=0}^\infty f_\xi^n(\Delta) = \Lambda(\xi). \label{eq:LambdaAsInfiniteIntersection} \end{equation} \end{romanlist} \label{th:R0} \end{theorem} Lyapunov exponents for \eqref{eq:f} are clarified in \S\ref{sec:lyap}. Stronger notions of chaos have been obtained on subsets of $\cR_0$, see \cite{Gl17,GlSi21}. While we have not been able to prove that $\Lambda(\xi)$ is a topological attractor, \eqref{eq:LambdaAsInfiniteIntersection} shows it contains the $\omega$-limit set of all points in $\Delta$. The set $\Delta$ has positive Lebesgue measure, thus $\Lambda(\xi)$ is a Milnor attractor \cite{Mi85}. If $\Delta$ is a trapping region (i.e.~it maps to its interior) then $\Lambda(\xi)$ is an attracting set by definition \cite{Ro04}. If $\Delta$ is the trapping region of \cite{GlSi21} (there denoted $\Omega_{\rm trap}$) then \eqref{eq:LambdaAsInfiniteIntersection} appears to be true for some but not all $\xi \in \cR_0$. We expect the extra condition $\delta_R < 1$ is unnecessary but is included in Theorem \ref{th:R0} because our proof utilises an area-contraction argument. \subsection{A chaotic attractor with many connected components} \label{sub:mainTheorem} For any $\xi \in \cR_n$ we have $g^n(\xi) \in \cR_0$ (see Lemma \ref{le:gForwards}), while Theorem \ref{th:R0} describes the dynamics in $\cR_0$. Thus by combining the renormalisation with Theorem \ref{th:R0} we are able to describe the dynamics of $f_\xi$ with $\xi \in \cR_n$. In view of the way $g$ is constructed, our renormalisation corresponds to the substitution rule \begin{equation} (L,R) \mapsto (RR,LR). \label{eq:substitutionRule} \end{equation} The same rule arises in the one-dimensional setting of Ito {\em et.~al.}~\cite{ItTa79b}. Given a word $\cW$ comprised of $L$'s and $R$'s of length $k$, let $\cF(\cW)$ be the word of length $2 k$ that results from applying \eqref{eq:substitutionRule} to every letter in $\cW$. If an orbit of $f_{g(\xi)}$ has symbolic itinerary $\cW$, the corresponding orbit of $f_\xi$ has symbolic itinerary $\cF(\cW)$. The attractor of Theorem \ref{th:R0} is the closure of the unstable manifold of $X$. Consequently for $\xi \in \cR_n$ the corresponding attractor is the closure of the unstable manifold of a periodic solution with symbolic itinerary $\cF^n(R)$, see Table \ref{tb:cF}. \begin{table}[b!] \begin{center} \begin{tabular}{c|c} $n$ & $\cF^n(R)$ \\ \hline $0$ & R \\ $1$ & LR \\ $2$ & RRLR \\ $3$ & LRLRRRLR \\ $4$ & RRLRRRLRLRLRRRLR \end{tabular} \end{center} \caption{ The first few words in the sequence generated by repeatedly applying the symbolic substitution rule \eqref{eq:substitutionRule} to $R$. \label{tb:cF} } \end{table} \begin{theorem} Let $n \ge 0$ and $\xi \in \cR_n$. Then $g^n(\xi) \in \cR_0$ and there exist mutually disjoint sets $S_0,S_1,\ldots,S_{2^n-1} \subset \mathbb{R}^2$ such that $f_\xi(S_i) = S_{(i+1) \,{\rm mod}\, 2^n}$ and \begin{equation} f_\xi^{2^n} \big|_{S_i} ~\text{is affinely conjugate to}~ f_{g^n(\xi)} \big|_{\Lambda(g^n(\xi))} \label{eq:affinelyConjugate} \end{equation} for each $i \in \{ 0,1,\ldots,2^n-1 \}$. Moreover, \begin{equation} \bigcup_{i=0}^{2^n-1} S_i = {\rm cl} \left( W^u \left( \gamma_n \right) \right), \label{eq:Siunion} \end{equation} where $\gamma_n$ is a saddle-type periodic solution of $f_\xi$ with symbolic itinerary $\cF^n(R)$. \label{th:affinelyConjugate} \end{theorem} Numerical explorations suggest that \eqref{eq:Siunion} is the unique attractor of \eqref{eq:f} for any $\xi \in \cR_n$. Theorem \ref{th:affinelyConjugate} tells us it has $2^n$ connected components and is the closure of the unstable manifold of a saddle-type period-$2^n$ solution. Each component $S_i$ is invariant under $2^n$ iterations of $f_\xi$. Equation \eqref{eq:affinelyConjugate} tells us that the dynamics of $f_\xi^{2^n}$ on $S_i$ is equivalent (under an affine coordinate change) to that of $f_{g^n(\xi)}$ on $\Lambda(g^n(\xi))$. Since $g^n(\xi) \in \cR_0$, the properties listed in Theorem \ref{th:R0} apply to $f_\xi^{2^n}$ on $S_i$. Thus \eqref{eq:Siunion} is a chaotic Milnor attractor of $f_\xi$. As an example, consider $f_\xi$ with \begin{equation} \xi_{\rm ex} = (1.15,0.01,-1.12,0.01) \in \cR_2 \,. \label{eq:xiExample} \end{equation} Fig.~\ref{fig:igRN_phasePortrait2}-a shows $1000$ points of the forward orbit of the origin after transient behaviour has decayed. As expected these points appear to converge to a chaotic attractor with four connected components. By Theorem \ref{th:affinelyConjugate} each component is affinely conjugate to $\Lambda(g^2(\xi))$ which is approximated in Fig.~\ref{fig:igRN_phasePortrait2}-b by again iterating the origin. The set $\Lambda(g^2(\xi))$ has a complicated branched structure but this is not visible in Fig.~\ref{fig:igRN_phasePortrait2}-b because the determinants are extremely small. \begin{figure}[b!] \begin{center} \setlength{\unitlength}{1cm} \begin{picture}(16.7,8.5) \put(.2,0){\includegraphics[height=8cm]{igRN_phasePortrait2}} \put(9.1,0){\includegraphics[height=8cm]{igRN_phasePortrait2alt}} \put(3.6,8.2){\small {\bf a)}~~$\xi = \xi_{\rm ex}$} \put(12.5,8.2){\small {\bf b)}~~$\xi = g^2(\xi_{\rm ex})$} \end{picture} \caption{ Numerically computed attractors of $f_\xi$ with $\xi = \xi_{\rm ex}$, \eqref{eq:xiExample}, in panel (a), and $\xi = g^2(\xi_{\rm ex})$ in panel (b). In panel (a) the four small triangles are the points of a periodic solution with symbolic itinerary $\cF^2(R) = RRLR$. \label{fig:igRN_phasePortrait2} } \end{center} \end{figure} \section{The stable and unstable manifolds of the fixed points} \label{sec:XY} \setcounter{equation}{0} In this section we discuss the stable and unstable manifolds of the saddle fixed points $X$ and $Y$. Here and throughout the paper \begin{equation} 0 < \lambda_L^s < 1 < \lambda_L^u \label{eq:eigsAL} \end{equation} denote the eigenvalues of $A_L$, and \begin{equation} \lambda_R^u < -1 < \lambda_R^s < 0 \label{eq:eigsAR} \end{equation} denote the eigenvalues of $A_R$. These are functions of $\xi$ and assume $\xi \in \Phi$. \subsection{Stable and unstable manifolds of piecewise-linear maps} \label{sub:P} Let $P$ be one of the saddle fixed points $X$ or $Y$. The stable manifold of $P$ is defined as \begin{equation} W^s(P) = \left\{ z \in \mathbb{R}^2 \setminus \{ P \} \,\big|\, f_\xi^n(z) \to P ~\text{as}~ n \to \infty \right\}. \label{eq:WsDefn} \end{equation} For all $\xi \in \Phi$ the map $f_\xi$ is invertible so the unstable manifold of $P$ is defined analogously as \begin{equation} W^u(P) = \left\{ z \in \mathbb{R}^2 \setminus \{ P \} \,\big|\, f_\xi^{-n}(z) \to P ~\text{as}~ n \to \infty \right\}. \label{eq:WuDefn} \end{equation} Since $P$ is a saddle, $W^s(P)$ and $W^u(P)$ are one-dimensional. As with smooth maps, from $P$ they emanate tangent to the stable and unstable subspaces $E^s(P)$ and $E^u(P)$. These subspaces are the lines through $P$ with directions given by the eigenvectors of $\rD f_\xi (P)$. But since $f_\xi$ is piecewise-linear, $W^s(P)$ and $W^u(P)$ in fact {\em coincide} with $E^s(P)$ and $E^u(P)$ in a neighbourhood of $P$. Globally they have a piecewise-linear structure: $W^s(P)$ has kinks on the switching line $x=0$ and on the backward orbits of these points; $W^u(P)$ has kinks on the image of switching line, $y=0$, and on the forward orbits of these points. In the remainder of this section we reproduce the geometric constructions of \cite{GlSi21} that will be needed below. \subsection{The stable and unstable manifolds of $Y$} \label{sub:Y} \begin{figure}[b!] \begin{center} \includegraphics[height=8cm]{igRN_Y} \caption{ A sketch of the phase space of $f_\xi$ with $\xi \in \Phi_{\rm BYG}$. The triangle $\Omega(\xi)$ is shaded. \label{fig:igRN_Y} } \end{center} \end{figure} Since the eigenvalues of $A_L$ are positive, $W^s(Y)$ and $W^u(Y)$ each have two dynamically independent branches. Let $D$ denote the first kink of the right branch of $W^u(Y)$ as we follow it outwards from $Y$, see Fig.~\ref{fig:igRN_Y}. Notice $D$ is the intersection of $E^u(Y)$ with $y=0$. Now let $B$ denote the intersection of $E^u(Y)$ with the line through $f_\xi(D)$ and parallel to $E^s(Y)$. Then let $\Omega(\xi)$ be the closed compact triangle with vertices $D$, $f_\xi(D)$, and $B$. The following result says $\Omega(\xi)$ is forward invariant under $f_\xi$. This was proved in \cite{GlSi21} by direct calculations. The key observation is that $f_\xi(D)$ lies to the right of $E^s(Y)$ because $\phi(\xi) > 0$. \begin{proposition} For any $\xi \in \Phi_{\rm BYG}$, $f_\xi \left( \Omega(\xi) \right) \subset \Omega(\xi)$. \label{pr:Omega} \end{proposition} The next result tells us that the attractor of Theorem \ref{th:R0} is contained in $\Omega(\xi)$. \begin{lemma} For any $\xi \in \Phi_{\rm BYG}$, $\Lambda(\xi) \subset \Omega(\xi)$. \label{le:LambdaInOmega} \end{lemma} \begin{proof} Since $\Omega(\xi)$ is forward invariant we only need to show $X \in \Omega(\xi)$. By direct calculations we find that the line through $D$ and $f_\xi(D)$ is $y = \ell(x)$ where \begin{equation} \ell(x) = \frac{\delta_R}{\lambda_L^s - \tau_R} \left( x - \frac{1}{1 - \lambda_L^s} \right). \nonumber \end{equation} From \eqref{eq:X} we obtain, after much simplification, \begin{equation} X_2 - \ell(X_1) = \frac{\delta_R \left( \lambda_L^{s^2} - \tau_R \lambda_L^s + \delta_R \right)} {(\delta_R + 1 - \tau_R) \left( \lambda_L^s - \tau_R \right) \left( 1 - \lambda_L^s \right)}. \nonumber \end{equation} In view of \eqref{eq:saddleSaddleRegion} and \eqref{eq:eigsAL}, each factor in this expression is positive, thus $X$ lies above the line through $D$ and $f_\xi(D)$. Also $X_1 > 0$ and $X_2 < 0$, thus $X \in \Omega(\xi)$ as required. \end{proof} \subsection{The stable and unstable manifolds of $X$} \label{sub:X} \begin{figure}[b!] \begin{center} \setlength{\unitlength}{1cm} \begin{picture}(16.5,8.6) \put(0,0){\includegraphics[height=8cm]{igRN_X_a}} \put(8.5,0){\includegraphics[height=8cm]{igRN_X_b}} \put(3.4,8.3){\small {\bf a)}~~$\xi \in \cR_0$} \put(11.5,8.3){\small {\bf b)}~~$\xi \in \cR_n \,, n \ge 1$} \end{picture} \caption{ Sketches of phase space with $\xi \in \cR_0$ in panel (a) and $\xi \in \cR_n$ with $n \ge 1$ in panel (b). The set $\Delta_0$ in panel (a) is introduced in \S\ref{sub:R0Proof}. The set $\Omega'$ in panel (b) is introduced in \S\ref{sub:OmegaPrime}. \label{fig:igRN_X} } \end{center} \end{figure} Since the eigenvalues of $A_R$ are negative, $W^s(X)$ and $W^u(X)$ each have one dynamically independent branch. Let $T$ denote the intersection of $E^u(X)$ with $y=0$ and let $V$ denote the intersection of $E^s(X)$ with $x=0$, see Fig.~\ref{fig:igRN_X}. It is easily shown that \begin{equation} T = \left( \frac{1}{1 - \lambda_R^s}, 0 \right). \label{eq:T} \end{equation} If $f_\xi^2(T)$ lies to the left of $E^s(X)$, as in Fig.~\ref{fig:igRN_X}-a, then $W^s(X)$ and $W^u(X)$ intersect transversely. If $f_\xi^2(T)$ lies to the right of $E^s(X)$, as in Fig.~\ref{fig:igRN_X}-b, then $W^s(X)$ and $W^u(X)$ have no intersection. The following result was obtained in \cite{Gl17} by calculating $f_\xi^2(T)$ explicitly. \begin{proposition} For any $\xi \in \Phi$, $f_\xi^2(T)$ lies to the left of $E^s(X)$ if and only if $\psi(\xi) > 0$, where \begin{align} \psi(\xi) = (\tau_L \tau_R - \delta_R) \lambda_R^u + \left( \frac{\delta_L}{\delta_R} + \delta_L - 1 \right) \lambda_R^s - \tau_L (1 + \delta_R) + \tau_R (1 - \delta_L). \label{eq:psi} \end{align} \label{pr:psi} \end{proposition} As a bifurcation, $\psi(\xi) = 0$ is a homoclinic corner for the fixed point $X$. This is analogous to the surface $\phi(\xi) = 0$ for the fixed point $Y$ as discussed in \S\ref{sub:phiBYG}. \section{The second iterate of $f_\xi$} \label{sec:f2} \setcounter{equation}{0} As discussed in \S\ref{sub:renormOp}, on $\Pi_\xi$ the second iterate of $f_\xi$ is a continuous, piecewise-linear map with two pieces, \eqref{eq:f2}. Next in \S\ref{sub:conjugacy} we provide the affine transformation that converts \eqref{eq:f2} to the normal form \eqref{eq:f}. Then in \S\ref{sub:psiAgain} we show that the bifurcation surface $\psi(\xi) = 0$ of the previous section is in fact identical to $\zeta_1(\xi) = \phi(g(\xi)) = 0$. \subsection{A transformation to the normal form} \label{sub:conjugacy} Any continuous, two-piece, piecewise-linear map on $\mathbb{R}^2$ for which the image of the switching line intersects the switching line at a unique point that is not a fixed point can be transformed to \eqref{eq:f} under an affine coordinate transformation. The required transformation is described in the original work \cite{NuYo92}. For the generalisation to $n$ dimensions refer to \cite{Si16}. The switching line of \eqref{eq:f2} satisfies this condition for any $\xi \in \Phi$. As clarified by Proposition \ref{pr:conjugacy}, the required coordinate transformation is \begin{equation} h_\xi(x,y) = \frac{1}{\tau_R + \delta_R + 1} \begin{bmatrix} x \\ \delta_R x + \tau_R y - \delta_R \end{bmatrix}. \label{eq:h} \end{equation} \begin{proposition} For any $\xi \in \Phi$, \begin{equation} f_\xi^2 = h_\xi^{-1} \circ f_{g(\xi)} \circ h_\xi \,, \label{eq:conjugacy} \end{equation} on $\Pi_\xi$. \label{pr:conjugacy} \end{proposition} \begin{proof} By directly composing \eqref{eq:fLfR} and \eqref{eq:h} we obtain \begin{equation} h_\xi \circ f_\xi^2 = \begin{cases} \dfrac{1}{\tau_R + \delta_R + 1} \begin{bmatrix} \left( \tau_R^2 - \delta_R \right) x + \tau_R y + \tau_R + 1 \\ -\delta_R^2 x \end{bmatrix}, & x \le 0, \\ \dfrac{1}{\tau_R + \delta_R + 1} \begin{bmatrix} \left( \tau_L \tau_R - \delta_L \right) x + \tau_R y + \tau_R + 1 \\ -\delta_L \delta_R x \end{bmatrix}, & x \ge 0, \end{cases} \nonumber \end{equation} and it is readily seen that $f_{g(\xi)} \circ h_\xi$ produces the same expression. \end{proof} Write $(\tilde{x},\tilde{y}) = h_\xi(x,y)$. Notice that $x$ and $\tilde{x}$ have opposite signs, i.e. \begin{equation} {\rm sgn}(x) = -{\rm sgn}(\tilde{x}). \label{eq:oppositeSigns} \end{equation} This is because $\tau_R + \delta_R + 1 < 0$ by \eqref{eq:saddleSaddleRegion}. Thus the left piece of $f_{g(\xi)}$ corresponds to the right piece of $f_\xi^2$ in \eqref{eq:f2}, and this is consistent with how $g$ was introduced in \S\ref{sub:renormOp}. \subsection{A reinterpretation of $\psi$} \label{sub:psiAgain} In \S\ref{sub:X} we saw that the fixed point $X$ of $f_\xi$ has a homoclinic corner when $\psi(\xi) = 0$. The same is true for $f_\xi^2$: its fixed point $X$ has a homoclinic corner when $\psi(\xi) = 0$. Notice $X$ is a fixed point of $f_{R,\xi}^2$, which is transformed under \eqref{eq:conjugacy} to $f_{L,g(\xi)}$, which has the fixed point $Y$. Thus, while the stable and unstable manifolds of $X$ lie in $\Pi_\xi$, they transform to the stable and unstable manifolds of $Y$ for $f_{g(\xi)}$. The latter manifolds have a homoclinic corner when $\phi(g(\xi)) = 0$, which suggests that $\psi(\xi) = 0$ and $\phi(g(\xi)) = 0$ are the same surface. The following result tells us that this is indeed the case. \begin{lemma} For any $\xi \in \Phi$, \begin{equation} \phi(g(\xi)) = \tau_R \lambda_R^{u^2} \psi(\xi). \label{eq:psi2} \end{equation} \label{le:psizeta1Relationship} \end{lemma} \begin{proof} Equation \eqref{eq:phi} can be written as \begin{equation} \phi(\xi) = (1+\tau_R) \lambda_L^{u^2} - (\tau_R + \delta_L + \delta_R) \lambda_L^u + \delta_R \,. \label{eq:phi2} \end{equation} To evaluate $\phi(g(\xi))$, in \eqref{eq:phi2} we replace $\delta_L$ with $\delta_R^2$, $\delta_R$ with $\delta_L \delta_R$, and $\tau_R$ with $\tau_L \tau_R - \delta_L - \delta_R$, see \eqref{eq:g}. Also we replace $\lambda_L^u$ with $\lambda_R^{u^2}$ because $\lambda_R^{u^2}$ is the unstable eigenvalue of $A_R^2$ (which has trace and determinant given by the first two components of \eqref{eq:g}). It is a simple (though tedious) exercise to show that upon performing these substitutions and simplifying we obtain $\tau_R \lambda_R^{u^2} \psi(\xi)$. \end{proof} \section{The geometry of the boundary of $\cR_0$} \label{sec:phiPsi} \setcounter{equation}{0} The region $\cR_0 \subset \mathbb{R}^4$ is bounded by $\zeta_0(\xi) = \phi(\xi) = 0$, $\zeta_1(\xi) = \phi(g(\xi)) = 0$, and the hyperplanes specified in \eqref{eq:saddleSaddleRegion}. Since parameter space is four-dimensional these are difficult to visualise. We can benefit from the fact that the $\delta_L$ and $\delta_R$ components of $g$ are decoupled from $\tau_L$ and $\tau_R$. Thus two-dimensional slices \begin{equation} \Phi_{\rm slice}(\delta_L,\delta_R) = \left\{ (\tau_L,\tau_R) \,\middle|\, \tau_L > \delta_L + 1, \tau_R < -\delta_R-1 \right\}, \label{eq:Phislice} \end{equation} defined by fixing the values of $\delta_L$ and $\delta_R$, map to one another under $g$. In any such slice $\zeta_0(\xi) = 0$ and $\zeta_1(\xi) = 0$ are curves. In this section we show that for any values $0 < \delta_L < 1$ and $0 < \delta_R < 1$, these curves have the geometry shown in Fig.~\ref{fig:igRN_phipsi}. \begin{figure}[b!] \begin{center} \includegraphics[height=10cm]{igRN_phipsi} \caption{ A sketch of $\zeta_0(\xi) = 0$ and $\zeta_1(\xi) = 0$ (equivalently $\phi(\xi) = 0$ and $\hat{\psi}(\xi) = 0$) in $\Phi_{\rm slice}(\delta_L,\delta_R)$ with $0 < \delta_L < 1$ and $0 < \delta_R < 1$. The curve $\tau_R = -\frac{1}{\tau_L} - \delta_R - 1$ is shown dashed. \label{fig:igRN_phipsi} } \end{center} \end{figure} Observe $\zeta_0(\xi) = 0$ is the same as $\phi(\xi) = 0$, while, by Lemma \ref{le:psizeta1Relationship}, $\zeta_1(\xi) = 0$ is the same as $\psi(\xi) = 0$. However, we find the function \begin{equation} \hat{\psi}(\xi) = \lambda_R^u \psi(\xi), \label{eq:psiHatDefn} \end{equation} easier to work with $\psi(\xi)$. By \eqref{eq:psi2} the sign of $\hat{\psi}(\xi)$ is the same as that of $\zeta_1(\xi)$. From \eqref{eq:psi} we obtain \begin{equation} \hat{\psi}(\xi) = -\delta_L \left( \lambda_R^{u^2} - 1 \right) + \lambda_R^u \left( \lambda_R^{u^2} - 1 \right) \tau_L + (1 - \delta_R) \lambda_R^{u^2} \,. \label{eq:psiHat} \end{equation} The remainder of this section is organised as follows. First in \S\ref{sub:phi} we study the curve $\phi(\xi) = 0$. We then derive analogous properties for $\hat{\psi}(\xi) = 0$ and obtain some additional bounds, \S\ref{sub:psi}. Lastly we show these curves intersect at a unique point in $\Phi_{\rm slice}$, \S\ref{sub:phiandpsi}. \subsection{The curve $\phi(\xi) = 0$} \label{sub:phi} We first show the curve $\phi(\xi) = 0$ does not exist in $\Phi_{\rm slice}(\delta_L,\delta_R)$ if $\delta_L \ge 1$. \begin{lemma} Let $\xi \in \Phi$. If $\delta_L \ge 1$ then $\phi(\xi) < 0$. \label{le:deltaLge1} \end{lemma} \begin{proof} We can rearrange \eqref{eq:phi2} as \begin{equation} \phi(\xi) = (\tau_R + \delta_R + 1) \lambda_L^u \left( \lambda_L^u - 1 \right) - \delta_R \left( \lambda_L^{u^2} - 1 \right) + (1 - \delta_L) \lambda_L^u \,. \label{eq:phi3} \end{equation} By inspection the first two terms in \eqref{eq:phi3} are negative and if $\delta_L \ge 1$ then the last term is less than or equal to zero. \end{proof} The next result shows that $\phi(\xi) = 0$ appears roughly as in Fig.~\ref{fig:igRN_phipsi}. \begin{proposition} Let $0 < \delta_L < 1$ and $\delta_R > 0$. There exists a unique $C^\infty$ function $G : (-\infty,-\delta_R-1] \to (\delta_L+1,\infty)$ such that \begin{equation} \phi \big( G(\tau_R), \delta_L, \tau_R, \delta_R \big) = 0, \label{eq:phiZeroCurve} \end{equation} for all $\tau_R \in (-\infty,-\delta_R-1]$. Moreover, $G$ is strictly increasing, $G(\tau_R) \to \delta_L+1$ as $\tau_R \to -\infty$, and $G(-\delta_R-1) = \alpha + \frac{\delta_L}{\alpha}$ where $\alpha \in \mathbb{R}$ is the largest solution to \begin{equation} -\delta_R \alpha^2 + (1-\delta_L) \alpha + \delta_R = 0\,. \label{eq:phiTopIntersection} \end{equation} \label{pr:phiZeroCurve} \end{proposition} \begin{proof} First fix $\tau_R \le -\delta_R-1$. With $\tau_L = \delta_L + 1$ we have $\lambda_L^u = 1$ and so \eqref{eq:phi2} simplifies to $\phi(\xi) = 1 - \delta_L > 0$. As $\tau_L \to \infty$ we have $\lambda_L^u \to \infty$ and so $\phi(\xi) \to -\infty$ (because the $\lambda_L^{u^2}$-coefficient in \eqref{eq:phi2} is negative). Thus by the intermediate value theorem there exists $\tau_L = G(\tau_R) > \delta_L + 1$ satisfying \eqref{eq:phiZeroCurve}. To demonstrate the uniqueness of $G$ we differentiate \eqref{eq:phi2} to obtain \begin{equation} \frac{\partial \phi}{\partial \tau_L} = \left( 2 (1 + \tau_R) \lambda_L^u - (\tau_R + \delta_L + \delta_R) \right) \frac{\partial \lambda_L^u}{\partial \tau_L}. \label{eq:phiZeroCurveProof10} \end{equation} It is a simple exercise to show that $\frac{\partial \lambda_L^u}{\partial \tau_L} = \frac{\lambda_L^u}{\lambda_L^u - \lambda_L^s}$. Also if $\phi = 0$ then by \eqref{eq:phi2} we can replace $(\tau_R + \delta_L + \delta_R)$ in \eqref{eq:phiZeroCurveProof10} with $\frac{\delta_R}{\lambda_L^u} + (1+\tau_R) \lambda_L^u$ to obtain \begin{equation} \frac{\partial \phi}{\partial \tau_L} \bigg|_{\phi = 0} = \left( (1 + \tau_R) \lambda_L^u - \frac{\delta_R}{\lambda_L^u} \right) \frac{\lambda_L^u}{\lambda_L^u - \lambda_L^s}. \label{eq:phiZeroCurveProof11} \end{equation} By inspection $\frac{\partial \phi}{\partial \tau_L} \big|_{\phi = 0} < 0$. Thus $G$ is unique (because if $\phi = 0$ for two distinct values of $\tau_L > \delta_L + 1$ then $\frac{\partial \phi}{\partial \tau_L} \ge 0$ at at least one of these values). Since $\phi(\xi)$ is $C^\infty$ the function $G$ is $C^\infty$ by the implicit function theorem. From \eqref{eq:phi2} we obtain \begin{equation} \frac{\partial \phi}{\partial \tau_R} = \lambda_L^u \left( \lambda_L^u - 1 \right), \label{eq:phiZeroCurveProof20} \end{equation} which is evidently positive. Thus $\frac{d G}{d \tau_R} = -\frac{\frac{\partial \phi}{\partial \tau_L}}{\frac{\partial \phi}{\partial \tau_R}} \Big|_{\phi = 0} > 0$, so $G$ is strictly increasing. Also $G(\tau_R) \to \delta_L+1$ as $\tau_R \to -\infty$ because if we fix $\tau_L = \delta_L + 1 + \ee$, then $\phi(\xi) \to -\infty$ as $\tau_R \to -\infty$ for any $\ee > 0$. Finally, by substituting $\tau_R = -\delta_R - 1$ into \eqref{eq:phi2} we obtain \begin{equation} \phi(\xi) \big|_{\tau_R = -\delta_R - 1} = -\delta_R \lambda_L^{u^2} + (1-\delta_L) \lambda_L^u + \delta_R \,. \label{eq:phiZeroCurveProof30} \end{equation} Since $\tau_L = \lambda_L^u + \frac{\delta_L}{\lambda_L^u}$ we have $G(-\delta_R-1) = \alpha + \frac{\delta_L}{\alpha}$. \end{proof} \subsection{The curve $\hat{\psi}(\xi) = 0$} \label{sub:psi} The arguments presented here for $\hat{\psi}$ mirror those above for $\phi$. We first show $\hat{\psi}(\xi) = 0$ does not exist in $\Phi_{\rm slice}(\delta_L,\delta_R)$ if $\delta_R \ge 1$. \begin{lemma} Let $\xi \in \Phi$. If $\delta_R \ge 1$ then $\hat{\psi}(\xi) < 0$. \label{le:deltaRge1} \end{lemma} \begin{proof} By inspection the first two terms in \eqref{eq:psiHat} are negative and if $\delta_R \ge 1$ then the last term is less than or equal to zero. \end{proof} We now show $\hat{\psi}(\xi) = 0$ appears roughly as in Fig.~\ref{fig:igRN_phipsi}. \begin{proposition} Let $\delta_L > 0$ and $0 < \delta_R < 1$. There exists a unique $C^\infty$ function $H : [\delta_L+1,\infty) \to (-\infty,-\delta_R-1)$ such that \begin{equation} \hat{\psi} \big( \tau_L, \delta_L, H(\tau_L), \delta_R \big) = 0, \label{eq:psiHatZeroCurve} \end{equation} for all $\tau_L \in [\delta_L+1,\infty)$. Moreover, $H$ is strictly increasing, $H(\tau_L) \to -\delta_R-1$ as $\tau_L \to \infty$, and $H(\delta_L+1) = \beta + \frac{\delta_R}{\beta}$ where $\beta \in \mathbb{R}$ is the smallest (most negative) solution to $p(\beta) = 0$ where \begin{equation} p(\beta) = (1+\delta_L) \beta^3 + (1-\delta_L-\delta_R) \beta^2 - (1+\delta_L) \beta + \delta_L \,. \label{eq:psiHatLeftIntersection} \end{equation} \label{pr:psiHatZeroCurve} \end{proposition} \begin{proof} Fix $\tau_L \ge \delta_L + 1$. With $\tau_R = -\delta_R - 1$ we have $\lambda_R^u = -1$ and so \eqref{eq:psiHat} simplifies to $\hat{\psi}(\xi) = 1 - \delta_R > 0$. Also $\hat{\psi}(\xi) \to -\infty$ as $\tau_R \to -\infty$, thus, by the intermediate value theorem, there exists $\tau_R = H(\tau_L) < -\delta_R-1$ satisfying \eqref{eq:psiHatZeroCurve}. From \eqref{eq:psiHat}, \begin{equation} \frac{\partial \hat{\psi}}{\partial \tau_R} = \left( 3 \tau_L \lambda_R^{u^2} + 2 (1 - \delta_L - \delta_R) \lambda_R^u - \tau_L \right) \frac{\lambda_R^u}{\lambda_R^u - \lambda_R^s}, \nonumber \end{equation} and if $\hat{\psi}(\xi) = 0$ this can be simplified to \begin{equation} \frac{\partial \hat{\psi}}{\partial \tau_R} \bigg|_{\hat{\psi}=0} = \left( \tau_L \left( 1 + \lambda_R^{u^2} \right) - \frac{2 \delta_L}{\lambda_R^u} \right) \frac{\lambda_R^u}{\lambda_R^u - \lambda_R^s}, \label{eq:psiHatZeroCurveProof11} \end{equation} which is positive. Hence $H(\tau_L)$ satisfying \eqref{eq:psiHatZeroCurve} is unique for all $\tau_L \ge \delta_L + 1$. Moreover, $H$ is $C^\infty$ because $\hat{\psi}$ is $C^\infty$. From \eqref{eq:psiHat}, \begin{equation} \frac{\partial \hat{\psi}}{\partial \tau_L} = \lambda_R^u \left( \lambda_R^{u^2} - 1 \right) < 0, \nonumber \end{equation} thus $\frac{d H}{d \tau_L} = -\frac{\frac{\partial \hat{\psi}}{\partial \tau_R}}{\frac{\partial \hat{\psi}}{\partial \tau_L}} \Big|_{\hat{\psi} = 0} > 0$, i.e.~$H$ is strictly increasing. We have $H(\tau_L) \to -\delta_R-1$ as $\tau_L \to \infty$ because if $\tau_R = -\delta_R-1-\ee$ then $\hat{\psi}(\xi) \to -\infty$ as $\tau_L \to \infty$ for any $\ee > 0$. Finally, by substituting $\tau_L = \delta_L+1$ into \eqref{eq:psiHat} we obtain $\hat{\psi}(\xi) \big|_{\tau_L = \delta_L + 1} = p \left( \lambda_R^u \right)$ and so $H(\delta_L+1) = \beta + \frac{\delta_R}{\beta}$ as required. \end{proof} Next we obtain upper bounds on the values of $\beta$ and $\beta + \frac{\delta_R}{\beta}$. These are the values of $\lambda_R^u$ and $\tau_R$ for the point at which the curve $\hat{\psi}(\xi) = 0$ meets the boundary $\tau_L = \delta_L + 1$, see Fig.~\ref{fig:igRN_phipsi}. \begin{lemma} Let $\delta_L > 0$ and $0 < \delta_R < 1$. The value of $\beta$ in Proposition \ref{pr:psiHatZeroCurve} satisfies $\beta > -\frac{1 + \sqrt{5}}{2}$ and $\beta + \frac{\delta_R}{\beta} > -2$. \label{le:betaBounds} \end{lemma} \begin{proof} The function $p$ can be rewritten as \begin{equation} p(\beta) = \delta_L \left( \beta - 1 \right)^2 \left( \beta + 1 \right) - \delta_R \beta^2 + \beta \left( \beta^2 + \beta - 1 \right). \label{eq:betaBoundsProof10} \end{equation} The first two terms of \eqref{eq:betaBoundsProof10} are negative, so since $p(\beta) = 0$ the last term of \eqref{eq:betaBoundsProof10} must be positive. This requires $\beta > -\frac{1 + \sqrt{5}}{2}$. Also $p$ can be rewritten as \begin{equation} p(\beta) = \left[ (\beta+1) \left( 1 - \frac{1}{\beta} \right) \left( 1 + \delta_L - \frac{\delta_L}{\beta} \right) + (1-\delta_R) \right] \beta^2. \nonumber \end{equation} Thus $p(\beta) = 0$ implies \begin{equation} -(\beta + 1) = \frac{1-\delta_R}{\left( 1 - \frac{1}{\beta} \right) \left( 1 + \delta_L - \frac{\delta_L}{\beta} \right)}. \label{eq:betaBoundsProof30} \end{equation} Since $\beta < 0$ the denominator of \eqref{eq:betaBoundsProof30} is greater than $1$ and so $-(\beta + 1) < 1-\delta_R$. Thus $(\beta+1)^2 < (1-\delta_R)^2$ which can be rearranged as $\beta^2 + \delta_R < -2 \beta - \delta_R (1 - \delta_R)$. Since $0 < \delta_R < 1$ this can be reduced to $\beta + \frac{\delta_R}{\beta} > -2$. \end{proof} Lastly we show that the curve $\tau_R = -\frac{1}{\tau_L} - \delta_R - 1$ lies below $\hat{\psi}(\xi) = 0$, as in Fig.~\ref{fig:igRN_phipsi}. This result is used later in the proof of Proposition \ref{pr:psiHat}. \begin{lemma} Let $\delta_L > 0$, $0 < \delta_R < 1$, and $\tau_L \ge \delta_L + 1$. Then \begin{equation} H(\tau_L) > -\frac{1}{\tau_L} - \delta_R - 1. \label{eq:HBound} \end{equation} \label{le:HBound} \end{lemma} \begin{proof} By iterating \eqref{eq:T} under $f_{R,\xi}$ and $f_{L,\xi}$ we obtain \begin{equation} f_\xi^2(T) = \left( \tau_L \left( \frac{\tau_R}{1 - \lambda_R^s} + 1 \right) - \frac{\delta_R}{1 - \lambda_R^s} + 1, -\delta_L \left( \frac{\tau_R}{1 - \lambda_R^s} + 1 \right) \right). \label{eq:f2T} \end{equation} The second component of \eqref{eq:f2T} is clearly positive with any $\tau_R < -\delta_R - 1$. The first component of \eqref{eq:f2T} can be rearranged as \begin{equation} f_\xi^2(T)_1 = \left( \tau_L - \frac{(\tau_R + \delta_R) \lambda_R^s - 1}{\tau_R + \delta_R + 1} \right) \left( \frac{\tau_R}{1 - \lambda_R^s} + 1 \right). \label{eq:f2T1} \end{equation} If $\tau_L = \frac{-1}{\tau_R + \delta_R + 1}$ (equivalently $\tau_R = -\frac{1}{\tau_L} - \delta_R - 1$) then \eqref{eq:f2T1} simplifies to a quantity that is clearly negative. In this case $f_\xi^2(T)$ is located in the second quadrant of $\mathbb{R}^2$, so certainly it lies to the left of $E^s(X)$. Thus $\psi(\xi) > 0$ by Proposition \ref{pr:psi}, so $\hat{\psi}(\xi) < 0$. We have shown $\tau_R = -\frac{1}{\tau_L} - \delta_R - 1$ implies $\hat{\psi}(\xi) < 0$. Therefore if $\hat{\psi}(\xi) = 0$ (equivalently $\tau_R = H(\tau_L)$), then $\tau_R > -\frac{1}{\tau_L} - \delta_R - 1$, as required. \end{proof} \subsection{The curves $\phi(\xi) = 0$ and $\hat{\psi}(\xi) = 0$ intersect at a unique point} \label{sub:phiandpsi} \begin{proposition} Fix $0 < \delta_L < 1$ and $0 < \delta_R < 1$. There exist unique $\tau_L > \delta_L + 1$ and $\tau_R < -\delta_R-1$ such that $\phi(\xi) = \hat{\psi}(\xi) = 0$. \label{pr:phipsiIntersection} \end{proposition} \begin{proof} By Propositions \ref{pr:phiZeroCurve} and \ref{pr:psiHatZeroCurve} the curves $\phi(\xi) = 0$ and $\hat{\psi}(\xi) = 0$ must intersect. To show this intersection is unique it suffices to show that at any point of intersection the slope $\frac{d \tau_R}{d \tau_L}$ of $\phi(\xi) = 0$ is greater than that of $\hat{\psi}(\xi) = 0$. From the calculations performed in the proof of Proposition \ref{pr:phiZeroCurve}, the slope of $\phi(\xi) = 0$ is \begin{equation} \left( \frac{d G}{d \tau_R} \right)^{-1} = \frac{-(1 + \tau_R) \lambda_L^u + \frac{\delta_R}{\lambda_L^u}} {\left( \lambda_L^u - 1 \right) \left( \lambda_L^u - \lambda_L^s \right)}. \nonumber \end{equation} Consequently \begin{equation} \left( \frac{d G}{d \tau_R} \right)^{-1} > -\frac{\lambda_R^u + 1}{\lambda_L^u - 1}, \label{eq:phiZeroSlopeApprox} \end{equation} because $\tau_R < \lambda_R^u$, $\delta_R > 0$, and $\lambda_L^s > 0$. From the calculations performed in the proof of Proposition \ref{pr:psiHatZeroCurve}, the slope of $\hat{\psi}(\xi) = 0$ is \begin{equation} \frac{d H}{d \tau_L} = \frac{\left( \lambda_R^{u^2} - 1 \right) \left( \lambda_R^u - \lambda_R^s \right)} {\tau_L \left( 1 + \lambda_R^{u^2} \right) - \frac{2 \delta_L}{\lambda_R^u}}. \nonumber \end{equation} Consequently \begin{equation} \frac{d H}{d \tau_L} < -\frac{\lambda_R^u \left( \lambda_R^{u^2} - 1 \right)}{\lambda_L^u \left( \lambda_R^{u^2} + 1 \right)}, \label{eq:psiHatZeroSlopeApprox} \end{equation} because $\tau_L > \lambda_L^u$, $\delta_L > 0$, and $\lambda_R^s < 0$. Now suppose for a contradiction that $\left( \frac{d G}{d \tau_R} \right)^{-1} \le \frac{d H}{d \tau_L}$ at a point where both $\phi(\xi) = 0$ and $\hat{\psi}(\xi) = 0$. By \eqref{eq:phiZeroSlopeApprox} and \eqref{eq:psiHatZeroSlopeApprox} this implies \begin{equation} -\frac{\lambda_R^u + 1}{\lambda_L^u - 1} < -\frac{\lambda_R^u \left( \lambda_R^{u^2} - 1 \right)}{\lambda_L^u \left( \lambda_R^{u^2} + 1 \right)}, \nonumber \end{equation} which can be rearranged as \begin{equation} -\frac{\left( \lambda_R^u + 1 \right) \left[ \lambda_L^u \left( \lambda_R^u + 1 \right) + \lambda_R^u \left( \lambda_R^u - 1 \right) \right]} {\lambda_L^u \left( \lambda_L^u - 1 \right) \left( \lambda_R^{u^2} + 1 \right)} < 0. \nonumber \end{equation} For this to be true the term in square brackets must be negative, and this implies \begin{equation} \lambda_L^u (\tau_R + 1) < -2, \label{eq:phipsiIntersectionProof50} \end{equation} because $\tau_R < \lambda_R^u$ and $\lambda_R^u \left( \lambda_R^u - 1 \right) > 2$. However, $\phi(\xi) = 0$, so by applying the quadratic formula to \eqref{eq:phi2} we obtain \begin{equation} \tau_R + \delta_L + \delta_R - \sqrt{(\tau_R + \delta_L + \delta_R)^2 - 4 (1 + \tau_R) \delta_R} = 2 \lambda_L^u (\tau_R + 1). \nonumber \end{equation} Thus \eqref{eq:phipsiIntersectionProof50} implies \begin{equation} \tau_R + \delta_L + \delta_R - \sqrt{(\tau_R + \delta_L + \delta_R)^2 - 4 (1 + \tau_R) \delta_R} < -4, \nonumber \end{equation} which can be rearranged as \begin{equation} \tau_R < \frac{-2 \delta_L - 3 \delta_R - 4}{2 + \delta_R}. \nonumber \end{equation} Since $\delta_L, \delta_R > 0$ this implies $\tau_R < -2$. But the curve $\hat{\psi}(\xi) = 0$ increases with $\tau_L$, thus on $\hat{\psi}(\xi) = 0$ the value of $\tau_R$ is greater than its value at the boundary $\tau_L = \delta_L + 1$ where it equals $\beta + \frac{\delta_R}{\beta}$. So the bound $\beta + \frac{\delta_R}{\beta} > -2$ of Lemma \ref{le:betaBounds} provides a contradiction. Therefore $\left( \frac{d G}{d \tau_R} \right)^{-1} > \frac{d H}{d \tau_L}$ at any point where $\phi(\xi) = 0$ and $\hat{\psi}(\xi) = 0$ intersect, hence the intersection point is unique. \end{proof} \section{Dynamics of the renormalisation operator} \label{sec:renormalisation} \setcounter{equation}{0} In this section we study the dynamics of $g$ on $\Phi$. We first show that any $\xi \in \Phi$ maps under $g$ to another point in $\Phi$. \begin{proposition} If $\xi \in \Phi$ then $g(\xi) \in \Phi$. \label{pr:PhiForwardInvariant} \end{proposition} \begin{proof} Write $g(\xi) = \left( \tilde{\tau}_L, \tilde{\delta}_L, \tilde{\tau}_R, \tilde{\delta}_R \right)$. By \eqref{eq:g} and the assumption $\xi \in \Phi$ we obtain \begin{align*} \tilde{\tau}_L - \left( \tilde{\delta}_L + 1 \right) &= \tau_R^2 - 2 \delta_R - \left( \delta_R^2 + 1 \right) = \tau_R^2 - \left( \delta_R + 1 \right)^2 > 0, \\ \tilde{\delta}_L &= \delta_R^2 > 0, \\ \tilde{\tau}_R + \tilde{\delta}_R + 1 &= \tau_L \tau_R - \delta_L - \delta_R + \delta_L \delta_R + 1 \\ &< -(\delta_L + 1)(\delta_R + 1) - \delta_L - \delta_R + \delta_L \delta_R + 1 \\ &= -2 (\delta_L + \delta_R) < 0, \\ \tilde{\delta}_R &= \delta_L \delta_R > 0, \end{align*} which implies $g(\xi) \in \Phi$. \end{proof} Next in \S\ref{sub:renormalisation} we consider the subset of $\Phi$ for which $\hat{\psi}(\xi) < 0$. We show that any point in this subset maps under $g$ to another point in this subset. This result is central to showing that the regions $\cR_n$ are mutually disjoint and proving Theorem \ref{th:Rn} in \S\ref{sub:RnProof}. Recall, the sign of $\hat{\psi}(\xi)$ is the same as that of $\zeta_1(\xi)$ by \eqref{eq:psiHatDefn}. \subsection{The subset of $\Phi$ for which $\hat{\psi}(\xi) < 0$} \label{sub:renormalisation} We first show that the point at which the curve $\hat{\psi}(\xi) = 0$ meets $\tau_L = \delta_L + 1$ maps under $g$ to a point below the dashed curve of Fig.~\ref{fig:igRN_phipsi} in the corresponding slice $\Phi_{\rm slice}(\tilde{\delta}_L,\tilde{\delta}_R)$. \begin{lemma} Let $\delta_L > 0$ and $0 < \delta_R < 1$. Let $\xi_0 = (\delta_L+1,\delta_L,\beta + \frac{\delta_R}{\beta},\delta_R)$ where $\beta$ is as given in Proposition \ref{pr:psiHatZeroCurve}. Write $g(\xi_0) = \left( \tilde{\tau}_L, \tilde{\delta}_L, \tilde{\tau}_R, \tilde{\delta}_R \right)$. Then \begin{equation} \tilde{\tau}_R < -\frac{1}{\tilde{\tau}_L} - \tilde{\delta}_R - 1. \label{eq:tildeTauRBound} \end{equation} \label{le:tildeTauRBound} \end{lemma} \begin{proof} The inequality \eqref{eq:tildeTauRBound} is equivalent to \begin{equation} \tilde{\tau_L} \left( \tilde{\tau}_R + \tilde{\delta}_R + 1 \right) + 1 < 0. \label{eq:tildeTauRBoundProof1} \end{equation} By \eqref{eq:g} we have $\tilde{\tau}_L = \tau_R^2 - 2 \delta_R$, $\tilde{\tau}_R = \tau_L \tau_R - \delta_L - \delta_R$, and $\tilde{\delta}_R = \delta_L \delta_R$; also $\tau_L = \delta_L + 1$. Upon substituting these into \eqref{eq:tildeTauRBoundProof1}, after simplification the left-hand side of \eqref{eq:tildeTauRBoundProof1} becomes \begin{equation} \omega = (1+\delta_L) \tau_R^3 + (1-\delta_L)(1-\delta_R) \tau_R^2 - 2 \delta_R (1+\delta_L) \tau_R - 2 \delta_R (1-\delta_L)(1-\delta_R) + 1. \label{eq:omega} \end{equation} Thus it remains for us to show that $\omega < 0$. Into \eqref{eq:omega} we substitute $\tau_R = \beta + \frac{\delta_R}{\beta}$ to obtain, after much rearranging, \begin{equation} \omega = p(\beta) + q(\beta) + \delta_L \delta_R \beta (\beta + 2) + (1-\delta_L) (\beta+1) + \delta_R^2 (1+\delta_L) \left( \beta + \frac{\delta_R}{\beta} \right) \frac{1}{\beta^2}, \label{eq:tildeTauRBoundProof10} \end{equation} where $p$ is given by \eqref{eq:psiHatLeftIntersection} and \begin{equation} q(\beta) = \big( \delta_L (2-\delta_R) + \delta_R \big) \beta + \delta_R^2 (1-\delta_L)(1-\delta_R) \frac{1}{\beta^2}. \label{eq:tildeTauRBoundProof11} \end{equation} Since $\beta < -1$ we have \begin{align} q(\beta) &< -\big( \delta_L (2-\delta_R) + \delta_R \big) + \delta_R^2 (1-\delta_L)(1-\delta_R) \nonumber \\ &< -\big( \delta_L (2-\delta_R) + \delta_R \big) + \delta_R^2 (1-\delta_R) \nonumber \\ &= -\delta_L (2 - \delta_R) - \delta_R \left( \delta_R^2 - \delta_R + 1 \right) \nonumber \\ &< 0. \nonumber \end{align} Also $p(\beta) = 0$ and by inspection the last three terms of \eqref{eq:tildeTauRBoundProof10} are negative (because $\beta+1 < 0$ and $\beta + 2 > 0$ by Lemma \ref{le:betaBounds}). Therefore $\omega < 0$. \end{proof} We now use Lemma \ref{le:tildeTauRBound} to show that the subset of $\Phi$ for which $\hat{\psi}(\xi) < 0$ is forward invariant under $g$. \begin{proposition} Let $\xi \in \Phi$. If $\hat{\psi}(\xi) \le 0$ then $\hat{\psi}(g(\xi)) < 0$. \label{pr:psiHat} \end{proposition} \begin{proof}[Proof of Proposition \ref{pr:psiHat}] Write $g(\xi) = \left( \tilde{\tau}_L, \tilde{\delta}_L, \tilde{\tau}_R, \tilde{\delta}_R \right)$. Since $\xi \in \Phi$ we have $\delta_L, \delta_R > 0$. First suppose $0 < \delta_R < 1$. If $\tilde{\delta}_R \ge 1$ then certainly $\hat{\psi}(g(\xi)) < 0$ by Lemma \ref{le:deltaRge1}, so let us suppose $\tilde{\delta}_R < 1$. Since $\tilde{\delta}_L = \delta_R^2 < 1$, by Proposition \ref{pr:phipsiIntersection} the curves $\phi = 0$ and $\hat{\psi} = 0$ intersect at a unique point in $\Phi_{\rm slice}(\tilde{\delta}_L,\tilde{\delta}_R)$, call it $\tilde{\xi}_{\rm int}$, see Fig.~\ref{fig:igRN_phipsiImage}. With $\xi = \xi_0$ as in Lemma \ref{le:tildeTauRBound}, the inequality \eqref{eq:tildeTauRBound} implies $\hat{\psi}(g(\xi_0)) < 0$ by Lemma \ref{le:HBound}. Also $\phi(g(\xi_0)) = 0$, because $\hat{\psi}(\xi_0) = 0$, thus $g(\xi_0)$ lies on $\phi = 0$ and below $\tilde{\xi}_{\rm int}$, as in Fig.~\ref{fig:igRN_phipsiImage}. Now if $\hat{\psi}(\xi) \le 0$ and $\xi \ne \xi_0$, then $g(\xi)$ lies in the shaded region of Fig.~\ref{fig:igRN_phipsiImage}. The curve $\hat{\psi} = 0$ does not enter this region because the intersection point $\tilde{\xi}_{\rm int}$ is unique. Thus $g(\xi)$ lies below the curve $\hat{\psi} = 0$, that is $\hat{\psi}(g(\xi)) < 0$. Second suppose $\delta_R \ge 1$. Then \begin{equation} \tilde{\tau}_R = \tau_L \tau_R - \delta_L - \delta_R < -(\delta_L+1)(\delta_R+1) - \delta_L - \delta_R < -3, \nonumber \end{equation} where we have used $\delta_L > 0$ and $\delta_R \ge 1$ to produce the last inequality. Thus $\tilde{\tau}_R < -2$ and so $g(\xi)$ lies below $\hat{\psi} = 0$ by Lemma \ref{le:betaBounds}. That is, $\hat{\psi}(g(\xi)) < 0$. \end{proof} \begin{figure}[t!] \begin{center} \includegraphics[height=10cm]{igRN_phipsiImage} \caption{ A sketch of $\phi(\tilde{\xi}) = 0$ and $\hat{\psi}(\tilde{\xi}) = 0$ where $\tilde{\xi} = g(\xi)$ with $0 < \tilde{\delta}_L < 1$ and $0 < \tilde{\delta}_R < 1$. The point $\tilde{\xi}_{\rm int}$ is the unique intersection of $\phi(\tilde{\xi}) = 0$ and $\hat{\psi}(\tilde{\xi}) = 0$. The point $\xi_0$ is as in Lemma \ref{le:tildeTauRBound}. \label{fig:igRN_phipsiImage} } \end{center} \end{figure} \subsection{Arguments leading to a proof of Theorem \ref{th:Rn}} \label{sub:RnProof} Here we prove Theorem \ref{th:Rn} after a sequence of lemmas. \begin{lemma} Let $\xi \in \cR_n$ for some $n \ge 1$. Then $g^i(\xi) \in \cR_{n-i}$ for all $i = 1,2,\ldots,n$. \label{le:gForwards} \end{lemma} \begin{proof} We have $\zeta_n(\xi) > 0$ and $\zeta_{n+1}(\xi) \le 0$ by \eqref{eq:Rn}. Thus $\zeta_{n-i} \left( g^i(\xi) \right) > 0$ and $\zeta_{n-i+1} \left( g^i(\xi) \right) \le 0$ by \eqref{eq:zetan}. Also $g^i(\xi) \in \Phi$ by Proposition \ref{pr:PhiForwardInvariant}. Thus $g^i(\xi) \in \cR_{n-i}$ by \eqref{eq:Rn}. \end{proof} \begin{lemma} Let $\xi \in \Phi$ with $g(\xi) \in \cR_{n-1}$ for some $n \ge 1$. Then $\xi \in \cR_n$. \label{le:gBackwards} \end{lemma} \begin{proof} We have $\zeta_{n-1}(g(\xi)) > 0$ and $\zeta_n(g(\xi)) \le 0$ by \eqref{eq:Rn}. Thus $\zeta_n(\xi) > 0$ and $\zeta_{n+1}(\xi) \le 0$ by \eqref{eq:zetan}. So $\xi \in \cR_n$ because also $\xi \in \Phi$. \end{proof} \begin{lemma} Let $\xi \in \cR_n$ for some $n \ge 1$. Then $\zeta_0(g(\xi)) > 0$. \label{le:zeta0gxi} \end{lemma} \begin{proof} We have $\zeta_n(\xi) > 0$ by \eqref{eq:Rn}, thus $\zeta_1 \left( g^{n-1}(\xi) \right) > 0$ by \eqref{eq:zetan}. Thus $\zeta_1(\xi) > 0$ by Proposition \ref{pr:psiHat} (recall the sign of $\zeta_1$ is the same as that of $\hat{\psi}$). That is, $\zeta_0(g(\xi)) > 0$. \end{proof} \begin{lemma} Let $\xi \in \Phi$ and write $g^i(\xi) = \left( \tau_{L,i}, \delta_{L,i}, \tau_{R,i}, \delta_{R,i} \right)$ for each $i$. Then $\tau_{L,2} > \tau_L^2 \tau_R^2$ and $\tau_{R,2} < \tau_L \tau_R$. \label{eq:g2Bound} \end{lemma} \begin{proof} By \eqref{eq:g}, \begin{equation} \tau_{L,2} = \tau_{R,1}^2 - 2 \delta_{R,1} = \left( \tau_L \tau_R - \delta_L - \delta_R \right)^2 - 2 \delta_L \delta_R \,, \nonumber \end{equation} which can be rearranged as \begin{equation} \tau_{L,2} = \left( \tau_L \tau_R - \delta_L \right)^2 + \left( \tau_L \tau_R - \delta_R \right)^2 - \tau_L^2 \tau_R^2 \,. \nonumber \end{equation} Then from the bounds in \eqref{eq:saddleSaddleRegion} we obtain $\tau_{L,2} > \tau_L^2 \tau_R^2$. Also \begin{equation} \tau_{R,2} = \tau_{L,1} \tau_{R,1} - \delta_{L,1} - \delta_{R,1} < \tau_{L,1} \tau_{R,1} \,. \nonumber \end{equation} By substituting $\tau_{L,1} > 1$ and $\tau_{R,1} > \tau_L \tau_R$ we obtain $\tau_{R,2} < \tau_L \tau_R$. \end{proof} \begin{proof}[Proof of Theorem \ref{th:Rn}] Suppose for a contradiction that the $\cR_n$ are {\em not} mutually disjoint. So there exists $\xi \in \cR_m \cap \cR_n$ for some $0 \le m < n$. This implies $g^{n-1}(\xi) \in \cR_1$ by Lemma \ref{le:gForwards}, and so $\hat{\psi}(g^{n-1}(\xi)) > 0$ (the sign of $\zeta_1$ is the same as that of $\hat{\psi}$). Also $g^m(\xi) \in \cR_0$, so $\hat{\psi}(g^m(\xi)) \le 0$. By Proposition \ref{pr:psiHat}, $\hat{\psi}(g^{m+i}(\xi)) \le 0$ for all $i \ge 0$. In particular $\hat{\psi}(g^{n-1}(\xi)) \le 0$, and this is a contradiction. Therefore the $\cR_n$ are mutually disjoint. Now choose any $\xi \in \Phi_{\rm BYG}$. To verify \eqref{eq:RnUnion} we show there exists $n \ge 0$ such that $\xi \in \cR_n$. Certainly this is true if $\hat{\psi}(\xi) \le 0$, because in this case $\xi \in \cR_0$, so let us assume $\hat{\psi}(\xi) > 0$. In view of Lemma \ref{eq:g2Bound}, we consider the map $\tilde{g} : \mathbb{R}^2 \to \mathbb{R}^2$ defined by \begin{equation} \tilde{g}(\tau_L,\tau_R) = \left( \left( \tau_L \tau_R \right)^2, \tau_L \tau_R \right). \nonumber \end{equation} For any $j \ge 1$ the $j^{\rm th}$-iterate of $\tilde{g}$ is given explicitly by \begin{equation} \tilde{g}^j(\tau_L,\tau_R) = \left( \left( \tau_L \tau_R \right)^{2 k_j}, \left( \tau_L \tau_R \right)^{k_j} \right), \nonumber \end{equation} where $k_j = 3^{j-1}$. Then Lemma \ref{eq:g2Bound} implies $\tau_{R,2 j} < \left( \tau_L \tau_R \right)^{k_j}$ (using the notation of Lemma \ref{eq:g2Bound}) and so $\tau_{R,2 j} \to -\infty$ as $j \to \infty$. Thus there exists $m \ge 0$ such that $\tau_{R,m} \le -2$. Then $\hat{\psi}(g^m(\xi)) < 0$ by Lemma \ref{le:betaBounds}. Now let $n \in \{ 1,2,\ldots, m \}$ be the smallest integer for which $\hat{\psi}(g^n(\xi)) \le 0$. Then $\hat{\psi}(g^{n-1}(\xi)) > 0$, so $\phi(g^n(\xi)) > 0$. That is, $g^n(\xi) \in \cR_0$. Hence $\xi \in \cR_n$, by $n$ applications of Lemma \ref{le:gBackwards}. This completes our verification of \eqref{eq:RnUnion}. To show that $\cR_j$ is non-empty for all $j \ge 0$, first observe $\hat{\psi}(\xi^*) > 0$. Also $\cR_0$ is certainly non-empty. So for any $j \ge 1$ we can choose $\xi \in \Phi_{\rm BYG}$ sufficiently close to $\xi^*$ that $\hat{\psi}(g^i(\xi)) > 0$ for all $i = 0,1,\ldots,j-1$. Again let $n \ge 1$ be the smallest integer for which $\hat{\psi}(g^n(\xi)) \le 0$. Then $n \ge j$ and $g^n(\xi) \in \cR_0$. Thus $g^{n-j}(\xi) \in \cR_j$ (by again using Lemma \ref{le:gBackwards}), i.e.~$\cR_j$ is non-empty. Finally, choose any $\ee > 0$ and let $B_\ee(\xi^*)$ be the open ball in $\mathbb{R}^4$ centred at $\xi^*$ and with radius $\ee$ using the Euclidean norm. We now show there exists $m \ge 1$ such that $\cR_n \subset B_\ee(\xi^*)$ for all $n > m$. This will prove that $\cR_n \to \{ \xi^* \}$ as $n \to \infty$. Choose any $\xi \in \Phi$ with $\xi \notin B_\ee(\xi^*)$. It is simple exercise to show that $|\tau_L \tau_R| \ge 1 + \frac{\ee}{\sqrt{2}}$. Thus, as above, there exists $m \ge 0$ such that $\tau_{R,m} \le -2$ and $\xi \in \cR_n$ for some $n \le m$. Hence for any $n > m$ the region $\cR_n$ contains no points outside of $B_\ee(\xi^*)$. That is $\cR_n \subset B_\ee(\xi^*)$ for all $n > m$ and therefore $\cR_n \to \{ \xi^* \}$ as $n \to \infty$. \end{proof} \section{Positive Lyapunov exponents} \label{sec:lyap} \setcounter{equation}{0} For smooth maps Lyapunov exponents are usually defined in terms of the derivative of the map. The border-collision normal form $f_\xi$ is not differentiable on $x=0$, so instead we work with one-sided directional derivatives, \S\ref{sub:osdd}. We then define Lyapunov exponents in terms of these derivatives, \S\ref{sub:lyap}. This definition coincides with the familiar interpretation of Lyapunov exponents as the asymptotic rate of separation of nearby forward orbits \cite{Si20e}. Then in \S\ref{sub:R0Proof} we prove Theorem \ref{th:R0}. \subsection{One-sided directional derivatives} \label{sub:osdd} \begin{definition} The {\em one-sided directional derivative} of a function $F : \mathbb{R}^2 \to \mathbb{R}^2$ at $z \in \mathbb{R}^2$ in a direction $v \in \mathbb{R}^2$ is \begin{equation} \rD_v^+ F(z) = \lim_{\delta \to 0^+} \frac{F(z + \delta v) - F(z)}{\delta}, \label{eq:Dplus} \end{equation} if this limit exists. \end{definition} The following result tells us that one-sided directional derivatives of the $n^{\rm th}$ iterate of \eqref{eq:f} exist everywhere and for all $n \ge 1$. This follows from the piecewise-linearity and continuity of \eqref{eq:f}. For a proof see \cite{Si20e}. \begin{lemma} For any $\xi \in \mathbb{R}^4$, $z \in \mathbb{R}^2$, $v \in \mathbb{R}^2$, and $n \ge 1$, $\rD_v^+ f_\xi^n(z)$ exists. \label{le:DplusExists} \end{lemma} \subsection{Lyapunov exponents} \label{sub:lyap} In view of Lemma \ref{le:DplusExists} we can use the following definition. \begin{definition} The {\em Lyapunov exponent} of $f_\xi$ at $z \in \mathbb{R}^2$ in a direction $v \in \mathbb{R}^2$ is \begin{equation} \lambda(z,v) = \limsup_{n \to \infty} \frac{1}{n} \ln \left( \left\| \rD_v^+ f_\xi^n(z) \right\| \right). \label{eq:limsup} \end{equation} \end{definition} If the forward orbit of $z$ does not intersect $x=0$, then $\rD f_\xi^n(z)$ (the Jacobian matrix of $f_\xi^n$ at $z$) is well-defined for all $n \ge 1$. Moreover, $\rD_v^+ f_\xi^n(z) = \rD f_\xi^n(z) v$, so in this case \eqref{eq:limsup} reduces to the usual expression given for smooth maps. The following result is Theorem 2.1 of \cite{GlSi21}, except in \cite{GlSi21} only forward orbits that do not intersect $x=0$ were considered. The generalisation to one-sided directional derivatives is elementary so we do not provide a proof. The proof in \cite{GlSi21} is achieved by constructing an invariant expanding cone for multiplying vectors $v$ under the matrices $A_L$ and $A_R$. The derivative in \eqref{eq:limsup} can be written as $v$ left-multiplied by $n$ matrices each of which is either $A_L$ or $A_R$. The cone implies the vector increases in norm each time it is multiplied by $A_L$ or $A_R$, so certainly the norm increases on average, i.e.~$\lambda(z,v) > 0$. \begin{proposition} For any $\xi \in \Phi_{\rm BYG}$, $z \in \mathbb{R}^2$, and $v = (1,0)$, \begin{equation} \liminf_{n \to \infty} \frac{1}{n} \ln \left( \left\| \rD_v^+ f_\xi^n(z) \right\| \right) > 0. \label{eq:liminf} \end{equation} \label{pr:lyap} \end{proposition} \subsection{Arguments leading to a proof of Theorem \ref{th:R0}} \label{sub:R0Proof} We are now ready to prove Theorem \ref{th:R0}. Once we have constructed the set $\Delta$, the equality \eqref{eq:LambdaAsInfiniteIntersection} follows from the arguments given in the proof of Lemma 6.2 of \cite{GlSi21}. We reproduce these arguments here for convenience. \begin{proof}[Proof of Theorem \ref{th:R0}] The set $\Lambda(\xi)$ is bounded because $X \in \Omega$ and $\Omega$ is bounded and forward invariant (Proposition \ref{pr:Omega}). Also $\Lambda(\xi)$ is connected and invariant by the definition of an unstable manifold. With $v = (1,0)$ and any $z \in \Lambda(\xi)$, the Lyapunov exponent $\lambda(z,v)$ is well-defined by Lemma \ref{le:DplusExists}. Moreover $\lambda(z,v) > 0$ by Proposition \ref{pr:lyap} and because the supremum limit is greater than or equal to the infimum limit. It remains for us to prove part (iii). Here we assume $\delta_R < 1$; also $\delta_L < 1$ by Lemma \ref{le:deltaLge1}. Since $\xi \in \cR_0$ we have $\zeta_1(\xi) \le 0$ and so $\psi(\xi) \ge 0$ by \eqref{eq:psi2}. Thus $f_\xi^2(T)$ lies on or to the left of $E^s(X)$ by Proposition \ref{pr:psi}. Let $Z$ denote the intersection of $E^s(X)$ with $\roverline{T f_\xi^2(T)}$ (the line segment connecting $T$ and $f_\xi^2(T)$). Notice $\roverline{X T}$ and $\roverline{T Z}$ are subsets of $W^u(X)$ while $\roverline{Z X}$ is a subset of $W^s(X)$. Let $\Delta_0$ be the filled triangle with vertices $X$, $T$, and $Z$, see Fig.~\ref{fig:igRN_X}-a. Also let $\Delta = \bigcup_{n=0}^\infty f_\xi^n(\Delta_0)$. The set $\Delta$ is forward invariant, by definition, and has non-empty interior because it contains $\Delta_0$. As in \cite{GlSi21}, let $\tilde{\Delta} = \bigcap_{n=0}^\infty f_\xi^n(\Delta)$. We now show $\Lambda(\xi) \subset \tilde{\Delta}$. Choose any $z \in \Lambda(\xi)$. Let $\{ z_k \}$ be a sequence of points in $W^u(X)$ with $z_k \to z$ as $k \to \infty$. For each $k$, $f_\xi^{-n}(z_k) \to X$ as $n \to \infty$, thus there exists $n_k \ge 1$ such that $f_\xi^{-{n_k}}(z_k) \in \roverline{X T}$. Thus $f_\xi^{-{n_k}}(z_k) \in \Delta_0$, so $z_k \in \Delta$. This is true for all $k$, thus $z \in \Delta$. But $z \in \Lambda(\xi)$ is arbitrary, thus $\Lambda(\xi) \subset \Delta$. Also $\Lambda(\xi)$ is forward invariant, thus $\Lambda(\xi) \subset \tilde{\Delta}$. Finally we show $\tilde{\Delta} \subset \Lambda(\xi)$. The determinants $\delta_L$ and $\delta_R$ of the pieces of $f_\xi$ are both less than $1$, thus the area (Lebesgue measure) of $f_\xi^n(\Delta)$ converges to $0$ as $n \to \infty$. Now choose any $z \in \tilde{\Delta}$. Then $z \in f_\xi^n(\Delta)$ for all $n \ge 0$ and so the distance of $z$ to the boundary of $f_\xi^n(\Delta)$ converges to $0$ as $n \to \infty$. The boundary of $\Delta_0$ consists of $\roverline{X Z}$, which lies in the part of $W^s(X)$ that converges linearly to $X$, and two line segments in $W^u(X)$. Consequently the boundary of $f_\xi^n(\Delta_0)$ is contained in $\roverline{X f_\xi^n(Z)} \cup W^u(X)$ for all $n \ge 0$. Thus the boundary of $\Delta$ is contained in $\roverline{Z f_\xi(Z)} \cup W^u(X)$, so the boundary of $f_\xi^n(\Delta)$ is contained in $\roverline{f_\xi^n(Z) f_\xi^{n+1}(Z)} \cup W^u(X)$ for all $n \ge 0$. But $\roverline{f_\xi^n(Z) f_\xi^{n+1}(Z)}$ converges to $X$, hence the distance of $z$ to $W^u(X)$ must be $0$. Thus $z \in \Lambda(\xi)$. But $z \in \tilde{\Delta}$ is arbitrary, thus $\tilde{\Delta} \subset \Lambda(\xi)$. This completes our demonstration of \eqref{eq:LambdaAsInfiniteIntersection}. \end{proof} \section{Implementing the renormalisation recursively} \label{sec:mainProof} \setcounter{equation}{0} In this section we work towards a proof of Theorem \ref{th:affinelyConjugate}. First in \S\ref{sub:OmegaPrime} we use the unstable manifold of $X$ to construct a triangle $\Omega'(\xi)$ that maps to $\Omega(g(\xi))$ under the affine transformation $h_\xi$ for converting $f_\xi^2$ to $f_{g(\xi)}$. In particular we show that $\Omega'(\xi)$ is a subset of both $\Omega(\xi)$ and $\Pi_\xi$ and this allows us to implement the renormalisation recursively in \S\ref{sub:proofByInduction}. \subsection{Properties of the set mapping to $\Omega(g(\xi))$} \label{sub:OmegaPrime} Suppose $\xi \in \Phi$ with $\zeta_1(\xi) > 0$ (equivalently $\psi(\xi) < 0$). Then $f_\xi^2(T)$ lies to the right of $E^s(X)$ by Proposition \ref{pr:psi}. Thus $f_\xi^3(T)$ lies to the left of $E^s(X)$ (because $\lambda_R^u < 0$). Now let $Q$ denote the intersection of $E^u(X)$ with the line through $f_\xi^3(T)$ and parallel to $E^s(X)$, see Fig.~\ref{fig:igRN_X}-b. Then let $\Omega'(\xi)$ be the filled triangle with vertices $f_\xi(T)$, $f_\xi^3(T)$, and $Q$. \begin{lemma} Let $\xi \in \Phi$ with $\zeta_1(\xi) > 0$. Then \begin{romanlist} \item \label{it:InPi} $\Omega'(\xi) \subset \Pi_\xi$, \item \label{it:ImageDisjoint} $\Omega'(\xi) \cap f_\xi \left( \Omega'(\xi) \right) = \varnothing$, \item \label{it:ImageInRight} $f_\xi \left( \Omega'(\xi) \right) \subset \left\{ (x,y) \in \mathbb{R}^2 \,\big|\, x > 0 \right\}$, \item \label{it:MapsToOmega} $h_\xi \left( \Omega'(\xi) \right) = \Omega(g(\xi))$, \item \label{it:InOmega} and if $\zeta_0(\xi) > 0$ then $\Omega'(\xi) \subset \Omega(\xi)$. \end{romanlist} \label{le:OmegaPrime} \end{lemma} \begin{proof} Let $\Xi_R = \left\{ (x,y) \in \mathbb{R}^2 \,\big|\, x > 0 \right\}$ denote the open right half-plane and let $\Psi$ be the triangle with vertices $X$, $f_\xi(T)$, and $V$. We now prove parts \ref{it:InPi}--\ref{it:InOmega} in order. \begin{romanlist} \item Observe $f_\xi(X) = X \in \Xi_R$, thus $X \in \Pi_\xi$ by \eqref{eq:Pi}. Similarly $f_\xi(V) \in \Xi_R$, thus $V \in \Pi_\xi$. Also $f_\xi^2(T) \in \Xi_R$, thus $f_\xi(T) \in \Pi_\xi$. That is, all vertices of $\Psi$ belong to $\Pi_\xi$, thus $\Psi \subset \Pi_\xi$ because these sets are convex. From \eqref{eq:T} and \eqref{eq:f2T} we find that the slope of the line through $T$ and $f_\xi^2(T)$ is $\frac{-\delta_L}{\tau_L - \lambda_R^s}$, which is negative, thus $f_\xi^2(T)$ lies to the left of $T$. Consequently $f_\xi^3(T)$ lies above $f_\xi(T)$. Also $f_\xi(T)$ lies above $V$ because \begin{equation} f_\xi(T)_2 - V_2 = \frac{1 - \delta_R}{\left( 1 - \lambda_R^s \right) \left( 1 - \frac{1}{\lambda_R^u} \right)} > 0. \nonumber \end{equation} Therefore $f_\xi^3(T) \in \Psi$. Thus $\Omega'(\xi) \subset \Psi \subset \Pi_\xi$. \item Observe $f_\xi(\Psi)$ is the quadrilateral with vertices $X$, $f_\xi(V)$, $f_\xi^2(T)$, and $T$. Thus $\Psi$ and $f_\xi(\Psi)$ intersect only at $X$. But $\Omega'(\xi) \subset \Psi$ does not contain $X$, thus $\Omega'(\xi) \cap f_\xi \left( \Omega'(\xi) \right) = \varnothing$. \item The left-most point of $f_\xi(\Psi)$ is $X \in \Xi_R$, thus $f_\xi \left( \Omega'(\xi) \right) \subset f_\xi(\Psi) \subset \Xi_R$. \item For the map $f_\xi^2$, the fixed point $X$ is a saddle with positive eigenvalues. Thus its unstable manifold has two dynamically independent branches. The branch that emanates to the left has its first and second kinks at $f_\xi(T)$ and $f_\xi^3(T)$. Let $\mathcal{B}$ denote this branch up to the second kink, that is $\mathcal{B}$ is the union of the line segments $\roverline{X f_\xi(T)}$ and $\roverline{f_\xi(T) f_\xi^3(T)}$. By the conjugacy relation \eqref{eq:conjugacy}, $h_\xi(\mathcal{B})$ is part of one branch of the unstable manifold of the analogous fixed point of $f_{g(\xi)}$. Since $h_\xi$ flips points across the switching line \eqref{eq:oppositeSigns}, $h_\xi(\mathcal{B})$ is part of the unstable manifold of $Y$ (for the map $f_{g(\xi)}$). This branch has its first and second kinks at $D$ and $f_{g(\xi)}(D)$, thus $h_\xi(\mathcal{B})$ is the union of the line segments $\roverline{Y D}$ and $\roverline{D f_{g(\xi)}(D)}$. By similar reasoning $Q$ maps under $h_\xi$ to the point $B$ of $f_{g(\xi)}$. This verifies part \ref{it:MapsToOmega}. \item The first components of $T$ and $D$ are $T_1 = \frac{1}{1 - \lambda_R^s}$ and $D_1 = \frac{1}{1 - \lambda_L^s}$. Observe $0 < T_1 < D_1$, thus $T$ lies between $(0,0)$ and $D$. By iterating these under $f_{R,\xi}$ we have that $f_\xi(T)$ lies on the line segment connecting $(1,0)$ and $f_\xi(D)$. Now suppose $\zeta_0(\xi) > 0$. Then $f_\xi(T) \in \Omega(\xi)$ because $(1,0) \in \Omega(\xi)$, $f_\xi(D) \in \Omega(\xi)$, and $\Omega(\xi)$ is convex. Moreover, $f_\xi^3(T) \in \Omega(\xi)$ because $\Omega(\xi)$ is forward invariant (Proposition \ref{pr:Omega}). Also $X \in \Omega(\xi)$ by Lemma \ref{le:LambdaInOmega}. Thus the triangle with vertices $f_\xi(T)$, $f_\xi^3(T)$, and $X$ is contained in $\Omega(\xi)$ (again by the convexity of $\Omega(\xi)$). This triangle contains $\Omega'(\xi)$, thus $\Omega'(\xi) \subset \Omega(\xi)$ as required. \end{romanlist} \end{proof} \subsection{Arguments leading to a proof of Theorem \ref{th:affinelyConjugate}} \label{sub:proofByInduction} \begin{proof}[Proof of Theorem \ref{th:affinelyConjugate}] Let $I_n = \{ 0,1,\ldots, 2^n-1 \}$. We use induction on $n$ to prove Theorem \ref{th:affinelyConjugate} and show that \begin{equation} \text{if $\zeta_0(\xi) > 0$ then $S_i \subset \Omega(\xi)$ for all $i \in I_n$}. \label{eq:affinelyConjugateProof0} \end{equation} With $n=0$ the statements in Theorem \ref{th:affinelyConjugate} are true trivially with $S_0 = \Lambda(\xi)$. Also \eqref{eq:affinelyConjugateProof0} is true because $\zeta_0(\xi) > 0$ (since $\xi \in \cR_0$) and $S_0 \subset \Omega(\xi)$ by Lemma \ref{le:LambdaInOmega}. Now suppose the result is true for some $n \ge 0$; it remains for us to verify the result for $n+1$. Choose any $\xi \in \cR_{n+1}$. Then $g(\xi) \in \cR_n$ by Lemma \ref{le:gForwards}. By the induction hypothesis applied to the point $g(\xi)$, we have $g^{n+1}(\xi) \in \cR_0$ and there exist mutually disjoint sets $\tilde{S}_0, \tilde{S}_1, \ldots, \tilde{S}_{2^n-1} \subset \mathbb{R}^2$ with $f_{g(\xi)} \left( \tilde{S}_i \right) = \tilde{S}_{(i+1) \,{\rm mod}\, 2^n}$ and \begin{equation} f_{g(\xi)}^{2^n} \big|_{\tilde{S}_i} ~\text{is affinely conjugate to}~ f_{g^{n+1}(\xi)} \big|_{\Lambda(g^{n+1}(\xi))} \label{eq:affinelyConjugateProof10} \end{equation} for all $i \in I_n$. Also $\zeta_0(g(\xi)) > 0$ by Lemma \ref{le:zeta0gxi}, thus by \eqref{eq:affinelyConjugateProof0} the induction hypothesis also gives $\tilde{S}_i \subset \Omega(g(\xi))$ for all $i \in I_n$. Let $S_{2i} = h_\xi^{-1} \left( \tilde{S}_i \right)$ for each $i \in I_n$ (these sets are mutually disjoint because $h_\xi$ is a homeomorphism). Let $S_{2i+1} = f_\xi(S_{2i})$ for each $i \in I_n$ (these sets are mutually disjoint because $f_\xi$ is a homeomorphism). For any $i,j \in I_n$ we have $S_{2i} \subset \Omega'(\xi)$ by Lemma \ref{le:OmegaPrime}\ref{it:MapsToOmega} and $S_{2j+1} \cap \Omega'(\xi) = \varnothing$ by Lemma \ref{le:OmegaPrime}\ref{it:ImageDisjoint}, so $S_{2i} \cap S_{2j+1} = \varnothing$. Therefore the sets $S_0, S_1, \ldots, S_{2^{n+1}-1}$ are mutually disjoint. For each $i \in I_n$, $S_{2i} \subset \Pi_\xi$ by Lemma \ref{le:OmegaPrime}\ref{it:InPi}, so \begin{equation} f_\xi^2 \big|_{S_{2i}} ~\text{is affinely conjugate to}~ f_{g(\xi)} \big|_{\tilde{S}_i} \label{eq:affinelyConjugateProof20} \end{equation} by Proposition \ref{pr:conjugacy}. Also $f_\xi^2(S_{2i}) = S_{2i+2 \,{\rm mod}\, 2^{n+1}}$, so $f_\xi(S_{2i+1}) = f_{R,\xi}(S_{2i+1}) = S_{2i+2 \,{\rm mod}\, 2^{n+1}}$ using also Lemma \ref{le:OmegaPrime}\ref{it:ImageInRight}. Thus \begin{equation} f_\xi^2 \big|_{S_{2i+1}} ~\text{is affinely conjugate to}~ f_\xi^2 \big|_{S_{2i}} \nonumber \end{equation} using $f_{R,\xi}$ as the affine transformation. By further use of \eqref{eq:conjugacy} we have that $f_\xi^{2^{n+1}} \big|_{S_{2i}}$ and $f_\xi^{2^{n+1}} \big|_{S_{2i+1}}$ are affinely conjugate to $f_{g(\xi)}^{2^n} \big|_{\tilde{S}_i}$, thus also to $f_{g^{n+1}(\xi)} \big|_{\Lambda(g^{n+1}(\xi))}$ by \eqref{eq:affinelyConjugateProof10} (this verifies \eqref{eq:affinelyConjugate} for $n+1$). The induction hypothesis also implies \begin{equation} \bigcup_{i=0}^{2^n-1} \tilde{S}_i = {\rm cl} \left( W^u(\gamma_n) \right), \label{eq:affinelyConjugateProof40} \end{equation} where $\gamma_n$ is a periodic solution of $f_{g(\xi)}$ with symbolic itinerary $\cF^n(R)$. By \eqref{eq:conjugacy}, $h_\xi^{-1}(\gamma_n)$ is a periodic solution of $f_\xi^2$. Since $h_\xi$ flips the left and right half-planes, see \eqref{eq:oppositeSigns}, the symbolic itinerary of $h_\xi^{-1}(\gamma_n)$ is obtained by swapping $L$ and $R$'s in $\cF^n(R)$. Then $\gamma_{n+1} = h_\xi^{-1}(\gamma_n) \cup f_\xi \left( h_\xi^{-1}(\gamma_n) \right)$ is a periodic solution of $f_\xi$ and since $f_\xi \left( h_\xi^{-1}(\gamma_n) \right)$ is contained in the right half-plane (Lemma \ref{le:OmegaPrime}\ref{it:ImageInRight}) its symbolic itinerary is obtained by further replacing each $L$ with $LR$ and each $R$ with $RR$, hence $\gamma_{n+1}$ has symbolic itinerary $\cF^{n+1}(R)$. Also by \eqref{eq:affinelyConjugateProof20} and \eqref{eq:affinelyConjugateProof40}, \begin{equation} \bigcup_{i=0}^{2^{n+1}-1} S_i = {\rm cl} \left( W^u(\gamma_{n+1}) \right), \nonumber \end{equation} which verifies \eqref{eq:Siunion} for $n+1$. Finally, if $\zeta_0(\xi) > 0$ then for all $i \in I_n$ we have $S_{2i} \subset \Omega(\xi)$ by Lemma \ref{le:OmegaPrime}\ref{it:InOmega} and $S_{2i+1} \subset \Omega(\xi)$ because $\Omega(\xi)$ is forward invariant verifying \eqref{eq:affinelyConjugateProof0} for $n+1$. \end{proof} \section{Discussion} \label{sec:conc} \setcounter{equation}{0} In this paper we have shown how part of the parameter space of \eqref{eq:f} naturally divides into regions $\cR_0, \cR_1, \ldots$. As demonstrated by Theorem \ref{th:affinelyConjugate}, renormalisation enables us to describe the dynamics in each $\cR_n$ with $n \ge 1$ based on knowledge of the dynamics in $\cR_0$. Theorem \ref{th:R0} describes the dynamics in $\cR_0$, but is incomplete. It remains to show the attractor $\Lambda$ is unique and satisfies stronger notions of chaos throughout $\cR_0$. Also we would like to extend the results to high-dimensional maps. Finally we comment on the analogy of Feigenbaum's constant for our renormalisation by looking at the rate at which the regions $\cR_n$ converge to the fixed point $\xi^*$. The $4 \times 4$ Jacobian matrix $\rD g(\xi^*)$ has exactly one unstable eigenvalue: $2$. It follows that the diameter of $\cR_n$ divided by the diameter of $\cR_{n+1}$ tends, as $n \to \infty$, to the constant $2$. \section*{Acknowledgements} The authors were supported by Marsden Fund contract MAU1809, managed by Royal Society Te Ap\={a}rangi.
\section{ Introduction} Gaberdiel and Gopakumar have described the worldsheet description for the $ AdS_5 \times S^5$ string theory dual to free four dimensional ${\cal N}=4$ super Yang-Mills theory in \cite{GG2104}. Their free field description is related to the ambitwistor string theory and the finite set of generalized zero modes (or wedge modes) in each spectrally flowed sector are physical. Furthermore, they impose some residual gauge constraints on the Fock space generated by these wedge oscillators, and demonstrate the matching of the physical spectrum of the string theory with that of free ${\cal N}=4$ super Yang-Mills theory at the planar level \cite{GG2105}. See also the relevant works in \cite{EGG1,EGG2,Eberhardt,DGGK} where the tensionless string theory on $AdS_3 \times S^3$, in the worldsheet theory with free fields, is studied. At vanishing gauge coupling constant, the Lie superalgebra $PSU(2,2|4)$ of ${\cal N}=4$ super Yang-Mills theory gets enhanced to the higher spin superalgebra $hs(2,2|4)$. The fundamental unitary irreducible representation of $hs(2,2|4)$ is the singleton with vanishing central charge \cite{GM,GM1,GMZ,GMZ1}. The symmetric tensor product of two singletons yields the massless $AdS_5$ higher spin gauge fields. The physical fields after gauging are organized by the `levels' $l =0, 1, 2, \cdots, \infty$ of $PSU(2,2|4)$ multiplets \cite{SS,SS1}. In particular, the level $l=0$ multiplet is the five dimensional ${\cal N}=8$ gauged supergravity multiplet \cite{GRW} and the $hs(2,2|4)$ generators depending on the $U(1)$ charge are classified by the levels explicitly. See also some relevant papers on the construction of the composite operators built out of the singleton \cite{Bdd,HST,AF}. Moreover, the spectrum of single trace operators in the free ${\cal N}=4$ super Yang-Mills theory can be decomposed into the irreducible representations of the $hs(2,2|4)$ \cite{BBMS}. See also \cite{BMS}. As pointed out by \cite{GG2104,GG2105}, the worldsheet realization provides the familiar oscillator construction \cite{GM} by considering each pair of modes of the free fields. In this paper, we would like to determine the worldsheet realization for the higher spin generators found in \cite{SS}. The first nontrivial case appears when the level becomes $l=1$ and the higher spin generators consist of the cubic terms between the bilinears of ambitwistor-like fields in the worldsheet approach by counting the number of oscillators \cite{SS,BBMS}. Then the generators of $PSU(2,2|4)$ have the conformal weight-$1$ while the higher spin generators of $hs(2,2|4)$ have the conformal weight-$3$. We will obtain the complete expressions for the higher spin generators of $hs(2,2|4)$ for the level $l=1$ by using the standard operator product expansions (OPEs) in two dimensional conformal field theory \footnote{See Maldacena's comment on Gopakumar's talk in strings 2021.}. In section $2$, we review the free field construction of the worldsheet theory in \cite{GG2104,GG2105}, express the $PSU(2,2|4)$ explicitly and the stress energy tensor is described. In section $3$, we obtain the lowest higher spin generators of $hs(2,2|4)$ by using the free field construction with the help of two dimensional conformal field theory. In section $4$, we write down the complete first order poles from the OPEs between the generators of $PSU(2,2|4)$ and those of $hs(2,2|4)$. In section $5$, we summarize the main results of this paper and the future directions of related works are given. In Appendix, some details of the previous sections are presented explicitly. \section{ Review} \subsection{Free fields} We consider the weight-$\frac{1}{2}$ conjugate pairs of symplectic boson \cite{GOW} fields $(\lambda^{\alpha}, \mu_{\alpha}^{\dagger})$ and $(\mu^{\dot{\alpha}},\lambda_{\dot{\alpha}}^{\dagger})$ where $\alpha, \dot{\alpha} =1, 2$ and four weight-$\frac{1}{2}$ complex fermions $(\psi^a, \psi_a^{\dagger})$ where $a=1,2,3,4$ \cite{GG2104,GG2105}. The $\alpha$ and $\dot{\alpha}$ are spinor indices with respect to two different $SU(2)$'s and $\psi^a$ transforms in the fundamental representation of $SU(4)$. Note that the conformal dimension-$\frac{1}{2}$ fields, $(\lambda^{\alpha}, \mu_{\alpha}^{\dagger})$ and $(\mu^{\dot{\alpha}},\lambda_{\dot{\alpha}}^{\dagger})$, are bosonic and they satisfy `quasi' statistics. We will follow most of the notations presented in \cite{GG2104,GG2105}. Their nontrivial operator product expansions (OPEs) in the left-moving sector of the worldsheet theory we are describing are given by \begin{eqnarray} \lambda^{\alpha}(z) \, \mu_{\beta}^{\dagger}(w) & = & \frac{1}{(z-w)} \, \delta^{\alpha}_{\beta}+ \cdots, \nonumber \\ \mu^{\dot{\alpha}}(z) \lambda_{\dot{\beta}}^{\dagger}(w) & = & \frac{1}{(z-w)} \, \delta^{\dot{\alpha}}_{\dot{\beta}} + \cdots, \nonumber \\ \psi^{a}(z) \, \psi_b^{\dagger}(w) &=& \frac{1}{(z-w)} \, \delta^{a}_{b}+ \cdots. \label{threeOPEs} \end{eqnarray} The abbreviated parts in (\ref{threeOPEs}) are the regular terms as usual in two dimensional conformal field theory. By introducing the components of ambitwistor fields \cite{Berkovits} \begin{eqnarray} Z^I \equiv (\lambda^{\alpha}, \mu^{\dot{\alpha}},\psi^a), \qquad Y_J \equiv (\mu_{\alpha}^{\dagger}, \lambda_{\dot{\alpha}}^{\dagger}, \psi_a^{\dagger}), \label{ZY} \end{eqnarray} we can rewrite the above three OPEs (\ref{threeOPEs}) as a single one \cite{Uvarov} alternatively \begin{eqnarray} Z^I(z) \, Y_J(w) = \frac{1}{(z-w)}\, \delta^{I}_J + \cdots. \label{ZYOPE} \end{eqnarray} The upper and lower indices $I, J$ stand for $\alpha, \dot{\alpha}$ and $a$. For the calculations of any OPEs containing the multiple of ambitwistor fields (\ref{ZY}), it is useful to use (\ref{ZYOPE}) rather than (\ref{threeOPEs}) and after that we can specify the indices $I,J,K \cdots$ of these from (\ref{ZY}) later \footnote{\label{YZope} If we interchange the order of the OPE in (\ref{ZYOPE}), then we have $Y_J(z) \, Z^I(w) = \frac{1}{(z-w)} \, (-1)^{d_I \, d_J +1}\, \delta^I_J + \cdots $ where the grading $d_I=2$ for the bosonic fields and $d_I=1$ for the fermionic fields \cite{DTH,FL,Bowcock,AIS}. In other words, the additional factor $(-1)^{d_I \, d_J }$ arises. Note that the components $Z^a=\psi^a$ and $Y_a=\psi_a^{\dagger}$ are fermionic.}. By constructing the quadratic terms \cite{Berkovits,GG2104,GG2105} \begin{eqnarray} J^I_{\,\,\, J} \equiv Y_J \, Z^I, \label{J} \end{eqnarray} the current algebra version of the oscillator construction \cite{GM} of Lie superalgebra $U(2,2|4)$ can be described by i) the generators of Lorentz symmetry, ${\cal L}^{\alpha}_{\,\,\,\beta}$ and $\dot{{\cal L}}^{\dot{\alpha}}_{\,\,\,\dot{\beta}}$, ii) the generator of $R$ symmetry, ${\cal R}^{a}_{\,\,\, b}$, iii) the generators of super translations, ${\cal Q}^{a}_{\,\,\, \alpha}, \dot{\cal Q}^{\dot{\alpha}}_{\,\,\,a}$ and ${\cal P}^{\dot{\alpha}}_{\,\,\, \beta}$. Moreover, the ${\cal N}=4$ super Poincare algebra obtained by these generators can be enlarged by the generators of super conformal boosts, ${\cal S}^{\alpha}_{\,\,\,a}, \dot{{\cal S}}^{a}_{\,\,\,\dot{\alpha}}$ and ${\cal K}^{\alpha}_{\,\,\,\dot{\beta}}$. There exist also the $U(1)$ hyper charge ${\cal B}$, the central charge ${\cal C}$ and the dilatation generator ${\cal D}$. Then the generators \cite{Beisert} of Lie superalgebra $U(2,2|4)$ can be extended by the following generators in terms of ambitwistor fields \cite{GG2104,GG2105} \begin{eqnarray} {\cal L}^{\alpha}_{\,\,\,\beta} &= & Y_{\beta}\, Z^{\alpha}-\frac{1}{2}\, \delta^{\alpha}_{\beta} \, Y_{\gamma} \, Z^{\gamma}, \qquad \dot{{\cal L}}^{\dot{\alpha}}_{\,\,\,\dot{\beta}} = Y_{\dot{\beta}}\, Z^{\dot{\alpha}}-\frac{1}{2}\, \delta^{\dot{\alpha}}_{\dot{\beta}} \, Y_{\dot{\gamma}} \, Z^{\dot{\gamma}}, \qquad {\cal R}^a_{\,\,\, b} = Y_{b}\, Z^{a}-\frac{1}{4}\, \delta^{a}_{b} \, Y_{c} \, Z^{c}, \nonumber \\ {\cal Q}^a_{\,\,\, \alpha} & = & Y_{\alpha}\, Z^a, \qquad \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, a} = Y_a \, Z^{\dot{\alpha}}, \qquad {\cal P}^{\dot{\alpha}}_{\,\,\, \beta} = Y_{\beta} \, Z^{\dot{\alpha}}, \nonumber \\ {\cal S}^{\alpha}_{\,\,\, a} & = & Y_a \, Z^{\alpha}, \qquad \dot{{\cal S}}^{a}_{\,\,\, \dot{\alpha}} = Y_{\dot{\alpha}}\, Z^a, \qquad {\cal K}^{\alpha}_{\,\,\, \dot{\beta}} = Y_{\dot{\beta}} \, Z^{\alpha}, \nonumber \\ {\cal B} &=& \frac{1}{2} \, (Y_{\alpha}\, Z^{\alpha} + Y_{\dot{\alpha}} \, Z^{\dot{\alpha}}), \qquad {\cal C} = \frac{1}{2} \, (Y_{\alpha}\, Z^{\alpha} + Y_{\dot{\alpha}} \, Z^{\dot{\alpha}} + Y_a\, Z^a), \nonumber \\ {\cal D} & = & \frac{1}{2} \, (Y_{\alpha}\, Z^{\alpha} - Y_{\dot{\alpha}} \, Z^{\dot{\alpha}}). \label{12generators} \end{eqnarray} As usual, the repeated indices are summed over the corresponding indices. As noted in \cite{GG2104,GG2105}, each pair of modes of the free fields provides two copies of the usual oscillator construction. Therefore, once we restrict to the zero modes of (\ref{12generators}) in their (anti)commutator relations, the known Lie superalgebra $U(2,2|4)$ \cite{Beisert} can be obtained. We present their complete OPEs in Appendix $A$ in the worldsheet theory \footnote{We use the Thielemans package \cite{Thielemans} with a mathematica \cite{mathematica}. Note that the group indices $\alpha, \dot{\alpha}$ and $a$ are fixed. All the coefficients appearing in the right hand sides of the OPEs are numerical values. Once we identify the group index structures both sides of the OPEs, then it is straightforward to calculate all these coefficients inside a Package explicitly due to the free fields.}. It is useful to introduce the following $U(1)$ generators which appear in the above ${\cal B}, {\cal C}$ and ${\cal D}$ generators \begin{eqnarray} {\cal U} \equiv Y_{\gamma} \, Z^{\gamma}, \qquad \dot{{\cal U}} \equiv Y_{\dot{\gamma}} \, Z^{\dot{\gamma}}, \qquad {\cal V} \equiv Y_{c} \, Z^{c}. \label{uudotv} \end{eqnarray} Note that the ${\cal V}$ appears in the second term of ${\cal R}^a_{\,\,\,b}$ in (\ref{12generators}) which is traceless: ${\cal R}^a_{\,\,\,a}=0$. \begin{itemize} \item[] In particular, the nonzero ${\cal V}$-charge for ${\cal Q}^a_{\,\,\,\alpha}$ is equal to $-1$ and the nonzero ${\cal V}$-charge for $\dot{{\cal Q}}^{\alpha}_{\,\,\,a}$ is equal to $1$ from the observation of Appendix (\ref{opewithuudotv}). This corresponds to $Y$-charge in \cite{SS} up to sign. By simply counting the number of supersymmetry generators in the multiple product of the generators of (\ref{12generators}), we can determine the ${\cal V}$-charge. The remaining ten generators have vanishing ${\cal V}$-charges. \end{itemize} Note that the ordering of two operators in (\ref{J}) or (\ref{12generators}) is important because sometimes we will have additional minus sign when we interchange the ambitwistor fields each other. \subsection{The Lie superalgebra $PSU(2,2|4)$} We can calculate the OPEs between the conformal weight-$1$ currents in (\ref{J}) by using the defining relation in (\ref{ZYOPE}) with the help of the footnote \ref{YZope} and it turns out that \begin{eqnarray} J^{I}_{\,\,\,J}(z) \, J^{K}_{\,\,\,L}(w) & = & -\frac{1}{(z-w)^2}\, (-1)^{d_J \, d_K} \, \delta^{I}_{L}\, \delta^{K}_{J} + \frac{1}{(z-w)}\, \Bigg[ \delta^{I}_{L} \, J^{K}_{\,\,\,J} \nonumber \\ & + & (-1)^{(d_L+d_K)(d_I+d_J)+1}\, \delta^{K}_{\,\,\,J} \, J^{I}_{\,\,\,L} \Bigg](w) +\cdots. \label{jjope} \end{eqnarray} The grading $d_I$ is defined in the footnote \ref{YZope}. We can also check, from (\ref{jjope}), that the second order pole of the OPE between $J^+ \equiv {\cal L}^1_{\,\,\,2}$, $J^- \equiv {\cal L}^2_{\,\,\,1}$ and $J^3 \equiv \frac{1}{2} ({\cal L}^2_{\,\,\,2}-{\cal L}^1_{\,\,\,1})$ implies that the level is equal to $-1$. Similarly, the OPE between $\dot{J}^+ \equiv \dot{{\cal L}}^{\dot{1}}_{\,\,\,\dot{2}}$, $\dot{J}^- \equiv \dot{{\cal L}}^{\dot{2}}_{\,\,\,\dot{1}}$ and $\dot{J}^3 \equiv \frac{1}{2} (\dot{{\cal L}}^{\dot{2}}_{\,\,\,\dot{2}}- \dot{{\cal L}}^{\dot{1}}_{\,\,\,\dot{1}})$ leads to the fact that the level is also equal to $-1$. We obtain Appendix $A$ from this defining relation (\ref{jjope}) by specifying the indices explicitly. The OPEs between the $U(1)$ generator ${\cal C}$ appearing in (\ref{12generators}) and other generators of $U(2,2|4)$ do not have any singular terms in Appendix (\ref{psualgebra}) except the OPE ${\cal B}(z) \, {\cal C}(w)$. We are left with $PSU(2,2|4)$ after the $U(1)$ generator ${\cal C}$ is `quotiented' \cite{GG2104,GG2105}. We can calculate the OPEs between the single $J^{I}_{\,\,\,J}(z)$ and the quadratic term $ J^{K}_{\,\,\,L}\, J^{M}_{\,\,\,N}(w)$ and the OPEs between the single $J^{I}_{\,\,\,J}(z)$ and the cubic term $ J^{K}_{\,\,\,L}\, J^{M}_{\,\,\,N} \, J^{P}_{\,\,\,Q}(w)$ but we do not present them in this paper because they have long expressions due to the presence of various gradings. Later we will present the first order pole of the latter explicitly in next section. \subsection{The stress energy tensor} By requiring that the ambitwistor fields (\ref{ZY}) are weight-$\frac{1}{2}$ primary and the generators (\ref{12generators}) are weight-$1$ primary (See also the footnote \ref{opewithT}), we can determine the stress energy tensor from the possible quadratic terms from (\ref{12generators}) completely and it is given by \begin{eqnarray} T & = & \frac{1}{2} (\lambda^{\alpha} \, \partial \mu_{\alpha}^{\dagger} + \mu^{\dot{\alpha}} \, \partial \lambda^{\dagger}_{\dot{\alpha}}- \psi^a \, \partial \, \psi_a^{\dagger} -\partial \, \lambda^{\alpha} \, \mu_{\alpha}^{\dagger} - \partial \, \mu^{\dot{\alpha}} \, \lambda^{\dagger}_{\dot{\alpha}}+ \partial \, \psi^a \, \psi_a^{\dagger} ) \nonumber \\ & = & \frac{1}{2}\, (-1)^{d_I} \, ( Z^I \, \partial \, Y_I -\partial \, Z^I \, Y_I). \label{stressenergy} \end{eqnarray} As before, the repeated indices are summed. Note that there is an additional factor for the grading when we change the order between the ambitwistor fields in the second expression of (\ref{stressenergy}). This stress energy tensor satisfies the usual standard OPE $T(z) \, T(w)$ and the central charge is equal to zero. We will use the explicit expression (\ref{stressenergy}) in order to calculate the possible (quasi)primary operators in next section \footnote{\label{opewithT} Therefore, we have $T(z) \, Z^I(w) = \frac{1}{(z-w)^2}\, \frac{1}{2} \, Z^I(w) + \frac{1}{(z-w)}\, \partial \, Z^I(w) + \cdots $, $T(z) \, Y_I(w) = \frac{1}{(z-w)^2}\, \frac{1}{2} \, Y_I(w) + \frac{1}{(z-w)}\, \partial \, Y_I(w) + \cdots $, $T(z) \, J^{I}_{\,\,\,J}(w) =\frac{1}{(z-w)^2}\, J^I_{\,\,\,J}(w) + \frac{1}{(z-w)} \, \partial \, J^I_{\,\,\,J}(w) +\cdots$ and from these we can calculate the following OPE $T(z) \, J^{I}_{\,\,\,J}\, J^{K}_{\,\,\,L}(w)=\frac{1}{(z-w)^4}\, (-1)^{ d_J \, d_K +1}\, \delta^I_L\, \delta^K_J +\frac{1}{(z-w)^3}\, \Bigg[ \delta^I_L \, J^{K}_{\,\,\,J} +(-1)^{(d_L+d_K)(d_I+d_J)+1}\, \delta^{K}_J \, J^{I}_{\,\,\,L} \Bigg](w)+\frac{1}{(z-w)^2} \, 2 \, J^{I}_{\,\,\,J}\, J^{K}_{\,\,\,L}(w)+ \frac{1}{(z-w)}\, \partial \, (J^{I}_{\,\,\,J}\, J^{K}_{\,\,\,L})(w)+ \cdots$ which implies that this does not produce the (quasi)primary operator in general. We can check whether this is really (quasi)primary or not after specifying the indices explicitly.}. In this section, we summarize the `extension' of the Lie superalgebra $PSU(2,2|4)$ generated by (\ref{12generators}) in the worldsheet theory. Implicitly it is given by (\ref{jjope}) or explicitly it is also given by Appendix (\ref{psualgebra}). If we focus on the zero modes for these generators, then this will lead to the standard (anti)commutator relations \cite{Beisert}. \section{ Construction of the lowest generators of the higher spin superalgebra $hs(2,2|4)$} We would like to construct the worldsheet description for the higher spin generators of $hs(2,2|4)$ found in \cite{SS,SS1}. We have seen the conformal weight-$1$ generators which are primary under the stress energy tensor (\ref{stressenergy}). According to the results of \cite{SS}, the nontrivial lowest generators consist of cubic terms in the above weight-$1$ generators corresponding to the level $l=1$ case (For $l=0$ case, they are linear in the weight-$1$ generators while for $l=2$ case they are quintic in the weight-$1$ generators). \begin{itemize} \item[] We observe that the $(2l +1)$ can be identified with the conformal dimension (or weight or spin) under (\ref{stressenergy}) in the worldsheet theory. \end{itemize} From the conformal field theory analysis \cite{Blumenhagenetal,CFT,Ahn1211}, it is known that in the OPE between the weight-$1$ operator (which is a primary) and the weight-$3$ (quasi)primary operator, in principle, there appear a (new) weight-$1$ operator in the third order pole and a (new) weight-$2$ operator in the second order pole. By simple counting the relative coefficients for the descendant operators of these operators which will appear in the second and first order poles, they do not appear in the first order pole. \begin{itemize} \item[] Therefore, we will focus on the first order pole in the OPE between the weight-$1$ operator and the weight-$3$ operator. This first order pole provides a new (quasi)primary operators. In doing this, we should check that the weight-$3$ operator should be (quasi) primary. That is, at least the third order pole of the OPE between the stress energy tensor and this weight-$3$ operator should vanish. \end{itemize} We have the following first order pole in the OPE between $J^I_{\,\,\, J}(z)$ and $J^{K}_{\,\,\,L}\, J^{M}_{\,\,\,N}\, J^{P}_{\,\,\,Q}(w)$ by using (\ref{jjope}) successively as follows: \begin{eqnarray} && J^I_{\,\,\, J}(z) \, J^{K}_{\,\,\,L}\, J^{M}_{\,\,\,N}\, J^{P}_{\,\,\,Q}(w)\Bigg|_{\frac{1}{(z-w)}} = \delta^{I}_{L}\, J^{K}_{\,\,\,J}\, J^M_{\,\,\, N}\, J^{P}_{\,\,\,Q}(w) + (-1)^{(d_I+d_K)(d_I+d_J)+1}\, \delta^{K}_J \, J^{I}_{\,\,\,L}\, J^M_{\,\,\, N}\, J^{P}_{\,\,\,Q}(w) \nonumber \\ && + (-1)^{(d_I+d_J)(d_K+d_L)}\, J^{K}_{\,\,\,L}\, \Bigg[ \delta^{I}_{N}\, J^M_{\,\,\, J}\, J^{P}_{\,\,\,Q} + (-1)^{(d_N+d_M)(d_I+d_J)+1}\, \delta^{M}_J \, J^{I}_{\,\,\, N} \, J^{P}_{\,\,\,Q}\, \nonumber \\ && + (-1)^{(d_I+d_J)(d_N+d_M)}\, \delta^{I}_Q \, J^{M}_{\,\,\, N} \, J^{P}_{\,\,\,J}+ (-1)^{(d_I+d_J)(d_N+d_M+d_P+d_Q)+1}\, \delta^{P}_J \, J^{M}_{\,\,\, N} \, J^{I}_{\,\,\,Q} \Bigg](w). \label{pole1} \end{eqnarray} Let us emphasize that the right hand side of (\ref{pole1}) is a (quasi)primary operator as before as long as the third order pole of Appendix (\ref{tjjj}) vanishes. We obtain all the information on the higher spin generators in this section from this (implicit) OPE (\ref{pole1}) by imposing the explicit indices on (\ref{pole1}). In other words, the first order pole can be written in terms of the known operators by collecting them appropriately or if not, then there appears in the new (quasi)primary operator. We do not have to subtract the contributions from the descendant operators as we mentioned before. Of course, there are also fourth, third and second order poles in the above OPE. We focus on the tables $4$ and $5$ of \cite{SS} with $l=1$ case and $s=1, \frac{3}{2}, 2, \frac{5}{2}, 3, \frac{7}{2}$ and $4$. Their $l$ is related to the numbers of bosonic and fermionic oscillators and is given by the equation $(3.6)$ in \cite{SS} and their $s$ is related to the numbers of bosonic oscillators and is given around equation $(3.18)$ in \cite{SS}. Furthermore, their equation $(3.19)$ contains all the information on the above two tables although it is not easy to read off the relevant quantities properly \footnote{ \label{fiveweightone} For $l=0$ in table $4$ of \cite{SS}, there are generators ${\cal R}^a_{\,\,\, b}, {\cal Q}^a_{\,\,\,\alpha}, \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\,a}$ and ${\cal P}^{\dot{\alpha}}_{\,\,\,\beta}$ corresponding to ${\bf 15}_0, {\bf 4}_{-1}, \overline{\bf 4}_{1}$ and ${\bf 1}_0$ respectively. It is easy to see that they are closed by themselves in Appendix (\ref{psualgebra}). In the oscillator construction, the remaining generators of $PSU(2,2|4)$ acting on the physical vacuum state vanish \cite{Beisert,Aoyama}. We will calculate the OPEs between these weight-$1$ operators including the $U(1)$ operator ${\cal V}$ relevant to ${\cal R}^a_{\,\,\,b}$ and the weight-$3$ operators in next section. The algebra from these five weight-$1$ operators is closed.}. \subsection{ The $s=1$ case: ${\bf 1}_0$ and ${\bf 15}_0$} Because their $X$ appearing in equation $(2.4)$ in \cite{SS} corresponds to our ${\cal V}$ up to sign and normalization, we can observe that the $SU(4)$ singlet is a cubic in ${\cal V}$ which has vanishing ${\cal V}$-charge from Appendix (\ref{opewithuudotv}). Moreover, the $SU(4)$ nonsinglet contains the quadratic in $X$ and we can identify this as a quadratic in ${\cal V}$ together with ${\cal R}^a_{\,\,\, b}$ which is a ${\bf 15}$ representation of $SU(4)$. Note that by construction of (\ref{12generators}), we observe the fact that ${\cal R}^a_{\,\,\, a}$ vanishes. In the tensor product of ${\bf 4} \otimes \overline{{\bf 4}}= {\bf 1} \oplus {\bf 15}$ \cite{Slansky,FKS}, after subtracting the ${\cal V}$ part, we are left with the representation ${\bf 15}$. Once again, the ${\cal V}$-charge in the cubic of ${\cal V}\, {\cal V} \, {\cal R}^a_{\,\,\,b}$ vanishes. Therefore we identify the following higher spin generators corresponding to the representations ${\bf 1}_0$ and ${\bf 15}_0$ respectively as follows \footnote{We denote the higher spin generators as the letter ${\cal W}$ with appropriate group indices. For the additional `new' higher spin generators we put a hat on ${\cal W}$ with some indices.}: \begin{eqnarray} {\cal W} & \equiv & {\cal V}\, {\cal V}\, {\cal V}, \nonumber \\ {\cal{W}}^{a}_{\,\,\, b} & \equiv & {\cal V}\, {\cal V}\, {\cal R}^a_{\,\,\,b} + {\cal V}\, {\cal R}^a_{\,\,\,b}\, {\cal V}\, + {\cal R}^a_{\,\,\,b}\, {\cal V}\, {\cal V}. \label{s-one} \end{eqnarray} We can check these higher spin generators in (\ref{s-one}) are quasiprimary operators under the stress energy tensor (\ref{stressenergy}). In other words, the OPEs between the stress energy tensor and these generators contain nonzero fourth order poles although the third order poles become zero according to Appendix (\ref{tjjj}) by specifying the indices correctly. Although the OPE between ${\cal V}$ and ${\cal R}^a_{\,\,\, b}$ is regular and they are commuting operators (the second and the third terms in the right hand side of ${\cal W}^a_{\,\,\,b}$ are the same as the first one), we will keep its form in symmetrical way as in (\ref{s-one}). When we act the supersymmetry generators on the ${\cal W}^a_{\,\,\,b}$, then we will observe that each three terms contributes differently due to the normal ordering. In next subsections, we will determine the remaining higher spin generators by acting the supersymmetry generators ${\cal Q}^a_{\,\,\, \alpha}$ and $\dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\,a}$ on (\ref{s-one}) successively. \subsection{ The $s=\frac{3}{2}$ case: ${\bf 4}_{-1}, \overline{{\bf 4}}_1, {\bf 20}_{-1}$ and $\overline{{\bf 20}}_{1}$} Now we move on the next column of the table $4$ with $l=1$ of \cite{SS}. Eventually we will present all the first order poles in the OPEs between some weight-$1$ operators and the weight-$3$ operators in next section with Appendix $C$. However, in this section, we will focus on some of them which determine the higher spin generators completely. One way to determine these particular higher spin generators is to consider that we can calculate the first order pole in the OPE between the supersymmetry generator ${\cal Q}^{a}_{\,\,\,\alpha}$ which is fermionic and ${\cal{W}}^{b}_{\,\,\, c}$ which is introduced in previous subsection (\ref{s-one}). Either we can use Appendix (\ref{psualgebra}) or the previous OPE (\ref{pole1}) can be used by selecting the corresponding indices for this particular OPE. It turns out that by antisymmetrizing the upper indices \footnote{In this paper, the (anti)symmetric notations are for $SU(4)$ indices. The bracket $\left[ \right]$ stands for antisymmetric one and the bracket $\left( \right)$ stands for symmetric one without any overall numerical factors.} \begin{eqnarray} {\cal Q}^{\left[a \right.}_{\,\,\,\alpha}(z) \, {\cal{W}}^{ \left. b \right]}_{\,\,\, c}(w) \Bigg|_{\frac{1}{(z-w)}} = {\cal W}^{\left[a b\right]}_{\,\,\, c\, \alpha}(w) + \delta^{\left[ a \right.}_{c} \, {\cal W}^{ \left. b \right]}_{\,\,\, \alpha}(w) -\frac{1}{4} \, \delta^{\left[ b \right.}_{c} \, {\cal W}^{\left. a \right]}_{\,\,\, \alpha}(w), \label{s-threehalfope} \end{eqnarray} where the right hand side of (\ref{s-threehalfope}) consists of two kinds of higher spin generators as follows: \begin{eqnarray} {\cal W}^{a}_{\,\,\, \alpha} & \equiv & {\cal V}\, {\cal V}\, {\cal Q}^a_{\,\,\,\alpha} + {\cal V}\, {\cal Q}^a_{\,\,\,\alpha}\, {\cal V}\, + {\cal Q}^a_{\,\,\,\alpha}\, {\cal V}\, {\cal V}, \nonumber \\ {\cal W}^{\left[a b\right]}_{\,\,\, c\, \alpha} & \equiv & {\cal V} \, {\cal Q}^{\left[a \right.}_{\,\,\,\alpha} \, {\cal R}^{\left. b \right]}_{\,\,\,c} + {\cal Q}^{\left[a\right.}_{\,\,\,\alpha} \, {\cal V}\, {\cal R}^{\left. b\right]}_{\,\,\,c} + {\cal Q}^{\left[a \right.}_{\,\,\,\alpha} \, {\cal R}^{\left. b \right]}_{\,\,\,c}\, {\cal V} \nonumber \\ &+& {\cal V} \, {\cal R}^{\left[b \right.}_{\,\,\,c} \, {\cal Q}^{\left. a \right]}_{\,\,\,\alpha} + {\cal R}^{\left[b\right.}_{\,\,\,c} \, {\cal V}\, {\cal Q}^{\left. a\right]}_{\,\,\,\alpha} + {\cal R}^{\left[b \right.}_{\,\,\,c} \, {\cal Q}^{\left. a \right]}_{\,\,\,\alpha}\, {\cal V}. \label{s-threehalf} \end{eqnarray} Note that the first one in (\ref{s-threehalf}) is a quasiprimary operator while the second one in (\ref{s-threehalf}) is a primary operator according to Appendix (\ref{tjjj}). Note that the second one is antisymmetric in the upper indices. As mentioned before, the weight-$1$ operator ${\cal Q}^a_{\,\,\,\alpha}$ has nontrivial OPE with ${\cal V}$ (See also Appendix (\ref{opewithuudotv})) and the ordering between them is not trivial and if we interchange them, there appears a derivative term of weight-$1$ operator. The quasiprimary condition of the first operator requires all of three terms (this is the reason why we have three terms in (\ref{s-one})) and we can easily observe that the first operator corresponds to the representation ${\bf 4}_{-1}$ because it contains a single weight-$1$ operator which has ${\cal V}$-charge $-1$ (Of course, the ${\cal V}$-charge of ${\cal V}$ is equal to zero) and it has upper index $a$ which transforms as a fundamental representation of $SU(4)$. In the tensor product of $\overline{\bf 6} \otimes \overline{\bf 4}= {\bf 20} \oplus {\bf 4}$ \cite{Slansky,FKS}, we obtain the representation ${\bf 20}$ by subtracting the fundamental representation ${\bf 4}$. The second higher spin generator in (\ref{s-threehalf}) consists of the upper antisymmetric combination and the lower antifundamental one. Therefore, in total, it provides the tensor product $\overline{\bf 6} \otimes \overline{\bf 4}$. Now we consider the contracted one which is given by $ {\cal W}^{a b}_{\,\,\, a\, \alpha}$ which transforms as a fundamental representation ${\bf 4}$ of $SU(4)$. Then after subtracting this representation from $\overline{\bf 6} \otimes \overline{\bf 4}$, we will eventually obtain the representation ${\bf 20}_{-1}$. Furthermore, it has ${\cal V}$-charge $-1$ also because there exists a single ${\cal Q}^a_{\,\,\,\alpha}$ and the operator ${\cal R}^a_{\,\,\, b}$ has a vanishing ${\cal V}$-charge. Note that the expression without the antisymmetric bracket in the second higher spin generator in (\ref{s-threehalf}) is itself a primary operator and it is obvious to see that the higher spin generator ${\cal W}^{a b}_{\,\,\, a\, \alpha}$ also transforms as a primary operator after taking antisymmetric combination. Therefore, we should consider the particular antisymmetric combination in the OPE of (\ref{s-threehalfope}). Without it, we would not obtain the corresponding right higher spin generator which transforms properly. In other words, the antisymmetric combination in the indices $a$ and $b$ is crucial for the presence of the representation ${\bf 20}_{-1}$ in the oscillator construction in \cite{SS} \footnote{\label{conjugat-1} Similarly, we obtain $ \dot{{\cal Q}}_{\,\,\,\left[a \right.}^{\dot{\alpha}}(z) \, {\cal{W}}^{ b }_{\,\,\, \left. c \right]}(w) \Bigg|_{\frac{1}{(z-w)}} = -\dot{{\cal W}}^{b\, \dot{\alpha}}_ {\,\,\, \left[ a c \right]}(w) - \delta^{ b }_{\left[ a \right.} \, \dot{{\cal W}}^{ \dot{\alpha}}_{\,\,\, \left. c \right]}(w) +\frac{1}{4} \, \delta^{b }_{\left[ c \right.} \, \dot{{\cal W}}^{\dot{\alpha}}_{\,\,\, \left. a \right]}(w), $ where the right hand side has the following higher spin generators $ \dot{{\cal W}}^{\dot{\alpha}}_{\,\,\, a} \equiv {\cal V}\, {\cal V}\, \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\,a} + {\cal V}\, \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\,a}\, {\cal V}\, + \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\,a}\, {\cal V}\, {\cal V}$ corresponding to the representation $\overline{\bf 4}_1$, and $ \dot{{\cal W}}^{ b \, \dot{\alpha}}_{\,\,\, \left[ a c \right]} \equiv {\cal V} \, \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\,\left[ a \right.} \, {\cal R}^{ b }_{\,\,\, \left. c \right]} + \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\,\left[ a \right.} \, {\cal V}\, {\cal R}^{b}_{\,\,\, \left. c \right]} + \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\,\left[ a \right.} \, {\cal R}^{ b }_{\,\,\, \left. c \right]}\, {\cal V} + {\cal V} \, {\cal R}^{b }_{\,\,\, \left[ c \right.} \, \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\,\left. a \right]} + {\cal R}^{b}_{\,\,\, \left[ c \right.} \, {\cal V}\, \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\,\left. a \right]} + {\cal R}^{b }_{\,\,\, \left[ c \right.} \, \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\,\left. a \right]}\, {\cal V} $ corresponding to the representation $\overline{\bf 20}_1$ from the analysis of the tensor product ${\bf 6} \otimes {\bf 4}= \overline{\bf 20} \oplus \overline{\bf 4}$.}. \subsection{ The $s=2$ case: ${\bf 1}_0, {\bf 15}_0, {\bf 20'_{\rm{0}}}, {\bf 6}_{-2}, {\bf 6}_2, {\bf 10}_{-2}$ and $\overline{{\bf 10}}_2$} Let us consider the next column of the tables $4$ and $5$ with $l=1$ of \cite{SS}. Again, we can use either (\ref{pole1}) or Appendix (\ref{psualgebra}). We can calculate the OPEs between the supersymmetry generators and the higher spin generators found in previous subsection. It turns out, from (\ref{s-threehalf}), that we have \begin{eqnarray} \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\,a}(z) \, {\cal{W}}^{ b }_{\,\,\, \beta}(w) \Bigg|_{\frac{1}{(z-w)}} = \delta^{b}_{a} \,{\cal W}^{\dot{\alpha}}_{\,\,\, \beta}(w)+ \widehat{{\cal W}}^{b \, \dot{\alpha}}_{\,\,\, a \, \beta}, \label{s-2ope} \end{eqnarray} where the right hand side of (\ref{s-2ope}) contains the following higher spin generators \begin{eqnarray} {\cal W}^{\dot{\alpha} }_{\,\,\, \beta} & \equiv & {\cal V} \, {\cal V} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\beta} +{\cal V} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\beta}\, {\cal V} + {\cal P}^{\dot{\alpha}}_{\,\,\,\beta} \, {\cal V} \, {\cal V}, \nonumber \\ \widehat{{\cal W}}^{b \, \dot{\alpha}}_{\,\,\, a \, \alpha} & \equiv & {\cal Q}^{ b }_{\,\,\, \alpha} \, \dot{{\cal Q}}^{\dot{\alpha}}_ {\,\,\,a } \, {\cal V} +{\cal Q}^{ b }_{\,\,\, \alpha} \, {\cal V} \, \dot{{\cal Q}}^{\dot{\alpha}}_ {\,\,\, a}+ {\cal V} \, {\cal Q}^{ b }_{\,\,\, \alpha} \, \dot{{\cal Q}}^{\dot{\alpha}}_ {\,\,\, a} \nonumber \\ &-& \dot{{\cal Q}}^{\dot{\alpha}}_ {\,\,\,a }\, {\cal Q}^{ b }_{\,\,\, \alpha} \, {\cal V}- \dot{{\cal Q}}^{\dot{\alpha}}_ {\,\,\, a} \, {\cal V} \,{\cal Q}^{ b }_{\,\,\, \alpha} - {\cal V} \, \dot{{\cal Q}}^{\dot{\alpha}}_ {\,\,\, a }\, {\cal Q}^{ b }_{\,\,\, \alpha}. \label{s-2} \end{eqnarray} Compared with the previous OPE, there is no (anti)symmetric combination in the $SU(4)$ indices. The first higher spin generator of (\ref{s-2}) is a quasiprimary operator by using Appendix (\ref{tjjj}). Because there is no $SU(4)$ index, the ${\cal V}$-charge vanishes and moreover the quadratic expression in ${\cal V}$ arises from the oscillator construction, we can identify this as ${\bf 1}_0$ in \cite{SS} \footnote{Note that the OPEs between ${\cal P}^{\dot{\alpha}}_{\,\,\,\beta}$ and the weight-$1$ operators are regular except ${\cal L}^{\alpha}_{\,\,\, \beta}$, $\dot{\cal L}^{\dot{\alpha}}_{\,\,\,\dot{\beta}}$, ${\cal D}$, ${\cal S}^{\alpha}_{a}$, $\dot{{\cal S}}^{a}_{\,\,\,\dot{\alpha}}$, ${\cal K}^ {\alpha}_{\dot{\beta}}$, ${\cal U}$ and ${\dot{\cal U}}$ from Appendix (\ref{psualgebra}). In other words, the OPEs between ${\cal P}^{\dot{\alpha}}_{\,\,\,\beta}$ and the five weight-$1$ operators appearing in the footnote \ref{fiveweightone} do not have the singular terms. \label{opeproperty}}. Let us look at the second higher spin generator in (\ref{s-2}) which is a primary operator under the stress energy tensor (\ref{stressenergy}). We can view this as the tensor product of the representation ${\bf 4}$ corresponding to the upper index and the representation $\overline{{\bf 4}}$ corresponding to the lower index and moreover its ${\cal V}$-charge vanishes because there appear two kinds of supersymmetry generators. We do not find this higher spin generator from the tables $4$ and $5$ of \cite{SS}. As mentioned before, we put a hat on this generator because this is a `new' primary operator \footnote{We have similar relation ${\cal Q}^{a}_{\,\,\,\alpha}(z) \, \dot{{\cal W}}^{ \dot{\beta} }_{\,\,\, b}(w) \Bigg|_{\frac{1}{(z-w)}} = \delta^{a}_{b} \, {\cal W}^{\dot{\beta}}_{\,\,\, \alpha}(w)+ \widehat{{\cal W}}^{a \, \dot{\beta}}_{\,\,\, b \, \alpha}(w)$ where the generators of right hand side are given by (\ref{s-2}). The $SU(4)$ indices appear separately.}. Let us move on the following first order pole in the OPE between the supersymmetry generator and the second higher spin generator in (\ref{s-threehalf}) after antisymmetrizing for the lower two indices \begin{eqnarray} \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, \left[ a \right.}(z) \, {\cal{W}}^{ \left[ b c \right]}_{\,\,\, \left. d \right] \, \beta}(w) \Bigg|_{\frac{1}{(z-w)}} = \delta^{\left[ b\right.}_{\left[ a \right.}\, {\cal W}^{\left. c\right] \, \dot{\alpha} }_{\,\,\, \left. d \right] \, \beta}(w) + {\cal W}^{\left[b c \right]\, \dot{\alpha} }_{\,\,\, \left[ a d \right] \, \beta }(w)+ \delta^{\left[c \right.}_{\left[a \right.} \, \widehat{{\cal W}}^{ \left. b \right] \, \dot{\alpha}}_{\,\,\, \left. d\right] \, \beta}(w) -\frac{1}{4} \, \delta^{\left[ c \right.}_{\left[ d \right.}\, \widehat{{\cal W}}^{ \left. b \right] \, \dot{\alpha}}_{\,\,\, \left. a \right] \, \beta}(w), \label{s-2opeother} \end{eqnarray} where the right hand side of (\ref{s-2opeother}) contains the following higher spin generators together with the previous operator in (\ref{s-2}) \begin{eqnarray} {\cal W}^{a \, \dot{\alpha} }_{\,\,\, b \, \beta} & \equiv & {\cal V} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\beta} \, {\cal R}^a_{\,\,\, b}+ {\cal P}^{\dot{\alpha}}_{\,\,\,\beta} \, {\cal V} \,{\cal R}^a_{\,\,\, b}+ {\cal P}^{\dot{\alpha}}_{\,\,\,\beta} \, {\cal R}^a_{\,\,\, b}\, {\cal V} \nonumber \\ &+& {\cal V} \, {\cal R}^a_{\,\,\, b}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\beta} \,+ {\cal R}^a_{\,\,\, b}\, {\cal V} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\beta}+ {\cal R}^a_{\,\,\, b}\,{\cal P}^{\dot{\alpha}}_{\,\,\,\beta} \, {\cal V}, \nonumber \\ {\cal W}^{ \left[ a b \right] \, \dot{\alpha}}_{\,\,\, \left[ c d \right] \, \alpha} & \equiv & {\cal Q}^{\left[ a \right.}_{\,\,\, \alpha} \, \dot{{\cal Q}}^{\dot{\alpha}}_ {\,\,\,\left[c \right.} \, {\cal R}^{\left. b \right]}_{\,\,\, \left. d\right]} +{\cal Q}^{\left[ a \right.}_{\,\,\, \alpha} \, {\cal R}^{\left. b \right]}_{\,\,\, \left[ d\right.} \, \dot{{\cal Q}}^{\dot{\alpha}}_ {\,\,\,\left. c \right]}+ {\cal R}^{\left[ b \right.}_{\,\,\, \left[ d\right.}\, {\cal Q}^{\left. a \right]}_{\,\,\, \alpha} \, \dot{{\cal Q}}^{\dot{\alpha}}_ {\,\,\,\left. c \right]} \nonumber \\ &-& \dot{{\cal Q}}^{\dot{\alpha}}_ {\,\,\,\left[c \right.}\, {\cal Q}^{\left[ a \right.}_{\,\,\, \alpha} \, \, {\cal R}^{\left. b \right]}_{\,\,\, \left. d\right]} - \dot{{\cal Q}}^{\dot{\alpha}}_ {\,\,\,\left[ c \right.} \, {\cal R}^{\left[ b \right.}_{\,\,\, \left. d\right]} \,{\cal Q}^{\left. a \right]}_{\,\,\, \alpha} - {\cal R}^{\left[ b \right.}_{\,\,\, \left[ d\right.}\, \dot{{\cal Q}}^{\dot{\alpha}}_ {\,\,\,\left. c \right]}\, {\cal Q}^{\left. a \right]}_{\,\,\, \alpha}. \label{s-2other} \end{eqnarray} We can easily identify the first operator of (\ref{s-2other}) which is a primary as the representation ${\bf 15}_0$. We have already observed that the weight-$1$ operator ${\cal R}^a_{\,\,\,b}$ transforms as this representation under the $SU(4)$. Moreover, there is a single ${\cal V}$ in this expression (again from the result of \cite{SS}) and it is obvious that the ${\cal V}$-charge is equal to zero. There are two antisymmetric combinations between the upper indices and lower indices from the second operator of (\ref{s-2other}). It is known that in $SU(4)$, we have ${\bf 6}=\overline{\bf 6}$. In the tensor product of ${\bf 6} \otimes {\bf 6} = {\bf 1} \oplus {\bf 15} \oplus {\bf 20'}$ \cite{Slansky,FKS}, after subtracting the first two representations, we obtain the representation ${\bf 20'}$. That is, we observe that when we contract one index from ${\cal W}^{\left[ a b \right] \, \dot{\alpha}}_{\,\,\, \left[ c d \right]\, \alpha}$, then the representation ${\bf 15}$ corresponds to ${\cal W}^{\left[a b\right] \, \dot{\alpha}}_{\,\,\, \left[a d\right]\, \alpha}$. Further contraction will give us ${\cal W}^{\left[a b\right] \, \dot{\alpha}}_{\,\,\, \left[a b\right] \, \alpha}$ which has a representation ${\bf 1}$. Therefore, we obtain the representation ${\bf 20'}$ by restricting to these two conditions. It is easy to see that the ${\cal V}$-charge vanishes. We can check this operator is a primary under the stress energy tensor (\ref{stressenergy}) \footnote{The conjugated version of (\ref{s-2opeother}) appears as follows: ${\cal Q}^{\left[ a \right.}_{\,\,\, \alpha}(z) \, \dot{{\cal{W}}}^{ \left. c\right] \, \dot{\beta} }_{\,\,\, \left[ b d \right] }(w) \Bigg|_{\frac{1}{(z-w)}} = \delta^{\left[ a \right.}_{\left[ b \right. }\, {\cal W}^{\left. c\right] \, \dot{\beta} }_{\,\,\, \left. d \right] \, \alpha}(w) + {\cal W}^{ \left[ a c \right]\, \dot{\beta} }_{\,\,\, \left[ b d\right] \, \alpha }(w)- \delta^{\left[a \right.}_{\left[d \right.} \, \widehat{{\cal W}}^{ \left. c \right] \, \dot{\beta}}_{\,\,\, \left. b \right] \, \alpha}(w) -\frac{1}{4} \, \delta^{\left[ c \right.}_{\left[ d \right.}\, \widehat{{\cal W}}^{ \left. a \right] \, \dot{\beta}}_{\,\,\, \left. b \right] \, \alpha}(w)$ together with the footnote \ref{conjugat-1}, and the relations (\ref{s-2}) and (\ref{s-2other}).}. We continue to analyze the next higher spin generators which have nonzero ${\cal V}$-charges. We can calculate the following OPE and obtain the first order pole, from (\ref{s-threehalf}), as follows: \begin{eqnarray} {\cal Q}^{a}_{\,\,\, \alpha}(z) \, {\cal{W}}^{ \left[ b c \right]}_{\,\,\, a \, \beta}(w) \Bigg|_{\frac{1}{(z-w)}} = {\cal W}^{\left[b c\right] a }_{\,\,\, a \, \beta \alpha}(w) -\frac{15}{4}\, \widehat{\cal W}^{[b c] }_{\,\,\, \beta \alpha}(w), \label{s-2otherope} \end{eqnarray} where the right hand side of (\ref{s-2otherope}) consists of the following higher spin generators \begin{eqnarray} {\cal W}^{\left[ a b \right] c }_{\,\,\, c \, \alpha \beta} & \equiv & -{\cal Q}^{\left[ a \right.}_{\,\,\, \alpha}\, {\cal R}^{\left. b \right]}_{\,\,\, c} \, {\cal Q}^c_{\,\,\,\beta}- {\cal R}^{\left[ b \right.}_{\,\,\, c} \, {\cal Q}^{\left. a \right]}_{\,\,\, \alpha}\, {\cal Q}^c_{\,\,\,\beta}- {\cal Q}^{\left[ a \right.}_{\,\,\, \alpha}\, {\cal Q}^c_{\,\,\,\beta} \, {\cal R}^{\left. b \right]}_{\,\,\, c} \nonumber \\ &+&{\cal Q}^c_{\,\,\,\beta}\, {\cal R}^{\left[ b \right.}_{\,\,\, c} \, {\cal Q}^{\left. a \right]}_{\,\,\, \alpha}+ {\cal R}^{\left[ b \right.}_{\,\,\, c} \, \, {\cal Q}^c_{\,\,\,\beta} \, {\cal Q}^{\left. a \right]}_{\,\,\, \alpha}+ {\cal Q}^c_{\,\,\,\beta} \, {\cal Q}^{\left[ a \right.}_{\,\,\, \alpha}\, {\cal R}^{\left. b \right]}_{\,\,\, c}, \nonumber \\ \widehat{\cal W}^{\left[a b\right] }_{\,\,\, \alpha \beta} & \equiv & {\cal V} \, {\cal Q}^{\left[a \right. }_{\,\,\, \alpha} \, {\cal Q}^{ \left. b \right] }_{\,\,\, \beta}+ {\cal Q}^{ \left[ a \right. }_{\,\,\, \alpha} \,{\cal V} \, {\cal Q}^{ \left. b \right] }_{\,\,\, \beta} + {\cal Q}^{ \left[ a \right. }_{\,\,\, \alpha} \, {\cal Q}^{ \left. b \right] }_{\,\,\, \beta} \, {\cal V} \nonumber \\ &-& {\cal V} \, \, {\cal Q}^{ \left[ b \right. }_{\,\,\, \beta} \, {\cal Q}^{ \left. a \right] }_{\,\,\, \alpha}- {\cal Q}^{ \left[ b \right. }_{\,\,\, \beta} \,{\cal V} \, {\cal Q}^{ \left. a \right] }_{\,\,\, \alpha} - {\cal Q}^{ \left[ b \right. }_{\,\,\, \beta} \, {\cal Q}^{ \left. a \right] }_{\,\,\, \alpha} \,{\cal V}. \label{s-2other1} \end{eqnarray} Note that the upper and lower index $a$ is summed in the left hand side of the OPE of (\ref{s-2otherope}). We can identify the first operator of (\ref{s-2other1}) as ${\bf 6}_{-2}$ because the two upper $SU(4)$ indices are antisymmetric together with the contraction for other two and due to the two supersymmetric generators, the ${\cal V}$-charge becomes $-2$ as before. On the other hands, the second operator of (\ref{s-2other1}), which has also ${\cal V}$-charge $-2$ and consists of the tensor product of ${\bf 4}$ and ${\bf 4}$ (again ${\bf 6}_{-2}$) of $SU(4)$, can be regarded as a `new' primary operator which is not present in \cite{SS}. We can check this is a primary operator from Appendix (\ref{tjjj}). As done before, we can obtain the conjugated version of (\ref{s-2otherope}) with the footnote \ref{conjugat-1} and there exists a relevant generator \footnote{ \label{compother2} That is, we have the following first order pole, from the footnote \ref{conjugat-1}, $\dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, a}(z) \, \dot{{\cal{W}}}^{ a \, \dot{\beta}}_{\,\,\, \left[ b d \right] }(w) \Bigg|_{\frac{1}{(z-w)}} = -\dot{{\cal W}}^{ a \, \dot{\beta} \dot{\alpha}}_{\,\,\, \left[b d\right] a}(w) +\frac{15}{4}\, \dot{\widehat{\cal W}}^{\dot{\beta}\dot{\alpha} }_{\,\,\, \left[ b d\right]}(w)$ where $\dot{{\cal W}}^{c \, \dot{\alpha} \dot{\beta} }_{\,\,\, \left[a b\right] c \, } \equiv -\dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, \left[ a \right.}\, {\cal R}^{ c }_{\,\,\, \left. b \right]} \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,c }- {\cal R}^{c }_{\,\,\, \left[ b \right.} \, \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, \left. a \right]}\, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,c}- \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, \left[ a \right.}\, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,c} \, {\cal R}^{ c }_{\,\,\, \left. b \right]} +\dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,c}\, {\cal R}^{c }_{\,\,\, \left[ b \right.} \,\dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, \left. a \right]}+ {\cal R}^{c }_{\,\,\, \left[ b \right.} \, \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,c} \, \dot{{\cal Q}}^{\dot{\alpha}}_ {\,\,\, \left. a \right]}+ \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,c} \, \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, \left[ a \right.}\, {\cal R}^{c}_{\,\,\, \left. b\right]}$ corresponding to the representation $\overline{\bf 6}_2$ and the new higher spin generator $\dot{\widehat{\cal W}}^{\dot{\alpha}\dot{\beta} }_{\,\,\, \left[a b\right]} \equiv {\cal V} \, \dot{{\cal Q}}^{\dot{\alpha} }_{\,\,\, \left[ a \right.} \, \dot{{\cal Q}}^{ \dot{\beta} }_{\,\,\, \left. b \right]}+ \dot{{\cal Q}}^{ \dot{\alpha} }_{\,\,\, \left[ a \right.} \,{\cal V} \, \dot{{\cal Q}}^{ \dot{\beta} }_{\,\,\, \left. b \right]} + \dot{{\cal Q}}^{ \dot{\alpha} }_{\,\,\, \left[ a \right.} \, \dot{{\cal Q}}^{ \dot{\beta} }_{\,\,\, \left. b \right]} \, {\cal V} - {\cal V} \, \, \dot{{\cal Q}}^{ \dot{\beta} }_{\,\,\, \left[ b \right.} \, \dot{{\cal Q}}^{ \dot{\alpha} }_{\,\,\, \left. a \right]}- \dot{{\cal Q}}^{ \dot{\beta} }_{\,\,\, \left[ b \right.} \,{\cal V} \, \dot{{\cal Q}}^{ \dot{\alpha} }_{\,\,\, \left. a \right]} - \dot{{\cal Q}}^{ \dot{\beta} }_{\,\,\, \left[ b \right.} \, \dot{{\cal Q}}^{ \dot{\alpha} }_{\,\,\,\left. a \right]} \,{\cal V}$ which transforms as $\overline{\bf 6}_2$.}. Finally, by considering the following OPE from (\ref{s-threehalf}) we determine the higher spin generator having nonzero ${\cal V}$-charge, after symmetrizing the upper indices, \begin{eqnarray} {\cal Q}^{\left(a \right.}_{\,\,\,\alpha}(z) \, {\cal{W}}^{ \left. b \right)}_{\,\,\, \beta}(w) \Bigg|_{\frac{1}{(z-w)}} = {\cal W}^{\left( a b \right)}_{\,\,\, \alpha \beta}(w), \label{s-2other2ope} \end{eqnarray} where the right hand side of (\ref{s-2other2ope}) can be written as \begin{eqnarray} {\cal W}^{\left(a b \right) }_{\,\,\, \alpha \beta} & \equiv & {\cal V} \, {\cal Q}^{\left( a \right.}_{\,\,\, \alpha} \, {\cal Q}^{\left. b \right)}_{\,\,\, \beta}+ {\cal Q}^{\left( a \right.}_{\,\,\, \alpha} \,{\cal V} \, {\cal Q}^{\left. b \right)}_{\,\,\, \beta} + {\cal Q}^{\left( a \right.}_{\,\,\, \alpha} \, {\cal Q}^{\left. b \right)}_{\,\,\, \beta} \, {\cal V} \nonumber \\ &-& {\cal V} \, \, {\cal Q}^{\left( b \right.}_{\,\,\, \beta} \, {\cal Q}^{\left. a \right)}_{\,\,\, \alpha}- {\cal Q}^{\left( b \right.}_{\,\,\, \beta} \,{\cal V} \, {\cal Q}^{\left. a \right)}_{\,\,\, \alpha} - {\cal Q}^{\left( b \right.}_{\,\,\, \beta} \, {\cal Q}^{\left. a \right)}_{\,\,\, \alpha} \,{\cal V}. \label{s-2other2} \end{eqnarray} It is obvious to see that this (\ref{s-2other2}), which is a primary, has the representation ${\bf 10}_{-2}$ from the symmetric combination of the upper two indices. Simple counting of ${\cal V}$-charge implies that this higher spin generator has $-2$. Furthermore, it has linear dependence of ${\cal V}$ as in \cite{SS} \footnote{ \label{compother1} We obtain $\dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\,\left( a \right.}(z) \, \dot{{\cal W}}^{ \dot{\beta}}_{\,\,\, \left. b \right)}(w) \Bigg|_{\frac{1}{(z-w)}} = -\dot{{\cal W}}^{\dot{\alpha}\dot{\beta}}_{\,\,\, \left( a b \right)}(w)$ together with $\dot{{\cal W}}^{\dot{\alpha} \dot{\beta}}_{\,\,\, \left( a b \right)} \equiv {\cal V} \, \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, \left( a \right.} \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\, \left. b \right)}+ \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, \left( a\right.} \,{\cal V} \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\, \left. b \right)} + \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, \left( a \right.} \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\, \left. b \right)} \, {\cal V} - {\cal V} \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\, \left( b \right.} \, \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, \left. a \right)}- \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\, \left( b \right.} \,{\cal V} \, \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, \left. a \right)} - \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\, \left( b \right.} \, \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, \left. a \right)} \,{\cal V}$ corresponding to $\overline{\bf 10}_{2}$.}. \subsection{ The $s=\frac{5}{2}$ case: ${\bf 4}_{-1}, \overline{{\bf 4 }}_1, \overline{\bf 4}_{-3}, {\bf 4}_3, {\bf 20}_{-1}$ and $\overline{\bf 20}_{1}$} From now on, all the higher spin generators can be related to the corresponding multiplets in the table $3$ of \cite{SS}. In previous three cases, there are some mismatches between the table $3$ and the tables $4$ and $5$ of \cite{SS}. As done in previous subsection, we compute the following OPE from (\ref{s-2other}) and focus on the first order pole, after antisymmetrizing the upper indices, \begin{eqnarray} {\cal Q}^{\left[a \right.}_{\,\,\, \beta}(z) \, {\cal{W}}^{ \left. b \right] \dot{\alpha}}_{\,\,\, c \, \gamma}(w) \Bigg|_{\frac{1}{(z-w)}} = {\cal W}^{ \left[ a b \right] \, \dot{\alpha} }_{\,\,\, c\, \beta \gamma}(w)+ \delta^{\left[ a \right.}_{c}\, {\cal W}^{\left. b \right] \, \dot{\alpha} }_{\,\,\, \beta \gamma} -\frac{1}{4}\, \delta^{\left[ b \right.}_{c} {\cal W}^{\left. a \right] \, \dot{\alpha} }_{\,\,\, \beta \gamma}\, (w), \label{s-fivehalfope} \end{eqnarray} where the right hand side of (\ref{s-fivehalfope}) provides the following higher spin generators \begin{eqnarray} {\cal W}^{a \, \dot{\alpha} }_{\,\,\, \beta \gamma} & \equiv & {\cal V} \, {\cal Q}^a_{\,\,\,\beta} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}+ {\cal Q}^a_{\,\,\,\beta} \, {\cal V} \,{\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}+ {\cal Q}^a_{\,\,\,\beta} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}\, {\cal V} \nonumber \\ &+&{\cal V} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} \, {\cal Q}^a_{\,\,\,\beta} + {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}\, {\cal V} \, {\cal Q}^a_{\,\,\,\beta} + {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}\, {\cal Q}^a_{\,\,\,\beta} \,{\cal V}, \nonumber \\ {\cal W}^{\left[ a b \right] \, \dot{\alpha} }_{\,\,\, c\, \beta \gamma} & \equiv & {\cal Q}^{\left[ a \right.}_{\,\,\,\beta} \, {\cal R}^{\left. b \right]}_{\,\,\, c} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} +{\cal R}^{\left[ b \right.}_{\,\,\, c} \, {\cal Q}^{\left. a \right]}_{\,\,\,\beta} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}+ {\cal Q}^{\left[ a \right.}_{\,\,\,\beta} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}\, {\cal R}^{\left. b \right]}_{\,\,\, c} \, \nonumber \\ &+& {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}\, {\cal R}^{\left[ b \right.}_{\,\,\, c} \, {\cal Q}^{\left. a \right]}_{\,\,\,\beta} +{\cal R}^{\left[ b \right.}_{\,\,\, c} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} {\cal Q}^{\left. a \right]}_{\,\,\,\beta} + {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}\, {\cal Q}^{\left[ a \right.}_{\,\,\,\beta} \, {\cal R}^{\left. b \right]}_{\,\,\, c}. \label{s-fivehalf} \end{eqnarray} We can see that the first generator of (\ref{s-fivehalf}) has the representation ${\bf 4}_{-1}$ with ${\cal V}$-charge $-1$. For the second generator of (\ref{s-fivehalf}), there are two upper antisymmetric indices with a single lower index. We have seen the similar structure around (\ref{s-threehalf}). As long as the $SU(4)$ representation with ${\cal V}$-charge is concerned, there is no difference whether there is a factor ${\cal V}$ in (\ref{s-threehalf}) or ${\cal P}^{\dot{\alpha}}_{\,\,\,\beta}$ in (\ref{s-fivehalf}). This implies that the above generator transforms as the representation ${\bf 20}_{-1}$ by subtracting the trace part (with a contraction in the indices) with ${\cal V}$-charge $-1$. They are primary under the stress energy tensor \footnote{ \label{othercomplex} We can determine the similar OPE, by antisymmetrizing the lower indices, $\dot{{\cal Q}}^{\dot{\beta}}_{\,\,\, \left[ a \right.}(z) \, {\cal{W}}^{ b \dot{\alpha}}_{\,\,\, \left. c \right] \, \gamma}(w) \Bigg|_{\frac{1}{(z-w)}} = -\dot{{\cal W}}^{ b \, \dot{\beta} \dot{\alpha} }_{ \,\,\, \left[ a c \right] \, \gamma}(w)- \delta^{b}_{\left[a \right.}\, \dot{{\cal W}}^{ \, \dot{\beta} \dot{\alpha} }_{ \,\,\, \left. c \right] \, \gamma} +\frac{1}{4}\, \delta^{ b }_{\left[ c \right.} \dot{{\cal W}}^{\dot{\beta} \dot{\alpha} }_{\,\,\, \left. a \right] \, \gamma }\, (w)$ with two higher spin generators $\dot{{\cal W}}^{\dot{\beta} \dot{\alpha} }_{\,\,\, a\, \gamma} \equiv {\cal V} \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,a} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}+ \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,a} \, {\cal V} \,{\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}+ \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,a} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}\, {\cal V} +{\cal V} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,a} + {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}\, {\cal V} \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,a} + {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}\, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,a} \,{\cal V}$ transforming as $\overline{\bf 4}_1$ and $\dot{{\cal W}}^{ b \, \dot{\beta} \dot{\alpha} }_{\,\,\, \left[ a c \right] \, \gamma} \equiv \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,\left[ a \right.} \, {\cal R}^{ b }_{\,\,\, \left. c \right]} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} +{\cal R}^{ b }_{\,\,\, \left[ c \right.} \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,\left. a \right]} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}+ \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,\left[ a \right.} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}\, {\cal R}^{b }_{\,\,\, \left. c \right]} \, + {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}\, {\cal R}^{b }_{\,\,\, \left[c \right.} \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,\left. a \right]} +{\cal R}^{ b }_{\,\,\, \left[c \right.} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,\left. a \right]} + {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}\, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,\left[ a \right.} \, {\cal R}^{ b }_{\,\,\, \left. c \right]}$ which transforms as $\overline{\bf 20}_1$.}. The next case can be obtained from the following OPE result by using the higher spin generator (\ref{s-2other1}) properly (complete antisymmetrization of the upper indices) \begin{eqnarray} {\cal Q}^{\left[a \right.}_{\,\,\, \alpha}(z) \, {\cal{W}}^{ \left. b c d \right] }_{\,\,\, d\, \beta \gamma}(w) \Bigg|_{\frac{1}{(z-w)}} = -\delta^{\left[ a \right.}_{d}\, {\cal W}^{ \left. b c d \right] }_{\,\,\, \beta \gamma \alpha}(w) +\frac{1}{4}\, \delta^{\left[ d \right.}_{d}\, {\cal W}^{ \left. b c a \right] }_{\,\,\, \beta \gamma \alpha}(w), \label{s-fivehalfotherope} \end{eqnarray} where the right hand side of (\ref{s-fivehalfotherope}) contains the following higher spin generator \begin{eqnarray} {\cal W}^{\left[a b c\right] }_{\,\,\, \alpha \beta \gamma} & \equiv & {\cal Q}^{\left[ a \right. }_{\,\,\, \alpha}\, {\cal Q}^b_{\,\,\,\beta} \, {\cal Q}^{\left. c \right]}_{\,\,\,\gamma}+ {\cal Q}^{\left[ c \right.}_{\,\,\,\gamma} \, {\cal Q}^{ a }_{\,\,\, \alpha}\, {\cal Q}^{\left. b \right]}_{\,\,\,\beta}+ {\cal Q}^{\left[ b \right.}_{\,\,\,\beta} \, {\cal Q}^{ c }_{\,\,\,\gamma} {\cal Q}^{\left. a \right] }_{\,\,\, \alpha}\, \nonumber \\ &-&{\cal Q}^{\left[ a \right. }_{\,\,\, \alpha}\, \, {\cal Q}^{ c }_{\,\,\,\gamma} \, {\cal Q}^{\left. b \right]}_{\,\,\,\beta}- {\cal Q}^{\left[ b \right. }_{\,\,\,\beta} \, {\cal Q}^{ a }_{\,\,\, \alpha}\, {\cal Q}^{\left. c \right]}_{\,\,\,\gamma} - {\cal Q}^{ \left[ c \right. }_{\,\,\,\gamma}\, {\cal Q}^{ b }_{\,\,\,\beta} \, {\cal Q}^{\left. a \right] }_{\,\,\, \alpha}. \label{s-fivehalfother} \end{eqnarray} First of all, the ${\cal V}$-charge of (\ref{s-fivehalfother}) is given by $-3$. From the tensor product of ${\bf 4} \otimes {\bf 4} \otimes {\bf 4}$ \cite{Slansky,FKS} due to the three upper indices, we obtain the following decomposition $\overline{{\bf 4}} \oplus \overline{\bf 20} \oplus \overline{\bf 20} \oplus \overline{\bf 20''}$. Then by taking the totally antisymmetric combination of the indices, the representation $\overline{\bf 4}_{-3}$ with ${\cal V}$-charge can be obtained and we can check this (\ref{s-fivehalfother}) is a primary operator \footnote{ \label{compother} In this case, we have $\dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, \left[a \right.}(z) \, \dot{{\cal W}}^{ d\, \dot{\beta}\dot{\gamma} }_{\,\,\, \left. b c d \right]}(w) \Bigg|_{\frac{1}{(z-w)}} = \delta^{d}_{\left[a \right.}\, \dot{{\cal W}}^{ \dot{\beta}\dot{\gamma}\dot{\alpha} }_{\,\,\, \left. b c d \right]}(w) -\frac{1}{4}\, \delta^{ d }_{\left[d \right.}\, \dot{{\cal W}}^{ \dot{\beta}\dot{\gamma}\dot{\alpha} }_{\,\,\, \left. b c a\right]}(w)$ together with the higher spin generator $\dot{{\cal W}}^{\dot{\alpha}\dot{\beta}\dot{\gamma} }_{\,\,\, \left[ a b c \right] } \equiv \dot{{\cal Q}}^{\dot{\alpha} }_{\,\,\, \left[ a \right.}\, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,b} \, \dot{{\cal Q}}^{\dot{\gamma}}_{\,\,\,\left. c \right]}+ \dot{{\cal Q}}^{\dot{\gamma}}_{\,\,\,\left[ c \right.} \, \dot{{\cal Q}}^{ \dot{\alpha} }_{\,\,\, a}\, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,\left. b \right]}+ \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,\left[ b \right.} \, \dot{{\cal Q}}^{ \dot{\gamma} }_{\,\,\,c} \dot{{\cal Q}}^{\dot{\alpha} }_{\,\,\, \left. a\right]} -\dot{{\cal Q}}^{\dot{\alpha} }_{\,\,\, \left[ a \right.}\, \, \dot{{\cal Q}}^{ \dot{\gamma} }_{\,\,\,c} \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\, \left. b \right]}- \dot{{\cal Q}}^{\dot{\beta} }_{\,\,\,\left[ b \right.} \, \dot{{\cal Q}}^{ \dot{\alpha} }_{\,\,\, a}\, \dot{{\cal Q}}^{\dot{\gamma}}_{\,\,\,\left. c \right]} - \dot{{\cal Q}}^{\dot{\gamma} }_{\,\,\,\left[ c \right.}\, \dot{{\cal Q}}^{ \dot{\beta} }_{\,\,\,b} \, \dot{{\cal Q}}^{\dot{\alpha} }_{\,\,\, \left. a \right]}$ transforming as ${\bf 4}_3$.}. \subsection{ The $s=3$ case: ${\bf 1}_0, {\bf 15}_0, {\bf 6}_{-2}$ and ${\bf 6}_2$} Now we analyze the following OPE, from the previous result in (\ref{s-fivehalf}), \begin{eqnarray} \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, a}(z) \, {\cal{W}}^{ b \, \dot{\beta} }_{\,\,\, \gamma \delta}(w) \Bigg|_{\frac{1}{(z-w)}} = \delta^{ b }_{a}\, {\cal W}^{ \dot{\alpha} \dot{\beta} }_{\,\,\,\gamma \delta}(w) + \widehat{\cal W}^{b \, \dot{\beta} \dot{\alpha} }_ {\,\,\, a\, \gamma \delta }(w), \label{s-3ope1} \end{eqnarray} where the right hand side of (\ref{s-3ope1}) has the following higher spin generators \begin{eqnarray} {\cal W}^{ \dot{\alpha} \dot{\beta} }_{\,\,\, \gamma \delta} & \equiv & {\cal V} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} \, {\cal P}^{\dot{\beta}}_{\,\,\,\delta} + {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} \, {\cal V} \,{\cal P}^{\dot{\beta}}_{\,\,\,\delta} +{\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} \, {\cal P}^{\dot{\beta}}_{\,\,\,\delta}\, {\cal V} \nonumber \\ &+&{\cal V} \, {\cal P}^{\dot{\beta}}_{\,\,\,\delta}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} +{\cal P}^{\dot{\beta}}_{\,\,\,\delta}\, {\cal V} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} +{\cal P}^{\dot{\beta}}_{\,\,\,\delta}\,{\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} \, {\cal V}, \nonumber \\ \widehat{\cal W}^{a \, \dot{\alpha}\dot{\beta} }_{\,\,\, b\, \gamma \delta } & \equiv & {\cal Q}^{ a }_{\,\,\,\gamma} \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,b} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} +{\cal Q}^{ a }_{\,\,\,\gamma} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, \dot{\cal Q}^{\dot{\beta}}_{\,\,\,b} + {\cal P}^{\dot{\alpha}}_{\,\,\,\delta}\, {\cal Q}^{a }_{\,\,\,\gamma} \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,b} \nonumber \\ &-& \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,b}\, {\cal Q}^{ a }_{\,\,\,\gamma} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} - \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,b} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, {\cal Q}^{a }_{\,\,\,\gamma} - {\cal Q}^{a}_{\,\,\,\gamma} {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,b}. \label{s-3} \end{eqnarray} For the first generator of (\ref{s-3}), there is no $SU(4)$ index and the ${\cal V}$-charge is equal to zero. Then we can identify this with the representation ${\bf 1}_0$. For the second generator, the ${\cal V}$-charge vanishes also and it is given by the tensor product between the representation ${\bf 4}$ and $\overline{\bf 4}$. In the construction of \cite{SS}, we cannot find this higher spin generator. We can check that they (\ref{s-3}) are primary operators \footnote{ By using the higher spin generator appearing in the footnote \ref{othercomplex}, we obtain $ {\cal Q}^{a}_{\,\,\, \alpha}(z) \, \dot{{\cal W}}^{ \dot{\beta} \dot{\gamma} }_{\,\,\, b \, \delta}(w) \Bigg|_{\frac{1}{(z-w)}} = \delta^{ a }_{b}\, {\cal W}^{ \dot{\gamma} \dot{\beta} }_{\,\,\,\alpha \delta}(w) + \widehat{\cal W}^{a \, \dot{\gamma} \dot{\beta} }_{\,\,\, b\, \alpha \delta }$ where the relations in (\ref{s-3}) are used.}. Now we describe the following OPE together with (\ref{s-fivehalf}) \begin{eqnarray} \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, a}(z) \, {\cal{W}}^{ \left[ b c \right] \, \dot{\beta} }_{\,\,\, d \, \gamma \delta}(w) \Bigg|_{\frac{1}{(z-w)}} = \delta^{\left[ b \right.}_{a}\, {\cal W}^{ \left. c \right] \, \dot{\alpha} \dot{\beta} }_{\,\,\, d \gamma \delta}(w) + \delta^{\left[ c \right.}_{a}\, \widehat{\cal W}^{ \left. b \right] \, \dot{\beta} \dot{\alpha} }_{\,\,\, d \gamma \delta}(w) -\frac{1}{4}\, \delta^{\left[ c \right.}_{d}\, \widehat{\cal W}^{ \left. b \right] \, \dot{\beta} \dot{\alpha} }_{\,\,\, a \gamma \delta}(w), \label{s-3otherope} \end{eqnarray} where the right hand side of (\ref{s-3otherope}) contains the following higher spin generator \begin{eqnarray} {\cal W}^{a \, \dot{\alpha} \dot{\beta} }_{\,\,\, b \, \gamma \delta} & \equiv & {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} \, {\cal P}^{\dot{\beta}}_{\,\,\,\delta} \, {\cal R}^{a}_{\,\,\,b}+ {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} \, {\cal R}^{a}_{\,\,\,b}\, {\cal P}^{\dot{\beta}}_{\,\,\,\delta} +{\cal R}^{a}_{\,\,\,b}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} \, {\cal P}^{\dot{\beta}}_{\,\,\,\delta} \nonumber \\ &+& {\cal P}^{\dot{\beta}}_{\,\,\,\delta}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} \, {\cal R}^{a}_{\,\,\,b}+ {\cal P}^{\dot{\beta}}_{\,\,\,\delta}\, {\cal R}^{a}_{\,\,\,b}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma} +{\cal R}^{a}_{\,\,\,b}\, {\cal P}^{\dot{\beta}}_{\,\,\,\delta}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\gamma}, \label{s-3other} \end{eqnarray} which transforms as ${\bf 15}_0$ with a vanishing ${\cal V}$-charge and is a primary operator \footnote{ Again by using the higher spin generator in the footnote \ref{othercomplex} we determine ${\cal Q}^{a}_{\,\,\, \alpha}(z) \, \dot{{\cal W}}^{ c\, \dot{\beta} \dot{\gamma} }_{\,\,\, \left[ b d \right] \, \delta}(w) \Bigg|_{\frac{1}{(z-w)}} = \delta^{a}_{\left[ b \right.}\, {\cal W}^{ c \, \dot{\beta} \dot{\gamma} }_{\,\,\, \left. d \right] \alpha \delta}(w) - \delta^{a}_{\left[ d \right.}\, \widehat{\cal W}^{ c \, \dot{\gamma} \dot{\beta} }_{\,\,\, \left. b \right] \, \alpha \delta}(w)+ \frac{1}{4} \, \delta^{c}_{\left[ d \right.}\, \widehat{\cal W}^{ a \, \dot{\gamma} \dot{\beta} }_{\,\,\, \left. b \right] \, \alpha \delta}(w)$ where the relations (\ref{s-3}) and (\ref{s-3other}) are used.}. Finally, in this subsection, we consider the following OPE with complete antisymmetric upper indices \begin{eqnarray} {\cal Q}^{\left[a \right.}_{\,\,\, \alpha}(z) \, {\cal{W}}^{ \left. b c \right] \, \dot{\alpha} }_{\,\,\, d \, \beta \gamma}(w) \Bigg|_{\frac{1}{(z-w)}} = -\delta^{\left[ a \right.}_{d}\, {\cal W}^{ \left. b c \right] \, \dot{\alpha} }_{\,\,\, \beta \alpha \gamma }(w) + \frac{1}{4}\, \delta^{\left[ c \right.}_{d}\, {\cal W}^{ \left. b a \right] \, \dot{\alpha} }_{\,\,\, \beta \alpha \gamma }(w), \label{s-3other1ope} \end{eqnarray} where the right hand side of (\ref{s-3other1ope}) contains the following higher spin generator \begin{eqnarray} {\cal W}^{\left[ a b\right] \, \dot{\alpha} }_{\,\,\, \beta \gamma \delta} & \equiv & {\cal Q}^{\left[ a \right.}_{\,\,\,\beta} \, {\cal Q}^{\left. b \right]}_{\,\,\,\gamma} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} +{\cal Q}^{\left[ a \right.}_{\,\,\,\beta} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, {\cal Q}^{\left. b \right]}_{\,\,\,\gamma} + {\cal P}^{\dot{\alpha}}_{\,\,\,\delta}\, {\cal Q}^{\left[ a \right.}_{\,\,\,\beta} \, {\cal Q}^{\left. b \right]}_{\,\,\,\gamma} \nonumber \\ &-& {\cal Q}^{\left[ b \right.}_{\,\,\,\gamma}\, {\cal Q}^{\left. a \right]}_{\,\,\,\beta} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} - \, {\cal Q}^{\left[ b \right.}_{\,\,\,\gamma} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, {\cal Q}^{\left. a \right]}_{\,\,\,\beta} - {\cal Q}^{\left[ a \right.}_{\,\,\,\beta} {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, {\cal Q}^{\left. b \right]}_{\,\,\,\gamma}, \label{s-3other1} \end{eqnarray} which transforms as ${\bf 6}_{-2}$ (from the antisymmetric combination of upper two indices) with $\cal V$-charge $-2$ and is a primary operator. In this case, we have the conjugated version of this higher spin generator with corresponding OPE as follows \footnote{ \label{othercomplex1} That is, $\dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, \left[ a\right.}(z) \, \dot{{\cal{W}}}^{ c\, \dot{\beta}\dot{\gamma} }_{\,\,\, \left. b d \right] \, \gamma}(w) \Bigg|_{\frac{1}{(z-w)}} = \delta^{c}_{\left[a \right.}\, \dot{{\cal W}}^{ \dot{\beta} \dot{\alpha} \dot{\gamma} }_ {\,\,\, \left. b d \right]\, \gamma}(w) - \frac{1}{4}\, \delta^{c }_{\left[d \right.}\, \dot{{\cal W}}^{ \dot{\beta} \dot{\alpha} \dot{\gamma} }_ {\,\,\, \left. b a \right]\, \gamma }(w)$ with the higher spin generator $\dot{{\cal W}}^{ \dot{\beta} \dot{\gamma} \dot{\alpha} }_{\,\,\, \left[ a b \right] \, \delta} \equiv \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,\left[a \right.} \, \dot{{\cal Q}}^{\dot{\gamma}}_{\,\,\, \left. b \right]} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} +\dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,\left[ a \right.} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, \dot{{\cal Q}}^{\dot{\gamma}}_{\,\,\, \left. b \right]} + {\cal P}^{\dot{\alpha}}_{\,\,\,\delta}\, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,\left[ a \right.} \, \dot{{\cal Q}}^{\dot{\gamma}}_{\,\,\, \left. b \right]} - \dot{{\cal Q}}^{\dot{\gamma}}_{\,\,\,\left[ b \right.}\, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,\left. a \right]} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} - \, \dot{{\cal Q}}^{\dot{\gamma}}_{\,\,\,\left[ b \right.} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\, \left. a \right]} - \dot{{\cal Q}}^{\dot{\beta}}_{\,\,\,\left[ a \right.} {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, \dot{{\cal Q}}^{\dot{\gamma}}_{\,\,\, \left. b \right]}$ corresponding to the representation $\overline{\bf 6}_2$.}. \subsection{ The $s=\frac{7}{2}$ case: ${\bf 4}_{-1}$ and $\overline{\bf 4}_1$} By using (\ref{s-3other1}), we calculate the following OPE and read off the first order pole \begin{eqnarray} \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, a}(z) \, {\cal{W}}^{ \left[ b c \right] \, \dot{\beta} }_{\,\,\, \gamma \delta \epsilon}(w) \Bigg|_{\frac{1}{(z-w)}} = \delta^{ \left[ b\right. }_{a}\, {\cal W}^{ \left. c \right] \, \dot{\alpha} \dot{\beta} }_{\,\,\,\delta \gamma \epsilon}(w) -\delta^{\left[ c \right.}_{a} \, {\cal W}^{ \left. b \right] \, \dot{\alpha} \dot{\beta} }_{\,\,\,\delta \gamma \epsilon}(w), \label{s-7halfope} \end{eqnarray} where the right hand side of (\ref{s-7halfope}) contains the higher spin generator \begin{eqnarray} {\cal W}^{a \, \dot{\alpha} \dot{\beta} }_{\,\,\, \gamma \delta \epsilon} & \equiv & {\cal Q}^{a}_{\,\,\,\gamma}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon} + {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} {\cal Q}^{a}_{\,\,\,\gamma}\, {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon} + {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon}\, {\cal Q}^{a}_{\,\,\,\gamma} \nonumber \\ &+& {\cal Q}^{a}_{\,\,\,\gamma}\, {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} + {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon}\, {\cal Q}^{a}_{\,\,\,\gamma}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} +{\cal P}^{\dot{\beta}}_{\,\,\,\epsilon}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, {\cal Q}^{a}_{\,\,\,\gamma}, \label{s-7half} \end{eqnarray} which transforms as ${\bf 4}_{-1}$ from the upper index $a$ with ${\cal V}$-charge $-1$ and is a primary operator. Furthermore, there exists a relevant OPE with the conjugated higher spin generator \footnote{ \label{othercomplex2} In other words, from the higher spin generator in the footnote \ref{othercomplex1}, we have ${\cal Q}^{a}_{\,\,\, \alpha}(z) \, \dot{{\cal{W}}}^{ \dot{\beta} \dot{\delta} \dot{\gamma}}_{\,\,\, \left[ b c \right] \, \epsilon}(w) \Bigg|_{\frac{1}{(z-w)}} = \delta^{ a }_{\left[ b \right.}\, \dot{{\cal W}}^{ \dot{\beta} \dot{\delta} \dot{\gamma} }_{\,\,\, \left. c \right] \alpha \epsilon}(w) -\delta^{a }_{\left[ c \right.} \, \dot{{\cal W}}^{ \dot{\beta} \dot{\delta}\dot{\gamma} }_{\,\,\, \left. b \right] \alpha \epsilon}(w)$ and $\dot{{\cal W}}^{ \dot{\alpha} \dot{\beta} \dot{\gamma} }_{\,\,\, a \, \delta \epsilon} \equiv \dot{{\cal Q}}^{\dot{\gamma}}_{\,\,\,a}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon} + {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \dot{{\cal Q}}^{\dot{\gamma}}_{\,\,\,a}\, {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon} + {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon}\, \dot{{\cal Q}}^{\dot{\gamma}}_{\,\,\,a} + \dot{{\cal Q}}^{\dot{\gamma}}_{\,\,\,a}\, {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} + {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon}\, \dot{{\cal Q}}^{\dot{\gamma}}_{\,\,\,a}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} +{\cal P}^{\dot{\beta}}_{\,\,\,\epsilon}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, \dot{{\cal Q}}^{\dot{\gamma}}_{\,\,\,a}$ transforming as $\overline{\bf 4}_1$.}. \subsection{ The $s=4$ case: ${\bf 1}_0$} We obtain the following OPE, by using (\ref{s-7half}), \begin{eqnarray} \dot{{\cal Q}}^{\dot{\alpha}}_{\,\,\, a}(z) \, {\cal{W}}^{ b \, \dot{\gamma} \dot{\delta} }_{\,\,\, \beta \epsilon \rho}(w) \Bigg|_{\frac{1}{(z-w)}} = \delta^{ b }_{a}\, {\cal W}^{ \, \dot{\alpha} \dot{\gamma} \dot{\delta} }_{\,\,\, \beta \epsilon \rho}(w), \label{s-4ope} \end{eqnarray} where the right hand side of (\ref{s-4ope}) has the higher spin generator \begin{eqnarray} {\cal W}^{\dot{\alpha} \dot{\beta} \dot{\gamma} }_{\,\,\, \delta \epsilon \rho} & \equiv & {\cal P}^{\dot{\alpha}}_{\,\,\,\delta}\, {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon} \, {\cal P}^{\dot{\gamma}}_{\,\,\,\rho}+ +\, {\cal P}^{\dot{\gamma}}_{\,\,\,\rho}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta}\, {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon} + {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon} \, {\cal P}^{\dot{\gamma}}_{\,\,\,\rho}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \nonumber \\ &+& {\cal P}^{\dot{\alpha}}_{\,\,\,\delta} \, {\cal P}^{\dot{\gamma}}_{\,\,\,\rho} \, {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon}+ + {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon}\, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta}\, {\cal P}^{\dot{\gamma}}_{\,\,\,\rho}\, + {\cal P}^{\dot{\gamma}}_{\,\,\,\rho}\, {\cal P}^{\dot{\beta}}_{\,\,\,\epsilon} \, {\cal P}^{\dot{\alpha}}_{\,\,\,\delta}. \label{s-4} \end{eqnarray} Again this transforms as ${\bf 1}_0$ with ${\cal V}$-charge zero because there is no $SU(4)$ index. As described in the footnote \ref{opeproperty}, the OPEs between the supersymmetry generators and the ${\cal P}^{\dot{\alpha}}_{\,\,\,\beta}$ do not have any singular terms, we do not find any new higher spin generators from (\ref{s-4}) \footnote{ Similarly, from the higher spin generator in the footnote \ref{othercomplex2}, there is a relation ${\cal Q}^{a}_{\,\,\, \alpha}(z) \, \dot{{\cal{W}}}^{ \dot{\beta} \dot{\gamma}\dot{\delta} }_{\,\,\, b \, \epsilon \rho}(w) \Bigg|_{\frac{1}{(z-w)}} = \delta^{ a }_{b}\, {\cal W}^{ \, \dot{\beta} \dot{\gamma} \dot{\delta} }_{\,\,\, \alpha \epsilon \rho}(w)$.}. In this section, the higher spin generators are obtained in (\ref{s-one}), (\ref{s-threehalf}), (\ref{s-2}), (\ref{s-2other}), (\ref{s-2other1}), (\ref{s-2other2}), (\ref{s-fivehalf}), (\ref{s-fivehalfother}), (\ref{s-3}), (\ref{s-3other}), (\ref{s-3other1}), (\ref{s-7half}), (\ref{s-4}), the footnotes \ref{conjugat-1}, \ref{compother2}, \ref{compother1}, \ref{othercomplex}, \ref{compother}, \ref{othercomplex1}, and \ref{othercomplex2} explicitly. They are written in terms of the cubic terms between the weight-$1$ operators and are summarized by the Table $1$ with $SU(4)$ representations and ${\cal V}$-charges. \begin{table}[ht] \centering \begin{tabular}{|c|c| } \hline & Higher spin generators \\ [0.5ex] \hline $s=1$ & ${\cal W}({\bf 1}_0), \, {\cal W}^{a}_{\,\,\,b}({\bf 15}_0)$ \\ [1ex] \hline $s=\frac{3}{2}$ & ${\cal W}^a_{\,\,\,\alpha}({\bf 4}_{-1}), \, \dot{{\cal W}}^{\dot{\alpha}}_{\,\,\,a}(\overline{\bf 4}_{1}), \, {\cal W}^{\left[ a b \right]}_{\,\,\,c \, \alpha}({\bf 20}_{-1}), \, \dot{{\cal W}}^{a\, \dot{\alpha}}_{\,\,\, \left[ b c \right]}(\overline{\bf 20}_{1})$ \\ [1ex] \hline $s=2$ & ${\cal W}^{\dot{\alpha}}_{\,\,\,\beta}({\bf 1}_0), {\cal W}^{a \, \dot{\alpha}}_{\,\,\,b \,\beta}({\bf 15}_0), {\cal W}^{\left[ a b \right] \, \dot{\alpha}}_{\,\,\, \left[ c d \right] \, \beta}({\bf 20'_{\rm{0}}}), {\cal W}^{\left[ a b \right] c}_{c \, \alpha \beta}({\bf 6}_{-2}), \dot{{\cal W}}^{c \, \dot{\alpha} \dot{\beta}}_{\,\,\, \left[ a b\right] c}(\overline{\bf 6}_{2}), {\cal W}^{\left( a b \right)}_{\,\,\, \alpha \beta}({\bf 10}_{-2}), \dot{{\cal W}}^{\dot{\alpha} \dot{\beta}}_{\,\,\, \left( a b \right)}(\overline{\bf 10}_{2}) $ \\ [1ex] \hline $s=\frac{5}{2}$ & ${\cal W}^{a \, \dot{\alpha}}_{\,\,\, \beta \gamma}({\bf 4}_{-1}),\, \dot{{\cal W}}^{\dot{\alpha} \dot{\beta}}_{\,\,\, a \, \gamma}(\overline{{\bf 4 }}_1), \, {\cal W}^{\left[a b c\right]}_{\,\,\, \alpha \beta \gamma}(\overline{\bf 4}_{-3}),\, \dot{{\cal W}}^{\dot{\alpha} \dot{\beta} \dot{\gamma}}_{\,\,\, \left[a b c\right]}({\bf 4}_3), \, {\cal W}^{\left[a b\right] \, \dot{\alpha}}_{\,\,\, c \, \beta \gamma}({\bf 20}_{-1}), \, \dot{{\cal W}}^{a \, \dot{\alpha} \dot{\beta}}_{\,\,\, \left[b c\right] \, \gamma} (\overline{\bf 20}_{1})$ \\ [1ex] \hline $s=3$ & ${\cal W}^{\dot{\alpha} \dot{\beta}}_{\,\,\, \gamma \delta}({\bf 1}_0),\, {\cal W}^{a \, \dot{\alpha} \dot{\beta}}_{\,\,\, b \, \gamma \delta} ({\bf 15}_0), \, {\cal W}^{\left[a b\right] \, \dot{\alpha}}_{\,\,\, \beta \gamma \delta}( {\bf 6}_{-2}), \, \dot{{\cal W}}^{\dot{\alpha}\dot{\beta}\dot{\gamma}}_{ \,\,\, \left[a b\right] \, \gamma}(\overline{\bf 6}_{2})$ \\ [1ex] \hline $s=\frac{7}{2}$ & ${\cal W}^{a \, \dot{\alpha} \dot{\beta}}_{\,\,\, \gamma \delta \epsilon}({\bf 4}_{-1}), \, \dot{{\cal W}}^{\dot{\alpha}\dot{\beta}\dot{\gamma}}_{\,\,\, a \, \delta \epsilon}({\bf 4}_{1})$ \\ [1ex] \hline $s=4$ & ${\cal W}^{\dot{\alpha}\dot{\beta}\dot{\gamma}}_{\,\,\,\delta\epsilon\rho}( {\bf 1}_0)$ \\ [1ex] \hline \end{tabular} \caption{The higher spin generators with $SU(4)$ representation and ${\cal V}$-charge in the worldsheet theory, corresponding to the tables $4$ and $5$ with the level $l=1$ of \cite{SS}. We can observe that the two $SU(2)$ spins of the higher spin generators are given by the number of each indices $\alpha,\beta,\gamma, \cdots $ and $\dot{\alpha}, \dot{\beta}, \dot{\gamma}, \cdots $ divided by $2$. For example, the higher spin generator with $s=4$ has the corresponding spins $(j_L, j_R)=(\frac{3}{2},\frac{3}{2})$. Note that the spin $s$ is given by $s=1 +j_L+j_R$. The ${\cal V}$-charge is given by the number of lower indices of $SU(4)$ minus the number of upper indices of $SU(4)$. } \end{table} \section{ Some OPEs between the generators of $PSU(2,2|4)$ and the lowest generators of $hs(2,2|4)$} \subsection{Primary or quasiprimary fields} By using the explicit OPE result in Appendix (\ref{tjjj}), we can determine the (quasi)primary fields of higher spin generators. As described before, only after checking this (quasi)primary condition, then the first order poles in the OPEs between the weight-$1$ operators and the weight-$3$ operators provide the right (quasi)primary operators of weight-$3$ we would like to construct. The quasiprimary operators in the Table $1$ are given by the higher spin generators containing the quadratic ${\cal V}$ terms including the cubic ${\cal V}$ term. The remaining higher spin generators are primary operators. \subsection{The OPEs between the weight-$1$ generators and the weight-$3$ generators} In section $3$, we have computed some of the OPEs between the conformal dimension-$1$ generators and the conformal dimension-$3$ generators in order to determine the higher spin generators. In Appendix $C$, we will present the remaining OPEs between them. We observe that the first order poles in the right hand sides of these OPEs (together with the symmetric or antisymmetric combinations of the left hand sides of the OPEs) contain the higher spin generators as well as the new higher spin generators \footnote{ In the right hand sides of all these OPEs, the higher spin generator ${\cal W}$ in (\ref{s-one}) does not appear at the first order poles. }. In general, in these OPEs, there are also fourth, third and second order poles we do not analyze them in this paper explicitly. In the view point of two dimensional worldsheet theory, it is important to calculate them in order to see their algebraic structures. Of course, we can calculate the OPEs between the conformal dimension-$3$ generators and analyze the first order pole in order to determine the next higher spin generators which consist of the quintic terms of weight-$5$ operators. We will not consider all these computations in this paper although it is straightforward to do so. \subsection{The additional generators} We have obtained the new higher spin generators (\ref{s-2}), (\ref{s-2other1}), the footnote \ref{compother2}, (\ref{s-3}) and Appendix (\ref{hatoperators}) \begin{eqnarray} \widehat{\cal W}^{a \, \dot{\alpha}}_{\,\,\, b \, \beta}, \qquad \widehat{\cal W}^{\left[a b \right]}_{\,\,\, \alpha \beta}, \qquad \dot{\widehat{\cal W}}^{\dot{\alpha}\dot{\beta}}_{\,\,\, \left[ a b \right]}, \qquad \widehat{\cal W}^{a \, \dot{\alpha}\dot{\beta}}_{\,\,\, b \, \gamma \delta}, \qquad \widehat{\cal W}^{a b \, \dot{\alpha}}_{\,\,\, c \, \beta \gamma}, \qquad \dot{\widehat{\cal W}}^{a\, \dot{\alpha} \dot{\beta}}_{\,\,\, b c \, \gamma}. \label{sixhat} \end{eqnarray} These also appear in the classical version of the OPEs where there are no multiple contractions between the operators. They appear in the computation of the higher spin generators of $s=2, \frac{5}{2}$ and $s=3$. Of course, we can further compute the OPEs between the weight-$1$ operators and the above higher spin generators (\ref{sixhat}) of weight-$3$ and expect that the first order poles of the right hand sides of these OPEs contain the higher spin generators in Table $1$ and the ones of (\ref{sixhat}). At the moment it is not clear to observe what are the roles of (\ref{sixhat}). We need to calculate further OPEs between the weight-$1,2,3$ operators including (\ref{sixhat}). We do expect that when we consider the cases $l \geq 2$, the similar additional higher spin generators occur. \subsection{The next generators of $hs(2,2|4)$} So far, we have considered the $l=1$ case of \cite{SS}. When $l=2$ case, we observe that the lowest spin $s=2$ higher spin generator contains the following expression $ {\cal V} {\cal V} {\cal V} {\cal V} {\cal P}^{\dot{\alpha}}_{\,\,\,\beta}+ \cdots$ corresponding to ${\bf 1}_0$ because there is no $SU(4)$ index. According to (\ref{ZY}) and (\ref{uudotv}), for the multiple product of ${\cal V}$ whose number is greater than $4$, there are still various nonzero derivative terms between the fermionic fields although there is no nonderivative term between them (Of course, if we consider the `classical' OPEs inside the Thielemans package \cite{Thielemans}, then the above multiplet product of ${\cal V}$ is identically zero). On the other hands, in the oscillator construction, the corresponding $X$'s in \cite{SS} appears only up to the quartic term because the five product of fermionic fields vanishes. The higher spin generators at $l=2$ consist of the quintic terms in the weight-$1$ operators we have considered. That is, they have weight-$5$ operators. One way to obtain these higher spin generators is to calculate the OPEs between the weight-$3$ higher spin generators and look at the first order pole. It would be interesting to examine the details. Contrary to the construction of \cite{SS,SS1}, the multiple product of ${\cal V}$, where the number of ${\cal V}$ is greater than four, can occur due to the above analysis. \section{ Conclusions and outlook} The worldsheet realization of the higher spin generators of \cite{SS} at $l=1$ is obtained. They are summarized in the Table $1$ in addition to (\ref{sixhat}). According to the table $3$ of \cite{SS}, there exist various ${\cal N}=8$ $AdS_5$ $PSU(2,2|4)$ multiplets with the levels $l=0, 1, 2, \cdots, \infty$. As mentioned before, the $l=0$ case is the five dimensional ${\cal N}=8$ gauged supergravity multiplet. The $USp(8)$ representation in each level can be decomposed into the $SU(4)$ with ${\cal V}$-charge. See also \cite{FFZ} for this $l=0$ multiplet in terms of two product of singletons. The level $l=1$ multiplet can be interpreted as the `massless' Konishi multiplet in the context of ${\cal N}=4$ conformal supermultiplet in four dimensions \cite{HST}. According to the observation of \cite{SS1}, this multiplet can be also obtained by the tensor product of the above $l=0$ supergravity multiplet (characterized by ${\bf 42}_0$, ${\bf 48}_{\frac{1}{2}}$, ${\bf 27}_1$, ${\bf 8}_{\frac{3}{2}}$, ${\bf 1}_2$ with $USp(8)$ representation together with $SO(3)$ spin) with the $SU(4)$ singlet of $SO(3)$ spin-$2$ (${\bf 1}_2$). After then we obtain ${\bf 1}_0$, ${\bf 8}_{\frac{1}{2}}$, ${\bf 28}_1$, ${\bf 56}_{\frac{3}{2}}$, ${\bf 70}_{2}$, ${\bf 56}_{\frac{5}{2}}$, ${\bf 28}_3$, ${\bf 8}_{\frac{7}{2}}$ and ${\bf 1}_4$ where the subscript $s$ is the spin index appearing in the Table $1$. The physical states \cite{SS,SS1} arise in the sectors of the master scalar field and the master gauge field (in the five dimensional higher spin gauge theory) corresponding to the higher spin generators we have described in the above Table $1$. Note that there exists one-to-one correspondence between the table $3$ and tables $4$ and $5$ only for $s=\frac{5}{2}, 3, \frac{7}{2}$ and $4$ corresponding to ${\bf 56}_{\frac{5}{2}}$, ${\bf 28}_3$, ${\bf 8}_{\frac{7}{2}}$ and ${\bf 1}_4$. That is, the representations for $s=0, \frac{1}{2}$ (${\bf 1}_0$ and ${\bf 8}_{\frac{1}{2}}$) (and the representations ${\bf 6}$ and $\overline{\bf 6}$ for $s=1$, the representations ${\bf 4}$ and $\overline{\bf 4}$ for $s=\frac{3}{2}$, and the representations ${\bf 1}$ and $\overline{\bf 1}$ for $s=2$) appear in the table $6$ of \cite{SS}. See also (\ref{mismatch}) for their ${\cal V}$-charges. There are the following future directions we can study. $\bullet$ The complete OPEs In this paper, we have focused on the construction of the higher spin generators having weight-$3$. We understand that there are weight-$2$ operators in the OPEs between the weight-$1$ operators and the weight-$3$ operators. Furthermore we did not consider the OPEs between the weight-$1$ operators (the generators of Lorentz symmetry and the generators of super conformal boosts) (\ref{12generators}) and the weight-$3$ operators we have constructed in the worldsheet theory. It would be interesting to determine the complete OPEs between these generators of weight-$1,2,3$ in the context of the higher spin superalgebra $hs(2,2|4)$. Moreover, it will be interesting how they survive when we act them on the physical vacuum state by recalling the footnote \ref{fiveweightone} on the weight-$1$ operators along the line of \cite{GG2104,GG2105}. Eventually, we would like to construct the complete higher spin algebra which contains the higher spin generators appearing in the tables $4$ and $5$ of \cite{SS} in closed form. $\bullet$ In the theory of ${\cal N}=4$ super Yang-Mills coupled to the ${\cal N}=4$ conformal supergravity As before, in \cite{SS1}, the conserved currents corresponding to the higher spin gauge theory described in the table $3$ of \cite{SS} can be described from the singleton superfield based on \cite{Bdd,HST,FFZ} for $l=0$ and $l=1$. Furthermore, in \cite{GMZ}, their tables $6$ and $7$ are related to the four dimensional ${\cal N}=4$ conformal supergravity multiplet. They claim that the $l=1$ case of the table $3$ of \cite{SS} can be obtained also from the tensor product of above tables $6$ and $7$ (See also \cite{BT} on the one loop contributions of ${\cal N}=4$ conformal supergravity multiplet). It would be interesting to study precise correspondence explicitly in the context of \cite{Maldacena,Witten,GKP}. See also the review paper \cite{FT} for conformal supergravity and \cite{BW} for the twistor string theory description of conformal supergravity. $\bullet$ The action of the higher spin generators on the vacuum state In the oscillator construction, it is known that the ${\cal N}=4$ super Yang-Mills multiplet can be identified with the multiple product of the various oscillators acting on the physical vacuum state \cite{Beisert}. The similar construction in the worldsheet theory is obtained from the multiple product of the various zero modes of the ambitwistor fields acting on the Ramond ground state \cite{GG2104,GG2105}. As we have the complete expressions for the higher spin generators, we can determine the precise action on the physical vacuum state as mentioned before. $\bullet$ When the coupling of ${\cal N}=4$ super Yang-Mills becomes nonzero As the ${\cal N}=4$ super Yang-Mills interaction is turned on, then the higher spin generators in the tables $4$ and $5$ of \cite{SS} with $l=1, 2, \cdots, \infty$ will be no longer conserved. As observed in \cite{SS1}, the $hs(2,2|4)$ higher spin gauge theory maybe described by a string theory having a left-moving and right-moving $PSU(2,2|4)$ Kac-Moody superalgebra with a critical level $k=1$. We have seen that this theory admits a singleton representation \cite{GG2104,GG2105}. Then the question is whether the affine Kac-Moody extension of the $hs(2,2|4)$ will give us some hints in order to describe the theory for nonzero coupling of ${\cal N}=4$ super Yang-Mills in four dimensions beyond the free field construction of this paper. See also the previous relevant paper \cite{DS}. $\bullet$ Any algebraic symmetries in the DDF-like operators In \cite{GG2104,GG2105}, the DDF-like operators \cite{DDF} which are given by the product of the modes of ambitwistor fields (\ref{ZY}) are introduced. They satisfy the nontrivial (anti)commutator relations depending on the magnitude of the sum of the two each modes. The structure constants appearing in the right hand side of these relations are given by the ones in the superalgebra $U(2,2|4)$. They claim that the nontrivial triple products for the specific three modes vanish identically. It would be interesting to describe the above products for any three modes and observe whether there exist any nontrivial behaviors or not. $\bullet$ How to interpret the mismatch between the table $3$ and the tables $4$ and $5$ of \cite{SS} There are some multiplets in table $6$ of \cite{SS} \footnote{In addition to these, there are ${\bf 1}_0$ for $s=0$ and ${\bf 4}_1 \oplus \overline{\bf 4}_{-1}$ for $s=\frac{1}{2}$ as before.} \begin{eqnarray} s= 1 & : & \qquad {\bf 6}_{-2}, \qquad \overline{\bf 6}_{2}, \nonumber\\ s=\frac{3}{2} & : & \qquad \overline{\bf 4}_{-3}, \qquad {\bf 4}_{3}, \nonumber \\ s=2 & : & \qquad {\bf 1}_{-4}, \qquad \overline{\bf 1}_{4}. \label{mismatch} \end{eqnarray} These are the elements of the table $3$ but their corresponding higher spin generators do not appear in the tables $4$ and $5$. However, it seems that for $l \geq 2$, we can check the sum of the representations in table $4$ \cite{SS} is given by $ 2 \cdot {\bf 1} \oplus 4 \cdot {\bf 4} \oplus 2 \cdot {\bf 16} \oplus 4 \cdot {\bf 24} \oplus {\bf 36}$ and this is equal to $182$ and the sum of the representations in table $5$ is given by $ 2 \cdot {\bf 1} \oplus 4 \cdot {\bf 4} \oplus 4 \cdot {\bf 6} \oplus 2 \cdot {\bf 16}$ and this is $74$. This leads to $182+74=256$. Then there is no mismatch between the table $3$ and the tables $4$ and $5$ for $ l \geq 2$. It is an open problem to understand how the higher spin generators corresponding to (\ref{mismatch}) are not allowed for small spin $s$ in the oscillator construction (or in the worldsheet theory). $\bullet$ Can the even power of oscillators survive in the worldsheet description? In the construction of \cite{SS}, the higher spin generators with equal odd numbers of oscillators can appear only. See also \cite{BBMS} for relevant discussion. It is not obvious to see this restriction in the worldsheet theory because in the OPEs between the weight-$1, 2, 3$ operators, in general, the weight-$2,4$ operators as well as the weight-$5$ operators can appear. See also \cite{Vasiliev} for different kinds of higher spin generators. It would be interesting to study this direction in order to describe the above restriction in the worldsheet theory. \vspace{.7cm} \centerline{\bf Acknowledgments} This work was supported by the National Research Foundation of Korea(NRF) grant funded by the Korea government(MSIT)(No. 2020R1F1A1066893). \newpage
\section{Introduction} Fast radio bursts (FRBs) are microsecond- to millisecond-duration bursts of radio emission with dispersion measures (DMs) that indicate extragalactic origin. The origins of such bursts are still unclear, but a variety of plausible mechanisms have been proposed \citep{pww+19}. The observation that some FRBs repeat \citep{ssh+16a,abb+19b,abb+19c,fab+20} rules out cataclysmic sources as the only FRB mechanism. The discovery of repeating FRBs has helped in efforts to identify FRB host galaxies \citep[e.g.][]{tbc+17,mph+17,pmm+19,hps+20,bha+21,bhardwaj+2021a,bhardwaj+2021b}. The recent CHIME/FRB catalog \citep{aab+21} demonstrates that repeating FRBs tend to have morphologies distinct from non-repeating FRBs, characterized by narrower bandwidths and larger temporal widths \citep{pgk+21}. Some repeaters have shown non-Poissonian behavior. The first FRB identified to repeat, FRB 20121102A, has clustered bursts \citep{ssh+16b, ssh+16a, oyp18}. \cite{rms+20} suggested a 157-day periodicity in its burst times, which was later confirmed by \cite{css+21}. \cite{aab+20} showed that repeater FRB 20180916 has a 16.35-day periodicity, with a $\sim$4-day activity window, clearly non-Poissonian and an important clue to the nature of the progenitor. Clustering of events in time may offer an important clue to the emission mechanism of repeating FRBs, or imply a changing local environment. In this paper, we present observations of FRB 20201124A, which entered a highly active state towards the end of March 2021. Using the precise localization reported by the Very Large Array (VLA), we are able to report on total exposure to the source of FRB 20201124A and give strong constraints on its event rate, demonstrating significant change in event rate over time. Further, we can take into account the weighting of the synthesized beam in measuring burst fluences, and study the luminosity function. \subsection{FRB 20201124A} The CHIME/FRB collaboration detected an FRB on 2020 November 24 at UTC 08:50:41.885952 with DM$=415.31 \pm 0.63 $~pc~cm$^{-3}$, which was observed to repeat about four minutes later with DM$=414.31 \pm 0.31 $~pc~cm$^{-3}$. Four subsequent bursts from the same location were detected sporadically over the next few months -- two in 2020 December and two more between February and mid-March. The source has been designated FRB 20201124A in the Transient Name Server, under the convention that the source of the bursts be identified by the name of the first detected burst. Towards the end of 2021 March, FRB 20201124A entered a period of high activity, as can be seen in \cref{fig:chime_detections} where its bursts' times of arrival are marked with vertical lines. In the last week of March, CHIME/FRB detected new bursts from it almost every day. This prompted the collaboration to issue an Astronomer's Telegram \citep{lan21} to encourage follow-up observations. As a result, several other observatories soon reported detections of repeat bursts from the same sky region at similar DMs \citep{ksk+21,ksmb21,xnz+21}. We reported a localization of (J2000) RA 05$^{\rm h}$08$^{\rm m}$ $\pm$ 6$^{\rm m}$, Dec +26$^\circ$11$'$ $\pm$ 14$'$, based on the stacked intensity-data detections of previous repeats \citep{lan21}. Following our report, the Australia Square Kilometre Array Pathfinder (ASKAP) carried out observations of the provided location and reported two bursts, on 2021 April 1 at 11:33:01.66 UTC and 2021 April 2 at 05:48:59.114 UTC with DMs of $412 \pm 0.3$ and $414 \pm 0.3$~pc cm$^{-3}$, respectively \citep{ksmb21,ksk+21}. From these detections, ASKAP obtained a baseband localization of (J2000) RA 05$^{\rm h}$08$^{\rm m}$03.662$^{\rm s}$, Dec +26$^\circ$03$'$39.82$"$, with an uncertainty less than an arcsecond \citep{dbd+21}. From this, ASKAP identified SDSS J050803.48+260338.0 (hereafter SDSSJ0508) as a likely host galaxy, with a photometric redshift $z = 0.08 \pm 0.02$ cataloged by Pan-STARRS \citep{bfh+21, dbd+21}. Observations by the MMT Observatory later found a spectroscopic redshift of $z = 0.0979 \pm 0.0001$ for SDSSJ0508 \citep{fdl+21}. The Five-hundred-meter Aperture Spherical Telescope (FAST) collaboration soon reported that they had observed over a hundred bursts from FRB 20201124A between 2021 April 1 and 6, and identified four candidate host galaxies within a 1 arcmin field with a preference toward SDSSJ0508 \citep{xnz+21}. The VLA also reported a burst on 2021 April 7 at UTC 00:18:37.662 with DM = $420 \pm 10 $~pc~cm$^{-3}$, localized to (J2000) RA 05$^{\rm h}$08$^{\rm m}$03$^{\rm s}$.50, Dec +26$^\circ$ 03$'$ 37$''$ (uncertainty $\pm 2''$), also coincident with SDSSJ0508, after performing deep imaging of the region \citep{ltc+21}. The FAST and VLA localizations were consistent but significantly offset from the ASKAP position by about 2~arcsec. ASKAP later found a localization consistent with others using low-band data, and identified a potential higher-band systematic causing the observed offset \citep{ddj+21}. The positions ascertained from VLA, FAST, and low-band ASKAP data were later corroborated by the European VLBI Network (EVN) using observations from April 10 from six EVN stations. The EVN results pinpointed the location of the source to (J2000) RA=05$^{\rm h}$08$^{\rm m}$03.5077$^{\rm s}$ and Dec=26$^\circ$03$'$38.504$''$ with uncertainty of approximately 4~mas for each \citep{mkh+21}. Further radio imaging observations uncovered a persistent radio source at the FRB 20201124A location, called PRS201124. The upgraded Giant Metrewave Radio Telescope (uGMRT) detected a persistent radio source at (J2000) RA 05$^{\rm h}$08$^{\rm m}$03$^{\rm s}$.43, Dec +26$^{\circ}$03$'$38$''$.5 (uncertainty $\pm 0.9"$), with a flux density of 0.7 $\pm$ 0.1~mJy at 650~MHz \citep{wbg+21}. VLA/realfast later reported observations of a persistent source at the same location at 3 and 9~GHz, with flux densities $0.34 \pm 0.03$ and $0.15 \pm 0.01$~mJy, respectively \citep{rpp+21}. Persistent emission was not detected on milliarcsec scales in the EVN observations \citep{mkh+21}. From VLA observations, \citet{rll+21} found that the spectral energy distribution of PRS201124 is consistent with star formation activity for the host galaxy. This was supported by analysis of uGMRT and VLA observations in \citet{fdl+21}, and by multiwavelength observations reported in \citet{pbt+21}. It is noteworthy that FRB 20201124A was only recently detected by CHIME/FRB, in spite of significant prior exposure, and then became highly active shortly after its detection. TNS queries found no recorded transient events within a degree of the reported VLA position prior to the initial CHIME/FRB detection. Altogether, CHIME/FRB had a total of 41.42~hours of time observing the position of FRB 20201124A prior to the initial detection. The steady observing cadence of CHIME/FRB offers a unique opportunity to discover new repeating FRB sources, study the statistics of repeat events and identify patterns of repetition and clustering. From the recent surge in detections, and prior lack of detections, here we demonstrate strongly non-Poissonian repetition from FRB 20201124A and report on the discovery and the measured properties of these repeat bursts. The following section provides a background discussion of CHIME/FRB's observations and sensitivity to FRB events. \S\ref{sec:reduction} describes describes our analysis to characterize each of the detected bursts from FRB 20201124A. In \S\ref{subsec:temporal} we perform a statistical analysis of the changing event rate, demonstrating that FRB 20201124A changed in its event rate considerably over time. In \S\ref{subsec:morphology} and \S\ref{subsec:luminosity}, we discuss the observed morphologies of the repeat bursts and perform a power-law fit to the burst luminosity function. These observations are placed in the broader context of repeating FRBs in \S\ref{sec:discussion}. \section{Observations} \label{sec:observations} The CHIME/Fast Radio Burst experiment \citep[CHIME/FRB;][]{abb+18} is a backend system of the Canadian Hydrogen Intensity Mapping Experiment (CHIME)\footnote{\url{www.chime-experiment.ca}} telescope at the Dominion Radio Astronomical Observatory (DRAO) near Penticton, British Columbia, Canada. The telescope comprises four 20-m $\times$ 100-m cylindrical paraboloid reflectors oriented North-South, each with 256 equi-spaced antennas along the cylinder axis. These antennas are made up of two orthogonal linear-polarization feeds sensitive to a bandpass of 400 -- 800~MHz. The 2048 antenna signals are each amplified, digitized, and split into 1024 frequency channels at 2.56~$\mu$s time resolution by the CHIME correlator ``F-Engine.'' The channelized data streams are then sent to the ``X-Engine,'' which sums over polarizations and cross-multiplies to form 1024 independent total intensity sky beams: 256 North -- South by 4 East -- West \citep{nvp+17}. The regular layout of CHIME allows the North--South beamforming to be done via a fast Fourier transform, making CHIME an FFT telescope \citep{tz09}. These beams are spaced evenly in $\sin \theta$ for zenith angle $\theta = -60^\circ \text{ to } +60^\circ$ along the meridian. Beam centers are separated by about $0.4^\circ$ in the East -- West direction, and have FWHMs varying from $0.5^\circ$ to $0.25^\circ$ from 400 to 800~MHz. At this stage, the data are also rechannelized to 16384 frequency channels at 0.983~ms cadence, to reduce intra-channel dispersion smearing of FRBs. These beams are searched for FRBs in real time using a four-stage triggered software pipeline, with steps labelled L0, L1, L2/L3, and L4 \citep[see][]{abb+18}. L0 is the rechannelization and beamforming step in the X-engine. L1 does an initial RFI rejection and incoherent dedispersion. L2/L3 combine results from multiple beams to identify likely candidates, screen RFI, and tag known sources. Raw intensity data are saved to disk for any events with a signal to noise ratio (S/N) greater than 10. Metadata are stored by L4 while raw buffered intensity data are saved to disk by L1. The pipeline is also capable of triggering a dump of raw baseband (voltage) data from a 34-s buffer upon detection \citep{mmm+20}. Baseband data were saved for four of the observed FRB 20201124A events, and will be analyzed in future work. The realtime pipeline estimates approximate source positions via the method described in \citet{abb+19b}. Ratios among per-beam S/N values are fit to a model of the synthesized beams for a grid of sky locations and intrinsic spectra, a task which ultimately reduces to a $\chi^2$ minimization. Uncertainty in these localizations is typically on the scale of a synthesized beam width, $\sim 20'$, but can be larger for events detected in multiple beams. Repeater candidates are identified as bursts whose positions and DMs are consistent to within measurement uncertainties \citep{abb+19c}. \subsection{Exposure and Sensitivity} The CHIME/FRB exposure to the VLA/realfast location of FRB 20201124A is computed using a model of the CHIME/FRB synthesized beams. Exposure time per day is calculated as the time during which the source location was within the FWHM at 600~MHz of any of the synthesized beams that were active on that day. Individual beams can go offline if a CPU node in the FRB backend that manages them is shut down, which reduces total exposure. Of course, if the whole system is shut down during the source transit, the exposure time is zero. Transits that occurred when the system was not operating at nominal sensitivity are also excluded. The exposure per day across the full observation history of CHIME/FRB (excluding an early commissioning phase) is shown in the top half of \cref{fig:chime_detections}. The root-mean-square (RMS) noise each day is characterized by analyzing the distribution of S/N values of observed Galactic radio pulsars, as described in \citet{jcf+19} \citep[see also][]{fab+20,aab+21}. These RMS noise values relative to the mean noise are shown in the lower half of \cref{fig:chime_detections}, with colors indicating the number of pulsars used to estimate the RMS noise. The daily variation in noise does not exceed $\sim$10\%. \begin{figure}[h!] \includegraphics[width=\linewidth]{{sens_exp_plot}.pdf} \caption{Exposure time per day (top) and relative rms noise (bottom) over time for the VLA/realfast position of FRB 20201124A. The location was within the 600-MHz FWHM of one or more synthesized beams of CHIME/FRB for approximately 4~mins each day. Vertical gray lines indicate times of FRB 20201124A repeat events. The date 2021 March 20 is indicated because this represents the approximate start of the period of high activity.} \label{fig:chime_detections} \end{figure} \section{Data Reduction} \label{sec:reduction} The intensity data of each event are processed with several analysis steps. The first step searches for the DM that maximizes the signal to noise ratio (S/N) of the pulse integrated over frequency. This SNR-maximized DM is then used as an initial guess to the least-squares fitting routine \texttt{fitburst}, which fits a 2D analytic model to the two-dimensional dynamic spectrum. The full details of this model are discussed in \citet{aab+21}. \texttt{fitburst} models each burst with one or more components $i$ and fits for the arrival time ($t_{\text{arr}, i}$), signal amplitude ($A$), scattering timescale ($\tau$) temporal width ($w_i$), power-law spectral index ($\gamma_i$), and spectral running ($r_i$). This model is fitted to the dynamic spectrum using an iterative $\chi^2$ minimization procedure. The DM and scattering timescale $\tau$ are fit globally regardless of the number of components (i.e. we assume the same DM and $\tau$ for all sub-bursts), and the scattering timescale is assumed to go as $\tau \propto \nu^{-4}$ with frequency $\nu$ \citep{lan71,lk05}. If fitting for subbursts, the expected number, relative amplitudes, and separation in time of the subbursts are entered manually. These are initial guesses to help \texttt{fitburst} converge on the true values. \Cref{tab:burst_props} lists the best-fit measured properties of each detected burst, obtained from \texttt{fitburst}. \Cref{fig:wfalls} shows waterfall plots for each of the events, along with the \texttt{fitburst} models for time series and spectrum. For each event, \texttt{fitburst} is run automatically twice to determine the significance of scattering. The first iteration assumes a scattering timescale $\tau=0$, such that the burst components have simple Gaussian shapes, while the second round fits for the scattering timescale as well. The $\chi^2$ values of the two fits are compared in an F-test to determine the significance of the scattering fit. We report scattering timescales in Table~\ref{tab:burst_props} only for bursts whose F-test results showed significant evidence of scattering ($p < 0.001$). We also report the best-fit DM of each burst, rather than dedisperse all events to the same DM, in order to look for evidence of a changing DM over time. For all but one of the FRB 20201124A bursts presented here, we assume a single component for each. One event (20201210A) could be confidently fit with a second, downward-drifting burst, suggesting that other bursts from this source could also have downward drifting components that \texttt{fitburst} could not resolve. The dynamic spectra for some of the brighter bursts show hints of subcomponents, but \texttt{fitburst} was unable to resolve them. Other repeating FRBs have been shown to have complex downward-drifting substructure, such as FRB 20181222 \citep{abb+19c} or FRB 20121102 \citep{gms+19}. Recent results from the uGMRT show several FRB 20201124A bursts having downward-drifting substructure \citep{mbm+21}. Downward drifting structure can be confused for a higher DM or scattering tail, and so some caution is needed when interpreting these results. The intensity data are calibrated offline using the pipeline described by \citet{abb+19b}. Steady calibrator sources with known spectral properties are observed at meridian transit (i.e., at primary beam center). For each burst, the CHIME/FRB backend identifies the calibrator transit closest in declination and time, and then uses the measured spectrum to convert beamformer units to Jy. For all of the FRB 20201124A events, the calibrator was the Seyfert galaxy NGC 7720. The calibrated dynamic spectrum is then integrated over the bandpass and over the pulse width to estimate the total fluence. For sources of unknown position, there is an uncertainty in the difference in directional gain between the calibrator position and the FRB location. Normally, this pipeline assumes the source is at the meridian where the beam is strongest, and thus provides a lower bound on the fluence. With the localization provided by the VLA \citep{ltc+21} and a composite beam model, we are able to scale the calibrated flux estimates by the ratio of beam values between the calibrator and the true position of FRB 20201124A and report a flux estimate instead of a lower bound. However, this scaling also has the effect of amplifying noise for bursts detected toward the edges of the formed beam, so we only applied this scaling when the known source location was within the FWHM of the beam at 600~MHz. Flux/fluence values which are provided as only a lower bound are marked with a ``$>$'' in Table~\ref{tab:burst_props}, and comprise 12 of our 26 total measurements. \begin{table}[h!] \tiny \begin{center} \hspace*{-2.5cm} \begin{tabular}{|c|c|c|c|c|c|c|c|c|} \hline TNS Name & UTC Time of Arrival & DM & Width & Peak Flux & Fluence & Bandpass & S/N & Scattering Timescale \\ & & pc~cm$^{-3}$ & ms & Jy & Jy~ms & MHz & & ms \\ \hline\hline 20201124A & 2020-11-24 08:50:41.871 & 415.31(63) & 21.9(12) & 0.81(51) & 6.0(25) & 409.75 -- 533.63 & 29.47 & -- \\ 20201124B & 2020-11-24 08:54:45.982 & 414.06(31) & 6.6(17) & 0.62(40) & 4.6(20) & 529.28 -- 800.20 & 17.07 & -- \\ 20201216A & 2020-12-16 07:29:19.428 & 414.07(30) & 7.7(21) & $>$0.33(15) & $>$4.23(67) & 410.56 -- 491.37 & 17.77 & 12.0(38) \\ 20201210A & 2020-12-10 07:54:42.909, +33.00 ms & 411.1522(39) & 1.221(90), 0.1(66) & $>$2.65(80) & $>$25.7(54) & 447.99 -- 800.20 & 72.30 & 14.24(55) \\ 20210220A & 2021-02-20 03:06:22.937 & 420.26(41) & 14.5(21) & 0.88(64) & 5.78(92) & 463.78 -- 720.79 & 22.00 & -- \\ 20210301A & 2021-03-01 02:28:45.207 & 415.363(54) & 8.21(72) & $>$0.45(17) & $>$11.5(17) & 461.98 -- 605.51 & 49.22 & 13.8(17) \\ 20210321A & 2021-03-21 01:12:22.535 & 412.51(22) & 4.13(61) & 0.75(37) & 9.4(26) & 402.94 -- 547.30 & 32.36 & 8.25(69) \\ 20210322A & 2021-03-22 01:10:44.328 & 411.98(29) & 3.16(68) & 0.88(46) & 18.7(46) & 553.33 -- 800.20 & 25.70 & 14.0(19) \\ 20210323A & 2021-03-23 01:08:04.091 & 413.52(23) & 5.86(69) & $>$0.72(21) & $>$7.8(17) & 582.85 -- 800.20 & 38.78 & -- \\ 20210326A & 2021-03-26 00:53:51.109 & 414.08(17) & 11.64(56) & $>$0.56(23) & $>$10.8(35) & 400.20 -- 682.48 & 29.57 & -- \\ 20210327A & 2021-03-27 00:46:22.284 & 417.37(23) & 4.29(76) & $>$0.53(25) & $>$8.4(20) & 555.07 -- 800.20 & 36.89 & 12.4(15) \\ 20210327B & 2021-03-27 00:53:10.609 & 415.60(38) & 5.98(98) & 1.81(97) & 25.2(63) & 558.26 -- 800.20 & 19.10 & -- \\ 20210327C & 2021-03-27 00:53:10.641 & 417.46(39) & 6.14(99) & 1.43(76) & 20.7(51) & 559.44 -- 800.20 & 19.22 & -- \\ 20210328A & 2021-03-28 00:49:08.250 & 414.43(62) & 6.4(20) & 0.27(17) & 3.18(84) & 419.81 -- 586.73 & 14.17 & 7.7(20) \\ 20210331D & 2021-03-31 00:33:06.545 & 416.35(27) & 5.46(39) & 1.19(61) & 14.3(40) & 518.49 -- 800.20 & 21.04 & -- \\ 20210331A & 2021-03-31 00:37:18.719 & 417.00(19) & 5.53(56) & $>$0.62(31) & $>$9.2(28) & 426.75 -- 800.20 & 29.75 & 8.2(18) \\ 20210331B & 2021-03-31 00:38:34.938 & 412.57(47) & 4.9(11) & $>$0.46(25) & $>$6.3(15) & 442.54 -- 599.30 & 18.81 & 8.3(15) \\ 20210331C & 2021-03-31 00:39:18.305 & 414.75(34) & 5.25(70) & $>$0.57(25) & $>$8.7(19) & 492.15 -- 700.43 & 26.40 & 10.9(16) \\ 20210404A & 2021-04-04 00:11:43.318 & 410.11(31) & 3.3(16) & $>$0.32(15) & $>$4.5(14) & 400.20 -- 505.53 & 17.22 & 7.9(13) \\ 20210405A & 2021-04-05 00:13:36.914 & 413.97(21) & 7.2(13) & 1.13(63) & 22.9(64) & 456.14 -- 652.58 & 44.35 & 19.0(15) \\ 20210405B & 2021-04-05 00:13:36.664 & 413.279(16) & 3.87(24) & 2.28(86) & 29.7(89) & 465.10 -- 800.20 & 82.25 & 12.17(82) \\ 20210411A & 2021-04-11 23:43:24.320 & 416.2(12) & 29.1(33) & $>$0.28(18) & $>$7.1(22) & 408.56 -- 559.46 & 18.83 & -- \\ 20210411B & 2021-04-11 23:49:52.839 & 411.75(14) & 4.9(13) & 1.03(55) & 17.2(58) & 400.20 -- 546.50 & 21.83 & 11.5(20) \\ 20210412A & 2021-04-12 23:36:08.643 & 412.95(15) & 7.1(17) & $>$0.43(15) & $>$6.3(13) & 400.20 -- 545.52 & 19.87 & 9.8(20) \\ 20210504A & 2021-05-04 22:18:21.634 & 413.844(50) & 5.13(67) & 1.76(98) & 11.0(30) & 415.95 -- 759.68 & 10.69 & -- \\ 20210518A & 2021-05-18 21:21:03.774 & 413.42(20) & 7.2(13) & 0.72(44) & 8.8(32) & 400.20 -- 643.57 & 21.79 & 7.9(13) \\ \hline \end{tabular} \end{center} \caption{Properties of the repeat bursts from the source of FRB 20201124A detected by CHIME/FRB prior to 2021 May 19. Pulse bandwidth is defined as the full width at one tenth maximum (FWTM) of the pulse spectrum, as measured in the beam with the highest detection S/N. Scattering timescale is reported only for bursts which showed significant evidence of scattering. For the one event with two resolved components (20201210A), times of arrival and width are reported for both components. Errors are reported in reduced format (e.g. $1.234(56) = 1.234 \pm 0.056$).} \label{tab:burst_props} \end{table} \begin{figure} \centering \fig{{wfall_grid_all}.pdf}{\linewidth}{} \caption{Waterfall plots for all events, shown with the same time window. These only show data included in the \texttt{fitburst} analysis, which takes a finite window around the time of arrival. For each, we plot the integrated spectrum on the right and integrated time series on top, along with the fitted time series and spectrum curves. The fitted time series and spectra are colored red when significant scattering is measured and purple otherwise.} \label{fig:wfalls} \end{figure} \section{Results} \subsection{Temporal Study} \label{subsec:temporal} \Cref{fig:chime_detections} shows that CHIME/FRB observed its location for two years, with a total exposure time of about 1.73~days, prior to the first detected burst. By eye, it is clear that the repetition rate of FRB 20201124A is not constant and has changed substantially over the period of weeks. Non-detection over the pre-discovery total observed time rules out Poisson rates higher than 3.4 events per day at the $3\sigma$ level, for our sensitivity threshold. Following the first detection, the repetition rate is also varying. We can demonstrate the non-Poissonianity with a series of Kolmogorov-Smirnov (KS) tests on the times between detected events. For a Poisson process with rate $\lambda$, the time $t$ between events is exponentially-distributed, with probability density function (PDF) $f(t) = \lambda \exp(-\lambda t)$. However, CHIME/FRB only observes the source location for a limited time each sidereal day. For a periodically-sampled Poisson process, the total \emph{exposure} time between bursts is exponentially distributed. The PDF thus has the form of an exponential of the total observed time, multipled by a periodic window, \begin{equation} \begin{split} f(t) &= \int\limits_0^a \lambda e^{-\lambda \tau(t, T, a, t_a)} dt_a\\ &\text{ where } \tau(t, T, a, t_a) = \left\lfloor \frac{t + t_a}{T} \right\rfloor a + (t + t_a) \text{ mod } T, \end{split} \label{eqn:sampled_exp_dist} \end{equation} where $T=23.93$~hr is the period between observing windows (one sidereal day), $a=3.13$~min is the duration of the observation window, here taken to be the mean daily exposure time of CHIME/FRB. The brackets $\lfloor \cdot \rfloor$ denote the floor function. The probability of another event occuring at time $t$ after an initial event at $t_a$ is exponential in the total observed time $\tau$ after $t_a$. To get the probability of $t$, we marginalize over $t_a$ by integrating over a single window. \begin{figure} \center \includegraphics[width=0.75\linewidth]{kstest_pvals.pdf} \caption{KS test p-value vs. event rate for two subsets of data. The vertical dashed line indicates the 3$\sigma$ maximum event rate for the non-detection prior to 2020 November 24. The blue curve gives the KS test results for all events following the initial detection. The orange curve is for events after 2021 March 20, our fiducial start date for the period of high activity. The green curve is for events prior to the start of high activity. This shows that there is no single Poisson rate consistent with the repetition of FRB 20201124A.} \label{fig:kstest} \end{figure} We consider the distribution of times between events within two subsets of the full set of detected FRB 20201124A bursts --- all events (not considering the period of non-detection prior to 2020 November 24), and events after 2021 March 20, a date chosen to represent the start of increased activity from the source. For each subset, we apply a KS test to determine if the data are inconsistent with the distribution of \cref{eqn:sampled_exp_dist} for a range of possible event rates. The two-sided KS test measures the maximum distance between the empirical cumulative distribution function (ECDF) and the CDF corresponding with \cref{eqn:sampled_exp_dist}. The null hypothesis of the KS test is that the data \emph{are} drawn from the sampled exponential distribution. \Cref{fig:kstest} shows the p-value of the KS test for a variety of event rates for the full set of events (blue), events before 2021 March 20, and events after 2021 March 20 (orange). The gray horizontal line marks $p=0.05$, and the black horizontal line marks $p=0.0027$, for $3\sigma$ significance. Over the full set of events, we can rule out constant Poissonian repetition to $p=0.05$ significance. For events after 2021 March 20, Poissonian repetition cannot be ruled out, but the repetition rate certainly increased beyond what is consistent with the earlier events. The months of slow activity after the initial detection are inconsistent with any event rates prior to the initial detection. It is possible that FRB 20201124A could be repeating periodically, in such a way that for the first two years of CHIME/FRB observations it was always out of phase with its transits over the telescope. This periodicity would need to be very close to a multiple of a sidereal day for the FRB to escape detection until 2020 November 24. We note that the detections by ASKAP, VLA/realfast, FAST, and others did not correspond with the CHIME/FRB observation window, and so disfavor periodicity on a time scale near 24~hours. We also conducted searches for periodicity in the burst arrival times, which included H-tests \citep{drs89} and a search for peaks in the event time periodogram. These searches did not turn up any evidence of periodicity on scales between 1~day and 175~days. We note that these results appear to be inconsistent with the burst rate of $\sim 16$~hour$^{-1}$ ($384$~day$^{-1}$) reported by uGMRT in \citet{mbm+21}. The uGMRT observations comprise 3 hours of exposure to the 20201124A location on the 2021 April 5. During this time, uGMRT found 48 bursts in the bandpass of 550 -- 750~MHz. The orange curve in \cref{fig:kstest} tapers off sharply to zero at rates larger than about $210 $~day$^{-1}$, indicating that the sample of events after 2021 March 20 is inconsistent with high event rates. This apparent inconsistency suggests that the event rate changed during the period from 2021 March 20 to May 19. \subsection{Burst Morphology} \label{subsec:morphology} \Cref{fig:props_vs_time} shows the DM, pulse width, scattering timescale, and pulse bandpass of each burst vs. the time of detection, using the data in Table~\ref{tab:burst_props}. We find no evidence of a consistent secular evolution in any of these parameters over time. There is considerable apparent variation in DM and scattering timescale among these events. The two bursts with the highest S/N (20201210A and 20210405B) have slightly different scattering timescales (14.24 $\pm$ 0.55 and 12.17 $\pm$ 0.82 ms), and DMs (411.1522 $\pm$ 0.0039 and 413.279 $\pm$ 0.016~pc~cm$^{-3}$). The burst with the smaller measured DM (20201210A) happens to be the one with a resolved subcomponent. If 20210405B has a downward-drifting subcomponent like 20201210A, the expected effect would be to confuse the second component for dispersion and scattering, which could explain the discrepancy. For the much wider and fainter bursts it is very likely that \texttt{fitburst} simply cannot resolve subcomponents, and the best-fit DM is off. The biggest outlier is FRB 20210220A, with the best fit DM of $420.26 \pm 0.41$~pc~cm$^{-3}$, but also has a relatively narrow bandpass and is very wide in time. The error bars in \cref{fig:props_vs_time} do not reflect the degeneracy between substructure and DM, and so should not be interpreted as showing significant DM variation. \begin{figure} \centering \fig{{props_vs_time}.pdf}{\linewidth}{} \caption{Measured properties of the bursts vs. time. The S/N of each burst, as reported by \texttt{fitburst}, is indicated with the point color. Events which fell outside the 600~MHz synthesized beamwidth (and hence whose fluence measurements are lower bounds only) are marked with stars. For the pulse bandpasses (BP), the dots indicate the location of the spectrum peak and the bars mark the bandpass.} \label{fig:props_vs_time} \end{figure} The potential confusion between unresolved sub-components and DM has no bearing on the observed pulse bandpasses, shown in the bottom plot of \cref{fig:props_vs_time}. There is a hint of bimodality in the peak frequencies, with several burst spectra clustering around $\sim650$~MHz and others around or below 500~MHz. We estimate the distribution of peak frequencies in a way analogous to Gaussian kernel density estimation with the estimator \begin{equation} \hat{g}(f_p) \propto \sum_{i} \exp \left( \frac{-(f_p - f_{pi})^2}{2 \sigma_i^2} \right), \end{equation} where $f_{pi}$ is the peak frequency of the $i^{\rm th}$ burst, and the expression is normalized to unity. The uncertainty in each measured peak frequency is $\sigma_i = (0.233){\rm BW}_i$, where ${\rm BW}_i$ is the bandwidth of the each burst and the factor of $0.233$ scales the FWTM to standard deviation. \Cref{fig:kde_est} shows the resulting distribution estimator for the data. The peak frequencies of each burst are marked by the blue lines on the bottom. The distribution shows two clear peaks, one near 470~MHz and one by 668~MHz. \begin{figure} \centering \fig{{kde_freq}.pdf}{0.75\linewidth}{} \caption{Total estimated distribution function for peak frequency. Blue lines on the bottom mark the peak frequencies of bursts in the data.} \label{fig:kde_est} \end{figure} There are several potential systematic causes of this bimodality. If channels away from the peaks were more often contaminated with RFI, then it could lead to a preference for detecting bursts near the peaks. However, the distribution of RFI-excised channels shows no such pattern. Another possibility is that the \texttt{bonsai} dedispersion algorithm used by the realtime pipeline favors the ends of the bands. \texttt{bonsai} may not be uniformly sensitive across the CHIME bandpass to narrowband bursts, and could be less likely to detect events in the center of the band. Further analysis with system injections could be used to detect such an effect. The bimodality could also come from complex chromatic sensitivity in the formed beams \citep{pgk+21}. A single burst could be observed to have different spectra in different beams depending on the source's sky location relative to the beam centers. The \texttt{fitburst} analysis here only fits the spectrum in the beam with the highest S/N, and 10 out of the 26 events reported here were also detected in one or two other beams. Fitting the spectrum in these other beams could in principle find parts of the spectrum missed by the highest S/N beam. We ran \texttt{fitburst} on these other beams, however, and found the bursts in the same part of the CHIME bandpass as in the highest S/N beams. Follow-up analysis with baseband data will let us beamform directly to the known source location, and avoid this chromaticity issue altogether. This is the subject of future work. \subsection{Luminosity Function} \label{subsec:luminosity} \begin{figure} \centering \includegraphics[width=\linewidth]{{fluence_ccdf_mlefit}.pdf} \caption{Fluence distribution of FRB 20201124A, with a maximum likelihood estimator fit for a power-law at high fluence and a low-fluence cutoff point. The dashed black line marks the fitted cutoff for the power-law, and the dashed green line marks the 90\% fluence completeness threshold. The two errors on $\alpha$ are the mean error of the MLE power-law fit and the standard deviation of fitted indices across the Monte-Carlo sampling of fluences.} \label{fig:lum_func} \end{figure} \cite{aab+20} reported the cumulative distribution of fluences for the periodic FRB 20180916B, fitting a power-law distribution $N(\textgreater F) \propto F^{\alpha + 1}$ with a break at low fluence due to sample incompleteness. Using a maximum-likelihood estimator (MLE), they fitted a power-law index $\alpha = -2.3 \pm 0.3$ and a cutoff at $5.2 \pm 0.1$~Jy~ms. This cutoff corresponded with a separate estimate of the fluence completeness limit using a Monte Carlo technique described by \cite{jcf+19}, which takes into account the effects of spectral energy distribution, source location along the beam, and daily gain variations. We perform the same analysis here for FRB 20201124A, the results of which are shown in \cref{fig:lum_func}. As in \cite{aab+20}, we first solve simultaneously for the power-law index and the turnover point $\hat{F}_{\rm min}$ using the best-fit values of fluence (excluding events for which only a fluence lower bound could be found). The best-fit $\hat{F}_{\rm min}$ is $17.19$~Jy~ms, marked by a vertical dashed black line in \cref{fig:lum_func}, is in good agreement with the separately estimated 90\% fluence completeness of $17$~Jy~ms. To account for the uncertainties in the measured fluences, we then generate multiple realizations of the fluences by treating each as a Gaussian variable with FWHM given by the errors in \cref{tab:burst_props}. For each of 5000 realizations, we run the MLE power-law fit, holding $F_{\rm min}$ fixed. The best-fit power-law index is $\alpha = -4.5 \pm 1.5 \pm 0.7$, where the first error is given by the mean of the MLE error across the ensemble and the second error is the standard deviation of the fitted spectral indices. This is much steeper than reported for previous repeaters \citep{wly+18,aab+20}, though given the large uncertainties, it is consistent with them. We note that FRB 20201210A has a fluence lower bound of $25.7$~Jy~ms, and is the only burst detected with a fluence bound above the turnover point in \cref{fig:lum_func} that was not included in the fit due to being outside the synthesized beam. The synthesized beam weighting, used in calibrating the sources used in this fit, is typically a factor between 1 and 2. It is possible that the true fluence of FRB 20201210A would shift our fitted power-law index to a shallower value. Nonetheless, our observed power-law index is still consistent with other repeaters and other observations of FRB 20201124A. \section{Discussion \& Conclusions} \label{sec:discussion} We have reported on the discovery of a new repeating FRB, 20201124A, previously announced by \citet{lan21} following prolific activity. This activity was noted by other groups who have already localized the source \citep{dbd+21,ltc+21,xnz+21} to a galaxy SDSS J050803.48+260338.0 at spectroscopic redshift $z = 0.0979 \pm 0.0001$ \citep{fdl+21}. We have presented the best-fit burst model parameters for 26 detected repeat bursts. Using the precise location provided by VLA/realfast and confirmed by others, we have calculated the full exposure time history of CHIME/FRB to the source position and applied beam-weighting to get better fluence estimates. Although CHIME/FRB only observes the location of FRB 20201124A for a limited time each day, the long and consistent history of CHIME's survey strongly suggests that the source of FRB 20201124A was not active for long prior to our initial detection. FRB 20121102A and FRB 20180916B both show periodic clusters of activity, with periods of 157 and 16.35~days, respectively \citep{aab+20, css+21}. The increased activity of FRB 20201124A in April could be one such cluster in a similar periodic process. However, we find no evidence of long-term periodicity in its repetition. The event rate appears to have declined by the beginning of May (see \cref{fig:chime_detections}). Future work will follow up on any repetitions observed after the last in this paper (2021 May 18). We observe an apparent bimodality of peak frequencies in pulse spectra. Some of the bursts occur low in the bandpass and are wider in time, while several are higher in the bandpass and are more compact in time. However, this apparent bimodality could be due to some yet undetermined selection effect in the CHIME/FRB pipeline; an analysis of baseband data, beyond the scope of this paper, should be illuminating. Some bursts show evidence of having more than one downward drifting component, and one burst (20201210A) can be fit well with two components. The degeneracy between multi-component structure and DM makes it difficult to get consistent fits for DM and scattering timescale. Taken at face value, the scattering times measured for the bursts (Table~\ref{tab:burst_props}) suggest that detection of this source at LOFAR radio frequencies will be impossible. For a 10-ms scattering time, assuming a typical $-4$ scattering index, at 100 MHz the scattering time will be 13 s. On the other hand, a LOFAR detection would signal a far shorter scattering time in the CHIME band, and imply that the bursts we have observed have broad intrinsic structure that is misinterpreted here as scattering, a possibility given the relatively narrow spectral extent and the possibility of unresolved structure. Given the known host spectroscopic redshift of $z = 0.0979 \pm 0.0001$ \citep{fdl+21}, the bursts reported on here have luminosities ranging from $7\times 10^{39}$ to $2 \times 10^{41}$~erg~s$^{-1}$, and energies in the range $9 \times 10^{37}$ to $3\times 10^{39}$~erg. These are unremarkable, in the midrange of those observed for repeating FRBs. The fluence index we observe, $-4.0 \pm 1.3 \pm 0.5$, is consistent with that observed for the repeating FRB 20180916B ($-2.3 \pm 0.3 \pm 0.1)$ in the same energy band. In a recent paper, \citet{mbm+21}, using uGMRT data, fitted a cumulative burst rate as a function of fluence of the form $R(\textgreater F) = 10~{\rm hr}^{-1} (F / F_c)^{\alpha + 1}$ with a power law index of $\alpha = -2.2 \pm 0.2$ and a completeness threshold of $F_c = 10$~Jy~ms over 550 -- 750~MHz. This is from a sample of 48 bursts from FRB 20201124A detected in a three hour observing window on 2021 April 05. Though their reported event rate is inconsistent with our analysis (see \S\ref{subsec:temporal}), their fluence distribution is consistent with our fitted $\alpha$ given our large uncertainties. \cite{wly+18} fit a power-law cumulative distribution to the burst energy, which is directly proportional to fluence, of FRB 20121102A, finding a power-law index of $\alpha = -2.16 \pm 0.24$. More recently, \citet{lwz+21} report $-1.85 \pm 0.30$ for FRB 20121102A, although the latter measurement, made with the very sensitive FAST telescope, is only valid at the high-energy end (above $\sim 5\times 10^{37}$ erg) in the 1.4-GHz frequency range, as below that value the luminosity distribution deviates strongly from a power-law \citep{lwz+21}.\footnote{However, \citet{agg21} dispute the findings of \citet{lwz+21}, arguing that the FAST fluences were likely overestimated such that the part of the luminosity function showing non-power-law behavior should actually be below the completeness threshold of FAST.} The recent uGMRT observations of FRB 20201124A support the possibility of a universal luminosity law for repeaters, and our results do not contradict theirs. FAST observations of FRB 20201124A, and of FRB 20180916B, will be interesting to see if these sources exhibit similar structure in their luminosity functions. \section{Acknowledgements} We are grateful to the staff of the Dominion Radio Astrophysical Observatory, which is operated by the National Research Council of Canada. CHIME is funded by a grant from the Canada Foundation for Innovation (CFI) 2012 Leading Edge Fund (Project 31170) and by contributions from the provinces of British Columbia, Qu\'{e}bec and Ontario. The CHIME/FRB Project, which enabled development in common with the CHIME/Pulsar instrument, is funded by a grant from the CFI 2015 Innovation Fund (Project 33213) and by contributions from the provinces of British Columbia and Qu\'{e}bec, and by the Dunlap Institute for Astronomy and Astrophysics at the University of Toronto. Additional support was provided by the Canadian Institute for Advanced Research (CIFAR), McGill University and the McGill Space Institute thanks to the Trottier Family Foundation, and the University of British Columbia. \allacks \bibliographystyle{aasjournal}
\section{Introduction} The family of distributions proposed by \cite{Lehmann1953} may be characterized by its cumulative distribution function (c.d.f) given by \[ G(z\mid {\bm \theta}, \alpha) = \Pr(Z \leq z \mid {\bm \theta}, \alpha) = [F(z\mid \vb*{\theta})]^\alpha \qc z \in \real, \, \alpha \in \real_{>0},\, \vb*{\theta} \subset \real^p \,(\text{where}\; p=\textrm{dim}(\vb*{ \theta})), \] and is called of standard $\alpha$-exponentiated distribution and use the notation $Z \sim \textbf{EXP}f_{\bm \theta}(\alpha)$. As $\alpha=1$ include as particular case the basal model, many distributions has been extended considering this method. To name a few, we have the exponentiated-Weibull \citep{Mudholkar1995}, the exponentiated-exponential \citep{GuptaKundu2001}, the exponentiated log-normal \citep{Kakde06}, the exponentiated gamma \citep{Nadarajah07} and the power piecewise exponential \citep{Gomez2018} models, among others. Particularly, \cite{Martinez-Florez2014} developed the standard $\alpha$-exponentiated Birnbaum-Saunders (\textbf{EXPBS}$f$) distribution, which c.d.f is given by \begin{equation*} G(t|\lambda,\beta,\alpha)=[F(a_t)]^\alpha\qc t,\lambda,\beta,\alpha \in \real_{>0}, \end{equation*} where $F(\cdot)$ is a c.d.f related to a distribution for a random variable with support in $\real$ and $a_t = \lambda^{-1}\left(\sqrt{t/\beta}-\sqrt{\beta/t}\right)$. Besides that, the probability density function (p.d.f) is \begin{equation*}\label{eq:3} g(t|\lambda,\beta,\alpha) = \alpha f(a_t)[F(a_t)]^{\alpha-1}\vdot \frac{t^{-3/2}(t+\beta)}{2\lambda\sqrt{\beta}}\qc t,\lambda,\beta,\alpha \in \real_{>0}, \end{equation*} where $f(\cdot) = \dd F(\cdot)$. The Birnbaum-Saunders (\textbf{BS}) distribution~\citep[][]{Birnbaum1969} corresponds to the case where $\alpha=1$ and $F=\Phi$, the c.d.f of the standard normal distribution. Without loss of generality and only for simplicity purpose, we consider that $g_t = g(t|\lambda,\beta,\alpha)$. For any $\tau \in (0,1)$ \begin{equation}\label{eq:qf} F^{-1}(\tau) = \inf\left\{t| F(t) \geq \tau \right\}, \end{equation} is called the $\tau$th quantile of $T$. To ensure that, $F^{-1}(1/2) = 0$, we will consider elliptical distributions about the origin. This result will be important for the formulation of the model proposed in this work. Let $Y$ be a random variable with elliptical distribution with location parameter $\mu \in \real$, dispersion parameter $\sigma \in \real_{>0}$, symmetric kernel $k(\cdot)$ and p.d.f given by \begin{equation}\label{eq:5} f(y | \mu, \sigma, k ) = \frac{1}{\sigma} \vdot k\left[\left(\frac{y-\mu}{\sigma}\right)^2\right]\qc y \in \real, \end{equation} where the function $k: \real \to \real_{>0}$ is such that $\int\limits_{0}^\infty k(u)\dd u$ and $\int\limits_{0}^{\infty}u^{-1/2}k(u)\dd u$ are finite. We have, when they exist, that $\textbf{E}(Y) = \mu$ and $\textbf{Var}(Y) = \phi \sigma$, where $\phi>0$ is a constant that may be obtained from the expected values of the radial variable or from the derivative of the characteristic. For example, for the Student's $t$ distribution with $\xi$ degrees of freedom one has $\phi = \xi/(\xi-2)$ for $\xi>2$. If $\mu=0$ and $\sigma = 1$ (the standard case) we can be rewriting \eqref{eq:5} as \begin{equation}\label{eq:sym} f(y| 0, 1, k ) = k\left(y^2\right)\qc y \in \real, \end{equation} and we will denote $Y \sim EL(0, 1, k)$. For some expressions of $k(x)$ and $F(x)$ for several elliptical distributions, see Table~\ref{tab:1}. \begin{table}[H] \caption{Expressions of $k(x)$ and $F(x)$ for some standardized elliptical distributions.} \centering \begin{tabular}{ccc} \toprule Distribution & $k(x)$ & $F(x)$ \\ \midrule Normal & $\frac{1}{\sqrt{2\pi}}\exp(x/2)$ & $\Phi(x)$ \\ Student' $t$& $\frac{\xi^{\xi/2}}{\Beta{1/2,\xi/2}}(\xi+x^2)^{-\frac{\xi+1}{2}} $& $\frac{1}{2} + \frac{x\, \Hypergeometric{2}{1}{1/2,1/2(\xi+1)}{3/2}{-x^2/\xi} }{\sqrt{\xi}\,\Beta{\frac{\xi}{2},\frac{1}{2}}}$\\ Logistic& $\frac{\exp(x)}{[1+\exp(x)]^2}$ & $\frac{\exp(x)}{1+\exp(x)}$ \\ Exponential Power& $\frac{\kappa}{2\Gamma(\kappa)}\exp\left(|x|^\kappa\right)$ & $\frac{1}{2}\left[1 + \frac{\textrm{sign}(x)}{\Gamma(1/\kappa)}\gamma(1/\kappa,|x|^\kappa) \right]$ \\ Cauchy & $\frac{1}{\pi(1 + x^2)}$ & $\frac{1}{\pi}\arctan(x) + \frac{1}{2}$ \\ \bottomrule \multicolumn{3}{l}{\footnotesize $\Beta{a,b}$ is the beta function and $\Gamma(a)$ is a gamma function.}\\ \multicolumn{3}{l}{\footnotesize $\Hypergeometric{2}{1}{a}{b}{x}$ is the hypergeometric function.}\\ \multicolumn{3}{l}{\footnotesize $\Phi(x) = \frac{1}{2}\Erf{ \frac{x}{\sqrt{2}} }$ where $\Erf{\cdot}$ is the error function.}\\ \multicolumn{3}{l}{\footnotesize $\gamma(s,x) = \int\limits_0^x t^{s-1}\exp(-t)\textrm{d}t$ is the lower incomplete gamma function.} \end{tabular} \label{tab:1} \end{table} Considering the density function given in \eqref{eq:sym} we have the following log density \begin{align}\label{eq:ll} \log(g_t) =& \underbrace{\log(k\left( {a^*_t}^2 \right)) + (\alpha -1)\log(\Psi(a_t))}_{\text{specific term}(\log(g_t^s))} \nonumber \\ &+ \underbrace{\log(\alpha) - \frac{3}{2}\log(t) + \log(t+\beta) - \log(2\lambda) - \frac{1}{2}\log(\beta)}_{\text{common term}(\log(g_t^c)) }. \end{align} where $\Psi(a_t) = \int\limits_{-\infty}^{a_t} k\left( u^2\right) \dd u $ is the c.d.f of the $EL(0, 1,k)$. Note that, the log density in \eqref{eq:ll} is divided in a specific term that depend of the kernel selected and a common term associated to Birnbaum-Saunders distribution. \cite{Martinez-Florez2014} discussed the flexibility of the \textbf{EXPBS}$f$ and some properties, such as moments and quantiles. However, such expressions are complicated and depend on each specific selection for $F(\cdot)$. Morevover, none of the parameters can be interpreted as a useful measure from the population (such as mean, mode, among others), except in the usual case $\alpha=1$, where $\beta$ is the median of the population. To counter this problem, henceforth we focuses on $F(\cdot)$ related to standardized elliptical distributions with support in $\real$ (see, Table~\ref{tab:1}). This variation of the \textbf{EXPBS}$f$ family, which generalizes the \cite{DIAZGARCIA2005445} family, can be called of \textbf{IRON} distribution due to the possibility of considering the heavy tails distributions. Additionally, in order to distinguish among the different models for $F$, we use the notation \textbf{IRON-N}, \textbf{IRON-t}, \textbf{IRON-L}, \textbf{IRON-EP} and \textbf{IRON-C} for the case of the normal, Student't, logistic, power exponential and Cauchy models, respectively. Quantile regression has had intense research activity in recent years for parametric models. See for instance, \cite{Galarza2017}, \cite{Gallardo2020} and \cite{Mazucheli2020}. However, up to this moment we only find the work of \cite{https://doi.org/10.1002/asmb.2556} related to the application of a \textbf{BS}-type distribution in this context. For those reasons, the aim of this paper is to provide a quantile regression model for positive continuous response variables based on a general class of \textbf{BS}-type distributions. More formally, we will consider $\alpha_\tau=-\log(\tau)/\log(2)$ fixed and we have, as a result \begin{equation} G(\beta|\lambda,\beta,\alpha_\tau)=[F(0)]^{\alpha_\tau}=(1/2)^{\alpha_\tau} = \tau, \label{eq.tau} \end{equation} i.e. fixing $\alpha = \alpha_\tau$, $\beta$ denotes the $\tau$th quantile of the distribution as defined in \eqref{eq:qf} for any elliptical c.d.f $F$. For $\alpha_\tau$, we denote the model as \textbf{RIRON}$_\tau $-F$(\beta,\lambda)$. Therefore, we define a rich class to perform quantile regression for positive data (not only for median regression) based on a class of \textbf{BS} type distributions. This article is divided as follows. Section~\ref{sec:2} presents a new proposal for quantile regression in a \textbf{BS}-type model. Section \ref{sec:3} discuss the diagnostic, residual analysis and some computational aspects for the model. Two simulation studies are reported in Section \ref{sec:4}. Section \ref{sec:5} presents a real data application related to the last study available (from 2016) for the chilean house-hold income. Finally, Section \ref{sec:6} presents final remarks related to our proposal. \section{A quantile regression model based on the BS distribution}\label{sec:2} \cite{https://doi.org/10.1002/asmb.2556} discussed a version of the \textbf{BS} model parametrized in terms of the $\tau$th quantile. This parametrization corresponds to take $Q_\tau=(\beta/4)(\lambda z_\tau+\sqrt{\lambda^2 z_\tau^2+4})^2$, where $z_\tau$ denotes the $\tau\times 100$th quantile of the standard normal model. We denote this model as \textbf{RBSQ}$_\tau(Q_\tau,\lambda)$. In this case, $Q_\tau$ is the $\tau$th quantile of the \textbf{RBSQ} model. The authors performed a regression analysis considering \begin{equation} \label{cs0} \vb{link}(Q_{\tau i}) = \eta_i(\tau)= \vb{x}^\top_i\vb*{\psi}(\tau)\qc (i = 1,\ldots, n), \end{equation} where $\vb*{\psi}(\tau) = (\psi_1(\tau), \ldots, \psi_p(\tau))^\top$ is vector of unknown regression coefficients, $\vb*{\psi}(\tau) \in \mathbb{R}^p$, with $p< n$, $\eta_{i}(\tau)$ is the linear predictor, and $\vb{x}_i = (x_{i1}, \ldots, x_{ip})^\top$ is observations on $p$ known regressors, for $i = 1, \ldots, n$. Furthermore, the authors assume that the matrix $\vb{X} = (\vb{x}_1, \ldots, \vb{x}_n)^\top$ have $\rank p$. Finally, $\vb{link}(\cdot)$ is strictly monotonic, invertible and a twice differentiable link function. In the fo\-llo\-wing proposition we prove that the \textbf{RBSQ}$_\tau$ model with any $\tau \in (0,1)$ and the regression structure defined in \eqref{cs0} define the same p.d.f. \begin{Proposition}\label{prop1} Let $Y_1 \sim \textbf{RBSQ}_\tau(Q_{\tau},\lambda)$ and $Y_2 \sim \textbf{RBSQ}_{\tau^\star}(R_{\tau^{\star}},\xi)$, where $Q_\tau=\vb{x}^\top\vb*{\psi}(\tau)$ and $R_{\tau^\star}=\vb{x}^\top\vb*{\varphi}(\tau^\star)$ and without loss of generality $0<\tau<\tau^\star<1$. If $\vb{x}$ includes an intercept term, then there is a one-to-one transformation from $(\vb*{\psi}(\tau)^\top,\lambda)$ to $(\vb*{\varphi}(\tau^\star)^\top,\xi)$, i.e., $Y_1$ and $Y_2$ are equal in distribution. \end{Proposition} \begin{Proof} Exploring the relation between the \textbf{BS} and the \textbf{RBSQ} distributions, for $Y_1$ we have that $Q_\tau=\beta \rho_\tau(\lambda)$ and $\alpha=\lambda$ and for $Y_2$ we have that $R_{\tau^\star}=\beta \rho_{\tau^\star}(\xi)$ and $\alpha=\xi$, where $\rho_\tau(u)=0.25\times (u z_{\tau}+\sqrt{u^2z_\tau^2+4} )^2$. Therefore, $\lambda=\xi$ and $Q_\tau=R_{\tau^\star} \times \rho_\tau(\lambda) / \rho_{\tau^\star}(\xi)$. The last equations implies that \[ \vb{link}^{-1}\left(\vb{x}^\top\vb*{\psi}(\tau)\right)=\vb{link}^{-1}\left(\vb{x}^\top\vb*{\varphi}(\tau^\star)\right)\times \rho_\tau(\lambda) / \rho_{\tau^\star}(\xi). \] As $\vb{x}^\top$ include an intercept term we can write $\vb{x}=(1,\vb{x}^{*\top})^\top$, $\vb*{\psi}(\tau)=(\psi_0(\tau),\vb*{\psi}^*(\tau))$ and $\vb*{\varphi}(\tau)=(\varphi_0(\tau^\star),\vb*{\varphi}^*(\tau^\star))$ and then \[ \vb{link}^{-1}\left(\psi_0(\tau)+\vb{x}^{*\top}\vb*{\psi}(\tau)\right)=\vb{link}^{-1}\left(\varphi_0(\tau^\star)+\vb{x}^{*\top}\vb*{\varphi}^*(\tau^\star)\right)\times \rho_\tau(\lambda) / \rho_{\tau^\star}(\xi). \] As $\vb{link}(\cdot)$ is strictly monotonic and invertible, we obtain the following relations for each choice of the link function. \begin{itemize} \item \textbf{log}: $\psi_0(\tau)=\varphi_0(\tau^\star)+\log \rho_\tau(\lambda)-\log \rho_{\tau^\star}(\lambda)$ and $\vb*{\psi}(\tau)=\vb*{\varphi}(\tau^\star)$. \item \textbf{identity}: $\psi_0(\tau)=\varphi_0(\tau^\star)\times \rho_\tau(\lambda) / \rho_{\tau^\star}(\lambda)$ and $\vb*{\psi}(\tau)=\vb*{\varphi}(\tau^\star)\times \rho_\tau(\lambda) / \rho_{\tau^\star}(\lambda)$. \item \textbf{squared root}: $\psi_0(\tau)=\varphi_0(\tau^\star)\times \sqrt{\rho_\tau(\lambda) / \rho_{\tau^\star}(\lambda)}$ and $\vb*{\psi}(\tau)=\vb*{\varphi}(\tau^\star)\times \sqrt{\rho_\tau(\lambda) / \rho_{\tau^\star}(\lambda)}$. \end{itemize} Note that in all the cases there is a one-to-one mapping from $(\vb*{\psi}(\tau)^\top,\lambda)$ to $(\vb*{\varphi}(\tau^\star)^\top,\xi)$, where follows the result. $\hfill\square$. \end{Proof} \begin{Corollary} The \textbf{RBSQ}$_\tau$ model with a regression structure for $Q_\tau$ and $\lambda$ constant provides the same log-likelihood function (and then, the same criteria based on its such as AIC and BIC) for any $\tau \in (0,1)$. \end{Corollary} \begin{Proof} It is a direct consequence of Proposition \ref{prop1}. $\hfill\square$. \end{Proof} Provided the limitation of the \textbf{RBSQ}$_\tau$ model in terms of modelling, we propose to study the \textbf{EXPBS}$f$ model using the property in equation (\ref{eq.tau}) as a concurrent model for positive data in a quantile regression model context. Considering $\alpha_\tau$ fixed, we suppose the $\tau$th quantile satisfies the following functional relation \begin{equation*}\label{cs1} \vb{link}(\beta_{\tau i}) = \eta_{i}(\tau) = \vb{x}^\top_i\vb*{\gamma}(\tau)\qc (i = 1,\ldots, n), \end{equation*} where $\vb*{\gamma}(\tau) = (\gamma_1(\tau), \ldots, \gamma_p(\tau))^\top$ is vector of unknown regression coefficients, $\vb*{\gamma}(\tau) \in \mathbb{R}^p$, with $p< n$ and we assume the same assumptions for the matrix $\vb{X}$ and the function $\vb{link}(\cdot)$ mentioned previously. For this model, we have the following proposition. \begin{Proposition}\label{prop2} Let $Y_1 \sim $\textbf{RIRON}$_\tau $-F$(\beta_\tau,\lambda)$ and $Y_2 \sim $\textbf{RIRON}$_{\tau^\star}$-F$(\zeta_{\tau^\star},\xi)$, where $\beta_\tau=\vb{x}^\top\vb*{\psi}(\tau)$ and $\zeta_{\tau^\star}=\vb{x}^\top\vb*{\varphi}(\tau^\star)$ and without loss of generality $0<\tau<\tau^\star<1$. Then, $Y_1$ and $Y_2$ are not equal in distribution. \end{Proposition} \begin{Proof} If $Y_1$ and $Y_2$ are equal in distribution, their c.d.f satisfy the following equality \[ \left[F\left(\frac{1}{\lambda}\left(\sqrt{\frac{t}{\beta_\tau}}-\sqrt{\frac{\beta_\tau}{t}}\right)\right)\right]^{\alpha_\tau}=\left[F\left(\frac{1}{\xi}\left(\sqrt{\frac{t}{\zeta_{\tau^\star}}}-\sqrt{\frac{\zeta_{\tau^\star}}{t}}\right)\right)\right]^{\alpha_{\tau^\star}}, \quad \forall t>0. \] For the models considered in Table \ref{tab:1}, such equation is valid only if $\lambda=\xi$, $\beta_\tau=\zeta_{\tau^\star}$ and $\alpha_\tau = \alpha_{\tau^\star}$. The last one is verified only if $\tau=\tau^\star$, producing a contradiction. Therefore, $Y_1$ and $Y_2$ are not equal in distribution. \end{Proof} Henceforth, to simplify the notation we remove $\tau$ in the parameters. The logarithm of the likelihood function for the parameters vector $\vb*{\theta} = (\vb*{\gamma},\lambda, \sigma)^\top$ considering a random sample of $n$ observations is given by % \begin{equation}\label{eq:loglik} \ell(\vb*{\theta}|\vb{y}) = \sum_{i=1}^n \log(g_{t_i}^s) + \sum_{i=1}^n \log(g_{t_i}^c), \end{equation} where $\log(g_t^s)$ and $\log(g_t^c)$ are defined in \eqref{eq:ll} with $\alpha = \alpha_\tau$. % \section{Residual and Diagnostic}\label{sec:3} In this Section we present the generalized Cook’s distance (GSD) in order to detect potential influent observations. We also present a kind of residual to discuss if the model is appropriated. Additionally, we also discuss some computational aspects of the model. \subsection{Generalized Cook's distance} In this Section we use a generalization of the Cook's distance~\citep{10.2307/1268249, https://doi.org/10.1111/j.2517-6161.1986.tb01398.x} with the objective of assess the influence of individual observations on the predicted conditional quantile of the response variable. In case of our proposed model, such generalization is defined as \[ \textrm{GCD}_i(\bm{\theta})=\frac{1}{q}\bigg[\big(\widehat{\bm{\theta}}-\widehat{\bm{\theta}}_{(i)}\big)^\top \widehat{\bm{\Sigma}}_{\widehat{\theta}}^{-1}\big(\widehat{\bm{\theta}}- \widehat{\bm{\theta}}_{(i)} \big)\bigg], \quad i = 1,\ldots,n, \] where $\bm{\theta} = (\bm \gamma^\top, \lambda, \xi)$, $q = \textrm{dim}(\bm{\theta})$, $\widehat{\bm{\Sigma}}_{^{\widehat{\theta}}}$ is an estimate of the variance-covariance matrix of $\widehat{\bm{\theta}}$, and $\widehat{\bm{\theta}}_{^{(i)}}$ is the MLE of $\widehat{\bm{\theta}}$ without considering the case $i$. If the interest is just on the $p\times 1$ vector of regression coefficients, $\bm \gamma = (\gamma_1, \ldots, \gamma_{p})^\top$, then $$ \textrm{GCD}_i({\bm \gamma})=\frac{1}{p}\bigg[\big(\widehat{\bm{\gamma}}-\widehat{\bm{\gamma}}_{(i)}\big)^\top \widehat{\bm{\Sigma}}_{\widehat{\gamma}}^{-1}\big(\widehat{\bm{\gamma}}- \widehat{\bm{\gamma}}_{(i)} \big)\bigg], \quad i = 1,\ldots,n. $$ The matrix $\widehat{\bm{\Sigma}}_{^{\widehat \theta}}$ can be approximated by $-\ddot{\bm \ell}^{-1}$. In addition, if we use a first order approximation of the type $ \widehat{\bm{\theta}}- \widehat{\bm{\theta}}_{^{(i)}} \approx \ddot{\bm \ell}_{^{(i)}}^{-1}\,\dot{\bm \ell}_{^{(i)}}$, we obtain \begin{equation*} \label{GCD} \textrm{GCD}_i(\bm{\theta}) \approx \frac{1}{q}\left(\dot{\bm \ell}_{(i)}^\top\, \ddot{\bm \ell}_{(i)}^{-1} (-\ddot{\bm \ell})\, \ddot{\bm \ell}_{(i)}^{-1}\, \dot{\bm \ell}_{(i)} \right), \quad i = 1,\ldots,n, \end{equation*} where $\dot{\bm \ell}_{(i)}$ and $\ddot{\bm \ell}_{(i)}$ are the score vector and Hessian matrix, respectively, without considering the case $i$, evaluated at $\bm{\theta} = \widehat{\bm{\theta}}$.\\ We implement the relative change (RC) to check the impact on the estimated components of the model for the detected influential cases. This measure is defined by computing the estimates removing influential cases and re-estimating the parameters as well as their corresponding standard errors (s.e) through the expressions \begin{equation*} \mbox{RC}_{\theta_{(i)}}=\left|\frac{\widehat{\theta}_t-\widehat{\theta}_{t(i)}}{\widehat{\theta}_t}\right|\times 100\% \qquad \mbox{and} \qquad \mbox{RC}_{\mbox{se}(\widehat{\theta}_{t(i)})}=\left|\frac{\mbox{se}(\widehat{\theta}_t)-\mbox{se}(\widehat{\theta}_{t(i)})}{\mbox{se}(\widehat{\theta}_t)}\right|\times 100\%, \end{equation*} where $\widehat{\theta}_{t(i)}$ and se$(\widehat{\theta}_{t(i)})$ denotes the MLE of $\theta_t$ and its corresponding s.e. \begin{comment} {\color{blue} In regression analysis the main interest is in the elements of the coefficient vector $\beta$. The Cook distance can be used to summarize essential information about the influence of each case on the estimated regression coefficients. It is a mathematical measure of the impact of deleting the case. This is considered as an important diagnostic tool of the global influence method; see Cook (1977) and Cook and Weisberg (1982). In case the \textbf{RIRON}$\tau$-F model, a generalization of the Cook distance based on $\bm{\theta} = (\bm \gamma^\top, \lambda, \xi)^\top$ is \begin{equation}\label{EGCD} \textrm{GCD}_i(\bm{\theta})=\frac{1}{p+q+1}\bigg[\big(\widehat{\bm{\theta}}-\widehat{\bm{\theta}}_{(i)}\big)^\top \widehat{\bm{\Sigma}}_{\widehat{\theta}}^{-1}\big(\widehat{\bm{\theta}}- \widehat{\bm{\theta}}_{(i)} \big)\bigg], \quad i = 1,\ldots,n, \end{equation} where $p$ is the number of regression coefficients of the RIRON$_\tau$-F model, $\widehat{\bm{\Sigma}}_{^{\widehat{\theta}}}$ is an estimate of the variance-covariance matrix of $\widehat{\bm{\theta}}$, and $\widehat{\bm{\theta}}_{^{(i)}}$ is the ML estimate of $\widehat{\bm{\theta}}$ without considering the case $i$. As mentioned, $\widehat{\bm{\Sigma}}_{^{\widehat \theta}}$ can be approximated by $-\ddot{\bm \ell}^{-1}$. In addition, if we use a first order approximation of the type $ \widehat{\bm{\theta}}- \widehat{\bm{\theta}}_{^{(i)}} \approx \ddot{\bm \ell}_{^{(i)}}^{-1}\,\dot{\bm \ell}_{^{(i)}}$, we obtain \begin{equation} \label{GCD} \textrm{GCD}_i(\bm{\theta}) \approx \frac{1}{p+1}\left(\dot{\bm \ell}_{(i)}^\top\, \ddot{\bm \ell}_{(i)}^{-1} (-\ddot{\bm \ell})\, \ddot{\bm \ell}_{(i)}^{-1}\, \dot{\bm \ell}_{(i)} \right), \quad i = 1,\ldots,n, \end{equation} where $\dot{\bm \ell}_{(i)}$ and $\ddot{\bm \ell}_{(i)}$ are the score vector and Hessian matrix associated with the tobit-$t$ model defined in \eqref{U} and \eqref{H}, respectively, without considering the case $i$, evaluated at $\bm{\theta} = \widehat{\bm{\theta}}$. The approximation given in (2) facilitates the calculation of \textrm{GCD} since that avoid the calculation of $\widehat{\bm{\theta}}$ eliminating the case $i$, for each $i=1,\ldots, n$, and so this estimator is only computed once. When the interest is just on the $p\times 1$ vector of regression coefficients, $\bm \beta = (\beta_1, \ldots, \beta_p)^\top$, then $$ \textrm{GCD}_i(\bm{\bm \beta})=\frac{1}{p}\bigg(\big(\widehat{\bm{\beta}}-\widehat{\bm{\beta}}_{(i)}\big)^\top \widehat{\bm{\Sigma}}_{\widehat{\beta}}^{-1}\big(\widehat{\bm{\beta}}- \widehat{\bm{\beta}}_{(i)} \big)\bigg), \quad i = 1,\ldots,n. $$ Thus, again we can use the approximation given in \eqref{GCD} for avoiding the calculation of $\widehat{\bm{\beta}}_{(i)}$ for each $i=1,\ldots, n$. As benchmark, we can also use the value $2/n$, see Zhu and Zhang (2004), Barros et al. (2010). For a residual analysis, with goal to study departures from the error assumptions as well as the presence of atypical cases, we suggest to work with quantile residual. In particular for the RIRON$\tau$-F model, we have that } \end{comment} \subsection{Quantile residuals} Perform a residual diagnostic is crucial to validate a model applied to a data set. Given the simplicity of the c.d.f for the \textbf{RIRON}$_\tau $-F, an ad hoc residual is given by the randomized quantile residuals (rQR) presented in \cite{Dunn1996}. In our case, such residuals are given by \begin{equation*} \text{rQR}_i=\Phi^{-1}\left\{F\left[\frac{1}{\lambda}\left(\sqrt{\frac{t_i}{\beta_{\tau i}}}-\sqrt{\frac{\beta_{\tau i}}{t_i}}\right)\right]^{\alpha_\tau}\right\}, \qquad i=1,\ldots,n. \end{equation*} If the fitted model is appropriated for the data, $\text{rQR}_1, \ldots, \text{rQR}_n$ should be a random sample for the standard distribution, which can be verified using different normality tests: Kolmogorov-Smirnov (KS), Anderson-Darling (AD), Shapiro-Wilks (SW), Cram\'er-Von Mises (CVM), among others. See \cite{Yap2011} for a discussion about those tests. \subsection{Computational Aspects} To compute the maximum likelihood estimation for $\vb*\theta$, the log-likelihood function defined in \eqref{eq:loglik} must be maximized. We do not obtain an elegant ``closed-form'' solution, but \eqref{eq:loglik} can be maximized using iterative procedures such as the Newton-Raphson, BFGS, BHHH and SANN methods. We developed an \verb!R! package called \verb!IRON! that provides a set of tools for fit and diagnostics of the quantile regression model based in the \textbf{IRON} distribution. For example, the function \verb!quant_reg()! is used to fit quantile regression models, specified by giving a symbolic description of the linear predictor and a description of the kernel. The current version is stored on \verb!GitHub! and can be downloaded using \begin{lstlisting}[language=R] devtools::install_github("santosneto/IRON") \end{lstlisting} \section{Numerical studies}\label{sec:4} In this section, we would like to demonstrate the performance of the maximum likelihood estimators under two scenarios. In our first scenario, we consider a real data set, while, in the second scenario, we use artificial data sets. \subsection{Scenario \#1} A subset of the data considered here were previously analysed by \cite{https://doi.org/10.1002/asmb.2556}. The full data consist of Chilean House Hold Income for the year 2016. It can be obtained by the National Statistics Institute of Chile, which are available at \url{http://www. ine.cl/estadisticas/ingresos-y-gastos/esi/base-de-datos}. Based in the application presented in \cite{https://doi.org/10.1002/asmb.2556}, we consider the following variable: household income ($T$), the total income due to salaries ($X_1$), the total income due to independent work ($X_2$) and the total income due to retirements ($X_3$). In each iteration (1000 replicates), we consider 100 observations selected (randomly) from the full data set and we fit the following model \[ \beta_i = \gamma_1 + \gamma_2 x_{1i} + \gamma_3 x_{2i} + \gamma_4 x_{3i}, \quad i = 1, \ldots, 100, \] where $T_i \sim $\textbf{RIRON}$_\tau$-F$(\lambda, \beta_i, \xi; k(\cdot))$ and $\tau$ is fixed. During the simulations, we consider two cases: (i) we can force the same sample in each iteration and we fit one model for each value of $\tau$ and family (more realistic); (ii) for each value of $\tau$ (separately) we fit the model considering the families \textbf{N}, $\mathbf{t}$, \textbf{L} and \textbf{EP}. In both cases, our interest is to verify the percentage that each model is selected considering the AIC. The fit was realized by function \verb!quant_reg()! of the \verb!R! package \verb!IRON!. Table~\ref{tab:2} we present the percentage that each model is selected considering the AIC - Case I. Here we should analyze the results and check which model is chosen more often considering the different values of $\tau$ and families. The model chosen most often is potentially the best fit. From the results obtained, we can conclude that for $\tau = 0.1, 0.2, 0.3$ and $0.4$, the model with kernel \textbf{EP} presented the best fit for all samples. For $\tau = 0.5$, the model with kernel \textbf{EP} was selected on 53.2\% of the samples. The model with kernel \textbf{t} was selected for most samples when considering $\tau = 0.6$ and $0.7$. Finally, for $\tau = 0.8$ and $0.9$, the model that presented the best performance was the model with kernel \textbf{N}. \begin{table}[ht] \centering \caption{Percentage that each model is selected considering the AIC - Case I.} \begin{tabular}{ccccc} \toprule \multirow{2}*{$\tau$} & \multicolumn{4}{c}{Kernel}\\ \cmidrule{2-5} & Normal & Student'$t$ & Logistic & Exponential Power \\ \midrule 0.1 & 0.0 & 0.0 & 0.0 & \textbf{100.0}\\ 0.2 & 0.0 &0.0 & 0.0 &\textbf{100.0}\\ 0.3 & 0.0 &0.0 & 0.0 &\textbf{100.0}\\ 0.4 & 0.0 &0.0 & 0.0 &\textbf{100.0}\\ 0.5 & 0.6 & 35.6 & 10.6 & \textbf{53.2} \\ 0.6 & 2.8 & \textbf{69.0} & 28.2 & 0.0 \\ 0.7 & 11.7 & \textbf{45.5} & 42.8 & 0.0 \\ 0.8 & \textbf{37.1} & 33.3 & 29.6 & 0.0 \\ 0.9 & \textbf{70.6} & 25.0 & 4.4 & 0.0 \\ \bottomrule \end{tabular} \label{tab:2} \end{table} Table \ref{tab:3} we present the percentage of times that each model is selected considering the AIC - Case II. For each value of $\tau$, we check which family has the highest percentage of choice, i.e, the best model for a specific value of $\tau$. Thus, with the results obtained we have to $\tau = 0.6$ and $0.9$ the model with kernel $\mathbf{t}$ is the selected. While considering $\tau = 0.1, 0.2, 0.3, 0.4$ and $0.5$ we select the model with kernel \textbf{EP}. Finally, note that for $\tau = 0.7$ and $0.8$ the model with kernel \textbf{L} is the model selected. \begin{table}[ht] \centering \caption{Percentage that each model is selected considering the AIC - Case II.} \begin{tabular}{ccccc} \toprule \multirow{2}*{$\tau$} & \multicolumn{4}{c}{Kernel}\\ \cmidrule{2-5} & Normal & Student'$t$ & Logistic & Exponential Power \\ \midrule 0.1 & 0.0 & 0.0 & 0.0 & \textbf{100.0}\\ 0.2 & 0.0 &0.0 & 0.0 &\textbf{100.0}\\ 0.3 & 0.0 &0.0 & 0.0 &\textbf{100.0}\\ 0.4 & 0.0 &0.0 & 0.0 &\textbf{100.0}\\ 0.5 & 0.1 &29.8 & 13.1 &\textbf{57.0}\\ 0.6 & 1.6 &\textbf{62.6} &35.8 &0.0\\ 0.7 & 5.2 & 41.5 & \textbf{53.3}& 0.0\\ 0.8 & 20.4 & 37.3 & \textbf{42.3}& 0.0\\ 0.9 & 40.1 & \textbf{57.3} & 2.6 &0.0\\ \bottomrule \end{tabular} \label{tab:3} \end{table} \subsection{Scenario \#2} This study employs a Monte Carlo simulation to evaluate the performance of four kernels under different size sample . In this scenario, the aim is to analyse the return of the maximum likelihood estimates of the parameters of the models. We evaluated their performances by measuring their relative bias (RB) and root mean squared error (RMSE) based on 5000 replications of the model \[ \beta_i = 0.5 + 1.5 x_{i1} - 0.5 x_{i2}, \quad i = 1, \ldots, n_{\text{obs}}, \quad (n_{\text{obs}} \in \{30, 100, 600\}), \] where $x_{i1}$ and $x_{i2}$ are distributed uniformly on the interval (0,1). The values generated this variables are kept fixed on each replication. We assume that $T_i \sim \textbf{RIRON}(2.0, \beta_i, \xi; k(\cdot))$, considering the kernels: \textbf{N}, $\mathbf{t}$, \textbf{L} and \textbf{EP}. For the kernels $\mathbf{t}$ and \textbf{EP} we have that $\xi = 4.0$ and for other kernels $\xi$ is not defined. A pseudo-random number generator was used to produce independent random variables $T_i$. We use the function \verb!riron()!, which generates random variables from the IRON distribution, and the fit was realized by function \verb!quant_reg()! both of the \verb!R! package \verb!IRON!. Table~\ref{tab:tab4} we present the RB and RMSE estimated under different kernels. The result in Table~\ref{tab:tab4} are now discussed for each distribution. \begin{enumerate} \item \textbf{Normal}: The RB of the MLE's of $\lambda$, $\gamma_1$, $\gamma_2$ and $\gamma_3$ are negative. For the MLE of $\gamma_1$, only for $n_{\text{obs}} = 600$ the RB is negative. The reduction of the RB's of the estimators were: 96\% ($\widehat{\lambda}$), 93\% ($\widehat{\gamma}_1$), 62\% ($\widehat{\gamma}_2$) and 50\% ($\widehat{\gamma}_3$). As we can see, in Table~\ref{tab:tab4}, the greatest reduction occur for $\widehat{\lambda}$. In the case of RMSE we can observe that all the estimates present reduction with the increase of the sample size. We can highlight the estimator $\widehat{\gamma}_2$, which presented a reduction of 81\%. \item \textbf{Student't}: For the model with kernel Student't note that the MLE, which presented greater reduction of RB was $\widehat{\xi}$ with a reduction of 99.8\%. Now, for the RMSE we have that the MLE, which presented greater reduction was also $\widehat{\xi}$ with 99.6\%. \item \textbf{Logistic}: Analysing the results obtained, we can see that the MLE which presented the lower reduction of RB with the increase of the sample size was $\widehat{\gamma}_3$ . This MLE presented a reduction of 50.6\%. This represents a value 41,8\% lower than the average reduction of the others MLE's. Besides, for RMSE we have that the worst performing MLE is $\widehat{\gamma}_1$ with reduction of 78.9\%. \item \textbf{Exponential Power}: Finally, we discuss the results for the kernel \textbf{EP}. For this kernel note that the MLE of $\xi$ is quite biased for small sample. For example, for $n = 30$ the RB is 120.294. However, with the growth of the sample, this bias falls sharply (for $n = 600$ the RB is 0.042). The same situation is observed for the RMSE. \end{enumerate} \begin{table}[H] \centering \caption{RB and RMSE estimated for $\tau = 0.5$, $\lambda = 2.0$ and $\xi = 4.0$ under different kernels.} \begin{tabular}{c ccccc c ccccc}\toprule \multirow{2}*{$n$} & \multicolumn{5}{c}{RB} &&\multicolumn{5}{c}{RMSE} \\ \cmidrule{2-6} \cmidrule{8-12} & $\widehat{\lambda}$ & $\widehat{\xi}$ & $\widehat{\gamma}_1$ & $\widehat{\gamma}_2$ & $\widehat{\gamma}_3$ & & $\widehat{\lambda}$ & $\widehat{\xi}$ & $\widehat{\gamma}_1$ & $\widehat{\gamma}_2$ & $\widehat{\gamma}_3$ \\ \cmidrule{1-12} \multicolumn{12}{c}{Normal}\\ \cmidrule{2-12} 30 & -0.077 & $\times$ & 0.101 &-0.016& -0.056 && 0.303& $\times$ & 0.386 & 0.728&0.517 \\ 100 & -0.021&$\times$&0.030&-0.011&-0.022 &&0.147&$\times$ &0.211 &0.352 & 0.240 \\ 600 &-0.003&$\times$ &-0.007 & -0.006 & -0.028 &&0.059&$\times$ & 0.092 &0.141 & 0.103 \\ \midrule \multicolumn{12}{c}{Student' t}\\ \cmidrule{2-12} 30 & -0.029 & 34.515 &0.273 &0.080&0.081 && 0.563 & 250.135& 0.628 & 1.155 & 0.806 \\ 100 & 0.022 & 4.510 &0.056&-0.010&-0.024 && 0.282 &85.532 &0.296 & 0.497 & 0.333 \\ 600 & 0.005 & 0.075 &$<$0.001&-0.009&-0.028 && 0.106 &0.945 &0.126 & 0.192 & 0.140\\ \midrule \multicolumn{12}{c}{Logistic}\\ \cmidrule{2-12} 30 & -0.069 &$\times$ & 0.220 &-0.031 &-0.081 &&0.348 &$\times$ &0.588 &1.052 & 0.786 \\ 100 &-0.018 &$\times$ & 0.065 & -0.022& -0.028 && 0.173 &$\times$ &0.297 & 0.487 &0.340 \\ 600 &-0.003 &$\times$ & -0.006& -0.010 &-0.040 && 0.070 &$\times$ &0.124 & 0.192 & 0.140 \\ \midrule \multicolumn{12}{c}{Exponential Power}\\ \cmidrule{2-12} 30 & -0.080 & 120.294 & 0.057& 0.015 & -0.029 && 0.346& 653.225& 0.281& 0.485& 0.396 \\ 100 &-0.003 & 0.377 & 0.009& -0.001& -0.007 && 0.156& 3.556& 0.125& 0.210 & 0.144 \\ 600 &0.001 & 0.042& -0.003 & -0.002 & -0.011 && 0.062& 0.553& 0.052& 0.081& 0.058 \\ \bottomrule \end{tabular} \label{tab:tab4} \end{table} \section{Application}\label{sec:5} In this Section we reanalized a data set related to the household income in Chile illustrated in \cite{https://doi.org/10.1002/asmb.2556} based on the \textbf{RBSQ} model. \subsection{Household income in Chile} This data set corresponds to chilean house-hold income in the year 2016 (the last study avaliable up to this moment) collected by the National Institute of Statistics, Chile, which are available at https://www.ine.cl/estadisticas/sociales/ingresos-y-gastos/encuesta-de-presupuestos-familiares. \cite{https://doi.org/10.1002/asmb.2556} consider a subsample of size $n = 100$ cases randomly selected from the full data set and for comparative purposes we considered the same cases. The response variable is the household income in thousands of Chilean pesos ($Y$), whereas the covariates to be considered in the analysis are the total income due to salaries ($X_1$), the total income due to independent work ($X_2$) and the total income due to retirements ($X_3$). A descriptive analysis of the variables is presented in Table \ref{tab:desc1}. \begin{table}[H] \centering \caption{Descriptive statistics for income data (in thousands of Chilean pesos).} \begin{tabular}{crrrrrrrrr}\toprule Variable & Mean & Median & SD & CV & CS & CK & Min & Max & $n$ \\ \midrule $Y$ & 938.14 & 698.78 & 837.52 & 0.89 & 2.45 & 11.03 & 70.00 & 5369.95 & 100\\ $X_1$ & 401.26 & 254.42 & 547.91 & 1.37 & 2.32 & 10.21 & 0.00 & 3231.38 & 100\\ $X_2$ & 172.46 & 0.00 & 467.60 & 2.71 & 3.96 & 19.90 & 0.00 & 3005.01 & 100\\ $X_3$ & 88.63 & 0.00 & 212.56 & 2.40 & 3.53 & 16.81 & 0.00 & 1299.32 & 100\\ \bottomrule \end{tabular} \label{tab:desc1} \end{table} We propose to consider that $Y_i\sim $\textbf{RIRON}$\tau$-F$(\beta_i, \lambda)$, where \begin{equation*} \beta_{\tau i}=\beta_0 + \beta_1 X_1 + \beta_2 X_2 +\beta_3 X_3, \quad i=1,\ldots,n. \end{equation*} We considered $\tau=0.5$ (the median) in order to compare our proposal with the model in \cite{https://doi.org/10.1002/asmb.2556}. Additionally, we also considered $\tau=0.4$ because in Chile the most of the social benefits are given to families that belong to the lowest 40\% of the country's income (see http://www.registrosocial.gob.cl/beneficios-sociales). For this data set and considering the log, identity and sqrt link, the better results are given for the identity model. Therefore, we focused in this link. AIC and BIC criteria are presented in Table \ref{tab:est1}. Note that the \textbf{RIRON-EP} model attached the minimum AIC and BIC criteria among the fitted models for this data set in both, $\tau=0.4$ and $\tau=0.5$. We also highlight that for the median ($\tau=0.5$), the \textbf{RIRON-N} model coincides with the \textbf{RBSQ} model and for $\tau=0.4$ the AIC and BIC are 1395.7 and 1408.7, respectively, higher than the obtained for the models in Table \ref{tab:est1}. We present the QRs in Figure \ref{graf:QR} the QRs. Note that for the \textbf{N} case, there are two points out of range $(-3,3)$ for those residuals, whereas for the rest of models there are no points outside of such range. Figure \ref{graf:cook} also shows the Cook's distance for the fitted models, where the \textbf{RIRON-EP} model has less possible influent observations (2 versus 6 for the rest of the models), suggesting that this model is more robust in comparison with its competitors. Finally, Figure \ref{graf:env} shows the envelope for the QRs, where also the \textbf{RIRON-EP} shows a better fit for those residuals in relation to the normal distribution. The three graphical tool suggest than the \textbf{RIRON-EP} model provides a better fit for this data set than the rest of the models.\\ To illustrate the difference among the estimation of different models, we consider a family with 3 people contributing to the household income: one who works for the minimum wage in Chile (after social security and health discounts approximately 265 thousands of Chilean pesos) and two retirees receiving the minimum value of a pension (approximately 160 thousands of Chilean pesos), without independent work. Under this characteristics, the \textbf{RIRON-N} model estimate that the most vulnerable 40\% of the Chilean population receives at most 750.264 thousands of Chilean pesos, whereas under the \textbf{RIRON-EP} model such estimate is at most 808.199 thousands of Chilean pesos. In other words, the \textbf{RIRON-N} model underestimate the household income in the value of approximately one basic food basket, a measure used in Chile representing the minimum threshold of requirements to a person obtain 2,000 calories per day in a month in Chile (see \url{http://observatorio.ministeriodesarrollosocial.gob.cl/storage/docs/cba/nueva_serie/2021/Valor_CBA_y_LPs_21.01.pdf}). Figure \ref{graf:env} shows the envelopes for the rQR for the four models in the \textbf{RIRON} class for $\tau=0.5$. The minimum $p$-value for the KS, AD, SW and CVM tests are 0.3265, 0.0917 and 0.7542 for the \textbf{IRON-t}, \textbf{IRON-L} and \textbf{IRON-EP} models, respectively, suggesting that the three mentioned models are reasonable for this data set. However, the AD, SW and CVM have a related $p$-value of 0.0064, 0.0052 and 0.0131 for the \textbf{IRON-N} model, respectively. This result suggests that the \textbf{IRON-N} (which matchs with the \textbf{RBSQ} model for the median case) is not appropriate for this data set. \begin{table}[H] \centering \caption{Descriptive statistics for income data (in thousands of Chilean pesos).} \begin{tabular}{c c r r r r r r r r} \toprule \multirow{3}*{$\tau$}& \multirow{3}*{Parameter} & \multicolumn{8}{c}{Kernel}\\ \cmidrule{3-10} & & \multicolumn{2}{c}{Normal} & \multicolumn{2}{c}{Student't} & \multicolumn{ 2}{c}{Logistic } & \multicolumn{ 2}{c}{ Exponential Power} \\ \cmidrule{3-10} & & estimate & s.e. & estimate & s.e. & estimate & s.e. & estimate & s.e. \\ \midrule \multirow{6}*{$0.4$} & $\beta_0$ & 177.729 & 10.695 & 138.737 & 13.086 & 158.542 & 12.328 & 157.814 & 6.062 \\ & $\beta_1$ & 0.959 & 0.108 & 1.017 & 0.064 & 0.995 & 0.081 & 0.969 & 0.024\\ & $\beta_2$ & 1.021 & 0.194 & 1.182 & 0.113 & 1.105 & 0.153 & 1.253 & 0.052\\ & $\beta_3$ & 0.995 & 0.144 & 1.109 & 0.121 & 1.044 & 0.134 & 1.230 & 0.100\\ & $\lambda$ & 0.394 & 0.021 & 0.249 & 0.038 & 0.207 & 0.015 & 0.151 & 0.065\\ & $\xi$/$\kappa$ & \multicolumn{ 2}{c}{-} & 2.557 & 1.085 & \multicolumn{ 2}{c}{-} & 0.743 & 0.148\\ \cmidrule{2-10} & AIC & \multicolumn{ 2}{c}{1395.1} & \multicolumn{ 2}{c}{1382.8} & \multicolumn{ 2}{c}{1385.8} & \multicolumn{ 2}{c}{{\bf 1358.0}} \\ & BIC & \multicolumn{ 2}{c}{1408.1} & \multicolumn{ 2}{c}{1398.5} & \multicolumn{ 2}{c}{1398.8} & \multicolumn{ 2}{c}{{\bf 1373.6}} \\ \midrule \multirow{6}*{$0.5$} & $\beta_0$ & 198.148 & 11.727 & 163.689 & 15.638 & 181.628 & 14.152 & 183.442 & 15.122 \\ & $\beta_1$ & 1.044 & 0.119 & 1.057 & 0.071 & 1.050 & 0.086 & 0.999 & 0.058 \\ & $\beta_2$ & 1.109 & 0.218 & 1.216 & 0.131 & 1.161 & 0.169 & 1.223 & 0.112 \\ & $\beta_3$ & 1.086 & 0.158 & 1.159 & 0.136 & 1.118 & 0.148 & 1.118 & 0.124 \\ & $\lambda$ & 0.365 & 0.019 & 0.243 & 0.036 & 0.191 & 0.014 & 0.262 & 0.080 \\ & $\xi$/$\kappa$ & \multicolumn{ 2}{c}{-} & 3.046 & 1.382 & \multicolumn{ 2}{c}{-} & 1.001 & 0.210 \\ \cmidrule{2-10} & AIC & \multicolumn{ 2}{c}{1395.7} & \multicolumn{ 2}{c}{1386.0} & \multicolumn{ 2}{c}{1387.1} & \multicolumn{ 2}{c}{{\bf 1385.4}} \\ & BIC & \multicolumn{ 2}{c}{1408.7} & \multicolumn{ 2}{c}{1401.6} & \multicolumn{ 2}{c}{1400.1} & \multicolumn{ 2}{c}{{\bf 1401.0}} \\ \bottomrule \end{tabular} \label{tab:est1} \end{table} On the other hand, the robustness of the \textbf{IRON-EP} model is illustrated through the GDC in Figure \ref{graf:cook}, because the \textbf{IRON-EP} model has only two potential influent observations versus six observations for the rest of fitted models. As illustrated in Table \ref{tab:est.dropped}, the main differences in the estimation with and without the highlighted observations are produced for the SE terms for the \textbf{IRON-EP} model. However, such differences no modify the significance of any parameter. \begin{figure}[H] \begin{subfigure}[b]{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figura1.pdf} \caption{\textbf{N}} \end{subfigure} \hfill \begin{subfigure}[b]{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figura2.pdf} \caption{\textbf{t}} \end{subfigure} \hfill \begin{subfigure}[b]{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figura3.pdf} \caption{\textbf{L}} \end{subfigure} \hfill \begin{subfigure}[b]{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figura4.pdf} \caption{\textbf{EP}} \end{subfigure} \caption{rQRs for different quantile regression model for $\tau=0.5$ in the \textbf{RIRON} class: \textbf{N}, \textbf{t}, \textbf{L} and \textbf{EP}.} \label{graf:QR} \end{figure} \begin{figure}[H] \begin{subfigure}[b]{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figura9.pdf} \caption{\textbf{N}} \end{subfigure} \hfill \begin{subfigure}[b]{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figura10.pdf} \caption{\textbf{t}} \end{subfigure} \hfill \begin{subfigure}[b]{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figura11.pdf} \caption{\textbf{L}} \end{subfigure} \hfill \begin{subfigure}[b]{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figura12.pdf} \caption{\textbf{EP}} \end{subfigure} \caption{Envelopes for the QRs for different quantile regression model for $\tau=0.5$ in the \textbf{RIRON} class: \textbf{N}, \textbf{t}, \textbf{L} and \textbf{EP}.} \label{graf:env} \end{figure} \begin{figure}[H] \begin{subfigure}[b]{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figura5.pdf} \caption{\textbf{N}} \end{subfigure} \hfill \begin{subfigure}[b]{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figura6.pdf} \caption{\textbf{t}} \end{subfigure} \hfill \begin{subfigure}[b]{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figura7.pdf} \caption{\textbf{L}} \end{subfigure} \hfill \begin{subfigure}[b]{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figura8.pdf} \caption{\textbf{EP}} \end{subfigure} \caption{Cook's distance for different quantile regression model for $\tau=0.5$ in the \textbf{RIRON} class: \textbf{N}, \textbf{t}, \textbf{L} and \textbf{EP}.} \label{graf:cook} \end{figure} \begin{table}[H] \centering \caption{RCs (in \%) in ML estimates and their corresponding se's for the indicated parameter and dropped cases and respective $p$-values for the \textbf{IRON-PE} model in household income in Chile.} \begin{tabular}{ccrrrrrr} \toprule \multirow{2}*{Dropped Cases}&\multirow{2}*{Component} & \multicolumn{6}{c}{Parameter}\\ \cmidrule{3-8} & & $\beta_0$ & $\beta_1$ & $\beta_2$ & $\beta_3$ & $\lambda$ & $\kappa$ \\ \midrule \multirow{3}*{32} & RC$_{\widehat{\theta}_{t(i)}}$ & 6.84 & 0.22 & 1.79 & 5.58 & 1.14 & 3.35 \\ & RC$_{\mbox{se}(\widehat{\theta}_{t(i)})}$ & 4.98 & 1.92 & 2.29 & 0.73 & 1.12 & 2.25 \\ & $p$-value & $<$0.0001 & $<$0.0001 & $<$0.0001 & $<$0.0001 & 0.0008 & $<$0.0001 \\ \midrule \multirow{3}*{85} & RC$_{\widehat{\theta}_{t(i)}}$ & 5.33 & 3.74 & 1.67 & 4.35 & 17.58 & 11.49 \\ & RC$_{\mbox{se}(\widehat{\theta}_{t(i)})}$ & 9.76 & 20.45 & 35.25 & 17.14 & 3.25 & 10.79 \\ & $p$-value & $<$0.0001 & $<$0.0001 & $<$0.0001 & $<$0.0001 & 0.0053 & $<$0.0001 \\ \midrule \multirow{3}*{\{32, 85\}} & RC$_{\widehat{\theta}_{t(i)}}$ & 12.02 & 3.20 & 2.45 & 9.27 & 20.76 & 11.67 \\ & RC$_{\mbox{se}(\widehat{\theta}_{t(i)})}$ & 15.23 & 29.63 & 24.84 & 35.44 & 10.85 & 15.73 \\ & $p$-value & $<$0.0001 & $<$0.0001 & $<$0.0001 & $<$0.0001 & 0.0036 & $<$0.0001 \\ \bottomrule \end{tabular} \label{tab:est.dropped} \end{table} \section{Discussion and Conclusion}\label{sec:6} Quantile regression and the Birnbaum-Saunders distribution have been widely used in many fields. Based on the family of distributions called standard $\alpha$-exponentiated Birnbaum-Saunders and standardized symmetrical distributions, we built a family of distributions called \textbf{IRON}. The manuscript presents, $\textbf{RIRON}_\tau \mathrm{-F}(\beta_\tau,\lambda)$, a quantile regression framework that allows to model different levels of flatness. The approach combines the idea of propose a quantile regression model considering the \textbf{IRON} distribution. This model generalizes the model proposed by \cite{https://doi.org/10.1002/asmb.2556} and makes modeling flexible. Experimental study with one real-world dataset demonstrated the good performance of the presented method. In particular, the new approach with kernel \textbf{EP} presented promissory results. \section*{Acknowledgment} "Research carried out using the computational resources of the Center for Mathematical Sciences Applied to Industry (CeMEAI) funded by FAPESP (grant 2013/07375-0)." \begin{comment} \begin{table}[H] \centering \caption{Elements} \begin{tabular}{cccc} \toprule Function & Parameter & Result & Symbol \\ \midrule $a_t$ & $\beta$ & $ -\frac{(\sqrt{t/\beta} + \sqrt{\beta/t})}{2\beta\lambda}$ & $ \grad$ \\ & $\lambda$ & $-\frac{1}{\lambda}a_t$ & ${\color{blue} \grad}$ \\ & $\sigma$ & 0 & ${\color{red} \grad}$ \\ \midrule $\log(k({a_t^*}^2))$& $\beta$ & $\frac{2\vdot a_t}{\sigma^2} \vdot \frac{k'({a_t^*}^2)}{ k({a_t^*}^2)}\vdot \grad$ & ${\circledast}$ \\ & $\lambda$ & $ \frac{2\vdot a_t}{\sigma^2} \vdot \frac{k'({a_t^*}^2)}{ k({a_t^*}^2)}\vdot {\color{blue}\grad}$ & $ {\color{blue}\circledast}$ \\ & $\sigma$ & $-\frac{2\vdot a_t^2}{\sigma^3} \vdot \frac{k'({a_t^*}^2)}{k({a_t^*}^2)} $ & ${\color{red}\circledast}$ \\ \midrule $\log(\Psi(a_t))$ & $\beta$ & $ \frac{1}{\sigma}\vdot\frac{k({a_t^*}^2)}{\Psi(a_t)} \vdot \grad $ & $ {\divideontimes}$ \\ & $\lambda$ & $\frac{1}{\sigma}\vdot\frac{k({a_t^*}^2)}{\Psi(a_t)} \vdot {\color{blue}\grad} $ & ${\color{blue}\divideontimes}$ \\ & $\sigma$ & $\frac{1}{\Psi(a_t)} \pdv{\Psi(a_t)}{\sigma} $ & ${\color{red}\divideontimes}$ \\ \midrule $\log(g_t^s)$ & $\beta$ & $ \circledast + (\alpha_\tau-1)\divideontimes$ & $\neg$ \\ & $\lambda$ & ${\color{blue}\circledast} + (\alpha_\tau-1) {\color{blue}\divideontimes}$ & $\neg$ \\ & $\sigma$ & ${\color{red}\circledast} + (\alpha_\tau-1) {\color{red}\divideontimes}-\frac{1}{\sigma}$ & $\neg$ \\ \midrule $\log(g_t^c)$ & $\beta$ & $\frac{1}{t+\beta} - \frac{1}{2\beta}$ & $\neg$\\ & $\lambda$ & $-\frac{1}{\lambda}$ & $\neg$\\ & $\sigma$ & 0 & $\neg$\\ \midrule $\log(g_t)$ & $\beta$ & $ \circledast + (\alpha_\tau-1)\divideontimes + \frac{1}{t+\beta} - \frac{1}{2\beta}$ & $\neg$\\ & $\lambda$ & ${\color{blue}\circledast} + (\alpha_\tau-1) {\color{blue}\divideontimes}-\frac{1}{\lambda}$ & $\neg$\\ & $\sigma$ & ${\color{red}\circledast} + (\alpha_\tau-1) {\color{red}\divideontimes}-\frac{1}{\sigma}$ & $\neg$\\ \bottomrule \end{tabular} \label{tab:derivs} \end{table} This elements are obtained by differentiating the log-likelihood function, given in Table~\ref{tab:derivs}, with respect to the $\gamma_j$ and $\nu_r$ and are given by \[ u_{\gamma_j} = \pdv{\ell(\vb* \theta|\vb y)}{\gamma_j} = \sum_{i=1}^n \dot{d}^{[i]}_{\beta} \, c_{i} \, x_{ij},~ (j = 1, \ldots, p), \quad u_{\lambda} = \pdv{\ell(\vb* \theta|\vb y)}{\lambda} = \sum_{i=1}^n \dot{d}^{[i]}_\lambda, \quad \text{and} \quad u_{\sigma} = \pdv{\ell(\vb* \theta|\vb y)}{\sigma} = \sum_{i=1}^n \dot{d}^{[i]}_\sigma, \] where $c_{i} = \pdv{\beta_i}{\eta_{1i}}$. \begin{eqnarray}\label{deriv1} \dot{d}^{[i]}_{\beta}&=&\pdv{\log(g_t)}{\beta_i} = \pdv{\log(g_t^s)}{\beta_i} + \pdv{\log(g_t^c)}{\beta_i} = y_i^{*} - \mu_i^{*}, \\ \dot{d}^{[i]}_{\lambda}&=&\pdv{\log(g_t)}{\lambda} = \pdv{\log(g_t^s)}{\lambda} + \pdv{\log(g_t^c)}{\lambda} = y_i^{*} - \mu_i^{*}, \end{eqnarray} and \begin{eqnarray}\label{deriv2} \dot{d}^{[i]}_{\lambda} = \pdv{\log(g_t)}{\lambda_i}&=&\pdv{\log(g_t^s)}{\lambda_i} + \pdv{\log(g_t^c)}{\lambda_i} = y_i^{\star} - \mu_i^{\star}, \end{eqnarray} with $y_i^{*}$, $y_i^{\star}$, $\mu_i^{*}$ and $\mu_i^{\star}$ defined in equation. The score function can be written in matrix form as \begin{eqnarray* \mathbf{U}_{\bm{\theta}} = \begin{bmatrix} \mathbf{X}^\top \, \mathbf{D}_1\, (\mathbf{y}^{*}-\bm{\mu^*}) \\ \mathbf{Z}^\top\,\mathbf{D}_2\,(\mathbf{y}^{\star}-\bm{\mu^\star})\\ \mathbf{Z}^\top\,\mathbf{D}_2\,(\mathbf{y}^{\star}-\bm{\mu^\star}) \end{bmatrix}, \end{eqnarray*} and $\mathbf{D}_1 = \left[a_i\, \KroneckerDelta{i,j}\right]$, $\mathbf{D}_2 = \left[b_i\,\KroneckerDelta{i,j}\right]$, $\mathbf{y}^{*} = (y_1^{*}, \ldots, y_n^{*})^\top$, $\mathbf{y}^{\star} = (y_1^{\star}, \ldots, y_n^{\star})^\top$, $\bm{\mu}^{*} = (\mu_1^{*}, \ldots, \mu_n^{*})^\top$, $\bm{\mu}^\star = (\mu^\star_1, \ldots, \mu^\star_n)^\top$ and $\KroneckerDelta{i,j}$ is the Kronecker delta for $i,j=1, 2, \ldots, n$. \end{comment}
\section{Introduction} \label{sec:intro} Modern probability theory as formulated by Kolmogorov \cite{Kolm33} underpins the theory of stochastic processes, stochastic systems and stochastic control \cite{WIlliams91,WH85}. Similarly, beginning with the seminal work of von Neumann on the axiomatization of quantum mechanics \cite{VN18}, quantum probability theory has emerged as a non-commutative generalization of probability theory \cite{Streat00}. It provides a natural setting for a theory of quantum stochastic processes as a non-commutative generalization of the classical theory of Kolmogorov. A major departure of the quantum setting from the classical one is that the random outcomes of sequential measurements on quantum stochastic processes do not in general satisfy the Kolmogorov consistency conditions and hence cannot be described as classical stochastic processes with well-defined sample paths. A general quantum probabilistic theory of quantum stochastic processes was introduced in the seminal work of Accardi, Frigerio and Lewis (AFL) \cite{AFL82}. The formulation is given in the Heisenberg picture, generalizing the Kolmogorovian theory of classical stochastic processes. This is in the sense that observables as quantum random variables evolve with time while the state of the system is kept fixed, just as how random variables evolve in time in a classical stochastic process while the probability measure on the underlying classical probability space remains fixed. Quantum stochastic processes as operator-valued processes are defined independently of single or sequential measurements that may be performed on the process at any time. However, measurements and their probabilistic outcomes are accounted for by the correlation kernels of quantum stochastic processes, playing a similar role to the family of finite-dimensional distributions for classical stochastic processes. Recent efforts in trying to understand and characterize temporal quantum noise in engineered quantum systems have led to the consideration of alternative formalisms for defining, describing and witnessing non-Markovian quantum processes, see, e.g., \cite{RHP14}. Unlike \cite{AFL82}, these formalisms are developed in the Schr\"{o}dinger picture, with an emphasis on the transformations of states (described by a density operator) of the system of interest. The process tensor formalism was introduced in \cite{PRRFPM18} to overcome the limitations of conventional descriptions of non-Markovian dynamics based on the reduced dynamics of the system in the Schr\"{o}dinger picture (as linear transformations of the system's states). This includes addressing initial system-environment correlation and multi-time interventions. However, there have been so far no studies to reconcile the process tensor formalism to the well-established AFL theory and its subsequent developments. Since both formalisms are concerned with related objects and the same physics but set in different pictures (Heisenberg vs Schr\"{o}dinger), one would expect a close relationship between the two. In this paper, we connect the process tensor to AFL theory through the correlation kernels of quantum stochastic processes. In particular, it is shown how process tensors can be recovered from extended correlation kernels incorporating ancillas. Along the way, we also give a tutorial style overview on quantum stochastic processes, multi-time correlations and sequential measurements on quantum systems. In particular, we highlight subtle points surrounding multi-time correlations and sequential measurements, emphasizing the latter's departure from Kolmogorovian classical stochastic processes. \noindent \textbf{Notation.} $\mathbb{R}$ and $\mathbb{C}$ denote the real and complex numbers, respectively. For $c \in \mathbb{C}$, $\overline{c}$ is its complex conjugate. For a complex-valued function $X$, $\overline{X}(\cdot) = \overline{X(\cdot)}$. For a set $S$, $S^n$ denotes the $n$-fold direct product $S^n =\underbrace{S \times S \times \cdots S}_{\hbox{$n$ times}}$. The notation $\otimes$ denotes the tensor product of Hilbert spaces and the algebraic tensor product of linear operators. A Dirac ket $|x\rangle$ denotes a complex vector in a Hilbert space while a bra $\langle x |$ denotes the conjugate transpose (or dual functional) of the vector. Thus $\langle x|y \rangle$ is the inner product of $|x\rangle$ and $|y \rangle$. For any operator $X$ mapping a Hilbert space to another, $X^{*}$ denotes the adjoint of $X$ and $\mathrm{tr}(X)$ denotes the trace of a trace-class operator. $X^{\top}$ denotes the transpose of a matrix $X$. $\mathrm{B}(\mathfrak{h})$ and $\mathcal{S}(\mathfrak{h})$ denote the complex space of all bounded operators and the convex cone of all unnormalised density operators over a Hilbert space $\mathfrak{h}$, respectively. For a set of distinct numbers $t_1, t_2,\cdots,t_n \in \mathbb{R}$, a time tuple is the $n$-tuple $\mathbf{t}_n=(t_1,t_2,\ldots,t_n)$. Non-strict set inclusion is denoted by $\subseteq$ while strict inclusion is denoted by $\subset$. The composition operation is denoted by $\circ$. \section{Quantum stochastic processes} \label{sec:qsp} A quantum probability space is a pair $(\mathscr{X},\mu)$ where $\mathscr{X}$ is a von Neumann algebra of bounded operators on some Hilbert space $\mathfrak{h}$ (containing the identity operator $I_{\mathscr{X}}$) and and $\mu$ is a unital normal state on $\mathscr{X}$ (unital meaning $\mu(I_{\mathscr{X}})=1$). Recall that a von Neumann algebra is a *-algebra of operators equipped with addition, multiplication (as composition of operators) and involution $^*$ (defined as the adjoint of the operator) and is closed with respect to the normal topology of sub-algebras of $\mathrm{B}(\mathfrak{h})$. For normal states $\mu$, there exists a density operator $\rho$ on $\mathfrak{h}$ such that $\mu(X) = {\rm tr}(\rho X)$ for all $X \in \mathscr{X}$; see \cite{BvHJ07} and the references therein. We will also write $\mu(\cdot)$ using the quantum expectation notation $\langle \cdot \rangle$. A classical probability space $(\Omega,\mathcal{F},P)$ can be viewed as a Banach algebra $L^{\infty}(\Omega,\mathcal{F},P)$ of essentially bounded random variables on $(\Omega,\mathcal{F},P)$. A quantum probability space $(\mathscr{C},\mu)$, with $\mathscr{C}$ commutative\footnote{Meaning that the elements of $\mathcal{C}$ are commuting with one another.} and $\mu$ a unital normal state, is *-isomorphic to a classical probability space $(L^{\infty}(\Omega,\mathcal{F},\nu),\mathbb{E})$, where the expectation operator $\mathbb{E}(X)=\int_{\Omega} X(\omega) P(d\omega)$ for some measure $P$ that is absolutely continues with respect to $\nu$. This *-isormorphism is a bijective map $\iota: (\mathscr{C},\mu) \rightarrow (L^{\infty}(\Omega,\mathcal{F},\nu),\mathbb{E})$ with the properties $\iota(ab) = \iota(a) \iota(b)$ and $\iota(b^*) = \overline{\iota(b)}$ for any $a,b \in (\mathscr{C},\mu)$. The *-isomorphism be tween a classical probability space and commutative von Neumann algebra is known as the {\em Spectral Theorem}, see, e.g., \cite[Theorem 3.3]{BvHJ07}. The physical interpretation of the quantum probability space $(\mathscr{X},\mu)$ is as follows. The underlying Hilbert space of the operators in $\mathscr{X}$ is the Hilbert space of an associated quantum mechanical system. Observables of the system are the self-adjoint operators in $\mathscr{X}$, which are also quantum random variables (i.e., quantum analogues of real-valued random variables). The quantum expectation of an observable $X$ is given by $\mu(X)$. Events $E \in \mathscr{X}$ are projection operators $(E=E^*=E^2)$ and the probability of an event $E$ is given by $\mu(E)$. Only commuting events $E$ can have a joint probability distribution that satisfy the Kolmogorov consistency conditions, non-commuting events cannot be assigned a joint probability distribution. This can be seen as a direct consequence of the Spectral Theorem: since non-commuting events form the elements of a non-commutative algebra it cannot be mapped to a classical probability space. Let $T \subseteq \mathbb{R}$. A quantum stochastic process over a von Neumann algebra $\mathscr{B} \subseteq \mathrm{B}(\mathfrak{h})$ is a triplet $(\mathscr{A},\{j_t\}_{t \in T},\mu)$, with $\mathscr{A}$ another von Neumann algebra of operators, possibly over another Hilbert space $\mathfrak{k}$, $\mu$ a normal state on $\mathscr{A}$, and $j_t: \mathscr{B} \rightarrow \mathscr{A}$ $\forall t \in T$ is a *-homomorphism from $\mathscr{B}$ to $\mathscr{A}$, $j_t(XY)=j_t(X)j_t(Y)$ and $j_t(X^*)=j_t(X)^*$ for any $X,Y \in \mathscr{B}$. Note that $(\mathscr{A},\mu)$ is a quantum probability space. Since a collection of non-commuting random variables will not have a joint probability distribution, for quantum stochastic processes one considers the more general notion of {\em correlation kernels}. For any positive integer $n$, given time tuple $\mathbf{t}_n \in T^n$, and vectors $\mathbf{a}_n =(a_1,\ldots,a_n)^{\top} \in \mathscr{B}^n$ and $\mathbf{b}_n =(b_1,\ldots,b_n)^{\top} \in \mathscr{B}^n$, correlation kernels $w_{\mathbf{t}_n}$ are complex functions on $\mathscr{B}^n \times \mathscr{B}^n$ of the form \begin{align} w_{\mathbf{t}_n}(\mathbf{a}_n,\mathbf{b}_n) = \mu(j_{\mathbf{t}_n}(\mathbf{a}_n)^* j_{\mathbf{t}_n}(\mathbf{b}_n)), \label{eq:correlation-kernel} \end{align} where $j_{\mathbf{t}_n}(\mathbf{a}_n)=j_{t_n}(a_n) j_{t_{n-1}}(a_{n-1}) \ldots j_{t_1}(a_1)$. For properties of correlation kernels, see \cite[Proposition 1.2]{AFL82}. If $\mathbf{a}_n=\mathbf{b}_n=\mathbf{E}_n$, where the elements $E_j$, $j=1,\ldots,n$, of $\mathbf{E}_n$ are mutually commuting events (projection operators) in $\mathscr{B}$ then $w_{\mathbf{t}_n}(j_{\mathbf{t}_n}(\mathbf{E}_n)^* j_{\mathbf{t}_n}(\mathbf{E}_n))$ gives the joint probability distribution of these events. Otherwise, it gives the probability for the events to occur in that specific time order. For the remainder of the paper, for concreteness we take $\mathfrak{h}$ to be embeddable as a subspace of $\mathfrak{k}$, $\mathscr{A} \subseteq \mathrm{B}(\mathfrak{k})$ and $\mathscr{B}$ to be embeddable as a sub-algebra of $\mathscr{A}$. We consider $j_t$ of the form $j_t(\cdot) = U_t^* (\cdot) U_t$, with $U_t$ a unitary operator on $\mathfrak{h}$ and define $j_t^{\star}$ via $j_t^{\star}(\cdot) = U_t (\cdot) U_t^*$. Note that by definition, $j_t^{\star}$ is the essentially the inverse of $j_t$, in the sense that $j_t \circ j_t^{\star} = j_t^{\star} \circ j_t =I$, where $I$ is an identity map. We also define $j_{t_1,t_2}(\cdot) = j_{t_2} \circ j_{t_1}^{\star}(\cdot) = U_{t_2}^*U_{t_1} (\cdot) U_{t_1}^*U_{t_2}$ and in a similar fashion define $j_{t_1,t_2}^{\star} = j_{t_1} \circ j_{t_2}^{\star}$. \section{Multi-time correlations} \label{sec:multi-time} In many cases, we can consider experiments where several measurements are made at specific times over a time interval. \begin{definition} A family of experiments on a particular system is said to be of order $n$ if each experiment consists of nontrivial measurements made at $n$ distinct times $t_{1},\cdots ,t_{n}$. The family is said to be \textit{complete} if we make all possible experiments exhausting everything we could measure and covering the time interval. For $n>1$ we say that the experiments are multi-time experiments. \end{definition} We insert the requirement of nontriviality to ensure that we have a hierarchy - an order $n$ experiment is not a special case of a higher order experiment. Incompatible observations being made at the same time in the same trial are precluded. Of course, the family itself can include incompatible measurements. However, we may make incompatible measurements within the same experiment so long as they are made at different times. The notion of completeness just means that we do as many measurements as possible, restricted to $n$ distinct times within the interval of interest. The aim is to be exhaustive in what is measured. In an order 1 experiment, each trial involves measuring the system at a single time. In an order 2 family the experimenter measures observables at different times \textit{in the same trial} and thereby obtains the two-point statistical correlations between different quantities at different times - something not available from the data collected in an order 1 experiment. An order $n$ experiment contains information not available from lower order experiments. In both classical and quantum theories, order 1 measurements lead to the notion of an ``instantaneous state''. For instance, in quantum mechanics we obtain empirically from order one experiments the expectations $\langle X(t) \rangle$: this should take the form $\mathrm{tr}(\rho_t X)$ and by varying the observable $X$ measured we determine a density matrix $\rho_t$. As such, a complete family of order 1 experiments over the time interval reveals the set of ``instantaneous states'', but this is still only partial information. We now focus on what we can obtain empirically from a family of experiments of order $n$. \label{prop:multi-time} In quantum theory, the most general multi-time correlation that can be estimated from experiment are those of the form \cite{AFL82} \begin{eqnarray} \langle X_{1}\left( t_{1}\right) ^{\ast }\cdots X_{n}\left( t_{n}\right) ^{\ast }Y_{n}\left( t_{n}\right) \cdots Y_{1}\left( t_{1}\right) \rangle \label{eq:pyramid} \end{eqnarray} where the times are ordered as $0\leq t_{1}<t_{2}<\cdots <t_{n}\leq T,$ and the operators are all in the Heisenberg picture at the indicated times. We refer to these as \textit{pyramidal time-ordered correlations}. The essential feature is that we have increasing times as we work in from the outermost operators into the centre. For instance, suppose an order $n$ experiment involves measuring a $k$th observable at time $t_k$ and that this results in an answer $\omega_k$. Let $Q_k (\omega )$ give the corresponding projection in the Heisenberg picture. (For yes/no experiments we have $Q_k (\text{yes}) =P_k (t_k)$ and $Q_k (\text{no}) = I-P_k (t_k) $.) From the experiment we may estimate the empirical probabilities \begin{eqnarray*} \lefteqn{p _n (\omega_1, \cdots , \omega _n ) }\\ &=& \langle Q_{1}\left( \omega_{1}\right) \cdots Q_{n}\left( \omega_{n}\right) Q_{n}\left( \omega_{n}\right) \cdots Q_{1}\left( \omega_{1}\right) \rangle \end{eqnarray*} where $\omega_k$ is the answer to the $k$ measurement at time $t_k$. From the fact that $\sum_\omega Q_k (\omega) =I$, we find \begin{eqnarray*} \sum_{\omega_n} p_n (\omega_1, \cdots , \omega _n ) = p_{n-1} (\omega_1, \cdots , \omega _{n-1} ) . \end{eqnarray*} This may be rephrased as follows. \begin{proposition} We may reduce an order $n$ experiment to an order $n-1$ experiment by ignoring the last measurement in time. \end{proposition} However, the projections at different times are not assumed to commute with each other. As a result, the finite dimensional distributions need not satisfy Kolmogorov's consistency conditions in any of the arguments, other than the very last one. This is a key feature of quantum theory and is the basis for results such as Bell's Theorem. As this can be misunderstood and lead to erroneous results or conclusions, such as when statistical inference methods based on the existence of joint distributions are applied to the outcomes of non-commuting sequential measurements, it will be revisited in more detail in the next section. \section{Sequential measurements and their subtleties} \label{sec:sequential} It follows from Section \ref{sec:multi-time} that the correlation kernels $w_{\mathbf{t}_n}$ as defined in \eqref{eq:correlation-kernel} are intimately related to sequential measurements on quantum stochastic processes. In this section we explicitly illustrate the subtleties of these measurements, which can result in a sequence of random outcomes that fail the Kolmogorov consistency conditions and are therefore not classical stochastic processes. For simplicity of discussion, consider a discrete-valued observable $X_j \in \mathscr{B}$ (i.e., $X$ has a most a countable number of eigenvalues) with all eigenvalues distinct. If a measurement of $X_j$ is made at time $t_j$, the random outcome $m_j$ of the measurement will correspond to the application of a projection operator $P_{m_j} \in \mathscr{B}$ corresponding to the eigenvalue $\lambda_{m_j}$ of $X_j$ that is observed. The probability of sequentially observing the outcomes $m_1,m_2,\ldots,m_n$ at times $t_1 < t_2 <\ldots< t_n$ {\em in this order} under the evolution of the quantum stochastic process is given by: \begin{align*} \lefteqn{P_{\mathbf{t}_n}(m_1,\ldots,m_n)}\\ &=\mathrm{tr}(\rho j_{t_1}(P_{m_1})^* j_{t_2}(P_{m_2})^* \cdots j_{t_n}(P_{m_n})^*j_{t_n}(P_{m_n})\\ &\quad \cdots j_{t_2}(P_{m_2}) j_{t_1}(P_{m_1})),\\ & =\mathrm{tr}(j_{t_n}^{\star}(P_{m_n} j_{t_{n-1},t_n}^{\star}( \cdots (P_{m_2}j_{t_1,t_2}^{\star} (P_{m_1} j_{t_1}^{\star}(\rho) P_{m_1}) P_{m_2}) \\ &\qquad \cdots )P_{m_n})). \end{align*} Caution is now due. In the quantum context, marginalization over any of the variables $m_j$ for any $j<n$ does not in general hold except over the last one at time $t_n$ (a violation of the Kolmogorov consistency conditions). That is, in general \begin{align} \lefteqn{\sum_{m_k} P_{\mathbf{t}_n}(m_1,\ldots,m_n)} \notag\\ &\qquad \neq P_{\mathbf{t}_n\backslash t_k}(m_1,\ldots, \widehat{m_k}, \cdots,m_n),\; \forall k < n, \label{eq:marginalization} \end{align} where a hat ($\,\widehat{\cdot}\,$) above a variable indicates that the variable is dropped from the list of arguments. In the following, to emphasize this we give some simple but explicit examples. We mention that the general relationship \eqref{eq:marginalization} is the basis for violation of the Leggett-Garg inequalities \cite{ELN13} in sequential measurements in quantum mechanics, which is essentially a statement about the failure of the Kolmogorov consistency conditions \cite[\S 7 and Eq. (8.5)]{FL60}. For further discussions on these issues, we refer to \cite{Gough20,MSPM20}. Measurements that satisfy $[j_{t_k}(P_{m_k}),j_{t_l}(P_{m_l})] =0 $ for all $k,l$ are referred to as {\em quantum non-demolition (QND) measurements}. QND measurements produce a classical stochastic process with a well-defined joint probability distribution for any collection of sampled points from the process. \begin{example} Take a qubit with Hilbert space $\mathfrak{h}=\mathbb{C}^2$ and the simple hypothetical situation where the evolution is frozen between measurements (i.e., $j_t =I$ for all $t \geq 0$). We take as basis vectors $|0\rangle =(0,1)^{\top}$ and $|1 \rangle=(1,0)^{\top}$. We analyze the sequential measurements of the Pauli X operator $X=\left[\begin{array}{cc} 0 & 1\\ 1 & 0 \end{array}\right]$ at time $t_1$ and $Z=\left[\begin{array}{cc} 1 & 0 \\ 0 & -1\end{array}\right]$ at a later time $t_2>t_1$. We consider the measurements of $X$ followed by $Z$ to show the inconsistencies that arise. Suppose that the qubit is initialised in the state $|\psi \rangle$. The probability of observing a measurement of $Z$ giving $i_1 = -1 $ followed by a measurement of $X$ giving $i_2 =1$ is \begin{align*} P(\hbox{$i_1=-1$ then $i_2=1$}) &= |\langle 0 | \psi\rangle|^2 \left| \frac{1}{\sqrt{2}}(\langle 0| - \langle 1|) | 0 \rangle \right|^2\\ &= \frac{1}{2}|\langle 0 |\psi \rangle|^2 \end{align*} Similarly, the probability of observing a measurement of $Z$ giving a value $i_1 = 1 $ followed by a measurement of $X$ giving a value $i_2 =1$ is \begin{align*} P(\hbox{$i_1=1$ then $i_2=1$}) &= |\langle 1 | \psi \rangle|^2 \left| \frac{1}{\sqrt{2}}(|\langle 0| - \langle 1|) | 1\rangle \right|^2\\ &= \frac{1}{2}|\langle 1 | \psi\rangle|^2 \end{align*} So, that marginalising over $i_1$ gives: \begin{align*} \sum_{x={-1,1}} P(\hbox{$i_1=x$ then $i_2=1$}) &= \frac{1}{2}|\langle 0 | \psi \rangle|^2 + \frac{1}{2}|\langle 1 | \psi \rangle|^2\\ &=1. \end{align*} On the other hand, if we do not measure $Z$ at $t_1$ and only measure $X$ in the state $|\psi\rangle$ at time $t_2$ then we get: \begin{align*} P(\hbox{$i_2=1$}) &= \frac{1}{2}|(\langle 0| - \langle 1| ) |\psi \rangle |^2. \end{align*} Thus we see that in general, marginalizing $i_1$ leads to inconsistency with a measurement of $Z$ only at $t_2$: \begin{align*} \sum_{x={-1,1}} P(\hbox{$i_1=1$ then $i_2=1$}) &\neq \frac{1}{2}|(\langle 0| - \langle 1| ) |\psi \rangle |^2, \end{align*} except in the special case when $|\psi\rangle = \frac{1}{\sqrt{2}}(|0\rangle - |1\rangle)$ so that $P(i_2=1)=1$. The reason for this is of course well understood. A measurement of $Z$ at time $t_1$ changes the quantum state and this will influence the subsequent measurement of $X$. This does not happen in a classical stochastic process, where performing a measurement does not change the probability measure underlying the process. \end{example} \begin{example} The previous example gave the sequential measurement of two non-commuting observables when the system state is frozen in between measurements. When the state is evolving, measurement of the same observable at different times may also not commute. We consider the simple qubit example again. Suppose that the qubit is initialized in the state $|\psi\rangle$ and the evolution is given by the Hamiltonian $H= \frac{1}{2}\omega Z$. We consider the measurement of $X$ at sequential times $0<t_1<t_2< \ldots < t_n$, and note that $[H,X]\neq 0$. Let $U_t=\exp(-iHt)$. Let $i_k$ denote the outcome of measuring of $X$ at time $t_k$ and let $|i_k\rangle$ be an eigenvector of $X$ corresponding to $i_k$. Let $P_{i_k} = |i_k\rangle \langle i_k|$. The {\em unnormalized} state of the qubit after the $n$-th measurement is $$ |\psi_{t_n} \rangle = P_{i_n}U_{t_n-t_{n-1}} \cdots P_{i_{n-2}}U_{t_3-t_2}P_{i_2}U_{t_2-t_1} P_{i_1} U_{t_1}|\psi \rangle. $$ The probability of observing $i_k=x_k$ with $x_k\in\{-1,1\}$ is given by \begin{align*} \lefteqn{P(\hbox{$i_1=x_1$ then $i_2=x_2$ .... then $i_n=x_n$})} \\ &= \langle \psi_{t_n} |\psi_{t_n} \rangle \\ &= \langle \psi | U_{t_1}^* P_{x_1} U_{t_2-t_1}^* P_{x_2} \cdots U_{t_n-t_{n-1}}^* P_{x_n} \\ &\qquad \cdots U_{t_n-t_{n-1}} \cdots P_{x_2} U_{t_2-t_1} P_{x_1} U_{t_1} |\psi \rangle\\ &= \langle \psi | j_{t_1}(P_{x_1})j_{t_2}(P_{x_2}) \cdots j_{t_{n-1}}(P_{x_{n-1}}) j_{t_n}(P_{x_n}) \\ &\qquad \times j_{t_{n-1}}(P_{x_{n-1}}) \cdots j_{t_2}(P_{x_2}) j_{t_1}(P_{x_1}) |\psi \rangle \end{align*} Let $X_t=j_t(X)$ and $Y_t=j_t(Y)$. The Heisenberg equation of motion is $\dot{X}_t = \omega Y_t$ and $\dot{Y}_t = -\omega X_t$, with initial condition $X_0=X$ and $Y_0=Y$. This has the solution $X_t = \cos(\omega t) X + \sin(\omega t)Y$ and $Y_t = -\sin(\omega t) X + \cos(\omega t)Y$ and it follows that $[X_{t_j},X_{t_k}]=\sin(\omega(t_j-t_k))[X,Y]$. For $[X_{t_j},X_{t_k}]=0$, we must have that $t_j-t_k$ must be an integer multiple of $\pi/\omega$. Since $P_{x} = \frac{1}{2}(I -\mathrm{sgn}(x)X)$, where $\mathrm{sgn}(x)$ denotes the sign of $x$, it follows that $[j_{t_j}(P_{x_j}),j_{t_k}(P_{x_k})] =\mathrm{sgn}(x_j x_k) [X_{t_j},X_{t_k}]$. We conclude that $[j_{t_j}(P_{x_j}),j_{t_k}(P_{x_k})] =0$ if and only if $t_j$ is of the form $t_1$ + an integer multiple of $\pi/\omega$ for all $j \geq 2$ while $t_1$ can be arbitrary. In this case, $X_{t_j}$ is either $X$ or $-X$. Also, when the measurement is QND, given the first measurement $i_1$ at time $t_1$ (which is random) the remaining measurements $i_2,i_3,\ldots,i_n$ become deterministic for any $n >1$ since the system state can either stay at a particular eigenstate of $X$ (giving a constant sequence) or cycles in a deterministic manner between the orthogonal eigenstates of $X$. That is, {\em the probability of observing any sequence $i_1,i_2,\ldots$ is completely determined only by the probability of observing $i_1$ alone}. \end{example} \section{The process tensor} \label{sec:process-tensor} We first motivate and introduce the notion of a discrete-time process tensor. We start by recalling the definition of quantum operations and quantum instruments, see, e.g., \cite{Holevo01}. \begin{definition}[Quantum operation] Let $\mathfrak{h}$ be a Hilbert space. A quantum operation $O: \mathrm{B}({\mathfrak{h}}) \rightarrow \mathrm{B}({\mathfrak{h}})$ is a linear completely positive map with the property that $\mathrm{tr}(O\rho) \leq \mathrm{tr}(\rho)$ for all $\rho \in \mathrm{S}({\mathfrak{h}})$. \end{definition} The set of all such quantum operations is denoted by $\mathcal{O}(\mathfrak{h})$. A special quantum operation is the ``do nothing" or identity operation $\mathrm{Id}$, defined by $\mathrm{Id}(X) = X$ for all $X \in \mathrm{B}(\mathfrak{h})$. \begin{definition}[Quantum instrument] Let $\mathfrak{h}$ be a Hilbert space and $(\Omega,\mathcal{F})$ be a measurable space with $\Omega \subseteq \mathbb{R}^n$. A quantum instrument $\mathcal{I}$ is a tuple $(\mathfrak{h},\Omega,\mathcal{F},\mathcal{M})$, where $\mathcal{M}$ is a quantum operation valued-measure that maps elements of the $\sigma$-algebra $\mathcal{F}$ to $\mathcal{O}(\mathfrak{h})$, with the properties \begin{enumerate} \item $\mathrm{tr}(\mathcal{M}(\Omega)\rho) = \mathrm{tr}(\rho)$ $\forall \mathcal{S}(\mathfrak{h})$. \item For any disjoint $A_1,A_2,\ldots \in \mathcal{F}$, $\mathcal{M}(\bigcup_{k=1}^{\infty} A_k) (\rho)= \sum_{k=1}^{\infty} \mathcal{M}(A_k)(\rho)$ $\forall \rho \in \mathcal{S}(\mathfrak{h})$, where convergence is in the trace norm ($\|\cdot\|_1$) on $\mathcal{S}(\mathfrak{h})$ ($\|T\|_1=\sqrt{T^*T}$). \end{enumerate} The space of all such instruments is denoted by $\mathscr{I}(\mathfrak{h})$. \end{definition} Consider a system (labelled by a subscript $s$) with a Hilbert space $\mathfrak{h}_s$ interacting with an environment (labelled by a subscript $e$) with a Hilbert space $\mathfrak{h}_e$, and let $\mathfrak{h}_{se}=\mathfrak{h}_{s} \otimes \mathfrak{h}_{e}$. The state of the system and environment is initially in the (not necessarily factored) state $\rho_{se}$ and their joint state undergoes a joint unitary evolution between times $t_j$ and $t_{j+1}$ given by the map $\mathcal{U}_{t_j,t_{j+1}}^{se}(\cdot)=U_{t_j,t_{j+1}}^{se} (\cdot) U_{t_j,t_{j+1}}^{se*}$, with $U^{se}_{t_j,t_{j+1}}$ unitary and $U^{se}_{t_j,t_j}=I$. At the discrete-times $0 \leq t_1 <t_2 <\ldots<t_n$ they can undergo measurements performed directly on the system, or after interacting the system (but not the environment) with some freshly prepared ancillas (i.e., ancillas that have been used are not reused on subsequent measurements) followed by measurements of compatible observables on the system and/or ancillas. This is described by a quantum instrument $\mathcal{I}_{t_j}= (\mathfrak{h}_s,\Omega_j,\mathcal{F}_j,\mathcal{M}_j)$ at time $t_j$. Given the events $A_1,\ldots,A_{n}$ with $A_j \in \mathcal{F}_j$, the unnormalised system-environment density operator at the time $t_n$ is given by: \begin{equation} \sigma_{t_n} = \mathcal{M}_{n}(A_{n}) \circ \mathcal{U}^{se}_{t_{n-1},t_n} \circ \cdots \circ \mathcal{M}_{1}(A_1) \circ \mathcal{U}_{0,t_1}^{se}(\rho_{se}). \end{equation} Define the map $\mathcal{T}_{\mathbf{t}_n}$ via \begin{align} \lefteqn{\mathcal{T}_{\mathbf{t}_n}(\mathcal{M}_{1}(A_1),\ldots,\mathcal{M}_{n}(A_{n}))} \notag \\ &= \mathrm{tr}_{\frak{h}_e}(\mathcal{M}_{n}(A_{n}) \circ \mathcal{U}^{se}_{t_{n-1},t_n} \circ \cdots \circ \mathcal{M}_{1}(A_1) \circ \mathcal{U}_{0,t_1}^{se}(\rho_{se})), \label{eq:process-tensor} \end{align} then we can write $ \sigma_{t_n} = \mathcal{T}_{\mathbf{t}_n}(\mathcal{M}_{1}(A_1), \ldots,\mathcal{M}_{n}(A_{n})). $ The probability of observing the events $A_{1}, \ldots,A_{n}$ at the times $t_1,t_2,\ldots,t_n$ is given by $$ P_{\mathbf{t}_n}(A_{1},\ldots,A_{n})=\mathrm{tr}(\mathcal{T}_{\mathbf{t}_n}(\mathcal{M}_{1}(A_{1}),\ldots,\mathcal{M}_{n}(A_{n}))), $$ and the system density operator $\rho_{t_n}$ at time $t_n$ is then simply the normalized version of $\mathrm{tr}_{\frak{h}_e}(\sigma_{t_n})$ given by $$ \rho_{t_n} = \frac{\mathrm{tr}_{\frak{h}_e}(\sigma_{t_n})}{P_{\mathbf{t}_n}(A_{1},A_{2},\ldots,A_{n})}. $$ The map $\mathcal{T}_{\mathbf{t}_n}$ defined by \eqref{eq:process-tensor} can be viewed as a real multilinear map from an ordered sequence of quantum operations $(O_1, O_2,\ldots,O_{n})$, corresponding to $(\mathcal{M}_1(A_1), \mathcal{M}_2(A_2),\ldots,\mathcal{M}_{n}(A_{n}))$, to an unnormalised density operator. As such, the right hand side of \eqref{eq:process-tensor} can be viewed as a real linear map on the tensor product of quantum operations $\mathcal{O}(\mathfrak{h}_s)^{\otimes n}$, with the sequence $(O_1, \ldots,O_{n})$ being mapped to the algebraic tensor product $O_1 \otimes O_2 \otimes \cdots \otimes O_{n}$. General elements of $\mathcal{O}(\mathfrak{h}_s)^{\otimes n}$ are linear combinations of such tensor product maps and limits thereof. They correspond to ``correlated'' measurements that involve the use of the same ancillas at different time points or the presence of correlated states between distinct ancillas at different times. It has been shown that such maps, in the special case of finite discrete-valued measurements, have the properties \cite{PRRFPM18,MSPM20} \begin{enumerate} \item[(i)] $\mathrm{tr}(\mathcal{T}_{\mathbf{t}_n}(O)) \leq 1$ $\forall O \in \mathcal{O}({\mathfrak{h}_s)}^{\otimes n}$. \item[(ii)] {\em Complete positivity} as a map from $\mathcal{O}(\mathfrak{h}_s)^{\otimes n}$ to $\mathrm{S}(\mathfrak{h}_{s})$. \item[(iii)] {\em Containment}, for any $\mathbf{s}_m \subset \mathbf{t}_n$ $(m <n)$ it holds that $\mathcal{T}_{\mathbf{s}_m}(O_{s_1} \otimes \cdots \otimes O_{s_{m}}) =\mathcal{T}_{\mathbf{t}_n}(O'_{t_1} \otimes \cdots \otimes O'_{t_{n}})$, where $O'_{t_j} = O_{t_j}$ if $t_j \in \mathbf{s}_m$, otherwise $O_{t_j} = \mathrm{Id}$. \end{enumerate} We are now ready to define the process tensor \cite{PRRFPM18,MSPM20} but stated in a more general form that allows for continuous-valued measurements. \begin{definition}[Process tensor] For a time tuple $\mathbf{t}_n=(t_1,t_2,\ldots,t_n)$ with $0 \leq t_1 <t_2<\ldots<t_n \in T$ and a system with Hilbert space $\mathfrak{h}_s$, a process tensor $\mathcal{T}_{\mathbf{t}_n}$ is a real linear map from $\mathcal{O}(\mathfrak{h}_s)^{\otimes n}$ to $\mathrm{S}(\mathfrak{h}_{s})$ possessing the properties (i)-(iii) stated above. \end{definition} When the system Hilbert space $\mathfrak{h}_s$ is finite dimensional, process tensors can be represented as generalized Choi many-body states and can be cast into a matrix-product-operator form. In this case, these representations make manipulation of process tensors convenient \cite{PRRFPM18}. \section{The process tensor from quantum stochastic processes} \label{sec:pt-qsp} We now show the relation of the process tensor to a quantum stochastic process of AFL through the correlation kernels \eqref{eq:correlation-kernel}. Let $\mathcal{B}_s$ and $\mathcal{B}_e$ be von Neumann algebras over the system and environment Hilbert space $\mathfrak{h}_s$ and $\mathfrak{h}_e$, respectively. The composite space for the system is environment is the quantum probability space $ (\mathcal{B}_{se},\mu_{se})$, where $\mathcal{B}_{se} = \mathcal{B}_s \otimes \mathcal{B}_e$ and $\mu_{se}$ is a normal state on $\mathcal{B}_{se}$. Note that the state $\mu_{se}$ is {\em not} necessarily of the factored form $\mu_s \otimes \mu_e$ for some states $\mu_s$ and $\mu_e$ on the system and environment, respectively, since the system and environment can be initially entangled or correlated. Take the time to be $T=[0,\infty)$. We define a quantum stochastic process $\mathcal{Q}_{se}$ over $\mathcal{B}_s$ as $\mathcal{Q}_{se}=(\mathcal{B}_{se},\{j^{se}_t\}_{t\in T},\mu_{se})$. We now attach to $\mathcal{Q}_{se}$ an ancillary system with quantum probability space $(\mathcal{B}_{a},\mu_{a})$, where $\mathcal{B}_a$ is a von Neumann algebra over the ancilla Hilbert space $\mathfrak{h}_a$. We then define another quantum stochastic process over $\mathcal{B}_{as}=\mathcal{B}_{a} \otimes \mathcal{B}_{s}$ as $\mathcal{Q}_{ase} = (\mathcal{B}_{ase},\{j^{ase}_t\}_{t \in T},\mu_{ase})$, where $\mathcal{B}_{ase} = \mathcal{B}_{as} \otimes \mathcal{B}_{e}$, $\mu_{ase} = \mu_{a} \otimes \mu_{se}$, and $j^{ase}_t$ acts as \begin{equation} j^{ase}_t(X \otimes Y) = X \otimes j^{se}_t(Y) \in \mathcal{B}_{ase}\;, \hbox{$\forall$ $X \in \mathcal{B}_{a}$ and $Y \in \mathcal{B}_{s}$.} \end{equation} That is, $j^{ase}_t$ acts non-trivially only on a factor in $\mathcal{B}_{se}$. For any time tuple $\mathbf{t}_n$ with $0 \leq t_1<t_2<\ldots<t_n$, the correlation kernel $w^{ase}_{\mathbf{t}_n}$ for $\mathcal{Q}_{ase}$ is given by \begin{align*} w^{ase}_{\mathbf{t}_n} (\mathbf{a}_n,\mathbf{b}_n) &= \mu_{ase}(j^{ase}_{\mathbf{t}_n}(\mathbf{a}_n)^{*}j^{ase}_{\mathbf{t}_n}(\mathbf{b}_n)), \end{align*} where the components of $\mathbf{a}_n$ and $\mathbf{b}_n$ are operators on $\mathcal{B}_{as}$. By the polarizing identity, \begin{equation} X^{\ast }ZY=\frac{1}{4}\sum_{n=0}^{3}(-i)^n \left( X+e^{i\frac{n\pi}{2}}Y\right)^\ast Z\left( X+e^{i\frac{n\pi}{2}}Y\right), \label{eq:polarizing} \end{equation} it suffices to consider correlation kernels with $\mathbf{b}_n=\mathbf{a}_n$. Choose $\mathfrak{h}_a$, ancilla operators $V_{1,r_1},\ldots,V_{n,r_n}$ for $r_j=1,\ldots,\chi_j$ (with $\chi_j$ a nonnegative integer) and $j=1,\ldots,n$, and state $\mu_a$ such that $\mu_a(V_{1,r'_1}^* \cdots V_{n,r'_n}^*V_{n,r_n} \cdots V_{1,r_1}) =\mu_a(V_{1,r_1}^* \cdots V_{n,r_n}^*V_{n,r_n} \cdots V_{1,r_1}) \prod_{j=1}^n \delta_{r_j r'_j}$ for all $r_j,r'_j$, where $\delta_{jk}$ is the Kronecker delta. Let $a_j \in \mathcal{B}_{as}$ of the form $a_j = \sum_{r_j=1}^{\chi_j} V_{j,r_j} \otimes W_{j,r_j}$, with $V_{j,r_j} \in \mathcal{B}_a$ and $W_{j,r_j} \in \mathcal{B}_s$. For this choice of $a_j$ and using the fact $\mu_{ase}(\cdot) = \mathrm{tr}(\rho_a \otimes \rho_{se} ( \cdot))$ for some density operators $\rho_a$ on $\mathfrak{h}_a$ and $\rho_{se}$ on $\mathfrak{h}_s \otimes \mathfrak{h}_e$, we have that, \begin{align*} \lefteqn{w^{ase}_{\mathbf{t}_n}(\mathbf{a}_{n},\mathbf{a}_{n})}\\ &=\mu_{ase}(j^{ase}_{\mathbf{t}_n}(\mathbf{a}_n)^{*}j^{ase}_{\mathbf{t}_n}(\mathbf{a}_n))\\ &=\sum_{r_1=1}^{\chi_1} \cdots \sum_{r_n=1}^{\chi_n} \mu_{ase}(j^{ase}_{t_1}(V_{1,r_1}^* \otimes W_{1,r_1}^{*}) \cdots j^{ase}_{t_n}(V_{n,r_n}^* \otimes W_{n,r_n}^{*})\\ &\quad \times j^{ase}_{t_n}(V_{n,r_n} \otimes W_{n,r_n}) \cdots j^{ase}_{t_1}(V_{1,r_1} \otimes W_{1,r_1}) )\\ &=\sum_{r_1=1}^{\chi_1} \cdots \sum_{r_n=1}^{\chi_n} (\mu_{a} \otimes \mu_{se})(V_{1,r_1}^* \otimes j_{t_1}^{se}(W_{1,r_1}^{*}) \cdots \\ &\quad \times V_{n,r_n}^* \otimes j^{se}_{t_n}( W_{n,r_n}^{*}) V_{n,r_n} \otimes j^{se}_{t_n}( W_{n,r_n}) \cdots V_{1,r_1} \otimes j^{se}_{t_1}( W_{1,r_1}) )\\ &=\mathrm{tr}\left( \sum_{r_1=1}^{\chi_1} \cdots \sum_{r_j=1}^{\chi_n} \alpha_{r_1,\ldots,r_n} \mathcal{W}_{n,r_n} \circ j^{se \star}_{t_{n-1},t_n} \circ \cdots \circ \mathcal{W}_{2,r_2} \right.\\ &\quad \left. \circ j^{se \star}_{t_1,t_2} \circ \mathcal{W}_{1,r_1} \circ j^{se \star}_{t_1} (\rho_{se}) \vphantom{\sum_{r_1=1}^{n_1} \cdots \sum_{r_j=1}^{n_j} \alpha_{r_1,\ldots,r_n} }\right), \end{align*} where $\alpha_{r_1,\ldots,r_n} = \mu_{a}(V_{1,r_1}^* \cdots V_{n,r_n}^* V_{n,r_n} \cdots V_{1,r_1}) \geq 0$ and $\mathcal{W}_{j,r_j}: \mathcal{B}_s \rightarrow \mathcal{B}_s$ is map defined by $\mathcal{W}_{j,r_j}(\cdot) = W_{j,r_j} (\cdot) W_{j,r_j}^*$. Note that in the development above we have identified $\mathcal{W}_{j,r_j}$ with its ampliation $\mathcal{W}_{j,r_j} \otimes I$ on $\mathcal{B}_{se}$. Define the linear operator $\mathcal{T}^{s}_{\mathbf{t}_n}$ via, \begin{align*} \lefteqn{\mathcal{T}^{s}_{\mathbf{t}_n}(\mathcal{W}_{1,r_1} \otimes \mathcal{W}_{2,r_2} \otimes \cdots \otimes \mathcal{W}_{n,r_n})}\\ &= \mathrm{tr}_{\mathfrak{h}_e}(\mathcal{W}_{n,r_n} \circ j^{se\star}_{t_{n-1},t_n} \circ\cdots\circ \mathcal{W}_{2,r_2} \circ j^{se \star}_{t_1,t_2} \circ \mathcal{W}_{1,r_1} \circ j^{se \star}_{t_1} (\rho_{se})), \end{align*} and note that $\mathcal{T}^{s}_{\mathbf{t}_n}$ is defined independently of the ancilla and any of its parameters. Then we have that, \begin{align*} \lefteqn{w^{ase}_{\mathbf{t}_n}(\mathbf{a}_{n},\mathbf{a}_{n})}\\ &=\mathrm{tr}\left(\mathcal{T}^{s}_{\mathbf{t}_n}\left( \sum_{r_1=1}^{\chi_1} \cdots \sum_{r_n=1}^{\chi_n} \alpha_{r_1,\ldots,r_n}\mathcal{W}_{1,r_1} \otimes \cdots \otimes \mathcal{W}_{n,r_n}\right)\right) \end{align*} With the complete freedom to choose $\mathfrak{h}_a$ and $\rho_a$, by taking linear combinations of $\mathcal{W}_{1,r_1} \otimes \mathcal{W}_{2,r_2} \otimes \cdots \otimes \mathcal{W}_{n,r_n}$ and limits thereof, $\mathcal{T}^{s}_{\mathbf{t}_n}$ can be extended to a linear operator mapping from $\mathrm{CP}(\mathcal{B}_s)^{\otimes n}$ to $\mathcal{S}(\mathfrak{h}_s)$, where $\mathrm{CP}(\mathcal{B}_s)$ denotes the space of all completely positive maps on $\mathcal{B}_s$. For $\mathcal{B}_s=\mathrm{B}(\mathfrak{h}_s)$ and restricting $\mathcal{T}^{s}_{\mathbf{t}_n}$ to $\mathcal{O}(\mathfrak{h}_s)^{\otimes n}$, we recover the process tensor from Section \ref{sec:process-tensor} but without distinguishing between correlated and uncorrelated sequential quantum operations. \begin{theorem} For every correlation kernel $\omega^{se}_{\mathbf{t}_n}$ there exists a process tensor $\mathcal{T}^{s}_{\mathbf{t}_n}$ such that $\omega^{se}_{\mathbf{t}_n}(\mathbf{a}_n,\mathbf{b}_n)= \sum_{k=1}^{\ell} c_k \mathrm{tr}\left(\mathcal{T}^{s}_{\mathbf{t}_n}(\mathcal{R}_k(\mathbf{a}_n,\mathbf{b}_n)\right)$, with $\ell$ some positive integer, $c_1,\ldots,c_{\ell}$ some complex constants and $\mathcal{R}_{k}(\mathbf{a}_n,\mathbf{b}_n) \in \mathrm{CP}(\mathcal{B}_s)^{\otimes n}$, which depends on $\mathbf{a}_n$ and $\mathbf{b}_n$, of the form $$ \mathcal{R}_{k}(\mathbf{a}_n,\mathbf{b}_n) = \mathcal{R}_{1k} \otimes \mathcal{R}_{2k} \otimes \cdots \otimes \mathcal{R}_{nk}, $$ where $\mathcal{R}_{jk}(\cdot) = R_{jk}(\cdot)R_{jk}^{*}$ for some $R_{jk} \in \mathcal{B}_s$. \end{theorem} \begin{proof} By the polarizing identity \eqref{eq:polarizing} we can write $\omega^{se}_{\mathbf{t}_n}(\mathbf{a}_n,\mathbf{b}_n)=\sum_{k=1}^{\ell} c_k \omega^{se}_{\mathbf{t}_n}(\mathbf{R}_{nk},\mathbf{R}_{nk})$ for some positive integer $\ell$ and complex constants $c_k$, where $\mathbf{R}_{nk}=(R_{1k},\ldots,R_{nk})$ for some operators $R_{jk} \in \mathcal{B}_s$. By a similar calculation to the above, we can then write \begin{align*} w^{se}_{\mathbf{t}_n}(\mathbf{a}_{n},\mathbf{b}_{n}) &= \sum_{k=1}^{\ell} c_k \omega^{se}_{\mathbf{t}_n}(\mathbf{R}_{nk},\mathbf{R}_{nk})\\ &= \sum_{k=1}^{\ell} c_k \mathrm{tr}\left(\mathcal{T}^{s}_{\mathbf{t}_n} (\mathcal{R}_{k}(\mathbf{a}_n,\mathbf{b}_n))\right), \end{align*} with $\mathcal{R}_{k}(\mathbf{a}_n,\mathbf{b}_n)$ is as defined in the theorem statement. \end{proof} Therefore, a correlation kernel can be evaluated by evaluating a process tensor on a strict subset of $\mathcal{O}(\mathfrak{h})^{\otimes n}$. This is because the correlation kernels $w^{se}_{\mathbf{t}_n}$ capture direct measurements performed on the system, whereas the process tensor allows general quantum operations involving ancillas. \section{Conclusion} \label{sec:conclu} This paper has given a tutorial overview of the AFL theory of quantum stochastic processes, multi-time correlations and sequential quantum measurements, and some subtleties associated with the latter two. We then recalled the notion of a process tensor and showed its relationship to the correlation kernels of an augmented quantum stochastic process incorporating ancillas. In particular, it was shown how process tensors can be recovered from correlation kernels. Following from this paper, there are further connections between the AFL theory and process tensors to be studied. For instance, the notion of quantum Markov processes has already been formulated in the AFL theory (see \cite{Nurd20} for an illustration in quantum optics) and, more recently, in the process tensor framework \cite{PRRFPM18b}. The question is whether these two notions are formally equivalent, as one may expect them to be. Also, a reconstruction theorem for quantum stochastic processes based on consistency conditions on the correlation kernels has been obtained in AFL theory while a generalized extension theorem (GET) has been proposed for process tensors \cite{MSPM20} as an adaptation of the Kolmogorov extension theorem for classical stochastic processes. How the GET is connected to the AFL reconstruction will be investigated in a future work. \bibliographystyle{ieeetran}
\section{Introduction} Warm inflation scenario has been received attentions as an alternative approach of the reheating phase of the universe in order to generate the thermal bath in the standard cosmology. The warm inflation was originally proposed to resolve some problems in the standard cold inflation picture \cite{Berera:1995ie,Berera:1995wh}, for instances, providing sufficiently hot thermal bath after inflaton decaying to other matter fields in the reheating epoch \cite{Berera:1996nv,Hall:2003zp} the large quantum correction of the inflaton field might spoiling the flatness of the observed universe or a so-called eta problem \cite{Berera:1999ws,Berera:2003yyp}, fine tuning of the initial values of the inflation models motivated by beyond standard model physics \cite{Ramos:2001zw,Berera:2000xz,Bastero-Gil:2016mrl} and other salient features see \cite{Berera:2008ar,Bastero-Gil:2009sdq,Rangarajan:2018tte} for reviews. In the warm inflation stage, the inflaton decays into radiation matter during the slow-roll period. In the meantime, the quantum fluctuations of the density perturbation amplitudes are generated by the friction of the inflaton propagating in the thermal bath. At the end of inflation, the universe is automatically heated up with out requiring the preheating and reheating phases before radiation dominated era. Moreover, the energy density of the radiation is smoothly joined with the energy density of the inflaton field. The dissipative coefficient, $\Gamma$ plays a crucial role in the warm inflationary universe for describing the dynamics of warm inflation. All information of the microscopic dynamical processes during warm inflationary universe is contained in the dissipative coefficient and it has been constructed and calculated by using the supersymmetric models with finite temperature field analysis in various aspects see Refs. \cite{Moss:2006gt,Berera:1998gx,Berera:2001gs,Zhang:2009ge,Bastero-Gil:2011rva,Bastero-Gil:2012akf,Bastero-Gil:2014oga,Berera:2002sp,Bastero-Gil:2005klw,Bastero-Gil:2004oun} for more details and references therein. The self-interacting inflaton potential ($V \sim \phi^4$) has been largely used to study of the standard (cold) inflation dynamics in numerous perspectives see \cite{Bassett:2005xm,Martin:2013tda,Gron:2018rtj} for reviews. According to the requirements of the standard quantum field theory, the self-interacting potential is renormalizable theory and it is naturally received the quantum-corrected effect. The quantum correction of the perturbative loop expansion known as Coleman-Weinberg potential \cite{Coleman:1973jx} is one of the famous approach. In addition, the phenomenological quantum-corrected self-interacting potential is proposed and employed to study the quantum-corrected effect due to the non-vanishing primordial tensor modes by Ref.\cite{Joergensen:2014rya}. On the other hand, there are a number of investigations that also used the self-interacting potential to study warm inflationary universe in both minimal and non-minimal coupling to gravity, for examples see Refs.\cite{Panotopoulos:2015qwa,Benetti:2016jhf,Motaharfar:2018mni,Kamali:2018ylz,Graef:2018ulg,Arya:2018sgw,Bastero-Gil:2018uep}. However, there is no previous work in a study of non-minimally coupled warm inflation with the quantum-corrected self-interacting potential according to the literature. Therefore, in this work, we will investigate the quantum-correction of the self-interacting potential due to the thermal effect inflation with $\Gamma \propto T$, where $T$ is a temperature. Our study might shed some light on the the quantum-correction of the inflaton due to the finite temperature reaction which plays significant role in warm inflationary universe. In particular, the results in this work might reveal to what extend the model's parameters deviate from cold inflation when the thermal effect is taken into account. Moreover, we will constrain our theoretical results with Planck 2018 via the COBE normalization and the prediction in this work will be compared to the latest observational data. The paper is organized as follows: all relevant dynamical equations in the non-minimal coupling warm inflation under the slow-roll approximation are determined in section \ref{formalism}. Next, in section \ref{confront-data}, we will compare the results in this work with the observational data. Finally, we close this paper by providing discussions and conclusions in section \ref{conclusion}. \section{Formalism} \label{formalism} \subsection{Non-minimal coupling gravitational action and conformal transformation} We start with a gravitational action of the non-minimal coupling of the scalar field to Ricci scalar (gravity) with a general form of the effective potential $V(\phi)$, one finds, \begin{eqnarray} S_J = \int \sqrt{-g}\left[ -\frac12\left(M_p^2 + \xi \,\phi^2 \right)R + g^{\mu\nu}\partial_\mu\phi\partial_\nu\phi - V(\phi)\right] \label{action-J} \end{eqnarray} where the action $S_J$ stands for the gravitational action in the Jordan frame. While $M_p^2\equiv 1/8\pi G$ and $\xi$ are reduced Plank mass and the non-minimal coupling constant, respectively. It is more convenient to study the inflation dynamics of the non-minimal coupling in the Einstein frame, i.e., the gravitational sector of the action written in the Einstein-Hilbert form only. The Einstein frame can be achieved by using the conformal transformation via a re-defining metric tensor as, \begin{eqnarray} \widetilde{g}_{\mu\nu} = \Omega(\phi)^2\,g_{\mu\nu}\,, \qquad \Omega(\phi) = 1+ \frac{\xi\,\phi^2}{M_p^2}\,. \end{eqnarray} Here all variables with tilde symbol represent the quantities in the Einstein frame. Applying the conformal transformation to the action (\ref{action-J}), the action in Einstein frame is given by, \begin{eqnarray} S_E = \int \sqrt{-\widetilde{g}}\left[ -\frac12\,M_p^2\,\widetilde{g}^{\mu\nu}\widetilde{R}_{\mu\nu} + \widetilde{g}^{\mu\nu}\partial_\mu\chi\partial_\nu\chi - U(\chi)\right]. \label{action-E} \end{eqnarray} We have used the re-definition of new scalar field, $\chi$ in the Einstein frame to obtain the canonical form of the kinetic term of the scalar field, $\chi$ as \begin{eqnarray} \frac12\left( \frac{d\chi}{d\phi}\right)^2 = \frac{1+ 3\,M_p^2\,\Omega_\phi^2}{\Omega^2} \,, \end{eqnarray} where $\Omega_\phi\equiv d \Omega/d\phi$ and the new effective potential in the Einstein frame, $U(\chi)$ is also given by, \begin{eqnarray} U(\chi) = \Omega^{-4}\,V\left( \phi(\chi)\right). \label{E-potential} \end{eqnarray} In this work, we will consider the self-interacting potential with phenomenological quantum correction in the warm inflation scenario. This potential has been proposed by Ref.\cite{Joergensen:2014rya} in order to analyze the characters of the quantum correction in the self-interacting scalar field phenomenologically. The potential in the Jordan frame is written in the following form \begin{eqnarray} V(\phi) = \lambda\,\phi^4\left( \frac{\phi}{\Lambda}\right)^{4\gamma}\,. \label{quantum-potential} \end{eqnarray} Here we introduced the quantum correction (real) parameter $\gamma$ that use to characterize the quantum behavior of the self-interacting potential and the $\Lambda$ parameter is the cut-off at a given energy scale. It was shown that the range of the $\gamma$ should be $\mathcal{O}(\gamma) \sim 0.1$ according to the constraint from observational data \cite{Joergensen:2014rya}. In the latter, we will construct the slow-roll dynamics in warm inflation in the Einstein frame with the potential in Eq.(\ref{quantum-potential}). \subsection{Slow-roll dynamics in warm inflation} In this subsection, we collect all relevant cosmological equations of the slow-roll paradigm in warm inflation. Recalling the Friedmann equation from the gravitational action in Einstein frame with the flat FRW background in the warm inflation scenario, it reads, \begin{eqnarray} H^2 = \frac{1}{3\,M_p^2}\left( \frac{1}{2}\,\dot\chi^2 + U(\chi) + \rho_R\right), \end{eqnarray} where $\dot\chi\equiv d\chi/dt$ and $\rho_R$ is energy density of the radiation fluid with the equation of state $w_R=1/3$. The Klein-Gordon equation of motion for the scalar field, $\chi$ in Einstein frame with the dissipative coefficient, $\Gamma$ is given by \begin{eqnarray} \ddot\chi + 3H\,\dot\chi + U_\chi = -\Gamma\,\dot\chi\,, \end{eqnarray} with $U_\phi \equiv dU/d\chi$. The conservation of the energy-momentum tensor of the radiation fluid leads to the continued equation as \begin{eqnarray} \dot\rho_R + 4H\,\rho_R = \Gamma\,\dot\chi^2\,. \end{eqnarray} Based on the finite temperature field theory approaching to the supersymmetry models, the generic form of the dissipative coefficient, $\Gamma$ for several warm inflation models can be written in terms of the coupling between temperature $(T)$, scalar (inflaton) field $(\chi)$ and the mass of the some heavy field during warm inflation $(M_X)$ with $M_X>T$ as the following form \cite{Berera:1998gx,Berera:2001gs,Zhang:2009ge,Bastero-Gil:2011rva,Ramos:2013nsa} \begin{eqnarray} \Gamma = C_{(m)}\,\frac{T^m\,\chi^{n}}{M_X^l}\,, \qquad m +n-l=1\,. \label{general-gamma} \end{eqnarray} The dissipative coefficient, $\Gamma$ represents the energy transfer from the inflaton field to the thermal bath in the warm inflationary universe. The parameter $C_m$ encodes the microscopic dynamics of the inflaton interacting with other particles and the $m$, $n$ and $l$ are the integer number. Particularly for the $m=1$ case, this corresponds to the high temperature supersymmetric model \cite{Zhang:2009ge} or considering inflaton as a pseudo Goldstone boson that can be coupled to other fields in the thermal bath such as warm natural inflation \cite{Mishra:2011vh} and warm little inflation in analogy to the little Higgs model \cite{Bastero-Gil:2016qru}. In the following, we will consider the slow-roll approximation framework with the dissipative coefficients $\Gamma$ for $m=1$ and at the strong regime. In the standard slow-roll approximation, we can re-write the Friedmann equation as well as the equations of motion for the inflaton and the radiation matter as \begin{eqnarray} H^2 &\approx& \frac{1}{3 M_p^2}\,U(\chi)\,, \label{SR-friedmann} \\ \dot\chi &\approx& -\frac{U_\chi}{3H(1+Q)}\,,\qquad Q\equiv \frac{\Gamma}{3H}\,, \label{SR-KG} \\ \rho_R &\approx& \frac{\Gamma\,\dot\chi}{4H}\,,\qquad \rho_R = C_R\,T^4\,, \label{SR-rad} \end{eqnarray} where the $Q$ is called dimensionless parameter that use to identify the regime of the dissipative effects in the latter and $C_R = g_R\,\pi^2/30$. In addition, the minimal supersymmetric standard model gives the number of relativistic degrees of freedom, $g_R = 228.76$ and leads to $C_R \simeq 70$ \cite{Hall:2003zp}. We have been used the following approximations for the slow-roll scenario, \begin{eqnarray} \rho_R &\ll& \rho_\chi\,,\qquad \rho_\chi = \frac12\,\dot\chi^2 + U\,, \\ \dot\chi^2 &\ll& U(\chi)\,, \\ \ddot\chi &\ll& 3H\left( 1 + Q\right)\dot\chi\,, \\ \dot\rho_R &\ll& 4H\,\rho_R\,, \end{eqnarray} As mentioned earlier, it is more convenient to separate warm inflation into two regimes by using the dimensionless $Q$ as \begin{eqnarray} Q &\gg& 1\,,\qquad {\rm strong~regime}\,, \\ Q &\ll& 1\,,\qquad {\rm weak~regime}\,. \end{eqnarray} In addition, we can express the temperature as a function of the inflaton field, $\chi$ by using the Eqs. (\ref{general-gamma},\ref{SR-friedmann},\ref{SR-KG},\ref{SR-rad}) for the general $m$ integer values. It reads, \begin{eqnarray} T &=& \left( \frac{U_\chi^{2}\,\chi^{m-1}}{4H\,C_{(m)}\,C_R}\right)^{\frac{1}{4+m}}\,,\qquad {\rm for}\,~Q\gg 1\,, \label{T-phi-strong} \\ T &=& \left( \frac{C_{(m)}\,U_\chi^{2}\,\chi^{1-m}}{36H^3\,C_R}\right)^{\frac{1}{4-m}}\,,\qquad {\rm for}\,~Q\ll 1\,. \label{T-phi-weak} \end{eqnarray} In the following, we will concentrate and investigate warm inflation in the strong dissipative regime only since this regime might show better thermal effect in the inflationary universe. Before calculating the slow-roll parameters, we would like to express the form of the effective potential in the Einstein in Eq.(\ref{E-potential}) under the large field assumption during the inflation i.e., $ \phi \gg {M_p /\sqrt{\xi}}$\,. One finds, \begin{eqnarray} \chi \simeq \kappa\, M_p \ln \Big({ \sqrt{\xi}\, \phi \over M_p } \Big) , ~~~~ \kappa \equiv \sqrt{{2\over \xi} + 6} \end{eqnarray} Then the Einstein frame potential then takes the following form \begin{eqnarray} U(\chi) = \Omega^{-4} V(\phi(\chi)) &=& \frac{ M_p^4}{\left(M_p^2+\xi \phi ^2\right)^2} \lambda\, \phi ^4 \left(\frac{\phi }{\Lambda }\right)^{4 \gamma } \nonumber\\ &=& {\lambda M_p^4 \over \xi^2} \left(\exp\Bigg[{\frac{-2 \chi}{\kappa M_p}} \Bigg] +1 \right)^{-2} \left({M_p \over \sqrt{\xi} \Lambda} \right)^{4 \gamma} \exp \Bigg[{4 \gamma \chi \over \kappa M_p} \Bigg] \label{U-chi} \end{eqnarray} Next, we provide the slow-roll parameters in warm inflation for general $m$ and they read, \begin{eqnarray} \epsilon &=& \frac{M_p^2}{2}\left( \frac{U_\chi}{U}\right)^2\,,\quad \eta = M_p^2\,\frac{U_{\chi\chi}}{U}\,,\quad \beta = M_p^2\left( \frac{U_\chi\,\Gamma_\chi}{U\,\Gamma}\right)\,. \label{SR-parameters} \end{eqnarray} The inflationary phase of the universe occurs under the following conditions \begin{eqnarray} \epsilon \ll 1 + Q\,,\qquad \eta \ll 1 + Q\,,\qquad \beta \ll 1 + Q\,. \end{eqnarray} We firstly calculate the slow-roll parameters, $\epsilon$ and $\eta$ with the potential in Eq.(\ref{E-potential}) and they are given by \begin{eqnarray} \epsilon &\approx& \frac{8}{\kappa^2}\left(\frac{M_p^2}{\xi\,\phi^2}\right)^2\left(1 + \gamma\,\frac{\xi\,\phi^2}{M_p^2} \right)^2 \label{SR-epsilon} \\ \eta &\approx& \frac{16}{\kappa^2}\,\frac{M_p^4}{\xi^2\,\phi^4} \left(1 + \left(2 \gamma -\frac12\right)\frac{\xi\,\phi^2}{M_p^2}\right) \,, \label{SR-eta} \end{eqnarray} where we have presented $\chi$ of the Einstein frame in terms of $\phi$ of the Jordan frame with $\phi = M_p\,\exp\left({{\chi}/{\kappa\,M_p}}\right)/\sqrt{\xi}$\,. The $\beta$ parameter depends on the dissipative coefficient, $\Gamma$\, and we can calculate the $\beta$ parameter after introducing the explicit form of the $\Gamma$. Next We start with the dissipative coefficient of warm inflation, the dissipative coefficient for $m=1$ is read, \begin{eqnarray} \Gamma = C_{T}\,T\,. \label{C1} \end{eqnarray} On the one hand, the dissipative coefficient in this form can be achieved from high temperature approximation of the thermal supersymmetric model \cite{Moss:2006gt}. On the other hand, the warm little inflation \cite{Bastero-Gil:2016qru} might generates the disipative coefficient in (\ref{C1}) where the inflaton in this scenario is considered as a pseudo Nambu-Goldstone boson of a broken gauge symmetry in the warm little inflation similar to "Little Higgs" model for electroweak symmetry breaking. Moreover, warm inflation can naturally occur for $T>H$. The coupling $C_T$ in Eq.(\ref{C1}) is given by \begin{eqnarray} C_T \simeq \frac{3\,g^2}{h^2\big(1-0.34\log(h) \big)}\,, \label{C11} \end{eqnarray} where $g$ is the Yukawa coupling of the inflaton (super scalar field) and heavy fermions in the warm little inflation scenario while $h$ is Yukawa coupling of the heavy fermions and light singlet scalar and fermion fields \cite{Bastero-Gil:2016qru}. By using the dissipative coefficient in Eq.(\ref{C1}), this leads to the expression of the temperature as a function of the inflaton field by using Eq.(\ref{T-phi-strong}) as \begin{eqnarray} T = \left( \frac{U_\chi^{2}}{4H\,C_T\,C_R}\right)^{\frac{1}{5}}. \label{T1} \end{eqnarray} Having use the results in Eqs.(\ref{U-chi}), (\ref{C1}) and (\ref{T1}), the slow-roll parameter $\beta$ up to the first order of the $\gamma$ correction at the large field approximation is given by \begin{eqnarray} \beta \approx \frac{24\,M_p^4}{5\,\kappa^2\,\xi^2\,\phi^4} - \frac{16\,M_p^2}{5\,\kappa^2\,\xi\,\phi^2} + \frac{8\,M_p^4}{\kappa^2\,\xi\,\phi^2}\,\gamma\,, \label{beta-T1} \end{eqnarray} where the relation $\phi = M_p\,\exp\left({{\chi}/{\kappa\,M_p}}\right)/\sqrt{\xi}$\, is implied. In addition, the dimensionless parameter $Q$ for $\Gamma = C_T\,T$ can be written by \begin{eqnarray} Q = \left[\left(\frac{2}{3}\right)^{2}\mathcal{K}\,\frac{M_p^4}{\phi^{4}} \left(\frac{\Lambda}{\phi}\right)^{4\,\gamma}\left(1+ \gamma\,\frac{\xi \phi ^2}{M_p^2} \right)^{2}\,\right]^{\frac15}\,,\qquad \mathcal{K}\equiv \frac{ C_T^{4}}{C_R\,\kappa^2\,\lambda}\,. \label{Q-T1} \end{eqnarray} At the end of inflation requiring $\epsilon_{\rm end} = Q$, one finds \begin{eqnarray} \frac{8}{\kappa^2}\left[\frac{M_p^4}{\xi^2\,\phi_{\rm end}^4}\left(1+ \gamma\,\frac{\xi \phi_{\rm end} ^2}{M_p^2} \right)^2\,\right]^{\frac45} &=& \left[\left(\frac{2}{3}\right)^{2}\mathcal{K}\,\xi^2 \left(\frac{\Lambda}{\phi_{\rm end}}\right)^{4\,\gamma}\right]^{\frac15} \nonumber\\ \left(1+ \gamma\,\frac{\xi \phi_{\rm end} ^2}{M_p^2} \right) &=& \widetilde{K}\,\Lambda^2\,\frac{\xi}{M_p^2}\left(\frac{\phi_{\rm end}}{\Lambda} \right)^{2-\frac{\gamma}{2}}\,, \label{epsilon-end-C1} \end{eqnarray} where the $\widetilde{K}$ parameter is defined by \begin{eqnarray} \widetilde{K} \equiv \left[ \left( \frac{\kappa^2}{8}\right)^5\,\left(\frac{2}{3}\right)^{2}\,\mathcal{K}\,\xi^2\,\right]^{\frac18}\,. \label{def-Ktilde} \end{eqnarray} Applying the assumption that the given order of the $\gamma$ parameter, $\mathcal{O}(\gamma)\lesssim 0.1$ as mentioned earlier and leading to $2-\gamma/2 \approx 2$, the inflaton field at the end of warm inflation is read \begin{eqnarray} \phi_{\rm end} = \frac{1}{\sqrt{\widetilde{K} - \gamma}}\,\frac{M_p}{\sqrt{\xi}} \label{phi-end-C1} \end{eqnarray} Therefore, the universal bound of the quantum correction for the self-interacting inflaton field due to the modification of warm inflation is given by \begin{eqnarray} \gamma < \widetilde{K}\,. \label{gamma-bound-C1} \end{eqnarray} The bound in Eq.(\ref{gamma-bound-C1}) represents the thermal effects on the quantum-corrected parameter, $\gamma$ in warm inflation. It is worth noting that the universal bound in warm inflation is different from the standard (cold) inflation given by Ref.\cite{Joergensen:2014rya} as $\gamma < \sqrt{3}/2$ which is equivalent to the weak regime of warm inflation, i.e., $\epsilon(\phi_{\rm end})=1$. For given values $C_T = 0.02$, $C_R = 70$, $\xi = 10^4$ and $\lambda = 0.5\times10^{-4}$, we find $\widetilde{K} = 1.106$. This means the inflaton value at the end of warm inflation is smaller than that of the inflaton in cold inflation. \\ Moreover, the e-folding number, $N$ in the strong regime $Q\gg 1$ is given by \begin{eqnarray} N &=&\frac{1}{M_p^2} \int_{\chi_{\rm end}}^{\chi_N}\frac{Q\,U}{U_\chi}\,d\chi \nonumber\\ &=& \int_{\phi_{\rm end}}^{\phi_N}\frac{Q(\phi)}{\sqrt{2\,\epsilon(\phi)}}\,\frac{1}{\phi}\,d\phi \approx \frac{5\,\kappa\,\xi}{24}\left[\frac{\mathcal{K}}{9\sqrt{2}}\left(\frac{\Lambda}{M_p}\right)^6\left(\frac{\phi}{\Lambda}\right)^{6\left(1-\frac{2}{3}\, \gamma\right)}\,\right]^{\frac15}\Bigg|_{\phi_{\rm end}}^{\phi_N}\,, \end{eqnarray} where we have expanded the $\gamma$ parameter up to the first order. Having use the $\phi_N\gg\phi_{\rm end}$ and $\mathcal{O}(\gamma)\sim 0.1$ approximations, the inflaton field at the Hubble horizon crossing in terms of the {\it e}-folding number, $N$ is written by \begin{eqnarray} \phi_{N} &\approx& \left[\frac{2187}{3125}\cdot 32768 \sqrt{2}\right]^{\frac{1}{6-4 \gamma }}\left[\left( \frac{N}{\kappa\,\xi}\right)^5 \left(\frac{M_p^6}{\mathcal{K}\,\Lambda^{4\gamma}} \right)\right]^{\frac{1}{6-4 \gamma}} \nonumber\\ &=& \frac{12\cdot 2^{\frac{7}{12}}\,3^{\frac16}}{5^{\frac56}} \left( \frac{N}{\kappa\,\xi}\right)^{\frac56} \left(\frac{M_p}{\mathcal{K}^{\frac16}} \right) \nonumber\\ &&\times\,\Bigg[1 +\frac{\gamma}{18}\left(\ln\left[\frac{2^{31}\cdot 3^{14}}{5^{10}}\right] + 2 \ln \left[\left( \frac{N}{\kappa\,\xi}\right)^5 \left(\frac{M_p^6}{\mathcal{K}\,\Lambda^6} \right)\right] \right)+\mathcal{O}\left(\gamma ^2\right)\Bigg] \nonumber\\ &\simeq& 5.647 \left[ \frac{N^5}{\kappa^5\,\xi^2\,\mathcal{K}}\right]^{\frac16} \Bigg[1 +\frac{\gamma}{9}\left(10.387 + \ln \left[\left( \frac{N}{\kappa\,\xi}\right)^5 \left(\frac{M_p^6}{\mathcal{K}\,\Lambda^6} \right)\right] \right)\Bigg]\frac{M_p}{\sqrt{\xi}} \,, \label{phi-N} \end{eqnarray} here we have considered the quantum-corrected character of the self-interacting potential in warm inflation up to the leading order of the $\gamma$ parameter only. In addition, one might re-write the dimensionless parameter $Q$ in Eq.(\ref{Q-T1}) in terms of the {\it e}-folding number, $N$ by using Eq.(\ref{phi-N}) as \allowdisplaybreaks \begin{eqnarray} Q(N) &\approx& \left[\left(\frac{2}{3}\right)^{2}\frac{\mathcal{K}\,M_p^4}{\phi_N^{4}}\left(\frac{\xi^2\,\Lambda^4}{M_p^4} \right)^{\gamma}\,\right]^{\frac15} \nonumber\\ &\simeq& \left[\left(\frac{2}{3}\right)^{2}\frac{\mathcal{K}\,M_p^4}{\phi_N^{4}}\left(1 + 2\,\gamma\,\ln\left[\frac{\xi\,\Lambda^2}{M_p^2}\right] \right)\right]^{\frac15} \nonumber\\ &=& \left[ \frac{\left(\frac{2}{3}\right)^{2}\frac{\mathcal{K}^{\frac53}\,\xi^2}{5.647^4}\left(1 + 2\,\gamma\,\ln\left[\frac{\xi\,\Lambda^2}{M_p^2}\right] \right)}{\left[ \frac{N^5}{\kappa^5\,\xi^2}\right]^{\frac{2}{3}} \left[1 +\frac{\gamma}{9}\left(10.387 + \ln \left[\left( \frac{N}{\kappa\,\xi}\right)^5 \left(\frac{M_p^6}{\mathcal{K}\,\Lambda^6} \right)\right] \right)\right]^{4}}\right]^{\frac15} \label{Q-N} \end{eqnarray} Taking the back reaction of the inflaton fluctuation in the thermal heat bath into account, in addition, the power spectrum is given by \cite{Bastero-Gil:2011rva,Graham2009,Bastero-Gil:2018uep,Hall:2003zp,Ramos:2013nsa,Bastero-Gil:2009sdq,Taylor:2000ze,DeOliveira:2001he}, \begin{eqnarray} \Delta_{\mathcal{R}} &=& \frac{U\,\big(1 + Q_N\big)^2}{24\,\pi^2\,M_p^4\,\epsilon}\left(1 + 2\,n_N + \left(\frac{T_N}{H_N}\right)\frac{2\sqrt{3}\,\pi\,Q_N}{\sqrt{3+4\pi\,Q_N}}\right)G(Q_N)\,, \nonumber\\ &\simeq& \frac{5\,C_T^3}{12\,\pi^4\,g_R\,Q_N^2} \left(1+ \frac{\sqrt{3}\,\pi\,Q_N}{\sqrt{3+4\pi\,Q_N}}\right)G(Q_N)\, \label{spectrum} \end{eqnarray} where the subscript $``N"$ is labeled for the values of all quantities in warm inflation at the Hubble horizon crossing and $n = 1/\big( \exp{H/T} - 1 \big)$ is the Bose-Einstein statistical function. In addition, the power spectrum in Eq.(\ref{spectrum}) can be constrained by observational data and yields the upper bound of the $C_T$ parameter as $C_T \lesssim 0.02$ \cite{Bastero-Gil:2018uep}. Moreover, the information of the coupling between the inflaton and the radiation in the heat bath leading to a growing mode is contained in the function $G(Q_N)$ and it reads \cite{Benetti:2016jhf}, \begin{eqnarray} G(Q) = 1 + 0.335\,Q^{1.364} + 0.0185\,Q^{2.315}\,. \label{growing} \end{eqnarray} In addition, we have used the relation $\rho_r/V(\phi) = \epsilon\,Q/2(1+Q)^2$ and the approximation of the thermalized inflaton fluctuation, $1+ 2\,n_N \simeq 2\,T_N/H_N $ and $T_N/H_N = 3\,Q_N/C_T$ in order to get the last line in Eq.(\ref{spectrum}) as Ref.\cite{Bastero-Gil:2018uep}. By using Eqs.(\ref{spectrum},\ref{growing}), furthermore, the scalar spectral index is determined as \begin{eqnarray} n_s &=& 1 + \frac{d\ln \Delta_{\mathcal{R}}}{dN} \nonumber\\ &=& 1 + \frac{Q_N}{3+5\,Q_N}\frac{\big(6\,\epsilon - 2\,\eta \big)}{\Delta_{\mathcal{R}}}\,\frac{d\Delta_{\mathcal{R}}}{dQ_N}\,, \label{ns-grow}\\ \frac{d\Delta_{\mathcal{R}}}{dQ_N} &=& \frac{5\,C_T^3}{12\,\pi^4\,g_R}\Bigg[\left(1+ \frac{\sqrt{3}\,\pi\,Q_N}{\sqrt{3+4\pi\,Q_N}}\right)\frac{\left(0.457\,Q^{0.364}+0.0428\,Q^{1.315}\right)}{Q_N^2} \nonumber\\ &-& \left(2+ \frac{\sqrt{3}\,\pi\,Q_N}{ \sqrt{3+4 \pi\,Q_N}}+\frac{2 \,\sqrt{3}\, \pi^2\,Q_N^2}{(3 + 4\,\pi\, Q_N)^{\frac32}}\right)\frac{\big( 1 + 0.335\,Q^{1.364} + 0.0185\,Q^{2.315} \big)}{Q_N^3} \Bigg].\nonumber \end{eqnarray} While the tensor-to-scalar perturbation ratio, $r$ is obtained by the following formula \begin{eqnarray} r = \frac{\Delta_T}{\Delta_{\mathcal{R}}} = 16\,\epsilon\left[ \frac{6\,Q_N^3}{C_T}\left(1+ \frac{\sqrt{3}\,\pi\,Q_N}{\sqrt{3+4\pi\,Q_N}}\right)G(Q_N)\right]^{-1} \label{tensor-scalar-grow} \end{eqnarray} where $\Delta_T$ is the power spectrum of the tensor perturbation and we have used $\Delta_T = 2H^2/\pi^2M_p^2 = 2U(\chi)/3\pi^2 M_p^4$ which is the same form as in the standard (cold) inflation result for the primordial gravitational waves. \section{Confrontation with the data} \label{confront-data} \begin{figure}[!h] \includegraphics[width=12cm]{gamlam.png} \centering \caption{We display $\lambda$ as a function of $\gamma$ obtained from Eq.(\ref{lambda-cobe-normalize}) for $M_{p}=10\Lambda,\,\xi=10^{4}$, $C_{R}=70,\,\kappa\approx \sqrt{6}$ and $N=60$. As $\gamma$ increases, the magnitude of $\lambda$ needed to produce the correct amount of scalar perturbations also increases.} \label{stplot111} \end{figure} \begin{table}[h!] \begin{center} \caption{We show a set of parameters $(C_{T},\,\gamma,\,\lambda)$ obtained from Eq.(\ref{lambda-cobe-normalize}) in which their values are constrained by the COBE normalization condition given in Eq.(\ref{1r-strong}). Here we have used various values of $C_{T}$ in order to obtain viable values of $\gamma,\,\lambda$ and applied $M_{p}=10\Lambda$, $\xi=10^{4}$, $C_{R}=70$, $\kappa\approx \sqrt{6}$ and $N=60$.} \label{tab} \begin{tabular}{c|c|c} \hline\hline \quad $C_{T}$ \quad\quad & \quad $\gamma \times 10^{-2}$ \quad\quad & \quad $\lambda\times 10^{-5}$ \quad\quad \\ \hline \multirow{4}{*}{0.014} & 7.00 & 2.80\\ & 8.50 & 3.74\\ & 10.00 & 4.68\\ & 11.50 & 5.60\\ \hline \multirow{4}{*}{0.015} & 7.00 & 2.41\\ & 8.50 & 3.80\\ & 10.00 & 4.78\\ & 11.50 & 5.73\\ \hline \multirow{4}{*}{0.020} & 7.00 & 3.04\\ & 8.50 & 4.09\\ & 10.00 & 5.19\\ & 11.50 & 6.28\\ \hline \end{tabular} \end{center} \end{table} In this section, we will constrain the inflation potential with the COBE normalization condition \cite{Bezrukov:2008ut} to fix the parameters in the non-minimal warm inflation with the quantum corrected self-interacting potential. According to the Planck 2018 data, the inflaton potential must be normalized by the slow-roll parameter, $\epsilon$ and satisfied the following relation at the horizon crossing $\phi=\phi_{N}$ in order to generate the observed amplitude of the cosmological density perturbation ($A_{s}$): \begin{eqnarray} \frac{U(\phi_N)}{\epsilon(\phi_N)} \simeq (0.0276\,M_{p})^{4}\,. \label{1r-strong} \end{eqnarray} Having used the potential in Eq.(\ref{U-chi}) and the slow-roll $\epsilon$ parameter in Eq.(\ref{SR-epsilon}), we find \begin{eqnarray} \left(\frac{M_p}{\Lambda}\right)^2\left(1 + \gamma\,\frac{\xi\,\phi_N^2}{M_p^2} \right) = \frac{\sqrt{3\,\lambda}}{2\,(0.0276)^{2}}\left(\frac{\phi_N}{\Lambda}\right)^{2(1+\gamma)}\,. \label{lambda-cobe-normalize} \end{eqnarray} The resulting constraint is plotted in Fig.\ref{stplot111} by using the definition of $\phi_N$ in Eq.(\ref{Q-N}). The magnitude of $\lambda$ needed to produce the observed amplitude of scalar perturbations increases linearly for increasing $\gamma$. For reference, we consider various values of $C_T$ and figure out a pair of $(\lambda,\,\gamma)$ in which their values produce the observed amplitude of scalar perturbations. More interestingly, the numerical values of the self-interacting coupling, $\lambda$, shown in Fig.\ref{stplot111} are consistent with the results of the running coupling $\lambda$ up to two-loop corrections in the standard model of particle physics that is very close to zero at the GUT scale which would be a typical scale of inflation \cite{Degrassi:2012ry}. In addition, the values of the $\lambda$ coupling is in order $\lambda \sim 10^{-5}$ and still are much bigger than the unnaturally small of $\lambda \sim 10^{-13}$ for the minimal coupling cold inflation \cite{Guth:1982ec,Hamada:2014iga}. We present the COBE constrained results for relations between the $\lambda$ and $\gamma$ parameters with varying values of the $C_T$ in Table \ref{tab} and then compare the predictions in the $(r-n_{s})$ plane of the latest Planck 2018 data by using the expressions of the $n_s$ and $r$ in Eqs.(\ref{ns-grow}) and (\ref{tensor-scalar-grow}), respectively with the growing mode in (\ref{growing}). \begin{figure}[!h] \includegraphics[width=12cm]{plotnsrCR70.png} \centering \caption{We compare the theoretical predictions of the strong limit $Q>1$ including the growing mode effects Eqs.(\ref{ns-grow}) \& (\ref{tensor-scalar-grow}) for $C_{T}=0.020$ (purple), $C_{T}=0.015$ (orange) and $C_{T}=0.014$ (black) in the $(r-n_{s})$ plane for various values of $\gamma$ and $\lambda$ given in Table (\ref{tab}) constrained by the COBE renormalization condition by using $C_{R}=70$, $\xi=10^{4}$, $N=60$ and $M_{p}=10\Lambda$ with Planck’18 results for TT, TE, EE, +lowE+lensing+BK15+BAO.} \label{stplot1111} \end{figure} \begin{figure} \includegraphics[width=11cm]{gvsh.png} \centering \caption{The allowed region of the possible values of the $g$ and $h$ from Eq.(\ref{C11}) due to the range of $C_T$ for $0.014 \lesssim C_T \lesssim 0.02$ where $g$ and $h$ are the Yukawa couplings of the inflaton-heavy fermions and the heavy fermions-light singlet scalar and fermion fields, in the supersymmetric model respectively. } \label{gvsh} \end{figure} From Fig.\ref{stplot1111}, we present the confidence contours in the $(n_{s},\,r)$ plane. The value of $C_T$ is varied for each trajectory. The curves in this figure are related to $C_T$ as: $0.014$ (black), $0.015$ (orange) and $0.020$ (purple) from the bottom curve to the top one. With a set of input parameters when $C_T$ decreases the curve is shifted upward. The proper set of the parameters $C_{R}=70$, $\xi=10^{4}$, $N=60$ and $M_{p}=10\Lambda$ is used. With these values of the parameters, we find that in order to fit inside the $2\,\sigma$ confidence level of the Planck 2018 data, the range of $C_T$ is in $0.014 \lesssim C_T \lesssim 0.02$ and it dose not exceed the upper bound $0.020$ from the constraint of the power spectrum \cite{Bastero-Gil:2018uep}. More importantly, the given range of the parameter $C_T$, $0.014 \lesssim C_T \lesssim 0.02$ can consequently provide the possible values of the couplings $g$ and $h$ that are encoded in the $C_T$ as shown in Eq.(\ref{C11}). The allowed region in the parameter space of the $g$ and $h$ is depicted in Fig.\ref{gvsh}. To make consistent results between theory and observation, in addition, this requires that the cut-off, $\Lambda$ of the inflaton field should be less than the Planck mass around one order of magnitude in contrast to cold inflation that usually imposes $\Lambda \sim M_p$. \section{Conclusion} \label{conclusion} In this work, we presented the theoretical study of the non-minimal coupling warm inflation with the quantum-corrected self-interacting inflaton potential. The slow-roll dynamics of warm inflation in the Einstein frame is analyzed by using the dissipative coefficient as linear function of temperature. At the large field approximation in warm inflation, the universal bound for the quantum-corrected parameter, $\gamma$ is modified by the dissipative coefficient. With the proper set of the parameters, the universal bound of warm inflation is bigger than that of cold inflation. This indicates that the inflaton field in warm inflation is smaller that of the cold one at the end of inflation. Having used the COBE normalization of the observed amplitude, we found that the relationship between the self-interacting coupling, $\lambda$ and the quantum-corrected parameter, $\gamma$ is linear and the value of the $\lambda$ is in order $\mathcal{O}(\lambda) \sim 10^{-5}$ for $0.06< \gamma < 0.1$. The constraint of the $\lambda$ coupling from COBE is consistent with the renormalization group result at the GUT scale. We continuously compared the tensor to scalar ratio ($r$) and spectral index ($n_s$) from the theoretical results to the Planck 2018 data. As results, the given sets of the model's parameters provide good agreement with the Planck 2018 observational data. To make the theoretical results locating inside the 2$\sigma$ confidence level, it was found that the range of the parameter from the dissipative coefficient, $C_T$ is in range $0.014\lesssim C_T \lesssim 0.02$ and the lower bound of the $C_T$ parameter is constrained in this work. Consequently, we have also used the range of $C_T$ to evaluate the allowed region in the parameter space $g$ and $h$ in terms of the supersymmetric model that are used to calculate the dissipative coefficient. In addition, the self-interacting coupling, $\lambda$ should be very small and this is consistent with the constraint from COBE. More importantly, in contrast to cold inflation scenario, the cut-off scale of the inflaton, $\Lambda$ is smaller than that of the Planck scale of one order of magnitude to obtain the results compatible with the data. Furthermore, higher order quantum-correction and other form of the inflaton potential are worth for extensively study. More information and accurate observational data might provide more details about the quantum-correction of the inflaton and validity of the warm inflationary universe, especially the observation data of the primordial tensor modes. \begin{acknowledgments} D. Samart is financially supported by the Mid-Career Research Grant 2021 from National Research Council of Thailand under a contract No. N41A640145. P. Ma-adlerd is supported by National Astronomical Research Institute of Thailand (NARIT). P. Channuie acknowledged the Mid-Career Research Grant 2020 from National Research Council of Thailand under a contract No. NFS6400117. \end{acknowledgments}